mirror of
https://github.com/portainer/portainer.git
synced 2025-07-22 23:09:41 +02:00
feat(global): swarm mode support (#213)
feat(global): swarm mode support
This commit is contained in:
parent
da6f39b137
commit
37863e3f74
29 changed files with 1318 additions and 89 deletions
29
app/components/task/taskController.js
Normal file
29
app/components/task/taskController.js
Normal file
|
@ -0,0 +1,29 @@
|
|||
angular.module('task', [])
|
||||
.controller('TaskController', ['$scope', '$stateParams', '$state', 'Task', 'Service', 'Messages',
|
||||
function ($scope, $stateParams, $state, Task, Service, Messages) {
|
||||
|
||||
$scope.task = {};
|
||||
$scope.serviceName = 'service';
|
||||
$scope.isTaskRunning = false;
|
||||
|
||||
function fetchTaskDetails() {
|
||||
$('#loadingViewSpinner').show();
|
||||
Task.get({id: $stateParams.id}, function (d) {
|
||||
$scope.task = d;
|
||||
fetchAssociatedServiceDetails(d.ServiceID);
|
||||
$('#loadingViewSpinner').hide();
|
||||
}, function (e) {
|
||||
Messages.error("Failure", e, "Unable to retrieve task details");
|
||||
});
|
||||
}
|
||||
|
||||
function fetchAssociatedServiceDetails(serviceId) {
|
||||
Service.get({id: serviceId}, function (d) {
|
||||
$scope.serviceName = d.Spec.Name;
|
||||
}, function (e) {
|
||||
Messages.error("Failure", e, "Unable to retrieve associated service details");
|
||||
});
|
||||
}
|
||||
|
||||
fetchTaskDetails();
|
||||
}]);
|
Loading…
Add table
Add a link
Reference in a new issue