Commit 45a34a30 by Dominik Prokop Committed by GitHub

Remove homelinks panel (#28808)

parent 77f6c241
...@@ -58,7 +58,6 @@ import * as barGaugePanel from 'app/plugins/panel/bargauge/module'; ...@@ -58,7 +58,6 @@ import * as barGaugePanel from 'app/plugins/panel/bargauge/module';
import * as logsPanel from 'app/plugins/panel/logs/module'; import * as logsPanel from 'app/plugins/panel/logs/module';
import * as newsPanel from 'app/plugins/panel/news/module'; import * as newsPanel from 'app/plugins/panel/news/module';
import * as livePanel from 'app/plugins/panel/live/module'; import * as livePanel from 'app/plugins/panel/live/module';
import * as homeLinksPanel from 'app/plugins/panel/homelinks/module';
import * as welcomeBanner from 'app/plugins/panel/welcome/module'; import * as welcomeBanner from 'app/plugins/panel/welcome/module';
const builtInPlugins: any = { const builtInPlugins: any = {
...@@ -102,7 +101,6 @@ const builtInPlugins: any = { ...@@ -102,7 +101,6 @@ const builtInPlugins: any = {
'app/plugins/panel/piechart/module': pieChartPanel, 'app/plugins/panel/piechart/module': pieChartPanel,
'app/plugins/panel/bargauge/module': barGaugePanel, 'app/plugins/panel/bargauge/module': barGaugePanel,
'app/plugins/panel/logs/module': logsPanel, 'app/plugins/panel/logs/module': logsPanel,
'app/plugins/panel/homelinks/module': homeLinksPanel,
'app/plugins/panel/welcome/module': welcomeBanner, 'app/plugins/panel/welcome/module': welcomeBanner,
}; };
......
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
x="0px" y="0px"
viewBox="0 0 395.569 395.569"
style="enable-background:new 0 0 395.569 395.569; fill:#1573B9"
xml:space="preserve">
<g>
<path d="M365.11,81.124c-2.3-29.794-27.261-53.339-57.635-53.339H57.826C25.941,27.785,0,53.726,0,85.61v224.35
c0,31.884,25.941,57.825,57.826,57.825h279.918c31.885,0,57.826-25.941,57.826-57.825V132.03
C395.569,110.043,383.225,90.899,365.11,81.124z M333.99,309.96c0,14.619-11.894,26.514-26.514,26.514H57.826
c-14.62,0-26.514-11.895-26.514-26.514V85.61c0-14.619,11.894-26.514,26.514-26.514h249.65c14.62,0,26.514,11.895,26.514,26.514
V309.96z"/>
<path d="M62.901,145.138h0.652c4.505,0,8.156-3.651,8.156-8.157v-28.756l24.358,33.548c1.536,2.113,3.988,3.365,6.601,3.365h0.791
c0.03,0,0.06-0.006,0.088-0.006c0.041,0,0.081,0.006,0.123,0.006h0.652c4.504,0,8.156-3.651,8.156-8.157V83.399
c0-4.505-3.652-8.157-8.156-8.157h-0.652c-4.506,0-8.157,3.652-8.157,8.157v28.755L71.156,78.606
c-1.535-2.113-3.989-3.364-6.6-3.364h-0.792c-0.03,0-0.058,0.006-0.088,0.006c-0.042,0-0.082-0.006-0.123-0.006h-0.652
c-4.505,0-8.156,3.652-8.156,8.157v53.582C54.745,141.487,58.395,145.138,62.901,145.138z"/>
<path d="M162.419,128.824h-25.441v-10.971h20.764c4.504,0,8.156-3.651,8.156-8.155v-0.653c0-4.506-3.652-8.157-8.156-8.157h-20.764
v-8.681h24.349c4.505,0,8.157-3.651,8.157-8.156v-0.652c0-4.505-3.651-8.157-8.157-8.157h-33.158c-4.505,0-8.157,3.652-8.157,8.157
v53.582c0,4.506,3.652,8.157,8.157,8.157h34.251c4.504,0,8.157-3.651,8.157-8.157C170.576,132.477,166.924,128.824,162.419,128.824
z"/>
<path d="M198.958,145.138h0.501c0.011,0,0.021-0.002,0.032-0.002c0.01,0,0.02,0.002,0.032,0.002h0.421
c3.502,0,6.612-2.235,7.731-5.553l10.196-30.274l10.148,30.265c1.114,3.324,4.227,5.563,7.733,5.563h0.501
c0.011,0,0.02-0.002,0.032-0.002s0.022,0.002,0.033,0.002h0.421c3.495,0,6.602-2.227,7.724-5.537l18.168-53.583
c0.845-2.489,0.437-5.235-1.095-7.371c-1.531-2.137-4-3.405-6.628-3.405h-0.835c-3.516,0-6.636,2.253-7.742,5.59L236.268,111.2
l-10.11-30.376c-1.109-3.333-4.227-5.581-7.739-5.581h-1.14c-3.517,0-6.636,2.253-7.742,5.59L199.474,111.2l-10.109-30.376
c-1.109-3.333-4.227-5.581-7.74-5.581h-0.834c-2.629,0-5.097,1.268-6.63,3.405c-1.532,2.136-1.94,4.882-1.095,7.371l18.168,53.583
C192.355,142.911,195.462,145.138,198.958,145.138z"/>
<path d="M289.496,145.138c18.084,0,26.178-10.525,26.177-20.893c0.125-16.176-13.955-20.431-22.368-22.973
c-9.335-2.822-10.215-3.955-10.215-6.244c0-1.362,3.264-2.82,8.12-2.82c3.25,0,7.099,0.954,9.36,2.318
c3.816,2.306,8.773,1.12,11.135-2.661l0.299-0.479c1.155-1.848,1.521-4.082,1.018-6.202c-0.501-2.121-1.832-3.952-3.693-5.085
c-4.992-3.041-11.765-4.857-18.119-4.857c-17.33,0-25.087,9.937-25.087,19.786c0,15.75,13.332,19.788,22.153,22.459
c9.605,2.909,10.453,4.065,10.432,6.699c0,2.739-4.776,3.986-9.212,3.986c-4.31,0-9.038-1.84-11.766-4.579
c-1.529-1.536-3.605-2.399-5.77-2.402c-0.003,0-0.005,0-0.008,0c-2.162,0-4.239,0.86-5.768,2.39l-0.445,0.446
c-1.543,1.543-2.404,3.64-2.389,5.822c0.015,2.183,0.904,4.269,2.467,5.791C271.838,141.499,280.911,145.138,289.496,145.138z"/>
<path d="M147.338,168.909H69.755c-8.646,0-15.656,7.009-15.656,15.656c0,8.646,7.009,15.656,15.656,15.656h77.582
c8.646,0,15.656-7.01,15.656-15.656C162.994,175.918,155.984,168.909,147.338,168.909z"/>
<path d="M147.338,221.094H69.755c-8.646,0-15.656,7.01-15.656,15.656c0,8.646,7.009,15.656,15.656,15.656h77.582
c8.646,0,15.656-7.009,15.656-15.656C162.994,228.104,155.984,221.094,147.338,221.094z"/>
<path d="M147.338,273.281H69.755c-8.646,0-15.656,7.009-15.656,15.656c0,8.646,7.009,15.656,15.656,15.656h77.582
c8.646,0,15.656-7.01,15.656-15.656C162.994,280.29,155.984,273.281,147.338,273.281z"/>
<path d="M306.61,166.698H186.967c-5.005,0-9.064,4.059-9.064,9.063V297.74c0,5.005,4.059,9.063,9.064,9.063H306.61
c5.006,0,9.064-4.059,9.064-9.063V175.761C315.674,170.756,311.616,166.698,306.61,166.698z"/>
</g>
</svg>
// Libraries
import React, { PureComponent, FC } from 'react';
import { css } from 'emotion';
// Utils & Services
import { PanelPlugin } from '@grafana/data';
import { stylesFactory, styleMixins, Icon, IconName } from '@grafana/ui';
import config from 'app/core/config';
// Types
import { PanelProps } from '@grafana/data';
export interface Props extends PanelProps {}
export class GrafanaLinksPanel extends PureComponent<Props> {
render() {
const styles = getStyles();
return (
<>
<div className={styles.list}>
<HomeLink
title="Documentation"
icon="book"
url="https://grafana.com/docs/grafana/latest?utm_source=grafana_homelinks"
target="_blank"
/>
<HomeLink
title="Getting started"
icon="bolt"
url="https://grafana.com/docs/grafana/latest/guides/getting_started/?utm_source=grafana_homelinks"
target="_blank"
/>
<HomeLink
title="Community forum"
icon="comments-alt"
url="https://community.grafana.com?utm_source=grafana_homelinks"
target="_blank"
/>
<HomeLink
title="Report a bug"
icon="bug"
url="https://github.com/grafana/grafana/issues/new?template=1-bug_report.md"
target="_blank"
/>
</div>
<VersionFooter />
</>
);
}
}
interface HomeLinkProps {
title: string;
url: string;
target?: string;
icon: IconName;
}
export const HomeLink: FC<HomeLinkProps> = ({ title, url, target, icon }) => {
const styles = getStyles();
return (
<a className={styles.item} href={url} target={target}>
<Icon name={icon} className={styles.icon} />
{title}
</a>
);
};
export const VersionFooter: FC = () => {
const styles = getStyles();
const { hideVersion, version, commit } = config.buildInfo;
const versionString = hideVersion ? '' : `Version ${version} (${commit})`;
return <div className={styles.footer}>{versionString}</div>;
};
export const getStyles = stylesFactory(() => {
const { theme } = config;
return {
list: css`
display: flex;
flex-direction: column;
padding: ${theme.spacing.md};
`,
icon: css`
margin-right: ${theme.spacing.sm};
`,
footer: css`
background: ${theme.colors.bg2};
font-size: ${theme.typography.size.sm};
position: absolute;
bottom: 0;
width: 100%;
text-align: center;
padding: ${theme.spacing.sm};
border-radius: 0;
box-shadow: none;
color: ${theme.colors.textWeak};
`,
item: css`
${styleMixins.listItem(theme)}
padding: ${theme.spacing.sm};
display: flex;
margin-bottom: ${theme.spacing.xs};
align-items: center;
`,
};
});
export const plugin = new PanelPlugin(GrafanaLinksPanel).setNoPadding();
{
"type": "panel",
"name": "Home links",
"id": "homelinks",
"hideFromList": true,
"skipDataQuery": true,
"info": {
"author": {
"name": "Grafana Labs",
"url": "https://grafana.com"
},
"logos": {
"small": "img/news.svg",
"large": "img/news.svg"
}
}
}
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