Commit e20eea97 by Johannes Schill

panel-header: Display description in modal

parent 330a5c64
...@@ -2,6 +2,7 @@ import React, { PureComponent } from 'react'; ...@@ -2,6 +2,7 @@ import React, { PureComponent } from 'react';
import classNames from 'classnames'; import classNames from 'classnames';
import { PanelHeaderMenu } from './PanelHeaderMenu'; import { PanelHeaderMenu } from './PanelHeaderMenu';
import Tooltip from 'app/core/components/Tooltip/Tooltip';
import { DashboardModel } from 'app/features/dashboard/dashboard_model'; import { DashboardModel } from 'app/features/dashboard/dashboard_model';
import { PanelModel } from 'app/features/dashboard/panel_model'; import { PanelModel } from 'app/features/dashboard/panel_model';
...@@ -41,14 +42,15 @@ export class PanelHeader extends PureComponent<Props, State> { ...@@ -41,14 +42,15 @@ export class PanelHeader extends PureComponent<Props, State> {
const isLoading = false; const isLoading = false;
const panelHeaderClass = classNames({ 'panel-header': true, 'grid-drag-handle': !isFullscreen }); const panelHeaderClass = classNames({ 'panel-header': true, 'grid-drag-handle': !isFullscreen });
const { panel, dashboard, timeInfo } = this.props; const { panel, dashboard, timeInfo } = this.props;
const cornerCssClass = panel.description ? 'panel-info-corner--info' : '';
return ( return (
<div className={panelHeaderClass}> <div className={panelHeaderClass}>
<span className="panel-info-corner"> <Tooltip content="hello world">
<i className="fa" /> <span className={`panel-info-corner ${cornerCssClass}`}>
<span className="panel-info-corner-inner" /> <i className="fa" />
</span> <span className="panel-info-corner-inner" />
</span>
</Tooltip>
{isLoading && ( {isLoading && (
<span className="panel-loading"> <span className="panel-loading">
<i className="fa fa-spinner fa-spin" /> <i className="fa fa-spinner fa-spin" />
......
...@@ -49,6 +49,7 @@ export class PanelModel { ...@@ -49,6 +49,7 @@ export class PanelModel {
maxDataPoints?: number; maxDataPoints?: number;
interval?: string; interval?: string;
description?: string;
// non persisted // non persisted
fullscreen: boolean; fullscreen: boolean;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment