@longvansoftware/service-js-client 1.9.9 → 1.10.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/graphql/computing/mutations.d.ts +1 -0
- package/dist/src/graphql/computing/mutations.js +26 -14
- package/dist/src/graphql/computing/queries.d.ts +1 -0
- package/dist/src/graphql/computing/queries.js +10 -16
- package/dist/src/lib/computing/index.d.ts +2 -0
- package/dist/src/lib/computing/index.js +34 -0
- package/package.json +1 -1
@@ -15,3 +15,4 @@ export declare const STOP_USE_COMPUTING: import("graphql").DocumentNode;
|
|
15
15
|
export declare const ADD_PORT_NAT: import("graphql").DocumentNode;
|
16
16
|
export declare const UPDATE_DESCRIPTION_COMPUTING: import("graphql").DocumentNode;
|
17
17
|
export declare const CREATE_COMPUTING_FOR_DC: import("graphql").DocumentNode;
|
18
|
+
export declare const UPDATE_NAME_COMPUTING: import("graphql").DocumentNode;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.CREATE_COMPUTING_FOR_DC = exports.UPDATE_DESCRIPTION_COMPUTING = exports.ADD_PORT_NAT = exports.STOP_USE_COMPUTING = exports.REMOVE_COMPUTING_IN_CLUSTER = exports.ADD_COMPUTING_IN_CLUSTER = exports.CREATE_CLUSTER = exports.DELETE_SNAPSHOT = exports.ROLLBACK_SNAPSHOT = exports.CREATE_SNAP_SHOT = exports.POWER_OFF = exports.POWER_ON = exports.REMOVE_PORT_NAT = exports.UPDATE_PORT_NAT = exports.CREATE_PORT_NAT = exports.UPDATE_DESCRIPTION_PORTNAT = exports.RESTARTVM = void 0;
|
3
|
+
exports.UPDATE_NAME_COMPUTING = exports.CREATE_COMPUTING_FOR_DC = exports.UPDATE_DESCRIPTION_COMPUTING = exports.ADD_PORT_NAT = exports.STOP_USE_COMPUTING = exports.REMOVE_COMPUTING_IN_CLUSTER = exports.ADD_COMPUTING_IN_CLUSTER = exports.CREATE_CLUSTER = exports.DELETE_SNAPSHOT = exports.ROLLBACK_SNAPSHOT = exports.CREATE_SNAP_SHOT = exports.POWER_OFF = exports.POWER_ON = exports.REMOVE_PORT_NAT = exports.UPDATE_PORT_NAT = exports.CREATE_PORT_NAT = exports.UPDATE_DESCRIPTION_PORTNAT = exports.RESTARTVM = void 0;
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
5
5
|
exports.RESTARTVM = (0, graphql_tag_1.gql) `
|
6
6
|
mutation Restart($computingId: String!, $actor: String!) {
|
@@ -154,9 +154,6 @@ exports.STOP_USE_COMPUTING = (0, graphql_tag_1.gql) `
|
|
154
154
|
os
|
155
155
|
ips
|
156
156
|
province
|
157
|
-
console
|
158
|
-
consoleCookieName
|
159
|
-
consoleCookieValue
|
160
157
|
existPortNat
|
161
158
|
ipConnect
|
162
159
|
portConnect
|
@@ -235,19 +232,34 @@ exports.CREATE_COMPUTING_FOR_DC = (0, graphql_tag_1.gql) `
|
|
235
232
|
$disks: [DiskInput!]!
|
236
233
|
) {
|
237
234
|
createComputingForDC(
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
235
|
+
createComputingInputForDC: {
|
236
|
+
name: $name
|
237
|
+
username: $username
|
238
|
+
password: $password
|
239
|
+
description: $description
|
240
|
+
templateId: $templateId
|
241
|
+
interfaces: $interfaces
|
242
|
+
cpu: $cpu
|
243
|
+
ram: $ram
|
244
|
+
resourcePoolId: $resourcePoolId
|
245
|
+
disks: $disks
|
246
|
+
}
|
248
247
|
) {
|
249
248
|
computingId
|
250
249
|
message
|
251
250
|
}
|
252
251
|
}
|
253
252
|
`;
|
253
|
+
exports.UPDATE_NAME_COMPUTING = (0, graphql_tag_1.gql) `
|
254
|
+
mutation UpdateNameComputing(
|
255
|
+
$computingId: String!
|
256
|
+
$name: String!
|
257
|
+
$updateBy: String
|
258
|
+
) {
|
259
|
+
updateNameComputing(
|
260
|
+
computingId: $computingId
|
261
|
+
name: $name
|
262
|
+
updateBy: $updateBy
|
263
|
+
)
|
264
|
+
}
|
265
|
+
`;
|
@@ -22,3 +22,4 @@ export declare const GET_TEMPLATE: import("graphql").DocumentNode;
|
|
22
22
|
export declare const GET_AVAILABLE_SUBNET_IPS_BY_RESOURCEPOLL_ID: import("graphql").DocumentNode;
|
23
23
|
export declare const GET_AVAILABLE_STORAGES_FOR_DC: import("graphql").DocumentNode;
|
24
24
|
export declare const GET_RESOUCE_POOL_BY_SERVICE: import("graphql").DocumentNode;
|
25
|
+
export declare const GET_CONSOLE: import("graphql").DocumentNode;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.GET_RESOUCE_POOL_BY_SERVICE = exports.GET_AVAILABLE_STORAGES_FOR_DC = exports.GET_AVAILABLE_SUBNET_IPS_BY_RESOURCEPOLL_ID = exports.GET_TEMPLATE = exports.GET_PORT_NATS_BY_SERVICE_ID = exports.GET_EDGES = exports.GET_COMPUTING_BY_SERVICE = exports.GET_COMPUTING_BY_CLUSTER = exports.GET_CLUSTER = exports.GET_CLUSTERS = exports.GET_LAB_INSTANCE = exports.GET_COMPUTINGS = exports.BACKUP_POINT = exports.DISK_USAGE_DATE_RANGE = exports.NETWORK_USAGE_DATE_RANGE = exports.CPU_USAGE_DATE_RANGE = exports.RAM_USAGE_DATE_RANGE = exports.DISK_USAGE_START_TIME = exports.NETWORK_USAGE_START_TIME = exports.CPU_USAGE_START_TIME = exports.RAM_USAGE_START_TIME = exports.SNAP_SHOTS = exports.PORTNATS = exports.COMPUTING_DETAIL = void 0;
|
3
|
+
exports.GET_CONSOLE = exports.GET_RESOUCE_POOL_BY_SERVICE = exports.GET_AVAILABLE_STORAGES_FOR_DC = exports.GET_AVAILABLE_SUBNET_IPS_BY_RESOURCEPOLL_ID = exports.GET_TEMPLATE = exports.GET_PORT_NATS_BY_SERVICE_ID = exports.GET_EDGES = exports.GET_COMPUTING_BY_SERVICE = exports.GET_COMPUTING_BY_CLUSTER = exports.GET_CLUSTER = exports.GET_CLUSTERS = exports.GET_LAB_INSTANCE = exports.GET_COMPUTINGS = exports.BACKUP_POINT = exports.DISK_USAGE_DATE_RANGE = exports.NETWORK_USAGE_DATE_RANGE = exports.CPU_USAGE_DATE_RANGE = exports.RAM_USAGE_DATE_RANGE = exports.DISK_USAGE_START_TIME = exports.NETWORK_USAGE_START_TIME = exports.CPU_USAGE_START_TIME = exports.RAM_USAGE_START_TIME = exports.SNAP_SHOTS = exports.PORTNATS = exports.COMPUTING_DETAIL = void 0;
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
5
5
|
exports.COMPUTING_DETAIL = (0, graphql_tag_1.gql) `
|
6
6
|
query ComputingDetail($computingId: String!) {
|
@@ -13,9 +13,6 @@ exports.COMPUTING_DETAIL = (0, graphql_tag_1.gql) `
|
|
13
13
|
os
|
14
14
|
ips
|
15
15
|
province
|
16
|
-
console
|
17
|
-
consoleCookieName
|
18
|
-
consoleCookieValue
|
19
16
|
existPortNat
|
20
17
|
ipConnect
|
21
18
|
portConnect
|
@@ -222,9 +219,6 @@ exports.GET_COMPUTINGS = (0, graphql_tag_1.gql) `
|
|
222
219
|
os
|
223
220
|
ips
|
224
221
|
province
|
225
|
-
console
|
226
|
-
consoleCookieName
|
227
|
-
consoleCookieValue
|
228
222
|
existPortNat
|
229
223
|
ipConnect
|
230
224
|
portConnect
|
@@ -261,9 +255,6 @@ exports.GET_LAB_INSTANCE = (0, graphql_tag_1.gql) `
|
|
261
255
|
os
|
262
256
|
ips
|
263
257
|
province
|
264
|
-
console
|
265
|
-
consoleCookieName
|
266
|
-
consoleCookieValue
|
267
258
|
existPortNat
|
268
259
|
ipConnect
|
269
260
|
portConnect
|
@@ -317,9 +308,6 @@ exports.GET_COMPUTING_BY_CLUSTER = (0, graphql_tag_1.gql) `
|
|
317
308
|
os
|
318
309
|
ips
|
319
310
|
province
|
320
|
-
console
|
321
|
-
consoleCookieName
|
322
|
-
consoleCookieValue
|
323
311
|
existPortNat
|
324
312
|
ipConnect
|
325
313
|
portConnect
|
@@ -356,9 +344,6 @@ exports.GET_COMPUTING_BY_SERVICE = (0, graphql_tag_1.gql) `
|
|
356
344
|
os
|
357
345
|
ips
|
358
346
|
province
|
359
|
-
console
|
360
|
-
consoleCookieName
|
361
|
-
consoleCookieValue
|
362
347
|
existPortNat
|
363
348
|
ipConnect
|
364
349
|
portConnect
|
@@ -465,3 +450,12 @@ exports.GET_RESOUCE_POOL_BY_SERVICE = (0, graphql_tag_1.gql) `
|
|
465
450
|
}
|
466
451
|
}
|
467
452
|
`;
|
453
|
+
exports.GET_CONSOLE = (0, graphql_tag_1.gql) `
|
454
|
+
query GetConsole($computingId: String!) {
|
455
|
+
getConsole(computingId: $computingId) {
|
456
|
+
console
|
457
|
+
cookieName
|
458
|
+
cookieValue
|
459
|
+
}
|
460
|
+
}
|
461
|
+
`;
|
@@ -51,4 +51,6 @@ export declare class ComputingService extends Service {
|
|
51
51
|
getAvailableStoragesForDC(resourcePoolId: string): Promise<any>;
|
52
52
|
getResourcePoolsByService(serviceId: string): Promise<any>;
|
53
53
|
createComputingForDC(data: any): Promise<any>;
|
54
|
+
updateNameComputing(computingId: string, name: string, updateBy: string): Promise<any>;
|
55
|
+
getConsole(computingId: string): Promise<any>;
|
54
56
|
}
|
@@ -734,5 +734,39 @@ class ComputingService extends serviceSDK_1.Service {
|
|
734
734
|
}
|
735
735
|
});
|
736
736
|
}
|
737
|
+
updateNameComputing(computingId, name, updateBy) {
|
738
|
+
return __awaiter(this, void 0, void 0, function* () {
|
739
|
+
const mutation = mutations_1.UPDATE_NAME_COMPUTING;
|
740
|
+
const variables = {
|
741
|
+
computingId,
|
742
|
+
name,
|
743
|
+
updateBy,
|
744
|
+
};
|
745
|
+
try {
|
746
|
+
const response = yield this.graphqlMutationV2(mutation, variables);
|
747
|
+
return response.updateNameComputing;
|
748
|
+
}
|
749
|
+
catch (error) {
|
750
|
+
console.log(`Error fetching get updateNameComputing method: ${error}`);
|
751
|
+
throw error;
|
752
|
+
}
|
753
|
+
});
|
754
|
+
}
|
755
|
+
getConsole(computingId) {
|
756
|
+
return __awaiter(this, void 0, void 0, function* () {
|
757
|
+
const query = queries_1.GET_CONSOLE;
|
758
|
+
const variables = {
|
759
|
+
computingId,
|
760
|
+
};
|
761
|
+
try {
|
762
|
+
const response = yield this.graphqlQueryV2(query, variables);
|
763
|
+
return response.getConsole;
|
764
|
+
}
|
765
|
+
catch (error) {
|
766
|
+
console.log(`Error fetching get getConsole method: ${error}`);
|
767
|
+
throw error;
|
768
|
+
}
|
769
|
+
});
|
770
|
+
}
|
737
771
|
}
|
738
772
|
exports.ComputingService = ComputingService;
|