Refactor and rename dashboard tabs part 1 (#755)

* refactor and rename dashboard tabs

* undo incorrect changes
This commit is contained in:
Abbie Petchtes
2018-02-22 13:36:56 -08:00
committed by GitHub
parent 51b8e02455
commit dbc2ce0b3a
27 changed files with 199 additions and 200 deletions

View File

@@ -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) {