nx_server_plugin_sdk 1.0 Server Plugin SDK

settings_model.h
1 // Copyright 2018-present Network Optix, Inc. Licensed under MPL 2.0: www.mozilla.org/MPL/2.0/
2
3 #pragma once
4
5 #include <string>
6
7 namespace nx {
8 namespace vms_server_plugins {
9 namespace analytics {
10 namespace stub {
11 namespace settings {
12
13 static const std::string kRegularSettingsModelOption = "regular";
14 static const std::string kAlternativeSettingsModelOption = "alternative";
15
16 static const std::string kSettingsModelSettings = "settingsModelComboBox";
17
18 static const std::string kCitySelector = "languageSelectorSettings";
19 static const std::string kEnglishOption = "English";
20 static const std::string kGermanOption = "German";
21
22 // ------------------------------------------------------------------------------------------------
23
24 static const std::string kCaption = "caption";
25 static const std::string kSections = "sections";
26 static const std::string kName = "name";
27 static const std::string kRange = "range";
28 static const std::string kItems = "items";
29 static const std::string kIsActive = "isActive";
30 static const std::string kMinValue = "minValue";
31 static const std::string kMaxValue = "maxValue";
32 static const std::string kActiveSettingsSectionCaption = "Active settings section";
33 static const std::string kActiveSettingsGroupBoxCaption = "Active settings";
34
35 static const std::string kActiveComboBoxId = "activeComboBox";
36 static const std::string kAdditionalComboBoxId = "additionalComboBox";
37 static const std::string kShowAdditionalComboBoxValue = "Show additional ComboBox";
38 static const std::string kAdditionalComboBoxValue = "Value 1";
39
40 static const std::string kActiveCheckBoxId = "activeCheckBox";
41 static const std::string kAdditionalCheckBoxId = "additionalCheckBox";
42 static const std::string kShowAdditionalCheckBoxValue = "true";
43 static const std::string kAdditionalCheckBoxValue = "false";
44
45 static const std::string kActiveRadioButtonGroupId = "activeRadioButtonGroup";
46 static const std::string kShowAdditionalRadioButtonValue = "Show something";
47 static const std::string kHideAdditionalRadioButtonValue = "Hide me";
48 static const std::string kDefaultActiveRadioButtonGroupValue = "Some value";
49
50 static const std::string kActiveMinValueId = "activeMinValue";
51 static const std::string kActiveMaxValueId = "activeMaxValue";
52
53 static const std::string kShowMessageButtonId = "showMessageButton";
54 static const std::string kShowUrlButtonId = "showUrlButton";
55 static const std::string kUrlId = "url";
56 static const std::string kUseProxyId = "useProxy";
57 static const std::string kUseDeviceCredentialsId = "authDevice";
58
59 static const std::string kActiveCheckBoxForValueSetChangeId = "activeCheckBoxForValueSetChange";
60 static const std::string kComboBoxForValueSetChangeId = "comboBoxForValueSetChange";
61 static const std::string kComboBoxForValueSetChangeValuePermanent = "Permanent";
62 static const std::string kComboBoxForValueSetChangeValueOptional = "Optional";
63
64 static const std::string kParametersModel = /*suppress newline*/ 1 + R"json(
65 {
66 "type": "Settings",
67 "items":
68 [
69 {
70 "type": "TextField",
71 "name": "parameter",
72 "caption": "Parameter"
73 }
74 ]
75 }
76 )json";
77
78 // ------------------------------------------------------------------------------------------------
79 static const std::string kEngineIntegrationSideSetting = "testIntegrationSideSpinBox";
80 static const std::string kEngineIntegrationSideSettingValue = "42";
81 static const std::string kShowExtraTextField = "showExtraTextField";
82 static const std::string kPushEngineManifest = "pushEnginemManifest";
83 static const std::string kExtraTextFieldTemplateVariableName = "@EXTRA_TEXTFIELD_TEMPLATE_VAR@";
84 static const std::string kExtraCheckBoxTemplateVariableName = "@EXTRA_CHECKBOX_TEMPLATE_VAR@";
85 const std::string kExtraCheckBoxJson = /*suppress newline*/ 1 + R"json(
86 {
87 "type": "CheckBox",
88 "name": "extraCheckBox",
89 "caption": "Extra Check Box",
90 "defaultValue": true
91 },
92 )json";
93 const std::string kExtraTextFieldJson = /*suppress newline*/ 1 + R"json(
94 {
95 "type": "TextField",
96 "name": "extraTextField",
97 "caption": "Extra Text Field",
98 "description": "Extra Text Field",
99 "defaultValue": "some text"
100 },
101 )json";
102 static const std::string kEngineSettingsModel = /*suppress newline*/ 1 + R"json("
103 {
104 "type": "Settings",
105 "items":
106 [
107 )json" + kExtraTextFieldTemplateVariableName + R"json(
108 )json" + kExtraCheckBoxTemplateVariableName + R"json(
109 {
110 "type": "ComboBox",
111 "name": ")json" + kShowExtraTextField + R"json(",
112 "caption": "Add extra text field on setSettings()",
113 "defaultValue": "false",
114 "range":
115 [
116 "false",
117 "true"
118 ]
119 },
120 {
121 "type": "GroupBox",
122 "caption": "Example Stub Engine settings",
123 "items":
124 [
125 {
126 "type": "TextField",
127 "name": "text",
128 "caption": "Text Field",
129 "description": "A text field",
130 "defaultValue": "a text"
131 },
132 {
133 "type": "PasswordField",
134 "name": "passwordField1",
135 "caption": "Password Field",
136 "description": "A password field",
137 "defaultValue": "1234",
138 "validationErrorMessage": "Password must contain only digits",
139 "validationRegex": "^[0-9]+$",
140 "validationRegexFlags": "i"
141 },
142 {
143 "type": "SpinBox",
144 "name": "testSpinBox",
145 "caption": "Spin Box",
146 "defaultValue": 42,
147 "minValue": 0,
148 "maxValue": 100
149 },
150 {
151 "type": "SpinBox",
152 "name": ")json" + kEngineIntegrationSideSetting + R"json(",
153 "caption": "Spin Box (integration-side)",
154 "defaultValue": 42,
155 "minValue": 0,
156 "maxValue": 100
157 },
158 {
159 "type": "DoubleSpinBox",
160 "name": "testDoubleSpinBox",
161 "caption": "Double Spin Box",
162 "defaultValue": 3.1415,
163 "minValue": 0.0,
164 "maxValue": 100.0
165 },
166 {
167 "type": "ComboBox",
168 "name": "testComboBox",
169 "caption": "Combo Box",
170 "defaultValue": "value2",
171 "range": ["value1", "value2", "value3"]
172 },
173 {
174 "type": "MultiSelectionComboBox",
175 "name": "testMultiSelectionComboBox",
176 "caption": "Multi Selection Combo Box",
177 "defaultValue": ["value1", "value2"],
178 "range": ["value1", "value2", "value3"]
179 },
180 {
181 "type": "CheckBox",
182 "name": "testCheckBox",
183 "caption": "Check Box",
184 "defaultValue": true
185 },
186 {
187 "type": "GroupBox",
188 "caption": "Styled GroupBox",
189 "style": "label",
190 "items": [
191 {
192 "type": "Link",
193 "caption": "Customer Support",
194 "url": "https://example.com/"
195 },
196 {
197 "type": "Label",
198 "caption": "Label",
199 "description": "A Label",
200 "text": "Example"
201 }
202 ]
203 },
204 {
205 "type": "GroupBox",
206 "caption": "Styled GroupBox",
207 "style": "panel",
208 "useSwitchButton": true,
209 "defaultValue": true,
210 "switchButtonBehavior": "disable",
211 "name": "styledGroupBox1",
212 "items": [
213 {
214 "type": "TextField",
215 "name": "textFieldInGroupBox1",
216 "caption": "Text Field",
217 "description": "A text field",
218 "defaultValue": "a text"
219 }
220 ]
221 },
222 {
223 "type": "GroupBox",
224 "caption": "Styled GroupBox",
225 "style": "panel",
226 "useSwitchButton": true,
227 "defaultValue": true,
228 "switchButtonBehavior": "hide",
229 "name": "styledGroupBox2",
230 "items": [
231 {
232 "type": "TextField",
233 "name": "textFieldInGroupBox2",
234 "caption": "Text Field",
235 "description": "A text field",
236 "defaultValue": "a text"
237 }
238 ]
239 },
240 {
241 "type": "GroupBox",
242 "caption": "Nested GroupBox",
243 "items": [
244 {
245 "type": "Banner",
246 "icon": "info",
247 "text": "Some info text <a href=\"https://example.com/\">example</a>"
248 },
249 {
250 "type": "Banner",
251 "icon": "warning",
252 "text": "Some warning text <a href=\"https://example.com/\">example</a>"
253 }
254 ]
255 },
256 {
257 "type": "Placeholder",
258 "header": "Header",
259 "description": "Description",
260 "icon": "default"
261 }
262 ]
263 },
264 {
265 "type": "GroupBox",
266 "caption": "Test updating the Engine manifest",
267 "items":
268 [
269 {
270 "type": "CheckBox",
271 "name": ")json" + kPushEngineManifest + R"json(",
272 "caption": "Set the Device Agent settings model to empty",
273 "defaultValue": false
274 }
275 ]
276 },
277 {
278 "type": "GroupBox",
279 "caption": ")json" + kActiveSettingsGroupBoxCaption + R"json(",
280 "items":
281 [
282 {
283 "type": "ComboBox",
284 "name": ")json" + kActiveComboBoxId + R"json(",
285 "caption": "Active ComboBox",
286 "defaultValue": "Some value",
287 "isActive": true,
288 "range":
289 [
290 "Some value",
291 ")json" + kShowAdditionalComboBoxValue + R"json("
292 ]
293 },
294 {
295 "type": "CheckBox",
296 "name": ")json" + kActiveCheckBoxId + R"json(",
297 "caption": "Active CheckBox",
298 "defaultValue": false,
299 "isActive": true
300 },
301 {
302 "type": "RadioButtonGroup",
303 "name": ")json" + kActiveRadioButtonGroupId + R"json(",
304 "caption": "Active RadioButton Group",
305 "defaultValue": "Some value",
306 "isActive": true,
307 "range":
308 [
309 "Some value",
310 ")json" + kShowAdditionalRadioButtonValue + R"json("
311 ]
312 },
313 {
314 "type": "SpinBox",
315 "name": ")json" + kActiveMinValueId + R"json(",
316 "caption": "Active Minimum",
317 "defaultValue": 42,
318 "minValue": 0,
319 "maxValue": 42,
320 "isActive": true
321 },
322 {
323 "type": "SpinBox",
324 "name": ")json" + kActiveMaxValueId + R"json(",
325 "caption": "Active Maximum",
326 "defaultValue": 42,
327 "minValue": 42,
328 "maxValue": 100,
329 "isActive": true
330 },
331 {
332 "type": "Flow",
333 "caption": "Parameters",
334 "items":
335 [
336 {
337 "type": "Button",
338 "name": ")json" + kShowMessageButtonId + R"json(",
339 "caption": "Show Message...",
340 "isActive": true,
341 "parametersModel": )json" + kParametersModel + R"json(
342 }
343 ]
344 },
345 {
346 "type": "Flow",
347 "caption": "Webpage",
348 "items":
349 [
350 {
351 "type": "TextField",
352 "name": ")json" + kUrlId + R"json(",
353 "caption": "Url",
354 "defaultValue": "https://example.org/"
355 },
356 {
357 "type": "Button",
358 "name": ")json" + kShowUrlButtonId + R"json(",
359 "caption": "Show Webpage...",
360 "isActive": true
361 },
362 {
363 "type": "CheckBox",
364 "name": ")json" + kUseProxyId + R"json(",
365 "caption": "Use proxy",
366 "defaultValue": false
367 }
368 ]
369 }
370 ]
371 }
372 ]
373 }
374 )json";
375
376 static const std::string kAlternativeSettingsModel =
377 /*suppress newline*/ 1 + (const char*) R"json("
378 {
379 "type": "Settings",
380 "items":
381 [
382 {
383 "type": "ComboBox",
384 "name": ")json" + kSettingsModelSettings + R"json(",
385 "caption": "Settings model",
386 "defaultValue": ")json" + kRegularSettingsModelOption + R"json(",
387 "range":
388 [
389 ")json" + kRegularSettingsModelOption + R"json(",
390 ")json" + kAlternativeSettingsModelOption + R"json("
391 ]
392 },
393 {
394 "type": "GroupBox",
395 "caption": "Alternative GroupBox",
396 "items":
397 [
398 {
399 "type": "CheckBox",
400 "name": "alternativeCheckBox",
401 "caption": "Alternative CheckBox",
402 "defaultValue": true
403 },
404 {
405 "type": "TextField",
406 "name": "alternativeTextField",
407 "caption": "Alternative TextField",
408 "defaultValue": "alternative text"
409 }
410 ]
411 }
412 ]
413 }
414 )json";
415
416 static const std::string kRegularSettingsModelPart1 = /*suppress newline*/ 1 + R"json(
417 {
418 "type": "Settings",
419 "items":
420 [
421 {
422 "type": "ComboBox",
423 "name": ")json" + kSettingsModelSettings + R"json(",
424 "caption": "Settings model",
425 "defaultValue": ")json" + kRegularSettingsModelOption + R"json(",
426 "range":
427 [
428 ")json" + kRegularSettingsModelOption + R"json(",
429 ")json" + kAlternativeSettingsModelOption + R"json("
430 ]
431 },
432 {
433 "type": "GroupBox",
434 "caption": "Example Stub DeviceAgent settings",
435 "items":
436 [
437 {
438 "type": "TextField",
439 "name": "testTextField",
440 "caption": "Device Agent Text Field",
441 "description": "A text field",
442 "defaultValue": "a text"
443 },
444 {
445 "type": "ComboBox",
446 "name": ")json" + kCitySelector + R"json(",
447 "caption": "Cities",
448 "defaultValue": "English",
449 "range": [
450 ")json" + kEnglishOption + R"json(",
451 ")json" + kGermanOption + R"json("
452 ]
453 },
454 )json";
455
456 static const std::string kEnglishCitiesSettingsModelPart = /*suppress newline*/ 1 + R"json(
457 {
458 "type": "RadioButtonGroup",
459 "name": "testEnglishRadioButtonGroup",
460 "caption": "Choose one",
461 "description": "Choose one option",
462 "defaultValue": "London",
463 "range":
464 [
465 "London",
466 "Liverpool"
467 ]
468 },
469 )json";
470
471 static const std::string kGermanCitiesSettingsModelPart = /*suppress newline*/ 1 + R"json(
472 {
473 "type": "RadioButtonGroup",
474 "name": "testGermanRadioButtonGroup",
475 "caption": "Choose one",
476 "description": "Choose one option",
477 "defaultValue": "Berlin",
478 "range":
479 [
480 "Berlin",
481 "Nuremberg",
482 "Leipzig"
483 ]
484 },
485 )json";
486
487 static const std::string kRegularSettingsModelPart2 = /*suppress newline*/ 1 + R"json("
488 {
489 "type": "RadioButtonGroup",
490 "name": "testRadioButtonGroup",
491 "caption": "RadioButton Group",
492 "description": "Choose one option",
493 "defaultValue": "Cs_enodatum",
494 "range":
495 [
496 "K_gowerianus",
497 "K_galilaeii",
498 "S_calloviense",
499 "S_micans",
500 "Cs_enodatum",
501 "K_medea",
502 "K_jason",
503 "K_obductum",
504 "K_posterior"
505 ],
506 "itemCaptions":
507 {
508 "K_gowerianus": "Kepplerites gowerianus",
509 "K_galilaeii": "Kepplerites galilaeii",
510 "S_calloviense": "Sigaloceras calloviense",
511 "S_micans": "Sigaloceras micans",
512 "Cs_enodatum": "Catasigaloceras enodatum",
513 "K_medea": "Kosmoceras medea",
514 "K_jason": "Kosmoceras jason",
515 "K_obductum": "Kosmoceras obductum",
516 "K_posterior": "Kosmoceras posterior"
517 }
518 },
519 {
520 "type": "CheckBoxGroup",
521 "name": "testCheckBoxGroup",
522 "caption": "CheckBox Group",
523 "description": "Choose one or several options",
524 "defaultValue": ["Coleoidea", "Nautiloidea"],
525 "range":
526 [
527 "Coleoidea",
528 "Ammonoidea",
529 "Nautiloidea",
530 "Orthoceratoidea"
531 ],
532 "itemCaptions":
533 {
534 "Coleoidea": "Coleoidea (Bather, 1888)",
535 "Ammonoidea": "Ammonoidea (Zittel, 1884)",
536 "Nautiloidea": "Nautiloidea (Agassiz, 1847)",
537 "Orthoceratoidea": "Orthoceratoidea (M'Coy 1844)"
538 }
539 },
540 {
541 "type": "SpinBox",
542 "caption": "Device Agent SpinBox (integration-side)",
543 "name": "integrationSideTestSpinBox",
544 "defaultValue": 42,
545 "minValue": 0,
546 "maxValue": 100
547 },
548 {
549 "type": "DoubleSpinBox",
550 "caption": "Device Agent DoubleSpinBox",
551 "name": "testDoubleSpinBox",
552 "defaultValue": 3.1415,
553 "minValue": 0.0,
554 "maxValue": 100.0
555 },
556 {
557 "type": "ComboBox",
558 "name": "testComboBox",
559 "caption": "Device Agent ComboBox",
560 "defaultValue": "value2",
561 "range": ["value1", "value2", "value3"],
562 "itemCaptions":
563 {
564 "value1": "Device Agent Value #1",
565 "value2": "Device Agent Value #2",
566 "value3": "Device Agent Value #3"
567 }
568 },
569 {
570 "type": "MultiSelectionComboBox",
571 "name": "testMultiSelectionComboBox",
572 "caption": "Multi Selection Combo Box",
573 "defaultValue": ["value1", "value2"],
574 "range": ["value1", "value2", "value3"],
575 "itemCaptions":
576 {
577 "value1": "Device Agent Value #1",
578 "value2": "Device Agent Value #2",
579 "value3": "Device Agent Value #3"
580 }
581 },
582 {
583 "type": "Separator"
584 },
585 {
586 "type": "CheckBox",
587 "caption": "Device Agent CheckBox",
588 "name": "testCheckBox",
589 "defaultValue": true
590 },
591 {
592 "type": "CheckBox",
593 "caption": "Disabled Device Agent CheckBox",
594 "name": "disabledTestCheckBox",
595 "defaultValue": false,
596 "enabled": false
597 },
598 {
599 "type": "CheckBox",
600 "caption": "Hidden Device Agent CheckBox",
601 "name": "hiddenTestCheckBox",
602 "defaultValue": false,
603 "visible": false
604 },
605 {
606 "type": "GroupBox",
607 "caption": "Styled GroupBox",
608 "style": "label",
609 "items": [
610 {
611 "type": "Link",
612 "caption": "Customer Support",
613 "url": "https://example.com/"
614 }
615 ]
616 },
617 {
618 "type": "GroupBox",
619 "caption": "Styled GroupBox",
620 "style": "panel",
621 "useSwitchButton": true,
622 "defaultValue": true,
623 "switchButtonBehavior": "disable",
624 "name": "styledGroupBox1",
625 "items": [
626 {
627 "type": "TextField",
628 "name": "textFieldInGroupBox1",
629 "caption": "Text Field",
630 "description": "A text field",
631 "defaultValue": "a text"
632 }
633 ]
634 },
635 {
636 "type": "GroupBox",
637 "caption": "Styled GroupBox",
638 "style": "panel",
639 "useSwitchButton": true,
640 "defaultValue": true,
641 "switchButtonBehavior": "hide",
642 "name": "styledGroupBox2",
643 "items": [
644 {
645 "type": "TextField",
646 "name": "textFieldInGroupBox2",
647 "caption": "Text Field",
648 "description": "A text field",
649 "defaultValue": "a text"
650 }
651 ]
652 },
653 {
654 "type": "GroupBox",
655 "caption": "Nested GroupBox",
656 "items": [
657 {
658 "type": "Banner",
659 "icon": "info",
660 "text": "Some info text <a href=\"https://example.com/\">example</a>"
661 },
662 {
663 "type": "Banner",
664 "icon": "warning",
665 "text": "Some warning text <a href=\"https://example.com/\">example</a>"
666 }
667 ]
668 },
669 {
670 "type": "Placeholder",
671 "header": "Header",
672 "description": "Description",
673 "icon": "default"
674 }
675 ]
676 }
677 ],
678 "sections":
679 [
680 {
681 "type": "Section",
682 "caption": "Example section",
683 "items":
684 [
685 {
686 "type": "GroupBox",
687 "caption": "Example Stub DeviceAgent settings section",
688 "items":
689 [
690 {
691 "type": "TextField",
692 "name": "testTextFieldWithValidation",
693 "caption": "Hexadecimal number text field",
694 "defaultValue": "12ab34cd",
695 "validationRegex": "^[a-f0-9]+$",
696 "validationRegexFlags": "i",
697 "validationErrorMessage":
698 "Text must contain only digits and characters a-f, e.g. 12ab34cd."
699 },
700 {
701 "type": "PasswordField",
702 "name": "passwordField1",
703 "caption": "Password Field",
704 "description": "A password field",
705 "defaultValue": "1234",
706 "validationErrorMessage": "Password must contain only digits",
707 "validationRegex": "^[0-9]+$",
708 "validationRegexFlags": "i"
709 },
710 {
711 "type": "SpinBox",
712 "caption": "Device Agent SpinBox (integration-side)",
713 "name": "integrationSideTestSpinBox2",
714 "defaultValue": 42,
715 "minValue": 0,
716 "maxValue": 100
717 },
718 {
719 "type": "DoubleSpinBox",
720 "caption": "Device Agent DoubleSpinBox",
721 "name": "testDoubleSpinBox2",
722 "defaultValue": 3.1415,
723 "minValue": 0.0,
724 "maxValue": 100.0
725 },
726 {
727 "type": "ComboBox",
728 "name": "testComboBox2",
729 "caption": "Device Agent ComboBox",
730 "defaultValue": "value2",
731 "range": ["value1", "value2", "value3"]
732 },
733 {
734 "type": "CheckBox",
735 "caption": "Device Agent CheckBox",
736 "name": "testCheckBox2",
737 "defaultValue": true
738 }
739 ]
740 }
741 ],
742 "sections":
743 [
744 {
745 "type": "Section",
746 "caption": "Nested section",
747 "items":
748 [
749 {
750 "type": "GroupBox",
751 "caption": "Example Stub DeviceAgent settings nested section",
752 "items":
753 [
754 {
755 "type": "SwitchButton",
756 "caption": "Switch Button",
757 "name": "testSwitch",
758 "description": "Tooltip for the switch button",
759 "defaultValue": false
760 },
761 {
762 "type": "SpinBox",
763 "caption": "SpinBox Parameter",
764 "name": "testSpinBox3",
765 "defaultValue": 42,
766 "minValue": 0,
767 "maxValue": 100
768 },
769 {
770 "type": "DoubleSpinBox",
771 "caption": "DoubleSpinBox Parameter",
772 "name": "testDoubleSpinBox3",
773 "defaultValue": 3.1415,
774 "minValue": 0.0,
775 "maxValue": 100.0
776 },
777 {
778 "type": "ComboBox",
779 "name": "testComboBox3",
780 "caption": "ComboBox Parameter",
781 "defaultValue": "value2",
782 "range": ["value1", "value2", "value3"]
783 },
784 {
785 "type": "CheckBox",
786 "caption": "CheckBox Parameter",
787 "name": "testCheckBox3",
788 "defaultValue": true
789 }
790 ]
791 }
792 ]
793 }
794 ]
795 },
796 {
797 "type": "Section",
798 "caption": ")json" + kActiveSettingsSectionCaption + R"json(",
799 "items":
800 [
801 {
802 "type": "ComboBox",
803 "name": ")json" + kActiveComboBoxId + R"json(",
804 "caption": "Active ComboBox",
805 "defaultValue": "Some value",
806 "isActive": true,
807 "range":
808 [
809 "Some value",
810 ")json" + kShowAdditionalComboBoxValue + R"json("
811 ]
812 },
813 {
814 "type": "CheckBox",
815 "name": ")json" + kActiveCheckBoxId + R"json(",
816 "caption": "Active CheckBox",
817 "defaultValue": false,
818 "isActive": true,
819 "parametersModel":
820 {
821 "type": "Settings",
822 "items":
823 [
824 {
825 "type": "TextField",
826 "name": "testTextField",
827 "caption": "Text Field Parameter",
828 "description": "A text field",
829 "defaultValue": "a text"
830 },
831 {
832 "type": "GroupBox",
833 "caption": "Parameter Group",
834 "items":
835 [
836 {
837 "type": "SpinBox",
838 "caption": "SpinBox Parameter",
839 "name": "testSpinBox",
840 "defaultValue": 42,
841 "minValue": 0,
842 "maxValue": 100
843 },
844 {
845 "type": "DoubleSpinBox",
846 "caption": "DoubleSpinBox Parameter",
847 "name": "testDoubleSpinBox",
848 "defaultValue": 3.1415,
849 "minValue": 0.0,
850 "maxValue": 100.0
851 },
852 {
853 "type": "ComboBox",
854 "caption": "ComboBox Parameter",
855 "name": "testComboBox",
856 "defaultValue": "value2",
857 "range": ["value1", "value2", "value3"]
858 },
859 {
860 "type": "CheckBox",
861 "caption": "CheckBox Parameter",
862 "name": "testCheckBox",
863 "defaultValue": true
864 },
865 {
866 "type": "TextArea",
867 "caption": "TextArea Parameter",
868 "name": "testTextArea"
869 }
870 ]
871 }
872 ]
873 }
874 },
875 {
876 "type": "RadioButtonGroup",
877 "name": ")json" + kActiveRadioButtonGroupId + R"json(",
878 "caption": "Active RadioButton Group",
879 "defaultValue": "Some value",
880 "isActive": true,
881 "range":
882 [
883 "Some value",
884 ")json" + kShowAdditionalRadioButtonValue + R"json("
885 ]
886 },
887 {
888 "type": "SpinBox",
889 "name": ")json" + kActiveMinValueId + R"json(",
890 "caption": "Active Minimum",
891 "defaultValue": 42,
892 "minValue": 0,
893 "maxValue": 42,
894 "isActive": true
895 },
896 {
897 "type": "SpinBox",
898 "name": ")json" + kActiveMaxValueId + R"json(",
899 "caption": "Active Maximum",
900 "defaultValue": 42,
901 "minValue": 42,
902 "maxValue": 100,
903 "isActive": true
904 },
905 {
906 "type": "Flow",
907 "caption": "Parameters",
908 "items":
909 [
910 {
911 "type": "Button",
912 "name": ")json" + kShowMessageButtonId + R"json(",
913 "caption": "Show Message...",
914 "isActive": true,
915 "parametersModel": )json" + kParametersModel + R"json(
916 }
917 ]
918 },
919 {
920 "type": "Flow",
921 "caption": "Webpage",
922 "items":
923 [
924 {
925 "type": "TextField",
926 "name": ")json" + kUrlId + R"json(",
927 "caption": "Url",
928 "defaultValue": "https://example.org/"
929 },
930 {
931 "type": "Button",
932 "name": ")json" + kShowUrlButtonId + R"json(",
933 "caption": "Show Webpage...",
934 "isActive": true
935 },
936 {
937 "type": "CheckBox",
938 "name": ")json" + kUseProxyId + R"json(",
939 "caption": "Use proxy",
940 "defaultValue": false
941 },
942 {
943 "type": "CheckBox",
944 "name": ")json" + kUseDeviceCredentialsId + R"json(",
945 "caption": "Use device credentials",
946 "defaultValue": false
947 }
948 ]
949 },
950 {
951 "type": "CheckBox",
952 "name": ")json" + kActiveCheckBoxForValueSetChangeId + R"json(",
953 "caption": "Add optional value to combo-box:",
954 "defaultValue": true,
955 "isActive": true
956 },
957 {
958 "type": "ComboBox",
959 "name": ")json" + kComboBoxForValueSetChangeId + R"json(",
960 "caption": "Values",
961 "defaultValue": ")json" + kComboBoxForValueSetChangeValuePermanent + R"json(",
962 "range":
963 [
964 ")json" + kComboBoxForValueSetChangeValuePermanent + R"json(",
965 ")json" + kComboBoxForValueSetChangeValueOptional + R"json("
966 ]
967 }
968 ]
969 }
970 ]
971 }
972 )json";
973
974 } // namespace settings
975 } // namespace stub
976 } // namespace analytics
977 } // namespace vms_server_plugins
978 } // namespace nx
nx
Definition: apple_utils.h:6