mirror of
https://github.com/portainer/portainer.git
synced 2025-08-04 13:25:26 +02:00
refactor(app): upgrade to the latest version of ui-router (#1219)
* refactor(app): upgrade to the latest version of ui-router * fix(app): define optional from parameter in action.create.container state * refactor(app): replace $uiRouterGlobals with $transition$
This commit is contained in:
parent
819d0f6a16
commit
ff628bb438
25 changed files with 118 additions and 115 deletions
|
@ -1,6 +1,6 @@
|
|||
angular.module('serviceLogs', [])
|
||||
.controller('ServiceLogsController', ['$scope', '$stateParams', '$anchorScroll', 'ServiceLogs', 'Service',
|
||||
function ($scope, $stateParams, $anchorScroll, ServiceLogs, Service) {
|
||||
.controller('ServiceLogsController', ['$scope', '$transition$', '$anchorScroll', 'ServiceLogs', 'Service',
|
||||
function ($scope, $transition$, $anchorScroll, ServiceLogs, Service) {
|
||||
$scope.state = {};
|
||||
$scope.state.displayTimestampsOut = false;
|
||||
$scope.state.displayTimestampsErr = false;
|
||||
|
@ -16,7 +16,7 @@ function ($scope, $stateParams, $anchorScroll, ServiceLogs, Service) {
|
|||
}
|
||||
|
||||
function getLogsStderr() {
|
||||
ServiceLogs.get($stateParams.id, {
|
||||
ServiceLogs.get($transition$.params().id, {
|
||||
stdout: 0,
|
||||
stderr: 1,
|
||||
timestamps: $scope.state.displayTimestampsErr,
|
||||
|
@ -32,7 +32,7 @@ function ($scope, $stateParams, $anchorScroll, ServiceLogs, Service) {
|
|||
}
|
||||
|
||||
function getLogsStdout() {
|
||||
ServiceLogs.get($stateParams.id, {
|
||||
ServiceLogs.get($transition$.params().id, {
|
||||
stdout: 1,
|
||||
stderr: 0,
|
||||
timestamps: $scope.state.displayTimestampsOut,
|
||||
|
@ -49,7 +49,7 @@ function ($scope, $stateParams, $anchorScroll, ServiceLogs, Service) {
|
|||
|
||||
function getService() {
|
||||
$('#loadingViewSpinner').show();
|
||||
Service.get({id: $stateParams.id}, function (d) {
|
||||
Service.get({id: $transition$.params().id}, function (d) {
|
||||
$scope.service = d;
|
||||
$('#loadingViewSpinner').hide();
|
||||
}, function (e) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue