Skip to content

Commit

Permalink
fix: resolve import css, remove category
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles committed Oct 7, 2019
1 parent 065d7db commit f2429e4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { resolve } from 'path';
import { existsSync } from 'fs';

export default function (kibana) {
return new kibana.Plugin({
uiExports: {
visTypes: [
'plugins/health_metric_vis/health_metric_vis'
],
styleSheetPaths: resolve(__dirname, 'public/index.scss'),
styleSheetPaths: [resolve(__dirname, 'public/index.scss'),resolve(__dirname, 'public/index.css')].find(p => existsSync(p))
}
});
};
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "health_metric_vis",
"version": "6.5.x",
"version": "6.6.x",
"kibana": {
"version": "6.5.x"
"version": "6.6.x"
},
"author": "clamarque",
"description": "change color of metric depending to the planned state of health",
Expand Down
4 changes: 1 addition & 3 deletions public/health_metric_vis.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import mainTemplate from './health_metric_vis_params.html';
import { VisFactoryProvider } from 'ui/vis/vis_factory';
import { CATEGORY } from 'ui/vis/vis_category';
import { Schemas } from 'ui/vis/editors/default/schemas';
import { VisTypesRegistryProvider } from 'ui/registry/vis_types';
import { vislibColorMaps } from 'ui/vislib/components/color/colormaps';
Expand All @@ -23,7 +22,6 @@ function HealthMetricVisProvider(Private, i18n) {
title: i18n('metricVis.metricTitle', { defaultMessage: 'health-metric' }),
icon: 'visMetric',
description: i18n('metricVis.metricDescription', { defaultMessage: 'Displays a metric with a color according to the planned state of health'}),
category: CATEGORY.DATA,
visConfig: {
component: HealthMetricVisComponent,
defaults: {
Expand Down Expand Up @@ -67,7 +65,7 @@ function HealthMetricVisProvider(Private, i18n) {
label: i18n('metricVis.colorModes.backgroundOptionLabel', { defaultMessage: 'Background' })
}
],
colorSchemas: Object.keys(vislibColorMaps)
colorSchemas: Object.keys(vislibColorMaps).map(value => ({ id: value.id, label: value.label })),
},
optionsTemplate: mainTemplate,
schemas: new Schemas([
Expand Down

0 comments on commit f2429e4

Please sign in to comment.