Minor UI touches (#24371)

* Justify to alignment in stat

* No stats label in inspect

* Use sentence case in panel names

* typos

* typo

* Typo

* Query -> query options

* prettier

* Transformer -> transform data

* Do not show deprecated plugins in the viz picker

* Update viz picker layout
This commit is contained in:
Dominik Prokop 2020-05-08 12:40:42 +02:00 committed by GitHub
parent a86639356e
commit 63d25944c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 20 additions and 16 deletions

View File

@ -114,7 +114,7 @@ export class InspectDataTab extends PureComponent<Props, State> {
<div className={styles.dataTabContent} aria-label={selectors.components.PanelInspector.Data.content}> <div className={styles.dataTabContent} aria-label={selectors.components.PanelInspector.Data.content}>
<div className={styles.toolbar}> <div className={styles.toolbar}>
{data.length > 1 && ( {data.length > 1 && (
<Field label="Transformer" className="flex-grow-1"> <Field label="Transform data" className="flex-grow-1">
<Select options={transformationOptions} value={transformId} onChange={this.onTransformationChange} /> <Select options={transformationOptions} value={transformId} onChange={this.onTransformationChange} />
</Field> </Field>
)} )}

View File

@ -241,7 +241,6 @@ export class PanelInspectorUnconnected extends PureComponent<Props, State> {
return ( return (
<div style={{ paddingBottom: '16px' }}> <div style={{ paddingBottom: '16px' }}>
<div className="section-heading">{name}</div>
<table className="filter-table width-30"> <table className="filter-table width-30">
<tbody> <tbody>
{stats.map((stat, index) => { {stats.map((stat, index) => {

View File

@ -293,7 +293,7 @@ export class QueryOptions extends PureComponent<Props, State> {
return ( return (
<QueryOperationRow <QueryOperationRow
title="Options" title="Query options"
headerElement={this.renderCollapsedText(styles)} headerElement={this.renderCollapsedText(styles)}
isOpen={isOpen} isOpen={isOpen}
onOpen={this.onOpenOptions} onOpen={this.onOpenOptions}

View File

@ -87,7 +87,12 @@ export const VizTypePicker: React.FC<Props> = ({ searchQuery, onTypeChange, curr
return ( return (
<div className={styles.grid}> <div className={styles.grid}>
{hasResults ? ( {hasResults ? (
renderList.map((plugin, index) => renderVizPlugin(plugin, index)) renderList.map((plugin, index) => {
if (plugin.state === PluginState.deprecated) {
return null;
}
return renderVizPlugin(plugin, index);
})
) : ( ) : (
<EmptySearchResult>Could not find anything matching your query</EmptySearchResult> <EmptySearchResult>Could not find anything matching your query</EmptySearchResult>
)} )}
@ -103,7 +108,7 @@ const getStyles = stylesFactory((theme: GrafanaTheme) => {
max-width: 100%; max-width: 100%;
display: grid; display: grid;
grid-gap: ${theme.spacing.md}; grid-gap: ${theme.spacing.md};
grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
`, `,
}; };
}); });

View File

@ -1,6 +1,6 @@
{ {
"type": "panel", "type": "panel",
"name": "Alert List", "name": "Alert list",
"id": "alertlist", "id": "alertlist",
"skipDataQuery": true, "skipDataQuery": true,

View File

@ -1,6 +1,6 @@
{ {
"type": "panel", "type": "panel",
"name": "Annotations list (alpha)", "name": "Annotations list",
"id": "annolist", "id": "annolist",
"state": "alpha", "state": "alpha",

View File

@ -1,6 +1,6 @@
{ {
"type": "panel", "type": "panel",
"name": "Bar Gauge", "name": "Bar gauge",
"id": "bargauge", "id": "bargauge",
"state": "beta", "state": "beta",

View File

@ -11,7 +11,7 @@ export const plugin = new PanelPlugin<GaugeOptions>(GaugePanel)
builder builder
.addBooleanSwitch({ .addBooleanSwitch({
path: 'showThresholdLabels', path: 'showThresholdLabels',
name: 'Show threshold Labels', name: 'Show threshold labels',
description: 'Render the threshold values around the gauge bar', description: 'Render the threshold values around the gauge bar',
defaultValue: false, defaultValue: false,
}) })

View File

@ -119,7 +119,7 @@
</div> </div>
<div class="gf-form-group"> <div class="gf-form-group">
<h5 class="section-heading">Stacking & Null value</h5> <h5 class="section-heading">Stacking and null value</h5>
<gf-form-switch <gf-form-switch
class="gf-form" class="gf-form"
label="Stack" label="Stack"

View File

@ -1,6 +1,6 @@
{ {
"type": "panel", "type": "panel",
"name": "React Graph", "name": "React graph",
"id": "graph2", "id": "graph2",
"state": "alpha", "state": "alpha",

View File

@ -1,6 +1,6 @@
{ {
"type": "panel", "type": "panel",
"name": "Home Links", "name": "Home links",
"id": "homelinks", "id": "homelinks",
"hideFromList": true, "hideFromList": true,

View File

@ -1,6 +1,6 @@
{ {
"type": "panel", "type": "panel",
"name": "News Panel", "name": "News",
"id": "news", "id": "news",
"skipDataQuery": true, "skipDataQuery": true,

View File

@ -1,6 +1,6 @@
{ {
"type": "panel", "type": "panel",
"name": "PieChart v2", "name": "Pie chart v2",
"id": "piechart", "id": "piechart",
"state": "alpha", "state": "alpha",

View File

@ -36,7 +36,7 @@ export const plugin = new PanelPlugin<StatPanelOptions>(StatPanel)
}) })
.addRadio({ .addRadio({
path: 'justifyMode', path: 'justifyMode',
name: 'Justify mode', name: 'Alignment mode',
description: 'Value & title posititioning', description: 'Value & title posititioning',
defaultValue: 'auto', defaultValue: 'auto',
settings: { settings: {

View File

@ -31,7 +31,7 @@ export function addStandardDataReduceOptions(
builder.addRadio({ builder.addRadio({
path: 'reduceOptions.values', path: 'reduceOptions.values',
name: 'Show', name: 'Show',
description: 'Calculate a single value per colum or series or show each row', description: 'Calculate a single value per column or series or show each row',
settings: { settings: {
options: [ options: [
{ value: false, label: 'Calculate' }, { value: false, label: 'Calculate' },