datajunction-ui 0.0.102 → 0.0.104
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/app/components/NamespaceHeader.jsx +224 -77
- package/src/app/components/NodeComponents.jsx +3 -2
- package/src/app/components/__tests__/NodeComponents.test.jsx +2 -2
- package/src/app/pages/NamespacePage/__tests__/index.test.jsx +212 -0
- package/src/app/pages/NamespacePage/index.jsx +950 -321
- package/src/app/pages/QueryPlannerPage/index.jsx +1 -1
- package/src/app/services/DJService.js +22 -3
- package/src/app/services/__tests__/DJService.test.jsx +1 -1
|
@@ -1257,7 +1257,7 @@ export function QueryPlannerPage() {
|
|
|
1257
1257
|
selectedMetrics,
|
|
1258
1258
|
selectedDimensions,
|
|
1259
1259
|
filters,
|
|
1260
|
-
selectedEngine,
|
|
1260
|
+
selectedEngine || null,
|
|
1261
1261
|
progress => setQueryLinks(progress.links || []),
|
|
1262
1262
|
);
|
|
1263
1263
|
const elapsed = (Date.now() - startTime) / 1000;
|
|
@@ -70,6 +70,9 @@ export const DataJunctionAPI = {
|
|
|
70
70
|
tagType
|
|
71
71
|
}
|
|
72
72
|
editedBy
|
|
73
|
+
owners {
|
|
74
|
+
username
|
|
75
|
+
}
|
|
73
76
|
current {
|
|
74
77
|
displayName
|
|
75
78
|
status
|
|
@@ -1259,9 +1262,10 @@ export const DataJunctionAPI = {
|
|
|
1259
1262
|
if (filters && filters.length > 0) {
|
|
1260
1263
|
filters.forEach(f => params.append('filters', f));
|
|
1261
1264
|
}
|
|
1262
|
-
const resolvedDialect = dialect || (useMaterialized ? 'druid' : 'trino');
|
|
1263
1265
|
params.append('use_materialized', useMaterialized ? 'true' : 'false');
|
|
1264
|
-
|
|
1266
|
+
if (dialect) {
|
|
1267
|
+
params.append('dialect', dialect);
|
|
1268
|
+
}
|
|
1265
1269
|
return await (
|
|
1266
1270
|
await fetch(`${DJ_URL}/sql/metrics/v3/?${params}`, {
|
|
1267
1271
|
credentials: 'include',
|
|
@@ -1284,7 +1288,9 @@ export const DataJunctionAPI = {
|
|
|
1284
1288
|
}
|
|
1285
1289
|
params.append('limit', '10000');
|
|
1286
1290
|
params.append('async_', 'true');
|
|
1287
|
-
|
|
1291
|
+
if (dialect) {
|
|
1292
|
+
params.append('dialect', dialect);
|
|
1293
|
+
}
|
|
1288
1294
|
|
|
1289
1295
|
let pollInterval = 1000;
|
|
1290
1296
|
|
|
@@ -2733,6 +2739,19 @@ export const DataJunctionAPI = {
|
|
|
2733
2739
|
// Git Branch Management APIs
|
|
2734
2740
|
// ============================================================
|
|
2735
2741
|
|
|
2742
|
+
// Get all branch namespaces for a parent namespace
|
|
2743
|
+
getNamespaceBranches: async function (namespace) {
|
|
2744
|
+
const response = await fetch(`${DJ_URL}/namespaces/${namespace}/branches`, {
|
|
2745
|
+
credentials: 'include',
|
|
2746
|
+
});
|
|
2747
|
+
if (!response.ok) {
|
|
2748
|
+
if (response.status === 404) return [];
|
|
2749
|
+
const result = await response.json().catch(() => ({}));
|
|
2750
|
+
throw new Error(result.message || 'Failed to get branches');
|
|
2751
|
+
}
|
|
2752
|
+
return response.json();
|
|
2753
|
+
},
|
|
2754
|
+
|
|
2736
2755
|
// Get git configuration for a namespace
|
|
2737
2756
|
getNamespaceGitConfig: async function (namespace) {
|
|
2738
2757
|
const response = await fetch(`${DJ_URL}/namespaces/${namespace}/git`, {
|
|
@@ -2999,7 +2999,7 @@ describe('DataJunctionAPI', () => {
|
|
|
2999
2999
|
// ===== metricsV3 — useMaterialized=false branch (lines 1224-1225) =====
|
|
3000
3000
|
it('calls metricsV3 with useMaterialized=false (trino dialect)', async () => {
|
|
3001
3001
|
fetch.mockResponseOnce(JSON.stringify({ sql: 'SELECT ...' }));
|
|
3002
|
-
await DataJunctionAPI.metricsV3(['metric1'], ['dim1'], [], false);
|
|
3002
|
+
await DataJunctionAPI.metricsV3(['metric1'], ['dim1'], [], false, 'trino');
|
|
3003
3003
|
const url = fetch.mock.calls[0][0];
|
|
3004
3004
|
expect(url).toContain('use_materialized=false');
|
|
3005
3005
|
expect(url).toContain('dialect=trino');
|