-
+
.
@closeSearchHistory="closeSearchHistoryfn"
:isClicked="showSearchHistory"
/>
-
+
@@ -344,16 +351,14 @@ along with this program. If not, see .
-
-
-
-
+ />
+
@@ -371,6 +376,7 @@ import {
defineAsyncComponent,
provide,
onMounted,
+ onBeforeUnmount,
} from "vue";
import { useQuasar } from "quasar";
import { useStore } from "vuex";
@@ -460,12 +466,10 @@ export default defineComponent({
if (this.searchObj.meta.jobId == "") {
await this.getQueryData(false);
this.refreshHistogramChart();
- }
- else{
+ } else {
await this.getJobData(false);
}
-
if (config.isCloud == "true") {
segment.track("Button Click", {
button: "Get More Data",
@@ -487,12 +491,10 @@ export default defineComponent({
// this.searchObj.data.resultGrid.currentPage =
// this.searchObj.data.resultGrid.currentPage + 1;
this.searchObj.loading = true;
- if(this.searchObj.meta.jobId == ""){
+ if (this.searchObj.meta.jobId == "") {
await this.getQueryData(true);
this.refreshHistogramChart();
-
- }
- else{
+ } else {
await this.getJobData(false);
}
@@ -581,6 +583,7 @@ export default defineComponent({
buildWebSocketPayload,
initializeWebSocketConnection,
addRequestId,
+ sendCancelSearchMessage,
} = useLogs();
const searchResultRef = ref(null);
const searchBarRef = ref(null);
@@ -660,15 +663,19 @@ export default defineComponent({
router.currentRoute.value.query.hasOwnProperty("action") &&
router.currentRoute.value.query.action == "search_scheduler"
) {
- if(config.isEnterprise == 'true'){
+ if (config.isEnterprise == "true") {
showSearchScheduler.value = true;
- }
- else{
+ } else {
router.back();
}
}
});
+ onBeforeUnmount(() => {
+ // Cancel all the search queries
+ cancelOnGoingSearchQueries();
+ });
+
onActivated(() => {
if (isLogsMounted.value) handleActivation();
});
@@ -711,12 +718,11 @@ export default defineComponent({
router.currentRoute.value.query.hasOwnProperty("action") &&
router.currentRoute.value.query.action == "search_scheduler"
) {
- if(config.isEnterprise == 'true'){
+ if (config.isEnterprise == "true") {
showSearchScheduler.value = true;
+ } else {
+ router.back();
}
- else{
- router.back();
- }
}
},
// (action) => {
@@ -799,7 +805,6 @@ export default defineComponent({
await getQueryData();
refreshHistogramChart();
showJobScheduler.value = true;
-
} catch (e) {
console.log(e);
}
@@ -1544,6 +1549,12 @@ export default defineComponent({
// [END] cancel running queries
+ const cancelOnGoingSearchQueries = () => {
+ sendCancelSearchMessage(
+ searchObj.data.searchWebSocketRequestIdsAndTraceIds,
+ );
+ };
+
return {
t,
store,
diff --git a/web/src/plugins/logs/SearchBar.vue b/web/src/plugins/logs/SearchBar.vue
index bffc2e9f94..9352cf4304 100644
--- a/web/src/plugins/logs/SearchBar.vue
+++ b/web/src/plugins/logs/SearchBar.vue
@@ -37,10 +37,10 @@ along with this program. If not, see
.
size="sm"
icon="search"
class="button button-right tw-flex tw-justify-center tw-items-center no-border no-outline !tw-rounded-r-none q-px-sm"
- style="height: 32px;"
+ style="height: 32px"
>
- {{ t('common.search') }}
+ {{ t("common.search") }}
@@ -52,51 +52,67 @@ along with this program. If not, see
.
? 'selected'
: ''
"
- class="button button-right tw-flex tw-justify-center tw-items-center no-border no-outline !tw-rounded-l-none q-px-sm"
+ class="button button-right tw-flex tw-justify-center tw-items-center no-border no-outline !tw-rounded-l-none q-px-sm"
@click="onLogsVisualizeToggleUpdate('visualize')"
:disabled="isVisualizeToggleDisabled"
no-caps
size="sm"
- style="height: 32px;"
+ style="height: 32px"
>
-
- {{
- isVisualizeToggleDisabled
- ? t('search.visualizeDisabledForMultiStream')
- : t('search.visualize')
- }}
-
-
![Visualize]()
+
+ {{
+ isVisualizeToggleDisabled
+ ? t("search.visualizeDisabledForMultiStream")
+ : t("search.visualize")
+ }}
+
+
-
-
-
-
-
- {{ t('search.showHistogramLabel') }}
-
-
-
-
-
-
-
-
- {{ t('search.sqlModeLabel') }}
-
-
+
![Histogram]()
+
+ {{ t("search.showHistogramLabel") }}
+
+
-
+
+
+
+
+ {{ t("search.sqlModeLabel") }}
+
+
+
+
.
@click="resetFilters"
>
- {{ t('search.resetFilters') }}
+ {{ t("search.resetFilters") }}
-
+
.
-
- {{ t('search.savedViewsLabel') }}
-
-
-
-
-
-
- {{ t('search.quickModeLabel') }}
+ {{ t("search.savedViewsLabel") }}
-
+
+
+
+
+
+ {{ t("search.quickModeLabel") }}
+
+
-
.
size="32px"
>
- {{ t('search.messageWrapContent') }}
+ {{ t("search.messageWrapContent") }}
@@ -402,32 +423,39 @@ along with this program. If not, see
.
:loading="shareLink.isLoading.value"
>
- {{ t('search.shareLink') }}
+ {{ t("search.shareLink") }}
-
-
-
-
-
+ data-test="logs-search-bar-more-options-btn"
+ class="q-mr-xs download-logs-btn q-px-sm"
+ size="sm"
+ icon="menu"
+ >
+
+
+
+
-
+
- Search History
+ Search History
.
v-close-popup
>
-
- {{ t("search.downloadTable") }}
+
+ {{ t("search.downloadTable") }}
-
+
-
+
- {{ t("search.customRange") }}
+ {{ t("search.customRange") }}
.
@click="createScheduleJob"
>
-
-
+
+
Create Scheduled Search
@@ -482,20 +532,25 @@ along with this program. If not, see .
@click="routeToSearchSchedule"
>
-
-
+
+
List Scheduled Search
-
-
-
- {{ t('search.moreActions') }}
-
-
+
+
+ {{ t("search.moreActions") }}
+
{
return {
name: "",
@@ -1345,6 +1400,8 @@ export default defineComponent({
const formData: any = ref(defaultValue());
const functionOptions = ref(searchObj.data.transforms);
+ const { closeSocketWithError } = useSearchWebSocket();
+
const transformsExpandState = ref({
actions: false,
functions: false,
@@ -3241,33 +3298,50 @@ export default defineComponent({
}
};
const visualizeIcon = computed(() => {
- return searchObj.meta.logsVisualizeToggle === 'visualize' ? getImageURL('images/common/visualize_icon_light.svg') : getImageURL('images/common/visualize_icon_dark.svg')
+ return searchObj.meta.logsVisualizeToggle === "visualize"
+ ? getImageURL("images/common/visualize_icon_light.svg")
+ : getImageURL("images/common/visualize_icon_dark.svg");
});
const histogramIcon = computed(() => {
- return store.state.theme === 'dark' ? getImageURL('images/common/bar_chart_histogram_light.svg') : getImageURL('images/common/bar_chart_histogram.svg')
+ return store.state.theme === "dark"
+ ? getImageURL("images/common/bar_chart_histogram_light.svg")
+ : getImageURL("images/common/bar_chart_histogram.svg");
});
const sqlIcon = computed(() => {
- return store.state.theme === 'dark' ? getImageURL('images/common/hugeicons_sql_light.svg') : getImageURL('images/common/hugeicons_sql.svg')
+ return store.state.theme === "dark"
+ ? getImageURL("images/common/hugeicons_sql_light.svg")
+ : getImageURL("images/common/hugeicons_sql.svg");
});
const quickModeIcon = computed(() => {
- return store.state.theme === 'dark' ? getImageURL('images/common/quick_mode_light.svg') : getImageURL('images/common/quick_mode.svg')
+ return store.state.theme === "dark"
+ ? getImageURL("images/common/quick_mode_light.svg")
+ : getImageURL("images/common/quick_mode.svg");
});
const searchHistoryIcon = computed(() => {
- return store.state.theme === 'dark' ? getImageURL('images/common/search_history_light.svg') : getImageURL('images/common/search_history.svg')
+ return store.state.theme === "dark"
+ ? getImageURL("images/common/search_history_light.svg")
+ : getImageURL("images/common/search_history.svg");
});
const downloadTableIcon = computed(() => {
- return store.state.theme === 'dark' ? getImageURL('images/common/download_table_light.svg') : getImageURL('images/common/download_table.svg')
+ return store.state.theme === "dark"
+ ? getImageURL("images/common/download_table_light.svg")
+ : getImageURL("images/common/download_table.svg");
});
const customRangeIcon = computed(() => {
- return store.state.theme === 'dark' ? getImageURL('images/common/custom_range_light.svg') : getImageURL('images/common/custom_range.svg')
+ return store.state.theme === "dark"
+ ? getImageURL("images/common/custom_range_light.svg")
+ : getImageURL("images/common/custom_range.svg");
});
const createScheduledSearchIcon = computed(() => {
- return store.state.theme === 'dark' ? getImageURL('images/common/create_scheduled_search_light.svg') : getImageURL('images/common/create_scheduled_search.svg')
+ return store.state.theme === "dark"
+ ? getImageURL("images/common/create_scheduled_search_light.svg")
+ : getImageURL("images/common/create_scheduled_search.svg");
});
const listScheduledSearchIcon = computed(() => {
- return store.state.theme === 'dark' ? getImageURL('images/common/list_scheduled_search_light.svg') : getImageURL('images/common/list_scheduled_search.svg')
+ return store.state.theme === "dark"
+ ? getImageURL("images/common/list_scheduled_search_light.svg")
+ : getImageURL("images/common/list_scheduled_search.svg");
});
-
// [END] cancel running queries
@@ -3385,6 +3459,7 @@ export default defineComponent({
actionEditorQuery,
isActionsEnabled,
showFunctionEditor,
+ closeSocketWithError,
histogram_svg,
visualizeIcon,
histogramIcon,
@@ -3394,7 +3469,7 @@ export default defineComponent({
downloadTableIcon,
customRangeIcon,
createScheduledSearchIcon,
- listScheduledSearchIcon
+ listScheduledSearchIcon,
};
},
computed: {
diff --git a/web/src/services/auth.ts b/web/src/services/auth.ts
index 2136881358..d45a182217 100644
--- a/web/src/services/auth.ts
+++ b/web/src/services/auth.ts
@@ -25,6 +25,10 @@ const auth = {
const res = await http().get("/config/dex_login");
return res.data;
},
+ refresh_token: async () => {
+ const res = await http().get("/config/dex_refresh");
+ return res.data;
+ }
};
export default auth;
diff --git a/web/src/utils/zincutils.ts b/web/src/utils/zincutils.ts
index a503a456d4..5ad31e893f 100644
--- a/web/src/utils/zincutils.ts
+++ b/web/src/utils/zincutils.ts
@@ -979,7 +979,7 @@ export const deepCopy = (value: any) => {
export const getWebSocketUrl = (request_id: string, org_identifier: string) => {
const protocol = window.location.protocol === "https:" ? "wss:" : "ws:";
- return `${protocol}//${store.state.API_ENDPOINT.split("//")[1]}/api/${org_identifier}/ws/${request_id}`;
+ return `${protocol}//${store.state.API_ENDPOINT.split("//")[1]}/api/${org_identifier}/ws/v2/${request_id}`;
};
export const isWebSocketEnabled = () => {