diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2018-01-05 17:31:01 +0300 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2018-01-05 17:31:12 +0300 |
commit | 7c7f52668420007d551549f34df66345f1373e36 (patch) | |
tree | 0b60313c82ecb499337645bfc22c6ae4ec6f8240 /app/assets/javascripts/deploy_keys/components/app.vue | |
parent | 1525b00540760ec5ae39160ac48189f295535199 (diff) |
[ci skip] Fix more rules
Diffstat (limited to 'app/assets/javascripts/deploy_keys/components/app.vue')
-rw-r--r-- | app/assets/javascripts/deploy_keys/components/app.vue | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/app/assets/javascripts/deploy_keys/components/app.vue b/app/assets/javascripts/deploy_keys/components/app.vue index fe046449054..7b68b19de75 100644 --- a/app/assets/javascripts/deploy_keys/components/app.vue +++ b/app/assets/javascripts/deploy_keys/components/app.vue @@ -7,11 +7,9 @@ import loadingIcon from '../../vue_shared/components/loading_icon.vue'; export default { - data() { - return { - isLoading: false, - store: new DeployKeysStore(), - }; + components: { + keysPanel, + loadingIcon, }, props: { endpoint: { @@ -19,6 +17,12 @@ required: true, }, }, + data() { + return { + isLoading: false, + store: new DeployKeysStore(), + }; + }, computed: { hasKeys() { return Object.keys(this.keys).length; @@ -27,9 +31,20 @@ return this.store.keys; }, }, - components: { - keysPanel, - loadingIcon, + created() { + this.service = new DeployKeysService(this.endpoint); + + eventHub.$on('enable.key', this.enableKey); + eventHub.$on('remove.key', this.disableKey); + eventHub.$on('disable.key', this.disableKey); + }, + mounted() { + this.fetchKeys(); + }, + beforeDestroy() { + eventHub.$off('enable.key', this.enableKey); + eventHub.$off('remove.key', this.disableKey); + eventHub.$off('disable.key', this.disableKey); }, methods: { fetchKeys() { @@ -59,21 +74,6 @@ } }, }, - created() { - this.service = new DeployKeysService(this.endpoint); - - eventHub.$on('enable.key', this.enableKey); - eventHub.$on('remove.key', this.disableKey); - eventHub.$on('disable.key', this.disableKey); - }, - mounted() { - this.fetchKeys(); - }, - beforeDestroy() { - eventHub.$off('enable.key', this.enableKey); - eventHub.$off('remove.key', this.disableKey); - eventHub.$off('disable.key', this.disableKey); - }, }; </script> |