ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xiw...@apache.org
Subject [1/2] git commit: AMBARI-7089. Config History: User service display name, rather than the ID.(XIWANG)
Date Fri, 29 Aug 2014 20:57:49 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 72fe79c87 -> fa7341fe4


AMBARI-7089. Config History: User service display name, rather than the ID.(XIWANG)


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

Branch: refs/heads/trunk
Commit: fa7341fe4699fac64af861d52f1b6332175c4514
Parents: 7dcdeef
Author: Xi Wang <xiwang@apache.org>
Authored: Fri Aug 29 11:20:01 2014 -0700
Committer: Xi Wang <xiwang@apache.org>
Committed: Fri Aug 29 13:57:15 2014 -0700

----------------------------------------------------------------------
 ambari-web/app/controllers/wizard/step8_controller.js       | 2 +-
 ambari-web/app/models/service_config_version.js             | 9 ++++++---
 .../app/templates/common/configs/config_history_flow.hbs    | 6 +++---
 ambari-web/app/templates/main/dashboard/config_history.hbs  | 2 +-
 4 files changed, 11 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/fa7341fe/ambari-web/app/controllers/wizard/step8_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step8_controller.js b/ambari-web/app/controllers/wizard/step8_controller.js
index b008f92..8d29d14 100644
--- a/ambari-web/app/controllers/wizard/step8_controller.js
+++ b/ambari-web/app/controllers/wizard/step8_controller.js
@@ -1416,7 +1416,7 @@ App.WizardStep8Controller = Em.Controller.extend(App.AddSecurityConfigs,
{
     selectedServices.forEach(function (service) {
       Object.keys(service.get('configTypes')).forEach(function (type) {
         if (!this.get('serviceConfigTags').someProperty('type', type)) {
-          var serviceVersionNotes = Em.I18n.t('dashboard.configHistory.table.notes.default').format(service.get('serviceName'));
+          var serviceVersionNotes = Em.I18n.t('dashboard.configHistory.table.notes.default').format(service.get('displayName'));
           if (!App.supports.capacitySchedulerUi && service.get('serviceName') ===
'MAPREDUCE' && (type === 'capacity-scheduler' || type === 'mapred-queue-acls')) {
             return;
           } else if (type === 'core-site') {

http://git-wip-us.apache.org/repos/asf/ambari/blob/fa7341fe/ambari-web/app/models/service_config_version.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/service_config_version.js b/ambari-web/app/models/service_config_version.js
index 1f34261..43b6026 100644
--- a/ambari-web/app/models/service_config_version.js
+++ b/ambari-web/app/models/service_config_version.js
@@ -23,6 +23,9 @@ var dateUtil = require('utils/date');
 
 App.ServiceConfigVersion = DS.Model.extend({
   serviceName: DS.attr('string'),
+  displayName: function() {
+    return App.format.role(this.get('serviceName'));
+  }.property('serviceName'),
   groupName: DS.attr('string'),
   groupId: DS.attr('string'),
   version: DS.attr('number'),
@@ -33,10 +36,10 @@ App.ServiceConfigVersion = DS.Model.extend({
   index: DS.attr('number'),
   isCurrent: DS.attr('boolean'),
   currentTooltip: function () {
-    return Em.I18n.t('dashboard.configHistory.table.current.tooltip').format(this.get('serviceName'),
this.get('configGroupName'));
-  }.property('serviceName', 'configGroupName'),
+    return Em.I18n.t('dashboard.configHistory.table.current.tooltip').format(this.get('displayName'),
this.get('configGroupName'));
+  }.property('displayName', 'configGroupName'),
   configGroupName: function () {
-    return this.get('groupName') || (this.get('serviceName') + ' ' + Em.I18n.t('common.default'));
+    return this.get('groupName') || (this.get('displayName') + ' ' + Em.I18n.t('common.default'));
   }.property('groupName'),
   briefNotes: function () {
     return (typeof this.get('notes') === 'string') ? this.get('notes').slice(0, 100) : "";

http://git-wip-us.apache.org/repos/asf/ambari/blob/fa7341fe/ambari-web/app/templates/common/configs/config_history_flow.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/config_history_flow.hbs b/ambari-web/app/templates/common/configs/config_history_flow.hbs
index 52846b9..9825fe4 100644
--- a/ambari-web/app/templates/common/configs/config_history_flow.hbs
+++ b/ambari-web/app/templates/common/configs/config_history_flow.hbs
@@ -40,7 +40,7 @@
           </div>
 
           <div class="version-popover">
-            <div class="content"> <strong>{{serviceVersion.serviceName}}</strong>
<span class="label label-info">{{serviceVersion.versionText}}</span> &nbsp;
+            <div class="content"> <strong>{{serviceVersion.displayName}}</strong>
<span class="label label-info">{{serviceVersion.versionText}}</span> &nbsp;
               <strong>{{t services.service.config.configHistory.configGroup}}:{{serviceVersion.configGroupName}}</strong>
               <div class="notes">{{serviceVersion.briefNotes}}</div>
             </div>
@@ -100,7 +100,7 @@
                                 <div class="pull-right"><i class="icon-caret-right"></i></div>
                             </div>
                             <ul class="dropdown-menu">
-                                <div class="content"> <strong>{{serviceVersion.serviceName}}</strong>
<span class="label label-info">{{serviceVersion.versionText}}</span> &nbsp;
+                                <div class="content"> <strong>{{serviceVersion.displayName}}</strong>
<span class="label label-info">{{serviceVersion.versionText}}</span> &nbsp;
                                     <strong>{{t services.service.config.configHistory.configGroup}}:{{serviceVersion.configGroupName}}</strong>
                                     <div class="notes">{{serviceVersion.briefNotes}}</div>
                                 </div>
@@ -115,7 +115,7 @@
                     {{#unless view.showFullList}}
                         <li class="align-center pointer" id="show_more">
                             <a {{action openFullList target="view"}}>
-                              {{t dashboard.configHistory.info-bar.showMore}}&nbsp;{{view.serviceName}}
+                              {{t dashboard.configHistory.info-bar.showMore}}&nbsp;{{view.displayName}}
                                 &nbsp;<span class="lowercase ellipsis">{{t dashboard.configHistory.title}}</span>
                             </a>
                         </li>

http://git-wip-us.apache.org/repos/asf/ambari/blob/fa7341fe/ambari-web/app/templates/main/dashboard/config_history.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/dashboard/config_history.hbs b/ambari-web/app/templates/main/dashboard/config_history.hbs
index f0101cc..6c86a24 100644
--- a/ambari-web/app/templates/main/dashboard/config_history.hbs
+++ b/ambari-web/app/templates/main/dashboard/config_history.hbs
@@ -43,7 +43,7 @@
             <td class="first">
               <span class="label label-info">{{item.versionText}}</span>
               <a {{action goToServiceConfigs item.serviceName}}>
-                {{item.serviceName}}
+                {{item.displayName}}
               </a>
               <i {{bindAttr class=":icon-refresh :restart-required-service item.isRestartRequired::hidden"}}
                 rel="Tooltip" {{translateAttr data-original-title="dashboard.configHistory.table.restart.tooltip"}}></i>


Mime
View raw message