mirror of
https://github.com/truecharts/charts.git
synced 2026-07-14 20:21:20 -03:00
fix(meshcentral): use transitioning variable tcdefaultdomain in scale GUI (#4184)
* fix(meshcentral): use transitioning variable tcdefaultdomain in scale GUI * add a debug
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
apiVersion: v2
|
||||
kubeVersion: ">=1.16.0-0"
|
||||
name: meshcentral
|
||||
version: 5.0.1
|
||||
appVersion: "1.0.89"
|
||||
version: 5.0.2
|
||||
description: MeshCentral is a full computer management web site
|
||||
type: application
|
||||
deprecated: false
|
||||
|
||||
@@ -224,7 +224,7 @@ questions:
|
||||
additional_attrs: true
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: '""'
|
||||
- variable: tcdefaultdomain
|
||||
label: 'Section <"">'
|
||||
schema:
|
||||
additional_attrs: true
|
||||
|
||||
@@ -86,15 +86,27 @@ data:
|
||||
{{/* Prunes int and float equal to -99 */}}
|
||||
{{/* Prunes empty strings (Does not prune empty strings in lists) */}}
|
||||
{{/* Prunes keys that start with _ */}}
|
||||
{{/* Renames tcdefaultdomain variable to "" as this is the key used by MeshCentral */}}
|
||||
{{/* but SCALE GUI does not handle it well */}}
|
||||
|
||||
{{- define "prune.keys.scale" }}
|
||||
{{- $values := . }}
|
||||
{{- if (hasKey $values "domains") }}
|
||||
{{- if (hasKey $values.domains "tcdefaultdomain") }}
|
||||
{{- $defaultDomain := $values.domains.tcdefaultdomain }}
|
||||
{{- $_ := set $values.domains "" $defaultDomain }}
|
||||
{{- $_ := unset $values.domains "tcdefaultdomain" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- range $k, $v := $values }}
|
||||
{{- if eq (kindOf $v) "string" }}
|
||||
{{- if not $v }}
|
||||
{{- $_ := unset $values $k }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if eq $k "browserPing" }}
|
||||
{{- $_ := set $values "__browserPing" (printf "%v-%v" (kindOf $v) (typeOf $v)) }}
|
||||
{{- end }}
|
||||
{{- if or (eq (kindOf $v) "float64") (eq (kindOf $v) "int64") }}
|
||||
{{- if eq (int $v) -99 }}
|
||||
{{- $_ := unset $values $k }}
|
||||
|
||||
Reference in New Issue
Block a user