Skip to content

Commit

Permalink
mods
Browse files Browse the repository at this point in the history
  • Loading branch information
andymchugh committed Jan 22, 2024
1 parent 4a1d878 commit 331a561
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/FlowPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export const FlowPanel: React.FC<Props> = ({ options, data, width, height, timeZ
const svgAttribs = svgHolder ? svgHolder.attribs : {width: 0, height: 0};
const svgWidth = svgAttribs.width;
const svgHeight = svgAttribs.height;
const timeSliderHeight = timeSliderEnabled ? 25 : 0;
const timeSliderHeight = timeSliderEnabled ? 60 : 0;
const svgViewWidth = width;
const svgViewHeight = height - timeSliderHeight;
const svgPaddingLeft = Math.max(0, (width - svgWidth) * 0.5);
Expand All @@ -203,7 +203,6 @@ export const FlowPanel: React.FC<Props> = ({ options, data, width, height, timeZ

//---------------------------------------------------------------------------
// Create the JSX

return (
<div className={cx(
styles.wrapper,
Expand All @@ -225,6 +224,7 @@ export const FlowPanel: React.FC<Props> = ({ options, data, width, height, timeZ
)}
onClick={clickHandlerRef.current}
dangerouslySetInnerHTML={{__html: svgElement.outerHTML}}/>
<hr/>
<div>{timeSliderEnabled && timeSlider}</div>
</div>
);
Expand Down
3 changes: 3 additions & 0 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ import { PanelPlugin } from '@grafana/data';
import { FlowOptions } from './types';
import { FlowPanel } from './components/FlowPanel';
import { TroubleshootingEditor } from './components/TroubleshootingEditor';
import {config} from '@grafana/runtime';

export const plugin = new PanelPlugin<FlowOptions>(FlowPanel).setPanelOptions((builder) => {
console.log('andyxxx', config.theme2.isDark)
console.log('andyyyy', config.theme2)
return builder
.addTextInput({
path: 'svg',
Expand Down

0 comments on commit 331a561

Please sign in to comment.