diff options
author | Enrique Alcantara <ealcantara@gitlab.com> | 2019-05-01 15:56:23 +0300 |
---|---|---|
committer | Enrique Alcantara <ealcantara@gitlab.com> | 2019-05-02 22:31:16 +0300 |
commit | 3945e18176db929c758b03510c92b31c6da2bf3b (patch) | |
tree | 50974847aeb956991505461673942db599c6b4f9 /app/assets/javascripts/clusters | |
parent | f98758753a73841d2374aad986ae795da828ddca (diff) |
CE-backport track uninstall button clicks
Diffstat (limited to 'app/assets/javascripts/clusters')
-rw-r--r-- | app/assets/javascripts/clusters/components/uninstall_application_confirmation_modal.vue | 10 | ||||
-rw-r--r-- | app/assets/javascripts/clusters/mixins/track_uninstall_button_click.js | 5 |
2 files changed, 14 insertions, 1 deletions
diff --git a/app/assets/javascripts/clusters/components/uninstall_application_confirmation_modal.vue b/app/assets/javascripts/clusters/components/uninstall_application_confirmation_modal.vue index 80ba2f22198..65827f1cb6a 100644 --- a/app/assets/javascripts/clusters/components/uninstall_application_confirmation_modal.vue +++ b/app/assets/javascripts/clusters/components/uninstall_application_confirmation_modal.vue @@ -1,6 +1,7 @@ <script> import { GlModal } from '@gitlab/ui'; import { sprintf, s__ } from '~/locale'; +import trackUninstallButtonClickMixin from 'ee_else_ce/clusters/mixins/track_uninstall_button_click'; import { INGRESS, CERT_MANAGER, PROMETHEUS, RUNNER, KNATIVE, JUPYTER } from '../constants'; const CUSTOM_APP_WARNING_TEXT = { @@ -20,6 +21,7 @@ export default { components: { GlModal, }, + mixins: [trackUninstallButtonClickMixin], props: { application: { type: String, @@ -51,6 +53,12 @@ export default { return `uninstall-${this.application}`; }, }, + methods: { + confirmUninstall() { + this.trackUninstallButtonClick(this.application); + this.$emit('confirm'); + }, + }, }; </script> <template> @@ -60,7 +68,7 @@ export default { :ok-title="title" :modal-id="modalId" :title="title" - @ok="$emit('confirm')" + @ok="confirmUninstall()" >{{ warningText }} {{ customAppWarningText }}</gl-modal > </template> diff --git a/app/assets/javascripts/clusters/mixins/track_uninstall_button_click.js b/app/assets/javascripts/clusters/mixins/track_uninstall_button_click.js new file mode 100644 index 00000000000..18f65b234d3 --- /dev/null +++ b/app/assets/javascripts/clusters/mixins/track_uninstall_button_click.js @@ -0,0 +1,5 @@ +export default { + methods: { + trackUninstallButtonClick: () => {}, + }, +}; |