Commit 660c9fd4 by Torkel Ödegaard

Merge branch 'develop' of github.com:grafana/grafana into develop

parents 1b3a520b 38b5d786
...@@ -72,14 +72,26 @@ export class PanelEditor extends PureComponent<PanelEditorProps> { ...@@ -72,14 +72,26 @@ export class PanelEditor extends PureComponent<PanelEditorProps> {
render() { render() {
const { plugin } = this.props; const { plugin } = this.props;
const activeTab = store.getState().location.query.tab || 'queries'; let activeTab = store.getState().location.query.tab || 'queries';
const tabs = [ const tabs: PanelEditorTab[] = [
{ id: 'queries', text: 'Queries' }, { id: 'queries', text: 'Queries' },
{ id: 'visualization', text: 'Visualization' }, { id: 'visualization', text: 'Visualization' },
{ id: 'advanced', text: 'Panel Options' }, { id: 'advanced', text: 'Panel Options' },
]; ];
// handle panels that do not have queries tab
if (plugin.exports.PanelCtrl) {
if (!plugin.exports.PanelCtrl.prototype.onDataReceived) {
// remove queries tab
tabs.shift();
// switch tab
if (activeTab === 'queries') {
activeTab = 'visualization';
}
}
}
if (config.alertingEnabled && plugin.id === 'graph') { if (config.alertingEnabled && plugin.id === 'graph') {
tabs.push({ tabs.push({
id: 'alert', id: 'alert',
......
...@@ -7,6 +7,8 @@ const defaultContent = ` ...@@ -7,6 +7,8 @@ const defaultContent = `
For markdown syntax help: [commonmark.org/help](https://commonmark.org/help/) For markdown syntax help: [commonmark.org/help](https://commonmark.org/help/)
`; `;
export class TextPanelCtrl extends PanelCtrl { export class TextPanelCtrl extends PanelCtrl {
......
...@@ -17,11 +17,12 @@ ...@@ -17,11 +17,12 @@
} }
.toolbar__main { .toolbar__main {
padding: $input-padding-y $input-padding-x; padding: 0 $input-padding-x;
font-size: $font-size-md; font-size: $font-size-md;
line-height: $input-line-height; line-height: $input-line-height;
color: $input-color; color: $input-color;
background-color: $input-bg; background-color: $input-bg;
height: $gf-form-input-height;
border: $input-border; border: $input-border;
border-radius: $input-border-radius; border-radius: $input-border-radius;
display: flex; display: flex;
......
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