chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
export class NodeSelectorController {
|
||||
/* @ngInject */
|
||||
constructor(AgentService, Notifications) {
|
||||
Object.assign(this, { AgentService, Notifications });
|
||||
}
|
||||
|
||||
async $onInit() {
|
||||
try {
|
||||
const agents = await this.AgentService.agents(this.endpointId);
|
||||
this.agents = agents;
|
||||
if (!this.model) {
|
||||
this.model = agents[0].NodeName;
|
||||
}
|
||||
} catch (err) {
|
||||
this.Notifications.error('Failure', err, 'Unable to load agents');
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user