mirror of
https://github.com/apache/superset.git
synced 2026-07-13 18:25:58 +00:00
fix(sqllab,extensions): populate Tab.backendId and guard northPane storage
Wire the backend-assigned tabViewId through to the public Tab.backendId field so extensions can correlate tabs with tabstateview rows, and wrap the northPane localStorage access in try/catch so a storage-restricted browser can't crash the editor mount. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -34,6 +34,8 @@ export class Panel implements sqlLabType.Panel {
|
||||
export class Tab implements sqlLabType.Tab {
|
||||
id: string;
|
||||
|
||||
backendId?: string;
|
||||
|
||||
title: string;
|
||||
|
||||
databaseId: number;
|
||||
@@ -54,6 +56,7 @@ export class Tab implements sqlLabType.Tab {
|
||||
schema: string | null = null,
|
||||
editorGetter: () => Promise<sqlLabType.Editor>,
|
||||
panels: Panel[] = [],
|
||||
backendId?: string,
|
||||
) {
|
||||
this.id = id;
|
||||
this.title = title;
|
||||
@@ -62,6 +65,7 @@ export class Tab implements sqlLabType.Tab {
|
||||
this.schema = schema;
|
||||
this.editorGetter = editorGetter;
|
||||
this.panels = panels;
|
||||
this.backendId = backendId;
|
||||
}
|
||||
|
||||
getEditor(): Promise<sqlLabType.Editor> {
|
||||
|
||||
Reference in New Issue
Block a user