Add background image to sql db projects dashboard (#14942)

* Add background image to sql db projects dashboard

* Removed gradient color

* Added bottom border for header

* Fixed border color
This commit is contained in:
Sakshi Sharma
2021-04-01 17:24:16 -07:00
committed by GitHub
parent ce6ea8af41
commit 30a2b76faf
6 changed files with 117 additions and 22 deletions

View File

@@ -4,6 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import * as vscode from 'vscode';
import * as azdata from 'azdata';
export interface IconPath {
dark: string;
@@ -39,6 +40,8 @@ export class IconPathHelper {
public static error: IconPath;
public static inProgress: IconPath;
public static dashboardSqlProj: azdata.ThemedIconPath;
public static setExtensionContext(extensionContext: vscode.ExtensionContext) {
IconPathHelper.extensionContext = extensionContext;
@@ -68,6 +71,8 @@ export class IconPathHelper {
IconPathHelper.success = IconPathHelper.makeIcon('success', true);
IconPathHelper.error = IconPathHelper.makeIcon('error', true);
IconPathHelper.inProgress = IconPathHelper.makeIcon('inProgress', true);
IconPathHelper.dashboardSqlProj = IconPathHelper.makeIcon('dashboardSqlProj', true);
}
private static makeIcon(name: string, sameIcon: boolean = false) {

View File

@@ -3,6 +3,7 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { ThemedIconPath } from 'azdata';
import * as dataworkspace from 'dataworkspace';
import * as sqldbproj from 'sqldbproj';
import * as vscode from 'vscode';
@@ -130,24 +131,28 @@ export class SqlDatabaseProjectProvider implements dataworkspace.IProjectProvide
get dashboardComponents(): dataworkspace.IDashboardTable[] {
const deployInfo: dataworkspace.IDashboardTable = {
name: constants.Deployments,
columns: [{ displayName: constants.ID, width: 75 },
{ displayName: constants.Status, width: 180, type: 'icon' },
{ displayName: constants.Target, width: 180 },
{ displayName: constants.Time, width: 180 },
{ displayName: constants.Date, width: 180 }],
columns: [{ displayName: constants.ID, width: 100 },
{ displayName: constants.Status, width: 250, type: 'icon' },
{ displayName: constants.Target, width: 250 },
{ displayName: constants.Time, width: 250 },
{ displayName: constants.Date, width: 250 }],
data: this.projectController.dashboardDeployData
};
const buildInfo: dataworkspace.IDashboardTable = {
name: constants.Builds,
columns: [{ displayName: constants.ID, width: 75 },
{ displayName: constants.Status, width: 180, type: 'icon' },
{ displayName: constants.Target, width: 180 },
{ displayName: constants.Time, width: 180 },
{ displayName: constants.Date, width: 180 }],
columns: [{ displayName: constants.ID, width: 100 },
{ displayName: constants.Status, width: 250, type: 'icon' },
{ displayName: constants.Target, width: 250 },
{ displayName: constants.Time, width: 250 },
{ displayName: constants.Date, width: 250 }],
data: this.projectController.dashboardBuildData
};
return [deployInfo, buildInfo];
}
get image(): ThemedIconPath {
return IconPathHelper.dashboardSqlProj;
}
}