mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Fix column text overflow on BDC status pages (#7928)
* Fix column text overflow on status page * Fix typo * Fix another typo
This commit is contained in:
@@ -17,12 +17,13 @@ import { createViewDetailsButton } from './commonControls';
|
||||
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
const clusterStateColumnWidth = 125;
|
||||
const clusterStateLabelColumnWidth = 100;
|
||||
const clusterStateValueColumnWidth = 225;
|
||||
const healthStatusColumnWidth = 125;
|
||||
|
||||
const overviewIconColumnWidthPx = 25;
|
||||
const overviewServiceNameCellWidthPx = 175;
|
||||
const overviewStateCellWidthPx = 75;
|
||||
const overviewStateCellWidthPx = 150;
|
||||
const overviewHealthStatusCellWidthPx = 100;
|
||||
|
||||
const serviceEndpointRowServiceNameCellWidth = 200;
|
||||
@@ -75,8 +76,8 @@ export class BdcDashboardOverviewPage {
|
||||
const clusterStateLabel = view.modelBuilder.text().withProperties<azdata.TextComponentProperties>({ value: localize('bdc.dashboard.clusterState', "Cluster State :") }).component();
|
||||
const clusterStateValue = view.modelBuilder.text().component();
|
||||
this.clusterStateLoadingComponent = view.modelBuilder.loadingComponent().withItem(clusterStateValue).component();
|
||||
row1.addItem(clusterStateLabel, { CSSStyles: { 'width': `${clusterStateColumnWidth}px`, 'min-width': `${clusterStateColumnWidth}px`, 'user-select': 'none', 'font-weight': 'bold' } });
|
||||
row1.addItem(this.clusterStateLoadingComponent, { CSSStyles: { 'width': `${clusterStateColumnWidth}px`, 'min-width': `${clusterStateColumnWidth}px` } });
|
||||
row1.addItem(clusterStateLabel, { CSSStyles: { 'width': `${clusterStateLabelColumnWidth}px`, 'min-width': `${clusterStateLabelColumnWidth}px`, 'user-select': 'none', 'font-weight': 'bold' } });
|
||||
row1.addItem(this.clusterStateLoadingComponent, { CSSStyles: { 'width': `${clusterStateValueColumnWidth}px`, 'min-width': `${clusterStateValueColumnWidth}px` } });
|
||||
|
||||
// Health Status
|
||||
const healthStatusLabel = view.modelBuilder.text().withProperties<azdata.TextComponentProperties>({ value: localize('bdc.dashboard.healthStatus', "Health Status :") }).component();
|
||||
@@ -233,9 +234,11 @@ export class BdcDashboardOverviewPage {
|
||||
this.dashboard.switchToServiceTab(serviceStatus.serviceName);
|
||||
});
|
||||
serviceStatusRow.addItem(nameCell, { CSSStyles: { 'width': `${overviewServiceNameCellWidthPx}px`, 'min-width': `${overviewServiceNameCellWidthPx}px`, ...cssStyles.text } });
|
||||
const stateCell = this.modelBuilder.text().withProperties({ value: getStateDisplayText(serviceStatus.state), CSSStyles: { ...cssStyles.text } }).component();
|
||||
const stateText = getStateDisplayText(serviceStatus.state);
|
||||
const stateCell = this.modelBuilder.text().withProperties({ value: stateText, title: stateText, CSSStyles: { ...cssStyles.overflowEllipsisText } }).component();
|
||||
serviceStatusRow.addItem(stateCell, { CSSStyles: { 'width': `${overviewStateCellWidthPx}px`, 'min-width': `${overviewStateCellWidthPx}px` } });
|
||||
const healthStatusCell = this.modelBuilder.text().withProperties({ value: getHealthStatusDisplayText(serviceStatus.healthStatus), CSSStyles: { ...cssStyles.text } }).component();
|
||||
const healthStatusText = getHealthStatusDisplayText(serviceStatus.healthStatus);
|
||||
const healthStatusCell = this.modelBuilder.text().withProperties({ value: healthStatusText, title: healthStatusText, CSSStyles: { ...cssStyles.overflowEllipsisText } }).component();
|
||||
serviceStatusRow.addItem(healthStatusCell, { CSSStyles: { 'width': `${overviewHealthStatusCellWidthPx}px`, 'min-width': `${overviewHealthStatusCellWidthPx}px` } });
|
||||
|
||||
if (serviceStatus.healthStatus !== 'healthy' && serviceStatus.details && serviceStatus.details.length > 0) {
|
||||
|
||||
@@ -28,7 +28,7 @@ export interface IInstanceStatus {
|
||||
|
||||
const healthAndStatusIconColumnWidth = 25;
|
||||
const healthAndStatusInstanceNameColumnWidth = 100;
|
||||
const healthAndStatusStateColumnWidth = 75;
|
||||
const healthAndStatusStateColumnWidth = 150;
|
||||
const healthAndStatusHealthColumnWidth = 100;
|
||||
|
||||
const metricsAndLogsInstanceNameColumnWidth = 125;
|
||||
@@ -175,9 +175,11 @@ function createInstanceHealthStatusRow(modelBuilder: azdata.ModelBuilder, instan
|
||||
instanceHealthStatusRow.addItem(statusIconCell, { CSSStyles: { 'width': `${healthAndStatusIconColumnWidth}px`, 'min-width': `${healthAndStatusIconColumnWidth}px` } });
|
||||
const nameCell = modelBuilder.text().withProperties({ value: instanceStatus.instanceName, CSSStyles: { ...cssStyles.text } }).component();
|
||||
instanceHealthStatusRow.addItem(nameCell, { CSSStyles: { 'width': `${healthAndStatusInstanceNameColumnWidth}px`, 'min-width': `${healthAndStatusInstanceNameColumnWidth}px`, ...cssStyles.text } });
|
||||
const stateCell = modelBuilder.text().withProperties({ value: getStateDisplayText(instanceStatus.state), CSSStyles: { ...cssStyles.text } }).component();
|
||||
const stateText = getStateDisplayText(instanceStatus.state);
|
||||
const stateCell = modelBuilder.text().withProperties({ value: stateText, title: stateText, CSSStyles: { ...cssStyles.overflowEllipsisText } }).component();
|
||||
instanceHealthStatusRow.addItem(stateCell, { CSSStyles: { 'width': `${healthAndStatusStateColumnWidth}px`, 'min-width': `${healthAndStatusStateColumnWidth}px` } });
|
||||
const healthStatusCell = modelBuilder.text().withProperties({ value: getHealthStatusDisplayText(instanceStatus.healthStatus), CSSStyles: { ...cssStyles.text } }).component();
|
||||
const healthStatusText = getHealthStatusDisplayText(instanceStatus.healthStatus);
|
||||
const healthStatusCell = modelBuilder.text().withProperties({ value: healthStatusText, title: healthStatusText, CSSStyles: { ...cssStyles.overflowEllipsisText } }).component();
|
||||
instanceHealthStatusRow.addItem(healthStatusCell, { CSSStyles: { 'width': `${healthAndStatusHealthColumnWidth}px`, 'min-width': `${healthAndStatusHealthColumnWidth}px` } });
|
||||
|
||||
if (instanceStatus.healthStatus !== 'healthy' && instanceStatus.details && instanceStatus.details.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user