Skip to content
Open
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 @@ -42,6 +42,30 @@ data:
{{- range $allowedOrigins }}
- {{ . | quote }}
{{- end }}
{{- if .Values.global.dashboard.hide }}
hide:
{{- if .Values.global.dashboard.hide.DNSConfiguration }}
DNSConfiguration: {{ .Values.global.dashboard.hide.DNSConfiguration }}
{{- end }}
{{- if .Values.global.dashboard.hide.addons }}
addons: {{ .Values.global.dashboard.hide.addons }}
{{- end }}
{{- if .Values.global.dashboard.hide.autoUpdate }}
autoUpdate: {{ .Values.global.dashboard.hide.autoUpdate }}
{{- end }}
{{- if .Values.global.dashboard.hide.controlPlaneHighAvailability }}
controlPlaneHighAvailability: {{ .Values.global.dashboard.hide.controlPlaneHighAvailability }}
{{- end }}
{{- if .Values.global.dashboard.hide.hibernation }}
hibernation: {{ .Values.global.dashboard.hide.hibernation }}
{{- end }}
{{- if .Values.global.dashboard.hide.infrastructure }}
infrastructure: {{ .Values.global.dashboard.hide.infrastructure }}
{{- end }}
{{- if .Values.global.dashboard.hide.workerlessOption }}
workerlessOption: {{ .Values.global.dashboard.hide.workerlessOption }}
{{- end }}
{{- end }}
{{- if .Values.global.dashboard.gitHub }}
gitHub:
apiUrl: {{ .Values.global.dashboard.gitHub.apiUrl }}
Expand Down
8 changes: 8 additions & 0 deletions charts/gardener-dashboard/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,14 @@ global:
- title: Issues
icon: mdi-bug
url: https://github.com/gardener/gardener/issues
# hide: # hides new shoot creation items
# DNSConfiguration: false
# addons: false
# autoUpdate: false
# controlPlaneHighAvailability: false
# hibernation: false
# infrastructure: false
# workerlessOption: false
# # supported grantTypes of the garden cluster oidc issuer. See https://github.com/int128/kubelogin/blob/master/docs/usage.md for possible values.
# grantTypes:
# - auto
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/components/NewShoot/GNewShootDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ SPDX-License-Identifier: Apache-2.0
/>
</v-col>
</v-row>
<v-row>
<v-row v-if="hideWorkerlessOption">
<v-col cols="12">
<v-checkbox
v-model="workerless"
Expand Down Expand Up @@ -175,6 +175,7 @@ export default {
computed: {
...mapState(useConfigStore, [
'sla',
'hideWorkerlessOption',
]),
unexpiredKubernetesVersions () {
return filter(this.sortedKubernetesVersions, ({ isExpired }) => !isExpired)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ SPDX-License-Identifier: Apache-2.0

<template>
<div class="ml-3">
<div class="text-subtitle-1 pt-4">
<div
v-if="configStore.hideAutoUpdate"
class="text-subtitle-1 pt-4"
>
{{ title }}
</div>
<template v-if="!workerless">
<template v-if="!workerless && configStore.hideAutoUpdate">
<div
v-if="!readonly || osUpdates"
class="d-flex mt-4"
Expand Down Expand Up @@ -39,7 +42,7 @@ SPDX-License-Identifier: Apache-2.0
</div>
</template>
<div
v-if="!readonly || k8sUpdates"
v-if="(!readonly || k8sUpdates) && configStore.hideAutoUpdate"
class="d-flex mt-4"
>
<div class="d-flex align-center justify-center action-select">
Expand Down Expand Up @@ -101,6 +104,10 @@ import {
toRefs,
} from 'vue'

import { useConfigStore } from '@/store/config'

const configStore = useConfigStore()

const props = defineProps({
title: {
type: String,
Expand Down
35 changes: 35 additions & 0 deletions frontend/src/store/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,34 @@ export const useConfigStore = defineStore('config', () => {
return state.value?.knownConditions
})

const hideWorkerlessOption = computed(() => {
return state.value?.hide?.workerlessOption ?? false
})

const hideAutoUpdate = computed(() => {
return state.value?.hide?.autoUpdate ?? false
})

const hideInfrastructure = computed(() => {
return state.value?.hide?.infrastructure ?? false
})

const hideControlPlaneHighAvailability = computed(() => {
return state.value?.hide?.controlPlaneHighAvailability ?? false
})

const hideDNSConfiguration = computed(() => {
return state.value?.hide?.DNSConfiguration ?? false
})

const hideAddons = computed(() => {
return state.value?.hide?.addons ?? false
})

const hideHibernation = computed(() => {
return state.value?.hide?.hibernation ?? false
})

const allKnownConditions = computed(() => {
return {
...wellKnownConditions,
Expand Down Expand Up @@ -413,6 +441,13 @@ export const useConfigStore = defineStore('config', () => {
vendorHints,
helpMenuItems,
externalTools,
hideAddons,
hideAutoUpdate,
hideControlPlaneHighAvailability,
hideDNSConfiguration,
hideHibernation,
hideInfrastructure,
hideWorkerlessOption,
defaultNodesCIDR,
shootAdminKubeconfig,
apiServerUrl,
Expand Down
23 changes: 19 additions & 4 deletions frontend/src/views/GNewShoot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ SPDX-License-Identifier: Apache-2.0
class="overflow-auto"
fluid
>
<v-card>
<v-card v-if="hideInfrastructure">
<g-toolbar title="Infrastructure" />
<v-card-text class="py-1">
<g-new-shoot-select-infrastructure />
Expand All @@ -33,13 +33,19 @@ SPDX-License-Identifier: Apache-2.0
<g-new-shoot-infrastructure-details />
</v-card-text>
</v-card>
<v-card class="mt-4">
<v-card
v-if="hideControlPlaneHighAvailability"
class="mt-4"
>
<g-toolbar title="Control Plane High Availability" />
<v-card-text class="pt-2">
<g-manage-control-plane-high-availability />
</v-card-text>
</v-card>
<v-card class="mt-4">
<v-card
v-if="hideDNSConfiguration"
class="mt-4"
>
<g-toolbar title="DNS Configuration" />
<v-card-text class="py-1">
<g-manage-dns />
Expand Down Expand Up @@ -67,6 +73,7 @@ SPDX-License-Identifier: Apache-2.0
</v-card>
<v-card
v-show="!workerless"
v-if="hideAddons"
class="mt-4"
>
<g-toolbar
Expand All @@ -87,7 +94,10 @@ SPDX-License-Identifier: Apache-2.0
/>
</v-card-text>
</v-card>
<v-card class="mt-4">
<v-card
v-if="hideHibernation"
class="mt-4"
>
<g-toolbar title="Hibernation" />
<v-card-text>
<g-manage-hibernation-schedule />
Expand Down Expand Up @@ -231,6 +241,11 @@ export default {
computed: {
...mapState(useConfigStore, [
'accessRestriction',
'hideInfrastructure',
'hideControlPlaneHighAvailability',
'hideDNSConfiguration',
'hideAddons',
'hideHibernation',
]),
...mapState(useCloudProfileStore, [
'sortedProviderTypeList',
Expand Down