Settings now does not download credentials. Design changes

This commit is contained in:
root 2016-07-05 19:37:46 +00:00
parent 3629a01649
commit 88ec777087
6 changed files with 75 additions and 30 deletions

View File

@ -12,7 +12,6 @@ require('ui/chrome').setNavBackground('#222222').setTabs([
{ id: 'manager', title: 'Manager' },
{ id: 'agents', title: 'Agents' },
{ id: 'ruleset', title: 'Ruleset' },
{ id: 'osseclog', title: 'Ossec.log' },
{ id: 'FIM', title: 'FIM' },
{ id: 'rootcheck', title: 'Rootcheck' },
{ id: 'settings', title: 'Settings' }

View File

@ -336,8 +336,14 @@ app.controller('rulesetController', function ($scope, $route, $q, alertify, shar
case 'check_diff':
tooltip = 'Used to determine when the output of a command changes.';
break;
case 'noalert':
tooltip = 'Do not trigger this alert.';
break;
case 'if_fts':
tooltip = 'If first time seen.';
break;
default:
tooltip = '';
tooltip = 'Tooltip not found for this field.';
break;
}
return '<div style="width: 250px;">' + tooltip + '</div>';
@ -476,7 +482,7 @@ app.controller('rulesetController', function ($scope, $route, $q, alertify, shar
tooltip = 'First time seen';
break;
default:
tooltip = '';
tooltip = 'Tooltip not found for this field.';
break;
}
return '<div style="width: 250px;">' + tooltip + '</div>';

View File

@ -7,33 +7,9 @@ app.controller('settingsController', function ($scope, $http, $q, testConnection
$scope.formData = {};
$scope.formData.user = "";
// Load settings function
$scope.loadSettings = function () {
var defered = $q.defer();
var promise = defered.promise;
$http.get("/elasticsearch/.kibana/wazuh-configuration/1").success(function (data, status) {
$scope.formData.user = data._source.api_user;
$scope.formData.password = base64.decode(data._source.api_password);
$scope.formData.url = data._source.api_url;
$scope.formData.insecure = data._source.insecure;
defered.resolve(1);
}).error(function (data, status) {
defered.reject(1);
});
return promise;
};
//Controller first steps...
$http.get("/elasticsearch/.kibana/wazuh-configuration/1")
.error(function (data) {
alertify.delay(0).closeLogOnClick(true).success("Welcome to Wazuh application for Kibana! Please, set a Wazuh RESTful API URL and valid credentials.");
}).success(function (data) {
// Call Load settings
$scope.loadSettings().then(makeTest, function () {
alertify.delay(0).closeLogOnClick(true).error('Could not connect with elasticsearch at <a href="/elasticsearch/.kibana">/elasticsearch/.kibana/</a>.');
});
});
$scope.formData.password = "";
$scope.formData.url = "";
$scope.formData.insecure = true;
// Save settings function
$scope.saveSettings = function (test) {

View File

@ -1253,4 +1253,58 @@ input.cmn-toggle-round:checked + label:after {
text-align: center;
width: 200px;
font-weight: bold;
}
/* Wazuh submenu */
.wazuh-submenu {
background: #222;
border: 1px;
border: 1px;
border-color: #222;
color: #fff;
height: 30px;
display: inline-block;
padding-left: 0px;
}
.wazuh-submenu > li {
float: left;
position: relative;
display: block;
height: 30px;
}
.wazuh-submenu > li > a {
padding: 10px 15px;
position: relative;
display: block;
line-height: 18px;
padding-top: 5px;
padding-bottom: 5px;
color: #fff;
height: 30px;
}
.wazuh-submenu > li > a:hover {
color: #ffffff;
background-color: #555555;
cursor: pointer;
}
.wazuh-submenu > .active {
background-color: #41454c;
height: 30px;
}
.wazuh-submenu > .active > a:before {
content: "";
display: inline-block;
position: absolute;
border: 7px solid transparent;
border-bottom-color: inherit;
top: 16px;
left: 0;
right: 0;
margin: 0 auto;
width: 0;
height: 0;
}

View File

@ -1,3 +1,8 @@
<div ng-if="!load">
<ul class="wazuh-submenu">
<li><a href="/app/wazuh#/osseclog">OSSEC Logs <span class="glyphicon glyphicon-arrow-right"></span></a></li>
</ul>
</div>
<div class="container" ng-controller="managerController">
<div ng-if="load" style="text-align: center;">
<img style="display: inline-block; width: auto;" src="/plugins/wazuh/img/loading.gif"></img>

View File

@ -1,3 +1,8 @@
<div ng-if="!load">
<ul class="wazuh-submenu">
<li><a href="/app/wazuh#/manager"><span class="glyphicon glyphicon-arrow-left"></span> Back</a></li>
</ul>
</div>
<div class="container" ng-controller="osseclogController">
<div ng-if="load" style="text-align: center;">
<img style="display: inline-block; width: auto;" src="/plugins/wazuh/img/loading.gif"></img>