summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app
diff options
context:
space:
mode:
authorKeguang He <hekeguang@chinamobile.com>2022-09-26 09:31:39 +0000
committerGerrit Code Review <gerrit@onap.org>2022-09-26 09:31:39 +0000
commit3fca60b65da1e9ef14f0d31a4b989320a8ec5f93 (patch)
tree2c8c625e4cc2ed0a5c14c995db4b6fefb47c720b /usecaseui-portal/src/app
parent20446be3f68ac27179c6591a94384852b16a59fa (diff)
parent8673d020994a66bb98b456130f887a2ee822bd37 (diff)
Merge "Joint debugging interface of front and rear platform"
Diffstat (limited to 'usecaseui-portal/src/app')
-rw-r--r--usecaseui-portal/src/app/core/services/intentManagement.service.ts11
-rw-r--r--usecaseui-portal/src/app/views/intent-management/input-intent-management/input-intent-management.component.ts20
-rw-r--r--usecaseui-portal/src/app/views/intent-management/intent-management.component.ts4
3 files changed, 24 insertions, 11 deletions
diff --git a/usecaseui-portal/src/app/core/services/intentManagement.service.ts b/usecaseui-portal/src/app/core/services/intentManagement.service.ts
index eb9ad2b3..12fce9d4 100644
--- a/usecaseui-portal/src/app/core/services/intentManagement.service.ts
+++ b/usecaseui-portal/src/app/core/services/intentManagement.service.ts
@@ -26,7 +26,8 @@ export class IntentManagementService {
url = {
createIntentManagement: this.baseUrl + "/api/usecaseui-intent-analysis/v1/intents",
getIntentManagement: this.baseUrl + "/api/usecaseui-intent-analysis/v1/intents",
- deleteIntentManagement: this.baseUrl + "/api/usecaseui-intent-analysis/v1/intents",
+ deleteIntentManagement: this.baseUrl + "/api/usecaseui-intent-analysis/v1/intents/",
+ updateIntentManagementData: this.baseUrl + "/api/usecaseui-intent-analysis/v1/intents/"
};
// intentManagement
@@ -37,7 +38,9 @@ export class IntentManagementService {
return this.http.post<any>(this.url["createIntentManagement"], requestBody);
}
deleteIntentManagementData(intentId) {
- let params = new HttpParams({ fromObject: { "intentId": intentId } });
- return this.http.delete<any>(this.url.deleteIntentManagement, { params });
-}
+ return this.http.delete<any>(this.url.deleteIntentManagement + intentId);
+ }
+ updateIntentManagementData(id, requestBody) {//更新接口未完成
+ return this.http.put<any>(this.url.updateIntentManagementData + id, requestBody);
+ }
}
diff --git a/usecaseui-portal/src/app/views/intent-management/input-intent-management/input-intent-management.component.ts b/usecaseui-portal/src/app/views/intent-management/input-intent-management/input-intent-management.component.ts
index 180afcad..1a6b95e2 100644
--- a/usecaseui-portal/src/app/views/intent-management/input-intent-management/input-intent-management.component.ts
+++ b/usecaseui-portal/src/app/views/intent-management/input-intent-management/input-intent-management.component.ts
@@ -67,12 +67,12 @@ export class InputIntentManagementComponent implements OnInit {
this.modalOpreation.emit({ "cancel": true });
}
handleOk(): void {
- this.showModel = false;
if(JSON.stringify(this.editIntentTableData)==='{}'){
this.defaultParams['intentId']=this.Util.getUuid()
+ this.createIntentInstance()
+ }else{
+ this.editIntentInstanceData()
}
- this.createIntentInstance()
- this.modalOpreation.emit({ "cancel": false, "param": this.defaultParams });
this.clearIntentData()
}
clearIntentData(): void{
@@ -138,6 +138,7 @@ export class InputIntentManagementComponent implements OnInit {
...this.defaultParams
}).subscribe(
(response) => {
+ this.showModel = false;
this.modalOpreation.emit({ "cancel": false });
},
(err) => {
@@ -145,4 +146,17 @@ export class InputIntentManagementComponent implements OnInit {
}
)
}
+ editIntentInstanceData(): void {
+ let id = this.defaultParams['intentId'];
+ let obj = this.defaultParams;
+ this.myhttp.updateIntentManagementData(id,obj).subscribe(
+ (response) => {
+ this.showModel = false;
+ this.modalOpreation.emit({ "cancel": false});
+ },
+ (err) => {
+ console.log(err);
+ }
+ )
+ }
} \ No newline at end of file
diff --git a/usecaseui-portal/src/app/views/intent-management/intent-management.component.ts b/usecaseui-portal/src/app/views/intent-management/intent-management.component.ts
index acd37ec9..7fc9f7e6 100644
--- a/usecaseui-portal/src/app/views/intent-management/intent-management.component.ts
+++ b/usecaseui-portal/src/app/views/intent-management/intent-management.component.ts
@@ -39,10 +39,6 @@ export class IntentManagementComponent implements OnInit {
if ($event.cancel) {
return;
}
- if(this.currentIndex>-1){
- this.listOfData[this.currentIndex]=$event.param
- this.currentIndex=-1
- }
this.getIntentManagementData()
}
editIntentList(data,i): void {