verteilen-core 1.3.17 → 1.3.19
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/base.d.ts +2 -0
- package/dist/interface/base.js +2 -0
- package/dist/lan/en.json +6 -1
- package/dist/lan/zh_TW.json +6 -1
- package/dist/plugins/i18n.d.ts +20 -0
- package/dist/server/module/project.d.ts +4 -3
- package/dist/server/module/project.js +21 -15
- package/package.json +1 -1
- package/src/interface/base.ts +4 -0
- package/src/lan/en.json +6 -1
- package/src/lan/zh_TW.json +6 -1
- package/src/server/module/project.ts +20 -13
package/dist/interface/base.d.ts
CHANGED
package/dist/interface/base.js
CHANGED
package/dist/lan/en.json
CHANGED
|
@@ -133,6 +133,8 @@
|
|
|
133
133
|
"delete-template": "Delete Template",
|
|
134
134
|
"delete-plugin-confirm": "Are you sure delete plugin you selected",
|
|
135
135
|
"delete-template-confirm": "Are you sure delete template you selected",
|
|
136
|
+
"job-title": "Job Title",
|
|
137
|
+
"job-description": "Job Description",
|
|
136
138
|
"delete-job": "Delete Job",
|
|
137
139
|
"delete-job-confirm": "Are you sure you want to delete this job?",
|
|
138
140
|
"delete-task": "Delete Task",
|
|
@@ -412,5 +414,8 @@
|
|
|
412
414
|
"no": "No",
|
|
413
415
|
"next": "Next",
|
|
414
416
|
"previous": "Previous",
|
|
415
|
-
"goback": "Go Back"
|
|
417
|
+
"goback": "Go Back",
|
|
418
|
+
"logic": "Logic",
|
|
419
|
+
"use_logic": "Use Logic",
|
|
420
|
+
"remove_logic": "Remove Logic"
|
|
416
421
|
}
|
package/dist/lan/zh_TW.json
CHANGED
|
@@ -133,6 +133,8 @@
|
|
|
133
133
|
"delete-template": "刪除樣板",
|
|
134
134
|
"delete-plugin-confirm": "確定刪除選取的插件嗎?",
|
|
135
135
|
"delete-template-confirm": "確定刪除選取的樣板嗎?",
|
|
136
|
+
"job-title": "工作標題",
|
|
137
|
+
"job-description": "工作敘述",
|
|
136
138
|
"delete-job": "刪除工作",
|
|
137
139
|
"delete-job-confirm": "確定刪除選取的工作嗎?",
|
|
138
140
|
"delete-task": "刪除流程",
|
|
@@ -412,5 +414,8 @@
|
|
|
412
414
|
"no": "否",
|
|
413
415
|
"next": "下一步",
|
|
414
416
|
"previous": "上一歩",
|
|
415
|
-
"goback": "返回"
|
|
417
|
+
"goback": "返回",
|
|
418
|
+
"logic": "邏輯",
|
|
419
|
+
"use_logic": "套用邏輯",
|
|
420
|
+
"remove_logic": "刪除邏輯"
|
|
416
421
|
}
|
package/dist/plugins/i18n.d.ts
CHANGED
|
@@ -141,6 +141,8 @@ export declare const i18nDefaultData: {
|
|
|
141
141
|
"delete-template": string;
|
|
142
142
|
"delete-plugin-confirm": string;
|
|
143
143
|
"delete-template-confirm": string;
|
|
144
|
+
"job-title": string;
|
|
145
|
+
"job-description": string;
|
|
144
146
|
"delete-job": string;
|
|
145
147
|
"delete-job-confirm": string;
|
|
146
148
|
"delete-task": string;
|
|
@@ -421,6 +423,9 @@ export declare const i18nDefaultData: {
|
|
|
421
423
|
next: string;
|
|
422
424
|
previous: string;
|
|
423
425
|
goback: string;
|
|
426
|
+
logic: string;
|
|
427
|
+
use_logic: string;
|
|
428
|
+
remove_logic: string;
|
|
424
429
|
};
|
|
425
430
|
zh_TW: {
|
|
426
431
|
login: {
|
|
@@ -557,6 +562,8 @@ export declare const i18nDefaultData: {
|
|
|
557
562
|
"delete-template": string;
|
|
558
563
|
"delete-plugin-confirm": string;
|
|
559
564
|
"delete-template-confirm": string;
|
|
565
|
+
"job-title": string;
|
|
566
|
+
"job-description": string;
|
|
560
567
|
"delete-job": string;
|
|
561
568
|
"delete-job-confirm": string;
|
|
562
569
|
"delete-task": string;
|
|
@@ -837,6 +844,9 @@ export declare const i18nDefaultData: {
|
|
|
837
844
|
next: string;
|
|
838
845
|
previous: string;
|
|
839
846
|
goback: string;
|
|
847
|
+
logic: string;
|
|
848
|
+
use_logic: string;
|
|
849
|
+
remove_logic: string;
|
|
840
850
|
};
|
|
841
851
|
};
|
|
842
852
|
};
|
|
@@ -976,6 +986,8 @@ export declare const i18n: import("vue-i18n").I18n<{
|
|
|
976
986
|
"delete-template": string;
|
|
977
987
|
"delete-plugin-confirm": string;
|
|
978
988
|
"delete-template-confirm": string;
|
|
989
|
+
"job-title": string;
|
|
990
|
+
"job-description": string;
|
|
979
991
|
"delete-job": string;
|
|
980
992
|
"delete-job-confirm": string;
|
|
981
993
|
"delete-task": string;
|
|
@@ -1256,6 +1268,9 @@ export declare const i18n: import("vue-i18n").I18n<{
|
|
|
1256
1268
|
next: string;
|
|
1257
1269
|
previous: string;
|
|
1258
1270
|
goback: string;
|
|
1271
|
+
logic: string;
|
|
1272
|
+
use_logic: string;
|
|
1273
|
+
remove_logic: string;
|
|
1259
1274
|
};
|
|
1260
1275
|
zh_TW: {
|
|
1261
1276
|
login: {
|
|
@@ -1392,6 +1407,8 @@ export declare const i18n: import("vue-i18n").I18n<{
|
|
|
1392
1407
|
"delete-template": string;
|
|
1393
1408
|
"delete-plugin-confirm": string;
|
|
1394
1409
|
"delete-template-confirm": string;
|
|
1410
|
+
"job-title": string;
|
|
1411
|
+
"job-description": string;
|
|
1395
1412
|
"delete-job": string;
|
|
1396
1413
|
"delete-job-confirm": string;
|
|
1397
1414
|
"delete-task": string;
|
|
@@ -1672,6 +1689,9 @@ export declare const i18n: import("vue-i18n").I18n<{
|
|
|
1672
1689
|
next: string;
|
|
1673
1690
|
previous: string;
|
|
1674
1691
|
goback: string;
|
|
1692
|
+
logic: string;
|
|
1693
|
+
use_logic: string;
|
|
1694
|
+
remove_logic: string;
|
|
1675
1695
|
};
|
|
1676
1696
|
}, {}, {}, string, true>;
|
|
1677
1697
|
export declare const raw_i18n: I18n;
|
|
@@ -6,9 +6,10 @@ export declare class Project_Module {
|
|
|
6
6
|
constructor(memory: Server);
|
|
7
7
|
get memory(): MemoryData;
|
|
8
8
|
get loader(): RecordLoader;
|
|
9
|
-
ProjectJobCount(uuid: string): number
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
ProjectJobCount(uuid: string): Promise<number>;
|
|
10
|
+
ReOrderProjectTask(uuid: string, uuids: Array<string>): Promise<void>;
|
|
11
|
+
PopulateProject(uuid: string): Promise<Project | undefined>;
|
|
12
|
+
PopulateTask(uuid: string): Promise<Task | undefined>;
|
|
12
13
|
GetProjectRelatedTask(uuid: string): Promise<Array<Task>>;
|
|
13
14
|
GetTaskRelatedJob(uuid: string): Promise<Array<Job>>;
|
|
14
15
|
CloneProjects(uuids: Array<string>): Promise<Array<string>>;
|
|
@@ -9,7 +9,8 @@ class Project_Module {
|
|
|
9
9
|
}
|
|
10
10
|
get memory() { return this.server.memory; }
|
|
11
11
|
get loader() { return this.server.current_loader; }
|
|
12
|
-
ProjectJobCount(uuid) {
|
|
12
|
+
async ProjectJobCount(uuid) {
|
|
13
|
+
await this.loader.project.load(uuid, true);
|
|
13
14
|
const p = this.memory.projects.find(p => p.uuid == uuid);
|
|
14
15
|
if (!p)
|
|
15
16
|
return 0;
|
|
@@ -17,30 +18,35 @@ class Project_Module {
|
|
|
17
18
|
const counts = t.map(x => x.jobs_uuid.length);
|
|
18
19
|
return counts.reduce((a, b) => a + b, 0);
|
|
19
20
|
}
|
|
20
|
-
|
|
21
|
+
async ReOrderProjectTask(uuid, uuids) {
|
|
22
|
+
await this.loader.project.load(uuid, true);
|
|
23
|
+
const p = this.memory.projects.find(p => p.uuid == uuid);
|
|
24
|
+
if (!p)
|
|
25
|
+
return;
|
|
26
|
+
p.tasks_uuid = uuids;
|
|
27
|
+
this.loader.project.save(uuid, JSON.stringify(p, null, 4));
|
|
28
|
+
}
|
|
29
|
+
async PopulateProject(uuid) {
|
|
30
|
+
await this.loader.project.load(uuid, true);
|
|
21
31
|
const p = this.memory.projects.find(p => p.uuid == uuid);
|
|
22
32
|
if (!p)
|
|
23
33
|
return undefined;
|
|
24
34
|
const buffer = Object.assign({}, p);
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
if (!t)
|
|
28
|
-
return undefined;
|
|
29
|
-
buffer.tasks.push(t);
|
|
30
|
-
}
|
|
35
|
+
const ts = buffer.tasks_uuid.map(x => this.PopulateTask(x));
|
|
36
|
+
buffer.tasks = (await Promise.all(ts)).filter(x => x != undefined);
|
|
31
37
|
return buffer;
|
|
32
38
|
}
|
|
33
|
-
PopulateTask(uuid) {
|
|
39
|
+
async PopulateTask(uuid) {
|
|
40
|
+
await this.loader.task.load(uuid, true);
|
|
34
41
|
const p = this.memory.tasks.find(p => p.uuid == uuid);
|
|
35
42
|
if (!p)
|
|
36
43
|
return undefined;
|
|
37
44
|
const buffer = Object.assign({}, p);
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
45
|
+
const js = buffer.jobs_uuid.map(async (x) => {
|
|
46
|
+
await this.loader.job.load(uuid, true);
|
|
47
|
+
return this.memory.jobs.find(t => t.uuid == x);
|
|
48
|
+
});
|
|
49
|
+
buffer.jobs = (await Promise.all(js)).filter(x => x != undefined);
|
|
44
50
|
return buffer;
|
|
45
51
|
}
|
|
46
52
|
async GetProjectRelatedTask(uuid) {
|
package/package.json
CHANGED
package/src/interface/base.ts
CHANGED
|
@@ -154,6 +154,8 @@ export interface Job extends DataHeader {
|
|
|
154
154
|
* Database will store in the array.
|
|
155
155
|
*/
|
|
156
156
|
index?:number
|
|
157
|
+
title: string
|
|
158
|
+
description: string
|
|
157
159
|
/**
|
|
158
160
|
* **Extra data**\
|
|
159
161
|
* The extra metadata, just in case
|
|
@@ -437,6 +439,8 @@ export const CreateDefaultTask = () : Task => {
|
|
|
437
439
|
export const CreateDefaultJob = () : Job => {
|
|
438
440
|
return {
|
|
439
441
|
uuid: uuidv6(),
|
|
442
|
+
title: "",
|
|
443
|
+
description: "",
|
|
440
444
|
category: JobCategory.Execution,
|
|
441
445
|
type: JobType.JAVASCRIPT,
|
|
442
446
|
script: "",
|
package/src/lan/en.json
CHANGED
|
@@ -133,6 +133,8 @@
|
|
|
133
133
|
"delete-template": "Delete Template",
|
|
134
134
|
"delete-plugin-confirm": "Are you sure delete plugin you selected",
|
|
135
135
|
"delete-template-confirm": "Are you sure delete template you selected",
|
|
136
|
+
"job-title": "Job Title",
|
|
137
|
+
"job-description": "Job Description",
|
|
136
138
|
"delete-job": "Delete Job",
|
|
137
139
|
"delete-job-confirm": "Are you sure you want to delete this job?",
|
|
138
140
|
"delete-task": "Delete Task",
|
|
@@ -412,5 +414,8 @@
|
|
|
412
414
|
"no": "No",
|
|
413
415
|
"next": "Next",
|
|
414
416
|
"previous": "Previous",
|
|
415
|
-
"goback": "Go Back"
|
|
417
|
+
"goback": "Go Back",
|
|
418
|
+
"logic": "Logic",
|
|
419
|
+
"use_logic": "Use Logic",
|
|
420
|
+
"remove_logic": "Remove Logic"
|
|
416
421
|
}
|
package/src/lan/zh_TW.json
CHANGED
|
@@ -133,6 +133,8 @@
|
|
|
133
133
|
"delete-template": "刪除樣板",
|
|
134
134
|
"delete-plugin-confirm": "確定刪除選取的插件嗎?",
|
|
135
135
|
"delete-template-confirm": "確定刪除選取的樣板嗎?",
|
|
136
|
+
"job-title": "工作標題",
|
|
137
|
+
"job-description": "工作敘述",
|
|
136
138
|
"delete-job": "刪除工作",
|
|
137
139
|
"delete-job-confirm": "確定刪除選取的工作嗎?",
|
|
138
140
|
"delete-task": "刪除流程",
|
|
@@ -412,5 +414,8 @@
|
|
|
412
414
|
"no": "否",
|
|
413
415
|
"next": "下一步",
|
|
414
416
|
"previous": "上一歩",
|
|
415
|
-
"goback": "返回"
|
|
417
|
+
"goback": "返回",
|
|
418
|
+
"logic": "邏輯",
|
|
419
|
+
"use_logic": "套用邏輯",
|
|
420
|
+
"remove_logic": "刪除邏輯"
|
|
416
421
|
}
|
|
@@ -18,42 +18,49 @@ export class Project_Module {
|
|
|
18
18
|
public get memory(): MemoryData { return this.server.memory }
|
|
19
19
|
public get loader(): RecordLoader { return this.server.current_loader }
|
|
20
20
|
|
|
21
|
-
ProjectJobCount(uuid:string):number {
|
|
21
|
+
async ProjectJobCount(uuid:string):Promise<number> {
|
|
22
|
+
await this.loader.project.load(uuid, true)
|
|
22
23
|
const p:Project | undefined = this.memory.projects.find(p=> p.uuid == uuid)
|
|
23
24
|
if(!p) return 0
|
|
24
25
|
const t:Array<Task> = p.tasks_uuid.map(t_uuid => this.memory.tasks.find(t => t.uuid == t_uuid)).filter(t => t != undefined)
|
|
25
26
|
const counts = t.map(x => x.jobs_uuid.length)
|
|
26
27
|
return counts.reduce((a,b) => a + b, 0)
|
|
27
28
|
}
|
|
29
|
+
async ReOrderProjectTask(uuid:string, uuids:Array<string>):Promise<void> {
|
|
30
|
+
await this.loader.project.load(uuid, true)
|
|
31
|
+
const p:Project | undefined = this.memory.projects.find(p=> p.uuid == uuid)
|
|
32
|
+
if(!p) return
|
|
33
|
+
p.tasks_uuid = uuids
|
|
34
|
+
this.loader.project.save(uuid, JSON.stringify(p, null, 4))
|
|
35
|
+
}
|
|
28
36
|
|
|
29
37
|
/**
|
|
30
38
|
* Assign real data to instance
|
|
31
39
|
* @param uuid Project UUID
|
|
32
40
|
*/
|
|
33
|
-
PopulateProject(uuid:string):Project | undefined {
|
|
41
|
+
async PopulateProject(uuid:string):Promise<Project | undefined> {
|
|
42
|
+
await this.loader.project.load(uuid, true)
|
|
34
43
|
const p:Project | undefined = this.memory.projects.find(p=> p.uuid == uuid)
|
|
35
44
|
if(!p) return undefined
|
|
36
45
|
const buffer:Project = Object.assign({}, p) as Project
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
if(!t) return undefined
|
|
40
|
-
buffer.tasks.push(t)
|
|
41
|
-
}
|
|
46
|
+
const ts = buffer.tasks_uuid.map(x => this.PopulateTask(x))
|
|
47
|
+
buffer.tasks = (await Promise.all(ts)).filter(x => x != undefined)
|
|
42
48
|
return buffer
|
|
43
49
|
}
|
|
44
50
|
/**
|
|
45
51
|
* Assign real data to instance
|
|
46
52
|
* @param uuid Task UUID
|
|
47
53
|
*/
|
|
48
|
-
PopulateTask(uuid:string):Task | undefined {
|
|
54
|
+
async PopulateTask(uuid:string):Promise<Task | undefined> {
|
|
55
|
+
await this.loader.task.load(uuid, true)
|
|
49
56
|
const p:Task | undefined = this.memory.tasks.find(p=> p.uuid == uuid)
|
|
50
57
|
if(!p) return undefined
|
|
51
58
|
const buffer:Task = Object.assign({}, p) as Task
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
59
|
+
const js = buffer.jobs_uuid.map(async x => {
|
|
60
|
+
await this.loader.job.load(uuid, true)
|
|
61
|
+
return this.memory.jobs.find(t => t.uuid == x)
|
|
62
|
+
})
|
|
63
|
+
buffer.jobs = (await Promise.all(js)).filter(x => x != undefined)
|
|
57
64
|
return buffer
|
|
58
65
|
}
|
|
59
66
|
/**
|