verteilen-core 1.3.36 → 1.3.37
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/interface/struct.d.ts +1 -0
- package/dist/lan/en.json +10 -8
- package/dist/lan/zh_TW.json +10 -8
- package/dist/plugins/i18n.d.ts +20 -12
- package/dist/server/detail/console_handle.d.ts +1 -3
- package/dist/server/detail/console_handle.js +40 -42
- package/dist/server/detail.d.ts +0 -2
- package/dist/server/detail.js +1 -3
- package/package.json +1 -1
- package/src/interface/execute.ts +1 -1
- package/src/interface/log.ts +48 -0
- package/src/interface/struct.ts +39 -5
- package/src/lan/en.json +10 -8
- package/src/lan/zh_TW.json +10 -8
- package/src/server/detail/console_handle.ts +43 -38
- package/src/server/detail/log_handle.ts +5 -0
- package/src/server/detail.ts +2 -4
package/dist/lan/en.json
CHANGED
|
@@ -103,14 +103,14 @@
|
|
|
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-
|
|
106
|
+
"new-Variable": "New Variable",
|
|
107
|
+
"edit-Variable": "Modify Variable",
|
|
108
108
|
"delete-database": "Delete Database",
|
|
109
|
-
"enter-
|
|
110
|
-
"new-database-set": "New Database
|
|
111
|
-
"clone-database-set": "Clone Database
|
|
112
|
-
"edit-database-set": "Modify Database
|
|
113
|
-
"enter-database-set-name": "Enter Database
|
|
109
|
+
"enter-Variable-name": "Enter Variable Name",
|
|
110
|
+
"new-database-set": "New Database",
|
|
111
|
+
"clone-database-set": "Clone Database",
|
|
112
|
+
"edit-database-set": "Modify Database",
|
|
113
|
+
"enter-database-set-name": "Enter Database Name",
|
|
114
114
|
"import-database": "Delete Database",
|
|
115
115
|
"delete-database-confirm": "Are you sure delete database you selected",
|
|
116
116
|
"database-datatype": "Datatype",
|
|
@@ -425,5 +425,7 @@
|
|
|
425
425
|
"goback": "Go Back",
|
|
426
426
|
"logic": "Logic",
|
|
427
427
|
"use_logic": "Use Logic",
|
|
428
|
-
"remove_logic": "Remove Logic"
|
|
428
|
+
"remove_logic": "Remove Logic",
|
|
429
|
+
"state": "State",
|
|
430
|
+
"delay": "Delay"
|
|
429
431
|
}
|
package/dist/lan/zh_TW.json
CHANGED
|
@@ -103,14 +103,14 @@
|
|
|
103
103
|
"enter-task-name": "輸入流程名稱",
|
|
104
104
|
"enter-task-description": "輸入流程敘述",
|
|
105
105
|
"new-job": "新增工作",
|
|
106
|
-
"new-
|
|
107
|
-
"edit-
|
|
106
|
+
"new-Variable": "新增數據",
|
|
107
|
+
"edit-Variable": "編輯數據",
|
|
108
108
|
"delete-database": "刪除資料庫",
|
|
109
|
-
"enter-
|
|
110
|
-
"new-database-set": "
|
|
111
|
-
"clone-database-set": "
|
|
112
|
-
"edit-database-set": "
|
|
113
|
-
"enter-database-set-name": "
|
|
109
|
+
"enter-Variable-name": "輸入數據名稱",
|
|
110
|
+
"new-database-set": "新增資料庫",
|
|
111
|
+
"clone-database-set": "複製資料庫",
|
|
112
|
+
"edit-database-set": "編輯資料庫",
|
|
113
|
+
"enter-database-set-name": "輸入資料庫名稱",
|
|
114
114
|
"import-database": "刪除資料庫",
|
|
115
115
|
"delete-database-confirm": "確認刪除選擇資料庫嗎?",
|
|
116
116
|
"database-datatype": "資料型態",
|
|
@@ -425,5 +425,7 @@
|
|
|
425
425
|
"goback": "返回",
|
|
426
426
|
"logic": "邏輯",
|
|
427
427
|
"use_logic": "套用邏輯",
|
|
428
|
-
"remove_logic": "刪除邏輯"
|
|
428
|
+
"remove_logic": "刪除邏輯",
|
|
429
|
+
"state": "狀態",
|
|
430
|
+
"delay": "延遲"
|
|
429
431
|
}
|
package/dist/plugins/i18n.d.ts
CHANGED
|
@@ -111,10 +111,10 @@ export declare const i18nDefaultData: {
|
|
|
111
111
|
"enter-task-name": string;
|
|
112
112
|
"enter-task-description": string;
|
|
113
113
|
"new-job": string;
|
|
114
|
-
"new-
|
|
115
|
-
"edit-
|
|
114
|
+
"new-Variable": string;
|
|
115
|
+
"edit-Variable": string;
|
|
116
116
|
"delete-database": string;
|
|
117
|
-
"enter-
|
|
117
|
+
"enter-Variable-name": string;
|
|
118
118
|
"new-database-set": string;
|
|
119
119
|
"clone-database-set": string;
|
|
120
120
|
"edit-database-set": string;
|
|
@@ -434,6 +434,8 @@ export declare const i18nDefaultData: {
|
|
|
434
434
|
logic: string;
|
|
435
435
|
use_logic: string;
|
|
436
436
|
remove_logic: string;
|
|
437
|
+
state: string;
|
|
438
|
+
delay: string;
|
|
437
439
|
};
|
|
438
440
|
zh_TW: {
|
|
439
441
|
login: {
|
|
@@ -540,10 +542,10 @@ export declare const i18nDefaultData: {
|
|
|
540
542
|
"enter-task-name": string;
|
|
541
543
|
"enter-task-description": string;
|
|
542
544
|
"new-job": string;
|
|
543
|
-
"new-
|
|
544
|
-
"edit-
|
|
545
|
+
"new-Variable": string;
|
|
546
|
+
"edit-Variable": string;
|
|
545
547
|
"delete-database": string;
|
|
546
|
-
"enter-
|
|
548
|
+
"enter-Variable-name": string;
|
|
547
549
|
"new-database-set": string;
|
|
548
550
|
"clone-database-set": string;
|
|
549
551
|
"edit-database-set": string;
|
|
@@ -863,6 +865,8 @@ export declare const i18nDefaultData: {
|
|
|
863
865
|
logic: string;
|
|
864
866
|
use_logic: string;
|
|
865
867
|
remove_logic: string;
|
|
868
|
+
state: string;
|
|
869
|
+
delay: string;
|
|
866
870
|
};
|
|
867
871
|
};
|
|
868
872
|
};
|
|
@@ -972,10 +976,10 @@ export declare const i18n: import("vue-i18n").I18n<{
|
|
|
972
976
|
"enter-task-name": string;
|
|
973
977
|
"enter-task-description": string;
|
|
974
978
|
"new-job": string;
|
|
975
|
-
"new-
|
|
976
|
-
"edit-
|
|
979
|
+
"new-Variable": string;
|
|
980
|
+
"edit-Variable": string;
|
|
977
981
|
"delete-database": string;
|
|
978
|
-
"enter-
|
|
982
|
+
"enter-Variable-name": string;
|
|
979
983
|
"new-database-set": string;
|
|
980
984
|
"clone-database-set": string;
|
|
981
985
|
"edit-database-set": string;
|
|
@@ -1295,6 +1299,8 @@ export declare const i18n: import("vue-i18n").I18n<{
|
|
|
1295
1299
|
logic: string;
|
|
1296
1300
|
use_logic: string;
|
|
1297
1301
|
remove_logic: string;
|
|
1302
|
+
state: string;
|
|
1303
|
+
delay: string;
|
|
1298
1304
|
};
|
|
1299
1305
|
zh_TW: {
|
|
1300
1306
|
login: {
|
|
@@ -1401,10 +1407,10 @@ export declare const i18n: import("vue-i18n").I18n<{
|
|
|
1401
1407
|
"enter-task-name": string;
|
|
1402
1408
|
"enter-task-description": string;
|
|
1403
1409
|
"new-job": string;
|
|
1404
|
-
"new-
|
|
1405
|
-
"edit-
|
|
1410
|
+
"new-Variable": string;
|
|
1411
|
+
"edit-Variable": string;
|
|
1406
1412
|
"delete-database": string;
|
|
1407
|
-
"enter-
|
|
1413
|
+
"enter-Variable-name": string;
|
|
1408
1414
|
"new-database-set": string;
|
|
1409
1415
|
"clone-database-set": string;
|
|
1410
1416
|
"edit-database-set": string;
|
|
@@ -1724,6 +1730,8 @@ export declare const i18n: import("vue-i18n").I18n<{
|
|
|
1724
1730
|
logic: string;
|
|
1725
1731
|
use_logic: string;
|
|
1726
1732
|
remove_logic: string;
|
|
1733
|
+
state: string;
|
|
1734
|
+
delay: string;
|
|
1727
1735
|
};
|
|
1728
1736
|
}, {}, {}, string, true>;
|
|
1729
1737
|
export declare const raw_i18n: I18n;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { ExecutePair, ExecuteProxy, ExecuteState, FeedBack, Job, Database, Project, Record, Task } from "../../interface";
|
|
2
|
-
export declare
|
|
3
|
-
receivedPack: (model: ExecutePair, record: Record) => boolean;
|
|
4
|
-
}
|
|
2
|
+
export declare const receivedPack: (model: ExecutePair, record: Record) => boolean;
|
|
5
3
|
export declare class Console_Proxy {
|
|
6
4
|
model: ExecutePair;
|
|
7
5
|
constructor(_model: ExecutePair);
|
|
@@ -1,49 +1,47 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Console_Proxy = exports.
|
|
3
|
+
exports.Console_Proxy = exports.receivedPack = void 0;
|
|
4
4
|
const interface_1 = require("../../interface");
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
5
|
+
const receivedPack = (model, record) => {
|
|
6
|
+
const pass = model.manager.Register();
|
|
7
|
+
if (pass == -1) {
|
|
8
|
+
model.record.running = false;
|
|
9
|
+
model.record.stop = true;
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
model.record.projects = record.projects;
|
|
13
|
+
model.record.nodes = record.nodes;
|
|
14
|
+
model.record.project_state = model.record.projects.map(x => {
|
|
15
|
+
return {
|
|
16
|
+
uuid: x.uuid,
|
|
17
|
+
state: interface_1.ExecuteState.NONE
|
|
18
|
+
};
|
|
19
|
+
});
|
|
20
|
+
model.record.project_index = pass;
|
|
21
|
+
model.record.project = record.projects[pass].uuid;
|
|
22
|
+
model.record.task_index = 0;
|
|
23
|
+
model.record.task_state = model.record.projects[0].tasks.map(x => {
|
|
24
|
+
return {
|
|
25
|
+
uuid: x.uuid,
|
|
26
|
+
state: interface_1.ExecuteState.NONE
|
|
27
|
+
};
|
|
28
|
+
});
|
|
29
|
+
model.record.task_state[0].state = interface_1.ExecuteState.RUNNING;
|
|
30
|
+
model.record.task_detail = [];
|
|
31
|
+
const task = model.record.projects[model.record.project_index]?.tasks[model.record.task_index];
|
|
32
|
+
const count = task.cronjob ? (task?.jobs.length ?? 0) : 1;
|
|
33
|
+
for (let i = 0; i < count; i++) {
|
|
34
|
+
model.record.task_detail.push({
|
|
35
|
+
index: i,
|
|
36
|
+
node: "",
|
|
37
|
+
message: [],
|
|
38
|
+
state: interface_1.ExecuteState.NONE
|
|
29
39
|
});
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
model.record.task_detail.push({
|
|
36
|
-
index: i,
|
|
37
|
-
node: "",
|
|
38
|
-
message: [],
|
|
39
|
-
state: interface_1.ExecuteState.NONE
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
model.manager.Update();
|
|
43
|
-
return true;
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
exports.Console_Handler = Console_Handler;
|
|
40
|
+
}
|
|
41
|
+
model.manager.Update();
|
|
42
|
+
return true;
|
|
43
|
+
};
|
|
44
|
+
exports.receivedPack = receivedPack;
|
|
47
45
|
class Console_Proxy {
|
|
48
46
|
model;
|
|
49
47
|
constructor(_model) {
|
package/dist/server/detail.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { BusAnalysis, ExecutePair, ExecuteProxy, ExecuteRecord, ExecuteState, Messager, Preference, Record, ShellFolder, Single, WebsocketPack } from "../interface";
|
|
2
2
|
import { PluginFeedback } from "./server";
|
|
3
3
|
import { MemoryData, RecordIOBase } from './io';
|
|
4
|
-
import { Console_Handler } from './detail/console_handle';
|
|
5
4
|
import { WebsocketManager } from '../script/socket_manager';
|
|
6
5
|
export interface BackendAction {
|
|
7
6
|
memory: MemoryData;
|
|
@@ -32,7 +31,6 @@ export interface ServerDetailEvent {
|
|
|
32
31
|
}
|
|
33
32
|
export declare class ServerDetail {
|
|
34
33
|
execute_manager: Array<ExecutePair>;
|
|
35
|
-
console: Console_Handler;
|
|
36
34
|
websocket_manager: WebsocketManager | undefined;
|
|
37
35
|
shellBind: Map<any, any>;
|
|
38
36
|
loader: RecordIOBase | undefined;
|
package/dist/server/detail.js
CHANGED
|
@@ -9,7 +9,6 @@ const execute_manager_1 = require("../script/execute_manager");
|
|
|
9
9
|
const socket_manager_1 = require("../script/socket_manager");
|
|
10
10
|
class ServerDetail {
|
|
11
11
|
execute_manager = [];
|
|
12
|
-
console;
|
|
13
12
|
websocket_manager;
|
|
14
13
|
shellBind = new Map();
|
|
15
14
|
loader;
|
|
@@ -30,7 +29,6 @@ class ServerDetail {
|
|
|
30
29
|
folderReply: this.folderReply
|
|
31
30
|
};
|
|
32
31
|
this.websocket_manager = new socket_manager_1.WebsocketManager(this.NewConnection, this.DisConnection, this.Analysis, messager_log, n);
|
|
33
|
-
this.console = new console_handle_1.Console_Handler();
|
|
34
32
|
this.updatehandle = setInterval(() => {
|
|
35
33
|
this.re.push(...this.console_update());
|
|
36
34
|
}, interface_1.RENDER_UPDATETICK);
|
|
@@ -272,7 +270,7 @@ class ServerDetail {
|
|
|
272
270
|
const uscp = new console_handle_1.Console_Proxy(p);
|
|
273
271
|
const uslp = new log_handle_1.Log_Proxy(p, { logs: this.backend.memory.logs }, this.backend.GetPreference(uuid));
|
|
274
272
|
em.proxy = this.CombineProxy([uscp.execute_proxy, uslp.execute_proxy]);
|
|
275
|
-
const r =
|
|
273
|
+
const r = (0, console_handle_1.receivedPack)(p, record);
|
|
276
274
|
if (r)
|
|
277
275
|
this.execute_manager.push(p);
|
|
278
276
|
if (socket != undefined) {
|
package/package.json
CHANGED
package/src/interface/execute.ts
CHANGED
package/src/interface/log.ts
CHANGED
|
@@ -33,15 +33,38 @@ export interface Log {
|
|
|
33
33
|
logs: Array<ExecutionLog>
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
/**
|
|
37
|
+
* **Execute Record**
|
|
38
|
+
*/
|
|
36
39
|
export interface Record {
|
|
40
|
+
/**
|
|
41
|
+
* **Project List**\
|
|
42
|
+
* Specified the project list for execution
|
|
43
|
+
*/
|
|
37
44
|
projects: Array<Project>
|
|
45
|
+
/**
|
|
46
|
+
* **Node List**\
|
|
47
|
+
* Specified the node list for execution
|
|
48
|
+
*/
|
|
38
49
|
nodes: Array<Node>
|
|
39
50
|
}
|
|
40
51
|
|
|
41
52
|
export interface ExecuteRecord extends Record {
|
|
53
|
+
/**
|
|
54
|
+
* **Thread ID**
|
|
55
|
+
*/
|
|
42
56
|
uuid: string
|
|
57
|
+
/**
|
|
58
|
+
* **Thread Name**
|
|
59
|
+
*/
|
|
43
60
|
name: string
|
|
61
|
+
/**
|
|
62
|
+
* Is it running right now
|
|
63
|
+
*/
|
|
44
64
|
running: boolean
|
|
65
|
+
/**
|
|
66
|
+
* Is it stop right now
|
|
67
|
+
*/
|
|
45
68
|
stop: boolean
|
|
46
69
|
/**
|
|
47
70
|
* The speicifed the process step type
|
|
@@ -50,12 +73,37 @@ export interface ExecuteRecord extends Record {
|
|
|
50
73
|
* * 2: SIngle task through
|
|
51
74
|
*/
|
|
52
75
|
process_type: number
|
|
76
|
+
/**
|
|
77
|
+
* Database data instance right now
|
|
78
|
+
*/
|
|
53
79
|
para: Database | undefined
|
|
80
|
+
/**
|
|
81
|
+
* **Command buffer**\
|
|
82
|
+
* The internal command which execute at next tick\
|
|
83
|
+
* Such as skip and stop command for execute thread
|
|
84
|
+
*/
|
|
54
85
|
command: Array<Array<any>>
|
|
86
|
+
/**
|
|
87
|
+
* **Project ID**
|
|
88
|
+
*/
|
|
55
89
|
project: string
|
|
90
|
+
/**
|
|
91
|
+
* **Cronjob Mod**\
|
|
92
|
+
* Effect display
|
|
93
|
+
*/
|
|
56
94
|
useCron: boolean
|
|
95
|
+
/**
|
|
96
|
+
* **Task ID**
|
|
97
|
+
*/
|
|
57
98
|
task: string
|
|
99
|
+
/**
|
|
100
|
+
* **Current Project Index**\
|
|
101
|
+
* You can have multiple project
|
|
102
|
+
*/
|
|
58
103
|
project_index: number
|
|
104
|
+
/**
|
|
105
|
+
* **Current Task Index**
|
|
106
|
+
*/
|
|
59
107
|
task_index: number
|
|
60
108
|
project_state: Array<ExecuteData>
|
|
61
109
|
task_state: Array<ExecuteData>
|
package/src/interface/struct.ts
CHANGED
|
@@ -63,45 +63,73 @@ export interface Header {
|
|
|
63
63
|
*/
|
|
64
64
|
name: string
|
|
65
65
|
/**
|
|
66
|
-
*
|
|
66
|
+
* **Where Data Go**\
|
|
67
|
+
* The path to go\
|
|
68
|
+
* You might go to cluster and send to node children\
|
|
69
|
+
* This data specified the IP path\
|
|
70
|
+
* If undefined, it means it's destinations
|
|
71
|
+
* @example Use Space to seperate
|
|
72
|
+
* "192.168.10.1:50 192.168.10.7:8052"
|
|
73
|
+
*/
|
|
74
|
+
destinations?: string
|
|
75
|
+
/**
|
|
76
|
+
* **Token Session**\
|
|
77
|
+
* Some request require token to access
|
|
67
78
|
*/
|
|
68
79
|
token?: string
|
|
69
80
|
/**
|
|
70
|
-
* Extra
|
|
81
|
+
* **Extra Metadata**
|
|
71
82
|
*/
|
|
72
83
|
meta?: string
|
|
73
84
|
/**
|
|
74
|
-
* Print
|
|
85
|
+
* **Print Message**
|
|
75
86
|
*/
|
|
76
87
|
message?: string
|
|
77
88
|
/**
|
|
78
|
-
* Resource channel
|
|
89
|
+
* **Resource channel**
|
|
79
90
|
*/
|
|
80
91
|
channel?:string
|
|
81
92
|
/**
|
|
82
|
-
*
|
|
93
|
+
* **TData Content**\
|
|
94
|
+
* The content of the websocket package\
|
|
95
|
+
* Put everything you want to send in here
|
|
83
96
|
*/
|
|
84
97
|
data?: any
|
|
85
98
|
}
|
|
86
99
|
|
|
100
|
+
/**
|
|
101
|
+
* **Data Format: Single Data**
|
|
102
|
+
*/
|
|
87
103
|
export interface Single {
|
|
88
104
|
data: any
|
|
89
105
|
}
|
|
90
106
|
|
|
107
|
+
/**
|
|
108
|
+
* **Data Format: Path Data**
|
|
109
|
+
*/
|
|
91
110
|
export interface OnePath {
|
|
92
111
|
path: string
|
|
93
112
|
}
|
|
94
113
|
|
|
114
|
+
/**
|
|
115
|
+
* **Data Format: Arrow Path**
|
|
116
|
+
*/
|
|
95
117
|
export interface TwoPath {
|
|
96
118
|
from: string
|
|
97
119
|
to: string
|
|
98
120
|
}
|
|
99
121
|
|
|
122
|
+
/**
|
|
123
|
+
* **Data Format: Map Setter**
|
|
124
|
+
*/
|
|
100
125
|
export interface Setter {
|
|
101
126
|
key: string
|
|
102
127
|
value: any
|
|
103
128
|
}
|
|
104
129
|
|
|
130
|
+
/**
|
|
131
|
+
* **Data Format: Feedback**
|
|
132
|
+
*/
|
|
105
133
|
export interface FeedBack {
|
|
106
134
|
node_uuid?: string
|
|
107
135
|
index?: number
|
|
@@ -111,11 +139,17 @@ export interface FeedBack {
|
|
|
111
139
|
message: string
|
|
112
140
|
}
|
|
113
141
|
|
|
142
|
+
/**
|
|
143
|
+
* **Data Format: KeyValue**
|
|
144
|
+
*/
|
|
114
145
|
export interface KeyValue {
|
|
115
146
|
key: any
|
|
116
147
|
value: any
|
|
117
148
|
}
|
|
118
149
|
|
|
150
|
+
/**
|
|
151
|
+
* **Data Format: JWT Info**
|
|
152
|
+
*/
|
|
119
153
|
export interface JWT {
|
|
120
154
|
user: string
|
|
121
155
|
create: number
|
package/src/lan/en.json
CHANGED
|
@@ -103,14 +103,14 @@
|
|
|
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-
|
|
106
|
+
"new-Variable": "New Variable",
|
|
107
|
+
"edit-Variable": "Modify Variable",
|
|
108
108
|
"delete-database": "Delete Database",
|
|
109
|
-
"enter-
|
|
110
|
-
"new-database-set": "New Database
|
|
111
|
-
"clone-database-set": "Clone Database
|
|
112
|
-
"edit-database-set": "Modify Database
|
|
113
|
-
"enter-database-set-name": "Enter Database
|
|
109
|
+
"enter-Variable-name": "Enter Variable Name",
|
|
110
|
+
"new-database-set": "New Database",
|
|
111
|
+
"clone-database-set": "Clone Database",
|
|
112
|
+
"edit-database-set": "Modify Database",
|
|
113
|
+
"enter-database-set-name": "Enter Database Name",
|
|
114
114
|
"import-database": "Delete Database",
|
|
115
115
|
"delete-database-confirm": "Are you sure delete database you selected",
|
|
116
116
|
"database-datatype": "Datatype",
|
|
@@ -425,5 +425,7 @@
|
|
|
425
425
|
"goback": "Go Back",
|
|
426
426
|
"logic": "Logic",
|
|
427
427
|
"use_logic": "Use Logic",
|
|
428
|
-
"remove_logic": "Remove Logic"
|
|
428
|
+
"remove_logic": "Remove Logic",
|
|
429
|
+
"state": "State",
|
|
430
|
+
"delay": "Delay"
|
|
429
431
|
}
|
package/src/lan/zh_TW.json
CHANGED
|
@@ -103,14 +103,14 @@
|
|
|
103
103
|
"enter-task-name": "輸入流程名稱",
|
|
104
104
|
"enter-task-description": "輸入流程敘述",
|
|
105
105
|
"new-job": "新增工作",
|
|
106
|
-
"new-
|
|
107
|
-
"edit-
|
|
106
|
+
"new-Variable": "新增數據",
|
|
107
|
+
"edit-Variable": "編輯數據",
|
|
108
108
|
"delete-database": "刪除資料庫",
|
|
109
|
-
"enter-
|
|
110
|
-
"new-database-set": "
|
|
111
|
-
"clone-database-set": "
|
|
112
|
-
"edit-database-set": "
|
|
113
|
-
"enter-database-set-name": "
|
|
109
|
+
"enter-Variable-name": "輸入數據名稱",
|
|
110
|
+
"new-database-set": "新增資料庫",
|
|
111
|
+
"clone-database-set": "複製資料庫",
|
|
112
|
+
"edit-database-set": "編輯資料庫",
|
|
113
|
+
"enter-database-set-name": "輸入資料庫名稱",
|
|
114
114
|
"import-database": "刪除資料庫",
|
|
115
115
|
"delete-database-confirm": "確認刪除選擇資料庫嗎?",
|
|
116
116
|
"database-datatype": "資料型態",
|
|
@@ -425,5 +425,7 @@
|
|
|
425
425
|
"goback": "返回",
|
|
426
426
|
"logic": "邏輯",
|
|
427
427
|
"use_logic": "套用邏輯",
|
|
428
|
-
"remove_logic": "刪除邏輯"
|
|
428
|
+
"remove_logic": "刪除邏輯",
|
|
429
|
+
"state": "狀態",
|
|
430
|
+
"delay": "延遲"
|
|
429
431
|
}
|
|
@@ -1,48 +1,53 @@
|
|
|
1
1
|
import { ConditionResult, ExecutePair, ExecuteProxy, ExecuteRecordTask, ExecuteState, FeedBack, Job, JobCategory, MESSAGE_LIMIT, Database, Project, Record, Task } from "../../interface"
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
/**
|
|
4
|
+
* The method to handle the init package {@link ExecutePair} process
|
|
5
|
+
*/
|
|
6
|
+
export const receivedPack = (model:ExecutePair, record:Record):boolean => {
|
|
7
|
+
const pass = model.manager!.Register()
|
|
8
|
+
if(pass == -1){
|
|
9
|
+
model.record!.running = false
|
|
10
|
+
model.record!.stop = true
|
|
11
|
+
return false
|
|
12
|
+
}
|
|
13
|
+
model.record!.projects = record.projects
|
|
14
|
+
model.record!.nodes = record.nodes
|
|
15
|
+
model.record!.project_state = model.record!.projects.map(x => {
|
|
16
|
+
return {
|
|
17
|
+
uuid: x.uuid,
|
|
18
|
+
state: ExecuteState.NONE
|
|
11
19
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
model.record!.project_index = pass
|
|
21
|
-
model.record!.project = record.projects[pass].uuid
|
|
22
|
-
model.record!.task_index = 0
|
|
23
|
-
model.record!.task_state = model.record!.projects[0].tasks.map(x => {
|
|
24
|
-
return {
|
|
25
|
-
uuid: x.uuid,
|
|
26
|
-
state: ExecuteState.NONE
|
|
27
|
-
}
|
|
28
|
-
})
|
|
29
|
-
model.record!.task_state[0].state = ExecuteState.RUNNING
|
|
30
|
-
model.record!.task_detail = []
|
|
31
|
-
const task = model.record!.projects[model.record!.project_index]?.tasks[model.record!.task_index]
|
|
32
|
-
const count = task.cronjob ? (task?.jobs.length ?? 0) : 1
|
|
33
|
-
for(let i = 0; i < count; i++){
|
|
34
|
-
model.record!.task_detail.push({
|
|
35
|
-
index: i,
|
|
36
|
-
node: "",
|
|
37
|
-
message: [],
|
|
38
|
-
state: ExecuteState.NONE
|
|
39
|
-
})
|
|
20
|
+
})
|
|
21
|
+
model.record!.project_index = pass
|
|
22
|
+
model.record!.project = record.projects[pass].uuid
|
|
23
|
+
model.record!.task_index = 0
|
|
24
|
+
model.record!.task_state = model.record!.projects[0].tasks.map(x => {
|
|
25
|
+
return {
|
|
26
|
+
uuid: x.uuid,
|
|
27
|
+
state: ExecuteState.NONE
|
|
40
28
|
}
|
|
41
|
-
|
|
42
|
-
|
|
29
|
+
})
|
|
30
|
+
model.record!.task_state[0].state = ExecuteState.RUNNING
|
|
31
|
+
model.record!.task_detail = []
|
|
32
|
+
const task = model.record!.projects[model.record!.project_index]?.tasks[model.record!.task_index]
|
|
33
|
+
const count = task.cronjob ? (task?.jobs.length ?? 0) : 1
|
|
34
|
+
for(let i = 0; i < count; i++){
|
|
35
|
+
model.record!.task_detail.push({
|
|
36
|
+
index: i,
|
|
37
|
+
node: "",
|
|
38
|
+
message: [],
|
|
39
|
+
state: ExecuteState.NONE
|
|
40
|
+
})
|
|
43
41
|
}
|
|
42
|
+
model.manager!.Update()
|
|
43
|
+
return true
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
/**
|
|
47
|
+
* **Console Proxy Worker**\
|
|
48
|
+
* Process thread call proxy and throght {@link Console_Proxy.execute_proxy}\
|
|
49
|
+
* To communicate with outside record data
|
|
50
|
+
*/
|
|
46
51
|
export class Console_Proxy {
|
|
47
52
|
model:ExecutePair
|
|
48
53
|
|
|
@@ -2,6 +2,11 @@ import { v6 as uuid6 } from 'uuid'
|
|
|
2
2
|
import { ConditionResult, ExecutePair, ExecuteProxy, ExecuteRecordTask, ExecuteState, ExecutionLog, FeedBack, Job, JobCategory, Log, Database, Preference, Project, Task } from "../../interface"
|
|
3
3
|
import * as fs from 'fs'
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* **Log Proxy Worker**\
|
|
7
|
+
* Process thread call proxy and throght {@link Log_Proxy.execute_proxy}\
|
|
8
|
+
* To communicate with outside record data
|
|
9
|
+
*/
|
|
5
10
|
export class Log_Proxy {
|
|
6
11
|
model:ExecutePair
|
|
7
12
|
logs:Log
|
package/src/server/detail.ts
CHANGED
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
} from "../interface"
|
|
28
28
|
import { PluginFeedback } from "./server"
|
|
29
29
|
import { MemoryData, RecordIOBase } from './io'
|
|
30
|
-
import {
|
|
30
|
+
import { receivedPack, Console_Proxy } from './detail/console_handle'
|
|
31
31
|
import { Log_Proxy } from './detail/log_handle'
|
|
32
32
|
import { ExecuteManager } from '../script/execute_manager'
|
|
33
33
|
import { WebsocketManager } from '../script/socket_manager'
|
|
@@ -72,7 +72,6 @@ export interface ServerDetailEvent {
|
|
|
72
72
|
*/
|
|
73
73
|
export class ServerDetail {
|
|
74
74
|
execute_manager: Array<ExecutePair> = []
|
|
75
|
-
console:Console_Handler
|
|
76
75
|
websocket_manager: WebsocketManager | undefined
|
|
77
76
|
|
|
78
77
|
shellBind = new Map()
|
|
@@ -105,7 +104,6 @@ export class ServerDetail {
|
|
|
105
104
|
folderReply: this.folderReply
|
|
106
105
|
}
|
|
107
106
|
this.websocket_manager = new WebsocketManager(this.NewConnection, this.DisConnection, this.Analysis, messager_log, n)
|
|
108
|
-
this.console = new Console_Handler()
|
|
109
107
|
// Internal update clock
|
|
110
108
|
this.updatehandle = setInterval(() => {
|
|
111
109
|
this.re.push(...this.console_update())
|
|
@@ -382,7 +380,7 @@ export class ServerDetail {
|
|
|
382
380
|
const uscp:Console_Proxy = new Console_Proxy(p)
|
|
383
381
|
const uslp:Log_Proxy = new Log_Proxy(p, { logs: this.backend.memory.logs }, this.backend.GetPreference(uuid)!)
|
|
384
382
|
em.proxy = this.CombineProxy([uscp.execute_proxy, uslp.execute_proxy])
|
|
385
|
-
const r =
|
|
383
|
+
const r = receivedPack(p, record)
|
|
386
384
|
if(r) this.execute_manager.push(p)
|
|
387
385
|
|
|
388
386
|
if(socket != undefined){
|