fix: 更换logo及oid自定义弹窗修改
This commit is contained in:
@@ -34,6 +34,7 @@ export interface HostHardwareDevice {
|
|||||||
snmp_port?: number
|
snmp_port?: number
|
||||||
community?: string
|
community?: string
|
||||||
snmp_version?: string
|
snmp_version?: string
|
||||||
|
snmp_oids?: string
|
||||||
redfish_base_url?: string
|
redfish_base_url?: string
|
||||||
redfish_tls_skip_verify?: boolean
|
redfish_tls_skip_verify?: boolean
|
||||||
ipmi_timeout_seconds?: number
|
ipmi_timeout_seconds?: number
|
||||||
@@ -65,6 +66,7 @@ export interface HostHardwareDeviceUpsert {
|
|||||||
snmp_port?: number
|
snmp_port?: number
|
||||||
community?: string
|
community?: string
|
||||||
snmp_version?: string
|
snmp_version?: string
|
||||||
|
snmp_oids?: string
|
||||||
redfish_base_url?: string
|
redfish_base_url?: string
|
||||||
redfish_tls_skip_verify?: boolean
|
redfish_tls_skip_verify?: boolean
|
||||||
location?: string
|
location?: string
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
@@ -1,12 +1,4 @@
|
|||||||
<svg width="33" height="33" viewBox="0 0 33 33" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="33" height="33">
|
||||||
<g clip-path="url(#clip0)">
|
<path d="M0 240.941176a240.941176 240.941176 0 0 1 240.941176-240.941176h542.117648a240.941176 240.941176 0 0 1 240.941176 240.941176v542.117648a240.941176 240.941176 0 0 1-240.941176 240.941176H240.941176a240.941176 240.941176 0 0 1-240.941176-240.941176V240.941176z" fill="#287BF7"></path>
|
||||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.37754 16.9795L12.7498 9.43027C14.7163 7.41663 17.9428 7.37837 19.9564 9.34482C19.9852 9.37297 20.0137 9.40145 20.0418 9.43027L20.1221 9.51243C22.1049 11.5429 22.1049 14.7847 20.1221 16.8152L12.7498 24.3644C10.7834 26.378 7.55686 26.4163 5.54322 24.4498C5.5144 24.4217 5.48592 24.3932 5.45777 24.3644L5.37754 24.2822C3.39468 22.2518 3.39468 19.0099 5.37754 16.9795Z" fill="#12D2AC"/>
|
<path d="M340.931765 388.969412a120.621176 120.621176 0 1 0 115.260235 209.799529l70.776471 97.490824a241.091765 241.091765 0 1 1 82.522353-283.587765c15.751529 39.936 14.516706 83.546353 13.763764 110.290824-0.150588 4.879059-0.271059 9.216-0.271059 12.860235 0 22.648471 5.812706 48.519529 18.221177 66.831059 10.24 15.058824 26.654118 28.310588 61.108706 28.310588 31.804235 0 49.152-10.721882 59.331764-22.40753 11.264-12.950588 18.974118-33.370353 18.974118-59.452235 0-18.642824-9.396706-39.574588-27.166118-53.067294-16.022588-12.137412-43.550118-21.594353-86.768941-8.734118l-34.42447-115.440941c75.926588-22.618353 144.112941-9.637647 193.987764 28.190118 48.128 36.502588 74.842353 93.093647 74.842353 149.082353 0 48.489412-14.245647 99.087059-48.609882 138.541176-35.418353 40.719059-87.341176 63.728941-150.166588 63.728941-75.294118 0-128.662588-33.792-160.768-81.106823-29.936941-44.062118-39.032471-95.864471-39.032471-134.475294 0-9.396706 0.150588-17.588706 0.240941-24.847059 0.421647-25.057882 0.632471-38.972235-5.330823-54.091294a120.621176 120.621176 0 0 0-156.491294-67.915294z" fill="#FFFFFF"></path>
|
||||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M20.0479 9.43034L27.3399 16.8974C29.3674 18.9735 29.3674 22.2883 27.3399 24.3644C25.3735 26.3781 22.147 26.4163 20.1333 24.4499C20.1045 24.4217 20.076 24.3933 20.0479 24.3644L12.7558 16.8974C10.7284 14.8213 10.7284 11.5065 12.7558 9.43034C14.7223 7.4167 17.9488 7.37844 19.9624 9.34489C19.9912 9.37304 20.0197 9.40152 20.0479 9.43034Z" fill="#307AF2"/>
|
|
||||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M20.1321 9.52163L23.6851 13.1599L16.3931 20.627L9.10103 13.1599L12.6541 9.52163C14.6707 7.45664 17.9794 7.4174 20.0444 9.434C20.074 9.46286 20.1032 9.49207 20.1321 9.52163Z" fill="#0057FE"/>
|
|
||||||
</g>
|
|
||||||
<defs>
|
|
||||||
<clipPath id="clip0">
|
|
||||||
<rect width="26" height="19" fill="white" transform="translate(3.5 7)"/>
|
|
||||||
</clipPath>
|
|
||||||
</defs>
|
|
||||||
</svg>
|
</svg>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.5 KiB |
@@ -19,10 +19,7 @@
|
|||||||
<div class="menu-wrapper">
|
<div class="menu-wrapper">
|
||||||
<div class="left-side">
|
<div class="left-side">
|
||||||
<a-space>
|
<a-space>
|
||||||
<img
|
<img class="app-logo" alt="logo" src="@/assets/logo.svg?url" />
|
||||||
alt="logo"
|
|
||||||
src="//p3-armor.byteimg.com/tos-cn-i-49unhts6dw/dfdba5317c0c20ce20e64fac803d52bc.svg~tplv-49unhts6dw-image.image"
|
|
||||||
/>
|
|
||||||
<a-typography-title>智能运维管理系统</a-typography-title>
|
<a-typography-title>智能运维管理系统</a-typography-title>
|
||||||
</a-space>
|
</a-space>
|
||||||
</div>
|
</div>
|
||||||
@@ -183,6 +180,13 @@ onMounted(() => {
|
|||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
width: 200px;
|
width: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.app-logo {
|
||||||
|
width: 32px;
|
||||||
|
height: 32px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&::after {
|
&::after {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<header class="navbar">
|
<header class="navbar">
|
||||||
<div class="navbar-content">
|
<div class="navbar-content">
|
||||||
<div class="logo" @click="goToHome">
|
<div class="logo" @click="goToHome">
|
||||||
<img src="@/assets/logo.png" alt="Logo" />
|
<img src="@/assets/logo.svg?url" alt="Logo" />
|
||||||
<span class="logo-text">智能运维管理系统</span>
|
<span class="logo-text">智能运维管理系统</span>
|
||||||
</div>
|
</div>
|
||||||
<nav class="nav-links">
|
<nav class="nav-links">
|
||||||
@@ -699,7 +699,9 @@ defineExpose({
|
|||||||
|
|
||||||
img {
|
img {
|
||||||
height: 32px;
|
height: 32px;
|
||||||
width: auto;
|
width: 32px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
object-fit: contain;
|
||||||
}
|
}
|
||||||
|
|
||||||
.logo-text {
|
.logo-text {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<header class="navbar">
|
<header class="navbar">
|
||||||
<div class="navbar-content">
|
<div class="navbar-content">
|
||||||
<div class="logo">
|
<div class="logo">
|
||||||
<img src="@/assets/logo.png" alt="Logo" />
|
<img src="@/assets/logo.svg?url" alt="Logo" />
|
||||||
<span class="logo-text">智能运维管理系统</span>
|
<span class="logo-text">智能运维管理系统</span>
|
||||||
</div>
|
</div>
|
||||||
<nav class="nav-links">
|
<nav class="nav-links">
|
||||||
@@ -158,7 +158,9 @@ const scrollToSection = (id: string) => {
|
|||||||
|
|
||||||
img {
|
img {
|
||||||
height: 32px;
|
height: 32px;
|
||||||
width: auto;
|
width: 32px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
object-fit: contain;
|
||||||
}
|
}
|
||||||
|
|
||||||
.logo-text {
|
.logo-text {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="login-bg">
|
<div class="login-bg">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="logo">
|
<div class="logo">
|
||||||
<img alt="logo" src="//p3-armor.byteimg.com/tos-cn-i-49unhts6dw/dfdba5317c0c20ce20e64fac803d52bc.svg~tplv-49unhts6dw-image.image" />
|
<img alt="logo" src="@/assets/logo.svg?url" />
|
||||||
<div class="logo-text">智能运维管理系统</div>
|
<div class="logo-text">智能运维管理系统</div>
|
||||||
</div>
|
</div>
|
||||||
<LoginBanner />
|
<LoginBanner />
|
||||||
@@ -104,6 +104,8 @@ const goToHome = () => {
|
|||||||
img {
|
img {
|
||||||
height: 32px;
|
height: 32px;
|
||||||
width: 32px;
|
width: 32px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
object-fit: contain;
|
||||||
}
|
}
|
||||||
@media (max-width: 900px) {
|
@media (max-width: 900px) {
|
||||||
position: static;
|
position: static;
|
||||||
|
|||||||
@@ -136,6 +136,11 @@
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
|
<SnmpOidEditor
|
||||||
|
ref="snmpOidEditorRef"
|
||||||
|
v-model="form.snmp_oids"
|
||||||
|
:reset-key="snmpOidEditorResetKey"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="form.protocol === 'redfish'">
|
<template v-if="form.protocol === 'redfish'">
|
||||||
@@ -195,6 +200,7 @@ import {
|
|||||||
type HostHardwareDevice,
|
type HostHardwareDevice,
|
||||||
type HostHardwareDeviceUpsert,
|
type HostHardwareDeviceUpsert,
|
||||||
} from '@/api/ops/host-hardware'
|
} from '@/api/ops/host-hardware'
|
||||||
|
import SnmpOidEditor from '../../components/SnmpOidEditor.vue'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
visible: boolean
|
visible: boolean
|
||||||
@@ -205,6 +211,8 @@ const props = defineProps<Props>()
|
|||||||
const emit = defineEmits(['update:visible', 'success'])
|
const emit = defineEmits(['update:visible', 'success'])
|
||||||
|
|
||||||
const formRef = ref<FormInstance>()
|
const formRef = ref<FormInstance>()
|
||||||
|
const snmpOidEditorRef = ref<InstanceType<typeof SnmpOidEditor>>()
|
||||||
|
const snmpOidEditorResetKey = ref(0)
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const submitLoading = ref(false)
|
const submitLoading = ref(false)
|
||||||
const blockedNoIdentity = ref(false)
|
const blockedNoIdentity = ref(false)
|
||||||
@@ -254,6 +262,7 @@ const form = reactive({
|
|||||||
snmp_port: 161,
|
snmp_port: 161,
|
||||||
community: '',
|
community: '',
|
||||||
snmp_version: 'v2c',
|
snmp_version: 'v2c',
|
||||||
|
snmp_oids: '',
|
||||||
redfish_base_url: '',
|
redfish_base_url: '',
|
||||||
redfish_tls_skip_verify: false,
|
redfish_tls_skip_verify: false,
|
||||||
description: '',
|
description: '',
|
||||||
@@ -283,6 +292,7 @@ function resetForm() {
|
|||||||
form.snmp_port = 161
|
form.snmp_port = 161
|
||||||
form.community = ''
|
form.community = ''
|
||||||
form.snmp_version = 'v2c'
|
form.snmp_version = 'v2c'
|
||||||
|
form.snmp_oids = ''
|
||||||
form.redfish_base_url = ''
|
form.redfish_base_url = ''
|
||||||
form.redfish_tls_skip_verify = false
|
form.redfish_tls_skip_verify = false
|
||||||
form.description = ''
|
form.description = ''
|
||||||
@@ -296,6 +306,7 @@ function resetForm() {
|
|||||||
form.redfish_collect_enabled = true
|
form.redfish_collect_enabled = true
|
||||||
form.collect_interval = 0
|
form.collect_interval = 0
|
||||||
form.enabled = true
|
form.enabled = true
|
||||||
|
snmpOidEditorResetKey.value += 1
|
||||||
}
|
}
|
||||||
|
|
||||||
function applyFromServer(r: ServerItem) {
|
function applyFromServer(r: ServerItem) {
|
||||||
@@ -315,6 +326,7 @@ function applyFromDevice(d: HostHardwareDevice) {
|
|||||||
form.snmp_port = d.snmp_port ?? 161
|
form.snmp_port = d.snmp_port ?? 161
|
||||||
form.community = d.community || ''
|
form.community = d.community || ''
|
||||||
form.snmp_version = d.snmp_version || 'v2c'
|
form.snmp_version = d.snmp_version || 'v2c'
|
||||||
|
form.snmp_oids = d.snmp_oids || ''
|
||||||
form.redfish_base_url = d.redfish_base_url || ''
|
form.redfish_base_url = d.redfish_base_url || ''
|
||||||
form.redfish_tls_skip_verify = !!d.redfish_tls_skip_verify
|
form.redfish_tls_skip_verify = !!d.redfish_tls_skip_verify
|
||||||
form.description = d.description || ''
|
form.description = d.description || ''
|
||||||
@@ -328,6 +340,7 @@ function applyFromDevice(d: HostHardwareDevice) {
|
|||||||
form.redfish_collect_enabled = d.redfish_collect_enabled !== false
|
form.redfish_collect_enabled = d.redfish_collect_enabled !== false
|
||||||
form.collect_interval = d.collect_interval ?? 0
|
form.collect_interval = d.collect_interval ?? 0
|
||||||
form.enabled = d.enabled !== false
|
form.enabled = d.enabled !== false
|
||||||
|
snmpOidEditorResetKey.value += 1
|
||||||
}
|
}
|
||||||
|
|
||||||
function validateExtraConfigJson(): boolean {
|
function validateExtraConfigJson(): boolean {
|
||||||
@@ -357,6 +370,7 @@ function buildPayload(): HostHardwareDeviceUpsert {
|
|||||||
snmp_port: form.snmp_port,
|
snmp_port: form.snmp_port,
|
||||||
community: form.community?.trim() || undefined,
|
community: form.community?.trim() || undefined,
|
||||||
snmp_version: form.snmp_version?.trim() || undefined,
|
snmp_version: form.snmp_version?.trim() || undefined,
|
||||||
|
snmp_oids: form.protocol === 'snmp' ? form.snmp_oids?.trim() || '[]' : '[]',
|
||||||
redfish_base_url: form.redfish_base_url?.trim() || undefined,
|
redfish_base_url: form.redfish_base_url?.trim() || undefined,
|
||||||
redfish_tls_skip_verify: form.redfish_tls_skip_verify,
|
redfish_tls_skip_verify: form.redfish_tls_skip_verify,
|
||||||
location: location || undefined,
|
location: location || undefined,
|
||||||
@@ -485,6 +499,9 @@ async function handleSubmit() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (!validateExtraConfigJson()) return
|
if (!validateExtraConfigJson()) return
|
||||||
|
if (form.protocol === 'snmp' && !snmpOidEditorRef.value?.validate()) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
const r = props.record
|
const r = props.record
|
||||||
console.log('r,', r)
|
console.log('r,', r)
|
||||||
|
|||||||
Reference in New Issue
Block a user