mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-16 01:25:36 -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:
@@ -77,7 +77,45 @@ export class SqlDatabaseProjectProvider implements dataworkspace.IProjectProvide
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the list of files and directories to the project, and saves the project file
|
||||
* Gets the supported project types
|
||||
*/
|
||||
get projectActions(): (dataworkspace.IProjectAction | dataworkspace.IProjectActionGroup)[] {
|
||||
const addItemAction: dataworkspace.IProjectAction = {
|
||||
id: constants.addItemAction,
|
||||
icon: IconPathHelper.add,
|
||||
run: (treeItem: dataworkspace.WorkspaceTreeItem) => this.projectController.addItemPromptFromNode(treeItem)
|
||||
};
|
||||
|
||||
const schemaCompareAction: dataworkspace.IProjectAction = {
|
||||
id: constants.schemaCompareAction,
|
||||
icon: IconPathHelper.schemaCompare,
|
||||
run: (treeItem: dataworkspace.WorkspaceTreeItem) => this.projectController.schemaCompare(treeItem)
|
||||
};
|
||||
|
||||
const buildAction: dataworkspace.IProjectAction = {
|
||||
id: constants.buildAction,
|
||||
icon: IconPathHelper.build,
|
||||
run: (treeItem: dataworkspace.WorkspaceTreeItem) => this.projectController.buildProject(treeItem)
|
||||
};
|
||||
|
||||
const publishAction: dataworkspace.IProjectAction = {
|
||||
id: constants.publishAction,
|
||||
icon: IconPathHelper.publish,
|
||||
run: (treeItem: dataworkspace.WorkspaceTreeItem) => this.projectController.publishProject(treeItem)
|
||||
};
|
||||
|
||||
const changeTargetPlatformAction: dataworkspace.IProjectAction = {
|
||||
id: constants.changeTargetPlatformAction,
|
||||
icon: IconPathHelper.targetPlatform,
|
||||
run: (treeItem: dataworkspace.WorkspaceTreeItem) => this.projectController.changeTargetPlatform(treeItem)
|
||||
};
|
||||
|
||||
let group: dataworkspace.IProjectActionGroup = { actions: [addItemAction, schemaCompareAction, buildAction, publishAction] };
|
||||
|
||||
return [group, changeTargetPlatformAction];
|
||||
}
|
||||
|
||||
/** Adds the list of files and directories to the project, and saves the project file
|
||||
* @param projectFile The Uri of the project file
|
||||
* @param list list of uris of files and folders to add. Files and folders must already exist. Files and folders must already exist. No files or folders will be added if any do not exist.
|
||||
*/
|
||||
@@ -85,4 +123,31 @@ export class SqlDatabaseProjectProvider implements dataworkspace.IProjectProvide
|
||||
const project = await Project.openProject(projectFile.fsPath);
|
||||
await project.addToProject(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the data to be displayed in the project dashboard
|
||||
*/
|
||||
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 }],
|
||||
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 }],
|
||||
data: this.projectController.dashboardBuildData
|
||||
};
|
||||
|
||||
return [deployInfo, buildInfo];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user