summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/clusters/constants.js
diff options
context:
space:
mode:
authorEnrique Alcántara <ealcantara@gitlab.com>2019-04-26 08:15:44 +0000
committerPhil Hughes <me@iamphill.com>2019-04-26 08:15:44 +0000
commit690382dda6d7404d702276413f907d5744498fde (patch)
tree8eba5d2bc72923bde41a75582f970aa53a8bece2 /app/assets/javascripts/clusters/constants.js
parent336a0a8745e7eb1bb38c6f6f0ec7832569b041bf (diff)
downloadgitlab-ce-690382dda6d7404d702276413f907d5744498fde.tar.gz
Use a FSM to determine application next state
- Separate cluster application UI state from server-side app status - Use a state machine to determine cluster application next state - Instead of using two variables to keep track of when an app is installing or updating, just use the app status property and control server-side and user events using the FSM service.
Diffstat (limited to 'app/assets/javascripts/clusters/constants.js')
-rw-r--r--app/assets/javascripts/clusters/constants.js13
1 files changed, 5 insertions, 8 deletions
diff --git a/app/assets/javascripts/clusters/constants.js b/app/assets/javascripts/clusters/constants.js
index 17849497c87..48dbce9676e 100644
--- a/app/assets/javascripts/clusters/constants.js
+++ b/app/assets/javascripts/clusters/constants.js
@@ -7,6 +7,7 @@ export const CLUSTER_TYPE = {
// These need to match what is returned from the server
export const APPLICATION_STATUS = {
+ NO_STATUS: null,
NOT_INSTALLABLE: 'not_installable',
INSTALLABLE: 'installable',
SCHEDULED: 'scheduled',
@@ -27,17 +28,13 @@ export const APPLICATION_STATUS = {
export const APPLICATION_INSTALLED_STATUSES = [
APPLICATION_STATUS.INSTALLED,
APPLICATION_STATUS.UPDATING,
- APPLICATION_STATUS.UPDATED,
- APPLICATION_STATUS.UPDATE_ERRORED,
- APPLICATION_STATUS.UNINSTALLING,
- APPLICATION_STATUS.UNINSTALL_ERRORED,
];
// These are only used client-side
-export const REQUEST_SUBMITTED = 'request-submitted';
-export const REQUEST_FAILURE = 'request-failure';
-export const UPGRADE_REQUESTED = 'upgrade-requested';
-export const UPGRADE_REQUEST_FAILURE = 'upgrade-request-failure';
+
+export const UPDATE_EVENT = 'update';
+export const INSTALL_EVENT = 'install';
+
export const INGRESS = 'ingress';
export const JUPYTER = 'jupyter';
export const KNATIVE = 'knative';