Skip to content

Commit

Permalink
server dashboard databases tab update (microsoft#10159)
Browse files Browse the repository at this point in the history
* databases tab

* move icon to common-icons
  • Loading branch information
alanrenmsft authored Apr 27, 2020
1 parent e9339bb commit 5aa8894
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 29 deletions.
23 changes: 0 additions & 23 deletions extensions/mssql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -487,29 +487,6 @@
}
]
}
},
{
"id": "mssql-databases",
"description": "%mssql.tabs.databases%",
"provider": "*",
"title": "%mssql.tabs.databases%",
"when": "dashboardContext == 'server' && !mssql:iscloud && mssql:engineedition != 11",
"group": "home",
"icon": "resources/database.svg",
"container": {
"widgets-container": [
{
"name": "%explorer-widget-title%",
"gridItemConfig": {
"sizex": 3,
"sizey": 3
},
"widget": {
"explorer-widget": {}
}
}
]
}
}
],
"connectionProvider": {
Expand Down
5 changes: 1 addition & 4 deletions extensions/mssql/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,5 @@
"mssql.connectionOptions.packetSize.displayName": "Packet size",
"mssql.connectionOptions.packetSize.description": "Size in bytes of the network packets used to communicate with an instance of SQL Server",
"mssql.connectionOptions.typeSystemVersion.displayName": "Type system version",
"mssql.connectionOptions.typeSystemVersion.description": "Indicates which server type system the provider will expose through the DataReader",

"mssql.tabs.databases": "Databases",
"explorer-widget-title": "Search"
"mssql.connectionOptions.typeSystemVersion.description": "Indicates which server type system the provider will expose through the DataReader"
}
3 changes: 3 additions & 0 deletions src/sql/media/icons/common-icons.css
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,9 @@
background-image: url('ellipsis-blue.svg');
}

.database-colored.codicon {
background-image: url("database_colored.svg");
}

.small {
width: 16px;
Expand Down
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { GRID_CONTAINER, validateGridContainerContribution } from 'sql/workbench
import { values } from 'vs/base/common/collections';
import { IUserFriendlyIcon } from 'sql/workbench/contrib/dashboard/browser/core/dashboardWidget';
import { isValidIcon, createCSSRuleForIcon } from 'sql/workbench/contrib/dashboard/browser/dashboardIconUtil';
import { IDashboardTabGroup } from 'sql/workbench/services/dashboard/browser/common/interfaces';
import { IDashboardTabGroup, IDashboardTab } from 'sql/workbench/services/dashboard/browser/common/interfaces';

export interface IDashboardTabContrib {
id: string;
Expand Down Expand Up @@ -265,3 +265,35 @@ const PredefinedTabGroups: IDashboardTabGroup[] = [
];

PredefinedTabGroups.forEach(tabGroup => registerTabGroup(tabGroup));

/**
* Common Tabs
*/
const CommonTabs: IDashboardTab[] = [
{
id: 'databasesTab',
description: localize('databasesTabDescription', "databases tab"),
provider: 'MSSQL',
title: localize('databasesTabTitle', "Databases"),
when: 'dashboardContext == \'server\' && !mssql:iscloud && mssql:engineedition != 11',
group: 'home',
iconClass: 'database-colored',
publisher: undefined,
container: {
'widgets-container': [
{
name: localize('databasesWidgetTitle', "Search"),
gridItemConfig: {
sizex: 3,
sizey: 3
},
widget: {
'explorer-widget': {}
}
}
]
}
}
];

CommonTabs.forEach(tab => registerTab(tab));
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const defaultVal = [
sizex: 2,
sizey: 2
},
when: 'mssql:engineedition == 11 || mssql:iscloud',
when: 'connectionProvider != \'MSSQL\' || mssql:engineedition == 11 || mssql:iscloud',
widget: {
'explorer-widget': {}
}
Expand Down

0 comments on commit 5aa8894

Please sign in to comment.