aboutsummaryrefslogtreecommitdiffstats
path: root/src/app/test/test.component.ts
diff options
context:
space:
mode:
authorsj108s <sj108s@us.att.com>2018-03-21 21:25:39 +0530
committersj108s <sj108s@us.att.com>2018-03-22 15:21:26 +0530
commitb694d95b5143e63afa03b64287f3046a2951e64a (patch)
treefd2c0e5203efbbb48c3bce5e92c3624743335933 /src/app/test/test.component.ts
parent36e91d5f969f22424509c112e154bdcdffa99521 (diff)
Fixed couple more defects related to test screen
Fixed poll status button alignment and fixed minore defect in test screen and updated test cases as per code change Issue-ID: APPC-713 Change-Id: I530739fda78d6ca05fba4cbfaacef8ead3b7c23d Signed-off-by: sj108s <sj108s@us.att.com>
Diffstat (limited to 'src/app/test/test.component.ts')
-rw-r--r--src/app/test/test.component.ts27
1 files changed, 16 insertions, 11 deletions
diff --git a/src/app/test/test.component.ts b/src/app/test/test.component.ts
index a7516ec..2fd8525 100644
--- a/src/app/test/test.component.ts
+++ b/src/app/test/test.component.ts
@@ -17,7 +17,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-ECOMP is a trademark and service mark of AT&T Intellectual Property.
============LICENSE_END============================================
*/
@@ -194,7 +193,7 @@ export class TestComponent implements OnInit {
this.showStatusResponseDiv = false;
this.errorResponse = '';
this.statusResponse = '';
- this.enableDownload=true;
+ this.enableDownload = true;
let arrData = (<AOA>(XLSX.utils.sheet_to_json(ws, { blankrows: false })));
@@ -210,10 +209,10 @@ export class TestComponent implements OnInit {
// Refactor
this.payload = this.processUploadedFile(arrData);
this.uploadedFileResult();
- };
+ };
reader.readAsBinaryString(target.files[0]);
-
+
}
else {
@@ -236,7 +235,7 @@ export class TestComponent implements OnInit {
}
}
-processUploadedFile(arrData) {
+ processUploadedFile(arrData) {
let tempPayload = {};
for (var i = 0; i < arrData.length; i++) {
var element = arrData[i];
@@ -252,7 +251,7 @@ processUploadedFile(arrData) {
}
}
-
+
if (element['List Name'] === 'payload') {
var listName1 = element['List Name_1'];
var listName2 = element['List Name_2'];
@@ -280,7 +279,7 @@ processUploadedFile(arrData) {
return tempPayload;
}
- uploadedFileResult() {
+ uploadedFileResult() {
if (this.action && this.actionIdentifiers['vnf-id']) {
this.nService.success('Success', 'SpreadSheet uploaded successfully');
}
@@ -459,23 +458,29 @@ processUploadedFile(arrData) {
}
else {
this.showStatusResponseDiv = false;
+ if (this.subscribe && this.subscribe != undefined) {
+ this.subscribe.unsubscribe();
+ this.enablePollButton = true;
+ }
+
}
-
},
error => {
this.statusResponse = null;
this.showStatusResponseDiv = false;
this.errorResponse = 'Error Connecting to APPC server';
this.enableCounterDiv = false;
- if (this.subscribe && this.subscribe != undefined) this.subscribe.unsubscribe();
+ if (this.subscribe && this.subscribe != undefined) {
+ this.subscribe.unsubscribe();
+ this.enablePollButton = true;
+ }
});
-
}
else {
this.nService.error("Error", "Please enter vnf Id & request Id");
}
-
+
}
getUrlEndPoint(action) {