Commit 31480ceb authored by Alicja Reniewicz's avatar Alicja Reniewicz
Browse files

checking if values are not null in nodes (for open stack)

parent 5c27de43
...@@ -110,7 +110,7 @@ export class VmListComponent implements OnInit { ...@@ -110,7 +110,7 @@ export class VmListComponent implements OnInit {
const locationId = vm.originId.split('/')[0]; const locationId = vm.originId.split('/')[0];
const location = this.locationList const location = this.locationList
.find(value => value.id === locationId); .find(value => value.id === locationId);
return location ? location.geoLocation.city : 'UNKNOWN'; return (location && location.geoLocation) ? location.geoLocation.city : 'UNKNOWN';
} }
userHasPermissionToSshConnection(vm: NodeCloudiator): boolean { userHasPermissionToSshConnection(vm: NodeCloudiator): boolean {
......
...@@ -54,8 +54,10 @@ export class ScheduleListComponent implements OnInit { ...@@ -54,8 +54,10 @@ export class ScheduleListComponent implements OnInit {
getTasksList(schedule: ScheduleCloudiator): string[] { getTasksList(schedule: ScheduleCloudiator): string[] {
const result = []; const result = [];
schedule.processes if (schedule.processes !== null) {
.forEach(value => result.push(value.task)); schedule.processes
.forEach(value => result.push(value.task));
}
return result; return result;
} }
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment