Merge branch 'codeCheck' of https://git.mesalab.cn/nezha/nezha-fronted into codeCheck
This commit is contained in:
@@ -673,9 +673,15 @@ li{
|
||||
margin-top: -2px;
|
||||
}*/
|
||||
.top-tool-main-right-to-left {
|
||||
right: calc(100% - 341px) !important;
|
||||
right: calc(100% - 390px) !important;
|
||||
/*transform: translateX(100%);*/
|
||||
}
|
||||
.top-tool-main-right-to-left-small{
|
||||
right: calc(100% - 360px) !important;
|
||||
}
|
||||
.top-tool-main-right-to-left-little{
|
||||
right: calc(100% - 286px) !important;
|
||||
}
|
||||
/* end--顶部工具栏*/
|
||||
|
||||
/* begin--二级顶部工具栏*/
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
<i class="nz-icon nz-icon-arrow-down"></i>
|
||||
<transition name="el-zoom-in-top">
|
||||
<ul class="el-dropdown-menu el-popper el-dropdown-menu--mini export-dropdown" v-show="exportShow">
|
||||
<li @click="showImportBox(1)" class="el-dropdown-menu__item dropdown-content"><i class="nz-icon nz-icon-upload"></i>import</li>
|
||||
<li @click="showImportBox(2)" class="el-dropdown-menu__item dropdown-content"><i class="nz-icon nz-icon-download1"></i>export</li>
|
||||
<li @click="showImportBox(1)" class="el-dropdown-menu__item dropdown-content"><i class="nz-icon nz-icon-upload"></i>{{$t('overall.importExcel')}}</li>
|
||||
<li @click="showImportBox(2)" class="el-dropdown-menu__item dropdown-content"><i class="nz-icon nz-icon-download1"></i>{{$t('overall.exportExcel')}}</li>
|
||||
</ul>
|
||||
</transition>
|
||||
</button>
|
||||
|
||||
@@ -1,110 +0,0 @@
|
||||
const scale = 6; //默认缩放比
|
||||
const coordinateSpanByZoom = { //各缩放比例下map显示范围的经纬度跨度
|
||||
6: [60, 20]
|
||||
};
|
||||
export const worldData = jsonData["world"];
|
||||
const worldDataDecode = decode(worldData);
|
||||
|
||||
/*export function getProvinceJson(coordinate) { //根据中心点坐标,动态返回四周的省份信息。
|
||||
//同时间只显示自身和周围共9块省级区划
|
||||
//console.info(coordinate);
|
||||
let countryNames = getCountries(coordinate, scale);
|
||||
//console.info(countryNames.join("\n"));
|
||||
//拼接json
|
||||
let newWorldData = JSON.parse(JSON.stringify(worldDataDecode));
|
||||
countryNames.forEach(countryName => {
|
||||
if (jsonData[countryName]) {
|
||||
//let countryDecode = jsonData[countryName];
|
||||
let countryDecode = decode(jsonData[countryName]);
|
||||
//console.info(countryDecode)
|
||||
newWorldData.features = newWorldData.features.concat(countryDecode.features);
|
||||
}
|
||||
});
|
||||
//console.info(JSON.stringify(newWorldData.features[newWorldData.features.length-1]));
|
||||
return newWorldData;
|
||||
}*/
|
||||
/*function getCountries(coordinate, currentScale) { //根据参数当前中心坐标、当前缩放比,得出需要显示省级区划的小块内的国家
|
||||
let x = coordinateSpanByZoom[currentScale][0];
|
||||
let y = coordinateSpanByZoom[currentScale][1];
|
||||
let rangeX = [coordinate[0] < (-180+x) ? -180 : (Math.floor(coordinate[0]/x)-1)*x, (Math.floor(coordinate[0]/x)+1)*x];
|
||||
let rangeY = [coordinate[1] < (-90+y) ? -90 : (Math.floor(coordinate[1]/y)-1)*y, (Math.floor(coordinate[1]/y)+1)*y];
|
||||
//console.info(rangeX, rangeY);
|
||||
let countries = [];
|
||||
for (let country in jsonData.countryCoordinates) { //jsonData.countryCoordinates是各国首都坐标数据
|
||||
let countryX = jsonData.countryCoordinates[country][currentScale][0];
|
||||
let countryY = jsonData.countryCoordinates[country][currentScale][1];
|
||||
if (countryX > rangeX[0] && countryX <= rangeX[1] && countryY > rangeY[0] && countryY <= rangeY[1]) { //这个国家在范围内
|
||||
//console.info(countryX, countryY);
|
||||
countries.push(country);
|
||||
}
|
||||
}
|
||||
return countries;
|
||||
}*/
|
||||
|
||||
function decode(json) {
|
||||
if (!json.UTF8Encoding) {
|
||||
return json;
|
||||
}
|
||||
var encodeScale = json.UTF8Scale;
|
||||
if (encodeScale == null) {
|
||||
encodeScale = 1024;
|
||||
}
|
||||
|
||||
var features = json.features;
|
||||
|
||||
for (var f = 0; f < features.length; f++) {
|
||||
var feature = features[f];
|
||||
var geometry = feature.geometry;
|
||||
var coordinates = geometry.coordinates;
|
||||
var encodeOffsets = geometry.encodeOffsets;
|
||||
|
||||
for (var c = 0; c < coordinates.length; c++) {
|
||||
var coordinate = coordinates[c];
|
||||
|
||||
if (geometry.type === 'Polygon') {
|
||||
coordinates[c] = decodePolygon(
|
||||
coordinate,
|
||||
encodeOffsets[c],
|
||||
encodeScale
|
||||
);
|
||||
}
|
||||
else if (geometry.type === 'MultiPolygon') {
|
||||
for (var c2 = 0; c2 < coordinate.length; c2++) {
|
||||
var polygon = coordinate[c2];
|
||||
coordinate[c2] = decodePolygon(
|
||||
polygon,
|
||||
encodeOffsets[c][c2],
|
||||
encodeScale
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Has been decoded
|
||||
json.UTF8Encoding = false;
|
||||
return json;
|
||||
}
|
||||
|
||||
function decodePolygon(coordinate, encodeOffsets, encodeScale) {
|
||||
var result = [];
|
||||
var prevX = encodeOffsets[0];
|
||||
var prevY = encodeOffsets[1];
|
||||
|
||||
for (var i = 0; i < coordinate.length; i += 2) {
|
||||
var x = coordinate.charCodeAt(i) - 64;
|
||||
var y = coordinate.charCodeAt(i + 1) - 64;
|
||||
// ZigZag decoding
|
||||
x = (x >> 1) ^ (-(x & 1));
|
||||
y = (y >> 1) ^ (-(y & 1));
|
||||
// Delta deocding
|
||||
x += prevX;
|
||||
y += prevY;
|
||||
|
||||
prevX = x;
|
||||
prevY = y;
|
||||
// Dequantize
|
||||
result.push([x / encodeScale, y / encodeScale]);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -41,8 +41,8 @@ const cn = {
|
||||
createAsset: "新增资产",
|
||||
createAlertRule: "新增告警规则",
|
||||
createAccount: "新增用户名",
|
||||
createPrometheusServer: "新增 prometheus server",
|
||||
createDatacenter: "新增DC",
|
||||
createPrometheusServer: "新增prometheus服务",
|
||||
createDatacenter: "新增数据中心",
|
||||
active: "活跃",
|
||||
type: "类别",
|
||||
preview: "预览",
|
||||
@@ -72,7 +72,7 @@ const cn = {
|
||||
failedDetail: "失败详情"
|
||||
},
|
||||
reset: "重置",
|
||||
submit: "提交",
|
||||
submit: "保存",
|
||||
noData:'没有数据',
|
||||
tag: '标签',
|
||||
syncChart:'同步图表',
|
||||
@@ -213,7 +213,7 @@ const cn = {
|
||||
recOneMonth: "最近1月",
|
||||
curMonth: "本月",
|
||||
lastMonth: "上月",
|
||||
customTimeRange: "Custom time range",
|
||||
customTimeRange: "自定义时间区间",
|
||||
noDate:'无',
|
||||
lastFiveMin: "最近5分钟",
|
||||
lastFifteenMin: "最近15分钟",
|
||||
@@ -415,18 +415,18 @@ const cn = {
|
||||
},
|
||||
purchaseDate: "购买日期",
|
||||
dataSelectTip: "请选择日期",
|
||||
dc: "DC",
|
||||
dcName: "DC名称",
|
||||
dc: "数据中心",
|
||||
dcName: "数据中心名称",
|
||||
AddIdcTab: {
|
||||
title: "新增DC",
|
||||
dcName: "DC名称",
|
||||
title: "新增数据中心",
|
||||
dcName: "数据中心名称",
|
||||
location: "地区",
|
||||
principal: "负责人",
|
||||
tel: "电话"
|
||||
},
|
||||
editIdcTab: {
|
||||
title: "编辑DC",
|
||||
dcName: "DC名称",
|
||||
title: "编辑数据中心",
|
||||
dcName: "数据中心名称",
|
||||
location: "地区",
|
||||
principal: "负责人",
|
||||
tel: "电话"
|
||||
@@ -440,14 +440,14 @@ const cn = {
|
||||
name: "名称",
|
||||
uSize: "U位",
|
||||
remark: "描述",
|
||||
DC: "DC"
|
||||
DC: "数据中心"
|
||||
},
|
||||
editCabinetTab: {
|
||||
title: "编辑机柜",
|
||||
name: "名称",
|
||||
uSize: "U位",
|
||||
remark: "描述",
|
||||
DC: "DC"
|
||||
DC: "数据中心"
|
||||
},
|
||||
uSize: "U位",
|
||||
remark: "描述",
|
||||
@@ -468,7 +468,7 @@ const cn = {
|
||||
assetState: "状态",
|
||||
modules: "Endpoint",
|
||||
alerts: "告警信息",
|
||||
dataCenter: "DC",
|
||||
dataCenter: "数据中心",
|
||||
cabinet: "机柜",
|
||||
model: "型号",
|
||||
manufacturer: "厂商",
|
||||
@@ -601,7 +601,7 @@ const cn = {
|
||||
dc: {
|
||||
dc: "数据中心",
|
||||
area: "地区",
|
||||
dcName: 'DC名称',
|
||||
dcName: '数据中心名称',
|
||||
selectArea: "选择地区",
|
||||
cabinetNum: "机柜数量",
|
||||
assets: "资产",
|
||||
@@ -847,7 +847,7 @@ const cn = {
|
||||
port: "端口",
|
||||
param: "参数",
|
||||
path: "路径",
|
||||
asset: "设备",
|
||||
asset: "资产",
|
||||
lastUpdate: "最后更新时间",
|
||||
moduleParameter: "模块参数",
|
||||
addGraph: "查看图表",
|
||||
|
||||
@@ -76,7 +76,7 @@ const en = {
|
||||
failedDetail:'Failed Detail'
|
||||
},
|
||||
reset:'Reset',
|
||||
submit:'Submit',
|
||||
submit:'Save',
|
||||
noData:'No data',
|
||||
tag: 'Tag',
|
||||
placeHolder:'Please enter',
|
||||
|
||||
@@ -828,7 +828,7 @@
|
||||
max-width: calc(100% - 40px); min-width: 20px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
|
||||
}
|
||||
.tag-mark{
|
||||
color:orange; width: 40px;
|
||||
color:orange; width: 42px;
|
||||
}
|
||||
}
|
||||
/*/deep/ .sidebar-info-item .el-checkbox__label{*/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<div class="main-list" :class="{'main-list-with-sub': bottomBox.showSubList}">
|
||||
<div class="main-modal"></div>
|
||||
<div class="top-tools" v-show="bottomBox.mainResizeShow">
|
||||
<div class="top-tool-main-right" :class="{'top-tool-main-right-to-left': bottomBox.showSubList}">
|
||||
<div class="top-tool-main-right" :class="{'top-tool-main-right-to-left-small': bottomBox.showSubList}">
|
||||
<div class="top-tool-search">
|
||||
<search-input ref="searchInput" :searchMsg="searchMsg" @search="search" :inTransform="bottomBox.inTransform"></search-input>
|
||||
</div>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="mib">
|
||||
<template v-if="showTab == 'file'">
|
||||
<div class="top-tools">
|
||||
<div class="nz-tab top-tool-main-right top-tool-main-right-to-left" style="width: 300px">
|
||||
<div class="nz-tab top-tool-main-right top-tool-main-right-to-left-little" style="width: 300px">
|
||||
<div class="nz-tab-item-box" id="module-type-1">
|
||||
<div class="nz-tab-item nz-tab-item-active">{{$t("config.mib.mibFiles")}}</div>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<span class="mib-browser">
|
||||
<div class="top-tools">
|
||||
<div class="nz-tab top-tool-main-right top-tool-main-right-to-left" style="width: 300px">
|
||||
<div class="nz-tab top-tool-main-right top-tool-main-right-to-left-little" style="width: 300px">
|
||||
<div class="nz-tab-item-box" @click="toFileTab" id="module-type-3">
|
||||
<div class="nz-tab-item">{{$t("config.mib.mibFiles")}}</div>
|
||||
</div>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<div class="main-list" :class="{'main-list-with-sub': bottomBox.showSubList}">
|
||||
<div class="main-modal"></div>
|
||||
<div class="top-tools" v-show="bottomBox.mainResizeShow">
|
||||
<div class="top-tool-main-right" :class="{'top-tool-main-right-to-left': bottomBox.showSubList}">
|
||||
<div class="top-tool-main-right" :class="{'top-tool-main-right-to-left-small': bottomBox.showSubList}">
|
||||
<div class="top-tool-search">
|
||||
<search-input :searchMsg="searchMsg" @search="search" :bottomBox.inTransform="bottomBox.inTransform"></search-input>
|
||||
</div>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<button type="button" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new" @click="resetForm('basicForm','basic')" style="top:2px">{{$t('overall.reset')}}</button>
|
||||
<button type="primary" @click="saveSetInfo('basic','basicForm')" class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new">{{$t('overall.submit')}}</button>
|
||||
<button type="button" @click="saveSetInfo('basic','basicForm')" class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new">{{$t('overall.submit')}}</button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
@@ -84,7 +84,7 @@
|
||||
<el-form-item>
|
||||
<button type="button" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new" @click="resetForm('emailForm','email')" style="top:2px">{{$t('overall.reset')}}</button>
|
||||
<button type="button" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new" :class="{'nz-btn-disabled':email.email_enable == 'off'}" :disabled="email.email_enable == 'off'" @click="testSetInfo('email','emailForm')" style="top:2px">{{$t('config.system.email.testConnection')}}</button>
|
||||
<button type="primary" @click="saveSetInfo('email','emailForm')" class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new">{{$t('overall.submit')}}</button>
|
||||
<button type="button" @click="saveSetInfo('email','emailForm')" class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new">{{$t('overall.submit')}}</button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
@@ -96,7 +96,7 @@
|
||||
<el-input-number v-model="terminal.max_terminal_num" controls-position="right" :min="1" :max="50"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<button type="primary" @click="saveSetInfo('terminal','terminalForm')" class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new">{{$t('overall.submit')}}</button>
|
||||
<button type="button" @click="saveSetInfo('terminal','terminalForm')" class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new">{{$t('overall.submit')}}</button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
@@ -128,7 +128,7 @@
|
||||
<el-form-item>
|
||||
<button type="button" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new" @click="resetForm('ldapForm','ldap')" style="top:2px">{{$t('overall.reset')}}</button>
|
||||
<button type="button" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new" @click="testSetInfo('ldap','ldapForm')" style="top:2px">{{$t('config.system.email.testConnection')}}</button>
|
||||
<button type="primary" @click="saveSetInfo('ldap','ldapForm')" class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new">{{$t('overall.submit')}}</button>
|
||||
<button type="button" @click="saveSetInfo('ldap','ldapForm')" class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new">{{$t('overall.submit')}}</button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
@@ -177,7 +177,7 @@
|
||||
<el-input v-model="item.url" width="460px" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="btn">
|
||||
<button type="primary" class="linkBtn nz-btn nz-btn-size-small-new nz-btn-style-normal-new" @click="linkUpdate(item)">Update</button>
|
||||
<button type="button" class="linkBtn nz-btn nz-btn-size-small-new nz-btn-style-normal-new" @click="linkUpdate(item)">Update</button>
|
||||
<button type="button" class="linkBtn nz-btn nz-btn-size-small-new nz-btn-style-light-new" @click="linkCancel(item)">Cancel</button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
Reference in New Issue
Block a user