THIS IS A TEST INSTANCE ONLY! REPOSITORIES CAN BE DELETED AT ANY TIME!

Browse Source

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
tags/1.21.0^2
Chaim Lev-Ari Anthony Lapenna 1 year ago
parent
commit
45113a7ff4
100 changed files with 497 additions and 397 deletions
  1. +12
    -0
      .babelrc
  2. +1
    -0
      .codeclimate.yml
  3. +3
    -0
      .eslintignore
  4. +275
    -272
      .eslintrc.yml
  5. +17
    -2
      app/__module.js
  6. +1
    -1
      app/agent/components/file-uploader/file-uploader.js
  7. +1
    -1
      app/agent/components/files-datatable/files-datatable.js
  8. +2
    -0
      app/agent/components/host-browser/host-browser-controller.js
  9. +1
    -1
      app/agent/components/host-browser/host-browser.js
  10. +1
    -1
      app/agent/components/node-selector/node-selector.js
  11. +1
    -1
      app/agent/components/volume-browser/volume-browser.js
  12. +2
    -0
      app/agent/components/volume-browser/volumeBrowserController.js
  13. +1
    -1
      app/agent/models/agent.js
  14. +2
    -0
      app/agent/rest/browse.js
  15. +1
    -1
      app/agent/rest/response/browse.js
  16. +2
    -0
      app/agent/rest/v1/browse.js
  17. +2
    -0
      app/agent/services/agentService.js
  18. +2
    -0
      app/app.js
  19. +3
    -3
      app/azure/_module.js
  20. +1
    -1
      app/azure/components/azure-endpoint-config/azure-endpoint-config.js
  21. +1
    -1
      app/azure/components/azure-sidebar-content/azure-sidebar-content.js
  22. +1
    -1
      app/azure/components/datatables/containergroups-datatable/containerGroupsDatatable.js
  23. +3
    -3
      app/azure/models/container_group.js
  24. +1
    -1
      app/azure/models/location.js
  25. +3
    -1
      app/azure/models/provider.js
  26. +1
    -1
      app/azure/models/resource_group.js
  27. +1
    -1
      app/azure/models/subscription.js
  28. +2
    -0
      app/azure/services/containerGroupService.js
  29. +2
    -0
      app/azure/services/locationService.js
  30. +2
    -0
      app/azure/services/providerService.js
  31. +2
    -0
      app/azure/services/resourceGroupService.js
  32. +2
    -0
      app/azure/services/subscriptionService.js
  33. +2
    -0
      app/azure/views/containerinstances/create/createContainerInstanceController.js
  34. +4
    -0
      app/config.js
  35. +38
    -36
      app/docker/__module.js
  36. +1
    -1
      app/docker/components/container-capabilities/container-capabilities.js
  37. +1
    -1
      app/docker/components/container-quick-actions/containerQuickActions.js
  38. +1
    -1
      app/docker/components/container-restart-policy/container-restart-policy.js
  39. +1
    -1
      app/docker/components/dashboard-cluster-agent-info/dashboard-cluster-agent-info.js
  40. +1
    -1
      app/docker/components/datatables/configs-datatable/configsDatatable.js
  41. +1
    -1
      app/docker/components/datatables/container-networks-datatable/containerNetworksDatatable.js
  42. +1
    -1
      app/docker/components/datatables/container-processes-datatable/containerProcessesDatatable.js
  43. +1
    -1
      app/docker/components/datatables/containers-datatable/actions/containersDatatableActions.js
  44. +1
    -1
      app/docker/components/datatables/containers-datatable/containersDatatable.js
  45. +3
    -1
      app/docker/components/datatables/containers-datatable/containersDatatableController.js
  46. +1
    -1
      app/docker/components/datatables/events-datatable/eventsDatatable.js
  47. +1
    -1
      app/docker/components/datatables/host-jobs-datatable/jobsDatatable.js
  48. +3
    -1
      app/docker/components/datatables/host-jobs-datatable/jobsDatatableController.js
  49. +1
    -1
      app/docker/components/datatables/images-datatable/imagesDatatable.js
  50. +1
    -1
      app/docker/components/datatables/macvlan-nodes-datatable/macvlanNodesDatatable.js
  51. +1
    -1
      app/docker/components/datatables/networks-datatable/networksDatatable.js
  52. +1
    -1
      app/docker/components/datatables/node-tasks-datatable/nodeTasksDatatable.js
  53. +1
    -1
      app/docker/components/datatables/nodes-datatable/nodesDatatable.js
  54. +1
    -1
      app/docker/components/datatables/secrets-datatable/secretsDatatable.js
  55. +1
    -1
      app/docker/components/datatables/service-tasks-datatable/serviceTasksDatatable.js
  56. +2
    -0
      app/docker/components/datatables/service-tasks-datatable/serviceTasksDatatableController.js
  57. +1
    -1
      app/docker/components/datatables/services-datatable/actions/servicesDatatableActions.js
  58. +1
    -1
      app/docker/components/datatables/services-datatable/servicesDatatable.js
  59. +2
    -0
      app/docker/components/datatables/services-datatable/servicesDatatableController.js
  60. +1
    -1
      app/docker/components/datatables/tasks-datatable/tasksDatatable.js
  61. +1
    -1
      app/docker/components/datatables/volumes-datatable/volumesDatatable.js
  62. +1
    -1
      app/docker/components/dockerSidebarContent/docker-sidebar-content.js
  63. +1
    -1
      app/docker/components/host-overview/host-overview.js
  64. +1
    -2
      app/docker/components/host-view-panels/devices-panel/devices-panel.js
  65. +1
    -2
      app/docker/components/host-view-panels/disks-panel/disks-panel.js
  66. +1
    -2
      app/docker/components/host-view-panels/engine-details-panel/engine-details-panel.js
  67. +1
    -1
      app/docker/components/host-view-panels/host-details-panel/host-details-panel.js
  68. +1
    -2
      app/docker/components/host-view-panels/node-availability-select/node-availability-select.js
  69. +1
    -2
      app/docker/components/host-view-panels/node-labels-table/node-labels-table.js
  70. +1
    -2
      app/docker/components/host-view-panels/swarm-node-details-panel/swarm-node-details-panel.js
  71. +1
    -1
      app/docker/components/imageRegistry/por-image-registry.js
  72. +2
    -0
      app/docker/components/imageRegistry/porImageRegistryController.js
  73. +1
    -1
      app/docker/components/log-viewer/log-viewer.js
  74. +2
    -0
      app/docker/components/log-viewer/logViewerController.js
  75. +1
    -1
      app/docker/components/network-macvlan-form/network-macvlan-form.js
  76. +1
    -1
      app/docker/components/network-macvlan-form/networkMacvlanFormModel.js
  77. +1
    -1
      app/docker/components/volumesNFSForm/volumes-nfs-form.js
  78. +1
    -1
      app/docker/components/volumesNFSForm/volumesNFSFormModel.js
  79. +3
    -1
      app/docker/filters/filters.js
  80. +2
    -0
      app/docker/helpers/constraintsHelper.js
  81. +4
    -1
      app/docker/helpers/containerHelper.js
  82. +2
    -0
      app/docker/helpers/imageHelper.js
  83. +2
    -0
      app/docker/helpers/infoHelper.js
  84. +2
    -0
      app/docker/helpers/serviceHelper.js
  85. +3
    -1
      app/docker/models/config.js
  86. +7
    -4
      app/docker/models/container.js
  87. +2
    -2
      app/docker/models/containerCapabilities.js
  88. +1
    -1
      app/docker/models/event.js
  89. +2
    -2
      app/docker/models/image.js
  90. +1
    -1
      app/docker/models/imageDetails.js
  91. +1
    -1
      app/docker/models/imageLayer.js
  92. +3
    -1
      app/docker/models/network.js
  93. +1
    -1
      app/docker/models/node.js
  94. +1
    -1
      app/docker/models/plugin.js
  95. +3
    -1
      app/docker/models/secret.js
  96. +3
    -1
      app/docker/models/service.js
  97. +1
    -1
      app/docker/models/swarm.js
  98. +1
    -1
      app/docker/models/task.js
  99. +3
    -1
      app/docker/models/volume.js
  100. +2
    -0
      app/docker/rest/build.js

+ 12
- 0
.babelrc View File

@@ -0,0 +1,12 @@
{
"plugins": ["lodash", "angularjs-annotate"],
"presets": [
[
"@babel/preset-env",
{
"modules": false,
"useBuiltIns": "usage"
}
]
]
}

+ 1
- 0
.codeclimate.yml View File

@@ -53,6 +53,7 @@ plugins:
mass_threshold: 80
eslint:
enabled: true
channel: "eslint-5"
config:
config: .eslintrc.yml
fixme:


+ 3
- 0
.eslintignore View File

@@ -0,0 +1,3 @@
node_modules/
dist/
test/

+ 275
- 272
.eslintrc.yml View File

@@ -1,287 +1,290 @@
env:
browser: true
jquery: true
node: true

globals:
angular: true

# globals:
# angular: true
# $: true
# _: true
# moment: true
# filesize: true
# splitargs: true
extends:
- 'eslint:recommended'

# http://eslint.org/docs/rules/
parserOptions:
ecmaVersion: 2018
sourceType: module
ecmaFeatures:
modules: true

# # http://eslint.org/docs/rules/
rules:
# Possible Errors
no-await-in-loop: off
no-cond-assign: error
no-console: off
no-constant-condition: error
no-control-regex: error
no-debugger: error
no-dupe-args: error
no-dupe-keys: error
no-duplicate-case: error
no-empty-character-class: error
no-empty: error
no-ex-assign: error
no-extra-boolean-cast: error
no-extra-parens: off
no-extra-semi: error
no-func-assign: error
no-inner-declarations:
- error
- functions
no-invalid-regexp: error
no-irregular-whitespace: error
no-negated-in-lhs: error
no-obj-calls: error
no-prototype-builtins: off
no-regex-spaces: error
no-sparse-arrays: error
no-template-curly-in-string: off
no-unexpected-multiline: error
no-unreachable: error
no-unsafe-finally: off
no-unsafe-negation: off
use-isnan: error
valid-jsdoc: off
valid-typeof: error
# # Possible Errors
# no-await-in-loop: off
# no-cond-assign: error
# no-console: off
# no-constant-condition: error
# no-control-regex: error
# no-debugger: error
# no-dupe-args: error
# no-dupe-keys: error
# no-duplicate-case: error
# no-empty-character-class: error
no-empty: warn
# no-ex-assign: error
# no-extra-boolean-cast: error
# no-extra-parens: off
# no-extra-semi: error
# no-func-assign: error
# no-inner-declarations:
# - error
# - functions
# no-invalid-regexp: error
# no-irregular-whitespace: error
# no-negated-in-lhs: error
# no-obj-calls: error
# no-prototype-builtins: off
# no-regex-spaces: error
# no-sparse-arrays: error
# no-template-curly-in-string: off
# no-unexpected-multiline: error
# no-unreachable: error
# no-unsafe-finally: off
# no-unsafe-negation: off
# use-isnan: error
# valid-jsdoc: off
# valid-typeof: error

# Best Practices
accessor-pairs: error
array-callback-return: off
block-scoped-var: off
class-methods-use-this: off
complexity:
- error
- 6
consistent-return: off
curly: off
default-case: off
dot-location: off
dot-notation: off
eqeqeq: error
guard-for-in: error
no-alert: error
no-caller: error
no-case-declarations: error
no-div-regex: error
no-else-return: off
no-empty-function: off
no-empty-pattern: error
no-eq-null: error
no-eval: error
no-extend-native: error
no-extra-bind: error
no-extra-label: off
no-fallthrough: error
no-floating-decimal: off
no-global-assign: off
no-implicit-coercion: off
no-implied-eval: error
no-invalid-this: off
no-iterator: error
no-labels:
- error
- allowLoop: true
allowSwitch: true
no-lone-blocks: error
no-loop-func: error
no-magic-number: off
no-multi-spaces: off
no-multi-str: off
no-native-reassign: error
no-new-func: error
no-new-wrappers: error
no-new: error
no-octal-escape: error
no-octal: error
no-param-reassign: off
no-proto: error
no-redeclare: error
no-restricted-properties: off
no-return-assign: error
no-return-await: off
no-script-url: error
no-self-assign: off
no-self-compare: error
no-sequences: off
no-throw-literal: off
no-unmodified-loop-condition: off
no-unused-expressions: error
no-unused-labels: off
no-useless-call: error
no-useless-concat: error
# # Best Practices
# accessor-pairs: error
# array-callback-return: off
# block-scoped-var: off
# class-methods-use-this: off
# complexity:
# - error
# - 6
# consistent-return: off
# curly: off
# default-case: off
# dot-location: off
# dot-notation: off
# eqeqeq: error
# guard-for-in: error
# no-alert: error
# no-caller: error
# no-case-declarations: error
# no-div-regex: error
# no-else-return: off
no-empty-function: warn
# no-empty-pattern: error
# no-eq-null: error
# no-eval: error
# no-extend-native: error
# no-extra-bind: error
# no-extra-label: off
# no-fallthrough: error
# no-floating-decimal: off
# no-global-assign: off
# no-implicit-coercion: off
# no-implied-eval: error
# no-invalid-this: off
# no-iterator: error
# no-labels:
# - error
# - allowLoop: true
# allowSwitch: true
# no-lone-blocks: error
# no-loop-func: error
# no-magic-number: off
# no-multi-spaces: off
# no-multi-str: off
# no-native-reassign: error
# no-new-func: error
# no-new-wrappers: error
# no-new: error
# no-octal-escape: error
# no-octal: error
# no-param-reassign: off
# no-proto: error
# no-redeclare: error
# no-restricted-properties: off
# no-return-assign: error
# no-return-await: off
# no-script-url: error
# no-self-assign: off
# no-self-compare: error
# no-sequences: off
# no-throw-literal: off
# no-unmodified-loop-condition: off
# no-unused-expressions: error
# no-unused-labels: off
# no-useless-call: error
# no-useless-concat: error
no-useless-escape: off
no-useless-return: off
no-void: error
no-warning-comments: off
no-with: error
prefer-promise-reject-errors: off
radix: error
require-await: off
vars-on-top: off
wrap-iife: error
yoda: off
# no-useless-return: off
# no-void: error
# no-warning-comments: off
# no-with: error
# prefer-promise-reject-errors: off
# radix: error
# require-await: off
# vars-on-top: off
# wrap-iife: error
# yoda: off

# Strict
strict: off
# # Strict
# strict: off

# Variables
init-declarations: off
no-catch-shadow: error
no-delete-var: error
no-label-var: error
no-restricted-globals: off
no-shadow-restricted-names: error
no-shadow: off
no-undef-init: error
no-undef: off
no-undefined: off
no-unused-vars:
- warn
-
vars: local
no-use-before-define: off
# # Variables
# init-declarations: off
# no-catch-shadow: error
# no-delete-var: error
# no-label-var: error
# no-restricted-globals: off
# no-shadow-restricted-names: error
# no-shadow: off
# no-undef-init: error
# no-undef: off
# no-undefined: off
# no-unused-vars:
# - warn
# -
# vars: local
# no-use-before-define: off

# Node.js and CommonJS
callback-return: error
global-require: error
handle-callback-err: error
no-mixed-requires: off
no-new-require: off
no-path-concat: error
no-process-env: off
no-process-exit: error
no-restricted-modules: off
no-sync: off
# # Node.js and CommonJS
# callback-return: error
# global-require: error
# handle-callback-err: error
# no-mixed-requires: off
# no-new-require: off
# no-path-concat: error
# no-process-env: off
# no-process-exit: error
# no-restricted-modules: off
# no-sync: off

# Stylistic Issues
array-bracket-spacing: off
block-spacing: off
brace-style: off
camelcase: off
capitalized-comments: off
comma-dangle:
- error
- never
comma-spacing: off
comma-style: off
computed-property-spacing: off
consistent-this: off
eol-last: off
func-call-spacing: off
func-name-matching: off
func-names: off
func-style: off
id-length: off
id-match: off
indent: off
jsx-quotes: off
key-spacing: off
keyword-spacing: off
line-comment-position: off
linebreak-style:
- error
- unix
lines-around-comment: off
lines-around-directive: off
max-depth: off
max-len: off
max-nested-callbacks: off
max-params: off
max-statements-per-line: off
max-statements:
- error
- 30
multiline-ternary: off
new-cap: off
new-parens: off
newline-after-var: off
newline-before-return: off
newline-per-chained-call: off
no-array-constructor: off
no-bitwise: off
no-continue: off
no-inline-comments: off
no-lonely-if: off
no-mixed-operators: off
no-mixed-spaces-and-tabs: off
no-multi-assign: off
no-multiple-empty-lines: off
no-negated-condition: off
no-nested-ternary: off
no-new-object: off
no-plusplus: off
no-restricted-syntax: off
no-spaced-func: off
no-tabs: off
no-ternary: off
no-trailing-spaces: off
no-underscore-dangle: off
no-unneeded-ternary: off
object-curly-newline: off
object-curly-spacing: off
object-property-newline: off
one-var-declaration-per-line: off
one-var: off
operator-assignment: off
operator-linebreak: off
padded-blocks: off
quote-props: off
quotes:
- error
- single
require-jsdoc: off
semi-spacing: off
semi:
- error
- always
sort-keys: off
sort-vars: off
space-before-blocks: off
space-before-function-paren: off
space-in-parens: off
space-infix-ops: off
space-unary-ops: off
spaced-comment: off
template-tag-spacing: off
unicode-bom: off
wrap-regex: off
# # Stylistic Issues
# array-bracket-spacing: off
# block-spacing: off
# brace-style: off
# camelcase: off
# capitalized-comments: off
# comma-dangle:
# - error
# - never
# comma-spacing: off
# comma-style: off
# computed-property-spacing: off
# consistent-this: off
# eol-last: off
# func-call-spacing: off
# func-name-matching: off
# func-names: off
# func-style: off
# id-length: off
# id-match: off
# indent: off
# jsx-quotes: off
# key-spacing: off
# keyword-spacing: off
# line-comment-position: off
# linebreak-style:
# - error
# - unix
# lines-around-comment: off
# lines-around-directive: off
# max-depth: off
# max-len: off
# max-nested-callbacks: off
# max-params: off
# max-statements-per-line: off
# max-statements:
# - error
# - 30
# multiline-ternary: off
# new-cap: off
# new-parens: off
# newline-after-var: off
# newline-before-return: off
# newline-per-chained-call: off
# no-array-constructor: off
# no-bitwise: off
# no-continue: off
# no-inline-comments: off
# no-lonely-if: off
# no-mixed-operators: off
# no-mixed-spaces-and-tabs: off
# no-multi-assign: off
# no-multiple-empty-lines: off
# no-negated-condition: off
# no-nested-ternary: off
# no-new-object: off
# no-plusplus: off
# no-restricted-syntax: off
# no-spaced-func: off
# no-tabs: off
# no-ternary: off
# no-trailing-spaces: off
# no-underscore-dangle: off
# no-unneeded-ternary: off
# object-curly-newline: off
# object-curly-spacing: off
# object-property-newline: off
# one-var-declaration-per-line: off
# one-var: off
# operator-assignment: off
# operator-linebreak: off
# padded-blocks: off
# quote-props: off
# quotes:
# - error
# - single
# require-jsdoc: off
# semi-spacing: off
# semi:
# - error
# - always
# sort-keys: off
# sort-vars: off
# space-before-blocks: off
# space-before-function-paren: off
# space-in-parens: off
# space-infix-ops: off
# space-unary-ops: off
# spaced-comment: off
# template-tag-spacing: off
# unicode-bom: off
# wrap-regex: off

# ECMAScript 6
arrow-body-style: off
arrow-parens: off
arrow-spacing: off
constructor-super: off
generator-star-spacing: off
no-class-assign: off
no-confusing-arrow: off
no-const-assign: off
no-dupe-class-members: off
no-duplicate-imports: off
no-new-symbol: off
no-restricted-imports: off
no-this-before-super: off
no-useless-computed-key: off
no-useless-constructor: off
no-useless-rename: off
no-var: off
object-shorthand: off
prefer-arrow-callback: off
prefer-const: off
prefer-destructuring: off
prefer-numeric-literals: off
prefer-rest-params: off
prefer-reflect: off
prefer-spread: off
prefer-template: off
require-yield: off
rest-spread-spacing: off
sort-imports: off
symbol-description: off
template-curly-spacing: off
yield-star-spacing: off
# # ECMAScript 6
# arrow-body-style: off
# arrow-parens: off
# arrow-spacing: off
# constructor-super: off
# generator-star-spacing: off
# no-class-assign: off
# no-confusing-arrow: off
# no-const-assign: off
# no-dupe-class-members: off
# no-duplicate-imports: off
# no-new-symbol: off
# no-restricted-imports: off
# no-this-before-super: off
# no-useless-computed-key: off
# no-useless-constructor: off
# no-useless-rename: off
# no-var: off
# object-shorthand: off
# prefer-arrow-callback: off
# prefer-const: off
# prefer-destructuring: off
# prefer-numeric-literals: off
# prefer-rest-params: off
# prefer-reflect: off
# prefer-spread: off
# prefer-template: off
# require-yield: off
# rest-spread-spacing: off
# sort-imports: off
# symbol-description: off
# template-curly-spacing: off
# yield-star-spacing: off

+ 17
- 2
app/__module.js View File

@@ -1,3 +1,12 @@
import '../assets/css/app.css';
import angular from 'angular';

import './agent/_module';
import './azure/_module';
import './docker/__module';
import './extensions/storidge/__module';
import './portainer/__module';

angular.module('portainer', [
'ui.bootstrap',
'ui.router',
@@ -17,7 +26,6 @@ angular.module('portainer', [
'angular-clipboard',
'ngFileSaver',
'luegg.directives',
'portainer.templates',
'portainer.app',
'portainer.agent',
'portainer.azure',
@@ -26,4 +34,11 @@ angular.module('portainer', [
'extension.storidge',
'rzModule',
'moment-picker'
]);
]);

if (require) {
var req = require.context('./', true, /^(.*\.(js$))[^.]*$/im);
req.keys().forEach(function(key) {
req(key);
});
}

+ 1
- 1
app/agent/components/file-uploader/file-uploader.js View File

@@ -1,5 +1,5 @@
angular.module('portainer.agent').component('fileUploader', {
templateUrl: 'app/agent/components/file-uploader/file-uploader.html',
templateUrl: './file-uploader.html',
controller: 'FileUploaderController',
bindings: {
uploadFile: '<onFileSelected'


+ 1
- 1
app/agent/components/files-datatable/files-datatable.js View File

@@ -1,5 +1,5 @@
angular.module('portainer.agent').component('filesDatatable', {
templateUrl: 'app/agent/components/files-datatable/files-datatable.html',
templateUrl: './files-datatable.html',
controller: 'GenericDatatableController',
bindings: {
titleText: '@',


+ 2
- 0
app/agent/components/host-browser/host-browser-controller.js View File

@@ -1,3 +1,5 @@
import _ from 'lodash-es';

angular.module('portainer.agent').controller('HostBrowserController', [
'HostBrowserService', 'Notifications', 'FileSaver', 'ModalService',
function HostBrowserController(HostBrowserService, Notifications, FileSaver, ModalService) {


+ 1
- 1
app/agent/components/host-browser/host-browser.js View File

@@ -1,5 +1,5 @@
angular.module('portainer.agent').component('hostBrowser', {
controller: 'HostBrowserController',
templateUrl: 'app/agent/components/host-browser/host-browser.html',
templateUrl: './host-browser.html',
bindings: {}
});

+ 1
- 1
app/agent/components/node-selector/node-selector.js View File

@@ -1,5 +1,5 @@
angular.module('portainer.agent').component('nodeSelector', {
templateUrl: 'app/agent/components/node-selector/nodeSelector.html',
templateUrl: './nodeSelector.html',
controller: 'NodeSelectorController',
bindings: {
model: '='


+ 1
- 1
app/agent/components/volume-browser/volume-browser.js View File

@@ -1,5 +1,5 @@
angular.module('portainer.agent').component('volumeBrowser', {
templateUrl: 'app/agent/components/volume-browser/volumeBrowser.html',
templateUrl: './volumeBrowser.html',
controller: 'VolumeBrowserController',
bindings: {
volumeId: '<',


+ 2
- 0
app/agent/components/volume-browser/volumeBrowserController.js View File

@@ -1,3 +1,5 @@
import _ from 'lodash-es';

angular.module('portainer.agent')
.controller('VolumeBrowserController', ['HttpRequestHelper', 'VolumeBrowserService', 'FileSaver', 'Blob', 'ModalService', 'Notifications',
function (HttpRequestHelper, VolumeBrowserService, FileSaver, Blob, ModalService, Notifications) {


+ 1
- 1
app/agent/models/agent.js View File

@@ -1,4 +1,4 @@
function AgentViewModel(data) {
export function AgentViewModel(data) {
this.IPAddress = data.IPAddress;
this.NodeName = data.NodeName;
this.NodeRole = data.NodeRole;


+ 2
- 0
app/agent/rest/browse.js View File

@@ -1,3 +1,5 @@
import { browseGetResponse } from './response/browse';

angular.module('portainer.agent')
.factory('Browse', ['$resource', 'API_ENDPOINT_ENDPOINTS', 'EndpointProvider', 'StateManager',
function BrowseFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider, StateManager) {


+ 1
- 1
app/agent/rest/response/browse.js View File

@@ -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 browseGetResponse(data) {
export function browseGetResponse(data) {
var response = {};
response.file = data;
return response;


+ 2
- 0
app/agent/rest/v1/browse.js View File

@@ -1,3 +1,5 @@
import { browseGetResponse } from '../response/browse';

angular.module('portainer.agent')
.factory('BrowseVersion1', ['$resource', 'API_ENDPOINT_ENDPOINTS', 'EndpointProvider', function BrowseFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider) {
'use strict';


+ 2
- 0
app/agent/services/agentService.js View File

@@ -1,3 +1,5 @@
import { AgentViewModel } from '../models/agent';

angular.module('portainer.agent').factory('AgentService', [
'$q', 'Agent', 'AgentVersion1', 'HttpRequestHelper', 'Host', 'StateManager',
function AgentServiceFactory($q, Agent, AgentVersion1, HttpRequestHelper, Host, StateManager) {


+ 2
- 0
app/app.js View File

@@ -1,3 +1,5 @@
import _ from 'lodash-es';

angular.module('portainer')
.run(['$rootScope', '$state', 'Authentication', 'authManager', 'StateManager', 'EndpointProvider', 'Notifications', 'Analytics', 'cfpLoadingBar', '$transitions', 'HttpRequestHelper',
function ($rootScope, $state, Authentication, authManager, StateManager, EndpointProvider, Notifications, Analytics, cfpLoadingBar, $transitions, HttpRequestHelper) {


+ 3
- 3
app/azure/_module.js View File

@@ -14,7 +14,7 @@ angular.module('portainer.azure', ['portainer.app'])
url: '/containerinstances',
views: {
'content@': {
templateUrl: 'app/azure/views/containerinstances/containerinstances.html',
templateUrl: './views/containerinstances/containerinstances.html',
controller: 'AzureContainerInstancesController'
}
}
@@ -25,7 +25,7 @@ angular.module('portainer.azure', ['portainer.app'])
url: '/new/',
views: {
'content@': {
templateUrl: 'app/azure/views/containerinstances/create/createcontainerinstance.html',
templateUrl: './views/containerinstances/create/createcontainerinstance.html',
controller: 'AzureCreateContainerInstanceController'
}
}
@@ -36,7 +36,7 @@ angular.module('portainer.azure', ['portainer.app'])
url: '/dashboard',
views: {
'content@': {
templateUrl: 'app/azure/views/dashboard/dashboard.html',
templateUrl: './views/dashboard/dashboard.html',
controller: 'AzureDashboardController'
}
}


+ 1
- 1
app/azure/components/azure-endpoint-config/azure-endpoint-config.js View File

@@ -4,5 +4,5 @@ angular.module('portainer.azure').component('azureEndpointConfig', {
tenantId: '=',
authenticationKey: '='
},
templateUrl: 'app/azure/components/azure-endpoint-config/azureEndpointConfig.html'
templateUrl: './azureEndpointConfig.html'
});

+ 1
- 1
app/azure/components/azure-sidebar-content/azure-sidebar-content.js View File

@@ -1,3 +1,3 @@
angular.module('portainer.azure').component('azureSidebarContent', {
templateUrl: 'app/azure/components/azure-sidebar-content/azureSidebarContent.html'
templateUrl: './azureSidebarContent.html'
});

+ 1
- 1
app/azure/components/datatables/containergroups-datatable/containerGroupsDatatable.js View File

@@ -1,5 +1,5 @@
angular.module('portainer.azure').component('containergroupsDatatable', {
templateUrl: 'app/azure/components/datatables/containergroups-datatable/containerGroupsDatatable.html',
templateUrl: './containerGroupsDatatable.html',
controller: 'GenericDatatableController',
bindings: {
title: '@',


+ 3
- 3
app/azure/models/container_group.js View File

@@ -1,4 +1,4 @@
function ContainerGroupDefaultModel() {
export function ContainerGroupDefaultModel() {
this.Location = '';
this.OSType = 'Linux';
this.Name = '';
@@ -15,7 +15,7 @@ function ContainerGroupDefaultModel() {
this.Memory = 1;
}

function ContainerGroupViewModel(data) {
export function ContainerGroupViewModel(data) {
this.Id = data.id;
this.Name = data.name;
this.Location = data.location;
@@ -23,7 +23,7 @@ function ContainerGroupViewModel(data) {
this.Ports = data.properties.ipAddress.ports;
}

function CreateContainerGroupRequest(model) {
export function CreateContainerGroupRequest(model) {
this.location = model.Location;

var containerPorts = [];


+ 1
- 1
app/azure/models/location.js View File

@@ -1,4 +1,4 @@
function LocationViewModel(data) {
export function LocationViewModel(data) {
this.Id = data.id;
this.SubscriptionId = data.subscriptionId;
this.DisplayName = data.displayName;


+ 3
- 1
app/azure/models/provider.js View File

@@ -1,4 +1,6 @@
function ContainerInstanceProviderViewModel(data) {
import _ from 'lodash-es';

export function ContainerInstanceProviderViewModel(data) {
this.Id = data.id;
this.Namespace = data.namespace;



+ 1
- 1
app/azure/models/resource_group.js View File

@@ -1,4 +1,4 @@
function ResourceGroupViewModel(data, subscriptionId) {
export function ResourceGroupViewModel(data, subscriptionId) {
this.Id = data.id;
this.SubscriptionId = subscriptionId;
this.Name = data.name;


+ 1
- 1
app/azure/models/subscription.js View File

@@ -1,4 +1,4 @@
function SubscriptionViewModel(data) {
export function SubscriptionViewModel(data) {
this.Id = data.subscriptionId;
this.Name = data.displayName;
}

+ 2
- 0
app/azure/services/containerGroupService.js View File

@@ -1,3 +1,5 @@
import { ContainerGroupViewModel, CreateContainerGroupRequest } from '../models/container_group';

angular.module('portainer.azure')
.factory('ContainerGroupService', ['$q', 'ContainerGroup', function ContainerGroupServiceFactory($q, ContainerGroup) {
'use strict';


+ 2
- 0
app/azure/services/locationService.js View File

@@ -1,3 +1,5 @@
import { LocationViewModel } from '../models/location';

angular.module('portainer.azure')
.factory('LocationService', ['$q', 'Location', function LocationServiceFactory($q, Location) {
'use strict';


+ 2
- 0
app/azure/services/providerService.js View File

@@ -1,3 +1,5 @@
import { ContainerInstanceProviderViewModel } from '../models/provider';

angular.module('portainer.azure')
.factory('ProviderService', ['$q', 'Provider', function ProviderServiceFactory($q, Provider) {
'use strict';


+ 2
- 0
app/azure/services/resourceGroupService.js View File

@@ -1,3 +1,5 @@
import { ResourceGroupViewModel } from '../models/resource_group';

angular.module('portainer.azure')
.factory('ResourceGroupService', ['$q', 'ResourceGroup', function ResourceGroupServiceFactory($q, ResourceGroup) {
'use strict';


+ 2
- 0
app/azure/services/subscriptionService.js View File

@@ -1,3 +1,5 @@
import { SubscriptionViewModel } from '../models/subscription';

angular.module('portainer.azure')
.factory('SubscriptionService', ['$q', 'Subscription', function SubscriptionServiceFactory($q, Subscription) {
'use strict';


+ 2
- 0
app/azure/views/containerinstances/create/createContainerInstanceController.js View File

@@ -1,3 +1,5 @@
import { ContainerGroupDefaultModel } from '../../../models/container_group';

angular.module('portainer.azure')
.controller('AzureCreateContainerInstanceController', ['$q', '$scope', '$state', 'AzureService', 'Notifications',
function ($q, $scope, $state, AzureService, Notifications) {


+ 4
- 0
app/config.js View File

@@ -1,3 +1,7 @@
import toastr from 'toastr';
import { Terminal } from 'xterm';
import * as fit from 'xterm/lib/addons/fit/fit';

angular.module('portainer')
.config(['$urlRouterProvider', '$httpProvider', 'localStorageServiceProvider', 'jwtOptionsProvider', 'AnalyticsProvider', '$uibTooltipProvider', '$compileProvider', 'cfpLoadingBarProvider',
function ($urlRouterProvider, $httpProvider, localStorageServiceProvider, jwtOptionsProvider, AnalyticsProvider, $uibTooltipProvider, $compileProvider, cfpLoadingBarProvider) {


+ 38
- 36
app/docker/__module.js View File

@@ -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
- 1
app/docker/components/container-capabilities/container-capabilities.js View File

@@ -1,5 +1,5 @@
angular.module('portainer.docker').component('containerCapabilities', {
templateUrl: 'app/docker/components/container-capabilities/containerCapabilities.html',
templateUrl: './containerCapabilities.html',
bindings: {
capabilities: '='
}


+ 1
- 1
app/docker/components/container-quick-actions/containerQuickActions.js View File

@@ -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
- 1
app/docker/components/container-restart-policy/container-restart-policy.js View File

@@ -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
- 1
app/docker/components/dashboard-cluster-agent-info/dashboard-cluster-agent-info.js View File

@@ -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
- 1
app/docker/components/datatables/configs-datatable/configsDatatable.js View File

@@ -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
- 1
app/docker/components/datatables/container-networks-datatable/containerNetworksDatatable.js View File

@@ -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
- 1
app/docker/components/datatables/container-processes-datatable/containerProcessesDatatable.js View File

@@ -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
- 1
app/docker/components/datatables/containers-datatable/actions/containersDatatableActions.js View File

@@ -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
- 1
app/docker/components/datatables/containers-datatable/containersDatatable.js View File

@@ -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: '@',


+ 3
- 1
app/docker/components/datatables/containers-datatable/containersDatatableController.js View File

@@ -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
- 1
app/docker/components/datatables/events-datatable/eventsDatatable.js View File

@@ -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
- 1
app/docker/components/datatables/host-jobs-datatable/jobsDatatable.js View File

@@ -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: '@',


+ 3
- 1
app/docker/components/datatables/host-jobs-datatable/jobsDatatableController.js View File

@@ -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
- 1
app/docker/components/datatables/images-datatable/imagesDatatable.js View File

@@ -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
- 1
app/docker/components/datatables/macvlan-nodes-datatable/macvlanNodesDatatable.js View File

@@ -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
- 1
app/docker/components/datatables/networks-datatable/networksDatatable.js View File

@@ -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
- 1
app/docker/components/datatables/node-tasks-datatable/nodeTasksDatatable.js View File

@@ -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
- 1
app/docker/components/datatables/nodes-datatable/nodesDatatable.js View File

@@ -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
- 1
app/docker/components/datatables/secrets-datatable/secretsDatatable.js View File

@@ -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
- 1
app/docker/components/datatables/service-tasks-datatable/serviceTasksDatatable.js View File

@@ -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: '<',


+ 2
- 0
app/docker/components/datatables/service-tasks-datatable/serviceTasksDatatableController.js View File

@@ -1,3 +1,5 @@
import _ from 'lodash-es';

angular.module('portainer.docker')
.controller('ServiceTasksDatatableController', ['DatatableService',
function (DatatableService) {


+ 1
- 1
app/docker/components/datatables/services-datatable/actions/servicesDatatableActions.js View File

@@ -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
- 1
app/docker/components/datatables/services-datatable/servicesDatatable.js View File

@@ -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: '@',


+ 2
- 0
app/docker/components/datatables/services-datatable/servicesDatatableController.js View File

@@ -1,3 +1,5 @@
import _ from 'lodash-es';

angular.module('portainer.docker')
.controller('ServicesDatatableController', ['PaginationService', 'DatatableService', 'EndpointProvider',
function (PaginationService, DatatableService, EndpointProvider) {


+ 1
- 1
app/docker/components/datatables/tasks-datatable/tasksDatatable.js View File

@@ -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
- 1
app/docker/components/datatables/volumes-datatable/volumesDatatable.js View File

@@ -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
- 1
app/docker/components/dockerSidebarContent/docker-sidebar-content.js View File

@@ -1,5 +1,5 @@
angular.module('portainer.docker').component('dockerSidebarContent', {
templateUrl: 'app/docker/components/dockerSidebarContent/dockerSidebarContent.html',
templateUrl: './dockerSidebarContent.html',
bindings: {
endpointApiVersion: '<',
swarmManagement: '<',


+ 1
- 1
app/docker/components/host-overview/host-overview.js View File

@@ -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
- 2
app/docker/components/host-view-panels/devices-panel/devices-panel.js View File

@@ -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
- 2
app/docker/components/host-view-panels/disks-panel/disks-panel.js View File

@@ -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
- 2
app/docker/components/host-view-panels/engine-details-panel/engine-details-panel.js View File

@@ -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
- 1
app/docker/components/host-view-panels/host-details-panel/host-details-panel.js View File

@@ -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
- 2
app/docker/components/host-view-panels/node-availability-select/node-availability-select.js View File

@@ -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
- 2
app/docker/components/host-view-panels/node-labels-table/node-labels-table.js View File

@@ -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
- 2
app/docker/components/host-view-panels/swarm-node-details-panel/swarm-node-details-panel.js View File

@@ -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
- 1
app/docker/components/imageRegistry/por-image-registry.js View File

@@ -1,5 +1,5 @@
angular.module('portainer.docker').component('porImageRegistry', {
templateUrl: 'app/docker/components/imageRegistry/porImageRegistry.html',
templateUrl: './porImageRegistry.html',
controller: 'porImageRegistryController',
bindings: {
'image': '=',


+ 2
- 0
app/docker/components/imageRegistry/porImageRegistryController.js View File

@@ -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
- 1
app/docker/components/log-viewer/log-viewer.js View File

@@ -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: '=',


+ 2
- 0
app/docker/components/log-viewer/logViewerController.js View File

@@ -1,3 +1,5 @@
import moment from 'moment';

angular.module('portainer.docker')
.controller('LogViewerController', ['clipboard',
function (clipboard) {


+ 1
- 1
app/docker/components/network-macvlan-form/network-macvlan-form.js View File

@@ -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
- 1
app/docker/components/network-macvlan-form/networkMacvlanFormModel.js View File

@@ -1,4 +1,4 @@
function MacvlanFormData() {
export function MacvlanFormData() {
this.Scope = 'local';
this.SelectedNetworkConfig = '';
this.DatatableState = {


+ 1
- 1
app/docker/components/volumesNFSForm/volumes-nfs-form.js View File

@@ -1,5 +1,5 @@
angular.module('portainer.docker').component('volumesNfsForm', {
templateUrl: 'app/docker/components/volumesNFSForm/volumesnfsForm.html',
templateUrl: './volumesnfsForm.html',
bindings: {
data: '='
}


+ 1
- 1
app/docker/components/volumesNFSForm/volumesNFSFormModel.js View File

@@ -1,4 +1,4 @@
function VolumesNFSFormData() {
export function VolumesNFSFormData() {
this.useNFS = false;
this.serverAddress = '';
this.mountPoint = '';


+ 3
- 1
app/docker/filters/filters.js View File

@@ -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 () {


+ 2
- 0
app/docker/helpers/constraintsHelper.js View File

@@ -1,3 +1,5 @@
import _ from 'lodash-es';

function ConstraintModel(op, key, value) {
this.op = op;
this.value = value;


+ 4
- 1
app/docker/helpers/containerHelper.js View File

@@ -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 = {};



+ 2
- 0
app/docker/helpers/imageHelper.js View File

@@ -1,3 +1,5 @@
import _ from 'lodash-es';

angular.module('portainer.docker')
.factory('ImageHelper', [function ImageHelperFactory() {
'use strict';


+ 2
- 0
app/docker/helpers/infoHelper.js View File

@@ -1,3 +1,5 @@
import _ from 'lodash-es';

angular.module('portainer.docker')
.factory('InfoHelper', [function InfoHelperFactory() {
'use strict';


+ 2
- 0
app/docker/helpers/serviceHelper.js View File

@@ -1,3 +1,5 @@
import moment from 'moment';

angular.module('portainer.docker')
.factory('ServiceHelper', [function ServiceHelperFactory() {
'use strict';


+ 3
- 1
app/docker/models/config.js View File

@@ -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;


+ 7
- 4
app/docker/models/container.js View File

@@ -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;


+ 2
- 2
app/docker/models/containerCapabilities.js View File

@@ -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];

+ 1
- 1
app/docker/models/event.js View File

@@ -149,7 +149,7 @@ function createEventDetails(event) {