Skip to content

Commit 6025db5

Browse files
committed
update ui
1 parent 02cf393 commit 6025db5

File tree

10 files changed

+284
-1658
lines changed

10 files changed

+284
-1658
lines changed

ui/fes.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export default {
3939
unLogin: ['/home','/dashboard', '/'],
4040
noauth: ['/dashboard','/home','/taskQuery', '/taskQuery/verificationDetails', '/taskQuery/ruleDetails', '/addTechniqueRule','/ruleQuery','/ruleQuery/*','/taskDetail',
4141
'/ruleTemplateList','/ruleTemplateList/*','/myProject','/projects/*','/myProject/*','/HelpDocument','/customTechnicalRule',
42-
'/crossTableCheck','/verifyFailData', '/addGroupTechniqueRule', '/metricManagement', '/engineConfiguration', '/dataSourceManagement', '/'],
42+
'/crossTableCheck','/verifyFailData', '/addGroupTechniqueRule', '/metricManagement', '/engineConfiguration', '/'],
4343
admin: ['/dashboard','*']
4444
},
4545
// map

ui/i18n-config.json

Lines changed: 12 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,12 @@
732732
"select": "请选择要模拟登录的用户",
733733
"exitUser": "退出模拟用户",
734734
"selectUser": "请选择用户",
735-
"signOut": "退出登录"
735+
"signOut": "退出登录",
736+
"changePassword": "修改密码",
737+
"oldPassword": "旧密码",
738+
"newPassword": "新密码",
739+
"confirmPassword": "确认新密码",
740+
"checkPassword": "新密码输入不一致"
736741
},
737742
"addGroupTechniqueRule": {
738743
"newCustomRule": "单指标校验",
@@ -756,32 +761,6 @@
756761
"executationVaribleConfigDesc": "可指定查询过滤条件,也可动态替换查询中的占位符",
757762
"fpsFileConfigDesc": "可校验最新文件",
758763
"sparkConfigDesc": "可指定Spark Configuration参数"
759-
},
760-
"dataSourceManagement": {
761-
"title": "数据源管理",
762-
"previous": "上一步",
763-
"close": "关闭",
764-
"finish": "完成",
765-
"dataSourceId": "数据源ID",
766-
"dataSourceName": "数据源名称",
767-
"dataSourceDesc": "数据源描述",
768-
"dataSourceType": "数据源类型",
769-
"addDataSource": "新增数据源",
770-
"editDataSource": "编辑数据源",
771-
"reviewDataSource": "查看数据源",
772-
"exportDataSourceBatch": "批量导出数据源",
773-
"importDataSourceBatch": "批量导入数据源",
774-
"expire": "过期",
775-
"canUse": "可用",
776-
"published": "已发布",
777-
"unPublish": "未发布",
778-
"canNotPublish": "不可发布",
779-
"testConnection": "测试连接",
780-
"versionsModalTitle": "新建版本列表",
781-
"enterDataSourceName": "请输入数据源名称",
782-
"enterDataSourceDesc": "请输入数据源描述",
783-
"enterLabels": "请输入标签",
784-
"rollbackComment": "从版本 {version} 回滚"
785764
}
786765
},
787766
"en": {
@@ -1518,7 +1497,12 @@
15181497
"select": "Please select the user to simulate",
15191498
"exitUser": "Exit Simulated User",
15201499
"selectUser": "Please select user",
1521-
"signOut": "Sign out"
1500+
"signOut": "Sign out",
1501+
"changePassword": "Change Password",
1502+
"oldPassword": "old Password",
1503+
"newPassword": "new Password",
1504+
"confirmPassword": "Confirm new password",
1505+
"checkPassword": "The new password input is inconsistent"
15221506
},
15231507
"addGroupTechniqueRule": {
15241508
"newCustomRule": "Single index verification",
@@ -1542,32 +1526,6 @@
15421526
"executationVaribleConfigDesc": "You can specify query filter conditions, and you can also dynamically replace placeholders in the query",
15431527
"fpsFileConfigDesc": "The latest file can be verified",
15441528
"sparkConfigDesc": "Can specify Spark Configuration parameters"
1545-
},
1546-
"dataSourceManagement": {
1547-
"title": "Data Source Management",
1548-
"previous": "Previous",
1549-
"close": "Close",
1550-
"finish": "Finish",
1551-
"dataSourceId": "ID",
1552-
"dataSourceName": "Data Source Name",
1553-
"dataSourceDesc": "Data Source Desc",
1554-
"dataSourceType": "Data Source Type",
1555-
"addDataSource": "Add Data Source",
1556-
"editDataSource": "Edit Data Source",
1557-
"reviewDataSource": "Review Data Source",
1558-
"exportDataSourceBatch": "Export Data Source Batch",
1559-
"importDataSourceBatch": "Import Data Source Batch",
1560-
"expire": "Expire",
1561-
"canUse": "Can use",
1562-
"published": "Published",
1563-
"unPublish": "Un Publish",
1564-
"canNotPublish": "Can not publish",
1565-
"testConnection": "Connection",
1566-
"versionsModalTitle": "Version List",
1567-
"enterDataSourceName": "please enter name of dataSource",
1568-
"enterDataSourceDesc": "please enter desc of dataSource",
1569-
"enterLabels": "please enter label",
1570-
"rollbackComment": "Rollback from {version}"
15711529
}
15721530
}
15731531
}

ui/src/assets/js/utils.js

Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,217 @@ const setCursorPositionInformation = (elementId, position) => {
363363

364364
const isNullOrUndefined = (value) => value === null || value === undefined;
365365

366+
function sha256(s) {
367+
var chrsz = 8;
368+
var hexcase = 0;
369+
function safe_add(x, y) {
370+
var lsw = (x & 0xffff) + (y & 0xffff);
371+
var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
372+
return (msw << 16) | (lsw & 0xffff);
373+
}
374+
function S(X, n) {
375+
return (X >>> n) | (X << (32 - n));
376+
}
377+
function R(X, n) {
378+
return X >>> n;
379+
}
380+
function Ch(x, y, z) {
381+
return (x & y) ^ (~x & z);
382+
}
383+
function Maj(x, y, z) {
384+
return (x & y) ^ (x & z) ^ (y & z);
385+
}
386+
function Sigma0256(x) {
387+
return S(x, 2) ^ S(x, 13) ^ S(x, 22);
388+
}
389+
function Sigma1256(x) {
390+
return S(x, 6) ^ S(x, 11) ^ S(x, 25);
391+
}
392+
function Gamma0256(x) {
393+
return S(x, 7) ^ S(x, 18) ^ R(x, 3);
394+
}
395+
function Gamma1256(x) {
396+
return S(x, 17) ^ S(x, 19) ^ R(x, 10);
397+
}
398+
function core_sha256(m, l) {
399+
var K = new Array(
400+
0x428a2f98,
401+
0x71374491,
402+
0xb5c0fbcf,
403+
0xe9b5dba5,
404+
0x3956c25b,
405+
0x59f111f1,
406+
0x923f82a4,
407+
0xab1c5ed5,
408+
0xd807aa98,
409+
0x12835b01,
410+
0x243185be,
411+
0x550c7dc3,
412+
0x72be5d74,
413+
0x80deb1fe,
414+
0x9bdc06a7,
415+
0xc19bf174,
416+
0xe49b69c1,
417+
0xefbe4786,
418+
0xfc19dc6,
419+
0x240ca1cc,
420+
0x2de92c6f,
421+
0x4a7484aa,
422+
0x5cb0a9dc,
423+
0x76f988da,
424+
0x983e5152,
425+
0xa831c66d,
426+
0xb00327c8,
427+
0xbf597fc7,
428+
0xc6e00bf3,
429+
0xd5a79147,
430+
0x6ca6351,
431+
0x14292967,
432+
0x27b70a85,
433+
0x2e1b2138,
434+
0x4d2c6dfc,
435+
0x53380d13,
436+
0x650a7354,
437+
0x766a0abb,
438+
0x81c2c92e,
439+
0x92722c85,
440+
0xa2bfe8a1,
441+
0xa81a664b,
442+
0xc24b8b70,
443+
0xc76c51a3,
444+
0xd192e819,
445+
0xd6990624,
446+
0xf40e3585,
447+
0x106aa070,
448+
0x19a4c116,
449+
0x1e376c08,
450+
0x2748774c,
451+
0x34b0bcb5,
452+
0x391c0cb3,
453+
0x4ed8aa4a,
454+
0x5b9cca4f,
455+
0x682e6ff3,
456+
0x748f82ee,
457+
0x78a5636f,
458+
0x84c87814,
459+
0x8cc70208,
460+
0x90befffa,
461+
0xa4506ceb,
462+
0xbef9a3f7,
463+
0xc67178f2
464+
);
465+
var HASH = new Array(
466+
0x6a09e667,
467+
0xbb67ae85,
468+
0x3c6ef372,
469+
0xa54ff53a,
470+
0x510e527f,
471+
0x9b05688c,
472+
0x1f83d9ab,
473+
0x5be0cd19
474+
);
475+
var W = new Array(64);
476+
var a, b, c, d, e, f, g, h, i, j;
477+
var T1, T2;
478+
m[l >> 5] |= 0x80 << (24 - (l % 32));
479+
m[(((l + 64) >> 9) << 4) + 15] = l;
480+
for (i = 0; i < m.length; i += 16) {
481+
a = HASH[0];
482+
b = HASH[1];
483+
c = HASH[2];
484+
d = HASH[3];
485+
e = HASH[4];
486+
f = HASH[5];
487+
g = HASH[6];
488+
h = HASH[7];
489+
for (j = 0; j < 64; j++) {
490+
if (j < 16) W[j] = m[j + i];
491+
else
492+
W[j] = safe_add(
493+
safe_add(
494+
safe_add(Gamma1256(W[j - 2]), W[j - 7]),
495+
Gamma0256(W[j - 15])
496+
),
497+
W[j - 16]
498+
);
499+
T1 = safe_add(
500+
safe_add(
501+
safe_add(
502+
safe_add(h, Sigma1256(e)),
503+
Ch(e, f, g)
504+
),
505+
K[j]
506+
),
507+
W[j]
508+
);
509+
T2 = safe_add(Sigma0256(a), Maj(a, b, c));
510+
h = g;
511+
g = f;
512+
f = e;
513+
e = safe_add(d, T1);
514+
d = c;
515+
c = b;
516+
b = a;
517+
a = safe_add(T1, T2);
518+
}
519+
HASH[0] = safe_add(a, HASH[0]);
520+
HASH[1] = safe_add(b, HASH[1]);
521+
HASH[2] = safe_add(c, HASH[2]);
522+
HASH[3] = safe_add(d, HASH[3]);
523+
HASH[4] = safe_add(e, HASH[4]);
524+
HASH[5] = safe_add(f, HASH[5]);
525+
HASH[6] = safe_add(g, HASH[6]);
526+
HASH[7] = safe_add(h, HASH[7]);
527+
}
528+
return HASH;
529+
}
530+
function str2binb(str) {
531+
var bin = Array();
532+
var mask = (1 << chrsz) - 1;
533+
for (var i = 0; i < str.length * chrsz; i += chrsz) {
534+
bin[i >> 5] |=
535+
(str.charCodeAt(i / chrsz) & mask) << (24 - (i % 32));
536+
}
537+
return bin;
538+
}
539+
function Utf8Encode(string) {
540+
string = string.replace(/\r\n/g, "\n");
541+
var utftext = "";
542+
for (var n = 0; n < string.length; n++) {
543+
var c = string.charCodeAt(n);
544+
if (c < 128) {
545+
utftext += String.fromCharCode(c);
546+
} else if (c > 127 && c < 2048) {
547+
utftext += String.fromCharCode((c >> 6) | 192);
548+
utftext += String.fromCharCode((c & 63) | 128);
549+
} else {
550+
utftext += String.fromCharCode((c >> 12) | 224);
551+
utftext += String.fromCharCode(((c >> 6) & 63) | 128);
552+
utftext += String.fromCharCode((c & 63) | 128);
553+
}
554+
}
555+
return utftext;
556+
}
557+
function binb2hex(binarray) {
558+
var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
559+
var str = "";
560+
for (var i = 0; i < binarray.length * 4; i++) {
561+
str +=
562+
hex_tab.charAt(
563+
(binarray[i >> 2] >> ((3 - (i % 4)) * 8 + 4)) & 0xf
564+
) +
565+
hex_tab.charAt(
566+
(binarray[i >> 2] >> ((3 - (i % 4)) * 8)) & 0xf
567+
);
568+
}
569+
return str;
570+
}
571+
s = Utf8Encode(s);
572+
return binb2hex(core_sha256(str2binb(s), s.length * chrsz));
573+
}
574+
366575
export {
576+
sha256,
367577
dateFormat,
368578
getStaff,
369579
forceDownload,

0 commit comments

Comments
 (0)