mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-05 00:09:35 +00:00
fix: route name updated from "alerts" to "alertList" in multiple components (#5316)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Conditional rendering added for custom logos based on enterprise configuration. - Navigation updated from "alerts" to "alertList" in multiple components. - **Bug Fixes** - Removed unnecessary redirect logic from the AppAlerts component. - **Style** - Enhanced code readability through formatting adjustments in button components and layout attributes. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -88,8 +88,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
class="warning-msg"
|
||||
style="display: inline"
|
||||
>
|
||||
<q-icon name="warning"
|
||||
size="xs" class="warning" />{{
|
||||
<q-icon name="warning" size="xs" class="warning" />{{
|
||||
store.state.organizationData.quotaThresholdMsg
|
||||
}}
|
||||
</div>
|
||||
@@ -159,9 +158,18 @@ class="padding-none" />
|
||||
|
||||
<ThemeSwitcher></ThemeSwitcher>
|
||||
|
||||
<q-btn round flat dense :ripple="false" @click="openSlack" data-test="menu-link-slack-item">
|
||||
<q-btn
|
||||
round
|
||||
flat
|
||||
dense
|
||||
:ripple="false"
|
||||
@click="openSlack"
|
||||
data-test="menu-link-slack-item"
|
||||
>
|
||||
<div class="row items-center no-wrap">
|
||||
<q-icon><component :is="slackIcon" size="25px" class="header-icon" /></q-icon>
|
||||
<q-icon
|
||||
><component :is="slackIcon" size="25px" class="header-icon"
|
||||
/></q-icon>
|
||||
</div>
|
||||
<q-tooltip anchor="top middle" self="bottom middle">
|
||||
{{ t("menu.slack") }}
|
||||
@@ -169,7 +177,11 @@ class="padding-none" />
|
||||
</q-btn>
|
||||
<q-btn round flat dense :ripple="false">
|
||||
<div class="row items-center no-wrap">
|
||||
<q-icon name="help_outline" size="25px" class="header-icon"></q-icon>
|
||||
<q-icon
|
||||
name="help_outline"
|
||||
size="25px"
|
||||
class="header-icon"
|
||||
></q-icon>
|
||||
<q-tooltip anchor="top middle" self="bottom middle">
|
||||
{{ t("menu.help") }}
|
||||
</q-tooltip>
|
||||
@@ -221,14 +233,24 @@ class="padding-none" />
|
||||
@click="router.push({ name: 'settings' })"
|
||||
>
|
||||
<div class="row items-center no-wrap">
|
||||
<q-icon :name="outlinedSettings" size="25px" class="header-icon"></q-icon>
|
||||
<q-icon
|
||||
:name="outlinedSettings"
|
||||
size="25px"
|
||||
class="header-icon"
|
||||
></q-icon>
|
||||
</div>
|
||||
<q-tooltip anchor="top middle" self="bottom middle">
|
||||
{{ t("menu.settings") }}
|
||||
</q-tooltip>
|
||||
</q-btn>
|
||||
|
||||
<q-btn round flat dense :ripple="false" data-test="header-my-account-profile-icon">
|
||||
<q-btn
|
||||
round
|
||||
flat
|
||||
dense
|
||||
:ripple="false"
|
||||
data-test="header-my-account-profile-icon"
|
||||
>
|
||||
<div class="row items-center no-wrap">
|
||||
<q-icon
|
||||
:name="user.picture ? user.picture : 'person'"
|
||||
@@ -292,8 +314,7 @@ class="padding-none" />
|
||||
</div>
|
||||
<q-item clickable>
|
||||
<q-item-section avatar>
|
||||
<q-icon size="xs" name="language"
|
||||
class="padding-none" />
|
||||
<q-icon size="xs" name="language" class="padding-none" />
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-item-label>{{ t("menu.language") }}</q-item-label>
|
||||
@@ -360,8 +381,7 @@ class="padding-none" />
|
||||
@click="signout"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon size="xs" name="exit_to_app"
|
||||
class="padding-none" />
|
||||
<q-icon size="xs" name="exit_to_app" class="padding-none" />
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-item-label>{{ t("menu.signOut") }}</q-item-label>
|
||||
@@ -580,7 +600,6 @@ export default defineComponent({
|
||||
"functionList",
|
||||
"streamFunctions",
|
||||
"enrichmentTables",
|
||||
"alerts",
|
||||
"alertList",
|
||||
"alertDestinations",
|
||||
"alertTemplates",
|
||||
@@ -646,7 +665,7 @@ export default defineComponent({
|
||||
title: t("menu.alerts"),
|
||||
icon: outlinedReportProblem,
|
||||
link: "/alerts",
|
||||
name: "alerts",
|
||||
name: "alertList",
|
||||
},
|
||||
{
|
||||
title: t("menu.ingestion"),
|
||||
@@ -1280,7 +1299,7 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
.q-toolbar{
|
||||
.q-toolbar {
|
||||
min-height: 40px;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,28 +44,6 @@ export default defineComponent({
|
||||
const destinations = ref([]);
|
||||
const splitterModel = ref(160);
|
||||
|
||||
onBeforeMount(() => {
|
||||
redirectRoute();
|
||||
});
|
||||
|
||||
watch(
|
||||
() => router.currentRoute.value.name,
|
||||
(routeName) => {
|
||||
// This is handled for browser back button, as it was redirecting to this app alerts page and not alert list page
|
||||
if (routeName === "alerts") router.back();
|
||||
}
|
||||
);
|
||||
|
||||
const redirectRoute = () => {
|
||||
if (router.currentRoute.value.name === "alerts") {
|
||||
router.push({
|
||||
name: "alertList",
|
||||
query: {
|
||||
org_identifier: store.state.selectedOrganization.identifier,
|
||||
},
|
||||
});
|
||||
}
|
||||
};
|
||||
const getTemplates = () => {
|
||||
// if (store.state.selectedOrganization.status == "active") {
|
||||
templateService
|
||||
@@ -92,7 +70,6 @@ export default defineComponent({
|
||||
splitterModel,
|
||||
getTemplates,
|
||||
getDestinations,
|
||||
redirectRoute,
|
||||
t,
|
||||
store,
|
||||
};
|
||||
|
||||
@@ -23,8 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
:class="store.state.theme === 'dark' ? 'dark-theme' : 'light-theme'"
|
||||
>
|
||||
<div class="my-card card-container">
|
||||
<div align="center" flat
|
||||
bordered class="my-card q-py-md">
|
||||
<div align="center" flat bordered class="my-card q-py-md">
|
||||
<div class="text-subtitle1">{{ t("home.streams") }}</div>
|
||||
<div class="text-h6">{{ summary.streams_count }}</div>
|
||||
<div class="row justify-center" v-if="isCloud == 'false'">
|
||||
@@ -51,8 +50,7 @@ bordered class="my-card q-py-md">
|
||||
<q-separator />
|
||||
|
||||
<div align="center" class="q-py-sm">
|
||||
<q-btn no-caps color="primary"
|
||||
flat
|
||||
<q-btn no-caps color="primary" flat
|
||||
>{{ t("home.view") }}
|
||||
<router-link
|
||||
exact
|
||||
@@ -64,8 +62,7 @@ flat
|
||||
</div>
|
||||
|
||||
<div align="center" class="my-card card-container">
|
||||
<div align="center" flat
|
||||
bordered class="my-card q-py-md">
|
||||
<div align="center" flat bordered class="my-card q-py-md">
|
||||
<div class="text-subtitle1">{{ t("home.queryFunctions") }}</div>
|
||||
<div class="text-h6">{{ summary.query_fns }}</div>
|
||||
<div class="text-subtitle1">{{ t("home.ingestFunctions") }}</div>
|
||||
@@ -73,8 +70,7 @@ bordered class="my-card q-py-md">
|
||||
</div>
|
||||
<q-separator />
|
||||
<div align="center" class="q-py-sm">
|
||||
<q-btn no-caps color="primary"
|
||||
flat
|
||||
<q-btn no-caps color="primary" flat
|
||||
>{{ t("home.view") }}
|
||||
<router-link
|
||||
exact
|
||||
@@ -86,8 +82,7 @@ flat
|
||||
</div>
|
||||
|
||||
<div class="my-card card-container">
|
||||
<div align="center" flat
|
||||
bordered class="my-card q-py-md">
|
||||
<div align="center" flat bordered class="my-card q-py-md">
|
||||
<div class="text-subtitle1">{{ t("home.scheduledAlert") }}</div>
|
||||
<div class="text-h6">{{ summary.scheduled_alerts }}</div>
|
||||
<div class="text-subtitle1">{{ t("home.rtAlert") }}</div>
|
||||
@@ -95,12 +90,11 @@ bordered class="my-card q-py-md">
|
||||
</div>
|
||||
<q-separator />
|
||||
<div align="center" class="q-py-sm">
|
||||
<q-btn no-caps color="primary"
|
||||
flat
|
||||
<q-btn no-caps color="primary" flat
|
||||
>{{ t("home.view") }}
|
||||
<router-link
|
||||
exact
|
||||
:to="{ name: 'alerts' }"
|
||||
:to="{ name: 'alertList' }"
|
||||
class="absolute full-width full-height"
|
||||
></router-link>
|
||||
</q-btn>
|
||||
@@ -114,8 +108,7 @@ flat
|
||||
style="margin: 0 auto; justify-content: center"
|
||||
>
|
||||
<div class="my-card card-container">
|
||||
<div align="center" flat
|
||||
bordered class="my-card q-py-md">
|
||||
<div align="center" flat bordered class="my-card q-py-md">
|
||||
<div class="text-h6">{{ t("home.noData") }}</div>
|
||||
<div class="text-subtitle1">{{ t("home.ingestionMsg") }}</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user