AMBARI-14403: Improve Quicklink logic to remove any unnecessary legacy code (dili)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5cb0fadd Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5cb0fadd Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5cb0fadd Branch: refs/heads/branch-dev-patch-upgrade Commit: 5cb0faddaee06332ab703c237a7514742fbc3588 Parents: 62f3a3b Author: Di Li <d...@apache.org> Authored: Mon Feb 8 11:30:26 2016 -0500 Committer: Di Li <d...@apache.org> Committed: Mon Feb 8 11:30:26 2016 -0500 ---------------------------------------------------------------------- .../ambari/server/state/quicklinks/Link.java | 19 +--- .../FALCON/0.5.0.2.1/quicklinks/quicklinks.json | 1 - .../STORM/0.9.1.2.1/quicklinks/quicklinks.json | 1 - .../HDP/2.0.6/services/HBASE/metainfo.xml | 7 ++ .../services/HBASE/quicklinks/quicklinks.json | 97 ++++++++++++++++++++ .../stacks/HDP/2.0.6/services/HDFS/metainfo.xml | 7 ++ .../services/HDFS/quicklinks/quicklinks.json | 76 +++++++++++++++ .../HDP/2.0.6/services/OOZIE/metainfo.xml | 5 +- .../services/OOZIE/quicklinks/quicklinks.json | 1 - .../stacks/HDP/2.0.6/services/YARN/metainfo.xml | 13 +++ .../YARN/quicklinks-mapred/quicklinks.json | 76 +++++++++++++++ .../services/YARN/quicklinks/quicklinks.json | 76 +++++++++++++++ .../services/RANGER/quicklinks/quicklinks.json | 1 - .../services/SPARK/quicklinks/quicklinks.json | 1 - .../ACCUMULO/quicklinks/quicklinks.json | 1 - .../services/ATLAS/quicklinks/quicklinks.json | 1 - .../services/HBASE/quicklinks/quicklinks.json | 6 -- .../services/HDFS/quicklinks/quicklinks.json | 4 - .../services/OOZIE/quicklinks/quicklinks.json | 1 - .../services/RANGER/quicklinks/quicklinks.json | 1 - .../services/SPARK/quicklinks/quicklinks.json | 1 - .../YARN/quicklinks-mapred/quicklinks.json | 4 - .../services/YARN/quicklinks/quicklinks.json | 4 - .../resources/child_quicklinks_to_merge.json | 3 - .../resources/child_quicklinks_to_override.json | 4 - .../src/test/resources/parent_quicklinks.json | 4 - .../assets/data/configurations/quicklinks.json | 4 - .../app/views/common/quick_view_link_view.js | 10 +- 28 files changed, 360 insertions(+), 69 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/5cb0fadd/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java index a0890f1..8800b3a 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java @@ -37,9 +37,6 @@ public class Link{ @JsonProperty("url") private String url; - @JsonProperty("template") - private String template; - @JsonProperty("port") private Port port; @@ -67,14 +64,6 @@ public class Link{ this.url = url; } - public String getTemplate() { - return template; - } - - public void setTemplate(String template) { - this.template = template; - } - public String getRequiresUserName() { return requiresUserName; } @@ -93,7 +82,7 @@ public class Link{ public boolean isRemoved(){ //treat a link as removed if the section only contains a name - return (null == port && null == url && null == template && null == label && null == requiresUserName); + return (null == port && null == url && null == label && null == requiresUserName); } public void mergeWithParent(Link parentLink) { @@ -103,18 +92,12 @@ public class Link{ /* merge happens when a child link has some infor but not all of them. * If a child link has nothing but a name, it's treated as being removed from the link list */ - if(null == template && null != parentLink.getTemplate()) - template = parentLink.getTemplate(); - if(null == label && null != parentLink.getLabel()) label = parentLink.getLabel(); if(null == url && null != parentLink.getUrl()) url = parentLink.getUrl(); - if(null == template && null != parentLink.getTemplate()) - template = parentLink.getTemplate(); - if(null == requiresUserName && null != parentLink.getRequiresUserName()) requiresUserName = parentLink.getRequiresUserName(); http://git-wip-us.apache.org/repos/asf/ambari/blob/5cb0fadd/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/quicklinks/quicklinks.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/quicklinks/quicklinks.json b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/quicklinks/quicklinks.json index bbea282..54acb76 100644 --- a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/quicklinks/quicklinks.json +++ b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/quicklinks/quicklinks.json @@ -13,7 +13,6 @@ "label": "Falcon Web UI", "requires_user_name": "true", "url":"%@://%@:%@/index.html?user.name=%@", - "template":"%@://%@:%@/index.html?user.name=%@", "port":{ "http_property": "falcon_port", "http_default_port": "15000", http://git-wip-us.apache.org/repos/asf/ambari/blob/5cb0fadd/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/quicklinks/quicklinks.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/quicklinks/quicklinks.json b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/quicklinks/quicklinks.json index dd17275..b6281f7 100644 --- a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/quicklinks/quicklinks.json +++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/quicklinks/quicklinks.json @@ -13,7 +13,6 @@ "label": "Storm UI", "requires_user_name": "false", "url":"%@://%@:%@/", - "template":"%@://%@:%@/", "port":{ "http_property": "ui.port", "http_default_port": "8744", http://git-wip-us.apache.org/repos/asf/ambari/blob/5cb0fadd/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/metainfo.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/metainfo.xml index 194f79e..25303cd 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/metainfo.xml @@ -21,6 +21,13 @@ <service> <name>HBASE</name> <extends>common-services/HBASE/0.96.0.2.0</extends> + + <quickLinksConfigurations> + <quickLinksConfiguration> + <fileName>quicklinks.json</fileName> + <default>true</default> + </quickLinksConfiguration> + </quickLinksConfigurations> </service> </services> </metainfo> http://git-wip-us.apache.org/repos/asf/ambari/blob/5cb0fadd/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/quicklinks/quicklinks.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/quicklinks/quicklinks.json b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/quicklinks/quicklinks.json new file mode 100644 index 0000000..5568122 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/quicklinks/quicklinks.json @@ -0,0 +1,97 @@ +{ + "name": "default", + "description": "default quick links configuration", + "configuration": { + "protocol": + { + "type":"http" + }, + + "links": [ + { + "name": "hbase_master_ui", + "label": "HBase Master UI", + "url":"%@://%@:%@/master-status", + "requires_user_name": "false", + "port":{ + "http_property": "hbase.master.info.port", + "http_default_port": "60010", + "https_property": "hbase.master.info.port", + "https_default_port": "60443", + "regex": "", + "site": "hbase-site" + } + }, + { + "name": "hbase_logs", + "label": "HBase Logs", + "url":"%@://%@:%@/logs", + "requires_user_name": "false", + "port":{ + "http_property": "hbase.master.info.port", + "http_default_port": "60010", + "https_property": "hbase.master.info.port", + "https_default_port": "60443", + "regex": "", + "site": "hbase-site" + } + }, + { + "name": "zookeeper_info", + "label": "Zookeeper Info", + "url":"%@://%@:%@/zk.jsp", + "requires_user_name": "false", + "port":{ + "http_property": "hbase.master.info.port", + "http_default_port": "60010", + "https_property": "hbase.master.info.port", + "https_default_port": "60443", + "regex": "", + "site": "hbase-site" + } + }, + { + "name": "hbase_master_jmx", + "label": "HBase Master JMX", + "url":"%@://%@:%@/jmx", + "requires_user_name": "false", + "port":{ + "http_property": "hbase.master.info.port", + "http_default_port": "60010", + "https_property": "hbase.master.info.port", + "https_default_port": "60443", + "regex": "", + "site": "hbase-site" + } + }, + { + "name": "debug_dump", + "label": "Debug Dump", + "url":"%@://%@:%@/dump", + "requires_user_name": "false", + "port":{ + "http_property": "hbase.master.info.port", + "http_default_port": "60010", + "https_property": "hbase.master.info.port", + "https_default_port": "60443", + "regex": "", + "site": "hbase-site" + } + }, + { + "name": "thread_stacks", + "label": "Thread Stacks", + "url":"%@://%@:%@/stacks", + "requires_user_name": "false", + "port":{ + "http_property": "hbase.master.info.port", + "http_default_port": "60010", + "https_property": "hbase.master.info.port", + "https_default_port": "60443", + "regex": "", + "site": "hbase-site" + } + } + ] + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/5cb0fadd/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/metainfo.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/metainfo.xml index a5d6862..410ff95 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/metainfo.xml @@ -21,6 +21,13 @@ <service> <name>HDFS</name> <extends>common-services/HDFS/2.1.0.2.0</extends> + + <quickLinksConfigurations> + <quickLinksConfiguration> + <fileName>quicklinks.json</fileName> + <default>true</default> + </quickLinksConfiguration> + </quickLinksConfigurations> </service> </services> </metainfo> http://git-wip-us.apache.org/repos/asf/ambari/blob/5cb0fadd/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/quicklinks/quicklinks.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/quicklinks/quicklinks.json b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/quicklinks/quicklinks.json new file mode 100644 index 0000000..a4216e3 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/quicklinks/quicklinks.json @@ -0,0 +1,76 @@ +{ + "name": "default", + "description": "default quick links configuration", + "configuration": { + "protocol": + { + "type":"https", + "checks":[ + { + "property":"dfs.http.policy", + "desired":"HTTPS_ONLY", + "site":"hdfs-site" + } + ] + }, + + "links": [ + { + "name": "namenode_ui", + "label": "NameNode UI", + "url":"%@://%@:%@", + "requires_user_name": "false", + "port":{ + "http_property": "dfs.namenode.http-address", + "http_default_port": "50070", + "https_property": "dfs.namenode.https-address", + "https_default_port": "50470", + "regex": "\\w*:(\\d+)", + "site": "hdfs-site" + } + }, + { + "name": "namenode_logs", + "label": "NameNode Logs", + "url":"%@://%@:%@/logs", + "requires_user_name": "false", + "port":{ + "http_property": "dfs.namenode.http-address", + "http_default_port": "50070", + "https_property": "dfs.namenode.https-address", + "https_default_port": "50470", + "regex": "\\w*:(\\d+)", + "site": "hdfs-site" + } + }, + { + "name": "namenode_jmx", + "label": "NameNode JMX", + "url":"%@://%@:%@/jmx", + "requires_user_name": "false", + "port":{ + "http_property": "dfs.namenode.http-address", + "http_default_port": "50070", + "https_property": "dfs.namenode.https-address", + "https_default_port": "50470", + "regex": "\\w*:(\\d+)", + "site": "hdfs-site" + } + }, + { + "name": "Thread Stacks", + "label": "Thread Stacks", + "url":"%@://%@:%@/stacks", + "requires_user_name": "false", + "port":{ + "http_property": "dfs.namenode.http-address", + "http_default_port": "50070", + "https_property": "dfs.namenode.https-address", + "https_default_port": "50470", + "regex": "\\w*:(\\d+)", + "site": "hdfs-site" + } + } + ] + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/5cb0fadd/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/metainfo.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/metainfo.xml index 8b24091..90e1cc5 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/metainfo.xml @@ -21,13 +21,12 @@ <service> <name>OOZIE</name> <extends>common-services/OOZIE/4.0.0.2.0</extends> - </service> - - <quickLinksConfigurations> + <quickLinksConfigurations> <quickLinksConfiguration> <fileName>quicklinks.json</fileName> <default>true</default> </quickLinksConfiguration> </quickLinksConfigurations> + </service> </services> </metainfo> http://git-wip-us.apache.org/repos/asf/ambari/blob/5cb0fadd/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/quicklinks/quicklinks.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/quicklinks/quicklinks.json b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/quicklinks/quicklinks.json index e7c23a4..621fe8a 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/quicklinks/quicklinks.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/quicklinks/quicklinks.json @@ -30,7 +30,6 @@ "label": "Oozie Web UI", "requires_user_name": "true", "url":"%@://%@:%@/oozie?user.name=%@", - "template":"%@://%@:%@/oozie?user.name=%@", "port":{ "http_property": "oozie.base.url", "http_default_port": "11000", http://git-wip-us.apache.org/repos/asf/ambari/blob/5cb0fadd/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/metainfo.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/metainfo.xml index 7a1c715..59524be 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/metainfo.xml @@ -22,10 +22,23 @@ <service> <name>YARN</name> <extends>common-services/YARN/2.1.0.2.0</extends> + <quickLinksConfigurations> + <quickLinksConfiguration> + <fileName>quicklinks.json</fileName> + <default>true</default> + </quickLinksConfiguration> + </quickLinksConfigurations> </service> <service> <name>MAPREDUCE2</name> <extends>common-services/MAPREDUCE2/2.1.0.2.0.6.0</extends> + <quickLinksConfigurations-dir>quicklinks-mapred</quickLinksConfigurations-dir> + <quickLinksConfigurations> + <quickLinksConfiguration> + <fileName>quicklinks.json</fileName> + <default>true</default> + </quickLinksConfiguration> + </quickLinksConfigurations> </service> </services> </metainfo> http://git-wip-us.apache.org/repos/asf/ambari/blob/5cb0fadd/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/quicklinks-mapred/quicklinks.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/quicklinks-mapred/quicklinks.json b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/quicklinks-mapred/quicklinks.json new file mode 100644 index 0000000..36f71b5 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/quicklinks-mapred/quicklinks.json @@ -0,0 +1,76 @@ +{ + "name": "default", + "description": "default quick links configuration", + "configuration": { + "protocol": + { + "type":"https", + "checks":[ + { + "property":"mapreduce.jobhistory.http.policy", + "desired":"HTTPS_ONLY", + "site":"mapred-site" + } + ] + }, + + "links": [ + { + "name": "jobhistory_ui", + "label": "JobHistory UI", + "requires_user_name": "false", + "url": "%@://%@:%@", + "port":{ + "http_property": "mapreduce.jobhistory.webapp.address", + "http_default_port": "19888", + "https_property": "mapreduce.jobhistory.webapp.https.address", + "https_default_port": "8090", + "regex": "\\w*:(\\d+)", + "site": "mapred-site" + } + }, + { + "name": "jobhistory_logs", + "label": "JobHistory logs", + "requires_user_name": "false", + "url": "%@://%@:%@/logs", + "port":{ + "http_property": "mapreduce.jobhistory.webapp.address", + "http_default_port": "19888", + "https_property": "mapreduce.jobhistory.webapp.https.address", + "https_default_port": "8090", + "regex": "\\w*:(\\d+)", + "site": "mapred-site" + } + }, + { + "name":"jobhistory_jmx", + "label":"JobHistory JMX", + "requires_user_name":"false", + "url":"%@://%@:%@/jmx", + "port":{ + "http_property": "mapreduce.jobhistory.webapp.address", + "http_default_port": "19888", + "https_property": "mapreduce.jobhistory.webapp.https.address", + "https_default_port": "8090", + "regex": "\\w*:(\\d+)", + "site": "mapred-site" + } + }, + { + "name":"thread_stacks", + "label":"Thread Stacks", + "requires_user_name": "false", + "url":"%@://%@:%@/stacks", + "port":{ + "http_property": "mapreduce.jobhistory.webapp.address", + "http_default_port": "19888", + "https_property": "mapreduce.jobhistory.webapp.https.address", + "https_default_port": "8090", + "regex": "\\w*:(\\d+)", + "site": "mapred-site" + } + } + ] + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/5cb0fadd/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/quicklinks/quicklinks.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/quicklinks/quicklinks.json b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/quicklinks/quicklinks.json new file mode 100644 index 0000000..101be6d --- /dev/null +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/quicklinks/quicklinks.json @@ -0,0 +1,76 @@ +{ + "name": "default", + "description": "default quick links configuration", + "configuration": { + "protocol": + { + "type":"https", + "checks":[ + { + "property":"yarn.http.policy", + "desired":"HTTPS_ONLY", + "site":"yarn-site" + } + ] + }, + + "links": [ + { + "name": "resourcemanager_ui", + "label": "ResourceManager UI", + "requires_user_name": "false", + "url": "%@://%@:%@", + "port":{ + "http_property": "yarn.timeline-service.webapp.address", + "http_default_port": "8088", + "https_property": "yarn.timeline-service.webapp.https.address", + "https_default_port": "8090", + "regex": "\\w*:(\\d+)", + "site": "yarn-site" + } + }, + { + "name": "resourcemanager_logs", + "label": "ResourceManager logs", + "requires_user_name": "false", + "url": "%@://%@:%@/logs", + "port":{ + "http_property": "yarn.timeline-service.webapp.address", + "http_default_port": "8088", + "https_property": "yarn.timeline-service.webapp.https.address", + "https_default_port": "8090", + "regex": "\\w*:(\\d+)", + "site": "yarn-site" + } + }, + { + "name": "resourcemanager_jmx", + "label":"ResourceManager JMX", + "requires_user_name": "false", + "url":"%@://%@:%@/jmx", + "port":{ + "http_property": "yarn.timeline-service.webapp.address", + "http_default_port": "8088", + "https_property": "yarn.timeline-service.webapp.https.address", + "https_default_port": "8090", + "regex": "\\w*:(\\d+)", + "site": "yarn-site" + } + }, + { + "name": "thread_stacks", + "label":"Thread Stacks", + "requires_user_name": "false", + "url":"%@://%@:%@/stacks", + "port":{ + "http_property": "yarn.timeline-service.webapp.address", + "http_default_port": "8088", + "https_property": "yarn.timeline-service.webapp.https.address", + "https_default_port": "8090", + "regex": "\\w*:(\\d+)", + "site": "yarn-site" + } + } + ] + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/5cb0fadd/ambari-server/src/main/resources/stacks/HDP/2.2/services/RANGER/quicklinks/quicklinks.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/RANGER/quicklinks/quicklinks.json b/ambari-server/src/main/resources/stacks/HDP/2.2/services/RANGER/quicklinks/quicklinks.json index 7e2ba25..42611d6 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/RANGER/quicklinks/quicklinks.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/RANGER/quicklinks/quicklinks.json @@ -20,7 +20,6 @@ "label": "Ranger Admin UI", "requires_user_name": "false", "url": "%@://%@:%@", - "template": "%@://%@:%@", "port":{ "http_property": "http.service.port", "http_default_port": "6080", http://git-wip-us.apache.org/repos/asf/ambari/blob/5cb0fadd/ambari-server/src/main/resources/stacks/HDP/2.2/services/SPARK/quicklinks/quicklinks.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/SPARK/quicklinks/quicklinks.json b/ambari-server/src/main/resources/stacks/HDP/2.2/services/SPARK/quicklinks/quicklinks.json index c3e51e6..685665a 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/SPARK/quicklinks/quicklinks.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/SPARK/quicklinks/quicklinks.json @@ -13,7 +13,6 @@ "label": "Spark History Server UI", "requires_user_name": "false", "url": "%@://%@:%@", - "template": "%@://%@:%@", "port":{ "http_property": "spark.history.ui.port", "http_default_port": "18080", http://git-wip-us.apache.org/repos/asf/ambari/blob/5cb0fadd/ambari-server/src/main/resources/stacks/HDP/2.3/services/ACCUMULO/quicklinks/quicklinks.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/ACCUMULO/quicklinks/quicklinks.json b/ambari-server/src/main/resources/stacks/HDP/2.3/services/ACCUMULO/quicklinks/quicklinks.json index 21c5e54..36e67c2 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/ACCUMULO/quicklinks/quicklinks.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/ACCUMULO/quicklinks/quicklinks.json @@ -25,7 +25,6 @@ "label": "Accumulo Monitor UI", "requires_user_name": "false", "url": "%@://%@:%@/", - "template": "%@://%@:%@/", "port":{ "http_property": "monitor.port.client", "http_default_port": "50095", http://git-wip-us.apache.org/repos/asf/ambari/blob/5cb0fadd/ambari-server/src/main/resources/stacks/HDP/2.3/services/ATLAS/quicklinks/quicklinks.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/ATLAS/quicklinks/quicklinks.json b/ambari-server/src/main/resources/stacks/HDP/2.3/services/ATLAS/quicklinks/quicklinks.json index dd67ec0..37e95cf 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/ATLAS/quicklinks/quicklinks.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/ATLAS/quicklinks/quicklinks.json @@ -20,7 +20,6 @@ "label": "Atlas Dashboard", "requires_user_name": "true", "url": "%@://%@:%@/#!/search?user.name=%@", - "template": "%@://%@:%@/#!/search?user.name=%@", "port":{ "http_property": "atlas.server.http.port", "http_default_port": "21000", http://git-wip-us.apache.org/repos/asf/ambari/blob/5cb0fadd/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/quicklinks/quicklinks.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/quicklinks/quicklinks.json b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/quicklinks/quicklinks.json index b52af55..5568122 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/quicklinks/quicklinks.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/quicklinks/quicklinks.json @@ -13,7 +13,6 @@ "label": "HBase Master UI", "url":"%@://%@:%@/master-status", "requires_user_name": "false", - "template":"%@://%@:%@/master-status", "port":{ "http_property": "hbase.master.info.port", "http_default_port": "60010", @@ -28,7 +27,6 @@ "label": "HBase Logs", "url":"%@://%@:%@/logs", "requires_user_name": "false", - "template":"%@://%@:%@/logs", "port":{ "http_property": "hbase.master.info.port", "http_default_port": "60010", @@ -43,7 +41,6 @@ "label": "Zookeeper Info", "url":"%@://%@:%@/zk.jsp", "requires_user_name": "false", - "template":"%@://%@:%@/zk.jsp", "port":{ "http_property": "hbase.master.info.port", "http_default_port": "60010", @@ -58,7 +55,6 @@ "label": "HBase Master JMX", "url":"%@://%@:%@/jmx", "requires_user_name": "false", - "template":"%@://%@:%@/jmx", "port":{ "http_property": "hbase.master.info.port", "http_default_port": "60010", @@ -73,7 +69,6 @@ "label": "Debug Dump", "url":"%@://%@:%@/dump", "requires_user_name": "false", - "template":"%@://%@:%@/dump", "port":{ "http_property": "hbase.master.info.port", "http_default_port": "60010", @@ -88,7 +83,6 @@ "label": "Thread Stacks", "url":"%@://%@:%@/stacks", "requires_user_name": "false", - "template":"%@://%@:%@/stacks", "port":{ "http_property": "hbase.master.info.port", "http_default_port": "60010", http://git-wip-us.apache.org/repos/asf/ambari/blob/5cb0fadd/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/quicklinks/quicklinks.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/quicklinks/quicklinks.json b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/quicklinks/quicklinks.json index 9fb97d0..a4216e3 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/quicklinks/quicklinks.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/quicklinks/quicklinks.json @@ -20,7 +20,6 @@ "label": "NameNode UI", "url":"%@://%@:%@", "requires_user_name": "false", - "template":"%@://%@:%@", "port":{ "http_property": "dfs.namenode.http-address", "http_default_port": "50070", @@ -35,7 +34,6 @@ "label": "NameNode Logs", "url":"%@://%@:%@/logs", "requires_user_name": "false", - "template":"%@://%@:%@/logs", "port":{ "http_property": "dfs.namenode.http-address", "http_default_port": "50070", @@ -50,7 +48,6 @@ "label": "NameNode JMX", "url":"%@://%@:%@/jmx", "requires_user_name": "false", - "template":"%@://%@:%@/jmx", "port":{ "http_property": "dfs.namenode.http-address", "http_default_port": "50070", @@ -65,7 +62,6 @@ "label": "Thread Stacks", "url":"%@://%@:%@/stacks", "requires_user_name": "false", - "template":"%@://%@:%@/stacks", "port":{ "http_property": "dfs.namenode.http-address", "http_default_port": "50070", http://git-wip-us.apache.org/repos/asf/ambari/blob/5cb0fadd/ambari-server/src/main/resources/stacks/HDP/2.3/services/OOZIE/quicklinks/quicklinks.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/OOZIE/quicklinks/quicklinks.json b/ambari-server/src/main/resources/stacks/HDP/2.3/services/OOZIE/quicklinks/quicklinks.json index e7c23a4..621fe8a 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/OOZIE/quicklinks/quicklinks.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/OOZIE/quicklinks/quicklinks.json @@ -30,7 +30,6 @@ "label": "Oozie Web UI", "requires_user_name": "true", "url":"%@://%@:%@/oozie?user.name=%@", - "template":"%@://%@:%@/oozie?user.name=%@", "port":{ "http_property": "oozie.base.url", "http_default_port": "11000", http://git-wip-us.apache.org/repos/asf/ambari/blob/5cb0fadd/ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/quicklinks/quicklinks.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/quicklinks/quicklinks.json b/ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/quicklinks/quicklinks.json index 74ea153..795e464 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/quicklinks/quicklinks.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/quicklinks/quicklinks.json @@ -25,7 +25,6 @@ "label": "Ranger Admin UI", "requires_user_name": "false", "url": "%@://%@:%@", - "template": "%@://%@:%@", "port":{ "http_property": "http.service.port", "http_default_port": "6080", http://git-wip-us.apache.org/repos/asf/ambari/blob/5cb0fadd/ambari-server/src/main/resources/stacks/HDP/2.3/services/SPARK/quicklinks/quicklinks.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/SPARK/quicklinks/quicklinks.json b/ambari-server/src/main/resources/stacks/HDP/2.3/services/SPARK/quicklinks/quicklinks.json index c3e51e6..685665a 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/SPARK/quicklinks/quicklinks.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/SPARK/quicklinks/quicklinks.json @@ -13,7 +13,6 @@ "label": "Spark History Server UI", "requires_user_name": "false", "url": "%@://%@:%@", - "template": "%@://%@:%@", "port":{ "http_property": "spark.history.ui.port", "http_default_port": "18080", http://git-wip-us.apache.org/repos/asf/ambari/blob/5cb0fadd/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/quicklinks-mapred/quicklinks.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/quicklinks-mapred/quicklinks.json b/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/quicklinks-mapred/quicklinks.json index 993267d..36f71b5 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/quicklinks-mapred/quicklinks.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/quicklinks-mapred/quicklinks.json @@ -20,7 +20,6 @@ "label": "JobHistory UI", "requires_user_name": "false", "url": "%@://%@:%@", - "template": "%@://%@:%@", "port":{ "http_property": "mapreduce.jobhistory.webapp.address", "http_default_port": "19888", @@ -35,7 +34,6 @@ "label": "JobHistory logs", "requires_user_name": "false", "url": "%@://%@:%@/logs", - "template": "%@://%@:%@/logs", "port":{ "http_property": "mapreduce.jobhistory.webapp.address", "http_default_port": "19888", @@ -50,7 +48,6 @@ "label":"JobHistory JMX", "requires_user_name":"false", "url":"%@://%@:%@/jmx", - "template":"%@://%@/jmx", "port":{ "http_property": "mapreduce.jobhistory.webapp.address", "http_default_port": "19888", @@ -65,7 +62,6 @@ "label":"Thread Stacks", "requires_user_name": "false", "url":"%@://%@:%@/stacks", - "template":"%@://%@/stacks", "port":{ "http_property": "mapreduce.jobhistory.webapp.address", "http_default_port": "19888", http://git-wip-us.apache.org/repos/asf/ambari/blob/5cb0fadd/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/quicklinks/quicklinks.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/quicklinks/quicklinks.json b/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/quicklinks/quicklinks.json index 3cf4c7f..101be6d 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/quicklinks/quicklinks.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/quicklinks/quicklinks.json @@ -20,7 +20,6 @@ "label": "ResourceManager UI", "requires_user_name": "false", "url": "%@://%@:%@", - "template": "%@://%@:%@", "port":{ "http_property": "yarn.timeline-service.webapp.address", "http_default_port": "8088", @@ -35,7 +34,6 @@ "label": "ResourceManager logs", "requires_user_name": "false", "url": "%@://%@:%@/logs", - "template": "%@://%@:%@/logs", "port":{ "http_property": "yarn.timeline-service.webapp.address", "http_default_port": "8088", @@ -50,7 +48,6 @@ "label":"ResourceManager JMX", "requires_user_name": "false", "url":"%@://%@:%@/jmx", - "template":"%@://%@:%@/jmx", "port":{ "http_property": "yarn.timeline-service.webapp.address", "http_default_port": "8088", @@ -65,7 +62,6 @@ "label":"Thread Stacks", "requires_user_name": "false", "url":"%@://%@:%@/stacks", - "template":"%@://%@:%@/stacks", "port":{ "http_property": "yarn.timeline-service.webapp.address", "http_default_port": "8088", http://git-wip-us.apache.org/repos/asf/ambari/blob/5cb0fadd/ambari-server/src/test/resources/child_quicklinks_to_merge.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/resources/child_quicklinks_to_merge.json b/ambari-server/src/test/resources/child_quicklinks_to_merge.json index 819c400..1fb09fd 100644 --- a/ambari-server/src/test/resources/child_quicklinks_to_merge.json +++ b/ambari-server/src/test/resources/child_quicklinks_to_merge.json @@ -20,7 +20,6 @@ "label": "JobHistory UI", "requires_user_name": "false", "url": "%@://%@:%@", - "template": "%@://%@:%@", "port":{ "http_property": "mapreduce.jobhistory.webapp.address", "http_default_port": "19888", @@ -35,7 +34,6 @@ "label": "JobHistory logs", "requires_user_name": "false", "url": "%@://%@:%@/logs", - "template": "%@://%@:%@/logs", "port":{ "http_property": "mapreduce.jobhistory.webapp.address", "http_default_port": "19888", @@ -50,7 +48,6 @@ "label":"JobHistory JMX", "requires_user_name":"false", "url":"%@://%@:%@/jmx", - "template":"%@://%@/jmx", "port":{ "http_property": "mapreduce.jobhistory.webapp.address", "http_default_port": "19888", http://git-wip-us.apache.org/repos/asf/ambari/blob/5cb0fadd/ambari-server/src/test/resources/child_quicklinks_to_override.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/resources/child_quicklinks_to_override.json b/ambari-server/src/test/resources/child_quicklinks_to_override.json index b042f98..4309532 100644 --- a/ambari-server/src/test/resources/child_quicklinks_to_override.json +++ b/ambari-server/src/test/resources/child_quicklinks_to_override.json @@ -30,7 +30,6 @@ "label": "JobHistory UI", "requires_user_name": "false", "url": "%@://%@:%@", - "template": "%@://%@:%@", "port":{ "http_property": "mapreduce.jobhistory.webapp.address", "http_default_port": "19888", @@ -45,7 +44,6 @@ "label": "JobHistory logs", "requires_user_name": "false", "url": "%@://%@:%@/logs", - "template": "%@://%@:%@/logs", "port":{ "http_property": "mapreduce.jobhistory.webapp.address", "http_default_port": "19888", @@ -60,7 +58,6 @@ "label":"JobHistory JMX", "requires_user_name":"false", "url":"%@://%@:%@/jmx", - "template":"%@://%@/jmx", "port":{ "http_property": "mapreduce.jobhistory.webapp.address", "http_default_port": "19888", @@ -75,7 +72,6 @@ "label":"Thread Stacks", "requires_user_name": "false", "url":"%@://%@:%@/stacks", - "template":"%@://%@/stacks", "port":{ "http_property": "mapreduce.jobhistory.webapp.address", "http_default_port": "19888", http://git-wip-us.apache.org/repos/asf/ambari/blob/5cb0fadd/ambari-server/src/test/resources/parent_quicklinks.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/resources/parent_quicklinks.json b/ambari-server/src/test/resources/parent_quicklinks.json index 3cf4c7f..101be6d 100644 --- a/ambari-server/src/test/resources/parent_quicklinks.json +++ b/ambari-server/src/test/resources/parent_quicklinks.json @@ -20,7 +20,6 @@ "label": "ResourceManager UI", "requires_user_name": "false", "url": "%@://%@:%@", - "template": "%@://%@:%@", "port":{ "http_property": "yarn.timeline-service.webapp.address", "http_default_port": "8088", @@ -35,7 +34,6 @@ "label": "ResourceManager logs", "requires_user_name": "false", "url": "%@://%@:%@/logs", - "template": "%@://%@:%@/logs", "port":{ "http_property": "yarn.timeline-service.webapp.address", "http_default_port": "8088", @@ -50,7 +48,6 @@ "label":"ResourceManager JMX", "requires_user_name": "false", "url":"%@://%@:%@/jmx", - "template":"%@://%@:%@/jmx", "port":{ "http_property": "yarn.timeline-service.webapp.address", "http_default_port": "8088", @@ -65,7 +62,6 @@ "label":"Thread Stacks", "requires_user_name": "false", "url":"%@://%@:%@/stacks", - "template":"%@://%@:%@/stacks", "port":{ "http_property": "yarn.timeline-service.webapp.address", "http_default_port": "8088", http://git-wip-us.apache.org/repos/asf/ambari/blob/5cb0fadd/ambari-web/app/assets/data/configurations/quicklinks.json ---------------------------------------------------------------------- diff --git a/ambari-web/app/assets/data/configurations/quicklinks.json b/ambari-web/app/assets/data/configurations/quicklinks.json index 505a619..e5873ab 100644 --- a/ambari-web/app/assets/data/configurations/quicklinks.json +++ b/ambari-web/app/assets/data/configurations/quicklinks.json @@ -29,7 +29,6 @@ "name" : "resourcemanager_ui", "label" : "ResourceManager UI", "url" : "%@://%@:%@", - "template" : "%@://%@:%@", "port" : { "regex" : "\\w*:(\\d+)", "site" : "yarn-site", @@ -46,7 +45,6 @@ "name" : "resourcemanager_logs", "label" : "ResourceManager logs", "url" : "%@://%@:%@/logs", - "template" : "%@://%@:%@/logs", "port" : { "regex" : "\\w*:(\\d+)", "site" : "yarn-site", @@ -63,7 +61,6 @@ "name" : "resourcemanager_jmx", "label" : "ResourceManager JMX", "url" : "%@://%@:%@/jmx", - "template" : "%@://%@:%@/jmx", "port" : { "regex" : "\\w*:(\\d+)", "site" : "yarn-site", @@ -80,7 +77,6 @@ "name" : "thread_stacks", "label" : "Thread Stacks", "url" : "%@://%@:%@/stacks", - "template" : "%@://%@:%@/stacks", "port" : { "regex" : "\\w*:(\\d+)", "site" : "yarn-site", http://git-wip-us.apache.org/repos/asf/ambari/blob/5cb0fadd/ambari-web/app/views/common/quick_view_link_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/common/quick_view_link_view.js b/ambari-web/app/views/common/quick_view_link_view.js index 567f65c..1eef254 100644 --- a/ambari-web/app/views/common/quick_view_link_view.js +++ b/ambari-web/app/views/common/quick_view_link_view.js @@ -278,8 +278,8 @@ App.QuickViewLinks = Em.View.extend({ toAddLink: function(link){ var linkRemoved = Em.get(link, 'removed'); - var template = Em.get(link, 'template'); - return (template && !linkRemoved); + var url = Em.get(link, 'url'); + return (url && !linkRemoved); }, getHostLink: function(link, host, protocol, configProperties, response){ @@ -302,7 +302,7 @@ App.QuickViewLinks = Em.View.extend({ if (this.toAddLink(link)) { var newItem = {}; var requiresUserName = Em.get(link, 'requires_user_name'); - var template = Em.get(link, 'template'); + var template = Em.get(link, 'url'); if('true' === requiresUserName){ newItem.url = template.fmt(protocol, host, linkPort, App.router.get('loginName')); } else { @@ -377,8 +377,8 @@ App.QuickViewLinks = Em.View.extend({ var links = Em.get(quickLinksConfig, 'links'); links.forEach(function(link){ var linkRemoved = Em.get(link, 'removed'); - var template = Em.get(link, 'template'); - if (template && !linkRemoved) { + var url = Em.get(link, 'url'); + if (url && !linkRemoved) { var port; var hostNameRegExp = new RegExp('([\\w\\W]*):\\d+'); if (serviceName === 'HDFS') {