2016-09-23 04:54:58 +00:00
|
|
|
<rd-header>
|
|
|
|
<rd-header-title title="Service details">
|
|
|
|
<a data-toggle="tooltip" title="Refresh" ui-sref="service({id: service.Id})" ui-sref-opts="{reload: true}">
|
|
|
|
<i class="fa fa-refresh" aria-hidden="true"></i>
|
|
|
|
</a>
|
|
|
|
<i id="loadingViewSpinner" class="fa fa-cog fa-spin"></i>
|
|
|
|
</rd-header-title>
|
|
|
|
<rd-header-content>
|
2016-11-02 05:14:52 +00:00
|
|
|
<a ui-sref="services">Services</a> > <a ui-sref="service({id: service.Id})">{{ service.Name }}</a>
|
2016-09-23 04:54:58 +00:00
|
|
|
</rd-header-content>
|
|
|
|
</rd-header>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-12 col-md-12 col-xs-12">
|
|
|
|
<rd-widget>
|
|
|
|
<rd-widget-header icon="fa-list-alt" title="Service details"></rd-widget-header>
|
|
|
|
<rd-widget-body classes="no-padding">
|
|
|
|
<table class="table">
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<td>Name</td>
|
|
|
|
<td ng-if="!service.EditName">
|
|
|
|
{{ service.Name }}
|
|
|
|
<a href="" data-toggle="tooltip" title="Edit service name" ng-click="service.EditName = true;"><i class="fa fa-edit"></i></a>
|
|
|
|
</td>
|
|
|
|
<td ng-if="service.EditName">
|
|
|
|
<input type="text" class="containerNameInput" ng-model="service.newServiceName">
|
|
|
|
<a class="interactive" ng-click="service.EditName = false;"><i class="fa fa-times"></i></a>
|
|
|
|
<a class="interactive" ng-click="renameService(service)"><i class="fa fa-check-square-o"></i></a>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>ID</td>
|
|
|
|
<td>
|
|
|
|
{{ service.Id }}
|
2016-10-27 08:33:39 +00:00
|
|
|
<button class="btn btn-xs btn-danger" ng-click="removeService()"><i class="fa fa-trash space-right" aria-hidden="true"></i>Delete this service</button>
|
2016-09-23 04:54:58 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Scheduling mode</td>
|
|
|
|
<td>{{ service.Mode }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr ng-if="service.Mode === 'replicated'">
|
|
|
|
<td>Replicas</td>
|
|
|
|
<td>
|
2016-11-09 00:23:56 +00:00
|
|
|
<span ng-if="service.Mode === 'replicated' && !service.EditReplicas">
|
2016-09-23 04:54:58 +00:00
|
|
|
{{ service.Replicas }}
|
2016-11-09 00:23:56 +00:00
|
|
|
<a class="interactive" ng-click="service.EditReplicas = true;"><i class="fa fa-arrows-v" aria-hidden="true"></i> Scale</a>
|
2016-09-23 04:54:58 +00:00
|
|
|
</span>
|
2016-11-09 00:23:56 +00:00
|
|
|
<span ng-if="service.Mode === 'replicated' && service.EditReplicas">
|
|
|
|
<input class="input-sm" type="number" ng-model="service.newServiceReplicas" />
|
|
|
|
<a class="interactive" ng-click="service.EditReplicas = false;"><i class="fa fa-times"></i></a>
|
2016-09-23 04:54:58 +00:00
|
|
|
<a class="interactive" ng-click="scaleService(service)"><i class="fa fa-check-square-o"></i></a>
|
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Image</td>
|
2016-11-09 00:23:56 +00:00
|
|
|
<td ng-if="!service.EditImage">
|
|
|
|
{{ service.Image }}
|
|
|
|
<a href="" data-toggle="tooltip" title="Edit service image" ng-click="service.EditImage = true;"><i class="fa fa-edit"></i></a>
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td ng-if="service.EditImage">
|
|
|
|
<input type="text" class="containerNameInput" ng-model="service.newServiceImage">
|
|
|
|
<a class="interactive" ng-click="service.EditImage = false;"><i class="fa fa-times"></i></a>
|
|
|
|
<a class="interactive" ng-click="changeServiceImage(service)"><i class="fa fa-check-square-o"></i></a>
|
|
|
|
</td>
|
2016-09-23 04:54:58 +00:00
|
|
|
</tr>
|
|
|
|
<tr ng-if="service.Ports">
|
|
|
|
<td>Published ports</td>
|
|
|
|
<td>
|
|
|
|
<div ng-repeat="mapping in service.Ports">
|
|
|
|
{{ mapping.TargetPort }} <i class="fa fa-long-arrow-right"></i> {{ mapping.PublishedPort }}
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2016-11-09 00:23:56 +00:00
|
|
|
<tr ng-if="service.EnvironmentVariables">
|
|
|
|
<td>Environment Variables</td>
|
2016-09-23 04:54:58 +00:00
|
|
|
<td>
|
2016-11-09 00:23:56 +00:00
|
|
|
<div class="form-group">
|
|
|
|
<div class="col-sm-11">
|
|
|
|
<span class="label label-default interactive" ng-click="addEnvironmentVariable(service)">
|
|
|
|
<i class="fa fa-plus-circle" aria-hidden="true"></i> environment variable
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<!-- environment-variable-input-list -->
|
|
|
|
<div class="col-sm-11 form-inline" style="margin-top: 10px;">
|
|
|
|
<div ng-repeat="var in service.EnvironmentVariables" style="margin-top: 2px;">
|
|
|
|
<div class="input-group col-sm-5 input-group-sm">
|
|
|
|
<span class="input-group-addon">name</span>
|
|
|
|
<input type="text" class="form-control" ng-model="var.key" ng-disabled="var.added" placeholder="e.g. FOO">
|
|
|
|
</div>
|
|
|
|
<div class="input-group col-sm-5 input-group-sm">
|
|
|
|
<span class="input-group-addon">value</span>
|
|
|
|
<input type="text" class="form-control" ng-model="var.value" ng-change="updateEnvironmentVariable(service, var)" placeholder="e.g. bar">
|
|
|
|
<span class="input-group-btn">
|
|
|
|
<button class="btn btn-default" type="button" ng-click="removeEnvironmentVariable(service, $index)">
|
|
|
|
<i class="fa fa-minus" aria-hidden="true"></i>
|
|
|
|
</button>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- !environment-variable-input-list -->
|
|
|
|
</div>
|
2016-09-23 04:54:58 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr ng-if="service.Labels">
|
|
|
|
<td>Labels</td>
|
|
|
|
<td>
|
|
|
|
<table class="table table-bordered table-condensed">
|
|
|
|
<tr ng-repeat="(k, v) in service.Labels">
|
|
|
|
<td>{{ k }}</td>
|
|
|
|
<td>{{ v }}</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</rd-widget-body>
|
2016-11-09 00:23:56 +00:00
|
|
|
<rd-widget-footer ng-if="service.hasChanges">
|
|
|
|
<div>
|
|
|
|
<button type="button" class="btn btn-primary" ng-click="updateService(service)">Save Changes</button>
|
|
|
|
<button type="button" class="btn btn-default" ng-click="cancelChanges(service)">Reset</button>
|
|
|
|
</div>
|
|
|
|
</rd-widget-footer>
|
2016-09-23 04:54:58 +00:00
|
|
|
</rd-widget>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row" ng-if="tasks.length > 0">
|
|
|
|
<div class="col-lg-12 col-md-12 col-xs-12">
|
|
|
|
<rd-widget>
|
|
|
|
<rd-widget-header icon="fa-tasks" title="Associated tasks"></rd-widget-header>
|
|
|
|
<rd-widget-body classes="no-padding">
|
|
|
|
<table class="table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Id</th>
|
|
|
|
<th>
|
|
|
|
<a ui-sref="service" ng-click="order('Status')">
|
|
|
|
Status
|
|
|
|
<span ng-show="sortType == 'Status' && !sortReverse" class="glyphicon glyphicon-chevron-down"></span>
|
|
|
|
<span ng-show="sortType == 'Status' && sortReverse" class="glyphicon glyphicon-chevron-up"></span>
|
|
|
|
</a>
|
|
|
|
</th>
|
|
|
|
<th>
|
|
|
|
<a ui-sref="service" ng-click="order('Slot')">
|
|
|
|
Slot
|
|
|
|
<span ng-show="sortType == 'Slot' && !sortReverse" class="glyphicon glyphicon-chevron-down"></span>
|
|
|
|
<span ng-show="sortType == 'Slot' && sortReverse" class="glyphicon glyphicon-chevron-up"></span>
|
|
|
|
</a>
|
|
|
|
</th>
|
|
|
|
<th ng-if="displayNode">
|
|
|
|
<a ui-sref="service" ng-click="order('Node')">
|
|
|
|
Node
|
|
|
|
<span ng-show="sortType == 'Node' && !sortReverse" class="glyphicon glyphicon-chevron-down"></span>
|
|
|
|
<span ng-show="sortType == 'Node' && sortReverse" class="glyphicon glyphicon-chevron-up"></span>
|
|
|
|
</a>
|
|
|
|
</th>
|
|
|
|
<th>
|
|
|
|
<a ui-sref="service" ng-click="order('UpdatedAt')">
|
|
|
|
Last update
|
|
|
|
<span ng-show="sortType == 'UpdatedAt' && !sortReverse" class="glyphicon glyphicon-chevron-down"></span>
|
|
|
|
<span ng-show="sortType == 'UpdatedAt' && sortReverse" class="glyphicon glyphicon-chevron-up"></span>
|
|
|
|
</a>
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr ng-repeat="task in (filteredTasks = ( tasks | orderBy:sortType:sortReverse))">
|
|
|
|
<td><a ui-sref="task({ id: task.Id })">{{ task.Id }}</a></td>
|
|
|
|
<td><span class="label label-{{ task.Status|taskstatusbadge }}">{{ task.Status }}</span></td>
|
|
|
|
<td>{{ task.Slot }}</td>
|
|
|
|
<td ng-if="displayNode">{{ task.Node }}</td>
|
|
|
|
<td>{{ task.Updated|getisodate }}</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</rd-widget-body>
|
|
|
|
</rd-widget>
|
|
|
|
</div>
|
|
|
|
</div>
|