Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions frontend/src/views/cronjob/cronjob/operate/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@
/>
<el-option
value="sms"
v-if="!isIntl"
v-if="!isIntl || !isEE"
:disabled="!form.hasAlert || !isProductPro"
:label="$t('xpack.alert.sms')"
/>
Expand Down Expand Up @@ -871,7 +871,7 @@ import { routerToName, routerToPath } from '@/utils/router';
import { loadBaseDir } from '@/api/modules/setting';
const router = useRouter();

const { docsUrl, isFxplay, isIntl, isProductPro } = useGlobalStore();
const { docsUrl, isFxplay, isIntl, isEE, isProductPro } = useGlobalStore();
const licenseRef = ref();
const scriptFileRef = ref();
const dirRef = ref();
Expand Down
14 changes: 9 additions & 5 deletions frontend/src/views/setting/alert/dash/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,23 @@
<el-select filterable clearable v-model="req.type" @change="search()" class="!w-52 dropdown">
<template #prefix>{{ $t('commons.table.type') }}</template>
<template v-if="isMaster">
<el-option value="panelPwdEndTime" :label="$t('xpack.alert.panelPwdEndTime')" />
<el-option
v-if="!isEE"
value="panelPwdEndTime"
:label="$t('xpack.alert.panelPwdEndTime')"
/>
<el-option value="panelLogin" :label="$t('xpack.alert.panelLogin')" />
<el-option
v-if="isProductPro"
value="licenseException"
:label="$t('xpack.alert.licenseException')"
/>
<el-option
v-if="isProductPro"
v-if="isProductPro && !isEE.value"
value="nodeException"
:label="$t('xpack.alert.nodeException')"
/>
<el-option value="panelUpdate" :label="$t('xpack.alert.panelUpdate')" />
<el-option v-if="!isEE" value="panelUpdate" :label="$t('xpack.alert.panelUpdate')" />
</template>
<el-option value="sshLogin" :label="$t('xpack.alert.sshLogin')" />
<el-option value="ssl" :label="$t('xpack.alert.ssl')" />
Expand Down Expand Up @@ -152,7 +156,7 @@ import AddTask from '@/views/setting/alert/dash/task/index.vue';
import { Alert } from '@/api/interface/alert';
import { UpdateAlertStatus, SearchAlerts, DeleteAlert } from '@/api/modules/alert';

const { isMobile, isMaster, isProductPro } = useGlobalStore();
const { isMobile, isMaster, isProductPro, isEE } = useGlobalStore();

const { t } = i18n.global;
const loading = ref(false);
Expand Down Expand Up @@ -197,7 +201,7 @@ const buttons = [
const openView = async (
title: string,
rowData: Partial<Alert.AlertInfo> = {
type: isMaster.value ? 'panelPwdEndTime' : 'sshLogin',
type: isMaster.value && !isEE.value ? 'panelPwdEndTime' : 'sshLogin',
cycle: 15,
count: 0,
sendCount: 3,
Expand Down
14 changes: 7 additions & 7 deletions frontend/src/views/setting/alert/dash/task/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
/>
</template>
</el-select>
<span class="input-help" v-if="dialogData.rowData!.type === 'panelPwdEndTime'">
<span class="input-help" v-if="dialogData.rowData!.type === 'panelPwdEndTime' && !isEE">
{{ $t('xpack.alert.panelPwdEndTimeRulesHelper') }}
<el-link
style="font-size: 12px; margin-left: 5px"
Expand Down Expand Up @@ -343,7 +343,7 @@
<el-option v-if="isProductPro" value="bark" :label="$t('xpack.alert.bark')" />
<el-option
value="sms"
v-if="!isIntl"
v-if="!isIntl || !isEE"
:disabled="!isProductPro"
:label="$t('xpack.alert.sms')"
/>
Expand Down Expand Up @@ -388,7 +388,7 @@ import { routerToName } from '@/utils/router';
import { checkCidr, checkCidrV6, checkIpV4V6 } from '@/utils/validate';
import { useGlobalStore } from '@/composables/useGlobalStore';

const { isMaster, isProductPro, isIntl } = useGlobalStore();
const { isMaster, isProductPro, isIntl, isEE } = useGlobalStore();

interface DialogProps {
title: string;
Expand Down Expand Up @@ -454,20 +454,20 @@ const rules = reactive({
});

const allTaskOptions = [
{ value: 'panelPwdEndTime', label: 'xpack.alert.panelPwdEndTime', show: isMaster.value },
{ value: 'panelLogin', label: 'xpack.alert.panelLogin', show: isMaster.value },
{ value: 'panelPwdEndTime', label: 'xpack.alert.panelPwdEndTime', show: isMaster.value && !isEE.value },
{ value: 'sshLogin', label: 'xpack.alert.sshLogin', show: true },
{ value: 'panelLogin', label: 'xpack.alert.panelLogin', show: isMaster.value },
{ value: 'licenseException', label: 'xpack.alert.licenseException', show: isMaster.value && isProductPro.value },
{ value: 'ssl', label: 'xpack.alert.ssl', show: true },
{ value: 'siteEndTime', label: 'xpack.alert.siteEndTime', show: true },
{ value: 'nodeException', label: 'xpack.alert.nodeException', show: isMaster.value && isProductPro.value },
{ value: 'nodeException', label: 'xpack.alert.nodeException', show: isMaster.value && isProductPro.value && !isEE.value },
{ value: 'cpu', label: 'xpack.alert.cpu', show: true },
{ value: 'memory', label: 'xpack.alert.memory', show: true },
{ value: 'disk', label: 'xpack.alert.disk', show: true },
{ value: 'load', label: 'xpack.alert.load', show: true },
{ value: 'cronJob', label: 'xpack.alert.cronjob', show: true },
{ value: 'clams', label: 'xpack.alert.clams', show: true },
{ value: 'panelUpdate', label: 'xpack.alert.panelUpdate', show: isMaster.value },
{ value: 'panelUpdate', label: 'xpack.alert.panelUpdate', show: isMaster.value && !isEE.value },
];

function checkRange(value: any, min: number, max: number, callback: any) {
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/views/toolbox/clam/operate/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
<el-option v-if="isProductPro" value="bark" :label="$t('xpack.alert.bark')" />
<el-option
value="sms"
v-if="!isIntl"
v-if="!isIntl || !isEE"
:disabled="!dialogData.rowData!.hasAlert || !isProductPro"
:label="$t('xpack.alert.sms')"
/>
Expand Down Expand Up @@ -245,7 +245,7 @@ import { createClam, updateClam } from '@/api/modules/toolbox';
import { useGlobalStore } from '@/composables/useGlobalStore';
import { specOptions, transObjToSpec, transSpecToObj, weekOptions } from '@/views/cronjob/cronjob/helper';
import { splitTimeFromSecond, transferTimeToSecond } from '@/utils/validate';
const { isIntl, isProductPro } = useGlobalStore();
const { isIntl, isProductPro, isEE } = useGlobalStore();
const licenseRef = ref();
const scanDirRef = ref();
const infectedDirRef = ref();
Expand Down
Loading