Skip to content

Commit 6b75cfb

Browse files
committed
temp
1 parent b1420c2 commit 6b75cfb

File tree

18 files changed

+2187
-1350
lines changed

18 files changed

+2187
-1350
lines changed

js/packages/proto/src/generated/quary/service/v1/wasm_rust_rpc_calls.ts

+109-13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/packages/quary-extension-bus/src/globalViewState.ts

+27-18
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { SqlLanguage } from './config'
22
import { ProjectDag } from '@quary/proto/quary/service/v1/project_dag'
33
import {
4-
ListAssetsResponse_Asset,
5-
ReturnDashboardWithSqlResponse
4+
DashboardRenderingItem,
5+
ListAssetsResponse_Asset,
66
} from '@quary/proto/quary/service/v1/wasm_rust_rpc_calls'
77
import { Project } from '@quary/proto/quary/service/v1/project'
88
import { TestRunner } from '@quary/proto/quary/service/v1/test_runner'
@@ -12,6 +12,7 @@ import { ProjectFileSource } from '@quary/proto/quary/service/v1/project_file'
1212
import { ChartFile } from '@quary/proto/quary/service/v1/chart_file'
1313
import { Table } from '@quary/proto/quary/service/v1/table'
1414
import { QuaryError } from './result'
15+
import { Dashboard } from '@quary/proto/quary/service/v1/dashboard'
1516

1617
/**
1718
* The message type that is sent to the webview when the global state is set.
@@ -109,25 +110,33 @@ export type ChartEditorData = {
109110
title: string
110111
chartFile?: ChartFile
111112
allAssets: string[]
112-
results:
113-
| {
114-
type: 'not loaded'
115-
}
116-
| {
117-
type: 'loading'
118-
}
119-
| {
120-
type: 'error'
121-
error: QuaryError
122-
}
123-
| {
124-
type: 'success'
125-
queryResult: QueryResult
126-
}
113+
results: ChartResult
127114
}
128115

116+
type ChartResult =
117+
| {
118+
type: 'not loaded'
119+
}
120+
| {
121+
type: 'loading'
122+
}
123+
| {
124+
type: 'error'
125+
error: QuaryError
126+
}
127+
| {
128+
type: 'success'
129+
queryResult: QueryResult
130+
}
131+
129132
export type DashboardEditorData = {
130-
dashboardFile: ReturnDashboardWithSqlResponse
133+
dashboard: Dashboard
134+
items: DashboardEditorDataItem[]
135+
}
136+
137+
export type DashboardEditorDataItem = {
138+
item: DashboardRenderingItem
139+
result: ChartResult
131140
}
132141

133142
export type SqlDocumentationResultsView =

js/packages/quary-extension-ui/src/App.tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { ErrorView } from '@ui/views/ErrorView'
1616
import { ExecuteSQLView } from '@ui/views/ExecuteSQL'
1717
import { ImportSourcesView } from '@ui/views/ImportSourcesView'
1818
import { ChartEditorView } from '@ui/views/ChartEditorView'
19+
import { DashboardEditorView } from '@ui/views/DashboardEditorView'
1920

2021
function App() {
2122
const [view] = useGlobalState()
@@ -111,9 +112,7 @@ function App() {
111112
return <ChartEditorView data={view.data} />
112113
}
113114
case 'dashboardEditor': {
114-
return (
115-
<div>Dashboard editor {JSON.stringify(view.data.dashboardFile)} </div>
116-
)
115+
return <DashboardEditorView data={view.data} />
117116
}
118117
default:
119118
return <div>Invalid view type {JSON.stringify(view)}</div>

0 commit comments

Comments
 (0)