verteilen-core 1.1.1 → 1.2.1
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/dist/src/client/analysis.js +3 -3
- package/dist/src/client/database.js +36 -0
- package/dist/src/client/execute.js +18 -18
- package/dist/src/client/job_database.js +36 -0
- package/dist/src/client/job_execute.js +4 -4
- package/dist/src/computed.js +2 -2
- package/dist/src/interface/enum.js +5 -5
- package/dist/src/interface/server.js +2 -2
- package/dist/src/interface.js +2 -2
- package/dist/src/lan/en.json +24 -24
- package/dist/src/lan/zh_TW.json +24 -24
- package/dist/src/script/execute/base.js +13 -13
- package/dist/src/script/execute/feedback.js +8 -8
- package/dist/src/script/execute/runner.js +4 -4
- package/dist/src/script/execute_manager.js +3 -3
- package/dist/src/server/detail.js +428 -0
- package/dist/src/server/io.js +4 -4
- package/dist/src/server/plugin.js +17 -17
- package/dist/src/server/server.js +12 -2
- package/dist/src/server.js +3 -1
- package/dist/src/util/console_handle.js +248 -0
- package/dist/src/util/log_handle.js +230 -0
- package/dist/test/client/javascript.test.js +6 -6
- package/dist/test/client/task.test.js +12 -12
- package/package.json +1 -1
- package/src/client/analysis.ts +4 -4
- package/src/client/{parameter.ts → database.ts} +6 -6
- package/src/client/execute.ts +23 -23
- package/src/client/javascript.ts +9 -9
- package/src/client/{job_parameter.ts → job_database.ts} +2 -2
- package/src/client/job_execute.ts +8 -8
- package/src/computed.ts +2 -2
- package/src/interface/base.ts +17 -17
- package/src/interface/bus.ts +33 -11
- package/src/interface/enum.ts +48 -16
- package/src/interface/execute.ts +23 -0
- package/src/interface/record.ts +3 -9
- package/src/interface/server.ts +11 -3
- package/src/interface/struct.ts +6 -6
- package/src/interface/table.ts +4 -4
- package/src/interface.ts +2 -2
- package/src/lan/en.json +24 -24
- package/src/lan/zh_TW.json +24 -24
- package/src/script/execute/base.ts +22 -22
- package/src/script/execute/feedback.ts +12 -12
- package/src/script/execute/runner.ts +5 -5
- package/src/script/execute/util_parser.ts +7 -7
- package/src/script/execute_manager.ts +4 -4
- package/src/server/detail.ts +537 -0
- package/src/server/io.ts +7 -7
- package/src/server/plugin.ts +20 -27
- package/src/server/server.ts +26 -4
- package/src/server.ts +4 -2
- package/src/util/{server/console_handle.ts → console_handle.ts} +5 -5
- package/src/util/{server/log_handle.ts → log_handle.ts} +5 -5
- package/test/client/javascript.test.ts +8 -8
- package/test/client/task.test.ts +14 -14
- package/test/script/parser.test.ts +3 -3
|
@@ -61,7 +61,7 @@ class ClientAnalysis {
|
|
|
61
61
|
'execute_job': this.execute_job,
|
|
62
62
|
'release': this.release,
|
|
63
63
|
'stop_job': this.stop_all,
|
|
64
|
-
'
|
|
64
|
+
'set_database': this.set_database,
|
|
65
65
|
'set_libs': this.set_libs,
|
|
66
66
|
'shell_folder': this.shell.shell_folder,
|
|
67
67
|
'open_shell': this.shell.open_shell,
|
|
@@ -109,11 +109,11 @@ class ClientAnalysis {
|
|
|
109
109
|
return;
|
|
110
110
|
this.exec.splice(index, 1);
|
|
111
111
|
};
|
|
112
|
-
this.
|
|
112
|
+
this.set_database = (data, source, channel) => {
|
|
113
113
|
if (channel == undefined)
|
|
114
114
|
return;
|
|
115
115
|
const target = this.exec_checker(channel);
|
|
116
|
-
target.
|
|
116
|
+
target.set_database(data);
|
|
117
117
|
};
|
|
118
118
|
this.set_libs = (data, source, channel) => {
|
|
119
119
|
if (channel == undefined)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ClientDatabase = void 0;
|
|
4
|
+
class ClientDatabase {
|
|
5
|
+
constructor(_source) {
|
|
6
|
+
this.feedbacknumber = (data) => {
|
|
7
|
+
this.feedback("feedback_number", data);
|
|
8
|
+
};
|
|
9
|
+
this.feedbackboolean = (data) => {
|
|
10
|
+
this.feedback("feedback_boolean", data);
|
|
11
|
+
};
|
|
12
|
+
this.feedbackstring = (data) => {
|
|
13
|
+
this.feedback("feedback_string", data);
|
|
14
|
+
};
|
|
15
|
+
this.feedbackobject = (data) => {
|
|
16
|
+
this.feedback("feedback_object", data);
|
|
17
|
+
};
|
|
18
|
+
this.feedbacklist = (data) => {
|
|
19
|
+
this.feedback("feedback_list", data);
|
|
20
|
+
};
|
|
21
|
+
this.feedbackselect = (data) => {
|
|
22
|
+
this.feedback("feedback_select", data);
|
|
23
|
+
};
|
|
24
|
+
this.feedback = (title, data) => {
|
|
25
|
+
if (this.source == undefined)
|
|
26
|
+
return;
|
|
27
|
+
const p = {
|
|
28
|
+
name: title,
|
|
29
|
+
data: data
|
|
30
|
+
};
|
|
31
|
+
this.source.send(JSON.stringify(p, null, 2));
|
|
32
|
+
};
|
|
33
|
+
this.source = _source;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.ClientDatabase = ClientDatabase;
|
|
@@ -6,13 +6,13 @@ const ws_1 = require("ws");
|
|
|
6
6
|
const interface_1 = require("../interface");
|
|
7
7
|
const i18n_1 = require("../plugins/i18n");
|
|
8
8
|
const client_1 = require("./client");
|
|
9
|
-
const
|
|
9
|
+
const database_1 = require("./database");
|
|
10
10
|
class ClientExecute {
|
|
11
11
|
get count() {
|
|
12
12
|
return this.workers.length;
|
|
13
13
|
}
|
|
14
14
|
constructor(_uuid, _messager, _messager_log, _client) {
|
|
15
|
-
this.
|
|
15
|
+
this.database = undefined;
|
|
16
16
|
this.libraries = undefined;
|
|
17
17
|
this.tag = '';
|
|
18
18
|
this.workers = [];
|
|
@@ -30,35 +30,35 @@ class ClientExecute {
|
|
|
30
30
|
this.tag = job.uuid;
|
|
31
31
|
this.execute_job_worker(job, source);
|
|
32
32
|
};
|
|
33
|
-
this.
|
|
34
|
-
this.
|
|
33
|
+
this.set_database = (data) => {
|
|
34
|
+
this.database = data;
|
|
35
35
|
};
|
|
36
36
|
this.set_libs = (data) => {
|
|
37
37
|
this.libraries = data;
|
|
38
38
|
};
|
|
39
39
|
this.set_string = (data) => {
|
|
40
|
-
if (this.
|
|
40
|
+
if (this.database == undefined)
|
|
41
41
|
return;
|
|
42
|
-
const index = this.
|
|
42
|
+
const index = this.database.containers.findIndex(x => x.name == data.key && x.type == interface_1.DataType.String);
|
|
43
43
|
if (index != -1)
|
|
44
|
-
this.
|
|
45
|
-
this.messager_log(`[
|
|
44
|
+
this.database.containers[index].value = data.value;
|
|
45
|
+
this.messager_log(`[Database string sync] ${data.key} = ${data.value}`);
|
|
46
46
|
};
|
|
47
47
|
this.set_number = (data) => {
|
|
48
|
-
if (this.
|
|
48
|
+
if (this.database == undefined)
|
|
49
49
|
return;
|
|
50
|
-
const index = this.
|
|
50
|
+
const index = this.database.containers.findIndex(x => x.name == data.key && x.type == interface_1.DataType.Number);
|
|
51
51
|
if (index != -1)
|
|
52
|
-
this.
|
|
53
|
-
this.messager_log(`[
|
|
52
|
+
this.database.containers[index].value = data.value;
|
|
53
|
+
this.messager_log(`[Database number sync] ${data.key} = ${data.value}`);
|
|
54
54
|
};
|
|
55
55
|
this.set_boolean = (data) => {
|
|
56
|
-
if (this.
|
|
56
|
+
if (this.database == undefined)
|
|
57
57
|
return;
|
|
58
|
-
const index = this.
|
|
58
|
+
const index = this.database.containers.findIndex(x => x.name == data.key && x.type == interface_1.DataType.Boolean);
|
|
59
59
|
if (index != -1)
|
|
60
|
-
this.
|
|
61
|
-
this.messager_log(`[
|
|
60
|
+
this.database.containers[index].value = data.value;
|
|
61
|
+
this.messager_log(`[Database boolean sync] ${data.key} = ${data.value}`);
|
|
62
62
|
};
|
|
63
63
|
this.uuid = _uuid;
|
|
64
64
|
this.client = _client;
|
|
@@ -70,11 +70,11 @@ class ClientExecute {
|
|
|
70
70
|
stdio: ['pipe', 'pipe', 'pipe'],
|
|
71
71
|
windowsHide: true,
|
|
72
72
|
shell: true,
|
|
73
|
-
env: Object.assign(Object.assign({}, process.env), { type: "JOB", job: JSON.stringify(job), plugin: JSON.stringify(this.client.plugins),
|
|
73
|
+
env: Object.assign(Object.assign({}, process.env), { type: "JOB", job: JSON.stringify(job), plugin: JSON.stringify(this.client.plugins), database: JSON.stringify(this.database), libraries: JSON.stringify(this.libraries) })
|
|
74
74
|
});
|
|
75
75
|
child.stdin.setDefaultEncoding('utf-8');
|
|
76
76
|
this.workers.push(child);
|
|
77
|
-
const para = new
|
|
77
|
+
const para = new database_1.ClientDatabase(source);
|
|
78
78
|
let k = "";
|
|
79
79
|
const workerFeedbackExec = (str) => {
|
|
80
80
|
var _a;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ClientJobDatabase = void 0;
|
|
4
|
+
class ClientJobDatabase {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.feedbacknumber = (data) => {
|
|
7
|
+
this.feedback("feedbacknumber", data);
|
|
8
|
+
};
|
|
9
|
+
this.feedbackboolean = (data) => {
|
|
10
|
+
this.feedback("feedbackboolean", data);
|
|
11
|
+
};
|
|
12
|
+
this.feedbackstring = (data) => {
|
|
13
|
+
this.feedback("feedbackstring", data);
|
|
14
|
+
};
|
|
15
|
+
this.feedbackobject = (data) => {
|
|
16
|
+
this.feedback("feedbackobject", data);
|
|
17
|
+
};
|
|
18
|
+
this.feedbacklist = (data) => {
|
|
19
|
+
this.feedback("feedbacklist", data);
|
|
20
|
+
};
|
|
21
|
+
this.feedbackselect = (data) => {
|
|
22
|
+
this.feedback("feedbackselect", data);
|
|
23
|
+
};
|
|
24
|
+
this.feedback = (title, data) => {
|
|
25
|
+
const p = {
|
|
26
|
+
name: title,
|
|
27
|
+
data: {
|
|
28
|
+
key: data.key,
|
|
29
|
+
value: data.value
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
console.log(JSON.stringify(p));
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.ClientJobDatabase = ClientJobDatabase;
|
|
@@ -13,7 +13,7 @@ exports.ClientJobExecute = void 0;
|
|
|
13
13
|
const interface_1 = require("../interface");
|
|
14
14
|
const i18n_1 = require("../plugins/i18n");
|
|
15
15
|
const javascript_1 = require("./javascript");
|
|
16
|
-
const
|
|
16
|
+
const job_database_1 = require("./job_database");
|
|
17
17
|
const os_1 = require("./os");
|
|
18
18
|
class ClientJobExecute {
|
|
19
19
|
constructor(_messager, _messager_log, _job, _source, _plugin) {
|
|
@@ -160,12 +160,12 @@ class ClientJobExecute {
|
|
|
160
160
|
this.runtime = _job.runtime_uuid || '';
|
|
161
161
|
this.job = _job;
|
|
162
162
|
this.plugin = _plugin;
|
|
163
|
-
this.para = new
|
|
163
|
+
this.para = new job_database_1.ClientJobDatabase();
|
|
164
164
|
this.os = new os_1.ClientOS(() => this.tag, () => this.job.runtime_uuid || '', _messager, _messager_log);
|
|
165
165
|
this.javascript = new javascript_1.ClientJavascript(_messager, _messager_log, () => this.job);
|
|
166
|
-
this.
|
|
166
|
+
this.database = process.env.database != undefined ? JSON.parse(process.env.database) : undefined;
|
|
167
167
|
this.libraries = process.env.libraries != undefined ? JSON.parse(process.env.libraries) : undefined;
|
|
168
|
-
javascript_1.ClientJavascript.Init(_messager, _messager_log, this.os, this.para, () => this.libraries, () => this.
|
|
168
|
+
javascript_1.ClientJavascript.Init(_messager, _messager_log, this.os, this.para, () => this.libraries, () => this.database, () => this.job);
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
171
|
exports.ClientJobExecute = ClientJobExecute;
|
package/dist/src/computed.js
CHANGED
|
@@ -39,11 +39,11 @@ exports.Client = __importStar(require("./client/client"));
|
|
|
39
39
|
exports.ClientCluster = __importStar(require("./client/cluster"));
|
|
40
40
|
exports.ClientExecute = __importStar(require("./client/execute"));
|
|
41
41
|
exports.ClientJobExecute = __importStar(require("./client/job_execute"));
|
|
42
|
-
exports.ClientJobParameter = __importStar(require("./client/
|
|
42
|
+
exports.ClientJobParameter = __importStar(require("./client/job_database"));
|
|
43
43
|
exports.ClientHttp = __importStar(require("./client/http"));
|
|
44
44
|
exports.ClientJavascript = __importStar(require("./client/javascript"));
|
|
45
45
|
exports.ClientOS = __importStar(require("./client/os"));
|
|
46
|
-
exports.ClientParameter = __importStar(require("./client/
|
|
46
|
+
exports.ClientParameter = __importStar(require("./client/database"));
|
|
47
47
|
exports.ClientResource = __importStar(require("./client/resource"));
|
|
48
48
|
exports.ClientShell = __importStar(require("./client/shell"));
|
|
49
49
|
exports.Execute_WebhookServerManager = __importStar(require("./script/webhook_server_manager"));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.DatabaseTemplateText = exports.ProjectTemplateText = exports.JobType2Text = exports.JobTypeText = exports.JobResultText = exports.ConnectionText = exports.JobCategoryText = exports.ExecuteStateText = exports.DataTypeText = exports.ServiceMode = exports.JavascriptLib = exports.RecordType = exports.RenderUpdateType = exports.ExecuteState = exports.ParameterTemplate = exports.ProjectTemplate = exports.JobType2 = exports.JobType = exports.ConditionResult = exports.JobCategory = exports.FrontendUpdate = exports.ResourceType = exports.DataTypeBase = exports.DataType = exports.SocketState = void 0;
|
|
4
4
|
var SocketState;
|
|
5
5
|
(function (SocketState) {
|
|
6
6
|
SocketState[SocketState["CONNECTING"] = 0] = "CONNECTING";
|
|
@@ -101,12 +101,12 @@ var RenderUpdateType;
|
|
|
101
101
|
RenderUpdateType[RenderUpdateType["All"] = 127] = "All";
|
|
102
102
|
RenderUpdateType[RenderUpdateType["Project"] = 1] = "Project";
|
|
103
103
|
RenderUpdateType[RenderUpdateType["Node"] = 2] = "Node";
|
|
104
|
-
RenderUpdateType[RenderUpdateType["
|
|
104
|
+
RenderUpdateType[RenderUpdateType["Database"] = 4] = "Database";
|
|
105
105
|
})(RenderUpdateType || (exports.RenderUpdateType = RenderUpdateType = {}));
|
|
106
106
|
var RecordType;
|
|
107
107
|
(function (RecordType) {
|
|
108
108
|
RecordType[RecordType["PROJECT"] = 0] = "PROJECT";
|
|
109
|
-
RecordType[RecordType["
|
|
109
|
+
RecordType[RecordType["Database"] = 1] = "Database";
|
|
110
110
|
RecordType[RecordType["NODE"] = 2] = "NODE";
|
|
111
111
|
RecordType[RecordType["LOG"] = 3] = "LOG";
|
|
112
112
|
RecordType[RecordType["LIB"] = 4] = "LIB";
|
|
@@ -185,6 +185,6 @@ exports.ProjectTemplateText = {
|
|
|
185
185
|
101: 'enum.project.blender_cluster',
|
|
186
186
|
200: 'enum.project.aftereffect',
|
|
187
187
|
};
|
|
188
|
-
exports.
|
|
189
|
-
0: 'enum.
|
|
188
|
+
exports.DatabaseTemplateText = {
|
|
189
|
+
0: 'enum.database.default'
|
|
190
190
|
};
|
|
@@ -21,7 +21,7 @@ var PermissionType;
|
|
|
21
21
|
PermissionType[PermissionType["PROJECT"] = 1] = "PROJECT";
|
|
22
22
|
PermissionType[PermissionType["Task"] = 2] = "Task";
|
|
23
23
|
PermissionType[PermissionType["JOB"] = 3] = "JOB";
|
|
24
|
-
PermissionType[PermissionType["
|
|
24
|
+
PermissionType[PermissionType["DATABASE"] = 4] = "DATABASE";
|
|
25
25
|
PermissionType[PermissionType["PLUGIN"] = 5] = "PLUGIN";
|
|
26
26
|
PermissionType[PermissionType["NODE"] = 6] = "NODE";
|
|
27
27
|
PermissionType[PermissionType["LIB"] = 7] = "LIB";
|
|
@@ -40,7 +40,7 @@ const CreateRootPermission = () => {
|
|
|
40
40
|
job: perl,
|
|
41
41
|
plugin: perl,
|
|
42
42
|
node: perl,
|
|
43
|
-
|
|
43
|
+
database: perl,
|
|
44
44
|
lib: perl,
|
|
45
45
|
log: perl,
|
|
46
46
|
execute_job: true
|
package/dist/src/interface.js
CHANGED
|
@@ -64,5 +64,5 @@ exports.Execute_ConsoleServerManager = __importStar(require("./script/console_se
|
|
|
64
64
|
exports.Execute_ExecuteManager = __importStar(require("./script/execute_manager"));
|
|
65
65
|
exports.Execute_SocketManager = __importStar(require("./script/socket_manager"));
|
|
66
66
|
exports.Execute_WebhookManager = __importStar(require("./script/webhook_manager"));
|
|
67
|
-
exports.UtilServer_Console = __importStar(require("./util/
|
|
68
|
-
exports.UtilServer_Log = __importStar(require("./util/
|
|
67
|
+
exports.UtilServer_Console = __importStar(require("./util/console_handle"));
|
|
68
|
+
exports.UtilServer_Log = __importStar(require("./util/log_handle"));
|
package/dist/src/lan/en.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"project": "Project Container",
|
|
13
13
|
"task": "Task Container",
|
|
14
14
|
"job": "Job Container",
|
|
15
|
-
"
|
|
15
|
+
"database": "Database Binding",
|
|
16
16
|
"console": "Console"
|
|
17
17
|
},
|
|
18
18
|
"profile": {
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"url-needed": "URL is needed",
|
|
79
79
|
"title-repeat": "Cannot use title which already exists",
|
|
80
80
|
"project-empty": "Project list cannot be zero",
|
|
81
|
-
"
|
|
81
|
+
"database-empty": "Project must binding with database",
|
|
82
82
|
"node-empty": "node list cannot be zero"
|
|
83
83
|
},
|
|
84
84
|
"filter": {
|
|
@@ -89,13 +89,13 @@
|
|
|
89
89
|
},
|
|
90
90
|
"modal": {
|
|
91
91
|
"project-template-select": "Select Template",
|
|
92
|
-
"
|
|
92
|
+
"database-template-select": "Select Template",
|
|
93
93
|
"new-project": "New Project",
|
|
94
94
|
"modify-project": "Modify Project",
|
|
95
95
|
"delete-project": "Delete Project",
|
|
96
96
|
"import-project": "Import Project",
|
|
97
97
|
"delete-project-confirm": "Are you sure delete projects below",
|
|
98
|
-
"delete-project-binding": "Delete the binding
|
|
98
|
+
"delete-project-binding": "Delete the binding database set as well",
|
|
99
99
|
"enter-project-name": "Enter Project Name",
|
|
100
100
|
"enter-project-description": "Enter Project Description",
|
|
101
101
|
"new-task": "New Task",
|
|
@@ -103,17 +103,17 @@
|
|
|
103
103
|
"enter-task-name": "Enter Task Name",
|
|
104
104
|
"enter-task-description": "Enter Task Description",
|
|
105
105
|
"new-job": "New Job",
|
|
106
|
-
"new-
|
|
107
|
-
"edit-
|
|
108
|
-
"delete-
|
|
109
|
-
"enter-
|
|
110
|
-
"new-
|
|
111
|
-
"clone-
|
|
112
|
-
"edit-
|
|
113
|
-
"enter-
|
|
114
|
-
"import-
|
|
115
|
-
"delete-
|
|
116
|
-
"
|
|
106
|
+
"new-database": "New Database",
|
|
107
|
+
"edit-database": "Modify Database",
|
|
108
|
+
"delete-database": "Delete Database",
|
|
109
|
+
"enter-database-name": "Enter Database Name",
|
|
110
|
+
"new-database-set": "New Database Set",
|
|
111
|
+
"clone-database-set": "Clone Database Set",
|
|
112
|
+
"edit-database-set": "Modify Database Set",
|
|
113
|
+
"enter-database-set-name": "Enter Database Set Name",
|
|
114
|
+
"import-database": "Delete Database",
|
|
115
|
+
"delete-database-confirm": "Are you sure delete database you selected",
|
|
116
|
+
"database-datatype": "Datatype",
|
|
117
117
|
"create-library": "Create Lib",
|
|
118
118
|
"enter-library-name": "Enter Lib Name",
|
|
119
119
|
"enter-library-type": "Enter Lib Type",
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
"delete-node": "Delete Node",
|
|
124
124
|
"delete-node-confirm": "Are you sure delete nodes below",
|
|
125
125
|
"log-recover-project-title": "New Project Title",
|
|
126
|
-
"log-recover-
|
|
126
|
+
"log-recover-database-title": "New Database Title",
|
|
127
127
|
"console-create": "Create Console",
|
|
128
128
|
"console-name": "Console Name",
|
|
129
129
|
"delete-library": "Library Delete",
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
"project": "Project (Q)",
|
|
145
145
|
"task": "Task (W)",
|
|
146
146
|
"job": "Job (E)",
|
|
147
|
-
"
|
|
147
|
+
"database": "Database (R)",
|
|
148
148
|
"node": "Node (A)",
|
|
149
149
|
"console": "Console (S)",
|
|
150
150
|
"log": "Log (D)",
|
|
@@ -174,7 +174,7 @@
|
|
|
174
174
|
"path": "Path",
|
|
175
175
|
"content": "Content",
|
|
176
176
|
"command": "Command",
|
|
177
|
-
"
|
|
177
|
+
"databases": "Databases"
|
|
178
178
|
},
|
|
179
179
|
"enum": {
|
|
180
180
|
"jobtype": {
|
|
@@ -214,7 +214,7 @@
|
|
|
214
214
|
"blender_cluster": "Blender Cluster Render",
|
|
215
215
|
"aftereffect": "After Effect Render"
|
|
216
216
|
},
|
|
217
|
-
"
|
|
217
|
+
"database": {
|
|
218
218
|
"default": "Default",
|
|
219
219
|
"ffmpeg": "FFmpeg"
|
|
220
220
|
},
|
|
@@ -243,7 +243,7 @@
|
|
|
243
243
|
"console": {
|
|
244
244
|
"list": "Project List",
|
|
245
245
|
"dashboard": "Dashboard",
|
|
246
|
-
"
|
|
246
|
+
"database": "Database"
|
|
247
247
|
},
|
|
248
248
|
"types": {
|
|
249
249
|
"number": "Number",
|
|
@@ -347,7 +347,7 @@
|
|
|
347
347
|
"project": "Project",
|
|
348
348
|
"task": "Task",
|
|
349
349
|
"job": "JOB",
|
|
350
|
-
"
|
|
350
|
+
"database": "Database",
|
|
351
351
|
"create": "Create",
|
|
352
352
|
"import-template": "Import Template",
|
|
353
353
|
"import-plugin": "Import Plugin",
|
|
@@ -379,10 +379,10 @@
|
|
|
379
379
|
"export": "Export",
|
|
380
380
|
"import": "Import",
|
|
381
381
|
"useTemplate": "Use Template",
|
|
382
|
-
"
|
|
382
|
+
"useExistDatabase": "Use Exist Database",
|
|
383
383
|
"execute-keep": "Execute (Keep)",
|
|
384
|
-
"
|
|
385
|
-
"
|
|
384
|
+
"database-setting": "Database Setting",
|
|
385
|
+
"database-select": "Database Select",
|
|
386
386
|
"is-running": "Is Running",
|
|
387
387
|
"is-stop": "Is Stop",
|
|
388
388
|
"clear": "Clear",
|
package/dist/src/lan/zh_TW.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"project": "專案容器",
|
|
13
13
|
"task": "流程容器",
|
|
14
14
|
"job": "工作容器",
|
|
15
|
-
"
|
|
15
|
+
"database": "數據綁定",
|
|
16
16
|
"console": "控制台"
|
|
17
17
|
},
|
|
18
18
|
"profile": {
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"title-repeat": "名稱不能重複",
|
|
79
79
|
"url-needed": "URL 不能為空",
|
|
80
80
|
"project-empty": "專案清單不能爲空",
|
|
81
|
-
"
|
|
81
|
+
"database-empty": "專案必須綁定資料庫",
|
|
82
82
|
"node-empty": "節點清單不能爲空"
|
|
83
83
|
},
|
|
84
84
|
"filter": {
|
|
@@ -89,13 +89,13 @@
|
|
|
89
89
|
},
|
|
90
90
|
"modal": {
|
|
91
91
|
"project-template-select": "樣板選擇",
|
|
92
|
-
"
|
|
92
|
+
"database-template-select": "樣板選擇",
|
|
93
93
|
"new-project": "新增專案",
|
|
94
94
|
"modify-project": "編輯專案",
|
|
95
95
|
"delete-project": "刪除專案",
|
|
96
96
|
"import-project": "匯入專案",
|
|
97
97
|
"delete-project-confirm": "確定刪除以下專案嗎?",
|
|
98
|
-
"delete-project-binding": "
|
|
98
|
+
"delete-project-binding": "連同綁定的資料庫集一起刪除",
|
|
99
99
|
"enter-project-name": "輸入專案名稱",
|
|
100
100
|
"enter-project-description": "輸入專案敘述",
|
|
101
101
|
"new-task": "新增流程",
|
|
@@ -103,17 +103,17 @@
|
|
|
103
103
|
"enter-task-name": "輸入流程名稱",
|
|
104
104
|
"enter-task-description": "輸入流程敘述",
|
|
105
105
|
"new-job": "新增工作",
|
|
106
|
-
"new-
|
|
107
|
-
"edit-
|
|
108
|
-
"delete-
|
|
109
|
-
"enter-
|
|
110
|
-
"new-
|
|
111
|
-
"clone-
|
|
112
|
-
"edit-
|
|
113
|
-
"enter-
|
|
114
|
-
"import-
|
|
115
|
-
"delete-
|
|
116
|
-
"
|
|
106
|
+
"new-database": "新增資料庫",
|
|
107
|
+
"edit-database": "編輯資料庫",
|
|
108
|
+
"delete-database": "刪除資料庫",
|
|
109
|
+
"enter-database-name": "輸入資料庫名稱",
|
|
110
|
+
"new-database-set": "新增資料庫組",
|
|
111
|
+
"clone-database-set": "複製資料庫組",
|
|
112
|
+
"edit-database-set": "編輯資料庫組",
|
|
113
|
+
"enter-database-set-name": "輸入資料庫組名稱",
|
|
114
|
+
"import-database": "刪除資料庫",
|
|
115
|
+
"delete-database-confirm": "確認刪除選擇資料庫嗎?",
|
|
116
|
+
"database-datatype": "資料型態",
|
|
117
117
|
"create-library": "新增程式庫",
|
|
118
118
|
"enter-library-name": "輸入程式庫名稱",
|
|
119
119
|
"enter-library-type": "輸入程式庫類型",
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
"delete-node": "刪除節點",
|
|
124
124
|
"delete-node-confirm": "確定刪除以下節點嗎?",
|
|
125
125
|
"log-recover-project-title": "新專案名稱",
|
|
126
|
-
"log-recover-
|
|
126
|
+
"log-recover-database-title": "新資料庫名稱",
|
|
127
127
|
"console-create": "建立控制台",
|
|
128
128
|
"console-name": "控制台名稱",
|
|
129
129
|
"delete-library": "刪除程式腳本",
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
"project": "專案管理 (Q)",
|
|
145
145
|
"task": "流程管理 (W)",
|
|
146
146
|
"job": "工作管理 (E)",
|
|
147
|
-
"
|
|
147
|
+
"database": "資料庫管理 (R)",
|
|
148
148
|
"node": "節點管理 (A)",
|
|
149
149
|
"console": "控制台 (S)",
|
|
150
150
|
"log": "紀錄 (D)",
|
|
@@ -174,7 +174,7 @@
|
|
|
174
174
|
"path": "路徑",
|
|
175
175
|
"content": "內容",
|
|
176
176
|
"command": "命令",
|
|
177
|
-
"
|
|
177
|
+
"databases": "資料庫值"
|
|
178
178
|
},
|
|
179
179
|
"enum": {
|
|
180
180
|
"jobtype": {
|
|
@@ -214,7 +214,7 @@
|
|
|
214
214
|
"blender_cluster": "Blender 群集渲染",
|
|
215
215
|
"aftereffect": "After Effect 渲染"
|
|
216
216
|
},
|
|
217
|
-
"
|
|
217
|
+
"database": {
|
|
218
218
|
"default": "Default",
|
|
219
219
|
"ffmpeg": "FFmpeg"
|
|
220
220
|
},
|
|
@@ -243,7 +243,7 @@
|
|
|
243
243
|
"console": {
|
|
244
244
|
"list": "專案列表",
|
|
245
245
|
"dashboard": "儀錶板",
|
|
246
|
-
"
|
|
246
|
+
"database": "資料庫版"
|
|
247
247
|
},
|
|
248
248
|
"types": {
|
|
249
249
|
"number": "數字",
|
|
@@ -347,7 +347,7 @@
|
|
|
347
347
|
"project": "專案",
|
|
348
348
|
"task": "流程",
|
|
349
349
|
"job": "工作",
|
|
350
|
-
"
|
|
350
|
+
"database": "資料庫",
|
|
351
351
|
"create": "新增",
|
|
352
352
|
"import-template": "匯入樣板",
|
|
353
353
|
"import-plugin": "匯入插件",
|
|
@@ -379,10 +379,10 @@
|
|
|
379
379
|
"export": "匯出",
|
|
380
380
|
"import": "匯入",
|
|
381
381
|
"useTemplate": "使用樣板",
|
|
382
|
-
"useExistParameter": "
|
|
382
|
+
"useExistParameter": "使用資料庫組",
|
|
383
383
|
"execute-keep": "執行 (保留)",
|
|
384
|
-
"
|
|
385
|
-
"
|
|
384
|
+
"database-setting": "資料庫設定",
|
|
385
|
+
"database-select": "資料庫選擇",
|
|
386
386
|
"is-running": "是否執行中",
|
|
387
387
|
"is-stop": "是否停止",
|
|
388
388
|
"clear": "清除",
|
|
@@ -24,11 +24,11 @@ class ExecuteManager_Base {
|
|
|
24
24
|
this.sync_local_para = (target) => {
|
|
25
25
|
var _a;
|
|
26
26
|
this.current_nodes.forEach(x => this.sync_para(target, x));
|
|
27
|
-
(_a = this.proxy) === null || _a === void 0 ? void 0 : _a.
|
|
27
|
+
(_a = this.proxy) === null || _a === void 0 ? void 0 : _a.updateDatabase(target);
|
|
28
28
|
};
|
|
29
29
|
this.sync_para = (target, source) => {
|
|
30
30
|
const h = {
|
|
31
|
-
name: '
|
|
31
|
+
name: 'set_database',
|
|
32
32
|
channel: this.uuid,
|
|
33
33
|
data: target
|
|
34
34
|
};
|
|
@@ -69,27 +69,27 @@ class ExecuteManager_Base {
|
|
|
69
69
|
x.task.forEach(t => {
|
|
70
70
|
var _a, _b, _c, _d, _e, _f;
|
|
71
71
|
if (t.cronjob) {
|
|
72
|
-
const index = (_b = (_a = x.
|
|
72
|
+
const index = (_b = (_a = x.database) === null || _a === void 0 ? void 0 : _a.containers.findIndex(x => x.name == t.cronjobKey && x.type == interface_1.DataType.Number)) !== null && _b !== void 0 ? _b : -1;
|
|
73
73
|
if (index == -1) {
|
|
74
|
-
this.messager_log(`[Execute:CronJob] Project ${x.title} (${x.uuid}), Task ${t.title} (${t.uuid}), Has unknoed
|
|
74
|
+
this.messager_log(`[Execute:CronJob] Project ${x.title} (${x.uuid}), Task ${t.title} (${t.uuid}), Has unknoed database: \"${t.cronjobKey}\"`);
|
|
75
75
|
this.messager_log(`[Execute:CronJob] Cron task registerd key not found`);
|
|
76
76
|
return false;
|
|
77
77
|
}
|
|
78
|
-
else if (((_c = x.
|
|
79
|
-
this.messager_log(`[Execute:CronJob] Project ${x.title} (${x.uuid}), Task ${t.title} (${t.uuid}), Has unknoed
|
|
78
|
+
else if (((_c = x.database) === null || _c === void 0 ? void 0 : _c.containers[index].value) == 0) {
|
|
79
|
+
this.messager_log(`[Execute:CronJob] Project ${x.title} (${x.uuid}), Task ${t.title} (${t.uuid}), Has unknoed database: \"${t.cronjobKey}\"`);
|
|
80
80
|
this.messager_log(`[Execute:CronJob] Cron task value must bigger than 0`);
|
|
81
81
|
return false;
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
if (t.cronjob && t.multi) {
|
|
85
|
-
const index = (_e = (_d = x.
|
|
85
|
+
const index = (_e = (_d = x.database) === null || _d === void 0 ? void 0 : _d.containers.findIndex(x => x.name == t.multiKey && x.type == interface_1.DataType.Number)) !== null && _e !== void 0 ? _e : -1;
|
|
86
86
|
if (index == -1) {
|
|
87
|
-
this.messager_log(`[Execute:Multi] Project ${x.title} (${x.uuid}), Task ${t.title} (${t.uuid}), Has unknoed
|
|
87
|
+
this.messager_log(`[Execute:Multi] Project ${x.title} (${x.uuid}), Task ${t.title} (${t.uuid}), Has unknoed database: \"${t.multiKey}\"`);
|
|
88
88
|
this.messager_log(`[Execute:Multi] Cron task registerd key not found`);
|
|
89
89
|
return false;
|
|
90
90
|
}
|
|
91
|
-
else if (((_f = x.
|
|
92
|
-
this.messager_log(`[Execute:Multi] Project ${x.title} (${x.uuid}), Task ${t.title} (${t.uuid}), Has unknoed
|
|
91
|
+
else if (((_f = x.database) === null || _f === void 0 ? void 0 : _f.containers[index].value) == 0) {
|
|
92
|
+
this.messager_log(`[Execute:Multi] Project ${x.title} (${x.uuid}), Task ${t.title} (${t.uuid}), Has unknoed database: \"${t.multiKey}\"`);
|
|
93
93
|
this.messager_log(`[Execute:Multi] Cron task value must bigger than 0`);
|
|
94
94
|
return false;
|
|
95
95
|
}
|
|
@@ -152,14 +152,14 @@ class ExecuteManager_Base {
|
|
|
152
152
|
return ExecuteManager_Base.get_number_global(key, this.localPara);
|
|
153
153
|
}
|
|
154
154
|
static get_number_global(key, localPara) {
|
|
155
|
-
const e = ExecuteManager_Base.
|
|
155
|
+
const e = ExecuteManager_Base.database_update(localPara);
|
|
156
156
|
const a = e.replacePara(`%{${key}}%`);
|
|
157
157
|
return Number(a);
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
exports.ExecuteManager_Base = ExecuteManager_Base;
|
|
161
161
|
ExecuteManager_Base.string_args_transform = (task, job, messager_log, localPara, n) => {
|
|
162
|
-
let e = ExecuteManager_Base.
|
|
162
|
+
let e = ExecuteManager_Base.database_update(localPara, n);
|
|
163
163
|
e = ExecuteManager_Base.property_update(task, e);
|
|
164
164
|
for (let i = 0; i < job.string_args.length; i++) {
|
|
165
165
|
const b = job.string_args[i];
|
|
@@ -182,7 +182,7 @@ ExecuteManager_Base.property_update = (task, e) => {
|
|
|
182
182
|
}
|
|
183
183
|
return e;
|
|
184
184
|
};
|
|
185
|
-
ExecuteManager_Base.
|
|
185
|
+
ExecuteManager_Base.database_update = (localPara, n) => {
|
|
186
186
|
const e = new util_parser_1.Util_Parser([...util_parser_1.Util_Parser.to_keyvalue(localPara)]);
|
|
187
187
|
if (n != undefined) {
|
|
188
188
|
e.paras.push({ key: 'ck', value: n.toString() });
|