mirror of
https://github.com/valitydev/wazuh-kibana-app.git
synced 2024-11-07 02:15:24 +00:00
Optimized agent welcome screen - 1
This commit is contained in:
parent
506c1e9b2e
commit
ab67abaebb
@ -292,7 +292,9 @@ class AgentsController {
|
||||
}
|
||||
|
||||
// Switch tab
|
||||
switchTab(tab, force = false) {
|
||||
async switchTab(tab, force = false) {
|
||||
try {
|
||||
if(tab === 'syscollector') await this.loadSyscollector(this.$scope.agent.id);
|
||||
if (tab === 'configuration') {
|
||||
this.$scope.switchConfigurationTab('welcome');
|
||||
} else {
|
||||
@ -329,6 +331,9 @@ class AgentsController {
|
||||
|
||||
this.shareAgent.deleteTargetLocation();
|
||||
this.targetLocation = null;
|
||||
} catch(error) {
|
||||
return Promise.reject(error)
|
||||
}
|
||||
}
|
||||
|
||||
// Agent data
|
||||
@ -472,9 +477,9 @@ class AgentsController {
|
||||
// Configuration synced
|
||||
this.$scope.isSynchronized = isSync && isSync.synced;
|
||||
|
||||
this.$scope.switchTab(this.$scope.tab, true);
|
||||
await this.$scope.switchTab(this.$scope.tab, true);
|
||||
|
||||
await this.loadSyscollector(id);
|
||||
if(this.$scope.tab === 'syscollector') await this.loadSyscollector(id);
|
||||
|
||||
this.$scope.load = false;
|
||||
if (!this.$scope.$$phase) this.$scope.$digest();
|
||||
@ -554,7 +559,7 @@ class AgentsController {
|
||||
this.$scope.load = false;
|
||||
|
||||
if (this.$scope.tab !== 'configuration')
|
||||
this.$scope.switchTab(this.$scope.tab, true);
|
||||
await this.$scope.switchTab(this.$scope.tab, true);
|
||||
|
||||
if (!this.$scope.$$phase) this.$scope.$digest();
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user