Skip to content

Commit dc418f3

Browse files
committed
fix: fix hardcoded public clickhouse hostname
feature: use current hostname when public clickhouse is localhost
1 parent b844177 commit dc418f3

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

design/ui/src/pages/ChExportPage.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,9 +375,8 @@ export default {
375375
376376
computed: {
377377
...mapGetters({
378-
// clickhouseExportHost: "clickhouseExportHost",
378+
clickhouseExportHost: "clickhouseExportHost",
379379
}),
380-
clickhouseExportHost: () => "pubch-01.celus.net",
381380
},
382381
383382
mounted() {

design/ui/src/store/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,9 +338,11 @@ export default createStore({
338338
},
339339
clickhouseExportHost(state) {
340340
if ("CLICKHOUSE_EXPORT_HOST" in state.basicInfo) {
341-
return state.basicInfo["CLICKHOUSE_EXPORT_HOST"];
341+
const host = state.basicInfo["CLICKHOUSE_EXPORT_HOST"];
342+
// if the host is localhost, we should return the current host
343+
return host === "localhost" ? window.location.hostname : host;
342344
}
343-
return false;
345+
return null;
344346
},
345347
clickhouseQueryActive(state) {
346348
if ("CLICKHOUSE_QUERY_ACTIVE" in state.basicInfo) {

0 commit comments

Comments
 (0)