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

Change the way to edit or remove a file of rules or decoders #613

Merged
merged 26 commits into from
Mar 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
9bfc9bc
Add file to names
adri9valle Mar 11, 2019
45e2104
Same height and buttons to switch
adri9valle Mar 11, 2019
d95eb53
Fix vis2png
adri9valle Mar 11, 2019
39426d5
Edit rules files
adri9valle Mar 11, 2019
00de438
Edit decoders files
adri9valle Mar 11, 2019
c09e8ed
Remove console.log
adri9valle Mar 11, 2019
e962bbc
Hide switch for local rules/decoders
adri9valle Mar 11, 2019
b8a5d9f
Remove manager-files
adri9valle Mar 11, 2019
d8f75b6
Fix intput bar to filter in decoders section
adri9valle Mar 11, 2019
4a650d1
Resolving conflicst and fixes
adri9valle Mar 12, 2019
fd82bb7
Change sca text
adri9valle Mar 12, 2019
7b78c72
Fix remove all filters button
adri9valle Mar 12, 2019
ffc8eb2
Change edition file design
adri9valle Mar 12, 2019
223aca0
Updated changelog
adri9valle Mar 12, 2019
44c8e2b
Update changelog
adri9valle Mar 12, 2019
3dfa201
Can remove agents from default groups
adri9valle Mar 12, 2019
2ea404b
Added new visualizations for sca section
adri9valle Mar 12, 2019
d23e7c6
Fix agents discover breadcrumbs
adri9valle Mar 12, 2019
0800665
Fix overview discover breadcrumbs
adri9valle Mar 12, 2019
a801062
Fix vis2png
adri9valle Mar 12, 2019
6b34de0
Remove inused visualization
adri9valle Mar 12, 2019
a06b9ab
Prevent report error if cannot fetch visualization title
adri9valle Mar 12, 2019
634d6bb
Resolving conflict
adri9valle Mar 12, 2019
e328e2c
Fix visualizations in reporting
adri9valle Mar 12, 2019
96bd245
Fix filter keys
adri9valle Mar 12, 2019
45c45ef
Resolving conflicts
adri9valle Mar 12, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,20 @@ All notable changes to the Wazuh app for Splunk project will be documented in th
- Delete rules, decoders and CDB lists files ([#589](https://github.com/wazuh/wazuh-splunk/pull/589)).
- Prevent overwrite a existing file ([#589](https://github.com/wazuh/wazuh-splunk/pull/589)).
- Unescape back slash for JSON raw content ([#599](https://github.com/wazuh/wazuh-splunk/pull/599)).
- Add edition in Management > Ruleset > Files ([#597](https://github.com/wazuh/wazuh-splunk/pull/597)).
- Capability to edit rules and decoders files (
[#597](https://github.com/wazuh/wazuh-splunk/pull/597)
[#613](https://github.com/wazuh/wazuh-splunk/pull/613)
).
- Allow navigation throught url ([#596](https://github.com/wazuh/wazuh-splunk/pull/596)).
- Enable back button ([#596](https://github.com/wazuh/wazuh-splunk/pull/596)).
- Capability to hide or show columns ([#566](https://github.com/wazuh/wazuh-splunk/pull/566)).
- Capability to hide or show columns (
[#566](https://github.com/wazuh/wazuh-splunk/pull/566)
[#614](https://github.com/wazuh/wazuh-splunk/pull/614)
).
- Can resize columns (
[#566](https://github.com/wazuh/wazuh-splunk/pull/566)
[#614](https://github.com/wazuh/wazuh-splunk/pull/614)
).
- Cabability to expand visualizations ([#567](https://github.com/wazuh/wazuh-splunk/pull/567)).


Expand All @@ -58,6 +68,7 @@ All notable changes to the Wazuh app for Splunk project will be documented in th
- Redisign configuration view ([#597](https://github.com/wazuh/wazuh-splunk/pull/597)).
- Updated autocomplete list in DevTools ([#538](https://github.com/wazuh/wazuh-splunk/pull/538)).
- Modularize some functions ([#601](https://github.com/wazuh/wazuh-splunk/pull/601)).
- View logs as raw text ([#604](https://github.com/wazuh/wazuh-splunk/pull/604)).
- Show logs in a text box ([#604](https://github.com/wazuh/wazuh-splunk/pull/604)).

### Fixed
Expand Down
14 changes: 7 additions & 7 deletions SplunkAppForWazuh/appserver/controllers/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,20 +202,20 @@ def generate(self, **kwargs):
#Insert image
pdf.cell(x , y, img['title'], 0, 1)
pdf.image(img['path'], x_img, y_img, w,h)
pdf.ln(65)
y_img = y_img + 75
pdf.ln(75)
y_img = y_img + 85
count = count + 1
n_images = n_images - 1
if count == 2 and n_images >= 1 and first_page:
pdf.add_page()
pdf.ln(20)
y_img = 50
pdf.ln(15)
y_img = 45
count = 0
first_page = False
if count == 3 and n_images >= 1 and first_page:
if count == 3 and n_images >= 1:
pdf.add_page()
pdf.ln(20)
y_img = 50
pdf.ln(15)
y_img = 45
count = 0
#Add tables
if self.tables_have_info(tables): #Check if any table has information, if not, prevent break page and not iterate in empties tables
Expand Down
25 changes: 25 additions & 0 deletions SplunkAppForWazuh/appserver/static/css/styles/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@
padding-top: 7px;
}

.wz-padding-20 {
padding: 20px;
}

.wz-back-btn-absolute{
position: absolute!important;
top: 210px!important;
Expand Down Expand Up @@ -1187,4 +1191,25 @@ th.w-350 {

.medium-text {
font-size: 17px;
}

.files-button {
padding-left: 10px;
margin-left: 20px;
height: 32px;
}

.remove-filters {
padding: 10px;
margin-right: -30px;
}

.wz-color-text {
color: #006eaa;
}

.back-arrow {
margin-top: 4px;
margin-right: 12px;
margin-left: 5px;
}
5 changes: 5 additions & 0 deletions SplunkAppForWazuh/appserver/static/css/styles/height.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,14 @@
/* ------------------------ Wazuh heights stylesheet ------------------------ */
/* -------------------------------------------------------------------------- */

.height-32 {
height: 32px !important;
}

.height-40 {
height: 40px !important;
}

.height-50 {
height: 50px;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,30 +257,6 @@ define(['../module'], function (module) {
}
})

// Manager - Files
.state('mg-files', {
templateUrl:
BASE_URL +
'static/app/SplunkAppForWazuh/js/controllers/management/files/manager-files.html',
onEnter: $navigationService => {
$navigationService.storeRoute('mg-files')
},
controller: 'managerFilesCtrl',
params: { filters: null },
resolve: {
isAdmin: [
'$currentDataService',
async $currentDataService => {
try {
return await $currentDataService.isAdmin()
} catch (error) {
return false
}
}
]
}
})

// Manager - Groups
.state('mg-groups', {
templateUrl:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
Generate report
</md-tooltip>
</md-button>
<wz-discover breadcrumbs="{section: 'Overview', subSection: 'General', ref: 'overview'}"></wz-discover>
<wz-discover breadcrumbs="{section: 'Agents', subSection: 'Audit', agentName: agent.name, agentId: agent.id, ref: 'agents', agentRef: 'agent-overview'}"></wz-discover>
</div>
<div style="margin-right:7px;" id='timePicker'></div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
Generate report
</md-tooltip>
</md-button>
<wz-discover breadcrumbs="{section: 'Overview', subSection: 'General', ref: 'overview'}"></wz-discover>
<wz-discover breadcrumbs="{section: 'Agents', subSection: 'CIS-CAT', agentName: agent.name, agentId: agent.id, ref: 'agents', agentRef: 'agent-overview'}"></wz-discover>
</div>
<div style="margin-right:7px;" id='timePicker'></div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
<div flex></div>
<!-- Report button -->
<div style="display:flex; padding-right: 10px;">
<md-button ng-if="reportingEnabled" md-no-ink class="md-icon-button small wz-no-margin-padding" ng-disabled="loadingVizz" ng-click="startVis2Png()"
aria-label="Generate report button">
<i class="fa fa-fw fa-print" aria-hidden="true"></i>
<md-tooltip md-direction="left" class="wz-tooltip">
Generate report
</md-tooltip>
</md-button>
<wz-discover breadcrumbs="{section: 'Overview', subSection: 'General', ref: 'overview'}"></wz-discover>
</div>
<md-button ng-if="reportingEnabled" md-no-ink class="md-icon-button small wz-no-margin-padding" ng-disabled="loadingVizz"
ng-click="startVis2Png()" aria-label="Generate report button">
<i class="fa fa-fw fa-print" aria-hidden="true"></i>
<md-tooltip md-direction="left" class="wz-tooltip">
Generate report
</md-tooltip>
</md-button>
<wz-discover breadcrumbs="{section: 'Agents', subSection: 'Configuration assessment', agentName: agent.name, agentId: agent.id, ref: 'agents', agentRef: 'agent-overview'}"></wz-discover>
</div>
<div style="margin-right:7px;" id='timePicker'></div>
</div>

Expand All @@ -45,64 +45,95 @@
policies</button>
</div>

<!-- Alerts over time -->
<div layout="row" layout-align="center stretch" class="height-560">
<md-card flex class="wz-md-card" ng-class="{'fullscreen': expandArray[7]}">
<md-card-content class="wazuh-column">
<span class="wz-headline-title">Alerts over time
<span class="wz-text-link" style="float:right;" ng-click="expand(7,'alertsOverTime')"><i class="fa fa-fw fa-expand"></i></span>
</span>
<md-divider class="wz-margin-top-10"></md-divider>
<div id='alertsOverTime'></div>
</md-card-content>
</md-card>
</div>

<!-- First row -->
<div layout="row" layout-align="center stretch" class="height-390">
<md-card flex="33" class="wz-md-card" ng-class="{'fullscreen': expandArray[0]}">
<md-card-content class="wazuh-column">
<span class="wz-headline-title">Top 5 CIS Requirements
<span class="wz-text-link" style="float:right;" ng-click="expand(0,'cisRequirements')"><i class="fa fa-fw fa-expand"></i></span>
</span>
<md-divider class="wz-margin-top-10"></md-divider>
<div id='cisRequirements'></div>
</md-card-content>
</md-card>

<md-card flex="33" class="wz-md-card" ng-class="{'fullscreen': expandArray[1]}">
<md-card-content class="wazuh-column">
<span class="wz-headline-title">Top 5 PCI DSS Requirements
<span class="wz-text-link" style="float:right;" ng-click="expand(1,'topPciDss')"><i class="fa fa-fw fa-expand"></i></span>
</span>
<md-divider class="wz-margin-top-10"></md-divider>
<div id='topPciDss'></div>
</md-card-content>
</md-card>

<md-card flex="33" class="wz-md-card" ng-class="{'fullscreen': expandArray[2]}">
<md-card-content class="wazuh-column">
<span class="wz-headline-title">Result distribution
<span class="wz-text-link" style="float:right;" ng-click="expand(2,'resultDistribution')"><i class="fa fa-fw fa-expand"></i></span>
</span>
<md-divider class="wz-margin-top-10"></md-divider>
<div id='resultDistribution'></div>
</md-card-content>
</md-card>
</div>
<md-card flex="33" class="wz-md-card" ng-class="{'fullscreen': expandArray[0]}">
<md-card-content class="wazuh-column">
<span class="wz-headline-title">Top 5 CIS Requirements Passed
<span class="wz-text-link" style="float:right;" ng-click="expand(0,'top5CISPassed')"><i class="fa fa-fw fa-expand"></i></span>
</span>
<md-divider class="wz-margin-top-10"></md-divider>
<div id='top5CISPassed'></div>
</md-card-content>
</md-card>
<md-card flex="33" class="wz-md-card" ng-class="{'fullscreen': expandArray[1]}">
<md-card-content class="wazuh-column">
<span class="wz-headline-title">Top 5 CIS CSC Requirements Passed
<span class="wz-text-link" style="float:right;" ng-click="expand(1,'top5CISCSCPassed')"><i class="fa fa-fw fa-expand"></i></span>
</span>
<md-divider class="wz-margin-top-10"></md-divider>
<div id='top5CISCSCPassed'></div>
</md-card-content>
</md-card>
<md-card flex="33" class="wz-md-card" ng-class="{'fullscreen': expandArray[2]}">
<md-card-content class="wazuh-column">
<span class="wz-headline-title">Top 5 PCI DSS Requirements Passed
<span class="wz-text-link" style="float:right;" ng-click="expand(2,'top5PCIDSSPassed')"><i class="fa fa-fw fa-expand"></i></span>
</span>
<md-divider class="wz-margin-top-10"></md-divider>
<div id='top5PCIDSSPassed'></div>
</md-card-content>
</md-card>

<!-- Second row -->
<div layout="row" layout-align="center stretch" class="height-500">
<md-card flex class="wz-md-card" ng-class="{'fullscreen': expandArray[3]}">
<md-card-content class="wazuh-column">
<span class="wz-headline-title">Alerts over time
<span class="wz-text-link" style="float:right;" ng-click="expand(3,'alertsOverTime')"><i class="fa fa-fw fa-expand"></i></span>
</span>
<md-divider class="wz-margin-top-10"></md-divider>
<div id='alertsOverTime'></div>
</md-card-content>
</md-card>
</div>
</div>

<!-- Third row -->
<div layout="row" layout-align="center stretch" class="height-560">
<md-card flex class="wz-md-card" ng-class="{'fullscreen': expandArray[4]}">
<md-card-content class="wazuh-column">
<span class="wz-headline-title">Alerts summary
<span class="wz-text-link" style="float:right;" ng-click="expand(4,'eventsOverTimeElement')"><i class="fa fa-fw fa-expand"></i></span>
</span>
<md-divider class="wz-margin-top-10"></md-divider>
<div id='alertsSummary'></div>
</md-card-content>
</md-card>
</div>

<!-- Second row -->
<div layout="row" layout-align="center stretch" class="height-390">
<md-card flex="33" class="wz-md-card" ng-class="{'fullscreen': expandArray[3]}">
<md-card-content class="wazuh-column">
<span class="wz-headline-title">Top 5 CIS Requirements Failed
<span class="wz-text-link" style="float:right;" ng-click="expand(3,'top5CISFailed')"><i class="fa fa-fw fa-expand"></i></span>
</span>
<md-divider class="wz-margin-top-10"></md-divider>
<div id='top5CISFailed'></div>
</md-card-content>
</md-card>
<md-card flex="33" class="wz-md-card" ng-class="{'fullscreen': expandArray[4]}">
<md-card-content class="wazuh-column">
<span class="wz-headline-title">Top 5 CIS CSC Requirements Failed
<span class="wz-text-link" style="float:right;" ng-click="expand(4,'top5CISCSCFailed')"><i class="fa fa-fw fa-expand"></i></span>
</span>
<md-divider class="wz-margin-top-10"></md-divider>
<div id='top5CISCSCFailed'></div>
</md-card-content>
</md-card>
<md-card flex="33" class="wz-md-card" ng-class="{'fullscreen': expandArray[5]}">
<md-card-content class="wazuh-column">
<span class="wz-headline-title">Top 5 PCI DSS Requirements Failed
<span class="wz-text-link" style="float:right;" ng-click="expand(5,'top5PCIDSSFailed')"><i class="fa fa-fw fa-expand"></i></span>
</span>
<md-divider class="wz-margin-top-10"></md-divider>
<div id='top5PCIDSSFailed'></div>
</md-card-content>
</md-card>
</div>

<!-- Third row -->
<div layout="row" layout-align="center stretch" class="height-560">
<md-card flex class="wz-md-card" ng-class="{'fullscreen': expandArray[6]}">
<md-card-content class="wazuh-column">
<span class="wz-headline-title">Alerts summary
<span class="wz-text-link" style="float:right;" ng-click="expand(6,'alertsSummary')"><i class="fa fa-fw fa-expand"></i></span>
</span>
<md-divider class="wz-margin-top-10"></md-divider>
<div id='alertsSummary'></div>
</md-card-content>
</md-card>
</div>
</div>
<!-- End alerts visualizations-->

Expand All @@ -120,7 +151,8 @@
<svg class="euiIcon euiIcon--medium euiCallOutHeader__icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
<defs>
<path id="help-a" d="M13.6 12.186l-1.357-1.358c-.025-.025-.058-.034-.084-.056.53-.794.84-1.746.84-2.773a4.977 4.977 0 0 0-.84-2.772c.026-.02.059-.03.084-.056L13.6 3.813a6.96 6.96 0 0 1 0 8.373zM8 15A6.956 6.956 0 0 1 3.814 13.6l1.358-1.358c.025-.025.034-.057.055-.084C6.02 12.688 6.974 13 8 13a4.978 4.978 0 0 0 2.773-.84c.02.026.03.058.056.083l1.357 1.358A6.956 6.956 0 0 1 8 15zm-5.601-2.813a6.963 6.963 0 0 1 0-8.373l1.359 1.358c.024.025.057.035.084.056A4.97 4.97 0 0 0 3 8c0 1.027.31 1.98.842 2.773-.027.022-.06.031-.084.056l-1.36 1.358zm5.6-.187A4 4 0 1 1 8 4a4 4 0 0 1 0 8zM8 1c1.573 0 3.019.525 4.187 1.4l-1.357 1.358c-.025.025-.035.057-.056.084A4.979 4.979 0 0 0 8 3a4.979 4.979 0 0 0-2.773.842c-.021-.027-.03-.059-.055-.084L3.814 2.4A6.957 6.957 0 0 1 8 1zm0-1a8.001 8.001 0 1 0 .003 16.002A8.001 8.001 0 0 0 8 0z"></path>
<path id="help-a" d="M13.6 12.186l-1.357-1.358c-.025-.025-.058-.034-.084-.056.53-.794.84-1.746.84-2.773a4.977 4.977 0 0 0-.84-2.772c.026-.02.059-.03.084-.056L13.6 3.813a6.96 6.96 0 0 1 0 8.373zM8 15A6.956 6.956 0 0 1 3.814 13.6l1.358-1.358c.025-.025.034-.057.055-.084C6.02 12.688 6.974 13 8 13a4.978 4.978 0 0 0 2.773-.84c.02.026.03.058.056.083l1.357 1.358A6.956 6.956 0 0 1 8 15zm-5.601-2.813a6.963 6.963 0 0 1 0-8.373l1.359 1.358c.024.025.057.035.084.056A4.97 4.97 0 0 0 3 8c0 1.027.31 1.98.842 2.773-.027.022-.06.031-.084.056l-1.36 1.358zm5.6-.187A4 4 0 1 1 8 4a4 4 0 0 1 0 8zM8 1c1.573 0 3.019.525 4.187 1.4l-1.357 1.358c-.025.025-.035.057-.056.084A4.979 4.979 0 0 0 8 3a4.979 4.979 0 0 0-2.773.842c-.021-.027-.03-.059-.055-.084L3.814 2.4A6.957 6.957 0 0 1 8 1zm0-1a8.001 8.001 0 1 0 .003 16.002A8.001 8.001 0 0 0 8 0z">
</path>
</defs>
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#help-a" fill-rule="evenodd"></use>
</svg>
Expand Down Expand Up @@ -175,7 +207,8 @@
<svg class="euiIcon euiIcon--medium euiCallOutHeader__icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
<defs>
<path id="help-a" d="M13.6 12.186l-1.357-1.358c-.025-.025-.058-.034-.084-.056.53-.794.84-1.746.84-2.773a4.977 4.977 0 0 0-.84-2.772c.026-.02.059-.03.084-.056L13.6 3.813a6.96 6.96 0 0 1 0 8.373zM8 15A6.956 6.956 0 0 1 3.814 13.6l1.358-1.358c.025-.025.034-.057.055-.084C6.02 12.688 6.974 13 8 13a4.978 4.978 0 0 0 2.773-.84c.02.026.03.058.056.083l1.357 1.358A6.956 6.956 0 0 1 8 15zm-5.601-2.813a6.963 6.963 0 0 1 0-8.373l1.359 1.358c.024.025.057.035.084.056A4.97 4.97 0 0 0 3 8c0 1.027.31 1.98.842 2.773-.027.022-.06.031-.084.056l-1.36 1.358zm5.6-.187A4 4 0 1 1 8 4a4 4 0 0 1 0 8zM8 1c1.573 0 3.019.525 4.187 1.4l-1.357 1.358c-.025.025-.035.057-.056.084A4.979 4.979 0 0 0 8 3a4.979 4.979 0 0 0-2.773.842c-.021-.027-.03-.059-.055-.084L3.814 2.4A6.957 6.957 0 0 1 8 1zm0-1a8.001 8.001 0 1 0 .003 16.002A8.001 8.001 0 0 0 8 0z"></path>
<path id="help-a" d="M13.6 12.186l-1.357-1.358c-.025-.025-.058-.034-.084-.056.53-.794.84-1.746.84-2.773a4.977 4.977 0 0 0-.84-2.772c.026-.02.059-.03.084-.056L13.6 3.813a6.96 6.96 0 0 1 0 8.373zM8 15A6.956 6.956 0 0 1 3.814 13.6l1.358-1.358c.025-.025.034-.057.055-.084C6.02 12.688 6.974 13 8 13a4.978 4.978 0 0 0 2.773-.84c.02.026.03.058.056.083l1.357 1.358A6.956 6.956 0 0 1 8 15zm-5.601-2.813a6.963 6.963 0 0 1 0-8.373l1.359 1.358c.024.025.057.035.084.056A4.97 4.97 0 0 0 3 8c0 1.027.31 1.98.842 2.773-.027.022-.06.031-.084.056l-1.36 1.358zm5.6-.187A4 4 0 1 1 8 4a4 4 0 0 1 0 8zM8 1c1.573 0 3.019.525 4.187 1.4l-1.357 1.358c-.025.025-.035.057-.056.084A4.979 4.979 0 0 0 8 3a4.979 4.979 0 0 0-2.773.842c-.021-.027-.03-.059-.055-.084L3.814 2.4A6.957 6.957 0 0 1 8 1zm0-1a8.001 8.001 0 1 0 .003 16.002A8.001 8.001 0 0 0 8 0z">
</path>
</defs>
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#help-a" fill-rule="evenodd"></use>
</svg>
Expand All @@ -196,7 +229,8 @@
{{showPolicyChecks}}
</span>
<md-divider class="wz-margin-top-10"></md-divider>
<wazuh-table flex path="wzTablePath" row-sizes="[13,11,9]" allow-click="true" extra-limit="100" keys="['title','file','result']">
<wazuh-table custom-columns="true" flex path="wzTablePath" row-sizes="[13,11,9]" allow-click="true"
extra-limit="100" keys="['title','file','result']">
</wazuh-table>

</md-card-content>
Expand Down
Loading