Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor fixes #270

Merged
merged 2 commits into from
Feb 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion public/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ require('plugins/wazuh/services/generic-request.js');
require('plugins/wazuh/services/data-handler.js');
require('plugins/wazuh/services/app-state.js');
require('plugins/wazuh/services/api-tester.js');
require('plugins/wazuh/services/implicit-filters.js');
require('plugins/wazuh/services/pattern-handler.js');

// Set up routes and views
Expand Down
15 changes: 3 additions & 12 deletions public/controllers/agents.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,25 @@ function ($scope, $location, $q, $rootScope, appState, genericReq, apiReq, Agent
$scope.extensions = appState.getExtensions().extensions;
$scope.agentsAutoComplete = AgentsAutoComplete;

// Check the url hash and retriew the tabView information
// Check the url hash and retrieve the tabView information
if ($location.search().tabView){
$scope.tabView = $location.search().tabView;
} else { // If tabView doesn't exist, default it to 'panels' view
} else { // If tabView doesn't exist, default it to 'panels'
$scope.tabView = "panels";
$location.search("tabView", "panels");
}

// Check the url hash and retrivew the tab information
if ($location.search().tab){
$scope.tab = $location.search().tab;
} else { // If tab doesn't exist, default it to 'general' view
} else { // If tab doesn't exist, default it to 'general'
$scope.tab = "general";
$location.search("tab", "general");

// Now we initialize the implicitFilter
$rootScope.currentImplicitFilter = "";
}

if ($scope.tab != 'configuration') {
$rootScope.loadedVisualizations = [];
$rootScope.rendered = false;
$rootScope.loadingStatus = "Fetching data...";
}

$rootScope.tabVisualizations = {
general : 7,
fim : 8,
Expand Down Expand Up @@ -206,7 +200,6 @@ function ($scope, $location, $q, $rootScope, appState, genericReq, apiReq, Agent
$location.path('/manager');
};


$scope.analizeAgents = async search => {
try {
$scope.agentsAutoComplete.filters = [];
Expand Down Expand Up @@ -262,7 +255,6 @@ function ($scope, $location, $q, $rootScope, appState, genericReq, apiReq, Agent
$scope.tabs = tabs;
$scope.selectedIndex = 0;


/** Agent configuration */
$scope.switchConfigTab = selected => {

Expand Down Expand Up @@ -346,5 +338,4 @@ function ($scope, $location, $q, $rootScope, appState, genericReq, apiReq, Agent
}
}
/** End of agent configuration */

});
10 changes: 3 additions & 7 deletions public/controllers/overview.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,25 @@ app.controller('overviewController', function ($scope, $location, $rootScope, ap
$rootScope.page = 'overview';
$scope.extensions = appState.getExtensions().extensions;

// Check the url hash and retriew the tabView information
// Check the url hash and retrieve the tabView information
if ($location.search().tabView) {
$scope.tabView = $location.search().tabView;
} else { // If tabView doesn't exist, default it to 'panels' view
} else { // If tabView doesn't exist, default it to 'panels'
$scope.tabView = 'panels';
$location.search('tabView', 'panels');
}

// Check the url hash and retrivew the tab information
if ($location.search().tab) {
$scope.tab = $location.search().tab;
} else { // If tab doesn't exist, default it to 'general' view
} else { // If tab doesn't exist, default it to 'general'
$scope.tab = 'general';
$location.search('tab', 'general');

// Now we initialize the implicitFilter
$rootScope.currentImplicitFilter = "";
}

$rootScope.loadedVisualizations = [];
$rootScope.rendered = false;
$rootScope.loadingStatus = "Fetching data...";

// This object represents the number of visualizations per tab; used to show a progress bar
$rootScope.tabVisualizations = {
general : 15,
Expand Down
4 changes: 2 additions & 2 deletions public/kibana-integrations/kibana-visualization.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var app = require('ui/modules').get('apps/webinar_app', [])
visID: '=visId',
specificTimeRange: '=specificTimeRange'
},
controller: function VisController($scope, $rootScope, $location, savedVisualizations, implicitFilters) {
controller: function VisController($scope, $rootScope, $location, savedVisualizations) {
if(!$rootScope.ownHandlers) $rootScope.ownHandlers = [];
let implicitFilter = '';
let visTitle = '';
Expand Down Expand Up @@ -53,7 +53,7 @@ var app = require('ui/modules').get('apps/webinar_app', [])
}

$("#"+$scope.visID).on('renderStart', () => {
$rootScope.loadingStatus = "Fetching data...";
// TBD: Use renderStart to couple it with renderComplete?
});

visHandler = loader.embedVisualizationWithSavedObject($("#"+$scope.visID), visualization, params);
Expand Down
156 changes: 0 additions & 156 deletions public/services/implicit-filters.js

This file was deleted.