mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-09 17:52:34 -05:00
More builder removal (#4810)
* remove more builder references * formatting
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
|
||||
import 'vs/css!./media/connectionViewlet';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import { Builder } from 'sql/base/browser/builder';
|
||||
import { Viewlet } from 'vs/workbench/browser/viewlet';
|
||||
import { IAction } from 'vs/base/common/actions';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
@@ -76,41 +75,31 @@ export class ConnectionViewlet extends Viewlet implements IConnectionsViewlet {
|
||||
});
|
||||
}
|
||||
|
||||
public create(parent: HTMLElement): Promise<void> {
|
||||
return new Promise<void>((resolve) => {
|
||||
super.create(parent);
|
||||
this._root = parent;
|
||||
let parentBuilder = new Builder(parent);
|
||||
parentBuilder.div({ class: 'server-explorer-viewlet' }, (viewletContainer) => {
|
||||
viewletContainer.div({ class: 'search-box' }, (searchBoxContainer) => {
|
||||
let searchServerString = localize('Search server names', 'Search server names');
|
||||
this._searchBox = new InputBox(
|
||||
searchBoxContainer.getHTMLElement(),
|
||||
null,
|
||||
{
|
||||
placeholder: searchServerString,
|
||||
actions: [this._clearSearchAction],
|
||||
ariaLabel: searchServerString
|
||||
}
|
||||
);
|
||||
public create(parent: HTMLElement): void {
|
||||
super.create(parent);
|
||||
this._root = parent;
|
||||
const viewletContainer = DOM.append(parent, DOM.$('div.server-explorer-viewlet'));
|
||||
const searchBoxContainer = DOM.append(viewletContainer, DOM.$('div.search-box'));
|
||||
this._searchBox = new InputBox(
|
||||
searchBoxContainer,
|
||||
null,
|
||||
{
|
||||
placeholder: localize('Search server names', 'Search server names'),
|
||||
actions: [this._clearSearchAction],
|
||||
ariaLabel: localize('Search server names', 'Search server names')
|
||||
}
|
||||
);
|
||||
|
||||
this._searchBox.onDidChange(() => {
|
||||
this.search(this._searchBox.value);
|
||||
});
|
||||
this._searchBox.onDidChange(() => {
|
||||
this.search(this._searchBox.value);
|
||||
});
|
||||
|
||||
// Theme styler
|
||||
this._toDisposeViewlet.push(attachInputBoxStyler(this._searchBox, this._themeService));
|
||||
// Theme styler
|
||||
this._toDisposeViewlet.push(attachInputBoxStyler(this._searchBox, this._themeService));
|
||||
|
||||
});
|
||||
viewletContainer.div({ Class: 'object-explorer-view' }, (viewContainer) => {
|
||||
this._serverTreeView.renderBody(viewContainer.getHTMLElement()).then(() => {
|
||||
resolve(null);
|
||||
}, error => {
|
||||
warn('render registered servers: ' + error);
|
||||
resolve(null);
|
||||
});
|
||||
});
|
||||
});
|
||||
const viewContainer = DOM.append(viewletContainer, DOM.$('div.object-explorer-view'));
|
||||
this._serverTreeView.renderBody(viewContainer).then(undefined, error => {
|
||||
warn('render registered servers: ' + error);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user