Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1930,6 +1930,7 @@
"Type": "Type",
"Table": "Table",
"View": "View",
"MaterializedView": "Materialized View",
"Database": "Database",
"RowsPreview": "Rows (preview)",
"Data": "Data",
Expand Down
1 change: 1 addition & 0 deletions i18n/locales/es.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Monitor": {
"Unavailable": "La sesión ha finalizado o no se puede supervisar.",

Check warning on line 3 in i18n/locales/es.json

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

"supervisar" should be "supervisor".

Check warning on line 3 in i18n/locales/es.json

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

"supervisar" should be "supervisor".
"PauseSent": "Se ha enviado la tarea de pausa",
"ResumeSent": "Se ha enviado la tarea de reanudación"
},
Expand All @@ -14,13 +14,13 @@
"Play": "Reproducir",
"Pause": "Pausar",
"Restart": "Reiniciar",
"HistoryCommands": "Historial de comandos",

Check warning on line 17 in i18n/locales/es.json

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

"comandos" should be "commandos".

Check warning on line 17 in i18n/locales/es.json

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

"Historial" should be "Historical".

Check warning on line 17 in i18n/locales/es.json

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

"comandos" should be "commandos".

Check warning on line 17 in i18n/locales/es.json

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

"Historial" should be "Historical".
"Playlist": "Lista de reproducción",
"SearchCommands": "Buscar comandos...",

Check warning on line 19 in i18n/locales/es.json

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

"comandos" should be "commandos".

Check warning on line 19 in i18n/locales/es.json

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

"comandos" should be "commandos".
"NoCommands": "No hay registros de comandos",

Check warning on line 20 in i18n/locales/es.json

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

"comandos" should be "commandos".

Check warning on line 20 in i18n/locales/es.json

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

"comandos" should be "commandos".
"NoCommandsHint": "Esta sesión no tiene comandos grabados",

Check warning on line 21 in i18n/locales/es.json

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

"comandos" should be "commandos".

Check warning on line 21 in i18n/locales/es.json

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

"comandos" should be "commandos".
"CommandsFailed": "No se pudieron cargar los comandos",

Check warning on line 22 in i18n/locales/es.json

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

"comandos" should be "commandos".

Check warning on line 22 in i18n/locales/es.json

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

"comandos" should be "commandos".
"CommandsFailedHint": "El historial de comandos no está disponible temporalmente",

Check warning on line 23 in i18n/locales/es.json

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

"comandos" should be "commandos".

Check warning on line 23 in i18n/locales/es.json

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

"historial" should be "historical".

Check warning on line 23 in i18n/locales/es.json

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

"comandos" should be "commandos".

Check warning on line 23 in i18n/locales/es.json

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

"historial" should be "historical".
"Loading": "Cargando...",
"HideRail": "Ocultar panel",
"ShowRail": "Mostrar panel",
Expand All @@ -34,7 +34,7 @@
"UnsupportedHint": "Este tipo de grabación no es compatible con el reproductor en línea.",
"Reload": "Volver a cargar",
"DesktopBlocked": "Solo en el navegador",
"DesktopBlockedHint": "La reproducción de sesiones solo está disponible en un navegador web. Copie el enlace y ábralo allí.",

Check warning on line 37 in i18n/locales/es.json

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

"Copie" should be "Copied" or "Copier" or "Copies" or "Copy".

Check warning on line 37 in i18n/locales/es.json

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

"Copie" should be "Copied" or "Copier" or "Copies" or "Copy".
"ShortcutsTitle": "Atajos de teclado",
"ShortcutPlayPause": "pausar / reanudar",
"ShortcutFullscreen": "alternar el modo de pantalla completa",
Expand Down Expand Up @@ -1930,6 +1930,7 @@
"Type": "Type",
"Table": "Table",
"View": "Vista",
"MaterializedView": "Vista materializada",
"Database": "Database",
"RowsPreview": "Rows (preview)",
"Data": "Data",
Expand Down
1 change: 1 addition & 0 deletions i18n/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -1930,6 +1930,7 @@
"Type": "Type",
"Table": "Table",
"View": "ビュー",
"MaterializedView": "マテリアライズドビュー",
"Database": "Database",
"RowsPreview": "Rows (preview)",
"Data": "Data",
Expand Down
1 change: 1 addition & 0 deletions i18n/locales/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -1930,6 +1930,7 @@
"Type": "Type",
"Table": "Table",
"View": "뷰",
"MaterializedView": "구체화된 뷰",
"Database": "Database",
"RowsPreview": "Rows (preview)",
"Data": "Data",
Expand Down
1 change: 1 addition & 0 deletions i18n/locales/pt_br.json
Original file line number Diff line number Diff line change
Expand Up @@ -1930,6 +1930,7 @@
"Type": "Type",
"Table": "Table",
"View": "Visão",
"MaterializedView": "Visão materializada",
"Database": "Database",
"RowsPreview": "Rows (preview)",
"Data": "Data",
Expand Down
1 change: 1 addition & 0 deletions i18n/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -1930,6 +1930,7 @@
"Type": "Type",
"Table": "Table",
"View": "Представление",
"MaterializedView": "Материализованное представление",
"Database": "Database",
"RowsPreview": "Rows (preview)",
"Data": "Data",
Expand Down
1 change: 1 addition & 0 deletions i18n/locales/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1930,6 +1930,7 @@
"Type": "Type",
"Table": "Table",
"View": "View",
"MaterializedView": "Materialized View",
"Database": "Database",
"RowsPreview": "Rows (preview)",
"Data": "Data",
Expand Down
1 change: 1 addition & 0 deletions i18n/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -1933,6 +1933,7 @@
"Type": "类型",
"Table": "表",
"View": "视图",
"MaterializedView": "物化视图",
"Database": "数据库",
"RowsPreview": "行数(预览)",
"Data": "数据",
Expand Down
1 change: 1 addition & 0 deletions i18n/locales/zh_hant.json
Original file line number Diff line number Diff line change
Expand Up @@ -1930,6 +1930,7 @@
"Type": "Type",
"Table": "Table",
"View": "檢視",
"MaterializedView": "具體化檢視",
"Database": "Database",
"RowsPreview": "Rows (preview)",
"Data": "Data",
Expand Down
2 changes: 1 addition & 1 deletion ui/chen/api/parsers/tableMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function parseTableMetadata(value: unknown): ChenTableMetadata {
!(typeof value.catalog === "string" || value.catalog === null) ||
typeof value.schema !== "string" ||
typeof value.name !== "string" ||
(value.kind !== "table" && value.kind !== "view") ||
(value.kind !== "table" && value.kind !== "view" && value.kind !== "materialized_view") ||
!isRecord(value.capabilities) ||
!Array.isArray(value.loadedSections) ||
!Array.isArray(value.columns) ||
Expand Down
6 changes: 3 additions & 3 deletions ui/chen/composables/useChenDataViewDerivedMeta.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Ref } from "vue";
import type { ChenDataViewConsoleTab } from "~/chen/types";
import { chenDataViewPropertyTabIds, isChenViewRelation } from "~/chen/utils/resourceTree";
import { chenDataViewPropertyTabIds, chenRelationTypeI18nKey } from "~/chen/utils/resourceTree";

export interface ChenDataViewColumnPreview {
name: string;
Expand Down Expand Up @@ -53,11 +53,11 @@ export function useChenDataViewDerivedMeta(profileDbType: Ref<string | undefined
}

function dataViewBasicInfo(tab: ChenDataViewConsoleTab) {
const isView = isChenViewRelation({ nodeKey: tab.nodeKey, kind: tab.tableMetadata?.kind });
const relation = { nodeKey: tab.nodeKey, kind: tab.tableMetadata?.kind };
return [
{ label: t("Chen.Name"), value: tableLabelForProperties(tab) },
{ label: t("Chen.Schema"), value: tab.tableMetadata?.schema || tab.meta?.schema || "-" },
{ label: t("Chen.Type"), value: isView ? t("Chen.View") : t("Chen.Table") },
{ label: t("Chen.Type"), value: t(chenRelationTypeI18nKey(relation)) },
{ label: t("Chen.Database"), value: profileDbType.value || protocol.value || "-" },
{ label: t("Chen.RowsPreview"), value: String(tab.data?.data?.length || 0) }
];
Expand Down
1 change: 1 addition & 0 deletions ui/chen/types/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export interface ChenTreeNode {
name?: string;
label?: string;
type: string;
relationKind?: "table" | "view" | "materialized_view";
leaf?: boolean;
children?: ChenTreeNode[];
[key: string]: any;
Expand Down
2 changes: 1 addition & 1 deletion ui/chen/types/tableMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export interface ChenTableMetadata {
catalog: string | null;
schema: string;
name: string;
kind: "table" | "view";
kind: "table" | "view" | "materialized_view";
capabilities: ChenTableMetadataCapabilities;
loadedSections: ChenTableMetadataSection[];
columns: ChenTableMetadataColumn[];
Expand Down
7 changes: 6 additions & 1 deletion ui/chen/utils/resourceTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,16 @@ export function chenNodeTypeFromKey(nodeKey: string) {
}

export function isChenViewRelation(input: { nodeKey?: string; kind?: string | null }) {
if (input.kind === "view") return true;
if (input.kind === "view" || input.kind === "materialized_view") return true;
if (input.kind === "table") return false;
return chenNodeTypeFromKey(input.nodeKey || "") === "view";
}

export function chenRelationTypeI18nKey(input: { nodeKey?: string; kind?: string | null }) {
if (input.kind === "materialized_view") return "Chen.MaterializedView";
return isChenViewRelation(input) ? "Chen.View" : "Chen.Table";
}

export function chenDataViewPropertyTabIds(input: {
nodeKey?: string;
kind?: string | null;
Expand Down
Loading