Skip to content

Commit

Permalink
Minor fixes in agents configuration (#1442)
Browse files Browse the repository at this point in the history
  • Loading branch information
juankaromo authored and Jesús Ángel committed May 13, 2019
1 parent c318131 commit 1bc2175
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion public/controllers/management/configuration.js
Expand Up @@ -60,7 +60,7 @@ export class ConfigurationController {

this.$scope.isString = item => typeof item === 'string';

this.hasSize = obj =>
this.$scope.hasSize = obj =>
obj && typeof obj === 'object' && Object.keys(obj).length;

this.$scope.updateSelectedItem = i => (this.$scope.selectedItem = i);
Expand Down
4 changes: 2 additions & 2 deletions public/templates/management/configuration/alerts/labels.html
Expand Up @@ -6,15 +6,15 @@
ng-if="currentConfig[(agent && agent.id !== '000') ? 'agent-labels' : 'analysis-labels'] && isString(currentConfig[(agent && agent.id !== '000') ? 'agent-labels' : 'analysis-labels'])">
</wz-no-config>
<wz-no-config flex error="'not-present'"
ng-if="currentConfig[(agent && agent.id !== '000') ? 'agent-labels' : 'analysis-labels'] && !isString(currentConfig[(agent && agent.id !== '000') ? 'agent-labels' : 'analysis-labels']) && !currentConfig[(agent && agent.id !== '000') ? 'agent-labels' : 'analysis-labels'].labels">
ng-if="currentConfig[(agent && agent.id !== '000') ? 'agent-labels' : 'analysis-labels'] && !isString(currentConfig[(agent && agent.id !== '000') ? 'agent-labels' : 'analysis-labels']) && !hasSize(currentConfig[(agent && agent.id !== '000') ? 'agent-labels' : 'analysis-labels'].labels)">
</wz-no-config>
<wz-no-config flex error="'Wazuh not ready yet'"
ng-if="wazuhNotReadyYet && (!currentConfig || !currentConfig[(agent && agent.id !== '000') ? 'agent-labels' : 'analysis-labels'])" />
<!-- End no configuration section -->

<!-- This section is the main content -->
<div flex layout="column"
ng-if="currentConfig[(agent && agent.id !== '000') ? 'agent-labels' : 'analysis-labels'] && !isString(currentConfig[(agent && agent.id !== '000') ? 'agent-labels' : 'analysis-labels']) && currentConfig[(agent && agent.id !== '000') ? 'agent-labels' : 'analysis-labels'].labels">
ng-if="currentConfig[(agent && agent.id !== '000') ? 'agent-labels' : 'analysis-labels'] && !isString(currentConfig[(agent && agent.id !== '000') ? 'agent-labels' : 'analysis-labels']) && hasSize(currentConfig[(agent && agent.id !== '000') ? 'agent-labels' : 'analysis-labels'].labels)">

<!-- The main card will all the settings -->
<md-card class="wz-md-card" ng-if="!JSONContent && !XMLContent">
Expand Down
3 changes: 3 additions & 0 deletions public/templates/management/configuration/client/client.html
Expand Up @@ -49,6 +49,9 @@
<wz-config-item label="Method used to encrypt communications"
value="currentConfig['agent-client'].client.crypto_method || 'aes'">
</wz-config-item>
<wz-config-item label="Remote configuration is enabled"
value="currentConfig['agent-client'].client.remote_conf || 'yes'">
</wz-config-item>
<wz-config-item label="Auto-restart the agent when receiving valid configuration from manager"
value="currentConfig['agent-client'].client.auto_restart || 'yes'">
</wz-config-item>
Expand Down

0 comments on commit 1bc2175

Please sign in to comment.