Explorar o código

AMBARI-8846. Metrics UI: remove the 'Time range:' text. (xiwang via yusaku)

Yusaku Sako %!s(int64=10) %!d(string=hai) anos
pai
achega
511f64d762

+ 0 - 1
ambari-web/app/messages.js

@@ -332,7 +332,6 @@ Em.I18n.translations = {
   'graphs.timeRange.week': 'Last 1 week',
   'graphs.timeRange.month': 'Last 1 month',
   'graphs.timeRange.year': 'Last 1 year',
-  'graphs.timeRangeControl.label': 'Time range: ',
 
   'users.userName.validationFail': 'Only lowercase letters and numbers are recommended; must start with a letter',
   'host.spacesValidation': 'Cannot contain whitespace',

+ 1 - 2
ambari-web/app/templates/main/service/info/summary.hbs

@@ -71,8 +71,7 @@
             <h4>{{t services.service.metrics}}</h4>
             <div class="btn-group pull-right">
               <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
-                {{t graphs.timeRangeControl.label}} {{view.currentTimeRange.name}}
-                  <span class="caret"></span>
+                {{view.currentTimeRange.name}} &nbsp;<span class="caret"></span>
               </button>
               <ul class="dropdown-menu">
                 {{#each option in view.timeRangeOptions}}

+ 2 - 0
ambari-web/app/views/main/service/info/summary.js

@@ -366,6 +366,8 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, {
   getUserPrefErrorCallback: function (request) {
     if (request.status == 404) {
       console.log('Persist did NOT find the key');
+      this.postUserPref(this.get('persistKey'), 0);
+      this.set('currentTimeRangeIndex', 0);
     }
   },