mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
initial check in for dashboard grid layout (#740)
dashboard grid layout container
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
</dashboard-webview-tab>
|
||||
<dashboard-widget-tab *ngIf="getContentType(tab) === 'widgets-tab'" [tab]="tab">
|
||||
</dashboard-widget-tab>
|
||||
<dashboard-grid-tab *ngIf="getContentType(tab) === 'grid-tab'" [tab]="tab">
|
||||
</dashboard-grid-tab>
|
||||
</tab>
|
||||
</panel>
|
||||
</div>
|
||||
|
||||
@@ -24,6 +24,7 @@ import { AngularEventType, IAngularEvent } from 'sql/services/angularEventing/an
|
||||
import { DashboardTab } from 'sql/parts/dashboard/common/interfaces';
|
||||
import { error } from 'sql/base/common/log';
|
||||
import { WIDGETS_TABS } from 'sql/parts/dashboard/tabs/dashboardWidgetTab.contribution';
|
||||
import { GRID_TABS } from 'sql/parts/dashboard/tabs/dashboardGridTab.contribution';
|
||||
import { WEBVIEW_TABS } from 'sql/parts/dashboard/tabs/dashboardWebviewTab.contribution';
|
||||
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
@@ -255,7 +256,7 @@ export abstract class DashboardPage extends Disposable implements OnDestroy {
|
||||
}
|
||||
|
||||
let key = Object.keys(v.content)[0];
|
||||
if (key === WIDGETS_TABS) {
|
||||
if (key === WIDGETS_TABS || key === GRID_TABS) {
|
||||
let configs = <WidgetConfig[]>Object.values(v.content)[0];
|
||||
this._configModifiers.forEach(cb => {
|
||||
configs = cb.apply(this, [configs]);
|
||||
@@ -263,7 +264,12 @@ export abstract class DashboardPage extends Disposable implements OnDestroy {
|
||||
this._gridModifiers.forEach(cb => {
|
||||
configs = cb.apply(this, [configs]);
|
||||
});
|
||||
return { id: v.id, title: v.title, content: { 'widgets-tab': configs }, alwaysShow: v.alwaysShow };
|
||||
if (key === WIDGETS_TABS) {
|
||||
return { id: v.id, title: v.title, content: { 'widgets-tab': configs }, alwaysShow: v.alwaysShow };
|
||||
|
||||
} else {
|
||||
return { id: v.id, title: v.title, content: { 'grid-tab': configs }, alwaysShow: v.alwaysShow };
|
||||
}
|
||||
}
|
||||
return v;
|
||||
}).map(v => {
|
||||
|
||||
Reference in New Issue
Block a user