mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 07:49:41 +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
34
app/docker/helpers/configHelper.js
Normal file
34
app/docker/helpers/configHelper.js
Normal file
|
@ -0,0 +1,34 @@
|
|||
angular.module('portainer.docker')
|
||||
.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