ultravisor 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/launch.json +11 -0
- package/.claude/ultravisor-dev-config.json +3 -0
- package/.ultravisor.json +426 -0
- package/docs/README.md +63 -0
- package/package.json +12 -8
- package/source/Ultravisor.cjs +22 -3
- package/source/cli/Ultravisor-CLIProgram.cjs +35 -23
- package/source/cli/commands/Ultravisor-Command-SingleOperation.cjs +29 -18
- package/source/cli/commands/Ultravisor-Command-SingleTask.cjs +62 -19
- package/source/cli/commands/Ultravisor-Command-UpdateTask.cjs +27 -15
- package/source/config/Ultravisor-Default-Command-Configuration.cjs +5 -3
- package/source/services/Ultravisor-ExecutionEngine.cjs +1039 -0
- package/source/services/Ultravisor-ExecutionManifest.cjs +399 -0
- package/source/services/Ultravisor-Hypervisor-State.cjs +270 -97
- package/source/services/Ultravisor-Hypervisor.cjs +38 -83
- package/source/services/Ultravisor-StateManager.cjs +241 -0
- package/source/services/Ultravisor-TaskTypeRegistry.cjs +143 -0
- package/source/services/tasks/Ultravisor-TaskType-Base.cjs +105 -0
- package/source/services/tasks/control/Ultravisor-TaskType-IfConditional.cjs +148 -0
- package/source/services/tasks/control/Ultravisor-TaskType-LaunchOperation.cjs +187 -0
- package/source/services/tasks/control/Ultravisor-TaskType-SplitExecute.cjs +184 -0
- package/source/services/tasks/data/Ultravisor-TaskType-ReplaceString.cjs +82 -0
- package/source/services/tasks/data/Ultravisor-TaskType-SetValues.cjs +81 -0
- package/source/services/tasks/data/Ultravisor-TaskType-StringAppender.cjs +101 -0
- package/source/services/tasks/file-io/Ultravisor-TaskType-ReadFile.cjs +103 -0
- package/source/services/tasks/file-io/Ultravisor-TaskType-WriteFile.cjs +117 -0
- package/source/services/tasks/interaction/Ultravisor-TaskType-ErrorMessage.cjs +54 -0
- package/source/services/tasks/interaction/Ultravisor-TaskType-ValueInput.cjs +62 -0
- package/source/web_server/Ultravisor-API-Server.cjs +237 -124
- package/test/Ultravisor_browser_tests.js +2226 -0
- package/test/Ultravisor_tests.js +1143 -5830
- package/webinterface/css/ultravisor.css +23 -0
- package/webinterface/package.json +6 -3
- package/webinterface/source/Pict-Application-Ultravisor.js +93 -73
- package/webinterface/source/cards/FlowCard-CSVTransform.js +43 -0
- package/webinterface/source/cards/FlowCard-Command.js +86 -0
- package/webinterface/source/cards/FlowCard-ComprehensionIntersect.js +40 -0
- package/webinterface/source/cards/FlowCard-Conditional.js +87 -0
- package/webinterface/source/cards/FlowCard-CopyFile.js +55 -0
- package/webinterface/source/cards/FlowCard-End.js +29 -0
- package/webinterface/source/cards/FlowCard-GetJSON.js +55 -0
- package/webinterface/source/cards/FlowCard-GetText.js +54 -0
- package/webinterface/source/cards/FlowCard-Histogram.js +176 -0
- package/webinterface/source/cards/FlowCard-LaunchOperation.js +82 -0
- package/webinterface/source/cards/FlowCard-ListFiles.js +55 -0
- package/webinterface/source/cards/FlowCard-MeadowCount.js +44 -0
- package/webinterface/source/cards/FlowCard-MeadowCreate.js +44 -0
- package/webinterface/source/cards/FlowCard-MeadowDelete.js +45 -0
- package/webinterface/source/cards/FlowCard-MeadowRead.js +46 -0
- package/webinterface/source/cards/FlowCard-MeadowReads.js +46 -0
- package/webinterface/source/cards/FlowCard-MeadowUpdate.js +44 -0
- package/webinterface/source/cards/FlowCard-ParseCSV.js +85 -0
- package/webinterface/source/cards/FlowCard-ReadJSON.js +54 -0
- package/webinterface/source/cards/FlowCard-ReadText.js +54 -0
- package/webinterface/source/cards/FlowCard-RestRequest.js +59 -0
- package/webinterface/source/cards/FlowCard-SendJSON.js +57 -0
- package/webinterface/source/cards/FlowCard-Solver.js +77 -0
- package/webinterface/source/cards/FlowCard-Start.js +29 -0
- package/webinterface/source/cards/FlowCard-TemplateString.js +77 -0
- package/webinterface/source/cards/FlowCard-WriteJSON.js +54 -0
- package/webinterface/source/cards/FlowCard-WriteText.js +54 -0
- package/webinterface/source/data/ExampleFlow-CSVPipeline.js +231 -0
- package/webinterface/source/data/ExampleFlow-FileProcessor.js +315 -0
- package/webinterface/source/data/ExampleFlow-MeadowPipeline.js +328 -0
- package/webinterface/source/providers/PictRouter-Ultravisor-Configuration.json +8 -8
- package/webinterface/source/views/PictView-Ultravisor-Dashboard.js +6 -6
- package/webinterface/source/views/PictView-Ultravisor-FlowEditor.js +436 -0
- package/webinterface/source/views/PictView-Ultravisor-ManifestList.js +45 -43
- package/webinterface/source/views/PictView-Ultravisor-OperationEdit.js +34 -89
- package/webinterface/source/views/PictView-Ultravisor-OperationList.js +128 -13
- package/webinterface/source/views/PictView-Ultravisor-PendingInput.js +314 -0
- package/webinterface/source/views/PictView-Ultravisor-Schedule.js +18 -53
- package/webinterface/source/views/PictView-Ultravisor-TimingView.js +27 -14
- package/webinterface/source/views/PictView-Ultravisor-TopBar.js +2 -1
- package/.babelrc +0 -6
- package/.browserslistrc +0 -1
- package/.browserslistrc-BACKUP +0 -1
- package/.gulpfile-quackage-config.json +0 -7
- package/.gulpfile-quackage.js +0 -2
- package/debug/Harness.js +0 -5
- package/source/services/Ultravisor-Operation-Manifest.cjs +0 -160
- package/source/services/Ultravisor-Operation.cjs +0 -200
- package/source/services/Ultravisor-Task.cjs +0 -349
- package/source/services/events/Ultravisor-Hypervisor-Event-Solver.cjs +0 -11
- package/source/services/tasks/Ultravisor-Task-Base.cjs +0 -264
- package/source/services/tasks/Ultravisor-Task-CollectValues.cjs +0 -188
- package/source/services/tasks/Ultravisor-Task-Command.cjs +0 -65
- package/source/services/tasks/Ultravisor-Task-CommandEach.cjs +0 -190
- package/source/services/tasks/Ultravisor-Task-Conditional.cjs +0 -104
- package/source/services/tasks/Ultravisor-Task-DateWindow.cjs +0 -72
- package/source/services/tasks/Ultravisor-Task-GeneratePagedOperation.cjs +0 -336
- package/source/services/tasks/Ultravisor-Task-LaunchOperation.cjs +0 -143
- package/source/services/tasks/Ultravisor-Task-LaunchTask.cjs +0 -146
- package/source/services/tasks/Ultravisor-Task-LineMatch.cjs +0 -158
- package/source/services/tasks/Ultravisor-Task-Request.cjs +0 -56
- package/source/services/tasks/Ultravisor-Task-Solver.cjs +0 -89
- package/source/services/tasks/Ultravisor-Task-TemplateString.cjs +0 -93
- package/source/services/tasks/rest/Ultravisor-Task-GetBinary.cjs +0 -127
- package/source/services/tasks/rest/Ultravisor-Task-GetJSON.cjs +0 -119
- package/source/services/tasks/rest/Ultravisor-Task-GetText.cjs +0 -109
- package/source/services/tasks/rest/Ultravisor-Task-GetXML.cjs +0 -112
- package/source/services/tasks/rest/Ultravisor-Task-RestRequest.cjs +0 -499
- package/source/services/tasks/rest/Ultravisor-Task-SendJSON.cjs +0 -150
- package/source/services/tasks/stagingfiles/Ultravisor-Task-CopyFile.cjs +0 -110
- package/source/services/tasks/stagingfiles/Ultravisor-Task-ListFiles.cjs +0 -89
- package/source/services/tasks/stagingfiles/Ultravisor-Task-ReadBinary.cjs +0 -87
- package/source/services/tasks/stagingfiles/Ultravisor-Task-ReadJSON.cjs +0 -67
- package/source/services/tasks/stagingfiles/Ultravisor-Task-ReadText.cjs +0 -66
- package/source/services/tasks/stagingfiles/Ultravisor-Task-ReadXML.cjs +0 -69
- package/source/services/tasks/stagingfiles/Ultravisor-Task-WriteBinary.cjs +0 -95
- package/source/services/tasks/stagingfiles/Ultravisor-Task-WriteJSON.cjs +0 -96
- package/source/services/tasks/stagingfiles/Ultravisor-Task-WriteText.cjs +0 -99
- package/source/services/tasks/stagingfiles/Ultravisor-Task-WriteXML.cjs +0 -102
- package/webinterface/.babelrc +0 -6
- package/webinterface/.browserslistrc +0 -1
- package/webinterface/.browserslistrc-BACKUP +0 -1
- package/webinterface/.gulpfile-quackage-config.json +0 -7
- package/webinterface/.gulpfile-quackage.js +0 -2
- package/webinterface/source/views/PictView-Ultravisor-TaskEdit.js +0 -220
- package/webinterface/source/views/PictView-Ultravisor-TaskList.js +0 -248
- /package/docs/{cover.md → _cover.md} +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const libPictFlowCard = require('pict-section-flow').PictFlowCard;
|
|
2
|
+
|
|
3
|
+
class FlowCardEnd extends libPictFlowCard
|
|
4
|
+
{
|
|
5
|
+
constructor(pFable, pOptions, pServiceHash)
|
|
6
|
+
{
|
|
7
|
+
super(pFable, Object.assign(
|
|
8
|
+
{},
|
|
9
|
+
{
|
|
10
|
+
Title: 'End',
|
|
11
|
+
Code: 'end',
|
|
12
|
+
Description: 'Termination point for the workflow.',
|
|
13
|
+
Category: 'Flow Control',
|
|
14
|
+
TitleBarColor: '#455a64',
|
|
15
|
+
BodyStyle: { fill: '#eceff1', stroke: '#455a64' },
|
|
16
|
+
Width: 140,
|
|
17
|
+
Height: 80,
|
|
18
|
+
Inputs:
|
|
19
|
+
[
|
|
20
|
+
{ Name: 'In', Side: 'left-bottom', PortType: 'event-in', MinimumInputCount: 1, MaximumInputCount: 5 }
|
|
21
|
+
],
|
|
22
|
+
Outputs: []
|
|
23
|
+
},
|
|
24
|
+
pOptions),
|
|
25
|
+
pServiceHash);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
module.exports = FlowCardEnd;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
const libPictFlowCard = require('pict-section-flow').PictFlowCard;
|
|
2
|
+
|
|
3
|
+
class FlowCardGetJSON extends libPictFlowCard
|
|
4
|
+
{
|
|
5
|
+
constructor(pFable, pOptions, pServiceHash)
|
|
6
|
+
{
|
|
7
|
+
super(pFable, Object.assign(
|
|
8
|
+
{},
|
|
9
|
+
{
|
|
10
|
+
Title: 'GET JSON',
|
|
11
|
+
Code: 'GETJSON',
|
|
12
|
+
Description: 'HTTP GET request, parse response as JSON.',
|
|
13
|
+
Category: 'REST',
|
|
14
|
+
TitleBarColor: '#e65100',
|
|
15
|
+
BodyStyle: { fill: '#fff3e0', stroke: '#e65100' },
|
|
16
|
+
Width: 180,
|
|
17
|
+
Height: 80,
|
|
18
|
+
Inputs:
|
|
19
|
+
[
|
|
20
|
+
{ Name: 'Trigger', Side: 'left-bottom', PortType: 'event-in', MinimumInputCount: 0, MaximumInputCount: 1 },
|
|
21
|
+
{ Name: 'URL', Side: 'left-top', PortType: 'setting', MinimumInputCount: 0, MaximumInputCount: 1 }
|
|
22
|
+
],
|
|
23
|
+
Outputs:
|
|
24
|
+
[
|
|
25
|
+
{ Name: 'Data', Side: 'right-top', PortType: 'value' },
|
|
26
|
+
{ Name: 'Error', Side: 'bottom', PortType: 'error' }
|
|
27
|
+
],
|
|
28
|
+
PropertiesPanel:
|
|
29
|
+
{
|
|
30
|
+
PanelType: 'Form',
|
|
31
|
+
DefaultWidth: 380,
|
|
32
|
+
DefaultHeight: 280,
|
|
33
|
+
Title: 'GET JSON Settings',
|
|
34
|
+
Configuration:
|
|
35
|
+
{
|
|
36
|
+
Manifest:
|
|
37
|
+
{
|
|
38
|
+
Scope: 'FlowCardGetJSON',
|
|
39
|
+
Sections: [{ Name: 'Request', Hash: 'GJSection', Groups: [{ Name: 'Settings', Hash: 'GJGroup' }] }],
|
|
40
|
+
Descriptors:
|
|
41
|
+
{
|
|
42
|
+
'Record.Data.URL': { Name: 'URL', Hash: 'URL', DataType: 'String', Default: '', PictForm: { Section: 'GJSection', Group: 'GJGroup', Row: 1, Width: 12 } },
|
|
43
|
+
'Record.Data.Headers': { Name: 'Headers (JSON)', Hash: 'Headers', DataType: 'String', Default: '', PictForm: { Section: 'GJSection', Group: 'GJGroup', Row: 2, Width: 12, InputType: 'TextArea' } },
|
|
44
|
+
'Record.Data.Destination': { Name: 'State Destination', Hash: 'Destination', DataType: 'String', Default: '', PictForm: { Section: 'GJSection', Group: 'GJGroup', Row: 3, Width: 12 } }
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
pOptions),
|
|
51
|
+
pServiceHash);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
module.exports = FlowCardGetJSON;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
const libPictFlowCard = require('pict-section-flow').PictFlowCard;
|
|
2
|
+
|
|
3
|
+
class FlowCardGetText extends libPictFlowCard
|
|
4
|
+
{
|
|
5
|
+
constructor(pFable, pOptions, pServiceHash)
|
|
6
|
+
{
|
|
7
|
+
super(pFable, Object.assign(
|
|
8
|
+
{},
|
|
9
|
+
{
|
|
10
|
+
Title: 'GET Text',
|
|
11
|
+
Code: 'GETTXT',
|
|
12
|
+
Description: 'HTTP GET request, return response as text.',
|
|
13
|
+
Category: 'REST',
|
|
14
|
+
TitleBarColor: '#e65100',
|
|
15
|
+
BodyStyle: { fill: '#fff3e0', stroke: '#e65100' },
|
|
16
|
+
Width: 180,
|
|
17
|
+
Height: 80,
|
|
18
|
+
Inputs:
|
|
19
|
+
[
|
|
20
|
+
{ Name: 'Trigger', Side: 'left-bottom', PortType: 'event-in', MinimumInputCount: 0, MaximumInputCount: 1 },
|
|
21
|
+
{ Name: 'URL', Side: 'left-top', PortType: 'setting', MinimumInputCount: 0, MaximumInputCount: 1 }
|
|
22
|
+
],
|
|
23
|
+
Outputs:
|
|
24
|
+
[
|
|
25
|
+
{ Name: 'Data', Side: 'right-top', PortType: 'value' },
|
|
26
|
+
{ Name: 'Error', Side: 'bottom', PortType: 'error' }
|
|
27
|
+
],
|
|
28
|
+
PropertiesPanel:
|
|
29
|
+
{
|
|
30
|
+
PanelType: 'Form',
|
|
31
|
+
DefaultWidth: 380,
|
|
32
|
+
DefaultHeight: 240,
|
|
33
|
+
Title: 'GET Text Settings',
|
|
34
|
+
Configuration:
|
|
35
|
+
{
|
|
36
|
+
Manifest:
|
|
37
|
+
{
|
|
38
|
+
Scope: 'FlowCardGetText',
|
|
39
|
+
Sections: [{ Name: 'Request', Hash: 'GTSection', Groups: [{ Name: 'Settings', Hash: 'GTGroup' }] }],
|
|
40
|
+
Descriptors:
|
|
41
|
+
{
|
|
42
|
+
'Record.Data.URL': { Name: 'URL', Hash: 'URL', DataType: 'String', Default: '', PictForm: { Section: 'GTSection', Group: 'GTGroup', Row: 1, Width: 12 } },
|
|
43
|
+
'Record.Data.Destination': { Name: 'State Destination', Hash: 'Destination', DataType: 'String', Default: '', PictForm: { Section: 'GTSection', Group: 'GTGroup', Row: 2, Width: 12 } }
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
pOptions),
|
|
50
|
+
pServiceHash);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
module.exports = FlowCardGetText;
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
const libPictFlowCard = require('pict-section-flow').PictFlowCard;
|
|
2
|
+
|
|
3
|
+
class FlowCardHistogram extends libPictFlowCard
|
|
4
|
+
{
|
|
5
|
+
constructor(pFable, pOptions, pServiceHash)
|
|
6
|
+
{
|
|
7
|
+
super(pFable, Object.assign(
|
|
8
|
+
{},
|
|
9
|
+
{
|
|
10
|
+
Title: 'Histogram',
|
|
11
|
+
Code: 'HIST',
|
|
12
|
+
Description: 'Generate a histogram visualization of numeric data.',
|
|
13
|
+
Category: 'Pipeline',
|
|
14
|
+
TitleBarColor: '#c62828',
|
|
15
|
+
BodyStyle: { fill: '#ffebee', stroke: '#c62828' },
|
|
16
|
+
Width: 240,
|
|
17
|
+
Height: 140,
|
|
18
|
+
ShowTypeLabel: false,
|
|
19
|
+
Inputs:
|
|
20
|
+
[
|
|
21
|
+
{ Name: 'Data', Side: 'left-top', PortType: 'value', MinimumInputCount: 1, MaximumInputCount: 1 },
|
|
22
|
+
{ Name: 'Field', Side: 'left-top', PortType: 'setting', MinimumInputCount: 0, MaximumInputCount: 1 }
|
|
23
|
+
],
|
|
24
|
+
Outputs:
|
|
25
|
+
[
|
|
26
|
+
{ Name: 'Stats', Side: 'right-top', PortType: 'value' }
|
|
27
|
+
],
|
|
28
|
+
PropertiesPanel:
|
|
29
|
+
{
|
|
30
|
+
PanelType: 'Form',
|
|
31
|
+
DefaultWidth: 340,
|
|
32
|
+
DefaultHeight: 220,
|
|
33
|
+
Title: 'Histogram Settings',
|
|
34
|
+
Configuration:
|
|
35
|
+
{
|
|
36
|
+
Manifest:
|
|
37
|
+
{
|
|
38
|
+
Scope: 'FlowCardHistogram',
|
|
39
|
+
Sections:
|
|
40
|
+
[
|
|
41
|
+
{
|
|
42
|
+
Name: 'Histogram',
|
|
43
|
+
Hash: 'HistSection',
|
|
44
|
+
Groups:
|
|
45
|
+
[
|
|
46
|
+
{ Name: 'Settings', Hash: 'HistGroup' }
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
Descriptors:
|
|
51
|
+
{
|
|
52
|
+
'Record.Data.Field':
|
|
53
|
+
{
|
|
54
|
+
Name: 'Data Field',
|
|
55
|
+
Hash: 'Field',
|
|
56
|
+
DataType: 'String',
|
|
57
|
+
Default: 'score',
|
|
58
|
+
PictForm: { Section: 'HistSection', Group: 'HistGroup', Row: 1, Width: 8 }
|
|
59
|
+
},
|
|
60
|
+
'Record.Data.Bins':
|
|
61
|
+
{
|
|
62
|
+
Name: 'Bin Count',
|
|
63
|
+
Hash: 'Bins',
|
|
64
|
+
DataType: 'Number',
|
|
65
|
+
Default: 5,
|
|
66
|
+
PictForm: { Section: 'HistSection', Group: 'HistGroup', Row: 1, Width: 4 }
|
|
67
|
+
},
|
|
68
|
+
'Record.Data.Destination':
|
|
69
|
+
{
|
|
70
|
+
Name: 'Stats Destination',
|
|
71
|
+
Hash: 'Destination',
|
|
72
|
+
DataType: 'String',
|
|
73
|
+
Default: '',
|
|
74
|
+
PictForm: { Section: 'HistSection', Group: 'HistGroup', Row: 2, Width: 12 }
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
BodyContent:
|
|
81
|
+
{
|
|
82
|
+
ContentType: 'canvas',
|
|
83
|
+
RenderCallback: function (pCanvas, pNodeData, pNodeTypeConfig, pBounds)
|
|
84
|
+
{
|
|
85
|
+
let tmpCtx = pCanvas.getContext('2d');
|
|
86
|
+
if (!tmpCtx) return;
|
|
87
|
+
|
|
88
|
+
let tmpW = pCanvas.width;
|
|
89
|
+
let tmpH = pCanvas.height;
|
|
90
|
+
|
|
91
|
+
// Use node data values if available, otherwise sample data
|
|
92
|
+
let tmpValues = (pNodeData && pNodeData.Data && pNodeData.Data.Values)
|
|
93
|
+
? pNodeData.Data.Values
|
|
94
|
+
: [78, 85, 87, 88, 90, 92, 95];
|
|
95
|
+
|
|
96
|
+
// Build histogram bins
|
|
97
|
+
let tmpBinCount = (pNodeData && pNodeData.Data && pNodeData.Data.Bins) ? pNodeData.Data.Bins : 5;
|
|
98
|
+
let tmpMin = Math.min.apply(null, tmpValues);
|
|
99
|
+
let tmpMax = Math.max.apply(null, tmpValues);
|
|
100
|
+
let tmpRange = tmpMax - tmpMin || 1;
|
|
101
|
+
let tmpBinSize = tmpRange / tmpBinCount;
|
|
102
|
+
|
|
103
|
+
let tmpBins = [];
|
|
104
|
+
for (let b = 0; b < tmpBinCount; b++)
|
|
105
|
+
{
|
|
106
|
+
tmpBins.push(0);
|
|
107
|
+
}
|
|
108
|
+
for (let v = 0; v < tmpValues.length; v++)
|
|
109
|
+
{
|
|
110
|
+
let tmpIdx = Math.min(Math.floor((tmpValues[v] - tmpMin) / tmpBinSize), tmpBinCount - 1);
|
|
111
|
+
tmpBins[tmpIdx]++;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
let tmpMaxBin = Math.max.apply(null, tmpBins);
|
|
115
|
+
if (tmpMaxBin === 0) tmpMaxBin = 1;
|
|
116
|
+
|
|
117
|
+
// Drawing dimensions
|
|
118
|
+
let tmpPadding = 8;
|
|
119
|
+
let tmpLabelH = 14;
|
|
120
|
+
let tmpBarAreaW = tmpW - (tmpPadding * 2);
|
|
121
|
+
let tmpBarAreaH = tmpH - (tmpPadding * 2) - tmpLabelH;
|
|
122
|
+
let tmpGap = 2;
|
|
123
|
+
let tmpBarW = (tmpBarAreaW / tmpBinCount) - tmpGap;
|
|
124
|
+
|
|
125
|
+
// Draw bars
|
|
126
|
+
for (let i = 0; i < tmpBins.length; i++)
|
|
127
|
+
{
|
|
128
|
+
let tmpBarH = (tmpBins[i] / tmpMaxBin) * tmpBarAreaH;
|
|
129
|
+
let tmpX = tmpPadding + (i * (tmpBarW + tmpGap));
|
|
130
|
+
let tmpY = tmpPadding + tmpBarAreaH - tmpBarH;
|
|
131
|
+
|
|
132
|
+
// Bar fill
|
|
133
|
+
tmpCtx.fillStyle = 'rgba(198, 40, 40, 0.65)';
|
|
134
|
+
tmpCtx.fillRect(tmpX, tmpY, tmpBarW, tmpBarH);
|
|
135
|
+
|
|
136
|
+
// Bar border
|
|
137
|
+
tmpCtx.strokeStyle = '#c62828';
|
|
138
|
+
tmpCtx.lineWidth = 0.5;
|
|
139
|
+
tmpCtx.strokeRect(tmpX, tmpY, tmpBarW, tmpBarH);
|
|
140
|
+
|
|
141
|
+
// Bin count label
|
|
142
|
+
if (tmpBins[i] > 0)
|
|
143
|
+
{
|
|
144
|
+
tmpCtx.fillStyle = '#c62828';
|
|
145
|
+
tmpCtx.font = '8px sans-serif';
|
|
146
|
+
tmpCtx.textAlign = 'center';
|
|
147
|
+
tmpCtx.fillText(String(tmpBins[i]), tmpX + tmpBarW / 2, tmpY - 2);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// Axis line
|
|
152
|
+
tmpCtx.beginPath();
|
|
153
|
+
tmpCtx.moveTo(tmpPadding, tmpPadding + tmpBarAreaH);
|
|
154
|
+
tmpCtx.lineTo(tmpW - tmpPadding, tmpPadding + tmpBarAreaH);
|
|
155
|
+
tmpCtx.strokeStyle = '#999';
|
|
156
|
+
tmpCtx.lineWidth = 1;
|
|
157
|
+
tmpCtx.stroke();
|
|
158
|
+
|
|
159
|
+
// Range labels
|
|
160
|
+
tmpCtx.fillStyle = '#888';
|
|
161
|
+
tmpCtx.font = '8px sans-serif';
|
|
162
|
+
tmpCtx.textAlign = 'left';
|
|
163
|
+
tmpCtx.fillText(String(Math.round(tmpMin)), tmpPadding, tmpH - tmpPadding + 2);
|
|
164
|
+
tmpCtx.textAlign = 'right';
|
|
165
|
+
tmpCtx.fillText(String(Math.round(tmpMax)), tmpW - tmpPadding, tmpH - tmpPadding + 2);
|
|
166
|
+
tmpCtx.textAlign = 'center';
|
|
167
|
+
tmpCtx.fillText('distribution', tmpW / 2, tmpH - tmpPadding + 2);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
pOptions),
|
|
172
|
+
pServiceHash);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
module.exports = FlowCardHistogram;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
const libPictFlowCard = require('pict-section-flow').PictFlowCard;
|
|
2
|
+
|
|
3
|
+
class FlowCardLaunchOperation extends libPictFlowCard
|
|
4
|
+
{
|
|
5
|
+
constructor(pFable, pOptions, pServiceHash)
|
|
6
|
+
{
|
|
7
|
+
super(pFable, Object.assign(
|
|
8
|
+
{},
|
|
9
|
+
{
|
|
10
|
+
Title: 'Launch Operation',
|
|
11
|
+
Code: 'launch-operation',
|
|
12
|
+
Description: 'Executes a child operation by hash, with isolated operation state.',
|
|
13
|
+
Category: 'Control',
|
|
14
|
+
TitleBarColor: '#7b1fa2',
|
|
15
|
+
BodyStyle: { fill: '#f3e5f5', stroke: '#7b1fa2' },
|
|
16
|
+
Width: 200,
|
|
17
|
+
Height: 100,
|
|
18
|
+
Inputs:
|
|
19
|
+
[
|
|
20
|
+
{ Name: 'Launch', Side: 'left-bottom', PortType: 'event-in' },
|
|
21
|
+
{ Name: 'OperationHash', Side: 'left-top', PortType: 'setting' },
|
|
22
|
+
{ Name: 'InputData', Side: 'left-top', PortType: 'setting' }
|
|
23
|
+
],
|
|
24
|
+
Outputs:
|
|
25
|
+
[
|
|
26
|
+
{ Name: 'Completed', Side: 'right', PortType: 'event-out' },
|
|
27
|
+
{ Name: 'Result', Side: 'right-top', PortType: 'value' },
|
|
28
|
+
{ Name: 'Status', Side: 'right-top', PortType: 'value' },
|
|
29
|
+
{ Name: 'ElapsedMs', Side: 'right-top', PortType: 'value' },
|
|
30
|
+
{ Name: 'Error', Side: 'bottom', PortType: 'error' }
|
|
31
|
+
],
|
|
32
|
+
PropertiesPanel:
|
|
33
|
+
{
|
|
34
|
+
PanelType: 'Form',
|
|
35
|
+
DefaultWidth: 350,
|
|
36
|
+
DefaultHeight: 220,
|
|
37
|
+
Title: 'Launch Operation Settings',
|
|
38
|
+
Configuration:
|
|
39
|
+
{
|
|
40
|
+
Manifest:
|
|
41
|
+
{
|
|
42
|
+
Scope: 'FlowCardLaunchOperation',
|
|
43
|
+
Sections:
|
|
44
|
+
[
|
|
45
|
+
{
|
|
46
|
+
Name: 'Target',
|
|
47
|
+
Hash: 'LaunchSection',
|
|
48
|
+
Groups:
|
|
49
|
+
[
|
|
50
|
+
{ Name: 'Settings', Hash: 'LaunchGroup' }
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
Descriptors:
|
|
55
|
+
{
|
|
56
|
+
'Record.Data.OperationHash':
|
|
57
|
+
{
|
|
58
|
+
Name: 'Operation Hash',
|
|
59
|
+
Hash: 'OperationHash',
|
|
60
|
+
DataType: 'String',
|
|
61
|
+
Default: '',
|
|
62
|
+
PictForm: { Section: 'LaunchSection', Group: 'LaunchGroup', Row: 1, Width: 12 }
|
|
63
|
+
},
|
|
64
|
+
'Record.Data.InputData':
|
|
65
|
+
{
|
|
66
|
+
Name: 'Input Data (JSON)',
|
|
67
|
+
Hash: 'InputData',
|
|
68
|
+
DataType: 'String',
|
|
69
|
+
Default: '',
|
|
70
|
+
PictForm: { Section: 'LaunchSection', Group: 'LaunchGroup', Row: 2, Width: 12 }
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
pOptions),
|
|
78
|
+
pServiceHash);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
module.exports = FlowCardLaunchOperation;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
const libPictFlowCard = require('pict-section-flow').PictFlowCard;
|
|
2
|
+
|
|
3
|
+
class FlowCardListFiles extends libPictFlowCard
|
|
4
|
+
{
|
|
5
|
+
constructor(pFable, pOptions, pServiceHash)
|
|
6
|
+
{
|
|
7
|
+
super(pFable, Object.assign(
|
|
8
|
+
{},
|
|
9
|
+
{
|
|
10
|
+
Title: 'List Files',
|
|
11
|
+
Code: 'LSFILE',
|
|
12
|
+
Description: 'List files in a staging folder directory.',
|
|
13
|
+
Category: 'File I/O',
|
|
14
|
+
TitleBarColor: '#2980b9',
|
|
15
|
+
BodyStyle: { fill: '#eaf2f8', stroke: '#2980b9' },
|
|
16
|
+
Width: 180,
|
|
17
|
+
Height: 80,
|
|
18
|
+
Inputs:
|
|
19
|
+
[
|
|
20
|
+
{ Name: 'Trigger', Side: 'left-bottom', PortType: 'event-in', MinimumInputCount: 0, MaximumInputCount: 1 },
|
|
21
|
+
{ Name: 'Path', Side: 'left-top', PortType: 'setting', MinimumInputCount: 0, MaximumInputCount: 1 }
|
|
22
|
+
],
|
|
23
|
+
Outputs:
|
|
24
|
+
[
|
|
25
|
+
{ Name: 'Files', Side: 'right-top', PortType: 'value' },
|
|
26
|
+
{ Name: 'Error', Side: 'bottom', PortType: 'error' }
|
|
27
|
+
],
|
|
28
|
+
PropertiesPanel:
|
|
29
|
+
{
|
|
30
|
+
PanelType: 'Form',
|
|
31
|
+
DefaultWidth: 340,
|
|
32
|
+
DefaultHeight: 240,
|
|
33
|
+
Title: 'List Files Settings',
|
|
34
|
+
Configuration:
|
|
35
|
+
{
|
|
36
|
+
Manifest:
|
|
37
|
+
{
|
|
38
|
+
Scope: 'FlowCardListFiles',
|
|
39
|
+
Sections: [{ Name: 'Directory', Hash: 'LSSection', Groups: [{ Name: 'Settings', Hash: 'LSGroup' }] }],
|
|
40
|
+
Descriptors:
|
|
41
|
+
{
|
|
42
|
+
'Record.Data.Folder': { Name: 'Folder Path', Hash: 'Folder', DataType: 'String', Default: '', PictForm: { Section: 'LSSection', Group: 'LSGroup', Row: 1, Width: 12 } },
|
|
43
|
+
'Record.Data.Pattern': { Name: 'File Pattern', Hash: 'Pattern', DataType: 'String', Default: '*', PictForm: { Section: 'LSSection', Group: 'LSGroup', Row: 2, Width: 12 } },
|
|
44
|
+
'Record.Data.Destination': { Name: 'State Destination', Hash: 'Destination', DataType: 'String', Default: '', PictForm: { Section: 'LSSection', Group: 'LSGroup', Row: 3, Width: 12 } }
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
pOptions),
|
|
51
|
+
pServiceHash);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
module.exports = FlowCardListFiles;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
const libPictFlowCard = require('pict-section-flow').PictFlowCard;
|
|
2
|
+
|
|
3
|
+
class FlowCardMeadowCount extends libPictFlowCard
|
|
4
|
+
{
|
|
5
|
+
constructor(pFable, pOptions, pServiceHash)
|
|
6
|
+
{
|
|
7
|
+
super(pFable, Object.assign(
|
|
8
|
+
{},
|
|
9
|
+
{
|
|
10
|
+
Title: 'Meadow Count',
|
|
11
|
+
Code: 'MCOUNT',
|
|
12
|
+
Description: 'Count records via Meadow REST endpoint.',
|
|
13
|
+
Category: 'Meadow',
|
|
14
|
+
TitleBarColor: '#2e7d32',
|
|
15
|
+
BodyStyle: { fill: '#e8f5e9', stroke: '#2e7d32' },
|
|
16
|
+
Width: 200,
|
|
17
|
+
Height: 80,
|
|
18
|
+
Inputs:
|
|
19
|
+
[
|
|
20
|
+
{ Name: 'Trigger', Side: 'left-bottom', PortType: 'event-in', MinimumInputCount: 0, MaximumInputCount: 1 },
|
|
21
|
+
{ Name: 'Entity', Side: 'left-top', PortType: 'setting', MinimumInputCount: 0, MaximumInputCount: 1 }
|
|
22
|
+
],
|
|
23
|
+
Outputs:
|
|
24
|
+
[
|
|
25
|
+
{ Name: 'Count', Side: 'right-top', PortType: 'value' },
|
|
26
|
+
{ Name: 'Error', Side: 'bottom', PortType: 'error' }
|
|
27
|
+
],
|
|
28
|
+
PropertiesPanel:
|
|
29
|
+
{
|
|
30
|
+
PanelType: 'Form', DefaultWidth: 360, DefaultHeight: 260, Title: 'Meadow Count Settings',
|
|
31
|
+
Configuration: { Manifest: { Scope: 'FlowCardMeadowCount',
|
|
32
|
+
Sections: [{ Name: 'Entity', Hash: 'MCNTSection', Groups: [{ Name: 'Settings', Hash: 'MCNTGroup' }] }],
|
|
33
|
+
Descriptors: {
|
|
34
|
+
'Record.Data.Entity': { Name: 'Entity Name', Hash: 'Entity', DataType: 'String', Default: '', PictForm: { Section: 'MCNTSection', Group: 'MCNTGroup', Row: 1, Width: 12 } },
|
|
35
|
+
'Record.Data.Endpoint': { Name: 'API Endpoint', Hash: 'Endpoint', DataType: 'String', Default: '', PictForm: { Section: 'MCNTSection', Group: 'MCNTGroup', Row: 2, Width: 12 } },
|
|
36
|
+
'Record.Data.Destination': { Name: 'State Destination', Hash: 'Destination', DataType: 'String', Default: '', PictForm: { Section: 'MCNTSection', Group: 'MCNTGroup', Row: 3, Width: 12 } }
|
|
37
|
+
}
|
|
38
|
+
}}
|
|
39
|
+
}
|
|
40
|
+
}, pOptions), pServiceHash);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
module.exports = FlowCardMeadowCount;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
const libPictFlowCard = require('pict-section-flow').PictFlowCard;
|
|
2
|
+
|
|
3
|
+
class FlowCardMeadowCreate extends libPictFlowCard
|
|
4
|
+
{
|
|
5
|
+
constructor(pFable, pOptions, pServiceHash)
|
|
6
|
+
{
|
|
7
|
+
super(pFable, Object.assign(
|
|
8
|
+
{},
|
|
9
|
+
{
|
|
10
|
+
Title: 'Meadow Create',
|
|
11
|
+
Code: 'MCREATE',
|
|
12
|
+
Description: 'Create a record via Meadow REST endpoint.',
|
|
13
|
+
Category: 'Meadow',
|
|
14
|
+
TitleBarColor: '#2e7d32',
|
|
15
|
+
BodyStyle: { fill: '#e8f5e9', stroke: '#2e7d32' },
|
|
16
|
+
Width: 200,
|
|
17
|
+
Height: 80,
|
|
18
|
+
Inputs:
|
|
19
|
+
[
|
|
20
|
+
{ Name: 'Data', Side: 'left-top', PortType: 'value', MinimumInputCount: 1, MaximumInputCount: 1 },
|
|
21
|
+
{ Name: 'Entity', Side: 'left-top', PortType: 'setting', MinimumInputCount: 0, MaximumInputCount: 1 }
|
|
22
|
+
],
|
|
23
|
+
Outputs:
|
|
24
|
+
[
|
|
25
|
+
{ Name: 'Created', Side: 'right-top', PortType: 'value' },
|
|
26
|
+
{ Name: 'Error', Side: 'bottom', PortType: 'error' }
|
|
27
|
+
],
|
|
28
|
+
PropertiesPanel:
|
|
29
|
+
{
|
|
30
|
+
PanelType: 'Form', DefaultWidth: 360, DefaultHeight: 260, Title: 'Meadow Create Settings',
|
|
31
|
+
Configuration: { Manifest: { Scope: 'FlowCardMeadowCreate',
|
|
32
|
+
Sections: [{ Name: 'Entity', Hash: 'MCSection', Groups: [{ Name: 'Settings', Hash: 'MCGroup' }] }],
|
|
33
|
+
Descriptors: {
|
|
34
|
+
'Record.Data.Entity': { Name: 'Entity Name', Hash: 'Entity', DataType: 'String', Default: '', PictForm: { Section: 'MCSection', Group: 'MCGroup', Row: 1, Width: 12 } },
|
|
35
|
+
'Record.Data.Endpoint': { Name: 'API Endpoint', Hash: 'Endpoint', DataType: 'String', Default: '', PictForm: { Section: 'MCSection', Group: 'MCGroup', Row: 2, Width: 12 } },
|
|
36
|
+
'Record.Data.DataAddress': { Name: 'Data State Address', Hash: 'DataAddress', DataType: 'String', Default: '', PictForm: { Section: 'MCSection', Group: 'MCGroup', Row: 3, Width: 12 } }
|
|
37
|
+
}
|
|
38
|
+
}}
|
|
39
|
+
}
|
|
40
|
+
}, pOptions), pServiceHash);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
module.exports = FlowCardMeadowCreate;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
const libPictFlowCard = require('pict-section-flow').PictFlowCard;
|
|
2
|
+
|
|
3
|
+
class FlowCardMeadowDelete extends libPictFlowCard
|
|
4
|
+
{
|
|
5
|
+
constructor(pFable, pOptions, pServiceHash)
|
|
6
|
+
{
|
|
7
|
+
super(pFable, Object.assign(
|
|
8
|
+
{},
|
|
9
|
+
{
|
|
10
|
+
Title: 'Meadow Delete',
|
|
11
|
+
Code: 'MDELETE',
|
|
12
|
+
Description: 'Soft-delete a record via Meadow REST endpoint.',
|
|
13
|
+
Category: 'Meadow',
|
|
14
|
+
TitleBarColor: '#2e7d32',
|
|
15
|
+
BodyStyle: { fill: '#e8f5e9', stroke: '#2e7d32' },
|
|
16
|
+
Width: 200,
|
|
17
|
+
Height: 80,
|
|
18
|
+
Inputs:
|
|
19
|
+
[
|
|
20
|
+
{ Name: 'Trigger', Side: 'left-bottom', PortType: 'event-in', MinimumInputCount: 1, MaximumInputCount: 1 },
|
|
21
|
+
{ Name: 'Entity', Side: 'left-top', PortType: 'setting', MinimumInputCount: 0, MaximumInputCount: 1 },
|
|
22
|
+
{ Name: 'IDRecord', Side: 'left-top', PortType: 'setting', MinimumInputCount: 0, MaximumInputCount: 1 }
|
|
23
|
+
],
|
|
24
|
+
Outputs:
|
|
25
|
+
[
|
|
26
|
+
{ Name: 'Done', Side: 'right', PortType: 'event-out' },
|
|
27
|
+
{ Name: 'Error', Side: 'bottom', PortType: 'error' }
|
|
28
|
+
],
|
|
29
|
+
PropertiesPanel:
|
|
30
|
+
{
|
|
31
|
+
PanelType: 'Form', DefaultWidth: 360, DefaultHeight: 240, Title: 'Meadow Delete Settings',
|
|
32
|
+
Configuration: { Manifest: { Scope: 'FlowCardMeadowDelete',
|
|
33
|
+
Sections: [{ Name: 'Entity', Hash: 'MDSection', Groups: [{ Name: 'Settings', Hash: 'MDGroup' }] }],
|
|
34
|
+
Descriptors: {
|
|
35
|
+
'Record.Data.Entity': { Name: 'Entity Name', Hash: 'Entity', DataType: 'String', Default: '', PictForm: { Section: 'MDSection', Group: 'MDGroup', Row: 1, Width: 12 } },
|
|
36
|
+
'Record.Data.Endpoint': { Name: 'API Endpoint', Hash: 'Endpoint', DataType: 'String', Default: '', PictForm: { Section: 'MDSection', Group: 'MDGroup', Row: 2, Width: 12 } },
|
|
37
|
+
'Record.Data.RecordID': { Name: 'Record ID', Hash: 'RecordID', DataType: 'String', Default: '', PictForm: { Section: 'MDSection', Group: 'MDGroup', Row: 3, Width: 12 } }
|
|
38
|
+
}
|
|
39
|
+
}}
|
|
40
|
+
}
|
|
41
|
+
}, pOptions), pServiceHash);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
module.exports = FlowCardMeadowDelete;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const libPictFlowCard = require('pict-section-flow').PictFlowCard;
|
|
2
|
+
|
|
3
|
+
class FlowCardMeadowRead extends libPictFlowCard
|
|
4
|
+
{
|
|
5
|
+
constructor(pFable, pOptions, pServiceHash)
|
|
6
|
+
{
|
|
7
|
+
super(pFable, Object.assign(
|
|
8
|
+
{},
|
|
9
|
+
{
|
|
10
|
+
Title: 'Meadow Read',
|
|
11
|
+
Code: 'MREAD',
|
|
12
|
+
Description: 'Read a single record via Meadow REST endpoint.',
|
|
13
|
+
Category: 'Meadow',
|
|
14
|
+
TitleBarColor: '#2e7d32',
|
|
15
|
+
BodyStyle: { fill: '#e8f5e9', stroke: '#2e7d32' },
|
|
16
|
+
Width: 200,
|
|
17
|
+
Height: 80,
|
|
18
|
+
Inputs:
|
|
19
|
+
[
|
|
20
|
+
{ Name: 'Trigger', Side: 'left-bottom', PortType: 'event-in', MinimumInputCount: 0, MaximumInputCount: 1 },
|
|
21
|
+
{ Name: 'Entity', Side: 'left-top', PortType: 'setting', MinimumInputCount: 0, MaximumInputCount: 1 },
|
|
22
|
+
{ Name: 'IDRecord', Side: 'left-top', PortType: 'setting', MinimumInputCount: 0, MaximumInputCount: 1 }
|
|
23
|
+
],
|
|
24
|
+
Outputs:
|
|
25
|
+
[
|
|
26
|
+
{ Name: 'Record', Side: 'right-top', PortType: 'value' },
|
|
27
|
+
{ Name: 'Error', Side: 'bottom', PortType: 'error' }
|
|
28
|
+
],
|
|
29
|
+
PropertiesPanel:
|
|
30
|
+
{
|
|
31
|
+
PanelType: 'Form', DefaultWidth: 360, DefaultHeight: 280, Title: 'Meadow Read Settings',
|
|
32
|
+
Configuration: { Manifest: { Scope: 'FlowCardMeadowRead',
|
|
33
|
+
Sections: [{ Name: 'Entity', Hash: 'MRSection', Groups: [{ Name: 'Settings', Hash: 'MRGroup' }] }],
|
|
34
|
+
Descriptors: {
|
|
35
|
+
'Record.Data.Entity': { Name: 'Entity Name', Hash: 'Entity', DataType: 'String', Default: '', PictForm: { Section: 'MRSection', Group: 'MRGroup', Row: 1, Width: 12 } },
|
|
36
|
+
'Record.Data.Endpoint': { Name: 'API Endpoint', Hash: 'Endpoint', DataType: 'String', Default: '', PictForm: { Section: 'MRSection', Group: 'MRGroup', Row: 2, Width: 12 } },
|
|
37
|
+
'Record.Data.RecordID': { Name: 'Record ID', Hash: 'RecordID', DataType: 'String', Default: '', PictForm: { Section: 'MRSection', Group: 'MRGroup', Row: 3, Width: 6 } },
|
|
38
|
+
'Record.Data.Destination': { Name: 'State Destination', Hash: 'Destination', DataType: 'String', Default: '', PictForm: { Section: 'MRSection', Group: 'MRGroup', Row: 3, Width: 6 } }
|
|
39
|
+
}
|
|
40
|
+
}}
|
|
41
|
+
}
|
|
42
|
+
}, pOptions), pServiceHash);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
module.exports = FlowCardMeadowRead;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const libPictFlowCard = require('pict-section-flow').PictFlowCard;
|
|
2
|
+
|
|
3
|
+
class FlowCardMeadowReads extends libPictFlowCard
|
|
4
|
+
{
|
|
5
|
+
constructor(pFable, pOptions, pServiceHash)
|
|
6
|
+
{
|
|
7
|
+
super(pFable, Object.assign(
|
|
8
|
+
{},
|
|
9
|
+
{
|
|
10
|
+
Title: 'Meadow Reads',
|
|
11
|
+
Code: 'MREADS',
|
|
12
|
+
Description: 'Read multiple records with pagination via Meadow REST endpoint.',
|
|
13
|
+
Category: 'Meadow',
|
|
14
|
+
TitleBarColor: '#2e7d32',
|
|
15
|
+
BodyStyle: { fill: '#e8f5e9', stroke: '#2e7d32' },
|
|
16
|
+
Width: 200,
|
|
17
|
+
Height: 80,
|
|
18
|
+
Inputs:
|
|
19
|
+
[
|
|
20
|
+
{ Name: 'Trigger', Side: 'left-bottom', PortType: 'event-in', MinimumInputCount: 0, MaximumInputCount: 1 },
|
|
21
|
+
{ Name: 'Entity', Side: 'left-top', PortType: 'setting', MinimumInputCount: 0, MaximumInputCount: 1 },
|
|
22
|
+
{ Name: 'Filter', Side: 'left-top', PortType: 'setting', MinimumInputCount: 0, MaximumInputCount: 1 }
|
|
23
|
+
],
|
|
24
|
+
Outputs:
|
|
25
|
+
[
|
|
26
|
+
{ Name: 'Records', Side: 'right-top', PortType: 'value' },
|
|
27
|
+
{ Name: 'Error', Side: 'bottom', PortType: 'error' }
|
|
28
|
+
],
|
|
29
|
+
PropertiesPanel:
|
|
30
|
+
{
|
|
31
|
+
PanelType: 'Form', DefaultWidth: 360, DefaultHeight: 300, Title: 'Meadow Reads Settings',
|
|
32
|
+
Configuration: { Manifest: { Scope: 'FlowCardMeadowReads',
|
|
33
|
+
Sections: [{ Name: 'Entity', Hash: 'MRSSection', Groups: [{ Name: 'Settings', Hash: 'MRSGroup' }] }],
|
|
34
|
+
Descriptors: {
|
|
35
|
+
'Record.Data.Entity': { Name: 'Entity Name', Hash: 'Entity', DataType: 'String', Default: '', PictForm: { Section: 'MRSSection', Group: 'MRSGroup', Row: 1, Width: 12 } },
|
|
36
|
+
'Record.Data.Endpoint': { Name: 'API Endpoint', Hash: 'Endpoint', DataType: 'String', Default: '', PictForm: { Section: 'MRSSection', Group: 'MRSGroup', Row: 2, Width: 12 } },
|
|
37
|
+
'Record.Data.Filter': { Name: 'Filter Expression', Hash: 'Filter', DataType: 'String', Default: '', PictForm: { Section: 'MRSSection', Group: 'MRSGroup', Row: 3, Width: 12 } },
|
|
38
|
+
'Record.Data.Destination': { Name: 'State Destination', Hash: 'Destination', DataType: 'String', Default: '', PictForm: { Section: 'MRSSection', Group: 'MRSGroup', Row: 4, Width: 12 } }
|
|
39
|
+
}
|
|
40
|
+
}}
|
|
41
|
+
}
|
|
42
|
+
}, pOptions), pServiceHash);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
module.exports = FlowCardMeadowReads;
|