Commit Graph

1083 Commits (b2f36a3bbeb047031853e708ee32320661d1d0f3)

Author SHA1 Message Date
Mariell f525c8d022
feat(container-creation): add support for --init (#2111) (#3714) 2020-04-15 13:09:42 +12:00
Chaim Lev-Ari bba622a500
chore(eslint): add rule to sort imports (#3715)
* chore(eslint): add plugin to sort imports

* chore(eslint): sort imports

* chore(eslint): add eslint-config-prettier
2020-04-15 11:46:34 +12:00
Chaim Lev-Ari cf5056d9c0
chore(project): add prettier for code format (#3645)
* chore(project): install prettier and lint-staged

* chore(project): apply prettier to html too

* chore(project): git ignore eslintcache

* chore(project): add a comment about format script

* chore(prettier): update printWidth

* chore(prettier): remove useTabs option

* chore(prettier): add HTML validation

* refactor(prettier): fix closing tags

* feat(prettier): define angular parser for html templates

* style(prettier): run prettier on codebase

Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com>
2020-04-11 09:54:53 +12:00
Chaim Lev-Ari 2542d30a09
feat(endpoints): filter by ids and/or tag ids (#3690)
* feat(endpoints): add filter by tagIds

* refactor(endpoints): change endpoints service to query by tagIds

* fix(endpoints): filter by tags

* feat(endpoints): filter by endpoint groups tags

* feat(endpoints): filter by ids
2020-04-08 21:14:50 +12:00
Chaim Lev-Ari db8b3d6e5a
create tag from tag selector (#3640)
* feat(tags): add button to save tag when doesn't exist

* feat(endpoints): allow the creating of tags in endpoint edit

* feat(groups): allow user to create tags in create group

* feat(groups): allow user to create tags in edit group

* feat(endpoint): allow user to create tags from endpoint create

* feat(tags): allow the creation of a new tag from dropdown

* feat(tag): replace "add" with "create"

* feat(tags): show tags input when not tags

* feat(tags): hide create message when not allowed

* refactor(tags): replace component controller with class

* refactor(tags): replace native methods with lodash

* refactor(tags): remove unused onChangeTags function

* refactor(tags): remove on-change binding

* style(tags): remove white space

* refactor(endpoint-groups): move controller to separate file

* fix(groups): allow admin to create tag in group form

* refactor(endpoints): wrap async function with try catch and $async

* style(tags): wrap arrow function args with parenthesis

* refactor(endpoints): return $async functions

* refactor(tags): throw error in the format Notification expects
2020-04-08 19:56:24 +12:00
Chaim Lev-Ari edd86f2506
refactor(tags): refactor tag management (#3628)
* refactor(tags): replace tags with tag ids

* refactor(tags): revert tags to be strings and add tagids

* refactor(tags): enable search by tag in home view

* refactor(tags): show endpoint tags

* refactor(endpoints): expect tagIds on create payload

* refactor(endpoints): expect tagIds on update payload

* refactor(endpoints): replace TagIds to TagIDs

* refactor(endpoints): set endpoint group to get TagIDs

* refactor(endpoints): refactor tag-selector to receive tag-ids

* refactor(endpoints): show tags in multi-endpoint-selector

* chore(tags): revert reformat

* refactor(endpoints): remove unneeded bind

* refactor(endpoints): change param tags to tagids in endpoint create

* refactor(endpoints): remove console.log

* refactor(tags): remove deleted tag from endpoint and endpoint group

* fix(endpoints): show loading label while loading tags

* chore(go): remove obsolete import labels

* chore(db): add db version comment

* fix(db): add tag service to migrator

* refactor(db): add error checks in migrator

* style(db): sort props in alphabetical order

* style(tags): fix typo

Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io>

* refactor(endpoints): replace tagsMap with tag string representation

* refactor(tags): rewrite tag delete to be more readable

* refactor(home): rearange code to match former style

* refactor(tags): guard against missing model in tag-selector

* refactor(tags): rename vars in tag_delete

* refactor(tags): allow any authenticated user to fetch tag list

* refactor(endpoints): replace controller function with class

* refactor(endpoints): replace function with helper

* refactor(endpoints): replace controller with class

* refactor(tags): revert tags-selector to use 1 way bindings

* refactor(endpoints): load empty tag array instead of nil

* refactor(endpoints): revert default tag ids

* refactor(endpoints): use function in place

* refactor(tags): use lodash

* style(tags): use parens in arrow functions

* fix(tags): remove tag from tag model

Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io>
2020-03-29 22:54:14 +13:00
Ben Brooks fe89a4fc01
fix(services): enforce minimum replica count of 0 (#3653)
* fix(services): enforce minimum replica count of 0

Fixes #3652

Prevents replica count from being set below zero and causing an error.

* fix(services): enforce replica count is an integer

Prevents users entering decimals in the replica count
2020-03-29 13:25:50 +13:00
itsconquest 2c400eb3b4
feat(support): make support type dynamic (#3621) 2020-03-19 09:38:56 +13:00
Anthony Lapenna a11a348893
fix(containers): do not persist container status filter (#3615) 2020-03-16 14:37:59 +13:00
itsconquest d022853059
feat(support): add new offerings (#3608)
* feat(support): add new offerings

* feat(support): refactor for simplicity

* feat(support): rename for clarity
2020-03-16 11:35:55 +13:00
xAt0mZ bfdb4dba12
fix(container-creation): validate runtime property (#3581)
Co-authored-by: linquize <linquize2@yahoo.com>
2020-02-26 16:31:59 +13:00
William eff1b79a4a
fix(networks): patch datatable (#3557) 2020-02-12 20:41:41 +01:00
William 0330b16776
fix(container-create): patch dns (#3556) 2020-02-11 15:23:56 +01:00
William 97a0ea4a31
fix(templates): select volume name not object (#3549) 2020-02-06 09:07:23 +13:00
William 167d4319b5
fix(authentication): frontend changes (#3456)
* fix(authentication): frontend changes

* fix(authentication): suggested changes

* fix(authentication): support AnonymousMode boolean

* feat(authentication): support empty vals + move from scope to formValues

* feat(authentication): allow test of TLS & anon

* feat(authentication): remove unneeded whitespace

* feat(authentication): remove un-needed whitespace

* feat(refactor): rebase + cleanup logic
2020-02-06 09:06:22 +13:00
Mike Church 6f59f130a1
feat(dashboard): add health status to home page and dashboard (#3489)
* feat(dashboard): add health status to home page and dashboard

* fix(dashboard): code review updates, using builtin for substring search
2020-02-05 07:59:29 +13:00
William cc8d3c8639
refactor(UX): disable/remove uneeded UI elements (#3530)
* refactor(UX): disable/remove uneeded UI elements

* refactor(UX): rm missed th in container network

* refactor(UX): minor formatting improvement
2020-01-31 16:49:59 +01:00
William 6c492d2290
fix(UX): prevent task expand on row selection (#3531)
* fix(UX): prevent task expand on row selection

* refactor(UX): apply service expand logic to networks
2020-01-29 14:44:02 +01:00
William 8dda67c8d0 refactor(UX): fix grammar (#3528) 2020-01-27 14:02:04 +13:00
William 7365afa1bb feature(UX): sort dropdowns alphabetically (#3524) 2020-01-25 09:53:48 +13:00
Kirill K 1ef29f2671 feat: add setting to change DNS servers (#3511)
* feat: add setting to change DNS servers

* style: fixing codeclimate warning

Looks like conditional was excessive, it works as expected even without
it.

* style: rename 'DNS Server 1/2' to 'Primary/Secondary DNS Server'

Signed-off-by: Kirill K <kovalev.kirill.a@gmail.com>

* style: rename variables in code to match UI naming

* feat: add tooltips on DNS servers input fields

Signed-off-by: Kirill K <kovalev.kirill.a@gmail.com>

* Revert "feat: add tooltips on DNS servers input fields"

This reverts commit b83ef50825.

* style: secondary DNS placeholder

Signed-off-by: Kirill K <kovalev.kirill.a@gmail.com>
2020-01-24 15:49:28 +01:00
William fa5bb9b1be feat(stack-creation): add note for 2FA (#3509)
* refactor(stack-creation): add note for 2FA

* Update app/portainer/views/stacks/create/createstack.html

Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io>

Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com>
2020-01-23 09:17:04 +13:00
William 9da08bc792 refactor(endpoint-creation): remove unneeded port (#3467)
* refactor(endpoint-creation): remove unneeded port

* refactor(endpoint-creation): remove from clipboard
2020-01-22 09:17:41 +13:00
Iceyer 58c00401e9 fix: atob convert unicode in config failed (#3415)
atob only support decode ascii char, when this unicode in config, it will show unknown char.
2019-12-09 17:52:02 +01:00
xAt0mZ 1465825988 feat(container): disable recreate/duplicate buttons with RBAC for non admins (#3426) 2019-12-04 10:47:07 +13:00
xAt0mZ 2d576394d0 fix(registry-selector): unique images in auto suggest (#3425) 2019-12-04 10:46:03 +13:00
William f79dae3e27 feat(about): add analytics notice (#3423) 2019-12-04 08:05:00 +13:00
William dd0c80e915 fix(container-creation): preserve aliases if null (#3405)
* fix(container-creation): preserve aliases if null

* Update app/docker/views/containers/create/createContainerController.js
2019-11-29 09:21:23 +13:00
William 5ab63bd151 fix(container-create): patch aliases (#3403)
* fix(container-create): patch aliases

* Update app/docker/views/containers/create/createContainerController.js
2019-11-28 17:38:53 +13:00
xAt0mZ ea1ca76f70 fix(auth): clean browser cache on logout (#3402) 2019-11-28 12:16:34 +13:00
xAt0mZ e19bc8abc7 fix(app): registry push-pull features overhaul (#3393)
* feat(registry): registry or direct url selector

* feat(app): push pull container creation

* feat(app): push pull container duplicate

* feat(app): push pull container details recreate

* feat(app): push pull container details commit

* feat(app): push pull images

* feat(app): push pull image tag

* feat(app): push pull image push

* feat(app): push pull image pull

* feat(app): push pull service creation

* feat(app): push pull templates create container

* feat(app): push pull templates create stacks

* feat(app): push pull template edit

* feat(app): push pull service details update

* fix(app): refactor registry selector + registry auto select

* feat(app): remove autocomplete on registry selector

* style(image-registry): reword simple/advanced mode

* Revert "feat(app): remove autocomplete on registry selector"

This reverts commit 97ec2ddd62.

* refactor(registry-selector): reverse registry and image fields

* feat(app): autocomplete on registry selector

* feat(registry-selector): change gitlab registry autocomplete

* feat(registry-selector): autocomplete for dockerhub

* feat(registry-selector): gitlab url based on locked value instead of name

* fix(registry-selector): gitlab registries URL are not modified anymore

* fix(registry-selector): change gitlab image autofill on duplicate

* fix(registry-selector): gitlab registries now only suggest their own images and not all from gitlab

* fix(registry-selector): psuh pull issues with gitlab registries

* fix(registry-selector): dockerhub registry selection on duplicate for dockerhub images

* fix(templates): registry retrieval for template

* feat(images): add autocomplete on image pull panel

* fix(registry-selector): add latest tag when no tag is specified

* fix(registry-selector): latest tag now applied for non gitlab registries
2019-11-28 11:36:39 +13:00
William 61c38534a7 fix(container-creation): preserve network aliases (#3401) 2019-11-28 09:35:14 +13:00
William 7f54584ed6 fix(container-creation): match container_network by id (#3398) 2019-11-27 09:19:22 +13:00
xAt0mZ 1a65dbf85f fix(app): permissions lost for UI on browser refresh (#3354)
* fix(app): permissions lost for UI on browser refresh

* fix(app): permissions retrieval moved to global app resolve
2019-11-26 17:01:39 +13:00
William a3a83d1d7e fix(container): hide opts when autoremove true (#3397) 2019-11-26 08:08:48 +13:00
KemoNine a41ca1fd46 feat(container-creation): allow empty value for labels (#2655)
* Allow empty values for labels

* Allow empty labels when creating containers from a template
2019-11-25 13:25:30 +13:00
Anthony Lapenna 130c188717
fix(libcompose): apply same normalize name rule as libcompose on stack name (#3395) 2019-11-24 14:28:07 +13:00
Anthony Lapenna a85f0058ee
feat(extensions): add the ability to upload and enable an extension (#3345)
* feat(extensions): offline mode mockup

* feat(extensions): offline mode mockup

* feat(api): add support for extensionUpload API operation

* feat(extensions): offline extension upload

* feat(api): better support for extensions in offline mode

* feat(extension): update offline description

* feat(api): introduce local extension manifest

* fix(api): fix LocalExtensionManifestFile value

* feat(api): use a 5second timeout for online extension infos

* feat(extensions): add download archive link

* feat(extensions): add support for offline update

* fix(api): fix issues with offline install and online updates of extensions

* fix(extensions): fix extensions link URL

* fix(extension): hide screenshot in offline mode
2019-11-20 18:16:40 +13:00
Anthony Lapenna b8be795505
feat(templates): replace volume selector with typeahead (#3371) 2019-11-20 12:18:27 +13:00
Anthony Lapenna 19d4db13be
feat(api): rewrite access control management in Docker (#3337)
* feat(api): decorate Docker resource creation response with resource control

* fix(api): fix a potential resource control conflict between stacks/volumes

* feat(api): generate a default private resource control instead of admin only

* fix(api): fix default RC value

* fix(api): update RC authorizations check to support admin only flag

* refactor(api): relocate access control related methods

* fix(api): fix a potential conflict when fetching RC from database

* refactor(api): refactor access control logic

* refactor(api): remove the concept of DecoratedStack

* feat(api): automatically remove RC when removing a Docker resource

* refactor(api): update filter resource methods documentation

* refactor(api): update proxy package structure

* refactor(api): renamed proxy/misc package

* feat(api): re-introduce ResourceControlDelete operation as admin restricted

* refactor(api): relocate default endpoint authorizations

* feat(api): migrate RBAC data

* feat(app): ResourceControl management refactor

* fix(api): fix access control issue on stack deletion and automatically delete RC

* fix(api): fix stack filtering

* fix(api): fix UpdateResourceControl operation checks

* refactor(api): introduce a NewTransport builder method

* refactor(api): inject endpoint in Docker transport

* refactor(api): introduce Docker client into Docker transport

* refactor(api): refactor http/proxy package

* feat(api): inspect a Docker resource labels during access control validation

* fix(api): only apply automatic resource control creation on success response

* fix(api): fix stack access control check

* fix(api): use StatusCreated instead of StatusOK for automatic resource control creation

* fix(app): resource control fixes

* fix(api): fix an issue preventing administrator to inspect a resource with a RC

* refactor(api): remove useless error return

* refactor(api): document DecorateStacks function

* fix(api): fix invalid resource control type for container deletion

* feat(api): support Docker system networks

* feat(api): update Swagger docs

* refactor(api): rename transport variable

* refactor(api): rename transport variable

* feat(networks): add system tag for system networks

* feat(api): add support for resource control labels

* feat(api): upgrade to DBVersion 22

* refactor(api): refactor access control management in Docker proxy

* refactor(api): re-implement docker proxy taskListOperation

* refactor(api): review parameters declaration

* refactor(api): remove extra blank line

* refactor(api): review method comments

* fix(api): fix invalid ServerAddress property and review method visibility

* feat(api): update error message

* feat(api): update restrictedVolumeBrowserOperation method

* refactor(api): refactor method parameters

* refactor(api): minor refactor

* refactor(api): change Azure transport visibility

* refactor(api): update struct documentation

* refactor(api): update struct documentation

* feat(api): review restrictedResourceOperation method

* refactor(api): remove unused authorization methods

* feat(api): apply RBAC when enabled on stack operations

* fix(api): fix invalid data migration procedure for DBVersion = 22

* fix(app): RC duplicate on private resource

* feat(api): change Docker API version logic for libcompose/client factory

* fix(api): update access denied error message to be Docker API compliant

* fix(api): update volume browsing authorizations data migration

* fix(api): fix an issue with access control in multi-node agent Swarm cluster
2019-11-13 12:41:42 +13:00
xAt0mZ 198e92c734 feat(registry): gitlab support (#3107)
* feat(api): gitlab registry type

* feat(registries): early support for gitlab registries

* feat(app): registry service selector

* feat(registry): gitlab support : list repositories and tags - remove features missing

* feat(registry): gitlab registry remove features

* feat(registry): gitlab switch to registry V2 API for repositories and tags

* feat(api): use development extension binary

* fix(registry): avoid 401 on gitlab retrieve to disconnect the user

* feat(registry): gitlab browse projects without extension

* style(app): code cleaning

* refactor(app): PR review changes + refactor on types

* fix(gitlab): remove gitlab info from registrymanagementconfig and force gitlab type

* style(api): go fmt

* feat(api): update APIVersion and ExtensionDefinitionsURL

* fix(api): fix invalid RM extension URL

* feat(registry): PAT scope help

* feat(registry): defaults on registry creation

* style(registry-creation): update layout and text for Gitlab registry

* feat(registry-creation): update gitlab notice
2019-11-12 16:28:31 +13:00
George Cheng c559b6b55c fix(container-creation): Fix bad env in container creation (#2996)
Currently we are using RegExp `/\=(.+)/` to catch key-value
of environment variables, which could not match empty-value
environment variables such as `KEY=`.

This commit will change the RegExp to `/\=(.*)/`, which
matches the empty values.
2019-11-01 16:15:33 +13:00
William 542b76912a feat(endpoint-details): add edge-key to commands (#3302) 2019-10-24 16:36:24 +02:00
Mattias Edlund accca0f2a6 feat(containers): added support for port range mappings when deploying containers (#3194)
* feat(containers): added support for port range mappings when deploying containers

* feat(containers): added placeholders to port publishing input fields

* feat(containers): added a tooltip to the manual network port publishing

* feat(containers): improved the code consistency
2019-10-15 11:13:57 +02:00
xAt0mZ f67e866e7e
feat(registry): inspect repository images (#3121)
* feat(registry): inspect repository images

* fix(registry): tag inspect column sorting
2019-10-14 15:46:33 +02:00
xAt0mZ 2445a5aed5
fix(registry): Performance issues with Registry Manager (#2648)
* fix(registry): fetch datatable details on page/filter/order state change instead of fetching all data on first load

* fix(registry): fetch tags datatable details on state change instead of fetching all data on first load

* fix(registry): add pagination support for tags + loading display on data load

* fix(registry): debounce on text filter to avoid querying transient matching values

* refactor(registry): rebase on latest develop

* feat(registries): background tags and optimisation -- need code cleanup and for-await-of to cancel on page leave

* refactor(registry-management): code cleanup

* feat(registry): most optimized version -- need fix for add/retag

* fix(registry): addTag working without page reload

* fix(registry): retag working without reload

* fix(registry): remove tag working without reload

* fix(registry): remove repository working with latest changes

* fix(registry): disable cache on firefox

* feat(registry): use jquery for all 'most used' manifests requests

* feat(registry): retag with progression + rewrite manifest REST service to jquery

* fix(registry): remove forgotten DI

* fix(registry): pagination on repository details

* refactor(registry): info message + hidding images count until fetch has been done

* fix(registry): fix selection reset deleting selectAll function and not resetting status

* fix(registry): resetSelection was trying to set value on a getter

* fix(registry): tags were dropped when too much tags were impacted by a tag removal

* fix(registry): firefox add tag + progression

* refactor(registry): rewording of elements

* style(registry): add space between buttons and texts in status elements

* fix(registry): cancelling a retag/delete action was not removing the status panel

* fix(registry): tags count of empty repositories

* feat(registry): reload page on action cancel to avoid desync

* feat(registry): uncancellable modal on long operations

* feat(registry): modal now closes on error + modal message improvement

* feat(registries): remove empty repositories from the list

* fix(registry): various bugfixes

* feat(registry): independant timer on async actions + modal fix
2019-10-14 15:45:09 +02:00
xAt0mZ 8a8cef9b20
feat(deps): multiselect library as dependency (#3255) 2019-10-14 15:43:58 +02:00
xAt0mZ e20a139c5a
fix(registry): remove checkboxes on repositories list (#3109) 2019-10-14 15:43:27 +02:00
Tim van den Eijnden 774380fb44 chore(icons): update fontawesome dependency (#3219) 2019-10-14 15:40:19 +02:00
Soham Mondal 8de507a15d feat(container-details): add entrypoint to container details view (#3120)
* feat(container-details): add entrypoint to container details view

* feat(container-details): restore file from develop branch to bring back original indentation

* feat(container-details): add entrypoint to container details view
2019-10-10 17:47:25 +13:00