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

Release v3.3.1-7.1.1 #137

Merged
merged 99 commits into from
Jun 29, 2018
Merged
Changes from 1 commit
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
6019089
Fixed uncaught forgotten promise
manuasir Jun 12, 2018
4e45f4d
Returning event type in callback event closes #94
manuasir Jun 12, 2018
f1213b4
Deleted debug messages from controllers
manuasir Jun 12, 2018
c46654c
Merge pull request #114 from wazuh/3.3-dev-firefox-fix
manuasir Jun 12, 2018
2ab2f55
Fixed aand improved gent group configuration dashboard
manuasir Jun 12, 2018
7b7931b
Cleaning elements and providing style to agent table
manuasir Jun 13, 2018
5d1d1b3
Improving URL handling
manuasir Jun 14, 2018
f58459a
Deleting default collors in dynamic table directive
manuasir Jun 14, 2018
d9e64f4
Compressing all CSS styles into one single file
manuasir Jun 14, 2018
0df414e
Wrapping flex CSS attributes into own classes
manuasir Jun 14, 2018
982b1bf
Providing style to agennt summary dashboard
manuasir Jun 14, 2018
0abb2a1
Add space-evenly attribute
manuasir Jun 14, 2018
75bb31e
Fetching agent status and coverity from API
manuasir Jun 15, 2018
c650035
Changing API filter dateAdd
manuasir Jun 15, 2018
a0bcbd8
Update /agents endpoint to use the new API filters
manuasir Jun 15, 2018
219e38c
Wrapping python backend exception into string
manuasir Jun 15, 2018
2983c77
Adapting /agent endpoint to not paginate if not needed
manuasir Jun 15, 2018
01b5eb5
Getting most active useer from index and showing it in agent summary …
manuasir Jun 15, 2018
e56f794
Applying filters to most active agent in agent summary query
manuasir Jun 15, 2018
4515012
Opening a search itab if most active user is clicked
manuasir Jun 15, 2018
25e859f
Correcting padding in table
manuasir Jun 15, 2018
145d624
Fixing string literal in construction of query URL
manuasir Jun 15, 2018
442e200
Added new table class
manuasir Jun 15, 2018
1738ec9
Setting search field on upper left corner
manuasir Jun 15, 2018
0b97e8c
Deleting default filters from table
manuasir Jun 18, 2018
9169a65
Adapting /agent endpoint to work with custom filters, redesigned agen…
manuasir Jun 18, 2018
364c7cb
Cleaning up agent summary module
manuasir Jun 18, 2018
260f738
Added new backend endpoints for fetching agents version and platforms
manuasir Jun 18, 2018
2f6815f
Redesigned agent summary dashboard closes #113
manuasir Jun 19, 2018
652dad5
Improved manager endpoints in backend
manuasir Jun 21, 2018
9c3ec5c
Fixing CSS classes
manuasir Jun 21, 2018
65f76ee
Redesigning manager status dashboard: added status cards and agent co…
manuasir Jun 21, 2018
98f1e9a
Improving /rules and /decoders endpoints: catching exceptions and par…
manuasir Jun 21, 2018
63dbb8e
Improving styles
manuasir Jun 21, 2018
4626ed1
Rendering last registeered agent information
manuasir Jun 21, 2018
d11cd4d
Fetching last registered agent data from API and rendering it
manuasir Jun 21, 2018
8df1433
Adding margin and palignments to the layout
manuasir Jun 21, 2018
405f774
Merge pull request #117 from wazuh/3.3-dev-manager-status-redesign
manuasir Jun 25, 2018
770365a
Providing flex style to configuration dashboards
manuasir Jun 25, 2018
b832145
Using string literalls in configuration controller
manuasir Jun 25, 2018
1170829
Changing style in cluster dynamic view
manuasir Jun 25, 2018
d476d5c
Added fontawesome and wazuh classes to configuration cluster and sysc…
manuasir Jun 25, 2018
c6a8ac9
Adapting hr separators to wazuh style
manuasir Jun 25, 2018
4384ab7
Redesigned syscheck configuration view
manuasir Jun 25, 2018
890c367
Redesigned rootcheck configuration view
manuasir Jun 25, 2018
d73a56d
Redesigned auth configuration view
manuasir Jun 25, 2018
253bfad
Redesigned ruleset configuration view
manuasir Jun 25, 2018
28af13e
Redesigned command and remote configuration views
manuasir Jun 25, 2018
0f98eab
Manager configuration redesigned, this closes #119
manuasir Jun 25, 2018
b1427f6
Merge pull request #120 from wazuh/3.3-dev-conf-redesign
manuasir Jun 25, 2018
628612e
Using string literralls in agent configuration controller
manuasir Jun 25, 2018
e965b1d
Redirecting to settings in case of error in agent summary dashboard
manuasir Jun 26, 2018
ac7dfc9
Redesigning left menu in agent configuration dashboard
manuasir Jun 26, 2018
81f489b
Providing style to dynamic elements in agent group configuration dash…
manuasir Jun 26, 2018
e0388cf
Added new styles and llayout to dynamic agent configuration views, al…
manuasir Jun 26, 2018
128aead
Merge pull request #122 from wazuh/3.3-dev-agentconf-redesign
manuasir Jun 26, 2018
395fb65
Hiding and showing dynamic tables content
manuasir Jun 26, 2018
0ce55b2
Adding new navigation to groups
manuasir Jun 26, 2018
f14beb2
Showing up content of a clicked file
manuasir Jun 26, 2018
71a79d2
Added custom filter method to dynamic table directive class
manuasir Jun 27, 2018
6b78f58
Using custom filter in agents and files dynamic tables in group dashb…
manuasir Jun 27, 2018
92e4a06
Merge pull request #125 from wazuh/3.3-dev-groups-redesign
manuasir Jun 27, 2018
b64b875
Added dynamic filter to tables
manuasir Jun 27, 2018
e6b6a17
Providing cards and margin to elements, this closes #126
manuasir Jun 27, 2018
0e2df4f
Filtering dinamically with dropdowns in tables
manuasir Jun 27, 2018
6590f7c
Improved directive logic. Now filters can be generated dynamically an…
manuasir Jun 28, 2018
3ac3265
Updated ruleset tab to rules
manuasir Jun 28, 2018
96f86a2
Redesigned decoders dashboard. Dynamic filters were included
manuasir Jun 28, 2018
7da5d28
Rules dashboard now usiing new dynamic filters
manuasir Jun 28, 2018
9e90af8
Merge pull request #128 from wazuh/3.3-dev-rules-decoders-redesign
manuasir Jun 28, 2018
3e79956
Added logs summary endpoint in Splunk backend
manuasir Jun 28, 2018
762dae6
Redesigned logs dashboard, added filters and styles. this commit clos…
manuasir Jun 28, 2018
eb03454
Merge pull request #130 from wazuh/3.3-dev-logs-redesign
manuasir Jun 28, 2018
c9a1159
Adapting agents backend to use new filters
manuasir Jun 28, 2018
95567bd
Agents summary using new filters
manuasir Jun 28, 2018
0fa6dee
Adapting agent summary controller to new tables logic
manuasir Jun 28, 2018
85bff2e
Improved extended class, noww uses the new filter logic. this fixes a…
manuasir Jun 28, 2018
f40c2b5
Merge pull request #131 from wazuh/3.3-fix-filters
manuasir Jun 28, 2018
86dac1b
Redesigned settings dashboarrd. This closes #132
manuasir Jun 28, 2018
d8a7bba
Adding current index and API and changing style of nav bar
manuasir Jun 28, 2018
e34ead6
Fixing navbar buttons
manuasir Jun 28, 2018
ad739a3
Merge pull request #133 from wazuh/3.3-settings-redesign
manuasir Jun 28, 2018
caea9d9
Updating selected index and API directive in rest of dashboards
manuasir Jun 29, 2018
eedd295
Fixing margins in dashboardboard title
manuasir Jun 29, 2018
ec84b54
Removing console logs
manuasir Jun 29, 2018
dc0810c
Fixing filters in groups dashboard
manuasir Jun 29, 2018
f8c2fcb
Changing dashboard titles
manuasir Jun 29, 2018
8d4ef4c
Fixing agents group configuration visualization
manuasir Jun 29, 2018
09e4c6e
Setting store agents status history to active by default
manuasir Jun 29, 2018
3af6552
Fixing margin in settings title label
manuasir Jun 29, 2018
684a0c4
Setting type field to password in settings
manuasir Jun 29, 2018
b9271f3
Adding asterisk to required input fields in settings
manuasir Jun 29, 2018
2a747e9
Changing style in titles
manuasir Jun 29, 2018
f1cee04
Fixing generated query when clicked on most active agent
manuasir Jun 29, 2018
47278f7
Merge pull request #136 from wazuh/3.3-fixes-before-release
manuasir Jun 29, 2018
9a007fc
Updated CHANGELOG to v3.3.0-7.1.1-rev-8
manuasir Jun 29, 2018
083a9ed
Bump version
manuasir Jun 29, 2018
408deee
Bump version
manuasir Jun 29, 2018
8359893
Deleting useless folder
manuasir Jun 29, 2018
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
Prev Previous commit
Next Next commit
Fixed aand improved gent group configuration dashboard
  • Loading branch information
manuasir committed Jun 12, 2018
commit 2ab2f55ad1d0a1ef8476bf2249fc4d5e25638978
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,14 @@ require([
CredentialService.checkSelectedApiConnection().then(({ api }) => {

const errorConnectionToast = new Toast('error', 'toast-bottom-right', 'Error when loading data', 1000, 250, 250)
const errorChangeAgent = new Toast('error', 'toast-bottom-right', 'Error when change agent', 1000, 250, 250)
const handleError = err => errorConnectionToast.show()
const noConfigHtml = '<p>This agent belongs to a group where actually there`s no configuration.</p></br>' +
'<p>Use the following link to learn about the centralized configuration process and how to set it up:</p></br>' +
'<a href=https://documentation.wazuh.com/current/user-manual/reference/centralized-configuration.html>https://documentation.wazuh.com/current/user-manual/reference/centralized-configuration.html</a>'

const noAgents = '<p>There are no registered agents.</p>'

/**
* Render File Integrity data with object received
* @param {Object} data
Expand Down Expand Up @@ -543,8 +546,8 @@ require([
const loadAgentConfig = async groupInformationEndpoint => {
try {
const groupConfJSON = await ApiService.get(groupInformationEndpoint)
if (groupConfJSON && groupConfJSON.items && groupConfJSON.items[1] && groupConfJSON.items[1].config) {
await initializeData(groupConfJSON.items[1].config)
if (groupConfJSON && groupConfJSON.items && groupConfJSON.items[0] && groupConfJSON.items[0].config) {
await initializeData(groupConfJSON.items[0].config)
}
else {
$('#dynamicContent').html(noConfigHtml)
Expand All @@ -561,10 +564,9 @@ require([
const getFirstAgent = async () => {
try {
const agentListEndpoint = '/agents/agents_name?ip=' + api.url + '&port=' + api.portapi + '&user=' + api.userapi + '&pass=' + api.passapi

const agentListJson = await ApiService.get(agentListEndpoint)
if (agentListJson && agentListJson.data && agentListJson.data.items && agentListJson.data.items.length > 1) {
return agentListJson.data.items[1]
return agentListJson.data.items[1]
} else {
return false
}
Expand All @@ -577,8 +579,9 @@ require([
* Agent list for dropdown
* @param {String} agentListEndpoint
*/
const agentList = async agentListEndpoint => {
const agentList = async () => {
try {
const agentListEndpoint = '/agents/agents_name?ip=' + api.url + '&port=' + api.portapi + '&user=' + api.userapi + '&pass=' + api.passapi
const agentListJson = await ApiService.get(agentListEndpoint)
for (const agent of agentListJson.data.items) {
if (agent.id !== "000") {
Expand All @@ -592,15 +595,23 @@ require([
}
}

/**
* Attaches event to dropdown change
*/
$('#agentList').on('change', function () {
loadDataById($(this).val()).then().catch(err => {
errorChangeAgent.show()
})
})

/**
* Request agent configuration data
*/
const loadData = async (id) => {
const loadDataById = async (id) => {
try {
let endPoint = '/agents/info?ip=' + api.url + '&port=' + api.portapi + '&user=' + api.userapi + '&pass=' + api.passapi + '&id=' + id
let parsedJson = await ApiService.get(endPoint)
const agentListEndpoint = '/agents/agents_name?ip=' + api.url + '&port=' + api.portapi + '&user=' + api.userapi + '&pass=' + api.passapi
await agentList(agentListEndpoint)
let group = parsedJson.group
let groupInformationEndpoint = ''
if (group && typeof group !== 'undefined') {
Expand All @@ -609,69 +620,45 @@ require([
} else {
$('#dynamicContent').html(noConfigHtml)
}

$('#agentList').on('change', async function () {
endPoint = '/agents/info?ip=' + api.url + '&port=' + api.portapi + '&user=' + api.userapi + '&pass=' + api.passapi + '&id=' + this.value
parsedJson = await ApiService.get(endPoint)
group = parsedJson.group
console.log('---------------------------------')
console.log(group)
console.log(typeof group)
console.log(Object.keys(group))
console.log('---------------------------------')
if (typeof group !== 'undefined' && Object.keys(group).length) {
$('#dynamicList').hide()
$('#dynamicContent').empty()
groupInformationEndpoint = '/agents/group_configuration?ip=' + api.url + '&port=' + api.portapi + '&user=' + api.userapi + '&pass=' + api.passapi + '&id=' + group
await loadAgentConfig(groupInformationEndpoint)
$('#dynamicList').show()

} else {
$('#dynamicList').hide()
$('#dynamicContent').html(
'<p>This agent belongs to a group where actually there`s no configuration.</p></br>' +
'<p>Use the following link to learn about the centralized configuration process and how to set it up:</p></br>' +
'<a href=https://documentation.wazuh.com/current/user-manual/reference/centralized-configuration.html>https://documentation.wazuh.com/current/user-manual/reference/centralized-configuration.html</a>'
)
}
})
return
} catch (err) {
return Promise.reject(err)
}
}

/**
* Initializes agent list
* Initializes agent list and shows information about the first agent
*/
const initialize = async () => {
try {
await agentList()
const agent = await getFirstAgent()
console.log('agent ',agent)
if (agent && agent.id) {
loadData(agent.id)
loadDataById(agent.id)
} else {
console.error('There are no agents.')
$('#dynamicContent').empty()
$('#dynamicContent').html(noAgents)
}
} catch (err) {
return Promise.reject(err)
}
}

/**
* Initialize visualizations and data when DOM is ready
* Initializes visualizations and data when DOM is ready
*/
try {
$(document).ready(() => initialize().catch(err => { return Promise.reject(new Error(err))}))
} catch (error) {
$(document).ready(() => initialize().then().catch(err => {
errorConnectionToast.show()
}
}))


$('header').remove();
new LayoutView({ "hideFooter": false, "hideSplunkBar": false, "hideAppBar": false, "hideChrome": false })
.render()
.getContainerElement()
.appendChild($('.dashboard-body')[0]);
}).catch((err) => { window.location.href = '/en-US/app/SplunkAppForWazuh/settings' })
}).catch((err) => {
window.location.href = '/en-US/app/SplunkAppForWazuh/settings'
})
}
)