1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-08 23:35:31 +02:00

feat(tasks): change task name format in tasks datatable (#1884)

This commit is contained in:
Anthony Lapenna 2018-05-10 17:17:53 +02:00 committed by GitHub
parent b2b1c86067
commit a0a667053e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 14 additions and 10 deletions

View file

@ -7,6 +7,6 @@
show-text-filter="true"
show-slot-column="service.Mode !== 'global'"
show-logs-button="applicationState.endpoint.apiVersion >= 1.30"
agent-powered="applicationState.endpoint.mode.agentProxy"
agent-proxy="applicationState.endpoint.mode.agentProxy"
></tasks-datatable>
</div>

View file

@ -413,9 +413,10 @@ function ($q, $scope, $transition$, $state, $location, $timeout, $anchorScroll,
var apiVersion = $scope.applicationState.endpoint.apiVersion;
var agentProxy = $scope.applicationState.endpoint.mode.agentProxy;
var service = null;
ServiceService.service($transition$.params().id)
.then(function success(data) {
var service = data;
service = data;
$scope.isUpdating = $scope.lastVersion >= service.Version;
if (!$scope.isUpdating) {
$scope.lastVersion = service.Version;
@ -460,6 +461,8 @@ function ($q, $scope, $transition$, $state, $location, $timeout, $anchorScroll,
}
}
ServiceHelper.associateTasksToService(service, tasks);
$scope.tasks = data.tasks;

View file

@ -42,7 +42,7 @@
show-text-filter="true"
show-slot-column="true"
show-logs-button="applicationState.endpoint.apiVersion >= 1.30"
agent-powered="applicationState.endpoint.mode.agentProxy"
agent-proxy="applicationState.endpoint.mode.agentProxy"
></tasks-datatable>
</div>
</div>

View file

@ -67,11 +67,6 @@ function ($q, $scope, $state, $transition$, StackService, NodeService, ServiceSe
var services = data.services;
var tasks = data.tasks;
for (var i = 0; i < services.length; i++) {
var service = services[i];
ServiceHelper.associateTasksToService(service, tasks);
}
if (agentProxy) {
var containers = data.containers;
for (var j = 0; j < tasks.length; j++) {
@ -80,6 +75,11 @@ function ($q, $scope, $state, $transition$, StackService, NodeService, ServiceSe
}
}
for (var i = 0; i < services.length; i++) {
var service = services[i];
ServiceHelper.associateTasksToService(service, tasks);
}
$scope.tasks = tasks;
$scope.services = services;
})