Jelajahi Sumber

AMBARI-10886. Atlas service UI enhancements (alexantonenko)

Alex Antonenko 10 tahun lalu
induk
melakukan
4b2ca8066a

+ 2 - 1
ambari-web/app/mappers/service_metrics_mapper.js

@@ -366,7 +366,8 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({
       FALCON: [32],
       RANGER: [33],
       SPARK: [34],
-      ACCUMULO: [35]
+      ACCUMULO: [35],
+      ATLAS: [36]
     };
     if (quickLinks[item.ServiceInfo.service_name])
       finalJson.quick_links = quickLinks[item.ServiceInfo.service_name];

+ 14 - 0
ambari-web/app/models/quick_links.js

@@ -324,5 +324,19 @@ App.QuickLinks.FIXTURES = [
     regex: '^(\\d+)$',
     default_http_port: 50095,
     default_https_port: 50095
+  },
+  {
+    id:36,
+    label:'Atlas Dashboard',
+    url:'%@://%@:%@/',
+    service_id: 'ATLAS',
+    template:'%@://%@:%@/',
+    http_config: 'metadata_port',
+    https_config: 'metadata_port',
+    site: 'metadata-env',
+    regex: '^(\\d+)$',
+    default_http_port: 21000,
+    default_https_port: 21443
   }
+
 ];

+ 16 - 1
ambari-web/app/views/common/quick_view_link_view.js

@@ -75,7 +75,7 @@ App.QuickViewLinks = Em.View.extend({
   /**
    * list of files that contains properties for enabling/disabling ssl
    */
-  requiredSiteNames: ['hadoop-env','yarn-env','hbase-env','oozie-env','mapred-env','storm-env', 'falcon-env', 'core-site', 'hdfs-site', 'hbase-site', 'oozie-site', 'yarn-site', 'mapred-site', 'storm-site', 'spark-defaults', 'accumulo-site'],
+  requiredSiteNames: ['hadoop-env','yarn-env','hbase-env','oozie-env','mapred-env','storm-env', 'falcon-env', 'core-site', 'hdfs-site', 'hbase-site', 'oozie-site', 'yarn-site', 'mapred-site', 'storm-site', 'spark-defaults', 'accumulo-site', 'application-properties'],
   /**
    * Get public host name by its host name.
    *
@@ -271,6 +271,9 @@ App.QuickViewLinks = Em.View.extend({
       case "ACCUMULO":
         hosts[0] = this.findComponentHost(response.items, "ACCUMULO_MONITOR");
         break;
+      case "ATLAS":
+        hosts[0] = this.findComponentHost(response.items, "ATLAS_SERVER");
+        break;
       default:
         var service = App.StackService.find().findProperty('serviceName', serviceName);
         if (service && service.get('hasMaster')) {
@@ -340,6 +343,17 @@ App.QuickViewLinks = Em.View.extend({
         }
         return "http";
         break;
+      case "ATLAS":
+        var atlasProperties = configProperties && configProperties.findProperty('type', 'application-properties');
+        if (atlasProperties && atlasProperties.properties) {
+          if (atlasProperties.properties['enableTLS'] == "true") {
+            return "https";
+          } else {
+            return "http";
+          }
+        }
+        return "http";
+        break;
       default:
         return this.get('servicesSupportsHttps').contains(service_id) && hadoopSslEnabled ? "https" : "http";
     }
@@ -386,6 +400,7 @@ App.QuickViewLinks = Em.View.extend({
       case "spark":
       case "falcon":
       case "accumulo":
+      case "atlas":
         return "_blank";
         break;
       default: