Skip to content
This repository has been archived by the owner on Jul 7, 2022. It is now read-only.

Commit

Permalink
made form fields "optional" from the perspective of opsman (#551)
Browse files Browse the repository at this point in the history
  • Loading branch information
josephlewis42 authored Nov 21, 2019
1 parent 70480d1 commit b9913c5
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 16 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Changed

- Form fields are now optional to work with OpsMan settings.

## [5.0.0] - 2019-10-28

### Added
Expand Down
15 changes: 5 additions & 10 deletions docs/customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,8 @@ For example:


<ul>
<li><b>Required</b></li>
<li><i>Optional</i></li>
<li>Default: <code>b8e19880-ac58-42ef-b033-f7cd9c94d1fe</code></li>
<li>This option _is not_ user configurable. It must be set to the default.</li>
<li>Valid Values:
<ul>
<li><tt>b8e19880-ac58-42ef-b033-f7cd9c94d1fe</tt> - Google Bigtable</li>
Expand Down Expand Up @@ -312,9 +311,8 @@ For example:


<ul>
<li><b>Required</b></li>
<li><i>Optional</i></li>
<li>Default: <code>4bc59b9a-8520-409f-85da-1c7552315863</code></li>
<li>This option _is not_ user configurable. It must be set to the default.</li>
<li>Valid Values:
<ul>
<li><tt>4bc59b9a-8520-409f-85da-1c7552315863</tt> - Google CloudSQL for MySQL</li>
Expand Down Expand Up @@ -439,9 +437,8 @@ For example:


<ul>
<li><b>Required</b></li>
<li><i>Optional</i></li>
<li>Default: <code>cbad6d78-a73c-432d-b8ff-b219a17a803a</code></li>
<li>This option _is not_ user configurable. It must be set to the default.</li>
<li>Valid Values:
<ul>
<li><tt>cbad6d78-a73c-432d-b8ff-b219a17a803a</tt> - Google CloudSQL for PostgreSQL</li>
Expand Down Expand Up @@ -566,9 +563,8 @@ For example:


<ul>
<li><b>Required</b></li>
<li><i>Optional</i></li>
<li>Default: <code>51b3e27e-d323-49ce-8c5f-1211e6409e82</code></li>
<li>This option _is not_ user configurable. It must be set to the default.</li>
<li>Valid Values:
<ul>
<li><tt>51b3e27e-d323-49ce-8c5f-1211e6409e82</tt> - Google Spanner</li>
Expand Down Expand Up @@ -677,9 +673,8 @@ For example:


<ul>
<li><b>Required</b></li>
<li><i>Optional</i></li>
<li>Default: <code>b9e4332e-b42b-4680-bda5-ea1506797474</code></li>
<li>This option _is not_ user configurable. It must be set to the default.</li>
<li>Valid Values:
<ul>
<li><tt>b9e4332e-b42b-4680-bda5-ea1506797474</tt> - Google Cloud Storage</li>
Expand Down
13 changes: 7 additions & 6 deletions pkg/generator/forms.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,13 @@ func generateServicePlanForm(svc *broker.ServiceDefinition) (Form, error) {
Configurable: true,
},
{
Name: "service",
Label: "Service",
Type: "dropdown_select",
Description: "The service this plan is associated with.",
Default: entry.ID,
Name: "service",
Label: "Service",
Type: "dropdown_select",
Description: "The service this plan is associated with.",
Default: entry.ID,
Configurable: true,
Optional: true,
Options: []FormOption{
{
Name: entry.ID,
Expand Down Expand Up @@ -377,7 +379,6 @@ func brokerVariableToFormProperty(v broker.BrokerVariable) FormProperty {
formInput.Options = opts

if len(opts) == 1 {
formInput.Configurable = false
formInput.Default = opts[0].Name
}
}
Expand Down
10 changes: 10 additions & 0 deletions tile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,11 @@ service_plan_forms:
default: b8e19880-ac58-42ef-b033-f7cd9c94d1fe
label: Service
description: The service this plan is associated with.
configurable: true
options:
- name: b8e19880-ac58-42ef-b033-f7cd9c94d1fe
label: Google Bigtable
optional: true
- name: storage_type
type: dropdown_select
default: SSD
Expand Down Expand Up @@ -374,9 +376,11 @@ service_plan_forms:
default: 4bc59b9a-8520-409f-85da-1c7552315863
label: Service
description: The service this plan is associated with.
configurable: true
options:
- name: 4bc59b9a-8520-409f-85da-1c7552315863
label: Google CloudSQL for MySQL
optional: true
- name: tier
type: string
label: Tier
Expand Down Expand Up @@ -410,9 +414,11 @@ service_plan_forms:
default: cbad6d78-a73c-432d-b8ff-b219a17a803a
label: Service
description: The service this plan is associated with.
configurable: true
options:
- name: cbad6d78-a73c-432d-b8ff-b219a17a803a
label: Google CloudSQL for PostgreSQL
optional: true
- name: tier
type: string
label: Tier
Expand Down Expand Up @@ -445,9 +451,11 @@ service_plan_forms:
default: 51b3e27e-d323-49ce-8c5f-1211e6409e82
label: Service
description: The service this plan is associated with.
configurable: true
options:
- name: 51b3e27e-d323-49ce-8c5f-1211e6409e82
label: Google Spanner
optional: true
- name: num_nodes
type: string
default: "1"
Expand Down Expand Up @@ -475,9 +483,11 @@ service_plan_forms:
default: b9e4332e-b42b-4680-bda5-ea1506797474
label: Service
description: The service this plan is associated with.
configurable: true
options:
- name: b9e4332e-b42b-4680-bda5-ea1506797474
label: Google Cloud Storage
optional: true
- name: storage_class
type: string
label: Storage Class
Expand Down

0 comments on commit b9913c5

Please sign in to comment.