diff --git a/nezha-fronted/build/script/buildEnd.sh b/nezha-fronted/build/script/buildEnd.sh index 5908cbac2..9d3ebc533 100644 --- a/nezha-fronted/build/script/buildEnd.sh +++ b/nezha-fronted/build/script/buildEnd.sh @@ -15,7 +15,11 @@ if [[ 'all' == "${BUILD_MODE}" ]];then \cp -rf ../static/Tiles/ $DIST_PATH/static/ fi echo 'start create zip...' -find ./ * -exec touch -t $(date +%Y%m%d0000.00) {} \; + +#find ./ * -exec touch -t $(date +%Y%m%d0000.00) {} \; + +find ./ * -exec touch -t 202104301200.00 {} \; + zip -rX nz-gui.zip ./* >/dev/null MD5=$(md5sum nz-gui.zip |awk '{print $1}'|cut -c 1-8) diff --git a/nezha-fronted/build/webpack.prod.conf.js b/nezha-fronted/build/webpack.prod.conf.js index 889bbd490..5014094f8 100644 --- a/nezha-fronted/build/webpack.prod.conf.js +++ b/nezha-fronted/build/webpack.prod.conf.js @@ -197,13 +197,13 @@ if(process.env.NODE_ENV == 'development'){ onBuildStart: ['/bin/bash '+path.join(__dirname,'script')+'/buildStart.sh'], onBuildEnd: ['/bin/bash '+path.join(__dirname,'script')+'/buildEnd.sh '+process.env.BUILD_MODE] }), - new fileManagerPlugin({ - onStart:[ - { - delete:[path.join(__dirname,'../dist/') ] - } - ], - }) + // new fileManagerPlugin({ + // onStart:[ + // { + // delete:[path.join(__dirname,'../dist/') ] + // } + // ], + // }) ) } diff --git a/nezha-fronted/src/components/common/header.vue b/nezha-fronted/src/components/common/header.vue index 93df622fe..08d44fe6c 100644 --- a/nezha-fronted/src/components/common/header.vue +++ b/nezha-fronted/src/components/common/header.vue @@ -18,7 +18,7 @@ diff --git a/nezha-fronted/src/components/common/js/common.js b/nezha-fronted/src/components/common/js/common.js index e4e812903..d9a3f0842 100644 --- a/nezha-fronted/src/components/common/js/common.js +++ b/nezha-fronted/src/components/common/js/common.js @@ -10,7 +10,7 @@ export function resetZIndex (e) { } export function getUUID () { function S4 () { - return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1) + return (((1 + window.crypto.getRandomValues(new Uint32Array(10))[0]) * 0x10000) | 0).toString(16).substring(1) } return (S4() + S4() + '-' + S4() + '-' + S4() + '-' + S4() + '-' + S4() + S4() + S4()) diff --git a/nezha-fronted/src/components/common/js/radomcolor/color.txt b/nezha-fronted/src/components/common/js/radomcolor/color.txt deleted file mode 100644 index c7e0b2172..000000000 --- a/nezha-fronted/src/components/common/js/radomcolor/color.txt +++ /dev/null @@ -1,177 +0,0 @@ - -#d8a6ea -#d8f799 -#7fe2d0 -#f7677b -#6e4eed -#adff3a -#f082f2 -#cc2095 -#ea60aa -#8cf2d7 -#51cc41 -#9c93d8 -#f4a1c5 -#a1f4b3 -#6de8a6 -#92a1e8 -#e5aa52 -#96c938 -#9dd7ea -#ccd1ff -#d65640 -#ffccd1 -#6ba5c4 -#6af7a0 -#ffa5fc -#bff977 -#98f99a -#c14c3f -#0f1ec4 -#88e02a -#d540dd -#24f27d -#4572ef -#fff8af -#5f56d8 -#5023ba -#021b60 -#80ed76 -#cbfca9 -#235ad1 -#ed87ae -#adf913 -#dbdb29 -#e23bc6 -#e2a33d -#949fe8 -#bad7fc -#4ce86e -#9ccbe5 -#6354ea -#98f2d7 -#fcc79c -#192e96 -#a567ce -#f72a56 -#f29e59 -#eb6eef -#e03188 -#6050bf -#beb9f7 -#9ec1ef -#4083b7 -#f73302 -#614dd1 -#f7b183 -#d6ef97 -#13f7e4 -#bbccf7 -#c17c3c -#db5c91 -#fcdfbf -#88d32c -#b33de5 -#5ef9b9 -#27e5b9 -#7f84d1 -#f98f7a -#d05ae2 -#44c4c2 -#e5d04b -#b23c2c -#2209b5 -#cdc2f9 -#be40e8 -#b3d1fc -#67e0d2 -#c5f9a4 -#89dbf9 -#f4b0d0 -#0e00aa -#88a8d8 -#e595a3 -#9ef99a -#ffdf2b -#e59787 -#68f9ac -#6620a3 -#6cd87a -#ade8ed -#e7f78a -#d66a22 -#a24cff -#959cdb -#c6ffb2 -#db4cff -#4dff47 -#ee24f2 -#41ce31 -#99efbd -#2b8407 -#3db2c6 -#cb42ed -#6d22a3 -#6357cc -#012e77 -#fc2dc5 -#b27b21 -#ef1ce5 -#f75b87 -#e87ab6 -#a8ffcc -#9ae2e1 -#b4f79b -#13d681 -#85d85f -#dd499d -#e88db0 -#35ce35 -#fff7af -#e57e91 -#2cc147 -#60f7e3 -#16af98 -#9b2ff9 -#dd0618 -#42c49d -#c137ce -#fcc3bf -#1219e2 -#04a53f -#69ea81 -#fcdbba -#e53986 -#5656e2 -#423cfc -#9ddd75 -#fc2500 -#f461a8 -#fc6fba -#b53649 -#71e8ac -#f26a8e -#bf8511 -#21f2a2 -#b1bded -#e5bd6e -#c004e5 -#6fdbd9 -#98f9c4 -#f9e936 -#d16932 -#fcb86a -#27e5d5 -#e2bc7f -#ca52f2 -#3bd68e -#74e3ed -#e0e80b -#bf5ced -#ff14b0 -#66c3e8 -#fcf88a -#6a2099 -#ea4ff2 -#c708e0 -#d35d6c \ No newline at end of file diff --git a/nezha-fronted/src/components/common/js/radomcolor/randomcolor.js b/nezha-fronted/src/components/common/js/radomcolor/randomcolor.js deleted file mode 100644 index 763543c44..000000000 --- a/nezha-fronted/src/components/common/js/radomcolor/randomcolor.js +++ /dev/null @@ -1,316 +0,0 @@ -function randomcolor () { - let e = null - const t = {} - r('monochrome', null, [ - [0, 0], - [100, 0] - ]), - r('red', [-26, 18], [ - [20, 100], - [30, 92], - [40, 89], - [50, 85], - [60, 78], - [70, 70], - [80, 60], - [90, 55], - [100, 50] - ]), - r('orange', [19, 46], [ - [20, 100], - [30, 93], - [40, 88], - [50, 86], - [60, 85], - [70, 70], - [100, 70] - ]), - r('yellow', [47, 62], [ - [25, 100], - [40, 94], - [50, 89], - [60, 86], - [70, 84], - [80, 82], - [90, 80], - [100, 75] - ]), - r('green', [63, 178], [ - [30, 100], - [40, 90], - [50, 85], - [60, 81], - [70, 74], - [80, 64], - [90, 50], - [100, 40] - ]), - r('blue', [179, 257], [ - [20, 100], - [30, 86], - [40, 80], - [50, 74], - [60, 60], - [70, 52], - [80, 44], - [90, 39], - [100, 35] - ]), - r('purple', [258, 282], [ - [20, 100], - [30, 87], - [40, 79], - [50, 70], - [60, 65], - [70, 59], - [80, 52], - [90, 45], - [100, 42] - ]), - r('pink', [283, 334], [ - [20, 100], - [30, 90], - [40, 86], - [60, 84], - [80, 80], - [90, 75], - [100, 73] - ]) - var n = function (r) { - if (void 0 !== (r = r || {}).seed && r.seed !== null && r.seed === parseInt(r.seed, 10)) { e = r.seed } else if (typeof r.seed === 'string') { - e = (function (e) { - for (var t = 0, n = 0; n !== e.length && !(t >= Number.MAX_SAFE_INTEGER); n++) { t += e.charCodeAt(n) } - return t - } - (r.seed)) - } else { - if (void 0 !== r.seed && r.seed !== null) { throw new TypeError('The seed value must be an integer or string') } - e = null - } - let c, - l - if (r.count !== null && void 0 !== r.count) { - const u = r.count - const d = [] - for (r.count = null; u > d.length;) { e && r.seed && (r.seed += 1), d.push(n(r)) } - return r.count = u, - d - } - return (function (e, t) { - switch (t.format) { - case 'hsvArray': - return e - case 'hslArray': - return a(e) - case 'hsl': - var n = a(e) - return 'hsl(' + n[0] + ', ' + n[1] + '%, ' + n[2] + '%)' - case 'hsla': - var s = a(e) - var o = t.alpha || Math.random() - return 'hsla(' + s[0] + ', ' + s[1] + '%, ' + s[2] + '%, ' + o + ')' - case 'rgbArray': - return i(e) - case 'rgb': - return 'rgb(' + i(e).join(', ') + ')' - case 'rgba': - var r = i(e) - o = t.alpha || Math.random() - return 'rgba(' + r.join(', ') + ', ' + o + ')' - default: - return (function (e) { - const t = i(e) - - function n (e) { - const t = e.toString(16) - return t.length == 1 ? '0' + t : t - } - return '#' + n(t[0]) + n(t[1]) + n(t[2]) - } - (e)) - } - } - ([c = (function (e) { - let n = o(function (e) { - if (typeof parseInt(e) === 'number') { - const n = parseInt(e) - if (n < 360 && n > 0) { return [n, n] } - } - if (typeof e === 'string') { - if (t[e]) { - const s = t[e] - if (s.hueRange) { return s.hueRange } - } else if (e.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i)) { - const o = (function (e) { - e = (e = e.replace(/^#/, '')).length === 3 ? e.replace(/(.)/g, '$1$1') : e - const t = parseInt(e.substr(0, 2), 16) / 255 - const n = parseInt(e.substr(2, 2), 16) / 255 - const s = parseInt(e.substr(4, 2), 16) / 255 - const o = Math.max(t, n, s) - const r = o - Math.min(t, n, s) - const i = o ? r / o : 0 - switch (o) { - case t: - return [(n - s) / r % 6 * 60 || 0, i, o] - case n: - return [60 * ((s - t) / r + 2) || 0, i, o] - case s: - return [60 * ((t - n) / r + 4) || 0, i, o] - } - } - (e))[0] - return [o, o] - } - } - return [0, 360] - } - (e.hue)) - n < 0 && (n = 360 + n) - return n - } - (r)), l = (function (e, t) { - if (t.hue === 'monochrome') { return 0 } - if (t.luminosity === 'random') { return o([0, 100]) } - const n = (function (e) { - return s(e).saturationRange - } - (e)) - let r = n[0] - let i = n[1] - switch (t.luminosity) { - case 'bright': - r = 55 - break - case 'dark': - r = i - 10 - break - case 'light': - i = 55 - } - return o([r, i]) - } - (c, r)), - (function (e, t, n) { - let r = (function (e, t) { - for (let n = s(e).lowerBounds, o = 0; o < n.length - 1; o++) { - const r = n[o][0] - const i = n[o][1] - const a = n[o + 1][0] - const c = n[o + 1][1] - if (t >= r && t <= a) { - const l = (c - i) / (a - r) - return l * t + (i - l * r) - } - } - return 0 - } - (e, t)) - let i = 100 - switch (n.luminosity) { - case 'dark': - i = r + 20 - break - case 'light': - r = (i + r) / 2 - break - case 'random': - r = 0, - i = 100 - } - return o([r, i]) - } - (c, l, r)) - ], r)) - } - - function s (e) { - for (const n in e >= 334 && e <= 360 && (e -= 360), t) { - const s = t[n] - if (s.hueRange && e >= s.hueRange[0] && e <= s.hueRange[1]) { return t[n] } - } - return 'Color not found' - } - - function o (t) { - if (e === null) { return Math.floor(t[0] + Math.random() * (t[1] + 1 - t[0])) } - const n = t[1] || 1 - const s = t[0] || 0 - const o = (e = (9301 * e + 49297) % 233280) / 233280 - return Math.floor(s + o * (n - s)) - } - - function r (e, n, s) { - const o = s[0][0] - const r = s[s.length - 1][0] - const i = s[s.length - 1][1] - const a = s[0][1] - t[e] = { - hueRange: n, - lowerBounds: s, - saturationRange: [o, r], - brightnessRange: [i, a] - } - } - - function i (e) { - let t = e[0] - t === 0 && (t = 1), - t === 360 && (t = 359), - t /= 360 - const n = e[1] / 100 - const s = e[2] / 100 - const o = Math.floor(6 * t) - const r = 6 * t - o - const i = s * (1 - n) - const a = s * (1 - r * n) - const c = s * (1 - (1 - r) * n) - let l = 256 - let u = 256 - let d = 256 - switch (o) { - case 0: - l = s, - u = c, - d = i - break - case 1: - l = a, - u = s, - d = i - break - case 2: - l = i, - u = s, - d = c - break - case 3: - l = i, - u = a, - d = s - break - case 4: - l = c, - u = i, - d = s - break - case 5: - l = s, - u = i, - d = a - } - return [Math.floor(255 * l), Math.floor(255 * u), Math.floor(255 * d)] - } - - function a (e) { - const t = e[0] - const n = e[1] / 100 - const s = e[2] / 100 - const o = (2 - n) * s - return [t, Math.round(n * s / (o < 1 ? o : 2 - o) * 1e4) / 100, o / 2 * 100] - } - return n() -} - -export { - randomcolor -} diff --git a/nezha-fronted/src/components/common/mixin/table.js b/nezha-fronted/src/components/common/mixin/table.js index 042c68293..e4fa7b5a3 100644 --- a/nezha-fronted/src/components/common/mixin/table.js +++ b/nezha-fronted/src/components/common/mixin/table.js @@ -26,7 +26,6 @@ export default { tableOperation ([command, row, param]) { switch (command) { case 'edit': { - console.info(1, command, row) this.$emit('edit', row) break } diff --git a/nezha-fronted/src/components/layout/header.vue b/nezha-fronted/src/components/layout/header.vue index f6b4c4259..ed600e464 100644 --- a/nezha-fronted/src/components/layout/header.vue +++ b/nezha-fronted/src/components/layout/header.vue @@ -11,7 +11,7 @@ - {{item.name}} + {{item.name}} diff --git a/nezha-fronted/src/components/page/dashboard/explore/explore.vue b/nezha-fronted/src/components/page/dashboard/explore/explore.vue index 670cfdd89..cd10905f9 100644 --- a/nezha-fronted/src/components/page/dashboard/explore/explore.vue +++ b/nezha-fronted/src/components/page/dashboard/explore/explore.vue @@ -86,7 +86,7 @@
-

Query examples

+

Query examples

Simple time series selection diff --git a/nezha-fronted/src/libs/bus.js b/nezha-fronted/src/libs/bus.js index 4e66a1467..ee9d596f7 100644 --- a/nezha-fronted/src/libs/bus.js +++ b/nezha-fronted/src/libs/bus.js @@ -103,7 +103,6 @@ export default new Vue({ 'm+': time.getMinutes(), // 分 's+': time.getSeconds(), // 秒 'q+': Math.floor((time.getMonth() + 3) / 3), // 季度 - a: time.getHours() > 12 ? 'pm' : 'am', S: time.getMilliseconds(), // 毫秒 w: week } @@ -117,7 +116,6 @@ export default new Vue({ : ((`00${o[k]}`).substr((`${o[k]}`).length))) } }) - fm = fm.replace('h', time.getHours() > 12 ? time.getHours() - 12 : time.getHours()) return fm }, // 格式化tag为字符串表达式