mirror of
https://github.com/portainer/portainer.git
synced 2025-08-09 07:45:22 +02:00
chore(project): add prettier for code format (#3645)
* chore(project): install prettier and lint-staged * chore(project): apply prettier to html too * chore(project): git ignore eslintcache * chore(project): add a comment about format script * chore(prettier): update printWidth * chore(prettier): remove useTabs option * chore(prettier): add HTML validation * refactor(prettier): fix closing tags * feat(prettier): define angular parser for html templates * style(prettier): run prettier on codebase Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com>
This commit is contained in:
parent
6663073be1
commit
cf5056d9c0
714 changed files with 31228 additions and 28305 deletions
|
@ -24,8 +24,12 @@
|
|||
<td>ID</td>
|
||||
<td>
|
||||
{{ config.Id }}
|
||||
<button authorization="DockerConfigDelete" class="btn btn-xs btn-danger" ng-click="removeConfig(config.Id)"><i class="fa fa-trash-alt space-right" aria-hidden="true"></i>Delete this config</button>
|
||||
<button authorization="DockerConfigCreate"class="btn btn-xs btn-primary" ui-sref="docker.configs.new({id: config.Id})"><i class="fa fa-copy space-right" aria-hidden="true"></i>Clone config</button>
|
||||
<button authorization="DockerConfigDelete" class="btn btn-xs btn-danger" ng-click="removeConfig(config.Id)"
|
||||
><i class="fa fa-trash-alt space-right" aria-hidden="true"></i>Delete this config</button
|
||||
>
|
||||
<button authorization="DockerConfigCreate" class="btn btn-xs btn-primary" ui-sref="docker.configs.new({id: config.Id})"
|
||||
><i class="fa fa-copy space-right" aria-hidden="true"></i>Clone config</button
|
||||
>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -55,11 +59,7 @@
|
|||
</div>
|
||||
|
||||
<!-- access-control-panel -->
|
||||
<por-access-control-panel
|
||||
ng-if="config && applicationState.application.authentication"
|
||||
resource-id="config.Id"
|
||||
resource-control="config.ResourceControl"
|
||||
resource-type="'config'">
|
||||
<por-access-control-panel ng-if="config && applicationState.application.authentication" resource-id="config.Id" resource-control="config.ResourceControl" resource-type="'config'">
|
||||
</por-access-control-panel>
|
||||
<!-- !access-control-panel -->
|
||||
|
||||
|
@ -71,12 +71,7 @@
|
|||
<form class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12">
|
||||
<code-editor
|
||||
identifier="config-editor"
|
||||
yml="false"
|
||||
read-only="true"
|
||||
value="config.Data"
|
||||
></code-editor>
|
||||
<code-editor identifier="config-editor" yml="false" read-only="true" value="config.Data"></code-editor>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
@ -1,27 +1,31 @@
|
|||
angular.module('portainer.docker')
|
||||
.controller('ConfigController', ['$scope', '$transition$', '$state', 'ConfigService', 'Notifications',
|
||||
function ($scope, $transition$, $state, ConfigService, Notifications) {
|
||||
angular.module('portainer.docker').controller('ConfigController', [
|
||||
'$scope',
|
||||
'$transition$',
|
||||
'$state',
|
||||
'ConfigService',
|
||||
'Notifications',
|
||||
function ($scope, $transition$, $state, ConfigService, Notifications) {
|
||||
$scope.removeConfig = function removeConfig(configId) {
|
||||
ConfigService.remove(configId)
|
||||
.then(function success() {
|
||||
Notifications.success('Config successfully removed');
|
||||
$state.go('docker.configs', {});
|
||||
})
|
||||
.catch(function error(err) {
|
||||
Notifications.error('Failure', err, 'Unable to remove config');
|
||||
});
|
||||
};
|
||||
|
||||
$scope.removeConfig = function removeConfig(configId) {
|
||||
ConfigService.remove(configId)
|
||||
.then(function success() {
|
||||
Notifications.success('Config successfully removed');
|
||||
$state.go('docker.configs', {});
|
||||
})
|
||||
.catch(function error(err) {
|
||||
Notifications.error('Failure', err, 'Unable to remove config');
|
||||
});
|
||||
};
|
||||
function initView() {
|
||||
ConfigService.config($transition$.params().id)
|
||||
.then(function success(data) {
|
||||
$scope.config = data;
|
||||
})
|
||||
.catch(function error(err) {
|
||||
Notifications.error('Failure', err, 'Unable to retrieve config details');
|
||||
});
|
||||
}
|
||||
|
||||
function initView() {
|
||||
ConfigService.config($transition$.params().id)
|
||||
.then(function success(data) {
|
||||
$scope.config = data;
|
||||
})
|
||||
.catch(function error(err) {
|
||||
Notifications.error('Failure', err, 'Unable to retrieve config details');
|
||||
});
|
||||
}
|
||||
|
||||
initView();
|
||||
}]);
|
||||
initView();
|
||||
},
|
||||
]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue