-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
68 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
module.exports = function(kibana) { | ||
return new kibana.Plugin({ | ||
uiExports: { | ||
visTypes: ['plugins/relational_filter/relational_filter'] | ||
} | ||
}); | ||
|
||
export default function(kibana) { | ||
return new kibana.Plugin({ | ||
uiExports: { | ||
visTypes: ['plugins/relational_filter/relational_filter'] | ||
} | ||
}); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "relational_filter", | ||
"version": "5.6.4", | ||
"version": "6.1.1", | ||
"description": "Visualization with the possibility to create filters based on relations between different documents" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,58 @@ | ||
require('plugins/relational_filter/relationalFilterController'); | ||
|
||
import { TemplateVisTypeProvider } from 'ui/template_vis_type/template_vis_type'; | ||
//import { VisController } from './vis_controller'; | ||
import { CATEGORY } from 'ui/vis/vis_category'; | ||
import { VisFactoryProvider } from 'ui/vis/vis_factory'; | ||
import { VisTypesRegistryProvider } from 'ui/registry/vis_types'; | ||
import { VisSchemasProvider } from 'ui/vis/schemas'; | ||
import { uiModules } from 'ui/modules'; | ||
|
||
|
||
import { VisSchemasProvider } from 'ui/vis/editors/default/schemas'; | ||
import optionsTemplate from 'plugins/relational_filter/filter_options.html'; | ||
|
||
|
||
|
||
|
||
import visTemplate from 'plugins/relational_filter/relational_filter.html'; | ||
|
||
// The provider function, which must return our new visualization type | ||
function RelationalFilterProvider(Private) { | ||
const TemplateVisType = Private(TemplateVisTypeProvider); | ||
// Include the Schemas class, which will be used to define schemas | ||
var Schemas = Private(VisSchemasProvider); | ||
|
||
// Describe our visualization | ||
return new TemplateVisType({ | ||
name: 'trRelationalFilter', // The internal id of the visualization (must be unique) | ||
title: 'Relational Filter', // The title of the visualization, shown to the user | ||
description: 'Visualization for filtering based on different document types ', // The description of this vis | ||
icon: 'fa-cloud', // The font awesome icon of this visualization | ||
template: require('plugins/relational_filter/relational_filter.html'), // The template, that will be rendered for this visualization | ||
params: { | ||
editor: optionsTemplate, | ||
defaults: { | ||
outputFormat: 'table', | ||
filterTypes: [] | ||
} | ||
}, | ||
|
||
// Define the aggregation your visualization accepts | ||
|
||
schemas: new Schemas([ | ||
{ | ||
group: 'buckets', | ||
name: 'filterDisplay', | ||
title: 'Filter Display', | ||
min: 1, | ||
max: 1, | ||
aggFilter: ['terms'], | ||
type: 'string', | ||
//function RelationalFilterProvider(Private) { | ||
const RelationalFilterProvider = (Private) => { | ||
const VisFactory = Private(VisFactoryProvider); | ||
const Schemas = Private(VisSchemasProvider); | ||
return VisFactory.createAngularVisualization({ | ||
name: 'trRelationalFilter', | ||
title: 'Relational Filter', | ||
icon: 'fa-cloud', | ||
description: 'Kibana Relational Filter', | ||
category: CATEGORY.OTHER, | ||
visConfig: { | ||
template: visTemplate, | ||
defaults: { | ||
outputFormat: 'table', | ||
filterTypes: [] | ||
} | ||
}, | ||
// requestHandler: 'none', | ||
responseHandler: 'none', | ||
editorConfig: { | ||
optionsTemplate: optionsTemplate, | ||
schemas: new Schemas([ | ||
{ | ||
group: 'buckets', | ||
name: 'filterDisplay', | ||
title: 'Filter Display', | ||
min: 1, | ||
max: 1, | ||
aggFilter: ['terms'], | ||
type: 'string', | ||
}, | ||
|
||
{ | ||
group: 'buckets', | ||
name: 'filterValue', | ||
title: 'Filter Value', | ||
min: 1, | ||
max: 1, | ||
aggFilter: [ 'terms'], | ||
type: 'string' | ||
}, | ||
|
||
]) | ||
}); | ||
{ | ||
group: 'buckets', | ||
name: 'filterValue', | ||
title: 'Filter Value', | ||
min: 1, | ||
max: 1, | ||
aggFilter: [ 'terms'], | ||
type: 'string', | ||
}, | ||
]), | ||
} | ||
}); | ||
} | ||
|
||
// Define the aggregation your visualization accepts | ||
VisTypesRegistryProvider.register(RelationalFilterProvider); |