/
plugin.js
33 lines (30 loc) · 1.13 KB
/
plugin.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
require(['public/v1/api'], function(visallo) {
visallo.registry.registerExtension('org.visallo.web.dashboard.item', {
title: 'Concept Type Counts',
description: 'Show total counts for entity types',
identifier: 'org-visallo-examples-dashboard-item',
report: {
defaultRenderer: 'org-visallo-pie',
endpoint: '/vertex/search',
endpointParameters: {
q: '*',
size: 0,
filter: '[]',
aggregations: [
{
type: 'term',
name: 'field',
field: 'http://visallo.org#conceptType'
}
].map(JSON.stringify)
}
}
});
visallo.registry.registerExtension('org.visallo.web.dashboard.item', {
title: 'React Component',
description: 'Example React Component',
identifier: 'org-visallo-examples-dashboard-item-react',
componentPath: 'org/visallo/examples/dashboard_item/React',
configurationPath: 'org/visallo/examples/dashboard_item/Config'
});
});