Merge pull request #856 from LarveyOfficial/dashName

 Dash Integration: Ability to re-name widget for multiple instances
This commit is contained in:
Thomas Camlong
2023-04-26 09:54:36 +09:00
committed by GitHub
2 changed files with 9 additions and 2 deletions

View File

@@ -13,6 +13,10 @@ const definition = defineWidget({
id: 'dashdot',
icon: 'https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/dashdot.png',
options: {
dashName: {
type: 'text',
defaultValue: 'Dash.',
},
url: {
type: 'text',
defaultValue: '',
@@ -177,11 +181,11 @@ function DashDotTile({ widget }: DashDotTileProps) {
);
}
const { graphsOrder, usePercentages, columns, graphHeight } = widget.properties;
const { dashName, graphsOrder, usePercentages, columns, graphHeight } = widget.properties;
return (
<Stack spacing="xs">
<Title order={3}>{t('card.title')}</Title>
<Title order={3}>{dashName || t('card.title')}</Title>
{!info && <p>{t('card.errors.noInformation')}</p>}
{info && (
<div className={classes.graphsContainer}>