More updates to HDFS Manage Access dialog (#7611)

* Add display property to ModelView components

* Update DisplayType property in sqlops as well

* More updates to HDFS Manage Access dialog

* More updates to HDFS Manage Access dialog
This commit is contained in:
Charles Gagnon
2019-10-10 10:57:38 -07:00
committed by GitHub
parent 93c9426f25
commit 543e3e2c09
17 changed files with 569 additions and 235 deletions

View File

@@ -693,6 +693,34 @@ class ComponentWrapper implements azdata.Component {
}
}
class ComponentWithIconWrapper extends ComponentWrapper {
constructor(proxy: MainThreadModelViewShape, handle: number, type: ModelComponentTypes, id: string) {
super(proxy, handle, type, id);
}
public get iconPath(): string | URI | { light: string | URI; dark: string | URI } {
return this.properties['iconPath'];
}
public set iconPath(v: string | URI | { light: string | URI; dark: string | URI }) {
this.setProperty('iconPath', v);
}
public get iconHeight(): string | number {
return this.properties['iconHeight'];
}
public set iconHeight(v: string | number) {
this.setProperty('iconHeight', v);
}
public get iconWidth(): string | number {
return this.properties['iconWidth'];
}
public set iconWidth(v: string | number) {
this.setProperty('iconWidth', v);
}
}
class ContainerWrapper<T, U> extends ComponentWrapper implements azdata.Container<T, U> {
constructor(proxy: MainThreadModelViewShape, handle: number, type: ModelComponentTypes, id: string) {
@@ -1152,40 +1180,12 @@ class TextComponentWrapper extends ComponentWrapper implements azdata.TextCompon
}
}
class ImageComponentWrapper extends ComponentWrapper implements azdata.ImageComponentProperties {
class ImageComponentWrapper extends ComponentWithIconWrapper implements azdata.ImageComponentProperties {
constructor(proxy: MainThreadModelViewShape, handle: number, id: string) {
super(proxy, handle, ModelComponentTypes.Image, id);
this.properties = {};
}
public get src(): string {
return this.properties['src'];
}
public set src(v: string) {
this.setProperty('src', v);
}
public get alt(): string {
return this.properties['alt'];
}
public set alt(v: string) {
this.setProperty('alt', v);
}
public get height(): number | string {
return this.properties['height'];
}
public set height(v: number | string) {
this.setProperty('height', v);
}
public get width(): number | string {
return this.properties['width'];
}
public set width(v: number | string) {
this.setProperty('width', v);
}
}
class TableComponentWrapper extends ComponentWrapper implements azdata.TableComponent {
@@ -1391,7 +1391,7 @@ class ListBoxWrapper extends ComponentWrapper implements azdata.ListBoxComponent
}
}
class ButtonWrapper extends ComponentWrapper implements azdata.ButtonComponent {
class ButtonWrapper extends ComponentWithIconWrapper implements azdata.ButtonComponent {
constructor(proxy: MainThreadModelViewShape, handle: number, id: string) {
super(proxy, handle, ModelComponentTypes.Button, id);
@@ -1406,27 +1406,6 @@ class ButtonWrapper extends ComponentWrapper implements azdata.ButtonComponent {
this.setProperty('label', v);
}
public get iconPath(): string | URI | { light: string | URI; dark: string | URI } {
return this.properties['iconPath'];
}
public set iconPath(v: string | URI | { light: string | URI; dark: string | URI }) {
this.setProperty('iconPath', v);
}
public get iconHeight(): string | number {
return this.properties['iconHeight'];
}
public set iconHeight(v: string | number) {
this.setProperty('iconHeight', v);
}
public get iconWidth(): string | number {
return this.properties['iconWidth'];
}
public set iconWidth(v: string | number) {
this.setProperty('iconWidth', v);
}
public get title(): string {
return this.properties['title'];
}