You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
portainer/api/datastore/migrator/migrator.go

233 lines
9.0 KiB

package migrator
import (
"errors"
"github.com/Masterminds/semver"
portainer "github.com/portainer/portainer/api"
"github.com/portainer/portainer/api/database/models"
chore(store) EE-1981: Refactor/store/error checking, and other refactoring (#6173) * use the Store interface IsErrObjectNotFound() to avoid revealing internal errors Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * what happens when you extract the datastore interfaces into their own package Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * Start renaming Storage methods Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the boltdb specific code from the Portainer storage code (example, the others need the same) Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more extract bolt.Tx from datastore code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * minimise imports by putting moving the struct definition into the file that needs the Service imports Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more extraction of boltdb.Tx Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the use of bucket.SetSequence Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * almost done - just endpoint.Synchonise :/ Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * so, endpoint.Synchonize looks hard, but i can't find where we use it, so 'delete first refactoring' Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix test compile errors Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * test compile fixes after rebase Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix a mis-remembering I had wrt deserialisation - last time i used AnyData - jsoniter's bindTo looks interesting for the same reason Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * set us up to make the connection an interface Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * make the db connection a datastore interface, and separate out our datastore services from the bolt ones Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * rename methods to something less oltdb internals specific Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * these errors are not boltdb secific Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * start using the db-backend factory method too Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * export boltdb raw in case we can't export from the service layer Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add a raw export from boltdb to yaml for broken db's, and an export services to yaml in backup Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add the version info by hand for now Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * actually, the export from services can be fully typed - its the import that needs to do more work Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * redo raw export, and make import capable of using it Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add DockerHub Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * migration from anything older than v1.21.0 has been broken for quite a while, deleting the un-tested code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix go test ./... again Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * my goland wasn't setup to gofmt Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * move the two extremely dubious migration tests down into store, so they can use the test store code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * the migrator is now free of boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * reverse goland overzealous replcement of internal with boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more undo over-zealous goland internal->boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * yay, now bolt is only mentioned inside the api/database/ dir Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * and this might be the last of the boltdb references? Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add todo Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the store code into a separate module too Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * don't need the fileService in boltdb anymore Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * use IsErrObjectNotFound() Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * use a string to select what database backend we use Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * make isNew store an ephemeral bool that doesn't stay true after we've initialised it Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * move the import.json wip to a separate file so its more obvious - we'll be using it for testing, emergency fixups, and in the next part of the store work, when we improve migrations and data model lifecycles Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * undo vscode formatting html Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix app templates symbol (#6221) * feat(webhook) EE-2125 send registry auth haeder when update swarms service via webhook (#6220) * feat(webhook) EE-2125 add some helpers to registry utils * feat(webhook) EE-2125 persist registryID when creating a webhook * feat(webhook) EE-2125 send registry auth header when executing a webhook * feat(webhook) EE-2125 send registryID to backend when creating a service with webhook * feat(webhook) EE-2125 use the initial registry ID to create webhook on editing service screen * feat(webhook) EE-2125 update webhook when update registry * feat(webhook) EE-2125 add endpoint of update webhook * feat(webhook) EE-2125 code cleanup * feat(webhook) EE-2125 fix a typo * feat(webhook) EE-2125 fix circle import issue with unit test Co-authored-by: Simon Meng <simon.meng@portainer.io> * fix(kubeconfig): show kubeconfig download button for non admin users [EE-2123] (#6204) Co-authored-by: Simon Meng <simon.meng@portainer.io> * fix data-cy for k8s cluster menu (#6226) LGTM * feat(stack): make stack created from app template editable EE-1941 (#6104) feat(stack): make stack from app template editable * fix(container):disable Duplicate/Edit button when the container is portainer (#6223) * fix/ee-1909/show-pull-image-error (#6195) Co-authored-by: sunportainer <ericsun@SG1.local> * feat(cy): add data-cy to helm install button (#6241) * feat(cy): add data-cy to add registry button (#6242) * refactor(app): convert root folder files to es6 (#4159) * refactor(app): duplicate constants as es6 exports (#4158) * fix(docker): provide workaround to save network name variable (#6080) * fix/EE-1862/unable-to-stop-or-remove-stack workaround for var without default value in yaml file * fix/EE-1862/unable-to-stop-or-remove-stack check yaml file * fixed func and var names * wrapper error and used bool for stringset * UT case for createNetworkEnvFile * UT case for %s=%s * powerful StringSet * wrapper error for extract network name * wrapper all the return err * store more env * put to env file * make default value None * feat: gzip static resources (#6258) * fix(ssl)//handle --sslcert and --sslkey ee-2106 (#6203) * fix/ee-2106/handle-sslcert-sslkey Co-authored-by: sunportainer <ericsun@SG1.local> * fix(server):support disable https only ee-2068 (#6232) * fix/ee-2068/disable-forcely-https * feat(store): implement store tests EE-2112 (#6224) * add store tests * add some more tests * Update missing helm user repo methods * remove redundant comments * add webhook export * update webhooks * use the Store interface IsErrObjectNotFound() to avoid revealing internal errors Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * what happens when you extract the datastore interfaces into their own package Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * Start renaming Storage methods Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the boltdb specific code from the Portainer storage code (example, the others need the same) Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more extract bolt.Tx from datastore code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * minimise imports by putting moving the struct definition into the file that needs the Service imports Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more extraction of boltdb.Tx Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the use of bucket.SetSequence Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * almost done - just endpoint.Synchonise :/ Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * so, endpoint.Synchonize looks hard, but i can't find where we use it, so 'delete first refactoring' Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix test compile errors Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * test compile fixes after rebase Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix a mis-remembering I had wrt deserialisation - last time i used AnyData - jsoniter's bindTo looks interesting for the same reason Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * set us up to make the connection an interface Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * make the db connection a datastore interface, and separate out our datastore services from the bolt ones Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * rename methods to something less oltdb internals specific Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * these errors are not boltdb secific Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * start using the db-backend factory method too Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * export boltdb raw in case we can't export from the service layer Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add a raw export from boltdb to yaml for broken db's, and an export services to yaml in backup Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add the version info by hand for now Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * actually, the export from services can be fully typed - its the import that needs to do more work Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * redo raw export, and make import capable of using it Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add DockerHub Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * migration from anything older than v1.21.0 has been broken for quite a while, deleting the un-tested code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix go test ./... again Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * my goland wasn't setup to gofmt Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * move the two extremely dubious migration tests down into store, so they can use the test store code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * the migrator is now free of boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * reverse goland overzealous replcement of internal with boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more undo over-zealous goland internal->boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * yay, now bolt is only mentioned inside the api/database/ dir Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * and this might be the last of the boltdb references? Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add todo Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the store code into a separate module too Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * don't need the fileService in boltdb anymore Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * use IsErrObjectNotFound() Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * use a string to select what database backend we use Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * make isNew store an ephemeral bool that doesn't stay true after we've initialised it Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * move the import.json wip to a separate file so its more obvious - we'll be using it for testing, emergency fixups, and in the next part of the store work, when we improve migrations and data model lifecycles Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * undo vscode formatting html Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * Update missing helm user repo methods * feat(store): implement store tests EE-2112 (#6224) * add store tests * add some more tests * remove redundant comments * add webhook export * update webhooks * fix build issues after rebasing * move migratorparams * remove unneeded integer type conversions * disable the db import/export for now Co-authored-by: Richard Wei <54336863+WaysonWei@users.noreply.github.com> Co-authored-by: cong meng <mcpacino@gmail.com> Co-authored-by: Simon Meng <simon.meng@portainer.io> Co-authored-by: Marcelo Rydel <marcelorydel26@gmail.com> Co-authored-by: Hao Zhang <hao.zhang@portainer.io> Co-authored-by: sunportainer <93502624+sunportainer@users.noreply.github.com> Co-authored-by: sunportainer <ericsun@SG1.local> Co-authored-by: wheresolivia <78844659+wheresolivia@users.noreply.github.com> Co-authored-by: Chaim Lev-Ari <chiptus@users.noreply.github.com> Co-authored-by: Chao Geng <93526589+chaogeng77977@users.noreply.github.com> Co-authored-by: Dmitry Salakhov <to@dimasalakhov.com> Co-authored-by: Matt Hook <hookenz@gmail.com>
3 years ago
"github.com/portainer/portainer/api/dataservices/dockerhub"
"github.com/portainer/portainer/api/dataservices/edgejob"
"github.com/portainer/portainer/api/dataservices/edgestack"
chore(store) EE-1981: Refactor/store/error checking, and other refactoring (#6173) * use the Store interface IsErrObjectNotFound() to avoid revealing internal errors Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * what happens when you extract the datastore interfaces into their own package Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * Start renaming Storage methods Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the boltdb specific code from the Portainer storage code (example, the others need the same) Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more extract bolt.Tx from datastore code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * minimise imports by putting moving the struct definition into the file that needs the Service imports Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more extraction of boltdb.Tx Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the use of bucket.SetSequence Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * almost done - just endpoint.Synchonise :/ Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * so, endpoint.Synchonize looks hard, but i can't find where we use it, so 'delete first refactoring' Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix test compile errors Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * test compile fixes after rebase Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix a mis-remembering I had wrt deserialisation - last time i used AnyData - jsoniter's bindTo looks interesting for the same reason Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * set us up to make the connection an interface Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * make the db connection a datastore interface, and separate out our datastore services from the bolt ones Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * rename methods to something less oltdb internals specific Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * these errors are not boltdb secific Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * start using the db-backend factory method too Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * export boltdb raw in case we can't export from the service layer Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add a raw export from boltdb to yaml for broken db's, and an export services to yaml in backup Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add the version info by hand for now Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * actually, the export from services can be fully typed - its the import that needs to do more work Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * redo raw export, and make import capable of using it Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add DockerHub Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * migration from anything older than v1.21.0 has been broken for quite a while, deleting the un-tested code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix go test ./... again Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * my goland wasn't setup to gofmt Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * move the two extremely dubious migration tests down into store, so they can use the test store code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * the migrator is now free of boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * reverse goland overzealous replcement of internal with boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more undo over-zealous goland internal->boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * yay, now bolt is only mentioned inside the api/database/ dir Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * and this might be the last of the boltdb references? Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add todo Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the store code into a separate module too Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * don't need the fileService in boltdb anymore Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * use IsErrObjectNotFound() Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * use a string to select what database backend we use Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * make isNew store an ephemeral bool that doesn't stay true after we've initialised it Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * move the import.json wip to a separate file so its more obvious - we'll be using it for testing, emergency fixups, and in the next part of the store work, when we improve migrations and data model lifecycles Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * undo vscode formatting html Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix app templates symbol (#6221) * feat(webhook) EE-2125 send registry auth haeder when update swarms service via webhook (#6220) * feat(webhook) EE-2125 add some helpers to registry utils * feat(webhook) EE-2125 persist registryID when creating a webhook * feat(webhook) EE-2125 send registry auth header when executing a webhook * feat(webhook) EE-2125 send registryID to backend when creating a service with webhook * feat(webhook) EE-2125 use the initial registry ID to create webhook on editing service screen * feat(webhook) EE-2125 update webhook when update registry * feat(webhook) EE-2125 add endpoint of update webhook * feat(webhook) EE-2125 code cleanup * feat(webhook) EE-2125 fix a typo * feat(webhook) EE-2125 fix circle import issue with unit test Co-authored-by: Simon Meng <simon.meng@portainer.io> * fix(kubeconfig): show kubeconfig download button for non admin users [EE-2123] (#6204) Co-authored-by: Simon Meng <simon.meng@portainer.io> * fix data-cy for k8s cluster menu (#6226) LGTM * feat(stack): make stack created from app template editable EE-1941 (#6104) feat(stack): make stack from app template editable * fix(container):disable Duplicate/Edit button when the container is portainer (#6223) * fix/ee-1909/show-pull-image-error (#6195) Co-authored-by: sunportainer <ericsun@SG1.local> * feat(cy): add data-cy to helm install button (#6241) * feat(cy): add data-cy to add registry button (#6242) * refactor(app): convert root folder files to es6 (#4159) * refactor(app): duplicate constants as es6 exports (#4158) * fix(docker): provide workaround to save network name variable (#6080) * fix/EE-1862/unable-to-stop-or-remove-stack workaround for var without default value in yaml file * fix/EE-1862/unable-to-stop-or-remove-stack check yaml file * fixed func and var names * wrapper error and used bool for stringset * UT case for createNetworkEnvFile * UT case for %s=%s * powerful StringSet * wrapper error for extract network name * wrapper all the return err * store more env * put to env file * make default value None * feat: gzip static resources (#6258) * fix(ssl)//handle --sslcert and --sslkey ee-2106 (#6203) * fix/ee-2106/handle-sslcert-sslkey Co-authored-by: sunportainer <ericsun@SG1.local> * fix(server):support disable https only ee-2068 (#6232) * fix/ee-2068/disable-forcely-https * feat(store): implement store tests EE-2112 (#6224) * add store tests * add some more tests * Update missing helm user repo methods * remove redundant comments * add webhook export * update webhooks * use the Store interface IsErrObjectNotFound() to avoid revealing internal errors Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * what happens when you extract the datastore interfaces into their own package Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * Start renaming Storage methods Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the boltdb specific code from the Portainer storage code (example, the others need the same) Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more extract bolt.Tx from datastore code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * minimise imports by putting moving the struct definition into the file that needs the Service imports Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more extraction of boltdb.Tx Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the use of bucket.SetSequence Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * almost done - just endpoint.Synchonise :/ Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * so, endpoint.Synchonize looks hard, but i can't find where we use it, so 'delete first refactoring' Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix test compile errors Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * test compile fixes after rebase Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix a mis-remembering I had wrt deserialisation - last time i used AnyData - jsoniter's bindTo looks interesting for the same reason Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * set us up to make the connection an interface Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * make the db connection a datastore interface, and separate out our datastore services from the bolt ones Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * rename methods to something less oltdb internals specific Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * these errors are not boltdb secific Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * start using the db-backend factory method too Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * export boltdb raw in case we can't export from the service layer Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add a raw export from boltdb to yaml for broken db's, and an export services to yaml in backup Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add the version info by hand for now Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * actually, the export from services can be fully typed - its the import that needs to do more work Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * redo raw export, and make import capable of using it Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add DockerHub Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * migration from anything older than v1.21.0 has been broken for quite a while, deleting the un-tested code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix go test ./... again Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * my goland wasn't setup to gofmt Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * move the two extremely dubious migration tests down into store, so they can use the test store code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * the migrator is now free of boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * reverse goland overzealous replcement of internal with boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more undo over-zealous goland internal->boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * yay, now bolt is only mentioned inside the api/database/ dir Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * and this might be the last of the boltdb references? Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add todo Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the store code into a separate module too Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * don't need the fileService in boltdb anymore Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * use IsErrObjectNotFound() Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * use a string to select what database backend we use Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * make isNew store an ephemeral bool that doesn't stay true after we've initialised it Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * move the import.json wip to a separate file so its more obvious - we'll be using it for testing, emergency fixups, and in the next part of the store work, when we improve migrations and data model lifecycles Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * undo vscode formatting html Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * Update missing helm user repo methods * feat(store): implement store tests EE-2112 (#6224) * add store tests * add some more tests * remove redundant comments * add webhook export * update webhooks * fix build issues after rebasing * move migratorparams * remove unneeded integer type conversions * disable the db import/export for now Co-authored-by: Richard Wei <54336863+WaysonWei@users.noreply.github.com> Co-authored-by: cong meng <mcpacino@gmail.com> Co-authored-by: Simon Meng <simon.meng@portainer.io> Co-authored-by: Marcelo Rydel <marcelorydel26@gmail.com> Co-authored-by: Hao Zhang <hao.zhang@portainer.io> Co-authored-by: sunportainer <93502624+sunportainer@users.noreply.github.com> Co-authored-by: sunportainer <ericsun@SG1.local> Co-authored-by: wheresolivia <78844659+wheresolivia@users.noreply.github.com> Co-authored-by: Chaim Lev-Ari <chiptus@users.noreply.github.com> Co-authored-by: Chao Geng <93526589+chaogeng77977@users.noreply.github.com> Co-authored-by: Dmitry Salakhov <to@dimasalakhov.com> Co-authored-by: Matt Hook <hookenz@gmail.com>
3 years ago
"github.com/portainer/portainer/api/dataservices/endpoint"
"github.com/portainer/portainer/api/dataservices/endpointgroup"
"github.com/portainer/portainer/api/dataservices/endpointrelation"
"github.com/portainer/portainer/api/dataservices/extension"
feat(intel): Enable OpenAMT and FDO capabilities (#6212) * feat(openamt): add AMT Devices information in Environments view [INT-8] (#6169) * feat(openamt): add AMT Devices Ouf of Band Managamenet actions [INT-9] (#6171) * feat(openamt): add AMT Devices KVM Connection [INT-10] (#6179) * feat(openamt): Enhance the Environments MX to activate OpenAMT on compatible environments [INT-7] (#6196) * feat(openamt): Enable KVM by default [INT-25] (#6228) * feat(fdo): implement the FDO configuration settings INT-19 (#6238) feat(fdo): implement the FDO configuration settings INT-19 * feat(fdo): implement Owner client INT-17 (#6231) feat(fdo): implement Owner client INT-17 * feat(openamt): hide wireless config in OpenAMT form (#6250) * feat(openamt): Increase OpenAMT timeouts [INT-30] (#6253) * feat(openamt): Disable the ability to use KVM and OOB actions on a MPS disconnected device [INT-36] (#6254) * feat(fdo): add import device UI [INT-20] (#6240) feat(fdo): add import device UI INT-20 * refactor(fdo): fix develop merge issues * feat(openamt): Do not fetch OpenAMT details for an unassociated Edge endpoint (#6273) * fix(intel): Fix switches params (#6282) * feat(openamt): preload existing AMT settings (#6283) * feat(openamt): Better UI/UX for AMT activation loading [INT-39] (#6290) * feat(openamt): Remove wireless config related code [INT-41] (#6291) * yarn install * feat(openamt): change kvm redirection for pop up, always enable features [INT-37] (#6292) * feat(openamt): change kvm redirection for pop up, always enable features [INT-37] (#6293) * feat(openmt): use .ts services with axios for OpenAMT (#6312) * Minor code cleanup. * fix(fdo): move the FDO client code to the hostmanagement folder INT-44 (#6345) * refactor(intel): Add Edge Compute Settings view (#6351) * feat(fdo): add FDO profiles INT-22 (#6363) feat(fdo): add FDO profiles INT-22 * fix(fdo): fix incorrect profile URL INT-45 (#6377) * fixed husky version * fix go.mod with go mod tidy * feat(edge): migrate OpenAMT devices views to Edge Devices [EE-2322] (#6373) * feat(intel): OpenAMT UI/UX adjustments (#6394) * only allow edge agent as edge device * show all edge agent environments on Edge Devices view * feat(fdo): add the ability to import multiple ownership vouchers at once EE-2324 (#6395) * fix(edge): settings edge compute alert (#6402) * remove pagination, add useMemo for devices result array (#6409) * feat(edge): minor Edge Devices (AMT) UI fixes (#6410) * chore(eslint): fix versions * chore(app): reformat codebase * change add edge agent modal behaviour, fix yarn.lock * fix use pagination * remove extractedTranslations folder * feat(edge): add FDO Profiles Datatable [EE-2406] (#6415) * feat(edge): add KVM workaround tooltip (#6441) * feat(edge): Add default FDO profile (#6450) * feat(edge): add settings to disable trust on first connect and enforce Edge ID INT-1 EE-2410 (#6429) Co-authored-by: andres-portainer <91705312+andres-portainer@users.noreply.github.com> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: andres-portainer <andres-portainer@users.noreply.github.com> Co-authored-by: Chaim Lev-Ari <chiptus@gmail.com>
3 years ago
"github.com/portainer/portainer/api/dataservices/fdoprofile"
chore(store) EE-1981: Refactor/store/error checking, and other refactoring (#6173) * use the Store interface IsErrObjectNotFound() to avoid revealing internal errors Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * what happens when you extract the datastore interfaces into their own package Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * Start renaming Storage methods Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the boltdb specific code from the Portainer storage code (example, the others need the same) Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more extract bolt.Tx from datastore code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * minimise imports by putting moving the struct definition into the file that needs the Service imports Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more extraction of boltdb.Tx Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the use of bucket.SetSequence Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * almost done - just endpoint.Synchonise :/ Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * so, endpoint.Synchonize looks hard, but i can't find where we use it, so 'delete first refactoring' Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix test compile errors Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * test compile fixes after rebase Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix a mis-remembering I had wrt deserialisation - last time i used AnyData - jsoniter's bindTo looks interesting for the same reason Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * set us up to make the connection an interface Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * make the db connection a datastore interface, and separate out our datastore services from the bolt ones Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * rename methods to something less oltdb internals specific Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * these errors are not boltdb secific Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * start using the db-backend factory method too Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * export boltdb raw in case we can't export from the service layer Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add a raw export from boltdb to yaml for broken db's, and an export services to yaml in backup Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add the version info by hand for now Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * actually, the export from services can be fully typed - its the import that needs to do more work Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * redo raw export, and make import capable of using it Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add DockerHub Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * migration from anything older than v1.21.0 has been broken for quite a while, deleting the un-tested code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix go test ./... again Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * my goland wasn't setup to gofmt Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * move the two extremely dubious migration tests down into store, so they can use the test store code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * the migrator is now free of boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * reverse goland overzealous replcement of internal with boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more undo over-zealous goland internal->boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * yay, now bolt is only mentioned inside the api/database/ dir Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * and this might be the last of the boltdb references? Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add todo Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the store code into a separate module too Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * don't need the fileService in boltdb anymore Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * use IsErrObjectNotFound() Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * use a string to select what database backend we use Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * make isNew store an ephemeral bool that doesn't stay true after we've initialised it Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * move the import.json wip to a separate file so its more obvious - we'll be using it for testing, emergency fixups, and in the next part of the store work, when we improve migrations and data model lifecycles Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * undo vscode formatting html Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix app templates symbol (#6221) * feat(webhook) EE-2125 send registry auth haeder when update swarms service via webhook (#6220) * feat(webhook) EE-2125 add some helpers to registry utils * feat(webhook) EE-2125 persist registryID when creating a webhook * feat(webhook) EE-2125 send registry auth header when executing a webhook * feat(webhook) EE-2125 send registryID to backend when creating a service with webhook * feat(webhook) EE-2125 use the initial registry ID to create webhook on editing service screen * feat(webhook) EE-2125 update webhook when update registry * feat(webhook) EE-2125 add endpoint of update webhook * feat(webhook) EE-2125 code cleanup * feat(webhook) EE-2125 fix a typo * feat(webhook) EE-2125 fix circle import issue with unit test Co-authored-by: Simon Meng <simon.meng@portainer.io> * fix(kubeconfig): show kubeconfig download button for non admin users [EE-2123] (#6204) Co-authored-by: Simon Meng <simon.meng@portainer.io> * fix data-cy for k8s cluster menu (#6226) LGTM * feat(stack): make stack created from app template editable EE-1941 (#6104) feat(stack): make stack from app template editable * fix(container):disable Duplicate/Edit button when the container is portainer (#6223) * fix/ee-1909/show-pull-image-error (#6195) Co-authored-by: sunportainer <ericsun@SG1.local> * feat(cy): add data-cy to helm install button (#6241) * feat(cy): add data-cy to add registry button (#6242) * refactor(app): convert root folder files to es6 (#4159) * refactor(app): duplicate constants as es6 exports (#4158) * fix(docker): provide workaround to save network name variable (#6080) * fix/EE-1862/unable-to-stop-or-remove-stack workaround for var without default value in yaml file * fix/EE-1862/unable-to-stop-or-remove-stack check yaml file * fixed func and var names * wrapper error and used bool for stringset * UT case for createNetworkEnvFile * UT case for %s=%s * powerful StringSet * wrapper error for extract network name * wrapper all the return err * store more env * put to env file * make default value None * feat: gzip static resources (#6258) * fix(ssl)//handle --sslcert and --sslkey ee-2106 (#6203) * fix/ee-2106/handle-sslcert-sslkey Co-authored-by: sunportainer <ericsun@SG1.local> * fix(server):support disable https only ee-2068 (#6232) * fix/ee-2068/disable-forcely-https * feat(store): implement store tests EE-2112 (#6224) * add store tests * add some more tests * Update missing helm user repo methods * remove redundant comments * add webhook export * update webhooks * use the Store interface IsErrObjectNotFound() to avoid revealing internal errors Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * what happens when you extract the datastore interfaces into their own package Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * Start renaming Storage methods Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the boltdb specific code from the Portainer storage code (example, the others need the same) Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more extract bolt.Tx from datastore code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * minimise imports by putting moving the struct definition into the file that needs the Service imports Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more extraction of boltdb.Tx Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the use of bucket.SetSequence Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * almost done - just endpoint.Synchonise :/ Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * so, endpoint.Synchonize looks hard, but i can't find where we use it, so 'delete first refactoring' Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix test compile errors Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * test compile fixes after rebase Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix a mis-remembering I had wrt deserialisation - last time i used AnyData - jsoniter's bindTo looks interesting for the same reason Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * set us up to make the connection an interface Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * make the db connection a datastore interface, and separate out our datastore services from the bolt ones Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * rename methods to something less oltdb internals specific Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * these errors are not boltdb secific Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * start using the db-backend factory method too Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * export boltdb raw in case we can't export from the service layer Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add a raw export from boltdb to yaml for broken db's, and an export services to yaml in backup Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add the version info by hand for now Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * actually, the export from services can be fully typed - its the import that needs to do more work Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * redo raw export, and make import capable of using it Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add DockerHub Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * migration from anything older than v1.21.0 has been broken for quite a while, deleting the un-tested code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix go test ./... again Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * my goland wasn't setup to gofmt Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * move the two extremely dubious migration tests down into store, so they can use the test store code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * the migrator is now free of boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * reverse goland overzealous replcement of internal with boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more undo over-zealous goland internal->boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * yay, now bolt is only mentioned inside the api/database/ dir Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * and this might be the last of the boltdb references? Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add todo Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the store code into a separate module too Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * don't need the fileService in boltdb anymore Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * use IsErrObjectNotFound() Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * use a string to select what database backend we use Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * make isNew store an ephemeral bool that doesn't stay true after we've initialised it Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * move the import.json wip to a separate file so its more obvious - we'll be using it for testing, emergency fixups, and in the next part of the store work, when we improve migrations and data model lifecycles Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * undo vscode formatting html Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * Update missing helm user repo methods * feat(store): implement store tests EE-2112 (#6224) * add store tests * add some more tests * remove redundant comments * add webhook export * update webhooks * fix build issues after rebasing * move migratorparams * remove unneeded integer type conversions * disable the db import/export for now Co-authored-by: Richard Wei <54336863+WaysonWei@users.noreply.github.com> Co-authored-by: cong meng <mcpacino@gmail.com> Co-authored-by: Simon Meng <simon.meng@portainer.io> Co-authored-by: Marcelo Rydel <marcelorydel26@gmail.com> Co-authored-by: Hao Zhang <hao.zhang@portainer.io> Co-authored-by: sunportainer <93502624+sunportainer@users.noreply.github.com> Co-authored-by: sunportainer <ericsun@SG1.local> Co-authored-by: wheresolivia <78844659+wheresolivia@users.noreply.github.com> Co-authored-by: Chaim Lev-Ari <chiptus@users.noreply.github.com> Co-authored-by: Chao Geng <93526589+chaogeng77977@users.noreply.github.com> Co-authored-by: Dmitry Salakhov <to@dimasalakhov.com> Co-authored-by: Matt Hook <hookenz@gmail.com>
3 years ago
"github.com/portainer/portainer/api/dataservices/registry"
"github.com/portainer/portainer/api/dataservices/resourcecontrol"
"github.com/portainer/portainer/api/dataservices/role"
"github.com/portainer/portainer/api/dataservices/schedule"
"github.com/portainer/portainer/api/dataservices/settings"
"github.com/portainer/portainer/api/dataservices/snapshot"
chore(store) EE-1981: Refactor/store/error checking, and other refactoring (#6173) * use the Store interface IsErrObjectNotFound() to avoid revealing internal errors Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * what happens when you extract the datastore interfaces into their own package Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * Start renaming Storage methods Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the boltdb specific code from the Portainer storage code (example, the others need the same) Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more extract bolt.Tx from datastore code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * minimise imports by putting moving the struct definition into the file that needs the Service imports Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more extraction of boltdb.Tx Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the use of bucket.SetSequence Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * almost done - just endpoint.Synchonise :/ Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * so, endpoint.Synchonize looks hard, but i can't find where we use it, so 'delete first refactoring' Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix test compile errors Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * test compile fixes after rebase Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix a mis-remembering I had wrt deserialisation - last time i used AnyData - jsoniter's bindTo looks interesting for the same reason Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * set us up to make the connection an interface Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * make the db connection a datastore interface, and separate out our datastore services from the bolt ones Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * rename methods to something less oltdb internals specific Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * these errors are not boltdb secific Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * start using the db-backend factory method too Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * export boltdb raw in case we can't export from the service layer Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add a raw export from boltdb to yaml for broken db's, and an export services to yaml in backup Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add the version info by hand for now Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * actually, the export from services can be fully typed - its the import that needs to do more work Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * redo raw export, and make import capable of using it Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add DockerHub Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * migration from anything older than v1.21.0 has been broken for quite a while, deleting the un-tested code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix go test ./... again Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * my goland wasn't setup to gofmt Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * move the two extremely dubious migration tests down into store, so they can use the test store code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * the migrator is now free of boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * reverse goland overzealous replcement of internal with boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more undo over-zealous goland internal->boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * yay, now bolt is only mentioned inside the api/database/ dir Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * and this might be the last of the boltdb references? Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add todo Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the store code into a separate module too Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * don't need the fileService in boltdb anymore Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * use IsErrObjectNotFound() Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * use a string to select what database backend we use Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * make isNew store an ephemeral bool that doesn't stay true after we've initialised it Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * move the import.json wip to a separate file so its more obvious - we'll be using it for testing, emergency fixups, and in the next part of the store work, when we improve migrations and data model lifecycles Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * undo vscode formatting html Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix app templates symbol (#6221) * feat(webhook) EE-2125 send registry auth haeder when update swarms service via webhook (#6220) * feat(webhook) EE-2125 add some helpers to registry utils * feat(webhook) EE-2125 persist registryID when creating a webhook * feat(webhook) EE-2125 send registry auth header when executing a webhook * feat(webhook) EE-2125 send registryID to backend when creating a service with webhook * feat(webhook) EE-2125 use the initial registry ID to create webhook on editing service screen * feat(webhook) EE-2125 update webhook when update registry * feat(webhook) EE-2125 add endpoint of update webhook * feat(webhook) EE-2125 code cleanup * feat(webhook) EE-2125 fix a typo * feat(webhook) EE-2125 fix circle import issue with unit test Co-authored-by: Simon Meng <simon.meng@portainer.io> * fix(kubeconfig): show kubeconfig download button for non admin users [EE-2123] (#6204) Co-authored-by: Simon Meng <simon.meng@portainer.io> * fix data-cy for k8s cluster menu (#6226) LGTM * feat(stack): make stack created from app template editable EE-1941 (#6104) feat(stack): make stack from app template editable * fix(container):disable Duplicate/Edit button when the container is portainer (#6223) * fix/ee-1909/show-pull-image-error (#6195) Co-authored-by: sunportainer <ericsun@SG1.local> * feat(cy): add data-cy to helm install button (#6241) * feat(cy): add data-cy to add registry button (#6242) * refactor(app): convert root folder files to es6 (#4159) * refactor(app): duplicate constants as es6 exports (#4158) * fix(docker): provide workaround to save network name variable (#6080) * fix/EE-1862/unable-to-stop-or-remove-stack workaround for var without default value in yaml file * fix/EE-1862/unable-to-stop-or-remove-stack check yaml file * fixed func and var names * wrapper error and used bool for stringset * UT case for createNetworkEnvFile * UT case for %s=%s * powerful StringSet * wrapper error for extract network name * wrapper all the return err * store more env * put to env file * make default value None * feat: gzip static resources (#6258) * fix(ssl)//handle --sslcert and --sslkey ee-2106 (#6203) * fix/ee-2106/handle-sslcert-sslkey Co-authored-by: sunportainer <ericsun@SG1.local> * fix(server):support disable https only ee-2068 (#6232) * fix/ee-2068/disable-forcely-https * feat(store): implement store tests EE-2112 (#6224) * add store tests * add some more tests * Update missing helm user repo methods * remove redundant comments * add webhook export * update webhooks * use the Store interface IsErrObjectNotFound() to avoid revealing internal errors Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * what happens when you extract the datastore interfaces into their own package Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * Start renaming Storage methods Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the boltdb specific code from the Portainer storage code (example, the others need the same) Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more extract bolt.Tx from datastore code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * minimise imports by putting moving the struct definition into the file that needs the Service imports Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more extraction of boltdb.Tx Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the use of bucket.SetSequence Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * almost done - just endpoint.Synchonise :/ Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * so, endpoint.Synchonize looks hard, but i can't find where we use it, so 'delete first refactoring' Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix test compile errors Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * test compile fixes after rebase Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix a mis-remembering I had wrt deserialisation - last time i used AnyData - jsoniter's bindTo looks interesting for the same reason Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * set us up to make the connection an interface Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * make the db connection a datastore interface, and separate out our datastore services from the bolt ones Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * rename methods to something less oltdb internals specific Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * these errors are not boltdb secific Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * start using the db-backend factory method too Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * export boltdb raw in case we can't export from the service layer Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add a raw export from boltdb to yaml for broken db's, and an export services to yaml in backup Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add the version info by hand for now Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * actually, the export from services can be fully typed - its the import that needs to do more work Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * redo raw export, and make import capable of using it Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add DockerHub Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * migration from anything older than v1.21.0 has been broken for quite a while, deleting the un-tested code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix go test ./... again Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * my goland wasn't setup to gofmt Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * move the two extremely dubious migration tests down into store, so they can use the test store code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * the migrator is now free of boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * reverse goland overzealous replcement of internal with boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more undo over-zealous goland internal->boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * yay, now bolt is only mentioned inside the api/database/ dir Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * and this might be the last of the boltdb references? Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add todo Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the store code into a separate module too Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * don't need the fileService in boltdb anymore Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * use IsErrObjectNotFound() Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * use a string to select what database backend we use Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * make isNew store an ephemeral bool that doesn't stay true after we've initialised it Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * move the import.json wip to a separate file so its more obvious - we'll be using it for testing, emergency fixups, and in the next part of the store work, when we improve migrations and data model lifecycles Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * undo vscode formatting html Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * Update missing helm user repo methods * feat(store): implement store tests EE-2112 (#6224) * add store tests * add some more tests * remove redundant comments * add webhook export * update webhooks * fix build issues after rebasing * move migratorparams * remove unneeded integer type conversions * disable the db import/export for now Co-authored-by: Richard Wei <54336863+WaysonWei@users.noreply.github.com> Co-authored-by: cong meng <mcpacino@gmail.com> Co-authored-by: Simon Meng <simon.meng@portainer.io> Co-authored-by: Marcelo Rydel <marcelorydel26@gmail.com> Co-authored-by: Hao Zhang <hao.zhang@portainer.io> Co-authored-by: sunportainer <93502624+sunportainer@users.noreply.github.com> Co-authored-by: sunportainer <ericsun@SG1.local> Co-authored-by: wheresolivia <78844659+wheresolivia@users.noreply.github.com> Co-authored-by: Chaim Lev-Ari <chiptus@users.noreply.github.com> Co-authored-by: Chao Geng <93526589+chaogeng77977@users.noreply.github.com> Co-authored-by: Dmitry Salakhov <to@dimasalakhov.com> Co-authored-by: Matt Hook <hookenz@gmail.com>
3 years ago
"github.com/portainer/portainer/api/dataservices/stack"
"github.com/portainer/portainer/api/dataservices/tag"
"github.com/portainer/portainer/api/dataservices/teammembership"
"github.com/portainer/portainer/api/dataservices/tunnelserver"
chore(store) EE-1981: Refactor/store/error checking, and other refactoring (#6173) * use the Store interface IsErrObjectNotFound() to avoid revealing internal errors Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * what happens when you extract the datastore interfaces into their own package Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * Start renaming Storage methods Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the boltdb specific code from the Portainer storage code (example, the others need the same) Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more extract bolt.Tx from datastore code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * minimise imports by putting moving the struct definition into the file that needs the Service imports Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more extraction of boltdb.Tx Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the use of bucket.SetSequence Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * almost done - just endpoint.Synchonise :/ Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * so, endpoint.Synchonize looks hard, but i can't find where we use it, so 'delete first refactoring' Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix test compile errors Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * test compile fixes after rebase Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix a mis-remembering I had wrt deserialisation - last time i used AnyData - jsoniter's bindTo looks interesting for the same reason Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * set us up to make the connection an interface Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * make the db connection a datastore interface, and separate out our datastore services from the bolt ones Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * rename methods to something less oltdb internals specific Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * these errors are not boltdb secific Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * start using the db-backend factory method too Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * export boltdb raw in case we can't export from the service layer Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add a raw export from boltdb to yaml for broken db's, and an export services to yaml in backup Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add the version info by hand for now Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * actually, the export from services can be fully typed - its the import that needs to do more work Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * redo raw export, and make import capable of using it Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add DockerHub Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * migration from anything older than v1.21.0 has been broken for quite a while, deleting the un-tested code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix go test ./... again Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * my goland wasn't setup to gofmt Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * move the two extremely dubious migration tests down into store, so they can use the test store code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * the migrator is now free of boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * reverse goland overzealous replcement of internal with boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more undo over-zealous goland internal->boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * yay, now bolt is only mentioned inside the api/database/ dir Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * and this might be the last of the boltdb references? Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add todo Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the store code into a separate module too Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * don't need the fileService in boltdb anymore Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * use IsErrObjectNotFound() Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * use a string to select what database backend we use Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * make isNew store an ephemeral bool that doesn't stay true after we've initialised it Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * move the import.json wip to a separate file so its more obvious - we'll be using it for testing, emergency fixups, and in the next part of the store work, when we improve migrations and data model lifecycles Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * undo vscode formatting html Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix app templates symbol (#6221) * feat(webhook) EE-2125 send registry auth haeder when update swarms service via webhook (#6220) * feat(webhook) EE-2125 add some helpers to registry utils * feat(webhook) EE-2125 persist registryID when creating a webhook * feat(webhook) EE-2125 send registry auth header when executing a webhook * feat(webhook) EE-2125 send registryID to backend when creating a service with webhook * feat(webhook) EE-2125 use the initial registry ID to create webhook on editing service screen * feat(webhook) EE-2125 update webhook when update registry * feat(webhook) EE-2125 add endpoint of update webhook * feat(webhook) EE-2125 code cleanup * feat(webhook) EE-2125 fix a typo * feat(webhook) EE-2125 fix circle import issue with unit test Co-authored-by: Simon Meng <simon.meng@portainer.io> * fix(kubeconfig): show kubeconfig download button for non admin users [EE-2123] (#6204) Co-authored-by: Simon Meng <simon.meng@portainer.io> * fix data-cy for k8s cluster menu (#6226) LGTM * feat(stack): make stack created from app template editable EE-1941 (#6104) feat(stack): make stack from app template editable * fix(container):disable Duplicate/Edit button when the container is portainer (#6223) * fix/ee-1909/show-pull-image-error (#6195) Co-authored-by: sunportainer <ericsun@SG1.local> * feat(cy): add data-cy to helm install button (#6241) * feat(cy): add data-cy to add registry button (#6242) * refactor(app): convert root folder files to es6 (#4159) * refactor(app): duplicate constants as es6 exports (#4158) * fix(docker): provide workaround to save network name variable (#6080) * fix/EE-1862/unable-to-stop-or-remove-stack workaround for var without default value in yaml file * fix/EE-1862/unable-to-stop-or-remove-stack check yaml file * fixed func and var names * wrapper error and used bool for stringset * UT case for createNetworkEnvFile * UT case for %s=%s * powerful StringSet * wrapper error for extract network name * wrapper all the return err * store more env * put to env file * make default value None * feat: gzip static resources (#6258) * fix(ssl)//handle --sslcert and --sslkey ee-2106 (#6203) * fix/ee-2106/handle-sslcert-sslkey Co-authored-by: sunportainer <ericsun@SG1.local> * fix(server):support disable https only ee-2068 (#6232) * fix/ee-2068/disable-forcely-https * feat(store): implement store tests EE-2112 (#6224) * add store tests * add some more tests * Update missing helm user repo methods * remove redundant comments * add webhook export * update webhooks * use the Store interface IsErrObjectNotFound() to avoid revealing internal errors Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * what happens when you extract the datastore interfaces into their own package Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * Start renaming Storage methods Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the boltdb specific code from the Portainer storage code (example, the others need the same) Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more extract bolt.Tx from datastore code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * minimise imports by putting moving the struct definition into the file that needs the Service imports Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more extraction of boltdb.Tx Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the use of bucket.SetSequence Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * almost done - just endpoint.Synchonise :/ Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * so, endpoint.Synchonize looks hard, but i can't find where we use it, so 'delete first refactoring' Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix test compile errors Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * test compile fixes after rebase Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix a mis-remembering I had wrt deserialisation - last time i used AnyData - jsoniter's bindTo looks interesting for the same reason Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * set us up to make the connection an interface Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * make the db connection a datastore interface, and separate out our datastore services from the bolt ones Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * rename methods to something less oltdb internals specific Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * these errors are not boltdb secific Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * start using the db-backend factory method too Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * export boltdb raw in case we can't export from the service layer Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add a raw export from boltdb to yaml for broken db's, and an export services to yaml in backup Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add the version info by hand for now Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * actually, the export from services can be fully typed - its the import that needs to do more work Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * redo raw export, and make import capable of using it Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add DockerHub Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * migration from anything older than v1.21.0 has been broken for quite a while, deleting the un-tested code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix go test ./... again Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * my goland wasn't setup to gofmt Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * move the two extremely dubious migration tests down into store, so they can use the test store code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * the migrator is now free of boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * reverse goland overzealous replcement of internal with boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more undo over-zealous goland internal->boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * yay, now bolt is only mentioned inside the api/database/ dir Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * and this might be the last of the boltdb references? Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add todo Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the store code into a separate module too Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * don't need the fileService in boltdb anymore Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * use IsErrObjectNotFound() Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * use a string to select what database backend we use Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * make isNew store an ephemeral bool that doesn't stay true after we've initialised it Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * move the import.json wip to a separate file so its more obvious - we'll be using it for testing, emergency fixups, and in the next part of the store work, when we improve migrations and data model lifecycles Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * undo vscode formatting html Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * Update missing helm user repo methods * feat(store): implement store tests EE-2112 (#6224) * add store tests * add some more tests * remove redundant comments * add webhook export * update webhooks * fix build issues after rebasing * move migratorparams * remove unneeded integer type conversions * disable the db import/export for now Co-authored-by: Richard Wei <54336863+WaysonWei@users.noreply.github.com> Co-authored-by: cong meng <mcpacino@gmail.com> Co-authored-by: Simon Meng <simon.meng@portainer.io> Co-authored-by: Marcelo Rydel <marcelorydel26@gmail.com> Co-authored-by: Hao Zhang <hao.zhang@portainer.io> Co-authored-by: sunportainer <93502624+sunportainer@users.noreply.github.com> Co-authored-by: sunportainer <ericsun@SG1.local> Co-authored-by: wheresolivia <78844659+wheresolivia@users.noreply.github.com> Co-authored-by: Chaim Lev-Ari <chiptus@users.noreply.github.com> Co-authored-by: Chao Geng <93526589+chaogeng77977@users.noreply.github.com> Co-authored-by: Dmitry Salakhov <to@dimasalakhov.com> Co-authored-by: Matt Hook <hookenz@gmail.com>
3 years ago
"github.com/portainer/portainer/api/dataservices/user"
"github.com/portainer/portainer/api/dataservices/version"
"github.com/portainer/portainer/api/internal/authorization"
"github.com/rs/zerolog/log"
)
type (
// Migrator defines a service to migrate data after a Portainer version update.
Migrator struct {
currentDBVersion *models.Version
migrations []Migrations
feat(edge-compute): add support for Edge stacks (#3827) * feat(api): introduce Edge group API (#3639) * feat(edge-groups): add object definition and service definition * feat(edge-groups): implement bolt layer * feat(edge-groups): bind service to server * feat(edge-group): add edge-group create http handler * feat(edge-groups): add list method to edge group handler * feat(edge-group): add inspect http handler * feat(edge-groups): add delete edge-group handler * feat(edge-groups): add update group handler * style(db): order by alphabetical order * fix(edge-groups): rewrite http error messages Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(main): order by alphabetical order * refactor(edge-group): relocate fetch group * fix(edge-group): reset tagids/endpoints if dynamic * refactor(server): order by alphabetical order * refactor(server): order by alphabetical order Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * Introduce a new setting to enable Edge compute features (#3654) * feat(edge-compute): add edge compute setting * feat(edge-compute): add edge compute group to sidebar * fix(settings): rename settings form group * fix(settings): align form control * Edge group associated endpoints (#3659) * chore(version): bump version number * chore(version): bump version number * feat(endpoints): filter by endpoint type (#3646) * refactor(tags): migrate tags to have association objects * 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> * refactor(tags): create tag association when creating tag * refactor(tags): delete tag association when deleting tag * refactor(db): handle error in tag association create * feat(endpoint-group): update tag assoc when creating endpoint group * feat(endpoint-group): update tag association when updating group * feat(endpoint-groups): remove group from tag associations * feat(endpoints): associate endpoint with tag on create * feat(endpoints): edit tag association when updating endpoint * fix(tags): fix merge problems * refactor(tags): remove tag association resource * fix(db): use regular tags map * style(tags): reorder props and imports * refactor(endpoint-groups): replace tag-association with tag * feat(edge-group): get associated endpoints when fetching * refactor(tags): refactor algo to update endpoint and group tags * refactor(edge-group): rename variable * refactor(tags): move calc of tags to remove to global function * fix(tags): update tag after adding association Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-groups): associate groups only with edge endpoints (#3667) * fix(edge-groups): check endpoint type when adding to edge-group * fix(edge-groups): return only edge endpoints for dynamic groups * fix(edge-compute): load edge compute setting on public setting (#3665) * Edge group list (#3644) * feat(edge-groups): add edge module * feat(edge-groups): add edge-group service * feat(edge-group): add groups list view * feat(edge-groups): add link to groups in the sidebar * feat(edge-group): show endpoints count and group type * feat(edge-group): enable removal of edge groups * refactor(edge-groups): replace datatable controller with class * refactor(edge-groups): replace function with class * fix(edge-groups): sort items by endpoints count and group type * refactor(edge-groups): use generic datatable-header component * feat(app): add trace for ui router * fix(edge-compute): add ng injection to onEnter guard * fix(edge-compute): add ng injection to onEnter guard * style(edge-compute): remove space * refactor(edge-compute): import angular * fix(app): remove ui router trace * refactor(product): revert app.js * fix(edge-compute): remove admin guard from edge routes * fix(edge-groups): change label of empty datatable Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(edge-groups): rename service * fix(edge-groups): replace icon in sidebar Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(edge-groups): remove datatable controller * refactor(edge-groups): move datatable icon to binding * refactor(edge-groups): use vanilla datatable header * refactor(datatable): remove datatable header Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(edge): rename edge group to Edge group * feat(edge-groups): edge group creation view (#3671) * feat(edge-groups): add create group view * feat(edge-groups): allow to choose group type * feat(edge-groups): implement create service handler * feat(edge-group): filter by edge endpoints * refactor(edge-groups): rename to camel case * refactor(edge-groups): replace controller with class * feat(endpoints): filter endpoints by type * refactor(edge-groups): remove comments and unneccesary async keyword * refactor(edge-group): use $async service * fix(edge-groups): replace view title Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-groups): change icon Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-groups): change icon Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(edge-groups): remove obsolete function * feat(edge-groups): add empty list messages * feat(edge-group): add description to group types * refactor(edge-groups): add finally block * feat(endpoints): search server in multi-endpoint-selector Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-group) edit view (#3672) * feat(edge-groups): add edit group view * refactor(edge-group): replace edit controller with class * refactor(edge-groups): remove async keyword * refactor(edge-groups): use $async service * refactor(edge-group): remove unnecessary functions * fix(endpoints): group by groups in endpoint-selector * feat(edge-groups): minor UI update * fix(edge-groups): provide defaults for edge group (#3682) * feat(edge-stacks): add basic views and sidebar link (#3689) * feat(edge-stacks): add mock routes * feat(edge-stacks): add link to stacks on sidebar * feat(edge-stacks): add edge stacks view * feat(edge-stacks): add create view * feat(edge-stacks): add edit view * fix(edge-stacks): use class in controller * feat(edge-stacks): add edge-stacks api (#3688) * feat(edge-stack): add edge stack types * feat(edge-stacks): add edge stack service interface * feat(edge-stacks): implement store * feat(edge-stacks): bind service to datastore * feat(edge-stacks): bind service to server * feat(edge-stack): create basic api * feat(edge-stack): create stack api * feat(edge-stacks): update api * refacotor(edge-stack): rename files * feat(edge-stack): update endpoint status * style(edge-stacks): remove comments * feat(edge-stacks): use edge stacks folder for files * fix(edge-stacks): replace bucket name Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-stacks): replace unmarshal function Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-stacks): replace edge stacks path Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * chore(git): merge develop to edge compute (#3692) * feat(support): make support type dynamic (#3621) * chore(version): bump version number * chore(version): bump version number * feat(endpoints): filter by endpoint type (#3646) * chore(assets): double UI image resolutions for HiDPI displays (#3648) Fixes #3069 Prevents users seeing blurry logos and other images when using a hidpi display (like scaled 4k, or a Retina display). These images have been recreated manually with 2x the original resolution but should resemble the originals as much as possible. They have also been run through pngcrush for compression. * 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 * 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> * chore(yarn): change start:client to start webpack dev server (#3595) * chore(yarn): change start:client to start webpack dev server * Update package.json Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * 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 * chore(yarn): add start:client script back (#3691) * 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 Co-authored-by: itsconquest <william.conquest@portainer.io> Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> Co-authored-by: Ben Brooks <ben@bbrks.me> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * Chore merge develop to edge compute (#3702) * feat(support): make support type dynamic (#3621) * chore(version): bump version number * chore(version): bump version number * feat(endpoints): filter by endpoint type (#3646) * chore(assets): double UI image resolutions for HiDPI displays (#3648) Fixes #3069 Prevents users seeing blurry logos and other images when using a hidpi display (like scaled 4k, or a Retina display). These images have been recreated manually with 2x the original resolution but should resemble the originals as much as possible. They have also been run through pngcrush for compression. * 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 * 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> * chore(yarn): change start:client to start webpack dev server (#3595) * chore(yarn): change start:client to start webpack dev server * Update package.json Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * 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 * chore(yarn): add start:client script back (#3691) * 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 * refactor(project): sort portainer types and interface definitions (#3694) * refactor(portainer): sort types * style(portainer): add comment about role service * refactor(portainer): sort interface types * refactor(portainer): sort enums * Update README.md * Update README.md * Update README.md * 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> * chore(prettier): run format on client codebase Co-authored-by: itsconquest <william.conquest@portainer.io> Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> Co-authored-by: Ben Brooks <ben@bbrks.me> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Neil Cresswell <neil@cresswell.net.nz> * feat(edge-stacks): create basic edge stack service (#3704) Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-groups): Provide a switch to use AND or OR for tags (#3695) * feat(edge-groups): add switch to form * feat(project): add property to EdgeGroup * feat(edge-groups): save mustHaveAllTags * feat(edge-groups): fetch associated endpoints (AND and OR) * feat(edge-groups): add AND selector * feat(edge-groups): default to AND * fix(edge-groups): rewrite selector options Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(endpoints): move margin to schedule form * fix(edge-groups): move the selector to top of group * refactor(edge-groups): replace partialMatch property Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-stacks): add Edge stack creation view (#3705) * feat(edge-stacks): basic creation view * feat(edge-stacks): add group selector * feat(edge-stack): create edge stack * fix(code-editor): apply digest cycle after editor is changed * style(project): reformat constants file * feat(edge-stacks): add a note about missing edge groups * fix(edge-stacks): add groups when creating stack from file * feat(edge-groups): add associated endpoints table (#3710) * feat(edge-groups): load associated endpoints * feat(endpoints): add option to filter endpoint by partial match tags * feat(edge-groups): query endpoints by PartialMatch * feat(edge-groups): reload endpoints when form changes * feat(edge-groups): remove columns * feat(edge-group): remove url column * refactor(edge-group): remove props * feat(edge-stacks): add list view (#3713) * feat(edge-stacks): basic datatable * feat(edge-stacks): remove stack * refactor(edge-stacks): convert to class * refactor(edge-stacks): replace id with stackId * feat(edge-stacks) edit edge stack view (#3716) * feat(edge-stack): load file content * feat(edge-stack): edit view * feat(edge-stack): enable update stack * refactor(edge-stacks): move form to component * feat(edge-stacks): add endpoints status * feat(edge-stacks): minor UI update Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> * feat(edge-groups) prevent deletion of edge group used by an edge stack (#3722) * feat(edge-groups): show if group belonges to edge stack * feat(edge-group): protect deletion of used edge group * feat(edge-groups): diable selection of used group * feat(edge-groups): add inuse tag (#3739) * feat(edge-groups): add inuse tag * Update app/edge/components/groups-datatable/groupsDatatable.html Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-stack): update stack version when stack file is changed (#3746) * feat(edge-stack): update version when stack file is changed * refactor(edge-stacks): move update of version to clientside * feat(edge-groups): replace Edge group endpoint selector (#3738) * feat(edge-groups): replace selector * feat(edge-group): add selector in edit form * feat(edge-groups): show tags in endpoint selector * feat(edge-groups): show the endpoint group name * fix(edge-group): remove element from associated endpoints * feat(edge-groups): add group column * feat(edge-groups): move endpoints to other column * fix(groups): disable sort * refactor(endpoints): toggle backend pagination as a property * fix(endpoints): show group name in group-association-table * feat(endpoints): truncate table columns * fix(endpoints): update group association table colspan * fix(endpoint-groups): show dash when no tags Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> * feat(edge-stacks): add api for edge to query stack config (#3748) * refactor(http): move edge validation to bouncer * feat(edge-stacks): add api for edge to query stack config * style(edge-stack): remove parentheses * Update api/http/security/bouncer.go * refactor(edge-stacks): move config inspect to endpoints handler * refactor(endpoints): move stack inspect to edge handler * style(security): fix typo Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(endpoints): rename file Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-groups): add dynamic group endpoints table (#3780) * fix(edge-stacks): update version when updating stack files (#3778) * feat(edgestacks): change status permission to edge enpoints * feat(edge-compute): add stack info to edge status inspect (#3764) * feat(edge-compute): create helper functions * feat(endpoints): add relation object and service * feat(db): create endpoint relation migration * feat(endpoints): create relation when creating endpoint * feat(endpoints): update relation when updating endpoint * feat(endpoints): delete relation when deleting endpoint * feat(endpoint): add stack status to endpoint_status * feat(edge-stacks): connect new edge stack to endpoint * refactor(edgestack): return errors.New * refactor(edgestacks): return error * refactor(edgegroup): endpoint can be related only if edge endpoint * feat(endpoints): update relation only when tags or groups were changd * refactor(tags): change tags functions to set functions * refactor(edgestack): return a list of endpoints for a list of edgegroups * feat(edgestacks): update relation when updating stack * feat(edgestacks): remove relations when deleting edge stack * feat(edgegroup): update related endpoints * feat(endpoint-group): update endpoints relations on create * feat(endpointgroup): add relatd stacks to endpoint when added to group * feat(endpoint-groups): update relation when group is changed * feat(endpointgroup): when deleting group, update its endpoints relations * feat(tags): update related endpoints when deleting tag * refactor(edge-compute): use pointers * refactor(endpointgroup): handle unassociated endpoint * fix(edgestack): show correct stack status * fix(endpoint): remove deleted endpoint from related tags * feat(edge-stacks): change acknowledged status color to blue (#3810) * feat(edge-compute): provide stack name to edge endpoint (#3809) * feat(edge-groups): when no tags selected show empty list of endpoints (#3811) * feat(edge-groups): when no tags selected show empty list of endpoints * fix(edge-group): change empty associated endpoint text * fix(edge-compute): add missing relations updates (#3817) * fix(endpoint): remove deleted endpoint from edge group * fix(tags): remove deleted tag from edge group * fix(endpoint): remove deleted endpoint from edge stack * fix(edge-groups): remove clearing of edgeGroup fields * fix(edge-groups): show dynamic edge groups without tags * fix(edge-compute): use sequential delete in resources (#3818) * fix(endpoints): delete endpoints on by one * fix(tags): remove tags one by one * fix(groups): remove endpoint groups one by one * fix(edge-stacks): remove stack one by one * fix(edge-groups): remove edge group one by one * fix(edge-stacks): add link to root in breadcrumbs * style(edge): add empty line after errors * refactor(tags): remove old function * refactor(endpoints): revert changes to multi-endpoint-selector * feat(edge-stacks): support Edge stack templates (#3812) * feat(edge-compute): fetch templates from url * feat(edge-stacks): fetch edge templates * feat(edge-stacks): choose template and save * feat(edge-stacks): add placeholder to templates select * feat(edge-templates): show info * fix(edge-stacks): fix typo * feat(edge-templates): replace template url * feat(edge-compute): use custom url if available * fix(edge-stacks): show error message when failing * feat(edge-compute): show description in template * feat(edge-templates): change access to route * style(edge-compute): change EdgeTemplatesURL description Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> Co-authored-by: itsconquest <william.conquest@portainer.io> Co-authored-by: Ben Brooks <ben@bbrks.me> Co-authored-by: Neil Cresswell <neil@cresswell.net.nz>
5 years ago
endpointGroupService *endpointgroup.Service
endpointService *endpoint.Service
endpointRelationService *endpointrelation.Service
extensionService *extension.Service
feat(intel): Enable OpenAMT and FDO capabilities (#6212) * feat(openamt): add AMT Devices information in Environments view [INT-8] (#6169) * feat(openamt): add AMT Devices Ouf of Band Managamenet actions [INT-9] (#6171) * feat(openamt): add AMT Devices KVM Connection [INT-10] (#6179) * feat(openamt): Enhance the Environments MX to activate OpenAMT on compatible environments [INT-7] (#6196) * feat(openamt): Enable KVM by default [INT-25] (#6228) * feat(fdo): implement the FDO configuration settings INT-19 (#6238) feat(fdo): implement the FDO configuration settings INT-19 * feat(fdo): implement Owner client INT-17 (#6231) feat(fdo): implement Owner client INT-17 * feat(openamt): hide wireless config in OpenAMT form (#6250) * feat(openamt): Increase OpenAMT timeouts [INT-30] (#6253) * feat(openamt): Disable the ability to use KVM and OOB actions on a MPS disconnected device [INT-36] (#6254) * feat(fdo): add import device UI [INT-20] (#6240) feat(fdo): add import device UI INT-20 * refactor(fdo): fix develop merge issues * feat(openamt): Do not fetch OpenAMT details for an unassociated Edge endpoint (#6273) * fix(intel): Fix switches params (#6282) * feat(openamt): preload existing AMT settings (#6283) * feat(openamt): Better UI/UX for AMT activation loading [INT-39] (#6290) * feat(openamt): Remove wireless config related code [INT-41] (#6291) * yarn install * feat(openamt): change kvm redirection for pop up, always enable features [INT-37] (#6292) * feat(openamt): change kvm redirection for pop up, always enable features [INT-37] (#6293) * feat(openmt): use .ts services with axios for OpenAMT (#6312) * Minor code cleanup. * fix(fdo): move the FDO client code to the hostmanagement folder INT-44 (#6345) * refactor(intel): Add Edge Compute Settings view (#6351) * feat(fdo): add FDO profiles INT-22 (#6363) feat(fdo): add FDO profiles INT-22 * fix(fdo): fix incorrect profile URL INT-45 (#6377) * fixed husky version * fix go.mod with go mod tidy * feat(edge): migrate OpenAMT devices views to Edge Devices [EE-2322] (#6373) * feat(intel): OpenAMT UI/UX adjustments (#6394) * only allow edge agent as edge device * show all edge agent environments on Edge Devices view * feat(fdo): add the ability to import multiple ownership vouchers at once EE-2324 (#6395) * fix(edge): settings edge compute alert (#6402) * remove pagination, add useMemo for devices result array (#6409) * feat(edge): minor Edge Devices (AMT) UI fixes (#6410) * chore(eslint): fix versions * chore(app): reformat codebase * change add edge agent modal behaviour, fix yarn.lock * fix use pagination * remove extractedTranslations folder * feat(edge): add FDO Profiles Datatable [EE-2406] (#6415) * feat(edge): add KVM workaround tooltip (#6441) * feat(edge): Add default FDO profile (#6450) * feat(edge): add settings to disable trust on first connect and enforce Edge ID INT-1 EE-2410 (#6429) Co-authored-by: andres-portainer <91705312+andres-portainer@users.noreply.github.com> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: andres-portainer <andres-portainer@users.noreply.github.com> Co-authored-by: Chaim Lev-Ari <chiptus@gmail.com>
3 years ago
fdoProfilesService *fdoprofile.Service
feat(edge-compute): add support for Edge stacks (#3827) * feat(api): introduce Edge group API (#3639) * feat(edge-groups): add object definition and service definition * feat(edge-groups): implement bolt layer * feat(edge-groups): bind service to server * feat(edge-group): add edge-group create http handler * feat(edge-groups): add list method to edge group handler * feat(edge-group): add inspect http handler * feat(edge-groups): add delete edge-group handler * feat(edge-groups): add update group handler * style(db): order by alphabetical order * fix(edge-groups): rewrite http error messages Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(main): order by alphabetical order * refactor(edge-group): relocate fetch group * fix(edge-group): reset tagids/endpoints if dynamic * refactor(server): order by alphabetical order * refactor(server): order by alphabetical order Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * Introduce a new setting to enable Edge compute features (#3654) * feat(edge-compute): add edge compute setting * feat(edge-compute): add edge compute group to sidebar * fix(settings): rename settings form group * fix(settings): align form control * Edge group associated endpoints (#3659) * chore(version): bump version number * chore(version): bump version number * feat(endpoints): filter by endpoint type (#3646) * refactor(tags): migrate tags to have association objects * 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> * refactor(tags): create tag association when creating tag * refactor(tags): delete tag association when deleting tag * refactor(db): handle error in tag association create * feat(endpoint-group): update tag assoc when creating endpoint group * feat(endpoint-group): update tag association when updating group * feat(endpoint-groups): remove group from tag associations * feat(endpoints): associate endpoint with tag on create * feat(endpoints): edit tag association when updating endpoint * fix(tags): fix merge problems * refactor(tags): remove tag association resource * fix(db): use regular tags map * style(tags): reorder props and imports * refactor(endpoint-groups): replace tag-association with tag * feat(edge-group): get associated endpoints when fetching * refactor(tags): refactor algo to update endpoint and group tags * refactor(edge-group): rename variable * refactor(tags): move calc of tags to remove to global function * fix(tags): update tag after adding association Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-groups): associate groups only with edge endpoints (#3667) * fix(edge-groups): check endpoint type when adding to edge-group * fix(edge-groups): return only edge endpoints for dynamic groups * fix(edge-compute): load edge compute setting on public setting (#3665) * Edge group list (#3644) * feat(edge-groups): add edge module * feat(edge-groups): add edge-group service * feat(edge-group): add groups list view * feat(edge-groups): add link to groups in the sidebar * feat(edge-group): show endpoints count and group type * feat(edge-group): enable removal of edge groups * refactor(edge-groups): replace datatable controller with class * refactor(edge-groups): replace function with class * fix(edge-groups): sort items by endpoints count and group type * refactor(edge-groups): use generic datatable-header component * feat(app): add trace for ui router * fix(edge-compute): add ng injection to onEnter guard * fix(edge-compute): add ng injection to onEnter guard * style(edge-compute): remove space * refactor(edge-compute): import angular * fix(app): remove ui router trace * refactor(product): revert app.js * fix(edge-compute): remove admin guard from edge routes * fix(edge-groups): change label of empty datatable Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(edge-groups): rename service * fix(edge-groups): replace icon in sidebar Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(edge-groups): remove datatable controller * refactor(edge-groups): move datatable icon to binding * refactor(edge-groups): use vanilla datatable header * refactor(datatable): remove datatable header Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(edge): rename edge group to Edge group * feat(edge-groups): edge group creation view (#3671) * feat(edge-groups): add create group view * feat(edge-groups): allow to choose group type * feat(edge-groups): implement create service handler * feat(edge-group): filter by edge endpoints * refactor(edge-groups): rename to camel case * refactor(edge-groups): replace controller with class * feat(endpoints): filter endpoints by type * refactor(edge-groups): remove comments and unneccesary async keyword * refactor(edge-group): use $async service * fix(edge-groups): replace view title Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-groups): change icon Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-groups): change icon Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(edge-groups): remove obsolete function * feat(edge-groups): add empty list messages * feat(edge-group): add description to group types * refactor(edge-groups): add finally block * feat(endpoints): search server in multi-endpoint-selector Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-group) edit view (#3672) * feat(edge-groups): add edit group view * refactor(edge-group): replace edit controller with class * refactor(edge-groups): remove async keyword * refactor(edge-groups): use $async service * refactor(edge-group): remove unnecessary functions * fix(endpoints): group by groups in endpoint-selector * feat(edge-groups): minor UI update * fix(edge-groups): provide defaults for edge group (#3682) * feat(edge-stacks): add basic views and sidebar link (#3689) * feat(edge-stacks): add mock routes * feat(edge-stacks): add link to stacks on sidebar * feat(edge-stacks): add edge stacks view * feat(edge-stacks): add create view * feat(edge-stacks): add edit view * fix(edge-stacks): use class in controller * feat(edge-stacks): add edge-stacks api (#3688) * feat(edge-stack): add edge stack types * feat(edge-stacks): add edge stack service interface * feat(edge-stacks): implement store * feat(edge-stacks): bind service to datastore * feat(edge-stacks): bind service to server * feat(edge-stack): create basic api * feat(edge-stack): create stack api * feat(edge-stacks): update api * refacotor(edge-stack): rename files * feat(edge-stack): update endpoint status * style(edge-stacks): remove comments * feat(edge-stacks): use edge stacks folder for files * fix(edge-stacks): replace bucket name Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-stacks): replace unmarshal function Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-stacks): replace edge stacks path Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * chore(git): merge develop to edge compute (#3692) * feat(support): make support type dynamic (#3621) * chore(version): bump version number * chore(version): bump version number * feat(endpoints): filter by endpoint type (#3646) * chore(assets): double UI image resolutions for HiDPI displays (#3648) Fixes #3069 Prevents users seeing blurry logos and other images when using a hidpi display (like scaled 4k, or a Retina display). These images have been recreated manually with 2x the original resolution but should resemble the originals as much as possible. They have also been run through pngcrush for compression. * 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 * 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> * chore(yarn): change start:client to start webpack dev server (#3595) * chore(yarn): change start:client to start webpack dev server * Update package.json Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * 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 * chore(yarn): add start:client script back (#3691) * 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 Co-authored-by: itsconquest <william.conquest@portainer.io> Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> Co-authored-by: Ben Brooks <ben@bbrks.me> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * Chore merge develop to edge compute (#3702) * feat(support): make support type dynamic (#3621) * chore(version): bump version number * chore(version): bump version number * feat(endpoints): filter by endpoint type (#3646) * chore(assets): double UI image resolutions for HiDPI displays (#3648) Fixes #3069 Prevents users seeing blurry logos and other images when using a hidpi display (like scaled 4k, or a Retina display). These images have been recreated manually with 2x the original resolution but should resemble the originals as much as possible. They have also been run through pngcrush for compression. * 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 * 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> * chore(yarn): change start:client to start webpack dev server (#3595) * chore(yarn): change start:client to start webpack dev server * Update package.json Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * 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 * chore(yarn): add start:client script back (#3691) * 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 * refactor(project): sort portainer types and interface definitions (#3694) * refactor(portainer): sort types * style(portainer): add comment about role service * refactor(portainer): sort interface types * refactor(portainer): sort enums * Update README.md * Update README.md * Update README.md * 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> * chore(prettier): run format on client codebase Co-authored-by: itsconquest <william.conquest@portainer.io> Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> Co-authored-by: Ben Brooks <ben@bbrks.me> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Neil Cresswell <neil@cresswell.net.nz> * feat(edge-stacks): create basic edge stack service (#3704) Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-groups): Provide a switch to use AND or OR for tags (#3695) * feat(edge-groups): add switch to form * feat(project): add property to EdgeGroup * feat(edge-groups): save mustHaveAllTags * feat(edge-groups): fetch associated endpoints (AND and OR) * feat(edge-groups): add AND selector * feat(edge-groups): default to AND * fix(edge-groups): rewrite selector options Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(endpoints): move margin to schedule form * fix(edge-groups): move the selector to top of group * refactor(edge-groups): replace partialMatch property Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-stacks): add Edge stack creation view (#3705) * feat(edge-stacks): basic creation view * feat(edge-stacks): add group selector * feat(edge-stack): create edge stack * fix(code-editor): apply digest cycle after editor is changed * style(project): reformat constants file * feat(edge-stacks): add a note about missing edge groups * fix(edge-stacks): add groups when creating stack from file * feat(edge-groups): add associated endpoints table (#3710) * feat(edge-groups): load associated endpoints * feat(endpoints): add option to filter endpoint by partial match tags * feat(edge-groups): query endpoints by PartialMatch * feat(edge-groups): reload endpoints when form changes * feat(edge-groups): remove columns * feat(edge-group): remove url column * refactor(edge-group): remove props * feat(edge-stacks): add list view (#3713) * feat(edge-stacks): basic datatable * feat(edge-stacks): remove stack * refactor(edge-stacks): convert to class * refactor(edge-stacks): replace id with stackId * feat(edge-stacks) edit edge stack view (#3716) * feat(edge-stack): load file content * feat(edge-stack): edit view * feat(edge-stack): enable update stack * refactor(edge-stacks): move form to component * feat(edge-stacks): add endpoints status * feat(edge-stacks): minor UI update Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> * feat(edge-groups) prevent deletion of edge group used by an edge stack (#3722) * feat(edge-groups): show if group belonges to edge stack * feat(edge-group): protect deletion of used edge group * feat(edge-groups): diable selection of used group * feat(edge-groups): add inuse tag (#3739) * feat(edge-groups): add inuse tag * Update app/edge/components/groups-datatable/groupsDatatable.html Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-stack): update stack version when stack file is changed (#3746) * feat(edge-stack): update version when stack file is changed * refactor(edge-stacks): move update of version to clientside * feat(edge-groups): replace Edge group endpoint selector (#3738) * feat(edge-groups): replace selector * feat(edge-group): add selector in edit form * feat(edge-groups): show tags in endpoint selector * feat(edge-groups): show the endpoint group name * fix(edge-group): remove element from associated endpoints * feat(edge-groups): add group column * feat(edge-groups): move endpoints to other column * fix(groups): disable sort * refactor(endpoints): toggle backend pagination as a property * fix(endpoints): show group name in group-association-table * feat(endpoints): truncate table columns * fix(endpoints): update group association table colspan * fix(endpoint-groups): show dash when no tags Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> * feat(edge-stacks): add api for edge to query stack config (#3748) * refactor(http): move edge validation to bouncer * feat(edge-stacks): add api for edge to query stack config * style(edge-stack): remove parentheses * Update api/http/security/bouncer.go * refactor(edge-stacks): move config inspect to endpoints handler * refactor(endpoints): move stack inspect to edge handler * style(security): fix typo Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(endpoints): rename file Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-groups): add dynamic group endpoints table (#3780) * fix(edge-stacks): update version when updating stack files (#3778) * feat(edgestacks): change status permission to edge enpoints * feat(edge-compute): add stack info to edge status inspect (#3764) * feat(edge-compute): create helper functions * feat(endpoints): add relation object and service * feat(db): create endpoint relation migration * feat(endpoints): create relation when creating endpoint * feat(endpoints): update relation when updating endpoint * feat(endpoints): delete relation when deleting endpoint * feat(endpoint): add stack status to endpoint_status * feat(edge-stacks): connect new edge stack to endpoint * refactor(edgestack): return errors.New * refactor(edgestacks): return error * refactor(edgegroup): endpoint can be related only if edge endpoint * feat(endpoints): update relation only when tags or groups were changd * refactor(tags): change tags functions to set functions * refactor(edgestack): return a list of endpoints for a list of edgegroups * feat(edgestacks): update relation when updating stack * feat(edgestacks): remove relations when deleting edge stack * feat(edgegroup): update related endpoints * feat(endpoint-group): update endpoints relations on create * feat(endpointgroup): add relatd stacks to endpoint when added to group * feat(endpoint-groups): update relation when group is changed * feat(endpointgroup): when deleting group, update its endpoints relations * feat(tags): update related endpoints when deleting tag * refactor(edge-compute): use pointers * refactor(endpointgroup): handle unassociated endpoint * fix(edgestack): show correct stack status * fix(endpoint): remove deleted endpoint from related tags * feat(edge-stacks): change acknowledged status color to blue (#3810) * feat(edge-compute): provide stack name to edge endpoint (#3809) * feat(edge-groups): when no tags selected show empty list of endpoints (#3811) * feat(edge-groups): when no tags selected show empty list of endpoints * fix(edge-group): change empty associated endpoint text * fix(edge-compute): add missing relations updates (#3817) * fix(endpoint): remove deleted endpoint from edge group * fix(tags): remove deleted tag from edge group * fix(endpoint): remove deleted endpoint from edge stack * fix(edge-groups): remove clearing of edgeGroup fields * fix(edge-groups): show dynamic edge groups without tags * fix(edge-compute): use sequential delete in resources (#3818) * fix(endpoints): delete endpoints on by one * fix(tags): remove tags one by one * fix(groups): remove endpoint groups one by one * fix(edge-stacks): remove stack one by one * fix(edge-groups): remove edge group one by one * fix(edge-stacks): add link to root in breadcrumbs * style(edge): add empty line after errors * refactor(tags): remove old function * refactor(endpoints): revert changes to multi-endpoint-selector * feat(edge-stacks): support Edge stack templates (#3812) * feat(edge-compute): fetch templates from url * feat(edge-stacks): fetch edge templates * feat(edge-stacks): choose template and save * feat(edge-stacks): add placeholder to templates select * feat(edge-templates): show info * fix(edge-stacks): fix typo * feat(edge-templates): replace template url * feat(edge-compute): use custom url if available * fix(edge-stacks): show error message when failing * feat(edge-compute): show description in template * feat(edge-templates): change access to route * style(edge-compute): change EdgeTemplatesURL description Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> Co-authored-by: itsconquest <william.conquest@portainer.io> Co-authored-by: Ben Brooks <ben@bbrks.me> Co-authored-by: Neil Cresswell <neil@cresswell.net.nz>
5 years ago
registryService *registry.Service
resourceControlService *resourcecontrol.Service
roleService *role.Service
scheduleService *schedule.Service
settingsService *settings.Service
snapshotService *snapshot.Service
feat(edge-compute): add support for Edge stacks (#3827) * feat(api): introduce Edge group API (#3639) * feat(edge-groups): add object definition and service definition * feat(edge-groups): implement bolt layer * feat(edge-groups): bind service to server * feat(edge-group): add edge-group create http handler * feat(edge-groups): add list method to edge group handler * feat(edge-group): add inspect http handler * feat(edge-groups): add delete edge-group handler * feat(edge-groups): add update group handler * style(db): order by alphabetical order * fix(edge-groups): rewrite http error messages Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(main): order by alphabetical order * refactor(edge-group): relocate fetch group * fix(edge-group): reset tagids/endpoints if dynamic * refactor(server): order by alphabetical order * refactor(server): order by alphabetical order Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * Introduce a new setting to enable Edge compute features (#3654) * feat(edge-compute): add edge compute setting * feat(edge-compute): add edge compute group to sidebar * fix(settings): rename settings form group * fix(settings): align form control * Edge group associated endpoints (#3659) * chore(version): bump version number * chore(version): bump version number * feat(endpoints): filter by endpoint type (#3646) * refactor(tags): migrate tags to have association objects * 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> * refactor(tags): create tag association when creating tag * refactor(tags): delete tag association when deleting tag * refactor(db): handle error in tag association create * feat(endpoint-group): update tag assoc when creating endpoint group * feat(endpoint-group): update tag association when updating group * feat(endpoint-groups): remove group from tag associations * feat(endpoints): associate endpoint with tag on create * feat(endpoints): edit tag association when updating endpoint * fix(tags): fix merge problems * refactor(tags): remove tag association resource * fix(db): use regular tags map * style(tags): reorder props and imports * refactor(endpoint-groups): replace tag-association with tag * feat(edge-group): get associated endpoints when fetching * refactor(tags): refactor algo to update endpoint and group tags * refactor(edge-group): rename variable * refactor(tags): move calc of tags to remove to global function * fix(tags): update tag after adding association Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-groups): associate groups only with edge endpoints (#3667) * fix(edge-groups): check endpoint type when adding to edge-group * fix(edge-groups): return only edge endpoints for dynamic groups * fix(edge-compute): load edge compute setting on public setting (#3665) * Edge group list (#3644) * feat(edge-groups): add edge module * feat(edge-groups): add edge-group service * feat(edge-group): add groups list view * feat(edge-groups): add link to groups in the sidebar * feat(edge-group): show endpoints count and group type * feat(edge-group): enable removal of edge groups * refactor(edge-groups): replace datatable controller with class * refactor(edge-groups): replace function with class * fix(edge-groups): sort items by endpoints count and group type * refactor(edge-groups): use generic datatable-header component * feat(app): add trace for ui router * fix(edge-compute): add ng injection to onEnter guard * fix(edge-compute): add ng injection to onEnter guard * style(edge-compute): remove space * refactor(edge-compute): import angular * fix(app): remove ui router trace * refactor(product): revert app.js * fix(edge-compute): remove admin guard from edge routes * fix(edge-groups): change label of empty datatable Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(edge-groups): rename service * fix(edge-groups): replace icon in sidebar Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(edge-groups): remove datatable controller * refactor(edge-groups): move datatable icon to binding * refactor(edge-groups): use vanilla datatable header * refactor(datatable): remove datatable header Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(edge): rename edge group to Edge group * feat(edge-groups): edge group creation view (#3671) * feat(edge-groups): add create group view * feat(edge-groups): allow to choose group type * feat(edge-groups): implement create service handler * feat(edge-group): filter by edge endpoints * refactor(edge-groups): rename to camel case * refactor(edge-groups): replace controller with class * feat(endpoints): filter endpoints by type * refactor(edge-groups): remove comments and unneccesary async keyword * refactor(edge-group): use $async service * fix(edge-groups): replace view title Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-groups): change icon Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-groups): change icon Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(edge-groups): remove obsolete function * feat(edge-groups): add empty list messages * feat(edge-group): add description to group types * refactor(edge-groups): add finally block * feat(endpoints): search server in multi-endpoint-selector Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-group) edit view (#3672) * feat(edge-groups): add edit group view * refactor(edge-group): replace edit controller with class * refactor(edge-groups): remove async keyword * refactor(edge-groups): use $async service * refactor(edge-group): remove unnecessary functions * fix(endpoints): group by groups in endpoint-selector * feat(edge-groups): minor UI update * fix(edge-groups): provide defaults for edge group (#3682) * feat(edge-stacks): add basic views and sidebar link (#3689) * feat(edge-stacks): add mock routes * feat(edge-stacks): add link to stacks on sidebar * feat(edge-stacks): add edge stacks view * feat(edge-stacks): add create view * feat(edge-stacks): add edit view * fix(edge-stacks): use class in controller * feat(edge-stacks): add edge-stacks api (#3688) * feat(edge-stack): add edge stack types * feat(edge-stacks): add edge stack service interface * feat(edge-stacks): implement store * feat(edge-stacks): bind service to datastore * feat(edge-stacks): bind service to server * feat(edge-stack): create basic api * feat(edge-stack): create stack api * feat(edge-stacks): update api * refacotor(edge-stack): rename files * feat(edge-stack): update endpoint status * style(edge-stacks): remove comments * feat(edge-stacks): use edge stacks folder for files * fix(edge-stacks): replace bucket name Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-stacks): replace unmarshal function Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-stacks): replace edge stacks path Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * chore(git): merge develop to edge compute (#3692) * feat(support): make support type dynamic (#3621) * chore(version): bump version number * chore(version): bump version number * feat(endpoints): filter by endpoint type (#3646) * chore(assets): double UI image resolutions for HiDPI displays (#3648) Fixes #3069 Prevents users seeing blurry logos and other images when using a hidpi display (like scaled 4k, or a Retina display). These images have been recreated manually with 2x the original resolution but should resemble the originals as much as possible. They have also been run through pngcrush for compression. * 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 * 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> * chore(yarn): change start:client to start webpack dev server (#3595) * chore(yarn): change start:client to start webpack dev server * Update package.json Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * 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 * chore(yarn): add start:client script back (#3691) * 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 Co-authored-by: itsconquest <william.conquest@portainer.io> Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> Co-authored-by: Ben Brooks <ben@bbrks.me> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * Chore merge develop to edge compute (#3702) * feat(support): make support type dynamic (#3621) * chore(version): bump version number * chore(version): bump version number * feat(endpoints): filter by endpoint type (#3646) * chore(assets): double UI image resolutions for HiDPI displays (#3648) Fixes #3069 Prevents users seeing blurry logos and other images when using a hidpi display (like scaled 4k, or a Retina display). These images have been recreated manually with 2x the original resolution but should resemble the originals as much as possible. They have also been run through pngcrush for compression. * 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 * 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> * chore(yarn): change start:client to start webpack dev server (#3595) * chore(yarn): change start:client to start webpack dev server * Update package.json Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * 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 * chore(yarn): add start:client script back (#3691) * 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 * refactor(project): sort portainer types and interface definitions (#3694) * refactor(portainer): sort types * style(portainer): add comment about role service * refactor(portainer): sort interface types * refactor(portainer): sort enums * Update README.md * Update README.md * Update README.md * 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> * chore(prettier): run format on client codebase Co-authored-by: itsconquest <william.conquest@portainer.io> Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> Co-authored-by: Ben Brooks <ben@bbrks.me> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Neil Cresswell <neil@cresswell.net.nz> * feat(edge-stacks): create basic edge stack service (#3704) Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-groups): Provide a switch to use AND or OR for tags (#3695) * feat(edge-groups): add switch to form * feat(project): add property to EdgeGroup * feat(edge-groups): save mustHaveAllTags * feat(edge-groups): fetch associated endpoints (AND and OR) * feat(edge-groups): add AND selector * feat(edge-groups): default to AND * fix(edge-groups): rewrite selector options Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(endpoints): move margin to schedule form * fix(edge-groups): move the selector to top of group * refactor(edge-groups): replace partialMatch property Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-stacks): add Edge stack creation view (#3705) * feat(edge-stacks): basic creation view * feat(edge-stacks): add group selector * feat(edge-stack): create edge stack * fix(code-editor): apply digest cycle after editor is changed * style(project): reformat constants file * feat(edge-stacks): add a note about missing edge groups * fix(edge-stacks): add groups when creating stack from file * feat(edge-groups): add associated endpoints table (#3710) * feat(edge-groups): load associated endpoints * feat(endpoints): add option to filter endpoint by partial match tags * feat(edge-groups): query endpoints by PartialMatch * feat(edge-groups): reload endpoints when form changes * feat(edge-groups): remove columns * feat(edge-group): remove url column * refactor(edge-group): remove props * feat(edge-stacks): add list view (#3713) * feat(edge-stacks): basic datatable * feat(edge-stacks): remove stack * refactor(edge-stacks): convert to class * refactor(edge-stacks): replace id with stackId * feat(edge-stacks) edit edge stack view (#3716) * feat(edge-stack): load file content * feat(edge-stack): edit view * feat(edge-stack): enable update stack * refactor(edge-stacks): move form to component * feat(edge-stacks): add endpoints status * feat(edge-stacks): minor UI update Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> * feat(edge-groups) prevent deletion of edge group used by an edge stack (#3722) * feat(edge-groups): show if group belonges to edge stack * feat(edge-group): protect deletion of used edge group * feat(edge-groups): diable selection of used group * feat(edge-groups): add inuse tag (#3739) * feat(edge-groups): add inuse tag * Update app/edge/components/groups-datatable/groupsDatatable.html Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-stack): update stack version when stack file is changed (#3746) * feat(edge-stack): update version when stack file is changed * refactor(edge-stacks): move update of version to clientside * feat(edge-groups): replace Edge group endpoint selector (#3738) * feat(edge-groups): replace selector * feat(edge-group): add selector in edit form * feat(edge-groups): show tags in endpoint selector * feat(edge-groups): show the endpoint group name * fix(edge-group): remove element from associated endpoints * feat(edge-groups): add group column * feat(edge-groups): move endpoints to other column * fix(groups): disable sort * refactor(endpoints): toggle backend pagination as a property * fix(endpoints): show group name in group-association-table * feat(endpoints): truncate table columns * fix(endpoints): update group association table colspan * fix(endpoint-groups): show dash when no tags Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> * feat(edge-stacks): add api for edge to query stack config (#3748) * refactor(http): move edge validation to bouncer * feat(edge-stacks): add api for edge to query stack config * style(edge-stack): remove parentheses * Update api/http/security/bouncer.go * refactor(edge-stacks): move config inspect to endpoints handler * refactor(endpoints): move stack inspect to edge handler * style(security): fix typo Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(endpoints): rename file Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-groups): add dynamic group endpoints table (#3780) * fix(edge-stacks): update version when updating stack files (#3778) * feat(edgestacks): change status permission to edge enpoints * feat(edge-compute): add stack info to edge status inspect (#3764) * feat(edge-compute): create helper functions * feat(endpoints): add relation object and service * feat(db): create endpoint relation migration * feat(endpoints): create relation when creating endpoint * feat(endpoints): update relation when updating endpoint * feat(endpoints): delete relation when deleting endpoint * feat(endpoint): add stack status to endpoint_status * feat(edge-stacks): connect new edge stack to endpoint * refactor(edgestack): return errors.New * refactor(edgestacks): return error * refactor(edgegroup): endpoint can be related only if edge endpoint * feat(endpoints): update relation only when tags or groups were changd * refactor(tags): change tags functions to set functions * refactor(edgestack): return a list of endpoints for a list of edgegroups * feat(edgestacks): update relation when updating stack * feat(edgestacks): remove relations when deleting edge stack * feat(edgegroup): update related endpoints * feat(endpoint-group): update endpoints relations on create * feat(endpointgroup): add relatd stacks to endpoint when added to group * feat(endpoint-groups): update relation when group is changed * feat(endpointgroup): when deleting group, update its endpoints relations * feat(tags): update related endpoints when deleting tag * refactor(edge-compute): use pointers * refactor(endpointgroup): handle unassociated endpoint * fix(edgestack): show correct stack status * fix(endpoint): remove deleted endpoint from related tags * feat(edge-stacks): change acknowledged status color to blue (#3810) * feat(edge-compute): provide stack name to edge endpoint (#3809) * feat(edge-groups): when no tags selected show empty list of endpoints (#3811) * feat(edge-groups): when no tags selected show empty list of endpoints * fix(edge-group): change empty associated endpoint text * fix(edge-compute): add missing relations updates (#3817) * fix(endpoint): remove deleted endpoint from edge group * fix(tags): remove deleted tag from edge group * fix(endpoint): remove deleted endpoint from edge stack * fix(edge-groups): remove clearing of edgeGroup fields * fix(edge-groups): show dynamic edge groups without tags * fix(edge-compute): use sequential delete in resources (#3818) * fix(endpoints): delete endpoints on by one * fix(tags): remove tags one by one * fix(groups): remove endpoint groups one by one * fix(edge-stacks): remove stack one by one * fix(edge-groups): remove edge group one by one * fix(edge-stacks): add link to root in breadcrumbs * style(edge): add empty line after errors * refactor(tags): remove old function * refactor(endpoints): revert changes to multi-endpoint-selector * feat(edge-stacks): support Edge stack templates (#3812) * feat(edge-compute): fetch templates from url * feat(edge-stacks): fetch edge templates * feat(edge-stacks): choose template and save * feat(edge-stacks): add placeholder to templates select * feat(edge-templates): show info * fix(edge-stacks): fix typo * feat(edge-templates): replace template url * feat(edge-compute): use custom url if available * fix(edge-stacks): show error message when failing * feat(edge-compute): show description in template * feat(edge-templates): change access to route * style(edge-compute): change EdgeTemplatesURL description Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> Co-authored-by: itsconquest <william.conquest@portainer.io> Co-authored-by: Ben Brooks <ben@bbrks.me> Co-authored-by: Neil Cresswell <neil@cresswell.net.nz>
5 years ago
stackService *stack.Service
tagService *tag.Service
teamMembershipService *teammembership.Service
userService *user.Service
versionService *version.Service
fileService portainer.FileService
authorizationService *authorization.Service
feat(app): rework private registries and support private registries in kubernetes EE-30 (#5131) * feat(app): rework private registries and support private registries in kubernetes [EE-30] feat(api): backport private registries backend changes (#5072) * feat(api/bolt): backport bolt changes * feat(api/exec): backport exec changes * feat(api/http): backport http/handler/dockerhub changes * feat(api/http): backport http/handler/endpoints changes * feat(api/http): backport http/handler/registries changes * feat(api/http): backport http/handler/stacks changes * feat(api/http): backport http/handler changes * feat(api/http): backport http/proxy/factory/azure changes * feat(api/http): backport http/proxy/factory/docker changes * feat(api/http): backport http/proxy/factory/utils changes * feat(api/http): backport http/proxy/factory/kubernetes changes * feat(api/http): backport http/proxy/factory changes * feat(api/http): backport http/security changes * feat(api/http): backport http changes * feat(api/internal): backport internal changes * feat(api): backport api changes * feat(api/kubernetes): backport kubernetes changes * fix(api/http): changes on backend following backport feat(app): backport private registries frontend changes (#5056) * feat(app/docker): backport docker/components changes * feat(app/docker): backport docker/helpers changes * feat(app/docker): backport docker/views/container changes * feat(app/docker): backport docker/views/images changes * feat(app/docker): backport docker/views/registries changes * feat(app/docker): backport docker/views/services changes * feat(app/docker): backport docker changes * feat(app/kubernetes): backport kubernetes/components changes * feat(app/kubernetes): backport kubernetes/converters changes * feat(app/kubernetes): backport kubernetes/models changes * feat(app/kubernetes): backport kubernetes/registries changes * feat(app/kubernetes): backport kubernetes/services changes * feat(app/kubernetes): backport kubernetes/views/applications changes * feat(app/kubernetes): backport kubernetes/views/configurations changes * feat(app/kubernetes): backport kubernetes/views/configure changes * feat(app/kubernetes): backport kubernetes/views/resource-pools changes * feat(app/kubernetes): backport kubernetes/views changes * feat(app/portainer): backport portainer/components/accessManagement changes * feat(app/portainer): backport portainer/components/datatables changes * feat(app/portainer): backport portainer/components/forms changes * feat(app/portainer): backport portainer/components/registry-details changes * feat(app/portainer): backport portainer/models changes * feat(app/portainer): backport portainer/rest changes * feat(app/portainer): backport portainer/services changes * feat(app/portainer): backport portainer/views changes * feat(app/portainer): backport portainer changes * feat(app): backport app changes * config(project): gitignore + jsconfig changes gitignore all files under api/cmd/portainer but main.go and enable Code Editor autocomplete on import ... from '@/...' fix(app): fix pull rate limit checker fix(app/registries): sidebar menus and registry accesses users filtering fix(api): add missing kube client factory fix(kube): fetch dockerhub pull limits (#5133) fix(app): pre review fixes (#5142) * fix(app/registries): remove checkbox for endpointRegistries view * fix(endpoints): allow access to default namespace * fix(docker): fetch pull limits * fix(kube/ns): show selected registries for non admin Co-authored-by: Chaim Lev-Ari <chiptus@gmail.com> chore(webpack): ignore missing sourcemaps fix(registries): fetch registry config from url feat(kube/registries): ignore not found when deleting secret feat(db): move migration to db 31 fix(registries): fix bugs in PR EE-869 (#5169) * fix(registries): hide role * fix(endpoints): set empty access policy to edge endpoint * fix(registry): remove double arguments * fix(admin): ignore warning * feat(kube/configurations): tag registry secrets (#5157) * feat(kube/configurations): tag registry secrets * feat(kube/secrets): show registry secrets for admins * fix(registries): move dockerhub to beginning * refactor(registries): use endpoint scoped registries feat(registries): filter by namespace if supplied feat(access-managment): filter users for registry (#5191) * refactor(access-manage): move users selector to component * feat(access-managment): filter users for registry refactor(registries): sync code with CE (#5200) * refactor(registry): add inspect handler under endpoints * refactor(endpoint): sync endpoint_registries_list * refactor(endpoints): sync registry_access * fix(db): rename migration functions * fix(registries): show accesses for admin * fix(kube): set token on transport * refactor(kube): move secret help to bottom * fix(kuberentes): remove shouldLog parameter * style(auth): add description of security.IsAdmin * feat(security): allow admin access to registry * feat(edge): connect to edge endpoint when creating client * style(portainer): change deprecation version * refactor(sidebar): hide manage * refactor(containers): revert changes * style(container): remove whitespace * fix(endpoint): add handler to registy on endpointService * refactor(image): use endpointService.registries * fix(kueb/namespaces): rename resource pool to namespace * fix(kube/namespace): move selected registries * fix(api/registries): hide accesses on registry creation Co-authored-by: LP B <xAt0mZ@users.noreply.github.com> refactor(api): remove code duplication after rebase fix(app/registries): replace last registry api usage by endpoint registry api fix(api/endpoints): update registry access policies on endpoint deletion (#5226) [EE-1027] fix(db): update db version * fix(dockerhub): fetch rate limits * fix(registry/tests): supply restricred context * fix(registries): show proget registry only when selected * fix(registry): create dockerhub registry * feat(db): move migrations to db 32 Co-authored-by: Chaim Lev-Ari <chiptus@gmail.com>
3 years ago
dockerhubService *dockerhub.Service
edgeStackService *edgestack.Service
edgeJobService *edgejob.Service
TunnelServerService *tunnelserver.Service
}
chore(store) EE-1981: Refactor/store/error checking, and other refactoring (#6173) * use the Store interface IsErrObjectNotFound() to avoid revealing internal errors Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * what happens when you extract the datastore interfaces into their own package Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * Start renaming Storage methods Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the boltdb specific code from the Portainer storage code (example, the others need the same) Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more extract bolt.Tx from datastore code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * minimise imports by putting moving the struct definition into the file that needs the Service imports Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more extraction of boltdb.Tx Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the use of bucket.SetSequence Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * almost done - just endpoint.Synchonise :/ Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * so, endpoint.Synchonize looks hard, but i can't find where we use it, so 'delete first refactoring' Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix test compile errors Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * test compile fixes after rebase Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix a mis-remembering I had wrt deserialisation - last time i used AnyData - jsoniter's bindTo looks interesting for the same reason Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * set us up to make the connection an interface Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * make the db connection a datastore interface, and separate out our datastore services from the bolt ones Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * rename methods to something less oltdb internals specific Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * these errors are not boltdb secific Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * start using the db-backend factory method too Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * export boltdb raw in case we can't export from the service layer Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add a raw export from boltdb to yaml for broken db's, and an export services to yaml in backup Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add the version info by hand for now Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * actually, the export from services can be fully typed - its the import that needs to do more work Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * redo raw export, and make import capable of using it Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add DockerHub Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * migration from anything older than v1.21.0 has been broken for quite a while, deleting the un-tested code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix go test ./... again Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * my goland wasn't setup to gofmt Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * move the two extremely dubious migration tests down into store, so they can use the test store code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * the migrator is now free of boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * reverse goland overzealous replcement of internal with boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more undo over-zealous goland internal->boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * yay, now bolt is only mentioned inside the api/database/ dir Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * and this might be the last of the boltdb references? Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add todo Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the store code into a separate module too Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * don't need the fileService in boltdb anymore Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * use IsErrObjectNotFound() Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * use a string to select what database backend we use Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * make isNew store an ephemeral bool that doesn't stay true after we've initialised it Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * move the import.json wip to a separate file so its more obvious - we'll be using it for testing, emergency fixups, and in the next part of the store work, when we improve migrations and data model lifecycles Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * undo vscode formatting html Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix app templates symbol (#6221) * feat(webhook) EE-2125 send registry auth haeder when update swarms service via webhook (#6220) * feat(webhook) EE-2125 add some helpers to registry utils * feat(webhook) EE-2125 persist registryID when creating a webhook * feat(webhook) EE-2125 send registry auth header when executing a webhook * feat(webhook) EE-2125 send registryID to backend when creating a service with webhook * feat(webhook) EE-2125 use the initial registry ID to create webhook on editing service screen * feat(webhook) EE-2125 update webhook when update registry * feat(webhook) EE-2125 add endpoint of update webhook * feat(webhook) EE-2125 code cleanup * feat(webhook) EE-2125 fix a typo * feat(webhook) EE-2125 fix circle import issue with unit test Co-authored-by: Simon Meng <simon.meng@portainer.io> * fix(kubeconfig): show kubeconfig download button for non admin users [EE-2123] (#6204) Co-authored-by: Simon Meng <simon.meng@portainer.io> * fix data-cy for k8s cluster menu (#6226) LGTM * feat(stack): make stack created from app template editable EE-1941 (#6104) feat(stack): make stack from app template editable * fix(container):disable Duplicate/Edit button when the container is portainer (#6223) * fix/ee-1909/show-pull-image-error (#6195) Co-authored-by: sunportainer <ericsun@SG1.local> * feat(cy): add data-cy to helm install button (#6241) * feat(cy): add data-cy to add registry button (#6242) * refactor(app): convert root folder files to es6 (#4159) * refactor(app): duplicate constants as es6 exports (#4158) * fix(docker): provide workaround to save network name variable (#6080) * fix/EE-1862/unable-to-stop-or-remove-stack workaround for var without default value in yaml file * fix/EE-1862/unable-to-stop-or-remove-stack check yaml file * fixed func and var names * wrapper error and used bool for stringset * UT case for createNetworkEnvFile * UT case for %s=%s * powerful StringSet * wrapper error for extract network name * wrapper all the return err * store more env * put to env file * make default value None * feat: gzip static resources (#6258) * fix(ssl)//handle --sslcert and --sslkey ee-2106 (#6203) * fix/ee-2106/handle-sslcert-sslkey Co-authored-by: sunportainer <ericsun@SG1.local> * fix(server):support disable https only ee-2068 (#6232) * fix/ee-2068/disable-forcely-https * feat(store): implement store tests EE-2112 (#6224) * add store tests * add some more tests * Update missing helm user repo methods * remove redundant comments * add webhook export * update webhooks * use the Store interface IsErrObjectNotFound() to avoid revealing internal errors Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * what happens when you extract the datastore interfaces into their own package Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * Start renaming Storage methods Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the boltdb specific code from the Portainer storage code (example, the others need the same) Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more extract bolt.Tx from datastore code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * minimise imports by putting moving the struct definition into the file that needs the Service imports Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more extraction of boltdb.Tx Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the use of bucket.SetSequence Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * almost done - just endpoint.Synchonise :/ Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * so, endpoint.Synchonize looks hard, but i can't find where we use it, so 'delete first refactoring' Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix test compile errors Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * test compile fixes after rebase Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix a mis-remembering I had wrt deserialisation - last time i used AnyData - jsoniter's bindTo looks interesting for the same reason Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * set us up to make the connection an interface Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * make the db connection a datastore interface, and separate out our datastore services from the bolt ones Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * rename methods to something less oltdb internals specific Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * these errors are not boltdb secific Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * start using the db-backend factory method too Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * export boltdb raw in case we can't export from the service layer Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add a raw export from boltdb to yaml for broken db's, and an export services to yaml in backup Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add the version info by hand for now Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * actually, the export from services can be fully typed - its the import that needs to do more work Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * redo raw export, and make import capable of using it Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add DockerHub Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * migration from anything older than v1.21.0 has been broken for quite a while, deleting the un-tested code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix go test ./... again Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * my goland wasn't setup to gofmt Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * move the two extremely dubious migration tests down into store, so they can use the test store code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * the migrator is now free of boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * reverse goland overzealous replcement of internal with boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more undo over-zealous goland internal->boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * yay, now bolt is only mentioned inside the api/database/ dir Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * and this might be the last of the boltdb references? Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add todo Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the store code into a separate module too Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * don't need the fileService in boltdb anymore Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * use IsErrObjectNotFound() Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * use a string to select what database backend we use Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * make isNew store an ephemeral bool that doesn't stay true after we've initialised it Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * move the import.json wip to a separate file so its more obvious - we'll be using it for testing, emergency fixups, and in the next part of the store work, when we improve migrations and data model lifecycles Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * undo vscode formatting html Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * Update missing helm user repo methods * feat(store): implement store tests EE-2112 (#6224) * add store tests * add some more tests * remove redundant comments * add webhook export * update webhooks * fix build issues after rebasing * move migratorparams * remove unneeded integer type conversions * disable the db import/export for now Co-authored-by: Richard Wei <54336863+WaysonWei@users.noreply.github.com> Co-authored-by: cong meng <mcpacino@gmail.com> Co-authored-by: Simon Meng <simon.meng@portainer.io> Co-authored-by: Marcelo Rydel <marcelorydel26@gmail.com> Co-authored-by: Hao Zhang <hao.zhang@portainer.io> Co-authored-by: sunportainer <93502624+sunportainer@users.noreply.github.com> Co-authored-by: sunportainer <ericsun@SG1.local> Co-authored-by: wheresolivia <78844659+wheresolivia@users.noreply.github.com> Co-authored-by: Chaim Lev-Ari <chiptus@users.noreply.github.com> Co-authored-by: Chao Geng <93526589+chaogeng77977@users.noreply.github.com> Co-authored-by: Dmitry Salakhov <to@dimasalakhov.com> Co-authored-by: Matt Hook <hookenz@gmail.com>
3 years ago
// MigratorParameters represents the required parameters to create a new Migrator instance.
MigratorParameters struct {
CurrentDBVersion *models.Version
feat(edge-compute): add support for Edge stacks (#3827) * feat(api): introduce Edge group API (#3639) * feat(edge-groups): add object definition and service definition * feat(edge-groups): implement bolt layer * feat(edge-groups): bind service to server * feat(edge-group): add edge-group create http handler * feat(edge-groups): add list method to edge group handler * feat(edge-group): add inspect http handler * feat(edge-groups): add delete edge-group handler * feat(edge-groups): add update group handler * style(db): order by alphabetical order * fix(edge-groups): rewrite http error messages Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(main): order by alphabetical order * refactor(edge-group): relocate fetch group * fix(edge-group): reset tagids/endpoints if dynamic * refactor(server): order by alphabetical order * refactor(server): order by alphabetical order Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * Introduce a new setting to enable Edge compute features (#3654) * feat(edge-compute): add edge compute setting * feat(edge-compute): add edge compute group to sidebar * fix(settings): rename settings form group * fix(settings): align form control * Edge group associated endpoints (#3659) * chore(version): bump version number * chore(version): bump version number * feat(endpoints): filter by endpoint type (#3646) * refactor(tags): migrate tags to have association objects * 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> * refactor(tags): create tag association when creating tag * refactor(tags): delete tag association when deleting tag * refactor(db): handle error in tag association create * feat(endpoint-group): update tag assoc when creating endpoint group * feat(endpoint-group): update tag association when updating group * feat(endpoint-groups): remove group from tag associations * feat(endpoints): associate endpoint with tag on create * feat(endpoints): edit tag association when updating endpoint * fix(tags): fix merge problems * refactor(tags): remove tag association resource * fix(db): use regular tags map * style(tags): reorder props and imports * refactor(endpoint-groups): replace tag-association with tag * feat(edge-group): get associated endpoints when fetching * refactor(tags): refactor algo to update endpoint and group tags * refactor(edge-group): rename variable * refactor(tags): move calc of tags to remove to global function * fix(tags): update tag after adding association Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-groups): associate groups only with edge endpoints (#3667) * fix(edge-groups): check endpoint type when adding to edge-group * fix(edge-groups): return only edge endpoints for dynamic groups * fix(edge-compute): load edge compute setting on public setting (#3665) * Edge group list (#3644) * feat(edge-groups): add edge module * feat(edge-groups): add edge-group service * feat(edge-group): add groups list view * feat(edge-groups): add link to groups in the sidebar * feat(edge-group): show endpoints count and group type * feat(edge-group): enable removal of edge groups * refactor(edge-groups): replace datatable controller with class * refactor(edge-groups): replace function with class * fix(edge-groups): sort items by endpoints count and group type * refactor(edge-groups): use generic datatable-header component * feat(app): add trace for ui router * fix(edge-compute): add ng injection to onEnter guard * fix(edge-compute): add ng injection to onEnter guard * style(edge-compute): remove space * refactor(edge-compute): import angular * fix(app): remove ui router trace * refactor(product): revert app.js * fix(edge-compute): remove admin guard from edge routes * fix(edge-groups): change label of empty datatable Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(edge-groups): rename service * fix(edge-groups): replace icon in sidebar Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(edge-groups): remove datatable controller * refactor(edge-groups): move datatable icon to binding * refactor(edge-groups): use vanilla datatable header * refactor(datatable): remove datatable header Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(edge): rename edge group to Edge group * feat(edge-groups): edge group creation view (#3671) * feat(edge-groups): add create group view * feat(edge-groups): allow to choose group type * feat(edge-groups): implement create service handler * feat(edge-group): filter by edge endpoints * refactor(edge-groups): rename to camel case * refactor(edge-groups): replace controller with class * feat(endpoints): filter endpoints by type * refactor(edge-groups): remove comments and unneccesary async keyword * refactor(edge-group): use $async service * fix(edge-groups): replace view title Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-groups): change icon Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-groups): change icon Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(edge-groups): remove obsolete function * feat(edge-groups): add empty list messages * feat(edge-group): add description to group types * refactor(edge-groups): add finally block * feat(endpoints): search server in multi-endpoint-selector Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-group) edit view (#3672) * feat(edge-groups): add edit group view * refactor(edge-group): replace edit controller with class * refactor(edge-groups): remove async keyword * refactor(edge-groups): use $async service * refactor(edge-group): remove unnecessary functions * fix(endpoints): group by groups in endpoint-selector * feat(edge-groups): minor UI update * fix(edge-groups): provide defaults for edge group (#3682) * feat(edge-stacks): add basic views and sidebar link (#3689) * feat(edge-stacks): add mock routes * feat(edge-stacks): add link to stacks on sidebar * feat(edge-stacks): add edge stacks view * feat(edge-stacks): add create view * feat(edge-stacks): add edit view * fix(edge-stacks): use class in controller * feat(edge-stacks): add edge-stacks api (#3688) * feat(edge-stack): add edge stack types * feat(edge-stacks): add edge stack service interface * feat(edge-stacks): implement store * feat(edge-stacks): bind service to datastore * feat(edge-stacks): bind service to server * feat(edge-stack): create basic api * feat(edge-stack): create stack api * feat(edge-stacks): update api * refacotor(edge-stack): rename files * feat(edge-stack): update endpoint status * style(edge-stacks): remove comments * feat(edge-stacks): use edge stacks folder for files * fix(edge-stacks): replace bucket name Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-stacks): replace unmarshal function Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-stacks): replace edge stacks path Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * chore(git): merge develop to edge compute (#3692) * feat(support): make support type dynamic (#3621) * chore(version): bump version number * chore(version): bump version number * feat(endpoints): filter by endpoint type (#3646) * chore(assets): double UI image resolutions for HiDPI displays (#3648) Fixes #3069 Prevents users seeing blurry logos and other images when using a hidpi display (like scaled 4k, or a Retina display). These images have been recreated manually with 2x the original resolution but should resemble the originals as much as possible. They have also been run through pngcrush for compression. * 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 * 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> * chore(yarn): change start:client to start webpack dev server (#3595) * chore(yarn): change start:client to start webpack dev server * Update package.json Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * 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 * chore(yarn): add start:client script back (#3691) * 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 Co-authored-by: itsconquest <william.conquest@portainer.io> Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> Co-authored-by: Ben Brooks <ben@bbrks.me> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * Chore merge develop to edge compute (#3702) * feat(support): make support type dynamic (#3621) * chore(version): bump version number * chore(version): bump version number * feat(endpoints): filter by endpoint type (#3646) * chore(assets): double UI image resolutions for HiDPI displays (#3648) Fixes #3069 Prevents users seeing blurry logos and other images when using a hidpi display (like scaled 4k, or a Retina display). These images have been recreated manually with 2x the original resolution but should resemble the originals as much as possible. They have also been run through pngcrush for compression. * 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 * 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> * chore(yarn): change start:client to start webpack dev server (#3595) * chore(yarn): change start:client to start webpack dev server * Update package.json Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * 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 * chore(yarn): add start:client script back (#3691) * 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 * refactor(project): sort portainer types and interface definitions (#3694) * refactor(portainer): sort types * style(portainer): add comment about role service * refactor(portainer): sort interface types * refactor(portainer): sort enums * Update README.md * Update README.md * Update README.md * 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> * chore(prettier): run format on client codebase Co-authored-by: itsconquest <william.conquest@portainer.io> Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> Co-authored-by: Ben Brooks <ben@bbrks.me> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Neil Cresswell <neil@cresswell.net.nz> * feat(edge-stacks): create basic edge stack service (#3704) Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-groups): Provide a switch to use AND or OR for tags (#3695) * feat(edge-groups): add switch to form * feat(project): add property to EdgeGroup * feat(edge-groups): save mustHaveAllTags * feat(edge-groups): fetch associated endpoints (AND and OR) * feat(edge-groups): add AND selector * feat(edge-groups): default to AND * fix(edge-groups): rewrite selector options Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(endpoints): move margin to schedule form * fix(edge-groups): move the selector to top of group * refactor(edge-groups): replace partialMatch property Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-stacks): add Edge stack creation view (#3705) * feat(edge-stacks): basic creation view * feat(edge-stacks): add group selector * feat(edge-stack): create edge stack * fix(code-editor): apply digest cycle after editor is changed * style(project): reformat constants file * feat(edge-stacks): add a note about missing edge groups * fix(edge-stacks): add groups when creating stack from file * feat(edge-groups): add associated endpoints table (#3710) * feat(edge-groups): load associated endpoints * feat(endpoints): add option to filter endpoint by partial match tags * feat(edge-groups): query endpoints by PartialMatch * feat(edge-groups): reload endpoints when form changes * feat(edge-groups): remove columns * feat(edge-group): remove url column * refactor(edge-group): remove props * feat(edge-stacks): add list view (#3713) * feat(edge-stacks): basic datatable * feat(edge-stacks): remove stack * refactor(edge-stacks): convert to class * refactor(edge-stacks): replace id with stackId * feat(edge-stacks) edit edge stack view (#3716) * feat(edge-stack): load file content * feat(edge-stack): edit view * feat(edge-stack): enable update stack * refactor(edge-stacks): move form to component * feat(edge-stacks): add endpoints status * feat(edge-stacks): minor UI update Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> * feat(edge-groups) prevent deletion of edge group used by an edge stack (#3722) * feat(edge-groups): show if group belonges to edge stack * feat(edge-group): protect deletion of used edge group * feat(edge-groups): diable selection of used group * feat(edge-groups): add inuse tag (#3739) * feat(edge-groups): add inuse tag * Update app/edge/components/groups-datatable/groupsDatatable.html Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-stack): update stack version when stack file is changed (#3746) * feat(edge-stack): update version when stack file is changed * refactor(edge-stacks): move update of version to clientside * feat(edge-groups): replace Edge group endpoint selector (#3738) * feat(edge-groups): replace selector * feat(edge-group): add selector in edit form * feat(edge-groups): show tags in endpoint selector * feat(edge-groups): show the endpoint group name * fix(edge-group): remove element from associated endpoints * feat(edge-groups): add group column * feat(edge-groups): move endpoints to other column * fix(groups): disable sort * refactor(endpoints): toggle backend pagination as a property * fix(endpoints): show group name in group-association-table * feat(endpoints): truncate table columns * fix(endpoints): update group association table colspan * fix(endpoint-groups): show dash when no tags Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> * feat(edge-stacks): add api for edge to query stack config (#3748) * refactor(http): move edge validation to bouncer * feat(edge-stacks): add api for edge to query stack config * style(edge-stack): remove parentheses * Update api/http/security/bouncer.go * refactor(edge-stacks): move config inspect to endpoints handler * refactor(endpoints): move stack inspect to edge handler * style(security): fix typo Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(endpoints): rename file Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-groups): add dynamic group endpoints table (#3780) * fix(edge-stacks): update version when updating stack files (#3778) * feat(edgestacks): change status permission to edge enpoints * feat(edge-compute): add stack info to edge status inspect (#3764) * feat(edge-compute): create helper functions * feat(endpoints): add relation object and service * feat(db): create endpoint relation migration * feat(endpoints): create relation when creating endpoint * feat(endpoints): update relation when updating endpoint * feat(endpoints): delete relation when deleting endpoint * feat(endpoint): add stack status to endpoint_status * feat(edge-stacks): connect new edge stack to endpoint * refactor(edgestack): return errors.New * refactor(edgestacks): return error * refactor(edgegroup): endpoint can be related only if edge endpoint * feat(endpoints): update relation only when tags or groups were changd * refactor(tags): change tags functions to set functions * refactor(edgestack): return a list of endpoints for a list of edgegroups * feat(edgestacks): update relation when updating stack * feat(edgestacks): remove relations when deleting edge stack * feat(edgegroup): update related endpoints * feat(endpoint-group): update endpoints relations on create * feat(endpointgroup): add relatd stacks to endpoint when added to group * feat(endpoint-groups): update relation when group is changed * feat(endpointgroup): when deleting group, update its endpoints relations * feat(tags): update related endpoints when deleting tag * refactor(edge-compute): use pointers * refactor(endpointgroup): handle unassociated endpoint * fix(edgestack): show correct stack status * fix(endpoint): remove deleted endpoint from related tags * feat(edge-stacks): change acknowledged status color to blue (#3810) * feat(edge-compute): provide stack name to edge endpoint (#3809) * feat(edge-groups): when no tags selected show empty list of endpoints (#3811) * feat(edge-groups): when no tags selected show empty list of endpoints * fix(edge-group): change empty associated endpoint text * fix(edge-compute): add missing relations updates (#3817) * fix(endpoint): remove deleted endpoint from edge group * fix(tags): remove deleted tag from edge group * fix(endpoint): remove deleted endpoint from edge stack * fix(edge-groups): remove clearing of edgeGroup fields * fix(edge-groups): show dynamic edge groups without tags * fix(edge-compute): use sequential delete in resources (#3818) * fix(endpoints): delete endpoints on by one * fix(tags): remove tags one by one * fix(groups): remove endpoint groups one by one * fix(edge-stacks): remove stack one by one * fix(edge-groups): remove edge group one by one * fix(edge-stacks): add link to root in breadcrumbs * style(edge): add empty line after errors * refactor(tags): remove old function * refactor(endpoints): revert changes to multi-endpoint-selector * feat(edge-stacks): support Edge stack templates (#3812) * feat(edge-compute): fetch templates from url * feat(edge-stacks): fetch edge templates * feat(edge-stacks): choose template and save * feat(edge-stacks): add placeholder to templates select * feat(edge-templates): show info * fix(edge-stacks): fix typo * feat(edge-templates): replace template url * feat(edge-compute): use custom url if available * fix(edge-stacks): show error message when failing * feat(edge-compute): show description in template * feat(edge-templates): change access to route * style(edge-compute): change EdgeTemplatesURL description Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> Co-authored-by: itsconquest <william.conquest@portainer.io> Co-authored-by: Ben Brooks <ben@bbrks.me> Co-authored-by: Neil Cresswell <neil@cresswell.net.nz>
5 years ago
EndpointGroupService *endpointgroup.Service
EndpointService *endpoint.Service
EndpointRelationService *endpointrelation.Service
ExtensionService *extension.Service
feat(intel): Enable OpenAMT and FDO capabilities (#6212) * feat(openamt): add AMT Devices information in Environments view [INT-8] (#6169) * feat(openamt): add AMT Devices Ouf of Band Managamenet actions [INT-9] (#6171) * feat(openamt): add AMT Devices KVM Connection [INT-10] (#6179) * feat(openamt): Enhance the Environments MX to activate OpenAMT on compatible environments [INT-7] (#6196) * feat(openamt): Enable KVM by default [INT-25] (#6228) * feat(fdo): implement the FDO configuration settings INT-19 (#6238) feat(fdo): implement the FDO configuration settings INT-19 * feat(fdo): implement Owner client INT-17 (#6231) feat(fdo): implement Owner client INT-17 * feat(openamt): hide wireless config in OpenAMT form (#6250) * feat(openamt): Increase OpenAMT timeouts [INT-30] (#6253) * feat(openamt): Disable the ability to use KVM and OOB actions on a MPS disconnected device [INT-36] (#6254) * feat(fdo): add import device UI [INT-20] (#6240) feat(fdo): add import device UI INT-20 * refactor(fdo): fix develop merge issues * feat(openamt): Do not fetch OpenAMT details for an unassociated Edge endpoint (#6273) * fix(intel): Fix switches params (#6282) * feat(openamt): preload existing AMT settings (#6283) * feat(openamt): Better UI/UX for AMT activation loading [INT-39] (#6290) * feat(openamt): Remove wireless config related code [INT-41] (#6291) * yarn install * feat(openamt): change kvm redirection for pop up, always enable features [INT-37] (#6292) * feat(openamt): change kvm redirection for pop up, always enable features [INT-37] (#6293) * feat(openmt): use .ts services with axios for OpenAMT (#6312) * Minor code cleanup. * fix(fdo): move the FDO client code to the hostmanagement folder INT-44 (#6345) * refactor(intel): Add Edge Compute Settings view (#6351) * feat(fdo): add FDO profiles INT-22 (#6363) feat(fdo): add FDO profiles INT-22 * fix(fdo): fix incorrect profile URL INT-45 (#6377) * fixed husky version * fix go.mod with go mod tidy * feat(edge): migrate OpenAMT devices views to Edge Devices [EE-2322] (#6373) * feat(intel): OpenAMT UI/UX adjustments (#6394) * only allow edge agent as edge device * show all edge agent environments on Edge Devices view * feat(fdo): add the ability to import multiple ownership vouchers at once EE-2324 (#6395) * fix(edge): settings edge compute alert (#6402) * remove pagination, add useMemo for devices result array (#6409) * feat(edge): minor Edge Devices (AMT) UI fixes (#6410) * chore(eslint): fix versions * chore(app): reformat codebase * change add edge agent modal behaviour, fix yarn.lock * fix use pagination * remove extractedTranslations folder * feat(edge): add FDO Profiles Datatable [EE-2406] (#6415) * feat(edge): add KVM workaround tooltip (#6441) * feat(edge): Add default FDO profile (#6450) * feat(edge): add settings to disable trust on first connect and enforce Edge ID INT-1 EE-2410 (#6429) Co-authored-by: andres-portainer <91705312+andres-portainer@users.noreply.github.com> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: andres-portainer <andres-portainer@users.noreply.github.com> Co-authored-by: Chaim Lev-Ari <chiptus@gmail.com>
3 years ago
FDOProfilesService *fdoprofile.Service
feat(edge-compute): add support for Edge stacks (#3827) * feat(api): introduce Edge group API (#3639) * feat(edge-groups): add object definition and service definition * feat(edge-groups): implement bolt layer * feat(edge-groups): bind service to server * feat(edge-group): add edge-group create http handler * feat(edge-groups): add list method to edge group handler * feat(edge-group): add inspect http handler * feat(edge-groups): add delete edge-group handler * feat(edge-groups): add update group handler * style(db): order by alphabetical order * fix(edge-groups): rewrite http error messages Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(main): order by alphabetical order * refactor(edge-group): relocate fetch group * fix(edge-group): reset tagids/endpoints if dynamic * refactor(server): order by alphabetical order * refactor(server): order by alphabetical order Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * Introduce a new setting to enable Edge compute features (#3654) * feat(edge-compute): add edge compute setting * feat(edge-compute): add edge compute group to sidebar * fix(settings): rename settings form group * fix(settings): align form control * Edge group associated endpoints (#3659) * chore(version): bump version number * chore(version): bump version number * feat(endpoints): filter by endpoint type (#3646) * refactor(tags): migrate tags to have association objects * 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> * refactor(tags): create tag association when creating tag * refactor(tags): delete tag association when deleting tag * refactor(db): handle error in tag association create * feat(endpoint-group): update tag assoc when creating endpoint group * feat(endpoint-group): update tag association when updating group * feat(endpoint-groups): remove group from tag associations * feat(endpoints): associate endpoint with tag on create * feat(endpoints): edit tag association when updating endpoint * fix(tags): fix merge problems * refactor(tags): remove tag association resource * fix(db): use regular tags map * style(tags): reorder props and imports * refactor(endpoint-groups): replace tag-association with tag * feat(edge-group): get associated endpoints when fetching * refactor(tags): refactor algo to update endpoint and group tags * refactor(edge-group): rename variable * refactor(tags): move calc of tags to remove to global function * fix(tags): update tag after adding association Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-groups): associate groups only with edge endpoints (#3667) * fix(edge-groups): check endpoint type when adding to edge-group * fix(edge-groups): return only edge endpoints for dynamic groups * fix(edge-compute): load edge compute setting on public setting (#3665) * Edge group list (#3644) * feat(edge-groups): add edge module * feat(edge-groups): add edge-group service * feat(edge-group): add groups list view * feat(edge-groups): add link to groups in the sidebar * feat(edge-group): show endpoints count and group type * feat(edge-group): enable removal of edge groups * refactor(edge-groups): replace datatable controller with class * refactor(edge-groups): replace function with class * fix(edge-groups): sort items by endpoints count and group type * refactor(edge-groups): use generic datatable-header component * feat(app): add trace for ui router * fix(edge-compute): add ng injection to onEnter guard * fix(edge-compute): add ng injection to onEnter guard * style(edge-compute): remove space * refactor(edge-compute): import angular * fix(app): remove ui router trace * refactor(product): revert app.js * fix(edge-compute): remove admin guard from edge routes * fix(edge-groups): change label of empty datatable Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(edge-groups): rename service * fix(edge-groups): replace icon in sidebar Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(edge-groups): remove datatable controller * refactor(edge-groups): move datatable icon to binding * refactor(edge-groups): use vanilla datatable header * refactor(datatable): remove datatable header Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(edge): rename edge group to Edge group * feat(edge-groups): edge group creation view (#3671) * feat(edge-groups): add create group view * feat(edge-groups): allow to choose group type * feat(edge-groups): implement create service handler * feat(edge-group): filter by edge endpoints * refactor(edge-groups): rename to camel case * refactor(edge-groups): replace controller with class * feat(endpoints): filter endpoints by type * refactor(edge-groups): remove comments and unneccesary async keyword * refactor(edge-group): use $async service * fix(edge-groups): replace view title Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-groups): change icon Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-groups): change icon Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(edge-groups): remove obsolete function * feat(edge-groups): add empty list messages * feat(edge-group): add description to group types * refactor(edge-groups): add finally block * feat(endpoints): search server in multi-endpoint-selector Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-group) edit view (#3672) * feat(edge-groups): add edit group view * refactor(edge-group): replace edit controller with class * refactor(edge-groups): remove async keyword * refactor(edge-groups): use $async service * refactor(edge-group): remove unnecessary functions * fix(endpoints): group by groups in endpoint-selector * feat(edge-groups): minor UI update * fix(edge-groups): provide defaults for edge group (#3682) * feat(edge-stacks): add basic views and sidebar link (#3689) * feat(edge-stacks): add mock routes * feat(edge-stacks): add link to stacks on sidebar * feat(edge-stacks): add edge stacks view * feat(edge-stacks): add create view * feat(edge-stacks): add edit view * fix(edge-stacks): use class in controller * feat(edge-stacks): add edge-stacks api (#3688) * feat(edge-stack): add edge stack types * feat(edge-stacks): add edge stack service interface * feat(edge-stacks): implement store * feat(edge-stacks): bind service to datastore * feat(edge-stacks): bind service to server * feat(edge-stack): create basic api * feat(edge-stack): create stack api * feat(edge-stacks): update api * refacotor(edge-stack): rename files * feat(edge-stack): update endpoint status * style(edge-stacks): remove comments * feat(edge-stacks): use edge stacks folder for files * fix(edge-stacks): replace bucket name Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-stacks): replace unmarshal function Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-stacks): replace edge stacks path Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * chore(git): merge develop to edge compute (#3692) * feat(support): make support type dynamic (#3621) * chore(version): bump version number * chore(version): bump version number * feat(endpoints): filter by endpoint type (#3646) * chore(assets): double UI image resolutions for HiDPI displays (#3648) Fixes #3069 Prevents users seeing blurry logos and other images when using a hidpi display (like scaled 4k, or a Retina display). These images have been recreated manually with 2x the original resolution but should resemble the originals as much as possible. They have also been run through pngcrush for compression. * 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 * 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> * chore(yarn): change start:client to start webpack dev server (#3595) * chore(yarn): change start:client to start webpack dev server * Update package.json Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * 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 * chore(yarn): add start:client script back (#3691) * 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 Co-authored-by: itsconquest <william.conquest@portainer.io> Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> Co-authored-by: Ben Brooks <ben@bbrks.me> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * Chore merge develop to edge compute (#3702) * feat(support): make support type dynamic (#3621) * chore(version): bump version number * chore(version): bump version number * feat(endpoints): filter by endpoint type (#3646) * chore(assets): double UI image resolutions for HiDPI displays (#3648) Fixes #3069 Prevents users seeing blurry logos and other images when using a hidpi display (like scaled 4k, or a Retina display). These images have been recreated manually with 2x the original resolution but should resemble the originals as much as possible. They have also been run through pngcrush for compression. * 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 * 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> * chore(yarn): change start:client to start webpack dev server (#3595) * chore(yarn): change start:client to start webpack dev server * Update package.json Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * 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 * chore(yarn): add start:client script back (#3691) * 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 * refactor(project): sort portainer types and interface definitions (#3694) * refactor(portainer): sort types * style(portainer): add comment about role service * refactor(portainer): sort interface types * refactor(portainer): sort enums * Update README.md * Update README.md * Update README.md * 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> * chore(prettier): run format on client codebase Co-authored-by: itsconquest <william.conquest@portainer.io> Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> Co-authored-by: Ben Brooks <ben@bbrks.me> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Neil Cresswell <neil@cresswell.net.nz> * feat(edge-stacks): create basic edge stack service (#3704) Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-groups): Provide a switch to use AND or OR for tags (#3695) * feat(edge-groups): add switch to form * feat(project): add property to EdgeGroup * feat(edge-groups): save mustHaveAllTags * feat(edge-groups): fetch associated endpoints (AND and OR) * feat(edge-groups): add AND selector * feat(edge-groups): default to AND * fix(edge-groups): rewrite selector options Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(endpoints): move margin to schedule form * fix(edge-groups): move the selector to top of group * refactor(edge-groups): replace partialMatch property Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-stacks): add Edge stack creation view (#3705) * feat(edge-stacks): basic creation view * feat(edge-stacks): add group selector * feat(edge-stack): create edge stack * fix(code-editor): apply digest cycle after editor is changed * style(project): reformat constants file * feat(edge-stacks): add a note about missing edge groups * fix(edge-stacks): add groups when creating stack from file * feat(edge-groups): add associated endpoints table (#3710) * feat(edge-groups): load associated endpoints * feat(endpoints): add option to filter endpoint by partial match tags * feat(edge-groups): query endpoints by PartialMatch * feat(edge-groups): reload endpoints when form changes * feat(edge-groups): remove columns * feat(edge-group): remove url column * refactor(edge-group): remove props * feat(edge-stacks): add list view (#3713) * feat(edge-stacks): basic datatable * feat(edge-stacks): remove stack * refactor(edge-stacks): convert to class * refactor(edge-stacks): replace id with stackId * feat(edge-stacks) edit edge stack view (#3716) * feat(edge-stack): load file content * feat(edge-stack): edit view * feat(edge-stack): enable update stack * refactor(edge-stacks): move form to component * feat(edge-stacks): add endpoints status * feat(edge-stacks): minor UI update Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> * feat(edge-groups) prevent deletion of edge group used by an edge stack (#3722) * feat(edge-groups): show if group belonges to edge stack * feat(edge-group): protect deletion of used edge group * feat(edge-groups): diable selection of used group * feat(edge-groups): add inuse tag (#3739) * feat(edge-groups): add inuse tag * Update app/edge/components/groups-datatable/groupsDatatable.html Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-stack): update stack version when stack file is changed (#3746) * feat(edge-stack): update version when stack file is changed * refactor(edge-stacks): move update of version to clientside * feat(edge-groups): replace Edge group endpoint selector (#3738) * feat(edge-groups): replace selector * feat(edge-group): add selector in edit form * feat(edge-groups): show tags in endpoint selector * feat(edge-groups): show the endpoint group name * fix(edge-group): remove element from associated endpoints * feat(edge-groups): add group column * feat(edge-groups): move endpoints to other column * fix(groups): disable sort * refactor(endpoints): toggle backend pagination as a property * fix(endpoints): show group name in group-association-table * feat(endpoints): truncate table columns * fix(endpoints): update group association table colspan * fix(endpoint-groups): show dash when no tags Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> * feat(edge-stacks): add api for edge to query stack config (#3748) * refactor(http): move edge validation to bouncer * feat(edge-stacks): add api for edge to query stack config * style(edge-stack): remove parentheses * Update api/http/security/bouncer.go * refactor(edge-stacks): move config inspect to endpoints handler * refactor(endpoints): move stack inspect to edge handler * style(security): fix typo Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(endpoints): rename file Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-groups): add dynamic group endpoints table (#3780) * fix(edge-stacks): update version when updating stack files (#3778) * feat(edgestacks): change status permission to edge enpoints * feat(edge-compute): add stack info to edge status inspect (#3764) * feat(edge-compute): create helper functions * feat(endpoints): add relation object and service * feat(db): create endpoint relation migration * feat(endpoints): create relation when creating endpoint * feat(endpoints): update relation when updating endpoint * feat(endpoints): delete relation when deleting endpoint * feat(endpoint): add stack status to endpoint_status * feat(edge-stacks): connect new edge stack to endpoint * refactor(edgestack): return errors.New * refactor(edgestacks): return error * refactor(edgegroup): endpoint can be related only if edge endpoint * feat(endpoints): update relation only when tags or groups were changd * refactor(tags): change tags functions to set functions * refactor(edgestack): return a list of endpoints for a list of edgegroups * feat(edgestacks): update relation when updating stack * feat(edgestacks): remove relations when deleting edge stack * feat(edgegroup): update related endpoints * feat(endpoint-group): update endpoints relations on create * feat(endpointgroup): add relatd stacks to endpoint when added to group * feat(endpoint-groups): update relation when group is changed * feat(endpointgroup): when deleting group, update its endpoints relations * feat(tags): update related endpoints when deleting tag * refactor(edge-compute): use pointers * refactor(endpointgroup): handle unassociated endpoint * fix(edgestack): show correct stack status * fix(endpoint): remove deleted endpoint from related tags * feat(edge-stacks): change acknowledged status color to blue (#3810) * feat(edge-compute): provide stack name to edge endpoint (#3809) * feat(edge-groups): when no tags selected show empty list of endpoints (#3811) * feat(edge-groups): when no tags selected show empty list of endpoints * fix(edge-group): change empty associated endpoint text * fix(edge-compute): add missing relations updates (#3817) * fix(endpoint): remove deleted endpoint from edge group * fix(tags): remove deleted tag from edge group * fix(endpoint): remove deleted endpoint from edge stack * fix(edge-groups): remove clearing of edgeGroup fields * fix(edge-groups): show dynamic edge groups without tags * fix(edge-compute): use sequential delete in resources (#3818) * fix(endpoints): delete endpoints on by one * fix(tags): remove tags one by one * fix(groups): remove endpoint groups one by one * fix(edge-stacks): remove stack one by one * fix(edge-groups): remove edge group one by one * fix(edge-stacks): add link to root in breadcrumbs * style(edge): add empty line after errors * refactor(tags): remove old function * refactor(endpoints): revert changes to multi-endpoint-selector * feat(edge-stacks): support Edge stack templates (#3812) * feat(edge-compute): fetch templates from url * feat(edge-stacks): fetch edge templates * feat(edge-stacks): choose template and save * feat(edge-stacks): add placeholder to templates select * feat(edge-templates): show info * fix(edge-stacks): fix typo * feat(edge-templates): replace template url * feat(edge-compute): use custom url if available * fix(edge-stacks): show error message when failing * feat(edge-compute): show description in template * feat(edge-templates): change access to route * style(edge-compute): change EdgeTemplatesURL description Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> Co-authored-by: itsconquest <william.conquest@portainer.io> Co-authored-by: Ben Brooks <ben@bbrks.me> Co-authored-by: Neil Cresswell <neil@cresswell.net.nz>
5 years ago
RegistryService *registry.Service
ResourceControlService *resourcecontrol.Service
RoleService *role.Service
ScheduleService *schedule.Service
SettingsService *settings.Service
SnapshotService *snapshot.Service
feat(edge-compute): add support for Edge stacks (#3827) * feat(api): introduce Edge group API (#3639) * feat(edge-groups): add object definition and service definition * feat(edge-groups): implement bolt layer * feat(edge-groups): bind service to server * feat(edge-group): add edge-group create http handler * feat(edge-groups): add list method to edge group handler * feat(edge-group): add inspect http handler * feat(edge-groups): add delete edge-group handler * feat(edge-groups): add update group handler * style(db): order by alphabetical order * fix(edge-groups): rewrite http error messages Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(main): order by alphabetical order * refactor(edge-group): relocate fetch group * fix(edge-group): reset tagids/endpoints if dynamic * refactor(server): order by alphabetical order * refactor(server): order by alphabetical order Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * Introduce a new setting to enable Edge compute features (#3654) * feat(edge-compute): add edge compute setting * feat(edge-compute): add edge compute group to sidebar * fix(settings): rename settings form group * fix(settings): align form control * Edge group associated endpoints (#3659) * chore(version): bump version number * chore(version): bump version number * feat(endpoints): filter by endpoint type (#3646) * refactor(tags): migrate tags to have association objects * 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> * refactor(tags): create tag association when creating tag * refactor(tags): delete tag association when deleting tag * refactor(db): handle error in tag association create * feat(endpoint-group): update tag assoc when creating endpoint group * feat(endpoint-group): update tag association when updating group * feat(endpoint-groups): remove group from tag associations * feat(endpoints): associate endpoint with tag on create * feat(endpoints): edit tag association when updating endpoint * fix(tags): fix merge problems * refactor(tags): remove tag association resource * fix(db): use regular tags map * style(tags): reorder props and imports * refactor(endpoint-groups): replace tag-association with tag * feat(edge-group): get associated endpoints when fetching * refactor(tags): refactor algo to update endpoint and group tags * refactor(edge-group): rename variable * refactor(tags): move calc of tags to remove to global function * fix(tags): update tag after adding association Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-groups): associate groups only with edge endpoints (#3667) * fix(edge-groups): check endpoint type when adding to edge-group * fix(edge-groups): return only edge endpoints for dynamic groups * fix(edge-compute): load edge compute setting on public setting (#3665) * Edge group list (#3644) * feat(edge-groups): add edge module * feat(edge-groups): add edge-group service * feat(edge-group): add groups list view * feat(edge-groups): add link to groups in the sidebar * feat(edge-group): show endpoints count and group type * feat(edge-group): enable removal of edge groups * refactor(edge-groups): replace datatable controller with class * refactor(edge-groups): replace function with class * fix(edge-groups): sort items by endpoints count and group type * refactor(edge-groups): use generic datatable-header component * feat(app): add trace for ui router * fix(edge-compute): add ng injection to onEnter guard * fix(edge-compute): add ng injection to onEnter guard * style(edge-compute): remove space * refactor(edge-compute): import angular * fix(app): remove ui router trace * refactor(product): revert app.js * fix(edge-compute): remove admin guard from edge routes * fix(edge-groups): change label of empty datatable Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(edge-groups): rename service * fix(edge-groups): replace icon in sidebar Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(edge-groups): remove datatable controller * refactor(edge-groups): move datatable icon to binding * refactor(edge-groups): use vanilla datatable header * refactor(datatable): remove datatable header Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(edge): rename edge group to Edge group * feat(edge-groups): edge group creation view (#3671) * feat(edge-groups): add create group view * feat(edge-groups): allow to choose group type * feat(edge-groups): implement create service handler * feat(edge-group): filter by edge endpoints * refactor(edge-groups): rename to camel case * refactor(edge-groups): replace controller with class * feat(endpoints): filter endpoints by type * refactor(edge-groups): remove comments and unneccesary async keyword * refactor(edge-group): use $async service * fix(edge-groups): replace view title Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-groups): change icon Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-groups): change icon Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(edge-groups): remove obsolete function * feat(edge-groups): add empty list messages * feat(edge-group): add description to group types * refactor(edge-groups): add finally block * feat(endpoints): search server in multi-endpoint-selector Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-group) edit view (#3672) * feat(edge-groups): add edit group view * refactor(edge-group): replace edit controller with class * refactor(edge-groups): remove async keyword * refactor(edge-groups): use $async service * refactor(edge-group): remove unnecessary functions * fix(endpoints): group by groups in endpoint-selector * feat(edge-groups): minor UI update * fix(edge-groups): provide defaults for edge group (#3682) * feat(edge-stacks): add basic views and sidebar link (#3689) * feat(edge-stacks): add mock routes * feat(edge-stacks): add link to stacks on sidebar * feat(edge-stacks): add edge stacks view * feat(edge-stacks): add create view * feat(edge-stacks): add edit view * fix(edge-stacks): use class in controller * feat(edge-stacks): add edge-stacks api (#3688) * feat(edge-stack): add edge stack types * feat(edge-stacks): add edge stack service interface * feat(edge-stacks): implement store * feat(edge-stacks): bind service to datastore * feat(edge-stacks): bind service to server * feat(edge-stack): create basic api * feat(edge-stack): create stack api * feat(edge-stacks): update api * refacotor(edge-stack): rename files * feat(edge-stack): update endpoint status * style(edge-stacks): remove comments * feat(edge-stacks): use edge stacks folder for files * fix(edge-stacks): replace bucket name Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-stacks): replace unmarshal function Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-stacks): replace edge stacks path Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * chore(git): merge develop to edge compute (#3692) * feat(support): make support type dynamic (#3621) * chore(version): bump version number * chore(version): bump version number * feat(endpoints): filter by endpoint type (#3646) * chore(assets): double UI image resolutions for HiDPI displays (#3648) Fixes #3069 Prevents users seeing blurry logos and other images when using a hidpi display (like scaled 4k, or a Retina display). These images have been recreated manually with 2x the original resolution but should resemble the originals as much as possible. They have also been run through pngcrush for compression. * 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 * 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> * chore(yarn): change start:client to start webpack dev server (#3595) * chore(yarn): change start:client to start webpack dev server * Update package.json Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * 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 * chore(yarn): add start:client script back (#3691) * 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 Co-authored-by: itsconquest <william.conquest@portainer.io> Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> Co-authored-by: Ben Brooks <ben@bbrks.me> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * Chore merge develop to edge compute (#3702) * feat(support): make support type dynamic (#3621) * chore(version): bump version number * chore(version): bump version number * feat(endpoints): filter by endpoint type (#3646) * chore(assets): double UI image resolutions for HiDPI displays (#3648) Fixes #3069 Prevents users seeing blurry logos and other images when using a hidpi display (like scaled 4k, or a Retina display). These images have been recreated manually with 2x the original resolution but should resemble the originals as much as possible. They have also been run through pngcrush for compression. * 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 * 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> * chore(yarn): change start:client to start webpack dev server (#3595) * chore(yarn): change start:client to start webpack dev server * Update package.json Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * 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 * chore(yarn): add start:client script back (#3691) * 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 * refactor(project): sort portainer types and interface definitions (#3694) * refactor(portainer): sort types * style(portainer): add comment about role service * refactor(portainer): sort interface types * refactor(portainer): sort enums * Update README.md * Update README.md * Update README.md * 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> * chore(prettier): run format on client codebase Co-authored-by: itsconquest <william.conquest@portainer.io> Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> Co-authored-by: Ben Brooks <ben@bbrks.me> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Neil Cresswell <neil@cresswell.net.nz> * feat(edge-stacks): create basic edge stack service (#3704) Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-groups): Provide a switch to use AND or OR for tags (#3695) * feat(edge-groups): add switch to form * feat(project): add property to EdgeGroup * feat(edge-groups): save mustHaveAllTags * feat(edge-groups): fetch associated endpoints (AND and OR) * feat(edge-groups): add AND selector * feat(edge-groups): default to AND * fix(edge-groups): rewrite selector options Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(endpoints): move margin to schedule form * fix(edge-groups): move the selector to top of group * refactor(edge-groups): replace partialMatch property Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-stacks): add Edge stack creation view (#3705) * feat(edge-stacks): basic creation view * feat(edge-stacks): add group selector * feat(edge-stack): create edge stack * fix(code-editor): apply digest cycle after editor is changed * style(project): reformat constants file * feat(edge-stacks): add a note about missing edge groups * fix(edge-stacks): add groups when creating stack from file * feat(edge-groups): add associated endpoints table (#3710) * feat(edge-groups): load associated endpoints * feat(endpoints): add option to filter endpoint by partial match tags * feat(edge-groups): query endpoints by PartialMatch * feat(edge-groups): reload endpoints when form changes * feat(edge-groups): remove columns * feat(edge-group): remove url column * refactor(edge-group): remove props * feat(edge-stacks): add list view (#3713) * feat(edge-stacks): basic datatable * feat(edge-stacks): remove stack * refactor(edge-stacks): convert to class * refactor(edge-stacks): replace id with stackId * feat(edge-stacks) edit edge stack view (#3716) * feat(edge-stack): load file content * feat(edge-stack): edit view * feat(edge-stack): enable update stack * refactor(edge-stacks): move form to component * feat(edge-stacks): add endpoints status * feat(edge-stacks): minor UI update Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> * feat(edge-groups) prevent deletion of edge group used by an edge stack (#3722) * feat(edge-groups): show if group belonges to edge stack * feat(edge-group): protect deletion of used edge group * feat(edge-groups): diable selection of used group * feat(edge-groups): add inuse tag (#3739) * feat(edge-groups): add inuse tag * Update app/edge/components/groups-datatable/groupsDatatable.html Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-stack): update stack version when stack file is changed (#3746) * feat(edge-stack): update version when stack file is changed * refactor(edge-stacks): move update of version to clientside * feat(edge-groups): replace Edge group endpoint selector (#3738) * feat(edge-groups): replace selector * feat(edge-group): add selector in edit form * feat(edge-groups): show tags in endpoint selector * feat(edge-groups): show the endpoint group name * fix(edge-group): remove element from associated endpoints * feat(edge-groups): add group column * feat(edge-groups): move endpoints to other column * fix(groups): disable sort * refactor(endpoints): toggle backend pagination as a property * fix(endpoints): show group name in group-association-table * feat(endpoints): truncate table columns * fix(endpoints): update group association table colspan * fix(endpoint-groups): show dash when no tags Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> * feat(edge-stacks): add api for edge to query stack config (#3748) * refactor(http): move edge validation to bouncer * feat(edge-stacks): add api for edge to query stack config * style(edge-stack): remove parentheses * Update api/http/security/bouncer.go * refactor(edge-stacks): move config inspect to endpoints handler * refactor(endpoints): move stack inspect to edge handler * style(security): fix typo Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(endpoints): rename file Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-groups): add dynamic group endpoints table (#3780) * fix(edge-stacks): update version when updating stack files (#3778) * feat(edgestacks): change status permission to edge enpoints * feat(edge-compute): add stack info to edge status inspect (#3764) * feat(edge-compute): create helper functions * feat(endpoints): add relation object and service * feat(db): create endpoint relation migration * feat(endpoints): create relation when creating endpoint * feat(endpoints): update relation when updating endpoint * feat(endpoints): delete relation when deleting endpoint * feat(endpoint): add stack status to endpoint_status * feat(edge-stacks): connect new edge stack to endpoint * refactor(edgestack): return errors.New * refactor(edgestacks): return error * refactor(edgegroup): endpoint can be related only if edge endpoint * feat(endpoints): update relation only when tags or groups were changd * refactor(tags): change tags functions to set functions * refactor(edgestack): return a list of endpoints for a list of edgegroups * feat(edgestacks): update relation when updating stack * feat(edgestacks): remove relations when deleting edge stack * feat(edgegroup): update related endpoints * feat(endpoint-group): update endpoints relations on create * feat(endpointgroup): add relatd stacks to endpoint when added to group * feat(endpoint-groups): update relation when group is changed * feat(endpointgroup): when deleting group, update its endpoints relations * feat(tags): update related endpoints when deleting tag * refactor(edge-compute): use pointers * refactor(endpointgroup): handle unassociated endpoint * fix(edgestack): show correct stack status * fix(endpoint): remove deleted endpoint from related tags * feat(edge-stacks): change acknowledged status color to blue (#3810) * feat(edge-compute): provide stack name to edge endpoint (#3809) * feat(edge-groups): when no tags selected show empty list of endpoints (#3811) * feat(edge-groups): when no tags selected show empty list of endpoints * fix(edge-group): change empty associated endpoint text * fix(edge-compute): add missing relations updates (#3817) * fix(endpoint): remove deleted endpoint from edge group * fix(tags): remove deleted tag from edge group * fix(endpoint): remove deleted endpoint from edge stack * fix(edge-groups): remove clearing of edgeGroup fields * fix(edge-groups): show dynamic edge groups without tags * fix(edge-compute): use sequential delete in resources (#3818) * fix(endpoints): delete endpoints on by one * fix(tags): remove tags one by one * fix(groups): remove endpoint groups one by one * fix(edge-stacks): remove stack one by one * fix(edge-groups): remove edge group one by one * fix(edge-stacks): add link to root in breadcrumbs * style(edge): add empty line after errors * refactor(tags): remove old function * refactor(endpoints): revert changes to multi-endpoint-selector * feat(edge-stacks): support Edge stack templates (#3812) * feat(edge-compute): fetch templates from url * feat(edge-stacks): fetch edge templates * feat(edge-stacks): choose template and save * feat(edge-stacks): add placeholder to templates select * feat(edge-templates): show info * fix(edge-stacks): fix typo * feat(edge-templates): replace template url * feat(edge-compute): use custom url if available * fix(edge-stacks): show error message when failing * feat(edge-compute): show description in template * feat(edge-templates): change access to route * style(edge-compute): change EdgeTemplatesURL description Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> Co-authored-by: itsconquest <william.conquest@portainer.io> Co-authored-by: Ben Brooks <ben@bbrks.me> Co-authored-by: Neil Cresswell <neil@cresswell.net.nz>
5 years ago
StackService *stack.Service
TagService *tag.Service
TeamMembershipService *teammembership.Service
UserService *user.Service
VersionService *version.Service
FileService portainer.FileService
AuthorizationService *authorization.Service
feat(app): rework private registries and support private registries in kubernetes EE-30 (#5131) * feat(app): rework private registries and support private registries in kubernetes [EE-30] feat(api): backport private registries backend changes (#5072) * feat(api/bolt): backport bolt changes * feat(api/exec): backport exec changes * feat(api/http): backport http/handler/dockerhub changes * feat(api/http): backport http/handler/endpoints changes * feat(api/http): backport http/handler/registries changes * feat(api/http): backport http/handler/stacks changes * feat(api/http): backport http/handler changes * feat(api/http): backport http/proxy/factory/azure changes * feat(api/http): backport http/proxy/factory/docker changes * feat(api/http): backport http/proxy/factory/utils changes * feat(api/http): backport http/proxy/factory/kubernetes changes * feat(api/http): backport http/proxy/factory changes * feat(api/http): backport http/security changes * feat(api/http): backport http changes * feat(api/internal): backport internal changes * feat(api): backport api changes * feat(api/kubernetes): backport kubernetes changes * fix(api/http): changes on backend following backport feat(app): backport private registries frontend changes (#5056) * feat(app/docker): backport docker/components changes * feat(app/docker): backport docker/helpers changes * feat(app/docker): backport docker/views/container changes * feat(app/docker): backport docker/views/images changes * feat(app/docker): backport docker/views/registries changes * feat(app/docker): backport docker/views/services changes * feat(app/docker): backport docker changes * feat(app/kubernetes): backport kubernetes/components changes * feat(app/kubernetes): backport kubernetes/converters changes * feat(app/kubernetes): backport kubernetes/models changes * feat(app/kubernetes): backport kubernetes/registries changes * feat(app/kubernetes): backport kubernetes/services changes * feat(app/kubernetes): backport kubernetes/views/applications changes * feat(app/kubernetes): backport kubernetes/views/configurations changes * feat(app/kubernetes): backport kubernetes/views/configure changes * feat(app/kubernetes): backport kubernetes/views/resource-pools changes * feat(app/kubernetes): backport kubernetes/views changes * feat(app/portainer): backport portainer/components/accessManagement changes * feat(app/portainer): backport portainer/components/datatables changes * feat(app/portainer): backport portainer/components/forms changes * feat(app/portainer): backport portainer/components/registry-details changes * feat(app/portainer): backport portainer/models changes * feat(app/portainer): backport portainer/rest changes * feat(app/portainer): backport portainer/services changes * feat(app/portainer): backport portainer/views changes * feat(app/portainer): backport portainer changes * feat(app): backport app changes * config(project): gitignore + jsconfig changes gitignore all files under api/cmd/portainer but main.go and enable Code Editor autocomplete on import ... from '@/...' fix(app): fix pull rate limit checker fix(app/registries): sidebar menus and registry accesses users filtering fix(api): add missing kube client factory fix(kube): fetch dockerhub pull limits (#5133) fix(app): pre review fixes (#5142) * fix(app/registries): remove checkbox for endpointRegistries view * fix(endpoints): allow access to default namespace * fix(docker): fetch pull limits * fix(kube/ns): show selected registries for non admin Co-authored-by: Chaim Lev-Ari <chiptus@gmail.com> chore(webpack): ignore missing sourcemaps fix(registries): fetch registry config from url feat(kube/registries): ignore not found when deleting secret feat(db): move migration to db 31 fix(registries): fix bugs in PR EE-869 (#5169) * fix(registries): hide role * fix(endpoints): set empty access policy to edge endpoint * fix(registry): remove double arguments * fix(admin): ignore warning * feat(kube/configurations): tag registry secrets (#5157) * feat(kube/configurations): tag registry secrets * feat(kube/secrets): show registry secrets for admins * fix(registries): move dockerhub to beginning * refactor(registries): use endpoint scoped registries feat(registries): filter by namespace if supplied feat(access-managment): filter users for registry (#5191) * refactor(access-manage): move users selector to component * feat(access-managment): filter users for registry refactor(registries): sync code with CE (#5200) * refactor(registry): add inspect handler under endpoints * refactor(endpoint): sync endpoint_registries_list * refactor(endpoints): sync registry_access * fix(db): rename migration functions * fix(registries): show accesses for admin * fix(kube): set token on transport * refactor(kube): move secret help to bottom * fix(kuberentes): remove shouldLog parameter * style(auth): add description of security.IsAdmin * feat(security): allow admin access to registry * feat(edge): connect to edge endpoint when creating client * style(portainer): change deprecation version * refactor(sidebar): hide manage * refactor(containers): revert changes * style(container): remove whitespace * fix(endpoint): add handler to registy on endpointService * refactor(image): use endpointService.registries * fix(kueb/namespaces): rename resource pool to namespace * fix(kube/namespace): move selected registries * fix(api/registries): hide accesses on registry creation Co-authored-by: LP B <xAt0mZ@users.noreply.github.com> refactor(api): remove code duplication after rebase fix(app/registries): replace last registry api usage by endpoint registry api fix(api/endpoints): update registry access policies on endpoint deletion (#5226) [EE-1027] fix(db): update db version * fix(dockerhub): fetch rate limits * fix(registry/tests): supply restricred context * fix(registries): show proget registry only when selected * fix(registry): create dockerhub registry * feat(db): move migrations to db 32 Co-authored-by: Chaim Lev-Ari <chiptus@gmail.com>
3 years ago
DockerhubService *dockerhub.Service
EdgeStackService *edgestack.Service
EdgeJobService *edgejob.Service
TunnelServerService *tunnelserver.Service
}
)
// NewMigrator creates a new Migrator.
chore(store) EE-1981: Refactor/store/error checking, and other refactoring (#6173) * use the Store interface IsErrObjectNotFound() to avoid revealing internal errors Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * what happens when you extract the datastore interfaces into their own package Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * Start renaming Storage methods Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the boltdb specific code from the Portainer storage code (example, the others need the same) Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more extract bolt.Tx from datastore code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * minimise imports by putting moving the struct definition into the file that needs the Service imports Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more extraction of boltdb.Tx Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the use of bucket.SetSequence Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * almost done - just endpoint.Synchonise :/ Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * so, endpoint.Synchonize looks hard, but i can't find where we use it, so 'delete first refactoring' Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix test compile errors Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * test compile fixes after rebase Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix a mis-remembering I had wrt deserialisation - last time i used AnyData - jsoniter's bindTo looks interesting for the same reason Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * set us up to make the connection an interface Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * make the db connection a datastore interface, and separate out our datastore services from the bolt ones Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * rename methods to something less oltdb internals specific Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * these errors are not boltdb secific Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * start using the db-backend factory method too Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * export boltdb raw in case we can't export from the service layer Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add a raw export from boltdb to yaml for broken db's, and an export services to yaml in backup Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add the version info by hand for now Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * actually, the export from services can be fully typed - its the import that needs to do more work Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * redo raw export, and make import capable of using it Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add DockerHub Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * migration from anything older than v1.21.0 has been broken for quite a while, deleting the un-tested code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix go test ./... again Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * my goland wasn't setup to gofmt Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * move the two extremely dubious migration tests down into store, so they can use the test store code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * the migrator is now free of boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * reverse goland overzealous replcement of internal with boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more undo over-zealous goland internal->boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * yay, now bolt is only mentioned inside the api/database/ dir Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * and this might be the last of the boltdb references? Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add todo Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the store code into a separate module too Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * don't need the fileService in boltdb anymore Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * use IsErrObjectNotFound() Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * use a string to select what database backend we use Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * make isNew store an ephemeral bool that doesn't stay true after we've initialised it Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * move the import.json wip to a separate file so its more obvious - we'll be using it for testing, emergency fixups, and in the next part of the store work, when we improve migrations and data model lifecycles Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * undo vscode formatting html Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix app templates symbol (#6221) * feat(webhook) EE-2125 send registry auth haeder when update swarms service via webhook (#6220) * feat(webhook) EE-2125 add some helpers to registry utils * feat(webhook) EE-2125 persist registryID when creating a webhook * feat(webhook) EE-2125 send registry auth header when executing a webhook * feat(webhook) EE-2125 send registryID to backend when creating a service with webhook * feat(webhook) EE-2125 use the initial registry ID to create webhook on editing service screen * feat(webhook) EE-2125 update webhook when update registry * feat(webhook) EE-2125 add endpoint of update webhook * feat(webhook) EE-2125 code cleanup * feat(webhook) EE-2125 fix a typo * feat(webhook) EE-2125 fix circle import issue with unit test Co-authored-by: Simon Meng <simon.meng@portainer.io> * fix(kubeconfig): show kubeconfig download button for non admin users [EE-2123] (#6204) Co-authored-by: Simon Meng <simon.meng@portainer.io> * fix data-cy for k8s cluster menu (#6226) LGTM * feat(stack): make stack created from app template editable EE-1941 (#6104) feat(stack): make stack from app template editable * fix(container):disable Duplicate/Edit button when the container is portainer (#6223) * fix/ee-1909/show-pull-image-error (#6195) Co-authored-by: sunportainer <ericsun@SG1.local> * feat(cy): add data-cy to helm install button (#6241) * feat(cy): add data-cy to add registry button (#6242) * refactor(app): convert root folder files to es6 (#4159) * refactor(app): duplicate constants as es6 exports (#4158) * fix(docker): provide workaround to save network name variable (#6080) * fix/EE-1862/unable-to-stop-or-remove-stack workaround for var without default value in yaml file * fix/EE-1862/unable-to-stop-or-remove-stack check yaml file * fixed func and var names * wrapper error and used bool for stringset * UT case for createNetworkEnvFile * UT case for %s=%s * powerful StringSet * wrapper error for extract network name * wrapper all the return err * store more env * put to env file * make default value None * feat: gzip static resources (#6258) * fix(ssl)//handle --sslcert and --sslkey ee-2106 (#6203) * fix/ee-2106/handle-sslcert-sslkey Co-authored-by: sunportainer <ericsun@SG1.local> * fix(server):support disable https only ee-2068 (#6232) * fix/ee-2068/disable-forcely-https * feat(store): implement store tests EE-2112 (#6224) * add store tests * add some more tests * Update missing helm user repo methods * remove redundant comments * add webhook export * update webhooks * use the Store interface IsErrObjectNotFound() to avoid revealing internal errors Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * what happens when you extract the datastore interfaces into their own package Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * Start renaming Storage methods Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the boltdb specific code from the Portainer storage code (example, the others need the same) Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more extract bolt.Tx from datastore code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * minimise imports by putting moving the struct definition into the file that needs the Service imports Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more extraction of boltdb.Tx Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the use of bucket.SetSequence Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * almost done - just endpoint.Synchonise :/ Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * so, endpoint.Synchonize looks hard, but i can't find where we use it, so 'delete first refactoring' Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix test compile errors Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * test compile fixes after rebase Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix a mis-remembering I had wrt deserialisation - last time i used AnyData - jsoniter's bindTo looks interesting for the same reason Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * set us up to make the connection an interface Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * make the db connection a datastore interface, and separate out our datastore services from the bolt ones Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * rename methods to something less oltdb internals specific Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * these errors are not boltdb secific Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * start using the db-backend factory method too Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * export boltdb raw in case we can't export from the service layer Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add a raw export from boltdb to yaml for broken db's, and an export services to yaml in backup Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add the version info by hand for now Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * actually, the export from services can be fully typed - its the import that needs to do more work Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * redo raw export, and make import capable of using it Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add DockerHub Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * migration from anything older than v1.21.0 has been broken for quite a while, deleting the un-tested code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * fix go test ./... again Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * my goland wasn't setup to gofmt Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * move the two extremely dubious migration tests down into store, so they can use the test store code Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * the migrator is now free of boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * reverse goland overzealous replcement of internal with boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * more undo over-zealous goland internal->boltdb Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * yay, now bolt is only mentioned inside the api/database/ dir Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * and this might be the last of the boltdb references? Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add todo Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * extract the store code into a separate module too Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * don't need the fileService in boltdb anymore Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * use IsErrObjectNotFound() Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * use a string to select what database backend we use Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * make isNew store an ephemeral bool that doesn't stay true after we've initialised it Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * move the import.json wip to a separate file so its more obvious - we'll be using it for testing, emergency fixups, and in the next part of the store work, when we improve migrations and data model lifecycles Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * undo vscode formatting html Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * Update missing helm user repo methods * feat(store): implement store tests EE-2112 (#6224) * add store tests * add some more tests * remove redundant comments * add webhook export * update webhooks * fix build issues after rebasing * move migratorparams * remove unneeded integer type conversions * disable the db import/export for now Co-authored-by: Richard Wei <54336863+WaysonWei@users.noreply.github.com> Co-authored-by: cong meng <mcpacino@gmail.com> Co-authored-by: Simon Meng <simon.meng@portainer.io> Co-authored-by: Marcelo Rydel <marcelorydel26@gmail.com> Co-authored-by: Hao Zhang <hao.zhang@portainer.io> Co-authored-by: sunportainer <93502624+sunportainer@users.noreply.github.com> Co-authored-by: sunportainer <ericsun@SG1.local> Co-authored-by: wheresolivia <78844659+wheresolivia@users.noreply.github.com> Co-authored-by: Chaim Lev-Ari <chiptus@users.noreply.github.com> Co-authored-by: Chao Geng <93526589+chaogeng77977@users.noreply.github.com> Co-authored-by: Dmitry Salakhov <to@dimasalakhov.com> Co-authored-by: Matt Hook <hookenz@gmail.com>
3 years ago
func NewMigrator(parameters *MigratorParameters) *Migrator {
migrator := &Migrator{
currentDBVersion: parameters.CurrentDBVersion,
feat(edge-compute): add support for Edge stacks (#3827) * feat(api): introduce Edge group API (#3639) * feat(edge-groups): add object definition and service definition * feat(edge-groups): implement bolt layer * feat(edge-groups): bind service to server * feat(edge-group): add edge-group create http handler * feat(edge-groups): add list method to edge group handler * feat(edge-group): add inspect http handler * feat(edge-groups): add delete edge-group handler * feat(edge-groups): add update group handler * style(db): order by alphabetical order * fix(edge-groups): rewrite http error messages Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(main): order by alphabetical order * refactor(edge-group): relocate fetch group * fix(edge-group): reset tagids/endpoints if dynamic * refactor(server): order by alphabetical order * refactor(server): order by alphabetical order Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * Introduce a new setting to enable Edge compute features (#3654) * feat(edge-compute): add edge compute setting * feat(edge-compute): add edge compute group to sidebar * fix(settings): rename settings form group * fix(settings): align form control * Edge group associated endpoints (#3659) * chore(version): bump version number * chore(version): bump version number * feat(endpoints): filter by endpoint type (#3646) * refactor(tags): migrate tags to have association objects * 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> * refactor(tags): create tag association when creating tag * refactor(tags): delete tag association when deleting tag * refactor(db): handle error in tag association create * feat(endpoint-group): update tag assoc when creating endpoint group * feat(endpoint-group): update tag association when updating group * feat(endpoint-groups): remove group from tag associations * feat(endpoints): associate endpoint with tag on create * feat(endpoints): edit tag association when updating endpoint * fix(tags): fix merge problems * refactor(tags): remove tag association resource * fix(db): use regular tags map * style(tags): reorder props and imports * refactor(endpoint-groups): replace tag-association with tag * feat(edge-group): get associated endpoints when fetching * refactor(tags): refactor algo to update endpoint and group tags * refactor(edge-group): rename variable * refactor(tags): move calc of tags to remove to global function * fix(tags): update tag after adding association Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-groups): associate groups only with edge endpoints (#3667) * fix(edge-groups): check endpoint type when adding to edge-group * fix(edge-groups): return only edge endpoints for dynamic groups * fix(edge-compute): load edge compute setting on public setting (#3665) * Edge group list (#3644) * feat(edge-groups): add edge module * feat(edge-groups): add edge-group service * feat(edge-group): add groups list view * feat(edge-groups): add link to groups in the sidebar * feat(edge-group): show endpoints count and group type * feat(edge-group): enable removal of edge groups * refactor(edge-groups): replace datatable controller with class * refactor(edge-groups): replace function with class * fix(edge-groups): sort items by endpoints count and group type * refactor(edge-groups): use generic datatable-header component * feat(app): add trace for ui router * fix(edge-compute): add ng injection to onEnter guard * fix(edge-compute): add ng injection to onEnter guard * style(edge-compute): remove space * refactor(edge-compute): import angular * fix(app): remove ui router trace * refactor(product): revert app.js * fix(edge-compute): remove admin guard from edge routes * fix(edge-groups): change label of empty datatable Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(edge-groups): rename service * fix(edge-groups): replace icon in sidebar Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(edge-groups): remove datatable controller * refactor(edge-groups): move datatable icon to binding * refactor(edge-groups): use vanilla datatable header * refactor(datatable): remove datatable header Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(edge): rename edge group to Edge group * feat(edge-groups): edge group creation view (#3671) * feat(edge-groups): add create group view * feat(edge-groups): allow to choose group type * feat(edge-groups): implement create service handler * feat(edge-group): filter by edge endpoints * refactor(edge-groups): rename to camel case * refactor(edge-groups): replace controller with class * feat(endpoints): filter endpoints by type * refactor(edge-groups): remove comments and unneccesary async keyword * refactor(edge-group): use $async service * fix(edge-groups): replace view title Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-groups): change icon Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-groups): change icon Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(edge-groups): remove obsolete function * feat(edge-groups): add empty list messages * feat(edge-group): add description to group types * refactor(edge-groups): add finally block * feat(endpoints): search server in multi-endpoint-selector Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-group) edit view (#3672) * feat(edge-groups): add edit group view * refactor(edge-group): replace edit controller with class * refactor(edge-groups): remove async keyword * refactor(edge-groups): use $async service * refactor(edge-group): remove unnecessary functions * fix(endpoints): group by groups in endpoint-selector * feat(edge-groups): minor UI update * fix(edge-groups): provide defaults for edge group (#3682) * feat(edge-stacks): add basic views and sidebar link (#3689) * feat(edge-stacks): add mock routes * feat(edge-stacks): add link to stacks on sidebar * feat(edge-stacks): add edge stacks view * feat(edge-stacks): add create view * feat(edge-stacks): add edit view * fix(edge-stacks): use class in controller * feat(edge-stacks): add edge-stacks api (#3688) * feat(edge-stack): add edge stack types * feat(edge-stacks): add edge stack service interface * feat(edge-stacks): implement store * feat(edge-stacks): bind service to datastore * feat(edge-stacks): bind service to server * feat(edge-stack): create basic api * feat(edge-stack): create stack api * feat(edge-stacks): update api * refacotor(edge-stack): rename files * feat(edge-stack): update endpoint status * style(edge-stacks): remove comments * feat(edge-stacks): use edge stacks folder for files * fix(edge-stacks): replace bucket name Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-stacks): replace unmarshal function Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-stacks): replace edge stacks path Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * chore(git): merge develop to edge compute (#3692) * feat(support): make support type dynamic (#3621) * chore(version): bump version number * chore(version): bump version number * feat(endpoints): filter by endpoint type (#3646) * chore(assets): double UI image resolutions for HiDPI displays (#3648) Fixes #3069 Prevents users seeing blurry logos and other images when using a hidpi display (like scaled 4k, or a Retina display). These images have been recreated manually with 2x the original resolution but should resemble the originals as much as possible. They have also been run through pngcrush for compression. * 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 * 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> * chore(yarn): change start:client to start webpack dev server (#3595) * chore(yarn): change start:client to start webpack dev server * Update package.json Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * 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 * chore(yarn): add start:client script back (#3691) * 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 Co-authored-by: itsconquest <william.conquest@portainer.io> Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> Co-authored-by: Ben Brooks <ben@bbrks.me> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * Chore merge develop to edge compute (#3702) * feat(support): make support type dynamic (#3621) * chore(version): bump version number * chore(version): bump version number * feat(endpoints): filter by endpoint type (#3646) * chore(assets): double UI image resolutions for HiDPI displays (#3648) Fixes #3069 Prevents users seeing blurry logos and other images when using a hidpi display (like scaled 4k, or a Retina display). These images have been recreated manually with 2x the original resolution but should resemble the originals as much as possible. They have also been run through pngcrush for compression. * 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 * 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> * chore(yarn): change start:client to start webpack dev server (#3595) * chore(yarn): change start:client to start webpack dev server * Update package.json Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * 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 * chore(yarn): add start:client script back (#3691) * 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 * refactor(project): sort portainer types and interface definitions (#3694) * refactor(portainer): sort types * style(portainer): add comment about role service * refactor(portainer): sort interface types * refactor(portainer): sort enums * Update README.md * Update README.md * Update README.md * 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> * chore(prettier): run format on client codebase Co-authored-by: itsconquest <william.conquest@portainer.io> Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> Co-authored-by: Ben Brooks <ben@bbrks.me> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Neil Cresswell <neil@cresswell.net.nz> * feat(edge-stacks): create basic edge stack service (#3704) Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-groups): Provide a switch to use AND or OR for tags (#3695) * feat(edge-groups): add switch to form * feat(project): add property to EdgeGroup * feat(edge-groups): save mustHaveAllTags * feat(edge-groups): fetch associated endpoints (AND and OR) * feat(edge-groups): add AND selector * feat(edge-groups): default to AND * fix(edge-groups): rewrite selector options Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(endpoints): move margin to schedule form * fix(edge-groups): move the selector to top of group * refactor(edge-groups): replace partialMatch property Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-stacks): add Edge stack creation view (#3705) * feat(edge-stacks): basic creation view * feat(edge-stacks): add group selector * feat(edge-stack): create edge stack * fix(code-editor): apply digest cycle after editor is changed * style(project): reformat constants file * feat(edge-stacks): add a note about missing edge groups * fix(edge-stacks): add groups when creating stack from file * feat(edge-groups): add associated endpoints table (#3710) * feat(edge-groups): load associated endpoints * feat(endpoints): add option to filter endpoint by partial match tags * feat(edge-groups): query endpoints by PartialMatch * feat(edge-groups): reload endpoints when form changes * feat(edge-groups): remove columns * feat(edge-group): remove url column * refactor(edge-group): remove props * feat(edge-stacks): add list view (#3713) * feat(edge-stacks): basic datatable * feat(edge-stacks): remove stack * refactor(edge-stacks): convert to class * refactor(edge-stacks): replace id with stackId * feat(edge-stacks) edit edge stack view (#3716) * feat(edge-stack): load file content * feat(edge-stack): edit view * feat(edge-stack): enable update stack * refactor(edge-stacks): move form to component * feat(edge-stacks): add endpoints status * feat(edge-stacks): minor UI update Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> * feat(edge-groups) prevent deletion of edge group used by an edge stack (#3722) * feat(edge-groups): show if group belonges to edge stack * feat(edge-group): protect deletion of used edge group * feat(edge-groups): diable selection of used group * feat(edge-groups): add inuse tag (#3739) * feat(edge-groups): add inuse tag * Update app/edge/components/groups-datatable/groupsDatatable.html Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-stack): update stack version when stack file is changed (#3746) * feat(edge-stack): update version when stack file is changed * refactor(edge-stacks): move update of version to clientside * feat(edge-groups): replace Edge group endpoint selector (#3738) * feat(edge-groups): replace selector * feat(edge-group): add selector in edit form * feat(edge-groups): show tags in endpoint selector * feat(edge-groups): show the endpoint group name * fix(edge-group): remove element from associated endpoints * feat(edge-groups): add group column * feat(edge-groups): move endpoints to other column * fix(groups): disable sort * refactor(endpoints): toggle backend pagination as a property * fix(endpoints): show group name in group-association-table * feat(endpoints): truncate table columns * fix(endpoints): update group association table colspan * fix(endpoint-groups): show dash when no tags Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> * feat(edge-stacks): add api for edge to query stack config (#3748) * refactor(http): move edge validation to bouncer * feat(edge-stacks): add api for edge to query stack config * style(edge-stack): remove parentheses * Update api/http/security/bouncer.go * refactor(edge-stacks): move config inspect to endpoints handler * refactor(endpoints): move stack inspect to edge handler * style(security): fix typo Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(endpoints): rename file Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-groups): add dynamic group endpoints table (#3780) * fix(edge-stacks): update version when updating stack files (#3778) * feat(edgestacks): change status permission to edge enpoints * feat(edge-compute): add stack info to edge status inspect (#3764) * feat(edge-compute): create helper functions * feat(endpoints): add relation object and service * feat(db): create endpoint relation migration * feat(endpoints): create relation when creating endpoint * feat(endpoints): update relation when updating endpoint * feat(endpoints): delete relation when deleting endpoint * feat(endpoint): add stack status to endpoint_status * feat(edge-stacks): connect new edge stack to endpoint * refactor(edgestack): return errors.New * refactor(edgestacks): return error * refactor(edgegroup): endpoint can be related only if edge endpoint * feat(endpoints): update relation only when tags or groups were changd * refactor(tags): change tags functions to set functions * refactor(edgestack): return a list of endpoints for a list of edgegroups * feat(edgestacks): update relation when updating stack * feat(edgestacks): remove relations when deleting edge stack * feat(edgegroup): update related endpoints * feat(endpoint-group): update endpoints relations on create * feat(endpointgroup): add relatd stacks to endpoint when added to group * feat(endpoint-groups): update relation when group is changed * feat(endpointgroup): when deleting group, update its endpoints relations * feat(tags): update related endpoints when deleting tag * refactor(edge-compute): use pointers * refactor(endpointgroup): handle unassociated endpoint * fix(edgestack): show correct stack status * fix(endpoint): remove deleted endpoint from related tags * feat(edge-stacks): change acknowledged status color to blue (#3810) * feat(edge-compute): provide stack name to edge endpoint (#3809) * feat(edge-groups): when no tags selected show empty list of endpoints (#3811) * feat(edge-groups): when no tags selected show empty list of endpoints * fix(edge-group): change empty associated endpoint text * fix(edge-compute): add missing relations updates (#3817) * fix(endpoint): remove deleted endpoint from edge group * fix(tags): remove deleted tag from edge group * fix(endpoint): remove deleted endpoint from edge stack * fix(edge-groups): remove clearing of edgeGroup fields * fix(edge-groups): show dynamic edge groups without tags * fix(edge-compute): use sequential delete in resources (#3818) * fix(endpoints): delete endpoints on by one * fix(tags): remove tags one by one * fix(groups): remove endpoint groups one by one * fix(edge-stacks): remove stack one by one * fix(edge-groups): remove edge group one by one * fix(edge-stacks): add link to root in breadcrumbs * style(edge): add empty line after errors * refactor(tags): remove old function * refactor(endpoints): revert changes to multi-endpoint-selector * feat(edge-stacks): support Edge stack templates (#3812) * feat(edge-compute): fetch templates from url * feat(edge-stacks): fetch edge templates * feat(edge-stacks): choose template and save * feat(edge-stacks): add placeholder to templates select * feat(edge-templates): show info * fix(edge-stacks): fix typo * feat(edge-templates): replace template url * feat(edge-compute): use custom url if available * fix(edge-stacks): show error message when failing * feat(edge-compute): show description in template * feat(edge-templates): change access to route * style(edge-compute): change EdgeTemplatesURL description Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> Co-authored-by: itsconquest <william.conquest@portainer.io> Co-authored-by: Ben Brooks <ben@bbrks.me> Co-authored-by: Neil Cresswell <neil@cresswell.net.nz>
5 years ago
endpointGroupService: parameters.EndpointGroupService,
endpointService: parameters.EndpointService,
endpointRelationService: parameters.EndpointRelationService,
extensionService: parameters.ExtensionService,
feat(intel): Enable OpenAMT and FDO capabilities (#6212) * feat(openamt): add AMT Devices information in Environments view [INT-8] (#6169) * feat(openamt): add AMT Devices Ouf of Band Managamenet actions [INT-9] (#6171) * feat(openamt): add AMT Devices KVM Connection [INT-10] (#6179) * feat(openamt): Enhance the Environments MX to activate OpenAMT on compatible environments [INT-7] (#6196) * feat(openamt): Enable KVM by default [INT-25] (#6228) * feat(fdo): implement the FDO configuration settings INT-19 (#6238) feat(fdo): implement the FDO configuration settings INT-19 * feat(fdo): implement Owner client INT-17 (#6231) feat(fdo): implement Owner client INT-17 * feat(openamt): hide wireless config in OpenAMT form (#6250) * feat(openamt): Increase OpenAMT timeouts [INT-30] (#6253) * feat(openamt): Disable the ability to use KVM and OOB actions on a MPS disconnected device [INT-36] (#6254) * feat(fdo): add import device UI [INT-20] (#6240) feat(fdo): add import device UI INT-20 * refactor(fdo): fix develop merge issues * feat(openamt): Do not fetch OpenAMT details for an unassociated Edge endpoint (#6273) * fix(intel): Fix switches params (#6282) * feat(openamt): preload existing AMT settings (#6283) * feat(openamt): Better UI/UX for AMT activation loading [INT-39] (#6290) * feat(openamt): Remove wireless config related code [INT-41] (#6291) * yarn install * feat(openamt): change kvm redirection for pop up, always enable features [INT-37] (#6292) * feat(openamt): change kvm redirection for pop up, always enable features [INT-37] (#6293) * feat(openmt): use .ts services with axios for OpenAMT (#6312) * Minor code cleanup. * fix(fdo): move the FDO client code to the hostmanagement folder INT-44 (#6345) * refactor(intel): Add Edge Compute Settings view (#6351) * feat(fdo): add FDO profiles INT-22 (#6363) feat(fdo): add FDO profiles INT-22 * fix(fdo): fix incorrect profile URL INT-45 (#6377) * fixed husky version * fix go.mod with go mod tidy * feat(edge): migrate OpenAMT devices views to Edge Devices [EE-2322] (#6373) * feat(intel): OpenAMT UI/UX adjustments (#6394) * only allow edge agent as edge device * show all edge agent environments on Edge Devices view * feat(fdo): add the ability to import multiple ownership vouchers at once EE-2324 (#6395) * fix(edge): settings edge compute alert (#6402) * remove pagination, add useMemo for devices result array (#6409) * feat(edge): minor Edge Devices (AMT) UI fixes (#6410) * chore(eslint): fix versions * chore(app): reformat codebase * change add edge agent modal behaviour, fix yarn.lock * fix use pagination * remove extractedTranslations folder * feat(edge): add FDO Profiles Datatable [EE-2406] (#6415) * feat(edge): add KVM workaround tooltip (#6441) * feat(edge): Add default FDO profile (#6450) * feat(edge): add settings to disable trust on first connect and enforce Edge ID INT-1 EE-2410 (#6429) Co-authored-by: andres-portainer <91705312+andres-portainer@users.noreply.github.com> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: andres-portainer <andres-portainer@users.noreply.github.com> Co-authored-by: Chaim Lev-Ari <chiptus@gmail.com>
3 years ago
fdoProfilesService: parameters.FDOProfilesService,
feat(edge-compute): add support for Edge stacks (#3827) * feat(api): introduce Edge group API (#3639) * feat(edge-groups): add object definition and service definition * feat(edge-groups): implement bolt layer * feat(edge-groups): bind service to server * feat(edge-group): add edge-group create http handler * feat(edge-groups): add list method to edge group handler * feat(edge-group): add inspect http handler * feat(edge-groups): add delete edge-group handler * feat(edge-groups): add update group handler * style(db): order by alphabetical order * fix(edge-groups): rewrite http error messages Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(main): order by alphabetical order * refactor(edge-group): relocate fetch group * fix(edge-group): reset tagids/endpoints if dynamic * refactor(server): order by alphabetical order * refactor(server): order by alphabetical order Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * Introduce a new setting to enable Edge compute features (#3654) * feat(edge-compute): add edge compute setting * feat(edge-compute): add edge compute group to sidebar * fix(settings): rename settings form group * fix(settings): align form control * Edge group associated endpoints (#3659) * chore(version): bump version number * chore(version): bump version number * feat(endpoints): filter by endpoint type (#3646) * refactor(tags): migrate tags to have association objects * 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> * refactor(tags): create tag association when creating tag * refactor(tags): delete tag association when deleting tag * refactor(db): handle error in tag association create * feat(endpoint-group): update tag assoc when creating endpoint group * feat(endpoint-group): update tag association when updating group * feat(endpoint-groups): remove group from tag associations * feat(endpoints): associate endpoint with tag on create * feat(endpoints): edit tag association when updating endpoint * fix(tags): fix merge problems * refactor(tags): remove tag association resource * fix(db): use regular tags map * style(tags): reorder props and imports * refactor(endpoint-groups): replace tag-association with tag * feat(edge-group): get associated endpoints when fetching * refactor(tags): refactor algo to update endpoint and group tags * refactor(edge-group): rename variable * refactor(tags): move calc of tags to remove to global function * fix(tags): update tag after adding association Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-groups): associate groups only with edge endpoints (#3667) * fix(edge-groups): check endpoint type when adding to edge-group * fix(edge-groups): return only edge endpoints for dynamic groups * fix(edge-compute): load edge compute setting on public setting (#3665) * Edge group list (#3644) * feat(edge-groups): add edge module * feat(edge-groups): add edge-group service * feat(edge-group): add groups list view * feat(edge-groups): add link to groups in the sidebar * feat(edge-group): show endpoints count and group type * feat(edge-group): enable removal of edge groups * refactor(edge-groups): replace datatable controller with class * refactor(edge-groups): replace function with class * fix(edge-groups): sort items by endpoints count and group type * refactor(edge-groups): use generic datatable-header component * feat(app): add trace for ui router * fix(edge-compute): add ng injection to onEnter guard * fix(edge-compute): add ng injection to onEnter guard * style(edge-compute): remove space * refactor(edge-compute): import angular * fix(app): remove ui router trace * refactor(product): revert app.js * fix(edge-compute): remove admin guard from edge routes * fix(edge-groups): change label of empty datatable Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(edge-groups): rename service * fix(edge-groups): replace icon in sidebar Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(edge-groups): remove datatable controller * refactor(edge-groups): move datatable icon to binding * refactor(edge-groups): use vanilla datatable header * refactor(datatable): remove datatable header Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(edge): rename edge group to Edge group * feat(edge-groups): edge group creation view (#3671) * feat(edge-groups): add create group view * feat(edge-groups): allow to choose group type * feat(edge-groups): implement create service handler * feat(edge-group): filter by edge endpoints * refactor(edge-groups): rename to camel case * refactor(edge-groups): replace controller with class * feat(endpoints): filter endpoints by type * refactor(edge-groups): remove comments and unneccesary async keyword * refactor(edge-group): use $async service * fix(edge-groups): replace view title Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-groups): change icon Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-groups): change icon Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(edge-groups): remove obsolete function * feat(edge-groups): add empty list messages * feat(edge-group): add description to group types * refactor(edge-groups): add finally block * feat(endpoints): search server in multi-endpoint-selector Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-group) edit view (#3672) * feat(edge-groups): add edit group view * refactor(edge-group): replace edit controller with class * refactor(edge-groups): remove async keyword * refactor(edge-groups): use $async service * refactor(edge-group): remove unnecessary functions * fix(endpoints): group by groups in endpoint-selector * feat(edge-groups): minor UI update * fix(edge-groups): provide defaults for edge group (#3682) * feat(edge-stacks): add basic views and sidebar link (#3689) * feat(edge-stacks): add mock routes * feat(edge-stacks): add link to stacks on sidebar * feat(edge-stacks): add edge stacks view * feat(edge-stacks): add create view * feat(edge-stacks): add edit view * fix(edge-stacks): use class in controller * feat(edge-stacks): add edge-stacks api (#3688) * feat(edge-stack): add edge stack types * feat(edge-stacks): add edge stack service interface * feat(edge-stacks): implement store * feat(edge-stacks): bind service to datastore * feat(edge-stacks): bind service to server * feat(edge-stack): create basic api * feat(edge-stack): create stack api * feat(edge-stacks): update api * refacotor(edge-stack): rename files * feat(edge-stack): update endpoint status * style(edge-stacks): remove comments * feat(edge-stacks): use edge stacks folder for files * fix(edge-stacks): replace bucket name Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-stacks): replace unmarshal function Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-stacks): replace edge stacks path Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * chore(git): merge develop to edge compute (#3692) * feat(support): make support type dynamic (#3621) * chore(version): bump version number * chore(version): bump version number * feat(endpoints): filter by endpoint type (#3646) * chore(assets): double UI image resolutions for HiDPI displays (#3648) Fixes #3069 Prevents users seeing blurry logos and other images when using a hidpi display (like scaled 4k, or a Retina display). These images have been recreated manually with 2x the original resolution but should resemble the originals as much as possible. They have also been run through pngcrush for compression. * 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 * 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> * chore(yarn): change start:client to start webpack dev server (#3595) * chore(yarn): change start:client to start webpack dev server * Update package.json Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * 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 * chore(yarn): add start:client script back (#3691) * 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 Co-authored-by: itsconquest <william.conquest@portainer.io> Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> Co-authored-by: Ben Brooks <ben@bbrks.me> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * Chore merge develop to edge compute (#3702) * feat(support): make support type dynamic (#3621) * chore(version): bump version number * chore(version): bump version number * feat(endpoints): filter by endpoint type (#3646) * chore(assets): double UI image resolutions for HiDPI displays (#3648) Fixes #3069 Prevents users seeing blurry logos and other images when using a hidpi display (like scaled 4k, or a Retina display). These images have been recreated manually with 2x the original resolution but should resemble the originals as much as possible. They have also been run through pngcrush for compression. * 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 * 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> * chore(yarn): change start:client to start webpack dev server (#3595) * chore(yarn): change start:client to start webpack dev server * Update package.json Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * 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 * chore(yarn): add start:client script back (#3691) * 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 * refactor(project): sort portainer types and interface definitions (#3694) * refactor(portainer): sort types * style(portainer): add comment about role service * refactor(portainer): sort interface types * refactor(portainer): sort enums * Update README.md * Update README.md * Update README.md * 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> * chore(prettier): run format on client codebase Co-authored-by: itsconquest <william.conquest@portainer.io> Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> Co-authored-by: Ben Brooks <ben@bbrks.me> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Neil Cresswell <neil@cresswell.net.nz> * feat(edge-stacks): create basic edge stack service (#3704) Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-groups): Provide a switch to use AND or OR for tags (#3695) * feat(edge-groups): add switch to form * feat(project): add property to EdgeGroup * feat(edge-groups): save mustHaveAllTags * feat(edge-groups): fetch associated endpoints (AND and OR) * feat(edge-groups): add AND selector * feat(edge-groups): default to AND * fix(edge-groups): rewrite selector options Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(endpoints): move margin to schedule form * fix(edge-groups): move the selector to top of group * refactor(edge-groups): replace partialMatch property Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-stacks): add Edge stack creation view (#3705) * feat(edge-stacks): basic creation view * feat(edge-stacks): add group selector * feat(edge-stack): create edge stack * fix(code-editor): apply digest cycle after editor is changed * style(project): reformat constants file * feat(edge-stacks): add a note about missing edge groups * fix(edge-stacks): add groups when creating stack from file * feat(edge-groups): add associated endpoints table (#3710) * feat(edge-groups): load associated endpoints * feat(endpoints): add option to filter endpoint by partial match tags * feat(edge-groups): query endpoints by PartialMatch * feat(edge-groups): reload endpoints when form changes * feat(edge-groups): remove columns * feat(edge-group): remove url column * refactor(edge-group): remove props * feat(edge-stacks): add list view (#3713) * feat(edge-stacks): basic datatable * feat(edge-stacks): remove stack * refactor(edge-stacks): convert to class * refactor(edge-stacks): replace id with stackId * feat(edge-stacks) edit edge stack view (#3716) * feat(edge-stack): load file content * feat(edge-stack): edit view * feat(edge-stack): enable update stack * refactor(edge-stacks): move form to component * feat(edge-stacks): add endpoints status * feat(edge-stacks): minor UI update Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> * feat(edge-groups) prevent deletion of edge group used by an edge stack (#3722) * feat(edge-groups): show if group belonges to edge stack * feat(edge-group): protect deletion of used edge group * feat(edge-groups): diable selection of used group * feat(edge-groups): add inuse tag (#3739) * feat(edge-groups): add inuse tag * Update app/edge/components/groups-datatable/groupsDatatable.html Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-stack): update stack version when stack file is changed (#3746) * feat(edge-stack): update version when stack file is changed * refactor(edge-stacks): move update of version to clientside * feat(edge-groups): replace Edge group endpoint selector (#3738) * feat(edge-groups): replace selector * feat(edge-group): add selector in edit form * feat(edge-groups): show tags in endpoint selector * feat(edge-groups): show the endpoint group name * fix(edge-group): remove element from associated endpoints * feat(edge-groups): add group column * feat(edge-groups): move endpoints to other column * fix(groups): disable sort * refactor(endpoints): toggle backend pagination as a property * fix(endpoints): show group name in group-association-table * feat(endpoints): truncate table columns * fix(endpoints): update group association table colspan * fix(endpoint-groups): show dash when no tags Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> * feat(edge-stacks): add api for edge to query stack config (#3748) * refactor(http): move edge validation to bouncer * feat(edge-stacks): add api for edge to query stack config * style(edge-stack): remove parentheses * Update api/http/security/bouncer.go * refactor(edge-stacks): move config inspect to endpoints handler * refactor(endpoints): move stack inspect to edge handler * style(security): fix typo Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(endpoints): rename file Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-groups): add dynamic group endpoints table (#3780) * fix(edge-stacks): update version when updating stack files (#3778) * feat(edgestacks): change status permission to edge enpoints * feat(edge-compute): add stack info to edge status inspect (#3764) * feat(edge-compute): create helper functions * feat(endpoints): add relation object and service * feat(db): create endpoint relation migration * feat(endpoints): create relation when creating endpoint * feat(endpoints): update relation when updating endpoint * feat(endpoints): delete relation when deleting endpoint * feat(endpoint): add stack status to endpoint_status * feat(edge-stacks): connect new edge stack to endpoint * refactor(edgestack): return errors.New * refactor(edgestacks): return error * refactor(edgegroup): endpoint can be related only if edge endpoint * feat(endpoints): update relation only when tags or groups were changd * refactor(tags): change tags functions to set functions * refactor(edgestack): return a list of endpoints for a list of edgegroups * feat(edgestacks): update relation when updating stack * feat(edgestacks): remove relations when deleting edge stack * feat(edgegroup): update related endpoints * feat(endpoint-group): update endpoints relations on create * feat(endpointgroup): add relatd stacks to endpoint when added to group * feat(endpoint-groups): update relation when group is changed * feat(endpointgroup): when deleting group, update its endpoints relations * feat(tags): update related endpoints when deleting tag * refactor(edge-compute): use pointers * refactor(endpointgroup): handle unassociated endpoint * fix(edgestack): show correct stack status * fix(endpoint): remove deleted endpoint from related tags * feat(edge-stacks): change acknowledged status color to blue (#3810) * feat(edge-compute): provide stack name to edge endpoint (#3809) * feat(edge-groups): when no tags selected show empty list of endpoints (#3811) * feat(edge-groups): when no tags selected show empty list of endpoints * fix(edge-group): change empty associated endpoint text * fix(edge-compute): add missing relations updates (#3817) * fix(endpoint): remove deleted endpoint from edge group * fix(tags): remove deleted tag from edge group * fix(endpoint): remove deleted endpoint from edge stack * fix(edge-groups): remove clearing of edgeGroup fields * fix(edge-groups): show dynamic edge groups without tags * fix(edge-compute): use sequential delete in resources (#3818) * fix(endpoints): delete endpoints on by one * fix(tags): remove tags one by one * fix(groups): remove endpoint groups one by one * fix(edge-stacks): remove stack one by one * fix(edge-groups): remove edge group one by one * fix(edge-stacks): add link to root in breadcrumbs * style(edge): add empty line after errors * refactor(tags): remove old function * refactor(endpoints): revert changes to multi-endpoint-selector * feat(edge-stacks): support Edge stack templates (#3812) * feat(edge-compute): fetch templates from url * feat(edge-stacks): fetch edge templates * feat(edge-stacks): choose template and save * feat(edge-stacks): add placeholder to templates select * feat(edge-templates): show info * fix(edge-stacks): fix typo * feat(edge-templates): replace template url * feat(edge-compute): use custom url if available * fix(edge-stacks): show error message when failing * feat(edge-compute): show description in template * feat(edge-templates): change access to route * style(edge-compute): change EdgeTemplatesURL description Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> Co-authored-by: itsconquest <william.conquest@portainer.io> Co-authored-by: Ben Brooks <ben@bbrks.me> Co-authored-by: Neil Cresswell <neil@cresswell.net.nz>
5 years ago
registryService: parameters.RegistryService,
resourceControlService: parameters.ResourceControlService,
roleService: parameters.RoleService,
scheduleService: parameters.ScheduleService,
settingsService: parameters.SettingsService,
snapshotService: parameters.SnapshotService,
feat(edge-compute): add support for Edge stacks (#3827) * feat(api): introduce Edge group API (#3639) * feat(edge-groups): add object definition and service definition * feat(edge-groups): implement bolt layer * feat(edge-groups): bind service to server * feat(edge-group): add edge-group create http handler * feat(edge-groups): add list method to edge group handler * feat(edge-group): add inspect http handler * feat(edge-groups): add delete edge-group handler * feat(edge-groups): add update group handler * style(db): order by alphabetical order * fix(edge-groups): rewrite http error messages Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(main): order by alphabetical order * refactor(edge-group): relocate fetch group * fix(edge-group): reset tagids/endpoints if dynamic * refactor(server): order by alphabetical order * refactor(server): order by alphabetical order Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * Introduce a new setting to enable Edge compute features (#3654) * feat(edge-compute): add edge compute setting * feat(edge-compute): add edge compute group to sidebar * fix(settings): rename settings form group * fix(settings): align form control * Edge group associated endpoints (#3659) * chore(version): bump version number * chore(version): bump version number * feat(endpoints): filter by endpoint type (#3646) * refactor(tags): migrate tags to have association objects * 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> * refactor(tags): create tag association when creating tag * refactor(tags): delete tag association when deleting tag * refactor(db): handle error in tag association create * feat(endpoint-group): update tag assoc when creating endpoint group * feat(endpoint-group): update tag association when updating group * feat(endpoint-groups): remove group from tag associations * feat(endpoints): associate endpoint with tag on create * feat(endpoints): edit tag association when updating endpoint * fix(tags): fix merge problems * refactor(tags): remove tag association resource * fix(db): use regular tags map * style(tags): reorder props and imports * refactor(endpoint-groups): replace tag-association with tag * feat(edge-group): get associated endpoints when fetching * refactor(tags): refactor algo to update endpoint and group tags * refactor(edge-group): rename variable * refactor(tags): move calc of tags to remove to global function * fix(tags): update tag after adding association Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-groups): associate groups only with edge endpoints (#3667) * fix(edge-groups): check endpoint type when adding to edge-group * fix(edge-groups): return only edge endpoints for dynamic groups * fix(edge-compute): load edge compute setting on public setting (#3665) * Edge group list (#3644) * feat(edge-groups): add edge module * feat(edge-groups): add edge-group service * feat(edge-group): add groups list view * feat(edge-groups): add link to groups in the sidebar * feat(edge-group): show endpoints count and group type * feat(edge-group): enable removal of edge groups * refactor(edge-groups): replace datatable controller with class * refactor(edge-groups): replace function with class * fix(edge-groups): sort items by endpoints count and group type * refactor(edge-groups): use generic datatable-header component * feat(app): add trace for ui router * fix(edge-compute): add ng injection to onEnter guard * fix(edge-compute): add ng injection to onEnter guard * style(edge-compute): remove space * refactor(edge-compute): import angular * fix(app): remove ui router trace * refactor(product): revert app.js * fix(edge-compute): remove admin guard from edge routes * fix(edge-groups): change label of empty datatable Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(edge-groups): rename service * fix(edge-groups): replace icon in sidebar Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(edge-groups): remove datatable controller * refactor(edge-groups): move datatable icon to binding * refactor(edge-groups): use vanilla datatable header * refactor(datatable): remove datatable header Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(edge): rename edge group to Edge group * feat(edge-groups): edge group creation view (#3671) * feat(edge-groups): add create group view * feat(edge-groups): allow to choose group type * feat(edge-groups): implement create service handler * feat(edge-group): filter by edge endpoints * refactor(edge-groups): rename to camel case * refactor(edge-groups): replace controller with class * feat(endpoints): filter endpoints by type * refactor(edge-groups): remove comments and unneccesary async keyword * refactor(edge-group): use $async service * fix(edge-groups): replace view title Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-groups): change icon Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-groups): change icon Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(edge-groups): remove obsolete function * feat(edge-groups): add empty list messages * feat(edge-group): add description to group types * refactor(edge-groups): add finally block * feat(endpoints): search server in multi-endpoint-selector Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-group) edit view (#3672) * feat(edge-groups): add edit group view * refactor(edge-group): replace edit controller with class * refactor(edge-groups): remove async keyword * refactor(edge-groups): use $async service * refactor(edge-group): remove unnecessary functions * fix(endpoints): group by groups in endpoint-selector * feat(edge-groups): minor UI update * fix(edge-groups): provide defaults for edge group (#3682) * feat(edge-stacks): add basic views and sidebar link (#3689) * feat(edge-stacks): add mock routes * feat(edge-stacks): add link to stacks on sidebar * feat(edge-stacks): add edge stacks view * feat(edge-stacks): add create view * feat(edge-stacks): add edit view * fix(edge-stacks): use class in controller * feat(edge-stacks): add edge-stacks api (#3688) * feat(edge-stack): add edge stack types * feat(edge-stacks): add edge stack service interface * feat(edge-stacks): implement store * feat(edge-stacks): bind service to datastore * feat(edge-stacks): bind service to server * feat(edge-stack): create basic api * feat(edge-stack): create stack api * feat(edge-stacks): update api * refacotor(edge-stack): rename files * feat(edge-stack): update endpoint status * style(edge-stacks): remove comments * feat(edge-stacks): use edge stacks folder for files * fix(edge-stacks): replace bucket name Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-stacks): replace unmarshal function Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * fix(edge-stacks): replace edge stacks path Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * chore(git): merge develop to edge compute (#3692) * feat(support): make support type dynamic (#3621) * chore(version): bump version number * chore(version): bump version number * feat(endpoints): filter by endpoint type (#3646) * chore(assets): double UI image resolutions for HiDPI displays (#3648) Fixes #3069 Prevents users seeing blurry logos and other images when using a hidpi display (like scaled 4k, or a Retina display). These images have been recreated manually with 2x the original resolution but should resemble the originals as much as possible. They have also been run through pngcrush for compression. * 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 * 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> * chore(yarn): change start:client to start webpack dev server (#3595) * chore(yarn): change start:client to start webpack dev server * Update package.json Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * 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 * chore(yarn): add start:client script back (#3691) * 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 Co-authored-by: itsconquest <william.conquest@portainer.io> Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> Co-authored-by: Ben Brooks <ben@bbrks.me> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * Chore merge develop to edge compute (#3702) * feat(support): make support type dynamic (#3621) * chore(version): bump version number * chore(version): bump version number * feat(endpoints): filter by endpoint type (#3646) * chore(assets): double UI image resolutions for HiDPI displays (#3648) Fixes #3069 Prevents users seeing blurry logos and other images when using a hidpi display (like scaled 4k, or a Retina display). These images have been recreated manually with 2x the original resolution but should resemble the originals as much as possible. They have also been run through pngcrush for compression. * 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 * 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> * chore(yarn): change start:client to start webpack dev server (#3595) * chore(yarn): change start:client to start webpack dev server * Update package.json Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * 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 * chore(yarn): add start:client script back (#3691) * 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 * refactor(project): sort portainer types and interface definitions (#3694) * refactor(portainer): sort types * style(portainer): add comment about role service * refactor(portainer): sort interface types * refactor(portainer): sort enums * Update README.md * Update README.md * Update README.md * 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> * chore(prettier): run format on client codebase Co-authored-by: itsconquest <william.conquest@portainer.io> Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> Co-authored-by: Ben Brooks <ben@bbrks.me> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Neil Cresswell <neil@cresswell.net.nz> * feat(edge-stacks): create basic edge stack service (#3704) Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-groups): Provide a switch to use AND or OR for tags (#3695) * feat(edge-groups): add switch to form * feat(project): add property to EdgeGroup * feat(edge-groups): save mustHaveAllTags * feat(edge-groups): fetch associated endpoints (AND and OR) * feat(edge-groups): add AND selector * feat(edge-groups): default to AND * fix(edge-groups): rewrite selector options Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(endpoints): move margin to schedule form * fix(edge-groups): move the selector to top of group * refactor(edge-groups): replace partialMatch property Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-stacks): add Edge stack creation view (#3705) * feat(edge-stacks): basic creation view * feat(edge-stacks): add group selector * feat(edge-stack): create edge stack * fix(code-editor): apply digest cycle after editor is changed * style(project): reformat constants file * feat(edge-stacks): add a note about missing edge groups * fix(edge-stacks): add groups when creating stack from file * feat(edge-groups): add associated endpoints table (#3710) * feat(edge-groups): load associated endpoints * feat(endpoints): add option to filter endpoint by partial match tags * feat(edge-groups): query endpoints by PartialMatch * feat(edge-groups): reload endpoints when form changes * feat(edge-groups): remove columns * feat(edge-group): remove url column * refactor(edge-group): remove props * feat(edge-stacks): add list view (#3713) * feat(edge-stacks): basic datatable * feat(edge-stacks): remove stack * refactor(edge-stacks): convert to class * refactor(edge-stacks): replace id with stackId * feat(edge-stacks) edit edge stack view (#3716) * feat(edge-stack): load file content * feat(edge-stack): edit view * feat(edge-stack): enable update stack * refactor(edge-stacks): move form to component * feat(edge-stacks): add endpoints status * feat(edge-stacks): minor UI update Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> * feat(edge-groups) prevent deletion of edge group used by an edge stack (#3722) * feat(edge-groups): show if group belonges to edge stack * feat(edge-group): protect deletion of used edge group * feat(edge-groups): diable selection of used group * feat(edge-groups): add inuse tag (#3739) * feat(edge-groups): add inuse tag * Update app/edge/components/groups-datatable/groupsDatatable.html Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-stack): update stack version when stack file is changed (#3746) * feat(edge-stack): update version when stack file is changed * refactor(edge-stacks): move update of version to clientside * feat(edge-groups): replace Edge group endpoint selector (#3738) * feat(edge-groups): replace selector * feat(edge-group): add selector in edit form * feat(edge-groups): show tags in endpoint selector * feat(edge-groups): show the endpoint group name * fix(edge-group): remove element from associated endpoints * feat(edge-groups): add group column * feat(edge-groups): move endpoints to other column * fix(groups): disable sort * refactor(endpoints): toggle backend pagination as a property * fix(endpoints): show group name in group-association-table * feat(endpoints): truncate table columns * fix(endpoints): update group association table colspan * fix(endpoint-groups): show dash when no tags Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> * feat(edge-stacks): add api for edge to query stack config (#3748) * refactor(http): move edge validation to bouncer * feat(edge-stacks): add api for edge to query stack config * style(edge-stack): remove parentheses * Update api/http/security/bouncer.go * refactor(edge-stacks): move config inspect to endpoints handler * refactor(endpoints): move stack inspect to edge handler * style(security): fix typo Co-Authored-By: Anthony Lapenna <anthony.lapenna@portainer.io> * refactor(endpoints): rename file Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> * feat(edge-groups): add dynamic group endpoints table (#3780) * fix(edge-stacks): update version when updating stack files (#3778) * feat(edgestacks): change status permission to edge enpoints * feat(edge-compute): add stack info to edge status inspect (#3764) * feat(edge-compute): create helper functions * feat(endpoints): add relation object and service * feat(db): create endpoint relation migration * feat(endpoints): create relation when creating endpoint * feat(endpoints): update relation when updating endpoint * feat(endpoints): delete relation when deleting endpoint * feat(endpoint): add stack status to endpoint_status * feat(edge-stacks): connect new edge stack to endpoint * refactor(edgestack): return errors.New * refactor(edgestacks): return error * refactor(edgegroup): endpoint can be related only if edge endpoint * feat(endpoints): update relation only when tags or groups were changd * refactor(tags): change tags functions to set functions * refactor(edgestack): return a list of endpoints for a list of edgegroups * feat(edgestacks): update relation when updating stack * feat(edgestacks): remove relations when deleting edge stack * feat(edgegroup): update related endpoints * feat(endpoint-group): update endpoints relations on create * feat(endpointgroup): add relatd stacks to endpoint when added to group * feat(endpoint-groups): update relation when group is changed * feat(endpointgroup): when deleting group, update its endpoints relations * feat(tags): update related endpoints when deleting tag * refactor(edge-compute): use pointers * refactor(endpointgroup): handle unassociated endpoint * fix(edgestack): show correct stack status * fix(endpoint): remove deleted endpoint from related tags * feat(edge-stacks): change acknowledged status color to blue (#3810) * feat(edge-compute): provide stack name to edge endpoint (#3809) * feat(edge-groups): when no tags selected show empty list of endpoints (#3811) * feat(edge-groups): when no tags selected show empty list of endpoints * fix(edge-group): change empty associated endpoint text * fix(edge-compute): add missing relations updates (#3817) * fix(endpoint): remove deleted endpoint from edge group * fix(tags): remove deleted tag from edge group * fix(endpoint): remove deleted endpoint from edge stack * fix(edge-groups): remove clearing of edgeGroup fields * fix(edge-groups): show dynamic edge groups without tags * fix(edge-compute): use sequential delete in resources (#3818) * fix(endpoints): delete endpoints on by one * fix(tags): remove tags one by one * fix(groups): remove endpoint groups one by one * fix(edge-stacks): remove stack one by one * fix(edge-groups): remove edge group one by one * fix(edge-stacks): add link to root in breadcrumbs * style(edge): add empty line after errors * refactor(tags): remove old function * refactor(endpoints): revert changes to multi-endpoint-selector * feat(edge-stacks): support Edge stack templates (#3812) * feat(edge-compute): fetch templates from url * feat(edge-stacks): fetch edge templates * feat(edge-stacks): choose template and save * feat(edge-stacks): add placeholder to templates select * feat(edge-templates): show info * fix(edge-stacks): fix typo * feat(edge-templates): replace template url * feat(edge-compute): use custom url if available * fix(edge-stacks): show error message when failing * feat(edge-compute): show description in template * feat(edge-templates): change access to route * style(edge-compute): change EdgeTemplatesURL description Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com> Co-authored-by: itsconquest <william.conquest@portainer.io> Co-authored-by: Ben Brooks <ben@bbrks.me> Co-authored-by: Neil Cresswell <neil@cresswell.net.nz>
5 years ago
tagService: parameters.TagService,
teamMembershipService: parameters.TeamMembershipService,
stackService: parameters.StackService,
userService: parameters.UserService,
versionService: parameters.VersionService,
fileService: parameters.FileService,
authorizationService: parameters.AuthorizationService,
feat(app): rework private registries and support private registries in kubernetes EE-30 (#5131) * feat(app): rework private registries and support private registries in kubernetes [EE-30] feat(api): backport private registries backend changes (#5072) * feat(api/bolt): backport bolt changes * feat(api/exec): backport exec changes * feat(api/http): backport http/handler/dockerhub changes * feat(api/http): backport http/handler/endpoints changes * feat(api/http): backport http/handler/registries changes * feat(api/http): backport http/handler/stacks changes * feat(api/http): backport http/handler changes * feat(api/http): backport http/proxy/factory/azure changes * feat(api/http): backport http/proxy/factory/docker changes * feat(api/http): backport http/proxy/factory/utils changes * feat(api/http): backport http/proxy/factory/kubernetes changes * feat(api/http): backport http/proxy/factory changes * feat(api/http): backport http/security changes * feat(api/http): backport http changes * feat(api/internal): backport internal changes * feat(api): backport api changes * feat(api/kubernetes): backport kubernetes changes * fix(api/http): changes on backend following backport feat(app): backport private registries frontend changes (#5056) * feat(app/docker): backport docker/components changes * feat(app/docker): backport docker/helpers changes * feat(app/docker): backport docker/views/container changes * feat(app/docker): backport docker/views/images changes * feat(app/docker): backport docker/views/registries changes * feat(app/docker): backport docker/views/services changes * feat(app/docker): backport docker changes * feat(app/kubernetes): backport kubernetes/components changes * feat(app/kubernetes): backport kubernetes/converters changes * feat(app/kubernetes): backport kubernetes/models changes * feat(app/kubernetes): backport kubernetes/registries changes * feat(app/kubernetes): backport kubernetes/services changes * feat(app/kubernetes): backport kubernetes/views/applications changes * feat(app/kubernetes): backport kubernetes/views/configurations changes * feat(app/kubernetes): backport kubernetes/views/configure changes * feat(app/kubernetes): backport kubernetes/views/resource-pools changes * feat(app/kubernetes): backport kubernetes/views changes * feat(app/portainer): backport portainer/components/accessManagement changes * feat(app/portainer): backport portainer/components/datatables changes * feat(app/portainer): backport portainer/components/forms changes * feat(app/portainer): backport portainer/components/registry-details changes * feat(app/portainer): backport portainer/models changes * feat(app/portainer): backport portainer/rest changes * feat(app/portainer): backport portainer/services changes * feat(app/portainer): backport portainer/views changes * feat(app/portainer): backport portainer changes * feat(app): backport app changes * config(project): gitignore + jsconfig changes gitignore all files under api/cmd/portainer but main.go and enable Code Editor autocomplete on import ... from '@/...' fix(app): fix pull rate limit checker fix(app/registries): sidebar menus and registry accesses users filtering fix(api): add missing kube client factory fix(kube): fetch dockerhub pull limits (#5133) fix(app): pre review fixes (#5142) * fix(app/registries): remove checkbox for endpointRegistries view * fix(endpoints): allow access to default namespace * fix(docker): fetch pull limits * fix(kube/ns): show selected registries for non admin Co-authored-by: Chaim Lev-Ari <chiptus@gmail.com> chore(webpack): ignore missing sourcemaps fix(registries): fetch registry config from url feat(kube/registries): ignore not found when deleting secret feat(db): move migration to db 31 fix(registries): fix bugs in PR EE-869 (#5169) * fix(registries): hide role * fix(endpoints): set empty access policy to edge endpoint * fix(registry): remove double arguments * fix(admin): ignore warning * feat(kube/configurations): tag registry secrets (#5157) * feat(kube/configurations): tag registry secrets * feat(kube/secrets): show registry secrets for admins * fix(registries): move dockerhub to beginning * refactor(registries): use endpoint scoped registries feat(registries): filter by namespace if supplied feat(access-managment): filter users for registry (#5191) * refactor(access-manage): move users selector to component * feat(access-managment): filter users for registry refactor(registries): sync code with CE (#5200) * refactor(registry): add inspect handler under endpoints * refactor(endpoint): sync endpoint_registries_list * refactor(endpoints): sync registry_access * fix(db): rename migration functions * fix(registries): show accesses for admin * fix(kube): set token on transport * refactor(kube): move secret help to bottom * fix(kuberentes): remove shouldLog parameter * style(auth): add description of security.IsAdmin * feat(security): allow admin access to registry * feat(edge): connect to edge endpoint when creating client * style(portainer): change deprecation version * refactor(sidebar): hide manage * refactor(containers): revert changes * style(container): remove whitespace * fix(endpoint): add handler to registy on endpointService * refactor(image): use endpointService.registries * fix(kueb/namespaces): rename resource pool to namespace * fix(kube/namespace): move selected registries * fix(api/registries): hide accesses on registry creation Co-authored-by: LP B <xAt0mZ@users.noreply.github.com> refactor(api): remove code duplication after rebase fix(app/registries): replace last registry api usage by endpoint registry api fix(api/endpoints): update registry access policies on endpoint deletion (#5226) [EE-1027] fix(db): update db version * fix(dockerhub): fetch rate limits * fix(registry/tests): supply restricred context * fix(registries): show proget registry only when selected * fix(registry): create dockerhub registry * feat(db): move migrations to db 32 Co-authored-by: Chaim Lev-Ari <chiptus@gmail.com>
3 years ago
dockerhubService: parameters.DockerhubService,
edgeStackService: parameters.EdgeStackService,
edgeJobService: parameters.EdgeJobService,
TunnelServerService: parameters.TunnelServerService,
}
migrator.initMigrations()
return migrator
}
func (m *Migrator) CurrentDBVersion() string {
return m.currentDBVersion.SchemaVersion
}
func (m *Migrator) CurrentDBEdition() portainer.SoftwareEdition {
return portainer.SoftwareEdition(m.currentDBVersion.Edition)
}
func (m *Migrator) CurrentSemanticDBVersion() *semver.Version {
v, err := semver.NewVersion(m.currentDBVersion.SchemaVersion)
if err != nil {
log.Fatal().Stack().Err(err).Msg("failed to parse current version")
}
return v
}
func (m *Migrator) addMigrations(v string, funcs ...func() error) {
m.migrations = append(m.migrations, Migrations{
Version: semver.MustParse(v),
MigrationFuncs: funcs,
})
}
func (m *Migrator) LatestMigrations() Migrations {
return m.migrations[len(m.migrations)-1]
}
// !NOTE: Migration funtions should ideally be idempotent.
// ! Which simply means the function can run over the same data many times but only transform it once.
// ! In practice this really just means an extra check or two to ensure we're not destroying valid data.
// ! This is not a hard rule though. Understand the limitations. A migration function may only run over
// ! the data more than once if a new migration function is added and the version of your database schema is
// ! the same. e.g. two developers working on the same version add two different functions for different things.
// ! This increases the migration funcs count and so they all run again.
type Migrations struct {
Version *semver.Version
MigrationFuncs MigrationFuncs
}
type MigrationFuncs []func() error
func (m *Migrator) initMigrations() {
// !IMPORTANT: Do not be tempted to alter the order of these migrations.
// ! Even though one of them looks out of order. Caused by history related
// ! to maintaining two versions and releasing at different times
m.addMigrations("1.0.0", dbTooOldError) // default version found after migration
m.addMigrations("1.21",
m.updateUsersToDBVersion18,
m.updateEndpointsToDBVersion18,
m.updateEndpointGroupsToDBVersion18,
m.updateRegistriesToDBVersion18)
m.addMigrations("1.22", m.updateSettingsToDBVersion19)
m.addMigrations("1.22.1",
m.updateUsersToDBVersion20,
m.updateSettingsToDBVersion20,
m.updateSchedulesToDBVersion20)
m.addMigrations("1.23",
m.updateResourceControlsToDBVersion22,
m.updateUsersAndRolesToDBVersion22)
m.addMigrations("1.24",
m.updateTagsToDBVersion23,
m.updateEndpointsAndEndpointGroupsToDBVersion23)
m.addMigrations("1.24.1", m.updateSettingsToDB24)
m.addMigrations("2.0",
m.updateSettingsToDB25,
m.updateStacksToDB24)
m.addMigrations("2.1", m.updateEndpointSettingsToDB25)
m.addMigrations("2.2", m.updateStackResourceControlToDB27)
m.addMigrations("2.6", m.migrateDBVersionToDB30)
m.addMigrations("2.9", m.migrateDBVersionToDB32)
m.addMigrations("2.9.2", m.migrateDBVersionToDB33)
m.addMigrations("2.10.0", m.migrateDBVersionToDB34)
m.addMigrations("2.9.3", m.migrateDBVersionToDB35)
m.addMigrations("2.12", m.migrateDBVersionToDB36)
m.addMigrations("2.13", m.migrateDBVersionToDB40)
m.addMigrations("2.14", m.migrateDBVersionToDB50)
m.addMigrations("2.15", m.migrateDBVersionToDB60)
m.addMigrations("2.16", m.migrateDBVersionToDB70)
m.addMigrations("2.16.1", m.migrateDBVersionToDB71)
m.addMigrations("2.17", m.migrateDBVersionToDB80)
m.addMigrations("2.18", m.migrateDBVersionToDB90)
m.addMigrations("2.19",
m.convertSeedToPrivateKeyForDB100,
m.migrateDockerDesktopExtentionSetting,
)
// Add new migrations below...
// One function per migration, each versions migration funcs in the same file.
}
// Always is always run at the end of migrations
func (m *Migrator) Always() error {
// currently nothing to be done in CE... yet
return nil
}
func dbTooOldError() error {
return errors.New("migrating from less than Portainer 1.21.0 is not supported, please contact Portainer support")
}