Revert "Restrict controller loading"

This reverts commit 13dea09755.
This commit is contained in:
Jesús Ángel 2019-08-29 14:26:27 +02:00
parent 4ab4654602
commit ba24694a0f
17 changed files with 19 additions and 23 deletions

View File

@ -259,7 +259,6 @@ export class OverviewController {
// Switch tab
async switchTab(newTab, force = false) {
this.loading = true;
this.$rootScope.rendered = false;
this.$rootScope.$applyAsync();
this.falseAllExpand();
@ -305,10 +304,8 @@ export class OverviewController {
this.tabVisualizations.setTab(newTab);
if (this.tab === newTab && !force) {
this.loading = false;
return;
}
if (this.tab === newTab && !force) return;
const sameTab =
((this.tab === newTab && this.tabHistory.length < 2) ||
(this.tabHistory.length === 2 &&
@ -332,7 +329,6 @@ export class OverviewController {
}
this.setTabs();
this.$scope.$applyAsync();
this.loading = false;
return;
}

View File

@ -1,5 +1,5 @@
<md-content flex layout="column" ng-if="octrl.tab === 'audit' && octrl.tabView === 'panels'"
ng-class="{'no-opacity': resultState !== 'ready' || !rendered || octrl.loading}" layout-align="space-around">
ng-class="{'no-opacity': resultState !== 'ready' || !rendered}" layout-align="space-around">
<div layout="row" layout-align="center stretch" class="height-250">
<md-card flex="25" class="wz-md-card" ng-class="{'fullscreen': octrl.expandArray[0]}">

View File

@ -1,5 +1,5 @@
<md-content flex layout="column" ng-if="octrl.tab === 'aws' && octrl.tabView === 'panels'"
ng-class="{'no-opacity': resultState !== 'ready' || !rendered || octrl.loading}" layout-align="start">
ng-class="{'no-opacity': resultState !== 'ready' || !rendered}" layout-align="start">
<div layout="row" class="height-250">
<md-card flex class="wz-md-card" ng-class="{'fullscreen': octrl.expandArray[0]}">
<md-card-content class="wazuh-column">

View File

@ -1,5 +1,5 @@
<md-content flex layout="column" ng-if="octrl.tab === 'ciscat' && octrl.tabView === 'panels'"
ng-class="{'no-opacity': resultState !== 'ready' || !rendered || octrl.loading}" layout-align="start">
ng-class="{'no-opacity': resultState !== 'ready' || !rendered}" layout-align="start">
<!-- Metric bar section -->
<div layout="row" layout-align="start center">

View File

@ -1,5 +1,5 @@
<md-content flex layout="column" ng-if="octrl.tab === 'docker' && octrl.tabView === 'panels'"
ng-class="{'no-opacity': resultState !== 'ready' || !rendered || octrl.loading}">
ng-class="{'no-opacity': resultState !== 'ready' || !rendered}">
<div layout="row" class="height-300">

View File

@ -1,4 +1,4 @@
<md-content flex layout="column" ng-if="octrl.tab === 'fim' && octrl.tabView === 'panels'" ng-class="{'no-opacity': resultState !== 'ready' || !rendered || octrl.loading}">
<md-content flex layout="column" ng-if="octrl.tab === 'fim' && octrl.tabView === 'panels'" ng-class="{'no-opacity': resultState !== 'ready' || !rendered}">
<div layout="row" class="height-400">
<md-card flex class="wz-md-card" ng-class="{'fullscreen': octrl.expandArray[0]}">

View File

@ -1,5 +1,5 @@
<md-content flex layout="column" ng-if="octrl.tab === 'gdpr' && octrl.tabView === 'panels'"
ng-class="{'no-opacity': resultState !== 'ready' || !rendered || octrl.loading}" layout-align="start">
ng-class="{'no-opacity': resultState !== 'ready' || !rendered}" layout-align="start">
<div ng-if="octrl.gdprReqs" class="wz-margin-10">
<react-component name='RequirementCard' props="octrl.gdprReqs"/>

View File

@ -1,5 +1,5 @@
<md-content flex layout="column" ng-if="octrl.tab === 'general' && octrl.tabView === 'panels'" layout-align="start"
ng-class="{'no-opacity': resultState !== 'ready' || !rendered || octrl.loading}">
ng-class="{'no-opacity': resultState !== 'ready' || !rendered}">
<div layout="row" layout-padding>
<react-component flex name="AlertsStats" props="{

View File

@ -1,5 +1,5 @@
<md-content flex layout="column" ng-if="octrl.tab === 'hipaa' && octrl.tabView === 'panels'"
ng-class="{'no-opacity': resultState !== 'ready' || !rendered || octrl.loading}" layout-align="start">
ng-class="{'no-opacity': resultState !== 'ready' || !rendered}" layout-align="start">
<div ng-if="octrl.hipaaReqs" class="wz-margin-10">
<react-component name='RequirementCard' props="octrl.hipaaReqs" />

View File

@ -1,4 +1,4 @@
<md-content flex layout="column" ng-if="octrl.tab === 'nist' && octrl.tabView === 'panels'" ng-class="{'no-opacity': resultState !== 'ready' || !rendered || octrl.loading}"
<md-content flex layout="column" ng-if="octrl.tab === 'nist' && octrl.tabView === 'panels'" ng-class="{'no-opacity': resultState !== 'ready' || !rendered}"
layout-align="start">
<div ng-if="octrl.nistReqs" class="wz-margin-10">

View File

@ -1,4 +1,4 @@
<md-content flex layout="column" ng-if="octrl.tab === 'oscap' && octrl.tabView === 'panels'" ng-class="{'no-opacity': resultState !== 'ready' || !rendered || octrl.loading}"
<md-content flex layout="column" ng-if="octrl.tab === 'oscap' && octrl.tabView === 'panels'" ng-class="{'no-opacity': resultState !== 'ready' || !rendered}"
layout-align="start">
<div layout="row">

View File

@ -1,4 +1,4 @@
<md-content flex layout="column" ng-if="octrl.tab === 'osquery' && octrl.tabView === 'panels'" ng-class="{'no-opacity': resultState !== 'ready' || !rendered || octrl.loading}"
<md-content flex layout="column" ng-if="octrl.tab === 'osquery' && octrl.tabView === 'panels'" ng-class="{'no-opacity': resultState !== 'ready' || !rendered}"
layout-align="start">
<div layout="row">
<md-card flex class="wz-metric-color wz-md-card">

View File

@ -1,5 +1,5 @@
<md-content flex layout="column" ng-if="octrl.tab === 'pci' && octrl.tabView === 'panels'"
ng-class="{'no-opacity': resultState !== 'ready' || !rendered || octrl.loading}" layout-align="start">
ng-class="{'no-opacity': resultState !== 'ready' || !rendered}" layout-align="start">
<div ng-if="octrl.pciReqs" class="wz-margin-10">
<react-component name='RequirementCard' props="octrl.pciReqs"/>

View File

@ -1,4 +1,4 @@
<md-content flex layout="column" ng-if="octrl.tab === 'pm' && octrl.tabView === 'panels'" ng-class="{'no-opacity': resultState !== 'ready' || !rendered || octrl.loading}"
<md-content flex layout="column" ng-if="octrl.tab === 'pm' && octrl.tabView === 'panels'" ng-class="{'no-opacity': resultState !== 'ready' || !rendered}"
layout-align="start">
<div layout="row" layout-align="center stretch" class="height-290">

View File

@ -1,5 +1,5 @@
<md-content flex layout="column" ng-if="octrl.tab === 'virustotal' && octrl.tabView === 'panels'"
ng-class="{'no-opacity': resultState !== 'ready' || !rendered || octrl.loading}" layout-align="start">
ng-class="{'no-opacity': resultState !== 'ready' || !rendered}" layout-align="start">
<div layout="row">
<md-card flex class="wz-metric-color wz-md-card">

View File

@ -1,4 +1,4 @@
<md-content flex layout="column" ng-if="octrl.tab === 'vuls' && octrl.tabView === 'panels'" ng-class="{'no-opacity': resultState !== 'ready' || !rendered || octrl.loading}"
<md-content flex layout="column" ng-if="octrl.tab === 'vuls' && octrl.tabView === 'panels'" ng-class="{'no-opacity': resultState !== 'ready' || !rendered}"
layout-align="start">
<div layout="row" layout-padding>

View File

@ -57,7 +57,7 @@
<!-- Loading status section -->
<div layout="column" layout-align="center center"
ng-if="(octrl.tab !== 'welcome' && octrl.tabView === 'panels' && !rendered) || octrl.loading">
ng-if="octrl.tab !== 'welcome' && octrl.tabView === 'panels' && !rendered">
<div class="percentage"><i class="fa fa-fw fa-spin fa-spinner" aria-hidden="true"></i></div>
<div class="percentage">{{loadingStatus}}</div>
</div>
@ -73,7 +73,7 @@
<!-- No results section -->
<div layout="row" class="wz-margin-top-10 wz-margin-right-8 wz-margin-left-8" ng-if="octrl.tab !== 'welcome'"
ng-show="resultState === 'none' && octrl.tabView === 'panels' && !octrl.loading">
ng-show="resultState === 'none' && octrl.tabView === 'panels'">
<react-component flex name="EuiCallOut" props="{color:'warning',iconType:'help', title:'There are no results for selected time range. Try another
one.'}" />
</div>