Tab contribution support both inline container and registered container (#766)

* accept inline nav section contribution

* contribution accepted both inline container and registered container

* address comments

* formatting
This commit is contained in:
Abbie Petchtes
2018-02-23 15:12:30 -08:00
committed by GitHub
parent f9d8f479b5
commit bd7341ddc2
13 changed files with 183 additions and 157 deletions

View File

@@ -6,14 +6,15 @@ import { IJSONSchema } from 'vs/base/common/jsonSchema';
import * as nls from 'vs/nls';
import { generateDashboardGridLayoutSchema } from 'sql/parts/dashboard/pages/dashboardPageContribution';
import { registerTabContent } from 'sql/platform/dashboard/common/dashboardRegistry';
import { registerContainerType, registerNavSectionContainerType } from 'sql/platform/dashboard/common/dashboardContainerRegistry';
export const GRID_CONTAINER = 'grid-container';
let gridContainersSchema: IJSONSchema = {
type: 'array',
description: nls.localize('dashboard.gridtab.content.items', "The list of widgets or webviews that will be displayed in this tab."),
description: nls.localize('dashboard.container.gridtab.items', "The list of widgets or webviews that will be displayed in this tab."),
items: generateDashboardGridLayoutSchema(undefined, true)
};
registerTabContent(GRID_CONTAINER, gridContainersSchema);
registerContainerType(GRID_CONTAINER, gridContainersSchema);
registerNavSectionContainerType(GRID_CONTAINER, gridContainersSchema);