summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/views/services
diff options
context:
space:
mode:
authorcyuamber <xuranyjy@chinamobile.com>2019-09-11 09:52:17 +0800
committercyuamber <xuranyjy@chinamobile.com>2019-09-11 09:52:21 +0800
commit16a3412e4b65f5fb5b4073a2d8f4ec360d355e50 (patch)
tree3bc9ebcb5556fa20ceddd257da9387a91396861b /usecaseui-portal/src/app/views/services
parent364ae06e60c429a92d33985ed6016159ab49d495 (diff)
feat:optimize mock api interface for services-list
Change-Id: I923d804f211e458ba0892963b8491cebadfc4326 Issue-ID: USECASEUI-307 Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/views/services')
-rw-r--r--usecaseui-portal/src/app/views/services/services-list/services-list.component.ts25
1 files changed, 20 insertions, 5 deletions
diff --git a/usecaseui-portal/src/app/views/services/services-list/services-list.component.ts b/usecaseui-portal/src/app/views/services/services-list/services-list.component.ts
index 72cacc7e..5fc7e5a7 100644
--- a/usecaseui-portal/src/app/views/services/services-list/services-list.component.ts
+++ b/usecaseui-portal/src/app/views/services/services-list/services-list.component.ts
@@ -1011,7 +1011,10 @@ export class ServicesListComponent implements OnInit {
service.tips = "";
service.statusClass = "1004";
let id = service.nsInstanceId || service["service-instance-id"] || service["vnfNsInstanceId"];
- this.myhttp.healNsService(id, requestBody)
+ let paramsObj = {
+ "ns_instance_id":id
+ };
+ this.myhttp.healNsService(paramsObj, requestBody)
.subscribe((data) => {
if (data.status == "FAILED") {
console.log("heal nsvnf service Failed :" + JSON.stringify(data));
@@ -1226,7 +1229,10 @@ export class ServicesListComponent implements OnInit {
}
return this.queryNsProgress(jobid, null, updata, operationType);
}).then(() => {
- this.myhttp.nsDeleteInstance(id)
+ let paramsObj = {
+ "ns_instance_id":id
+ };
+ this.myhttp.nsDeleteInstance(paramsObj)
.subscribe((data) => {
console.log(data);
service.rate = 100;
@@ -1263,8 +1269,11 @@ export class ServicesListComponent implements OnInit {
}
stopNsService(id, obj) {
+ let paramsObj = {
+ "ns_instance_id":id
+ }
let mypromise = new Promise((res, rej) => {
- this.myhttp.stopNsService(id, obj)
+ this.myhttp.stopNsService(paramsObj, obj)
.subscribe((data) => {
this.loadingAnimateShow = false;
if (data.status == "FAILED") {
@@ -1280,9 +1289,10 @@ export class ServicesListComponent implements OnInit {
queryProgress(obj, callback) {
let mypromise = new Promise((res, rej) => {
+ let operationTypeObj = {operationType:obj.operationType};
let errorNums = 180;
let requery = () => {
- this.myhttp.getProgress(obj)
+ this.myhttp.getProgress(obj,operationTypeObj)
.subscribe((data) => {
if (data.status == "FAILED") {
callback({ progress: 255, status: "Failed" });
@@ -1321,8 +1331,13 @@ export class ServicesListComponent implements OnInit {
queryNsProgress(jobid, id, callback, operationType) {
let mypromise = new Promise((res, rej) => {
let errorNums = 180;
+ let paramsObj = {
+ "responseId":0,
+ "serviceInstanceId":id,
+ "operationType":operationType
+ }
let requery = () => {
- this.myhttp.getNsProgress(jobid, id, operationType)
+ this.myhttp.getNsProgress(jobid,paramsObj)
.subscribe((data) => {
if (data.status == "FAILED") {
callback({ progress: 255, status: "Failed" });