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
|
@@ -9,19 +9,26 @@ class UltravisorCommandSingleOperationRun extends libCommandLineCommand
|
|
|
9
9
|
this.options.CommandKeyword = 'singleoperation';
|
|
10
10
|
this.options.Description = 'Execute a single ultravisor operation immediately, no matter what.';
|
|
11
11
|
|
|
12
|
-
this.options.CommandArguments.push({ Name: '<operation>', Description: 'The operation
|
|
13
|
-
this.options.CommandOptions.push({ Name: '-d, --dry_run', Description: 'Dry run the
|
|
12
|
+
this.options.CommandArguments.push({ Name: '<operation>', Description: 'The operation hash to run.' });
|
|
13
|
+
this.options.CommandOptions.push({ Name: '-d, --dry_run', Description: 'Dry run the operation.', Default: false });
|
|
14
14
|
|
|
15
15
|
this.options.Aliases.push('operation');
|
|
16
16
|
|
|
17
17
|
this.addCommand();
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
_getService(pTypeName)
|
|
21
|
+
{
|
|
22
|
+
return this.fable.servicesMap[pTypeName]
|
|
23
|
+
? Object.values(this.fable.servicesMap[pTypeName])[0]
|
|
24
|
+
: null;
|
|
25
|
+
}
|
|
26
|
+
|
|
20
27
|
onRunAsync(fCallback)
|
|
21
28
|
{
|
|
22
|
-
let
|
|
29
|
+
let tmpOperationHash = this.ArgumentString;
|
|
23
30
|
|
|
24
|
-
if (!
|
|
31
|
+
if (!tmpOperationHash)
|
|
25
32
|
{
|
|
26
33
|
console.log(`Error: operation argument is required.`);
|
|
27
34
|
return fCallback();
|
|
@@ -31,16 +38,16 @@ class UltravisorCommandSingleOperationRun extends libCommandLineCommand
|
|
|
31
38
|
|
|
32
39
|
if (tmpDryRun)
|
|
33
40
|
{
|
|
34
|
-
console.log(`[DRY RUN] Would execute operation: ${
|
|
41
|
+
console.log(`[DRY RUN] Would execute operation: ${tmpOperationHash}`);
|
|
35
42
|
return fCallback();
|
|
36
43
|
}
|
|
37
44
|
|
|
38
|
-
console.log(`Executing operation: ${
|
|
45
|
+
console.log(`Executing operation: ${tmpOperationHash}`);
|
|
39
46
|
|
|
40
|
-
let tmpStateService = this.
|
|
41
|
-
let
|
|
47
|
+
let tmpStateService = this._getService('UltravisorHypervisorState');
|
|
48
|
+
let tmpEngine = this._getService('UltravisorExecutionEngine');
|
|
42
49
|
|
|
43
|
-
tmpStateService.getOperation(
|
|
50
|
+
tmpStateService.getOperation(tmpOperationHash,
|
|
44
51
|
function (pError, pOperation)
|
|
45
52
|
{
|
|
46
53
|
if (pError)
|
|
@@ -49,8 +56,8 @@ class UltravisorCommandSingleOperationRun extends libCommandLineCommand
|
|
|
49
56
|
return fCallback();
|
|
50
57
|
}
|
|
51
58
|
|
|
52
|
-
|
|
53
|
-
function (pExecError,
|
|
59
|
+
tmpEngine.executeOperation(pOperation,
|
|
60
|
+
function (pExecError, pContext)
|
|
54
61
|
{
|
|
55
62
|
if (pExecError)
|
|
56
63
|
{
|
|
@@ -59,16 +66,20 @@ class UltravisorCommandSingleOperationRun extends libCommandLineCommand
|
|
|
59
66
|
}
|
|
60
67
|
|
|
61
68
|
console.log(`\nOperation Result:`);
|
|
62
|
-
console.log(` Status: ${
|
|
63
|
-
console.log(`
|
|
64
|
-
console.log(`
|
|
65
|
-
console.log(`
|
|
66
|
-
|
|
67
|
-
console.log(`
|
|
69
|
+
console.log(` Status: ${pContext.Status}`);
|
|
70
|
+
console.log(` Start: ${pContext.StartTime}`);
|
|
71
|
+
console.log(` Stop: ${pContext.StopTime}`);
|
|
72
|
+
console.log(` Elapsed: ${pContext.ElapsedMs}ms`);
|
|
73
|
+
let tmpTaskCount = pContext.TaskManifests ? Object.keys(pContext.TaskManifests).length : 0;
|
|
74
|
+
console.log(` Tasks Executed: ${tmpTaskCount}`);
|
|
75
|
+
if (pContext.Errors && pContext.Errors.length > 0)
|
|
76
|
+
{
|
|
77
|
+
console.log(` Errors: ${pContext.Errors.length}`);
|
|
78
|
+
}
|
|
68
79
|
return fCallback();
|
|
69
80
|
});
|
|
70
81
|
});
|
|
71
82
|
}
|
|
72
83
|
}
|
|
73
84
|
|
|
74
|
-
module.exports = UltravisorCommandSingleOperationRun;
|
|
85
|
+
module.exports = UltravisorCommandSingleOperationRun;
|
|
@@ -9,8 +9,7 @@ class UltravisorCommandSingleTaskRun extends libCommandLineCommand
|
|
|
9
9
|
this.options.CommandKeyword = 'singletask';
|
|
10
10
|
this.options.Description = 'Execute a single ultravisor task immediately, no matter what.';
|
|
11
11
|
|
|
12
|
-
this.options.CommandArguments.push({ Name: '<task>', Description: 'The task
|
|
13
|
-
this.options.CommandOptions.push({ Name: '-o, --operation [operation]', Description: 'The operation to scope the task(s) to.', Default: 'Default' });
|
|
12
|
+
this.options.CommandArguments.push({ Name: '<task>', Description: 'The task hash to run.' });
|
|
14
13
|
this.options.CommandOptions.push({ Name: '-d, --dry_run', Description: 'Dry run the task.', Default: false });
|
|
15
14
|
|
|
16
15
|
this.options.Aliases.push('task');
|
|
@@ -18,11 +17,18 @@ class UltravisorCommandSingleTaskRun extends libCommandLineCommand
|
|
|
18
17
|
this.addCommand();
|
|
19
18
|
}
|
|
20
19
|
|
|
20
|
+
_getService(pTypeName)
|
|
21
|
+
{
|
|
22
|
+
return this.fable.servicesMap[pTypeName]
|
|
23
|
+
? Object.values(this.fable.servicesMap[pTypeName])[0]
|
|
24
|
+
: null;
|
|
25
|
+
}
|
|
26
|
+
|
|
21
27
|
onRunAsync(fCallback)
|
|
22
28
|
{
|
|
23
|
-
let
|
|
29
|
+
let tmpTaskHash = this.ArgumentString;
|
|
24
30
|
|
|
25
|
-
if (!
|
|
31
|
+
if (!tmpTaskHash)
|
|
26
32
|
{
|
|
27
33
|
console.log(`Error: task argument is required.`);
|
|
28
34
|
return fCallback();
|
|
@@ -32,17 +38,17 @@ class UltravisorCommandSingleTaskRun extends libCommandLineCommand
|
|
|
32
38
|
|
|
33
39
|
if (tmpDryRun)
|
|
34
40
|
{
|
|
35
|
-
console.log(`[DRY RUN] Would execute task: ${
|
|
41
|
+
console.log(`[DRY RUN] Would execute task: ${tmpTaskHash}`);
|
|
36
42
|
return fCallback();
|
|
37
43
|
}
|
|
38
44
|
|
|
39
|
-
console.log(`Executing task: ${
|
|
45
|
+
console.log(`Executing task: ${tmpTaskHash}`);
|
|
40
46
|
|
|
41
|
-
let tmpStateService = this.
|
|
42
|
-
let
|
|
47
|
+
let tmpStateService = this._getService('UltravisorHypervisorState');
|
|
48
|
+
let tmpEngine = this._getService('UltravisorExecutionEngine');
|
|
43
49
|
|
|
44
|
-
tmpStateService.
|
|
45
|
-
function (pError,
|
|
50
|
+
tmpStateService.getTaskDefinition(tmpTaskHash,
|
|
51
|
+
function (pError, pTaskDef)
|
|
46
52
|
{
|
|
47
53
|
if (pError)
|
|
48
54
|
{
|
|
@@ -50,8 +56,41 @@ class UltravisorCommandSingleTaskRun extends libCommandLineCommand
|
|
|
50
56
|
return fCallback();
|
|
51
57
|
}
|
|
52
58
|
|
|
53
|
-
|
|
54
|
-
|
|
59
|
+
// Wrap single task in a minimal operation graph and execute
|
|
60
|
+
let tmpAdHocOperation = {
|
|
61
|
+
Hash: `ADHOC-${pTaskDef.Hash}`,
|
|
62
|
+
Name: `Ad-hoc: ${pTaskDef.Name || pTaskDef.Hash}`,
|
|
63
|
+
Graph:
|
|
64
|
+
{
|
|
65
|
+
Nodes:
|
|
66
|
+
[
|
|
67
|
+
{ Hash: 'start-node', Type: 'start', X: 0, Y: 100 },
|
|
68
|
+
{ Hash: pTaskDef.Hash, Type: pTaskDef.Type, DefinitionHash: pTaskDef.Type, Settings: pTaskDef.Settings || {}, X: 200, Y: 100 },
|
|
69
|
+
{ Hash: 'end-node', Type: 'end', X: 400, Y: 100 }
|
|
70
|
+
],
|
|
71
|
+
Connections:
|
|
72
|
+
[
|
|
73
|
+
{
|
|
74
|
+
SourceNodeHash: 'start-node',
|
|
75
|
+
SourcePortHash: 'start-node-eo-Start',
|
|
76
|
+
TargetNodeHash: pTaskDef.Hash,
|
|
77
|
+
TargetPortHash: pTaskDef.Hash + '-ei-Execute',
|
|
78
|
+
ConnectionType: 'Event'
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
SourceNodeHash: pTaskDef.Hash,
|
|
82
|
+
SourcePortHash: pTaskDef.Hash + '-eo-Complete',
|
|
83
|
+
TargetNodeHash: 'end-node',
|
|
84
|
+
TargetPortHash: 'end-node-ei-Finish',
|
|
85
|
+
ConnectionType: 'Event'
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
ViewState: {}
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
tmpEngine.executeOperation(tmpAdHocOperation,
|
|
93
|
+
function (pExecError, pContext)
|
|
55
94
|
{
|
|
56
95
|
if (pExecError)
|
|
57
96
|
{
|
|
@@ -60,13 +99,17 @@ class UltravisorCommandSingleTaskRun extends libCommandLineCommand
|
|
|
60
99
|
}
|
|
61
100
|
|
|
62
101
|
console.log(`\nTask Result:`);
|
|
63
|
-
console.log(` Status: ${
|
|
64
|
-
console.log(`
|
|
65
|
-
console.log(`
|
|
66
|
-
console.log(`
|
|
67
|
-
if (
|
|
102
|
+
console.log(` Status: ${pContext.Status}`);
|
|
103
|
+
console.log(` Start: ${pContext.StartTime}`);
|
|
104
|
+
console.log(` Stop: ${pContext.StopTime}`);
|
|
105
|
+
console.log(` Elapsed: ${pContext.ElapsedMs}ms`);
|
|
106
|
+
if (pContext.TaskOutputs && pContext.TaskOutputs[pTaskDef.Hash])
|
|
107
|
+
{
|
|
108
|
+
console.log(` Output: ${JSON.stringify(pContext.TaskOutputs[pTaskDef.Hash]).substring(0, 1000)}`);
|
|
109
|
+
}
|
|
110
|
+
if (pContext.Errors && pContext.Errors.length > 0)
|
|
68
111
|
{
|
|
69
|
-
console.log(`
|
|
112
|
+
console.log(` Errors: ${pContext.Errors.length}`);
|
|
70
113
|
}
|
|
71
114
|
return fCallback();
|
|
72
115
|
});
|
|
@@ -74,4 +117,4 @@ class UltravisorCommandSingleTaskRun extends libCommandLineCommand
|
|
|
74
117
|
}
|
|
75
118
|
}
|
|
76
119
|
|
|
77
|
-
module.exports = UltravisorCommandSingleTaskRun;
|
|
120
|
+
module.exports = UltravisorCommandSingleTaskRun;
|
|
@@ -10,20 +10,25 @@ class UltravisorCommandAddTask extends libCommandLineCommand
|
|
|
10
10
|
super(pFable, pManifest, pServiceHash);
|
|
11
11
|
|
|
12
12
|
this.options.CommandKeyword = 'updatetask';
|
|
13
|
-
this.options.Description = 'Update (or add) a task
|
|
13
|
+
this.options.Description = 'Update (or add) a task definition.';
|
|
14
14
|
|
|
15
15
|
this.options.CommandOptions.push({ Name:'-f, --file [json_filepath]', Description:'JSON Task definition file path.', Default:false });
|
|
16
16
|
|
|
17
|
-
this.options.CommandOptions.push({ Name:'-
|
|
18
|
-
this.options.CommandOptions.push({ Name:'-c, --code [task_code]', Description:'The code for the task.', Default:false });
|
|
17
|
+
this.options.CommandOptions.push({ Name:'-h, --hash [task_hash]', Description:'The hash for the task definition.', Default:false });
|
|
19
18
|
this.options.CommandOptions.push({ Name:'-n, --name [task_name]', Description:'The name of the task.', Default:false });
|
|
20
19
|
|
|
21
|
-
this.options.CommandOptions.push({ Name:'-t, --type [task_type]', Description:'The type of task.', Default:
|
|
22
|
-
this.options.CommandOptions.push({ Name:'-p, --parameters [task_parameters]', Description:'The parameters of the task.', Default:'0 0 * * * *' });
|
|
20
|
+
this.options.CommandOptions.push({ Name:'-t, --type [task_type]', Description:'The type of task (e.g. read-file, write-file, set-values).', Default:false });
|
|
23
21
|
|
|
24
22
|
this.addCommand();
|
|
25
23
|
}
|
|
26
24
|
|
|
25
|
+
_getService(pTypeName)
|
|
26
|
+
{
|
|
27
|
+
return this.fable.servicesMap[pTypeName]
|
|
28
|
+
? Object.values(this.fable.servicesMap[pTypeName])[0]
|
|
29
|
+
: null;
|
|
30
|
+
}
|
|
31
|
+
|
|
27
32
|
onRunAsync(fCallback)
|
|
28
33
|
{
|
|
29
34
|
const tmpOperationState = {};
|
|
@@ -64,28 +69,35 @@ class UltravisorCommandAddTask extends libCommandLineCommand
|
|
|
64
69
|
|
|
65
70
|
tmpOperationState.TaskDefinition_Parameterized = {};
|
|
66
71
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
72
|
+
if (this.CommandOptions.hash)
|
|
73
|
+
{
|
|
74
|
+
tmpOperationState.TaskDefinition_Parameterized.Hash = this.CommandOptions.hash;
|
|
75
|
+
}
|
|
76
|
+
if (this.CommandOptions.name)
|
|
77
|
+
{
|
|
78
|
+
tmpOperationState.TaskDefinition_Parameterized.Name = this.CommandOptions.name;
|
|
79
|
+
}
|
|
80
|
+
if (this.CommandOptions.type)
|
|
81
|
+
{
|
|
82
|
+
tmpOperationState.TaskDefinition_Parameterized.Type = this.CommandOptions.type;
|
|
83
|
+
}
|
|
73
84
|
|
|
74
85
|
tmpOperationState.TaskDefinition = Object.assign({}, tmpOperationState.TaskDefinition_Parameterized, tmpOperationState.JSONFile);
|
|
75
86
|
|
|
76
|
-
this.
|
|
87
|
+
let tmpStateService = this._getService('UltravisorHypervisorState');
|
|
88
|
+
tmpStateService.updateTaskDefinition(tmpOperationState.TaskDefinition,
|
|
77
89
|
function (pError, pUpdatedTask)
|
|
78
90
|
{
|
|
79
91
|
if (pError)
|
|
80
92
|
{
|
|
81
|
-
return fCallback(new Error(`Could not update task: ${pError.message}`));
|
|
93
|
+
return fCallback(new Error(`Could not update task definition: ${pError.message}`));
|
|
82
94
|
}
|
|
83
95
|
|
|
84
|
-
console.log(`Task
|
|
96
|
+
console.log(`Task definition ${pUpdatedTask.Hash} updated successfully.`);
|
|
85
97
|
|
|
86
98
|
return fCallback();
|
|
87
99
|
}.bind(this));
|
|
88
100
|
}
|
|
89
101
|
}
|
|
90
102
|
|
|
91
|
-
module.exports = UltravisorCommandAddTask;
|
|
103
|
+
module.exports = UltravisorCommandAddTask;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
let _ModuleRoot = require('path').resolve(__dirname, '..', '..');
|
|
2
|
+
|
|
1
3
|
module.exports = (
|
|
2
4
|
{
|
|
3
5
|
"UltravisorAPIServerPort": 54321,
|
|
4
|
-
"UltravisorFileStorePath": `${
|
|
5
|
-
"UltravisorStagingRoot": `${
|
|
6
|
+
"UltravisorFileStorePath": `${_ModuleRoot}/dist/ultravisor_datastore`,
|
|
7
|
+
"UltravisorStagingRoot": `${_ModuleRoot}/dist/ultravisor_staging`,
|
|
6
8
|
"UltravisorTickIntervalMilliseconds": 60000,
|
|
7
9
|
"UltravisorCommandTimeoutMilliseconds": 300000,
|
|
8
10
|
"UltravisorCommandMaxBufferBytes": 10485760,
|
|
9
|
-
"UltravisorWebInterfacePath":
|
|
11
|
+
"UltravisorWebInterfacePath": `${_ModuleRoot}/webinterface/dist`
|
|
10
12
|
});
|