diff options
Diffstat (limited to 'usecaseui-portal')
3 files changed, 61 insertions, 106 deletions
diff --git a/usecaseui-portal/src/app/onboard.service.ts b/usecaseui-portal/src/app/onboard.service.ts index 71b2f97c..017bf9fb 100644 --- a/usecaseui-portal/src/app/onboard.service.ts +++ b/usecaseui-portal/src/app/onboard.service.ts @@ -49,8 +49,7 @@ export class onboardService { //--------------------------------------------------------------------------------------- /* line up 线上*/ - baseUrl = "/api/usecaseui/server/v1/uui-lcm/"; - baseUrlUp = "/api/usecaseui/server/v1/"; + baseUrl = "/api/usecaseui-server/v1/uui-lcm/"; url = { // 数据列表Data onboardTableData: this.baseUrl + "ns-packages", @@ -75,6 +74,7 @@ export class onboardService { deleteVnfPack: this.baseUrl + "deleteVnfPackage?vnfPkgId=", // Delete Pnf package deletePnfPack: this.baseUrl + "deletePnfPackage?pnfPkgId=", + // // download ns package // downloadNsData: this.baseUrl + "downLoadNsPackage?nsdInfoId=XXXXX", // //download vnf package @@ -82,49 +82,43 @@ export class onboardService { } - //-----------------------------------Function-start------------------------------------------------------ - /* 查询数据列表 */ + //-----------------------------------Function-local-start------------------------------------------------------ + /* Query data list */ // NS Data - getOnboardTableData(paramsObj): Observable<HttpResponse<any>> { - let params = new HttpParams({ fromObject: paramsObj }); - return this.http.get<any>(this.url.onboardTableData, { observe: 'response', params }); - // return this.http.get<any>(this.url["onboardTableData"]); + getOnboardTableData() { + return this.http.get<any>(this.url.onboardTableData); + // return this.http.get<any>(this.url["onboardTableData"]); } - // NS SDC Data - getSDC_NSTableData(paramsObj): Observable<HttpResponse<onboardTableData>> { - let params = new HttpParams({ fromObject: paramsObj }); - return this.http.get<onboardTableData>(this.url.sdc_nsListData, { observe: 'response', params }); - // return this.http.get<any>(this.url["onboardTableData"]); + getSDC_NSTableData(){ + return this.http.get<any>(this.url.sdc_nsListData); + // return this.http.get<any>(this.url["onboardTableData"]); } - // VNF Data - getOnboardTableVnfData(paramsObj): Observable<HttpResponse<onboardDataVNF>> { - let params = new HttpParams({ fromObject: paramsObj }); - return this.http.get<any>(this.url.onboardDataVNF, { observe: 'response', params }); + getOnboardTableVnfData() { + return this.http.get<any>(this.url.onboardDataVNF); } // onboard VNF sdc Data getSDC_VNFTableData() { - return this.http.get<any>(this.url["sdc_vnfListData"]); + return this.http.get<any>(this.url["sdc_vnfListData"]); } - + // PNF Data - getOnboardTablePnfData(paramsObj): Observable<HttpResponse<onboardDataPNF>> { - let params = new HttpParams({ fromObject: paramsObj }); - return this.http.get<any>(this.url.onboardDataPNF, { observe: 'response', params }); + getOnboardTablePnfData() { + return this.http.get<any>(this.url.onboardDataPNF); } //------------------------------------------------------------------------------------- - //创建--上传前拖拽文件后,获取到id //线上接口 post - // getCreatensData(url_upId,requestBody) { - // return this.http.post<any>(this.url.creatensData.replace("_jsonData",url_upId),requestBody); //线上 - // } - - //创建--上传前拖拽文件后,获取到id //本地json get - getCreatensData(url_upId) { - return this.http.get<any>(this.url.creatensData.replace("_jsonData", url_upId)); + //create--Get the id after dragging the file before uploading //on-line post + getCreatensData(url_upId,requestBody) { + return this.http.post<any>(this.url.creatensData.replace("_jsonData",url_upId),requestBody); //线上 } + //create--Get the id after dragging the file before uploading //local json get + // getCreatensData(url_upId) { + // return this.http.get<any>(this.url.creatensData.replace("_jsonData", url_upId)); + // } + //------------------------------------------------------------------------------ //onboard sdc ns getNsonboard(requestBody) { @@ -174,7 +168,9 @@ export class onboardService { //online test // return this.http.delete<any>(this.url["deletePnfpack"] + paramsObj); } - //------------------------------------------------------------------------------ + //-----------------------------------------Function-local-end------------------------------------- + + // download nspak // downloadNsData(paramsObj): Observable<HttpResponse<any>> { // console.log(66,paramsObj) diff --git a/usecaseui-portal/src/app/services/onboard-vnf-vm/onboard-vnf-vm.component.html b/usecaseui-portal/src/app/services/onboard-vnf-vm/onboard-vnf-vm.component.html index 46a6c818..44b4adec 100644 --- a/usecaseui-portal/src/app/services/onboard-vnf-vm/onboard-vnf-vm.component.html +++ b/usecaseui-portal/src/app/services/onboard-vnf-vm/onboard-vnf-vm.component.html @@ -43,7 +43,7 @@ <i nz-icon type="inbox" class="anticon anticon-inbox"></i> </p> <p class="ant-upload-text">Click or drag file to this area to upload</p> - <p class="ant-upload-hint">Support for a single or bulk upload. Strictly prohibit from uploading company data or other band files</p> + <p class="ant-upload-hint"></p> </nz-upload> <button nz-button [nzLoading]="nsuploading" (click)="onClick(tab)" [disabled]="fileListNS.length == 0" style="margin-top: 16px"> diff --git a/usecaseui-portal/src/app/services/onboard-vnf-vm/onboard-vnf-vm.component.ts b/usecaseui-portal/src/app/services/onboard-vnf-vm/onboard-vnf-vm.component.ts index 3cdbf9cf..27d1c17c 100644 --- a/usecaseui-portal/src/app/services/onboard-vnf-vm/onboard-vnf-vm.component.ts +++ b/usecaseui-portal/src/app/services/onboard-vnf-vm/onboard-vnf-vm.component.ts @@ -93,25 +93,25 @@ export class OnboardVnfVmComponent implements OnInit { } - //before put 创建--上传之前将文件拖拽到页面时 - // requestBody = { - // "userDefinedData": { - // "additionalProp1": "string", - // "additionalProp2": "string", - // "additionalProp3": "string" - // } - // } + //before put create--Drag and drop files to the page before uploading + requestBody = { + "userDefinedData": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + } + } // requestBody = {}; // ns beforeUpload beforeUploadNS = (file: UploadFile): boolean => { this.fileListNS.push(file); console.log('beforeUpload'); - // this.myhttp.getCreatensData("createNetworkServiceData",requestBody)//线上 - this.myhttp.getCreatensData("creatensDataNS") //本地 + this.myhttp.getCreatensData("createNetworkServiceData",this.requestBody)//on-line + // this.myhttp.getCreatensData("creatensDataNS") //local .subscribe((data) => { - console.log("拖拽文件后返回的数据NS-->", data); + console.log("Data returned after dragging a file NS-->", data); this.nsdInfoId = data["id"]; - console.log("拖拽文件后返回的数据的id-->",this.nsdInfoId); + console.log("Data returned after dragging a fileid-->",this.nsdInfoId); }, (err) => { console.log(err); }) @@ -122,12 +122,12 @@ export class OnboardVnfVmComponent implements OnInit { beforeUploadVNF = (file: UploadFile): boolean => { this.fileListVNF.push(file); console.log('beforeUpload'); - // this.myhttp.getCreatensData("createVnfData",requestBody)//线上 - this.myhttp.getCreatensData("creatensDataVNF") //本地 + this.myhttp.getCreatensData("createVnfData",this.requestBody)//on-line + // this.myhttp.getCreatensData("creatensDataVNF") //local .subscribe((data) => { - console.log("拖拽文件后返回的数据VNF-->", data); + console.log("Data returned after dragging a fileVNF-->", data); this.vnfPkgId = data["id"]; - console.log("拖拽文件后返回的数据的id-->",this.vnfPkgId); + console.log("Data returned after dragging a file id-->",this.vnfPkgId); }, (err) => { console.log(err); }) @@ -138,12 +138,12 @@ export class OnboardVnfVmComponent implements OnInit { beforeUploadPNF = (file: UploadFile): boolean => { this.fileListPNF.push(file); console.log('beforeUpload'); - // this.myhttp.getCreatensData("createPnfData",requestBody) //线上 - this.myhttp.getCreatensData("creatensDataPNF") //本地 + this.myhttp.getCreatensData("createPnfData",this.requestBody) //on-line + // this.myhttp.getCreatensData("creatensDataPNF") //local .subscribe((data) => { - console.log("拖拽文件后返回的数据PNF-->", data); + console.log("Data returned after dragging a file PNF-->", data); this.pnfdInfoId = data["id"]; - console.log("拖拽文件后返回的数据的id-->",this.pnfdInfoId); + console.log("Data returned after dragging a file id-->",this.pnfdInfoId); }, (err) => { console.log(err); }) @@ -239,30 +239,24 @@ changeUploadingSta(tab) { // 获取NS列表 getTableData() { - // 查询参数: 当前页码,每页条数,排序方式 - let paramsObj = { - pageIndex: this.pageIndex, - pageSize: this.pageSize, - nameSort: this.sortValue - } //vfc - this.myhttp.getOnboardTableData(paramsObj) + this.myhttp.getOnboardTableData() .subscribe((data) => { console.log(data) - this.total = data["body"].length; //body length + // this.total = data["body"].length; //body length console.log( this.total) // this.sdData = data.body.tableList; - this.vfcData = data.body; + this.vfcData = data; console.log(typeof this.vfcData) - console.log("NSlist-vfc-->",data.body) + console.log("NSlist-vfc-->",data) }, (err) => { console.log(err); }) // sdc - this.myhttp.getSDC_NSTableData(paramsObj) + this.myhttp.getSDC_NSTableData() .subscribe((data) => { console.log('NSlist-sdc-->',data) - this.sdcData = data.body; + this.sdcData = data; this.tableData = this.MergeArray(this.vfcData, this.sdcData) // this.tableData = this.vfcData.concat(this.sdcData) }, (err) => { @@ -272,21 +266,14 @@ changeUploadingSta(tab) { // 获取vnf列表 getTableVnfData() { - // 查询参数: 当前页码,每页条数,排序方式 - let paramsObj = { - pageIndex: this.pageIndex, - pageSize: this.pageSize, - // nameSort: this.sortValue - } - this.myhttp.getOnboardTableVnfData(paramsObj) + this.myhttp.getOnboardTableVnfData() .subscribe((data) => { console.log("vnfList-->", data); // this.total = data["body"]; //body length // console.log( this.total) - this.vfcData = data.body; - // this.tableData = data.body; - console.log("vnfList-vfc-->",data.body) + this.vfcData = data; + console.log("vnfList-vfc-->",data) }, (err) => { console.log(err); }) @@ -305,36 +292,16 @@ changeUploadingSta(tab) { // 获取pnf列表 getTablePnfData() { - // 查询参数: 当前页码,每页条数,排序方式 - let paramsObj = { - pageIndex: this.pageIndex, - pageSize: this.pageSize, - // nameSort: this.sortValue - } - this.myhttp.getOnboardTablePnfData(paramsObj) + this.myhttp.getOnboardTablePnfData() .subscribe((data) => { console.log("pnfList-->", data); - this.total = data["body"]; //body length - this.tableData = data.body; + this.total = data["body"]; + this.tableData = data; }, (err) => { console.log(err); }) } - - // sort(sort: { key: string, value: string }): void { - // console.log(sort); - // this.sortName = sort.key; - // this.sortValue = sort.value; - // this.getTableData(); - // } - - //选择条数 - // searchNsData(reset: boolean = false) { - // console.log('dddd',reset) - // this.getTableData(); - // } - /* onboard 上传按钮 */ // ns onboard @@ -353,6 +320,7 @@ changeUploadingSta(tab) { nzContent: 'Package Onboard Failed!' }); } + updataNsService(id) { console.log(id); let requestBody = { @@ -373,11 +341,6 @@ changeUploadingSta(tab) { }) } - // searchVnfData(reset: boolean = false) { - // console.log('vvvv',reset) - // this.getTableVnfData(); - // } - // vnf onboard updataVnfService(id) { this.status = "Onboarding"; @@ -398,10 +361,6 @@ changeUploadingSta(tab) { }) } - // searchPnfData(reset: boolean = false) { - // console.log('pppp',reset) - // this.getTablePnfData(); - // } // pnf onboard ? updataPnfService(id) { |