verteilen-core 1.2.18 → 1.2.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
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DatabaseContainer, Project } from "./base";
|
|
2
2
|
import ws from 'ws';
|
|
3
3
|
import { ServiceMode } from "./enum";
|
|
4
|
+
import { ACLType, LocalPermission } from "./server";
|
|
4
5
|
type ProjectCall = (p: Project) => Project;
|
|
5
6
|
type DatabaseCall = () => Array<DatabaseContainer>;
|
|
6
7
|
export interface WebsocketPack {
|
|
@@ -133,9 +134,12 @@ export interface PluginWithToken extends Plugin {
|
|
|
133
134
|
token: Array<string>;
|
|
134
135
|
}
|
|
135
136
|
export interface PluginList {
|
|
137
|
+
owner?: string;
|
|
136
138
|
title?: string;
|
|
137
139
|
url?: string;
|
|
138
140
|
plugins: Array<Plugin>;
|
|
141
|
+
permission?: LocalPermission;
|
|
142
|
+
acl?: ACLType;
|
|
139
143
|
}
|
|
140
144
|
export interface PluginState {
|
|
141
145
|
name: string;
|
|
@@ -144,10 +148,13 @@ export interface PluginState {
|
|
|
144
148
|
supported: boolean;
|
|
145
149
|
}
|
|
146
150
|
export interface PluginPageTemplate {
|
|
151
|
+
owner?: string;
|
|
147
152
|
name: string;
|
|
148
153
|
project: Array<TemplateGroup>;
|
|
149
154
|
database: Array<TemplateGroup2>;
|
|
150
155
|
url?: string;
|
|
156
|
+
permission?: LocalPermission;
|
|
157
|
+
acl?: ACLType;
|
|
151
158
|
}
|
|
152
159
|
export interface PluginPageData {
|
|
153
160
|
plugins: Array<PluginList>;
|
|
@@ -196,7 +196,7 @@ class WebsocketManager {
|
|
|
196
196
|
const data = [];
|
|
197
197
|
this.targets.forEach(x => {
|
|
198
198
|
if (x.websocket.readyState == interface_1.SocketState.CLOSED) {
|
|
199
|
-
data.push({ uuid: x.uuid, url: x.websocket.url });
|
|
199
|
+
data.push({ cluster: false, uuid: x.uuid, url: x.websocket.url });
|
|
200
200
|
}
|
|
201
201
|
});
|
|
202
202
|
data.forEach(d => this.removeByUUID(d.uuid));
|
|
@@ -206,6 +206,7 @@ class WebsocketManager {
|
|
|
206
206
|
result = this.targets.map(x => {
|
|
207
207
|
return {
|
|
208
208
|
s: false,
|
|
209
|
+
cluster: false,
|
|
209
210
|
uuid: x.uuid,
|
|
210
211
|
state: x.websocket.readyState,
|
|
211
212
|
url: x.websocket.url,
|
package/package.json
CHANGED
package/src/interface/base.ts
CHANGED
|
@@ -278,6 +278,12 @@ export interface Project {
|
|
|
278
278
|
* Which specified in this type of structure
|
|
279
279
|
*/
|
|
280
280
|
export interface Node {
|
|
281
|
+
/**
|
|
282
|
+
* **Cluster Mode**\
|
|
283
|
+
* Check if the node is cluster\
|
|
284
|
+
* This mean it does not have compute ability
|
|
285
|
+
*/
|
|
286
|
+
cluster: boolean
|
|
281
287
|
/**
|
|
282
288
|
* **ID**\
|
|
283
289
|
* The UUID of the compute node
|
package/src/interface/struct.ts
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
import { DatabaseContainer, Project } from "./base"
|
|
11
11
|
import ws from 'ws'
|
|
12
12
|
import { ServiceMode } from "./enum"
|
|
13
|
+
import { ACLType, LocalPermission } from "./server"
|
|
13
14
|
|
|
14
15
|
type ProjectCall = (p:Project) => Project
|
|
15
16
|
type DatabaseCall = () => Array<DatabaseContainer>
|
|
@@ -243,9 +244,22 @@ export interface PluginWithToken extends Plugin {
|
|
|
243
244
|
}
|
|
244
245
|
|
|
245
246
|
export interface PluginList {
|
|
247
|
+
owner?: string
|
|
246
248
|
title?: string
|
|
247
249
|
url?: string
|
|
248
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
|
|
249
263
|
}
|
|
250
264
|
|
|
251
265
|
export interface PluginState {
|
|
@@ -256,10 +270,23 @@ export interface PluginState {
|
|
|
256
270
|
}
|
|
257
271
|
|
|
258
272
|
export interface PluginPageTemplate {
|
|
273
|
+
owner?: string
|
|
259
274
|
name: string
|
|
260
275
|
project: Array<TemplateGroup>
|
|
261
276
|
database: Array<TemplateGroup2>
|
|
262
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
|
|
263
290
|
}
|
|
264
291
|
|
|
265
292
|
export interface PluginPageData {
|
|
@@ -232,7 +232,7 @@ export class WebsocketManager {
|
|
|
232
232
|
const data:Array<Node> = []
|
|
233
233
|
this.targets.forEach(x => {
|
|
234
234
|
if(x.websocket.readyState == SocketState.CLOSED){
|
|
235
|
-
data.push({uuid: x.uuid, url: x.websocket.url})
|
|
235
|
+
data.push({cluster: false, uuid: x.uuid, url: x.websocket.url})
|
|
236
236
|
}
|
|
237
237
|
})
|
|
238
238
|
data.forEach(d => this.removeByUUID(d.uuid))
|
|
@@ -243,6 +243,7 @@ export class WebsocketManager {
|
|
|
243
243
|
result = this.targets.map(x => {
|
|
244
244
|
return {
|
|
245
245
|
s: false,
|
|
246
|
+
cluster: false,
|
|
246
247
|
uuid: x.uuid,
|
|
247
248
|
state: x.websocket.readyState,
|
|
248
249
|
url: x.websocket.url,
|