Untitled
unknown
plain_text
2 years ago
1.6 kB
17
Indexable
getAllNodesAdmin() {
const dummyGrpJson = {};
dummyGrpJson['adminNodeName'] = '*ALL';
this.appService.masterWrapperAdmin(
this.appCommonService.designMaterRequest({
'allparameters': this.commonUtilitiesLib.copy(dummyGrpJson),
'verbtype': 'get',
'apisname': ['ADMINUSERNODENAMES'],
'responseformat': 'rest'
})
).subscribe((success: any) => {
const nodes = success.data[0].ADMINUSERNODENAMES;
if(!nodes[0]['messageCode']) {
this.exportData = this.commonUtilitiesLib.copy(nodes);
this.exportData = nodes.map(node => {
return {
...node,
nodeDescription: node.nodeDescription ? node.nodeDescription : '', // Change nodeDescription to empty string if it's null
};
});
for (let i = 0; i < nodes.length; i++) {
nodes[i].adminProtocol = nodes[i].adminProtocol.toUpperCase();
this.tableData[i] = nodes[i];
this.tableData[i]['highlight'] = false;
}
}
else{
this.exportData = [];
}
this.sourceData = this.tableData;
this.paginationConf.pageNumber = 1;
this.displayData( this.paginationConf.pageNumber, this.paginationConf.itemPerPage);
}, error => {
this.tableData = [];
});
}Editor is loading...