FIX: Reinitialize table index on new view loading
This commit is contained in:
parent
fb1d3099ba
commit
00437462c1
@ -16,10 +16,12 @@ angular.module('adagios.view.custom', ['ngRoute',
|
|||||||
});
|
});
|
||||||
}])
|
}])
|
||||||
|
|
||||||
.controller('CustomViewsCtrl', [ '$scope', '$routeParams', 'customViewsConfig',
|
.controller('CustomViewsCtrl', [ '$scope', '$routeParams', 'customViewsConfig', 'tableConfig',
|
||||||
function ($scope, $routeParams, customViewsConfig) {
|
function ($scope, $routeParams, customViewsConfig, tableConfig) {
|
||||||
var viewName = "";
|
var viewName = "";
|
||||||
|
|
||||||
|
tableConfig.index = 0;
|
||||||
|
|
||||||
if (!!$routeParams.view) {
|
if (!!$routeParams.view) {
|
||||||
viewName = $routeParams.view;
|
viewName = $routeParams.view;
|
||||||
} else {
|
} else {
|
||||||
|
@ -15,7 +15,8 @@ angular.module('adagios.view.dashboard', ['ngRoute',
|
|||||||
});
|
});
|
||||||
}])
|
}])
|
||||||
|
|
||||||
.controller('DashboardCtrl', ['$scope', 'dashboardConfig', 'getServices', function ($scope, dashboardConfig, getServices) {
|
.controller('DashboardCtrl', ['$scope', 'dashboardConfig', 'getServices', 'tableConfig',
|
||||||
|
function ($scope, dashboardConfig, getServices, tableConfig) {
|
||||||
|
|
||||||
var fields = ['state'],
|
var fields = ['state'],
|
||||||
filters = {'isnot' : { 'state' : ['0'] }},
|
filters = {'isnot' : { 'state' : ['0'] }},
|
||||||
@ -25,6 +26,7 @@ angular.module('adagios.view.dashboard', ['ngRoute',
|
|||||||
config,
|
config,
|
||||||
i = 0;
|
i = 0;
|
||||||
|
|
||||||
|
tableConfig.index = 0;
|
||||||
$scope.dashboardTitle = dashboardConfig.data.title;
|
$scope.dashboardTitle = dashboardConfig.data.title;
|
||||||
$scope.dashboardTemplate = dashboardConfig.data.template;
|
$scope.dashboardTemplate = dashboardConfig.data.template;
|
||||||
$scope.dashboardRefreshInterval = dashboardConfig.data.refreshInterval;
|
$scope.dashboardRefreshInterval = dashboardConfig.data.refreshInterval;
|
||||||
|
Loading…
Reference in New Issue
Block a user