diff --git a/frontend/src/views/host/ssh/log/log.vue b/frontend/src/views/host/ssh/log/log.vue
index 2317cc12d..1b9b58c29 100644
--- a/frontend/src/views/host/ssh/log/log.vue
+++ b/frontend/src/views/host/ssh/log/log.vue
@@ -25,6 +25,9 @@
{{ $t('commons.status.failed') }}: {{ faliedCount }}
+
+ {{ $t('firewall.deny') }}
+
@@ -44,7 +47,13 @@
-
+
+
@@ -83,6 +92,9 @@ import TableSetting from '@/components/table-setting/index.vue';
import { dateFormat } from '@/utils/util';
import { onMounted, reactive, ref } from '@vue/runtime-core';
import { loadSSHLogs } from '@/api/modules/host';
+import { operateIPRule } from '@/api/modules/host';
+import { MsgSuccess } from '@/utils/message';
+import i18n from '@/lang';
const loading = ref();
const data = ref();
@@ -95,6 +107,28 @@ const searchInfo = ref();
const searchStatus = ref('All');
const successfulCount = ref(0);
const faliedCount = ref(0);
+const selects = ref([]);
+
+function selectable(row: any): boolean {
+ return row.address !== '127.0.0.1' && row.address !== '::1';
+}
+
+function select2address(): string {
+ let res = [];
+ selects.value.forEach((item: any) => {
+ if (!res.includes(item.address)) res.push(item.address);
+ });
+ return res.join(',');
+}
+
+const onDeny = async () => {
+ let address = select2address();
+ if (!address) return;
+ await operateIPRule({ operation: 'add', address: address, strategy: 'drop' }).then(() => {
+ MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
+ search();
+ });
+};
const search = async () => {
let params = {