mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-18 11:03:18 -04:00
Refactor and rename dashboard tabs part 1 (#755)
* refactor and rename dashboard tabs * undo incorrect changes
This commit is contained in:
@@ -11,7 +11,7 @@ import { registerTab, generateTabContentSchemaProperties } from 'sql/platform/da
|
||||
export interface IDashboardTabContrib {
|
||||
id: string;
|
||||
title: string;
|
||||
content: object;
|
||||
container: object;
|
||||
description?: string;
|
||||
provider?: string | string[];
|
||||
edition?: number | number[];
|
||||
@@ -61,8 +61,8 @@ const tabSchema: IJSONSchema = {
|
||||
}
|
||||
]
|
||||
},
|
||||
content: {
|
||||
description: localize('sqlops.extension.contributes.dashboard.tab.content', "The content that will be displayed in this tab."),
|
||||
container: {
|
||||
description: localize('sqlops.extension.contributes.dashboard.tab.container', "The container that will be displayed in this tab."),
|
||||
type: 'object',
|
||||
properties: generateTabContentSchemaProperties()
|
||||
},
|
||||
@@ -87,7 +87,7 @@ const tabContributionSchema: IJSONSchema = {
|
||||
ExtensionsRegistry.registerExtensionPoint<IDashboardTabContrib | IDashboardTabContrib[]>('dashboard.tabs', [], tabContributionSchema).setHandler(extensions => {
|
||||
|
||||
function handleCommand(tab: IDashboardTabContrib, extension: IExtensionPointUser<any>) {
|
||||
let { description, content, title, edition, provider, id, alwaysShow } = tab;
|
||||
let { description, container, title, edition, provider, id, alwaysShow } = tab;
|
||||
alwaysShow = alwaysShow || false;
|
||||
let publisher = extension.description.publisher;
|
||||
if (!title) {
|
||||
@@ -97,10 +97,10 @@ ExtensionsRegistry.registerExtensionPoint<IDashboardTabContrib | IDashboardTabCo
|
||||
if (!description) {
|
||||
extension.collector.warn('No description specified to show.');
|
||||
}
|
||||
if (!content) {
|
||||
extension.collector.warn('No content specified to show.');
|
||||
if (!container) {
|
||||
extension.collector.warn('No container specified to show.');
|
||||
}
|
||||
registerTab({ description, title, content, edition, provider, id, alwaysShow, publisher });
|
||||
registerTab({ description, title, container, edition, provider, id, alwaysShow, publisher });
|
||||
}
|
||||
|
||||
for (let extension of extensions) {
|
||||
|
||||
Reference in New Issue
Block a user