feat(sidebar): rename Docker to Engine (#1212)

pull/1216/head
Anthony Lapenna 2017-09-20 08:23:36 +02:00 committed by GitHub
parent 5131c4c10b
commit d695657711
4 changed files with 12 additions and 12 deletions

View File

@ -32,7 +32,7 @@ angular.module('portainer', [
'createSecret', 'createSecret',
'createService', 'createService',
'createVolume', 'createVolume',
'docker', 'engine',
'endpoint', 'endpoint',
'endpointAccess', 'endpointAccess',
'endpoints', 'endpoints',
@ -350,12 +350,12 @@ angular.module('portainer', [
} }
} }
}) })
.state('docker', { .state('engine', {
url: '/docker/', url: '/engine/',
views: { views: {
'content@': { 'content@': {
templateUrl: 'app/components/docker/docker.html', templateUrl: 'app/components/engine/engine.html',
controller: 'DockerController' controller: 'EngineController'
}, },
'sidebar@': { 'sidebar@': {
templateUrl: 'app/components/sidebar/sidebar.html', templateUrl: 'app/components/sidebar/sidebar.html',

View File

@ -1,6 +1,6 @@
<rd-header> <rd-header>
<rd-header-title title="Engine overview"> <rd-header-title title="Engine overview">
<a data-toggle="tooltip" title="Refresh" ui-sref="docker" ui-sref-opts="{reload: true}"> <a data-toggle="tooltip" title="Refresh" ui-sref="engine" ui-sref-opts="{reload: true}">
<i class="fa fa-refresh" aria-hidden="true"></i> <i class="fa fa-refresh" aria-hidden="true"></i>
</a> </a>
<i id="loadingViewSpinner" class="fa fa-cog fa-spin"></i> <i id="loadingViewSpinner" class="fa fa-cog fa-spin"></i>

View File

@ -1,8 +1,6 @@
angular.module('docker', []) angular.module('engine', [])
.controller('DockerController', ['$q', '$scope', 'SystemService', 'Notifications', .controller('EngineController', ['$q', '$scope', 'SystemService', 'Notifications',
function ($q, $scope, SystemService, Notifications) { function ($q, $scope, SystemService, Notifications) {
$scope.info = {};
$scope.version = {};
function initView() { function initView() {
$('#loadingViewSpinner').show(); $('#loadingViewSpinner').show();
@ -15,6 +13,8 @@ function ($q, $scope, SystemService, Notifications) {
$scope.info = data.info; $scope.info = data.info;
}) })
.catch(function error(err) { .catch(function error(err) {
$scope.info = {};
$scope.version = {};
Notifications.error('Failure', err, 'Unable to retrieve engine details'); Notifications.error('Failure', err, 'Unable to retrieve engine details');
}) })
.finally(function final() { .finally(function final() {

View File

@ -50,7 +50,7 @@
<a ui-sref="swarm" ui-sref-active="active">Swarm <span class="menu-icon fa fa-object-group"></span></a> <a ui-sref="swarm" ui-sref-active="active">Swarm <span class="menu-icon fa fa-object-group"></span></a>
</li> </li>
<li class="sidebar-list" ng-if="applicationState.endpoint.mode.provider === 'DOCKER_STANDALONE' || applicationState.endpoint.mode.provider === 'VMWARE_VIC'"> <li class="sidebar-list" ng-if="applicationState.endpoint.mode.provider === 'DOCKER_STANDALONE' || applicationState.endpoint.mode.provider === 'VMWARE_VIC'">
<a ui-sref="docker" ui-sref-active="active">Docker <span class="menu-icon fa fa-th"></span></a> <a ui-sref="engine" ui-sref-active="active">Engine <span class="menu-icon fa fa-th"></span></a>
</li> </li>
<li class="sidebar-title" ng-if="!applicationState.application.authentication || isAdmin || isTeamLeader"> <li class="sidebar-title" ng-if="!applicationState.application.authentication || isAdmin || isTeamLeader">
<span>Portainer settings</span> <span>Portainer settings</span>