verteilen-core 1.3.21 → 1.3.23
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/client/analysis.js +6 -8
- package/dist/client/client.d.ts +2 -2
- package/dist/client/client.js +1 -1
- package/dist/client/job_execute.d.ts +2 -2
- package/dist/interface/base.d.ts +9 -6
- package/dist/interface/base.js +10 -1
- package/dist/interface/bus.d.ts +2 -5
- package/dist/interface/execute.d.ts +1 -1
- package/dist/interface/log.d.ts +51 -0
- package/dist/interface/log.js +2 -0
- package/dist/interface/plugin.d.ts +79 -0
- package/dist/interface/plugin.js +2 -0
- package/dist/interface/record.d.ts +0 -49
- package/dist/interface/struct.d.ts +2 -80
- package/dist/interface/table.d.ts +2 -1
- package/dist/interface.d.ts +4 -2
- package/dist/interface.js +4 -2
- package/dist/lan/en.json +7 -2
- package/dist/lan/zh_TW.json +7 -2
- package/dist/plugins/i18n.d.ts +20 -0
- package/dist/server/detail/console_handle.d.ts +20 -0
- package/dist/server/detail/console_handle.js +244 -0
- package/dist/server/detail/log_handle.d.ts +23 -0
- package/dist/server/detail/log_handle.js +224 -0
- package/dist/server/detail.d.ts +6 -4
- package/dist/server/detail.js +54 -52
- package/dist/server/plugin.d.ts +3 -5
- package/dist/server/plugin.js +68 -158
- package/dist/server/server.js +0 -1
- package/package.json +1 -1
- package/src/client/analysis.ts +10 -12
- package/src/client/client.ts +3 -3
- package/src/client/cluster.ts +2 -2
- package/src/client/job_execute.ts +3 -3
- package/src/interface/base.ts +19 -7
- package/src/interface/bus.ts +2 -5
- package/src/interface/execute.ts +1 -1
- package/src/interface/log.ts +63 -0
- package/src/interface/plugin.ts +247 -0
- package/src/interface/record.ts +0 -62
- package/src/interface/struct.ts +2 -112
- package/src/interface/table.ts +2 -1
- package/src/interface.ts +4 -2
- package/src/lan/en.json +7 -2
- package/src/lan/zh_TW.json +7 -2
- package/src/{util → server/detail}/console_handle.ts +3 -3
- package/src/{util → server/detail}/log_handle.ts +2 -2
- package/src/server/detail.ts +74 -60
- package/src/server/io.ts +3 -0
- package/src/server/plugin.ts +118 -166
- package/src/server/server.ts +0 -1
package/src/interface/base.ts
CHANGED
|
@@ -17,12 +17,15 @@ export interface DatabaseConfigTrigger {
|
|
|
17
17
|
/**
|
|
18
18
|
* Storable Data Header
|
|
19
19
|
*/
|
|
20
|
-
export interface DataHeader{
|
|
20
|
+
export interface DataHeader {
|
|
21
21
|
/**
|
|
22
22
|
* **ID**\
|
|
23
23
|
* Contains 36 characters
|
|
24
24
|
*/
|
|
25
25
|
uuid: string
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface DataTime {
|
|
26
29
|
createDate?: string
|
|
27
30
|
updateDate?: string
|
|
28
31
|
}
|
|
@@ -67,7 +70,7 @@ export interface Property {
|
|
|
67
70
|
/**
|
|
68
71
|
* **Background Service Container**
|
|
69
72
|
*/
|
|
70
|
-
export interface Service extends DataHeader {
|
|
73
|
+
export interface Service extends DataHeader, DataTime {
|
|
71
74
|
/**
|
|
72
75
|
* **Service Name**\
|
|
73
76
|
* The name of the task
|
|
@@ -124,7 +127,7 @@ export interface Service extends DataHeader {
|
|
|
124
127
|
* **Data Database Bank**\
|
|
125
128
|
* Store the data which will be reference in the execute stage
|
|
126
129
|
*/
|
|
127
|
-
export interface Database extends DataHeader {
|
|
130
|
+
export interface Database extends DataHeader, DataTime {
|
|
128
131
|
title: string
|
|
129
132
|
canWrite: boolean
|
|
130
133
|
containers: Array<DatabaseContainer>
|
|
@@ -146,7 +149,7 @@ export interface Database extends DataHeader {
|
|
|
146
149
|
* Specifed the command, which show how does user want these compute to do\
|
|
147
150
|
* Contains different arguments list, which could reference to database value
|
|
148
151
|
*/
|
|
149
|
-
export interface Job extends DataHeader {
|
|
152
|
+
export interface Job extends DataHeader, DataTime {
|
|
150
153
|
/**
|
|
151
154
|
* **Order**\
|
|
152
155
|
* Define the order in the list\
|
|
@@ -301,7 +304,7 @@ export interface TaskOption {
|
|
|
301
304
|
* **Task Container**\
|
|
302
305
|
* Specified different stage of the compute process
|
|
303
306
|
*/
|
|
304
|
-
export interface Task extends DataHeader, TaskBase, TaskOption {
|
|
307
|
+
export interface Task extends DataHeader, DataTime, TaskBase, TaskOption {
|
|
305
308
|
/**
|
|
306
309
|
* **Local Permission**\
|
|
307
310
|
* Client-side only permission field\
|
|
@@ -320,7 +323,7 @@ export interface Task extends DataHeader, TaskBase, TaskOption {
|
|
|
320
323
|
* It has reference to database And contains multiple task\
|
|
321
324
|
* We grab this container structure to execute queue to execute one by one
|
|
322
325
|
*/
|
|
323
|
-
export interface Project extends DataHeader {
|
|
326
|
+
export interface Project extends DataHeader, DataTime {
|
|
324
327
|
/**
|
|
325
328
|
* **User ID**\
|
|
326
329
|
* Who own this project\
|
|
@@ -377,7 +380,7 @@ export interface Project extends DataHeader {
|
|
|
377
380
|
* In the execute stage, it will needs nodes to compute the task\
|
|
378
381
|
* Which specified in this type of structure
|
|
379
382
|
*/
|
|
380
|
-
export interface Node extends DataHeader {
|
|
383
|
+
export interface Node extends DataHeader, DataTime {
|
|
381
384
|
/**
|
|
382
385
|
* **Cluster Mode**\
|
|
383
386
|
* Check if the node is cluster\
|
|
@@ -449,4 +452,13 @@ export const CreateDefaultJob = () : Job => {
|
|
|
449
452
|
boolean_args: [],
|
|
450
453
|
id_args: [],
|
|
451
454
|
}
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
export const CreateDefaultDatabase = () : Database => {
|
|
458
|
+
return {
|
|
459
|
+
uuid: uuidv6(),
|
|
460
|
+
title: "",
|
|
461
|
+
canWrite: true,
|
|
462
|
+
containers: [],
|
|
463
|
+
}
|
|
452
464
|
}
|
package/src/interface/bus.ts
CHANGED
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { Job, Database, Project, Task } from "./base"
|
|
10
10
|
import { ExecuteState } from "./enum"
|
|
11
|
-
import { ExecutionLog, Log
|
|
11
|
+
import { ExecutionLog, Log } from "./log"
|
|
12
|
+
import { Preference } from "./record"
|
|
12
13
|
import { Login } from "./server"
|
|
13
14
|
import { FeedBack, Header, Setter, ShellFolder, Single, WebsocketPack } from "./struct"
|
|
14
15
|
import { DatabaseTable, NodeTable, ProjectTable } from "./table"
|
|
@@ -132,16 +133,12 @@ export type BusType = {
|
|
|
132
133
|
makeToast: ToastData
|
|
133
134
|
modeSelect: boolean
|
|
134
135
|
createProject: void
|
|
135
|
-
updateProject: void
|
|
136
136
|
recoverProject: ProjectTable
|
|
137
137
|
recoverDatabase: DatabaseTable
|
|
138
138
|
relogin: void
|
|
139
139
|
loginGuest: void
|
|
140
140
|
login: Login
|
|
141
141
|
logout: void
|
|
142
|
-
updateTask: void
|
|
143
|
-
updateJob: void
|
|
144
|
-
updateDatabase: void
|
|
145
142
|
selectDatabase: string
|
|
146
143
|
updateLocate: void
|
|
147
144
|
updateNode: Array<NodeTable>
|
package/src/interface/execute.ts
CHANGED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Database, Node, Project } from "./base"
|
|
2
|
+
import { ExecuteState } from "./enum"
|
|
3
|
+
import { ExecuteData } from "./record"
|
|
4
|
+
|
|
5
|
+
export interface ExecuteRecordTask {
|
|
6
|
+
index: number
|
|
7
|
+
node: string
|
|
8
|
+
message: Array<string>
|
|
9
|
+
state: ExecuteState
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface ExecutionTaskLog {
|
|
13
|
+
task_state: ExecuteData
|
|
14
|
+
start_timer: number
|
|
15
|
+
end_timer: number
|
|
16
|
+
task_detail: Array<ExecuteRecordTask>
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface ExecutionLog {
|
|
20
|
+
uuid: string
|
|
21
|
+
dirty?: boolean
|
|
22
|
+
output?: boolean
|
|
23
|
+
filename: string
|
|
24
|
+
project: Project
|
|
25
|
+
database: Database
|
|
26
|
+
start_timer: number
|
|
27
|
+
end_timer: number
|
|
28
|
+
state: ExecuteState
|
|
29
|
+
logs: Array<ExecutionTaskLog>
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface Log {
|
|
33
|
+
logs: Array<ExecutionLog>
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface Record {
|
|
37
|
+
projects: Array<Project>
|
|
38
|
+
nodes: Array<Node>
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface ExecuteRecord extends Record {
|
|
42
|
+
uuid: string
|
|
43
|
+
name: string
|
|
44
|
+
running: boolean
|
|
45
|
+
stop: boolean
|
|
46
|
+
/**
|
|
47
|
+
* The speicifed the process step type
|
|
48
|
+
* * 0: All Projects through
|
|
49
|
+
* * 1: Single project through
|
|
50
|
+
* * 2: SIngle task through
|
|
51
|
+
*/
|
|
52
|
+
process_type: number
|
|
53
|
+
para: Database | undefined
|
|
54
|
+
command: Array<Array<any>>
|
|
55
|
+
project: string
|
|
56
|
+
useCron: boolean
|
|
57
|
+
task: string
|
|
58
|
+
project_index: number
|
|
59
|
+
task_index: number
|
|
60
|
+
project_state: Array<ExecuteData>
|
|
61
|
+
task_state: Array<ExecuteData>
|
|
62
|
+
task_detail: Array<ExecuteRecordTask>
|
|
63
|
+
}
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
// ========================
|
|
2
|
+
//
|
|
3
|
+
// Share Codebase
|
|
4
|
+
//
|
|
5
|
+
// ========================
|
|
6
|
+
import { DatabaseContainer, DataTime, Project } from "./base"
|
|
7
|
+
import { ACLType, LocalPermission } from "./server"
|
|
8
|
+
|
|
9
|
+
type ProjectCall = (p:Project) => Project
|
|
10
|
+
type DatabaseCall = () => Array<DatabaseContainer>
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* **Plugin Content**\
|
|
14
|
+
* For single file specification
|
|
15
|
+
*/
|
|
16
|
+
export interface PluginContent {
|
|
17
|
+
filename: string
|
|
18
|
+
url: string
|
|
19
|
+
/**
|
|
20
|
+
* **Should Unpack**\
|
|
21
|
+
* Support Zip format
|
|
22
|
+
*/
|
|
23
|
+
unpack: boolean
|
|
24
|
+
platform: NodeJS.Platform
|
|
25
|
+
arch: NodeJS.Architecture
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* **Plugin Container**\
|
|
30
|
+
* A plugin is basically a
|
|
31
|
+
*/
|
|
32
|
+
export interface Plugin {
|
|
33
|
+
/**
|
|
34
|
+
* **Icon URL**\
|
|
35
|
+
* The relative link for the icon
|
|
36
|
+
*/
|
|
37
|
+
icon?: string
|
|
38
|
+
/**
|
|
39
|
+
* **Plugin Title**
|
|
40
|
+
*/
|
|
41
|
+
name: string
|
|
42
|
+
/**
|
|
43
|
+
* **Plugin Description**
|
|
44
|
+
*/
|
|
45
|
+
description: string
|
|
46
|
+
/**
|
|
47
|
+
* **Minimum Require Application Version**
|
|
48
|
+
*/
|
|
49
|
+
requireVersion: string
|
|
50
|
+
/**
|
|
51
|
+
* **Plugin Version Data**
|
|
52
|
+
*/
|
|
53
|
+
version?: string
|
|
54
|
+
/**
|
|
55
|
+
* **Download Progress**\
|
|
56
|
+
* For download purpose
|
|
57
|
+
* * 0: Downloading
|
|
58
|
+
* * 1: Finish
|
|
59
|
+
*/
|
|
60
|
+
progress?: number
|
|
61
|
+
/**
|
|
62
|
+
* **List Content Of Plugin**\
|
|
63
|
+
* Provide list of files
|
|
64
|
+
*/
|
|
65
|
+
contents: Array<PluginContent>
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* **Compute Client Plugin Store Data**
|
|
70
|
+
*/
|
|
71
|
+
export interface PluginNode {
|
|
72
|
+
/**
|
|
73
|
+
* A;; installed or installing
|
|
74
|
+
*/
|
|
75
|
+
plugins: Array<Plugin>
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* **Plugin Container WIth Token**\
|
|
80
|
+
* For server mark the data with successfully query token\
|
|
81
|
+
* To save time for next query
|
|
82
|
+
*/
|
|
83
|
+
export interface PluginWithToken extends Plugin {
|
|
84
|
+
token: Array<string>
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* **Plugin Group**\
|
|
89
|
+
* User can upload a group of plugin with author and thumbnail etc...\
|
|
90
|
+
*/
|
|
91
|
+
export interface PluginContainer extends DataTime {
|
|
92
|
+
/**
|
|
93
|
+
* **Thumbnail URL**\
|
|
94
|
+
* The relative link for the thumbnail
|
|
95
|
+
*/
|
|
96
|
+
thumbnail?: string
|
|
97
|
+
/**
|
|
98
|
+
* **Icon URL**\
|
|
99
|
+
* The relative link for the icon
|
|
100
|
+
*/
|
|
101
|
+
icon?: string
|
|
102
|
+
/**
|
|
103
|
+
* **Owner ID**\
|
|
104
|
+
* When publish the plugin
|
|
105
|
+
*/
|
|
106
|
+
owner?: string
|
|
107
|
+
/**
|
|
108
|
+
* **Plugin Group Name**
|
|
109
|
+
*/
|
|
110
|
+
title?: string
|
|
111
|
+
/**
|
|
112
|
+
* **Plugin Header URL**
|
|
113
|
+
*/
|
|
114
|
+
url?: string
|
|
115
|
+
/**
|
|
116
|
+
* **Available Files**
|
|
117
|
+
*/
|
|
118
|
+
plugins: Array<Plugin>
|
|
119
|
+
/**
|
|
120
|
+
* **Data Mark: Project**\
|
|
121
|
+
* Contain the header data for project template
|
|
122
|
+
*/
|
|
123
|
+
projects: Array<TemplateData_Project>
|
|
124
|
+
/**
|
|
125
|
+
* **Data Mark: Database**\
|
|
126
|
+
* Contain the header data for database template
|
|
127
|
+
*/
|
|
128
|
+
databases: Array<TemplateData_Database>
|
|
129
|
+
/**
|
|
130
|
+
* **Generate Method: Project**\
|
|
131
|
+
* Only exist in server side
|
|
132
|
+
*/
|
|
133
|
+
gen_projects?: Array<TemplateGroup_Project>
|
|
134
|
+
/**
|
|
135
|
+
* **Generate Method: Database**\
|
|
136
|
+
* Only exist in server side
|
|
137
|
+
*/
|
|
138
|
+
gen_databases?: Array<TemplateGroup_Database>
|
|
139
|
+
/**
|
|
140
|
+
* **Local Permission**\
|
|
141
|
+
* Client-side only permission field\
|
|
142
|
+
* Server will check user token and defined its permission level\
|
|
143
|
+
* And modify this field and send back to user
|
|
144
|
+
*/
|
|
145
|
+
permission?: LocalPermission
|
|
146
|
+
/**
|
|
147
|
+
* **Accessibility**\
|
|
148
|
+
* Could be public, protected, private
|
|
149
|
+
*/
|
|
150
|
+
acl?: ACLType
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* **Page Display**\
|
|
155
|
+
* For server to display all kinds of plugins and templates
|
|
156
|
+
*/
|
|
157
|
+
export interface PluginPageData {
|
|
158
|
+
/**
|
|
159
|
+
* **Plugins Data**
|
|
160
|
+
*/
|
|
161
|
+
plugins: Array<PluginContainer>
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* **Vue Plugin state**\
|
|
167
|
+
* Dynamic data in frontend for display purpose
|
|
168
|
+
*/
|
|
169
|
+
export interface PluginState {
|
|
170
|
+
/**
|
|
171
|
+
* **Plugin Name**
|
|
172
|
+
*/
|
|
173
|
+
name: string
|
|
174
|
+
/**
|
|
175
|
+
* **Plugin Manifest URL Name**
|
|
176
|
+
*/
|
|
177
|
+
url: string
|
|
178
|
+
/**
|
|
179
|
+
* **Is Installed**
|
|
180
|
+
*/
|
|
181
|
+
installed: boolean
|
|
182
|
+
/**
|
|
183
|
+
* **Is Supported**
|
|
184
|
+
*/
|
|
185
|
+
supported: boolean
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* **Template Project Group**
|
|
190
|
+
*/
|
|
191
|
+
export interface TemplateData_Project {
|
|
192
|
+
/**
|
|
193
|
+
* **Project Template Name**
|
|
194
|
+
*/
|
|
195
|
+
title: string
|
|
196
|
+
/**
|
|
197
|
+
* **Filename Name**
|
|
198
|
+
*/
|
|
199
|
+
filename: string
|
|
200
|
+
/**
|
|
201
|
+
* **Group Name**
|
|
202
|
+
*/
|
|
203
|
+
group: string
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* **Template Project Group**
|
|
208
|
+
*/
|
|
209
|
+
export interface TemplateData_Database {
|
|
210
|
+
/**
|
|
211
|
+
* **Database Template Name**
|
|
212
|
+
*/
|
|
213
|
+
title: string
|
|
214
|
+
/**
|
|
215
|
+
* **Filename Name**
|
|
216
|
+
*/
|
|
217
|
+
filename: string
|
|
218
|
+
/**
|
|
219
|
+
* **Group Name**
|
|
220
|
+
*/
|
|
221
|
+
group: string
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export interface TemplateGroup_Project {
|
|
225
|
+
value: number
|
|
226
|
+
group: string
|
|
227
|
+
title?: string
|
|
228
|
+
filename?: string
|
|
229
|
+
template?: ProjectCall
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export interface TemplateGroup_Database {
|
|
233
|
+
value: number
|
|
234
|
+
group: string
|
|
235
|
+
title?: string
|
|
236
|
+
filename?: string
|
|
237
|
+
template?: DatabaseCall
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* **Template Group Data**
|
|
242
|
+
*/
|
|
243
|
+
export interface TemplateData {
|
|
244
|
+
url?: string
|
|
245
|
+
projects: Array<TemplateData_Project>
|
|
246
|
+
databases: Array<TemplateData_Database>
|
|
247
|
+
}
|
package/src/interface/record.ts
CHANGED
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
// Share Codebase
|
|
4
4
|
//
|
|
5
5
|
// ========================
|
|
6
|
-
import { ExecuteManager } from "./../script/execute_manager"
|
|
7
|
-
import { Node, Database, Project } from "./base"
|
|
8
6
|
import { ExecuteState } from "./enum"
|
|
9
7
|
|
|
10
8
|
export interface ExecuteData {
|
|
@@ -12,71 +10,11 @@ export interface ExecuteData {
|
|
|
12
10
|
state: ExecuteState
|
|
13
11
|
}
|
|
14
12
|
|
|
15
|
-
export interface ExecutionTaskLog {
|
|
16
|
-
task_state: ExecuteData
|
|
17
|
-
start_timer: number
|
|
18
|
-
end_timer: number
|
|
19
|
-
task_detail: Array<ExecuteRecordTask>
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export interface ExecutionLog {
|
|
23
|
-
uuid: string
|
|
24
|
-
dirty?: boolean
|
|
25
|
-
output?: boolean
|
|
26
|
-
filename: string
|
|
27
|
-
project: Project
|
|
28
|
-
database: Database
|
|
29
|
-
start_timer: number
|
|
30
|
-
end_timer: number
|
|
31
|
-
state: ExecuteState
|
|
32
|
-
logs: Array<ExecutionTaskLog>
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export interface ExecuteRecordTask {
|
|
36
|
-
index: number
|
|
37
|
-
node: string
|
|
38
|
-
message: Array<string>
|
|
39
|
-
state: ExecuteState
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface Log {
|
|
43
|
-
logs: Array<ExecutionLog>
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export interface Record {
|
|
47
|
-
projects: Array<Project>
|
|
48
|
-
nodes: Array<Node>
|
|
49
|
-
}
|
|
50
|
-
|
|
51
13
|
export interface RecordHeader {
|
|
52
14
|
projects: Array<string>
|
|
53
15
|
nodes: Array<string>
|
|
54
16
|
}
|
|
55
17
|
|
|
56
|
-
export interface ExecuteRecord extends Record {
|
|
57
|
-
uuid: string
|
|
58
|
-
name: string
|
|
59
|
-
running: boolean
|
|
60
|
-
stop: boolean
|
|
61
|
-
/**
|
|
62
|
-
* The speicifed the process step type
|
|
63
|
-
* * 0: All Projects through
|
|
64
|
-
* * 1: Single project through
|
|
65
|
-
* * 2: SIngle task through
|
|
66
|
-
*/
|
|
67
|
-
process_type: number
|
|
68
|
-
para: Database | undefined
|
|
69
|
-
command: Array<Array<any>>
|
|
70
|
-
project: string
|
|
71
|
-
useCron: boolean
|
|
72
|
-
task: string
|
|
73
|
-
project_index: number
|
|
74
|
-
task_index: number
|
|
75
|
-
project_state: Array<ExecuteData>
|
|
76
|
-
task_state: Array<ExecuteData>
|
|
77
|
-
task_detail: Array<ExecuteRecordTask>
|
|
78
|
-
}
|
|
79
|
-
|
|
80
18
|
export interface PluginToken {
|
|
81
19
|
name: string
|
|
82
20
|
token: string
|
package/src/interface/struct.ts
CHANGED
|
@@ -7,13 +7,10 @@
|
|
|
7
7
|
* All kinds of data structure
|
|
8
8
|
* It's a mess, i know
|
|
9
9
|
*/
|
|
10
|
-
import {
|
|
10
|
+
import { Job } from "./base"
|
|
11
11
|
import ws from 'ws'
|
|
12
12
|
import { ServiceMode, TaskLogicType } from "./enum"
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
type ProjectCall = (p:Project) => Project
|
|
16
|
-
type DatabaseCall = () => Array<DatabaseContainer>
|
|
13
|
+
import { Plugin } from "./plugin"
|
|
17
14
|
|
|
18
15
|
/**
|
|
19
16
|
* The websocket instance with extra information
|
|
@@ -57,10 +54,6 @@ export interface WebsocketPack {
|
|
|
57
54
|
children?: Array<WebsocketPack>
|
|
58
55
|
}
|
|
59
56
|
|
|
60
|
-
export interface CronWebsocketPack {
|
|
61
|
-
websocket: WebsocketPack
|
|
62
|
-
}
|
|
63
|
-
|
|
64
57
|
/**
|
|
65
58
|
* The data transfer packet header
|
|
66
59
|
*/
|
|
@@ -208,109 +201,6 @@ export interface ShellFolder {
|
|
|
208
201
|
folders: Array<string>
|
|
209
202
|
}
|
|
210
203
|
|
|
211
|
-
export interface TemplateGroup {
|
|
212
|
-
value: number
|
|
213
|
-
group: string
|
|
214
|
-
title?: string
|
|
215
|
-
filename?: string
|
|
216
|
-
template?: ProjectCall
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
export interface TemplateGroup2 {
|
|
220
|
-
value: number
|
|
221
|
-
group: string
|
|
222
|
-
title?: string
|
|
223
|
-
filename?: string
|
|
224
|
-
template?: DatabaseCall
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
export interface PluginContent {
|
|
228
|
-
filename: string
|
|
229
|
-
url: string
|
|
230
|
-
platform: NodeJS.Platform
|
|
231
|
-
arch: NodeJS.Architecture
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
export interface Plugin {
|
|
235
|
-
name: string
|
|
236
|
-
description: string
|
|
237
|
-
version?: string
|
|
238
|
-
progress?: number
|
|
239
|
-
contents: Array<PluginContent>
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
export interface PluginWithToken extends Plugin {
|
|
243
|
-
token: Array<string>
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
export interface PluginList {
|
|
247
|
-
owner?: string
|
|
248
|
-
title?: string
|
|
249
|
-
url?: string
|
|
250
|
-
plugins: Array<Plugin>
|
|
251
|
-
/**
|
|
252
|
-
* **Local Permission**\
|
|
253
|
-
* Client-side only permission field\
|
|
254
|
-
* Server will check user token and defined its permission level\
|
|
255
|
-
* And modify this field and send back to user
|
|
256
|
-
*/
|
|
257
|
-
permission?: LocalPermission
|
|
258
|
-
/**
|
|
259
|
-
* **Accessibility**\
|
|
260
|
-
* Could be public, protected, private
|
|
261
|
-
*/
|
|
262
|
-
acl?: ACLType
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
export interface PluginState {
|
|
266
|
-
name: string
|
|
267
|
-
url: string
|
|
268
|
-
installed: boolean
|
|
269
|
-
supported: boolean
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
export interface PluginPageTemplate {
|
|
273
|
-
owner?: string
|
|
274
|
-
name: string
|
|
275
|
-
project: Array<TemplateGroup>
|
|
276
|
-
database: Array<TemplateGroup2>
|
|
277
|
-
url?: string
|
|
278
|
-
/**
|
|
279
|
-
* **Local Permission**\
|
|
280
|
-
* Client-side only permission field\
|
|
281
|
-
* Server will check user token and defined its permission level\
|
|
282
|
-
* And modify this field and send back to user
|
|
283
|
-
*/
|
|
284
|
-
permission?: LocalPermission
|
|
285
|
-
/**
|
|
286
|
-
* **Accessibility**\
|
|
287
|
-
* Could be public, protected, private
|
|
288
|
-
*/
|
|
289
|
-
acl?: ACLType
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
export interface PluginPageData {
|
|
293
|
-
plugins: Array<PluginList>
|
|
294
|
-
templates: Array<PluginPageTemplate>
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
export interface TemplateDataProject {
|
|
298
|
-
title: string
|
|
299
|
-
filename: string
|
|
300
|
-
group: string
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
export interface TemplateDataDatabase {
|
|
304
|
-
title: string
|
|
305
|
-
filename: string
|
|
306
|
-
group: string
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
export interface TemplateData {
|
|
310
|
-
url?: string
|
|
311
|
-
projects: Array<TemplateDataProject>
|
|
312
|
-
databases: Array<TemplateDataDatabase>
|
|
313
|
-
}
|
|
314
204
|
|
|
315
205
|
export interface BuildinAssetsContent {
|
|
316
206
|
name: string
|
package/src/interface/table.ts
CHANGED
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
* The data structure that use in Vue
|
|
9
9
|
*/
|
|
10
10
|
import { Node, Database, Project, Task, Job } from './base'
|
|
11
|
-
import { Plugin
|
|
11
|
+
import { Plugin } from './plugin'
|
|
12
|
+
import { SystemLoad } from './struct'
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
15
|
* **UI Database Table Data Structure**\
|
package/src/interface.ts
CHANGED
|
@@ -46,6 +46,8 @@ export * from './interface/server'
|
|
|
46
46
|
export * from './interface/struct'
|
|
47
47
|
export * from './interface/table'
|
|
48
48
|
export * from './interface/ui'
|
|
49
|
+
export * from './interface/plugin'
|
|
50
|
+
export * from './interface/log'
|
|
49
51
|
|
|
50
52
|
/**
|
|
51
53
|
* Plugin
|
|
@@ -63,5 +65,5 @@ export * as Execute_WebhookManager from './script/webhook_manager'
|
|
|
63
65
|
/**
|
|
64
66
|
* Util
|
|
65
67
|
*/
|
|
66
|
-
export * as UtilServer_Console from './
|
|
67
|
-
export * as UtilServer_Log from './
|
|
68
|
+
export * as UtilServer_Console from './server/detail/console_handle'
|
|
69
|
+
export * as UtilServer_Log from './server/detail/log_handle'
|
package/src/lan/en.json
CHANGED
|
@@ -138,7 +138,10 @@
|
|
|
138
138
|
"delete-job": "Delete Job",
|
|
139
139
|
"delete-job-confirm": "Are you sure you want to delete this job?",
|
|
140
140
|
"delete-task": "Delete Task",
|
|
141
|
-
"delete-task-confirm": "Are you sure you want to delete these tasks?"
|
|
141
|
+
"delete-task-confirm": "Are you sure you want to delete these tasks?",
|
|
142
|
+
"create-service": "Create Service",
|
|
143
|
+
"delete-service": "Delete Service",
|
|
144
|
+
"delete-service-confirm": "Are you sure you want to delete these services?"
|
|
142
145
|
},
|
|
143
146
|
"toolbar": {
|
|
144
147
|
"server": "Server",
|
|
@@ -274,7 +277,8 @@
|
|
|
274
277
|
"task-count": "Task Count",
|
|
275
278
|
"job-count": "Job Count",
|
|
276
279
|
"hidden": "Hidden",
|
|
277
|
-
"runtime": "Runtime"
|
|
280
|
+
"runtime": "Runtime",
|
|
281
|
+
"value": "Value"
|
|
278
282
|
},
|
|
279
283
|
"codehint": {
|
|
280
284
|
"v_path": "Path module",
|
|
@@ -351,6 +355,7 @@
|
|
|
351
355
|
"selectall": "Select All",
|
|
352
356
|
"unselectall": "Unselect All",
|
|
353
357
|
"project": "Project",
|
|
358
|
+
"service": "Service",
|
|
354
359
|
"task": "Task",
|
|
355
360
|
"job": "JOB",
|
|
356
361
|
"database": "Database",
|