mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-22 09:35:37 -05:00
BDC Dashboard Style Updates (#7140)
* Style updates * Add highlight line under resource group tabs * Fixes * Update font weight to semi-bold (600)
This commit is contained in:
@@ -593,15 +593,15 @@ class ComponentWrapper implements azdata.Component {
|
||||
public addItem(item: azdata.Component, itemLayout?: any, index?: number): void {
|
||||
let itemImpl = item as ComponentWrapper;
|
||||
if (!itemImpl) {
|
||||
throw new Error(nls.localize('unknownComponentType', "Unkown component type. Must use ModelBuilder to create objects"));
|
||||
throw new Error(nls.localize('unknownComponentType', "Unknown component type. Must use ModelBuilder to create objects"));
|
||||
}
|
||||
let config = new InternalItemConfig(itemImpl, itemLayout);
|
||||
if (index !== undefined && index >= 0 && index < this.items.length) {
|
||||
if (index !== undefined && index >= 0 && index <= this.items.length) {
|
||||
this.itemConfigs.splice(index, 0, config);
|
||||
} else if (!index) {
|
||||
this.itemConfigs.push(config);
|
||||
} else {
|
||||
throw new Error(nls.localize('invalidIndex', "The index is invalid."));
|
||||
throw new Error(nls.localize('invalidIndex', "The index {0} is invalid.", index));
|
||||
}
|
||||
this._proxy.$addToContainer(this._handle, this.id, config.toIItemConfig(), index).then(undefined, (err) => this.handleError(err));
|
||||
}
|
||||
|
||||
@@ -266,12 +266,12 @@ export abstract class ContainerBase<T> extends ComponentBase {
|
||||
if (this.items.some(item => item.descriptor.id === componentDescriptor.id && item.descriptor.type === componentDescriptor.type)) {
|
||||
return;
|
||||
}
|
||||
if (index !== undefined && index !== null && index >= 0 && index < this.items.length) {
|
||||
if (index !== undefined && index !== null && index >= 0 && index <= this.items.length) {
|
||||
this.items.splice(index, 0, new ItemDescriptor(componentDescriptor, config));
|
||||
} else if (!index) {
|
||||
this.items.push(new ItemDescriptor(componentDescriptor, config));
|
||||
} else {
|
||||
throw new Error(nls.localize('invalidIndex', "The index is invalid."));
|
||||
throw new Error(nls.localize('invalidIndex', "The index {0} is invalid.", index));
|
||||
}
|
||||
this.modelStore.eventuallyRunOnComponent(componentDescriptor.id, component => component.registerEventHandler(event => {
|
||||
if (event.eventType === ComponentEventType.validityChanged) {
|
||||
|
||||
Reference in New Issue
Block a user