mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 17:22:45 -05:00
Move loading component out of common properties component (#10134)
This commit is contained in:
@@ -42,16 +42,6 @@ export default class PropertiesContainerComponent extends ComponentBase implemen
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
super.setProperties(properties);
|
||||
this._propertiesContainer.displayProperties = this.displayProperties;
|
||||
this._propertiesContainer.loading = this.loading;
|
||||
}
|
||||
|
||||
public get loading(): boolean {
|
||||
return this.getPropertyOrDefault<azdata.PropertiesContainerComponentProperties, boolean>((props) => props.loading, true);
|
||||
}
|
||||
|
||||
public set loading(newValue: boolean) {
|
||||
this.setPropertyFromUI<azdata.PropertiesContainerComponentProperties, boolean>((props, value) => props.loading = value, newValue);
|
||||
this._propertiesContainer.loading = newValue;
|
||||
}
|
||||
|
||||
public get displayProperties(): DisplayProperty[] {
|
||||
|
||||
@@ -52,10 +52,14 @@ const dashboardRegistry = Registry.as<IDashboardRegistry>(DashboardExtensions.Da
|
||||
|
||||
@Component({
|
||||
selector: 'properties-widget',
|
||||
template: '<properties-container></properties-container>'
|
||||
template: `
|
||||
<loading-spinner [loading]="_loading" [loadingMessage]="loadingMessage" [loadingCompletedMessage]="loadingCompletedMessage"></loading-spinner>
|
||||
<properties-container></properties-container>`
|
||||
})
|
||||
export class PropertiesWidgetComponent extends DashboardWidget implements IDashboardWidget, OnInit {
|
||||
@ViewChild(PropertiesContainer) private _propertiesContainer: PropertiesContainer;
|
||||
public loadingMessage: string = nls.localize('loadingProperties', "Loading properties");
|
||||
public loadingCompletedMessage: string = nls.localize('loadingPropertiesCompleted', "Loading properties completed");
|
||||
private _connection: ConnectionManagementInfo;
|
||||
|
||||
constructor(
|
||||
@@ -245,13 +249,6 @@ export class PropertiesWidgetComponent extends DashboardWidget implements IDashb
|
||||
return val;
|
||||
}
|
||||
|
||||
protected setLoadingStatus(loading: boolean): void {
|
||||
super.setLoadingStatus(loading);
|
||||
if (this._inited) {
|
||||
this._propertiesContainer.loading = loading;
|
||||
}
|
||||
}
|
||||
|
||||
public get height(): number {
|
||||
return convertSizeToNumber(this._propertiesContainer.height);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user