mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-04 09:35:38 -05:00
Sql DB project dashboard (#14899)
* First set of changes for workspace dashboard implementing the toolbar * Workspace dashboard container implementation (#14813) * First set of changes for workspace dashboard implementing the toolbar (#14160) * First set of changes for workspace dashboard implementing the toolbar * Addressed comments * Addressed one remaining comment * Removed an extra comma in interfaces file * Addressed comments * Addressed comments * Refactored a bit of code * Remove unnecessary await * Addressed comments * First set of changes for workspace dashboard container * Update targetPlatform icon+add Time column to deploy table * Addressed comments * Removed redundant class definition * Addressed comments * Addressed comments * Change enum to union type in dataworkspace typings * Fix tests * Addressed comments
This commit is contained in:
82
extensions/data-workspace/src/dataworkspace.d.ts
vendored
82
extensions/data-workspace/src/dataworkspace.d.ts
vendored
@@ -4,6 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'dataworkspace' {
|
||||
import * as azdata from 'azdata';
|
||||
import * as vscode from 'vscode';
|
||||
export const enum extension {
|
||||
name = 'Microsoft.data-workspace'
|
||||
@@ -37,8 +38,8 @@ declare module 'dataworkspace' {
|
||||
defaultProjectSaveLocation: vscode.Uri | undefined;
|
||||
|
||||
/**
|
||||
* Verifies that a workspace is open or if it should be automatically created
|
||||
*/
|
||||
* Verifies that a workspace is open or if it should be automatically created
|
||||
*/
|
||||
validateWorkspace(): Promise<boolean>;
|
||||
}
|
||||
|
||||
@@ -70,6 +71,16 @@ declare module 'dataworkspace' {
|
||||
* Gets the supported project types
|
||||
*/
|
||||
readonly supportedProjectTypes: IProjectType[];
|
||||
|
||||
/**
|
||||
* Gets the project actions to be placed on the dashboard toolbar
|
||||
*/
|
||||
readonly projectActions: (IProjectAction | IProjectActionGroup)[];
|
||||
|
||||
/**
|
||||
* Gets the project data to be placed in the dashboard container
|
||||
*/
|
||||
readonly dashboardComponents: IDashboardTable[];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -116,4 +127,71 @@ declare module 'dataworkspace' {
|
||||
*/
|
||||
element: any;
|
||||
}
|
||||
|
||||
export interface IProjectAction {
|
||||
/**
|
||||
* id of the project action
|
||||
*/
|
||||
readonly id: string;
|
||||
|
||||
/**
|
||||
* icon path of the project action
|
||||
*/
|
||||
readonly icon?: azdata.IconPath;
|
||||
|
||||
/**
|
||||
* Run context for each project action
|
||||
* @param treeItem The treeItem in a project's hierarchy, to be used to obtain a Project
|
||||
*/
|
||||
run(treeItem: WorkspaceTreeItem): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* List of project actions that should be grouped and have a separator after the last action
|
||||
*/
|
||||
export interface IProjectActionGroup {
|
||||
actions: IProjectAction[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines table to be presented in the dashboard container
|
||||
*/
|
||||
export interface IDashboardTable {
|
||||
/**
|
||||
* name of the table
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* column definitions
|
||||
*/
|
||||
columns: IDashboardColumnInfo[];
|
||||
|
||||
/**
|
||||
* project data
|
||||
*/
|
||||
data: (string | IconCellValue)[][];
|
||||
}
|
||||
|
||||
/**
|
||||
* Project dashboard table's column information
|
||||
*/
|
||||
export interface IDashboardColumnInfo {
|
||||
displayName: string;
|
||||
width: number;
|
||||
type?: IDashboardColumnType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Cell value of an icon for the table data
|
||||
*/
|
||||
export interface IconCellValue {
|
||||
text: string;
|
||||
icon: azdata.IconPath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Union type representing data types in dashboard table
|
||||
*/
|
||||
export type IDashboardColumnType = 'string' | 'icon';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user