2018-11-05 10:18:36 +00:00
< div layout = "column" layout-align = "start stretch" ng-if = "ctrl.tab === 'configuration' && !ctrl.load" >
2018-07-09 11:33:31 +00:00
<!-- Headline -->
< div layout = "column" layout-padding >
2018-12-20 09:38:49 +00:00
< span class = "font-size-18" > < i class = "fa fa-fw fa-wrench" aria-hidden = "true" > < / i > Wazuh Kibana plugin
configuration settings< / span >
2018-10-01 09:33:07 +00:00
< span class = "md-subheader" > Configuration file located at < span class = "wz-text-monospace" > /usr/share/kibana/plugins/wazuh/config.yml< / span > < / span >
2018-07-09 11:33:31 +00:00
< / div >
<!-- End headline -->
2018-11-05 10:18:36 +00:00
< div layout = "row" layout-align = "start center" ng-if = "!ctrl.load" >
2018-07-17 07:41:53 +00:00
< md-card flex class = "wz-md-card" >
2018-07-09 11:33:31 +00:00
< md-card-content >
2018-11-28 10:19:30 +00:00
< div layout = "row" >
< i class = "fa fa-fw fa-file-o" aria-hidden = "true" > < / i >
2018-12-20 09:38:49 +00:00
< span class = "wz-headline-title" > Current configuration< / span >
< span flex > < / span >
< a tooltip = "About and help" target = "_blank" tooltip-placement = "left" href = "https://documentation.wazuh.com/current/user-manual/kibana-app/reference/config-file.html"
aria-label="Link to open app about section">
< i class = "fa fa-fw fa-question-circle-o ng-scope" aria-hidden = "true" > < / i >
< / a >
2018-11-28 10:19:30 +00:00
< / div >
2018-07-09 11:33:31 +00:00
< md-divider class = "wz-margin-top-10" > < / md-divider >
2018-12-20 09:38:49 +00:00
< div layout = "row" class = "wz-padding-top-10" >
2018-12-20 12:28:57 +00:00
< table class = "table table-striped table-condensed table-layout-fixed table-hover table-vertical-align-middle" >
2018-11-28 10:19:30 +00:00
< thead class = "wz-text-bold" >
< th class = "wz-text-left col-lg-2" > Setting< / th >
< th class = "wz-text-left col-lg-2" > Value< / th >
< th class = "wz-text-left" > Description< / th >
2018-12-20 09:38:49 +00:00
< th class = "wz-text-left" > Actions< / th >
2018-11-28 10:19:30 +00:00
< / thead >
< tbody >
2018-12-20 10:34:45 +00:00
< tr class = "wz-word-wrap" ng-repeat = "(key,value) in ctrl.configuration track by $index"
ng-style="ctrl.editingKey === key & & {'background': '#e2f7ff'}">
2018-11-28 10:19:30 +00:00
< td > {{key}}< / td >
2018-12-20 09:38:49 +00:00
< td >
2019-02-14 08:18:05 +00:00
< input ng-if = "ctrl.editingKey === key && ctrl.configurationTypes[key] === 'string' && key !== 'wazuh.monitoring.creation'"
ng-disabled="ctrl.loadingChange" type="text" class="wz-input-text" ng-model="ctrl.editingNewValue">< / input >
2018-12-20 10:34:45 +00:00
< input ng-if = "ctrl.editingKey === key && ctrl.configurationTypes[key] === 'number'"
2019-02-14 08:18:05 +00:00
ng-disabled="ctrl.loadingChange" type="number" class="wz-input-text" ng-model="ctrl.editingNewValue"
min=0>< / input >
2018-12-20 10:34:45 +00:00
< select ng-if = "ctrl.editingKey === key && ctrl.configurationTypes[key] === 'boolean'"
2019-02-14 08:18:05 +00:00
ng-disabled="ctrl.loadingChange" class="wz-input-text wz-width-100" ng-model="ctrl.editingNewValue"
ng-options="o as o for o in [true, false]">< / select >
< select ng-if = "ctrl.editingKey === key && key === 'wazuh.monitoring.creation'"
ng-disabled="ctrl.loadingChange" class="wz-input-text wz-width-100" ng-model="ctrl.editingNewValue"
ng-options="key as value for (key , value) in {'h': 'hourly', 'd': 'daily', 'w': 'weekly', 'm': 'monthly'}">< / select >
2018-12-20 10:34:45 +00:00
< textarea ng-if = "ctrl.editingKey === key && ctrl.configurationTypes[key] === 'object'"
2019-02-14 08:18:05 +00:00
ng-disabled="ctrl.loadingChange" class="wz-input-text wz-width-100" ng-model="ctrl.editingNewValue">< / textarea >
2018-12-20 09:38:49 +00:00
< span ng-show = "!ctrl.editingKey || ctrl.editingKey !== key" > {{value}}< / span >
< / td >
2018-11-28 10:19:30 +00:00
< td > {{ctrl.configEquivalence(key)}}< / td >
2018-12-20 12:28:57 +00:00
< td class = "action-btn-td" >
2018-12-28 14:51:47 +00:00
< div ng-hide = "key === 'admin' || !ctrl.configuration['admin']" >
< span ng-show = "!ctrl.editingKey || ctrl.editingKey !== key" tooltip = "Edit"
ng-click="ctrl.setEditingKey(key, value)" class="fa fa-fw fa-pencil cursor-pointer">< / span >
< span ng-show = "ctrl.editingKey === key && !ctrl.loadingChange" tooltip = "Cancel"
class="fa fa-fw fa-times cursor-pointer" ng-click="ctrl.cancelEditingKey()">< / span >
< span ng-show = "ctrl.editingKey === key && ctrl.editingNewValue !== '' && !ctrl.loadingChange"
tooltip="Apply" class="fa fa-fw fa-success cursor-pointer" ng-click="ctrl.editKey(key, ctrl.editingNewValue)">< / span >
< span ng-show = "ctrl.editingKey === key && ctrl.loadingChange" > < i class = "fa fa-fw fa-spin fa-spinner" > < / i > < / span >
< / div >
2018-12-20 09:38:49 +00:00
< / td >
2018-11-28 10:19:30 +00:00
< / tr >
< / tbody >
< / table >
2018-07-09 11:33:31 +00:00
< / div >
< / md-card-content >
< / md-card >
< / div >
2018-12-20 09:38:49 +00:00
< / div >