mirror of
https://github.com/grafana/grafana.git
synced 2024-11-22 08:56:43 -06:00
Table: Reorder panel options (#49983)
* Table: Reorder panel options * Fix e2e selector
This commit is contained in:
parent
abfc711c53
commit
f566958555
@ -102,7 +102,7 @@ e2e.scenario({
|
|||||||
e2e.components.PanelEditor.DataPane.content().should('be.visible');
|
e2e.components.PanelEditor.DataPane.content().should('be.visible');
|
||||||
|
|
||||||
// Field & Overrides tabs (need to switch to React based vis, i.e. Table)
|
// Field & Overrides tabs (need to switch to React based vis, i.e. Table)
|
||||||
e2e.components.PanelEditor.OptionsPane.fieldLabel('Header and footer Show header').should('be.visible');
|
e2e.components.PanelEditor.OptionsPane.fieldLabel('Table Show table header').should('be.visible');
|
||||||
e2e.components.PanelEditor.OptionsPane.fieldLabel('Table Column width').should('be.visible');
|
e2e.components.PanelEditor.OptionsPane.fieldLabel('Table Column width').should('be.visible');
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -15,6 +15,8 @@ import { tableMigrationHandler, tablePanelChangedHandler } from './migrations';
|
|||||||
import { PanelOptions, defaultPanelOptions, defaultPanelFieldConfig } from './models.gen';
|
import { PanelOptions, defaultPanelOptions, defaultPanelFieldConfig } from './models.gen';
|
||||||
import { TableSuggestionsSupplier } from './suggestions';
|
import { TableSuggestionsSupplier } from './suggestions';
|
||||||
|
|
||||||
|
const footerCategory = 'Table footer';
|
||||||
|
|
||||||
export const plugin = new PanelPlugin<PanelOptions, TableFieldOptions>(TablePanel)
|
export const plugin = new PanelPlugin<PanelOptions, TableFieldOptions>(TablePanel)
|
||||||
.setPanelChangeHandler(tablePanelChangedHandler)
|
.setPanelChangeHandler(tablePanelChangedHandler)
|
||||||
.setMigrationHandler(tableMigrationHandler)
|
.setMigrationHandler(tableMigrationHandler)
|
||||||
@ -110,21 +112,18 @@ export const plugin = new PanelPlugin<PanelOptions, TableFieldOptions>(TablePane
|
|||||||
builder
|
builder
|
||||||
.addBooleanSwitch({
|
.addBooleanSwitch({
|
||||||
path: 'showHeader',
|
path: 'showHeader',
|
||||||
category: ['Header and footer'],
|
name: 'Show table header',
|
||||||
name: 'Show header',
|
|
||||||
description: "To display table's header or not to display",
|
|
||||||
defaultValue: defaultPanelOptions.showHeader,
|
defaultValue: defaultPanelOptions.showHeader,
|
||||||
})
|
})
|
||||||
.addBooleanSwitch({
|
.addBooleanSwitch({
|
||||||
path: 'footer.show',
|
path: 'footer.show',
|
||||||
category: ['Header and footer'],
|
category: [footerCategory],
|
||||||
name: 'Show Footer',
|
name: 'Show table footer',
|
||||||
description: "To display table's footer or not to display",
|
|
||||||
defaultValue: defaultPanelOptions.footer?.show,
|
defaultValue: defaultPanelOptions.footer?.show,
|
||||||
})
|
})
|
||||||
.addCustomEditor({
|
.addCustomEditor({
|
||||||
id: 'footer.reducer',
|
id: 'footer.reducer',
|
||||||
category: ['Header and footer'],
|
category: [footerCategory],
|
||||||
path: 'footer.reducer',
|
path: 'footer.reducer',
|
||||||
name: 'Calculation',
|
name: 'Calculation',
|
||||||
description: 'Choose a reducer function / calculation',
|
description: 'Choose a reducer function / calculation',
|
||||||
@ -134,7 +133,7 @@ export const plugin = new PanelPlugin<PanelOptions, TableFieldOptions>(TablePane
|
|||||||
})
|
})
|
||||||
.addMultiSelect({
|
.addMultiSelect({
|
||||||
path: 'footer.fields',
|
path: 'footer.fields',
|
||||||
category: ['Header and footer'],
|
category: [footerCategory],
|
||||||
name: 'Fields',
|
name: 'Fields',
|
||||||
description: 'Select the fields that should be calculated',
|
description: 'Select the fields that should be calculated',
|
||||||
settings: {
|
settings: {
|
||||||
@ -161,7 +160,6 @@ export const plugin = new PanelPlugin<PanelOptions, TableFieldOptions>(TablePane
|
|||||||
})
|
})
|
||||||
.addCustomEditor({
|
.addCustomEditor({
|
||||||
id: 'footer.enablePagination',
|
id: 'footer.enablePagination',
|
||||||
category: ['Header and footer'],
|
|
||||||
path: 'footer.enablePagination',
|
path: 'footer.enablePagination',
|
||||||
name: 'Enable pagination',
|
name: 'Enable pagination',
|
||||||
editor: PaginationEditor,
|
editor: PaginationEditor,
|
||||||
|
Loading…
Reference in New Issue
Block a user