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

feat(*): adopt unified plugin select page #143

Merged
merged 3 commits into from
Dec 14, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@kong-ui-public/entities-gateway-services": "^2.2.9",
"@kong-ui-public/entities-key-sets": "^2.1.13",
"@kong-ui-public/entities-keys": "^2.1.13",
"@kong-ui-public/entities-plugins": "^2.4.10",
"@kong-ui-public/entities-plugins": "^2.4.12",
"@kong-ui-public/entities-routes": "^2.2.9",
"@kong-ui-public/entities-shared": "^2.2.0",
"@kong-ui-public/entities-snis": "^2.1.13",
Expand Down
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ const sidebarItems = computed<Array<SidebarPrimaryItem>>(() => [
:deep(.kong-ui-app-layout-content-inner) {
position: relative;
min-height: 100%;
padding-bottom: 80px!important;
padding: 32px 40px 80px !important;
}

// TODO: remove this when we upgrade to Kongponents v9
Expand Down
18 changes: 18 additions & 0 deletions src/composables/useBaseGeneralConfig.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { reactive } from 'vue'
import { config } from 'config'
import { useInfoStore } from '@/stores/info'
import type { KongManagerConfig } from '@kong-ui-public/entities-shared'

const infoStore = useInfoStore()

export const useBaseGeneralConfig = () => {
return reactive({
app: 'kongManager' as const,
workspace: '',
gatewayInfo: {
edition: config.GATEWAY_EDITION,
version: infoStore.kongVersion,
},
apiBaseUrl: config.ADMIN_API_URL,
}) as KongManagerConfig
}
17 changes: 4 additions & 13 deletions src/composables/useDetailGeneralConfig.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
import { reactive } from 'vue'
import { config } from 'config'
import { useInfoStore } from '@/stores/info'
import { reactive, toRefs } from 'vue'
import type { KongManagerBaseEntityConfig } from '@kong-ui-public/entities-shared'

const infoStore = useInfoStore()
import { useBaseGeneralConfig } from './useBaseGeneralConfig'

export const useDetailGeneralConfig = () => {
return reactive({
app: 'kongManager' as const,
workspace: '',
gatewayInfo: {
edition: config.GATEWAY_EDITION,
version: infoStore.kongVersion,
},
apiBaseUrl: config.ADMIN_API_URL,
...toRefs(useBaseGeneralConfig()),
jsonYamlEnabled: true,
} as Pick<KongManagerBaseEntityConfig, 'app' | 'workspace' | 'gatewayInfo' | 'apiBaseUrl' | 'jsonYamlEnabled'>)
}) as Pick<KongManagerBaseEntityConfig, 'app' | 'workspace' | 'gatewayInfo' | 'apiBaseUrl' | 'jsonYamlEnabled'>
}
16 changes: 2 additions & 14 deletions src/composables/useFormGeneralConfig.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
import { reactive } from 'vue'
import { config } from 'config'
import { useInfoStore } from '@/stores/info'
import type { KongManagerBaseFormConfig } from '@kong-ui-public/entities-shared'

const infoStore = useInfoStore()
import { useBaseGeneralConfig } from './useBaseGeneralConfig'

export const useFormGeneralConfig = () => {
return reactive({
app: 'kongManager' as const,
workspace: '',
gatewayInfo: {
edition: config.GATEWAY_EDITION,
version: infoStore.kongVersion,
},
apiBaseUrl: config.ADMIN_API_URL,
} as Pick<KongManagerBaseFormConfig, 'app' | 'workspace' | 'gatewayInfo' | 'apiBaseUrl'>)
return useBaseGeneralConfig() as Pick<KongManagerBaseFormConfig, 'app' | 'workspace' | 'gatewayInfo' | 'apiBaseUrl'>
}
16 changes: 4 additions & 12 deletions src/composables/useListGeneralConfig.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
import { reactive } from 'vue'
import { reactive, toRefs } from 'vue'
import { config } from 'config'
import { useInfoStore } from '@/stores/info'
import type { KongManagerBaseTableConfig } from '@kong-ui-public/entities-shared'

const infoStore = useInfoStore()
import { useBaseGeneralConfig } from './useBaseGeneralConfig'

export const useListGeneralConfig = () => {
return reactive({
app: 'kongManager' as const,
workspace: '',
gatewayInfo: {
edition: config.GATEWAY_EDITION,
version: infoStore.kongVersion,
},
apiBaseUrl: config.ADMIN_API_URL,
...toRefs(useBaseGeneralConfig()),
// Kong Gateway OSS only supports exact match and does not support sorting
isExactMatch: config.GATEWAY_EDITION === 'community',
disableSorting: config.GATEWAY_EDITION === 'community',
} as Pick<KongManagerBaseTableConfig, 'app' | 'workspace' | 'gatewayInfo' | 'isExactMatch' | 'apiBaseUrl' | 'disableSorting'>)
}) as Pick<KongManagerBaseTableConfig, 'app' | 'workspace' | 'gatewayInfo' | 'isExactMatch' | 'apiBaseUrl' | 'disableSorting'>
}
92 changes: 0 additions & 92 deletions src/pages/plugins/PluginCard.vue

This file was deleted.

67 changes: 0 additions & 67 deletions src/pages/plugins/PluginCardSkeleton.vue

This file was deleted.