Compare commits
1178 Commits
v3.7
...
pr@dev@fix
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3db0ed756e | ||
|
|
453c4b1e4e | ||
|
|
bf4d8ce7a6 | ||
|
|
34effdbe15 | ||
|
|
274db466f2 | ||
|
|
cbe697f9dc | ||
|
|
fb7acb100e | ||
|
|
ebb36847df | ||
|
|
beba4f1994 | ||
|
|
452796e3f5 | ||
|
|
02a7969d90 | ||
|
|
798dbec151 | ||
|
|
0e11a56e37 | ||
|
|
be5344344c | ||
|
|
e75d711e0a | ||
|
|
46ee116f3e | ||
|
|
f4b304338f | ||
|
|
e93e78307c | ||
|
|
d22079446f | ||
|
|
d57b99b00c | ||
|
|
e7321356af | ||
|
|
a0edc2c527 | ||
|
|
10ebcfd64d | ||
|
|
a3fedb9697 | ||
|
|
1eb8a18c66 | ||
|
|
f491c57c34 | ||
|
|
50b7f54652 | ||
|
|
5bf298a5bf | ||
|
|
124ff9a8c2 | ||
|
|
387ab4f1b3 | ||
|
|
d6fbdfa7ea | ||
|
|
cd4260fd8d | ||
|
|
baeece62d3 | ||
|
|
576c8f5891 | ||
|
|
5e97600807 | ||
|
|
4e2eb3a37d | ||
|
|
e92173f8e8 | ||
|
|
412d9c804e | ||
|
|
b84a725d4a | ||
|
|
58b39743e0 | ||
|
|
7651443c25 | ||
|
|
8d64e331d1 | ||
|
|
f873254248 | ||
|
|
c569d0c21c | ||
|
|
95d1e23cf8 | ||
|
|
a976948388 | ||
|
|
38aadbd8e4 | ||
|
|
257ddd9517 | ||
|
|
2630eddb41 | ||
|
|
5d84b7c874 | ||
|
|
017884e7cc | ||
|
|
682528367d | ||
|
|
d1b343dfd4 | ||
|
|
1e120f6b77 | ||
|
|
e59c129e50 | ||
|
|
4ad17c33a5 | ||
|
|
31179d665e | ||
|
|
8476cd3dd9 | ||
|
|
d442f9bc7d | ||
|
|
f7c48072c4 | ||
|
|
2690f1904b | ||
|
|
6d72a5af4a | ||
|
|
c4ddfb7d64 | ||
|
|
d388cb3059 | ||
|
|
07223c0e31 | ||
|
|
6a492a83bf | ||
|
|
1f6346dbe1 | ||
|
|
4ab788364e | ||
|
|
9849c0e47b | ||
|
|
3d86e75bc8 | ||
|
|
265466c549 | ||
|
|
7e3808c4b9 | ||
|
|
7c141b5183 | ||
|
|
cccec1aa1b | ||
|
|
7c3effe1d9 | ||
|
|
4717b21abb | ||
|
|
44bd9cb8c7 | ||
|
|
117bccc520 | ||
|
|
fb86ac4060 | ||
|
|
dae1fef629 | ||
|
|
455496adcf | ||
|
|
3b50431e57 | ||
|
|
27765ca866 | ||
|
|
9dad31c75a | ||
|
|
04067f5729 | ||
|
|
edcff7d640 | ||
|
|
1b5f20f9e4 | ||
|
|
add8bd0f01 | ||
|
|
83c5cf4231 | ||
|
|
fc4ffe53a5 | ||
|
|
92e66981a8 | ||
|
|
98153ff98c | ||
|
|
89246186d0 | ||
|
|
31faca5d3f | ||
|
|
ed371dba4f | ||
|
|
0ac4337f98 | ||
|
|
526a2eb1d8 | ||
|
|
9ce7ebd600 | ||
|
|
3e00c06766 | ||
|
|
2c9e1f6d3a | ||
|
|
0a57f3afc7 | ||
|
|
ee31b501af | ||
|
|
4e79074cef | ||
|
|
ada6479177 | ||
|
|
32585e4abc | ||
|
|
861bce244e | ||
|
|
5412647971 | ||
|
|
887496fe51 | ||
|
|
1f3d29560d | ||
|
|
d3c018dc4a | ||
|
|
8a7f358b06 | ||
|
|
42ea79858f | ||
|
|
e60dd28212 | ||
|
|
4eefb448ed | ||
|
|
918b6dbe8e | ||
|
|
34154178e2 | ||
|
|
060fc4719c | ||
|
|
ea44fe7c13 | ||
|
|
6264caf8a8 | ||
|
|
2b3537ac7e | ||
|
|
86efbbcd82 | ||
|
|
40b8b3f739 | ||
|
|
40a18d7efb | ||
|
|
517917947a | ||
|
|
b6b97cb3a5 | ||
|
|
46a8e53c51 | ||
|
|
0a6a628be5 | ||
|
|
1238a62a3c | ||
|
|
aaff23d261 | ||
|
|
9df71344ed | ||
|
|
7acf008adc | ||
|
|
7f2bab1a30 | ||
|
|
6eaa8b9a85 | ||
|
|
ea9f067f35 | ||
|
|
564b04850a | ||
|
|
3f42ad7d18 | ||
|
|
1b7ffaeda3 | ||
|
|
8fad0019f8 | ||
|
|
f06d28dab1 | ||
|
|
5b3d20972a | ||
|
|
20f97f96b8 | ||
|
|
a952c0b216 | ||
|
|
1edb374a90 | ||
|
|
39b43d6eff | ||
|
|
0b3eb69749 | ||
|
|
440a3fa7fe | ||
|
|
16e9bf37ea | ||
|
|
448e4fac32 | ||
|
|
e819bc5aee | ||
|
|
662e29c4c7 | ||
|
|
195f0cd69a | ||
|
|
d4fff004c9 | ||
|
|
de89e7e80a | ||
|
|
cd94116465 | ||
|
|
78706a0fb6 | ||
|
|
bee96b9e09 | ||
|
|
47b5e4ba90 | ||
|
|
6583c27600 | ||
|
|
ebba329a0d | ||
|
|
0aadfe5d24 | ||
|
|
5e7e4151a3 | ||
|
|
4d418221d6 | ||
|
|
2d81cc857b | ||
|
|
b0ab3bf434 | ||
|
|
8eb381b81c | ||
|
|
2e7611ad92 | ||
|
|
7955afcf35 | ||
|
|
8e8ee7c495 | ||
|
|
f3f1da452e | ||
|
|
3efe6efa0b | ||
|
|
37453aaa11 | ||
|
|
47c26e93df | ||
|
|
e3f5f948c3 | ||
|
|
17d0dab859 | ||
|
|
02f5f4261e | ||
|
|
5ccaa3b77d | ||
|
|
fc4f10a7ea | ||
|
|
6d127bdee7 | ||
|
|
00c5968380 | ||
|
|
0f8e02c738 | ||
|
|
77c1af3dcf | ||
|
|
ad52d17bda | ||
|
|
d45e18fac6 | ||
|
|
5432306b1a | ||
|
|
b1000227c0 | ||
|
|
9d86a63b52 | ||
|
|
32d6fc95be | ||
|
|
d7ff7c8038 | ||
|
|
b042bf4b55 | ||
|
|
b315f65bcd | ||
|
|
ead06c5eae | ||
|
|
b8b488274f | ||
|
|
e54ac05df2 | ||
|
|
6146ffc9c3 | ||
|
|
0fcd8c134d | ||
|
|
ccac4745ea | ||
|
|
70dba5a317 | ||
|
|
f6adb3b1c3 | ||
|
|
27d3637330 | ||
|
|
0b4b551d56 | ||
|
|
9c8ceb04f0 | ||
|
|
cd1e371acb | ||
|
|
8e0117a100 | ||
|
|
1b0bb1a711 | ||
|
|
392d150396 | ||
|
|
c3114609f5 | ||
|
|
1e82ca3f66 | ||
|
|
e4c7b1d8cf | ||
|
|
942b74be8e | ||
|
|
7841669db7 | ||
|
|
a0382dc984 | ||
|
|
fdb52fb4f4 | ||
|
|
38aa42ff9b | ||
|
|
802bf6f1e3 | ||
|
|
ae9312983a | ||
|
|
c156250c90 | ||
|
|
5dcdbb702f | ||
|
|
ccd7b319c8 | ||
|
|
4750f8388a | ||
|
|
3fb47fb6ea | ||
|
|
55637c7fa1 | ||
|
|
4e95c88318 | ||
|
|
eba323fb64 | ||
|
|
53b00421d2 | ||
|
|
cc77c1ebaf | ||
|
|
5ea3ae3a0c | ||
|
|
76b6aebac4 | ||
|
|
1e1f2f3bd9 | ||
|
|
085b11e262 | ||
|
|
4eb556e1bb | ||
|
|
e4a0ef311b | ||
|
|
9073e9fa68 | ||
|
|
29ceb66837 | ||
|
|
5184252e5f | ||
|
|
cad65469a4 | ||
|
|
03051c6a8f | ||
|
|
a25392f934 | ||
|
|
ba4fc027e6 | ||
|
|
3b21e8f858 | ||
|
|
31a2a97bee | ||
|
|
bf1ae6570c | ||
|
|
1ff49ca16d | ||
|
|
29ddc06c4b | ||
|
|
8a6d56e09f | ||
|
|
b739d3f435 | ||
|
|
82d2c06eff | ||
|
|
adf8617abf | ||
|
|
286275142a | ||
|
|
1b0d46bdfb | ||
|
|
d9864afa8c | ||
|
|
c0beb480d4 | ||
|
|
20b7b87cff | ||
|
|
e374906dee | ||
|
|
3459529d08 | ||
|
|
4d67c7e2ff | ||
|
|
6cbec0c39e | ||
|
|
8c074a9f9a | ||
|
|
e37ca4c34f | ||
|
|
a8c85826de | ||
|
|
91ed7636ff | ||
|
|
8db03bf315 | ||
|
|
793ced1758 | ||
|
|
9ef07fb494 | ||
|
|
349c5116ea | ||
|
|
93949d9fd7 | ||
|
|
eedcad947e | ||
|
|
5e17b74684 | ||
|
|
99f027e0ee | ||
|
|
91c44d0500 | ||
|
|
04de130e02 | ||
|
|
30444565a8 | ||
|
|
c9b72491b6 | ||
|
|
86b687d27b | ||
|
|
03b0219a1e | ||
|
|
8ddc2cda92 | ||
|
|
c3d9da1186 | ||
|
|
b1b28f93c5 | ||
|
|
a465a093c9 | ||
|
|
3d362db71a | ||
|
|
0b3a9844f7 | ||
|
|
3ea506adca | ||
|
|
bb37dde0e0 | ||
|
|
c1e21905df | ||
|
|
9445ac1efe | ||
|
|
0f6e12f80b | ||
|
|
94181dbb46 | ||
|
|
988eec7224 | ||
|
|
4a604f4f6a | ||
|
|
cc244c6af6 | ||
|
|
b97ef23bf8 | ||
|
|
0952e9e9ae | ||
|
|
7391c9e675 | ||
|
|
757184c459 | ||
|
|
85a4247d9b | ||
|
|
9b36f51015 | ||
|
|
60d8f00723 | ||
|
|
d9d0f922bb | ||
|
|
040d049742 | ||
|
|
53044e0551 | ||
|
|
59f0a16544 | ||
|
|
60f44c6759 | ||
|
|
2cb1ae1ab7 | ||
|
|
bf8e6118c2 | ||
|
|
a561a62ef5 | ||
|
|
982f9e5635 | ||
|
|
ca57e8106b | ||
|
|
d0ae764ab6 | ||
|
|
104e711aec | ||
|
|
1dde0cba15 | ||
|
|
3981570360 | ||
|
|
bba9951b9b | ||
|
|
95b58f3c96 | ||
|
|
f3e55a58ce | ||
|
|
f706d38e2d | ||
|
|
e88f84e438 | ||
|
|
9ca80bda50 | ||
|
|
19c71d4ddd | ||
|
|
601acb63bb | ||
|
|
4f3a1cac43 | ||
|
|
c1085cce70 | ||
|
|
128b9c79ba | ||
|
|
8331e8b58c | ||
|
|
8e81a9fca4 | ||
|
|
df11f56a40 | ||
|
|
71b21f78e1 | ||
|
|
174117161e | ||
|
|
affdcc3225 | ||
|
|
165d5dfef3 | ||
|
|
94ae70a2c2 | ||
|
|
acef2eff3a | ||
|
|
7d7208a1bf | ||
|
|
56f66a169c | ||
|
|
4caf3b2f86 | ||
|
|
e58911d9cf | ||
|
|
c03c9dac30 | ||
|
|
19858a4467 | ||
|
|
1b5b4188b5 | ||
|
|
689b25b743 | ||
|
|
5ee2ed14af | ||
|
|
4eda83f83d | ||
|
|
eecfebe66f | ||
|
|
e1d48a62e2 | ||
|
|
00bd0e52ef | ||
|
|
4cd0071054 | ||
|
|
aa3c9762c9 | ||
|
|
6fac279db7 | ||
|
|
0f013cd7a0 | ||
|
|
dac84749fd | ||
|
|
b2f650cab0 | ||
|
|
a3a58040a0 | ||
|
|
659a3864f7 | ||
|
|
a1a5dfdbfd | ||
|
|
a89c32e668 | ||
|
|
903a1ecda4 | ||
|
|
3802520958 | ||
|
|
54acd85586 | ||
|
|
3c41aa44eb | ||
|
|
b830674abc | ||
|
|
1949d76654 | ||
|
|
67a2a9be6a | ||
|
|
82689b48ba | ||
|
|
455f732250 | ||
|
|
5494bec24a | ||
|
|
1eedf42be0 | ||
|
|
5d0c8535f2 | ||
|
|
a0c9a72c1d | ||
|
|
f927a2a3cc | ||
|
|
7fbbb75fed | ||
|
|
897198b785 | ||
|
|
04e7d66667 | ||
|
|
b6c81dacf7 | ||
|
|
f4c9637949 | ||
|
|
141d4208e1 | ||
|
|
46d1969254 | ||
|
|
0cf0e04705 | ||
|
|
e6a3b1e9e1 | ||
|
|
35fa8ed374 | ||
|
|
38856deaa7 | ||
|
|
f573a3a7ab | ||
|
|
500d3e15c3 | ||
|
|
bbee6cafdf | ||
|
|
5053b0a89a | ||
|
|
ca40cb34da | ||
|
|
024e4a1d96 | ||
|
|
f791a2cfcf | ||
|
|
962bad10aa | ||
|
|
288c6af300 | ||
|
|
7eb5be9081 | ||
|
|
fcd049721d | ||
|
|
efaec831e8 | ||
|
|
d2f9256fb0 | ||
|
|
4811b4af5b | ||
|
|
bf2e9d4471 | ||
|
|
15978c968e | ||
|
|
b46fc915f3 | ||
|
|
a12e17b39c | ||
|
|
1cc8b626a6 | ||
|
|
f13f5e455b | ||
|
|
7de34ac9a2 | ||
|
|
fb38ba1c9d | ||
|
|
5d6a58421f | ||
|
|
3cc89b8469 | ||
|
|
c9826a7520 | ||
|
|
2b7a874c1e | ||
|
|
a8a79df6b4 | ||
|
|
f07e14e62f | ||
|
|
ee1b38a88d | ||
|
|
32af035674 | ||
|
|
6cbc7d0220 | ||
|
|
bfa3836cc2 | ||
|
|
c8f6d0b595 | ||
|
|
f6ddd44ccb | ||
|
|
e813ce3fef | ||
|
|
8234ea338b | ||
|
|
7ba78302b0 | ||
|
|
4143c2c32d | ||
|
|
68fa8f30c0 | ||
|
|
e0f9b819d2 | ||
|
|
9b9b096749 | ||
|
|
c03c8b2299 | ||
|
|
2e78e5e5c6 | ||
|
|
d2fc125642 | ||
|
|
51fb493462 | ||
|
|
838f6e06b5 | ||
|
|
ebe131d4a4 | ||
|
|
ccd739d570 | ||
|
|
503a2ed934 | ||
|
|
d1f59f2bde | ||
|
|
48daa0f04a | ||
|
|
28a2248491 | ||
|
|
c4433592f4 | ||
|
|
576c51fcac | ||
|
|
aaf8b3ea51 | ||
|
|
d8ba39ebf2 | ||
|
|
e9e63cd11b | ||
|
|
5fc23c15f0 | ||
|
|
8015ceeed5 | ||
|
|
5068a126be | ||
|
|
5996d89e4c | ||
|
|
23f6502d99 | ||
|
|
c4a13e06e5 | ||
|
|
080565bea6 | ||
|
|
f7ab833cb8 | ||
|
|
b8025ae5bb | ||
|
|
9247c6c4f3 | ||
|
|
061981688d | ||
|
|
d2e07bcf69 | ||
|
|
d44d209c21 | ||
|
|
3672716ee6 | ||
|
|
1ef850a09f | ||
|
|
ce4b3f2a35 | ||
|
|
8f229001aa | ||
|
|
035597d330 | ||
|
|
4f0ec2e6e3 | ||
|
|
ebe4cce3ac | ||
|
|
4a0af806f5 | ||
|
|
51b26395ad | ||
|
|
73f75e6515 | ||
|
|
771c3f5516 | ||
|
|
fd9d08eb0c | ||
|
|
44bfaad9cb | ||
|
|
8931331466 | ||
|
|
a450c8d3dc | ||
|
|
1151d501f5 | ||
|
|
d725e5497d | ||
|
|
b6b042407d | ||
|
|
4f215cbc49 | ||
|
|
dd7329930c | ||
|
|
acfc1fc942 | ||
|
|
aed40c518e | ||
|
|
2d7fae677b | ||
|
|
50077dd0ac | ||
|
|
5dafd7217e | ||
|
|
2ffcf7bd26 | ||
|
|
334fb0c6e9 | ||
|
|
51ffebb04f | ||
|
|
9754395e62 | ||
|
|
bb5766c85d | ||
|
|
fc27497535 | ||
|
|
31221c1d6e | ||
|
|
1cf2ef60e8 | ||
|
|
13cad16712 | ||
|
|
7c2f13f883 | ||
|
|
cbaef4cc6c | ||
|
|
37182779f9 | ||
|
|
cc97affc16 | ||
|
|
af5d3778c3 | ||
|
|
ef25720797 | ||
|
|
20a08e650d | ||
|
|
fe8c610f3d | ||
|
|
a33f907ba5 | ||
|
|
e78569b325 | ||
|
|
f6cb3fb118 | ||
|
|
7798ae79d7 | ||
|
|
c8d1bb0276 | ||
|
|
ce2a62d198 | ||
|
|
fd0e1a7b5e | ||
|
|
c93fed32ef | ||
|
|
4023537b8a | ||
|
|
e2712005e4 | ||
|
|
aea72bcc6e | ||
|
|
40ef074522 | ||
|
|
6aa021e4a6 | ||
|
|
ac97dbf8ba | ||
|
|
87d7a291f0 | ||
|
|
e8f3950072 | ||
|
|
56f6c17275 | ||
|
|
2fd2fc5f62 | ||
|
|
145e6db3ec | ||
|
|
63d1983914 | ||
|
|
333c68e33f | ||
|
|
739ce9da27 | ||
|
|
aadc032b31 | ||
|
|
2b90faa98e | ||
|
|
e68e4b2a24 | ||
|
|
e1bde89b29 | ||
|
|
2c541d465c | ||
|
|
329a02bf07 | ||
|
|
e9da168c9f | ||
|
|
c19ef24ec9 | ||
|
|
2c7d662c22 | ||
|
|
fb7c4a8b2a | ||
|
|
920eeded4d | ||
|
|
740b51d405 | ||
|
|
cee00b0382 | ||
|
|
4bbd59787a | ||
|
|
acdc7c6e49 | ||
|
|
a5f190685b | ||
|
|
fd53727f12 | ||
|
|
cea843bcbc | ||
|
|
dda5e79a77 | ||
|
|
f9dd7bd74b | ||
|
|
2ef68977bd | ||
|
|
673d2e3ef2 | ||
|
|
17b172e3f1 | ||
|
|
acde080e48 | ||
|
|
b139d8d049 | ||
|
|
1c39041de2 | ||
|
|
cd6d9e1687 | ||
|
|
57746a9daf | ||
|
|
2e961e7875 | ||
|
|
5fc368c86b | ||
|
|
37abeb5735 | ||
|
|
e34d34526f | ||
|
|
3eb249dcfd | ||
|
|
3f96888e1a | ||
|
|
59df06676d | ||
|
|
26a0f39ee8 | ||
|
|
b63df1eee3 | ||
|
|
fdd906c982 | ||
|
|
0f9d5b94ff | ||
|
|
428ba49f9c | ||
|
|
98b222a9bf | ||
|
|
7602d6e270 | ||
|
|
6c0c1aa9d4 | ||
|
|
6f41ed1c27 | ||
|
|
8b773e9899 | ||
|
|
b51acbd268 | ||
|
|
6e66a17fe3 | ||
|
|
88855305e1 | ||
|
|
53f61ad31b | ||
|
|
650b1c0102 | ||
|
|
77be9ddf8d | ||
|
|
ad7527c4ae | ||
|
|
68563a198d | ||
|
|
8a6459e828 | ||
|
|
846f3c6c5b | ||
|
|
f843dde3d6 | ||
|
|
ef7db30658 | ||
|
|
b6f430c0db | ||
|
|
8b07b6ca5d | ||
|
|
f1171d06a8 | ||
|
|
e01201be81 | ||
|
|
1e21a5fb05 | ||
|
|
df0e7ee6ae | ||
|
|
d30066bcf9 | ||
|
|
0ca7d3a2ad | ||
|
|
7b62ce2d33 | ||
|
|
6ed40c45b0 | ||
|
|
2b9af5070b | ||
|
|
94065bb38c | ||
|
|
63c02eb14a | ||
|
|
a3c387d445 | ||
|
|
9abca0ea0d | ||
|
|
b1c43d0b04 | ||
|
|
a1fcdb39b9 | ||
|
|
077ea93bc3 | ||
|
|
82b14b6542 | ||
|
|
6ef985207c | ||
|
|
13d0c99e8c | ||
|
|
0c7051eac0 | ||
|
|
b14c636f94 | ||
|
|
049cd35a1c | ||
|
|
e7986b57b2 | ||
|
|
3dbac1fe2e | ||
|
|
31238e0398 | ||
|
|
42425dc61b | ||
|
|
676ac2bbf6 | ||
|
|
5261dce34f | ||
|
|
1ef34efed6 | ||
|
|
593c97c165 | ||
|
|
6540c0a165 | ||
|
|
d5415b84c9 | ||
|
|
411051f921 | ||
|
|
907e3ba729 | ||
|
|
afa1a9fd9f | ||
|
|
07afdbe0f8 | ||
|
|
dcd59ca69f | ||
|
|
98ae943db0 | ||
|
|
5e91917ba4 | ||
|
|
c4361b4c17 | ||
|
|
70b5ec3683 | ||
|
|
c93a061852 | ||
|
|
8e06dde724 | ||
|
|
4351d20a1e | ||
|
|
ce23d53e3c | ||
|
|
32fc16126f | ||
|
|
71ca5a87f1 | ||
|
|
c9b1d2fb5b | ||
|
|
b9a99148e3 | ||
|
|
2a4b99484b | ||
|
|
bd26894135 | ||
|
|
981fe00c5f | ||
|
|
01e55d7f6e | ||
|
|
d0a7201683 | ||
|
|
e2dcc98ab3 | ||
|
|
8dd4f89395 | ||
|
|
373661d35a | ||
|
|
33a997f3bb | ||
|
|
1be5f23204 | ||
|
|
1adee78456 | ||
|
|
baf2b6cd9b | ||
|
|
723123fa50 | ||
|
|
7bf1c2056c | ||
|
|
28e756e163 | ||
|
|
251873a7e9 | ||
|
|
ff9bd42322 | ||
|
|
2c245020cd | ||
|
|
429d2fec40 | ||
|
|
c2f8fe45a1 | ||
|
|
caa5e7df75 | ||
|
|
8a439dec8d | ||
|
|
eabf5a117d | ||
|
|
74c0a562e9 | ||
|
|
c30672a014 | ||
|
|
65856db131 | ||
|
|
5d67012121 | ||
|
|
5c5df32181 | ||
|
|
ce831df717 | ||
|
|
04688930ad | ||
|
|
ae5787ae52 | ||
|
|
1dfdfe3932 | ||
|
|
573cf454ce | ||
|
|
f409abbf79 | ||
|
|
0d81b7839b | ||
|
|
a6232da3d0 | ||
|
|
2690538db6 | ||
|
|
6d0af7a149 | ||
|
|
5b00ab795d | ||
|
|
babc048eb0 | ||
|
|
86709e3604 | ||
|
|
d49be903e8 | ||
|
|
332058b0ea | ||
|
|
e355abc1af | ||
|
|
99200d58bb | ||
|
|
61bb97efa9 | ||
|
|
c5e030e2fe | ||
|
|
38a9468fd2 | ||
|
|
8a60ad774f | ||
|
|
b08e6de527 | ||
|
|
a96851686f | ||
|
|
1b0adbfe71 | ||
|
|
c28419438b | ||
|
|
cf3ba419f4 | ||
|
|
8807f24bcd | ||
|
|
b8a914eb02 | ||
|
|
8bbc66a281 | ||
|
|
c94fad4145 | ||
|
|
f371a968b7 | ||
|
|
e163318c5a | ||
|
|
bb6be97bee | ||
|
|
cb454d83a1 | ||
|
|
6b5d13e8b8 | ||
|
|
5f9b124a7b | ||
|
|
19bab778ca | ||
|
|
134bcda895 | ||
|
|
8b725fa4f6 | ||
|
|
205f8bc280 | ||
|
|
4963446b74 | ||
|
|
98be3903db | ||
|
|
2cb7a859a8 | ||
|
|
f7a48c04b8 | ||
|
|
9315dab053 | ||
|
|
274d14d905 | ||
|
|
9625dbf3ed | ||
|
|
eef16080d4 | ||
|
|
66cf423598 | ||
|
|
d51571c530 | ||
|
|
53187cb8aa | ||
|
|
bf0d19ac0b | ||
|
|
28062f5d60 | ||
|
|
720dee578a | ||
|
|
a8cdbc0b22 | ||
|
|
7845a1901b | ||
|
|
cc0d78a4e7 | ||
|
|
9f0b904043 | ||
|
|
e3d8476396 | ||
|
|
88d9238c17 | ||
|
|
fdb35eafc1 | ||
|
|
90cbb25d47 | ||
|
|
450d9562c3 | ||
|
|
a69eec5ef6 | ||
|
|
5f6fc7e3b4 | ||
|
|
62b6ca026e | ||
|
|
006f258938 | ||
|
|
2bbd785ada | ||
|
|
f30294c2ae | ||
|
|
756b7db6b6 | ||
|
|
a8d7c01f94 | ||
|
|
0c7e7ecc99 | ||
|
|
95267a5581 | ||
|
|
a860cf1a13 | ||
|
|
342a70c441 | ||
|
|
815247f5b5 | ||
|
|
e6721a9905 | ||
|
|
d6305fddfd | ||
|
|
f2cf4fb4a0 | ||
|
|
3323a39767 | ||
|
|
6db2d5ae31 | ||
|
|
9ed323321a | ||
|
|
9b43bba6f8 | ||
|
|
f9d89b30e2 | ||
|
|
be29794b4c | ||
|
|
968089201a | ||
|
|
d232d61350 | ||
|
|
97bf4f1b97 | ||
|
|
76e7684e26 | ||
|
|
3cc2be8874 | ||
|
|
cd1d0c3746 | ||
|
|
2bfd764da7 | ||
|
|
daf3defe14 | ||
|
|
d8c165ca78 | ||
|
|
780c55e99e | ||
|
|
42115b2c30 | ||
|
|
447013abf5 | ||
|
|
2b9e508a5c | ||
|
|
44216326f9 | ||
|
|
a68328ae83 | ||
|
|
f9cd35ac74 | ||
|
|
fd64e71a3b | ||
|
|
06cfed009a | ||
|
|
7b990a264f | ||
|
|
7687917aae | ||
|
|
02b71619de | ||
|
|
da90b23f99 | ||
|
|
b8090abcdc | ||
|
|
dc94ff58c3 | ||
|
|
45b07dd628 | ||
|
|
ad7a6a5579 | ||
|
|
67c8521d5c | ||
|
|
18fc63b8c0 | ||
|
|
6b87a2ad31 | ||
|
|
64d2854e49 | ||
|
|
9c7606e59b | ||
|
|
5f0fdf326b | ||
|
|
cd550054d8 | ||
|
|
cb634bea1e | ||
|
|
3d93f708be | ||
|
|
99f83a6bc4 | ||
|
|
ca9f90624e | ||
|
|
05edf98514 | ||
|
|
45b8c622bc | ||
|
|
6c315e1669 | ||
|
|
0fee313f18 | ||
|
|
bcb817b30d | ||
|
|
33c75915ca | ||
|
|
89ed35815c | ||
|
|
69d244b227 | ||
|
|
047ed5a6f8 | ||
|
|
faf1fb60b7 | ||
|
|
f28825ba74 | ||
|
|
3626fd024d | ||
|
|
61acec17ee | ||
|
|
2438c2fd04 | ||
|
|
79ec0610a8 | ||
|
|
eee5889d51 | ||
|
|
038ec49d5e | ||
|
|
5f06b7bde9 | ||
|
|
59bb23232f | ||
|
|
669ffc73fd | ||
|
|
64eacb5237 | ||
|
|
7804d741a0 | ||
|
|
278562e855 | ||
|
|
fafa088a5e | ||
|
|
31b9158e3d | ||
|
|
a5bd2965d0 | ||
|
|
1ff65a2293 | ||
|
|
1c69c61432 | ||
|
|
191143fb17 | ||
|
|
046870e366 | ||
|
|
b44af12f3b | ||
|
|
d9a9c7e229 | ||
|
|
8be48c87a8 | ||
|
|
5aeb57fb61 | ||
|
|
b0ae5d4299 | ||
|
|
fb6ac84fb3 | ||
|
|
e32c44aaa3 | ||
|
|
55dfa5889b | ||
|
|
b35b5bd774 | ||
|
|
4baf71d8dc | ||
|
|
8b0d7bb422 | ||
|
|
80e44e302f | ||
|
|
009770bb04 | ||
|
|
1ee9e5df78 | ||
|
|
2fe6cb37e6 | ||
|
|
e2d7d8edd8 | ||
|
|
2d9b4ddd0b | ||
|
|
a58ed5e1a9 | ||
|
|
da570e21ee | ||
|
|
16adcd299a | ||
|
|
df8a464c36 | ||
|
|
2595b8bc8e | ||
|
|
52e121cfdb | ||
|
|
f014fc6426 | ||
|
|
88a6c2bb2b | ||
|
|
ee270f419c | ||
|
|
4b6c9d7705 | ||
|
|
8fa31fe0c2 | ||
|
|
445eb31db1 | ||
|
|
8f246c18e1 | ||
|
|
c8151d94ba | ||
|
|
8dd5ca8bc8 | ||
|
|
8a6f0b57d4 | ||
|
|
7b91c26689 | ||
|
|
6083a2a9aa | ||
|
|
31608ce4ee | ||
|
|
5e36cddca3 | ||
|
|
56bae6ee84 | ||
|
|
0d870b62de | ||
|
|
c453134fa3 | ||
|
|
8012a5783e | ||
|
|
9d999a7119 | ||
|
|
c9d231f8f4 | ||
|
|
97b182f06e | ||
|
|
82b33b5ab4 | ||
|
|
2f7d5336e2 | ||
|
|
dc8f237fec | ||
|
|
41d0615ab5 | ||
|
|
f425da1555 | ||
|
|
2d5278aa80 | ||
|
|
fadc3e7dd0 | ||
|
|
152f56b496 | ||
|
|
ed4f8dea90 | ||
|
|
dced020a20 | ||
|
|
bf3c87575c | ||
|
|
dadb54090c | ||
|
|
3f683b012c | ||
|
|
ed91112531 | ||
|
|
e224f30de6 | ||
|
|
ecb1e91136 | ||
|
|
454947f08b | ||
|
|
3ff6c6fe2f | ||
|
|
527cc4d727 | ||
|
|
3b4201d2bf | ||
|
|
bb66fe6e98 | ||
|
|
9d096dd994 | ||
|
|
c0d4ec7dba | ||
|
|
b91287a974 | ||
|
|
ba109da324 | ||
|
|
2a92c7657c | ||
|
|
beb8ace5bd | ||
|
|
5e1225524c | ||
|
|
931042eb2f | ||
|
|
94bf737584 | ||
|
|
383577bb18 | ||
|
|
f9e94386de | ||
|
|
5879eed926 | ||
|
|
6960ff471c | ||
|
|
e1e54bf7a3 | ||
|
|
9e0c43589d | ||
|
|
ca3b0cfce5 | ||
|
|
245b3f4ad2 | ||
|
|
ea575e0515 | ||
|
|
ff63d2ca39 | ||
|
|
045af27999 | ||
|
|
257365932c | ||
|
|
aca4e4077f | ||
|
|
ce80d36b8b | ||
|
|
7dd5256303 | ||
|
|
fcf1093b4c | ||
|
|
5f9e9afffb | ||
|
|
1bba9980c2 | ||
|
|
6cbcee7656 | ||
|
|
2084c50f95 | ||
|
|
20d98bf09e | ||
|
|
05c2f1f859 | ||
|
|
1e9107ec4a | ||
|
|
96a3f0a334 | ||
|
|
6938299940 | ||
|
|
0d1eb82fca | ||
|
|
ddf268e8ec | ||
|
|
ae6fb878da | ||
|
|
d7099c118b | ||
|
|
1b73591366 | ||
|
|
6f3f66df73 | ||
|
|
598020a89b | ||
|
|
5bad1f397d | ||
|
|
327ebeaa53 | ||
|
|
88486e2b00 | ||
|
|
faf8521c91 | ||
|
|
ccd74fb76f | ||
|
|
d76c6fdbd8 | ||
|
|
ea87c9d148 | ||
|
|
af6a55d3f4 | ||
|
|
c052961efe | ||
|
|
57d339f513 | ||
|
|
2853b48144 | ||
|
|
3eb113a5cb | ||
|
|
1b60735808 | ||
|
|
097771175d | ||
|
|
0922557abc | ||
|
|
6842da1960 | ||
|
|
eb839b4113 | ||
|
|
7e3e8fbf2f | ||
|
|
3800151763 | ||
|
|
0121505f28 | ||
|
|
b9a6f5d3ac | ||
|
|
179b568b16 | ||
|
|
c563697efd | ||
|
|
fa9281aa92 | ||
|
|
cc8d94f666 | ||
|
|
1416405644 | ||
|
|
d29b3effbc | ||
|
|
bd9456ba2d | ||
|
|
0c9d5d9b6b | ||
|
|
b19ddd6799 | ||
|
|
ea48b6ebf3 | ||
|
|
fba2f77874 | ||
|
|
3c900ce387 | ||
|
|
7df11b907f | ||
|
|
cdd51a9c16 | ||
|
|
51a4c013d3 | ||
|
|
111aafb4bb | ||
|
|
81f0b13730 | ||
|
|
a36a9e7645 | ||
|
|
cfe6db6ec5 | ||
|
|
ccb221559a | ||
|
|
ace8501648 | ||
|
|
ff627bb0db | ||
|
|
dba8d84f2d | ||
|
|
e24bfff6ab | ||
|
|
cdcc4226db | ||
|
|
09b52738ca | ||
|
|
e324b16e1b | ||
|
|
1b52e4cb93 | ||
|
|
6ac31b05e5 | ||
|
|
6c24c9a2d9 | ||
|
|
b79ef4f7a8 | ||
|
|
d584f83f59 | ||
|
|
22ed0ec0ca | ||
|
|
436e9e59f1 | ||
|
|
ba63d52275 | ||
|
|
aa48e24881 | ||
|
|
f59b33a27f | ||
|
|
9f87708b96 | ||
|
|
78819e9a04 | ||
|
|
8e981d52eb | ||
|
|
9f4c798ddb | ||
|
|
7eac62635b | ||
|
|
3739d710f8 | ||
|
|
aae5aa9d7f | ||
|
|
88be5d5fe8 | ||
|
|
6ac54c9865 | ||
|
|
5cefbbfb51 | ||
|
|
f10e31bd60 | ||
|
|
e8e8b5bfca | ||
|
|
19adbca7b3 | ||
|
|
ba28d5619a | ||
|
|
68363a4c52 | ||
|
|
f947fa8d36 | ||
|
|
c1d0994781 | ||
|
|
fde576fe8b | ||
|
|
27864be41d | ||
|
|
9d461be4a0 | ||
|
|
bcbfe114d8 | ||
|
|
af8448adeb | ||
|
|
9b7a360ea1 | ||
|
|
3bf7eed52e | ||
|
|
c1d80469db | ||
|
|
e6a1039387 | ||
|
|
ad7b2c4e8f | ||
|
|
d51a787598 | ||
|
|
2ac9183047 | ||
|
|
3b9f0b56fb | ||
|
|
d900a8d5a3 | ||
|
|
6daa16b3ca | ||
|
|
28891234db | ||
|
|
1d7bdcb512 | ||
|
|
0964031922 | ||
|
|
6568f47760 | ||
|
|
448e89c733 | ||
|
|
68dccaa93c | ||
|
|
b0cefb05e0 | ||
|
|
d6bf4c86df | ||
|
|
993ded5ca8 | ||
|
|
951df9e63a | ||
|
|
4b98806b3e | ||
|
|
536520c78c | ||
|
|
63650912b8 | ||
|
|
b65069adeb | ||
|
|
7bd3179488 | ||
|
|
bf6ecca1fa | ||
|
|
69449740df | ||
|
|
591f3ae39a | ||
|
|
463d2b16bf | ||
|
|
cc47d93988 | ||
|
|
19e42c48e4 | ||
|
|
6b37c71b6d | ||
|
|
3af6b1d1fe | ||
|
|
2445ecb6e5 | ||
|
|
a5ae4110da | ||
|
|
dc4378b637 | ||
|
|
91f2de7797 | ||
|
|
29b2829199 | ||
|
|
4e23a34af9 | ||
|
|
2bd1aaa03e | ||
|
|
96e23ddb52 | ||
|
|
351e250688 | ||
|
|
e8ebd1aa64 | ||
|
|
6adca44180 | ||
|
|
f3699069c5 | ||
|
|
2f298a32c3 | ||
|
|
3ba81a43cb | ||
|
|
813f17b52f | ||
|
|
0fc292b1ad | ||
|
|
f3f5bbe114 | ||
|
|
8c732f00e1 | ||
|
|
f91b8c75df | ||
|
|
e86b88bf05 | ||
|
|
bf3a2d748d | ||
|
|
8a4b81e2e5 | ||
|
|
34406ec32d | ||
|
|
3269a2a3ff | ||
|
|
5d50844753 | ||
|
|
97cc73a4fa | ||
|
|
574dae6236 | ||
|
|
84c413f51a | ||
|
|
87a1cce4ca | ||
|
|
be89b5d6f2 | ||
|
|
200c727426 | ||
|
|
d563f66ba1 | ||
|
|
4592eeddd3 | ||
|
|
d73a07dff2 | ||
|
|
e8857bf150 | ||
|
|
0abe33053f | ||
|
|
dc9161c6a7 | ||
|
|
d588be696b | ||
|
|
4b2c806f28 | ||
|
|
e28b026ead | ||
|
|
c7414e0199 | ||
|
|
5a478ebaba | ||
|
|
08577f0ae5 | ||
|
|
38527c6a41 | ||
|
|
01c5b7c4a8 | ||
|
|
b0b3e0d1c9 | ||
|
|
5bc273d057 | ||
|
|
e128576763 | ||
|
|
58f4dca599 | ||
|
|
a6dd7f23c7 | ||
|
|
a267d46464 | ||
|
|
8c829ee498 | ||
|
|
bcfa95de06 | ||
|
|
56745ae944 | ||
|
|
5a664f8c2c | ||
|
|
1fd29e13f8 | ||
|
|
af863dae75 | ||
|
|
b1254d2b87 | ||
|
|
d350cadd4c | ||
|
|
cfe9ebd747 | ||
|
|
03177d4ce9 | ||
|
|
a55b0da22b | ||
|
|
1b0bdf25ae | ||
|
|
c746cdc639 | ||
|
|
3cf6b6f639 | ||
|
|
a1bf8f9ab7 | ||
|
|
5449d74d53 | ||
|
|
dc401f80b9 | ||
|
|
379cd2386a | ||
|
|
4e7bdb9c69 | ||
|
|
41449fb538 | ||
|
|
a75488217c | ||
|
|
8e32792696 | ||
|
|
b47caf0287 | ||
|
|
715ae856f0 | ||
|
|
19ae27e6c2 | ||
|
|
2132bacff5 | ||
|
|
e57c5a20d0 | ||
|
|
3d35f0aafe | ||
|
|
68ac03db9e | ||
|
|
7b5471a451 | ||
|
|
7f052ac85e | ||
|
|
64e75eb9ff | ||
|
|
8e75e5d5e3 | ||
|
|
1810e6833c | ||
|
|
8c7c012785 | ||
|
|
378d82518a | ||
|
|
728b04c8e3 | ||
|
|
b8611f095a | ||
|
|
f49a1184e2 | ||
|
|
77a4441018 | ||
|
|
18f1f0de79 | ||
|
|
d252c7dd08 | ||
|
|
e5547f8a4c | ||
|
|
63d6578991 | ||
|
|
da00ae84a8 | ||
|
|
74a905ee85 | ||
|
|
a03e985df3 | ||
|
|
2d6005a4e0 | ||
|
|
c4ca28d2d9 | ||
|
|
3934c17f52 | ||
|
|
51717f8583 | ||
|
|
67e99702c1 | ||
|
|
27ce5a3785 | ||
|
|
49122bb213 | ||
|
|
263c4d3f89 | ||
|
|
2ed203dc32 | ||
|
|
742a06ea2d | ||
|
|
1ad4e2c62e | ||
|
|
7e29a3e836 | ||
|
|
3a66e8323c | ||
|
|
4852e3d26a | ||
|
|
80509dc15f | ||
|
|
601bd4740c | ||
|
|
62be5885db | ||
|
|
62e49567cc | ||
|
|
f2eff11d66 | ||
|
|
ae61586f95 | ||
|
|
a08fbc3b77 | ||
|
|
53d130f1cf | ||
|
|
c05992ce50 | ||
|
|
52522b7095 | ||
|
|
af3f6c5900 | ||
|
|
7b15ca4955 | ||
|
|
031016330a | ||
|
|
e274640d2e | ||
|
|
bd3352424c | ||
|
|
f8ec2bce0c | ||
|
|
81f34f0154 | ||
|
|
759e205bfb | ||
|
|
fc5029e88a | ||
|
|
6fa8052878 | ||
|
|
0dc62712d4 | ||
|
|
23b08590cf | ||
|
|
8d8ab483e1 | ||
|
|
fb757686e3 | ||
|
|
6a8161dcaf | ||
|
|
ae2391f07f | ||
|
|
50a9ce35ad | ||
|
|
2d2a4be3a2 | ||
|
|
e055429ff2 | ||
|
|
8727bac560 | ||
|
|
fd018dc5ac | ||
|
|
4c3673aef2 | ||
|
|
4eb61373e0 | ||
|
|
8e8dd38e2e | ||
|
|
f8b7720e2c | ||
|
|
50af6fe017 | ||
|
|
8bc617c4a7 | ||
|
|
f75d69601b | ||
|
|
f54d819ec8 | ||
|
|
c50db4089c | ||
|
|
a6d7cc1215 | ||
|
|
f6a2fcbbea | ||
|
|
071822e665 | ||
|
|
063dc9f8e1 | ||
|
|
66e90f189c | ||
|
|
bdd1a86568 | ||
|
|
01d0c9a0c2 |
@@ -22,4 +22,6 @@ VUE_APP_LOGOUT_PATH = '/core/auth/logout/'
|
||||
# Dev server for core proxy
|
||||
VUE_APP_CORE_HOST = 'http://localhost:8080'
|
||||
VUE_APP_CORE_WS = 'ws://localhost:8080'
|
||||
VUE_APP_KOKO_HOST = 'http://localhost:5000'
|
||||
VUE_APP_KOKO_WS = 'ws://localhost:5000'
|
||||
VUE_APP_ENV = 'development'
|
||||
|
||||
46
.github/workflows/jms-build-test.yml
vendored
@@ -1,32 +1,46 @@
|
||||
name: "Run Build Test"
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- pr@*
|
||||
- repr@*
|
||||
paths:
|
||||
- 'Dockerfile'
|
||||
- 'Dockerfile*'
|
||||
- 'package.json'
|
||||
- 'yarn.lock'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
component: [lina]
|
||||
version: [v4]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
|
||||
- uses: docker/setup-qemu-action@v2
|
||||
- name: Prepare Build
|
||||
run: |
|
||||
sed -i 's@registry.npmmirror.com@registry.yarnpkg.com@g' yarn.lock
|
||||
|
||||
- uses: docker/setup-buildx-action@v2
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- uses: docker/build-push-action@v3
|
||||
- name: Build Image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: false
|
||||
tags: jumpserver/lina:test
|
||||
push: true
|
||||
file: Dockerfile
|
||||
tags: ghcr.io/jumpserver/${{ matrix.component }}:${{ matrix.version }}
|
||||
platforms: linux/amd64
|
||||
build-args: |
|
||||
VERSION=${{ matrix.version }}
|
||||
APT_MIRROR=http://deb.debian.org
|
||||
NPM_REGISTRY=https://registry.yarnpkg.com
|
||||
outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
|
||||
- uses: LouisBrunner/checks-action@v1.5.0
|
||||
if: always()
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
name: Check Build
|
||||
conclusion: ${{ job.status }}
|
||||
|
||||
@@ -10,3 +10,4 @@ jobs:
|
||||
- uses: jumpserver/action-generic-handler@master
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.PRIVATE_TOKEN }}
|
||||
I18N_TOKEN: ${{ secrets.I18N_TOKEN }}
|
||||
|
||||
36
.github/workflows/release-drafter.yml
vendored
@@ -19,9 +19,7 @@ jobs:
|
||||
id: get_version
|
||||
run: |
|
||||
TAG=$(basename ${GITHUB_REF})
|
||||
VERSION=${TAG/v/}
|
||||
echo "::set-output name=TAG::$TAG"
|
||||
echo "::set-output name=VERSION::$VERSION"
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: release-drafter/release-drafter@v5
|
||||
@@ -33,17 +31,27 @@ jobs:
|
||||
tag: ${{ steps.get_version.outputs.TAG }}
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '14.16'
|
||||
|
||||
build-and-release:
|
||||
needs: create-realese
|
||||
name: Build and Release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Build it and upload
|
||||
uses: jumpserver/action-build-upload-assets@node14.16
|
||||
node-version: '16.20'
|
||||
- name: Install dependencies
|
||||
run: yarn install
|
||||
- name: Build web
|
||||
run: |
|
||||
sed -i "s@version-dev@${{ steps.get_version.outputs.TAG }}@g" src/layout/components/NavHeader/About.vue
|
||||
yarn build
|
||||
- name: Create Upload Assets
|
||||
run: |
|
||||
rm -rf build/*
|
||||
mv lina lina-${{ steps.get_version.outputs.TAG }}
|
||||
tar -czf lina-${{ steps.get_version.outputs.TAG }}.tar.gz lina-${{ steps.get_version.outputs.TAG }}
|
||||
echo $(md5sum lina-${{ steps.get_version.outputs.TAG }}.tar.gz | awk '{print $1}') > build/lina-${{ steps.get_version.outputs.TAG }}.tar.gz.md5
|
||||
mv lina-${{ steps.get_version.outputs.TAG }}.tar.gz build/
|
||||
- name: Release Upload Assets
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
draft: true
|
||||
files: |
|
||||
build/lina-${{ steps.get_version.outputs.TAG }}.tar.gz
|
||||
build/lina-${{ steps.get_version.outputs.TAG }}.tar.gz.md5
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ needs.create-realese.outputs.upload_url }}
|
||||
|
||||
25
Dockerfile
@@ -1,4 +1,4 @@
|
||||
FROM node:16.17.1-bullseye-slim as stage-build
|
||||
FROM node:16.20-bullseye-slim AS stage-build
|
||||
ARG TARGETARCH
|
||||
|
||||
ARG DEPENDENCIES=" \
|
||||
@@ -7,30 +7,35 @@ ARG DEPENDENCIES=" \
|
||||
python3"
|
||||
|
||||
ARG APT_MIRROR=http://mirrors.ustc.edu.cn
|
||||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=lina \
|
||||
sed -i "s@http://.*.debian.org@${APT_MIRROR}@g" /etc/apt/sources.list \
|
||||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
||||
set -ex \
|
||||
&& rm -f /etc/apt/apt.conf.d/docker-clean \
|
||||
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
|
||||
&& echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' >/etc/apt/apt.conf.d/keep-cache \
|
||||
&& sed -i "s@http://.*.debian.org@${APT_MIRROR}@g" /etc/apt/sources.list \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y --no-install-recommends ${DEPENDENCIES} \
|
||||
&& echo "no" | dpkg-reconfigure dash \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
&& apt-get -y install --no-install-recommends ${DEPENDENCIES} \
|
||||
&& echo "no" | dpkg-reconfigure dash
|
||||
|
||||
ARG NPM_REGISTRY="https://registry.npmmirror.com"
|
||||
|
||||
RUN set -ex \
|
||||
&& npm config set registry ${NPM_REGISTRY} \
|
||||
&& yarn config set registry ${NPM_REGISTRY}
|
||||
|
||||
WORKDIR /data
|
||||
|
||||
ADD package.json yarn.lock /data
|
||||
RUN --mount=type=cache,target=/usr/local/share/.cache/yarn,sharing=locked,id=lina \
|
||||
RUN --mount=type=cache,target=/usr/local/share/.cache/yarn,sharing=locked \
|
||||
--mount=type=bind,source=package.json,target=package.json \
|
||||
--mount=type=bind,source=yarn.lock,target=yarn.lock \
|
||||
yarn install
|
||||
|
||||
ARG VERSION
|
||||
ENV VERSION=$VERSION
|
||||
|
||||
ADD . /data
|
||||
RUN --mount=type=cache,target=/usr/local/share/.cache/yarn,sharing=locked,id=lina \
|
||||
|
||||
RUN --mount=type=cache,target=/usr/local/share/.cache/yarn,sharing=locked \
|
||||
sed -i "s@version-dev@${VERSION}@g" src/layout/components/NavHeader/About.vue \
|
||||
&& yarn build
|
||||
|
||||
|
||||
33
package.json
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"name": "vue-admin-template",
|
||||
"version": "4.2.1",
|
||||
"description": "A vue admin template with Element UI & axios & iconfont & permission control & lint",
|
||||
"author": "Pan <panfree23@gmail.com>",
|
||||
"license": "MIT",
|
||||
"name": "Lina",
|
||||
"version": "v4.0.0",
|
||||
"description": "JumpServer Web UI",
|
||||
"author": "JumpServer Team <support@fit2cloud.com>",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"scripts": {
|
||||
"dev": "vue-cli-service serve",
|
||||
"serve": "vue-cli-service serve",
|
||||
@@ -20,26 +20,30 @@
|
||||
"vue-i18n-report": "vue-i18n-extract report -v './src/**/*.?(js|vue)' -l './src/i18n/langs/**/*.json'",
|
||||
"vue-i18n-report-json": "vue-i18n-extract report -v './src/**/*.?(js|vue)' -l './src/i18n/langs/**/*.json' -o /tmp/abc.json",
|
||||
"vue-i18n-report-add-miss": "vue-i18n-extract report -v './src/**/*.?(js|vue)' -l './src/i18n/langs/**/*.json' -a",
|
||||
"diff-i18n": "python ./src/i18n/langs/i18n-util.py diff en ja",
|
||||
"apply-i18n": "python ./src/i18n/langs/i18n-util.py apply en ja"
|
||||
"diff-i18n": "python ./src/i18n/langs/i18n-util.py diff en ja zh_Hant",
|
||||
"apply-i18n": "python ./src/i18n/langs/i18n-util.py apply en ja zh_Hant"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/plugin-proposal-optional-chaining": "^7.13.12",
|
||||
"@fontsource/open-sans": "^5.0.24",
|
||||
"@traptitech/markdown-it-katex": "^3.6.0",
|
||||
"@ztree/ztree_v3": "3.5.44",
|
||||
"axios": "0.21.1",
|
||||
"axios": "0.28.0",
|
||||
"axios-retry": "^3.1.9",
|
||||
"cron-parser": "^4.0.0",
|
||||
"crypto-js": "^4.1.1",
|
||||
"css-color-function": "^1.3.3",
|
||||
"decimal.js": "^10.4.3",
|
||||
"deepmerge": "^4.2.2",
|
||||
"echarts": "^4.7.0",
|
||||
"element-ui": "2.13.2",
|
||||
"dompurify": "^3.1.6",
|
||||
"echarts": "4.7.0",
|
||||
"element-ui": "2.15.14",
|
||||
"eslint-plugin-html": "^6.0.0",
|
||||
"highlight.js": "^11.9.0",
|
||||
"install": "^0.13.0",
|
||||
"jquery": "^3.6.1",
|
||||
"js-cookie": "2.2.0",
|
||||
"jsencrypt": "^3.2.1",
|
||||
"krry-transfer": "^1.7.3",
|
||||
"less": "^3.10.3",
|
||||
"less-loader": "^5.0.0",
|
||||
"lodash": "^4.17.21",
|
||||
@@ -54,12 +58,15 @@
|
||||
"lodash.set": "^4.3.2",
|
||||
"lodash.topairs": "^4.3.0",
|
||||
"lodash.values": "^4.3.0",
|
||||
"markdown-it": "^13.0.2",
|
||||
"markdown-it-link-attributes": "^4.0.1",
|
||||
"moment": "^2.29.4",
|
||||
"moment-parseformat": "^4.0.0",
|
||||
"normalize.css": "7.0.0",
|
||||
"npm": "^7.8.0",
|
||||
"nprogress": "0.2.0",
|
||||
"path-to-regexp": "2.4.0",
|
||||
"v-sanitize": "^0.0.13",
|
||||
"vue": "2.6.10",
|
||||
"vue-codemirror": "4.0.6",
|
||||
"vue-cookie": "^1.1.4",
|
||||
@@ -79,7 +86,7 @@
|
||||
"zxcvbn": "^4.4.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0",
|
||||
"@babel/core": "7.18.6",
|
||||
"@babel/register": "7.0.0",
|
||||
"@vue/cli-plugin-babel": "3.6.0",
|
||||
"@vue/cli-plugin-eslint": "^3.9.1",
|
||||
@@ -93,6 +100,7 @@
|
||||
"chalk": "2.4.2",
|
||||
"compression-webpack-plugin": "^6.1.1",
|
||||
"connect": "3.6.6",
|
||||
"deasync": "^0.1.29",
|
||||
"element-theme-chalk": "^2.13.1",
|
||||
"eslint": "^5.15.3",
|
||||
"eslint-plugin-vue": "5.2.2",
|
||||
@@ -109,6 +117,7 @@
|
||||
"script-ext-html-webpack-plugin": "2.1.3",
|
||||
"script-loader": "0.7.2",
|
||||
"serve-static": "^1.13.2",
|
||||
"strip-ansi": "^7.1.0",
|
||||
"svg-sprite-loader": "4.1.3",
|
||||
"svgo": "1.2.2",
|
||||
"vue-i18n-extract": "^1.1.1",
|
||||
|
||||
@@ -27,6 +27,9 @@
|
||||
if(pathname.indexOf('/ui') === -1) {
|
||||
window.location.href = window.location.origin + '/ui/#' + pathname
|
||||
}
|
||||
if (pathname.startsWith('/ui/#/chat')) {
|
||||
window.location.href = window.location.origin + pathname
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<div id="app"></div>
|
||||
|
||||
@@ -21,32 +21,39 @@
|
||||
}
|
||||
|
||||
.el-alert--info.is-light {
|
||||
background-color: light-9;
|
||||
color: light-2;
|
||||
background-color: rgba(255, 255, 255, 0.5);
|
||||
color: info;
|
||||
border: 1px solid;
|
||||
}
|
||||
|
||||
.el-alert--info .el-alert__description {
|
||||
color: light-2;
|
||||
color: info;
|
||||
}
|
||||
|
||||
.el-pagination.is-background {
|
||||
.el-pagination__total,
|
||||
.el-pagination__sizes,
|
||||
.el-pager {
|
||||
color: var(--color-icon-primary);
|
||||
}
|
||||
}
|
||||
|
||||
.el-pagination.is-background .el-pager li:not(.disabled):hover {
|
||||
color: white;
|
||||
color: #fff;
|
||||
background-color: primary;
|
||||
}
|
||||
|
||||
.el-pagination.is-background .btn-next,
|
||||
.el-pagination.is-background .btn-prev,
|
||||
.el-pagination.is-background .el-pager li {
|
||||
margin: 0 5px;
|
||||
background-color: white;
|
||||
color: #606266;
|
||||
min-width: 28px;
|
||||
border-radius: 2px;
|
||||
border: 1px solid #DCDFE6;
|
||||
font-size: 12px;
|
||||
line-height: 26px;
|
||||
font-weight: 400;
|
||||
margin: 0 5px;
|
||||
background-color: #fff;
|
||||
color: var(--color-icon-primary);
|
||||
min-width: 28px;
|
||||
border-radius: 2px;
|
||||
border: 1px solid #DCDFE6;
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.el-breadcrumb__inner,
|
||||
@@ -85,8 +92,12 @@
|
||||
|
||||
|
||||
td .el-button.el-button--mini {
|
||||
padding: 1px 5px;
|
||||
padding: 1px 6px;
|
||||
line-height: 1.5;
|
||||
|
||||
.el-icon--right {
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
.el-tabs__item.is-active, .el-tabs--border-card>.el-tabs__header .el-tabs__item.is-active {
|
||||
@@ -191,7 +202,7 @@ td .el-button.el-button--mini {
|
||||
}
|
||||
|
||||
.el-input--small .el-input__icon {
|
||||
line-height: 34px;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.option-group .el-select-dropdown__item.hover, .option-group .el-select-dropdown__item.selected {
|
||||
@@ -224,8 +235,10 @@ td .el-button.el-button--mini {
|
||||
}
|
||||
|
||||
.el-tag.el-tag--info .el-tag__close {
|
||||
color: #333333!important;
|
||||
background-color: inherit;
|
||||
display: inline-block;
|
||||
margin-top: 3px;
|
||||
color: var(--color-text-primary);
|
||||
background-color: inherit;
|
||||
}
|
||||
|
||||
.el-tag.el-tag--info.is-hit {
|
||||
@@ -280,7 +293,7 @@ td .el-button.el-button--mini {
|
||||
}
|
||||
|
||||
.el-textarea__inner {
|
||||
border-radius: 0;
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
.el-pagination.is-background .number {
|
||||
@@ -313,11 +326,11 @@ td .el-button.el-button--mini {
|
||||
|
||||
.el-tooltip__popper.is-light {
|
||||
background: #FFF;
|
||||
max-width: 500px;
|
||||
border: 1px solid #e7eaec;
|
||||
}
|
||||
|
||||
.el-tooltip__popper.is-light .popper__arrow {
|
||||
border-bottom-color: #e7eaec !important;
|
||||
box-shadow: 0 1.6px 3.6px 0 rgba(0, 0, 0, .132), 0 .3px .9px 0 rgba(0, 0, 0, .108);
|
||||
line-height: 1.5;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.el-dialog__headerbtn .el-dialog__close {
|
||||
@@ -326,7 +339,7 @@ td .el-button.el-button--mini {
|
||||
}
|
||||
|
||||
.el-table__header thead tr th {
|
||||
border-bottom: 1px solid #e7e7e7 !important;
|
||||
/*border-bottom: 1px solid #e7e7e7 !important;*/
|
||||
}
|
||||
|
||||
.el-table .cell,
|
||||
@@ -423,14 +436,34 @@ td .el-button.el-button--mini {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.el-dialog .el-dialog__header .el-dialog__title {
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
.el-dialog .el-dialog__body {
|
||||
max-height: 90vh;
|
||||
max-height: 80vh;
|
||||
overflow: auto;
|
||||
padding: 30px;
|
||||
}
|
||||
|
||||
.el-dialog .el-dialog__body .el-transfer-panel .el-transfer-panel__body .el-input__inner,
|
||||
.el-dialog .el-dialog__body .el-transfer-panel .el-transfer-panel__header .el-checkbox__label,
|
||||
.el-dialog .el-dialog__body .el-transfer-panel .el-transfer-panel__body .el-checkbox-group .el-checkbox.el-transfer-panel__item {
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
.el-dialog .el-dialog__body .opera .el-button.is-disabled,
|
||||
.el-dialog .el-dialog__body .el-transfer-panel .vip-footer .el-button.is-disabled {
|
||||
color: var(--color-input-border);
|
||||
}
|
||||
|
||||
.el-dialog .el-dialog__body .opera .el-button.is-disabled.el-button--primary {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.el-dialog .el-dialog__body form {
|
||||
padding-right: 20px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.el-dialog .el-dialog__footer {
|
||||
|
||||
@@ -16,6 +16,3 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
|
||||
@@ -42,8 +42,10 @@ export function getCommandFilterList(data) {
|
||||
|
||||
export function getCategoryTypes() {
|
||||
return request({
|
||||
url: '/api/v1/assets/categories/',
|
||||
url: '/api/v1/assets/categories/?limit=1000',
|
||||
method: 'get'
|
||||
}).then(res => {
|
||||
return res.results
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
9
src/api/component.js
Normal file
@@ -0,0 +1,9 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function getLokiLog(data) {
|
||||
return request({
|
||||
url: `/api/v1/terminal/loki/logs/`,
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
@@ -52,3 +52,22 @@ export function createJob(form) {
|
||||
data: form
|
||||
})
|
||||
}
|
||||
|
||||
export function StopJob(form) {
|
||||
return request({
|
||||
url: '/api/v1/ops/job-executions/stop/',
|
||||
method: 'post',
|
||||
data: form
|
||||
})
|
||||
}
|
||||
|
||||
export function JobUploadFile(form) {
|
||||
return request({
|
||||
url: '/api/v1/ops/jobs/upload/',
|
||||
method: 'post',
|
||||
headers: { 'Content-Type': 'multipart/form-data' },
|
||||
timeout: 60 * 60 * 1000,
|
||||
data: form
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ export function getProfile(token) {
|
||||
return request({
|
||||
url: '/api/v1/users/profile/',
|
||||
method: 'get'
|
||||
// params: { token }
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
BIN
src/assets/img/chat.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
1
src/assets/img/chatbot.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="transparent" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-bot "><path d="M12 8V4H8"></path><rect width="16" height="12" x="4" y="8" rx="2"></rect><path d="M2 14h2"></path><path d="M20 14h2"></path><path d="M15 13v2"></path><path d="M9 13v2"></path></svg>
|
||||
|
After Width: | Height: | Size: 406 B |
1
src/assets/img/cloud/ali.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg t="1717741737122" class="icon" viewBox="0 0 1653 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5514" width="200" height="200"><path d="M344.8620198 721.82988526a57.857089 57.857089 0 0 1-46.13274501-56.07295017v-308.4012244a59.89610558 59.89610558 0 0 1 46.13274501-56.07295017l286.35436058-62.06256065 30.07549089-122.72329718H328.80476645A210.78331632 210.78331632 0 0 0 116.61962599 327.28021902v364.47417458a213.71440233 213.71440233 0 0 0 212.18514046 212.31257895h332.48710482l-30.07549089-122.21354321zM1178.05508073 116.49690269H843.01920461l30.58524561 122.72329718 286.35436059 62.06256065a57.98452749 57.98452749 0 0 1 46.132745 56.07295017v308.4012244a60.15098257 60.15098257 0 0 1-46.13274502 56.07295017l-286.35436057 62.06256066-30.58524561 122.72329716H1178.05508073a212.44001744 212.44001744 0 0 0 212.94977139-212.82233291V327.28021902A213.33208686 213.33208686 0 0 0 1178.05508073 116.49690269z" fill="#F76E05" p-id="5515"></path><path d="M631.21638038 495.49906876h244.29964793v30.07549166H631.21638038z" fill="#F76E05" p-id="5516"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
1
src/assets/img/cloud/aws_china.svg
Normal file
|
After Width: | Height: | Size: 7.7 KiB |
1
src/assets/img/cloud/aws_international.svg
Normal file
|
After Width: | Height: | Size: 7.7 KiB |
1
src/assets/img/cloud/azure_china.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg t="1717743450082" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="39383" width="200" height="200"><path d="M18.753 17.145h468.424l-0.02 468.426H18.774V17.145h-0.02z m0 0" fill="#F25022" p-id="39384"></path><path d="M534.999 17.145h468.422c0 156.141 0.022 312.283-0.02 468.426H535.038c-0.06-156.162-0.039-312.285-0.039-468.426z m0 0" fill="#80BA01" p-id="39385"></path><path d="M18.753 533.352c156.141 0.058 312.282-0.019 468.424 0.058v468.386H18.753V533.352z m0 0" fill="#02A4EF" p-id="39386"></path><path d="M535.018 533.41c156.124-0.058 312.243-0.019 468.383-0.019v468.422H534.999c0.019-156.163-0.02-312.28 0.019-468.403z m0 0" fill="#FFB902" p-id="39387"></path></svg>
|
||||
|
After Width: | Height: | Size: 721 B |
1
src/assets/img/cloud/azure_international.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg t="1717743450082" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="39383" width="200" height="200"><path d="M18.753 17.145h468.424l-0.02 468.426H18.774V17.145h-0.02z m0 0" fill="#F25022" p-id="39384"></path><path d="M534.999 17.145h468.422c0 156.141 0.022 312.283-0.02 468.426H535.038c-0.06-156.162-0.039-312.285-0.039-468.426z m0 0" fill="#80BA01" p-id="39385"></path><path d="M18.753 533.352c156.141 0.058 312.282-0.019 468.424 0.058v468.386H18.753V533.352z m0 0" fill="#02A4EF" p-id="39386"></path><path d="M535.018 533.41c156.124-0.058 312.243-0.019 468.383-0.019v468.422H534.999c0.019-156.163-0.02-312.28 0.019-468.403z m0 0" fill="#FFB902" p-id="39387"></path></svg>
|
||||
|
After Width: | Height: | Size: 721 B |
1
src/assets/img/cloud/baidu.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg t="1717743183519" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="34140" width="200" height="200"><path d="M521.30666655 248.79999969c4.93333313 0 9.14666625 0.73333312 12.66666657 2.17333406l181.97333343 106.71999938a34.00000031 34.00000031 0 0 0 26.83999969-0.61333313l168.72-94.69333312L520.06666624 36.26666656 128.02666624 262.38666687l171.20000063 95.93333344c3.69333375 1.63999969 7.8 2.46666656 12.33333281 2.46666656 4.93333313 0 9.04000031-0.82666687 12.33333375-2.46666656l184.45333312-107.04c4.32-1.63999969 8.64-2.46666656 12.96-2.46666656" fill="#5BCA87" p-id="34141"></path><path d="M763.02666687 421.28a34.39999969 34.39999969 0 0 0-9.52000032 23.28l3 200.17333312a28.74666656 28.74666656 0 0 1-9.86666625 22.04000063l-4.54666687 4.38666656-167.49333375 103.39999969a34.89333375 34.89333375 0 0 0-10.39999969 7.56c-5.86666687 5.83999969-8.93333344 13.39999969-9.19999969 22.65333375l2.79999938 186.6 384-230.04-6.61333313-441.36-161.47999968 93.43999969a40.89333375 40.89333375 0 0 0-10.68 7.86666656" fill="#EC5D3E" p-id="34142"></path><path d="M292.4400003 667.69333344a30.40000031 30.40000031 0 0 1-9.86666718-21.58666688V444.68c0-8.44000031-3.29333344-16.13333344-9.87999938-23.13333375a55.63999969 55.63999969 0 0 0-10.8-7.71999938l-162.85333406-90.66666656V765.46666625l387.42666656 222.40000031V801.25333344c-0.21333375-9.25333312-3.40000031-16.75999969-9.57333281-22.51999969a31.81333312 31.81333312 0 0 0-10.8-7.40000063l-168.72-99.31999968-4.93333313-4.32z" fill="#2464F5" p-id="34143"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
1
src/assets/img/cloud/gcp.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg t="1717743357432" class="icon" viewBox="0 0 1228 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="37305" width="200" height="200"><path d="M779.7248 289.8944h37.4784l106.8032-106.8032 5.2736-45.3632A480.1024 480.1024 0 0 0 148.224 371.968c11.8784-4.864 25.088-5.632 37.4784-2.2528l213.6064-35.2256s10.9056-17.9712 16.4864-16.896a266.496 266.496 0 0 1 364.6976-27.6992h-0.768z" fill="#EA4335" p-id="37306"></path><path d="M1076.224 371.9168a481.28 481.28 0 0 0-145.1008-233.8304l-149.9136 149.9136a266.496 266.496 0 0 1 97.792 211.3536v26.624a133.4272 133.4272 0 1 1 0 266.8544h-266.752l-26.624 26.9824v160l26.624 26.624h266.752A347.0336 347.0336 0 0 0 1076.224 371.9168" fill="#4285F4" p-id="37307"></path><path d="M344.9856 1004.9536h266.8544v-213.6064H344.9856a132.608 132.608 0 0 1-55.0912-12.032l-37.4784 11.6224-107.5712 106.8032-9.3696 37.4784a345.1904 345.1904 0 0 0 209.5104 69.7344" fill="#34A853" p-id="37308"></path><path d="M344.9856 311.9616a347.0336 347.0336 0 0 0-209.5104 622.1312l154.7776-154.7776a133.4272 133.4272 0 1 1 176.5376-176.4864L621.568 448a346.6752 346.6752 0 0 0-276.5824-136.0384" fill="#FBBC05" p-id="37309"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
1
src/assets/img/cloud/huawei.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg t="1717743147068" class="icon" viewBox="0 0 1027 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="32927" width="200" height="200"><path d="M402.3125 208.25c16.875-5.62500027 33.75-8.4375 50.625-11.24999973 19.68749973 25.3125 25.3125 59.0625 33.75 89.99999946 5.62500027 33.75 11.24999973 67.5 11.24999973 101.25 5.62500027 22.50000027 2.81249973 47.81250027 2.81250054 70.31250054s-2.81249973 42.1875 0 64.68749946c0 30.93750027-2.81249973 59.0625-2.81250054 90.00000027-5.62500027 19.68749973 0 39.37500027-5.62499946 59.0625-8.4375-2.81249973-11.24999973-11.24999973-14.06250027-16.875-33.75-50.625-64.68750027-101.25-92.8125-154.68749973-28.12499973-56.25000027-56.25000027-112.49999973-59.0625-177.1875-5.62500027-50.625 28.12499973-98.43750027 75.9375-115.31250027z m174.37500027-8.4375c5.62500027-2.81249973 8.4375 0 14.06249946 0 22.50000027 5.62500027 47.81250027 8.4375 67.5 22.50000027s36.56249973 33.75 42.1875 56.24999946c8.4375 28.12499973 5.62500027 59.0625 0 87.18750054-8.4375 36.56249973-25.3125 70.31249973-42.1875 104.06249973-5.62500027 11.24999973-11.24999973 19.68749973-16.875 30.93750027-8.4375 19.68749973-22.50000027 39.37500027-33.75 59.0625-19.68749973 33.75-39.37500027 61.87499973-59.0625 95.62499973-2.81249973 2.81249973-5.62500027 11.24999973-11.24999973 5.62500027-2.81249973-33.75-5.62500027-67.5-8.4375-104.06250054-5.62500027-44.99999973-2.81249973-87.18749973-2.81249973-132.18749946 2.81249973-28.12499973 2.81249973-59.0625 5.62499946-87.18750054 5.62500027-33.75 11.24999973-70.31249973 22.50000027-104.06249973 11.24999973-8.4375 11.24999973-25.3125 22.50000027-33.75zM222.31250027 309.5c2.81249973 0 5.62500027 5.62500027 8.4375 8.4375 81.56250027 106.87500027 154.68749973 219.375 213.74999973 340.31249973 5.62500027 8.4375 11.24999973 19.68749973 11.24999973 30.93750027-11.24999973-2.81249973-19.68749973-8.4375-28.12499973-14.06250027-53.43749973-28.12499973-106.87500027-59.0625-160.3125-89.99999946-19.68749973-14.06250027-39.37500027-28.12499973-56.25000027-42.1875-33.75-22.50000027-56.25000027-64.68750027-53.43749973-106.87500027 2.81249973-50.625 30.93750027-92.8125 64.68750027-126.5625z m582.1875 0h5.62499946c14.06250027 19.68749973 33.75 39.37500027 45.00000054 61.87499973 11.24999973 19.68749973 16.875 44.99999973 19.68749973 67.5 0 25.3125-8.4375 53.43749973-28.12499973 73.12500027-11.24999973 11.24999973-19.68749973 22.50000027-33.75 30.93750027-64.68750027 50.625-135 90.00000027-208.12500027 126.5625-11.24999973 5.62500027-19.68749973 14.06250027-33.75 14.06249946 2.81249973-14.06250027 11.24999973-28.12499973 16.875-39.37499946 47.81250027-98.43750027 106.87500027-191.25000027 171.56249973-281.25000054 14.06250027-14.06250027 30.93750027-33.75 45.00000054-53.43749973z m-705.93750027 225.00000027c2.81249973-2.81249973 0-8.4375 5.62500027-11.25000054 8.4375 2.81249973 16.875 8.4375 22.49999946 11.25000054 101.25 56.25000027 202.5 112.49999973 300.93750027 174.37499946 2.81249973 2.81249973 5.62500027 5.62500027 5.62500027 8.4375H239.18750027c-39.37500027 0-75.9375-16.875-104.06250054-44.99999973-22.50000027-25.3125-42.1875-59.0625-44.99999973-92.8125 5.62500027-14.06250027 2.81249973-28.12499973 8.4375-44.99999973z m810-2.81250054c5.62500027-2.81249973 14.06250027-8.4375 19.68749973-5.62499946 0 14.06250027 5.62500027 30.93750027 5.62500027 44.99999973-2.81249973 19.68749973-2.81249973 36.56249973-11.24999973 53.43749973-5.62500027 14.06250027-14.06250027 30.93750027-25.3125 42.1875-14.06250027 11.24999973-22.50000027 25.3125-39.37500027 33.75-16.875 14.06250027-42.1875 16.875-61.87499973 19.68750054h-202.5c2.81249973-2.81249973 2.81249973-5.62500027 5.62499946-8.4375 101.25-64.68750027 205.31249973-123.75000027 309.37500027-180.00000054zM242 748.25c36.56249973-2.81249973 73.12500027 0 109.6875-5.62500027 25.3125 0 53.43749973-2.81249973 78.74999973 0-5.62500027 11.24999973-19.68749973 16.875-28.12499973 22.50000027-28.12499973 19.68749973-56.25000027 36.56249973-87.18749973 50.625s-67.5 8.4375-92.8125-11.24999973c-19.68749973-14.06250027-36.56249973-36.56249973-47.81250027-56.25000027h67.5z m357.18749973-5.62500027c25.3125-2.81249973 50.625 0 78.75000054 0 33.75 2.81249973 70.31249973 0 106.87499946 5.62500027 25.3125 2.81249973 50.625 0 73.12500027 2.81249973-8.4375 16.875-22.50000027 33.75-36.56249973 47.81250027-22.50000027 22.50000027-56.25000027 33.75-87.18750054 28.12499973-28.12499973-8.4375-50.625-25.3125-75.9375-39.37499946-14.06250027-8.4375-25.3125-16.875-39.37499946-25.3125-8.4375-8.4375-14.06250027-11.24999973-19.68750054-19.68750054z" fill="#C71F1E" p-id="32928"></path></svg>
|
||||
|
After Width: | Height: | Size: 4.5 KiB |
1
src/assets/img/cloud/jd.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg t="1717743099498" class="icon" viewBox="0 0 2030 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="30911" width="200" height="200"><path d="M1669.09384945 432.48813594c15.51186469 21.69491531 27.11864437 51.1457625 25.81694906 112.86779625-17.46440719 193.78983094-181.96610156 316.14915281-345.76271156 316.14915281-177.24745781 0-302.04745781-127.56610125-377.111865-270.10169531C954.30062883 557.72203344 941.44639195 520.13559312 929.35147664 487.59322063c-23.701695 32.21694937-73.6542375 84.77288156-99.09152531 109.23389812A629.15254219 629.15254219 0 0 0 890.24639133 720.81355906c20.01355969 31.18644094 70.508475 101.74915219 142.69830562 157.61355938 65.62711875 50.60338969 128.59661062 81.68135625 199.81016906 99.41694937a487.81016906 487.81016906 0 0 0 354.65762719-50.00677968c128.81355937-73.81694906 219.60678-209.78983031 236.04067781-350.96949188-31.72881375-52.61016937-100.501695-114.76610156-154.35932156-144.37966031zM585.37859508 381.12542375a238.96949156 238.96949156 0 0 1 126.96949125 36.39322031c30.53559281-32.5423725 57.54576281-66.16949156 85.58644125-100.06779656A370.54915219 370.54915219 0 0 0 214.66673039 621.01694937a373.09830469 373.09830469 0 0 0 4.39322062 57.00339c10.3593225 12.79999969 114.71186438 4.12203375 130.98305063-10.52203406a242.49491531 242.49491531 0 0 1-4.55593219-46.48135594 239.89152563 239.89152563 0 0 1 239.89152563-239.89152562zM585.37859508 992a370.6576275 370.6576275 0 0 1-320.97627094-185.38305094c4.98983062-6.61694906 121.60000031-19.57966125 149.42372812-18.00678a239.07796594 239.07796594 0 0 0 171.55254282 72.29830594s147.52542375 11.33559281 285.39661031-97.62711937c0 0 51.85084781 73.87118625 91.66101656 101.64067781 0 0-130.00677938 127.07796656-377.05762687 127.07796656z" fill="#E1251B" p-id="30912"></path><path d="M1545.05317101 74.305085C1369.9209682 0.70508469 1199.0735107 22.18305125 1030.23283195 146.27796594 881.35147664 255.67457656 822.1243582 365.88474594 726.88367976 460.47457625c-113.89830469 113.13898313-199.32203344 151.21355906-267.06440718 176.81355938-69.96610125 26.46779625-167.59322062 44.52881344-240.75932157 40.51525406a371.41694906 371.41694906 0 0 0 45.34237313 128.59661062c186.79322063-3.19999969 318.48135562-74.68474594 403.41694875-126.48135656 74.2508475-45.28813594 185.97966094-159.34915219 244.61016937-233.22033844 94.21016906-118.56271219 216.94915219-231.97288125 329.16610219-267.55254281 156.7457625-49.62711844 309.1525425 19.79661 383.02372875 117.85762688 6.61694906 8.62372875 145.13898281 58.3593225 188.691525 95.78305125C1797.31079883 324.88135625 1721.8124932 148.61016969 1545.05317101 74.305085z" fill="#E1251B" p-id="30913" class="custom-cursor-on-hover"></path><path d="M1809.24300164 377.81694875A497.35593188 497.35593188 0 0 0 1526.39554383 286.91525469c-122.63050875 0-245.42372906 47.78305125-331.82372813 132.88135594-62.86101656 61.83050812-93.4508475 112.00000031-163.14576281 195.57966093a570.35932219 570.35932219 0 0 0 92.63728781 108.47457563c9.00339-13.12542375 59.66101688-84.82711875 97.62711844-135.21355875 48.81355969-64.10847469 98.38644094-115.36271156 173.5593225-145.03050844a350.04745781 350.04745781 0 0 1 427.498305 139.3355925A486.02033906 486.02033906 0 0 0 1809.24300164 377.81694875z" fill="#E1251B" p-id="30914" class="custom-cursor-on-hover"></path></svg>
|
||||
|
After Width: | Height: | Size: 3.3 KiB |
1
src/assets/img/cloud/kingsoft.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg t="1717743116713" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="31939" width="200" height="200"><path d="M718.5408 453.8368c-4.1984 0-8.3968-0.7168-12.5952-0.7168a103.8336 103.8336 0 0 0-67.8912 25.088 139.6736 139.6736 0 0 0 13.6192-60.3136 133.12 133.12 0 0 0-2.4576-25.7024 139.5712 139.5712 0 0 0-274.432 0 133.12 133.12 0 0 0-2.4576 25.7024 139.6736 139.6736 0 0 0 13.6192 60.3136 103.8336 103.8336 0 0 0-67.8912-25.088c-4.1984 0-8.3968 0-12.5952 0.7168a104.5504 104.5504 0 1 0 101.0688 159.4368 116.736 116.736 0 0 0 6.144-11.0592 105.1648 105.1648 0 0 0 4.9152-76.6976 62.6688 62.6688 0 0 1 27.3408 20.48l2.6624 3.8912a83.2512 83.2512 0 0 1 133.9392-3.3792l4.7104 6.8608 51.2 73.9328a84.0704 84.0704 0 0 0 62.464 34.6112h5.5296a104.5504 104.5504 0 0 0 12.5952-208.384z" fill="#E6002D" p-id="31940"></path><path d="M512 0a512 512 0 1 0 512 512A512 512 0 0 0 512 0z m200.8064 732.3648h-6.8608a152.4736 152.4736 0 0 1-120.5248-58.9824S509.2352 564.6336 508.0064 563.2a42.1888 42.1888 0 0 0-32.4608-15.2576 40.96 40.96 0 0 0-24.064 7.5776l122.88 175.4112a62.5664 62.5664 0 0 0 77.0048 20.48A97.5872 97.5872 0 0 1 593.92 783.5648a97.0752 97.0752 0 0 1-95.5392-39.1168l-49.4592-70.656a174.8992 174.8992 0 1 1-143.36-290.5088 209.7152 209.7152 0 0 1 413.9008 0 174.7968 174.7968 0 0 1-6.144 349.0816z" fill="#E6002D" p-id="31941"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
1
src/assets/img/cloud/lan.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg t="1717746661932" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="60936" width="200" height="200"><path d="M29.696 541.696A30.72 30.72 0 0 0 59.52 512 452.16 452.16 0 0 1 512 59.456a439.68 439.68 0 0 1 225.664 61.44l16.704 10.432 7.04 4.608-3.84 7.488c-1.216 2.496-1.536 6.592-1.536 16.64 0 44.352 37.504 81.856 81.856 81.856s81.856-37.504 81.856-81.856a83.008 83.008 0 0 0-108.544-77.824l-8.96 3.136-4.48 1.792-4.096-2.624A520.768 520.768 0 0 0 512 0C230.4 0 0 230.4 0 512c0 15.68 14.08 29.696 29.696 29.696z m588.16-186.24c-13.056-93.568-37.12-164.224-62.336-203.584a383.808 383.808 0 0 0-43.776-2.752c-14.784 0-29.568 1.088-43.776 2.752-25.216 39.36-49.28 109.44-62.4 203.584z m221.696 0a365.504 365.504 0 0 0-203.52-184.96c21.312 51.392 36.608 115.456 45.888 184.96z m-497.472 0c9.28-69.504 24.576-133.568 45.952-184.96a365.504 365.504 0 0 0-203.584 184.96z m520.512 250.688a358.4 358.4 0 0 0 0-188.288H688c2.688 31.232 3.84 62.4 3.84 94.144 0 31.744-1.664 62.912-3.84 94.144z m-237.568 0c2.176-29.568 3.84-61.312 3.84-94.144 0-33.408-1.664-64.64-3.84-94.144H398.976c-2.752 29.568-3.84 61.312-3.84 94.144 0 33.408 1.664 64.64 3.84 94.144z m-289.024 0A1073.92 1073.92 0 0 1 332.16 512c0-31.744 1.152-62.912 3.84-94.144H161.408a358.4 358.4 0 0 0 0 188.288zM512 1024c281.6 0 512-230.4 512-512a30.72 30.72 0 0 0-29.696-29.696 30.72 30.72 0 0 0-29.76 29.696A452.16 452.16 0 0 1 512 964.544a439.68 439.68 0 0 1-225.664-61.44l-16.704-10.432-7.04-4.608 3.84-7.488c1.216-2.496 1.536-6.592 1.536-16.64 0-44.352-37.504-81.856-81.856-81.856s-81.856 37.504-81.856 81.856a83.008 83.008 0 0 0 108.544 77.824l8.96-3.136 4.48-1.792 4.096 2.624A520.768 520.768 0 0 0 512 1024z m-0.256-149.12c14.72 0 29.568-1.088 43.776-2.752 25.152-39.36 49.28-109.44 62.4-203.584H405.568c13.12 93.568 37.184 164.224 62.4 203.584 14.208 1.664 28.992 2.752 43.776 2.752z m124.224-21.312a365.504 365.504 0 0 0 203.584-185.024h-157.632c-9.28 69.504-24.576 133.568-45.952 184.96z m-247.936 0c-21.376-51.456-36.672-115.52-45.952-185.024H184.448a365.504 365.504 0 0 0 203.52 184.96z" fill="#448CF7" p-id="60937"></path></svg>
|
||||
|
After Width: | Height: | Size: 2.1 KiB |
1
src/assets/img/cloud/nutanix.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg t="1717747391666" class="icon" viewBox="0 0 1333 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4694" width="200" height="200"><path d="M1018.488284 0.541672L1314.82427 0a18.458499 18.458499 0 0 1 13.083451 31.500282L894.070504 465.337499a18.458499 18.458499 0 0 1-26.104401 0L720.079363 317.450758a18.458499 18.458499 0 0 1 0-26.093983L1005.477751 5.937553a18.458499 18.458499 0 0 1 13.02095-5.406298zM1018.488284 1023.446662l296.335986 0.552088a18.458499 18.458499 0 0 0 13.083451-31.500282L894.070504 558.650834a18.458499 18.458499 0 0 0-26.104401 0L720.079363 706.547992a18.458499 18.458499 0 0 0 0 26.1044l285.398388 285.398388a18.458499 18.458499 0 0 0 13.02095 5.406298z" fill="#054496" p-id="4695"></path><path d="M821.319852 500.275312L327.34668 5.416715A18.437665 18.437665 0 0 0 314.29448 0H18.510582A18.479332 18.479332 0 0 0 5.437549 31.531532l466.566676 467.400018a18.500166 18.500166 0 0 1 0 26.146067L5.458382 992.425551a18.489749 18.489749 0 0 0 13.083451 31.562782h295.74223a18.437665 18.437665 0 0 0 13.052201-5.416715l493.973172-494.858596a16.593899 16.593899 0 0 0 0-23.448127z" fill="#87BB4C" p-id="4696"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
1
src/assets/img/cloud/openstack.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg t="1717746166860" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="51952" width="200" height="200"><path d="M928.856 10.912H95.142C42.814 10.912 0 53.726 0 106.054v224.202h231.25v-36.64c0-28.418 23.046-51.454 51.464-51.454h458.58c28.42 0 51.456 23.036 51.456 51.456v36.64H1024V106.052c0-52.328-42.816-95.142-95.144-95.142zM792.75 730.38c0 28.42-23.036 51.466-51.456 51.466h-458.58c-28.418 0-51.464-23.046-51.464-51.466v-36.63H0v224.194c0 52.336 42.816 95.142 95.144 95.142h833.714c52.328 0 95.142-42.806 95.142-95.142V693.752H792.75v36.63zM0.006 627.628h231.25V396.38H0.006v231.25z m792.74 0h231.25V396.38H792.748v231.25z" fill="#E72F52" p-id="51953"></path></svg>
|
||||
|
After Width: | Height: | Size: 713 B |
1
src/assets/img/cloud/qcloud.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg t="1717743207396" class="icon" viewBox="0 0 1402 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="35171" width="200" height="200"><path d="M1216.84017881 832.26669714c-22.01770438 22.42169837-66.05311315 55.95324845-143.01407896 55.95324845H600.84945441c143.01407897-139.88312044 264.01045355-257.44554135 275.01930505-268.65639054a860.50843905 860.50843905 0 0 1 65.9521143-61.60917245c55.04426026-50.29732444 98.9786702-55.8522496 137.45915242-55.85224962 55.04426026 0 98.9786702 22.32069952 137.56015263 55.95324846 76.96096581 72.71902281 76.96096581 201.4922929 0 274.2113157z m93.42374503-363.79711171a304.81390494 304.81390494 0 0 0-225.42897111-100.79664655c-77.06196465 0-143.01407897 27.97662354-203.51226695 72.71902278-22.01770438 22.52269721-54.94326142 44.84339811-82.51589098 78.47594568-21.91670555 22.32069952-494.89335097 492.5703818-494.89335097 492.57038317 27.47163072 5.55492517 60.59918544 5.55492517 87.96981869 5.55492517h599.42694635c44.03540877 0 76.96096581 0 110.08852053-5.55492517a335.11349765 335.11349765 0 0 0 203.41126672-89.58579738c126.45030092-123.21834493 126.45030092-330.265563 5.45392772-453.3829077z" fill="#00A3FF" p-id="35172"></path><path d="M528.73642327 435.44302817c-60.80118311-45.14639325-121.70336508-67.66909045-193.51339969-67.66909045a306.02588827 306.02588827 0 0 0-226.74195328 101.60463453 333.80051551 333.80051551 0 0 0 5.55492517 462.97777956c55.24625795 50.80231726 110.59351474 78.98093847 176.94962165 84.63686387l127.1572928-124.22833194h-71.91103484c-71.91103347-5.65592402-116.14843991-28.27962006-143.72106809-56.45824128a206.03723244 206.03723244 0 0 1-5.55492656-282.29120635c38.68247989-39.49046924 82.91988635-56.45824127 138.26714315-56.45824267 33.12755473 0 82.91988635 5.65592402 132.71221657 56.55924012 22.11870323 22.52269721 82.91988635 67.66909045 105.03858956 90.29278788h5.55492518l82.91988496-84.73786132v-5.65592401c-38.68247989-39.49046924-99.58466186-90.29278651-132.71221658-118.57240794" fill="#00C8DC" p-id="35173"></path><path d="M1114.32655611 290.00498256A436.81913102 436.81913102 0 0 0 705.58504746 7.00678432c-218.3590661 0-391.87473546 160.8908378-425.507283 360.66615456 16.76577435 0 33.63254755-5.45392634 55.95324845-5.45392634 22.42169837 0 50.49932212 5.45392634 72.82002164 5.45392634 27.97662354-138.67113711 151.19496845-238.55879549 296.73401291-238.55879412a310.06583359 310.06583359 0 0 1 279.96823856 177.55561331s5.55492517 5.55492517 5.55492517 0c39.18747409-5.55492517 84.03087084-16.66477551 123.21834492-16.66477551 0 5.55492517 0 5.55492517 0 0" fill="#006EFF" p-id="35174"></path></svg>
|
||||
|
After Width: | Height: | Size: 2.6 KiB |
1
src/assets/img/cloud/qcloud_lighthouse.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg t="1717743207396" class="icon" viewBox="0 0 1402 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="35171" width="200" height="200"><path d="M1216.84017881 832.26669714c-22.01770438 22.42169837-66.05311315 55.95324845-143.01407896 55.95324845H600.84945441c143.01407897-139.88312044 264.01045355-257.44554135 275.01930505-268.65639054a860.50843905 860.50843905 0 0 1 65.9521143-61.60917245c55.04426026-50.29732444 98.9786702-55.8522496 137.45915242-55.85224962 55.04426026 0 98.9786702 22.32069952 137.56015263 55.95324846 76.96096581 72.71902281 76.96096581 201.4922929 0 274.2113157z m93.42374503-363.79711171a304.81390494 304.81390494 0 0 0-225.42897111-100.79664655c-77.06196465 0-143.01407897 27.97662354-203.51226695 72.71902278-22.01770438 22.52269721-54.94326142 44.84339811-82.51589098 78.47594568-21.91670555 22.32069952-494.89335097 492.5703818-494.89335097 492.57038317 27.47163072 5.55492517 60.59918544 5.55492517 87.96981869 5.55492517h599.42694635c44.03540877 0 76.96096581 0 110.08852053-5.55492517a335.11349765 335.11349765 0 0 0 203.41126672-89.58579738c126.45030092-123.21834493 126.45030092-330.265563 5.45392772-453.3829077z" fill="#00A3FF" p-id="35172"></path><path d="M528.73642327 435.44302817c-60.80118311-45.14639325-121.70336508-67.66909045-193.51339969-67.66909045a306.02588827 306.02588827 0 0 0-226.74195328 101.60463453 333.80051551 333.80051551 0 0 0 5.55492517 462.97777956c55.24625795 50.80231726 110.59351474 78.98093847 176.94962165 84.63686387l127.1572928-124.22833194h-71.91103484c-71.91103347-5.65592402-116.14843991-28.27962006-143.72106809-56.45824128a206.03723244 206.03723244 0 0 1-5.55492656-282.29120635c38.68247989-39.49046924 82.91988635-56.45824127 138.26714315-56.45824267 33.12755473 0 82.91988635 5.65592402 132.71221657 56.55924012 22.11870323 22.52269721 82.91988635 67.66909045 105.03858956 90.29278788h5.55492518l82.91988496-84.73786132v-5.65592401c-38.68247989-39.49046924-99.58466186-90.29278651-132.71221658-118.57240794" fill="#00C8DC" p-id="35173"></path><path d="M1114.32655611 290.00498256A436.81913102 436.81913102 0 0 0 705.58504746 7.00678432c-218.3590661 0-391.87473546 160.8908378-425.507283 360.66615456 16.76577435 0 33.63254755-5.45392634 55.95324845-5.45392634 22.42169837 0 50.49932212 5.45392634 72.82002164 5.45392634 27.97662354-138.67113711 151.19496845-238.55879549 296.73401291-238.55879412a310.06583359 310.06583359 0 0 1 279.96823856 177.55561331s5.55492517 5.55492517 5.55492517 0c39.18747409-5.55492517 84.03087084-16.66477551 123.21834492-16.66477551 0 5.55492517 0 5.55492517 0 0" fill="#006EFF" p-id="35174"></path></svg>
|
||||
|
After Width: | Height: | Size: 2.6 KiB |
1
src/assets/img/cloud/qing.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg t="1717745876738" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="50950" width="200" height="200"><path d="M494.272 0L347.968 89.088l146.304 86.4V0z m43.904 175.552l146.304-87.488L538.176 0v175.552z m0 731.392l146.304-87.872-146.304-87.68v175.552z m-43.904 0V731.52l-146.304 88.128 146.304 87.36m409.6-205.696L757.568 614.4v175.552l146.304-88.704M289.472 614.4l-146.304 87.68 146.304 87.872V614.4z m468.096-73.152l146.304-88.128-146.304-87.424v175.552z m-468.096 0V365.696L143.168 453.632l146.304 87.68m614.4-336.768L757.568 117.12V292.48l146.304-88m-614.4-87.488l-146.304 88.32 146.304 87.168V117.12z m629.056 307.2V248.704l-146.304 88.256 146.304 87.296m-789.952 0l146.304-88.064-146.304-87.488v175.552z m146.304 146.432L128.576 482.752v175.552l146.304-87.616m497.344 0.192l146.304 87.424V482.752L772.224 570.88m-438.848 43.52v175.552l146.304-88L333.376 614.4m380.352 175.552V614.4l-146.304 87.68 146.304 87.872M333.376 307.2l146.304-88.128-146.304-87.424V307.2z m380.352 541.248l-146.304 88.768L713.728 1024v-175.552z m0-555.904V131.648L567.424 212.672l146.304 79.872" fill="#57B382" p-id="50951"></path><path d="M494.272 0v175.552L347.968 89.088 494.272 0m43.904 175.552V0l146.304 88.064-146.304 87.488m0 731.392V731.52l146.304 87.68-146.304 87.808m-43.904 0l-146.304-87.36 146.304-88.128v175.488z m409.6-205.696l-146.304 88.704V614.4l146.304 86.848M289.472 614.4v175.552L143.168 702.08 289.472 614.4m468.096-73.152V365.696l146.304 87.424-146.304 88.128m-468.096 0L143.168 453.632l146.304-87.936v175.552z m614.4-336.64L757.568 292.48V117.12l146.304 87.488m-614.4-87.488V292.48L143.168 205.44l146.304-88.384m629.056 307.2l-146.304-87.296 146.304-88.32V424.32z m-789.952 0V248.704l146.304 87.488-146.304 88.064m146.304 146.432l-146.304 87.616V482.752l146.304 87.936m497.344 0.192l146.304-88.128v175.552L772.224 570.88m-438.848 43.52l146.304 87.552-146.304 88V614.4z m380.352 175.552l-146.304-87.936L713.728 614.4v175.552zM333.376 307.2V131.648l146.304 87.424L333.376 307.2m380.352 541.248V1024l-146.304-86.784 146.304-88.768m0-555.904L567.424 212.672l146.304-81.024v160.896z" fill="#57B382" p-id="50952" class="custom-cursor-on-hover"></path></svg>
|
||||
|
After Width: | Height: | Size: 2.1 KiB |
1
src/assets/img/cloud/scp.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg t="1717746510567" class="icon" viewBox="0 0 1351 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="55261" width="200" height="200"><path d="M416.92885 824.173591c-56.901379 30.927289-130.232881 35.397249-203.685192-3.745101a159.190971 159.190971 0 0 1-65.35806-64.754011c-79.130368-147.025432 15.826074-294.775723 150.770533-309.635319 7.369393-0.845668 14.738786-1.328907 22.228989-1.328907 59.317574 0 112.353042 25.732471 149.320817 66.324538a249.50832 249.50832 0 0 1-26.457329-111.628184c0-16.188503 1.691336-31.893767 4.590769-47.236601a320.508194 320.508194 0 0 0-127.575067-26.45733c-6.161296 0-12.201782 0.604049-18.242268 0.966478C83.252396 339.122556-77.424535 571.198033 39.036038 806.897801c25.370042 51.344132 66.686967 93.748345 117.668669 119.601625 115.614904 58.713525 230.50495 50.377654 319.420907 0.966478 31.531338-17.51741 38.659111-59.921622 15.946883-88.070288-0.241619-0.362429-0.483239-0.604049-0.724858-0.966477-18.000649-22.349799-49.290367-27.907046-74.418789-14.255548z" fill="#62B0DB" p-id="55262"></path><path d="M443.869418 399.527417c0-16.188503 1.691336-31.893767 4.590769-47.236602 23.557896-123.709156 137.602274-215.403735 270.855398-203.081143 24.041135 2.174575 46.994982 8.094251 68.740732 16.792551 50.377654-17.879839 104.3796-28.148665 160.91855-28.148665 16.550932 0 32.981054 0.845668 49.169557 2.537004C928.558024 59.448048 827.561096 5.929341 715.328864 0.492904c-204.65167-10.027207-377.167953 134.098792-412.565202 326.18625-4.34915 23.678706-6.886154 47.96146-6.886154 72.848263 0 15.826074 1.208097 31.289718 2.899433 46.511743 7.369393-0.845668 14.738786-1.328907 22.228989-1.328907 59.317574 0 112.473852 25.732471 149.320817 66.324538-16.792551-33.464293-26.457329-71.277736-26.457329-111.507374z" fill="#8FC361" p-id="55263"></path><path d="M1114.725806 778.386706S880.717374 806.172943 749.034777 723.176663c-66.928586-42.162593-43.73312-127.937496 50.015225-152.461869 63.666724-16.671742 302.024306-14.376357 457.989657 13.04745 156.086161 27.423807 124.675634 166.717417-142.313853 194.624462zM1316.961282 782.615047s-67.170206 87.22462-241.981874 113.561139c-72.727453 10.993685-135.06527 13.289069-224.102035 0 0 0-70.311258-18.967126-82.392231 35.638868-14.376357 65.23725 157.656688 128.420735 327.998396 62.458627 172.274664-66.566157 220.477743-211.658634 220.477744-211.658634z" fill="#ADD079" p-id="55264"></path><path d="M1341.244036 531.089205s-44.457978-76.955793-241.136206-131.924217c-195.228511-54.605995-295.86301 15.463644-346.240665-30.202431-24.886803-22.470608-5.194818-77.318222 23.557896-101.480167 46.994982-39.504779 176.744624-83.600328 323.407627-20.416843 214.558067 92.540247 240.411348 284.023657 240.411348 284.023658z" fill="#A2CB70" p-id="55265"></path><path d="M783.948786 456.791225s234.008432-27.786236 365.69103 55.210044c66.928586 42.162593 43.73312 127.937496-50.015225 152.461869-63.666724 16.671742-302.024306 14.376357-457.989658-13.04745-156.086161-27.302997-124.675634-166.717417 142.313853-194.624463z m11.839353 535.42869c146.663003 63.183485 276.412645 19.208746 323.407627-20.416843 28.631904-24.161944 48.444699-78.888749 23.557896-101.480167-50.377654-45.666075-151.012153 24.403564-346.240665-30.20243-196.678228-54.968424-241.136206-131.924217-241.136206-131.924217s25.97409 191.60422 240.411348 284.023657zM579.780355 456.791225s67.170206-87.22462 241.981874-113.561139c72.727453-10.993685 135.06527-13.289069 224.102036 0 0 0 70.311258 18.967126 82.39223-35.638868 14.376357-65.23725-157.656688-128.420735-327.998396-62.458626-172.274664 66.566157-220.477743 211.658634-220.477744 211.658633z" fill="#4885BE" p-id="55266"></path></svg>
|
||||
|
After Width: | Height: | Size: 3.6 KiB |
1
src/assets/img/cloud/state.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg t="1717747284124" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2464" width="200" height="200"><path d="M838.4 416c-6.4-70.4-64-115.2-134.4-115.2-19.2 0-38.4 6.4-51.2 6.4-44.8-51.2-115.2-83.2-185.6-83.2-89.6 0-172.8 51.2-211.2 128h-12.8C115.2 352 19.2 448 12.8 576s96 224 224 230.4h294.4c25.6 0 44.8-19.2 44.8-44.8s-19.2-44.8-44.8-44.8H249.6c-70.4 0-134.4-57.6-134.4-128s51.2-128 121.6-134.4c12.8 0 25.6 0 38.4 6.4h6.4l25.6 6.4C320 390.4 390.4 320 473.6 320c57.6 0 108.8 32 140.8 83.2 6.4 6.4 6.4 12.8 6.4 19.2l6.4-6.4c19.2-19.2 51.2-19.2 70.4-19.2 44.8 0 70.4 38.4 70.4 76.8 0 12.8-6.4 25.6-6.4 38.4 12.8 6.4 19.2 19.2 38.4 19.2 6.4-6.4 19.2-12.8 19.2-19.2 64 6.4 115.2 57.6 108.8 128-6.4 57.6-57.6 108.8-121.6 108.8-51.2 0-96-32-115.2-83.2h51.2c6.4 0 12.8-6.4 12.8-12.8s0-6.4-6.4-6.4l-96-128c-6.4-6.4-12.8-12.8-19.2-6.4h-6.4l-96 128c-6.4 6.4-6.4 19.2 6.4 19.2 6.4 0 6.4 6.4 6.4 6.4h57.6c19.2 115.2 128 192 243.2 172.8 115.2-19.2 192-128 172.8-243.2-25.6-96-89.6-160-179.2-179.2z" fill="#F3A22F" p-id="2465"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
1
src/assets/img/cloud/ucloud.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg t="1717743387740" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="38378" width="200" height="200"><path d="M912.192 0C973.952 0 1024 50.048 1024 111.808v800.384c0 61.76-50.048 111.808-111.808 111.808H111.808A111.808 111.808 0 0 1 0 912.192V111.808C0 50.048 50.048 0 111.808 0h800.384zM672 185.152c-23.936-1.088-30.912 6.144-30.656 30.4 1.28 116.864 0.832 233.728 0.384 350.592-0.128 37.76 2.368 75.52-3.392 113.216-6.912 45.184-33.92 71.68-76.16 82.88-52.672 13.952-107.136-1.728-131.2-36.736-17.6-25.728-19.84-55.552-19.904-85.632-0.192-120.32-0.448-240.64 0.192-360.96 0.128-18.432-4.032-26.24-24.448-26.24-20.416 0.128-27.136 8-24.128 26.432 4.608 28.16-8.256 37.12-34.24 33.152-23.168-3.456-35.2 5.248-30.912 29.952 5.312 30.4-6.912 42.304-37.248 37.248-20.416-3.392-30.72 2.304-30.144 26.88 1.6 79.04-0.512 158.08 1.024 237.184 2.24 113.088 79.104 204.8 189.632 230.912a462.08 462.08 0 0 0 187.136 5.632c133.12-23.04 214.08-117.824 214.4-252.416V435.2c0-74.496-0.896-148.992 0.448-223.424 0.448-21.76-6.4-27.264-27.2-26.56-41.152 1.536-82.432 1.92-123.52 0z m-422.784 133.76c-16.832-3.84-18.752 7.04-19.2 21.568-0.384 15.296 3.968 22.208 20.736 22.464 18.496 0.32 22.528-7.36 22.528-24.128 0-16.96-7.296-22.144-24.064-19.84z m73.6-65.92l-4.992 0.448c-17.792-2.816-20.928 7.04-20.8 22.272 0 15.104 6.592 19.456 20.864 19.648 15.68 0.256 22.72-4.224 22.656-21.248 0-17.024-6.72-23.04-22.72-20.672z m-134.464 3.904c-10.88 0.384-12.288 7.36-12.608 16-0.448 11.008 2.88 17.664 15.168 16 12.672 1.216 15.168-6.144 14.912-16.768-0.32-11.84-6.656-15.552-17.472-15.232z m68.032-3.648c-11.776 0.32-19.904 1.664-19.52 16.512 0.32 11.776 1.472 19.968 16.448 19.328 11.52-0.448 21.12-0.896 18.944-16.192 1.28-11.904-0.96-20.096-15.872-19.648z m126.592-68.032c-17.088-0.32-20.8 6.848-20.928 22.336-0.128 16.96 6.848 22.656 22.592 20.352 17.664 2.88 20.288-7.04 20.736-21.952 0.512-17.28-7.232-20.48-22.4-20.736z m-58.816 7.104l-4.736 0.32c-12.48-0.96-22.272-0.064-22.336 16.96 0 15.872 7.552 19.072 21.056 18.752 12.352-0.256 22.08-0.64 22.208-17.6 0.128-16.128-7.616-19.648-20.928-18.112z m-137.6 6.016c-9.088-0.128-10.816 5.632-10.432 13.056 0.384 9.088 6.464 10.304 13.632 9.792 7.872-0.64 11.776-4.928 11.008-12.992-0.832-8.832-7.232-9.792-14.208-9.856z m65.728-5.632h-3.584c-11.328 0.32-11.392 7.936-11.456 16.128 0 10.88 6.976 12.544 15.616 12.096 10.368 0.512 12.928-5.248 13.184-14.528 0.32-13.056-7.552-13.952-17.28-13.696z m66.816-55.68c-7.808 0.256-16.832-0.96-17.472 10.56-0.704 11.712 6.592 15.616 17.024 15.744 9.152 0.128 15.424-2.944 15.36-13.312 0.832-11.008-5.952-13.312-14.912-12.992z m-63.68 0.448c-7.936-0.128-12.352 3.072-12.288 11.456 0.128 7.424 2.752 12.8 11.008 13.376 8.32 0.512 11.712-4.288 12.032-12.032 0.64-7.808-2.176-12.608-10.752-12.8z" fill="#3860F4" p-id="38379" class="custom-cursor-on-hover"></path></svg>
|
||||
|
After Width: | Height: | Size: 2.8 KiB |
1
src/assets/img/cloud/vmware.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg t="1717747341803" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3484" width="200" height="200"><path d="M813.6 65H451.9c-81.8 0-144.7 62.7-144.7 144.1v100.4h-97.5C127.9 309.5 65 372.3 65 453.7v360.5c0 81.4 62.8 144.2 144.7 144.2h358.6c81.8 0 144.7-62.7 144.7-144.2V710.7h100.6c81.8 0 144.7-62.7 144.7-144.2V206c3.2-75.3-62.9-141-144.7-141z m37.8 504.6c-0.4 20.6-17.1 37.3-37.7 37.5H609.2V814c-0.3 20.7-17 37.3-37.7 37.6H209.8c-20.7-0.2-37.4-16.9-37.8-37.6V453.6c0.3-20.7 17.1-37.4 37.8-37.6h204.4V209.1c0-21.9 18.9-37.5 37.8-37.5h361.7c20.6 0.3 37.3 16.9 37.7 37.5v360.5z m0 0" fill="#8FBE48" p-id="3485"></path><path d="M514.8 268.7v235H272.7V745h242.2V510H757V268.7H514.8z m0 0" fill="#F2B624" p-id="3486"></path></svg>
|
||||
|
After Width: | Height: | Size: 773 B |
1
src/assets/img/cloud/volcengine.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg t="1717743222537" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="36225" width="200" height="200"><path d="M830.537143 476.525714L706.413714 961.828571a8.484571 8.484571 0 0 0 0 4.022858 9.069714 9.069714 0 0 0 8.996572 6.948571h248.100571a9.069714 9.069714 0 0 0 9.069714-10.971429l-124.708571-485.302857a9.142857 9.142857 0 0 0-17.334857 0M147.602286 586.386286L51.492571 961.828571a8.996571 8.996571 0 0 0 9.069715 10.971429h191.488a9.142857 9.142857 0 0 0 7.241143-3.291429 8.777143 8.777143 0 0 0 1.755428-3.657142 8.484571 8.484571 0 0 0 0-4.022858L164.864 586.459429a8.777143 8.777143 0 0 0-3.291429-4.534858 9.216 9.216 0 0 0-10.752 0 8.777143 8.777143 0 0 0-3.218285 4.534858" fill="#00E5E5" p-id="36226"></path><path d="M317.074286 275.748571l-175.104 686.08a8.777143 8.777143 0 0 0 1.682285 7.460572c1.682286 2.194286 4.242286 3.437714 6.948572 3.437714h350.354286a9.069714 9.069714 0 0 0 9.069714-10.898286L334.409143 275.748571a8.777143 8.777143 0 0 0-3.291429-4.608 9.216 9.216 0 0 0-10.752 0 8.777143 8.777143 0 0 0-3.291428 4.608" fill="#006EFF" p-id="36227"></path><path d="M619.227429 57.490286A8.777143 8.777143 0 0 0 615.862857 52.955429a9.216 9.216 0 0 0-10.752 0 8.777143 8.777143 0 0 0-3.291428 4.534857L362.569143 961.828571a8.996571 8.996571 0 0 0 8.996571 10.898286h478.354286a9.216 9.216 0 0 0 9.142857-6.875428 8.996571 8.996571 0 0 0 0-4.022858L619.154286 57.490286z" fill="#006EFF" p-id="36228"></path><path d="M443.318857 375.442286L291.474286 961.828571a9.069714 9.069714 0 0 0 9.069714 10.971429l302.957714 0.073143a9.216 9.216 0 0 0 7.314286-3.364572 9.142857 9.142857 0 0 0 1.828571-7.68L460.653714 375.442286a9.216 9.216 0 0 0-8.704-6.290286 9.216 9.216 0 0 0-8.630857 6.290286" fill="#00E5E5" p-id="36229"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
1
src/assets/img/cloud/zstack.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg t="1717746226986" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="52962" width="200" height="200"><path d="M527.36 102.4H450.048L350.0032 266.8544h68.9152L25.6 921.6h263.68l96.256-164.7616H317.1328l299.7248-489.984L527.36 102.4z m124.4672 211.7632l-233.1136 387.584h257.6896l32.512 55.0912H455.168L364.4928 921.6H998.4l-183.7056-327.168H681.472l27.3408-58.0608h69.12l-126.1568-222.208z" fill="#2558E6" p-id="52963"></path></svg>
|
||||
|
After Width: | Height: | Size: 478 B |
BIN
src/assets/img/icons/bsd.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
src/assets/img/icons/cisco.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
src/assets/img/icons/clickhouse.png
Normal file
|
After Width: | Height: | Size: 466 B |
BIN
src/assets/img/icons/db2.png
Normal file
|
After Width: | Height: | Size: 961 B |
BIN
src/assets/img/icons/gateway.png
Normal file
|
After Width: | Height: | Size: 673 B |
BIN
src/assets/img/icons/general.png
Normal file
|
After Width: | Height: | Size: 916 B |
BIN
src/assets/img/icons/gpt.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
src/assets/img/icons/huawei.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
src/assets/img/icons/k8s.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
src/assets/img/icons/linux.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
src/assets/img/icons/macos.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
src/assets/img/icons/mariadb.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
src/assets/img/icons/mongodb.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
src/assets/img/icons/mysql.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
src/assets/img/icons/oracle.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
src/assets/img/icons/other.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
src/assets/img/icons/postgresql.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
src/assets/img/icons/private.png
Normal file
|
After Width: | Height: | Size: 278 B |
BIN
src/assets/img/icons/redis.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
src/assets/img/icons/sqlserver.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
src/assets/img/icons/unix.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
src/assets/img/icons/vmware.png
Normal file
|
After Width: | Height: | Size: 462 B |
BIN
src/assets/img/icons/website.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
src/assets/img/icons/windows.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
src/assets/img/robot-assistant.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
@@ -4,6 +4,7 @@
|
||||
|
||||
<script>
|
||||
import DataActions from '@/components/DataActions'
|
||||
|
||||
export default {
|
||||
name: 'ActionsGroup',
|
||||
components: {
|
||||
@@ -24,9 +25,7 @@ export default {
|
||||
},
|
||||
moreActionsTitle: {
|
||||
type: String,
|
||||
default() {
|
||||
return this.$t('common.MoreActions')
|
||||
}
|
||||
default: ''
|
||||
},
|
||||
moreActionsPlacement: {
|
||||
type: String,
|
||||
@@ -45,8 +44,9 @@ export default {
|
||||
iMoreAction() {
|
||||
const defaultBtn = {
|
||||
name: 'moreActions',
|
||||
title: this.$t('common.MoreActions'),
|
||||
title: '',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-more',
|
||||
plain: true
|
||||
}
|
||||
const btn = {
|
||||
@@ -62,7 +62,3 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
||||
196
src/components/Apps/AccountCreateUpdateForm/const.js
Normal file
@@ -0,0 +1,196 @@
|
||||
import { UpdateToken, UploadSecret } from '@/components/Form/FormFields'
|
||||
import Select2 from '@/components/Form/FormFields/Select2.vue'
|
||||
import { Required, RequiredChange } from '@/components/Form/DataForm/rules'
|
||||
import AutomationParamsForm from '@/views/assets/Platform/AutomationParamsSetting.vue'
|
||||
|
||||
export const accountFieldsMeta = (vm) => {
|
||||
const defaultPrivilegedAccounts = ['root', 'administrator']
|
||||
return {
|
||||
assets: {
|
||||
component: Select2,
|
||||
label: vm.$t('Assets'),
|
||||
rules: [Required],
|
||||
el: {
|
||||
multiple: true,
|
||||
ajax: {
|
||||
url: '/api/v1/assets/assets/',
|
||||
transformOption: (item) => {
|
||||
return { label: item.name + '(' + item.address + ')', value: item.id }
|
||||
}
|
||||
}
|
||||
},
|
||||
hidden: () => {
|
||||
return vm.platform || vm.asset
|
||||
}
|
||||
},
|
||||
template: {
|
||||
component: Select2,
|
||||
rules: [Required],
|
||||
el: {
|
||||
multiple: false,
|
||||
ajax: {
|
||||
url: '/api/v1/accounts/account-templates/',
|
||||
transformOption: (item) => {
|
||||
return { label: item.name, value: item.id }
|
||||
}
|
||||
}
|
||||
},
|
||||
hidden: () => {
|
||||
return vm.platform || vm.asset || !vm.addTemplate
|
||||
}
|
||||
},
|
||||
on_invalid: {
|
||||
rules: [Required],
|
||||
label: vm.$t('AccountPolicy'),
|
||||
helpTip: vm.$t('AccountPolicyHelpText'),
|
||||
hidden: () => {
|
||||
return vm.platform || vm.asset
|
||||
}
|
||||
},
|
||||
name: {
|
||||
label: vm.$t('Name'),
|
||||
rules: [RequiredChange],
|
||||
on: {
|
||||
input: ([value], updateForm) => {
|
||||
if (!vm.usernameChanged) {
|
||||
if (!vm.account?.name) {
|
||||
updateForm({ username: value })
|
||||
}
|
||||
const maybePrivileged = defaultPrivilegedAccounts.includes(value)
|
||||
if (maybePrivileged) {
|
||||
updateForm({ privileged: true })
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
hidden: () => {
|
||||
return vm.addTemplate
|
||||
}
|
||||
},
|
||||
username: {
|
||||
el: {
|
||||
disabled: !!vm.account?.name
|
||||
},
|
||||
on: {
|
||||
input: ([value], updateForm) => {
|
||||
vm.usernameChanged = true
|
||||
},
|
||||
change: ([value], updateForm) => {
|
||||
const maybePrivileged = defaultPrivilegedAccounts.includes(value)
|
||||
if (maybePrivileged) {
|
||||
updateForm({ privileged: true })
|
||||
}
|
||||
}
|
||||
},
|
||||
hidden: () => {
|
||||
return vm.addTemplate
|
||||
}
|
||||
},
|
||||
privileged: {
|
||||
label: vm.$t('Privileged'),
|
||||
hidden: () => {
|
||||
return vm.addTemplate
|
||||
}
|
||||
},
|
||||
su_from: {
|
||||
component: Select2,
|
||||
hidden: (formValue) => {
|
||||
return !vm.asset?.id || !vm.iPlatform.su_enabled
|
||||
},
|
||||
el: {
|
||||
multiple: false,
|
||||
clearable: true,
|
||||
ajax: {
|
||||
url: `/api/v1/accounts/accounts/su-from-accounts/?account=${vm.account?.id || ''}&asset=${vm.asset?.id || ''}`,
|
||||
transformOption: (item) => {
|
||||
return { label: `${item.name}(${item.username})`, value: item.id }
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
su_from_username: {
|
||||
label: vm.$t('UserSwitchFrom'),
|
||||
hidden: (formValue) => {
|
||||
return vm.platform || vm.asset || vm.addTemplate
|
||||
}
|
||||
},
|
||||
password: {
|
||||
label: vm.$t('Password'),
|
||||
component: UpdateToken,
|
||||
hidden: (formValue) => {
|
||||
return formValue.secret_type !== 'password' || vm.addTemplate
|
||||
}
|
||||
},
|
||||
ssh_key: {
|
||||
label: vm.$t('PrivateKey'),
|
||||
component: UploadSecret,
|
||||
hidden: (formValue) => formValue.secret_type !== 'ssh_key' || vm.addTemplate
|
||||
},
|
||||
passphrase: {
|
||||
label: vm.$t('Passphrase'),
|
||||
component: UpdateToken,
|
||||
hidden: (formValue) => formValue.secret_type !== 'ssh_key' || vm.addTemplate
|
||||
},
|
||||
token: {
|
||||
label: vm.$t('Token'),
|
||||
component: UploadSecret,
|
||||
hidden: (formValue) => formValue.secret_type !== 'token' || vm.addTemplate
|
||||
},
|
||||
access_key: {
|
||||
id: 'access_key',
|
||||
label: vm.$t('AccessKey'),
|
||||
component: UploadSecret,
|
||||
hidden: (formValue) => formValue.secret_type !== 'access_key' || vm.addTemplate
|
||||
},
|
||||
api_key: {
|
||||
id: 'api_key',
|
||||
label: vm.$t('ApiKey'),
|
||||
component: UploadSecret,
|
||||
hidden: (formValue) => formValue.secret_type !== 'api_key' || vm.addTemplate
|
||||
},
|
||||
secret_type: {
|
||||
type: 'radio-group',
|
||||
options: [],
|
||||
hidden: () => {
|
||||
return vm.addTemplate
|
||||
}
|
||||
},
|
||||
push_now: {
|
||||
helpTip: vm.$t('WindowsPushHelpText'),
|
||||
hidden: (formValue) => {
|
||||
const automation = vm.iPlatform.automation || {}
|
||||
return !automation.push_account_enabled ||
|
||||
!automation.ansible_enabled ||
|
||||
!vm.$hasPerm('accounts.push_account') ||
|
||||
(formValue.secret_type === 'ssh_key' && vm.iPlatform.type.value === 'windows') ||
|
||||
vm.addTemplate
|
||||
}
|
||||
},
|
||||
params: {
|
||||
label: vm.$t('PushParams'),
|
||||
component: AutomationParamsForm,
|
||||
el: {},
|
||||
hidden: (formValue) => {
|
||||
const automation = vm.iPlatform.automation || {}
|
||||
vm.fieldsMeta.params.el.method = vm.iPlatform.automation.push_account_method
|
||||
vm.fieldsMeta.params.el.pushAccountParams = vm.iPlatform.automation.push_account_params
|
||||
return !formValue.push_now ||
|
||||
!automation.push_account_enabled ||
|
||||
!automation.ansible_enabled ||
|
||||
(formValue.secret_type === 'ssh_key' &&
|
||||
vm.iPlatform.type.value === 'windows') ||
|
||||
!vm.$hasPerm('accounts.push_account') ||
|
||||
vm.addTemplate
|
||||
}
|
||||
},
|
||||
is_active: {
|
||||
label: vm.$t('IsActive')
|
||||
},
|
||||
comment: {
|
||||
label: vm.$t('Comment'),
|
||||
hidden: () => {
|
||||
return vm.addTemplate
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,8 @@
|
||||
<AutoDataForm
|
||||
v-if="!loading"
|
||||
ref="AutoDataForm"
|
||||
:class="addTemplate? '': 'account-add'"
|
||||
:submit-btn-text="submitBtnText"
|
||||
v-bind="$data"
|
||||
@submit="confirm"
|
||||
/>
|
||||
@@ -9,12 +11,8 @@
|
||||
|
||||
<script>
|
||||
import AutoDataForm from '@/components/Form/AutoDataForm/index.vue'
|
||||
import { UpdateToken, UploadSecret } from '@/components/Form/FormFields'
|
||||
import Select2 from '@/components/Form/FormFields/Select2.vue'
|
||||
import AssetSelect from '@/components/Apps/AssetSelect/index.vue'
|
||||
import { encryptPassword } from '@/utils/crypto'
|
||||
import { Required, RequiredChange } from '@/components/Form/DataForm/rules'
|
||||
import AutomationParamsForm from '@/views/assets/Platform/AutomationParamsSetting.vue'
|
||||
import { accountFieldsMeta } from '@/components/Apps/AccountCreateUpdateForm/const'
|
||||
|
||||
export default {
|
||||
name: 'AccountCreateForm',
|
||||
@@ -48,7 +46,7 @@ export default {
|
||||
return {
|
||||
loading: true,
|
||||
usernameChanged: false,
|
||||
defaultPrivilegedAccounts: ['root', 'administrator'],
|
||||
submitBtnText: this.$t('Confirm'),
|
||||
iPlatform: {
|
||||
automation: {},
|
||||
su_enabled: false,
|
||||
@@ -63,187 +61,15 @@ export default {
|
||||
form: Object.assign({ 'on_invalid': 'error' }, this.account || {}),
|
||||
encryptedFields: ['secret'],
|
||||
fields: [
|
||||
[this.$t('assets.Asset'), ['assets']],
|
||||
[this.$t('accounts.AccountTemplate'), ['template']],
|
||||
[this.$t('common.Basic'), ['name', 'username', 'privileged', 'su_from', 'su_from_username']],
|
||||
[this.$t('assets.Secret'), [
|
||||
[this.$t('AccountTemplate'), ['template']],
|
||||
[this.$t('Basic'), ['assets', 'name', 'username', 'privileged', 'su_from', 'su_from_username']],
|
||||
[this.$t('Secret'), [
|
||||
'secret_type', 'password', 'ssh_key', 'token',
|
||||
'access_key', 'passphrase', 'api_key'
|
||||
]],
|
||||
[this.$t('common.Other'), ['push_now', 'params', 'on_invalid', 'is_active', 'comment']]
|
||||
[this.$t('Other'), ['push_now', 'params', 'on_invalid', 'is_active', 'comment']]
|
||||
],
|
||||
fieldsMeta: {
|
||||
assets: {
|
||||
rules: [Required],
|
||||
component: AssetSelect,
|
||||
label: this.$t('assets.Asset'),
|
||||
el: {
|
||||
multiple: false
|
||||
},
|
||||
hidden: () => {
|
||||
return this.platform || this.asset
|
||||
}
|
||||
},
|
||||
template: {
|
||||
component: Select2,
|
||||
rules: [Required],
|
||||
el: {
|
||||
multiple: false,
|
||||
ajax: {
|
||||
url: '/api/v1/accounts/account-templates/',
|
||||
transformOption: (item) => {
|
||||
return { label: item.name, value: item.id }
|
||||
}
|
||||
}
|
||||
},
|
||||
hidden: () => {
|
||||
return this.platform || this.asset || !this.addTemplate
|
||||
}
|
||||
},
|
||||
on_invalid: {
|
||||
rules: [Required],
|
||||
label: this.$t('accounts.AccountPolicy'),
|
||||
helpText: this.$t('accounts.BulkCreateStrategy'),
|
||||
hidden: () => {
|
||||
return this.platform || this.asset
|
||||
}
|
||||
},
|
||||
name: {
|
||||
rules: [RequiredChange],
|
||||
on: {
|
||||
input: ([value], updateForm) => {
|
||||
if (!this.usernameChanged) {
|
||||
if (!this.account?.name) {
|
||||
updateForm({ username: value })
|
||||
}
|
||||
const maybePrivileged = this.defaultPrivilegedAccounts.includes(value)
|
||||
if (maybePrivileged) {
|
||||
updateForm({ privileged: true })
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
hidden: () => {
|
||||
return this.addTemplate
|
||||
}
|
||||
},
|
||||
username: {
|
||||
el: {
|
||||
disabled: !!this.account?.name
|
||||
},
|
||||
on: {
|
||||
input: ([value], updateForm) => {
|
||||
this.usernameChanged = true
|
||||
},
|
||||
change: ([value], updateForm) => {
|
||||
const maybePrivileged = this.defaultPrivilegedAccounts.includes(value)
|
||||
if (maybePrivileged) {
|
||||
updateForm({ privileged: true })
|
||||
}
|
||||
}
|
||||
},
|
||||
hidden: () => {
|
||||
return this.addTemplate
|
||||
}
|
||||
},
|
||||
privileged: {
|
||||
hidden: () => {
|
||||
return this.addTemplate
|
||||
}
|
||||
},
|
||||
su_from: {
|
||||
component: Select2,
|
||||
hidden: (formValue) => {
|
||||
return !this.asset?.id || !this.iPlatform.su_enabled
|
||||
},
|
||||
el: {
|
||||
multiple: false,
|
||||
clearable: true,
|
||||
ajax: {
|
||||
url: `/api/v1/accounts/accounts/su-from-accounts/?account=${this.account?.id || ''}&asset=${this.asset?.id || ''}`,
|
||||
transformOption: (item) => {
|
||||
return { label: `${item.name}(${item.username})`, value: item.id }
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
su_from_username: {
|
||||
label: this.$t('assets.UserSwitchFrom'),
|
||||
hidden: (formValue) => {
|
||||
return this.platform || this.asset || this.addTemplate
|
||||
}
|
||||
},
|
||||
password: {
|
||||
label: this.$t('assets.Password'),
|
||||
component: UpdateToken,
|
||||
hidden: (formValue) => formValue.secret_type !== 'password' || this.addTemplate
|
||||
},
|
||||
ssh_key: {
|
||||
label: this.$t('assets.PrivateKey'),
|
||||
component: UploadSecret,
|
||||
hidden: (formValue) => formValue.secret_type !== 'ssh_key' || this.addTemplate
|
||||
},
|
||||
passphrase: {
|
||||
label: this.$t('assets.Passphrase'),
|
||||
component: UpdateToken,
|
||||
hidden: (formValue) => formValue.secret_type !== 'ssh_key' || this.addTemplate
|
||||
},
|
||||
token: {
|
||||
label: this.$t('assets.Token'),
|
||||
component: UploadSecret,
|
||||
hidden: (formValue) => formValue.secret_type !== 'token' || this.addTemplate
|
||||
},
|
||||
access_key: {
|
||||
id: 'access_key',
|
||||
label: this.$t('assets.AccessKey'),
|
||||
component: UploadSecret,
|
||||
hidden: (formValue) => formValue.secret_type !== 'access_key' || this.addTemplate
|
||||
},
|
||||
api_key: {
|
||||
id: 'api_key',
|
||||
label: this.$t('assets.ApiKey'),
|
||||
component: UploadSecret,
|
||||
hidden: (formValue) => formValue.secret_type !== 'api_key' || this.addTemplate
|
||||
},
|
||||
secret_type: {
|
||||
type: 'radio-group',
|
||||
options: [],
|
||||
hidden: () => {
|
||||
return this.addTemplate
|
||||
}
|
||||
},
|
||||
push_now: {
|
||||
helpText: this.$t('accounts.AccountPush.WindowsPushHelpText'),
|
||||
hidden: (formValue) => {
|
||||
const automation = this.iPlatform.automation || {}
|
||||
return !automation.push_account_enabled ||
|
||||
!automation.ansible_enabled ||
|
||||
!this.$hasPerm('accounts.push_account') ||
|
||||
(formValue.secret_type === 'ssh_key' && this.iPlatform.type.value === 'windows') ||
|
||||
this.addTemplate
|
||||
}
|
||||
},
|
||||
params: {
|
||||
label: this.$t('assets.PushParams'),
|
||||
component: AutomationParamsForm,
|
||||
el: {
|
||||
method: this.asset?.auto_config?.push_account_method
|
||||
},
|
||||
hidden: (formValue) => {
|
||||
const automation = this.iPlatform.automation || {}
|
||||
return !formValue.push_now ||
|
||||
!automation.push_account_enabled ||
|
||||
!automation.ansible_enabled ||
|
||||
!this.$hasPerm('accounts.push_account') ||
|
||||
this.addTemplate
|
||||
}
|
||||
},
|
||||
comment: {
|
||||
hidden: () => {
|
||||
return this.addTemplate
|
||||
}
|
||||
}
|
||||
},
|
||||
fieldsMeta: accountFieldsMeta(this),
|
||||
hasSaveContinue: false
|
||||
}
|
||||
},
|
||||
@@ -251,11 +77,18 @@ export default {
|
||||
try {
|
||||
await this.getPlatform()
|
||||
this.setSecretTypeOptions()
|
||||
this.getDefaultAssets()
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getDefaultAssets() {
|
||||
const assetId = this.$route.query.asset_id
|
||||
if (assetId && !this.form.name) {
|
||||
this.form.assets = [assetId]
|
||||
}
|
||||
},
|
||||
async getPlatform() {
|
||||
if (this.platform) {
|
||||
this.iPlatform = this.platform
|
||||
@@ -269,23 +102,23 @@ export default {
|
||||
setSecretTypeOptions() {
|
||||
const choices = [
|
||||
{
|
||||
label: this.$t('assets.Password'),
|
||||
label: this.$t('Password'),
|
||||
value: 'password'
|
||||
},
|
||||
{
|
||||
label: this.$t('assets.SSHKey'),
|
||||
label: this.$t('SSHKey'),
|
||||
value: 'ssh_key'
|
||||
},
|
||||
{
|
||||
label: this.$t('assets.Token'),
|
||||
label: this.$t('Token'),
|
||||
value: 'token'
|
||||
},
|
||||
{
|
||||
label: this.$t('assets.AccessKey'),
|
||||
label: this.$t('AccessKey'),
|
||||
value: 'access_key'
|
||||
},
|
||||
{
|
||||
label: this.$t('assets.ApiKey'),
|
||||
label: this.$t('ApiKey'),
|
||||
value: 'api_key'
|
||||
}
|
||||
]
|
||||
@@ -321,5 +154,24 @@ export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
<style lang='scss' scoped>
|
||||
.account-add {
|
||||
::v-deep .el-form-item {
|
||||
margin-bottom: 5px;
|
||||
|
||||
.help-block {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .form-group-header {
|
||||
.hr-line-dashed {
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
<template>
|
||||
<GenericUpdateFormDialog
|
||||
v-if="visible"
|
||||
:form-setting="formSetting"
|
||||
:selected-rows="selectedRows"
|
||||
:visible="visible"
|
||||
v-on="$listeners"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { GenericUpdateFormDialog } from '@/layout/components'
|
||||
import { accountFieldsMeta } from '@/components/Apps/AccountCreateUpdateForm/const'
|
||||
import { encryptPassword } from '@/utils/crypto'
|
||||
|
||||
export default {
|
||||
name: 'AccountBulkUpdateDialog',
|
||||
components: {
|
||||
GenericUpdateFormDialog
|
||||
},
|
||||
props: {
|
||||
visible: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
selectedRows: {
|
||||
type: Array,
|
||||
default: () => ([])
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formSetting: {
|
||||
url: '/api/v1/accounts/accounts/',
|
||||
hasSaveContinue: false,
|
||||
fields: [],
|
||||
fieldsMeta: accountFieldsMeta(this),
|
||||
cleanOtherFormValue: (formValue) => {
|
||||
for (const value of formValue) {
|
||||
Object.keys(value).forEach((item, index, arr) => {
|
||||
if (['ssh_key', 'token', 'access_key', 'api_key', 'password'].includes(item)) {
|
||||
value['secret'] = encryptPassword(value[item])
|
||||
delete value[item]
|
||||
}
|
||||
})
|
||||
}
|
||||
return formValue
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.filterFieldsMeta()
|
||||
},
|
||||
methods: {
|
||||
filterFieldsMeta() {
|
||||
let fields = ['privileged']
|
||||
const fieldsMeta = {}
|
||||
const secretFields = ['password', 'ssh_key', 'passphrase', 'token', 'access_key', 'api_key']
|
||||
const secret_type = this.selectedRows[0].secret_type?.value || 'password'
|
||||
for (const field of secretFields) {
|
||||
if (secret_type === 'ssh_key' && field === 'passphrase') {
|
||||
fields.push('passphrase')
|
||||
this.formSetting.fieldsMeta['passphrase'].hidden = () => false
|
||||
continue
|
||||
}
|
||||
if (secret_type === field) {
|
||||
fields.push(field)
|
||||
this.formSetting.fieldsMeta[field].hidden = () => false
|
||||
continue
|
||||
}
|
||||
delete this.formSetting.fieldsMeta[field]
|
||||
}
|
||||
fields = fields.concat(['is_active', 'comment'])
|
||||
for (const field of fields) {
|
||||
fieldsMeta[field] = this.formSetting.fieldsMeta[field]
|
||||
}
|
||||
this.formSetting.fields = fields
|
||||
this.formSetting.fieldsMeta = fieldsMeta
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -8,7 +8,7 @@
|
||||
:title="title"
|
||||
:visible.sync="iVisible"
|
||||
v-bind="$attrs"
|
||||
width="70%"
|
||||
width="900px"
|
||||
v-on="$listeners"
|
||||
>
|
||||
<AccountCreateUpdateForm
|
||||
@@ -53,7 +53,7 @@ export default {
|
||||
title: {
|
||||
type: String,
|
||||
default: function() {
|
||||
return this.$t('assets.AddAccount')
|
||||
return this.$t('AddAccount')
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -92,7 +92,7 @@ export default {
|
||||
data = formValue
|
||||
url = `/api/v1/accounts/accounts/bulk/`
|
||||
if (data.assets.length === 0) {
|
||||
this.$message.error(this.$tc('assets.PleaseSelectAsset'))
|
||||
this.$message.error(this.$tc('PleaseSelectAsset'))
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -114,7 +114,7 @@ export default {
|
||||
this.$axios.patch(`/api/v1/accounts/accounts/${this.account.id}/`, data).then(() => {
|
||||
this.iVisible = false
|
||||
this.$emit('add', true)
|
||||
this.$message.success(this.$tc('common.updateSuccessMsg'))
|
||||
this.$message.success(this.$tc('UpdateSuccessMsg'))
|
||||
}).catch(error => this.setFieldError(error))
|
||||
},
|
||||
handleResult(resp, error) {
|
||||
@@ -127,7 +127,7 @@ export default {
|
||||
}
|
||||
if (!bulkCreate) {
|
||||
if (!error) {
|
||||
this.$message.success(this.$tc('common.createSuccessMsg'))
|
||||
this.$message.success(this.$tc('CreateSuccessMsg'))
|
||||
} else {
|
||||
this.setFieldError(error)
|
||||
}
|
||||
@@ -172,7 +172,3 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
:account="account"
|
||||
:add-template="true"
|
||||
:asset="iAsset"
|
||||
:title="accountCreateUpdateTitle"
|
||||
:title="accountCreateByTemplateTitle"
|
||||
:visible.sync="showAddTemplateDialog"
|
||||
@add="addAccountSuccess"
|
||||
@bulk-create-done="showBulkCreateResult($event)"
|
||||
@@ -36,6 +36,13 @@
|
||||
v-if="showResultDialog"
|
||||
:result="createAccountResults"
|
||||
:visible.sync="showResultDialog"
|
||||
@close-all="closeAll"
|
||||
/>
|
||||
<AccountBulkUpdateDialog
|
||||
v-if="updateSelectedDialogSetting.visible"
|
||||
:visible.sync="updateSelectedDialogSetting.visible"
|
||||
v-bind="updateSelectedDialogSetting"
|
||||
@update="handleAccountBulkUpdate"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@@ -49,10 +56,12 @@ import AccountCreateUpdate from './AccountCreateUpdate.vue'
|
||||
import { connectivityMeta } from './const'
|
||||
import { openTaskPage } from '@/utils/jms'
|
||||
import ResultDialog from './BulkCreateResultDialog.vue'
|
||||
import AccountBulkUpdateDialog from '@/components/Apps/AccountListTable/AccountBulkUpdateDialog.vue'
|
||||
|
||||
export default {
|
||||
name: 'AccountListTable',
|
||||
components: {
|
||||
AccountBulkUpdateDialog,
|
||||
ResultDialog,
|
||||
ListTable,
|
||||
UpdateSecretInfo,
|
||||
@@ -110,13 +119,16 @@ export default {
|
||||
columnsDefault: {
|
||||
type: Array,
|
||||
default: () => ([
|
||||
'name', 'username', 'asset', 'privileged',
|
||||
'secret_type', 'is_active', 'date_updated'
|
||||
'name', 'username', 'asset', 'date_updated'
|
||||
])
|
||||
},
|
||||
headerExtraActions: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
extraQuery: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -128,7 +140,8 @@ export default {
|
||||
showAddDialog: false,
|
||||
showAddTemplateDialog: false,
|
||||
createAccountResults: [],
|
||||
accountCreateUpdateTitle: this.$t('assets.AddAccount'),
|
||||
accountCreateUpdateTitle: this.$t('AddAccount'),
|
||||
accountCreateByTemplateTitle: this.$t('AddAccountByTemplate'),
|
||||
iAsset: this.asset,
|
||||
account: {},
|
||||
secretUrl: '',
|
||||
@@ -138,9 +151,7 @@ export default {
|
||||
app: 'assets',
|
||||
resource: 'account'
|
||||
},
|
||||
extraQuery: {
|
||||
order: '-date_updated'
|
||||
},
|
||||
extraQuery: this.extraQuery,
|
||||
columnsExclude: ['spec_info'],
|
||||
columnsShow: {
|
||||
min: ['name', 'username', 'actions'],
|
||||
@@ -148,6 +159,7 @@ export default {
|
||||
},
|
||||
columnsMeta: {
|
||||
name: {
|
||||
width: '120px',
|
||||
formatter: function(row) {
|
||||
const to = {
|
||||
name: 'AssetAccountDetail',
|
||||
@@ -161,7 +173,6 @@ export default {
|
||||
}
|
||||
},
|
||||
asset: {
|
||||
label: this.$t('assets.Asset'),
|
||||
formatter: function(row) {
|
||||
const to = {
|
||||
name: 'AssetDetail',
|
||||
@@ -174,8 +185,10 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
username: {
|
||||
width: '120px'
|
||||
},
|
||||
secret_type: {
|
||||
width: '100px',
|
||||
formatter: function(row) {
|
||||
return row.secret_type.label
|
||||
}
|
||||
@@ -186,17 +199,16 @@ export default {
|
||||
}
|
||||
},
|
||||
has_secret: {
|
||||
width: '100px',
|
||||
width: '120px',
|
||||
formatterArgs: {
|
||||
showFalse: false
|
||||
}
|
||||
},
|
||||
privileged: {
|
||||
label: this.$t('assets.Privileged'),
|
||||
width: '120px',
|
||||
formatterArgs: {
|
||||
showText: false,
|
||||
showFalse: false
|
||||
showFalse: true
|
||||
}
|
||||
},
|
||||
connectivity: connectivityMeta,
|
||||
@@ -206,11 +218,11 @@ export default {
|
||||
hasUpdate: false, // can set function(row, value)
|
||||
hasDelete: false, // can set function(row, value)
|
||||
hasClone: this.hasClone,
|
||||
moreActionsTitle: this.$t('common.More'),
|
||||
moreActionsTitle: this.$t('More'),
|
||||
extraActions: [
|
||||
{
|
||||
name: 'View',
|
||||
title: this.$t('common.View'),
|
||||
title: this.$t('View'),
|
||||
can: this.$hasPerm('accounts.view_accountsecret'),
|
||||
type: 'primary',
|
||||
callback: ({ row }) => {
|
||||
@@ -224,25 +236,29 @@ export default {
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'ClearSecret',
|
||||
title: this.$t('common.ClearSecret'),
|
||||
can: this.$hasPerm('accounts.change_account'),
|
||||
type: 'primary',
|
||||
name: 'Update',
|
||||
title: this.$t('Edit'),
|
||||
can: this.$hasPerm('accounts.change_account') && !this.$store.getters.currentOrgIsRoot,
|
||||
callback: ({ row }) => {
|
||||
this.$axios.patch(
|
||||
`/api/v1/accounts/accounts/clear-secret/`,
|
||||
{ account_ids: [row.id] }
|
||||
).then(() => {
|
||||
this.$message.success(this.$tc('common.ClearSuccessMsg'))
|
||||
const data = {
|
||||
...this.asset,
|
||||
...row.asset
|
||||
}
|
||||
vm.account = row
|
||||
vm.iAsset = data
|
||||
vm.showAddDialog = false
|
||||
vm.accountCreateUpdateTitle = this.$t('UpdateAccount')
|
||||
setTimeout(() => {
|
||||
vm.showAddDialog = true
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'Test',
|
||||
title: this.$t('common.Test'),
|
||||
title: this.$t('Test'),
|
||||
can: ({ row }) =>
|
||||
!this.$store.getters.currentOrgIsRoot &&
|
||||
this.$hasPerm('accounts.change_account') &&
|
||||
this.$hasPerm('accounts.verify_account') &&
|
||||
row.asset['auto_config'].ansible_enabled &&
|
||||
row.asset['auto_config'].ping_enabled,
|
||||
callback: ({ row }) => {
|
||||
@@ -255,20 +271,16 @@ export default {
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'Update',
|
||||
title: this.$t('common.Update'),
|
||||
can: this.$hasPerm('accounts.change_account') && !this.$store.getters.currentOrgIsRoot,
|
||||
name: 'ClearSecret',
|
||||
title: this.$t('ClearSecret'),
|
||||
can: this.$hasPerm('accounts.change_account'),
|
||||
type: 'primary',
|
||||
callback: ({ row }) => {
|
||||
const data = {
|
||||
...this.asset,
|
||||
...row.asset
|
||||
}
|
||||
vm.account = row
|
||||
vm.iAsset = data
|
||||
vm.showAddDialog = false
|
||||
vm.accountCreateUpdateTitle = this.$t('assets.UpdateAccount')
|
||||
setTimeout(() => {
|
||||
vm.showAddDialog = true
|
||||
this.$axios.patch(
|
||||
`/api/v1/accounts/accounts/clear-secret/`,
|
||||
{ account_ids: [row.id] }
|
||||
).then(() => {
|
||||
this.$message.success(this.$tc('ClearSuccessMsg'))
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -279,22 +291,16 @@ export default {
|
||||
}
|
||||
},
|
||||
headerActions: {
|
||||
hasLabelSearch: true,
|
||||
hasLeftActions: this.hasLeftActions,
|
||||
hasMoreActions: true,
|
||||
hasCreate: false,
|
||||
hasImport: this.hasImport,
|
||||
hasExport: this.hasExport && this.$hasPerm('accounts.view_accountsecret'),
|
||||
handleImportClick: ({ selectedRows }) => {
|
||||
this.$eventBus.$emit('showImportDialog', {
|
||||
selectedRows,
|
||||
url: '/api/v1/accounts/accounts/',
|
||||
name: this?.name
|
||||
})
|
||||
},
|
||||
exportOptions: {
|
||||
url: this.exportUrl,
|
||||
mfaVerifyRequired: true,
|
||||
tips: this.$t('accounts.AccountExportTips')
|
||||
tips: this.$t('AccountExportTips')
|
||||
},
|
||||
importOptions: {
|
||||
canImportCreate: this.$hasPerm('accounts.add_account'),
|
||||
@@ -303,8 +309,9 @@ export default {
|
||||
extraActions: [
|
||||
{
|
||||
name: 'add',
|
||||
title: this.$t('common.Add'),
|
||||
title: this.$t('Create'),
|
||||
type: 'primary',
|
||||
icon: 'plus',
|
||||
can: () => {
|
||||
return vm.$hasPerm('accounts.add_account') && !this.$store.getters.currentOrgIsRoot
|
||||
},
|
||||
@@ -313,14 +320,13 @@ export default {
|
||||
setTimeout(() => {
|
||||
vm.iAsset = this.asset
|
||||
vm.account = {}
|
||||
vm.accountCreateUpdateTitle = this.$t('assets.AddAccount')
|
||||
vm.showAddDialog = true
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'add-template',
|
||||
title: this.$t('common.TemplateAdd'),
|
||||
title: this.$t('TemplateAdd'),
|
||||
has: !(this.platform || this.asset),
|
||||
can: () => {
|
||||
return vm.$hasPerm('accounts.add_account') && !this.$store.getters.currentOrgIsRoot
|
||||
@@ -330,7 +336,6 @@ export default {
|
||||
setTimeout(() => {
|
||||
vm.iAsset = this.asset
|
||||
vm.account = {}
|
||||
vm.accountCreateUpdateTitle = this.$t('assets.AddAccount')
|
||||
vm.showAddTemplateDialog = true
|
||||
})
|
||||
}
|
||||
@@ -339,23 +344,63 @@ export default {
|
||||
],
|
||||
extraMoreActions: [
|
||||
{
|
||||
name: 'ClearSecrets',
|
||||
title: this.$t('common.ClearSecret'),
|
||||
name: 'TestSelected',
|
||||
title: this.$t('TestSelected'),
|
||||
type: 'primary',
|
||||
fa: 'clean',
|
||||
icon: 'fa-link',
|
||||
can: ({ selectedRows }) => {
|
||||
return selectedRows.length > 0 &&
|
||||
['clickhouse', 'redis', 'website', 'chatgpt'].indexOf(selectedRows[0].asset.type.value) === -1 &&
|
||||
!this.$store.getters.currentOrgIsRoot
|
||||
},
|
||||
callback: function({ selectedRows }) {
|
||||
const ids = selectedRows.map(v => {
|
||||
return v.id
|
||||
})
|
||||
this.$axios.post(
|
||||
'/api/v1/accounts/accounts/tasks/',
|
||||
{ action: 'verify', accounts: ids }).then(res => {
|
||||
openTaskPage(res['task'])
|
||||
}).catch(err => {
|
||||
this.$message.error(this.$tc('BulkVerifyErrorMsg' + ' ' + err))
|
||||
})
|
||||
}.bind(this)
|
||||
},
|
||||
{
|
||||
name: 'BatchClearSecret',
|
||||
title: this.$t('ClearSecret'),
|
||||
type: 'primary',
|
||||
icon: 'clean',
|
||||
can: ({ selectedRows }) => {
|
||||
return selectedRows.length > 0 && vm.$hasPerm('accounts.change_account')
|
||||
},
|
||||
callback: function({ selectedRows }) {
|
||||
const ids = selectedRows.map(v => { return v.id })
|
||||
const ids = selectedRows.map(v => {
|
||||
return v.id
|
||||
})
|
||||
this.$axios.patch(
|
||||
'/api/v1/accounts/accounts/clear-secret/',
|
||||
{ account_ids: ids }).then(() => {
|
||||
this.$message.success(this.$tc('common.ClearSuccessMsg'))
|
||||
this.$message.success(this.$tc('ClearSuccessMsg'))
|
||||
}).catch(err => {
|
||||
this.$message.error(this.$tc('common.bulkClearErrorMsg' + ' ' + err))
|
||||
this.$message.error(this.$tc('ClearErrorMsg' + ' ' + err))
|
||||
})
|
||||
}.bind(this)
|
||||
},
|
||||
{
|
||||
name: 'UpdateSelected',
|
||||
title: this.$t('UpdateSelected'),
|
||||
icon: 'batch-update',
|
||||
can: ({ selectedRows }) => {
|
||||
return selectedRows.length > 0 &&
|
||||
!this.$store.getters.currentOrgIsRoot &&
|
||||
vm.$hasPerm('accounts.change_account') &&
|
||||
selectedRows.every(i => i.secret_type.value === selectedRows[0].secret_type.value)
|
||||
},
|
||||
callback: ({ selectedRows }) => {
|
||||
vm.updateSelectedDialogSetting.selectedRows = selectedRows
|
||||
vm.updateSelectedDialogSetting.visible = true
|
||||
}
|
||||
}
|
||||
],
|
||||
canBulkDelete: vm.$hasPerm('accounts.delete_account'),
|
||||
@@ -364,6 +409,10 @@ export default {
|
||||
exclude: ['asset']
|
||||
},
|
||||
hasSearch: true
|
||||
},
|
||||
updateSelectedDialogSetting: {
|
||||
visible: false,
|
||||
selectedRows: []
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -387,19 +436,34 @@ export default {
|
||||
this.tableConfig.columnsMeta.actions.formatterArgs.extraActions.push(
|
||||
{
|
||||
name: 'Delete',
|
||||
title: this.$t('common.Delete'),
|
||||
title: this.$t('Delete'),
|
||||
can: this.$hasPerm('accounts.delete_account'),
|
||||
type: 'primary',
|
||||
callback: ({ row }) => {
|
||||
this.$axios.delete(`/api/v1/accounts/accounts/${row.id}/`).then(() => {
|
||||
this.$message.success(this.$tc('common.deleteSuccessMsg'))
|
||||
this.$refs.ListTable.reloadTable()
|
||||
const msg = this.$t('AccountDeleteConfirmMsg')
|
||||
this.$confirm(msg, this.$tc('Info'), {
|
||||
type: 'warning',
|
||||
confirmButtonClass: 'el-button--danger',
|
||||
beforeClose: async(action, instance, done) => {
|
||||
if (action !== 'confirm') return done()
|
||||
this.$axios.delete(`/api/v1/accounts/accounts/${row.id}/`).then(() => {
|
||||
done()
|
||||
this.$refs.ListTable.reloadTable()
|
||||
this.$message.success(this.$tc('DeleteSuccessMsg'))
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
},
|
||||
activated() {
|
||||
// 由于组件嵌套较深,有可能导致 Error in activated hook: "TypeError: Cannot read properties of undefined (reading 'getList')" 的问题
|
||||
setTimeout(() => {
|
||||
this.refresh()
|
||||
}, 300)
|
||||
},
|
||||
methods: {
|
||||
onUpdateAuthDone(account) {
|
||||
Object.assign(this.account, account)
|
||||
@@ -417,11 +481,27 @@ export default {
|
||||
this.$refs.ListTable.reloadTable()
|
||||
},
|
||||
showBulkCreateResult(results) {
|
||||
this.showResultDialog = false
|
||||
this.createAccountResults = results
|
||||
setTimeout(() => {
|
||||
this.showResultDialog = true
|
||||
}, 100)
|
||||
this.createAccountResults = results
|
||||
}, 350)
|
||||
},
|
||||
handleAccountBulkUpdate() {
|
||||
this.updateSelectedDialogSetting.visible = false
|
||||
this.$refs.ListTable.reloadTable()
|
||||
},
|
||||
closeAll() {
|
||||
setTimeout(() => {
|
||||
this.showResultDialog = false
|
||||
}, 350)
|
||||
|
||||
setTimeout(() => {
|
||||
this.showAddDialog = false
|
||||
}, 800)
|
||||
|
||||
setTimeout(() => {
|
||||
this.refresh()
|
||||
}, 1000)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,11 +30,11 @@ export default {
|
||||
}
|
||||
},
|
||||
data() {
|
||||
const errorProp = this.$t('common.Error')
|
||||
const errorProp = this.$t('Error')
|
||||
const stateMap = {
|
||||
'created': this.$tc('common.Created'),
|
||||
'updated': this.$tc('common.Updated'),
|
||||
'skipped': this.$tc('common.Skipped')
|
||||
'created': this.$tc('Created'),
|
||||
'updated': this.$tc('Updated'),
|
||||
'skipped': this.$tc('Skipped')
|
||||
}
|
||||
const stateClsMap = {
|
||||
'created': 'color-primary',
|
||||
@@ -42,16 +42,16 @@ export default {
|
||||
'skipped': 'color-default'
|
||||
}
|
||||
return {
|
||||
title: this.$t('accounts.AddAccountResult'),
|
||||
title: this.$t('AddAccountResult'),
|
||||
config: {
|
||||
columns: [
|
||||
{
|
||||
prop: 'asset',
|
||||
label: this.$t('assets.Asset')
|
||||
label: this.$t('Asset')
|
||||
},
|
||||
{
|
||||
prop: 'state',
|
||||
label: this.$t('common.Status'),
|
||||
label: this.$t('Status'),
|
||||
width: '200px',
|
||||
formatter: (row) => {
|
||||
if (row.error) {
|
||||
@@ -71,11 +71,11 @@ export default {
|
||||
computed: {
|
||||
summary() {
|
||||
const labels = {
|
||||
total: this.$tc('common.Total'),
|
||||
created: this.$tc('common.Created'),
|
||||
updated: this.$tc('common.Updated'),
|
||||
skipped: this.$tc('common.Skipped'),
|
||||
error: this.$tc('common.Error')
|
||||
total: this.$tc('Total'),
|
||||
created: this.$tc('Created'),
|
||||
updated: this.$tc('Updated'),
|
||||
skipped: this.$tc('Skipped'),
|
||||
error: this.$tc('Error')
|
||||
}
|
||||
const grouped = _.groupBy(this.result, 'state')
|
||||
const groupedLength = _.mapValues(grouped, 'length')
|
||||
@@ -91,7 +91,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
closeDialog() {
|
||||
this.$emit('update:visible', false)
|
||||
this.$emit('close-all')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
config: {
|
||||
title: this.$t('accounts.HistoryPassword'),
|
||||
title: this.$t('HistoryPassword'),
|
||||
visible: false,
|
||||
width: '60%',
|
||||
tableConfig: {
|
||||
@@ -32,7 +32,7 @@ export default {
|
||||
columns: ['secret', 'version', 'history_date'],
|
||||
columnsMeta: {
|
||||
secret: {
|
||||
label: this.$t('assets.Password'),
|
||||
label: this.$t('Password'),
|
||||
formatter: ShowKeyCopyFormatter,
|
||||
formatterArgs: {
|
||||
hasDownload: false,
|
||||
@@ -40,7 +40,7 @@ export default {
|
||||
}
|
||||
},
|
||||
history_date: {
|
||||
label: this.$t('accounts.HistoryDate')
|
||||
label: this.$t('HistoryDate')
|
||||
},
|
||||
secret_type: {
|
||||
width: '200px'
|
||||
|
||||
112
src/components/Apps/AccountListTable/RemoveAccount.vue
Normal file
@@ -0,0 +1,112 @@
|
||||
<template>
|
||||
<Dialog
|
||||
:destroy-on-close="true"
|
||||
:show-cancel="false"
|
||||
:visible.sync="show"
|
||||
:width="'50'"
|
||||
v-bind="$attrs"
|
||||
@confirm="accountConfirmHandle"
|
||||
v-on="$listeners"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Dialog from '@/components/Dialog/index.vue'
|
||||
import { openTaskPage } from '@/utils/jms'
|
||||
|
||||
export default {
|
||||
name: 'RemoveAccount',
|
||||
components: {
|
||||
Dialog
|
||||
},
|
||||
props: {
|
||||
accounts: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
visible: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
mfaDialogVisible: true
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
mounted() {
|
||||
const url = `/api/v1/accounts/accounts/tasks/`
|
||||
this.$axios.post(
|
||||
url, { disableFlashErrorMsg: true, action: 'remove' }
|
||||
).then(resp => {
|
||||
this.$axios.post(
|
||||
`/api/v1/accounts/accounts/tasks/`,
|
||||
{
|
||||
action: 'remove',
|
||||
gather_accounts: this.accounts.map(account => account.id)
|
||||
}
|
||||
).then(res => {
|
||||
openTaskPage(res['task'])
|
||||
})
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
accountConfirmHandle() {
|
||||
this.show = false
|
||||
this.mfaDialogVisible = false
|
||||
},
|
||||
exit() {
|
||||
this.$emit('update:visible', false)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.item-textarea ::v-deep .el-textarea__inner {
|
||||
height: 110px;
|
||||
}
|
||||
|
||||
.el-form-item {
|
||||
border-bottom: 1px solid #EBEEF5;
|
||||
padding: 5px 0;
|
||||
margin-bottom: 0;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
::v-deep .el-form-item__label {
|
||||
padding-right: 20px;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
::v-deep .el-form-item__content {
|
||||
line-height: 30px;
|
||||
|
||||
pre {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ul {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
li {
|
||||
display: block;
|
||||
font-size: 13px;
|
||||
margin-bottom: 8px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
.title {
|
||||
color: #303133;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<Dialog
|
||||
:destroy-on-close="true"
|
||||
:title="$tc('assets.UpdateAssetUserToken')"
|
||||
:title="$tc('UpdateAssetUserToken')"
|
||||
:visible.sync="visible"
|
||||
width="50"
|
||||
@cancel="handleCancel()"
|
||||
@@ -9,19 +9,19 @@
|
||||
v-on="$listeners"
|
||||
>
|
||||
<el-form label-position="right" label-width="90px">
|
||||
<el-form-item :label="$tc('assets.Name')">
|
||||
<el-form-item :label="$tc('Name')">
|
||||
<el-input v-model="account['asset_name']" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$tc('assets.Username')">
|
||||
<el-form-item :label="$tc('Username')">
|
||||
<el-input v-model="account['username']" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$tc('assets.Password')">
|
||||
<el-form-item :label="$tc('Password')">
|
||||
<UpdateToken v-model="authInfo.password" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$tc('assets.SSHSecretKey')">
|
||||
<el-form-item :label="$tc('SSHSecretKey')">
|
||||
<UploadKey @input="getFile" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$tc('assets.Passphrase')">
|
||||
<el-form-item :label="$tc('Passphrase')">
|
||||
<UpdateToken v-model="authInfo.passphrase" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -75,12 +75,12 @@ export default {
|
||||
{ disableFlashErrorMsg: true }
|
||||
).then(res => {
|
||||
this.authInfo = { password: '', private_key: '' }
|
||||
this.$message.success(this.$tc('common.updateSuccessMsg'))
|
||||
this.$message.success(this.$tc('UpdateSuccessMsg'))
|
||||
this.$emit('updateAuthDone', res)
|
||||
this.$emit('update:visible', false)
|
||||
}).catch(err => {
|
||||
const errMsg = Object.values(err.response.data).join(', ')
|
||||
this.$message.error(this.$tc('common.updateErrorMsg') + ' ' + errMsg)
|
||||
this.$message.error(this.$tc('UpdateErrorMsg') + ' ' + errMsg)
|
||||
this.$emit('update:visible', true)
|
||||
})
|
||||
},
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<div v-if="mfaDialogVisible">
|
||||
<UserConfirmDialog
|
||||
:url="url"
|
||||
@UserConfirmCancel="exit"
|
||||
@UserConfirmDone="getAuthInfo"
|
||||
/>
|
||||
</div>
|
||||
<Dialog
|
||||
:destroy-on-close="true"
|
||||
:show-cancel="false"
|
||||
@@ -17,11 +10,11 @@
|
||||
@confirm="accountConfirmHandle"
|
||||
v-on="$listeners"
|
||||
>
|
||||
<el-form :model="secretInfo" class="password-form" label-position="right" label-width="100px">
|
||||
<el-form-item :label="$tc('assets.Name')">
|
||||
<el-form :model="secretInfo" class="password-form" label-position="right" label-width="130px">
|
||||
<el-form-item :label="$tc('Name')">
|
||||
<span>{{ account['name'] }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$tc('assets.Username')">
|
||||
<el-form-item :label="$tc('Username')">
|
||||
<span>{{ account['username'] }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item :label="secretTypeLabel">
|
||||
@@ -34,16 +27,16 @@
|
||||
@input="onShowKeyCopyFormatterChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="secretType === 'ssh_key'" :label="$tc('assets.sshKeyFingerprint')">
|
||||
<el-form-item v-if="secretType === 'ssh_key'" :label="$tc('SshKeyFingerprint')">
|
||||
<span>{{ sshKeyFingerprint }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$tc('common.DateCreated')">
|
||||
<el-form-item :label="$tc('DateCreated')">
|
||||
<span>{{ account['date_created'] | date }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$tc('common.DateUpdated')">
|
||||
<el-form-item :label="$tc('DateUpdated')">
|
||||
<span>{{ account['date_updated'] | date }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="showPasswordRecord" v-perms="'accounts.view_accountsecret'" :label="$tc('accounts.PasswordRecord')">
|
||||
<el-form-item v-if="showPasswordRecord" v-perms="'accounts.view_accountsecret'" :label="$tc('PasswordRecord')">
|
||||
<el-link
|
||||
:underline="false"
|
||||
type="success"
|
||||
@@ -67,7 +60,6 @@
|
||||
<script>
|
||||
import Dialog from '@/components/Dialog/index.vue'
|
||||
import PasswordHistoryDialog from './PasswordHistoryDialog.vue'
|
||||
import UserConfirmDialog from '@/components/Apps/UserConfirmDialog/index.vue'
|
||||
import { ShowKeyCopyFormatter } from '@/components/Table/TableFormatters'
|
||||
import { encryptPassword } from '@/utils/crypto'
|
||||
|
||||
@@ -76,7 +68,6 @@ export default {
|
||||
components: {
|
||||
Dialog,
|
||||
PasswordHistoryDialog,
|
||||
UserConfirmDialog,
|
||||
ShowKeyCopyFormatter
|
||||
},
|
||||
props: {
|
||||
@@ -92,10 +83,14 @@ export default {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: 'account'
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: function() {
|
||||
return this.$tc('assets.AccountDetail')
|
||||
return this.$tc('Detail')
|
||||
}
|
||||
},
|
||||
showPasswordRecord: {
|
||||
@@ -128,7 +123,10 @@ export default {
|
||||
const url = `/api/v1/accounts/account-secrets/${this.account.id}/histories/?limit=1`
|
||||
this.$axios.get(url, { disableFlashErrorMsg: true }).then(resp => {
|
||||
this.versions = resp.count
|
||||
this.showSecretDialog()
|
||||
})
|
||||
} else {
|
||||
this.showSecretDialog()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -142,14 +140,15 @@ export default {
|
||||
name: this.secretInfo.name,
|
||||
secret: encryptPassword(this.modifiedSecret)
|
||||
}
|
||||
this.$axios.patch(`/api/v1/accounts/accounts/${this.account.id}/`, params).then(() => {
|
||||
this.$message.success(this.$tc('common.updateSuccessMsg'))
|
||||
const url = this.type === 'account' ? `/api/v1/accounts/accounts` : `/api/v1/accounts/account-templates`
|
||||
this.$axios.patch(`${url}/${this.account.id}/`, params).then(() => {
|
||||
this.$message.success(this.$tc('UpdateSuccessMsg'))
|
||||
})
|
||||
},
|
||||
getAuthInfo() {
|
||||
this.$axios.get(this.url, { disableFlashErrorMsg: true }).then(resp => {
|
||||
this.secretInfo = resp
|
||||
this.sshKeyFingerprint = resp?.spec_info?.ssh_key_fingerprint || '-'
|
||||
showSecretDialog() {
|
||||
return this.$axios.get(this.url, { disableFlashErrorMsg: true }).then((res) => {
|
||||
this.secretInfo = res
|
||||
this.sshKeyFingerprint = res?.spec_info?.ssh_key_fingerprint || '-'
|
||||
this.showSecret = true
|
||||
})
|
||||
},
|
||||
@@ -168,7 +167,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.item-textarea >>> .el-textarea__inner {
|
||||
.item-textarea ::v-deep .el-textarea__inner {
|
||||
height: 110px;
|
||||
}
|
||||
|
||||
@@ -181,12 +180,18 @@ export default {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
>>> .el-form-item__label {
|
||||
::v-deep .el-form-item__label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
padding-right: 20px;
|
||||
line-height: 30px;
|
||||
word-break: keep-all;
|
||||
overflow-wrap: break-word;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
>>> .el-form-item__content {
|
||||
::v-deep .el-form-item__content {
|
||||
line-height: 30px;
|
||||
|
||||
pre {
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import i18n from '@/i18n/i18n'
|
||||
import { ChoicesFormatter } from '@/components/Table/TableFormatters'
|
||||
|
||||
export const connectivityMeta = {
|
||||
label: i18n.t('assets.Connectivity'),
|
||||
formatter: ChoicesFormatter,
|
||||
formatterArgs: {
|
||||
faChoices: {
|
||||
@@ -22,5 +20,5 @@ export const connectivityMeta = {
|
||||
}
|
||||
}
|
||||
},
|
||||
width: '100px'
|
||||
width: '130px'
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<el-button :disabled="disabled" :type="type" size="small" @click="addObjects">{{ $t('common.Add') }}</el-button>
|
||||
<el-button :disabled="disabled" :type="type" size="small" @click="addObjects">{{ $t('Add') }}</el-button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<template>
|
||||
<Dialog
|
||||
:title="$tc('assets.Assets')"
|
||||
:close-on-click-modal="false"
|
||||
:title="$tc('Assets')"
|
||||
custom-class="asset-select-dialog"
|
||||
top="1vh"
|
||||
top="2vh"
|
||||
v-bind="$attrs"
|
||||
width="80vw"
|
||||
width="1000px"
|
||||
@cancel="handleCancel"
|
||||
@close="handleClose"
|
||||
@confirm="handleConfirm"
|
||||
@@ -14,7 +15,9 @@
|
||||
ref="ListPage"
|
||||
:header-actions="headerActions"
|
||||
:node-url="baseNodeUrl"
|
||||
:sync-select-to-url="false"
|
||||
:table-config="tableConfig"
|
||||
:tree-setting="iTreeSetting"
|
||||
:tree-url="`${baseNodeUrl}children/tree/`"
|
||||
:url="baseUrl"
|
||||
class="tree-table"
|
||||
@@ -52,6 +55,10 @@ export default {
|
||||
disabled: {
|
||||
type: [Boolean, Function],
|
||||
default: false
|
||||
},
|
||||
treeSetting: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -67,32 +74,22 @@ export default {
|
||||
columns: [
|
||||
{
|
||||
prop: 'name',
|
||||
label: this.$t('assets.Name'),
|
||||
label: this.$t('Name'),
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
prop: 'address',
|
||||
label: this.$t('assets.ipDomain'),
|
||||
label: this.$t('IpDomain'),
|
||||
sortable: 'custom'
|
||||
},
|
||||
{
|
||||
prop: 'platform',
|
||||
label: this.$t('assets.Platform'),
|
||||
label: this.$t('Platform'),
|
||||
sortable: true,
|
||||
formatter: function(row) {
|
||||
return row.platform.name
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'protocols',
|
||||
formatter: function(row) {
|
||||
const data = row.protocols.map(p => {
|
||||
return <el-tag size='mini'>{p.name}/{p.port} </el-tag>
|
||||
})
|
||||
return <span> {data} </span>
|
||||
},
|
||||
label: this.$t('assets.Protocols')
|
||||
},
|
||||
{
|
||||
prop: 'actions',
|
||||
has: false
|
||||
@@ -114,15 +111,21 @@ export default {
|
||||
headerActions: {
|
||||
hasLeftActions: false,
|
||||
hasRightActions: false,
|
||||
hasLabelSearch: true,
|
||||
searchConfig: {
|
||||
getUrlQuery: false
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
iTreeSetting() {
|
||||
return { ...this.treeSetting, selectSyncToRoute: false }
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClose() {
|
||||
this.$eventBus.$emit('treeComponentKey')
|
||||
this.$refs.ListPage.$refs.TreeList.componentKey += 1
|
||||
},
|
||||
handleConfirm() {
|
||||
this.$emit('confirm', this.rowSelected, this.rowsAdd)
|
||||
@@ -168,7 +171,7 @@ export default {
|
||||
}
|
||||
|
||||
.right {
|
||||
height: calc(100vh - 200px);
|
||||
min-height: 500px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
ref="dialog"
|
||||
:base-node-url="baseNodeUrl"
|
||||
:base-url="baseUrl"
|
||||
:tree-setting="treeSetting"
|
||||
:tree-url-query="treeUrlQuery"
|
||||
:value="value"
|
||||
:visible.sync="dialogVisible"
|
||||
@@ -48,6 +49,10 @@ export default {
|
||||
value: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
treeSetting: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -131,15 +136,22 @@ export default {
|
||||
|
||||
.tree-table {
|
||||
.left {
|
||||
padding: 5px;
|
||||
padding: 5px 0;
|
||||
|
||||
.ztree {
|
||||
height: calc(100vh - 250px) !important;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
.transition-box {
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.mini {
|
||||
padding-top: 8px;
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
.transition-box {
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
<TreeTable
|
||||
ref="TreeList"
|
||||
:active-menu.sync="treeTableConfig.activeMenu"
|
||||
:component="treeComponent"
|
||||
:table-config="tableConfig"
|
||||
:tree-tab-config="treeTableConfig"
|
||||
component="TabTree"
|
||||
:tree-width="treeWidth"
|
||||
v-bind="$attrs"
|
||||
v-on="$listeners"
|
||||
>
|
||||
@@ -60,14 +61,17 @@ export default {
|
||||
const showAssets = this.treeSetting?.showAssets || this.showAssets
|
||||
const treeUrlQuery = this.setTreeUrlQuery()
|
||||
const assetTreeUrl = `${this.treeUrl}?assets=${showAssets ? '1' : '0'}&${treeUrlQuery}`
|
||||
const vm = this
|
||||
|
||||
return {
|
||||
treeComponent: 'TabTree',
|
||||
treeTabConfig: {
|
||||
activeMenu: 'CustomTree',
|
||||
submenu: [
|
||||
{
|
||||
title: this.$t('assets.AssetTree'),
|
||||
title: this.$t('AssetTree'),
|
||||
name: 'CustomTree',
|
||||
icon: 'fa-tree',
|
||||
treeSetting: {
|
||||
showAssets,
|
||||
showMenu: false,
|
||||
@@ -81,19 +85,26 @@ export default {
|
||||
nodeUrl: this.nodeUrl,
|
||||
treeUrl: assetTreeUrl,
|
||||
callback: {
|
||||
onSelected: (event, treeNode) => this.getAssetsUrl(treeNode)
|
||||
onSelected: (event, treeNode) => this.getAssetsUrl(treeNode),
|
||||
beforeRefresh: () => {
|
||||
const query = { ...this.$route.query, node_id: '', asset_id: '' }
|
||||
setTimeout(() => {
|
||||
vm.$router.replace({ query: query })
|
||||
}, 100)
|
||||
}
|
||||
},
|
||||
...this.treeSetting
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('assets.BuiltinTree'),
|
||||
title: this.$t('TypeTree'),
|
||||
icon: 'fa-list-ul',
|
||||
name: 'BuiltinTree',
|
||||
treeSetting: {
|
||||
showRefresh: true,
|
||||
showAssets: false,
|
||||
showSearch: false,
|
||||
customTreeHeaderName: this.$t('assets.BuiltinTree'),
|
||||
customTreeHeaderName: this.$t('TypeTree'),
|
||||
url: '/api/v1/assets/nodes/category/tree/',
|
||||
nodeUrl: this.treeSetting?.nodeUrl || this.nodeUrl,
|
||||
treeUrl: `/api/v1/assets/nodes/category/tree/?assets=${showAssets ? '1' : '0'}&count_resource=${this.treeSetting.countResource || 'asset'}`,
|
||||
@@ -107,6 +118,9 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
treeWidth() {
|
||||
return '23.6%'
|
||||
},
|
||||
treeTableConfig() {
|
||||
if (this.treeSetting.notShowBuiltinTree) {
|
||||
// eslint-disable-next-line vue/no-side-effects-in-computed-properties
|
||||
@@ -163,13 +177,15 @@ export default {
|
||||
}
|
||||
const query = this.setTreeUrlQuery()
|
||||
url = query ? `${url}&${query}` : url
|
||||
this.$set(this.tableConfig, 'url', url)
|
||||
setRouterQuery(this, url)
|
||||
|
||||
setTimeout(() => {
|
||||
this.$set(this.tableConfig, 'url', url)
|
||||
}, 300)
|
||||
|
||||
if (this.treeSetting.selectSyncToRoute !== false) {
|
||||
setRouterQuery(this, url)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
|
||||
</style>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
type="primary"
|
||||
@click="onOpenDialog"
|
||||
>
|
||||
{{ $tc('common.Setting') }}
|
||||
{{ $tc('Setting') }}
|
||||
</el-button>
|
||||
</div>
|
||||
<Dialog
|
||||
@@ -50,7 +50,7 @@ export default {
|
||||
title: {
|
||||
type: String,
|
||||
default: function() {
|
||||
return this.$t('assets.PushParams')
|
||||
return this.$t('PushParams')
|
||||
}
|
||||
},
|
||||
assets: {
|
||||
@@ -120,7 +120,6 @@ export default {
|
||||
},
|
||||
async mounted() {
|
||||
await this.getUrlMeta()
|
||||
await this.handleFieldChange()
|
||||
},
|
||||
methods: {
|
||||
async getUrlMeta() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<ListTable ref="ListTable" :table-config="tableConfig" :header-actions="headerActions" />
|
||||
<ListTable ref="ListTable" :header-actions="headerActions" :table-config="tableConfig" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -27,7 +27,7 @@ export default {
|
||||
],
|
||||
columnsMeta: {
|
||||
ip: {
|
||||
label: this.$t('assets.ip')
|
||||
label: this.$t('IP')
|
||||
},
|
||||
actions: {
|
||||
formatterArgs: {
|
||||
@@ -37,7 +37,7 @@ export default {
|
||||
extraActions: [
|
||||
{
|
||||
name: 'UnlockIP',
|
||||
title: this.$t('setting.Unblock'),
|
||||
title: this.$t('Unblock'),
|
||||
can: this.$hasPerm('settings.change_security'),
|
||||
type: 'primary',
|
||||
callback: ({ row }) => {
|
||||
@@ -45,7 +45,7 @@ export default {
|
||||
'/api/v1/settings/security/unlock-ip/',
|
||||
{ ips: [row.ip] }
|
||||
).then(() => {
|
||||
vm.$message.success(this.$tc('common.UnlockSuccessMsg'))
|
||||
vm.$message.success(this.$tc('UnlockSuccessMsg'))
|
||||
vm.$refs.ListTable.reloadTable()
|
||||
})
|
||||
}
|
||||
@@ -68,7 +68,7 @@ export default {
|
||||
extraMoreActions: [
|
||||
{
|
||||
name: 'UnlockSelected',
|
||||
title: this.$t('setting.BulkUnblock'),
|
||||
title: this.$t('UnblockSelected'),
|
||||
type: 'primary',
|
||||
can: ({ selectedRows }) => {
|
||||
return selectedRows.length > 0
|
||||
@@ -77,10 +77,12 @@ export default {
|
||||
vm.$axios.post(
|
||||
'/api/v1/settings/security/unlock-ip/',
|
||||
{
|
||||
ips: selectedRows.map(v => { return v.ip })
|
||||
ips: selectedRows.map(v => {
|
||||
return v.ip
|
||||
})
|
||||
}
|
||||
).then(res => {
|
||||
vm.$message.success(vm.$tc('common.UnlockSuccessMsg'))
|
||||
vm.$message.success(vm.$tc('UnlockSuccessMsg'))
|
||||
vm.$refs.ListTable.reloadTable()
|
||||
})
|
||||
}
|
||||
|
||||
@@ -5,17 +5,19 @@
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="onOpenDialog"
|
||||
>{{ $tc('common.View') }}</el-button>
|
||||
>
|
||||
{{ $tc('View') }}
|
||||
<span>({{ $tc('LockedIP', ipCounts ) }})</span>
|
||||
</el-button>
|
||||
</div>
|
||||
<Dialog
|
||||
v-if="visible"
|
||||
:visible.sync="visible"
|
||||
:title="title"
|
||||
width="40%"
|
||||
:destroy-on-close="true"
|
||||
:show-cancel="false"
|
||||
:show-confirm="false"
|
||||
:destroy-on-close="true"
|
||||
:title="title"
|
||||
:visible.sync="visible"
|
||||
v-bind="$attrs"
|
||||
width="40%"
|
||||
v-on="$listeners"
|
||||
>
|
||||
<BlockedIPList />
|
||||
@@ -41,7 +43,7 @@ export default {
|
||||
title: {
|
||||
type: String,
|
||||
default: function() {
|
||||
return this.$t('setting.BlockedIPS')
|
||||
return this.$t('BlockedIPS')
|
||||
}
|
||||
},
|
||||
url: {
|
||||
@@ -54,6 +56,7 @@ export default {
|
||||
remoteMeta: {},
|
||||
visible: false,
|
||||
form: this.value,
|
||||
ipCounts: 0,
|
||||
config: {
|
||||
url: this.url,
|
||||
hasSaveContinue: false,
|
||||
@@ -63,7 +66,15 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getLockedIp()
|
||||
},
|
||||
methods: {
|
||||
getLockedIp() {
|
||||
this.$axios.get('/api/v1/settings/security/block-ip/').then(res => {
|
||||
this.ipCounts = res.count
|
||||
})
|
||||
},
|
||||
onOpenDialog() {
|
||||
this.visible = true
|
||||
}
|
||||
|
||||
135
src/components/Apps/ChangeSecret/RecordViewSecret.vue
Normal file
@@ -0,0 +1,135 @@
|
||||
<template>
|
||||
<div>
|
||||
<Dialog
|
||||
:destroy-on-close="true"
|
||||
:show-cancel="false"
|
||||
:title="title"
|
||||
:visible.sync="showSecret"
|
||||
:width="'50'"
|
||||
v-bind="$attrs"
|
||||
@confirm="accountConfirmHandle"
|
||||
v-on="$listeners"
|
||||
>
|
||||
<el-form :model="secretInfo" class="password-form" label-position="right" label-width="100px">
|
||||
<el-form-item :label="$tc('OldSecret')">
|
||||
<ShowKeyCopyFormatter
|
||||
:cell-value="secretInfo.old_secret"
|
||||
:col="{ formatterArgs: {
|
||||
name: 'old_secret'
|
||||
}}"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$tc('NewSecret')">
|
||||
<ShowKeyCopyFormatter
|
||||
:cell-value="secretInfo.new_secret"
|
||||
:col="{ formatterArgs: {
|
||||
name: 'new_secret'
|
||||
}}"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</Dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Dialog from '@/components/Dialog/index.vue'
|
||||
import { ShowKeyCopyFormatter } from '@/components/Table/TableFormatters'
|
||||
|
||||
export default {
|
||||
name: 'RecordViewSecret',
|
||||
components: {
|
||||
Dialog,
|
||||
ShowKeyCopyFormatter
|
||||
},
|
||||
props: {
|
||||
visible: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
url: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: function() {
|
||||
return this.$tc('ViewSecret')
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
secretInfo: {},
|
||||
showSecret: false,
|
||||
mfaDialogVisible: true
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
mounted() {
|
||||
this.showSecretDialog()
|
||||
},
|
||||
methods: {
|
||||
accountConfirmHandle() {
|
||||
this.showSecret = false
|
||||
this.mfaDialogVisible = false
|
||||
},
|
||||
showSecretDialog() {
|
||||
return this.$axios.get(this.url, { disableFlashErrorMsg: true }).then((res) => {
|
||||
this.secretInfo = res
|
||||
this.showSecret = true
|
||||
})
|
||||
},
|
||||
exit() {
|
||||
this.$emit('update:visible', false)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.item-textarea ::v-deep .el-textarea__inner {
|
||||
height: 110px;
|
||||
}
|
||||
|
||||
.el-form-item {
|
||||
border-bottom: 1px solid #EBEEF5;
|
||||
padding: 5px 0;
|
||||
margin-bottom: 0;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
::v-deep .el-form-item__label {
|
||||
padding-right: 20px;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
::v-deep .el-form-item__content {
|
||||
line-height: 30px;
|
||||
|
||||
pre {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ul {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
li {
|
||||
display: block;
|
||||
font-size: 13px;
|
||||
margin-bottom: 8px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
.title {
|
||||
color: #303133;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
153
src/components/Apps/ChatAi/components/ChitChat/ChatInput.vue
Normal file
@@ -0,0 +1,153 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<div class="chat-action">
|
||||
<Select2
|
||||
v-model="select.value"
|
||||
:disabled="isLoading || isSelectDisabled"
|
||||
v-bind="select"
|
||||
@change="onSelectChange"
|
||||
/>
|
||||
</div>
|
||||
<div class="chat-input">
|
||||
<el-input
|
||||
v-model="inputValue"
|
||||
:disabled="isLoading"
|
||||
:placeholder="$tc('InputMessage')"
|
||||
:rows="expanded ? 3 :2"
|
||||
type="textarea"
|
||||
@compositionend="isIM = false"
|
||||
@compositionstart="isIM = true"
|
||||
@keypress.native="onKeyEnter"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
import { useChat } from '../../useChat.js'
|
||||
import Select2 from '../../../../Form/FormFields/Select2.vue'
|
||||
|
||||
const { setLoading } = useChat()
|
||||
|
||||
export default {
|
||||
components: { Select2 },
|
||||
props: {
|
||||
expanded: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isIM: false,
|
||||
inputValue: '',
|
||||
select: {
|
||||
url: '/api/v1/settings/chatai-prompts/',
|
||||
value: '',
|
||||
multiple: false,
|
||||
placeholder: this.$t('Prompt'),
|
||||
ajax: {
|
||||
transformOption: (item) => {
|
||||
return { label: item.name, value: item.content }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
isLoading: state => state.chat.loading
|
||||
}),
|
||||
isSelectDisabled() {
|
||||
return !!this.select.value
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onKeyEnter(event) {
|
||||
if (event.key === 'Enter') {
|
||||
if ((!this.isIM && !event.shiftKey) || (this.isIM && event.ctrlKey)) {
|
||||
event.preventDefault()
|
||||
this.onSendHandle()
|
||||
}
|
||||
}
|
||||
},
|
||||
onSendHandle() {
|
||||
if (!this.inputValue) return
|
||||
|
||||
setLoading(true)
|
||||
this.$emit('send', this.inputValue)
|
||||
this.inputValue = ''
|
||||
},
|
||||
onSelectChange(value) {
|
||||
this.$emit('select-prompt', value)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.container {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
flex-direction: column;
|
||||
|
||||
.chat-action {
|
||||
width: 100%;
|
||||
margin: 6px 0;
|
||||
|
||||
&::v-deep .el-select {
|
||||
width: 50%;
|
||||
|
||||
.el-input__inner {
|
||||
height: 28px;
|
||||
line-height: 28px;
|
||||
border-radius: 14px;
|
||||
border-color: transparent;
|
||||
background-color: #f7f7f8;
|
||||
font-size: 13px;
|
||||
color: rgba(0, 0, 0, 0.45);
|
||||
|
||||
&:hover {
|
||||
background-color: #ededed;
|
||||
}
|
||||
}
|
||||
|
||||
.el-input__icon {
|
||||
line-height: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.chat-input {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border-radius: 12px;
|
||||
|
||||
&::v-deep .el-textarea {
|
||||
height: 100%;
|
||||
|
||||
.el-textarea__inner {
|
||||
height: 100%;
|
||||
padding: 8px 10px;
|
||||
resize: none;
|
||||
border-radius: 5px;
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
width: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-textarea.is-disabled + .input-action {
|
||||
background-color: #F5F7FA;
|
||||
cursor: no-drop;
|
||||
|
||||
i {
|
||||
cursor: no-drop;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
206
src/components/Apps/ChatAi/components/ChitChat/ChatMessage.vue
Normal file
@@ -0,0 +1,206 @@
|
||||
<template>
|
||||
<div :class="{'user-role': isUserRole}" class="chat-item">
|
||||
<div class="avatar">
|
||||
<el-avatar :src="isUserRole ? userUrl : chatUrl" class="header-avatar" />
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="operational">
|
||||
<span class="date">
|
||||
{{ $moment(item.message.create_time).format('YYYY-MM-DD HH:mm:ss') }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="message">
|
||||
<div class="message-content">
|
||||
<span v-if="isSystemError" class="error">
|
||||
{{ item.message.content }}
|
||||
</span>
|
||||
<span v-else class="chat-text">
|
||||
<MessageText :message="item.message" />
|
||||
</span>
|
||||
</div>
|
||||
<div class="action">
|
||||
<el-tooltip
|
||||
v-if="isSystemError && isLoading"
|
||||
:content="$tc('Reconnect')"
|
||||
:open-delay="500"
|
||||
placement="top"
|
||||
>
|
||||
<svg-icon icon-class="refresh" @click="onRefresh" />
|
||||
</el-tooltip>
|
||||
<el-dropdown v-else size="small" @command="handleCommand">
|
||||
<span class="el-dropdown-link">
|
||||
<i class="fa fa-ellipsis-v" />
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item v-for="i in dropdownOptions" :key="i.action" :command="i.action">
|
||||
{{ i.label }}
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MessageText from './MessageText.vue'
|
||||
import { mapState } from 'vuex'
|
||||
import { copy } from '@/utils/common'
|
||||
import { useChat } from '../../useChat.js'
|
||||
import { reconnect } from '@/utils/socket'
|
||||
|
||||
const { setLoading, removeLoadingMessageInChat } = useChat()
|
||||
|
||||
export default {
|
||||
components: {
|
||||
MessageText
|
||||
},
|
||||
props: {
|
||||
item: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chatUrl: require('@/assets/img/chat.png'),
|
||||
userUrl: '/api/v1/settings/logo/',
|
||||
dropdownOptions: [
|
||||
{
|
||||
action: 'copy',
|
||||
label: this.$t('Copy')
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
isLoading: state => state.chat.loading
|
||||
}),
|
||||
isUserRole() {
|
||||
return this.item.message?.role === 'user'
|
||||
},
|
||||
isSystemError() {
|
||||
return this.item.type === 'error' && this.item.message?.role === 'assistant'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onRefresh() {
|
||||
reconnect()
|
||||
removeLoadingMessageInChat()
|
||||
setLoading(false)
|
||||
},
|
||||
handleCommand(value) {
|
||||
if (value === 'copy') {
|
||||
copy(this.item.message.content)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.chat-item {
|
||||
display: flex;
|
||||
padding: 16px 14px 0;
|
||||
|
||||
&:last-child {
|
||||
padding-bottom: 16px;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
margin-top: 2px;
|
||||
|
||||
.header-avatar {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
&::v-deep img {
|
||||
background-color: #e5e5e7;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
margin-left: 6px;
|
||||
overflow: hidden;
|
||||
|
||||
.operational {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
overflow: hidden;
|
||||
|
||||
.copy {
|
||||
float: right;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.message {
|
||||
display: -webkit-box;
|
||||
|
||||
.message-content {
|
||||
flex: 1;
|
||||
padding: 6px 10px;
|
||||
border-radius: 2px 12px 12px;
|
||||
background-color: #f0f1f5;
|
||||
}
|
||||
|
||||
.action {
|
||||
.svg-icon {
|
||||
transform: translateY(50%);
|
||||
margin-left: 3px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.el-dropdown {
|
||||
height: 32px;
|
||||
line-height: 37px;
|
||||
font-size: 13px;
|
||||
|
||||
.el-dropdown-link {
|
||||
i {
|
||||
padding: 4px 5px;
|
||||
font-size: 15px;
|
||||
color: #8d9091;
|
||||
|
||||
&:hover {
|
||||
color: #7b8085
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.error {
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.user-role {
|
||||
flex-direction: row-reverse;
|
||||
|
||||
.content {
|
||||
margin-right: 10px;
|
||||
|
||||
.operational {
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
|
||||
.message {
|
||||
flex-direction: row-reverse;
|
||||
|
||||
.message-content {
|
||||
background-color: var(--menu-hover);
|
||||
border-radius: 12px 2px 12px 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
197
src/components/Apps/ChatAi/components/ChitChat/MessageText.vue
Normal file
@@ -0,0 +1,197 @@
|
||||
<template>
|
||||
<div>
|
||||
<div ref="textRef" class="leading-relaxed break-words">
|
||||
<span v-if="message.content === 'loading'" class="loading-box">
|
||||
<span />
|
||||
<span />
|
||||
<span />
|
||||
</span>
|
||||
<div v-else v-sanitize="text" class="inline-block markdown-body" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MarkdownIt from 'markdown-it'
|
||||
import mdKatex from '@traptitech/markdown-it-katex'
|
||||
import mila from 'markdown-it-link-attributes'
|
||||
import hljs from 'highlight.js'
|
||||
import 'highlight.js/styles/atom-one-dark.css'
|
||||
import { copy } from '@/utils/common'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
message: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
markdown: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
text() {
|
||||
const value = this.message?.content || ''
|
||||
if (value && this.markdown) {
|
||||
return this.markdown?.render(value)
|
||||
}
|
||||
return this.$xss.process(value)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.init()
|
||||
},
|
||||
updated() {
|
||||
this.addCopyEvents()
|
||||
},
|
||||
destroyed() {
|
||||
this.removeCopyEvents()
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
const vm = this
|
||||
this.markdown = new MarkdownIt({
|
||||
html: false,
|
||||
linkify: true,
|
||||
highlight(code, language) {
|
||||
const validLang = !!(language && hljs.getLanguage(language))
|
||||
if (validLang) {
|
||||
const lang = language || ''
|
||||
return vm.highlightBlock(hljs.highlight(lang, code, true).value, lang)
|
||||
}
|
||||
return vm.highlightBlock(hljs.highlightAuto(code).value, '')
|
||||
}
|
||||
})
|
||||
this.markdown.use(mila, { attrs: { target: '_blank', rel: 'noopener', class: 'link-style' }})
|
||||
this.markdown.use(mdKatex, { blockClass: 'katexmath-block rounded-md', errorColor: ' #cc0000' })
|
||||
},
|
||||
highlightBlock(str, lang) {
|
||||
return `<pre class="code-block-wrapper"><div class="code-block-header"><span class="code-block-header__lang">${lang}</span><span class="code-block-header__copy">${'Copy'}</span></div><code class="hljs code-block-body ${lang}">${str}</code></pre>`
|
||||
},
|
||||
addCopyEvents() {
|
||||
const copyBtn = document.querySelectorAll('.code-block-header__copy')
|
||||
copyBtn.forEach((btn) => {
|
||||
btn.addEventListener('click', () => {
|
||||
const code = btn.parentElement?.nextElementSibling?.textContent
|
||||
if (code) {
|
||||
copy(code)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
removeCopyEvents() {
|
||||
if (this.$refs.textRef) {
|
||||
const copyBtn = this.$refs.textRef.querySelectorAll('.code-block-header__copy')
|
||||
copyBtn.forEach((btn) => {
|
||||
btn.removeEventListener('click', () => {
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.markdown-body {
|
||||
font-size: 13px;
|
||||
|
||||
&::v-deep p {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
background: inherit;
|
||||
|
||||
&::v-deep pre {
|
||||
padding: 0 0 6px 0;
|
||||
|
||||
.hljs.code-block-body {
|
||||
border-radius: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
&::v-deep .code-block-wrapper {
|
||||
background: #1F2329;
|
||||
padding: 2px 6px;
|
||||
margin: 5px 0;
|
||||
|
||||
.code-block-body {
|
||||
padding: 5px 10px 0;
|
||||
}
|
||||
;
|
||||
|
||||
.code-block-header {
|
||||
margin-bottom: 4px;
|
||||
overflow: hidden;
|
||||
background: #353946;
|
||||
color: #c2d1e1;
|
||||
|
||||
.code-block-header__copy {
|
||||
float: right;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
color: #6e747b;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.hljs.code-block-body.javascript {
|
||||
.hljs-comment {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .link-style {
|
||||
color: #487bf4;
|
||||
|
||||
&:hover {
|
||||
color: #275ee3;
|
||||
}
|
||||
}
|
||||
|
||||
.loading-box {
|
||||
margin-left: 6px;
|
||||
}
|
||||
|
||||
.loading-box span {
|
||||
display: inline-block;
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
margin-right: 5px;
|
||||
border-radius: 50%;
|
||||
vertical-align: middle;
|
||||
background: #676A6c;
|
||||
animation: load 1.2s ease infinite;
|
||||
}
|
||||
|
||||
.loading-box span:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
@keyframes load {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.loading-box span:nth-child(1) {
|
||||
animation-delay: 0.23s;
|
||||
}
|
||||
|
||||
.loading-box span:nth-child(2) {
|
||||
animation-delay: 0.36s;
|
||||
}
|
||||
|
||||
.loading-box span:nth-child(3) {
|
||||
animation-delay: 0.49s;
|
||||
}
|
||||
</style>
|
||||
276
src/components/Apps/ChatAi/components/ChitChat/index.vue
Normal file
@@ -0,0 +1,276 @@
|
||||
<template>
|
||||
<div class="chat-content">
|
||||
<div id="scrollRef" class="chat-list">
|
||||
<div v-if="showIntroduction" class="introduction">
|
||||
<div
|
||||
v-for="(item, index) in introduction"
|
||||
:key="index"
|
||||
class="introduction-item"
|
||||
@click="sendIntroduction(item)"
|
||||
>
|
||||
<div class="head">
|
||||
<i v-if="item.icon" :class="item.icon" />
|
||||
<span class="title">{{ item.title }}</span>
|
||||
</div>
|
||||
<div class="content">
|
||||
{{ item.content }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ChatMessage v-for="(item, index) in activeChat.chats" :key="index" :item="item" />
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<el-button
|
||||
v-if="isLoading && socket && socket.readyState === 1"
|
||||
class="stop"
|
||||
icon="fa fa-stop-circle-o"
|
||||
round
|
||||
size="small"
|
||||
@click="onStopHandle"
|
||||
>{{ $tc('Stop') }}</el-button>
|
||||
<ChatInput ref="chatInput" :expanded="expanded" @send="onSendHandle" @select-prompt="onSelectPromptHandle" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ChatInput from './ChatInput.vue'
|
||||
import ChatMessage from './ChatMessage.vue'
|
||||
import { mapState } from 'vuex'
|
||||
import { closeWebSocket, createWebSocket, onSend, ws } from '@/utils/socket'
|
||||
import { getInputFocus, useChat } from '../../useChat.js'
|
||||
|
||||
const {
|
||||
setLoading,
|
||||
clearChats,
|
||||
addChatMessageById,
|
||||
addMessageToActiveChat,
|
||||
newChatAndAddMessageById,
|
||||
removeLoadingMessageInChat,
|
||||
updateChaMessageContentById,
|
||||
addTemporaryLoadingToChat
|
||||
} = useChat()
|
||||
|
||||
export default {
|
||||
components: {
|
||||
ChatInput,
|
||||
ChatMessage
|
||||
},
|
||||
props: {
|
||||
expanded: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
socket: {},
|
||||
prompt: '',
|
||||
conversationId: '',
|
||||
showIntroduction: false,
|
||||
introduction: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
isLoading: state => state.chat.loading,
|
||||
activeChat: state => state.chat.activeChat
|
||||
})
|
||||
},
|
||||
destroyed() {
|
||||
closeWebSocket()
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.initWebSocket()
|
||||
this.initChatMessage()
|
||||
},
|
||||
initWebSocket() {
|
||||
const { NODE_ENV, VUE_APP_KOKO_HOST } = process.env || {}
|
||||
const api = '/koko/ws/chat/system/'
|
||||
const protocol = window.location.protocol === 'https:' ? 'wss' : 'ws'
|
||||
const path = `${protocol}://${window.location.host}${api}`
|
||||
const index = VUE_APP_KOKO_HOST?.indexOf('://')
|
||||
const localPath = protocol + VUE_APP_KOKO_HOST?.substring(index, VUE_APP_KOKO_HOST?.length) + api
|
||||
const url = NODE_ENV === 'development' ? localPath : path
|
||||
createWebSocket(url, this.onWebSocketMessage)
|
||||
},
|
||||
initChatMessage() {
|
||||
this.prompt = ''
|
||||
this.showIntroduction = true
|
||||
this.conversationId = ''
|
||||
this.$refs.chatInput.select.value = ''
|
||||
const chat = {
|
||||
message: {
|
||||
content: this.$t('ChatHello'),
|
||||
role: 'assistant',
|
||||
create_time: new Date()
|
||||
}
|
||||
}
|
||||
newChatAndAddMessageById(chat)
|
||||
setLoading(false)
|
||||
},
|
||||
onWebSocketMessage(data) {
|
||||
if (data.type === 'message') {
|
||||
this.onChatMessage(data)
|
||||
}
|
||||
if (data.type === 'error') {
|
||||
this.onSystemMessage(data)
|
||||
}
|
||||
},
|
||||
onChatMessage(data) {
|
||||
if (data.id) {
|
||||
setLoading(true)
|
||||
removeLoadingMessageInChat()
|
||||
this.conversationId = data.id
|
||||
updateChaMessageContentById(data.message.id, data)
|
||||
}
|
||||
if (data.message?.type === 'finish') {
|
||||
setLoading(false)
|
||||
getInputFocus()
|
||||
}
|
||||
},
|
||||
onSystemMessage(data) {
|
||||
data.message = {
|
||||
content: data.data,
|
||||
role: 'assistant',
|
||||
create_time: new Date()
|
||||
}
|
||||
removeLoadingMessageInChat()
|
||||
addMessageToActiveChat(data)
|
||||
setLoading(true)
|
||||
},
|
||||
onSendHandle(value) {
|
||||
this.showIntroduction = false
|
||||
this.socket = ws || {}
|
||||
if (ws?.readyState === 1) {
|
||||
const chat = {
|
||||
message: {
|
||||
content: value,
|
||||
role: 'user',
|
||||
create_time: new Date()
|
||||
}
|
||||
}
|
||||
const message = {
|
||||
data: value,
|
||||
prompt: this.prompt,
|
||||
id: this.conversationId || ''
|
||||
}
|
||||
addChatMessageById(chat)
|
||||
onSend(message)
|
||||
addTemporaryLoadingToChat()
|
||||
} else {
|
||||
const chat = {
|
||||
message: {
|
||||
content: this.$t('ConnectionDropped'),
|
||||
role: 'assistant',
|
||||
create_time: new Date()
|
||||
},
|
||||
type: 'error'
|
||||
}
|
||||
addChatMessageById(chat)
|
||||
setLoading(true)
|
||||
}
|
||||
},
|
||||
onSelectPromptHandle(value) {
|
||||
this.prompt = value
|
||||
this.conversationId = ''
|
||||
this.showIntroduction = false
|
||||
this.onSendHandle(value)
|
||||
},
|
||||
onNewChat() {
|
||||
clearChats()
|
||||
this.initChatMessage()
|
||||
},
|
||||
onStopHandle() {
|
||||
const message = {
|
||||
id: this.conversationId || '',
|
||||
interrupt: true
|
||||
}
|
||||
onSend(message)
|
||||
removeLoadingMessageInChat()
|
||||
setLoading(false)
|
||||
},
|
||||
sendIntroduction(item) {
|
||||
this.showIntroduction = false
|
||||
this.onSendHandle(item.content)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.chat-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
height: 100%;
|
||||
|
||||
.introduction {
|
||||
padding: 16px 14px 0;
|
||||
|
||||
.introduction-item {
|
||||
padding: 12px 14px;
|
||||
border-radius: 8px;
|
||||
margin-top: 16px;
|
||||
background-color: var(--menu-hover);
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
box-shadow: 0 0 2px 2px #00000014;
|
||||
}
|
||||
|
||||
&:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.head {
|
||||
margin-bottom: 2px;
|
||||
|
||||
.title {
|
||||
font-weight: 500;
|
||||
color: #373739;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
display: inline-block;
|
||||
color: #a7a7ab;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.chat-list {
|
||||
flex: 1;
|
||||
position: relative;
|
||||
padding: 0 15px 25px;
|
||||
overflow-y: auto;
|
||||
user-select: text;
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
width: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.input-box {
|
||||
position: relative;
|
||||
//height: 60px;
|
||||
padding: 0 15px;
|
||||
margin-bottom: 15px;
|
||||
//border-top: 1px solid #ececec;
|
||||
}
|
||||
|
||||
.stop {
|
||||
position: absolute;
|
||||
top: -37px;
|
||||
left: 50%;
|
||||
z-index: 11;
|
||||
transform: translateX(-50%);
|
||||
|
||||
::v-deep i {
|
||||
margin-right: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
93
src/components/Apps/ChatAi/components/Sidebar/index.vue
Normal file
@@ -0,0 +1,93 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<div class="close-sidebar">
|
||||
<i v-if="hasClose" class="el-icon-download" @click="onClose" />
|
||||
</div>
|
||||
<div v-if="!expanded" class="close-sidebar">
|
||||
<i class="fa fa-expand" style="font-weight: 200" @click="$emit('expand')" />
|
||||
</div>
|
||||
<div v-if="expanded" class="close-sidebar">
|
||||
<i class="fa fa-compress" style="font-weight: 200" @click="$emit('compress')" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
active: {
|
||||
type: String,
|
||||
default: 'chat'
|
||||
},
|
||||
hasClose: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
submenu: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
expanded: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
methods: {
|
||||
onClose() {
|
||||
this.$emit('close')
|
||||
},
|
||||
handleExpand() {
|
||||
this.$emit('expand-full')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #f0f1f5;
|
||||
|
||||
.close-sidebar {
|
||||
height: 48px;
|
||||
padding: 12px 0;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
|
||||
i {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
i, .svg {
|
||||
border-radius: 2px;
|
||||
|
||||
&:hover {
|
||||
color: var(--color-primary);
|
||||
background: var(--menu-hover);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-icon-download {
|
||||
transform: rotate(-90deg)
|
||||
}
|
||||
|
||||
::v-deep .el-tabs {
|
||||
.el-tabs__item {
|
||||
padding: 0 10px;
|
||||
font-size: 14px;
|
||||
|
||||
:hover {
|
||||
color: #7b8085;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
196
src/components/Apps/ChatAi/index.vue
Normal file
@@ -0,0 +1,196 @@
|
||||
<template>
|
||||
<DrawerPanel
|
||||
ref="drawer"
|
||||
:default-show-panel="!!defaultShowPanel"
|
||||
:expanded="expanded"
|
||||
:height="height"
|
||||
:icon="robotUrl"
|
||||
:modal="false"
|
||||
@toggle="onToggle"
|
||||
>
|
||||
<div class="chat">
|
||||
<div class="container">
|
||||
<div ref="header" class="header" @mousedown="handleMoveMouseDown" @mouseup="handleMouseMoveUp">
|
||||
<div class="left">
|
||||
<img :src="robotUrl" alt="">
|
||||
<span class="title">{{ title }}</span>
|
||||
</div>
|
||||
<span class="new" @click="onNewChat">
|
||||
<i class="el-icon-plus" />
|
||||
<span>{{ $tc('NewChat') }}</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="content">
|
||||
<keep-alive>
|
||||
<component :is="active" ref="component" :expanded="expanded" />
|
||||
</keep-alive>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sidebar">
|
||||
<Sidebar
|
||||
:active.sync="active"
|
||||
:expanded="expanded"
|
||||
v-bind="$attrs"
|
||||
@close="onClose"
|
||||
@compress="compress"
|
||||
@expand="expandFull"
|
||||
v-on="$listeners"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</DrawerPanel>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Sidebar from './components/Sidebar/index.vue'
|
||||
import Chat from './components/ChitChat/index.vue'
|
||||
import { getInputFocus } from './useChat.js'
|
||||
import { ws } from '@/utils/socket'
|
||||
import DrawerPanel from '@/components/Apps/DrawerPanel/index.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
DrawerPanel,
|
||||
Chat,
|
||||
Sidebar
|
||||
},
|
||||
props: {
|
||||
title: {
|
||||
type: String,
|
||||
default: function() {
|
||||
return this.$t('ChatAI')
|
||||
}
|
||||
},
|
||||
defaultShowPanel: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
drawerPanelVisible: {
|
||||
type: Boolean,
|
||||
default: () => false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
active: 'chat',
|
||||
robotUrl: require('@/assets/img/robot-assistant.png'),
|
||||
height: '400px',
|
||||
expanded: false,
|
||||
clientOffset: {}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
},
|
||||
mounted() {
|
||||
this.handlePostMessage()
|
||||
},
|
||||
methods: {
|
||||
handlePostMessage() {
|
||||
window.addEventListener('message', (event) => {
|
||||
if (event.data === 'show-chat-panel') {
|
||||
this.$refs.drawer.show = true
|
||||
}
|
||||
})
|
||||
},
|
||||
handleMoveMouseDown(event) {
|
||||
this.$refs.drawer.handleHeaderMoveDown(event)
|
||||
},
|
||||
handleMouseMoveUp(event) {
|
||||
this.$refs.drawer.handleHeaderMoveUp(event)
|
||||
},
|
||||
initWebSocket() {
|
||||
if (!ws) {
|
||||
this.$refs.component?.init()
|
||||
}
|
||||
},
|
||||
onClose() {
|
||||
this.$refs.drawer.show = false
|
||||
},
|
||||
expandFull() {
|
||||
this.height = '100%'
|
||||
this.expanded = true
|
||||
},
|
||||
compress() {
|
||||
this.height = '400px'
|
||||
this.expanded = false
|
||||
},
|
||||
onNewChat() {
|
||||
this.active = 'chat'
|
||||
this.$nextTick(() => {
|
||||
this.$refs.component?.onNewChat()
|
||||
getInputFocus()
|
||||
})
|
||||
},
|
||||
onToggle(status) {
|
||||
this.initWebSocket()
|
||||
if (status) {
|
||||
getInputFocus()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.chat {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
pointer-events: auto;
|
||||
|
||||
.container {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
|
||||
.header {
|
||||
background: linear-gradient(90deg, #ebf1ff 24.34%, #e5fbf8 56.18%, #f2ebfe 90.18%);;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
height: 48px;
|
||||
line-height: 48px;
|
||||
padding: 0 16px;
|
||||
overflow: hidden;
|
||||
border-bottom: 1px solid #ececec;
|
||||
.left {
|
||||
img {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
vertical-align: sub;
|
||||
}
|
||||
.title {
|
||||
display: inline-block;
|
||||
font-size: 18px;
|
||||
color: black;
|
||||
}
|
||||
}
|
||||
.new {
|
||||
display: inline-block;
|
||||
height: 28px;
|
||||
line-height: 28px;
|
||||
border-radius: 16px;
|
||||
padding: 0 10px;
|
||||
transform: translateY(32%);
|
||||
color: var(--color-primary);
|
||||
background-color: #f7f7f8;
|
||||
cursor: pointer;
|
||||
font-size: 13px;
|
||||
&:hover {
|
||||
background-color: #ededed;
|
||||
}
|
||||
}
|
||||
}
|
||||
.content {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
.sidebar {
|
||||
height: 100%;
|
||||
width: 42px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
80
src/components/Apps/ChatAi/useChat.js
Normal file
@@ -0,0 +1,80 @@
|
||||
import store from '@/store'
|
||||
import { pageScroll } from '@/utils/common'
|
||||
|
||||
export const getInputFocus = () => {
|
||||
const dom = document.querySelector('.chat-input .el-textarea__inner')
|
||||
setTimeout(() => dom?.focus(), 200)
|
||||
}
|
||||
|
||||
export function useChat() {
|
||||
const chatStore = {}
|
||||
|
||||
const setLoading = (loading) => {
|
||||
store.commit('chat/setLoading', loading)
|
||||
}
|
||||
|
||||
const onNewChat = (name) => {
|
||||
const data = {
|
||||
name: name || `new chat`,
|
||||
id: 1,
|
||||
conversation_id: '',
|
||||
chats: []
|
||||
}
|
||||
store.commit('chat/addChatToStore', data)
|
||||
}
|
||||
|
||||
const clearChats = () => {
|
||||
store.commit('chat/clearChats')
|
||||
}
|
||||
|
||||
const addMessageToActiveChat = (chat) => {
|
||||
store.commit('chat/addMessageToActiveChat', chat)
|
||||
}
|
||||
|
||||
const removeLoadingMessageInChat = () => {
|
||||
store.commit('chat/removeLoadingMessageInChat')
|
||||
}
|
||||
|
||||
const addChatMessageById = (chat) => {
|
||||
store.commit('chat/addMessageToActiveChat', chat)
|
||||
if (chat?.conversation_id) {
|
||||
store.commit('chat/setActiveChatConversationId', chat.conversation_id)
|
||||
}
|
||||
pageScroll('scrollRef')
|
||||
}
|
||||
|
||||
const addTemporaryLoadingToChat = () => {
|
||||
const temporaryChat = {
|
||||
message: {
|
||||
content: 'loading',
|
||||
role: 'assistant',
|
||||
create_time: new Date()
|
||||
}
|
||||
}
|
||||
addChatMessageById(temporaryChat)
|
||||
}
|
||||
|
||||
const newChatAndAddMessageById = (chat) => {
|
||||
onNewChat(chat.message.content)
|
||||
addChatMessageById(chat)
|
||||
}
|
||||
|
||||
const updateChaMessageContentById = (id, data) => {
|
||||
store.commit('chat/updateChaMessageContentById', { id, data })
|
||||
pageScroll('scrollRef')
|
||||
}
|
||||
|
||||
return {
|
||||
chatStore,
|
||||
setLoading,
|
||||
onNewChat,
|
||||
clearChats,
|
||||
getInputFocus,
|
||||
addMessageToActiveChat,
|
||||
newChatAndAddMessageById,
|
||||
removeLoadingMessageInChat,
|
||||
addChatMessageById,
|
||||
addTemporaryLoadingToChat,
|
||||
updateChaMessageContentById
|
||||
}
|
||||
}
|
||||
242
src/components/Apps/DrawerPanel/index.vue
Normal file
@@ -0,0 +1,242 @@
|
||||
<template>
|
||||
<div ref="drawer" :class="{show: show}" class="drawer">
|
||||
<div v-if="modal" :style="{'background-color': modal ? 'rgba(0, 0, 0, .3)' : 'transparent'}" class="modal" />
|
||||
<div ref="panel" :style="{width: width, height: height }" class="drawer-panel">
|
||||
<div v-show="!show && !defaultShowPanel" ref="dragBox" class="handle-button">
|
||||
<i v-if="icon.startsWith('fa') || icon.startsWith('el')" :class="show ? 'el-icon-close': icon" />
|
||||
<img v-else :src="icon" alt="">
|
||||
</div>
|
||||
<div class="drawer-panel-item">
|
||||
<slot :drawer-panel-visible="show" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'DrawerPanel',
|
||||
props: {
|
||||
icon: {
|
||||
type: String,
|
||||
default: 'el-icon-setting'
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
default: '440px'
|
||||
},
|
||||
height: {
|
||||
type: String,
|
||||
default: '400px'
|
||||
},
|
||||
modal: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
clickNotClose: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
expanded: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
defaultShowPanel: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
show: this.defaultShowPanel,
|
||||
clientOffset: {}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
show(value) {
|
||||
if (value && !this.clickNotClose) {
|
||||
this.addEventClick()
|
||||
}
|
||||
const event = value ? 'show-chat-panel' : 'close-chat-panel'
|
||||
window.parent.postMessage(event, '*')
|
||||
this.$emit('toggle', this.show)
|
||||
},
|
||||
expanded(value) {
|
||||
if (value) {
|
||||
this.$refs.panel.style.top = '0px'
|
||||
} else {
|
||||
this.$refs.panel.style.top = 'auto'
|
||||
this.$refs.panel.style.bottom = '2px'
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.init()
|
||||
this.insertToBody()
|
||||
},
|
||||
beforeDestroy() {
|
||||
const element = this.$refs.drawer
|
||||
element.remove()
|
||||
// window.removeEventListener('click', this.closeSidebar)
|
||||
},
|
||||
methods: {
|
||||
handleHeaderMoveUp(event) {
|
||||
this.handleMouseMoveUp(event)
|
||||
},
|
||||
handleHeaderMoveDown(event) {
|
||||
this.handleMoveMouseDown(event, true)
|
||||
},
|
||||
handleMoveMouseDown(event, isHeader = false) {
|
||||
const dragBox = this.$refs.dragBox
|
||||
const vm = this
|
||||
const rect = dragBox.getBoundingClientRect()
|
||||
const parentRect = dragBox.parentElement.getBoundingClientRect()
|
||||
const clientOffset = this.clientOffset
|
||||
clientOffset.clientX = event.clientX
|
||||
clientOffset.clientY = event.clientY
|
||||
|
||||
const handleOnMouseMove = _.debounce(function(event) {
|
||||
const diffY = rect.top - parentRect.top
|
||||
const maxY = window.innerHeight - parentRect.height
|
||||
let parentY = event.clientY - diffY
|
||||
// 这个是拖动的 header, 不是 bar
|
||||
if (isHeader) {
|
||||
parentY = event.clientY - rect.height / 2
|
||||
}
|
||||
if (parentY < 0) {
|
||||
parentY = 0
|
||||
} else if (parentY > maxY) {
|
||||
parentY = maxY
|
||||
}
|
||||
if (vm.$refs.panel) {
|
||||
vm.$refs.panel.style.top = parentY + 'px'
|
||||
}
|
||||
})
|
||||
|
||||
document.onmousemove = handleOnMouseMove
|
||||
document.onmouseup = function() {
|
||||
document.removeEventListener('mousemove', handleOnMouseMove)
|
||||
setTimeout(() => {
|
||||
document.onmousemove = null
|
||||
document.onmouseup = null
|
||||
}, 0)
|
||||
}
|
||||
},
|
||||
handleMouseMoveUp(event) {
|
||||
const clientOffset = this.clientOffset
|
||||
const clientX = event.clientX
|
||||
const clientY = event.clientY
|
||||
if (this.isDifferenceWithinThreshold(clientX, clientOffset.clientX) &&
|
||||
this.isDifferenceWithinThreshold(clientY, clientOffset.clientY)) {
|
||||
this.show = !this.show
|
||||
}
|
||||
},
|
||||
init() {
|
||||
this.$nextTick(() => {
|
||||
const dragBox = this.$refs.dragBox
|
||||
dragBox.addEventListener('mousedown', this.handleMoveMouseDown, false)
|
||||
dragBox.addEventListener('mouseup', this.handleMouseMoveUp, false)
|
||||
})
|
||||
},
|
||||
isDifferenceWithinThreshold(num1, num2, threshold = 5) {
|
||||
const difference = Math.abs(num1 - num2)
|
||||
return difference <= threshold
|
||||
},
|
||||
addEventClick() {
|
||||
},
|
||||
insertToBody() {
|
||||
const element = this.$refs.drawer
|
||||
const body = document.querySelector('body')
|
||||
body.insertBefore(element, body.firstChild)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.modal {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
opacity: 0;
|
||||
transition: opacity .3s cubic-bezier(.7, .3, .1, 1);
|
||||
background: rgba(0, 0, 0, .3);
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.drawer-panel {
|
||||
position: fixed;
|
||||
bottom: 1px;
|
||||
right: -1px;
|
||||
width: 100%;
|
||||
min-width: 260px;
|
||||
user-select: none;
|
||||
transition: transform .25s cubic-bezier(.7, .3, .1, 1);
|
||||
box-shadow: 0 0 8px 4px #00000014;
|
||||
transform: translate(100%);
|
||||
background: #FFFFFF;
|
||||
z-index: 1200;
|
||||
}
|
||||
|
||||
.drawer-panel-item {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.drawer-panel-item::-webkit-scrollbar-track {
|
||||
box-shadow: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.show {
|
||||
transition: all .3s cubic-bezier(.7, .3, .1, 1);
|
||||
}
|
||||
|
||||
.show .modal {
|
||||
z-index: 1003;
|
||||
opacity: 1;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.show .drawer-panel {
|
||||
transform: translate(0);
|
||||
}
|
||||
|
||||
.handle-button {
|
||||
position: absolute;
|
||||
bottom: 20%;
|
||||
left: -48px;
|
||||
width: 48px;
|
||||
height: 45px;
|
||||
line-height: 45px;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
font-size: 24px;
|
||||
border-radius: 20px 0 0 20px;
|
||||
z-index: 0;
|
||||
pointer-events: auto;
|
||||
color: #fff;
|
||||
background-color: #FFFFFF;
|
||||
opacity: 0.9;
|
||||
box-shadow: 0 0 8px 4px #00000014;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
left: -51px !important;
|
||||
width: 50px !important;
|
||||
transform: scale(1.01);
|
||||
}
|
||||
i {
|
||||
font-size: 20px;
|
||||
line-height: 45px;
|
||||
pointer-events: none;
|
||||
}
|
||||
img {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
transform: translateY(10%);
|
||||
margin-left: 3px;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -4,18 +4,18 @@
|
||||
:destroy-on-close="true"
|
||||
:show-cancel="false"
|
||||
:show-confirm="false"
|
||||
:title="$tc('assets.TestGatewayTestConnection')"
|
||||
:title="$tc('TestGatewayTestConnection')"
|
||||
:visible.sync="iVisible"
|
||||
top="35vh"
|
||||
width="40%"
|
||||
>
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="4" :sm="24">
|
||||
<div style="line-height: 34px">{{ $t('assets.SSHPort') }}</div>
|
||||
<div style="line-height: 34px">{{ $t('SSHPort') }}</div>
|
||||
</el-col>
|
||||
<el-col :md="14" :sm="24">
|
||||
<el-input v-model="port" />
|
||||
<span class="help-tips help-block">{{ $t('assets.TestGatewayHelpMessage') }}</span>
|
||||
<span class="help-tips help-block">{{ $t('TestGatewayHelpMessage') }}</span>
|
||||
</el-col>
|
||||
<el-col :md="4" :sm="24">
|
||||
<el-button
|
||||
@@ -25,7 +25,7 @@
|
||||
type="primary"
|
||||
@click="dialogConfirm"
|
||||
>
|
||||
{{ this.$t('common.Confirm') }}
|
||||
{{ this.$t('Confirm') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -75,7 +75,7 @@ export default {
|
||||
methods: {
|
||||
dialogConfirm() {
|
||||
if (isNaN(this.port)) {
|
||||
return this.$message.error(this.$tc('common.TestPortErrorMsg'))
|
||||
return this.$message.error(this.$tc('TestPortErrorMsg'))
|
||||
}
|
||||
this.$axios.post(
|
||||
`/api/v1/assets/gateways/${this.cell}/test-connective/`,
|
||||
|
||||
@@ -1,15 +1,20 @@
|
||||
<template>
|
||||
<TreeTable :header-actions="headerActions" :table-config="tableConfig" :tree-setting="treeSetting" />
|
||||
<AssetTreeTable
|
||||
:header-actions="headerActions"
|
||||
:table-config="tableConfig"
|
||||
:tree-setting="treeSetting"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script type="text/jsx">
|
||||
import TreeTable from '../../Table/TreeTable/index.vue'
|
||||
import { DetailFormatter } from '@/components/Table/TableFormatters'
|
||||
import AssetTreeTable from '@/components/Apps/AssetTreeTable'
|
||||
import { AccountInfoFormatter, DetailFormatter } from '@/components/Table/TableFormatters'
|
||||
import { connectivityMeta } from '@/components/Apps/AccountListTable/const'
|
||||
|
||||
export default {
|
||||
name: 'GrantedAssets',
|
||||
components: {
|
||||
TreeTable
|
||||
AssetTreeTable
|
||||
},
|
||||
props: {
|
||||
treeUrl: {
|
||||
@@ -32,11 +37,19 @@ export default {
|
||||
vm.tableConfig.url = url
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
type: Object,
|
||||
default: null
|
||||
},
|
||||
getShowUrl: {
|
||||
type: Function,
|
||||
default({ row, col }) {
|
||||
return this.tableUrl.replace('/assets/', `/assets/${row.id}/accounts/`)
|
||||
}
|
||||
},
|
||||
nameDisabled: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -46,9 +59,11 @@ export default {
|
||||
showMenu: false,
|
||||
showRefresh: true,
|
||||
showAssets: false,
|
||||
showSearch: false,
|
||||
url: this.tableUrl,
|
||||
// ?assets=0不显示资产. =1显示资产
|
||||
treeUrl: this.treeUrl,
|
||||
notShowBuiltinTree: true,
|
||||
callback: {
|
||||
onSelected: (event, node) => vm.onSelected(node, vm),
|
||||
refresh: vm.refreshObjectAssetPermission
|
||||
@@ -57,20 +72,38 @@ export default {
|
||||
tableConfig: {
|
||||
url: this.tableUrl,
|
||||
hasTree: true,
|
||||
columnsExtra: ['view_account'],
|
||||
columnsExclude: ['spec_info'],
|
||||
columnShow: {
|
||||
columnsShow: {
|
||||
min: ['name', 'address', 'accounts'],
|
||||
default: ['name', 'address', 'accounts', 'actions']
|
||||
default: ['name', 'address', 'platform', 'connectivity', 'view_account', 'actions']
|
||||
},
|
||||
columnsMeta: {
|
||||
name: {
|
||||
formatter: DetailFormatter,
|
||||
formatterArgs: {
|
||||
route: 'AssetDetail'
|
||||
route: 'AssetDetail',
|
||||
can: !this.nameDisabled
|
||||
}
|
||||
},
|
||||
labels: {
|
||||
formatterArgs: {
|
||||
showEditBtn: false
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
has: false
|
||||
...this.actions
|
||||
},
|
||||
view_account: {
|
||||
label: this.$t('Accounts'),
|
||||
formatter: AccountInfoFormatter,
|
||||
width: '100px'
|
||||
},
|
||||
connectivity: connectivityMeta
|
||||
},
|
||||
tableAttrs: {
|
||||
rowClassName({ row }) {
|
||||
return !row.is_active ? 'row_disabled' : ''
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -94,4 +127,8 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.row_disabled, .row_disabled:hover, .row_disabled:hover > td {
|
||||
cursor: not-allowed;
|
||||
background-color: rgba(192, 196, 204, 0.28) !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -37,7 +37,7 @@ export default {
|
||||
],
|
||||
columnsMeta: {
|
||||
name: {
|
||||
label: this.$t('assets.Asset'),
|
||||
label: this.$t('Asset'),
|
||||
formatter: (row) => {
|
||||
const to = {
|
||||
name: 'AssetDetail',
|
||||
|
||||
@@ -18,7 +18,8 @@ export default {
|
||||
props: {
|
||||
object: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
default: () => {
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -38,7 +39,8 @@ export default {
|
||||
],
|
||||
columnsMeta: {
|
||||
name: {
|
||||
label: this.$t('common.Name'),
|
||||
label: this.$t('Name'),
|
||||
width: 85,
|
||||
formatter: (row) => {
|
||||
const to = {
|
||||
name: 'UserDetail',
|
||||
@@ -52,7 +54,7 @@ export default {
|
||||
}
|
||||
},
|
||||
system_roles: {
|
||||
label: this.$t('users.SystemRoles'),
|
||||
label: this.$t('SystemRoles'),
|
||||
formatter: (row) => {
|
||||
return row['system_roles'].map(item => item['display_name']).join(', ') || '-'
|
||||
},
|
||||
@@ -60,7 +62,7 @@ export default {
|
||||
columnKey: 'system_roles'
|
||||
},
|
||||
org_roles: {
|
||||
label: this.$t('users.OrgRoles'),
|
||||
label: this.$t('OrgRoles'),
|
||||
formatter: (row) => {
|
||||
return row['org_roles'].map(item => item['display_name']).join(', ') || '-'
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-col :md="16" :sm="24">
|
||||
<IBox :title="title" class="block" v-bind="$attrs">
|
||||
<el-timeline>
|
||||
<el-timeline-item
|
||||
@@ -18,14 +18,14 @@
|
||||
type="primary"
|
||||
@click.native="onClick(activity)"
|
||||
>
|
||||
{{ $tc('common.Detail') }}
|
||||
{{ $tc('Detail') }}
|
||||
</el-link>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
</IBox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<DiffDetail ref="DetailDialog" :title="$tc('route.OperateLog')" />
|
||||
<DiffDetail ref="DetailDialog" :title="$tc('OperateLog')" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
import IBox from '@/components/IBox/index.vue'
|
||||
import DiffDetail from '@/components/Dialog/DiffDetail.vue'
|
||||
import { openTaskPage } from '@/utils/jms'
|
||||
import { toSafeLocalDateStr } from '@/utils/time'
|
||||
|
||||
export default {
|
||||
name: 'ResourceActivity',
|
||||
@@ -49,11 +50,11 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
activityUrl: `/api/v1/audits/activities/?resource_id=${this.object.id}`,
|
||||
title: `${this.$t('common.Activity')} - ${this.$t('common.Last30')}`,
|
||||
title: `${this.$t('Last30')}`,
|
||||
activities: [
|
||||
{
|
||||
content: this.$t('common.Now'),
|
||||
timestamp: this.$moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||
content: this.$t('Now'),
|
||||
timestamp: toSafeLocalDateStr(this.$moment()),
|
||||
type: 'primary'
|
||||
}
|
||||
]
|
||||
@@ -65,9 +66,11 @@ export default {
|
||||
methods: {
|
||||
getActivities() {
|
||||
this.$axios.get(this.activityUrl).then(res => {
|
||||
for (const i in res) {
|
||||
this.activities.push(res[i])
|
||||
}
|
||||
const activities = res || []
|
||||
activities.forEach(activity => {
|
||||
activity.timestamp = toSafeLocalDateStr(activity.timestamp)
|
||||
this.activities.push(activity)
|
||||
})
|
||||
})
|
||||
},
|
||||
onClick(activity) {
|
||||
|
||||
@@ -1,36 +1,32 @@
|
||||
<template>
|
||||
<Dialog
|
||||
:close-on-click-modal="false"
|
||||
:destroy-on-close="true"
|
||||
:show-cancel="false"
|
||||
:show-confirm="false"
|
||||
:title="title"
|
||||
:visible.sync="visible"
|
||||
:width="'36%'"
|
||||
class="dialog-content"
|
||||
v-bind="$attrs"
|
||||
width="600px"
|
||||
@confirm="visible = false"
|
||||
v-on="$listeners"
|
||||
>
|
||||
<div v-if="ConfirmType === 'relogin'">
|
||||
<div v-if="confirmTypeRequired === 'relogin'">
|
||||
<el-row :gutter="24" style="margin: 0 auto;">
|
||||
<el-col :md="24" :sm="24">
|
||||
<el-alert
|
||||
:closable="false"
|
||||
:title="$tc('auth.ReLoginTitle')"
|
||||
:title="$tc('ReLoginTitle')"
|
||||
center
|
||||
style="margin-bottom: 20px;"
|
||||
type="info"
|
||||
type="error"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24" style="margin: 0 auto;">
|
||||
<el-col :md="24" :sm="24">
|
||||
<el-button
|
||||
size="mini"
|
||||
style="width: 100%; line-height:20px;"
|
||||
type="primary"
|
||||
@click="logOut"
|
||||
>
|
||||
{{ this.$t('auth.ReLogin') }}
|
||||
<el-button class="confirm-btn" size="mini" type="primary" @click="logout">
|
||||
{{ this.$t('ReLogin') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -39,14 +35,13 @@
|
||||
<el-row :gutter="24" style="margin: 0 auto;">
|
||||
<el-col :md="24" :sm="24" :span="24" class="add">
|
||||
<el-select
|
||||
v-model="Select"
|
||||
:disabled="ConfirmType === 'password'"
|
||||
v-model="subTypeSelected"
|
||||
style="width: 100%; margin-bottom: 20px;"
|
||||
@change="helpText(Select)"
|
||||
@change="handleSubTypeChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, i) of Content"
|
||||
:key="i"
|
||||
v-for="item of subTypeChoices"
|
||||
:key="item.name"
|
||||
:disabled="item.disabled"
|
||||
:label="item.display_name"
|
||||
:value="item.name"
|
||||
@@ -55,30 +50,30 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24" style="margin: 0 auto;">
|
||||
<el-col :md="24" :sm="24" style="display: flex; margin-bottom: 20px;">
|
||||
<el-input v-model="SecretKey" :placeholder="HelpText" :show-password="showPassword" />
|
||||
<span v-if="Select === 'sms'" style="margin: -1px 0 0 20px;">
|
||||
<el-col :md="24" :sm="24" style="display: flex; align-items: center; margin-bottom: 20px;">
|
||||
<el-input
|
||||
v-model="secretValue"
|
||||
:placeholder="inputPlaceholder"
|
||||
:show-password="showPassword"
|
||||
@keyup.enter.native="handleConfirm"
|
||||
/>
|
||||
<span v-if="subTypeSelected === 'sms'" style="margin: -1px 0 0 20px;">
|
||||
<el-button
|
||||
:disabled="smsBtndisabled"
|
||||
:disabled="smsBtnDisabled"
|
||||
size="mini"
|
||||
style="line-height:20px; float: right;"
|
||||
style="line-height: 14px; float: right;"
|
||||
type="primary"
|
||||
@click="sendChallengeCode"
|
||||
@click="sendSMSCode"
|
||||
>
|
||||
{{ smsBtnText }}
|
||||
</el-button>
|
||||
</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24" style="margin: 0 auto;">
|
||||
<el-row :gutter="24" style="margin: 10px auto;">
|
||||
<el-col :md="24" :sm="24">
|
||||
<el-button
|
||||
size="mini"
|
||||
style="width: 100%; line-height:20px;"
|
||||
type="primary"
|
||||
@click="userConfirm"
|
||||
>
|
||||
{{ this.$t('common.Confirm') }}
|
||||
<el-button class="confirm-btn" size="mini" type="primary" @click="handleConfirm">
|
||||
{{ this.$t('Confirm') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -87,6 +82,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import Dialog from '@/components/Dialog/index.vue'
|
||||
import { encryptPassword } from '@/utils/crypto'
|
||||
|
||||
export default {
|
||||
name: 'UserConfirmDialog',
|
||||
@@ -96,125 +92,128 @@ export default {
|
||||
props: {
|
||||
url: {
|
||||
type: String,
|
||||
default: () => ''
|
||||
default: ''
|
||||
},
|
||||
handler: {
|
||||
type: Function,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
title: this.$t('CurrentUserVerify'),
|
||||
smsWidth: 0,
|
||||
Select: '',
|
||||
Level: null,
|
||||
HelpText: '',
|
||||
smsBtnText: '',
|
||||
smsBtndisabled: false,
|
||||
ConfirmType: '',
|
||||
Content: null,
|
||||
SecretKey: '',
|
||||
visible: false
|
||||
subTypeSelected: '',
|
||||
inputPlaceholder: '',
|
||||
smsBtnText: this.$t('SendVerificationCode'),
|
||||
smsBtnDisabled: false,
|
||||
confirmTypeRequired: '',
|
||||
subTypeChoices: [],
|
||||
secretValue: '',
|
||||
visible: false,
|
||||
callback: null,
|
||||
cancel: null,
|
||||
processing: false
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
showPassword() {
|
||||
if (this.ConfirmType === 'password') {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
visible(val) {
|
||||
if (!val) {
|
||||
this.$emit('UserConfirmCancel', true)
|
||||
}
|
||||
return this.confirmTypeRequired === 'password'
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.smsBtnText = this.$t('common.SendVerificationCode')
|
||||
this.$axios.get(`${this.url}`, { disableFlashErrorMsg: true }).then(
|
||||
() => { this.$emit('UserConfirmDone', true) }).catch((err) => {
|
||||
const confirm_type = err.response.data.code
|
||||
this.$axios.get('/api/v1/authentication/confirm/', { params: { confirm_type: confirm_type }}).then((data) => {
|
||||
this.ConfirmType = data.confirm_type
|
||||
this.Content = data.content
|
||||
if (this.ConfirmType === 'relogin') {
|
||||
this.$axios.post(
|
||||
`/api/v1/authentication/confirm/`,
|
||||
{
|
||||
confirm_type: this.ConfirmType,
|
||||
secret_key: ''
|
||||
},
|
||||
{ disableFlashErrorMsg: true },
|
||||
).then(() => { this.$emit('UserConfirmDone', true) }).catch(() => {
|
||||
this.title = this.$t('auth.NeedReLogin')
|
||||
this.$eventBus.$on('showConfirmDialog', this.performConfirm)
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.$eventBus.$off('showConfirmDialog', this.performConfirm)
|
||||
},
|
||||
methods: {
|
||||
handleSubTypeChange(val) {
|
||||
this.inputPlaceholder = this.subTypeChoices.filter(item => item.name === val)[0]?.placeholder
|
||||
this.smsWidth = val === 'sms' ? 6 : 0
|
||||
},
|
||||
performConfirm: _.debounce(function({ response, callback, cancel }) {
|
||||
if (this.processing || this.visible) {
|
||||
return
|
||||
}
|
||||
this.processing = true
|
||||
this.callback = callback
|
||||
this.cancel = cancel
|
||||
this.$log.debug('perform confirm action')
|
||||
const confirmType = response.data?.code
|
||||
const confirmUrl = '/api/v1/authentication/confirm/'
|
||||
this.$axios.get(confirmUrl, { params: { confirm_type: confirmType }}).then((data) => {
|
||||
this.confirmTypeRequired = data.confirm_type
|
||||
|
||||
if (this.confirmTypeRequired === 'relogin') {
|
||||
this.$axios.post(confirmUrl, { 'confirm_type': 'relogin', 'secret_key': 'x' }).then(() => {
|
||||
this.callback()
|
||||
this.visible = false
|
||||
}).catch(() => {
|
||||
this.title = this.$t('NeedReLogin')
|
||||
this.visible = true
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.ConfirmType === 'mfa') {
|
||||
this.Select = this.Content.filter(item => !item.disabled)[0].name
|
||||
if (this.Select === 'sms') {
|
||||
this.smsWidth = 6
|
||||
}
|
||||
this.HelpText = this.Content.filter(item => !item.disabled)[0].placeholder
|
||||
} else if (this.ConfirmType === 'password') {
|
||||
this.Select = this.$t('setting.password')
|
||||
this.HelpText = this.$t('common.PasswordRequireForSecurity')
|
||||
this.Content = [{ 'name': 'password' }]
|
||||
}
|
||||
this.title = this.$t('common.CurrentUserVerify')
|
||||
this.subTypeChoices = data.content
|
||||
const defaultSubType = this.subTypeChoices.filter(item => !item.disabled)[0]
|
||||
this.subTypeSelected = defaultSubType.name
|
||||
this.inputPlaceholder = defaultSubType.placeholder
|
||||
this.visible = true
|
||||
}).catch(() => {
|
||||
this.$emit('AuthMFAError', true)
|
||||
}).catch((err) => {
|
||||
const data = err.response?.data
|
||||
const msg = data?.error || data?.detail || data?.msg || this.$t('GetConfirmTypeFailed')
|
||||
this.$message.error(msg)
|
||||
this.cancel(err)
|
||||
}).finally(() => {
|
||||
this.processing = false
|
||||
})
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
helpText(val) {
|
||||
this.HelpText = this.Content.filter(item => item.name === val)[0]?.placeholder
|
||||
if (val === 'sms') {
|
||||
this.smsWidth = 6
|
||||
} else {
|
||||
this.smsWidth = 0
|
||||
}
|
||||
},
|
||||
logOut() {
|
||||
}, 500),
|
||||
logout() {
|
||||
window.location.href = `${process.env.VUE_APP_LOGOUT_PATH}?next=${this.$route.fullPath}`
|
||||
},
|
||||
sendChallengeCode() {
|
||||
this.$axios.post(
|
||||
`/api/v1/authentication/mfa/select/`, {
|
||||
type: 'sms'
|
||||
}
|
||||
).then(res => {
|
||||
this.$message.success(this.$t('common.VerificationCodeSent'))
|
||||
sendSMSCode() {
|
||||
this.$axios.post(`/api/v1/authentication/mfa/select/`, { type: 'sms' }).then(res => {
|
||||
this.$message.success(this.$tc('VerificationCodeSent'))
|
||||
let time = 60
|
||||
const interval = setInterval(() => {
|
||||
this.smsBtnText = this.$t('common.Pending') + `: ${time}`
|
||||
this.smsBtndisabled = true
|
||||
time -= 1
|
||||
this.smsBtnDisabled = true
|
||||
|
||||
if (time === 0) {
|
||||
this.smsBtnText = this.$t('common.SendVerificationCode')
|
||||
this.smsBtndisabled = false
|
||||
const interval = setInterval(() => {
|
||||
time -= 1
|
||||
this.smsBtnText = `${this.$t('Pending')}: ${time}`
|
||||
|
||||
if (time <= 0) {
|
||||
clearInterval(interval)
|
||||
this.smsBtnText = this.$t('SendVerificationCode')
|
||||
this.smsBtnDisabled = false
|
||||
}
|
||||
}, 1000)
|
||||
}).catch(() => {
|
||||
this.$message.error(this.$tc('FailedToSendVerificationCode'))
|
||||
})
|
||||
},
|
||||
userConfirm() {
|
||||
if (this.Select === 'otp' && this.SecretKey.length !== 6) {
|
||||
return this.$message.error(this.$t('common.MFAErrorMsg'))
|
||||
handleConfirm() {
|
||||
if (this.confirmTypeRequired === 'relogin') {
|
||||
return this.logout()
|
||||
}
|
||||
this.$axios.post(
|
||||
`/api/v1/authentication/confirm/`, {
|
||||
confirm_type: this.ConfirmType,
|
||||
mfa_type: this.ConfirmType === 'password' ? undefined : this.Select,
|
||||
secret_key: this.SecretKey
|
||||
}
|
||||
).then(res => {
|
||||
this.$emit('UserConfirmDone', true)
|
||||
if (this.subTypeSelected === 'otp' && this.secretValue.length !== 6) {
|
||||
return this.$message.error(this.$tc('MFAErrorMsg'))
|
||||
}
|
||||
|
||||
const data = {
|
||||
confirm_type: this.confirmTypeRequired,
|
||||
mfa_type: this.confirmTypeRequired === 'mfa' ? this.subTypeSelected : '',
|
||||
secret_key: this.confirmTypeRequired === 'password' ? encryptPassword(this.secretValue) : this.secretValue
|
||||
}
|
||||
|
||||
this.$axios.post(`/api/v1/authentication/confirm/`, data).then(() => {
|
||||
this.secretValue = ''
|
||||
this.visible = false
|
||||
this.$nextTick(() => {
|
||||
this.callback()
|
||||
})
|
||||
}).catch((err) => {
|
||||
this.$message.error(err.message || this.$tc('ConfirmFailed'))
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -222,11 +221,21 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.dialog-content >>> .el-dialog__footer {
|
||||
.dialog-content ::v-deep .el-dialog__footer {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.dialog-content >>> .el-dialog {
|
||||
.dialog-content ::v-deep .el-dialog {
|
||||
padding: 8px;
|
||||
|
||||
.el-dialog__body {
|
||||
padding-top: 30px;
|
||||
padding-bottom: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
.confirm-btn {
|
||||
width: 100%;
|
||||
line-height: 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script type="text/jsx">
|
||||
import { toSafeLocalDateStr } from '@/utils/common'
|
||||
import { toSafeLocalDateStr } from '@/utils/time'
|
||||
|
||||
export default {
|
||||
name: 'ItemValue',
|
||||
@@ -17,6 +17,9 @@ export default {
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
computed: {
|
||||
displayValue() {
|
||||
if ([null, undefined, ''].includes(this.value)) {
|
||||
@@ -44,9 +47,9 @@ export default {
|
||||
methods: {
|
||||
toChoicesDisplay(value) {
|
||||
if (!value) {
|
||||
return this.$t('common.No')
|
||||
return this.$t('No')
|
||||
}
|
||||
return this.$t('common.Yes')
|
||||
return this.$t('Yes')
|
||||
},
|
||||
isDatetime(value) {
|
||||
if (typeof value !== 'string') {
|
||||
@@ -64,8 +67,19 @@ export default {
|
||||
}
|
||||
},
|
||||
render(h) {
|
||||
let formatterData = ''
|
||||
if (typeof this.formatter === 'function') {
|
||||
return this.formatter(this.item, this.value)
|
||||
const data = this.formatter(this.item, this.value)
|
||||
if (data instanceof Promise) {
|
||||
data.then(res => {
|
||||
formatterData = res
|
||||
})
|
||||
} else {
|
||||
formatterData = data
|
||||
}
|
||||
return (
|
||||
<span>{formatterData}</span>
|
||||
)
|
||||
}
|
||||
if (this.value instanceof Array) {
|
||||
const newArr = this.value || []
|
||||
@@ -78,7 +92,7 @@ export default {
|
||||
)
|
||||
}
|
||||
return (
|
||||
<span>{this.displayValue}</span>
|
||||
<span title={this.displayValue}>{this.displayValue}</span>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,20 @@
|
||||
<template>
|
||||
<DetailCard v-if="!loading && hasObject && items.length > 0" :items="items" v-bind="$attrs" />
|
||||
<IBox v-if="loading" style="width: 100%; height: 200px" />
|
||||
<div v-else>
|
||||
<DetailCard v-if="hasObject && items.length > 0" :items="validItems" :loading="loading" v-bind="$attrs" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DetailCard from './index.vue'
|
||||
import { copy, toSafeLocalDateStr } from '@/utils/common'
|
||||
import { copy } from '@/utils/common'
|
||||
import { toSafeLocalDateStr } from '@/utils/time'
|
||||
import IBox from '@/components/IBox/index.vue'
|
||||
import LabelsDetailFormatter from '../Formatters/LabelsDetailFormatter.vue'
|
||||
|
||||
export default {
|
||||
name: 'AutoDetailCard',
|
||||
components: { DetailCard },
|
||||
components: { IBox, DetailCard },
|
||||
props: {
|
||||
object: {
|
||||
type: Object,
|
||||
@@ -55,6 +61,9 @@ export default {
|
||||
},
|
||||
hasObject() {
|
||||
return Object.keys(this.iObject).length > 0
|
||||
},
|
||||
validItems() {
|
||||
return this.items.filter(item => this.isHidden(item))
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
@@ -69,13 +78,92 @@ export default {
|
||||
if (val === '-') {
|
||||
return <span>{'-'}</span>
|
||||
}
|
||||
return (<span style={{ cursor: 'pointer' }} onClick={() => copy(val)}>
|
||||
{val}
|
||||
</span>)
|
||||
return (
|
||||
<span style={{ cursor: 'pointer' }} onClick={() => copy(val)} title={val}>
|
||||
{val}
|
||||
</span>
|
||||
)
|
||||
}
|
||||
}
|
||||
return formatter
|
||||
},
|
||||
isHidden(item) {
|
||||
let has = item.has
|
||||
if (typeof has === 'function') {
|
||||
has = has()
|
||||
}
|
||||
if (has === undefined) {
|
||||
has = true
|
||||
}
|
||||
return has
|
||||
},
|
||||
parseValue(value, tp) {
|
||||
if (value === null || value === '') {
|
||||
value = '-'
|
||||
} else if (value === 0) {
|
||||
value = 0
|
||||
} else if (tp === 'datetime') {
|
||||
value = toSafeLocalDateStr(value)
|
||||
} else if (tp === 'labeled_choice') {
|
||||
value = value?.['label']
|
||||
} else if (tp === 'related_field' || tp === 'nested object' || value?.name) {
|
||||
value = value?.['name']
|
||||
} else if (tp === 'm2m_related_field') {
|
||||
value = value?.map(item => item['name']).join(', ')
|
||||
} else if (tp === 'boolean') {
|
||||
value = value ? this.$t('Yes') : this.$t('No')
|
||||
}
|
||||
return value
|
||||
},
|
||||
getComponentByName(name) {
|
||||
if (name === 'labels') {
|
||||
return LabelsDetailFormatter
|
||||
}
|
||||
return null
|
||||
},
|
||||
parseArrayValue(value, excludes, label) {
|
||||
if (Array.isArray(value)) {
|
||||
const tp = typeof value[0]
|
||||
for (const [index, item] of value.entries()) {
|
||||
let object = {}
|
||||
if (tp === 'object') {
|
||||
const firstValue = value[0]
|
||||
if (firstValue.hasOwnProperty('name')) {
|
||||
value.forEach(item => {
|
||||
const fieldName = `${name}.${item.name}`
|
||||
if (excludes.includes(fieldName)) {
|
||||
return
|
||||
}
|
||||
object = {
|
||||
key: item.label,
|
||||
value: item.value
|
||||
}
|
||||
})
|
||||
} else {
|
||||
const fieldName = `${name}.${item.name}`
|
||||
if (excludes.includes(fieldName)) {
|
||||
continue
|
||||
}
|
||||
object = {
|
||||
key: item.label,
|
||||
value: item.value
|
||||
}
|
||||
}
|
||||
} else if (tp === 'string') {
|
||||
object = {
|
||||
value: value[index]
|
||||
}
|
||||
if (index === 0) {
|
||||
object['key'] = label
|
||||
}
|
||||
}
|
||||
if (index !== value.length - 1) {
|
||||
object['class'] = 'array-item'
|
||||
}
|
||||
this.items.push(object)
|
||||
}
|
||||
}
|
||||
},
|
||||
async optionAndGenFields() {
|
||||
const data = await this.$store.dispatch('common/getUrlMeta', { url: this.url })
|
||||
let remoteMeta = data.actions['GET'] || {}
|
||||
@@ -88,6 +176,7 @@ export default {
|
||||
const excludes = (this.excludes || []).concat(defaultExcludes)
|
||||
fields = fields.filter(item => !excludes.includes(item))
|
||||
const defaultFormatter = this.defaultFormatter(fields)
|
||||
|
||||
for (const name of fields) {
|
||||
if (typeof name === 'object') {
|
||||
this.items.push(name)
|
||||
@@ -104,50 +193,32 @@ export default {
|
||||
let value = this.iObject[name]
|
||||
const label = fieldMeta.label
|
||||
|
||||
if (Array.isArray(value)) {
|
||||
if (typeof value[0] === 'object') {
|
||||
value.forEach(item => {
|
||||
const fieldName = `${name}.${item.name}`
|
||||
if (excludes.includes(fieldName)) {
|
||||
return
|
||||
}
|
||||
this.items.push({
|
||||
key: item.label,
|
||||
value: item.value
|
||||
})
|
||||
})
|
||||
} else if (typeof value[0] === 'string') {
|
||||
value.forEach((item, index) => {
|
||||
let data = {}
|
||||
if (index === 0) {
|
||||
data = {
|
||||
key: label,
|
||||
value: value[index]
|
||||
}
|
||||
} else {
|
||||
data = {
|
||||
value: value[index]
|
||||
}
|
||||
}
|
||||
this.items.push(data)
|
||||
})
|
||||
}
|
||||
const component = this.getComponentByName(name)
|
||||
if (component) {
|
||||
this.items.push({
|
||||
key: label,
|
||||
value: value,
|
||||
component: component
|
||||
})
|
||||
continue
|
||||
}
|
||||
if (value === null || value === '') {
|
||||
value = '-'
|
||||
} else if (fieldMeta.type === 'datetime') {
|
||||
value = toSafeLocalDateStr(value)
|
||||
} else if (fieldMeta.type === 'labeled_choice') {
|
||||
value = value?.['label']
|
||||
} else if (fieldMeta.type === 'related_field' || fieldMeta.type === 'nested object') {
|
||||
value = value?.['name']
|
||||
} else if (fieldMeta.type === 'm2m_related_field') {
|
||||
value = value?.map(item => item['name']).join(', ')
|
||||
} else if (fieldMeta.type === 'boolean') {
|
||||
value = value ? this.$t('common.Yes') : this.$t('common.No')
|
||||
|
||||
const formatter = this.formatters[name]
|
||||
if (formatter) {
|
||||
this.items.push({
|
||||
key: label,
|
||||
value: value,
|
||||
formatter: formatter
|
||||
})
|
||||
continue
|
||||
}
|
||||
|
||||
if (Array.isArray(value)) {
|
||||
this.parseArrayValue(value, excludes, label)
|
||||
continue
|
||||
}
|
||||
value = this.parseValue(value, fieldMeta.type)
|
||||
|
||||
if (value === undefined) {
|
||||
if (this.showUndefine) {
|
||||
value = '-'
|
||||
@@ -159,7 +230,7 @@ export default {
|
||||
const item = {
|
||||
key: label,
|
||||
value: value,
|
||||
formatter: this.formatters[name] || defaultFormatter[name]
|
||||
formatter: defaultFormatter[name]
|
||||
}
|
||||
this.items.push(item)
|
||||
}
|
||||
|
||||
@@ -1,9 +1,17 @@
|
||||
<template>
|
||||
<IBox :fa="fa" :title="title">
|
||||
<el-form class="content" label-position="left" label-width="25%">
|
||||
<el-form-item v-for="item in items" :key="item.key" :label="item.key">
|
||||
<ItemValue :value="item.value" class="item-value" v-bind="item" />
|
||||
</el-form-item>
|
||||
<el-form :label-width="labelWidth" class="content" label-position="left">
|
||||
<span v-for="item in items" :key="item.key">
|
||||
<el-form-item v-if="item.has !== false" :class="item.class" :label="item.key">
|
||||
<span slot="label"> {{ formateLabel(item.key) }}</span>
|
||||
<span
|
||||
:is="item.component"
|
||||
v-if="item.component"
|
||||
v-bind="{...item}"
|
||||
/>
|
||||
<ItemValue v-else :value="item.value" class="item-value" v-bind="item" />
|
||||
</el-form-item>
|
||||
</span>
|
||||
</el-form>
|
||||
<slot />
|
||||
</IBox>
|
||||
@@ -20,12 +28,12 @@ export default {
|
||||
title: {
|
||||
type: String,
|
||||
default() {
|
||||
return this.$t('common.BasicInfo')
|
||||
return this.$t('BasicInfo')
|
||||
}
|
||||
},
|
||||
fa: {
|
||||
type: String,
|
||||
default: 'fa-info-circle'
|
||||
default: 'fa-info-circle-o'
|
||||
},
|
||||
items: {
|
||||
type: Array,
|
||||
@@ -34,49 +42,84 @@ export default {
|
||||
align: {
|
||||
type: String,
|
||||
default: 'left'
|
||||
},
|
||||
labelWidth: {
|
||||
type: String,
|
||||
default: '25%'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
iItems: this.items.filter(item => {
|
||||
return !item.hasOwnProperty('has') || item.has === true
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
formateLabel(label) {
|
||||
if (!label) {
|
||||
return label
|
||||
}
|
||||
return label.replace(' amount', '').replace('数量', '')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.el-card__body {
|
||||
padding: 20px 40px;
|
||||
.el-card__body {
|
||||
padding: 20px 40px;
|
||||
}
|
||||
|
||||
.el-form-item {
|
||||
border-bottom: 1px dashed #EBEEF5;
|
||||
padding: 1px 0;
|
||||
margin-bottom: 0;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.el-form-item {
|
||||
border-bottom: 1px dashed #EBEEF5;
|
||||
padding: 1px 0;
|
||||
margin-bottom: 0;
|
||||
&.array-item {
|
||||
border-bottom: none;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
::v-deep .el-form-item__content {
|
||||
border-bottom: 1px dashed #EBEEF5
|
||||
}
|
||||
|
||||
&:hover {
|
||||
}
|
||||
|
||||
>>> .el-form-item__label {
|
||||
padding-right: 8%;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
>>> .el-form-item__content {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
>>> .el-tag--mini {
|
||||
margin-right: 3px;
|
||||
::v-deep .el-form-item__label:last-child {
|
||||
border: 1px dashed #EBEEF5;
|
||||
}
|
||||
}
|
||||
|
||||
.item-value span {
|
||||
word-break: break-word;
|
||||
::v-deep .el-form-item__label {
|
||||
padding-right: 8%;
|
||||
overflow: hidden;
|
||||
color: var(--color-icon-primary);
|
||||
|
||||
span {
|
||||
display: inline-block;
|
||||
line-height: 1.5;
|
||||
}
|
||||
}
|
||||
.content {
|
||||
|
||||
::v-deep .el-form-item__content {
|
||||
color: var(--color-text-primary);
|
||||
font-size: 13px;
|
||||
line-height: 2.5;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
::v-deep .el-tag--mini {
|
||||
margin-right: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
.item-value span {
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.content {
|
||||
font-size: 13px;
|
||||
line-height: 2.5;
|
||||
}
|
||||
</style>
|
||||
|
||||
32
src/components/Cards/Formatters/LabelsDetailFormatter.vue
Normal file
@@ -0,0 +1,32 @@
|
||||
<template>
|
||||
<div>
|
||||
<ILabel
|
||||
v-for="item in value"
|
||||
:key="item.key"
|
||||
:label="item"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ILabel from '@/components/Widgets/ILabel/index.vue'
|
||||
|
||||
export default {
|
||||
name: 'LabelsDetailFormatter',
|
||||
components: { ILabel },
|
||||
props: {
|
||||
label: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
value: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||