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(entities): remove copy events from config cards #1227

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
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,6 @@ A `@fetch:success` event is emitted when the CA Certificate is successfully fetc

A `@loading` event is emitted when loading state changes. The event payload is a boolean.

#### copy:success

A `@copy:success` event is emitted when a user clicks the `Copy JSON` button and the JSON object is copied successfully.

### Usage example

Please refer to the [sandbox](../sandbox/pages/CACertificateConfigCardPage.vue). The page is accessible by clicking on the row or `View details` button of an existing CACertificate.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,6 @@ A `@fetch:success` event is emitted when the Certificate is successfully fetched

A `@loading` event is emitted when loading state changes. The event payload is a boolean.

#### copy:success

A `@copy:success` event is emitted when a user clicks the `Copy JSON` button and the JSON object is copied successfully.

### Usage example

Please refer to the [sandbox](../sandbox/pages/CertificateConfigCardPage.vue). The page is accessible by clicking on the row or `View details` button of an existing Certificate.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@
<h2>Konnect API</h2>
<CACertificateConfigCard
:config="konnectConfig"
@copy:success="onCopy"
@fetch:error="onError"
@fetch:success="onSuccess"
/>

<h2>Kong Manager API</h2>
<CACertificateConfigCard
:config="kongManagerConfig"
@copy:success="onCopy"
@fetch:error="onError"
@fetch:success="onSuccess"
/>
Expand Down Expand Up @@ -52,7 +50,4 @@ const onError = (error: AxiosError) => {
const onSuccess = (payload: Record<string, any>) => {
console.log('fetch:success', payload)
}
const onCopy = (payload: Record<string, any>) => {
console.log('copy:success', payload)
}
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@
<h2>Konnect API</h2>
<CertificateConfigCard
:config="konnectConfig"
@copy:success="onCopy"
@fetch:error="onError"
@fetch:success="onSuccess"
/>

<h2>Kong Manager API</h2>
<CertificateConfigCard
:config="kongManagerConfig"
@copy:success="onCopy"
@fetch:error="onError"
@fetch:success="onSuccess"
/>
Expand Down Expand Up @@ -52,7 +50,4 @@ const onError = (error: AxiosError) => {
const onSuccess = (payload: Record<string, any>) => {
console.log('fetch:success', payload)
}
const onCopy = (payload: Record<string, any>) => {
console.log('copy:success', payload)
}
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
:config-schema="configSchema"
:fetch-url="fetchUrl"
:hide-title="hideTitle"
@copy:success="(entity: any) => $emit('copy:success', entity)"
@fetch:error="(err: any) => $emit('fetch:error', err)"
@fetch:success="handleFetch"
@loading="(val: boolean) => $emit('loading', val)"
Expand Down Expand Up @@ -80,7 +79,6 @@ const emit = defineEmits<{
(e: 'loading', isLoading: boolean): void
(e: 'fetch:error', error: AxiosError): void,
(e: 'fetch:success', data: Record<string, any>): void,
(e: 'copy:success', data: Record<string, any>): void,
}>()
// Component props - This structure must exist in ALL entity components, with the exclusion of unneeded action props (e.g. if you don't need `canDelete`, just exclude it)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
:config-schema="(configSchema as any)"
:fetch-url="fetchUrl"
:hide-title="hideTitle"
@copy:success="(entity: any) => $emit('copy:success', entity)"
@fetch:error="(err: any) => $emit('fetch:error', err)"
@fetch:success="handleFetch"
@loading="(val: boolean) => $emit('loading', val)"
Expand Down Expand Up @@ -148,7 +147,6 @@ const emit = defineEmits<{
(e: 'loading', isLoading: boolean): void
(e: 'fetch:error', error: AxiosError): void,
(e: 'fetch:success', data: Record<string, any>): void,
(e: 'copy:success', data: Record<string, any>): void,
}>()
// Component props - This structure must exist in ALL entity components, with the exclusion of unneeded action props (e.g. if you don't need `canDelete`, just exclude it)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,6 @@ A `@fetch:success` event is emitted when the Consumer Group is successfully fetc

A `@loading` event is emitted when loading state changes. The event payload is a boolean.

#### copy:success

A `@copy:success` event is emitted when a user clicks the `Copy JSON` button and the JSON object is copied successfully.

### Usage example

Please refer to the [sandbox](../sandbox/pages/ConsumerGroupConfigCardPage.vue). The page is accessible by clicking on the row or `View details` button of an existing Consumer Group.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@
<h2>Konnect API</h2>
<ConsumerGroupConfigCard
:config="konnectConfig"
@copy:success="onCopy"
@fetch:error="onError"
@fetch:success="onSuccess"
/>

<h2>Kong Manager API</h2>
<ConsumerGroupConfigCard
:config="kongManagerConfig"
@copy:success="onCopy"
@fetch:error="onError"
@fetch:success="onSuccess"
/>
Expand Down Expand Up @@ -52,7 +50,4 @@ const onError = (error: AxiosError) => {
const onSuccess = (payload: Record<string, any>) => {
console.log('fetch:success', payload)
}
const onCopy = (payload: Record<string, any>) => {
console.log('copy:success', payload)
}
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
data-key="consumer_group"
:fetch-url="fetchUrl"
:hide-title="hideTitle"
@copy:success="(entity: any) => $emit('copy:success', entity)"
@fetch:error="(err: any) => $emit('fetch:error', err)"
@fetch:success="(entity: any) => $emit('fetch:success', entity)"
@loading="(val: boolean) => $emit('loading', val)"
Expand All @@ -29,7 +28,6 @@ defineEmits<{
(e: 'loading', isLoading: boolean): void
(e: 'fetch:error', error: AxiosError): void,
(e: 'fetch:success', data: Record<string, any>): void,
(e: 'copy:success', data: Record<string, any>): void,
}>()
// Component props - This structure must exist in ALL entity components, with the exclusion of unneeded action props (e.g. if you don't need `canDelete`, just exclude it)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,6 @@ A `@fetch:success` event is emitted when the Consumer is successfully fetched. T

A `@loading` event is emitted when loading state changes. The event payload is a boolean.

#### copy:success

A `@copy:success` event is emitted when a user clicks the `Copy JSON` button and the JSON object is copied successfully.

### Usage example

Please refer to the [sandbox](../sandbox/pages/ConsumerConfigCardPage.vue). The page is accessible by clicking on the row or `View details` button of an existing Consumer.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@
<h2>Konnect API</h2>
<ConsumerConfigCard
:config="konnectConfig"
@copy:success="onCopy"
@fetch:error="onError"
@fetch:success="onSuccess"
/>

<h2>Kong Manager API</h2>
<ConsumerConfigCard
:config="kongManagerConfig"
@copy:success="onCopy"
@fetch:error="onError"
@fetch:success="onSuccess"
/>
Expand Down Expand Up @@ -52,7 +50,4 @@ const onError = (error: AxiosError) => {
const onSuccess = (payload: Record<string, any>) => {
console.log('fetch:success', payload)
}
const onCopy = (payload: Record<string, any>) => {
console.log('copy:success', payload)
}
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
:config-schema="configSchema"
:fetch-url="fetchUrl"
:hide-title="hideTitle"
@copy:success="(entity: any) => $emit('copy:success', entity)"
@fetch:error="(err: any) => $emit('fetch:error', err)"
@fetch:success="(entity: any) => $emit('fetch:success', entity)"
@loading="(val: boolean) => $emit('loading', val)"
Expand Down Expand Up @@ -50,7 +49,6 @@ defineEmits<{
(e: 'loading', isLoading: boolean): void
(e: 'fetch:error', error: AxiosError): void,
(e: 'fetch:success', data: Record<string, any>): void,
(e: 'copy:success', data: Record<string, any>): void,
}>()
// Component props - This structure must exist in ALL entity components, with the exclusion of unneeded action props (e.g. if you don't need `canDelete`, just exclude it)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,6 @@ A `@fetch:success` event is emitted when the gateway service is successfully fet

A `@loading` event is emitted when loading state changes. The event payload is a boolean.

#### copy:success

A `@copy:success` event is emitted when a user clicks the `Copy JSON` button and the JSON object is copied successfully.

### Usage example

Please refer to the [sandbox](../sandbox/pages/GatewayServiceConfigCardPage.vue). The page is accessible by clicking on the row or `View details` button of an existing Gateway Service.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@
<h2>Konnect API</h2>
<GatewayServiceConfigCard
:config="konnectConfig"
@copy:success="onCopy"
@fetch:error="onError"
@fetch:success="onSuccess"
/>

<h2>Kong Manager API</h2>
<GatewayServiceConfigCard
:config="kongManagerConfig"
@copy:success="onCopy"
@fetch:error="onError"
@fetch:success="onSuccess"
/>
Expand Down Expand Up @@ -52,7 +50,4 @@ const onError = (error: AxiosError) => {
const onSuccess = (payload: Record<string, any>) => {
console.log('fetch:success', payload)
}
const onCopy = (payload: Record<string, any>) => {
console.log('copy:success', payload)
}
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
:config-schema="configSchema"
:fetch-url="fetchUrl"
:hide-title="hideTitle"
@copy:success="(entity: any) => $emit('copy:success', entity)"
@fetch:error="(err: any) => $emit('fetch:error', err)"
@fetch:success="(entity: any) => $emit('fetch:success', entity)"
@loading="(val: boolean) => $emit('loading', val)"
Expand Down Expand Up @@ -79,7 +78,6 @@ defineEmits<{
(e: 'loading', isLoading: boolean): void
(e: 'fetch:error', error: AxiosError): void,
(e: 'fetch:success', data: Record<string, any>): void,
(e: 'copy:success', data: Record<string, any>): void,
}>()
// Component props - This structure must exist in ALL entity components, with the exclusion of unneeded action props (e.g. if you don't need `canDelete`, just exclude it)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,6 @@ A `@fetch:success` event is emitted when the Key Sets is successfully fetched. T

A `@loading` event is emitted when loading state changes. The event payload is a boolean.

#### copy:success

A `@copy:success` event is emitted when a user clicks the `Copy JSON` button and the JSON object is copied successfully.

### Usage example

Please refer to the [sandbox](../sandbox/pages/KeySetConfigCardPage.vue). The page is accessible by clicking on the row or `View details` button of an existing Ke Sets.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@
<h2>Konnect API</h2>
<KeySetConfigCard
:config="konnectConfig"
@copy:success="onCopy"
@fetch:error="onError"
@fetch:success="onSuccess"
/>

<h2>Kong Manager API</h2>
<KeySetConfigCard
:config="kongManagerConfig"
@copy:success="onCopy"
@fetch:error="onError"
@fetch:success="onSuccess"
/>
Expand Down Expand Up @@ -49,7 +47,4 @@ const onError = (error: AxiosError) => {
const onSuccess = (payload: Record<string, any>) => {
console.log('fetch:success', payload)
}
const onCopy = (payload: Record<string, any>) => {
console.log('copy:success', payload)
}
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
:config-schema="configSchema"
:fetch-url="fetchUrl"
:hide-title="hideTitle"
@copy:success="(entity: any) => $emit('copy:success', entity)"
@fetch:error="(err: any) => $emit('fetch:error', err)"
@fetch:success="(entity: any) => $emit('fetch:success', entity)"
@loading="(val: boolean) => $emit('loading', val)"
Expand All @@ -32,7 +31,6 @@ defineEmits<{
(e: 'loading', isLoading: boolean): void
(e: 'fetch:error', error: AxiosError): void,
(e: 'fetch:success', data: Record<string, any>): void,
(e: 'copy:success', data: Record<string, any>): void,
}>()

// Component props - This structure must exist in ALL entity components, with the exclusion of unneeded action props (e.g. if you don't need `canDelete`, just exclude it)
Expand Down
4 changes: 0 additions & 4 deletions packages/entities/entities-keys/docs/key-config-card.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,6 @@ A `@fetch:success` event is emitted when the Key is successfully fetched. The ev

A `@loading` event is emitted when loading state changes. The event payload is a boolean.

#### copy:success

A `@copy:success` event is emitted when a user clicks the `Copy JSON` button and the JSON object is copied successfully.

#### navigation-click

A `@navigation-click` event is emitted when a user clicks the `key set name` button and the event payload is the entity type (`key-sets`) and the key set id.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<KeyConfigCard
:config="konnectConfig"
:key-set-id="keySetId"
@copy:success="onCopy"
@fetch:error="onError"
@fetch:success="onSuccess"
/>
Expand All @@ -12,7 +11,6 @@
<KeyConfigCard
:config="kongManagerConfig"
:key-set-id="keySetId"
@copy:success="onCopy"
@fetch:error="onError"
@fetch:success="onSuccess"
/>
Expand Down Expand Up @@ -62,7 +60,4 @@ const onError = (error: AxiosError) => {
const onSuccess = (payload: Record<string, any>) => {
console.log('fetch:success', payload)
}
const onCopy = (payload: Record<string, any>) => {
console.log('copy:success', payload)
}
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
:config-schema="configSchema"
:fetch-url="fetchUrl"
:hide-title="hideTitle"
@copy:success="(entity: any) => $emit('copy:success', entity)"
@fetch:error="(err: any) => $emit('fetch:error', err)"
@fetch:success="handleSuccess"
@loading="(val: boolean) => $emit('loading', val)"
Expand Down Expand Up @@ -82,7 +81,6 @@ const emit = defineEmits<{
(e: 'loading', isLoading: boolean): void
(e: 'fetch:error', error: AxiosError): void,
(e: 'fetch:success', data: Record<string, any>): void,
(e: 'copy:success', data: Record<string, any>): void,
(e: 'navigation-click', id: string, entityType: string): void,
}>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,6 @@ A `@fetch:success` event is emitted when the Plugin is successfully fetched. The

A `@loading` event is emitted when loading state changes. The event payload is a boolean.

#### copy:success

A `@copy:success` event is emitted when a user clicks the `Copy JSON` button and the JSON object is copied successfully.

### Usage example

Please refer to the [sandbox](../sandbox/pages/PluginConfigCardPage.vue). The page is accessible by clicking on the row or `View details` button of an existing Plugin.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@
<h2>Konnect API</h2>
<PluginConfigCard
:config="konnectConfig"
@copy:success="onCopy"
@fetch:error="onError"
@fetch:success="onSuccess"
/>

<h2>Kong Manager API</h2>
<PluginConfigCard
:config="kongManagerConfig"
@copy:success="onCopy"
@fetch:error="onError"
@fetch:success="onSuccess"
/>
Expand Down Expand Up @@ -59,7 +57,4 @@ const onError = (error: AxiosError) => {
const onSuccess = (payload: Record<string, any>) => {
console.log('fetch:success', payload)
}
const onCopy = (payload: Record<string, any>) => {
console.log('copy:success', payload)
}
</script>
Loading
Loading