forked from OpenJobDescription/openjd-specifications
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui-controls-showcase.yaml
236 lines (222 loc) · 6.36 KB
/
ui-controls-showcase.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# ----
# Demonstrates
# ----
# A showcase of all of the different kinds of UI metadata that can be associated
# with the definition of a Job Parameter in a job template.
#
# ----
# Requirements
# ----
# - bash shell
#
# -----
# Contributors to this template:
# Mark Wiebe (https://github.com/mwiebe)
specificationVersion: 'jobtemplate-2023-09'
name: Job Template GUI Control Showcase
parameterDefinitions:
- name: LineEditControl
type: STRING
userInterface:
control: LINE_EDIT
label: Line Edit Control
groupLabel: Text Controls
description: "Unrestricted line of text!"
default: Default line edit value.
- name: MultiLineEditControl
type: STRING
userInterface:
control: MULTILINE_EDIT
label: Multi-line Edit Control
groupLabel: Text Controls
description: "Unrestricted text file"
default: |
This is a
text file with
multiple lines.
- name: IntSpinner
type: INT
userInterface:
control: SPIN_BOX
label: Default Int Spinner
groupLabel: Int Spinners
description: A default integer spinner.
default: 42
- name: BigStepIntSpinner
type: INT
userInterface:
control: SPIN_BOX
label: Big Step Int Spinner
groupLabel: Int Spinners
singleStepDelta: 30
description: A default integer spinner.
default: 123
- name: BoundedIntSpinner
type: INT
userInterface:
control: SPIN_BOX
label: Bounded Int Spinner
groupLabel: Int Spinners
description: A bounded integer spin box.
minValue: -100
maxValue: 100
default: 25
- name: FloatSpinner
type: FLOAT
userInterface:
control: SPIN_BOX
label: Default Float Spinner
groupLabel: Float Spinners
description: A default float spinner.
default: 1234.56789
- name: FloatSpinnerOneDecimal
type: FLOAT
userInterface:
control: SPIN_BOX
label: Float Spinner One Decimal
groupLabel: Float Spinners
decimals: 1
description: A float spinner with one decimal of precision.
default: 100000.01
- name: FloatSpinnerFixedStep
type: FLOAT
userInterface:
control: SPIN_BOX
label: Float Spinner Fixed Step
groupLabel: Float Spinners
singleStepDelta: 0.875
default: 0.0
description: A float spinner with a fixed step of .875
- name: StringDropdown
type: STRING
userInterface:
control: DROPDOWN_LIST
label: String Dropdown
groupLabel: Dropdown Controls
description: A dropdown with string values.
default: WEDNESDAY
allowedValues: [MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY]
- name: IntDropdown
type: INT
userInterface:
control: DROPDOWN_LIST
label: Int Dropdown
groupLabel: Dropdown Controls
description: A dropdown with integer values.
default: 7
allowedValues: [3, 8, 7, 2, 9, 1]
- name: HiddenFieldOne
type: INT
userInterface:
control: HIDDEN
description: A hidden field that won't show on the UI
default: 10
- name: FloatDropdown
type: FLOAT
userInterface:
control: DROPDOWN_LIST
label: Float Dropdown
groupLabel: Dropdown Controls
description: A dropdown with floating point values.
default: 3.26
allowedValues: [1.23, 3.26, 9.9, 1.2345]
- name: InputFilePicker
type: PATH
objectType: FILE
dataFlow: IN
userInterface:
control: CHOOSE_INPUT_FILE
label: Input File Picker
groupLabel: Picker Controls
fileFilters:
- label: Scene Files
patterns: ["*.blend", "*.mb", "*.ma", "*.nk"]
- label: Any Files
patterns: ["*"]
description: Choose the input scene file.
- name: OutputFilePicker
type: PATH
objectType: FILE
dataFlow: OUT
userInterface:
control: CHOOSE_OUTPUT_FILE
label: Output File Picker
groupLabel: Picker Controls
fileFilters:
- label: EXR Files
patterns: ["*.exr"]
- label: JPEG Files
patterns: ["*.jpg", "*.jpeg"]
- label: PNG Files
patterns: ["*.png"]
- label: All Files
patterns: ["*"]
description: Choose the output image file.
- name: DirectoryPicker
type: PATH
objectType: DIRECTORY
dataFlow: INOUT
userInterface:
control: CHOOSE_DIRECTORY
label: Directory Picker
groupLabel: Picker Controls
description: Choose a directory.
- name: CheckBox
type: STRING
userInterface:
control: CHECK_BOX
label: Check Box "Boolean"
default: "True"
allowedValues: ["True", "False"]
description: Set a true/false value.
- name: HiddenFieldTwo
type: STRING
userInterface:
control: HIDDEN
label: This won't show
description: A hidden field that won't show on the UI
default: This is a hidden string parameter
steps:
- name: CliScript
script:
actions:
onRun:
command: bash
args: ['{{Task.File.runScript}}']
embeddedFiles:
- name: runScript
type: TEXT
data: |
#!/usr/bin/env bash
echo 'LineEditControl value:'
echo '{{Param.LineEditControl}}'
echo 'MultiLineEditControl value:'
echo '{{Param.MultiLineEditControl}}'
echo 'IntSpinner value:'
echo '{{Param.IntSpinner}}'
echo 'BigStepIntSpinner value:'
echo '{{Param.BigStepIntSpinner}}'
echo 'FloatSpinner value:'
echo '{{Param.FloatSpinner}}'
echo 'FloatSpinnerOne value:'
echo '{{Param.FloatSpinnerOneDecimal}}'
echo 'StringDropdown value:'
echo '{{Param.StringDropdown}}'
echo 'IntDropdown value:'
echo '{{Param.IntDropdown}}'
echo 'FloatDropdown value:'
echo '{{Param.FloatDropdown}}'
echo 'InputFilePicker raw value:'
echo '{{RawParam.InputFilePicker}}'
echo 'InputFilePicker value mapped locally:'
echo '{{Param.InputFilePicker}}'
echo 'OutputFilePicker raw value:'
echo '{{RawParam.OutputFilePicker}}'
echo 'OutputFilePicker value mapped locally:'
echo '{{Param.OutputFilePicker}}'
echo 'DirectoryPicker raw value:'
echo '{{RawParam.DirectoryPicker}}'
echo 'DirectoryPicker value mapped locally:'
echo '{{Param.DirectoryPicker}}'