-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
559 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/entities/entities-redis-configurations/sandbox/pages/HomePage.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
packages/entities/entities-redis-configurations/sandbox/pages/RedisConfigurationListPage.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<template> | ||
<SandboxPermissionsControl | ||
@update="handlePermissionsUpdate" | ||
/> | ||
|
||
<h2>Konnect API</h2> | ||
<RedisConfigurationList | ||
:config="konnectConfig" | ||
/> | ||
|
||
<h2>Kong Manager API</h2> | ||
<RedisConfigurationList | ||
:config="kongManagerConfig" | ||
/> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { ref } from 'vue' | ||
import SandboxPermissionsControl from '@entities-shared-sandbox/components/SandboxPermissionsControl.vue' | ||
import { RedisConfigurationList } from '../../src' | ||
import type { | ||
KonnectRedisConfigurationListConfig, | ||
KongManagerRedisConfigurationListConfig, | ||
} from '../../src' | ||
import type { PermissionsActions } from '@entities-shared-sandbox/components/SandboxPermissionsControl.vue' | ||
const controlPlaneId = import.meta.env.VITE_KONNECT_CONTROL_PLANE_ID || '' | ||
const konnectConfig: KonnectRedisConfigurationListConfig = { | ||
app: 'konnect', | ||
apiBaseUrl: '/us/kong-api', | ||
controlPlaneId, | ||
createRoute: { name: 'create-redis-configuration' }, | ||
getViewRoute: (id: string) => ({ name: 'view-redis-configuration', params: { id } }), | ||
getEditRoute: (id: string) => ({ name: 'edit-redis-configuration', params: { id } }), | ||
} | ||
const kongManagerConfig: KongManagerRedisConfigurationListConfig = { | ||
app: 'kongManager', | ||
workspace: 'default', | ||
apiBaseUrl: '/kong-manager', | ||
createRoute: { name: 'create-redis-configuration' }, | ||
getViewRoute: (id: string) => ({ name: 'view-redis-configuration', params: { id } }), | ||
getEditRoute: (id: string) => ({ name: 'edit-redis-configuration', params: { id } }), | ||
} | ||
// Remount the tables in the sandbox when the permission props change; not needed outside of a sandbox | ||
const key = ref(1) | ||
const permissions = ref<PermissionsActions | null>(null) | ||
const handlePermissionsUpdate = (newPermissions: PermissionsActions) => { | ||
permissions.value = newPermissions | ||
key.value++ | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.