mirror of
https://github.com/portainer/portainer.git
synced 2025-08-02 20:35:25 +02:00
refactor(app): introduce webpack and babel (#2407)
* feat(agent): add new host page * feat(agent): convert volume-browser to files-datatable * fix(agent): browse folders in file-datatable * feat(engine-details): replace engine view with host view * feat(engine-details): remove old panels * feat(engine-details): add basic engine-details-panel component * feat(engine-details): pass details to the different components * feat(engine-details): replace host-view with host-overview * feat(engine-details): add commaseperated filter * feat(engine-details): add host-view container component * feat(engine-details): add host-details component * feat(engine-details): build host details object * feat(engine-details): format engine version * feat(engine-details): get details for one node * feat(engine-details): pass is-agent from view * feat(engine-details): replace old node view with a new component * feat(engine-details): add swarm-node-details component * feat(engine-details): remove isSwarm binding * feat(engine-details): remove node-details and include in parent * feat(engine-details): add labels-table component * feat(engine-details): add update node service * feat(engine-details): add update label functionality * style(engine-details): remove whitespaces * feat(engine-details): remove old node page * feat(engine-details): pass is agent to host details * feat(host-details): hide missing info * feat(host-details): update node availability * style(host-details): remove obsolete event object * feat(host-details): fix labels not sending * feat(host-details): remove flags for hiding data * feat(host-details): create mock call to server for agent host info * style(host-details): fix spelling mistake in filter's name * feat(host-details): get info from agent * feat(host-details): hide engine labels when empty * feat(node-details): move labels table and save button * feat(host-info): add different urls for refresh * feat(host-details): show disk/devices info for agent * feat(host-view): add loading indicator to devices-panel * feat(host-details): add loading indicator to disks panel * feat(agent): fix browse volume * feat(agent): browse files * feat(agent): enable rename * feat(agent): download file * fix(agent): download file from root * feat(agent): delete file * style(agent): remove whitespaces * fix(agent): fix link on node browser * feat(agent): basic file uploader * feat(agent): add basic file upload * fix(volume-browser): move volume id to query params * feat(node-browser): moved uploader into browser * feat(node-browser): add upload spinner * feat(agent): browse files relative to root * feat(build): add webpack build config * feat(build): add missing imports * feat(webpack): add missing imports * feat(build): enable eslint on build * feat(build): add webpack notifier * feat(build): clean terminal on build * feat(build): import all globals * feat(build): add angular import * feat(build): fix styles * feat(build): load favicons * feat(build): load css before script * feat(webpack): split vendors css and js to a different bundle * feat(webpack): import angular in all files * feat(webpack): remove eslint global config * feat(webpack): add webpack clean dist * feat(webpack): fix styling issues * refactor(webpack): remove empty controllers * refactor(webpack): optimize moment * refactor(webpack): add bundle analyzer * feat(webpack): add babel * refactor(webpack): optimize lodash * refactor(toastr): update toastr * feat(webpack): create basic production and dev config * fix(webpack): fix production config * fix(webpack): fix html templates url * refactor(webpack): remove angular imports * refactor(webpack): remove more angular imports * refactor(webpack): return angular to entry file * style(webpack): remove comments from config * fix(hosts): remove browse button * fix(webpack): import lodash * fix(webpack): import missing htmls * feat(webpack): reduce lodash size * feat(webpack): config grunt to use webpack * feat(webpack): add postcss * chore(codeclimate): use eslint-5 channel * feat(deps): upgrade from lodash to lodash-es * fix(webpack): fix bug with lodash * chore(build): add build client script * fix(webpack): fix missing jsyaml reference * refactor(webpack): seperate builds of img files * chore(build): add a way to check times of webpack build * feat(webpack): add dev server * fix(webpack): fix css output name * chore(webpack): optimize images * chore(webpack): add node env * fix(build): copy templates on release * chore(webpack): set env NODE_ENV * feat(webpack): set NODE_ENV on production builds * fix(extensions): set image path * refactor(css): move vendor css to js import * style(app): remove whitespaces * fix(build-system): allow DevOps pipeline to leverage webpack (#2670) * Update devopsbuild task to use webpack & remove AppVeyor environment var * Added -Force to replace the existing dist folder * Removed Test-Path * dep(build-system): add angularjs-annotate to webpack + fix on imports * Merge branch 'develop' into webpack * refactor(app): webpack aliases for imports + async / await dep + start refactor * style(extensions): use develop version of the view * fix(app): fix several issues introduced by webpack migration * fix(webpack): fix ng-include not loading templates with webpack * Fix Windows CI with Webpack (#2782) * fix(configs): refactor broke configs creation and list views * fix(build-system): update build_binary_devops for Windows
This commit is contained in:
parent
14845a4a53
commit
45113a7ff4
308 changed files with 8798 additions and 1050 deletions
|
@ -23,8 +23,9 @@ angular.module('portainer.docker', ['portainer.app'])
|
|||
url: '/configs',
|
||||
views: {
|
||||
'content@': {
|
||||
templateUrl: 'app/docker/views/configs/configs.html',
|
||||
controller: 'ConfigsController'
|
||||
templateUrl: './views/configs/configs.html',
|
||||
controller: 'ConfigsController',
|
||||
controllerAs: 'ctrl'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -34,7 +35,7 @@ angular.module('portainer.docker', ['portainer.app'])
|
|||
url: '/:id',
|
||||
views: {
|
||||
'content@': {
|
||||
templateUrl: 'app/docker/views/configs/edit/config.html',
|
||||
templateUrl: './views/configs/edit/config.html',
|
||||
controller: 'ConfigController'
|
||||
}
|
||||
}
|
||||
|
@ -45,8 +46,9 @@ angular.module('portainer.docker', ['portainer.app'])
|
|||
url: '/new?id',
|
||||
views: {
|
||||
'content@': {
|
||||
templateUrl: 'app/docker/views/configs/create/createconfig.html',
|
||||
controller: 'CreateConfigController'
|
||||
templateUrl: './views/configs/create/createconfig.html',
|
||||
controller: 'CreateConfigController',
|
||||
controllerAs: 'ctrl'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -56,7 +58,7 @@ angular.module('portainer.docker', ['portainer.app'])
|
|||
url: '/containers',
|
||||
views: {
|
||||
'content@': {
|
||||
templateUrl: 'app/docker/views/containers/containers.html',
|
||||
templateUrl: './views/containers/containers.html',
|
||||
controller: 'ContainersController'
|
||||
}
|
||||
}
|
||||
|
@ -67,7 +69,7 @@ angular.module('portainer.docker', ['portainer.app'])
|
|||
url: '/:id?nodeName',
|
||||
views: {
|
||||
'content@': {
|
||||
templateUrl: 'app/docker/views/containers/edit/container.html',
|
||||
templateUrl: './views/containers/edit/container.html',
|
||||
controller: 'ContainerController'
|
||||
}
|
||||
}
|
||||
|
@ -78,7 +80,7 @@ angular.module('portainer.docker', ['portainer.app'])
|
|||
url: '/console',
|
||||
views: {
|
||||
'content@': {
|
||||
templateUrl: 'app/docker/views/containers/console/containerconsole.html',
|
||||
templateUrl: './views/containers/console/containerconsole.html',
|
||||
controller: 'ContainerConsoleController'
|
||||
}
|
||||
}
|
||||
|
@ -89,7 +91,7 @@ angular.module('portainer.docker', ['portainer.app'])
|
|||
url: '/new?nodeName&from',
|
||||
views: {
|
||||
'content@': {
|
||||
templateUrl: 'app/docker/views/containers/create/createcontainer.html',
|
||||
templateUrl: './views/containers/create/createcontainer.html',
|
||||
controller: 'CreateContainerController'
|
||||
}
|
||||
}
|
||||
|
@ -100,7 +102,7 @@ angular.module('portainer.docker', ['portainer.app'])
|
|||
url: '/inspect',
|
||||
views: {
|
||||
'content@': {
|
||||
templateUrl: 'app/docker/views/containers/inspect/containerinspect.html',
|
||||
templateUrl: './views/containers/inspect/containerinspect.html',
|
||||
controller: 'ContainerInspectController'
|
||||
}
|
||||
}
|
||||
|
@ -111,7 +113,7 @@ angular.module('portainer.docker', ['portainer.app'])
|
|||
url: '/logs',
|
||||
views: {
|
||||
'content@': {
|
||||
templateUrl: 'app/docker/views/containers/logs/containerlogs.html',
|
||||
templateUrl: './views/containers/logs/containerlogs.html',
|
||||
controller: 'ContainerLogsController'
|
||||
}
|
||||
}
|
||||
|
@ -122,7 +124,7 @@ angular.module('portainer.docker', ['portainer.app'])
|
|||
url: '/stats',
|
||||
views: {
|
||||
'content@': {
|
||||
templateUrl: 'app/docker/views/containers/stats/containerstats.html',
|
||||
templateUrl: './views/containers/stats/containerstats.html',
|
||||
controller: 'ContainerStatsController'
|
||||
}
|
||||
}
|
||||
|
@ -133,7 +135,7 @@ angular.module('portainer.docker', ['portainer.app'])
|
|||
url: '/dashboard',
|
||||
views: {
|
||||
'content@': {
|
||||
templateUrl: 'app/docker/views/dashboard/dashboard.html',
|
||||
templateUrl: './views/dashboard/dashboard.html',
|
||||
controller: 'DashboardController'
|
||||
}
|
||||
}
|
||||
|
@ -174,7 +176,7 @@ angular.module('portainer.docker', ['portainer.app'])
|
|||
url: '/events',
|
||||
views: {
|
||||
'content@': {
|
||||
templateUrl: 'app/docker/views/events/events.html',
|
||||
templateUrl: './views/events/events.html',
|
||||
controller: 'EventsController'
|
||||
}
|
||||
}
|
||||
|
@ -185,7 +187,7 @@ angular.module('portainer.docker', ['portainer.app'])
|
|||
url: '/images',
|
||||
views: {
|
||||
'content@': {
|
||||
templateUrl: 'app/docker/views/images/images.html',
|
||||
templateUrl: './views/images/images.html',
|
||||
controller: 'ImagesController'
|
||||
}
|
||||
}
|
||||
|
@ -196,7 +198,7 @@ angular.module('portainer.docker', ['portainer.app'])
|
|||
url: '/:id?nodeName',
|
||||
views: {
|
||||
'content@': {
|
||||
templateUrl: 'app/docker/views/images/edit/image.html',
|
||||
templateUrl: './views/images/edit/image.html',
|
||||
controller: 'ImageController'
|
||||
}
|
||||
}
|
||||
|
@ -207,7 +209,7 @@ angular.module('portainer.docker', ['portainer.app'])
|
|||
url: '/build',
|
||||
views: {
|
||||
'content@': {
|
||||
templateUrl: 'app/docker/views/images/build/buildimage.html',
|
||||
templateUrl: './views/images/build/buildimage.html',
|
||||
controller: 'BuildImageController'
|
||||
}
|
||||
}
|
||||
|
@ -218,7 +220,7 @@ angular.module('portainer.docker', ['portainer.app'])
|
|||
url: '/import',
|
||||
views: {
|
||||
'content@': {
|
||||
templateUrl: 'app/docker/views/images/import/importimage.html',
|
||||
templateUrl: './views/images/import/importimage.html',
|
||||
controller: 'ImportImageController'
|
||||
}
|
||||
}
|
||||
|
@ -229,7 +231,7 @@ angular.module('portainer.docker', ['portainer.app'])
|
|||
url: '/networks',
|
||||
views: {
|
||||
'content@': {
|
||||
templateUrl: 'app/docker/views/networks/networks.html',
|
||||
templateUrl: './views/networks/networks.html',
|
||||
controller: 'NetworksController'
|
||||
}
|
||||
}
|
||||
|
@ -240,7 +242,7 @@ angular.module('portainer.docker', ['portainer.app'])
|
|||
url: '/:id?nodeName',
|
||||
views: {
|
||||
'content@': {
|
||||
templateUrl: 'app/docker/views/networks/edit/network.html',
|
||||
templateUrl: './views/networks/edit/network.html',
|
||||
controller: 'NetworkController'
|
||||
}
|
||||
}
|
||||
|
@ -251,7 +253,7 @@ angular.module('portainer.docker', ['portainer.app'])
|
|||
url: '/new',
|
||||
views: {
|
||||
'content@': {
|
||||
templateUrl: 'app/docker/views/networks/create/createnetwork.html',
|
||||
templateUrl: './views/networks/create/createnetwork.html',
|
||||
controller: 'CreateNetworkController'
|
||||
}
|
||||
}
|
||||
|
@ -298,7 +300,7 @@ angular.module('portainer.docker', ['portainer.app'])
|
|||
url: '/secrets',
|
||||
views: {
|
||||
'content@': {
|
||||
templateUrl: 'app/docker/views/secrets/secrets.html',
|
||||
templateUrl: './views/secrets/secrets.html',
|
||||
controller: 'SecretsController'
|
||||
}
|
||||
}
|
||||
|
@ -309,7 +311,7 @@ angular.module('portainer.docker', ['portainer.app'])
|
|||
url: '/:id',
|
||||
views: {
|
||||
'content@': {
|
||||
templateUrl: 'app/docker/views/secrets/edit/secret.html',
|
||||
templateUrl: './views/secrets/edit/secret.html',
|
||||
controller: 'SecretController'
|
||||
}
|
||||
}
|
||||
|
@ -320,7 +322,7 @@ angular.module('portainer.docker', ['portainer.app'])
|
|||
url: '/new',
|
||||
views: {
|
||||
'content@': {
|
||||
templateUrl: 'app/docker/views/secrets/create/createsecret.html',
|
||||
templateUrl: './views/secrets/create/createsecret.html',
|
||||
controller: 'CreateSecretController'
|
||||
}
|
||||
}
|
||||
|
@ -331,7 +333,7 @@ angular.module('portainer.docker', ['portainer.app'])
|
|||
url: '/services',
|
||||
views: {
|
||||
'content@': {
|
||||
templateUrl: 'app/docker/views/services/services.html',
|
||||
templateUrl: './views/services/services.html',
|
||||
controller: 'ServicesController'
|
||||
}
|
||||
}
|
||||
|
@ -342,7 +344,7 @@ angular.module('portainer.docker', ['portainer.app'])
|
|||
url: '/:id',
|
||||
views: {
|
||||
'content@': {
|
||||
templateUrl: 'app/docker/views/services/edit/service.html',
|
||||
templateUrl: './views/services/edit/service.html',
|
||||
controller: 'ServiceController'
|
||||
}
|
||||
}
|
||||
|
@ -353,7 +355,7 @@ angular.module('portainer.docker', ['portainer.app'])
|
|||
url: '/new',
|
||||
views: {
|
||||
'content@': {
|
||||
templateUrl: 'app/docker/views/services/create/createservice.html',
|
||||
templateUrl: './views/services/create/createservice.html',
|
||||
controller: 'CreateServiceController'
|
||||
}
|
||||
}
|
||||
|
@ -364,7 +366,7 @@ angular.module('portainer.docker', ['portainer.app'])
|
|||
url: '/logs',
|
||||
views: {
|
||||
'content@': {
|
||||
templateUrl: 'app/docker/views/services/logs/servicelogs.html',
|
||||
templateUrl: './views/services/logs/servicelogs.html',
|
||||
controller: 'ServiceLogsController'
|
||||
}
|
||||
}
|
||||
|
@ -375,7 +377,7 @@ angular.module('portainer.docker', ['portainer.app'])
|
|||
url: '/swarm',
|
||||
views: {
|
||||
'content@': {
|
||||
templateUrl: 'app/docker/views/swarm/swarm.html',
|
||||
templateUrl: './views/swarm/swarm.html',
|
||||
controller: 'SwarmController'
|
||||
}
|
||||
}
|
||||
|
@ -386,7 +388,7 @@ angular.module('portainer.docker', ['portainer.app'])
|
|||
url: '/visualizer',
|
||||
views: {
|
||||
'content@': {
|
||||
templateUrl: 'app/docker/views/swarm/visualizer/swarmvisualizer.html',
|
||||
templateUrl: './views/swarm/visualizer/swarmvisualizer.html',
|
||||
controller: 'SwarmVisualizerController'
|
||||
}
|
||||
}
|
||||
|
@ -403,7 +405,7 @@ angular.module('portainer.docker', ['portainer.app'])
|
|||
url: '/:id',
|
||||
views: {
|
||||
'content@': {
|
||||
templateUrl: 'app/docker/views/tasks/edit/task.html',
|
||||
templateUrl: './views/tasks/edit/task.html',
|
||||
controller: 'TaskController'
|
||||
}
|
||||
}
|
||||
|
@ -414,7 +416,7 @@ angular.module('portainer.docker', ['portainer.app'])
|
|||
url: '/logs',
|
||||
views: {
|
||||
'content@': {
|
||||
templateUrl: 'app/docker/views/tasks/logs/tasklogs.html',
|
||||
templateUrl: './views/tasks/logs/tasklogs.html',
|
||||
controller: 'TaskLogsController'
|
||||
}
|
||||
}
|
||||
|
@ -425,7 +427,7 @@ angular.module('portainer.docker', ['portainer.app'])
|
|||
url: '/volumes',
|
||||
views: {
|
||||
'content@': {
|
||||
templateUrl: 'app/docker/views/volumes/volumes.html',
|
||||
templateUrl: './views/volumes/volumes.html',
|
||||
controller: 'VolumesController'
|
||||
}
|
||||
}
|
||||
|
@ -436,7 +438,7 @@ angular.module('portainer.docker', ['portainer.app'])
|
|||
url: '/:id?nodeName',
|
||||
views: {
|
||||
'content@': {
|
||||
templateUrl: 'app/docker/views/volumes/edit/volume.html',
|
||||
templateUrl: './views/volumes/edit/volume.html',
|
||||
controller: 'VolumeController'
|
||||
}
|
||||
}
|
||||
|
@ -447,7 +449,7 @@ angular.module('portainer.docker', ['portainer.app'])
|
|||
url: '/browse',
|
||||
views: {
|
||||
'content@': {
|
||||
templateUrl: 'app/docker/views/volumes/browse/browsevolume.html',
|
||||
templateUrl: './views/volumes/browse/browsevolume.html',
|
||||
controller: 'BrowseVolumeController'
|
||||
}
|
||||
}
|
||||
|
@ -458,7 +460,7 @@ angular.module('portainer.docker', ['portainer.app'])
|
|||
url: '/new',
|
||||
views: {
|
||||
'content@': {
|
||||
templateUrl: 'app/docker/views/volumes/create/createvolume.html',
|
||||
templateUrl: './views/volumes/create/createvolume.html',
|
||||
controller: 'CreateVolumeController'
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
angular.module('portainer.docker').component('containerCapabilities', {
|
||||
templateUrl: 'app/docker/components/container-capabilities/containerCapabilities.html',
|
||||
templateUrl: './containerCapabilities.html',
|
||||
bindings: {
|
||||
capabilities: '='
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
angular.module('portainer.docker').component('containerQuickActions', {
|
||||
templateUrl: 'app/docker/components/container-quick-actions/containerQuickActions.html',
|
||||
templateUrl: './containerQuickActions.html',
|
||||
bindings: {
|
||||
containerId: '<',
|
||||
nodeName: '<',
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
angular.module('portainer.docker')
|
||||
.component('containerRestartPolicy', {
|
||||
templateUrl: 'app/docker/components/container-restart-policy/container-restart-policy.html',
|
||||
templateUrl: './container-restart-policy.html',
|
||||
controller: 'ContainerRestartPolicyController',
|
||||
bindings: {
|
||||
'name': '<',
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
angular.module('portainer.docker').component('dashboardClusterAgentInfo', {
|
||||
templateUrl: 'app/docker/components/dashboard-cluster-agent-info/dashboardClusterAgentInfo.html',
|
||||
templateUrl: './dashboardClusterAgentInfo.html',
|
||||
controller: 'DashboardClusterAgentInfoController'
|
||||
});
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
angular.module('portainer.docker').component('configsDatatable', {
|
||||
templateUrl: 'app/docker/components/datatables/configs-datatable/configsDatatable.html',
|
||||
templateUrl: './configsDatatable.html',
|
||||
controller: 'GenericDatatableController',
|
||||
bindings: {
|
||||
titleText: '@',
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
angular.module('portainer.docker').component('containerNetworksDatatable', {
|
||||
templateUrl: 'app/docker/components/datatables/container-networks-datatable/containerNetworksDatatable.html',
|
||||
templateUrl: './containerNetworksDatatable.html',
|
||||
controller: 'GenericDatatableController',
|
||||
bindings: {
|
||||
titleText: '@',
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
angular.module('portainer.docker').component('containerProcessesDatatable', {
|
||||
templateUrl: 'app/docker/components/datatables/container-processes-datatable/containerProcessesDatatable.html',
|
||||
templateUrl: './containerProcessesDatatable.html',
|
||||
controller: 'GenericDatatableController',
|
||||
bindings: {
|
||||
titleText: '@',
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
angular.module('portainer.docker').component('containersDatatableActions', {
|
||||
templateUrl: 'app/docker/components/datatables/containers-datatable/actions/containersDatatableActions.html',
|
||||
templateUrl: './containersDatatableActions.html',
|
||||
controller: 'ContainersDatatableActionsController',
|
||||
bindings: {
|
||||
selectedItems: '=',
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
angular.module('portainer.docker').component('containersDatatable', {
|
||||
templateUrl: 'app/docker/components/datatables/containers-datatable/containersDatatable.html',
|
||||
templateUrl: './containersDatatable.html',
|
||||
controller: 'ContainersDatatableController',
|
||||
bindings: {
|
||||
titleText: '@',
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import _ from 'lodash-es';
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.controller('ContainersDatatableController', ['PaginationService', 'DatatableService', 'EndpointProvider',
|
||||
function (PaginationService, DatatableService, EndpointProvider) {
|
||||
|
@ -197,7 +199,7 @@ function (PaginationService, DatatableService, EndpointProvider) {
|
|||
|
||||
for (var i = 0; i < datasetFilters.length; i++) {
|
||||
var filter = datasetFilters[i];
|
||||
existingFilter = _.find(storedFilters, ['label', filter.label]);
|
||||
var existingFilter = _.find(storedFilters, ['label', filter.label]);
|
||||
if (existingFilter && !existingFilter.display) {
|
||||
filter.display = existingFilter.display;
|
||||
this.filters.state.enabled = true;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
angular.module('portainer.docker').component('eventsDatatable', {
|
||||
templateUrl: 'app/docker/components/datatables/events-datatable/eventsDatatable.html',
|
||||
templateUrl: './eventsDatatable.html',
|
||||
controller: 'GenericDatatableController',
|
||||
bindings: {
|
||||
titleText: '@',
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
angular.module('portainer.docker').component('jobsDatatable', {
|
||||
templateUrl: 'app/docker/components/datatables/host-jobs-datatable/jobsDatatable.html',
|
||||
templateUrl: './jobsDatatable.html',
|
||||
controller: 'JobsDatatableController',
|
||||
bindings: {
|
||||
titleText: '@',
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import _ from 'lodash-es';
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.controller('JobsDatatableController', ['$q', '$state', 'PaginationService', 'DatatableService', 'ContainerService', 'ModalService', 'Notifications',
|
||||
function ($q, $state, PaginationService, DatatableService, ContainerService, ModalService, Notifications) {
|
||||
|
@ -73,7 +75,7 @@ angular.module('portainer.docker')
|
|||
|
||||
for (var i = 0; i < datasetFilters.length; i++) {
|
||||
var filter = datasetFilters[i];
|
||||
existingFilter = _.find(storedFilters, ['label', filter.label]);
|
||||
var existingFilter = _.find(storedFilters, ['label', filter.label]);
|
||||
if (existingFilter && !existingFilter.display) {
|
||||
filter.display = existingFilter.display;
|
||||
this.filters.state.enabled = true;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
angular.module('portainer.docker').component('imagesDatatable', {
|
||||
templateUrl: 'app/docker/components/datatables/images-datatable/imagesDatatable.html',
|
||||
templateUrl: './imagesDatatable.html',
|
||||
controller: 'ImagesDatatableController',
|
||||
bindings: {
|
||||
titleText: '@',
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
angular.module('portainer.docker').component('macvlanNodesDatatable', {
|
||||
templateUrl: 'app/docker/components/datatables/macvlan-nodes-datatable/macvlanNodesDatatable.html',
|
||||
templateUrl: './macvlanNodesDatatable.html',
|
||||
controller: 'GenericDatatableController',
|
||||
bindings: {
|
||||
titleText: '@',
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
angular.module('portainer.docker').component('networksDatatable', {
|
||||
templateUrl: 'app/docker/components/datatables/networks-datatable/networksDatatable.html',
|
||||
templateUrl: './networksDatatable.html',
|
||||
controller: 'NetworksDatatableController',
|
||||
bindings: {
|
||||
titleText: '@',
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
angular.module('portainer.docker').component('nodeTasksDatatable', {
|
||||
templateUrl: 'app/docker/components/datatables/node-tasks-datatable/nodeTasksDatatable.html',
|
||||
templateUrl: './nodeTasksDatatable.html',
|
||||
controller: 'GenericDatatableController',
|
||||
bindings: {
|
||||
titleText: '@',
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
angular.module('portainer.docker').component('nodesDatatable', {
|
||||
templateUrl: 'app/docker/components/datatables/nodes-datatable/nodesDatatable.html',
|
||||
templateUrl: './nodesDatatable.html',
|
||||
controller: 'GenericDatatableController',
|
||||
bindings: {
|
||||
titleText: '@',
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
angular.module('portainer.docker').component('secretsDatatable', {
|
||||
templateUrl: 'app/docker/components/datatables/secrets-datatable/secretsDatatable.html',
|
||||
templateUrl: './secretsDatatable.html',
|
||||
controller: 'GenericDatatableController',
|
||||
bindings: {
|
||||
titleText: '@',
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
angular.module('portainer.docker').component('serviceTasksDatatable', {
|
||||
templateUrl: 'app/docker/components/datatables/service-tasks-datatable/serviceTasksDatatable.html',
|
||||
templateUrl: './serviceTasksDatatable.html',
|
||||
controller: 'ServiceTasksDatatableController',
|
||||
bindings: {
|
||||
dataset: '<',
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import _ from 'lodash-es';
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.controller('ServiceTasksDatatableController', ['DatatableService',
|
||||
function (DatatableService) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
angular.module('portainer.docker').component('servicesDatatableActions', {
|
||||
templateUrl: 'app/docker/components/datatables/services-datatable/actions/servicesDatatableActions.html',
|
||||
templateUrl: './servicesDatatableActions.html',
|
||||
controller: 'ServicesDatatableActionsController',
|
||||
bindings: {
|
||||
selectedItems: '=',
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
angular.module('portainer.docker').component('servicesDatatable', {
|
||||
templateUrl: 'app/docker/components/datatables/services-datatable/servicesDatatable.html',
|
||||
templateUrl: './servicesDatatable.html',
|
||||
controller: 'ServicesDatatableController',
|
||||
bindings: {
|
||||
titleText: '@',
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import _ from 'lodash-es';
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.controller('ServicesDatatableController', ['PaginationService', 'DatatableService', 'EndpointProvider',
|
||||
function (PaginationService, DatatableService, EndpointProvider) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
angular.module('portainer.docker').component('tasksDatatable', {
|
||||
templateUrl: 'app/docker/components/datatables/tasks-datatable/tasksDatatable.html',
|
||||
templateUrl: './tasksDatatable.html',
|
||||
controller: 'TasksDatatableController',
|
||||
bindings: {
|
||||
titleText: '@',
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
angular.module('portainer.docker').component('volumesDatatable', {
|
||||
templateUrl: 'app/docker/components/datatables/volumes-datatable/volumesDatatable.html',
|
||||
templateUrl: './volumesDatatable.html',
|
||||
controller: 'VolumesDatatableController',
|
||||
bindings: {
|
||||
titleText: '@',
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
angular.module('portainer.docker').component('dockerSidebarContent', {
|
||||
templateUrl: 'app/docker/components/dockerSidebarContent/dockerSidebarContent.html',
|
||||
templateUrl: './dockerSidebarContent.html',
|
||||
bindings: {
|
||||
endpointApiVersion: '<',
|
||||
swarmManagement: '<',
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
angular.module('portainer.docker').component('hostOverview', {
|
||||
templateUrl: 'app/docker/components/host-overview/host-overview.html',
|
||||
templateUrl: './host-overview.html',
|
||||
bindings: {
|
||||
hostDetails: '<',
|
||||
engineDetails: '<',
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
angular.module('portainer.docker').component('devicesPanel', {
|
||||
templateUrl:
|
||||
'app/docker/components/host-view-panels/devices-panel/devices-panel.html',
|
||||
templateUrl: './devices-panel.html',
|
||||
bindings: {
|
||||
devices: '<'
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
angular.module('portainer.docker').component('disksPanel', {
|
||||
templateUrl:
|
||||
'app/docker/components/host-view-panels/disks-panel/disks-panel.html',
|
||||
templateUrl: './disks-panel.html',
|
||||
bindings: {
|
||||
disks: '<'
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
angular.module('portainer.docker').component('engineDetailsPanel', {
|
||||
templateUrl:
|
||||
'app/docker/components/host-view-panels/engine-details-panel/engine-details-panel.html',
|
||||
templateUrl: './engine-details-panel.html',
|
||||
bindings: {
|
||||
engine: '<'
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
angular.module('portainer.docker').component('hostDetailsPanel', {
|
||||
templateUrl: 'app/docker/components/host-view-panels/host-details-panel/host-details-panel.html',
|
||||
templateUrl: './host-details-panel.html',
|
||||
bindings: {
|
||||
host: '<',
|
||||
isJobEnabled: '<',
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
angular.module('portainer.docker').component('nodeAvailabilitySelect', {
|
||||
templateUrl:
|
||||
'app/docker/components/host-view-panels/node-availability-select/node-availability-select.html',
|
||||
templateUrl: './node-availability-select.html',
|
||||
controller: 'NodeAvailabilitySelectController',
|
||||
bindings: {
|
||||
availability: '<',
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
angular.module('portainer.docker').component('nodeLabelsTable', {
|
||||
templateUrl:
|
||||
'app/docker/components/host-view-panels/node-labels-table/node-labels-table.html',
|
||||
templateUrl: './node-labels-table.html',
|
||||
controller: 'NodeLabelsTableController',
|
||||
bindings: {
|
||||
labels: '<',
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
angular.module('portainer.docker').component('swarmNodeDetailsPanel', {
|
||||
templateUrl:
|
||||
'app/docker/components/host-view-panels/swarm-node-details-panel/swarm-node-details-panel.html',
|
||||
templateUrl: './swarm-node-details-panel.html',
|
||||
controller: 'SwarmNodeDetailsPanelController',
|
||||
bindings: {
|
||||
details: '<',
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
angular.module('portainer.docker').component('porImageRegistry', {
|
||||
templateUrl: 'app/docker/components/imageRegistry/porImageRegistry.html',
|
||||
templateUrl: './porImageRegistry.html',
|
||||
controller: 'porImageRegistryController',
|
||||
bindings: {
|
||||
'image': '=',
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import _ from 'lodash-es';
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.controller('porImageRegistryController', ['$q', 'RegistryService', 'DockerHubService', 'ImageService', 'Notifications',
|
||||
function ($q, RegistryService, DockerHubService, ImageService, Notifications) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
angular.module('portainer.docker').component('logViewer', {
|
||||
templateUrl: 'app/docker/components/log-viewer/logViewer.html',
|
||||
templateUrl: './logViewer.html',
|
||||
controller: 'LogViewerController',
|
||||
bindings: {
|
||||
data: '=',
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import moment from 'moment';
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.controller('LogViewerController', ['clipboard',
|
||||
function (clipboard) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
angular.module('portainer.docker').component('networkMacvlanForm', {
|
||||
templateUrl: 'app/docker/components/network-macvlan-form/networkMacvlanForm.html',
|
||||
templateUrl: './networkMacvlanForm.html',
|
||||
controller: 'NetworkMacvlanFormController',
|
||||
bindings: {
|
||||
data: '=',
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
function MacvlanFormData() {
|
||||
export function MacvlanFormData() {
|
||||
this.Scope = 'local';
|
||||
this.SelectedNetworkConfig = '';
|
||||
this.DatatableState = {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
angular.module('portainer.docker').component('volumesNfsForm', {
|
||||
templateUrl: 'app/docker/components/volumesNFSForm/volumesnfsForm.html',
|
||||
templateUrl: './volumesnfsForm.html',
|
||||
bindings: {
|
||||
data: '='
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
function VolumesNFSFormData() {
|
||||
export function VolumesNFSFormData() {
|
||||
this.useNFS = false;
|
||||
this.serverAddress = '';
|
||||
this.mountPoint = '';
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import _ from 'lodash-es';
|
||||
|
||||
function includeString(text, values) {
|
||||
return values.some(function(val){
|
||||
return text.indexOf(val) !== -1;
|
||||
|
@ -258,7 +260,7 @@ angular.module('portainer.docker')
|
|||
.filter('imagelayercommand', function () {
|
||||
'use strict';
|
||||
return function (createdBy) {
|
||||
return createdBy.replace('/bin/sh -c #(nop) ', '').replace('/bin/sh -c ', 'RUN ');
|
||||
return createdBy.replace('/bin/sh -c #(nop) ', '').replace('/bin/sh -c ', 'RUN ');
|
||||
};
|
||||
})
|
||||
.filter('trimshasum', function () {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import _ from 'lodash-es';
|
||||
|
||||
function ConstraintModel(op, key, value) {
|
||||
this.op = op;
|
||||
this.value = value;
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
angular.module('portainer.docker').factory('ContainerHelper', [function ContainerHelperFactory() {
|
||||
import splitargs from 'splitargs/src/splitargs'
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.factory('ContainerHelper', [function ContainerHelperFactory() {
|
||||
'use strict';
|
||||
var helper = {};
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import _ from 'lodash-es';
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.factory('ImageHelper', [function ImageHelperFactory() {
|
||||
'use strict';
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import _ from 'lodash-es';
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.factory('InfoHelper', [function InfoHelperFactory() {
|
||||
'use strict';
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import moment from 'moment';
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.factory('ServiceHelper', [function ServiceHelperFactory() {
|
||||
'use strict';
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
function ConfigViewModel(data) {
|
||||
import { ResourceControlViewModel } from '../../portainer/models/resourceControl';
|
||||
|
||||
export function ConfigViewModel(data) {
|
||||
this.Id = data.ID;
|
||||
this.CreatedAt = data.CreatedAt;
|
||||
this.UpdatedAt = data.UpdatedAt;
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
function createStatus(statusText) {
|
||||
import _ from 'lodash-es';
|
||||
import { ResourceControlViewModel } from '../../portainer/models/resourceControl';
|
||||
|
||||
export function createStatus(statusText) {
|
||||
var status = _.toLower(statusText);
|
||||
|
||||
if (status.indexOf('paused') > -1) {
|
||||
|
@ -19,7 +22,7 @@ function createStatus(statusText) {
|
|||
return 'running';
|
||||
}
|
||||
|
||||
function ContainerViewModel(data) {
|
||||
export function ContainerViewModel(data) {
|
||||
this.Id = data.Id;
|
||||
this.Status = createStatus(data.Status);
|
||||
this.State = data.State;
|
||||
|
@ -62,7 +65,7 @@ function ContainerViewModel(data) {
|
|||
}
|
||||
}
|
||||
|
||||
function ContainerStatsViewModel(data) {
|
||||
export function ContainerStatsViewModel(data) {
|
||||
this.read = data.read;
|
||||
this.preread = data.preread;
|
||||
if(data.memory_stats.privateworkingset !== undefined) { // Windows
|
||||
|
@ -88,7 +91,7 @@ function ContainerStatsViewModel(data) {
|
|||
this.Networks = _.values(data.networks);
|
||||
}
|
||||
|
||||
function ContainerDetailsViewModel(data) {
|
||||
export function ContainerDetailsViewModel(data) {
|
||||
this.Model = data;
|
||||
this.Id = data.Id;
|
||||
this.State = data.State;
|
||||
|
|
|
@ -38,7 +38,7 @@ var capDesc = {
|
|||
'BLOCK_SUSPEND': 'Employ features that can block system suspend.'
|
||||
};
|
||||
|
||||
function ContainerCapabilities() {
|
||||
export function ContainerCapabilities() {
|
||||
// all capabilities can be found at https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities
|
||||
return [
|
||||
new ContainerCapability('SETPCAP', true),
|
||||
|
@ -83,7 +83,7 @@ function ContainerCapabilities() {
|
|||
});
|
||||
}
|
||||
|
||||
function ContainerCapability(cap, allowed) {
|
||||
export function ContainerCapability(cap, allowed) {
|
||||
this.capability = cap;
|
||||
this.allowed = allowed;
|
||||
this.description = capDesc[cap];
|
||||
|
|
|
@ -149,7 +149,7 @@ function createEventDetails(event) {
|
|||
return details;
|
||||
}
|
||||
|
||||
function EventViewModel(data) {
|
||||
export function EventViewModel(data) {
|
||||
// Type, Action, Actor unavailable in Docker < 1.10
|
||||
this.Time = data.time;
|
||||
if (data.Type) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
function ImageViewModel(data) {
|
||||
export function ImageViewModel(data) {
|
||||
this.Id = data.Id;
|
||||
this.Tag = data.Tag;
|
||||
this.Repository = data.Repository;
|
||||
|
@ -23,7 +23,7 @@ function ImageViewModel(data) {
|
|||
}
|
||||
}
|
||||
|
||||
function ImageBuildModel(data) {
|
||||
export function ImageBuildModel(data) {
|
||||
this.hasError = false;
|
||||
var buildLogs = [];
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
function ImageDetailsViewModel(data) {
|
||||
export function ImageDetailsViewModel(data) {
|
||||
this.Id = data.Id;
|
||||
this.Tag = data.Tag;
|
||||
this.Parent = data.Parent;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
function ImageLayerViewModel(order, data) {
|
||||
export function ImageLayerViewModel(order, data) {
|
||||
this.Order = order;
|
||||
this.Id = data.Id;
|
||||
this.Created = data.Created;
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
function NetworkViewModel(data) {
|
||||
import { ResourceControlViewModel } from "../../portainer/models/resourceControl";
|
||||
|
||||
export function NetworkViewModel(data) {
|
||||
this.Id = data.Id;
|
||||
this.Name = data.Name;
|
||||
this.Scope = data.Scope;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
function NodeViewModel(data) {
|
||||
export function NodeViewModel(data) {
|
||||
this.Model = data;
|
||||
this.Id = data.ID;
|
||||
this.Version = data.Version.Index;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// This model is based on https://github.com/moby/moby/blob/0ac25dfc751fa4304ab45afd5cd8705c2235d101/api/types/plugin.go#L8-L31
|
||||
// instead of the official documentation.
|
||||
// See: https://github.com/moby/moby/issues/34241
|
||||
function PluginViewModel(data) {
|
||||
export function PluginViewModel(data) {
|
||||
this.Id = data.Id;
|
||||
this.Name = data.Name;
|
||||
this.Enabled = data.Enabled;
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
function SecretViewModel(data) {
|
||||
import { ResourceControlViewModel } from '../../portainer/models/resourceControl'
|
||||
|
||||
export function SecretViewModel(data) {
|
||||
this.Id = data.ID;
|
||||
this.CreatedAt = data.CreatedAt;
|
||||
this.UpdatedAt = data.UpdatedAt;
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
function ServiceViewModel(data, runningTasks, allTasks) {
|
||||
import { ResourceControlViewModel } from '../../portainer/models/resourceControl';
|
||||
|
||||
export function ServiceViewModel(data, runningTasks, allTasks) {
|
||||
this.Model = data;
|
||||
this.Id = data.ID;
|
||||
this.Tasks = [];
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
function SwarmViewModel(data) {
|
||||
export function SwarmViewModel(data) {
|
||||
this.Id = data.ID;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
function TaskViewModel(data) {
|
||||
export function TaskViewModel(data) {
|
||||
this.Id = data.ID;
|
||||
this.Created = data.CreatedAt;
|
||||
this.Updated = data.UpdatedAt;
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
function VolumeViewModel(data) {
|
||||
import { ResourceControlViewModel } from "../../portainer/models/resourceControl";
|
||||
|
||||
export function VolumeViewModel(data) {
|
||||
this.Id = data.Name;
|
||||
this.CreatedAt = data.CreatedAt;
|
||||
this.Driver = data.Driver;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { jsonObjectsToArrayHandler } from './response/handlers';
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.factory('Build', ['$resource', 'API_ENDPOINT_ENDPOINTS', 'EndpointProvider', function BuildFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider) {
|
||||
'use strict';
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { logsHandler, genericHandler } from "./response/handlers";
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.factory('Container', ['$resource', 'API_ENDPOINT_ENDPOINTS', 'EndpointProvider', 'ContainersInterceptor',
|
||||
function ContainerFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider, ContainersInterceptor) {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { genericHandler } from './response/handlers';
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.factory('Exec', ['$resource', 'API_ENDPOINT_ENDPOINTS', 'EndpointProvider',
|
||||
function ExecFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider) {
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import { jsonObjectsToArrayHandler, deleteImageHandler } from './response/handlers';
|
||||
import { imageGetResponse } from './response/image';
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.factory('Image', ['$resource', 'API_ENDPOINT_ENDPOINTS', 'EndpointProvider', 'HttpRequestHelper', 'ImagesInterceptor',
|
||||
function ImageFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider, HttpRequestHelper, ImagesInterceptor) {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { genericHandler } from './response/handlers';
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.factory('Network', ['$resource', 'API_ENDPOINT_ENDPOINTS', 'EndpointProvider', 'NetworksInterceptor',
|
||||
function NetworkFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider, NetworksInterceptor) {
|
||||
|
|
|
@ -9,14 +9,16 @@ function isJSON(jsonString) {
|
|||
return o;
|
||||
}
|
||||
}
|
||||
catch (e) { }
|
||||
catch (e) {
|
||||
//empty
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// The Docker API often returns a list of JSON object.
|
||||
// This handler wrap the JSON objects in an array.
|
||||
// Used by the API in: Image push, Image create, Events query.
|
||||
function jsonObjectsToArrayHandler(data) {
|
||||
export function jsonObjectsToArrayHandler(data) {
|
||||
var str = '[' + data.replace(/\n/g, ' ').replace(/\}\s*\{/g, '}, {') + ']';
|
||||
return angular.fromJson(str);
|
||||
}
|
||||
|
@ -27,7 +29,7 @@ function jsonObjectsToArrayHandler(data) {
|
|||
// This handler ensure a valid JSON object is returned in any case.
|
||||
// Used by the API in: container deletion, network deletion, network creation, volume creation,
|
||||
// container exec, exec resize.
|
||||
function genericHandler(data) {
|
||||
export function genericHandler(data) {
|
||||
var response = {};
|
||||
// No data is returned when deletion is successful (Docker 1.9 -> 1.12)
|
||||
if (!data) {
|
||||
|
@ -46,7 +48,7 @@ function genericHandler(data) {
|
|||
|
||||
// The Docker API returns the logs as a single string.
|
||||
// This handler wraps the data in a JSON object under the "logs" property.
|
||||
function logsHandler(data) {
|
||||
export function logsHandler(data) {
|
||||
return {
|
||||
logs: data
|
||||
};
|
||||
|
@ -57,7 +59,7 @@ function logsHandler(data) {
|
|||
// container the error (Docker = 1.12).
|
||||
// This handler returns the original array on success or a newly created array containing
|
||||
// only one JSON object with the field message filled with the error message on failure.
|
||||
function deleteImageHandler(data) {
|
||||
export function deleteImageHandler(data) {
|
||||
// A string is returned on failure (Docker < 1.12)
|
||||
var response = [];
|
||||
if (!isJSON(data)) {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// ngResource will transform it as an array of chars.
|
||||
// This functions simply creates a response object and assign
|
||||
// the data to a field.
|
||||
function imageGetResponse(data) {
|
||||
export function imageGetResponse(data) {
|
||||
var response = {};
|
||||
response.file = data;
|
||||
return response;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { logsHandler } from './response/handlers';
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.factory('Service', ['$resource', 'API_ENDPOINT_ENDPOINTS', 'EndpointProvider', 'HttpRequestHelper',
|
||||
function ServiceFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider, HttpRequestHelper) {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { jsonObjectsToArrayHandler } from './response/handlers';
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.factory('System', ['$resource', 'API_ENDPOINT_ENDPOINTS', 'EndpointProvider', 'InfoInterceptor', 'VersionInterceptor',
|
||||
function SystemFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider, InfoInterceptor, VersionInterceptor) {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { logsHandler } from './response/handlers';
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.factory('Task', ['$resource', 'API_ENDPOINT_ENDPOINTS', 'EndpointProvider', function TaskFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider) {
|
||||
'use strict';
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { genericHandler } from './response/handlers';
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.factory('Volume', ['$resource', 'API_ENDPOINT_ENDPOINTS', 'EndpointProvider', 'VolumesInterceptor',
|
||||
function VolumeFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider, VolumesInterceptor) {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { ImageBuildModel } from "../models/image";
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.factory('BuildService', ['$q', 'Build', 'FileUploadService', function BuildServiceFactory($q, Build, FileUploadService) {
|
||||
'use strict';
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { ConfigViewModel } from '../models/config';
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.factory('ConfigService', ['$q', 'Config', function ConfigServiceFactory($q, Config) {
|
||||
'use strict';
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { ContainerDetailsViewModel, ContainerViewModel, ContainerStatsViewModel } from '../models/container';
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.factory('ContainerService', ['$q', 'Container', 'ResourceControlService', 'LogHelper',
|
||||
function ContainerServiceFactory($q, Container, ResourceControlService, LogHelper) {
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
import _ from 'lodash-es';
|
||||
import { ImageViewModel } from '../models/image';
|
||||
import { ImageDetailsViewModel } from "../models/imageDetails";
|
||||
import { ImageLayerViewModel } from "../models/imageLayer";
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.factory('ImageService', ['$q', 'Image', 'ImageHelper', 'RegistryService', 'HttpRequestHelper', 'ContainerService', 'FileUploadService',
|
||||
function ImageServiceFactory($q, Image, ImageHelper, RegistryService, HttpRequestHelper, ContainerService, FileUploadService) {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { NetworkViewModel } from '../models/network';
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.factory('NetworkService', ['$q', 'Network', function NetworkServiceFactory($q, Network) {
|
||||
'use strict';
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { NodeViewModel } from '../models/node';
|
||||
|
||||
angular.module('portainer.docker').factory('NodeService', [
|
||||
'$q', 'Node',
|
||||
function NodeServiceFactory($q, Node) {
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import _ from 'lodash-es';
|
||||
import { PluginViewModel } from "../models/plugin";
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.factory('PluginService', ['$q', 'Plugin', 'SystemService', function PluginServiceFactory($q, Plugin, SystemService) {
|
||||
'use strict';
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { SecretViewModel } from '../models/secret';
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.factory('SecretService', ['$q', 'Secret', function SecretServiceFactory($q, Secret) {
|
||||
'use strict';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import { ServiceViewModel } from '../models/service';
|
||||
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.factory('ServiceService', ['$q', 'Service', 'ServiceHelper', 'TaskService', 'ResourceControlService', 'LogHelper',
|
||||
function ServiceServiceFactory($q, Service, ServiceHelper, TaskService, ResourceControlService, LogHelper) {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { SwarmViewModel } from '../models/swarm';
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.factory('SwarmService', ['$q', 'Swarm', function SwarmServiceFactory($q, Swarm) {
|
||||
'use strict';
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { EventViewModel } from '../models/event';
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.factory('SystemService', ['$q', 'System', 'SystemEndpoint', function SystemServiceFactory($q, System, SystemEndpoint) {
|
||||
'use strict';
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { TaskViewModel } from '../models/task';
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.factory('TaskService', ['$q', 'Task', 'LogHelper',
|
||||
function TaskServiceFactory($q, Task, LogHelper) {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { VolumeViewModel } from '../models/volume';
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.factory('VolumeService', ['$q', 'Volume', 'VolumeHelper', 'ResourceControlService', function VolumeServiceFactory($q, Volume, VolumeHelper, ResourceControlService) {
|
||||
'use strict';
|
||||
|
|
|
@ -11,10 +11,10 @@
|
|||
<div class="col-sm-12">
|
||||
<configs-datatable
|
||||
title-text="Configs" title-icon="fa-file-code"
|
||||
dataset="configs" table-key="configs"
|
||||
dataset="ctrl.configs" table-key="configs"
|
||||
order-by="Name"
|
||||
show-ownership-column="applicationState.application.authentication"
|
||||
remove-action="removeAction"
|
||||
remove-action="ctrl.removeAction"
|
||||
></configs-datatable>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,38 +1,43 @@
|
|||
angular.module('portainer.docker')
|
||||
.controller('ConfigsController', ['$scope', '$state', 'ConfigService', 'Notifications',
|
||||
function ($scope, $state, ConfigService, Notifications) {
|
||||
import angular from 'angular';
|
||||
|
||||
$scope.removeAction = function (selectedItems) {
|
||||
var actionCount = selectedItems.length;
|
||||
angular.forEach(selectedItems, function (config) {
|
||||
ConfigService.remove(config.Id)
|
||||
.then(function success() {
|
||||
Notifications.success('Config successfully removed', config.Name);
|
||||
var index = $scope.configs.indexOf(config);
|
||||
$scope.configs.splice(index, 1);
|
||||
})
|
||||
.catch(function error(err) {
|
||||
Notifications.error('Failure', err, 'Unable to remove config');
|
||||
})
|
||||
.finally(function final() {
|
||||
--actionCount;
|
||||
if (actionCount === 0) {
|
||||
$state.reload();
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
class ConfigsController {
|
||||
|
||||
function initView() {
|
||||
ConfigService.configs()
|
||||
.then(function success(data) {
|
||||
$scope.configs = data;
|
||||
})
|
||||
.catch(function error(err) {
|
||||
$scope.configs = [];
|
||||
Notifications.error('Failure', err, 'Unable to retrieve configs');
|
||||
});
|
||||
/* @ngInject */
|
||||
constructor($state, ConfigService, Notifications) {
|
||||
this.$state = $state;
|
||||
this.ConfigService = ConfigService;
|
||||
this.Notifications = Notifications;
|
||||
|
||||
this.removeAction = this.removeAction.bind(this);
|
||||
}
|
||||
|
||||
initView();
|
||||
}]);
|
||||
async $onInit() {
|
||||
this.configs = [];
|
||||
try {
|
||||
this.configs = await this.ConfigService.configs();
|
||||
} catch (err) {
|
||||
this.Notifications.error('Failure', err, 'Unable to retrieve configs');
|
||||
}
|
||||
}
|
||||
|
||||
async removeAction(selectedItems) {
|
||||
let actionCount = selectedItems.length;
|
||||
for (const config of selectedItems) {
|
||||
try {
|
||||
await this.ConfigService.remove(config.Id);
|
||||
this.Notifications.success('Config successfully removed', config.Name);
|
||||
const index = this.configs.indexOf(config);
|
||||
this.configs.splice(index, 1);
|
||||
} catch (err) {
|
||||
this.Notifications.error('Failure', err, 'Unable to remove config');
|
||||
} finally {
|
||||
--actionCount;
|
||||
if (actionCount === 0) {
|
||||
this.$state.reload();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
export default ConfigsController;
|
||||
angular.module('portainer.docker').controller('ConfigsController', ConfigsController);
|
||||
|
|
|
@ -1,118 +1,142 @@
|
|||
angular.module('portainer.docker')
|
||||
.controller('CreateConfigController', ['$scope', '$state', '$transition$', 'Notifications', 'ConfigService', 'Authentication', 'FormValidator', 'ResourceControlService',
|
||||
function ($scope, $state, $transition$, Notifications, ConfigService, Authentication, FormValidator, ResourceControlService) {
|
||||
$scope.formValues = {
|
||||
Name: '',
|
||||
Labels: [],
|
||||
AccessControlData: new AccessControlFormData(),
|
||||
ConfigContent: ''
|
||||
};
|
||||
import _ from "lodash-es";
|
||||
import { AccessControlFormData } from "Portainer/components/accessControlForm/porAccessControlFormModel";
|
||||
|
||||
$scope.state = {
|
||||
formValidationError: ''
|
||||
};
|
||||
import angular from "angular";
|
||||
|
||||
$scope.addLabel = function() {
|
||||
$scope.formValues.Labels.push({ name: '', value: ''});
|
||||
};
|
||||
class CreateConfigController {
|
||||
/* @ngInject */
|
||||
constructor($state, $transition$, Notifications, ConfigService, Authentication, FormValidator, ResourceControlService) {
|
||||
this.$state = $state;
|
||||
this.$transition$ = $transition$;
|
||||
this.Notifications = Notifications;
|
||||
this.ConfigService = ConfigService;
|
||||
this.Authentication = Authentication;
|
||||
this.FormValidator = FormValidator;
|
||||
this.ResourceControlService = ResourceControlService;
|
||||
|
||||
$scope.removeLabel = function(index) {
|
||||
$scope.formValues.Labels.splice(index, 1);
|
||||
};
|
||||
this.formValues = {
|
||||
Name: "",
|
||||
Labels: [],
|
||||
AccessControlData: new AccessControlFormData(),
|
||||
ConfigContent: ""
|
||||
};
|
||||
|
||||
function prepareLabelsConfig(config) {
|
||||
var labels = {};
|
||||
$scope.formValues.Labels.forEach(function (label) {
|
||||
this.state = {
|
||||
formValidationError: ""
|
||||
};
|
||||
|
||||
this.editorUpdate = this.editorUpdate.bind(this);
|
||||
}
|
||||
|
||||
addLabel() {
|
||||
this.formValues.Labels.push({ name: "", value: "" });
|
||||
}
|
||||
|
||||
removeLabel(index) {
|
||||
this.formValues.Labels.splice(index, 1);
|
||||
}
|
||||
|
||||
prepareLabelsConfig(config) {
|
||||
let labels = {};
|
||||
this.formValues.Labels.forEach(function(label) {
|
||||
if (label.name && label.value) {
|
||||
labels[label.name] = label.value;
|
||||
labels[label.name] = label.value;
|
||||
}
|
||||
});
|
||||
config.Labels = labels;
|
||||
}
|
||||
|
||||
function prepareConfigData(config) {
|
||||
var configData = $scope.formValues.ConfigContent;
|
||||
prepareConfigData(config) {
|
||||
let configData = this.formValues.ConfigContent;
|
||||
config.Data = btoa(unescape(encodeURIComponent(configData)));
|
||||
}
|
||||
|
||||
function prepareConfiguration() {
|
||||
var config = {};
|
||||
config.Name = $scope.formValues.Name;
|
||||
prepareConfigData(config);
|
||||
prepareLabelsConfig(config);
|
||||
prepareConfiguration() {
|
||||
let config = {};
|
||||
config.Name = this.formValues.Name;
|
||||
this.prepareConfigData(config);
|
||||
this.prepareLabelsConfig(config);
|
||||
return config;
|
||||
}
|
||||
|
||||
function validateForm(accessControlData, isAdmin) {
|
||||
$scope.state.formValidationError = '';
|
||||
var error = '';
|
||||
error = FormValidator.validateAccessControl(accessControlData, isAdmin);
|
||||
validateForm(accessControlData, isAdmin) {
|
||||
this.state.formValidationError = "";
|
||||
let error = "";
|
||||
error = this.FormValidator.validateAccessControl(
|
||||
accessControlData,
|
||||
isAdmin
|
||||
);
|
||||
|
||||
if (error) {
|
||||
$scope.state.formValidationError = error;
|
||||
this.state.formValidationError = error;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
$scope.create = function () {
|
||||
var accessControlData = $scope.formValues.AccessControlData;
|
||||
var userDetails = Authentication.getUserDetails();
|
||||
var isAdmin = userDetails.role === 1;
|
||||
async create() {
|
||||
let accessControlData = this.formValues.AccessControlData;
|
||||
let userDetails = this.Authentication.getUserDetails();
|
||||
let isAdmin = userDetails.role === 1;
|
||||
|
||||
if ($scope.formValues.ConfigContent === '') {
|
||||
$scope.state.formValidationError = 'Config content must not be empty';
|
||||
if (this.formValues.ConfigContent === "") {
|
||||
this.state.formValidationError = "Config content must not be empty";
|
||||
return;
|
||||
}
|
||||
|
||||
if (!validateForm(accessControlData, isAdmin)) {
|
||||
if (!this.validateForm(accessControlData, isAdmin)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var config = prepareConfiguration();
|
||||
let config = this.prepareConfiguration();
|
||||
|
||||
ConfigService.create(config)
|
||||
.then(function success(data) {
|
||||
var configIdentifier = data.ID;
|
||||
var userId = userDetails.ID;
|
||||
return ResourceControlService.applyResourceControl('config', configIdentifier, userId, accessControlData, []);
|
||||
})
|
||||
.then(function success() {
|
||||
Notifications.success('Config successfully created');
|
||||
$state.go('docker.configs', {}, {reload: true});
|
||||
})
|
||||
.catch(function error(err) {
|
||||
Notifications.error('Failure', err, 'Unable to create config');
|
||||
});
|
||||
};
|
||||
|
||||
$scope.editorUpdate = function(cm) {
|
||||
$scope.formValues.ConfigContent = cm.getValue();
|
||||
};
|
||||
|
||||
function initView() {
|
||||
if (!$transition$.params().id) {
|
||||
$scope.formValues.displayCodeEditor = true;
|
||||
return;
|
||||
try {
|
||||
let data = await this.ConfigService.create(config);
|
||||
let configIdentifier = data.ID;
|
||||
let userId = userDetails.ID;
|
||||
await this.ResourceControlService.applyResourceControl(
|
||||
"config",
|
||||
configIdentifier,
|
||||
userId,
|
||||
accessControlData,
|
||||
[]
|
||||
);
|
||||
this.Notifications.success("Config successfully created");
|
||||
this.$state.go("docker.configs", {}, { reload: true });
|
||||
} catch (err) {
|
||||
this.Notifications.error("Failure", err, "Unable to create config");
|
||||
}
|
||||
|
||||
ConfigService.config($transition$.params().id)
|
||||
.then(function success(data) {
|
||||
$scope.formValues.Name = data.Name + '_copy';
|
||||
$scope.formValues.Data = data.Data;
|
||||
var labels = _.keys(data.Labels);
|
||||
for (var i = 0; i < labels.length; i++) {
|
||||
var labelName = labels[i];
|
||||
var labelValue = data.Labels[labelName];
|
||||
$scope.formValues.Labels.push({ name: labelName, value: labelValue});
|
||||
}
|
||||
$scope.formValues.displayCodeEditor = true;
|
||||
})
|
||||
.catch(function error(err) {
|
||||
$scope.formValues.displayCodeEditor = true;
|
||||
Notifications.error('Failure', err, 'Unable to clone config');
|
||||
});
|
||||
}
|
||||
|
||||
initView();
|
||||
}]);
|
||||
editorUpdate(cm) {
|
||||
this.formValues.ConfigContent = cm.getValue();
|
||||
}
|
||||
|
||||
async $onInit() {
|
||||
if (!this.$transition$.params().id) {
|
||||
this.formValues.displayCodeEditor = true;
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
let data = await this.ConfigService.config(this.$transition$.params().id);
|
||||
this.formValues.Name = data.Name + "_copy";
|
||||
this.formValues.Data = data.Data;
|
||||
let labels = _.keys(data.Labels);
|
||||
for (let i = 0; i < labels.length; i++) {
|
||||
let labelName = labels[i];
|
||||
let labelValue = data.Labels[labelName];
|
||||
this.formValues.Labels.push({ name: labelName, value: labelValue });
|
||||
}
|
||||
this.formValues.displayCodeEditor = true;
|
||||
} catch (err) {
|
||||
this.formValues.displayCodeEditor = true;
|
||||
this.Notifications.error("Failure", err, "Unable to clone config");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default CreateConfigController;
|
||||
angular
|
||||
.module("portainer.docker")
|
||||
.controller("CreateConfigController", CreateConfigController);
|
||||
|
|
|
@ -14,19 +14,19 @@
|
|||
<div class="form-group">
|
||||
<label for="config_name" class="col-sm-1 control-label text-left">Name</label>
|
||||
<div class="col-sm-11">
|
||||
<input type="text" class="form-control" ng-model="formValues.Name" id="config_name" placeholder="e.g. myConfig">
|
||||
<input type="text" class="form-control" ng-model="ctrl.formValues.Name" id="config_name" placeholder="e.g. myConfig">
|
||||
</div>
|
||||
</div>
|
||||
<!-- !name-input -->
|
||||
<!-- config-data -->
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12" ng-if="formValues.displayCodeEditor">
|
||||
<div class="col-sm-12" ng-if="ctrl.formValues.displayCodeEditor">
|
||||
<code-editor
|
||||
identifier="config-creation-editor"
|
||||
placeholder="Define or paste the content of your config here"
|
||||
yml="false"
|
||||
on-change="editorUpdate"
|
||||
value="formValues.Data"
|
||||
on-change="ctrl.editorUpdate"
|
||||
value="ctrl.formValues.Data"
|
||||
></code-editor>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -35,13 +35,13 @@
|
|||
<div class="form-group">
|
||||
<div class="col-sm-12" style="margin-top: 5px;">
|
||||
<label class="control-label text-left">Labels</label>
|
||||
<span class="label label-default interactive" style="margin-left: 10px;" ng-click="addLabel()">
|
||||
<span class="label label-default interactive" style="margin-left: 10px;" ng-click="ctrl.addLabel()">
|
||||
<i class="fa fa-plus-circle" aria-hidden="true"></i> add label
|
||||
</span>
|
||||
</div>
|
||||
<!-- labels-input-list -->
|
||||
<div class="col-sm-12 form-inline" style="margin-top: 10px;">
|
||||
<div ng-repeat="label in formValues.Labels" style="margin-top: 2px;">
|
||||
<div ng-repeat="label in ctrl.formValues.Labels" 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="label.name" placeholder="e.g. com.example.foo">
|
||||
|
@ -50,7 +50,7 @@
|
|||
<span class="input-group-addon">value</span>
|
||||
<input type="text" class="form-control" ng-model="label.value" placeholder="e.g. bar">
|
||||
</div>
|
||||
<button class="btn btn-sm btn-danger" type="button" ng-click="removeLabel($index)">
|
||||
<button class="btn btn-sm btn-danger" type="button" ng-click="ctrl.removeLabel($index)">
|
||||
<i class="fa fa-trash" aria-hidden="true"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
@ -59,7 +59,7 @@
|
|||
</div>
|
||||
<!-- !labels-->
|
||||
<!-- access-control -->
|
||||
<por-access-control-form form-data="formValues.AccessControlData" ng-if="applicationState.application.authentication"></por-access-control-form>
|
||||
<por-access-control-form form-data="ctrl.formValues.AccessControlData" ng-if="applicationState.application.authentication"></por-access-control-form>
|
||||
<!-- !access-control -->
|
||||
<!-- actions -->
|
||||
<div class="col-sm-12 form-section-title">
|
||||
|
@ -67,8 +67,8 @@
|
|||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12">
|
||||
<button type="button" class="btn btn-primary btn-sm" ng-disabled="!formValues.Name" ng-click="create()">Create config</button>
|
||||
<span class="text-danger" ng-if="state.formValidationError" style="margin-left: 5px;">{{ state.formValidationError }}</span>
|
||||
<button type="button" class="btn btn-primary btn-sm" ng-disabled="!ctrl.formValues.Name" ng-click="ctrl.create()">Create config</button>
|
||||
<span class="text-danger" ng-if="ctrl.state.formValidationError" style="margin-left: 5px;">{{ ctrl.state.formValidationError }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- !actions -->
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { Terminal } from 'xterm';
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.controller('ContainerConsoleController', ['$scope', '$transition$', 'ContainerService', 'ImageService', 'EndpointProvider', 'Notifications', 'ContainerHelper', 'ExecService', 'HttpRequestHelper', 'LocalStorage', 'CONSOLE_COMMANDS_LABEL_PREFIX',
|
||||
function ($scope, $transition$, ContainerService, ImageService, EndpointProvider, Notifications, ContainerHelper, ExecService, HttpRequestHelper, LocalStorage, CONSOLE_COMMANDS_LABEL_PREFIX) {
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
import _ from 'lodash-es';
|
||||
import { ContainerCapabilities, ContainerCapability } from '../../../models/containerCapabilities';
|
||||
import { AccessControlFormData } from '../../../../portainer/components/accessControlForm/porAccessControlFormModel';
|
||||
import { ContainerDetailsViewModel } from '../../../models/container';
|
||||
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.controller('CreateContainerController', ['$q', '$scope', '$state', '$timeout', '$transition$', '$filter', 'Container', 'ContainerHelper', 'Image', 'ImageHelper', 'Volume', 'NetworkService', 'ResourceControlService', 'Authentication', 'Notifications', 'ContainerService', 'ImageService', 'FormValidator', 'ModalService', 'RegistryService', 'SystemService', 'SettingsService', 'PluginService', 'HttpRequestHelper',
|
||||
function ($q, $scope, $state, $timeout, $transition$, $filter, Container, ContainerHelper, Image, ImageHelper, Volume, NetworkService, ResourceControlService, Authentication, Notifications, ContainerService, ImageService, FormValidator, ModalService, RegistryService, SystemService, SettingsService, PluginService, HttpRequestHelper) {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import moment from 'moment';
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.controller('ContainerController', ['$q', '$scope', '$state','$transition$', '$filter', 'Commit', 'ContainerHelper', 'ContainerService', 'ImageHelper', 'NetworkService', 'Notifications', 'ModalService', 'ResourceControlService', 'RegistryService', 'ImageService', 'HttpRequestHelper',
|
||||
function ($q, $scope, $state, $transition$, $filter, Commit, ContainerHelper, ContainerService, ImageHelper, NetworkService, Notifications, ModalService, ResourceControlService, RegistryService, ImageService, HttpRequestHelper) {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import moment from 'moment';
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.controller('ContainerLogsController', ['$scope', '$transition$', '$interval', 'ContainerService', 'Notifications', 'HttpRequestHelper',
|
||||
function ($scope, $transition$, $interval, ContainerService, Notifications, HttpRequestHelper) {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import moment from 'moment';
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.controller('ContainerStatsController', ['$q', '$scope', '$transition$', '$document', '$interval', 'ContainerService', 'ChartService', 'Notifications', 'HttpRequestHelper',
|
||||
function ($q, $scope, $transition$, $document, $interval, ContainerService, ChartService, Notifications, HttpRequestHelper) {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import moment from 'moment';
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.controller('EventsController', ['$scope', 'Notifications', 'SystemService',
|
||||
function ($scope, Notifications, SystemService) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
angular.module('portainer.docker').component('hostBrowserView', {
|
||||
templateUrl: 'app/docker/views/host/host-browser-view/host-browser-view.html',
|
||||
templateUrl: './host-browser-view.html',
|
||||
controller: 'HostBrowserViewController'
|
||||
});
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue