Add some more logging to ModelView components (#13387)

* Add some more logging to ModelView components

* Remove catch

* remove unused
This commit is contained in:
Charles Gagnon
2020-11-13 10:30:40 -08:00
committed by GitHub
parent b3d99117ca
commit cbe2ba0901
35 changed files with 149 additions and 75 deletions

View File

@@ -22,6 +22,7 @@ import { Color } from 'vs/base/common/color';
import { IComponentDescriptor, IComponent, IModelStore, ComponentEventType } from 'sql/platform/dashboard/browser/interfaces';
import { convertSize } from 'sql/base/browser/dom';
import { createIconCssClass } from 'sql/workbench/browser/modelComponents/iconUtils';
import { ILogService } from 'vs/platform/log/common/log';
@Component({
selector: 'modelview-button',
@@ -54,9 +55,10 @@ export default class ButtonComponent extends ComponentWithIconBase<azdata.Button
constructor(
@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef,
@Inject(IWorkbenchThemeService) private themeService: IWorkbenchThemeService,
@Inject(forwardRef(() => ElementRef)) el: ElementRef
@Inject(forwardRef(() => ElementRef)) el: ElementRef,
@Inject(ILogService) logService: ILogService
) {
super(changeRef, el);
super(changeRef, el, logService);
}
ngAfterViewInit(): void {

View File

@@ -19,6 +19,7 @@ import { KeyCode } from 'vs/base/common/keyCodes';
import * as DOM from 'vs/base/browser/dom';
import { IComponent, IComponentDescriptor, IModelStore, ComponentEventType } from 'sql/platform/dashboard/browser/interfaces';
import { IColorTheme } from 'vs/platform/theme/common/themeService';
import { ILogService } from 'vs/platform/log/common/log';
export interface ActionDescriptor {
label: string;
@@ -66,9 +67,10 @@ export default class CardComponent extends ComponentWithIconBase<azdata.CardProp
@ViewChild('cardDiv', { read: ElementRef }) private cardDiv: ElementRef;
constructor(@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef,
@Inject(forwardRef(() => ElementRef)) el: ElementRef,
@Inject(IWorkbenchThemeService) private themeService: IWorkbenchThemeService
@Inject(IWorkbenchThemeService) private themeService: IWorkbenchThemeService,
@Inject(ILogService) logService: ILogService
) {
super(changeRef, el);
super(changeRef, el, logService);
}
ngAfterViewInit(): void {

View File

@@ -17,6 +17,7 @@ import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/work
import { IComponent, IComponentDescriptor, IModelStore, ComponentEventType } from 'sql/platform/dashboard/browser/interfaces';
import { isNumber } from 'vs/base/common/types';
import { convertSize } from 'sql/base/browser/dom';
import { ILogService } from 'vs/platform/log/common/log';
@Component({
selector: 'modelview-checkbox',
@@ -33,8 +34,9 @@ export default class CheckBoxComponent extends ComponentBase<azdata.CheckBoxProp
constructor(
@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef,
@Inject(IWorkbenchThemeService) private themeService: IWorkbenchThemeService,
@Inject(ILogService) logService: ILogService,
@Inject(forwardRef(() => ElementRef)) el: ElementRef) {
super(changeRef, el);
super(changeRef, el, logService);
}
ngAfterViewInit(): void {

View File

@@ -20,6 +20,7 @@ import { EventType, addDisposableListener } from 'vs/base/browser/dom';
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
import { IComponentDescriptor, IComponent, IModelStore, IComponentEventArgs, ComponentEventType } from 'sql/platform/dashboard/browser/interfaces';
import { convertSize } from 'sql/base/browser/dom';
import { ILogService } from 'vs/platform/log/common/log';
export type IUserFriendlyIcon = string | URI | { light: string | URI; dark: string | URI };
@@ -35,7 +36,8 @@ export abstract class ComponentBase<TPropertyBag extends azdata.ComponentPropert
constructor(
protected _changeRef: ChangeDetectorRef,
protected _el: ElementRef) {
protected _el: ElementRef,
protected logService: ILogService) {
super();
}
@@ -280,17 +282,24 @@ export abstract class ContainerBase<T, TPropertyBag extends azdata.ComponentProp
@ViewChildren(ModelComponentWrapper) protected _componentWrappers: QueryList<ModelComponentWrapper>;
constructor(
_changeRef: ChangeDetectorRef,
_el: ElementRef
_el: ElementRef,
logService: ILogService
) {
super(_changeRef, _el);
super(_changeRef, _el, logService);
this.items = [];
this._validations.push(() => this.items.every(item => {
return this.modelStore.getComponent(item.descriptor.id)?.valid || false;
}));
this._validations.push(() => {
this.logService.debug(`Running container validation on component ${this.descriptor.id} to check validity of all child items`);
return this.items.every(item => {
const valid = this.modelStore.getComponent(item.descriptor.id)?.valid;
this.logService.debug(`Child item ${item.descriptor.id} validity is ${valid}`);
return valid || false;
});
});
}
/// IComponent container-related implementation
public addToContainer(componentDescriptor: IComponentDescriptor, config: any, index?: number): void {
this.logService.debug(`Adding component ${componentDescriptor.id} to container ${this.descriptor.id}`);
if (!componentDescriptor) {
return;
}
@@ -304,11 +313,17 @@ export abstract class ContainerBase<T, TPropertyBag extends azdata.ComponentProp
} else {
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) {
this.validate();
}
}), true);
this.logService.debug(`Queueing up action to register validation event handler on component ${componentDescriptor.id} in container ${this.descriptor.id}`);
this.modelStore.eventuallyRunOnComponent(componentDescriptor.id, component => {
this.logService.debug(`Registering validation event handler on component ${componentDescriptor.id} in container ${this.descriptor.id}`);
component.registerEventHandler(async event => {
if (event.eventType === ComponentEventType.validityChanged) {
this.logService.debug(`Running validation on container ${this.descriptor.id} because validity of child component ${componentDescriptor.id} changed`);
this.validate();
}
});
}, true);
this._changeRef.detectChanges();
this.onItemsUpdated();
return;

View File

@@ -11,6 +11,7 @@ import { removeCSSRulesContainingSelector } from 'vs/base/browser/dom';
import { URI } from 'vs/base/common/uri';
import { IComponentDescriptor } from 'sql/platform/dashboard/browser/interfaces';
import { convertSize } from 'sql/base/browser/dom';
import { ILogService } from 'vs/platform/log/common/log';
export class ItemDescriptor<T> {
constructor(public descriptor: IComponentDescriptor, public config: T) { }
@@ -22,8 +23,9 @@ export abstract class ComponentWithIconBase<T extends azdata.ComponentWithIconPr
protected _iconPath: IUserFriendlyIcon;
constructor(
changeRef: ChangeDetectorRef,
el: ElementRef,) {
super(changeRef, el);
el: ElementRef,
logService: ILogService) {
super(changeRef, el, logService);
}
/// IComponent implementation

View File

@@ -17,6 +17,7 @@ import { equals as arrayEquals } from 'vs/base/common/arrays';
import { localize } from 'vs/nls';
import { IComponent, IComponentDescriptor, IModelStore, ComponentEventType } from 'sql/platform/dashboard/browser/interfaces';
import { convertSize } from 'sql/base/browser/dom';
import { ILogService } from 'vs/platform/log/common/log';
export enum DeclarativeDataType {
string = 'string',
@@ -40,9 +41,10 @@ export default class DeclarativeTableComponent extends ContainerBase<any, azdata
constructor(
@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef,
@Inject(forwardRef(() => ElementRef)) el: ElementRef
@Inject(forwardRef(() => ElementRef)) el: ElementRef,
@Inject(ILogService) logService: ILogService
) {
super(changeRef, el);
super(changeRef, el, logService);
}
ngAfterViewInit(): void {

View File

@@ -27,6 +27,7 @@ import { SimpleProgressIndicator } from 'sql/workbench/services/progress/browser
import { IEditorProgressService } from 'vs/platform/progress/common/progress';
import { IComponent, IComponentDescriptor, IModelStore } from 'sql/platform/dashboard/browser/interfaces';
import { convertSizeToNumber } from 'sql/base/browser/dom';
import { ILogService } from 'vs/platform/log/common/log';
@Component({
template: `
@@ -56,9 +57,10 @@ export default class DiffEditorComponent extends ComponentBase<azdata.DiffEditor
@Inject(IInstantiationService) private _instantiationService: IInstantiationService,
@Inject(IModelService) private _modelService: IModelService,
@Inject(IModeService) private _modeService: IModeService,
@Inject(ITextModelService) private _textModelService: ITextModelService
@Inject(ITextModelService) private _textModelService: ITextModelService,
@Inject(ILogService) logService: ILogService
) {
super(changeRef, el);
super(changeRef, el, logService);
}
ngAfterViewInit(): void {

View File

@@ -17,6 +17,7 @@ import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
import { KeyCode } from 'vs/base/common/keyCodes';
import { IComponentDescriptor, IComponent, IModelStore, ComponentEventType } from 'sql/platform/dashboard/browser/interfaces';
import { convertSize } from 'sql/base/browser/dom';
import { ILogService } from 'vs/platform/log/common/log';
class DivItem {
constructor(public descriptor: IComponentDescriptor, public config: azdata.DivItemLayout) { }
@@ -45,9 +46,10 @@ export default class DivContainer extends ContainerBase<azdata.DivItemLayout, az
constructor(
@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef,
@Inject(forwardRef(() => ElementRef)) el: ElementRef,
@Inject(forwardRef(() => Renderer2)) private renderer: Renderer2
@Inject(forwardRef(() => Renderer2)) private renderer: Renderer2,
@Inject(ILogService) logService: ILogService
) {
super(changeRef, el);
super(changeRef, el, logService);
this._overflowY = ''; // default
}

View File

@@ -15,6 +15,7 @@ import * as DOM from 'vs/base/browser/dom';
import { ComponentBase } from 'sql/workbench/browser/modelComponents/componentBase';
import { IComponent, IComponentDescriptor, IModelStore } from 'sql/platform/dashboard/browser/interfaces';
import { ILogService } from 'vs/platform/log/common/log';
@Component({
template: '',
@@ -29,9 +30,10 @@ export default class DomComponent extends ComponentBase<azdata.DomProperties> im
constructor(
@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef,
@Inject(forwardRef(() => ElementRef)) el: ElementRef
@Inject(forwardRef(() => ElementRef)) el: ElementRef,
@Inject(ILogService) logService: ILogService
) {
super(changeRef, el);
super(changeRef, el, logService);
}
ngAfterViewInit(): void {

View File

@@ -21,6 +21,7 @@ import { IContextViewService } from 'vs/platform/contextview/browser/contextView
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { IComponent, IComponentDescriptor, IModelStore, ComponentEventType } from 'sql/platform/dashboard/browser/interfaces';
import { localize } from 'vs/nls';
import { ILogService } from 'vs/platform/log/common/log';
@Component({
selector: 'modelview-dropdown',
@@ -52,9 +53,10 @@ export default class DropDownComponent extends ComponentBase<azdata.DropDownProp
@Inject(IWorkbenchThemeService) private themeService: IWorkbenchThemeService,
@Inject(IContextViewService) private contextViewService: IContextViewService,
@Inject(forwardRef(() => ElementRef)) el: ElementRef,
@Inject(IConfigurationService) private readonly configurationService: IConfigurationService
@Inject(IConfigurationService) private readonly configurationService: IConfigurationService,
@Inject(ILogService) logService: ILogService
) {
super(changeRef, el);
super(changeRef, el, logService);
if (this.configurationService) {
this._isInAccessibilityMode = this.configurationService.getValue('editor.accessibilitySupport') === 'on';

View File

@@ -50,9 +50,10 @@ export default class EditorComponent extends ComponentBase<azdata.EditorProperti
@Inject(IModelService) private _modelService: IModelService,
@Inject(IModeService) private _modeService: IModeService,
@Inject(ILogService) private _logService: ILogService,
@Inject(IEditorService) private readonly editorService: IEditorService
@Inject(IEditorService) private readonly editorService: IEditorService,
@Inject(ILogService) logService: ILogService
) {
super(changeRef, el);
super(changeRef, el, logService);
}
ngAfterViewInit(): void {

View File

@@ -15,6 +15,7 @@ import { FileBrowserViewModel } from 'sql/workbench/services/fileBrowser/common/
import { FileNode } from 'sql/workbench/services/fileBrowser/common/fileNode';
import { FileBrowserTreeView } from 'sql/workbench/services/fileBrowser/browser/fileBrowserTreeView';
import { IComponent, IComponentDescriptor, IModelStore, ComponentEventType } from 'sql/platform/dashboard/browser/interfaces';
import { ILogService } from 'vs/platform/log/common/log';
@Component({
selector: 'modelview-fileBrowserTree',
@@ -35,8 +36,9 @@ export default class FileBrowserTreeComponent extends ComponentBase<azdata.FileB
constructor(
@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef,
@Inject(IInstantiationService) private _instantiationService: IInstantiationService,
@Inject(forwardRef(() => ElementRef)) el: ElementRef) {
super(changeRef, el);
@Inject(forwardRef(() => ElementRef)) el: ElementRef,
@Inject(ILogService) logService: ILogService) {
super(changeRef, el, logService);
}
ngAfterViewInit(): void {

View File

@@ -14,6 +14,7 @@ import { FlexLayout, FlexItemLayout } from 'azdata';
import { ContainerBase } from 'sql/workbench/browser/modelComponents/componentBase';
import { IComponentDescriptor, IComponent, IModelStore } from 'sql/platform/dashboard/browser/interfaces';
import { convertSize } from 'sql/base/browser/dom';
import { ILogService } from 'vs/platform/log/common/log';
export class FlexItem {
constructor(public descriptor: IComponentDescriptor, public config: FlexItemLayout) { }
@@ -45,9 +46,10 @@ export default class FlexContainer extends ContainerBase<FlexItemLayout> impleme
constructor(
@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef,
@Inject(forwardRef(() => ElementRef)) el: ElementRef
@Inject(forwardRef(() => ElementRef)) el: ElementRef,
@Inject(ILogService) logService: ILogService
) {
super(changeRef, el);
super(changeRef, el, logService);
this._flexFlow = ''; // default
this._justifyContent = ''; // default
}

View File

@@ -14,6 +14,7 @@ import { FormLayout, FormItemLayout } from 'azdata';
import { ContainerBase } from 'sql/workbench/browser/modelComponents/componentBase';
import { IComponentDescriptor, IComponent, IModelStore } from 'sql/platform/dashboard/browser/interfaces';
import { convertSize } from 'sql/base/browser/dom';
import { ILogService } from 'vs/platform/log/common/log';
export interface TitledFormItemLayout {
title: string;
@@ -95,8 +96,9 @@ export default class FormContainer extends ContainerBase<FormItemLayout> impleme
constructor(
@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef,
@Inject(forwardRef(() => ElementRef)) el: ElementRef) {
super(changeRef, el);
@Inject(forwardRef(() => ElementRef)) el: ElementRef,
@Inject(ILogService) logService: ILogService) {
super(changeRef, el, logService);
}
ngOnDestroy(): void {

View File

@@ -17,6 +17,7 @@ import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
import { KeyCode } from 'vs/base/common/keyCodes';
import * as DOM from 'vs/base/browser/dom';
import { IComponent, IComponentDescriptor, IModelStore } from 'sql/platform/dashboard/browser/interfaces';
import { ILogService } from 'vs/platform/log/common/log';
@Component({
selector: 'modelview-groupContainer',
@@ -44,8 +45,9 @@ export default class GroupContainer extends ContainerBase<GroupLayout, GroupCont
constructor(
@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef,
@Inject(forwardRef(() => ElementRef)) el: ElementRef) {
super(changeRef, el);
@Inject(forwardRef(() => ElementRef)) el: ElementRef,
@Inject(ILogService) logService: ILogService) {
super(changeRef, el, logService);
this.collapsed = false;
}

View File

@@ -16,6 +16,7 @@ import { registerThemingParticipant, IColorTheme, ICssStyleCollector } from 'vs/
import { textLinkForeground, textLinkActiveForeground } from 'vs/platform/theme/common/colorRegistry';
import { IOpenerService } from 'vs/platform/opener/common/opener';
import * as DOM from 'vs/base/browser/dom';
import { ILogService } from 'vs/platform/log/common/log';
@Component({
selector: 'modelview-hyperlink',
@@ -28,9 +29,10 @@ export default class HyperlinkComponent extends TitledComponent<azdata.Hyperlink
constructor(
@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef,
@Inject(forwardRef(() => ElementRef)) el: ElementRef,
@Inject(IOpenerService) private openerService: IOpenerService
@Inject(IOpenerService) private openerService: IOpenerService,
@Inject(ILogService) logService: ILogService
) {
super(changeRef, el);
super(changeRef, el, logService);
}
ngAfterViewInit(): void {

View File

@@ -13,6 +13,7 @@ import * as azdata from 'azdata';
import { ITitledComponent } from 'sql/workbench/browser/modelComponents/interfaces';
import { ComponentWithIconBase } from 'sql/workbench/browser/modelComponents/componentWithIconBase';
import { IComponent, IComponentDescriptor, IModelStore } from 'sql/platform/dashboard/browser/interfaces';
import { ILogService } from 'vs/platform/log/common/log';
@Component({
selector: 'modelview-image',
@@ -26,8 +27,9 @@ export default class ImageComponent extends ComponentWithIconBase<azdata.ImageCo
constructor(
@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef,
@Inject(forwardRef(() => ElementRef)) el: ElementRef) {
super(changeRef, el);
@Inject(forwardRef(() => ElementRef)) el: ElementRef,
@Inject(ILogService) logService: ILogService) {
super(changeRef, el, logService);
}
ngAfterViewInit(): void {

View File

@@ -26,6 +26,7 @@ import { assign } from 'vs/base/common/objects';
import { IComponent, IComponentDescriptor, IModelStore, ComponentEventType } from 'sql/platform/dashboard/browser/interfaces';
import { isNumber } from 'vs/base/common/types';
import { convertSize, convertSizeToNumber } from 'sql/base/browser/dom';
import { ILogService } from 'vs/platform/log/common/log';
@Component({
selector: 'modelview-inputBox',
@@ -46,9 +47,10 @@ export default class InputBoxComponent extends ComponentBase<azdata.InputBoxProp
@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef,
@Inject(IWorkbenchThemeService) private themeService: IWorkbenchThemeService,
@Inject(IContextViewService) private contextViewService: IContextViewService,
@Inject(forwardRef(() => ElementRef)) el: ElementRef
@Inject(forwardRef(() => ElementRef)) el: ElementRef,
@Inject(ILogService) logService: ILogService
) {
super(changeRef, el);
super(changeRef, el, logService);
}
ngAfterViewInit(): void {

View File

@@ -17,6 +17,7 @@ import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/work
import { IListRenderer, IListVirtualDelegate } from 'vs/base/browser/ui/list/list';
import { attachListStyler } from 'vs/platform/theme/common/styler';
import { ScrollbarVisibility } from 'vs/base/common/scrollable';
import { ILogService } from 'vs/platform/log/common/log';
@Component({
templateUrl: decodeURI(require.toUrl('./listView.component.html'))
@@ -35,8 +36,9 @@ export default class ListViewComponent extends ComponentBase<azdata.ListViewComp
@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef,
@Inject(IWorkbenchThemeService) private themeService: IWorkbenchThemeService,
@Inject(forwardRef(() => ElementRef)) el: ElementRef,
@Inject(ILogService) logService: ILogService
) {
super(changeRef, el);
super(changeRef, el, logService);
}
ngAfterViewInit(): void {

View File

@@ -19,6 +19,7 @@ import { IContextViewService } from 'vs/platform/contextview/browser/contextView
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
import { KeyCode } from 'vs/base/common/keyCodes';
import { IComponent, IComponentDescriptor, IModelStore, ComponentEventType } from 'sql/platform/dashboard/browser/interfaces';
import { ILogService } from 'vs/platform/log/common/log';
@Component({
selector: 'modelview-listBox',
@@ -38,8 +39,9 @@ export default class ListBoxComponent extends ComponentBase<azdata.ListBoxProper
@Inject(IContextViewService) private contextViewService: IContextViewService,
@Inject(IClipboardService) private clipboardService: IClipboardService,
@Inject(forwardRef(() => ElementRef)) el: ElementRef,
@Inject(ILogService) logService: ILogService
) {
super(changeRef, el);
super(changeRef, el, logService);
}
ngAfterViewInit(): void {

View File

@@ -14,6 +14,7 @@ import { ComponentBase } from 'sql/workbench/browser/modelComponents/componentBa
import { localize } from 'vs/nls';
import { IComponent, IComponentDescriptor, IModelStore } from 'sql/platform/dashboard/browser/interfaces';
import { status } from 'vs/base/browser/ui/aria/aria';
import { ILogService } from 'vs/platform/log/common/log';
@Component({
selector: 'modelview-loadingComponent',
@@ -34,8 +35,9 @@ export default class LoadingComponent extends ComponentBase<azdata.LoadingCompon
constructor(
@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef,
@Inject(forwardRef(() => ElementRef)) el: ElementRef) {
super(changeRef, el);
@Inject(forwardRef(() => ElementRef)) el: ElementRef,
@Inject(ILogService) logService: ILogService) {
super(changeRef, el, logService);
this._validations.push(() => {
if (!this._component) {
return true;

View File

@@ -15,6 +15,7 @@ import { IComponent, IComponentDescriptor, IModelStore } from 'sql/platform/dash
import { PropertiesContainer, PropertyItem } from 'sql/base/browser/ui/propertiesContainer/propertiesContainer.component';
import { registerThemingParticipant, IColorTheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService';
import { PROPERTIES_CONTAINER_PROPERTY_NAME, PROPERTIES_CONTAINER_PROPERTY_VALUE } from 'vs/workbench/common/theme';
import { ILogService } from 'vs/platform/log/common/log';
@Component({
selector: `modelview-properties-container`,
@@ -30,8 +31,9 @@ export default class PropertiesContainerComponent extends ComponentBase<azdata.P
constructor(
@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef,
@Inject(forwardRef(() => ElementRef)) el: ElementRef,
@Inject(ILogService) logService: ILogService
) {
super(changeRef, el);
super(changeRef, el, logService);
}
ngAfterViewInit(): void {

View File

@@ -14,6 +14,7 @@ import * as azdata from 'azdata';
import { ComponentBase } from 'sql/workbench/browser/modelComponents/componentBase';
import { RadioButton } from 'sql/base/browser/ui/radioButton/radioButton';
import { IComponent, IComponentDescriptor, IModelStore, ComponentEventType } from 'sql/platform/dashboard/browser/interfaces';
import { ILogService } from 'vs/platform/log/common/log';
@Component({
selector: 'modelview-radioButton',
@@ -31,8 +32,9 @@ export default class RadioButtonComponent extends ComponentBase<azdata.RadioButt
@ViewChild('input', { read: ElementRef }) private _inputContainer: ElementRef;
constructor(
@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef,
@Inject(forwardRef(() => ElementRef)) el: ElementRef) {
super(changeRef, el);
@Inject(forwardRef(() => ElementRef)) el: ElementRef,
@Inject(ILogService) logService: ILogService) {
super(changeRef, el, logService);
}
ngAfterViewInit(): void {

View File

@@ -15,6 +15,7 @@ import 'vs/css!./media/verticalCard';
import { IComponent, IComponentDescriptor, IModelStore, ComponentEventType } from 'sql/platform/dashboard/browser/interfaces';
import { deepClone } from 'vs/base/common/objects';
import { ILogService } from 'vs/platform/log/common/log';
@Component({
templateUrl: decodeURI(require.toUrl('./radioCardGroup.component.html'))
@@ -30,8 +31,9 @@ export default class RadioCardGroup extends ComponentBase<azdata.RadioCardGroupC
constructor(
@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef,
@Inject(forwardRef(() => ElementRef)) el: ElementRef,
@Inject(ILogService) logService: ILogService
) {
super(changeRef, el);
super(changeRef, el, logService);
}
ngAfterViewInit(): void {

View File

@@ -13,6 +13,7 @@ import * as azdata from 'azdata';
import { ComponentBase } from 'sql/workbench/browser/modelComponents/componentBase';
import { IComponent, IComponentDescriptor, IModelStore } from 'sql/platform/dashboard/browser/interfaces';
import { Separator } from 'sql/base/browser/ui/separator/separator';
import { ILogService } from 'vs/platform/log/common/log';
@Component({
selector: `modelview-separator`,
@@ -29,8 +30,9 @@ export default class SeparatorComponent extends ComponentBase<azdata.SeparatorCo
constructor(
@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef,
@Inject(forwardRef(() => ElementRef)) el: ElementRef,
@Inject(ILogService) logService: ILogService
) {
super(changeRef, el);
super(changeRef, el, logService);
}
ngAfterViewInit(): void {

View File

@@ -65,9 +65,9 @@ export default class SplitViewContainerImpl extends ContainerBase<FlexItemLayout
constructor(
@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef,
@Inject(forwardRef(() => ElementRef)) el: ElementRef,
@Inject(ILogService) private readonly logService: ILogService
@Inject(ILogService) readonly logService: ILogService
) {
super(changeRef, el);
super(changeRef, el, logService);
this._flexFlow = ''; // default
this._justifyContent = ''; // default
this._orientation = Orientation.VERTICAL; // default

View File

@@ -52,9 +52,9 @@ export default class TabbedPanelComponent extends ContainerBase<TabConfig> imple
@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef,
@Inject(forwardRef(() => ElementRef)) el: ElementRef,
@Inject(IWorkbenchThemeService) private themeService: IWorkbenchThemeService,
@Inject(ILogService) private logService: ILogService
@Inject(ILogService) logService: ILogService
) {
super(changeRef, el);
super(changeRef, el, logService);
}
ngAfterViewInit(): void {

View File

@@ -30,6 +30,7 @@ import { convertSizeToNumber } from 'sql/base/browser/dom';
import { ButtonColumn, ButtonClickEventArgs } from 'sql/base/browser/ui/table/plugins/buttonColumn.plugin';
import { IUserFriendlyIcon, createIconCssClass, getIconKey } from 'sql/workbench/browser/modelComponents/iconUtils';
import { HeaderFilter } from 'sql/base/browser/ui/table/plugins/headerFilter.plugin';
import { ILogService } from 'vs/platform/log/common/log';
export enum ColumnSizingMode {
ForceFit = 0, // all columns will be sized to fit in viewable space, no horiz scroll bar
@@ -70,8 +71,9 @@ export default class TableComponent extends ComponentBase<azdata.TableComponentP
constructor(
@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef,
@Inject(IWorkbenchThemeService) private themeService: IWorkbenchThemeService,
@Inject(forwardRef(() => ElementRef)) el: ElementRef) {
super(changeRef, el);
@Inject(forwardRef(() => ElementRef)) el: ElementRef,
@Inject(ILogService) logService: ILogService) {
super(changeRef, el, logService);
}
transformColumns(columns: string[] | azdata.TableColumn[]): Slick.Column<any>[] {

View File

@@ -46,9 +46,9 @@ export default class TextComponent extends TitledComponent<azdata.TextComponentP
@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef,
@Inject(forwardRef(() => ElementRef)) el: ElementRef,
@Inject(IInstantiationService) private instantiationService: IInstantiationService,
@Inject(ILogService) private logService: ILogService,
@Inject(ILogService) logService: ILogService,
@Inject(IThemeService) private themeService: IThemeService) {
super(changeRef, el);
super(changeRef, el, logService);
}
ngAfterViewInit(): void {

View File

@@ -9,14 +9,16 @@ import {
import { ITitledComponent } from 'sql/workbench/browser/modelComponents/interfaces';
import * as azdata from 'azdata';
import { ComponentBase } from 'sql/workbench/browser/modelComponents/componentBase';
import { ILogService } from 'vs/platform/log/common/log';
export abstract class TitledComponent<T extends azdata.TitledComponentProperties> extends ComponentBase<T> implements ITitledComponent {
constructor(
protected _changeRef: ChangeDetectorRef,
protected _el: ElementRef) {
super(_changeRef, _el);
protected _el: ElementRef,
logService: ILogService) {
super(_changeRef, _el, logService);
}
public get title(): string {

View File

@@ -11,6 +11,7 @@ import {
import { ContainerBase } from 'sql/workbench/browser/modelComponents/componentBase';
import { IComponentDescriptor, IComponent, IModelStore } from 'sql/platform/dashboard/browser/interfaces';
import { ILogService } from 'vs/platform/log/common/log';
export enum Orientation {
Horizontal = 'horizontal',
@@ -58,8 +59,9 @@ export default class ToolbarContainer extends ContainerBase<ToolbarItemConfig> i
constructor(
@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef,
@Inject(forwardRef(() => ElementRef)) el: ElementRef) {
super(changeRef, el);
@Inject(forwardRef(() => ElementRef)) el: ElementRef,
@Inject(ILogService) logService: ILogService) {
super(changeRef, el, logService);
this._orientation = Orientation.Horizontal;
}

View File

@@ -27,6 +27,7 @@ import { values } from 'vs/base/common/collections';
import { IThemeService } from 'vs/platform/theme/common/themeService';
import { IComponentDescriptor, IComponent, IModelStore } from 'sql/platform/dashboard/browser/interfaces';
import { convertSizeToNumber } from 'sql/base/browser/dom';
import { ILogService } from 'vs/platform/log/common/log';
class Root implements ITreeComponentItem {
label = {
@@ -57,9 +58,10 @@ export default class TreeComponent extends ComponentBase<azdata.TreeProperties>
@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef,
@Inject(IThemeService) private themeService: IThemeService,
@Inject(IInstantiationService) private _instantiationService: IInstantiationService,
@Inject(forwardRef(() => ElementRef)) el: ElementRef
@Inject(forwardRef(() => ElementRef)) el: ElementRef,
@Inject(ILogService) logService: ILogService
) {
super(changeRef, el);
super(changeRef, el, logService);
}
ngAfterViewInit(): void {