mirror of
https://github.com/valitydev/wazuh-kibana-app.git
synced 2024-11-06 09:55:18 +00:00
Fix for RC1 and restyling Overview design
This commit is contained in:
parent
9b801e05f3
commit
5a493a5325
@ -359,4 +359,20 @@ button:hover, button:focus, button.focus{
|
||||
margin-top: 18px;border: none;
|
||||
height: 40px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
md-content{
|
||||
background-color: #f2f4f6;
|
||||
}
|
||||
md-card{
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
.horizontal-menu-right .buttonMenu{
|
||||
background-color: #3caed2;
|
||||
color: white;
|
||||
}
|
||||
.md-button.buttonMenu.md-default-theme:not([disabled]):hover, .md-button:not([disabled]):hover {
|
||||
background-color: rgba(60,174,210,0.7)
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@
|
||||
</span>
|
||||
</div>
|
||||
</md-toolbar>
|
||||
<md-content layout="row" layout-align="center start" ng-show="_agent" layout-padding" style="margin-right: 23px; ">
|
||||
<md-content class="horizontal-menu-right" layout="row" layout-align="center start" ng-show="_agent" layout-padding" style="margin-right: 23px; ">
|
||||
<md-nav-bar flex="40" style="padding-right: 0px;" md-selected-nav-item="submenuNavItem" nav-bar-aria-label="navigation submenu">
|
||||
<md-nav-item md-nav-click="submenuNavItem = 'overview'" name="overview">Overview</md-nav-item>
|
||||
<md-nav-item md-nav-click="submenuNavItem = 'fim'" name="fim">File Integrity</md-nav-item>
|
||||
@ -49,37 +49,37 @@
|
||||
</md-nav-bar>
|
||||
<md-content flex="60" style="margin-top: -6px" class="subNavLine secondLevelNavLine" layout="row" layout-align="end start">
|
||||
|
||||
<md-button style="margin-top: 11px !important;margin-bottom: 0px !important;" ng-show="!show_timer" ng-click="show_timer = !show_timer" class="md-primary" md-colors="::{background: 'primary-100', color: 'background-900'}" target="_blank">
|
||||
<md-button style="margin-top: 11px !important;margin-bottom: 0px !important;" ng-show="!show_timer" ng-click="show_timer = !show_timer" class="md-primary buttonMenu" target="_blank">
|
||||
<i class="fa fa-clock-o" aria-hidden="true"></i> {{ (!timeFilter) ? '7d' : timeFilter}}
|
||||
</md-button>
|
||||
<md-content ng-show="show_timer" layout="row" layout-align="end start" ng-init="timeFilter = (timeFilter ? timeFilter : '7d')">
|
||||
<md-button style="margin-top: 11px !important;margin-bottom: 0px !important;" ng-click="show_timer = !show_timer; timeFilter='24h';" class="md-primary" md-colors="::{background: 'primary-100', color: 'background-900'}" target="_blank">
|
||||
<md-button style="margin-top: 11px !important;margin-bottom: 0px !important;" ng-click="show_timer = !show_timer; timeFilter='24h';" class="md-primary buttonMenu" target="_blank">
|
||||
<i class="fa fa-clock-o" aria-hidden="true"></i> Last 24 hours
|
||||
</md-button>
|
||||
<md-button style="margin-top: 11px !important;margin-bottom: 0px !important;" ng-click="show_timer = !show_timer;timeFilter='7d';" class="md-primary" md-colors="::{background: 'primary-100', color: 'background-900'}" target="_blank">
|
||||
<md-button style="margin-top: 11px !important;margin-bottom: 0px !important;" ng-click="show_timer = !show_timer;timeFilter='7d';" class="md-primary buttonMenu" target="_blank">
|
||||
<i class="fa fa-clock-o" aria-hidden="true"></i> Last week
|
||||
</md-button>
|
||||
<md-button style="margin-top: 11px !important;margin-bottom: 0px !important;" ng-click="show_timer = !show_timer;timeFilter='30d';" class="md-primary" md-colors="::{background: 'primary-100', color: 'background-900'}" target="_blank">
|
||||
<md-button style="margin-top: 11px !important;margin-bottom: 0px !important;" ng-click="show_timer = !show_timer;timeFilter='30d';" class="md-primary buttonMenu" target="_blank">
|
||||
<i class="fa fa-clock-o" aria-hidden="true"></i> Last month
|
||||
</md-button>
|
||||
</md-content>
|
||||
|
||||
<md-button ng-if="_agent && submenuNavItem == 'overview'" class="md-primary" md-colors="::{background: 'primary-100', color: 'background-900'}" style="margin-top: 11px !important;margin-bottom: 0px !important;" ng-click="openDiscover('generic','AgentName:'+_agent.name)"><i class="fa fa-external-link" aria-hidden="true"></i> Alerts</md-button>
|
||||
<md-button style="margin-top: 11px !important;margin-bottom: 0px !important;" ng-if="_agent && submenuNavItem == 'fim'" class="md-primary" md-colors="::{background: 'primary-100', color: 'background-900'}" ng-click="openDiscover('fim','AgentName:'+_agent.name)"><i class="fa fa-external-link" aria-hidden="true"></i> Alerts</md-button>
|
||||
<md-button style="margin-top: 11px !important;margin-bottom: 0px !important;" ng-if="_agent && submenuNavItem == 'policy_monitoring'" class="md-primary" md-colors="::{background: 'primary-100', color: 'background-900'}" ng-click="openDiscover('rootcheck','AgentName:'+_agent.name)"><i class="fa fa-external-link" aria-hidden="true"></i> Alerts</md-button>
|
||||
<md-button style="margin-top: 11px !important;margin-bottom: 0px !important;" class="md-primary" md-colors="::{background: 'primary-100', color: 'background-900'}" ng-if="submenuNavItem == 'overview'" ng-click="openDashboard('OSSEC-Alerts', 'AgentName:'+_agent.name)">
|
||||
<md-button ng-if="_agent && submenuNavItem == 'overview'" class="md-primary buttonMenu" style="margin-top: 11px !important;margin-bottom: 0px !important;" ng-click="openDiscover('generic','AgentName:'+_agent.name)"><i class="fa fa-external-link" aria-hidden="true"></i> Alerts</md-button>
|
||||
<md-button style="margin-top: 11px !important;margin-bottom: 0px !important;" ng-if="_agent && submenuNavItem == 'fim'" class="md-primary buttonMenu" ng-click="openDiscover('fim','AgentName:'+_agent.name)"><i class="fa fa-external-link" aria-hidden="true"></i> Alerts</md-button>
|
||||
<md-button style="margin-top: 11px !important;margin-bottom: 0px !important;" ng-if="_agent && submenuNavItem == 'policy_monitoring'" class="md-primary buttonMenu" ng-click="openDiscover('rootcheck','AgentName:'+_agent.name)"><i class="fa fa-external-link" aria-hidden="true"></i> Alerts</md-button>
|
||||
<md-button style="margin-top: 11px !important;margin-bottom: 0px !important;" class="md-primary buttonMenu" ng-if="submenuNavItem == 'overview'" ng-click="openDashboard('OSSEC-Alerts', 'AgentName:'+_agent.name)">
|
||||
<i class="fa fa-external-link" aria-hidden="true"></i> Dashboard
|
||||
</md-button>
|
||||
<md-button style="margin-top: 11px !important;margin-bottom: 0px !important;" class="md-primary" md-colors="::{background: 'primary-100', color: 'background-900'}" ng-if="submenuNavItem == 'fim'" ng-click="openDashboard('File-Integrity-Monitoring', 'AgentName:'+_agent.name)">
|
||||
<md-button style="margin-top: 11px !important;margin-bottom: 0px !important;" class="md-primary buttonMenu" ng-if="submenuNavItem == 'fim'" ng-click="openDashboard('File-Integrity-Monitoring', 'AgentName:'+_agent.name)">
|
||||
<i class="fa fa-external-link" aria-hidden="true"></i> Dashboard
|
||||
</md-button>
|
||||
<md-button style="margin-top: 11px !important;margin-bottom: 0px !important;" class="md-primary" md-colors="::{background: 'primary-100', color: 'background-900'}" ng-if="submenuNavItem == 'policy_monitoring'" ng-click="openDashboard('Policy-Monitoring', 'AgentName:'+_agent.name)">
|
||||
<md-button style="margin-top: 11px !important;margin-bottom: 0px !important;" class="md-primary buttonMenu" ng-if="submenuNavItem == 'policy_monitoring'" ng-click="openDashboard('Policy-Monitoring', 'AgentName:'+_agent.name)">
|
||||
<i class="fa fa-external-link" aria-hidden="true"></i> Dashboard
|
||||
</md-button>
|
||||
<div style="margin-top: 11px !important;margin-bottom: 0px !important;" ng-if="_agent" class="statusBox" md-colors="::{background: 'primary-100'}" ng-class="_agent.status == 'Active' ? null : (_agent.status == 'Never Connected' ? 'extraLarge' : 'large')"
|
||||
<div style="margin-top: 11px !important;margin-bottom: 0px !important;" ng-if="_agent" class="statusBox" ng-class="_agent.status == 'Active' ? null : (_agent.status == 'Never Connected' ? 'extraLarge' : 'large')"
|
||||
layout="row" layout-align="space-between center"><span style="padding-right: 5px;">{{formatAgentStatus(_agent.status)}}</span><span ng-class="getAgentStatusClass(_agent.status)" class="round status"></span></div>
|
||||
|
||||
<md-button ng-click="restartAgent()" style="margin-top: 11px !important;margin-bottom: 0px !important;" class="md-primary" md-colors="::{background: 'primary-100', color: 'background-900'}" ng-show="_agent.status == 'Active' && _agent.id != '000' ">
|
||||
<md-button ng-click="restartAgent()" style="margin-top: 11px !important;margin-bottom: 0px !important;" class="md-primary buttonMenu" ng-show="_agent.status == 'Active' && _agent.id != '000' ">
|
||||
<i class="fa fa-refresh" aria-hidden="true"></i> Restart
|
||||
</md-button>
|
||||
</md-content>
|
||||
|
@ -1,16 +1,16 @@
|
||||
<md-content flex layout="column" ng-if="submenuNavItem == 'open'" layout-align="start space-around">
|
||||
<md-content style="background-color: white" flex layout="column" ng-if="submenuNavItem == 'open'" layout-align="start space-around">
|
||||
|
||||
<kbn-dash dash-id="{{select}}" dash-time-from="now-24h" dash-time-to="now" dash-searchable="true" dash-timepicker="true" ng-init="state.setDashboardsState(select);"></kbn-dash>
|
||||
|
||||
</md-content>
|
||||
|
||||
<md-content flex layout="column" ng-if="submenuNavItem == 'ossecalerts-default'" layout-align="start space-around">
|
||||
<md-content style="background-color: white" flex layout="column" ng-if="submenuNavItem == 'ossecalerts-default'" layout-align="start space-around">
|
||||
|
||||
<kbn-dash dash-id="OSSEC-Alerts" dash-time-from="now-24h" dash-time-to="now" dash-searchable="true" dash-timepicker="true"></kbn-dash>
|
||||
|
||||
</md-content>
|
||||
|
||||
<md-content flex layout="column" ng-if="submenuNavItem != 'open' && submenuNavItem != 'ossecalerts-default'" layout-align="start space-around">
|
||||
<md-content style="background-color: white" flex layout="column" ng-if="submenuNavItem != 'open' && submenuNavItem != 'ossecalerts-default'" layout-align="start space-around">
|
||||
|
||||
<kbn-dash dash-id="{{state.getDashboardsState().name}}" dash-filter="{{state.getDashboardsState().filter ? state.getDashboardsState().filter : '*'}}" dash-time-from="now-24h" dash-time-to="now" dash-searchable="true" dash-timepicker="true"></kbn-dash>
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<div flex ng-controller="stateController" layout="column">
|
||||
|
||||
<md-content ng-init="menuNavItem = 'discover'; template = (state.getDiscoverState().name ? state.getDiscoverState().name : 'generic'); " style="height: 70px;">
|
||||
<md-content ng-init="menuNavItem = 'discover'; template = (state.getDiscoverState().name ? state.getDiscoverState().name : 'generic'); " style="height: 70px;">
|
||||
<md-nav-bar class="wazuhMenuNav" md-selected-nav-item="menuNavItem" nav-bar-aria-label="navigation menu">
|
||||
<md-nav-item id="header_logo" md-nav-href="#/" name="logo" aria-hidden="true">
|
||||
<img aria-hidden="true" src="/plugins/wazuh/img/logo_white.png" height="44" weight="252"></img>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<md-content flex layout="column" layout-align="start space-around" ng-if="template == 'generic'">
|
||||
<md-content style="background-color: white" flex layout="column" layout-align="start space-around" ng-if="template == 'generic'">
|
||||
|
||||
<kbn-disfull table-height="1000px;" dis-a="(columns:!(AgentName,AgentIP,rule.sidid,rule.AlertLevel,rule.description,full_log),filters:!(),index:'ossec-*',interval:auto,query:(query_string:(analyze_wildcard:!t,query:'*')),sort:!('@timestamp',desc))"
|
||||
dis-g="(refreshInterval:(display:Off,pause:!f,value:0),time:(from:now-24h,mode:quick,to:now))"
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
</md-content>
|
||||
|
||||
<md-content flex layout="column" layout-align="start space-around" ng-if="template == 'fim'">
|
||||
<md-content style="background-color: white" flex layout="column" layout-align="start space-around" ng-if="template == 'fim'">
|
||||
|
||||
<kbn-disfull table-height="1000px;"
|
||||
dis-a="(columns:!(AgentName,AgentIP,SyscheckFile.path,SyscheckFile.event,SyscheckFile.uname_after,SyscheckFile.gname_after,SyscheckFile.perm_after),filters:!(),index:'ossec-*',interval:auto,query:(query_string:(analyze_wildcard:!t,query:'rule.groups:syscheck')),sort:!('@timestamp',desc),vis:(aggs:!((params:(field:AgentIP,orderBy:'2',size:20),schema:segment,type:terms),(id:'2',schema:metric,type:count)),type:histogram))"
|
||||
@ -19,7 +19,7 @@
|
||||
|
||||
</md-content>
|
||||
|
||||
<md-content flex layout="column" layout-align="start space-around" ng-if="template == 'rootcheck'">
|
||||
<md-content style="background-color: white" flex layout="column" layout-align="start space-around" ng-if="template == 'rootcheck'">
|
||||
|
||||
<kbn-disfull table-height="1000px;"
|
||||
dis-a="(columns:!(AgentName,rule.description,title,AlertsFile,rule.AlertLevel,rule.CIS,rule.PCI_DSS),filters:!(),index:'ossec-*',interval:auto,query:(query_string:(analyze_wildcard:!t,query:'*')),sort:!('@timestamp',desc))"
|
||||
|
@ -20,32 +20,32 @@
|
||||
<md-nav-item md-nav-click="submenuNavItem = 'fim'" name="fim">File integrity</md-nav-item>
|
||||
<md-nav-item md-nav-click="submenuNavItem = 'pm'" name="pm">Policy monitoring</md-nav-item>
|
||||
</md-nav-bar>
|
||||
<md-content style="margin-top: -6px" flex="70" class="subNavLine" layout="row" layout-align="end start">
|
||||
<md-button ng-show="!show_timer" ng-click="show_timer = !show_timer" class="md-primary" md-colors="::{background: 'primary-100', color: 'background-900'}" target="_blank">
|
||||
<md-content class="horizontal-menu-right" style="margin-top: -6px" flex="70" class="subNavLine" layout="row" layout-align="end start">
|
||||
<md-button ng-show="!show_timer" ng-click="show_timer = !show_timer" class="md-primary buttonMenu" target="_blank">
|
||||
<i class="fa fa-clock-o" aria-hidden="true"></i> {{ (!timeFilter) ? '24h' : timeFilter}}
|
||||
</md-button>
|
||||
<md-content ng-show="show_timer" layout="row" layout-align="end start" ng-init="timeFilter = (timeFilter ? timeFilter : '24h')">
|
||||
<md-button ng-click="show_timer = !show_timer; timeFilter='24h';" class="md-primary" md-colors="::{background: 'primary-100', color: 'background-900'}" target="_blank">
|
||||
<md-button ng-click="show_timer = !show_timer; timeFilter='24h';" class="md-primary buttonMenu" target="_blank">
|
||||
<i class="fa fa-clock-o" aria-hidden="true"></i> Last 24 hours
|
||||
</md-button>
|
||||
<md-button ng-click="show_timer = !show_timer;timeFilter='7d';" class="md-primary" md-colors="::{background: 'primary-100', color: 'background-900'}" target="_blank">
|
||||
<md-button ng-click="show_timer = !show_timer;timeFilter='7d';" class="md-primary buttonMenu" target="_blank">
|
||||
<i class="fa fa-clock-o" aria-hidden="true"></i> Last week
|
||||
</md-button>
|
||||
<md-button ng-click="show_timer = !show_timer;timeFilter='30d';" class="md-primary" md-colors="::{background: 'primary-100', color: 'background-900'}" target="_blank">
|
||||
<md-button ng-click="show_timer = !show_timer;timeFilter='30d';" class="md-primary buttonMenu" target="_blank">
|
||||
<i class="fa fa-clock-o" aria-hidden="true"></i> Last month
|
||||
</md-button>
|
||||
</md-content>
|
||||
<md-button ng-if="submenuNavItem == 'general'" class="md-primary" md-colors="::{background: 'primary-100', color: 'background-900'}" ng-click="openDiscover('generic','*')">
|
||||
<md-button ng-if="submenuNavItem == 'general'" class="md-primary buttonMenu" ng-click="openDiscover('generic','*')">
|
||||
<i class="fa fa-external-link" aria-hidden="true"></i> Alerts</md-button>
|
||||
<md-button ng-if="submenuNavItem == 'fim'" class="md-primary" md-colors="::{background: 'primary-100', color: 'background-900'}" ng-click="openDiscover('fim','rule.groups: syscheck')"><i class="fa fa-external-link" aria-hidden="true"></i> Alerts</md-button>
|
||||
<md-button ng-if="submenuNavItem == 'pm'" class="md-primary" md-colors="::{background: 'primary-100', color: 'background-900'}" ng-click="openDiscover('rootcheck','rule.groups: rootcheck')"><i class="fa fa-external-link" aria-hidden="true"></i> Alerts</md-button>
|
||||
<md-button class="md-primary" md-colors="::{background: 'primary-100', color: 'background-900'}" ng-if="submenuNavItem == 'general'" ng-click="openDashboard('OSSEC-Alerts','*')">
|
||||
<md-button ng-if="submenuNavItem == 'fim'" class="md-primary buttonMenu" ng-click="openDiscover('fim','rule.groups: syscheck')"><i class="fa fa-external-link" aria-hidden="true"></i> Alerts</md-button>
|
||||
<md-button ng-if="submenuNavItem == 'pm'" class="md-primary buttonMenu" ng-click="openDiscover('rootcheck','rule.groups: rootcheck')"><i class="fa fa-external-link" aria-hidden="true"></i> Alerts</md-button>
|
||||
<md-button class="md-primary buttonMenu" ng-if="submenuNavItem == 'general'" ng-click="openDashboard('OSSEC-Alerts','*')">
|
||||
<i class="fa fa-external-link" aria-hidden="true"></i> Dashboard
|
||||
</md-button>
|
||||
<md-button class="md-primary" md-colors="::{background: 'primary-100', color: 'background-900'}" ng-if="submenuNavItem == 'fim'" ng-click="openDashboard('File-Integrity-Monitoring','*')">
|
||||
<md-button class="md-primary buttonMenu" ng-if="submenuNavItem == 'fim'" ng-click="openDashboard('File-Integrity-Monitoring','*')">
|
||||
<i class="fa fa-external-link" aria-hidden="true"></i> Dashboard
|
||||
</md-button>
|
||||
<md-button class="md-primary" md-colors="::{background: 'primary-100', color: 'background-900'}" ng-if="submenuNavItem == 'pm' " ng-click="openDashboard('Policy-Monitoring','*')">
|
||||
<md-button class="md-primary buttonMenu" ng-if="submenuNavItem == 'pm' " ng-click="openDashboard('Policy-Monitoring','*')">
|
||||
<i class="fa fa-external-link" aria-hidden="true"></i> Dashboard
|
||||
</md-button>
|
||||
</md-content>
|
||||
|
@ -27,7 +27,7 @@ module.exports = function (server, options) {
|
||||
}
|
||||
|
||||
var getConfig = function (callback) {
|
||||
client.search({ index: '.kibana', type: 'wazuh-configuration', id: '1' })
|
||||
client.search({ index: '.kibana', type: 'wazuh-configuration'})
|
||||
.then(function (data) {
|
||||
if (data.hits.total == 1) {
|
||||
callback({ 'user': data.hits.hits[0]._source.api_user, 'password': new Buffer(data.hits.hits[0]._source.api_password, 'base64').toString("ascii"), 'url': data.hits.hits[0]._source.api_url, 'insecure': data.hits.hits[0]._source.insecure });
|
||||
|
Loading…
Reference in New Issue
Block a user