@longvansoftware/service-js-client 1.4.8 → 1.5.0
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.
@@ -11,3 +11,4 @@ export declare const DELETE_SNAPSHOT: import("graphql").DocumentNode;
|
|
11
11
|
export declare const CREATE_CLUSTER: import("graphql").DocumentNode;
|
12
12
|
export declare const ADD_COMPUTING_IN_CLUSTER: import("graphql").DocumentNode;
|
13
13
|
export declare const REMOVE_COMPUTING_IN_CLUSTER: import("graphql").DocumentNode;
|
14
|
+
export declare const STOP_USE_COMPUTING: import("graphql").DocumentNode;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
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.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!) {
|
@@ -143,3 +143,41 @@ exports.REMOVE_COMPUTING_IN_CLUSTER = (0, graphql_tag_1.gql) `
|
|
143
143
|
)
|
144
144
|
}
|
145
145
|
`;
|
146
|
+
exports.STOP_USE_COMPUTING = (0, graphql_tag_1.gql) `
|
147
|
+
mutation StopUseComputing($computingId: String!, $userId: String!) {
|
148
|
+
stopUseComputing(computingId: "string", userId: "string") {
|
149
|
+
id
|
150
|
+
name
|
151
|
+
username
|
152
|
+
password
|
153
|
+
state
|
154
|
+
os
|
155
|
+
ips
|
156
|
+
province
|
157
|
+
console
|
158
|
+
consoleCookieName
|
159
|
+
consoleCookieValue
|
160
|
+
existPortNat
|
161
|
+
ipConnect
|
162
|
+
portConnect
|
163
|
+
protocolConnect
|
164
|
+
lastBackup
|
165
|
+
backupSequence
|
166
|
+
serviceId
|
167
|
+
status
|
168
|
+
statusDetail
|
169
|
+
groupType
|
170
|
+
colocationId
|
171
|
+
ip
|
172
|
+
region
|
173
|
+
site
|
174
|
+
rack
|
175
|
+
location
|
176
|
+
position
|
177
|
+
deviceType
|
178
|
+
url
|
179
|
+
baremetalId
|
180
|
+
platform
|
181
|
+
}
|
182
|
+
}
|
183
|
+
`;
|
@@ -223,8 +223,8 @@ exports.GET_COMPUTINGS = (0, graphql_tag_1.gql) `
|
|
223
223
|
}
|
224
224
|
`;
|
225
225
|
exports.GET_LAB_INSTANCE = (0, graphql_tag_1.gql) `
|
226
|
-
query GetLabInstance($labId: String!, $userId: String!) {
|
227
|
-
getLabInstance(labId: $labId, userId: $userId) {
|
226
|
+
query GetLabInstance($articleId: String!, $labId: String!, $userId: String!) {
|
227
|
+
getLabInstance(articleId: $articleId, labId: $labId, userId: $userId) {
|
228
228
|
id
|
229
229
|
name
|
230
230
|
username
|
@@ -33,7 +33,7 @@ export declare class ComputingService extends Service {
|
|
33
33
|
networkUsageStartTime(computingId: string, type: string, startTime: string): Promise<any>;
|
34
34
|
diskUsageStartTime(computingId: string, type: string, startTime: string): Promise<any>;
|
35
35
|
getComputings(userId: string): Promise<any>;
|
36
|
-
getLabInstance(labId: string, userId: string): Promise<any>;
|
36
|
+
getLabInstance(articleId: string, labId: string, userId: string): Promise<any>;
|
37
37
|
createCluster(ownerId: string, name: string): Promise<any>;
|
38
38
|
addComputingInCluster(clusterId: string, computingId: string, userId: string): Promise<any>;
|
39
39
|
removeComputingInCluster(clusterId: string, computingId: string, userId: string): Promise<any>;
|
@@ -41,4 +41,5 @@ export declare class ComputingService extends Service {
|
|
41
41
|
getCluster(clusterId: string): Promise<any>;
|
42
42
|
getComputingByCluster(clusterId: string): Promise<any>;
|
43
43
|
getComputingByService(serviceId: string): Promise<any>;
|
44
|
+
stopUseComputing(computingId: string, userId: string): Promise<any>;
|
44
45
|
}
|
@@ -431,10 +431,11 @@ class ComputingService extends serviceSDK_1.Service {
|
|
431
431
|
}
|
432
432
|
});
|
433
433
|
}
|
434
|
-
getLabInstance(labId, userId) {
|
434
|
+
getLabInstance(articleId, labId, userId) {
|
435
435
|
return __awaiter(this, void 0, void 0, function* () {
|
436
436
|
const query = queries_1.GET_LAB_INSTANCE;
|
437
437
|
const variables = {
|
438
|
+
articleId,
|
438
439
|
labId,
|
439
440
|
userId,
|
440
441
|
};
|
@@ -565,5 +566,22 @@ class ComputingService extends serviceSDK_1.Service {
|
|
565
566
|
}
|
566
567
|
});
|
567
568
|
}
|
569
|
+
stopUseComputing(computingId, userId) {
|
570
|
+
return __awaiter(this, void 0, void 0, function* () {
|
571
|
+
const mutation = mutations_1.STOP_USE_COMPUTING;
|
572
|
+
const variables = {
|
573
|
+
computingId,
|
574
|
+
userId
|
575
|
+
};
|
576
|
+
try {
|
577
|
+
const response = yield this.graphqlMutationV2(mutation, variables);
|
578
|
+
return response.stopUseComputing;
|
579
|
+
}
|
580
|
+
catch (error) {
|
581
|
+
console.log(`Error fetching get stopUseComputing method: ${error}`);
|
582
|
+
throw error;
|
583
|
+
}
|
584
|
+
});
|
585
|
+
}
|
568
586
|
}
|
569
587
|
exports.ComputingService = ComputingService;
|