File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed
themes/geekboot/layouts/partials Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 1
1
{{/* Pass a schema and find the currently active version and return a dict of (version: < version > , schema: < schema > ) */}}
2
2
{{ $version := "" }}
3
3
{{ $schema := dict }}
4
+ {{ $deprecated := false }}
4
5
5
6
{{ range .versions }}
6
7
{{ if index . "storage" }}
7
8
{{ $version = .name }}
8
9
{{ $schema = .schema }}
10
+ {{ $deprecated = .deprecated }}
9
11
{{ else if (and (index . "served") (not $version)) }}
10
12
{{ $version = .name }}
11
13
{{ $schema = .schema }}
14
+ {{ $deprecated = .deprecated }}
12
15
{{ end }}
13
16
{{ end }}
14
17
15
18
{{ return (dict "version" $version
16
- "schema" $schema)
19
+ "schema" $schema
20
+ "deprecated" $deprecated)
17
21
}}
18
22
19
23
Original file line number Diff line number Diff line change 2
2
{{ $group := .group }}
3
3
{{ $kind := .kind }}
4
4
{{ $version := .version }}
5
+ {{ $deprecated := .deprecated }}
5
6
{{ $bigName := partial "apiBuilder/checkBigName" $kind }}
6
7
7
8
{{/* Collapse/Expand Button and Kind name */}}
11
12
12
13
{{/* CRD name text */}}
13
14
< button class ="crd-root collapsed align-middle " data-bs-toggle ="collapse " data-bs-target ="#{{$kind}} " type ="button " aria-expanded ="false " aria-controls ="{{$kind}} ">
14
- < span class ="align-middle {{ $kind }} "> < a class ="expansion-link " name ="{{ $kind }} "> {{ $kind }}</ a > </ span >
15
+ < span class ="align-middle {{ $kind }} "> < a class ="expansion-link " name ="{{ $kind }} "> {{ $kind }}{{ if $deprecated }} (deprecated){{ end }} </ a > </ span >
15
16
</ button >
16
17
</ div >
17
18
Original file line number Diff line number Diff line change 27
27
{{ $versionAndSchema := partial "apiBuilder/getVersionAndSchema" $crdContent.spec }}
28
28
{{ $schema := $versionAndSchema.schema.openAPIV3Schema }}
29
29
{{ $version := $versionAndSchema.version }}
30
+ {{ $deprecated := $versionAndSchema.deprecated }}
30
31
{{ $description := $schema.description }}
31
32
32
33
{{/* The div containing the entire CRD information including the Expand All/Collapse All row */}}
33
34
< div class ="crd-root-row crd-container row align-middle bigName-row " data-kind ="{{ $kind }} " data-group ="{{ $group }}-{{ $kind}} " data-version ="{{ $version }}-{{ $kind }} ">
34
35
35
36
{{/* generate the GKV line to expand/collapse the CRD data */}}
36
- {{ partial "apiBuilder/printGKVExpander" (dict "group" $group "version" $version "kind" $kind) }}
37
+ {{ partial "apiBuilder/printGKVExpander" (dict "group" $group "version" $version "kind" $kind "deprecated" $deprecated ) }}
37
38
38
39
39
40
{{/* The container to show/hide with information related to the CRD */}}
You can’t perform that action at this time.
0 commit comments