Revert "EAL4:weak random number generator 补充修复"
This reverts commit 7048c2bc87
This commit is contained in:
@@ -1077,7 +1077,7 @@
|
|||||||
let dpsArr = [];
|
let dpsArr = [];
|
||||||
let timeStamp = Math.floor(new Date().getTime() / 1000);
|
let timeStamp = Math.floor(new Date().getTime() / 1000);
|
||||||
for (let i = 0; i < 20; i++) {
|
for (let i = 0; i < 20; i++) {
|
||||||
tempArr.push([timeStamp - (20 - i) * 15, Math.floor(window.crypto.getRandomValues() * 10) + ""]);
|
tempArr.push([timeStamp - (20 - i) * 15, Math.floor(Math.random() * 10) + ""]);
|
||||||
queryItem.values.push(tempArr[i])
|
queryItem.values.push(tempArr[i])
|
||||||
dpsArr.push([i + "", tempArr[i]]);
|
dpsArr.push([i + "", tempArr[i]]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,7 +78,7 @@
|
|||||||
},
|
},
|
||||||
guid() {
|
guid() {
|
||||||
function S4() {
|
function S4() {
|
||||||
return (((1 + window.crypto.getRandomValues()) * 0x10000) | 0).toString(16).substring(1);
|
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
|
||||||
}
|
}
|
||||||
return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4());
|
return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4());
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-for="(item, index) in linkData">
|
<template v-for="(item, index) in linkData">
|
||||||
<el-menu-item :index="'0-' + index">
|
<el-menu-item :index="'0-' + index">
|
||||||
<span class="linkTitle"><a :href='item.url' :title="item.name" class="nz-a" rel="noopener noreferrer" target="_blank">{{item.name}}</a></span>
|
<span class="linkTitle"><a :href='item.url' :title="item.name" class="nz-a" rel="noopener norefferrer" target="_blank">{{item.name}}</a></span>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
</template>
|
</template>
|
||||||
</el-submenu>
|
</el-submenu>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ export function resetZIndex(e){
|
|||||||
}
|
}
|
||||||
export function getUUID(){
|
export function getUUID(){
|
||||||
function S4() {
|
function S4() {
|
||||||
return (((1 + window.crypto.getRandomValues()) * 0x10000) | 0).toString(16).substring(1);
|
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4());
|
return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4());
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ function randomcolor() {
|
|||||||
return "hsl(" + n[0] + ", " + n[1] + "%, " + n[2] + "%)";
|
return "hsl(" + n[0] + ", " + n[1] + "%, " + n[2] + "%)";
|
||||||
case "hsla":
|
case "hsla":
|
||||||
var s = a(e),
|
var s = a(e),
|
||||||
o = t.alpha || window.crypto.getRandomValues();
|
o = t.alpha || Math.random();
|
||||||
return "hsla(" + s[0] + ", " + s[1] + "%, " + s[2] + "%, " + o + ")";
|
return "hsla(" + s[0] + ", " + s[1] + "%, " + s[2] + "%, " + o + ")";
|
||||||
case "rgbArray":
|
case "rgbArray":
|
||||||
return i(e);
|
return i(e);
|
||||||
@@ -120,7 +120,7 @@ function randomcolor() {
|
|||||||
return "rgb(" + i(e).join(", ") + ")";
|
return "rgb(" + i(e).join(", ") + ")";
|
||||||
case "rgba":
|
case "rgba":
|
||||||
var r = i(e);
|
var r = i(e);
|
||||||
o = t.alpha || window.crypto.getRandomValues();
|
o = t.alpha || Math.random();
|
||||||
return "rgba(" + r.join(", ") + ", " + o + ")";
|
return "rgba(" + r.join(", ") + ", " + o + ")";
|
||||||
default:
|
default:
|
||||||
return function(e) {
|
return function(e) {
|
||||||
@@ -242,7 +242,7 @@ function randomcolor() {
|
|||||||
|
|
||||||
function o(t) {
|
function o(t) {
|
||||||
if (null === e)
|
if (null === e)
|
||||||
return Math.floor(t[0] + window.crypto.getRandomValues() * (t[1] + 1 - t[0]));
|
return Math.floor(t[0] + Math.random() * (t[1] + 1 - t[0]));
|
||||||
var n = t[1] || 1,
|
var n = t[1] || 1,
|
||||||
s = t[0] || 0,
|
s = t[0] || 0,
|
||||||
o = (e = (9301 * e + 49297) % 233280) / 233280;
|
o = (e = (9301 * e + 49297) % 233280) / 233280;
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<span :class="buttonClass" @click.prevent.stop="" slot="reference" :id="'cabinet-edit-'+window.crypto.getRandomValues().toString(36).slice(-8)">
|
<span :class="buttonClass" @click.prevent.stop="" slot="reference" :id="'cabinet-edit-'+Math.random().toString(36).slice(-8)">
|
||||||
<slot name="optionZone">
|
<slot name="optionZone">
|
||||||
<i class="nz-icon nz-icon-plus" id="cabinet-plus"></i>
|
<i class="nz-icon nz-icon-plus" id="cabinet-plus"></i>
|
||||||
</slot>
|
</slot>
|
||||||
|
|||||||
@@ -420,7 +420,7 @@
|
|||||||
};
|
};
|
||||||
} else{
|
} else{
|
||||||
model.smooth={
|
model.smooth={
|
||||||
roundness:0.5 ,// (window.crypto.getRandomValues()*8 +1)/10 获取0.1-0.9之间的随机数
|
roundness:0.5 ,// (Math.random()*8 +1)/10 获取0.1-0.9之间的随机数
|
||||||
type:this.form.type,
|
type:this.form.type,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -692,7 +692,7 @@
|
|||||||
},
|
},
|
||||||
guid() {
|
guid() {
|
||||||
function S4() {
|
function S4() {
|
||||||
return (((1 + window.crypto.getRandomValues()) * 0x10000) | 0).toString(16).substring(1);
|
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
|
||||||
}
|
}
|
||||||
return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4());
|
return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4());
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -102,7 +102,7 @@
|
|||||||
<div class="introduce-view right-margin" v-show="showIntroduce">
|
<div class="introduce-view right-margin" v-show="showIntroduce">
|
||||||
<div class="info-room">
|
<div class="info-room">
|
||||||
<div class="col-md-9 doc-content">
|
<div class="col-md-9 doc-content">
|
||||||
<h1 class="page-header">Query examples<a class="header-anchor" href="https://prometheus.io/docs/prometheus/latest/querying/examples/" target="_blank" rel="noopener noreferrer"><i style="font-size: 16px;" class="nz-icon nz-icon-link1"></i></a></h1>
|
<h1 class="page-header">Query examples<a class="header-anchor" href="https://prometheus.io/docs/prometheus/latest/querying/examples/" target="_blank" rel="noopener norefferrer"><i style="font-size: 16px;" class="nz-icon nz-icon-link1"></i></a></h1>
|
||||||
<div class="content-divider"></div>
|
<div class="content-divider"></div>
|
||||||
<h2 >
|
<h2 >
|
||||||
Simple time series selection
|
Simple time series selection
|
||||||
|
|||||||
@@ -474,7 +474,7 @@
|
|||||||
},
|
},
|
||||||
guid() {
|
guid() {
|
||||||
function S4() {
|
function S4() {
|
||||||
return (((1 + window.crypto.getRandomValues()) * 0x10000) | 0).toString(16).substring(1);
|
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4());
|
return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4());
|
||||||
|
|||||||
Reference in New Issue
Block a user