mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Added 'New Notebook' task on database dashboard (#5996)
This commit is contained in:
@@ -92,10 +92,16 @@ export const databaseDashboardSettingSchema: IJSONSchema = {
|
|||||||
name: 'Tasks',
|
name: 'Tasks',
|
||||||
gridItemConfig: {
|
gridItemConfig: {
|
||||||
sizex: 1,
|
sizex: 1,
|
||||||
sizey: 1
|
sizey: 2
|
||||||
},
|
},
|
||||||
widget: {
|
widget: {
|
||||||
'tasks-widget': [{ name: 'backup', when: '!mssql:iscloud' }, { name: 'restore', when: '!mssql:iscloud' }, 'configureDashboard', 'newQuery']
|
'tasks-widget': [
|
||||||
|
'newQuery',
|
||||||
|
'mssqlCluster.task.newNotebook',
|
||||||
|
{ name: 'backup', when: '!mssql:iscloud' },
|
||||||
|
{ name: 'restore', when: '!mssql:iscloud' },
|
||||||
|
'configureDashboard'
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ import { $ } from 'vs/base/browser/dom';
|
|||||||
import { ExecuteCommandAction } from 'vs/platform/actions/common/actions';
|
import { ExecuteCommandAction } from 'vs/platform/actions/common/actions';
|
||||||
import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||||
import { IProgressService } from 'vs/platform/progress/common/progress';
|
import { IProgressService } from 'vs/platform/progress/common/progress';
|
||||||
|
import { NewNotebookAction } from 'sql/workbench/parts/notebook/notebookActions';
|
||||||
|
|
||||||
export class ObjectMetadataWrapper implements ObjectMetadata {
|
export class ObjectMetadataWrapper implements ObjectMetadata {
|
||||||
public metadataType: MetadataType;
|
public metadataType: MetadataType;
|
||||||
@@ -392,6 +393,7 @@ function getExplorerActions(element: TreeResource, instantiationService: IInstan
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
actions.push(instantiationService.createInstance(CustomExecuteCommandAction, NewQueryAction.ID, NewQueryAction.LABEL));
|
actions.push(instantiationService.createInstance(CustomExecuteCommandAction, NewQueryAction.ID, NewQueryAction.LABEL));
|
||||||
|
actions.push(instantiationService.createInstance(CustomExecuteCommandAction, NewNotebookAction.ID, NewNotebookAction.LABEL));
|
||||||
|
|
||||||
let action: IAction = instantiationService.createInstance(CustomExecuteCommandAction, RestoreAction.ID, RestoreAction.LABEL);
|
let action: IAction = instantiationService.createInstance(CustomExecuteCommandAction, RestoreAction.ID, RestoreAction.LABEL);
|
||||||
if (capabilitiesService.isFeatureAvailable(action, info)) {
|
if (capabilitiesService.isFeatureAvailable(action, info)) {
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
tasks-widget .tile-container {
|
tasks-widget .tile-container {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-flow: column;
|
flex-flow: row wrap;
|
||||||
flex-wrap: wrap;
|
align-content: flex-start;
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks-widget .task-tile {
|
tasks-widget .task-tile {
|
||||||
@@ -20,10 +20,6 @@ tasks-widget .task-tile {
|
|||||||
margin-left: 18px;
|
margin-left: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks-widget .task-tile:last-of-type {
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks-widget .task-tile > div {
|
tasks-widget .task-tile > div {
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
Reference in New Issue
Block a user