mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59:41 +02:00
feat(configs): add support for docker configs (#996)
This commit is contained in:
parent
ade66414a4
commit
407f0f5807
30 changed files with 932 additions and 20 deletions
34
app/helpers/configHelper.js
Normal file
34
app/helpers/configHelper.js
Normal file
|
@ -0,0 +1,34 @@
|
|||
angular.module('portainer.helpers')
|
||||
.factory('ConfigHelper', [function ConfigHelperFactory() {
|
||||
'use strict';
|
||||
return {
|
||||
flattenConfig: function(config) {
|
||||
if (config) {
|
||||
return {
|
||||
Id: config.ConfigID,
|
||||
Name: config.ConfigName,
|
||||
FileName: config.File.Name,
|
||||
Uid: config.File.UID,
|
||||
Gid: config.File.GID,
|
||||
Mode: config.File.Mode
|
||||
};
|
||||
}
|
||||
return {};
|
||||
},
|
||||
configConfig: function(config) {
|
||||
if (config) {
|
||||
return {
|
||||
ConfigID: config.Id,
|
||||
ConfigName: config.Name,
|
||||
File: {
|
||||
Name: config.FileName || config.Name,
|
||||
UID: config.Uid || '0',
|
||||
GID: config.Gid || '0',
|
||||
Mode: config.Mode || 292
|
||||
}
|
||||
};
|
||||
}
|
||||
return {};
|
||||
}
|
||||
};
|
||||
}]);
|
Loading…
Add table
Add a link
Reference in a new issue