2019-12-17 17:17:30 +08:00
|
|
|
|
<script>
|
2021-03-19 18:52:19 +08:00
|
|
|
|
import i18n from './i18n'
|
|
|
|
|
|
const searchSelectInfo = { // value: 传给后台的值;label:显示给用户看的值
|
|
|
|
|
|
severity: [ // 告警级别
|
|
|
|
|
|
{
|
|
|
|
|
|
value: 'P1',
|
|
|
|
|
|
label: i18n.t('alert.config.P1')
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: 'P2',
|
|
|
|
|
|
label: i18n.t('alert.config.P2')
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: 'P3',
|
|
|
|
|
|
label: i18n.t('alert.config.P3')
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
promType: [ // promServer类型
|
|
|
|
|
|
{
|
|
|
|
|
|
value: 1,
|
|
|
|
|
|
label: 'Global'
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: 2,
|
|
|
|
|
|
label: 'Per-Datacenter'
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
alertType: [ // 告警类型
|
|
|
|
|
|
{
|
|
|
|
|
|
value: 1,
|
|
|
|
|
|
label: i18n.t('alert.config.typeOption.project')
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: 2,
|
|
|
|
|
|
label: i18n.t('alert.config.typeOption.module')
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: 3,
|
|
|
|
|
|
label: i18n.t('alert.config.typeOption.asset')
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
assetState: [ // 资产入库/出库状态
|
|
|
|
|
|
{
|
|
|
|
|
|
value: 1,
|
|
|
|
|
|
label: i18n.t('asset.inStock')
|
|
|
|
|
|
}, {
|
|
|
|
|
|
value: 2,
|
|
|
|
|
|
label: i18n.t('asset.notInStock')
|
|
|
|
|
|
}, {
|
|
|
|
|
|
value: 3,
|
|
|
|
|
|
label: i18n.t('asset.suspended')
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2021-05-10 15:59:39 +08:00
|
|
|
|
endpointState: [
|
2021-03-19 18:52:19 +08:00
|
|
|
|
{
|
|
|
|
|
|
value: 1,
|
|
|
|
|
|
label: 'UP'
|
|
|
|
|
|
}, {
|
|
|
|
|
|
value: 0,
|
|
|
|
|
|
label: 'DOWN'
|
|
|
|
|
|
}, {
|
|
|
|
|
|
value: 2,
|
|
|
|
|
|
label: 'SUSPENDED'
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2021-05-10 15:59:39 +08:00
|
|
|
|
promState: [
|
|
|
|
|
|
{
|
|
|
|
|
|
value: 1,
|
|
|
|
|
|
label: 'UP'
|
|
|
|
|
|
}, {
|
2021-09-15 11:42:06 +08:00
|
|
|
|
value: '0,-1',
|
2021-05-10 15:59:39 +08:00
|
|
|
|
label: 'DOWN'
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2021-03-19 18:52:19 +08:00
|
|
|
|
pingStatus: [
|
|
|
|
|
|
{
|
|
|
|
|
|
value: '0',
|
|
|
|
|
|
label: i18n.t('asset.pingInactive')
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: '1',
|
|
|
|
|
|
label: i18n.t('asset.pingActive')
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2021-05-10 15:59:39 +08:00
|
|
|
|
credentialType: [
|
|
|
|
|
|
{
|
|
|
|
|
|
value: 2,
|
|
|
|
|
|
label: 'V2'
|
|
|
|
|
|
}, {
|
|
|
|
|
|
value: 3,
|
|
|
|
|
|
label: 'V3'
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2021-03-19 18:52:19 +08:00
|
|
|
|
operation: [
|
|
|
|
|
|
{
|
|
|
|
|
|
value: 'add',
|
|
|
|
|
|
label: i18n.t('config.operationlog.operations.add')
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: 'update',
|
|
|
|
|
|
label: i18n.t('config.operationlog.operations.update')
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: 'query',
|
|
|
|
|
|
label: i18n.t('config.operationlog.operations.query')
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: 'import',
|
|
|
|
|
|
label: i18n.t('config.operationlog.operations.import')
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: 'export',
|
|
|
|
|
|
label: i18n.t('config.operationlog.operations.export')
|
|
|
|
|
|
},
|
2021-08-05 10:04:35 +08:00
|
|
|
|
{
|
|
|
|
|
|
value: 'delete',
|
|
|
|
|
|
label: i18n.t('config.operationlog.operations.delete')
|
|
|
|
|
|
},
|
2021-03-19 18:52:19 +08:00
|
|
|
|
{
|
|
|
|
|
|
value: 'reset',
|
|
|
|
|
|
label: i18n.t('config.operationlog.operations.reset')
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: 'unknown',
|
|
|
|
|
|
label: i18n.t('config.operationlog.operations.unknown')
|
2021-04-22 17:43:13 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: 'login',
|
|
|
|
|
|
label: i18n.t('config.operationlog.operations.login')
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: 'logout',
|
|
|
|
|
|
label: i18n.t('config.operationlog.operations.logout')
|
2021-04-22 18:03:56 +08:00
|
|
|
|
}
|
2021-03-19 18:52:19 +08:00
|
|
|
|
],
|
|
|
|
|
|
alertMessageState: [
|
|
|
|
|
|
{
|
|
|
|
|
|
value: '1',
|
|
|
|
|
|
label: i18n.t('alert.list.pending')
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: '2',
|
|
|
|
|
|
label: i18n.t('alert.list.expired')
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
protocol: [
|
|
|
|
|
|
{
|
|
|
|
|
|
value: 'SSH',
|
|
|
|
|
|
label: i18n.t('config.terminallog.SSH')
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: 'TELNET',
|
|
|
|
|
|
label: i18n.t('config.terminallog.TELNET')
|
|
|
|
|
|
}
|
2021-04-22 17:43:13 +08:00
|
|
|
|
],
|
2021-04-22 18:03:56 +08:00
|
|
|
|
state: [
|
2021-04-22 17:43:13 +08:00
|
|
|
|
{
|
|
|
|
|
|
value: 'success',
|
|
|
|
|
|
label: i18n.t('overall.result.success')
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: 'fail',
|
|
|
|
|
|
label: i18n.t('overall.result.failed')
|
|
|
|
|
|
}
|
2021-04-23 20:06:58 +08:00
|
|
|
|
],
|
2021-05-10 15:59:39 +08:00
|
|
|
|
dcState: [
|
|
|
|
|
|
{
|
2021-05-24 16:11:45 +08:00
|
|
|
|
value: 'ON',
|
2021-11-05 16:50:52 +08:00
|
|
|
|
label: i18n.t('overall.enabled')
|
2021-05-10 15:59:39 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
2021-05-24 16:11:45 +08:00
|
|
|
|
value: 'OFF',
|
2021-11-05 16:50:52 +08:00
|
|
|
|
label: i18n.t('overall.disabled')
|
2021-05-10 15:59:39 +08:00
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
varType: [
|
|
|
|
|
|
{ value: '1', label: i18n.t('asset.asset') },
|
|
|
|
|
|
{ value: '2', label: i18n.t('asset.endpoint') }
|
|
|
|
|
|
],
|
|
|
|
|
|
chartType: [
|
|
|
|
|
|
{
|
|
|
|
|
|
value: 'line',
|
|
|
|
|
|
label: i18n.t('dashboard.panel.chartForm.typeVal.line.label')
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: 'stackArea',
|
|
|
|
|
|
label: i18n.t('dashboard.panel.chartForm.typeVal.stackArea.label')
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: 'bar',
|
|
|
|
|
|
label: i18n.t('dashboard.panel.chartForm.typeVal.bar.label')
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: 'singleStat',
|
|
|
|
|
|
label: i18n.t('dashboard.panel.chartForm.typeVal.singleStat.label')
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: 'pie',
|
|
|
|
|
|
label: i18n.t('dashboard.panel.chartForm.typeVal.pie.label')
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: 'table',
|
|
|
|
|
|
label: i18n.t('dashboard.panel.chartForm.typeVal.table.label')
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: 'alertList',
|
|
|
|
|
|
label: i18n.t('dashboard.panel.chartForm.typeVal.alertList.label')
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: 'text',
|
|
|
|
|
|
label: i18n.t('dashboard.panel.chartForm.typeVal.text.label')
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: 'url',
|
|
|
|
|
|
label: i18n.t('dashboard.panel.chartForm.typeVal.url.label')
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: 'group',
|
|
|
|
|
|
label: i18n.t('dashboard.panel.chartForm.typeVal.group.label')
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2021-04-27 17:38:58 +08:00
|
|
|
|
terminalStatus: [
|
2021-04-23 20:06:58 +08:00
|
|
|
|
{
|
|
|
|
|
|
value: 0,
|
|
|
|
|
|
label: i18n.t('config.terminallog.statusItem.connecting')
|
2021-04-27 17:38:58 +08:00
|
|
|
|
}, {
|
2021-04-23 20:06:58 +08:00
|
|
|
|
value: 1,
|
|
|
|
|
|
label: i18n.t('config.terminallog.statusItem.connectionFailed')
|
2021-04-27 17:38:58 +08:00
|
|
|
|
}, {
|
2021-04-23 20:06:58 +08:00
|
|
|
|
value: 2,
|
|
|
|
|
|
label: i18n.t('config.terminallog.statusItem.over')
|
2021-04-27 17:38:58 +08:00
|
|
|
|
}, {
|
2021-04-23 20:06:58 +08:00
|
|
|
|
value: 3,
|
|
|
|
|
|
label: i18n.t('config.terminallog.statusItem.kickedOut')
|
2021-04-27 17:38:58 +08:00
|
|
|
|
}, {
|
2021-04-23 20:06:58 +08:00
|
|
|
|
value: 4,
|
|
|
|
|
|
label: i18n.t('config.terminallog.statusItem.unknownError')
|
2021-04-27 17:38:58 +08:00
|
|
|
|
}
|
2021-09-14 16:14:25 +08:00
|
|
|
|
],
|
|
|
|
|
|
searchMetrics: [
|
|
|
|
|
|
{
|
|
|
|
|
|
id: 1,
|
|
|
|
|
|
name: i18n.t('project.metrics.metrics'),
|
|
|
|
|
|
searchType: 'alertTypes'
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
id: 2,
|
|
|
|
|
|
name: i18n.t('overall.logs'),
|
|
|
|
|
|
searchType: 'alertTypes'
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
id: 3,
|
|
|
|
|
|
name: 'SNMP trap',
|
|
|
|
|
|
searchType: 'alertTypes'
|
|
|
|
|
|
}
|
2021-03-19 18:52:19 +08:00
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
export default searchSelectInfo
|
2019-12-17 17:17:30 +08:00
|
|
|
|
</script>
|