Skip to content
Snippets Groups Projects
Commit 6b743c77 authored by Václav Bartoš's avatar Václav Bartoš
Browse files

TheHiveButton: added missing dependencies, minor improvements

parent 7adb5478
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,9 @@
"build": "plugin-helpers build"
},
"dependencies": {
"request": "^2.88.0"
"request": "^2.88.0",
"@elastic/eui": "10.4.2",
"react": "^16.8.0"
},
"devDependencies": {
"@elastic/eslint-config-kibana": "link:../../packages/eslint-config-kibana",
......
......@@ -26,16 +26,17 @@ import {
import { VisOptionsProps } from 'src/plugins/vis_default_editor/public';
const optionsTemplate = (
function optionsEditor({ stateParams, setValue }) {
return (
<EuiForm>
<EuiFormRow label="Base URL of The Hive">
<EuiFieldText value={editorState.params.url} />
<EuiFieldText value={stateParams.url} />
</EuiFormRow>
<EuiFormRow label="API key">
<EuiFieldText value={editorState.params.apikey} />
<EuiFieldText value={stateParams.apikey} />
</EuiFormRow>
<EuiFormRow label="Username" helpText="Used as the owner of cases created from here">
<EuiFieldText value={editorState.params.owner} />
<EuiFieldText value={stateParams.owner} />
</EuiFormRow>
</EuiForm>
);
......@@ -62,8 +63,8 @@ function TheHiveButtonVisProvider(Private) {
owner: THEHIVE_OWNER,
}
},
editor: 'default',
// editor: MyEditorController,
// editor: optionsEditor,
editor: 'default',
editorConfig: {
optionsTemplate: optionsTemplate,
defaultSize: DefaultEditorSize.MEDIUM,
......@@ -95,22 +96,25 @@ function TheHiveButtonVisProvider(Private) {
schema: 'metric',
},
],
editor: '<div class="hintbox"><i class="fa fa-danger text-info"></i> Some metric must be defined here, but it\'s setting is irrelevant. Just go to "Buckets" below and set up the field to get Observbles from.</div>'
},
{
group: 'buckets',
name: 'group',
title: 'Observables',
min: 1,
max: 1,
min: 0,
//max: 1,
aggFilter: ['terms'],
// defaults: [
// {
// type: 'terms',
// //schema: 'group',
// field: 'ip',
// size: 100,
// }
// ]
defaults: [
{
type: 'terms',
schema: 'group',
field: 'ip',
size: 1000,
orderBy: 'alphabetical',
order: 'ascending',
}
]
},
]),
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment