mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 01:25:37 -05:00
Merge remote-tracking branch 'origin/master' into ads-master-vscode-2020-05-31T19-47-47
This commit is contained in:
7
src/sql/media/icons/book.svg
Normal file
7
src/sql/media/icons/book.svg
Normal file
@@ -0,0 +1,7 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<title>Artboard 10</title>
|
||||
<g>
|
||||
<path d="M4,6h7V3H4ZM5,4h5V5H5Z"/>
|
||||
<path d="M3,0a1.732,1.732,0,0,0-.742.168,2.256,2.256,0,0,0-1.09,1.09A1.735,1.735,0,0,0,1,2V14a1.947,1.947,0,0,0,.156.777,2.018,2.018,0,0,0,1.067,1.067A1.947,1.947,0,0,0,3,16H14V0ZM3,15a.972.972,0,0,1-.391-.078,1.023,1.023,0,0,1-.531-.531,1.019,1.019,0,0,1,0-.782,1.024,1.024,0,0,1,.215-.316,1.012,1.012,0,0,1,.316-.215A.972.972,0,0,1,3,13H13v2Zm10-3H3a1.836,1.836,0,0,0-.523.074A2.194,2.194,0,0,0,2,12.281V2a.8.8,0,0,1,.09-.359,1.223,1.223,0,0,1,.23-.321,1.246,1.246,0,0,1,.321-.23A.792.792,0,0,1,3,1H13Z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 684 B |
6
src/sql/media/icons/book_image.svg
Normal file
6
src/sql/media/icons/book_image.svg
Normal file
@@ -0,0 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
|
||||
<title>ADS_jupyterBook</title>
|
||||
<path d="M22.545,2.25V24H3.8a2.207,2.207,0,0,1-.878-.176,2.238,2.238,0,0,1-1.2-1.2,2.208,2.208,0,0,1-.176-.879V18H1.194c-.141,0-.28-.006-.416-.018a1.077,1.077,0,0,1-.369-.093.617.617,0,0,1-.264-.229.891.891,0,0,1,0-.82.631.631,0,0,1,.264-.229,1.1,1.1,0,0,1,.369-.093c.136-.012.275-.018.416-.018h.351v-3H1.194c-.141,0-.28-.006-.416-.018a1.077,1.077,0,0,1-.369-.093.617.617,0,0,1-.264-.229.891.891,0,0,1,0-.82.631.631,0,0,1,.264-.229,1.1,1.1,0,0,1,.369-.093c.136-.012.275-.018.416-.018h.351V9H1.194c-.141,0-.28-.006-.416-.018a1.077,1.077,0,0,1-.369-.093A.617.617,0,0,1,.145,8.66a.891.891,0,0,1,0-.82.631.631,0,0,1,.264-.229,1.1,1.1,0,0,1,.369-.093c.136-.012.275-.018.416-.018h.351v-3H1.194c-.141,0-.28-.006-.416-.018a1.077,1.077,0,0,1-.369-.093A.617.617,0,0,1,.145,4.16a.742.742,0,0,1-.1-.41.747.747,0,0,1,.1-.41.631.631,0,0,1,.264-.229,1.1,1.1,0,0,1,.369-.093C.914,3.006,1.053,3,1.194,3h.351V2.508c0-.195.008-.387.024-.574a1.689,1.689,0,0,1,.152-.563A2.221,2.221,0,0,1,3.8,0H20.3a2.215,2.215,0,0,1,.879.176,2.248,2.248,0,0,1,.715.48,2.273,2.273,0,0,1,.481.715A2.214,2.214,0,0,1,22.545,2.25Zm-1.5,17.25V2.25a.76.76,0,0,0-.75-.75H3.8a.745.745,0,0,0-.41.1.634.634,0,0,0-.228.257,1.124,1.124,0,0,0-.1.352,3.191,3.191,0,0,0-.023.393c0,.07,0,.139.006.205s0,.131,0,.193H3.4c.133,0,.268.006.4.018a1.088,1.088,0,0,1,.369.093.672.672,0,0,1,.27.229.714.714,0,0,1,.1.41.709.709,0,0,1-.1.41.657.657,0,0,1-.27.229,1.065,1.065,0,0,1-.369.093c-.136.012-.271.018-.4.018H3.045v3H3.4c.133,0,.268.006.4.018a1.088,1.088,0,0,1,.369.093.672.672,0,0,1,.27.229.853.853,0,0,1,0,.82.657.657,0,0,1-.27.229,1.065,1.065,0,0,1-.369.093C3.665,8.994,3.53,9,3.4,9H3.045v3H3.4c.133,0,.268.006.4.018a1.088,1.088,0,0,1,.369.093.672.672,0,0,1,.27.229.853.853,0,0,1,0,.82.657.657,0,0,1-.27.229,1.065,1.065,0,0,1-.369.093c-.136.012-.271.018-.4.018H3.045v3H3.4c.133,0,.268.006.4.018a1.088,1.088,0,0,1,.369.093.672.672,0,0,1,.27.229.853.853,0,0,1,0,.82.657.657,0,0,1-.27.229,1.065,1.065,0,0,1-.369.093c-.136.012-.271.018-.4.018H3.045v1.5Zm0,3V21h-18v.75a.762.762,0,0,0,.75.75Z" fill="#fff"/>
|
||||
<path d="M16.545,4.5v3h-7.5v-3h7.5m1.5-1.5H7.545V9h10.5V3Z" fill="#fff"/>
|
||||
<rect x="0.045" width="24" height="24" fill="none"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.3 KiB |
11
src/sql/media/icons/book_inverse.svg
Normal file
11
src/sql/media/icons/book_inverse.svg
Normal file
@@ -0,0 +1,11 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0)">
|
||||
<path d="M4 6H11V3H4V6ZM5 4H10V5H5V4Z" fill="white"/>
|
||||
<path d="M2.99998 0C2.74326 0.000315985 2.48981 0.0577002 2.25798 0.168C1.77794 0.392083 1.39207 0.777956 1.16798 1.258C1.05778 1.48986 1.0004 1.74328 0.999984 2V14C0.998165 14.267 1.05127 14.5314 1.15598 14.777C1.36029 15.2573 1.74272 15.6397 2.22298 15.844C2.46855 15.9487 2.73303 16.0018 2.99998 16H14V0H2.99998ZM2.99998 15C2.86566 15.0013 2.73253 14.9747 2.60898 14.922C2.37107 14.8187 2.18127 14.6289 2.07798 14.391C2.02649 14.2671 1.99998 14.1342 1.99998 14C1.99998 13.8658 2.02649 13.7329 2.07798 13.609C2.12918 13.4911 2.20212 13.3839 2.29298 13.293C2.38371 13.2019 2.49095 13.1289 2.60898 13.078C2.73253 13.0253 2.86566 12.9987 2.99998 13H13V15H2.99998ZM13 12H2.99998C2.823 11.9993 2.64684 12.0243 2.47698 12.074C2.31034 12.1238 2.15022 12.1933 1.99998 12.281V2C2.00151 1.87494 2.03233 1.75199 2.08998 1.641C2.14876 1.52225 2.22643 1.41383 2.31998 1.32C2.41408 1.22676 2.52244 1.14912 2.64098 1.09C2.75186 1.03207 2.87489 1.00123 2.99998 1H13V12Z" fill="white"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0">
|
||||
<rect width="16" height="16" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -545,6 +545,13 @@ Includes non-masked style declarations. */
|
||||
background-image: url("database_colored.svg");
|
||||
}
|
||||
|
||||
.book.codicon {
|
||||
|
||||
-webkit-mask-image: url("book_image.svg");
|
||||
-webkit-mask-repeat: no-repeat;
|
||||
-webkit-mask-position: 50% 50%;
|
||||
}
|
||||
|
||||
.small {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* Activity Bar */
|
||||
.monaco-workbench .activitybar .monaco-action-bar .action-label.book {
|
||||
background-color: rgba(255, 255, 255, 0.4);
|
||||
}
|
||||
|
||||
/* Activity Bar */
|
||||
.monaco-workbench .activitybar .monaco-action-bar .checked .action-label.book {
|
||||
background-color: rgb(255, 255, 255);
|
||||
}
|
||||
@@ -46,6 +46,9 @@ import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } fr
|
||||
import { NotebookThemingContribution } from 'sql/workbench/contrib/notebook/browser/notebookThemingContribution';
|
||||
import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle';
|
||||
import { ToggleTabFocusModeAction } from 'vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode';
|
||||
import { NotebookExplorerViewletViewsContribution, OpenNotebookExplorerViewletAction } from 'sql/workbench/contrib/notebook/browser/notebookExplorer/notebookExplorerViewlet';
|
||||
import 'vs/css!./media/notebook.contribution';
|
||||
|
||||
|
||||
Registry.as<IEditorInputFactoryRegistry>(EditorInputFactoryExtensions.EditorInputFactories)
|
||||
.registerEditorInputFactory(FileNotebookInput.ID, FileNoteBookEditorInputFactory);
|
||||
@@ -348,3 +351,16 @@ registerComponentType({
|
||||
selector: MimeRendererComponent.SELECTOR
|
||||
});
|
||||
registerCellComponent(TextCellComponent);
|
||||
|
||||
const workbenchRegistry = Registry.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench);
|
||||
workbenchRegistry.registerWorkbenchContribution(NotebookExplorerViewletViewsContribution, LifecyclePhase.Starting);
|
||||
const registry = Registry.as<IWorkbenchActionRegistry>(WorkbenchActionsExtensions.WorkbenchActions);
|
||||
registry.registerWorkbenchAction(
|
||||
SyncActionDescriptor.create(
|
||||
OpenNotebookExplorerViewletAction,
|
||||
OpenNotebookExplorerViewletAction.ID,
|
||||
OpenNotebookExplorerViewletAction.LABEL,
|
||||
{ primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_B }),
|
||||
'View: Show Notebook Explorer',
|
||||
localize('notebookExplorer.view', "View")
|
||||
);
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
.notebookEditor .in-preview .actions-container .action-item .notebook-button {
|
||||
display: flex;
|
||||
background-size: 16px;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.notebookEditor
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { localize } from 'vs/nls';
|
||||
import { IWorkbenchContribution } from 'vs/workbench/common/contributions';
|
||||
import { IAction } from 'vs/base/common/actions';
|
||||
import { append, $, addClass, toggleClass, Dimension } from 'vs/base/browser/dom';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { IViewletViewOptions } from 'vs/workbench/browser/parts/views/viewsViewlet';
|
||||
import { IStorageService } from 'vs/platform/storage/common/storage';
|
||||
import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace';
|
||||
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { Extensions as ViewContainerExtensions, IViewDescriptor, IViewsRegistry, IViewContainersRegistry, ViewContainerLocation, IViewDescriptorService } from 'vs/workbench/common/views';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
import { IMenuService, MenuId } from 'vs/platform/actions/common/actions';
|
||||
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { ShowViewletAction, Viewlet } from 'vs/workbench/browser/viewlet';
|
||||
import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService';
|
||||
import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet';
|
||||
import { ViewPaneContainer, ViewPane } from 'vs/workbench/browser/parts/views/viewPaneContainer';
|
||||
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
|
||||
|
||||
export const VIEWLET_ID = 'workbench.view.notebooks';
|
||||
|
||||
// Viewlet Action
|
||||
export class OpenNotebookExplorerViewletAction extends ShowViewletAction {
|
||||
public static ID = VIEWLET_ID;
|
||||
public static LABEL = localize('showNotebookExplorer', "Show Notebooks");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
label: string,
|
||||
@IViewletService viewletService: IViewletService,
|
||||
@IEditorGroupsService editorGroupService: IEditorGroupsService,
|
||||
@IWorkbenchLayoutService layoutService: IWorkbenchLayoutService
|
||||
) {
|
||||
super(id, label, VIEWLET_ID, viewletService, editorGroupService, layoutService);
|
||||
}
|
||||
}
|
||||
|
||||
export class NotebookExplorerViewletViewsContribution implements IWorkbenchContribution {
|
||||
|
||||
constructor() {
|
||||
this.registerViews();
|
||||
}
|
||||
|
||||
private registerViews(): void {
|
||||
let viewDescriptors = [];
|
||||
Registry.as<IViewsRegistry>(ViewContainerExtensions.ViewsRegistry).registerViews(viewDescriptors, NOTEBOOK_VIEW_CONTAINER);
|
||||
}
|
||||
}
|
||||
|
||||
export class NotebookExplorerViewlet extends Viewlet {
|
||||
constructor(
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IStorageService protected storageService: IStorageService,
|
||||
@IInstantiationService protected instantiationService: IInstantiationService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@IContextMenuService protected contextMenuService: IContextMenuService,
|
||||
@IExtensionService protected extensionService: IExtensionService,
|
||||
@IWorkspaceContextService protected contextService: IWorkspaceContextService,
|
||||
@IWorkbenchLayoutService protected layoutService: IWorkbenchLayoutService,
|
||||
@IConfigurationService protected configurationService: IConfigurationService
|
||||
) {
|
||||
super(VIEWLET_ID, instantiationService.createInstance(NotebookExplorerViewPaneContainer), telemetryService, storageService, instantiationService, themeService, contextMenuService, extensionService, contextService, layoutService, configurationService);
|
||||
}
|
||||
}
|
||||
|
||||
export class NotebookExplorerViewPaneContainer extends ViewPaneContainer {
|
||||
private root: HTMLElement;
|
||||
|
||||
private notebookSourcesBox: HTMLElement;
|
||||
|
||||
constructor(
|
||||
@IWorkbenchLayoutService layoutService: IWorkbenchLayoutService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IInstantiationService instantiationService: IInstantiationService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@IStorageService storageService: IStorageService,
|
||||
@IWorkspaceContextService contextService: IWorkspaceContextService,
|
||||
@IContextMenuService contextMenuService: IContextMenuService,
|
||||
@IExtensionService extensionService: IExtensionService,
|
||||
@IConfigurationService configurationService: IConfigurationService,
|
||||
@IMenuService private menuService: IMenuService,
|
||||
@IContextKeyService private contextKeyService: IContextKeyService,
|
||||
@IViewDescriptorService viewDescriptorService: IViewDescriptorService
|
||||
) {
|
||||
super(VIEWLET_ID, { mergeViewWithContainerWhenSingleView: true }, instantiationService, configurationService, layoutService, contextMenuService, telemetryService, extensionService, themeService, storageService, contextService, viewDescriptorService);
|
||||
}
|
||||
|
||||
create(parent: HTMLElement): void {
|
||||
addClass(parent, 'notebookExplorer-viewlet');
|
||||
this.root = parent;
|
||||
|
||||
this.notebookSourcesBox = append(this.root, $('.notebookSources'));
|
||||
|
||||
return super.create(this.notebookSourcesBox);
|
||||
}
|
||||
|
||||
public updateStyles(): void {
|
||||
super.updateStyles();
|
||||
}
|
||||
|
||||
focus(): void {
|
||||
}
|
||||
|
||||
layout(dimension: Dimension): void {
|
||||
toggleClass(this.root, 'narrow', dimension.width <= 300);
|
||||
super.layout(new Dimension(dimension.width, dimension.height));
|
||||
}
|
||||
|
||||
getOptimalWidth(): number {
|
||||
return 400;
|
||||
}
|
||||
|
||||
getSecondaryActions(): IAction[] {
|
||||
let menu = this.menuService.createMenu(MenuId.NotebookTitle, this.contextKeyService);
|
||||
let actions = [];
|
||||
menu.getActions({}).forEach(group => {
|
||||
if (group[0] === 'secondary') {
|
||||
actions.push(...group[1]);
|
||||
}
|
||||
});
|
||||
menu.dispose();
|
||||
return actions;
|
||||
}
|
||||
|
||||
protected createView(viewDescriptor: IViewDescriptor, options: IViewletViewOptions): ViewPane {
|
||||
let viewletPanel = this.instantiationService.createInstance(viewDescriptor.ctorDescriptor.ctor, options) as ViewPane;
|
||||
this._register(viewletPanel);
|
||||
return viewletPanel;
|
||||
}
|
||||
}
|
||||
|
||||
export const NOTEBOOK_VIEW_CONTAINER = Registry.as<IViewContainersRegistry>(ViewContainerExtensions.ViewContainersRegistry).registerViewContainer({
|
||||
id: VIEWLET_ID,
|
||||
name: localize('notebookExplorer.name', "Notebooks"),
|
||||
ctorDescriptor: new SyncDescriptor(NotebookExplorerViewPaneContainer),
|
||||
icon: 'book',
|
||||
order: 6,
|
||||
storageId: `${VIEWLET_ID}.state`
|
||||
}, ViewContainerLocation.Sidebar);
|
||||
@@ -0,0 +1,94 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as assert from 'assert';
|
||||
import * as Platform from 'vs/platform/registry/common/platform';
|
||||
import { ViewletDescriptor, Extensions, ViewletRegistry, Viewlet } from 'vs/workbench/browser/viewlet';
|
||||
import * as Types from 'vs/base/common/types';
|
||||
import { workbenchInstantiationService } from 'sql/workbench/test/workbenchTestServices';
|
||||
import { Extensions as ViewContainerExtensions, IViewDescriptor, IViewsRegistry } from 'vs/workbench/common/views';
|
||||
import { NotebookExplorerViewPaneContainer, NOTEBOOK_VIEW_CONTAINER } from 'sql/workbench/contrib/notebook/browser/notebookExplorer/notebookExplorerViewlet';
|
||||
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
|
||||
|
||||
suite('Notebook Explorer Views', () => {
|
||||
|
||||
class NotebookExplorerTestViewlet extends Viewlet {
|
||||
|
||||
constructor() {
|
||||
const instantiationService = workbenchInstantiationService();
|
||||
super('notebookExplorer', instantiationService.createInstance(NotebookExplorerViewPaneContainer), undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined);
|
||||
}
|
||||
|
||||
public layout(dimension: any): void {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
test('ViewDescriptor API', function () {
|
||||
let d = ViewletDescriptor.create(NotebookExplorerTestViewlet, 'id', 'name', 'class', 1);
|
||||
assert.strictEqual(d.id, 'id');
|
||||
assert.strictEqual(d.name, 'name');
|
||||
assert.strictEqual(d.cssClass, 'class');
|
||||
assert.strictEqual(d.order, 1);
|
||||
});
|
||||
|
||||
test('Editor Aware ViewletDescriptor API', function () {
|
||||
let d = ViewletDescriptor.create(NotebookExplorerTestViewlet, 'id', 'name', 'class', 5);
|
||||
assert.strictEqual(d.id, 'id');
|
||||
assert.strictEqual(d.name, 'name');
|
||||
|
||||
d = ViewletDescriptor.create(NotebookExplorerTestViewlet, 'id', 'name', 'class', 5);
|
||||
assert.strictEqual(d.id, 'id');
|
||||
assert.strictEqual(d.name, 'name');
|
||||
});
|
||||
|
||||
test('NotebookExplorer Views registration', function () {
|
||||
assert(Types.isFunction(Platform.Registry.as<IViewsRegistry>(ViewContainerExtensions.ViewsRegistry).registerViews));
|
||||
assert(Types.isFunction(Platform.Registry.as<IViewsRegistry>(ViewContainerExtensions.ViewsRegistry).getViews));
|
||||
assert(Types.isFunction(Platform.Registry.as<IViewsRegistry>(ViewContainerExtensions.ViewsRegistry).getView));
|
||||
|
||||
Platform.Registry.as<IViewsRegistry>(ViewContainerExtensions.ViewsRegistry).registerViews([], NOTEBOOK_VIEW_CONTAINER);
|
||||
|
||||
let oldcount = Platform.Registry.as<IViewsRegistry>(ViewContainerExtensions.ViewsRegistry).getViews(NOTEBOOK_VIEW_CONTAINER).length;
|
||||
let d: IViewDescriptor = { id: 'notebookView-test-1', name: 'Notebooks', ctorDescriptor: new SyncDescriptor(NotebookExplorerViewPaneContainer) };
|
||||
Platform.Registry.as<IViewsRegistry>(ViewContainerExtensions.ViewsRegistry).registerViews([d], NOTEBOOK_VIEW_CONTAINER);
|
||||
let retrieved = Platform.Registry.as<IViewsRegistry>(ViewContainerExtensions.ViewsRegistry).getView('notebookView-test-1');
|
||||
assert(d === retrieved, 'Could not register view :' + d.id + 'Retrieved: ' + retrieved);
|
||||
let newCount = Platform.Registry.as<IViewsRegistry>(ViewContainerExtensions.ViewsRegistry).getViews(NOTEBOOK_VIEW_CONTAINER).length;
|
||||
assert.equal(oldcount + 1, newCount, 'View registration failed');
|
||||
|
||||
|
||||
});
|
||||
|
||||
test('NotebookExplorer Views should not register duplicate views', function () {
|
||||
let d: IViewDescriptor = { id: 'notebookView-test-1', name: 'Notebooks', ctorDescriptor: new SyncDescriptor(NotebookExplorerViewPaneContainer) };
|
||||
assert.throws(() => Platform.Registry.as<IViewsRegistry>(ViewContainerExtensions.ViewsRegistry).registerViews([d], NOTEBOOK_VIEW_CONTAINER));
|
||||
});
|
||||
|
||||
test('NotebookExplorer Views deregistration', function () {
|
||||
assert(Types.isFunction(Platform.Registry.as<IViewsRegistry>(ViewContainerExtensions.ViewsRegistry).deregisterViews));
|
||||
assert(Types.isFunction(Platform.Registry.as<IViewsRegistry>(ViewContainerExtensions.ViewsRegistry).getViews));
|
||||
|
||||
let d: IViewDescriptor = { id: 'notebookView-test-1', name: 'Notebooks', ctorDescriptor: new SyncDescriptor(NotebookExplorerViewPaneContainer) };
|
||||
assert.doesNotThrow(() => Platform.Registry.as<IViewsRegistry>(ViewContainerExtensions.ViewsRegistry).deregisterViews([d], NOTEBOOK_VIEW_CONTAINER));
|
||||
|
||||
});
|
||||
|
||||
test('NotebookExplorer Viewlet extension point should not register duplicate viewlets', function () {
|
||||
let v1 = ViewletDescriptor.create(NotebookExplorerTestViewlet, 'notebookExplorer-test-id', 'name');
|
||||
Platform.Registry.as<ViewletRegistry>(Extensions.Viewlets).registerViewlet(v1);
|
||||
let oldCount = Platform.Registry.as<ViewletRegistry>(Extensions.Viewlets).getViewlets().length;
|
||||
|
||||
let v1Duplicate = ViewletDescriptor.create(NotebookExplorerTestViewlet, 'notebookExplorer-test-id', 'name');
|
||||
// Shouldn't register the duplicate.
|
||||
Platform.Registry.as<ViewletRegistry>(Extensions.Viewlets).registerViewlet(v1Duplicate);
|
||||
|
||||
let newCount = Platform.Registry.as<ViewletRegistry>(Extensions.Viewlets).getViewlets().length;
|
||||
assert.equal(oldCount, newCount, 'Duplicate registration of views.');
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
@@ -57,7 +57,7 @@ const profilerViewTemplateSchema: IJSONSchema = {
|
||||
},
|
||||
{
|
||||
name: 'LoginName',
|
||||
eventsMapped: ['server_principal_name']
|
||||
eventsMapped: ['server_principal_name', 'username']
|
||||
},
|
||||
{
|
||||
name: 'ClientProcessID',
|
||||
@@ -159,7 +159,7 @@ const profilerViewTemplateSchema: IJSONSchema = {
|
||||
},
|
||||
{
|
||||
name: 'LoginName',
|
||||
eventsMapped: ['server_principal_name']
|
||||
eventsMapped: ['server_principal_name', 'username']
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -184,7 +184,7 @@ const profilerViewTemplateSchema: IJSONSchema = {
|
||||
},
|
||||
{
|
||||
name: 'LoginName',
|
||||
eventsMapped: ['server_principal_name']
|
||||
eventsMapped: ['server_principal_name', 'username']
|
||||
},
|
||||
{
|
||||
name: 'ClientProcessID',
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<svg id="Icon" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><defs><style>.cls-1{opacity:0;}.cls-2{fill:#f6f6f6;}.cls-3{fill:#424242;}.cls-4{fill:#f0eff1;}.cls-5{fill:#e51400;}</style></defs><title>Trigger_disabled_16x</title><g id="canvas" class="cls-1"><rect class="cls-2" width="16" height="16"/></g><polygon id="outline" class="cls-2" points="16 1 0 1 0 15 8.59 15 9.5 15.91 10.41 15 12.59 15 13.5 15.91 14.41 15 16 15 16 1"/><g id="iconBG"><path class="cls-3" d="M14,11.4v.17l1,1V10.41ZM2,5H14V7.59l1,1V2H1V14H4.38l.5-1H2Z"/><polygon class="cls-3" points="8.3 10.7 7.08 9.51 7.59 9 7 9 10 6 7 6 5 10 7.5 10 6 13 8.3 10.7"/></g><g id="iconFG"><polygon class="cls-4" points="6.38 5 2 5 2 13 4.88 13 5.88 11 4 11 4 9.76 6.38 5"/><polygon class="cls-4" points="13.91 11.48 14 11.57 14 11.4 13.91 11.48"/><polygon class="cls-4" points="10.41 8 11 8 11 8.59 11.5 9.09 13.5 7.09 14 7.59 14 5 11 5 11 6.41 9.91 7.5 10.41 8"/></g><path id="colorAction" class="cls-5" d="M12.5,11.47l2,2-1,1-2-2-2,2-1-1,2-2-2-2,1-1,2,2,2-2,1,1Z"/></svg>
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -408,6 +408,12 @@
|
||||
background: url("ServerLevelServerTrigger.svg") center center no-repeat;
|
||||
}
|
||||
|
||||
.vs .icon.serverlevelservertrigger_disabled,
|
||||
.vs-dark .icon.serverlevelservertrigger_disabled,
|
||||
.hc-black .icon.serverlevelservertrigger_disabled {
|
||||
background: url("ServerLevelServerTrigger_Disabled.svg") center center no-repeat;
|
||||
}
|
||||
|
||||
.vs .icon.service,
|
||||
.vs-dark .icon.service,
|
||||
.hc-black .icon.service {
|
||||
|
||||
Reference in New Issue
Block a user