From 60d181ad6ba838446171c40c2d88679a22a4faae Mon Sep 17 00:00:00 2001 From: zhangab Date: Tue, 20 Nov 2018 14:19:32 +0800 Subject: Increase the loading of the list Change-Id: I9ac26c1c657d6e0e8c51720d43ab5e9630877a47 Issue-ID: USECASEUI-159 Signed-off-by: zhangab --- .../onboard-vnf-vm/onboard-vnf-vm.component.html | 228 +++++++++++---------- .../onboard-vnf-vm/onboard-vnf-vm.component.less | 10 + .../onboard-vnf-vm/onboard-vnf-vm.component.ts | 11 +- 3 files changed, 141 insertions(+), 108 deletions(-) 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 3c849397..f0648ac1 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 @@ -14,7 +14,7 @@ limitations under the License. --> - +

Onboard {{tabTitle}}

@@ -29,51 +29,59 @@ style="margin-top: 16px"> {{ nsuploading ? 'Uploading' : 'Start Upload' }} - - - - NO - Name - Version - Onboarding State - Operational State - Usage State - Operation button - - - - - {{item.id}} - {{item.uuid}} - - {{item.nsdName}} - 无 - {{item.name}} - 无 - {{item.nsdVersion}} - 无 - {{ item.version }} - - {{item.nsdOnboardingState}} - - {{status}} - - - - {{item.nsdOperationalState}} - {{item.nsdUsageState}} - - - - - - - + +
+ + + + NO + Name + Version + Onboarding State + Operational State + Usage State + Operation button + + + + + {{item.id}} + {{item.uuid}} + + {{item.nsdName}} + 无 + {{item.name}} + 无 + {{item.nsdVersion}} + 无 + {{ item.version }} + + {{item.nsdOnboardingState}} + + {{status}} + + + + {{item.nsdOperationalState}} + {{item.nsdUsageState}} + + + + + + + +
+ +
@@ -89,40 +97,44 @@ style="margin-top: 16px"> {{ vnfuploading ? 'Uploading' : 'Start Upload' }} - - - - NO - Name - Version - Onboarding State - Operational State - Usage State - Operation button - - - - - {{item.id}} - {{item.uuid}} - {{item.vnfProductName}} - 无 - {{item.name}} - {{item.vnfdVersion}} - 无 - {{item.version}} - {{item.onboardingState}} - {{item.usageState}} - {{item.operationalState}} - - - - - - - + +
+ + + + NO + Name + Version + Onboarding State + Operational State + Usage State + Operation button + + + + + {{item.id}} + {{item.uuid}} + {{item.vnfProductName}} + 无 + {{item.name}} + {{item.vnfdVersion}} + 无 + {{item.version}} + {{item.onboardingState}} + {{item.usageState}} + {{item.operationalState}} + + + + + + + +
+
@@ -138,32 +150,36 @@ style="margin-top: 16px"> {{ pnfuploading ? 'Uploading' : 'Start Upload' }} - - - - NO - Name - Version - Onboarding State - Usage State - Operation button - - - - - {{item.id}} - {{item.pnfdName}} - {{item.pnfdVersion}} - {{item.pnfdOnboardingState}} - {{item.pnfdUsageState}} - - - - - - + +
+ + + + NO + Name + Version + Onboarding State + Usage State + Operation button + + + + + {{item.id}} + {{item.pnfdName}} + {{item.pnfdVersion}} + {{item.pnfdOnboardingState}} + {{item.pnfdUsageState}} + + + + + + +
+
diff --git a/usecaseui-portal/src/app/services/onboard-vnf-vm/onboard-vnf-vm.component.less b/usecaseui-portal/src/app/services/onboard-vnf-vm/onboard-vnf-vm.component.less index 099383a2..3d2d4a72 100644 --- a/usecaseui-portal/src/app/services/onboard-vnf-vm/onboard-vnf-vm.component.less +++ b/usecaseui-portal/src/app/services/onboard-vnf-vm/onboard-vnf-vm.component.less @@ -79,4 +79,14 @@ hr { } } } +} +.mask { + top: 0; + left: 0; + position: fixed; + width: 100%; + height: 100%; + opacity: 0.1; + background: black; + z-index: 1049; } \ No newline at end of file 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 766540c0..bf2b6572 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 @@ -69,7 +69,7 @@ export class OnboardVnfVmComponent implements OnInit { sortName = null; sortValue = null; tabs = ['NS', 'VNF', 'PNF']; - + isSpinning = false; isVisible = false; isOkLoading = false; showModal(): void { @@ -263,12 +263,14 @@ changeUploadingSta(tab) { // 获取NS列表 getTableData() { + this.isSpinning = true; //vfc this.myhttp.getOnboardTableData() .subscribe((data) => { console.log("NSlist-vfc-->",data); console.log("NSlist-length-vfc-->",data.length); this.nsvfcData = data; + //loading this.nstableData = this.nsvfcData }, (err) => { console.log(err); @@ -286,6 +288,7 @@ changeUploadingSta(tab) { }else if(this.nsvfcData.length != 0 && this.nssdcData.length === 0){ this.nstableData = this.nsvfcData.concat(this.nssdcData); //Array concat } + this.isSpinning = false; }, (err) => { console.log(err); }) @@ -295,6 +298,7 @@ changeUploadingSta(tab) { // 获取vnf列表 getTableVnfData() { + this.isSpinning = true; this.myhttp.getOnboardTableVnfData() .subscribe((data) => { console.log("vnfList--vnf>", data); @@ -319,18 +323,21 @@ changeUploadingSta(tab) { this.vnftableData = this.vnfvfcData.concat(this.vnfsdcData); //Array concat console.log(this.vnftableData) } + this.isSpinning = false; }, (err) => { console.log(err); }) } // 获取pnf列表 - getTablePnfData() { + getTablePnfData() { + this.isSpinning = true; this.myhttp.getOnboardTablePnfData() .subscribe((data) => { console.log("pnfList-->", data); console.log("pnfList-->", data.length); this.pnftableData = data; + this.isSpinning = false; }, (err) => { console.log(err); }) -- cgit 1.2.3-korg