Skip to content

Commit

Permalink
Merge pull request #2465 from replicatedhq/edit-config-cr-examples
Browse files Browse the repository at this point in the history
Edit config cr examples
  • Loading branch information
paigecalvert committed Jul 3, 2024
2 parents 0c4bb15 + 36a5dde commit 2da32b1
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 16 deletions.
4 changes: 3 additions & 1 deletion docs/partials/config/_defaultExample.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@
value: ""
default: change me
```
![Default change me value displayed under the config field](../../../static/images/config-default.png)
![Default change me value displayed under the config field](/images/config-default.png)

[View a larger version of this image](/images/config-default.png)
4 changes: 3 additions & 1 deletion docs/partials/config/_helpTextExample.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@
help_text: Check to enable the HTTP listener
type: bool
```
![Config field with help text underneath](../../../static/images/config-help-text.png)
![Config field with help text underneath](/images/config-help-text.png)

[View a larger version of this image](/images/config-help-text.png)
4 changes: 3 additions & 1 deletion docs/partials/config/_readonlyExample.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@
value: "{{repl RandomString 20}}"
readonly: true
```
![Default change me value displayed under the config field](../../../static/images/config-readonly.png)
![Default change me value displayed under the config field](/images/config-readonly.png)

[View a larger version of this image](/images/config-readonly.png)
4 changes: 3 additions & 1 deletion docs/partials/config/_recommendedExample.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@
default: "0"
recommended: true
```
![config field with green recommended tag](../../../static/images/config-recommended-item.png)
![config field with green recommended tag](/images/config-recommended-item.png)

[View a larger version of this image](/images/config-recommended-item.png)
4 changes: 3 additions & 1 deletion docs/partials/config/_requiredExample.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@
default: change me
required: true
```
![config field with yellow required tag](../../../static/images/config-required-item.png)
![config field with yellow required tag](/images/config-required-item.png)

[View a larger version of this image](/images/config-required-item.png)
4 changes: 3 additions & 1 deletion docs/partials/config/_typeExample.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@
type: bool
default: "0"
```
![field named HTTP Enabled with disabled checkbox](../../../static/images/config-screen-bool.png)
![field named HTTP Enabled with disabled checkbox](/images/config-screen-bool.png)

[View a larger version of this image](/images/config-screen-bool.png)
4 changes: 3 additions & 1 deletion docs/partials/config/_valueExample.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@
type: text
value: "{{repl RandomString 20}}"
```
![config field with random string as HTML input](../../../static/images/config-value-randomstring.png)
![config field with random string as HTML input](/images/config-value-randomstring.png)

[View a larger version of this image](/images/config-value-randomstring.png)
6 changes: 5 additions & 1 deletion docs/partials/config/_whenExample.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,8 @@

<img alt="External option selected and conditional fields displayed" src="/images/config-when-enabled.png" width="500px"/>

<img alt="Embedded DB option selected and no additional fields displayed" src="/images/config-when-disabled.png" width="500px"/>
[View a larger version of this image](/images/config-when-enabled.png)

<img alt="Embedded DB option selected and no additional fields displayed" src="/images/config-when-disabled.png" width="500px"/>

[View a larger version of this image](/images/config-when-disabled.png)
8 changes: 0 additions & 8 deletions docs/reference/custom-resource-config.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,13 @@ spec:
groups:
- name: example_group
title: First Group
description: This is descriptive help text.
items:
- name: http_enabled
title: HTTP Enabled
type: bool
default: "0"
- name: example_group_2
title: Second Group
description: This is descriptive help text.
when: false
items:
- name: key
Expand All @@ -54,7 +52,6 @@ spec:
type: text
- name: example_group_3
title: Third Group
description: This is descriptive help text.
items:
- name: email-address
title: Email Address
Expand Down Expand Up @@ -101,7 +98,6 @@ spec:
# The name must be unique
- name: example_group
title: First Group
description: This is descriptive help text.
items:
- name: http_enabled
title: HTTP Enabled
Expand All @@ -119,7 +115,6 @@ spec:
- name: example_group
# First Group is the heading that appears on the Config page
title: First Group
description: This is descriptive help text.
items:
- name: http_enabled
title: HTTP Enabled
Expand Down Expand Up @@ -152,15 +147,13 @@ spec:
groups:
- name: example_group
title: First Group
description: This is descriptive help text.
items:
- name: http_enabled
title: HTTP Enabled
type: bool
default: "0"
- name: example_group_2
title: Second Group
description: This is descriptive help text.
# This group is displayed only when the `http_enabled` field is selected
when: repl{{ ConfigOptionEquals "http_enabled" "1" }}
items:
Expand All @@ -172,7 +165,6 @@ spec:
type: text
- name: example_group_3
title: Third Group
description: This is descriptive help text.
items:
- name: email-address
title: Email Address
Expand Down
Binary file modified static/images/config-screen-group-when-false.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/images/config-screen-groups.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2da32b1

Please sign in to comment.