mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
changed the format of rowspan and colspan to be string or number (#859)
This commit is contained in:
@@ -25,8 +25,8 @@ export interface GridCellConfig {
|
|||||||
id?: string;
|
id?: string;
|
||||||
row?: number;
|
row?: number;
|
||||||
col?: number;
|
col?: number;
|
||||||
colspan?: string;
|
colspan?: string | number;
|
||||||
rowspan?: string;
|
rowspan?: string | number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface GridWidgetConfig extends GridCellConfig, WidgetConfig {
|
export interface GridWidgetConfig extends GridCellConfig, WidgetConfig {
|
||||||
@@ -136,7 +136,10 @@ export class DashboardGridContainer extends DashboardTab implements OnDestroy {
|
|||||||
return rowCount * this.cellHeight + 'px';
|
return rowCount * this.cellHeight + 'px';
|
||||||
}
|
}
|
||||||
|
|
||||||
private convertToNumber(value: string, maxNumber: number): number {
|
private convertToNumber(value: string | number, maxNumber: number): number {
|
||||||
|
if (!value) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
if (value === '*') {
|
if (value === '*') {
|
||||||
return maxNumber;
|
return maxNumber;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ export function generateDashboardGridLayoutSchema(type?: 'database' | 'server',
|
|||||||
description: localize('dashboardpage.rowNumber', "The row of the component in the grid")
|
description: localize('dashboardpage.rowNumber', "The row of the component in the grid")
|
||||||
},
|
},
|
||||||
rowspan: {
|
rowspan: {
|
||||||
type: 'string',
|
type: ['string', 'number'],
|
||||||
description: localize('dashboardpage.rowSpan', "The rowspan of the component in the grid. Default value is 1. Use '*' to set to number of rows in the grid.")
|
description: localize('dashboardpage.rowSpan', "The rowspan of the component in the grid. Default value is 1. Use '*' to set to number of rows in the grid.")
|
||||||
},
|
},
|
||||||
col: {
|
col: {
|
||||||
@@ -91,7 +91,7 @@ export function generateDashboardGridLayoutSchema(type?: 'database' | 'server',
|
|||||||
description: localize('dashboardpage.colNumber', "The column of the component in the grid")
|
description: localize('dashboardpage.colNumber', "The column of the component in the grid")
|
||||||
},
|
},
|
||||||
colspan: {
|
colspan: {
|
||||||
type: 'string',
|
type: ['string', 'number'],
|
||||||
description: localize('dashboardpage.colspan', "The colspan of the component in the grid. Default value is 1. Use '*' to set to number of columns in the grid.")
|
description: localize('dashboardpage.colspan', "The colspan of the component in the grid. Default value is 1. Use '*' to set to number of columns in the grid.")
|
||||||
},
|
},
|
||||||
widget: {
|
widget: {
|
||||||
|
|||||||
Reference in New Issue
Block a user