wazuh-kibana-app/public/templates/settings/settings-configuration.html
2018-12-28 15:51:47 +01:00

68 lines
5.1 KiB
HTML

<div layout="column" layout-align="start stretch" ng-if="ctrl.tab === 'configuration' && !ctrl.load">
<!-- Headline -->
<div layout="column" layout-padding>
<span class="font-size-18"><i class="fa fa-fw fa-wrench" aria-hidden="true"></i> Wazuh Kibana plugin
configuration settings</span>
<span class="md-subheader">Configuration file located at <span class="wz-text-monospace">/usr/share/kibana/plugins/wazuh/config.yml</span></span>
</div>
<!-- End headline -->
<div layout="row" layout-align="start center" ng-if="!ctrl.load">
<md-card flex class="wz-md-card">
<md-card-content>
<div layout="row">
<i class="fa fa-fw fa-file-o" aria-hidden="true"></i>
<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>
</div>
<md-divider class="wz-margin-top-10"></md-divider>
<div layout="row" class="wz-padding-top-10">
<table class="table table-striped table-condensed table-layout-fixed table-hover table-vertical-align-middle">
<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>
<th class="wz-text-left">Actions</th>
</thead>
<tbody>
<tr class="wz-word-wrap" ng-repeat="(key,value) in ctrl.configuration track by $index"
ng-style="ctrl.editingKey === key && {'background': '#e2f7ff'}">
<td>{{key}}</td>
<td>
<input ng-if="ctrl.editingKey === key && ctrl.configurationTypes[key] === 'string'"
ng-disabled="ctrl.loadingChange" id="input-{{key}}" type="text" class="wz-input-text"
ng-model="ctrl.editingNewValue"></input>
<input ng-if="ctrl.editingKey === key && ctrl.configurationTypes[key] === 'number'"
ng-disabled="ctrl.loadingChange" id="input-{{key}}" type="number" class="wz-input-text"
ng-model="ctrl.editingNewValue" min=0></input>
<select ng-if="ctrl.editingKey === key && ctrl.configurationTypes[key] === 'boolean'"
ng-disabled="ctrl.loadingChange" id="input-{{key}}" class="wz-input-text wz-width-100"
ng-model="ctrl.editingNewValue" ng-options="o as o for o in [true, false]"></select>
<textarea ng-if="ctrl.editingKey === key && ctrl.configurationTypes[key] === 'object'"
ng-disabled="ctrl.loadingChange" id="input-{{key}}" class="wz-input-text wz-width-100"
ng-model="ctrl.editingNewValue"></textarea>
<span ng-show="!ctrl.editingKey || ctrl.editingKey !== key">{{value}}</span>
</td>
<td>{{ctrl.configEquivalence(key)}}</td>
<td class="action-btn-td">
<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>
</td>
</tr>
</tbody>
</table>
</div>
</md-card-content>
</md-card>
</div>
</div>