Skip to content

Commit

Permalink
Merge pull request #478 from wazuh/3.8-ui-changes
Browse files Browse the repository at this point in the history
3.8 UI changes for editing groups
  • Loading branch information
Jesús Ángel authored Jan 18, 2019
2 parents d9e3491 + 40936b7 commit 1240371
Show file tree
Hide file tree
Showing 27 changed files with 675 additions and 471 deletions.
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ All notable changes to the Wazuh app for Splunk project will be documented in th
### Added

- Added group management features such as:
- Edit the group configuration ([#441](https://github.com/wazuh/wazuh-kibana-app/pull/441)).
- Add/remove groups to/from an agent ([#441](https://github.com/wazuh/wazuh-kibana-app/pull/441)).
- Add/remove agents to/from a group ([#441](https://github.com/wazuh/wazuh-kibana-app/pull/441)).
- Add the selected agent to groups from the Agent dashboard ([#414](https://github.com/wazuh/wazuh-kibana-app/pull/414)).
- Edit the group configuration ([#441](https://github.com/wazuh/splunk/pull/441)).
- Add/remove groups to/from an agent ([#441](https://github.com/wazuh/splunk/pull/441)).
- Add/remove agents to/from a group ([#478](https://github.com/wazuh/splunk/pull/478)).
- Add the selected agent to groups from the Agent dashboard ([#414](https://github.com/wazuh/splunk/pull/414)).
- Auto-complete endpoints in Dev Tools section ([#430](https://github.com/wazuh/wazuh-splunk/pull/430)).
- XML editor for group configurations ([#432](https://github.com/wazuh/wazuh-splunk/pull/432)).
- Multi-selector for attaching agents to groups dynamically ([#432](https://github.com/wazuh/wazuh-splunk/pull/432)).
Expand Down
40 changes: 40 additions & 0 deletions SplunkAppForWazuh/appserver/static/css/styles/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,46 @@
outline-color: transparent !important;
} */

.addGroupInput {
max-height: 20px !important;
max-width: 181px !important;
padding-right: 0 !important;
}

.addGroupBtn {
background-color: #0079a5 !important
}

.agreeBtn {
min-height: 0px !important;
max-height: 25px !important;
line-height: inherit !important;
color: #ffffff !important;
background-color: #0079a5 !important;
border-color: #0079a5 !important;
}

.cancelBtn {
color: #000000 !important;
background-color: #d9d9d9 !important;
border-color: #d9d9d9 !important;
min-height: 0px !important;
max-height: 25px !important;
line-height: inherit !important;
}

.agreeBtnAgents {
color: #ffffff !important;
background-color: #0079a5 !important;
border-color: #0079a5 !important;
}

.cancelBtnAgents {
color: #000000 !important;
background-color: #d9d9d9 !important;
border-color: #d9d9d9 !important;
}

.groupContentViewer {
height: calc('100vh - 550px');
min-height: 300px;
Expand Down
4 changes: 4 additions & 0 deletions SplunkAppForWazuh/appserver/static/css/styles/height.css
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,8 @@

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

.height-20 {
height: 20px !important;
}
5 changes: 5 additions & 0 deletions SplunkAppForWazuh/appserver/static/css/styles/typography.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
font-family: "Open Sans", Helvetica, Arial, sans-serif !important;
} */

.font-size-12 {
font-size: 12px !important;
}


.wz-headline-title {
font-size: 15px;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,21 @@ define(['../module'], function(module) {
$navigationService.storeRoute('mg-groups')
},
controller: 'groupsCtrl',
params: { group: null }
params: { group: null },
resolve: {
extensions: [
'$currentDataService',
async $currentDataService => {
try {
const id = $currentDataService.getApi().id
const result = await $currentDataService.getExtensionsById(id)
return result
} catch (err) {
return false
}
}
]
}
})

// Manager - Groups
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,7 @@ define(['../../module', '../../../utils/config-handler'], function(
this.agent.data.data.os &&
this.agent.data.data.os.uname
) {
this.$scope.isLinux = this.agent.data.data.os.uname.includes(
'Linux'
)
this.$scope.isLinux = this.agent.data.data.os.uname.includes('Linux')
}

this.$scope.getAgentStatusClass = agentStatus =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ define([
this.scope.agentInfo = {
id: this.agentInfo.id,
name: this.agentInfo.name,
status: "Never connected"
status: 'Never connected'
}
this.agentInfo.id && this.agentInfo.name
? (this.agentInfo.error = false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Find more information about this on the LICENSE file.
*/

define(['../../module'], function (module) {
define(['../../module'], function(module) {
'use strict'
class Inventory {
/**
Expand Down Expand Up @@ -63,10 +63,10 @@ define(['../../module'], function (module) {

this.scope.agent =
this.data.length &&
this.data.length > 4 &&
typeof this.data[4] === 'object' &&
this.data[4].data &&
this.data[4].data.data
this.data.length > 4 &&
typeof this.data[4] === 'object' &&
this.data[4].data &&
this.data[4].data.data
? this.data[4].data.data
: { error: true }
this.scope.search = (term, specificPath) => {
Expand Down Expand Up @@ -101,23 +101,23 @@ define(['../../module'], function (module) {
Object.assign(this.processesDate, this.data[5].data.data)
}
this.init()

this.scope.startVis2Png = () =>
this.reportingService.reportInventoryData(
'agents-inventory',
'Inventory Data',
'',//Filters,
[],//Visualizations,
{},//Metrics,
{},//tableResults
'inventory',//isAgent
this.scope.agent.id//agentId
'', //Filters,
[], //Visualizations,
{}, //Metrics,
{}, //tableResults
'inventory', //isAgent
this.scope.agent.id //agentId
)

this.scope.$on('loadingReporting', (event, data) => {
this.scope.loadingReporting = data.status
})

return
} catch (error) {
this.toast(error.message || error)
Expand All @@ -134,8 +134,9 @@ define(['../../module'], function (module) {
`/syscollector/${this.scope.agent.id}/netiface`,
{}
)
this.netifaceResponse = ((resultNetiface || {}).data || {}).data || false
} catch (error) { } // eslint-disable-line
this.netifaceResponse =
((resultNetiface || {}).data || {}).data || false
} catch (error) {} // eslint-disable-line

// This API call may fail so we put it out of Promise.all
try {
Expand All @@ -145,7 +146,7 @@ define(['../../module'], function (module) {
)
this.netaddrResponse =
((resultNetaddrResponse || {}).data || {}).data || false
} catch (error) { } // eslint-disable-line
} catch (error) {} // eslint-disable-line

this.scope.syscollector = {
hardware: this.data[0].data.data,
Expand All @@ -154,12 +155,14 @@ define(['../../module'], function (module) {
ports: this.ports,
netaddr: this.netaddrResponse,
packagesDate:
this.packagesDate && this.packagesDate.items && this.packagesDate.items.length
this.packagesDate &&
this.packagesDate.items &&
this.packagesDate.items.length
? this.packagesDate.items[0].scan_time
: 'Unknown',
processesDate: ((this.processesDate || {}).items || []).length
? this.processesDate.items[0].scan_time
: 'Unknown'
? this.processesDate.items[0].scan_time
: 'Unknown'
}
if (!this.scope.$$phase) this.scope.$digest()
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ define([
'mostCommonActions',
'topRules',
'alertsOverTime'
],
],
{}, //Metrics,
this.tableResults,
this.agentReportData
Expand Down
Loading

0 comments on commit 1240371

Please sign in to comment.