Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(*): remove outdated event handlers #193

Merged
merged 1 commit into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions src/pages/ca-certificates/Detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@
<CACertificateConfigCard
:config="caCertificateDetailConfig"
@fetch:success="onFetchSuccess"
@copy:success="onCopySuccess"
/>
</template>

<script setup lang="ts">
import { useCopyEventHandlers } from '@/composables/useCopyEventHandlers'
import { useDetailGeneralConfig } from '@/composables/useDetailGeneralConfig'
import { useI18n } from '@/composables/useI18n'
import { CACertificateConfigCard } from '@kong-ui-public/entities-certificates'
Expand All @@ -37,14 +35,6 @@ const caCertificateDetailConfig = reactive({
entityId: id.value,
})

const { onCopySuccess: openToaster } = useCopyEventHandlers()

const onCopySuccess = () => {
openToaster({
message: t('global.copied'),
})
}

const onFetchSuccess = (entity) => {
titleId.value = entity.id
}
Expand Down
10 changes: 0 additions & 10 deletions src/pages/certificates/Detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@
<CertificateConfigCard
:config="certificateDetailConfig"
@fetch:success="onFetchSuccess"
@copy:success="onCopySuccess"
/>
</template>

<script setup lang="ts">
import { useCopyEventHandlers } from '@/composables/useCopyEventHandlers'
import { useDetailGeneralConfig } from '@/composables/useDetailGeneralConfig'
import { useI18n } from '@/composables/useI18n'
import { CertificateConfigCard } from '@kong-ui-public/entities-certificates'
Expand All @@ -37,14 +35,6 @@ const certificateDetailConfig = reactive({
entityId: id.value,
})

const { onCopySuccess: openToaster } = useCopyEventHandlers()

const onCopySuccess = () => {
openToaster({
message: t('global.copied'),
})
}

const onFetchSuccess = (entity) => {
titleId.value = entity.id
}
Expand Down
10 changes: 0 additions & 10 deletions src/pages/consumers/Detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<ConsumerConfigCard
:config="consumerDetailConfig"
@fetch:success="onFetchSuccess"
@copy:success="onCopySuccess"
/>
</template>
<template #credentials>
Expand All @@ -32,7 +31,6 @@ import { computed, reactive, ref, onMounted } from 'vue'
import { useRoute } from 'vue-router'
import { ConsumerConfigCard } from '@kong-ui-public/entities-consumers'
import { useDetailGeneralConfig } from '@/composables/useDetailGeneralConfig'
import { useCopyEventHandlers } from '@/composables/useCopyEventHandlers'
import { useI18n } from '@/composables/useI18n'
import { useTabs } from '@/composables/useTabs'
import { apiService } from '@/services/apiService'
Expand Down Expand Up @@ -68,14 +66,6 @@ const consumerDetailConfig = reactive({
entityId: id.value,
})

const { onCopySuccess: openToaster } = useCopyEventHandlers()

const onCopySuccess = () => {
openToaster({
message: t('global.copied'),
})
}

const onFetchSuccess = (entity) => {
titleName.value = entity.username ?? entity.custom_id
}
Expand Down
10 changes: 0 additions & 10 deletions src/pages/key-sets/Detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<KeySetConfigCard
:config="keySetDetailConfig"
@fetch:success="onFetchSuccess"
@copy:success="onCopySuccess"
/>
</template>
<template #keys>
Expand All @@ -29,7 +28,6 @@ import { computed, reactive, ref, onMounted } from 'vue'
import { useRoute } from 'vue-router'
import { KeySetConfigCard } from '@kong-ui-public/entities-key-sets'
import { useDetailGeneralConfig } from '@/composables/useDetailGeneralConfig'
import { useCopyEventHandlers } from '@/composables/useCopyEventHandlers'
import { useI18n } from '@/composables/useI18n'
import { useTabs } from '@/composables/useTabs'
import { apiService } from '@/services/apiService'
Expand Down Expand Up @@ -60,14 +58,6 @@ const keySetDetailConfig = reactive({
entityId: id.value,
})

const { onCopySuccess: openToaster } = useCopyEventHandlers()

const onCopySuccess = () => {
openToaster({
message: t('global.copied'),
})
}

const onFetchSuccess = (entity) => {
titleName.value = entity.name ?? entity.id
}
Expand Down
10 changes: 0 additions & 10 deletions src/pages/keys/Detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
:config="keyDetailConfig"
:key-set-id="keySetId"
@fetch:success="onFetchSuccess"
@copy:success="onCopySuccess"
@navigation-click="onNavigationClick"
/>
</template>
Expand All @@ -20,7 +19,6 @@ import { computed, reactive, ref } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { KeyConfigCard } from '@kong-ui-public/entities-keys'
import { useDetailGeneralConfig } from '@/composables/useDetailGeneralConfig'
import { useCopyEventHandlers } from '@/composables/useCopyEventHandlers'
import { useI18n } from '@/composables/useI18n'

defineOptions({
Expand All @@ -41,14 +39,6 @@ const keyDetailConfig = reactive({
entityId: id.value,
})

const { onCopySuccess: openToaster } = useCopyEventHandlers()

const onCopySuccess = () => {
openToaster({
message: t('global.copied'),
})
}

const onNavigationClick = (id: string) => {
router.push({
name: 'key-set-detail',
Expand Down
12 changes: 0 additions & 12 deletions src/pages/plugins/Detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
:config="pluginDetailConfig"
:scoped-entity-type="entityScope?.typeLiteral"
:scoped-entity-id="entityScope?.id"
@copy:success="onCopySuccess"
/>
</template>

Expand All @@ -33,16 +32,13 @@ import { computed, reactive } from 'vue'
import { useRoute } from 'vue-router'
import { PluginConfigCard, PluginIcon } from '@kong-ui-public/entities-plugins'
import { useDetailGeneralConfig } from '@/composables/useDetailGeneralConfig'
import { useCopyEventHandlers } from '@/composables/useCopyEventHandlers'
import { useI18n } from '@/composables/useI18n'
import { pluginMeta } from '@/pages/plugins/PluginMeta'

defineOptions({
name: 'PluginDetail',
})

const route = useRoute()
const { t } = useI18n()

const id = computed(() => (route.params.id as string) ?? '')
const pluginType = computed(() => (route.params.pluginType ?? '') as string)
Expand Down Expand Up @@ -75,14 +71,6 @@ const pluginDetailConfig = reactive({
entityId: id.value,
pluginType: pluginType.value,
})

const { onCopySuccess: openToaster } = useCopyEventHandlers()

const onCopySuccess = () => {
openToaster({
message: t('global.copied'),
})
}
</script>

<style scoped lang="scss">
Expand Down
10 changes: 0 additions & 10 deletions src/pages/routes/Detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
:service-id="serviceId"
@navigation-click="onNavigationClick"
@fetch:success="onFetchSuccess"
@copy:success="onCopySuccess"
/>
</template>
<template #plugins>
Expand All @@ -32,7 +31,6 @@ import { computed, reactive, ref, onMounted } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { RouteConfigCard } from '@kong-ui-public/entities-routes'
import { useDetailGeneralConfig } from '@/composables/useDetailGeneralConfig'
import { useCopyEventHandlers } from '@/composables/useCopyEventHandlers'
import { useI18n } from '@/composables/useI18n'
import { useTabs } from '@/composables/useTabs'
import { useListRedirect } from '@/composables/useListRedirect'
Expand Down Expand Up @@ -68,14 +66,6 @@ const routeDetailConfig = reactive({
entityId: id.value,
})

const { onCopySuccess: openToaster } = useCopyEventHandlers()

const onCopySuccess = () => {
openToaster({
message: t('global.copied'),
})
}

const onFetchSuccess = (entity) => {
titleName.value = entity.name ?? entity.id
}
Expand Down
10 changes: 0 additions & 10 deletions src/pages/services/Detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<GatewayServiceConfigCard
:config="serviceDetailConfig"
@fetch:success="onFetchSuccess"
@copy:success="onCopySuccess"
/>
</template>
<template #routes>
Expand All @@ -32,7 +31,6 @@ import { computed, reactive, ref, onMounted } from 'vue'
import { useRoute } from 'vue-router'
import { GatewayServiceConfigCard } from '@kong-ui-public/entities-gateway-services'
import { useDetailGeneralConfig } from '@/composables/useDetailGeneralConfig'
import { useCopyEventHandlers } from '@/composables/useCopyEventHandlers'
import { useI18n } from '@/composables/useI18n'
import { useTabs } from '@/composables/useTabs'
import { apiService } from '@/services/apiService'
Expand Down Expand Up @@ -68,14 +66,6 @@ const serviceDetailConfig = reactive({
entityId: id.value,
})

const { onCopySuccess: openToaster } = useCopyEventHandlers()

const onCopySuccess = () => {
openToaster({
message: t('global.copied'),
})
}

const onFetchSuccess = (entity) => {
titleName.value = entity.name ?? entity.id
}
Expand Down
10 changes: 0 additions & 10 deletions src/pages/upstreams/Detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<UpstreamsConfigCard
:config="upstreamDetailConfig"
@fetch:success="onFetchSuccess"
@copy:success="onCopySuccess"
/>
</template>
<template #targets>
Expand All @@ -29,7 +28,6 @@ import { computed, reactive, ref } from 'vue'
import { useRoute } from 'vue-router'
import { UpstreamsConfigCard } from '@kong-ui-public/entities-upstreams-targets'
import { useDetailGeneralConfig } from '@/composables/useDetailGeneralConfig'
import { useCopyEventHandlers } from '@/composables/useCopyEventHandlers'
import { useI18n } from '@/composables/useI18n'
import { useTabs } from '@/composables/useTabs'

Expand Down Expand Up @@ -60,14 +58,6 @@ const upstreamDetailConfig = reactive({
entityId: id.value,
})

const { onCopySuccess: openToaster } = useCopyEventHandlers()

const onCopySuccess = () => {
openToaster({
message: t('global.copied'),
})
}

const onFetchSuccess = (entity) => {
titleName.value = entity.name ?? entity.id
}
Expand Down
10 changes: 0 additions & 10 deletions src/pages/vaults/Detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<VaultConfigCard
:config="vaultDetailConfig"
@fetch:success="onFetchSuccess"
@copy:success="onCopySuccess"
/>
</template>

Expand All @@ -18,7 +17,6 @@ import { computed, reactive, ref } from 'vue'
import { useRoute } from 'vue-router'
import { VaultConfigCard } from '@kong-ui-public/entities-vaults'
import { useDetailGeneralConfig } from '@/composables/useDetailGeneralConfig'
import { useCopyEventHandlers } from '@/composables/useCopyEventHandlers'
import { useI18n } from '@/composables/useI18n'

defineOptions({
Expand All @@ -37,14 +35,6 @@ const vaultDetailConfig = reactive({
entityId: id.value,
})

const { onCopySuccess: openToaster } = useCopyEventHandlers()

const onCopySuccess = () => {
openToaster({
message: t('global.copied'),
})
}

const onFetchSuccess = (entity) => {
titleName.value = entity.name ?? entity.id
}
Expand Down
Loading