server dashboard databases tab update (#10159)

* databases tab

* move icon to common-icons
This commit is contained in:
Alan Ren
2020-04-27 12:37:04 -07:00
committed by GitHub
parent e9339bb0d5
commit 5aa8894686
6 changed files with 38 additions and 29 deletions

View File

@@ -390,6 +390,9 @@
background-image: url('ellipsis-blue.svg');
}
.database-colored.codicon {
background-image: url("database_colored.svg");
}
.small {
width: 16px;

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="a96792b7-ce28-4ca3-9767-4e065ef4820f"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 18 18"
style="enable-background:new 0 0 18 18;" xml:space="preserve">
<style type="text/css">
.st0{fill:url(#SVGID_1_);}
.st1{fill:#E8E8E8;}
.st2{fill:#50E6FF;}
.st3{fill:#198AB3;}
</style>
<title>Icon-databases-130</title>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="2.59" y1="9.84" x2="15.41" y2="9.84" gradientTransform="matrix(1 0 0 -1 0 20)">
<stop offset="0" style="stop-color:#005BA1"/>
<stop offset="7.000000e-02" style="stop-color:#0060A9"/>
<stop offset="0.36" style="stop-color:#0071C8"/>
<stop offset="0.52" style="stop-color:#0078D4"/>
<stop offset="0.64" style="stop-color:#0074CD"/>
<stop offset="0.82" style="stop-color:#006ABB"/>
<stop offset="1" style="stop-color:#005BA1"/>
</linearGradient>
<path class="st0" d="M9,5.1c-3.5,0-6.4-1-6.4-2.3v12.4c0,1.3,2.8,2.3,6.3,2.3H9c3.5,0,6.4-1,6.4-2.3V2.8C15.4,4.1,12.5,5.1,9,5.1z"
/>
<path class="st1" d="M15.4,2.8c0,1.3-2.9,2.3-6.4,2.3s-6.4-1-6.4-2.3S5.5,0.5,9,0.5S15.4,1.5,15.4,2.8"/>
<path class="st2" d="M13.9,2.6c0,0.8-2.2,1.5-4.9,1.5S4.1,3.5,4.1,2.6S6.3,1.2,9,1.2S13.9,1.8,13.9,2.6"/>
<path class="st3" d="M9,3C7.7,3,6.4,3.2,5.1,3.6C6.4,4,7.7,4.2,9,4.1c1.3,0,2.6-0.2,3.9-0.6C11.6,3.1,10.3,3,9,3z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -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;
@@ -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));

View File

@@ -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': {}
}