Fix translation for graph time selection and display
This commit is contained in:
+5
-5
@@ -839,14 +839,14 @@
|
||||
<div class="col-md-12">
|
||||
<div class="dropdown pull-right">
|
||||
<button class="btn btn-sm btn-primary dropdown-toggle" type="button" data-toggle="dropdown">
|
||||
{{ 'app.graphs.selectPeriod' | tr:{ period: graphs.periodLabel } }}
|
||||
{{ graphs.period | trKeyFromPeriod | tr }}
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="" ng-click="graphs.setPeriod(12, '12 hours')">{{ 'app.graphs.period.12h' | tr }}</a></li>
|
||||
<li><a href="" ng-click="graphs.setPeriod(24, '24 hours')">{{ 'app.graphs.period.24h' | tr }}</a></li>
|
||||
<li><a href="" ng-click="graphs.setPeriod(24*7, '7 days')">{{ 'app.graphs.period.7d' | tr }}</a></li>
|
||||
<li><a href="" ng-click="graphs.setPeriod(24*30, '30 days')">{{ 'app.graphs.period.30d' | tr }}</a></li>
|
||||
<li><a href="" ng-click="graphs.setPeriod(12)">{{ 12 | trKeyFromPeriod | tr }}</a></li>
|
||||
<li><a href="" ng-click="graphs.setPeriod(24)">{{ 24 | trKeyFromPeriod | tr }}</a></li>
|
||||
<li><a href="" ng-click="graphs.setPeriod(24*7)">{{ 24*7 | trKeyFromPeriod | tr }}</a></li>
|
||||
<li><a href="" ng-click="graphs.setPeriod(24*30)">{{ 24*30 | trKeyFromPeriod | tr }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<label style="margin-top: 10px;">{{ 'app.graphs.memoryTitle' | tr }}</label>
|
||||
|
||||
+1
-3
@@ -650,13 +650,11 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
|
||||
error: {},
|
||||
|
||||
period: 12, // set as 12 because disk graphs is only collected twice a day
|
||||
periodLabel: '12 hours',
|
||||
memoryChart: null,
|
||||
diskChart: null,
|
||||
|
||||
setPeriod: function (hours, label) {
|
||||
setPeriod: function (hours) {
|
||||
$scope.graphs.period = hours;
|
||||
$scope.graphs.periodLabel = label;
|
||||
$scope.graphs.show();
|
||||
},
|
||||
|
||||
|
||||
@@ -66,14 +66,14 @@
|
||||
|
||||
<div class="dropdown pull-right" ng-hide="activeTab === 0">
|
||||
<button class="btn btn-sm btn-primary dropdown-toggle" type="button" data-toggle="dropdown">
|
||||
{{ 'system.selectPeriodLabel' | tr }} {{ graphs.periodLabel }}
|
||||
{{ graphs.period | trKeyFromPeriod | tr }}
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="" ng-click="graphs.setPeriod(6, '6 hours')">6 hours</a></li>
|
||||
<li><a href="" ng-click="graphs.setPeriod(24, '24 hours')">24 hours</a></li>
|
||||
<li><a href="" ng-click="graphs.setPeriod(24*7, '7 days')">7 days</a></li>
|
||||
<li><a href="" ng-click="graphs.setPeriod(24*30, '30 days')">30 days</a></li>
|
||||
<li><a href="" ng-click="graphs.setPeriod(6)">{{ 6 | trKeyFromPeriod | tr }}</a></li>
|
||||
<li><a href="" ng-click="graphs.setPeriod(24)">{{ 24 | trKeyFromPeriod | tr }}</a></li>
|
||||
<li><a href="" ng-click="graphs.setPeriod(24*7)">{{ 24*7 | trKeyFromPeriod | tr }}</a></li>
|
||||
<li><a href="" ng-click="graphs.setPeriod(24*30)">{{ 24*30 | trKeyFromPeriod | tr }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
+1
-3
@@ -154,13 +154,11 @@ angular.module('Application').controller('SystemController', ['$scope', '$locati
|
||||
error: {},
|
||||
|
||||
period: 6,
|
||||
periodLabel: '6 hours',
|
||||
memoryChart: null,
|
||||
diskChart: null,
|
||||
|
||||
setPeriod: function (hours, label) {
|
||||
setPeriod: function (hours) {
|
||||
$scope.graphs.period = hours;
|
||||
$scope.graphs.periodLabel = label;
|
||||
$scope.graphs.show();
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user