mirror of
https://github.com/portainer/portainer.git
synced 2025-08-05 05:45:22 +02:00
refactor(app): introduce new project structure for the frontend (#1623)
This commit is contained in:
parent
e6422a6d75
commit
27dceadba1
354 changed files with 1518 additions and 1755 deletions
52
app/docker/views/tasks/edit/task.html
Normal file
52
app/docker/views/tasks/edit/task.html
Normal file
|
@ -0,0 +1,52 @@
|
|||
<rd-header>
|
||||
<rd-header-title title="Task details"></rd-header-title>
|
||||
<rd-header-content ng-if="task && service">
|
||||
<a ui-sref="docker.services">Services</a> > <a ui-sref="docker.services.service({id: service.Id })">{{ service.Name }}</a> > {{ task.Id }}
|
||||
</rd-header-content>
|
||||
</rd-header>
|
||||
|
||||
<div class="row" ng-if="task && service">
|
||||
<div class="col-lg-12 col-md-12 col-xs-12">
|
||||
<rd-widget>
|
||||
<rd-widget-header icon="fa-tasks" title="Task status"></rd-widget-header>
|
||||
<rd-widget-body classes="no-padding">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>ID</td>
|
||||
<td>{{ task.Id }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>State</td>
|
||||
<td><span class="label label-{{ task.Status.State|taskstatusbadge }}">{{ task.Status.State }}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>State Message</td>
|
||||
<td>{{ task.Status.Message }}</td>
|
||||
</tr>
|
||||
<tr ng-if="task.Status.Err">
|
||||
<td>Error message</td>
|
||||
<td><code>{{ task.Status.Err }}</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Image</td>
|
||||
<td>{{ task.Spec.ContainerSpec.Image | hideshasum }}</td>
|
||||
</tr>
|
||||
<tr ng-if="service.Mode !== 'global'">
|
||||
<td>Slot</td>
|
||||
<td>{{ task.Slot }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Created</td>
|
||||
<td>{{ task.Created|getisodate }}</td>
|
||||
</tr>
|
||||
<tr ng-if="task.Status.ContainerStatus.ContainerID">
|
||||
<td>Container ID</td>
|
||||
<td>{{ task.Status.ContainerStatus.ContainerID }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</rd-widget-body>
|
||||
</rd-widget>
|
||||
</div>
|
||||
</div>
|
22
app/docker/views/tasks/edit/taskController.js
Normal file
22
app/docker/views/tasks/edit/taskController.js
Normal file
|
@ -0,0 +1,22 @@
|
|||
angular.module('portainer.docker')
|
||||
.controller('TaskController', ['$scope', '$transition$', 'TaskService', 'Service', 'Notifications',
|
||||
function ($scope, $transition$, TaskService, Service, Notifications) {
|
||||
|
||||
function initView() {
|
||||
TaskService.task($transition$.params().id)
|
||||
.then(function success(data) {
|
||||
var task = data;
|
||||
$scope.task = task;
|
||||
return Service.get({ id: task.ServiceId }).$promise;
|
||||
})
|
||||
.then(function success(data) {
|
||||
var service = new ServiceViewModel(data);
|
||||
$scope.service = service;
|
||||
})
|
||||
.catch(function error(err) {
|
||||
Notifications.error('Failure', err, 'Unable to retrieve task details');
|
||||
});
|
||||
}
|
||||
|
||||
initView();
|
||||
}]);
|
Loading…
Add table
Add a link
Reference in a new issue