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(jsonYamlForms): remove json yaml milestone 2 ff for all entity forms post GA [KHCP-9971] #1259

Merged
merged 2 commits into from
Mar 18, 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 @@ -41,7 +41,6 @@ const konnectConfig = ref<KonnectCertificateFormConfig>({
// Set the root `.env.development.local` variable to a control plane your PAT can access
controlPlaneId,
cancelRoute: { name: 'ca-certificate-list' },
jsonYamlFormsEnabled: true,
})

const kongManagerConfig = ref<KongManagerCertificateFormConfig>({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ const konnectConfig = ref<KonnectCertificateFormConfig>({
// Set the root `.env.development.local` variable to a control plane your PAT can access
controlPlaneId,
cancelRoute: { name: 'certificate-list' },
jsonYamlFormsEnabled: true,
})

const kongManagerConfig = ref<KongManagerCertificateFormConfig>({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ const konnectConfig = ref<KonnectConsumerGroupFormConfig>({
apiBaseUrl: '/us/kong-api/konnect-api',
controlPlaneId,
cancelRoute: { name: 'consumer-group-list' },
jsonYamlFormsEnabled: true,
})

const KMConfig = ref<KongManagerConsumerGroupFormConfig>({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ const konnectConfig = ref<KonnectConsumerFormConfig>({
apiBaseUrl: '/us/kong-api/konnect-api',
controlPlaneId,
cancelRoute: { name: 'consumer-list' },
jsonYamlFormsEnabled: true,
})

const KMConfig = ref<KongManagerConsumerFormConfig>({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ const konnectConfig = ref<KonnectGatewayServiceFormConfig>({
// Set the root `.env.development.local` variable to a control plane your PAT can access
controlPlaneId,
cancelRoute: { name: 'gateway-services-list' },
jsonYamlFormsEnabled: true,
})

const kongManagerConfig = ref<KongManagerGatewayServiceFormConfig>({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const baseConfigKonnect:KonnectGatewayServiceFormConfig = {
controlPlaneId: '1234-abcd-ilove-dogs',
apiBaseUrl: '/us/kong-api/konnect-api',
cancelRoute,
jsonYamlFormsEnabled: true,
}

const baseConfigKM:KongManagerGatewayServiceFormConfig = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ const konnectConfig = ref<KonnectKeySetFormConfig>({
// Set the root `.env.development.local` variable to a control plane your PAT can access
controlPlaneId,
cancelRoute: { name: 'key-set-list' },
jsonYamlFormsEnabled: true,
})
const kongManagerConfig = ref<KongManagerKeySetFormConfig>({
app: 'kongManager',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ const konnectConfig = ref<KonnectKeyFormConfig>({
// Set the root `.env.development.local` variable to a control plane your PAT can access
controlPlaneId,
cancelRoute: { name: 'key-list' },
jsonYamlFormsEnabled: true,
})

const kongManagerConfig = ref<KongManagerKeyFormConfig>({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ const konnectConfig = ref<KonnectPluginFormConfig>({
// entityId: '6f1ef200-d3d4-4979-9376-726f2216d90c',
backRoute: { name: 'select-plugin' },
cancelRoute: { name: 'home' },
jsonYamlFormsEnabled: true,
groupFields: true,
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,13 @@
v-else
class="plugin-form-actions"
>
<div v-if="config.jsonYamlFormsEnabled">
<KButton
appearance="tertiary"
data-testid="form-view-configuration"
@click="toggle()"
>
{{ t('actions.view_configuration') }}
</KButton>
</div>
<KButton
appearance="tertiary"
data-testid="form-view-configuration"
@click="toggle()"
>
{{ t('actions.view_configuration') }}
</KButton>
<KButton
appearance="secondary"
class="form-action-button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ const konnectConfig = ref<KonnectRouteFormConfig>({
// Set the root `.env.development.local` variable to a control plane your PAT can access
controlPlaneId,
cancelRoute: { name: 'route-list' },
jsonYamlFormsEnabled: true,
})

const kongManagerConfig = ref<KongManagerRouteFormConfig>({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,6 @@ A base display component for an entity's record data.
- default: `undefined`
- The ID of the entity to display record data for.

- `jsonYamlFormsEnabled`:
- type: `boolean`
- required: `false`
- default: `false`
- Feature flag value for JSON/YAML Forms. Will be removed after feature goes GA.

The base konnect or kongManger config.

#### `fetchUrl`
Expand Down
6 changes: 0 additions & 6 deletions packages/entities/entities-shared/docs/entity-base-form.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,6 @@ A base form component for entity create/edit views.
- default: `undefined`
- Route to return to when canceling creation of an entity.

- `jsonYamlFormsEnabled`:
- type: `boolean`
- required: `false`
- default: `false`
- Feature flag value for JSON/YAML Forms. Will be removed after feature goes GA.

- `workspace`:
- type: `string`
- required: `true`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ const konnectConfig = ref<KonnectBaseEntityConfig>({
// Set the root `.env.development.local` variable to a control plane your PAT can access
controlPlaneId,
entityId,
jsonYamlFormsEnabled: true,
})

const item = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ const konnectConfig = ref<KonnectBaseFormConfig>({
// Set the root `.env.development.local` variable to a control plane your PAT can access
controlPlaneId,
cancelRoute: { name: '/' },
jsonYamlFormsEnabled: true,
})

const canSubmit = computed((): boolean => !!form.fields.name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ describe('<JsonCodeBlock />', () => {
const fetcherUrl = 'https://cloud.konghq.com/us/gateway-manager/91e192e0-5981-4662-a37d-7b24272c9da3/routes/0af86198-9822-46e0-9028-47b173caf4aa'
cy.mount(JsonCodeBlock, {
props: {
// TODO: Remove config once Feature Flag `Khcp-9892-json-yaml-milestone-2` is enabled
config: {
jsonYamlFormsEnabled: true,
},
fetcherUrl,
jsonRecord: record,
requestMethod: 'get',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="json-config">
<div
v-if="props.fetcherUrl && props.config?.jsonYamlFormsEnabled"
v-if="props.fetcherUrl"
class="json-endpoint"
>
<KBadge :appearance="props.requestMethod">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ describe('<ConfigCardDisplay />', () => {
fetcherUrl,
format: 'json',
record,
// TODO: Remove config once Feature Flag `Khcp-9892-json-yaml-milestone-2` is enabled
config: {
jsonYamlFormsEnabled: true,
},
},
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,12 @@ describe('<EntityBaseConfigCard />', () => {

cy.getTestId('k-code-block-copy-button').should('be.visible')
// eslint-disable-next-line cypress/unsafe-to-chain-command
cy.getTestId('k-code-block-copy-button').click().then(() => {
cy.getTestId('k-code-block-copy-button').eq(0).click().then(() => {
// emits copy event
cy.wrap(Cypress.vueWrapper.emitted).should('have.length', 1)
})
// eslint-disable-next-line cypress/unsafe-to-chain-command
cy.getTestId('k-code-block-copy-button').eq(1).click().then(() => {
// emits copy event
cy.wrap(Cypress.vueWrapper.emitted).should('have.length', 1)
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,7 @@ describe('<EntityBaseForm />', () => {
it('displays View Configuration and Slideout when FF is enabled', () => {
cy.mount(EntityBaseForm, {
props: {
config: {
...config,
// TODO: Remove config once Feature Flag `Khcp-9892-json-yaml-milestone-2` is enabled
jsonYamlFormsEnabled: true,
},
config,
canSubmit: true,
},
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,13 @@
data-testid="form-actions"
>
<slot name="form-actions">
<div v-if="config.jsonYamlFormsEnabled">
<KButton
appearance="tertiary"
data-testid="form-view-configuration"
@click="toggle()"
>
{{ t('baseForm.actions.viewConfiguration') }}
</KButton>
</div>
<KButton
appearance="tertiary"
data-testid="form-view-configuration"
@click="toggle()"
>
{{ t('baseForm.actions.viewConfiguration') }}
</KButton>
<KButton
appearance="secondary"
data-testid="form-cancel"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ import type { KonnectConfig, KongManagerConfig } from './index'
export interface BaseEntityConfig {
/** the ID of the entity */
entityId: string
/**
* Feature flag value for JSON/YAML Milestone 2: `Khcp-9892-json-yaml-milestone-2`
* TODO: Remove jsonYamlFormsEnabled once FF is enabled
*/
jsonYamlFormsEnabled?: boolean
}

/** Konnect base form config */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ export interface BaseFormConfig {
cancelRoute?: RouteLocationRaw
/** If showing an edit form, the ID of the entity to edit */
editId?: string
/**
* Feature flag value for JSON/YAML Milestone 2: `Khcp-9892-json-yaml-milestone-2`
* TODO: Remove jsonYamlFormsEnabled once FF is enabled
*/
jsonYamlFormsEnabled?: boolean
}

/** Konnect base form config */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ const konnectConfig = ref<KonnectSniFormConfig>({
// Set the root `.env.development.local` variable to a control plane your PAT can access
controlPlaneId,
cancelRoute: { name: 'snis-list' },
jsonYamlFormsEnabled: true,
// uncomment to see create with provided certificate
/* certificateId: '1234-ilove-cats', */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ const konnectConfig = ref<KonnectUpstreamsFormConfig>({
apiBaseUrl: '/us/kong-api/konnect-api',
controlPlaneId,
cancelRoute: { name: 'upstreams-list' },
jsonYamlFormsEnabled: true,
})

const KMConfig = ref<KongManagerUpstreamsFormConfig>({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ const konnectConfig = ref<KonnectVaultFormConfig>({
controlPlaneId,
cancelRoute: { name: 'vault-list' },
azureVaultProviderAvailable: true,
jsonYamlFormsEnabled: true,
ttl: true,
hcvAppRoleMethodAvailable: true,
})
Expand Down
Loading