diff options
Diffstat (limited to 'app/assets/javascripts/clusters')
4 files changed, 20 insertions, 3 deletions
diff --git a/app/assets/javascripts/clusters/components/application_row.vue b/app/assets/javascripts/clusters/components/application_row.vue index 76fe076d4ff..a53b63ea592 100644 --- a/app/assets/javascripts/clusters/components/application_row.vue +++ b/app/assets/javascripts/clusters/components/application_row.vue @@ -141,6 +141,9 @@ export default { isInstalling() { return this.status === APPLICATION_STATUS.INSTALLING; }, + isExternallyInstalled() { + return this.status === APPLICATION_STATUS.EXTERNALLY_INSTALLED; + }, canInstall() { return ( this.status === APPLICATION_STATUS.NOT_INSTALLABLE || @@ -193,10 +196,17 @@ export default { label = __('Installing'); } else if (this.installed) { label = __('Installed'); + } else if (this.isExternallyInstalled) { + label = __('Externally installed'); } return label; }, + buttonGridCellClass() { + return this.showManageButton || this.status === APPLICATION_STATUS.EXTERNALLY_INSTALLED + ? 'section-25' + : 'section-15'; + }, showManageButton() { return this.manageLink && this.status === APPLICATION_STATUS.INSTALLED; }, @@ -427,8 +437,7 @@ export default { </div> </div> <div - :class="{ 'section-25': showManageButton, 'section-15': !showManageButton }" - class="table-section table-button-footer section-align-top" + :class="[buttonGridCellClass, 'table-section', 'table-button-footer', 'section-align-top']" role="gridcell" > <div v-if="showManageButton" class="btn-group table-action-buttons"> diff --git a/app/assets/javascripts/clusters/constants.js b/app/assets/javascripts/clusters/constants.js index e2227c61cee..90ec3f2377c 100644 --- a/app/assets/javascripts/clusters/constants.js +++ b/app/assets/javascripts/clusters/constants.js @@ -26,6 +26,7 @@ export const APPLICATION_STATUS = { ERROR: 'errored', PRE_INSTALLED: 'pre_installed', UNINSTALLED: 'uninstalled', + EXTERNALLY_INSTALLED: 'externally_installed', }; /* diff --git a/app/assets/javascripts/clusters/forms/show/index.js b/app/assets/javascripts/clusters/forms/show/index.js index 47a3016c777..102b240042f 100644 --- a/app/assets/javascripts/clusters/forms/show/index.js +++ b/app/assets/javascripts/clusters/forms/show/index.js @@ -1,9 +1,12 @@ import Vue from 'vue'; +import dirtySubmitFactory from '~/dirty_submit/dirty_submit_factory'; import IntegrationForm from '../components/integration_form.vue'; import { createStore } from '../stores'; export default () => { - const entryPoint = document.querySelector('#js-cluster-integration-form'); + dirtySubmitFactory(document.querySelectorAll('.js-cluster-integrations-form')); + + const entryPoint = document.querySelector('#js-cluster-details-form'); if (!entryPoint) { return; diff --git a/app/assets/javascripts/clusters/services/application_state_machine.js b/app/assets/javascripts/clusters/services/application_state_machine.js index 1dd815ae44d..2ff604af9a7 100644 --- a/app/assets/javascripts/clusters/services/application_state_machine.js +++ b/app/assets/javascripts/clusters/services/application_state_machine.js @@ -15,6 +15,7 @@ const { UNINSTALL_ERRORED, PRE_INSTALLED, UNINSTALLED, + EXTERNALLY_INSTALLED, } = APPLICATION_STATUS; const applicationStateMachine = { @@ -71,6 +72,9 @@ const applicationStateMachine = { [UNINSTALLED]: { target: UNINSTALLED, }, + [EXTERNALLY_INSTALLED]: { + target: EXTERNALLY_INSTALLED, + }, }, }, [NOT_INSTALLABLE]: { |