ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject [05/26] git commit: AMBARI-7243. Admin View: no way to link to instance if you create w/o a label via API. (akovalenko)
Date Thu, 11 Sep 2014 19:02:25 GMT
AMBARI-7243. Admin View: no way to link to instance if you create w/o a label via API. (akovalenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3f9d5a53
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3f9d5a53
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3f9d5a53

Branch: refs/heads/branch-alerts-dev
Commit: 3f9d5a53f31f2bab0907f0c88cf5fdb1b5e8d5d6
Parents: dcc00b6
Author: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Authored: Wed Sep 10 19:02:57 2014 +0300
Committer: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Committed: Wed Sep 10 19:03:16 2014 +0300

----------------------------------------------------------------------
 .../main/resources/ui/admin-web/app/scripts/services/View.js   | 6 +++---
 .../ui/admin-web/app/views/ambariViews/listTable.html          | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/3f9d5a53/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/View.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/View.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/View.js
index 0634a25..8f3b376 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/View.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/View.js
@@ -59,9 +59,9 @@ angular.module('ambariAdminConsole')
     angular.forEach(item.versions, function(version) {
       versions[version.ViewVersionInfo.version] = version.instances.length;
       
-      angular.forEach(version.instances, function(isntance) {
-        isntance.label = version.ViewVersionInfo.label;
-      })
+      angular.forEach(version.instances, function(instance) {
+        instance.label = instance.ViewInstanceInfo.label || version.ViewVersionInfo.label
|| instance.ViewInstanceInfo.view_name;
+      });
 
       self.instances = self.instances.concat(version.instances);
     });

http://git-wip-us.apache.org/repos/asf/ambari/blob/3f9d5a53/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/listTable.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/listTable.html
b/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/listTable.html
index 13c6118..e27c5e5 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/listTable.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/listTable.html
@@ -54,7 +54,7 @@
           <tr ng-repeat="instance in view.instances">
             <td class="col-sm-3"></td>
             <td class="col-sm-3">
-              <a href="#/views/{{view.view_name}}/versions/{{instance.ViewInstanceInfo.version}}/instances/{{instance.ViewInstanceInfo.instance_name}}/edit"
class="instance-link">{{instance.ViewInstanceInfo.label}}</a>
+              <a href="#/views/{{view.view_name}}/versions/{{instance.ViewInstanceInfo.version}}/instances/{{instance.ViewInstanceInfo.instance_name}}/edit"
class="instance-link">{{instance.label}}</a>
             </td>
             <td class="col-sm-1">{{instance.ViewInstanceInfo.version}}</td>
             <td class="col-sm-5 " ><div class="description-column" tooltip="{{instance.ViewInstanceInfo.description}}">{{instance.ViewInstanceInfo.description
|| 'No description'}}</div>


Mime
View raw message