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(entities): support terraform in config card [khcp-12445] #1549

Merged
merged 34 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
596540a
feat(entities): support terraform in config card [12445]
kaiarrowood Aug 9, 2024
542b884
fix(*): component test
kaiarrowood Aug 9, 2024
1d55828
fix(*): config key
kaiarrowood Aug 9, 2024
d7ed4cd
fix(*): handle undefined
kaiarrowood Aug 9, 2024
83a4956
fix(*): plugin form
kaiarrowood Aug 9, 2024
9d0f0fc
fix(*): sandbox
kaiarrowood Aug 9, 2024
5a11616
test(*): fix new required param
kaiarrowood Aug 9, 2024
2a49dff
feat(*): entity form updates
kaiarrowood Aug 9, 2024
aa5eca8
feat(*): consumers
kaiarrowood Aug 9, 2024
4813bfb
feat(*): consumer-groups
kaiarrowood Aug 9, 2024
c91f4cf
feat(*): gateway-services
kaiarrowood Aug 9, 2024
840e6be
feat(*): certs and ca certs
kaiarrowood Aug 9, 2024
44852a2
feat(*): snis
kaiarrowood Aug 9, 2024
53ba08b
feat(*): upstreams and targets
kaiarrowood Aug 9, 2024
42952cc
feat(*): keys and key sets
kaiarrowood Aug 9, 2024
8fda2cd
feat(*): routes
kaiarrowood Aug 9, 2024
317479d
feat(*): routes
kaiarrowood Aug 9, 2024
42f1775
feat(*): vaults
kaiarrowood Aug 9, 2024
f65beca
test(terraform): component test
kaiarrowood Aug 9, 2024
052df97
fix(*): stylelint
kaiarrowood Aug 9, 2024
2cba4b1
chore(*): bump dist size
kaiarrowood Aug 9, 2024
cb9cdb6
fix(*): ff guard plugins and gateway services
kaiarrowood Aug 12, 2024
3eb93f9
fix(*): keys and keysets
kaiarrowood Aug 12, 2024
e12471c
fix(*): routes and snis
kaiarrowood Aug 12, 2024
9bbb702
fix(*): secrets and vaults
kaiarrowood Aug 12, 2024
e4dc59f
fix(*): upstreams
kaiarrowood Aug 12, 2024
5d679d1
fix(*): certificates and consumers
kaiarrowood Aug 12, 2024
5cece73
fix(*): test
kaiarrowood Aug 12, 2024
d1c03c0
fix(*): translation
kaiarrowood Aug 12, 2024
1f685b7
fix(*): pr feedback
kaiarrowood Aug 13, 2024
7b5a956
fix(*): PR feedback
kaiarrowood Aug 14, 2024
eb73caa
fix(*): terraform newlines
kaiarrowood Aug 14, 2024
3f53b42
fix(*): docs
kaiarrowood Aug 14, 2024
d06ec14
fix(*): lint
kaiarrowood Aug 14, 2024
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 @@ -4,6 +4,8 @@
:config="config"
:config-card-doc="configCardDoc"
:config-schema="configSchema"
:enable-terraform="enableTerraform"
:entity-type="SupportedEntityType.CaCertificate"
:fetch-url="fetchUrl"
:hide-title="hideTitle"
@fetch:error="(err: any) => $emit('fetch:error', err)"
Expand Down Expand Up @@ -68,7 +70,15 @@ import type { PropType } from 'vue'
import { computed, ref } from 'vue'
import type { AxiosError } from 'axios'
import type { KongManagerCertificateEntityConfig, KonnectCertificateEntityConfig, CACertificateConfigurationSchema, EntityRow } from '../types'
import { EntityBaseConfigCard, ConfigurationSchemaType, ConfigurationSchemaSection, useStringHelpers, useHelpers, ConfigCardItem } from '@kong-ui-public/entities-shared'
import {
EntityBaseConfigCard,
ConfigurationSchemaType,
ConfigurationSchemaSection,
useStringHelpers,
useHelpers,
ConfigCardItem ,
SupportedEntityType,
} from '@kong-ui-public/entities-shared'
import endpoints from '../ca-certificates-endpoints'
import composables from '../composables'
import '@kong-ui-public/entities-shared/dist/style.css'
Expand Down Expand Up @@ -110,6 +120,14 @@ const props = defineProps({
type: Boolean,
default: false,
},
/**
* Enable display of Terraform code
* Guarded by FF: khcp-12445-terraform-config-details
*/
enableTerraform: {
kaiarrowood marked this conversation as resolved.
Show resolved Hide resolved
type: Boolean,
default: false,
},
})

const { i18n: { t, formatUnixTimeStamp } } = composables.useI18n()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
:can-submit="canSubmit"
:config="config"
:edit-id="certificateId"
:enable-terraform="enableTerraform"
:entity-type="SupportedEntityType.CaCertificate"
:error-message="form.errorMessage"
:fetch-url="fetchUrl"
:form-fields="requestBody"
Expand Down Expand Up @@ -72,7 +74,14 @@ import type {
} from '../types'
import endpoints from '../ca-certificates-endpoints'
import composables from '../composables'
import { useAxios, useErrors, EntityFormSection, EntityBaseForm, EntityBaseFormType } from '@kong-ui-public/entities-shared'
import {
useAxios,
useErrors,
EntityFormSection,
EntityBaseForm,
EntityBaseFormType,
SupportedEntityType,
} from '@kong-ui-public/entities-shared'
import '@kong-ui-public/entities-shared/dist/style.css'

const emit = defineEmits<{
Expand Down Expand Up @@ -101,6 +110,14 @@ const props = defineProps({
required: false,
default: '',
},
/**
* Enable display of Terraform code
* Guarded by FF: khcp-12445-terraform-config-details
*/
enableTerraform: {
type: Boolean,
default: false,
},
})

const router = useRouter()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
:config="config"
:config-card-doc="configCardDoc"
:config-schema="(configSchema as any)"
:enable-terraform="enableTerraform"
:entity-type="SupportedEntityType.Certificate"
:fetch-url="fetchUrl"
:hide-title="hideTitle"
@fetch:error="(err: any) => $emit('fetch:error', err)"
Expand Down Expand Up @@ -138,7 +140,15 @@ import type { PropType } from 'vue'
import { computed, ref } from 'vue'
import type { AxiosError } from 'axios'
import type { KongManagerCertificateEntityConfig, KonnectCertificateEntityConfig, CertificateConfigurationSchema, EntityRow } from '../types'
import { EntityBaseConfigCard, ConfigurationSchemaSection, ConfigurationSchemaType, ConfigCardItem, useStringHelpers, useHelpers } from '@kong-ui-public/entities-shared'
import {
EntityBaseConfigCard,
ConfigurationSchemaSection,
ConfigurationSchemaType,
ConfigCardItem,
SupportedEntityType,
useStringHelpers,
useHelpers,
} from '@kong-ui-public/entities-shared'
import endpoints from '../certificates-endpoints'
import composables from '../composables'
import '@kong-ui-public/entities-shared/dist/style.css'
Expand Down Expand Up @@ -178,6 +188,14 @@ const props = defineProps({
type: Boolean,
default: false,
},
/**
* Enable display of Terraform code
* Guarded by FF: khcp-12445-terraform-config-details
*/
enableTerraform: {
type: Boolean,
default: false,
},
})

const { i18n: { t, formatUnixTimeStamp }, i18nT } = composables.useI18n()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
:can-submit="canSubmit"
:config="config"
:edit-id="certificateId"
:enable-terraform="enableTerraform"
:entity-type="SupportedEntityType.Certificate"
:error-message="form.errorMessage"
:fetch-url="fetchUrl"
:form-fields="requestBody"
Expand Down Expand Up @@ -144,7 +146,14 @@ import type {
import endpoints from '../certificates-endpoints'
import composables from '../composables'
import CertificateFormSniField from './CertificateFormSniField.vue'
import { useAxios, useErrors, EntityFormSection, EntityBaseForm, EntityBaseFormType } from '@kong-ui-public/entities-shared'
import {
useAxios,
useErrors,
EntityFormSection,
EntityBaseForm,
EntityBaseFormType,
SupportedEntityType,
} from '@kong-ui-public/entities-shared'
import '@kong-ui-public/entities-shared/dist/style.css'

const emit = defineEmits<{
Expand Down Expand Up @@ -179,6 +188,14 @@ const props = defineProps({
required: false,
default: false,
},
/**
* Enable display of Terraform code
* Guarded by FF: khcp-12445-terraform-config-details
*/
enableTerraform: {
type: Boolean,
default: false,
},
})

const router = useRouter()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
:config-card-doc="configCardDoc"
:config-schema="configSchema"
data-key="consumer_group"
:enable-terraform="enableTerraform"
:entity-type="SupportedEntityType.ConsumerGroup"
:fetch-url="fetchUrl"
:hide-title="hideTitle"
@fetch:error="(err: any) => $emit('fetch:error', err)"
Expand All @@ -19,7 +21,7 @@ import type { PropType } from 'vue'
import { computed, ref } from 'vue'
import type { AxiosError } from 'axios'
import type { KongManagerConsumerGroupEntityConfig, KonnectConsumerGroupEntityConfig, ConsumerGroupConfigurationSchema } from '../types'
import { EntityBaseConfigCard } from '@kong-ui-public/entities-shared'
import { EntityBaseConfigCard, SupportedEntityType } from '@kong-ui-public/entities-shared'
import endpoints from '../consumer-groups-endpoints'
import composables from '../composables'
import '@kong-ui-public/entities-shared/dist/style.css'
Expand Down Expand Up @@ -59,6 +61,14 @@ const props = defineProps({
type: Boolean,
default: false,
},
/**
* Enable display of Terraform code
* Guarded by FF: khcp-12445-terraform-config-details
*/
enableTerraform: {
type: Boolean,
default: false,
},
})

const { i18n: { t } } = composables.useI18n()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
:can-submit="isFormValid && changesExist"
:config="config"
:edit-id="consumerGroupId"
:enable-terraform="enableTerraform"
:entity-type="SupportedEntityType.ConsumerGroup"
:error-message="state.errorMessage || fetchError || preValidateErrorMessage"
:fetch-url="fetchUrl"
:form-fields="getPayload"
Expand Down Expand Up @@ -82,8 +84,11 @@ import {
EntityBaseForm,
EntityBaseFormType,
EntityFormSection,
SupportedEntityType,
useAxios,
useDebouncedFilter, useErrors, useValidators,
useDebouncedFilter,
useErrors,
useValidators,
} from '@kong-ui-public/entities-shared'
import '@kong-ui-public/entities-shared/dist/style.css'
import composables from '../composables'
Expand Down Expand Up @@ -122,6 +127,14 @@ const props = defineProps({
required: false,
default: '',
},
/**
* Enable display of Terraform code
* Guarded by FF: khcp-12445-terraform-config-details
*/
enableTerraform: {
type: Boolean,
default: false,
},
})

const emit = defineEmits<{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
:config="config"
:config-card-doc="configCardDoc"
:config-schema="configSchema"
:enable-terraform="enableTerraform"
:entity-type="SupportedEntityType.Consumer"
:fetch-url="fetchUrl"
:hide-title="hideTitle"
@fetch:error="(err: any) => $emit('fetch:error', err)"
Expand Down Expand Up @@ -40,7 +42,7 @@ import type { PropType } from 'vue'
import { computed, ref } from 'vue'
import type { AxiosError } from 'axios'
import type { KongManagerConsumerEntityConfig, KonnectConsumerEntityConfig, ConsumerConfigurationSchema } from '../types'
import { EntityBaseConfigCard, ConfigurationSchemaSection } from '@kong-ui-public/entities-shared'
import { EntityBaseConfigCard, ConfigurationSchemaSection, SupportedEntityType } from '@kong-ui-public/entities-shared'
import endpoints from '../consumers-endpoints'
import composables from '../composables'
import '@kong-ui-public/entities-shared/dist/style.css'
Expand Down Expand Up @@ -80,6 +82,14 @@ const props = defineProps({
type: Boolean,
default: false,
},
/**
* Enable display of Terraform code
* Guarded by FF: khcp-12445-terraform-config-details
*/
enableTerraform: {
type: Boolean,
default: false,
},
})

const { i18n: { t }, i18nT } = composables.useI18n()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
:can-submit="isFormValid && changesExist"
:config="config"
:edit-id="consumerId"
:enable-terraform="enableTerraform"
:entity-type="SupportedEntityType.Consumer"
:error-message="state.errorMessage"
:fetch-url="fetchUrl"
:form-fields="payload"
Expand Down Expand Up @@ -104,7 +106,14 @@
</template>

<script lang="ts" setup>
import { useAxios, useErrors, EntityFormSection, EntityBaseForm, EntityBaseFormType } from '@kong-ui-public/entities-shared'
import {
useAxios,
useErrors,
EntityFormSection,
EntityBaseForm,
EntityBaseFormType,
SupportedEntityType,
} from '@kong-ui-public/entities-shared'
import composables from '../composables'
import '@kong-ui-public/entities-shared/dist/style.css'
import type { PropType } from 'vue'
Expand Down Expand Up @@ -140,6 +149,14 @@ const props = defineProps({
required: false,
default: '',
},
/**
* Enable display of Terraform code
* Guarded by FF: khcp-12445-terraform-config-details
*/
enableTerraform: {
type: Boolean,
default: false,
},
})

const emit = defineEmits<{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
:config="config"
:config-card-doc="configCardDoc"
:config-schema="configSchema"
:enable-terraform="enableTerraform"
:entity-type="SupportedEntityType.GatewayService"
:fetch-url="fetchUrl"
:hide-title="hideTitle"
@fetch:error="(err: any) => $emit('fetch:error', err)"
Expand Down Expand Up @@ -69,7 +71,13 @@ import type { PropType } from 'vue'
import { computed, ref } from 'vue'
import type { AxiosError } from 'axios'
import type { KongManagerGatewayServiceEntityConfig, KonnectGatewayServiceEntityConfig, GatewayServiceConfigurationSchema } from '../types'
import { EntityBaseConfigCard, ConfigurationSchemaSection, ConfigurationSchemaType, useHelpers } from '@kong-ui-public/entities-shared'
import {
EntityBaseConfigCard,
ConfigurationSchemaSection,
ConfigurationSchemaType,
SupportedEntityType,
useHelpers,
} from '@kong-ui-public/entities-shared'
import endpoints from '../gateway-services-endpoints'
import composables from '../composables'
import '@kong-ui-public/entities-shared/dist/style.css'
Expand Down Expand Up @@ -109,6 +117,14 @@ const props = defineProps({
type: Boolean,
default: false,
},
/**
* Enable display of Terraform code
* Guarded by FF: khcp-12445-terraform-config-details
*/
enableTerraform: {
type: Boolean,
default: false,
},
})

const { i18n: { t }, i18nT } = composables.useI18n()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
:can-submit="canSubmit"
:config="config"
:edit-id="gatewayServiceId"
:enable-terraform="enableTerraform"
:entity-type="SupportedEntityType.GatewayService"
:error-message="form.errorMessage"
:fetch-url="fetchUrl"
:form-fields="getPayload"
Expand Down Expand Up @@ -358,10 +360,11 @@ import {
useAxios,
useErrors,
useGatewayFeatureSupported,
useValidators,
EntityFormSection,
EntityBaseForm,
EntityBaseFormType,
useValidators,
SupportedEntityType,
} from '@kong-ui-public/entities-shared'
import '@kong-ui-public/entities-shared/dist/style.css'

Expand Down Expand Up @@ -400,6 +403,14 @@ const props = defineProps({
required: false,
default: false,
},
/**
* Enable display of Terraform code
* Guarded by FF: khcp-12445-terraform-config-details
*/
enableTerraform: {
type: Boolean,
default: false,
},
})

const isCollapsed = ref(true)
Expand Down
Loading
Loading