extend the ListDatabasesRequest to allow more information to be returned (#10186)

* database detail

* revert sts change

* reuse databaseInfo interface
This commit is contained in:
Alan Ren
2020-04-28 13:32:19 -07:00
committed by GitHub
parent 7b6d24c3c6
commit 4ec281313f
7 changed files with 14 additions and 9 deletions

View File

@@ -27,6 +27,7 @@ import { ScrollbarVisibility } from 'vs/base/common/scrollable';
import { subscriptionToDisposable } from 'sql/base/browser/lifecycle';
import { ObjectMetadataWrapper } from 'sql/workbench/contrib/dashboard/browser/widgets/explorer/objectMetadataWrapper';
import { status, alert } from 'vs/base/browser/ui/aria/aria';
import { isStringArray } from 'vs/base/common/types';
@Component({
selector: 'explorer-widget',
@@ -131,10 +132,13 @@ export class ExplorerWidget extends DashboardWidget implements IDashboardWidget,
)));
} else {
const currentProfile = this._bootstrap.connectionManagementService.connectionInfo.connectionProfile;
this._register(subscriptionToDisposable(this._bootstrap.metadataService.databaseNames.subscribe(
this._register(subscriptionToDisposable(this._bootstrap.metadataService.databases.subscribe(
data => {
// Handle the case where there is no metadata service
data = data || [];
if (!isStringArray(data)) {
data = data.map(item => item.options['name'] as string);
}
const profileData = data.map(d => {
const profile = new ConnectionProfile(this.capabilitiesService, currentProfile);
profile.databaseName = d;