mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-01 01:25:38 -05:00
extend the ListDatabasesRequest to allow more information to be returned (#10186)
* database detail * revert sts change * reuse databaseInfo interface
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user