IFrame widget improvements (#15483)
changes - - make iframe side panel to match others -- ie use SidePanelHeader for title - make url optional in configuration to match that of the other widgets (allow partial saves) - render No data status when error or no url - split widget sizes into two -- graph widget sizes and widget sizes (graph widgets are a subset of chart widgets)
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import { type WidgetSizeConfig } from '@/page-layout/types/WidgetSizeConfig';
|
||||
import { GraphType } from '~/generated-metadata/graphql';
|
||||
|
||||
export const GRAPH_WIDGET_SIZES: Record<GraphType, WidgetSizeConfig> = {
|
||||
[GraphType.AGGREGATE]: {
|
||||
default: { w: 2, h: 2 },
|
||||
minimum: { w: 2, h: 2 },
|
||||
},
|
||||
[GraphType.GAUGE]: {
|
||||
default: { w: 3, h: 4 },
|
||||
minimum: { w: 3, h: 4 },
|
||||
},
|
||||
[GraphType.PIE]: {
|
||||
default: { w: 4, h: 4 },
|
||||
minimum: { w: 3, h: 4 },
|
||||
},
|
||||
[GraphType.VERTICAL_BAR]: {
|
||||
default: { w: 6, h: 6 },
|
||||
minimum: { w: 4, h: 4 },
|
||||
},
|
||||
[GraphType.HORIZONTAL_BAR]: {
|
||||
default: { w: 6, h: 6 },
|
||||
minimum: { w: 4, h: 4 },
|
||||
},
|
||||
[GraphType.LINE]: {
|
||||
default: { w: 6, h: 10 },
|
||||
minimum: { w: 4, h: 4 },
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user