feat:修改alert silence的创建方式

fix: 修改chart type 为group children为null的是问题 以及更换icon图标
This commit is contained in:
zhangyu
2021-04-29 17:35:07 +08:00
parent 6b1efe86c9
commit 1e1c52fb6b
19 changed files with 238 additions and 381 deletions

View File

@@ -64,6 +64,9 @@
.gray {
color: $--suspended-color !important;
}
.monitorColor {
color: $--monitor-color !important;
}
.dark-red {
color: #aa0000 !important;
}

View File

@@ -20,6 +20,18 @@ Created by iconfont
/>
<missing-glyph />
<glyph glyph-name="overview-alert" unicode="&#59174;" d="M79.09953125 18.848454609999976v68.36219902h865.8009375v-68.36219902c-0.14430016-37.69841582-27.63347992-68.18182383-61.54401664-68.36219902H140.64354789C106.73301117-49.33336922000001 79.17168133-18.813886170000046 79.09953125 18.848454609999976zM859.61907641 502.14575293V115.24095897999996H151.24960938V502.10967789C151.24960938 685.22657617 310.70128203 834.93798828 505.50649297 834.93798828c194.69698582 0 354.11258344-149.74748715 354.11258344-332.82831039v0.03607504z m-241.91921196-52.30880664a18.47042 18.47042 0 0 1-15.72871703 8.44155914h-55.91631054l64.79077015 97.90765602a16.23376758 16.23376758 0 0 1 0.46897551 17.38816882A18.50649504 18.50649504 0 0 1 595.33334023 582.41271484h-136.90477324a18.00144449 18.00144449 0 0 1-17.85714433-13.99711515l-36.4718645-182.07072215a16.48629285 16.48629285 0 0 1 3.82395414-14.14141531 18.75902031 18.75902031 0 0 1 14.06926524-6.20490672h51.94805625l-17.46031891-139.5382511a17.13564355 17.13564355 0 0 1 12.5541136-18.32611984 18.75902031 18.75902031 0 0 1 21.57287336 8.04473371l127.34488789 216.63060957a16.23376758 16.23376758 0 0 1-0.25252528 16.95526836v0.07215008z" horiz-adv-x="1024" />
<glyph glyph-name="overview-endpoint" unicode="&#59173;" d="M994.92185308 826.24718373c23.12082017 0 43.94595643-14.10206041 52.595767-35.62410107l148.2356154-369.60517366c4.59136869-11.47842128 5.24727825-23.89971338 2.21369508-35.54211227H108.74671729a56.69520376 56.69520376 0 0 0 2.86960554 37.01790988l160.6569066 369.64616674A56.65420891 56.65420891 0 0 0 324.25408173 826.24718373h670.66777135zM1176.6088675 359.40338221a34.02532069 34.02532069 0 0 0 34.02532159-34.02532069v-317.46034375c0-31.31969276-25.37551011-56.69520376-56.69520377-56.69520375H151.62682015c-31.2786988 0-56.65420891 25.41650495-56.65420893 56.69520375V325.37806151999996a34.02532069 34.02532069 0 0 0 34.02532158 34.02532069h1047.6109347z m-131.34593735-156.51647589H240.29762709a40.99436297 40.99436297 0 0 1-40.99436296-40.99436297v-22.38292181a40.99436297 40.99436297 0 0 1 40.99436296-40.99436208h804.96530306a40.99436297 40.99436297 0 0 1 40.99436296 40.99436208v22.38292181a40.99436297 40.99436297 0 0 1-40.99436296 40.99436297z" horiz-adv-x="1303" />
<glyph glyph-name="mobandaoru" unicode="&#59172;" d="M903.92953165 813.60465494H341.99637841c-28.08699495 0-56.17398903-28.08699495-56.17398902-56.17398903v-112.41239875h56.17398903V757.43066591h561.93315323v-561.93315323H791.58155273V594.44879264a50.37621502 50.37621502 0 0 1-50.56947452 50.56947452H167.80547526a50.37621502 50.37621502 0 0 1-50.56947451-50.56947452v-174.19090315h56.23840973V588.84427727h561.8687334v-561.93315237H173.47441048v112.41239788H117.23600075V21.24218970000004c0-28.08699495 22.54689941-50.56947453 50.56947452-50.56947453h573.20660294a50.37621502 50.37621502 0 0 1 50.56947452 50.56947453v118.01691325h112.34797892c28.08699495 0 56.17398903 28.08699495 56.17398903 56.17398989V757.43066591c0 28.08699495-28.08699495 56.17398903-56.17398903 56.17398903zM291.42690389 150.53255265999996l39.29602482-39.29602395 162.98187328 168.52196795L325.18283318 431.59575903l-39.29602482-39.36044466L381.29240324 307.90991056999997H61.06201172v-56.23840887h331.50384122l-101.13894905-101.13894904z" horiz-adv-x="1024" />
<glyph glyph-name="more1" unicode="&#58999;" d="M243.2 384c0 49.664-39.936 89.6-89.6 89.6S64 433.664 64 384s39.936-89.6 89.6-89.6 89.6 39.936 89.6 89.6z m179.2 0c0-49.664 39.936-89.6 89.6-89.6s89.6 39.936 89.6 89.6-39.936 89.6-89.6 89.6-89.6-39.936-89.6-89.6z m358.4 0c0-49.664 39.936-89.6 89.6-89.6S960 334.336 960 384s-39.936 89.6-89.6 89.6c-49.152 0-89.6-39.936-89.6-89.6z" horiz-adv-x="1024" />
<glyph glyph-name="bar-chart" unicode="&#59162;" d="M160.93452769 782.72141926v-704.51374257c0-5.16272745 4.2890351-9.45176256 9.53118922-9.45176256h819.68227976a38.12475689 38.12475689 0 0 0 38.12475688-38.12475773v-9.53118922a38.12475689 38.12475689 0 0 0-38.12475688-38.04533022H113.27858074a38.12475689 38.12475689 0 0 0-38.12475689 38.12475687V782.72141926A38.12475689 38.12475689 0 0 0 113.27858074 820.84617615H122.80976995a38.12475689 38.12475689 0 0 0 38.12475774-38.1247569zM370.62069224 248.97481867v-68.14800348c0-25.01937161-17.07671377-45.35257566-38.12475773-45.35257652h-9.53118923c-21.04804312 0-38.12475689 20.33320407-38.12475688 45.35257652V248.97481867c0 25.01937161 17.07671377 45.35257566 38.12475688 45.35257565h9.53118923c21.04804312 0 38.12475689-20.33320407 38.12475773-45.35257565z m177.51840082 267.27043314V173.51956975999997a38.12475689 38.12475689 0 0 0-38.12475773-38.04533109h-9.53118922a38.12475689 38.12475689 0 0 0-38.12475688 38.12475774V516.08639851a38.12475689 38.12475689 0 0 0 38.12475688 38.12475688h9.53118922a38.12475689 38.12475689 0 0 0 38.12475773-38.12475688zM725.65749304 363.90507590000004v-190.4649328a38.12475689 38.12475689 0 0 0-38.12475689-38.04533022h-9.53118921a38.12475689 38.12475689 0 0 0-38.12475688 38.12475688V363.82564923999996a38.12475689 38.12475689 0 0 0 38.12475688 38.12475688h9.53118921a38.12475689 38.12475689 0 0 0 38.12475689-38.12475688z m177.51840082 266.55559411v-457.02052691a38.12475689 38.12475689 0 0 0-38.12475687-38.04533022h-9.53118923a38.12475689 38.12475689 0 0 0-38.12475773 38.12475688V630.38124335a38.12475689 38.12475689 0 0 0 38.12475773 38.12475688h9.53118923a38.12475689 38.12475689 0 0 0 38.12475687-38.12475688z" horiz-adv-x="1117" />
@@ -113,9 +125,6 @@ Created by iconfont
<glyph glyph-name="menu-dashboard" unicode="&#59147;" d="M819.06076466 800.45981135c211.80868651-80.33011965 351.9837783-287.17856579 350.88866041-517.79751308a554.00082286 554.00082286 0 0 0-68.54149706-267.20876906A156.79511683 156.79511683 0 0 0 963.87400291-66.93798828000001H300.10371475a157.18162881 157.18162881 0 0 0-137.66276301 82.45593645c-110.92900213 200.9219267-87.22291995 451.18857681 59.58729806 626.60069754C368.77404886 817.65960436 607.25207727 880.85434908 818.9963457 800.45981135h0.06441896z m-187.58725529-30.27678858c-17.97281698 0-36.01005379-0.96628084-53.78961478-3.02767955-158.85651467-18.81026078-298.00090753-117.17761549-370.922877-262.44178468a497.31236645 497.31236645 0 0 1 7.7302441-460.59370765c17.393049-31.56516332 50.0533302-51.08402911 85.61245306-51.21286616h663.77028816a97.20781874 97.20781874 0 0 1 86.38547702 51.27728512 492.15887009 492.15887009 0 0 1 59.84497213 237.25407351 493.06073198 493.06073198 0 0 1-159.1141896 364.22333094 468.19511382 468.19511382 0 0 1-319.51675309 124.52134847z m0-303.54091676c16.49118711 0 29.89027659-13.46350844 29.89027658-29.95469554v-94.05130214a125.29437245 125.29437245 0 1 0-59.84497301 0v94.05130214c0 16.49118711 13.5279274 29.89027659 29.95469643 29.89027747v0.06441807z m0-181.40306a65.51381839 65.51381839 0 1 1 0-130.96321783 65.51381839 65.51381839 0 0 1 0 130.96321783z m394.88663237 29.63260251a29.89027659 29.89027659 0 0 0 0-59.78055406h-65.83591142a29.89027659 29.89027659 0 1 0 0 59.9093911h65.77149334v-0.12883704z m-729.86387454 0a29.89027659 29.89027659 0 0 0 0-59.78055406H229.17872591a29.89027659 29.89027659 0 1 0 0 59.9093911h67.31754129v-0.12883704z m646.44165813 268.94807387a29.89027659 29.89027659 0 0 0 0-42.38750505l-48.18518836-47.6054195a29.89027659 29.89027659 0 0 0-21.2581706-8.76094302 29.89027659 29.89027659 0 0 0-20.87165951 50.89077313l48.1207694 47.9275134a29.89027659 29.89027659 0 0 0 42.19424907 0v-0.06441897z m-587.56296595-1e-8l47.54100053-47.79867547a29.89027659 29.89027659 0 1 0-42.38750418-42.19424907l-47.60541949 47.54100142a30.01911451 30.01911451 0 1 0 42.45192314 42.45192312z m276.09854999 150.09557166c16.49118711 0 29.89027659-13.3346714 29.89027658-29.82585852v-65.83591141a29.89027659 29.89027659 0 1 0-59.84497301 0V704.15385449c0 16.49118711 13.5279274 29.89027659 29.95469643 29.89027659z" horiz-adv-x="1243" />
<glyph glyph-name="more1" unicode="&#59140;" d="M728.43042205 383.87533995C728.43042205 179.48184098000002 887.64999519 13.597261969999977 1083.89737647 13.597261969999977c196.49423301 0 355.71380687 165.884579 355.71380689 370.27807798 0 132.31270003-67.63746215 254.50446574-177.73347759 320.66081536a343.37120416 343.37120416 0 0 1-355.46695441-1e-8C796.06788421 638.37980497 728.43042205 516.1880392400001 728.43042205 383.87533995z m1495.92343402 0c0-204.39349897 158.97272142-370.27807799 355.46695444-370.27807798 196.49423301 0 355.46695443 165.884579 355.46695515 370.27807798 0 132.31270003-67.63746215 254.50446574-177.7334776 320.66081536a343.37120416 343.37120416 0 0 1-355.46695441-1e-8c-110.09601541-66.15634967-177.73347756-188.34811534-177.73347758-320.66081535z m1495.6765823 0c0-204.39349897 159.21957314-370.27807799 355.46695442-370.27807798C4271.99162582 13.597261969999977 4431.21119967 179.48184098000002 4431.21119967 383.87533995S4271.99162582 754.1534172 4075.74424523 754.1534172c-196.49423301 0-355.71380687-165.884579-355.71380686-370.27807725z" horiz-adv-x="5120" />
<glyph glyph-name="personal" unicode="&#59135;" d="M512 323.54360967a241.82556214 241.82556214 0 1 0 0.06045651 483.71157999A241.82556214 241.82556214 0 0 0 512 323.54360967z m0 409.28976345a167.52465781 167.52465781 0 0 1 0-334.92840343 167.52465781 167.52465781 0 0 1 0 334.92840343zM770.75335147-39.19473315000005H252.8234538C195.69216482-39.19473315000005 149.26165719 12.495480810000004 149.26165719 76.15605947999995c0 8.58480768 0.84638947 16.86733281 2.4787119 25.14985879C183.84271229 266.77505892 315.81901334 384.66501994 467.92729124 384h87.964048c152.04782221 0.90684598 284.02412244-116.98311587 316.36829167-282.69408173 12.39356028-62.27008228-22.79205908-123.9356003-78.71422036-137.47783178-7.67796171-2.11597366-15.11409738-3.02281964-22.79205908-3.02281964zM467.86683474 306.91810206c-119.945479 0.72547645-223.93047034-92.0750823-249.44306653-222.47951661-4.11103432-20.73654193 7.67796171-41.23125863 26.35898567-45.88640071 2.66008141-0.66501994 5.38061851-0.90684598 8.28252595-0.90684597h517.86944034c19.04376299-0.48365124 34.82288113 16.38368158 35.42744457 37.60387556a46.37005112 46.37005112 0 0 1-0.84638946 9.24982762c-25.4521405 130.3439778-129.43713183 223.32590608-249.38261002 222.47951662H467.86683474z" horiz-adv-x="1024" />
@@ -188,9 +197,6 @@ Created by iconfont
<glyph glyph-name="revoke" unicode="&#59119;" d="M646.81519655 665.85277317h-437.50983338L294.38792112 752.48106438a40.05466394 40.05466394 0 0 1 0 56.45288137 38.44172462 38.44172462 0 0 1-55.51200087 0l-152.01954533-154.57336599a40.05466394 40.05466394 0 0 1 0-56.52008827L238.94312629 443.13271339a39.1809878 39.1809878 0 0 1 55.51200002 0 40.05466394 40.05466394 0 0 1 0 56.45288222L209.23815711 585.8778574h437.57703944c160.48747825 0 290.79954668-125.47325044 290.79954753-279.57617663 0-154.23733744-130.37927447-279.64338183-290.79954753-279.64338182H245.05885502a39.3153999 39.3153999 0 0 1-39.1137826-39.78584058c0-21.97630029 17.47351088-39.71863452 39.1137826-39.71863452h401.75634153C850.58321738-52.84617615000002 1016.17833782 108.44777135000004 1016.17833782 306.70491625c0 197.78670337-165.59511959 359.14785692-369.36314127 359.14785692z" horiz-adv-x="1102" />
<glyph glyph-name="overview-endpoint" unicode="&#59115;" d="M510.90486451 673.95312647c11.59554802 0 21.00082594-9.40527792 21.00082682-21.00082594v-170.77665876h90.73516496c21.51618377 59.16950578 55.62642172 101.46104736 102.74944149 126.35926691a21.00082594 21.00082594 0 0 0 19.64801284-37.17017455c-33.36941113-17.58658154-59.20171614-47.21964909-77.23923567-89.18909236h47.28406893c14.26896647 0 27.12069914-8.69666145 32.46753516-21.99933123l91.47599178-228.17462207c2.86667709-7.08616814 3.28540559-14.78432429 1.38502432-21.93491227H167.99873478a34.97990357 34.97990357 0 0 0 1.73933211 22.83678825l99.20635742 228.20683155c5.54009553 12.75510334 18.13414885 21.03303629 32.08101702 21.03303629l38.20088932 0.03220948c-18.03751953 41.96944239-43.86982454 71.60251082-77.20702531 89.22130184a21.00082594 21.00082594 0 0 0 19.58359213 37.13796507c47.15522926-24.89821868 81.26546721-67.18976025 102.78165184-126.35926691h105.48727978V652.95230053c0 10.53262289 7.79478548 19.26149382 17.90867985 20.74314746zM827.23786329 193.96184743000003c11.59554802 0 21.00082594-9.40527792 21.00082681-21.00082595v-195.99697574c0-19.32591366-15.65398991-34.97990357-34.97990444-34.97990357H194.47523641c-19.32591366 0-34.97990357 15.65398991-34.97990357 34.97990357v195.99697574c0 11.59554802 9.40527792 21.00082594 20.96861645 21.00082595h646.773914z m-87.9651172-96.62956831h-483.14784495a32.20985668 32.20985668 0 0 1 0-64.41971248h483.14784495a32.20985668 32.20985668 0 0 1 0 64.41971248zM216.89329615 722.94431803a90.99284432 90.99284432 0 1 0 0-181.98568862 90.99284432 90.99284432 0 0 0 0 181.98568862z m587.99092724 0a90.99284432 90.99284432 0 1 0 0-181.98568862 90.99284432 90.99284432 0 0 0 0 181.98568862zM510.87265503 834.93798828a90.99284432 90.99284432 0 1 0 0-181.98568775 90.99284432 90.99284432 0 0 0 0 181.98568775z" horiz-adv-x="1024" />
<glyph glyph-name="unlock" unicode="&#59113;" d="M439.44650239 141.46849166000004a33.32868125 33.32868125 0 0 1 35.31474761 35.25268364V282.66541904999997a35.31474761 35.31474761 0 0 1-70.62949614 0v-105.94424375a33.32868125 33.32868125 0 0 1 35.31474853-35.25268364zM577.1678125 517.8281253H222.40665386A145.231125 145.231125 0 0 1 77.54791636 372.96938780000005V83.37604166000006a145.231125 145.231125 0 0 1 144.8587375-144.8587375h434.45208364A145.231125 145.231125 0 0 1 801.65541011 83.37604166000006V372.96938780000005A145.231125 145.231125 0 0 1 656.8587375 517.8281253H577.1678125z m152.05822886-144.8587375V83.37604166000006a72.6155625 72.6155625 0 0 0-72.36730386-72.36730386h-434.45208364A72.6155625 72.6155625 0 0 0 149.97728511 83.37604166000006V372.96938780000005a72.6155625 72.6155625 0 0 0 72.42936875 72.42936875h434.45208364A72.6155625 72.6155625 0 0 0 729.22604136 372.96938780000005zM884.3875 641.95729166a124.12916636 124.12916636 0 0 1-247.94801011 9.3096875L636.12916636 641.95729166v-124.12916636H574.06458364V641.95729166a186.19375 186.19375 0 1 0 372.3875 0v-31.03229136a31.03229136 31.03229136 0 1 0-62.06458364 0V641.95729166z" horiz-adv-x="1024" />
@@ -242,9 +248,6 @@ Created by iconfont
<glyph glyph-name="project" unicode="&#59066;" d="M362.56500388 769.0967058H132.61589754C103.88486069 769.0967058 75.15382385 746.14548002 75.15382385 711.63463211v-229.91550247c0-28.73103684 22.98482964-57.46207369 57.46207369-57.46207453h229.94910634c28.73103684 0 57.46207369 22.98482964 57.46207452 57.46207453V711.63463211c0 34.47724403-22.98482964 57.46207369-57.46207452 57.46207369z m569.04254983-126.45016564l-160.96101355 160.96101354c-22.98482964 22.98482964-57.46207369 22.98482964-80.44690417 0l-160.96101354-160.96101354c-22.98482964-22.98482964-22.98482964-63.20828172 0-80.44690417l160.96101354-160.96101355c22.98482964-22.98482964 57.46207369-22.98482964 80.44690417 0l160.96101355 160.96101355c22.98482964 17.23862244 22.98482964 57.46207369 0 80.44690417zM362.56500388 292.02707840999994H132.61589754c-28.76464072 0-57.49567755-22.98482964-57.49567757-57.46207453v-229.91550247C75.15382385-24.115139310000018 98.13865349-52.84617615000002 132.61589754-52.84617615000002h229.94910634c28.73103684 0 57.46207369 22.98482964 57.46207452 57.46207369v229.94910634c0 28.73103684-22.98482964 57.46207369-57.46207452 57.46207452z m482.81583543-1e-8H615.49893986c-28.73103684 0-57.46207369-22.98482964-57.46207367-57.46207452v-229.91550247c0-28.76464072 22.98482964-57.49567755 57.46207367-57.49567756h229.91550333c28.73103684 0 57.46207369 22.98482964 57.46207367 57.46207368v229.94910635c0 28.73103684-28.73103684 57.46207369-57.46207367 57.46207452z" horiz-adv-x="1024" />
<glyph glyph-name="overview-alert" unicode="&#59073;" d="M186.19730346 58.744870770000034h651.60539308v-97.01608731H186.19730346v97.01608731zM486.42537434 834.93798828h51.14925132v-111.70378142h-51.14925132V834.93798828z m386.26059644-308.02285547l-30.14842536 41.32524489 90.28422697 65.83694629L962.93798828 592.7842885800001l-90.2520175-65.86915577z m-721.37194156 0l30.14842537 41.32524489L91.24264745 634.07732399 61.06201172 592.7842885800001l90.2520175-65.86915577z m623.1962998-131.06190544a262.5425385 262.5425385 0 0 1-525.05286752 0c0-5.79777401 0.48314747-11.46670921 0.83745614-17.16785391-0.25767848-2.86667709-0.83745614-5.60451537-0.83745614-8.56782178v-263.44441447H774.51032902v263.47662483c0 2.89888744-0.54756731 5.66893434-0.80524666 8.53561142 0.32209831 5.70114469 0.80524666 11.37007903 0.80524666 17.16785391z m-118.62890128 34.46454575c0 90.05875798-94.92244654 108.09627752-98.98088842 108.83710433l7.40826732 41.35745613c46.18893432-8.27793294 133.54206437-50.34400553 133.54206437-150.19456046h-41.96944327z" horiz-adv-x="1024" />
<glyph glyph-name="overview-project" unicode="&#59071;" d="M934.41946023 613.33599122c0-27.33077467-22.14746572-49.4782412-49.47906775-49.4782412H138.3190994A49.4782412 49.4782412 0 0 0 88.80531645 613.33599122V757.6809336599999A49.4782412 49.4782412 0 0 0 138.3190994 807.19471662h746.58657788a49.51378295 49.51378295 0 0 0 49.51378295-49.51378296v-144.34494244zM791.48544159 685.52623331a32.4446532 32.4446532 0 1 1 64.92567552 0 32.4446532 32.4446532 0 0 1-64.92567552 0zM934.41946023 312.76193779000005a49.51378295 49.51378295 0 0 0-49.47906775-49.54849814H138.3190994A49.4782412 49.4782412 0 0 0 88.80531645 312.76193779000005v144.41519938a49.51378295 49.51378295 0 0 0 49.51378295 49.47906777h746.58657788a49.4782412 49.4782412 0 0 0 49.51378295-49.47906777v-144.44991458zM807.95532099 384.95217988a32.4446532 32.4446532 0 1 1 64.92402158 0 32.4446532 32.4446532 0 0 1-64.88930638 0zM934.41946023 19.87647303999995a49.51378295 49.51378295 0 0 0-49.47906775-49.51378294H138.3190994A49.51378295 49.51378295 0 0 0 88.80531645 19.87647303999995V164.21976238000002a49.51378295 49.51378295 0 0 0 49.51378295 49.51378296h746.58657788a49.51378295 49.51378295 0 0 0 49.51378295-49.51378296v-144.34411588zM815.18434665 92.06588857999998a32.48019495 32.48019495 0 1 1 64.96038988 0 32.48019495 32.48019495 0 0 1-64.96038988 0z" horiz-adv-x="1024" />

Before

Width:  |  Height:  |  Size: 205 KiB

After

Width:  |  Height:  |  Size: 204 KiB

File diff suppressed because one or more lines are too long

View File

@@ -41,6 +41,7 @@ $--danger-color: #DE5D3F; //全局警告色红色
$--success-color: #23BF9A; //全局正常色绿色
$--warning-color: var(--theme-color); //全局警告橙色
$--suspended-color: #9e9c98; //全局停用色灰色
$--monitor-color: #98AEC5; //全局停用色灰色
:export {
themeColor: $--theme-color;
@@ -48,6 +49,7 @@ $--suspended-color: #9e9c98; //全局停用色灰色
successColor: $--success-color;
warningColor: var(--theme-color);
suspendedColor: $--suspended-color;
monitorColor: $--monitor-color;
}
/* element-ui变量覆盖 */
/*$--color-primary: red; // 覆盖element-ui的主题色

View File

@@ -140,14 +140,14 @@ export default {
},
module: {
moduleTabTitle: [
// { prop: 'panel', name: 'Detail' },
{ prop: 'endpoint', name: this.$t('asset.endpoint') },
{ prop: 'moduleAlertMessage', name: 'Alerts' },
{ prop: 'panel', name: 'Detail' }
{ prop: 'moduleAlertMessage', name: 'Alerts' }
]
},
endpoint: {
endpointTabTitle: [
{ prop: 'panel', name: 'Detail' },
// { prop: 'panel', name: 'Detail' },
{ prop: 'endpointQuery', name: 'Query' },
{ prop: 'endpointAlertMessage', name: 'Alerts' }
]

View File

@@ -59,13 +59,19 @@
align-items: center;
}
.compare-box{
line-height: 50px;
/*line-height: 50px;*/
}
.compare-box .nz-icon-compare{
border-right: none;
}
.calendar{
/*width: 125px;*/
border: none;
box-sizing: content-box;
line-height: unset;
height: 100%;
margin-left: -6px;
margin-right: 10px;
}
.nz-icon-compare{
background: #FFFFFF;

View File

@@ -586,82 +586,82 @@
Project
</div>
<div class="project-content">
<div class="project-content-title">{{$t('project.topology.title')}}</div>
<!-- <div class="project-content-title">{{$t('project.topology.title')}}</div>-->
<div class="project-content-box" style="width: 100%">
<!-- <div class="project-content-box" style="width: 100%">-->
<div class="project-content-item">
<label>{{$t('project.topology.name')}}</label>
<div class="full pr10">
<el-input class="input" size="small" v-model="topologyData.data.name" :placeholder="$t('el.select.placeholder')"
@change="changeTopologyOpt"></el-input>
</div>
</div>
<!-- <div class="project-content-item">-->
<!-- <label>{{$t('project.topology.name')}}</label>-->
<!-- <div class="full pr10">-->
<!-- <el-input class="input" size="small" v-model="topologyData.data.name" :placeholder="$t('el.select.placeholder')"-->
<!-- @change="changeTopologyOpt"></el-input>-->
<!-- </div>-->
<!-- </div>-->
<div class="project-content-item half">
<label>{{$t('project.topology.fontSize')}}</label>
<div class="full pr10 h32">
<el-input-number
@focus="inputFocus"
@blur="inputBlur"
:precision="2"
controls-position="right"
size="small"
name="fontSize"
class="input"
v-model.number="topologyData.data.fontSize"
:readonly="readonly"
required
:min="10"
@change="changeTopologyOpt(topologyData.data.fontSize,'fontSize')"></el-input-number>
</div>
</div>
<!-- <div class="project-content-item half">-->
<!-- <label>{{$t('project.topology.fontSize')}}</label>-->
<!-- <div class="full pr10 h32">-->
<!-- <el-input-number-->
<!-- @focus="inputFocus"-->
<!-- @blur="inputBlur"-->
<!-- :precision="2"-->
<!-- controls-position="right"-->
<!-- size="small"-->
<!-- name="fontSize"-->
<!-- class="input"-->
<!-- v-model.number="topologyData.data.fontSize"-->
<!-- :readonly="readonly"-->
<!-- required-->
<!-- :min="10"-->
<!-- @change="changeTopologyOpt(topologyData.data.fontSize,'fontSize')"></el-input-number>-->
<!-- </div>-->
<!-- </div>-->
<div class="project-content-item half">
<label>{{$t('project.topology.fontColor')}}</label>
<div class="full pr10 h32">
<nezhaColor :value-arr="[{name:'fontColor',value:topologyData.data.fontColor}]" @colorChange="(val,key)=>{
changeTopologyOpt(val,key,true)
}"/>
</div>
</div>
<!-- <div class="project-content-item half">-->
<!-- <label>{{$t('project.topology.fontColor')}}</label>-->
<!-- <div class="full pr10 h32">-->
<!-- <nezhaColor :value-arr="[{name:'fontColor',value:topologyData.data.fontColor}]" @colorChange="(val,key)=>{-->
<!-- changeTopologyOpt(val,key,true)-->
<!-- }"/>-->
<!-- </div>-->
<!-- </div>-->
<div class="project-content-item half">
<label>{{$t('project.topology.align')}}</label>
<div class="full pr10 h32">
<el-radio-group v-model="topologyData.data.align" size="small" @change="changeTopologyOpt">
<el-radio-button label="left">left</el-radio-button>
<el-radio-button label="center">center</el-radio-button>
<el-radio-button label="right">right</el-radio-button>
</el-radio-group>
</div>
</div>
<!-- <div class="project-content-item half">-->
<!-- <label>{{$t('project.topology.align')}}</label>-->
<!-- <div class="full pr10 h32">-->
<!-- <el-radio-group v-model="topologyData.data.align" size="small" @change="changeTopologyOpt">-->
<!-- <el-radio-button label="left">left</el-radio-button>-->
<!-- <el-radio-button label="center">center</el-radio-button>-->
<!-- <el-radio-button label="right">right</el-radio-button>-->
<!-- </el-radio-group>-->
<!-- </div>-->
<!-- </div>-->
<div class="project-content-item half">
<label>{{$t('project.topology.opacity')}}</label>
<div class="full pr10 h32">
<el-input-number
@focus="inputFocus"
@blur="inputBlur"
:precision="2"
controls-position="right"
size="small"
name="fontSize"
class="input"
v-model.number="topologyData.data.opacity"
:readonly="readonly"
required
:step="0.2"
:min="0"
@change="changeTopologyOpt(topologyData.data.opacity,'opacity')"></el-input-number>
</div>
</div>
</div>
<!-- <div class="project-content-item half">-->
<!-- <label>{{$t('project.topology.opacity')}}</label>-->
<!-- <div class="full pr10 h32">-->
<!-- <el-input-number-->
<!-- @focus="inputFocus"-->
<!-- @blur="inputBlur"-->
<!-- :precision="2"-->
<!-- controls-position="right"-->
<!-- size="small"-->
<!-- name="fontSize"-->
<!-- class="input"-->
<!-- v-model.number="topologyData.data.opacity"-->
<!-- :readonly="readonly"-->
<!-- required-->
<!-- :step="0.2"-->
<!-- :min="0"-->
<!-- @change="changeTopologyOpt(topologyData.data.opacity,'opacity')"></el-input-number>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<div class="project-content-title">
Appearance
<!--{{$t('project.topology.name')}}-->
</div>
<!-- <div class="project-content-title">-->
<!-- Appearance-->
<!-- &lt;!&ndash;{{$t('project.topology.name')}}&ndash;&gt;-->
<!-- </div>-->
<div class="project-content-box" style="width: 100%">
<div class="project-content-item half">
@@ -673,13 +673,13 @@
</div>
</div>
<div class="project-content-item half">
<label>{{$t('project.topology.bacImage')}}</label>
<div class="full pr10 h32">
<!--暂时是input 输入网址-->
<el-input class="input" size="small" v-model="topologyData.data.bkImage" @change="changeTopologyOpt"></el-input>
</div>
</div>
<!-- <div class="project-content-item half">-->
<!-- <label>{{$t('project.topology.bacImage')}}</label>-->
<!-- <div class="full pr10 h32">-->
<!-- &lt;!&ndash;暂时是input 输入网址&ndash;&gt;-->
<!-- <el-input class="input" size="small" v-model="topologyData.data.bkImage" @change="changeTopologyOpt"></el-input>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="project-content-item half">
<label>{{$t('project.topology.rule')}}</label>
@@ -796,51 +796,51 @@
</div>
<div class="project-content-title">Appearance</div>
<!-- <div class="project-content-title">Appearance</div>-->
<div class="project-content-box" style="width: 100%">
<!-- <div class="project-content-box" style="width: 100%">-->
<div class="project-content-item half">
<label>Project Info</label>
<div class="full pr10 h32">
<el-switch
v-model="topologyData.data.projectInfo"
:active-value="true"
:inactive-value="false"
active-color="#ee9d3f"
@change="changeTopologyOpt(topologyData.data.projectInfo,'projectInfo')">
</el-switch>
</div>
</div>
<!-- <div class="project-content-item half">-->
<!-- <label>Project Info</label>-->
<!-- <div class="full pr10 h32">-->
<!-- <el-switch-->
<!-- v-model="topologyData.data.projectInfo"-->
<!-- :active-value="true"-->
<!-- :inactive-value="false"-->
<!-- active-color="#ee9d3f"-->
<!-- @change="changeTopologyOpt(topologyData.data.projectInfo,'projectInfo')">-->
<!-- </el-switch>-->
<!-- </div>-->
<!-- </div>-->
<div class="project-content-item half">
<label>Alert Info</label>
<div class="full pr10 h32">
<el-switch
v-model="topologyData.data.alertInfo"
:active-value="true"
:inactive-value="false"
active-color="#ee9d3f"
@change="changeTopologyOpt(topologyData.data.alertInfo,'alertInfo')">
</el-switch>
</div>
</div>
<!-- <div class="project-content-item half">-->
<!-- <label>Alert Info</label>-->
<!-- <div class="full pr10 h32">-->
<!-- <el-switch-->
<!-- v-model="topologyData.data.alertInfo"-->
<!-- :active-value="true"-->
<!-- :inactive-value="false"-->
<!-- active-color="#ee9d3f"-->
<!-- @change="changeTopologyOpt(topologyData.data.alertInfo,'alertInfo')">-->
<!-- </el-switch>-->
<!-- </div>-->
<!-- </div>-->
</div>
<!-- </div>-->
<div class="project-content-title">{{$t('project.topology.link')}}</div>
<!-- <div class="project-content-title">{{$t('project.topology.link')}}</div>-->
<div class="project-content-box" style="width: 100%">
<!-- <div class="project-content-box" style="width: 100%">-->
<div class="project-content-item">
<label>Url</label>
<div class="full pr10">
<el-input class="input" size="small" v-model="topologyData.data.url" :placeholder="$t('el.select.placeholder')"
@change="changeTopologyOpt"></el-input>
</div>
</div>
<!-- <div class="project-content-item">-->
<!-- <label>Url</label>-->
<!-- <div class="full pr10">-->
<!-- <el-input class="input" size="small" v-model="topologyData.data.url" :placeholder="$t('el.select.placeholder')"-->
<!-- @change="changeTopologyOpt"></el-input>-->
<!-- </div>-->
<!-- </div>-->
</div>
<!-- </div>-->
</div>
</div>

View File

@@ -49,7 +49,7 @@
<!-- :props="{ multiple: false, checkStrictly: false ,emitPath:false}"-->
<!-- clearable></el-cascader>-->
<el-select v-model="editPromServer.type" :disabled="editPromServer.id != null&& editPromServer.id != ''" placeholder="" class="right-box__select" popper-class="right-box-select-dropdown prevent-clickoutside" size="small" value-key="value">
<el-option v-for="item in agent2.theData" :key="item.value" :label="item.label" :value="item.value">
<el-option v-for="item in agent2.theData" :key="item.value" :label="item.label" :value="item.value" :disabled="federationEnabled && item.value == 2">
<span class="panel-dropdown-label-txt" >{{item.label}}</span>
</el-option>
</el-select>
@@ -104,7 +104,8 @@ export default {
]
},
editPromServer: {},
dcData: [] // data center数据
dcData: [], // data center数据
federationEnabled: !Number(localStorage.getItem('nz-prometheus-federation-enabled'))
}
},
methods: {

View File

@@ -1,23 +1,16 @@
<template>
<div class="right-box right-box-alert-config" v-clickoutside="{obj:editAlertSilence,func:clickOutside}">
<!-- begin--顶部按钮-->
<div class="right-box-top-btns right-box-form-delete">
<button @click="del" class="nz-btn nz-btn-size-normal nz-btn-size-alien" id="alert-box-del" type="button"
v-has="'alert_silence_delete'" v-if="alertSilence.id">
<span class="right-box-top-btn-icon"><i class="nz-icon nz-icon-delete"></i></span>
<span class="right-box-top-btn-txt">{{$t('overall.delete')}}</span>
</button>
</div>
<!-- end--顶部按钮-->
<!-- begin--标题-->
<div class="right-box-title">{{editAlertSilence.id ? $t("alert.silence.edit") + " ID" + editAlertSilence.id :
$t("alert.silence.create")}}
<div class="right-box__header">
<div class="header__title">{{editAlertSilence.id ? $t("alert.silence.edit") + " ID" + editAlertSilence.id : $t("alert.silence.create")}}</div>
<div class="header__operation">
<span v-cancel="{obj: editAlertSilence, func: esc}"><i class="nz-icon nz-icon-close"></i></span>
</div>
</div>
<!-- end--标题-->
<!-- begin--表单-->
<div class="right-box-form-box">
<div class="right-box-form-box right-box__container">
<el-form class="right-box-form right-box-form-left" :model="editAlertSilence" label-position="top"
label-width="120px" :rules="rules" ref="alertSilenceForm">
<el-form-item :label='$t("alert.silence.time")' prop="time" class="range-time">
@@ -62,43 +55,21 @@
</el-form-item>
<el-form-item :label='$t("alert.silence.matcher")' prop="matcher" class="matcher">
<div class="matcher-type">
<div class="matcher-type-title">Alert rule</div>
<el-select v-model="editAlertSilence.ruleId" filterable @change="matcherChange" :popper-append-to-body="false" size="small" class="matcher-type-content" clearable>
<el-option
v-for="item in ruleList"
:key="item.id"
:label="item.alertName"
:value="item.id">
</el-option>
</el-select>
<div v-for="(item, index) in editAlertSilence.matcher" :key="index" class="param-box-row">
<el-form-item class="param-box-row-key" :rules="[{ required: true, message: $t('validate.required'), trigger: 'change' },]" :prop="'matcher.' + index + '.name'">
<el-input placeholder="key" size="mini" v-model="item.name"></el-input>
</el-form-item>
<span class="param-box-row-eq">=</span>
<el-form-item class="param-box-row-value" :prop="'matcher.' + index + '.value'" :rules="[{ required: true, message: $t('validate.required'), trigger: 'change' },]" >
<el-input placeholder="value" size="mini" v-model="item.value" class="silence-matcher-value"></el-input>
<el-checkbox class="silence-matcher-regex" v-model="item.regex" :true-label="1" :false-label="0" >Regex</el-checkbox>
</el-form-item>
<span class="param-box-row-symbol" :id="'moduel-remove-label-'+index" @click="removeMatcher(index)"><i class="nz-icon nz-icon-shanchu1" style="color:#666;"></i></span>
</div>
<div class="matcher-type">
<el-select class="matcher-type-title matcher-type-header" v-model="editAlertSilence.type" :popper-append-to-body="false" size="small" @change="typeChange">
<el-option
v-for="item in typeList"
:key="item.type"
:label="item.name"
:value="item.type">
</el-option>
</el-select>
<div class="matcher-type-content">
<select-alert-silence :filter-silence="filterSilence" :silence-data="silenceData" :panel-lock="false" :placement="'bottom-start'" :typeContentLoading="typeContentLoading"
@selectSilence="silenceChange" ref="selectPanel" style="width: 300px;">
<template v-slot:header>
<div class="panel-select-header">
<el-input :placeholder="$t('overall.search')" clearable size="mini" style="width: 340px; margin-right: 5px;" v-model="filterSilence" id="panel-list-search"></el-input>
</div>
</template>
<template v-slot:trigger>
<el-input class="panel-name" placeholder="" readonly="readonly" v-model="editAlertSilence.name" size="small">
<span slot="suffix" class="el-input__icon el-icon-circle-close el-input__clear" @click.stop="clearValue"></span>
</el-input>
</template>
</select-alert-silence>
</div>
<div style="text-align: center">
<span id="module-add-label" type="button" @click="addMatcher" class="right-box-form-add module-add-label" style="margin-right: 140px">
<span><i style="font-size: 16px;" class="nz-icon nz-icon-create-square"></i></span>
</span>
</div>
</el-form-item>
@@ -119,7 +90,7 @@
<!-- end--表单-->
<!--底部按钮-->
<div class="right-box-bottom-btns">
<div class="right-box-bottom-btns right-box__footer">
<button v-cancel="{obj:editAlertSilence,func:esc}" id="alert-box-esc"
class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new">
<span>{{$t('overall.cancel')}}</span>
@@ -134,11 +105,11 @@
<script>
import bus from '../../../libs/bus'
import selectAlertSilence from '../alert/selectAlertSilence'
// import selectAlertSilence from '../alert/selectAlertSilence'
export default {
name: 'alertSilenceBox',
components: {
selectAlertSilence
// selectAlertSilence
},
props: {
@@ -161,10 +132,6 @@ export default {
this.endAtTamp = new Date(this.editAlertSilence.endAt).getTime()
this.editAlertSilence.time = this.startAtTamp
this.rangeTimeCallback()
this.typeChange(this.editAlertSilence.type, obj.linkId)
if (obj.linkId || obj.ruleId) {
this.matcherChange()
}
}
}
},
@@ -188,7 +155,9 @@ export default {
linkId: '',
reason: '',
time: [],
matcher: '',
matcher: [
{ name: '', value: '', regex: 0 }
],
name: ''
},
rules: {
@@ -197,9 +166,6 @@ export default {
{ required: true, trigger: 'change' },
{ validator: validate, trigger: 'change' }
],
matcher: [
{ required: true, message: this.$t('alert.silence.selectMather'), trigger: 'change' }
]
},
rangeTime: '',
ruleList: [],
@@ -223,7 +189,6 @@ export default {
}
},
mounted () {
this.getRuleList()
},
methods: {
clickOutside () {
@@ -239,7 +204,6 @@ export default {
}
;
this.prevent_opt.save = true
this.editAlertSilence.matcher = this.editAlertSilence.ruleId || this.editAlertSilence.linkId
this.$refs.alertSilenceForm.validate((valid) => {
if (this.endAtTamp < this.startAtTamp) {
this.prevent_opt.save = false
@@ -249,21 +213,8 @@ export default {
})
return
}
let params = { ...this.editAlertSilence }
delete params.time
delete params.matcher
const params = { ...this.editAlertSilence }
if (valid) {
params = {
id: params.id,
endAt: params.endAt,
startAt: params.startAt,
linkId: params.linkId,
linkName: params.linkName,
reason: params.reason,
ruleId: params.ruleId,
name: params.name,
type: params.type
}
if (this.editAlertSilence.id) {
this.$put('/alert/silence', params).then(response => {
this.prevent_opt.save = false
@@ -315,13 +266,6 @@ export default {
this.prevent_opt.save = false
})
},
getRuleList () {
this.$get('alert/rule', { pageNo: 1, pageSize: -1 }).then(response => {
if (response.code == 200) {
this.ruleList = response.data.list
}
})
},
dateChange (val, type) {
if (type === 'startAt') {
this.editAlertSilence.startAt = bus.timeFormate(new Date(val), 'yyyy-MM-dd hh:mm:ss')
@@ -349,145 +293,20 @@ export default {
this.endAtTamp = new Date(this.editAlertSilence.endAt).getTime()
this.$forceUpdate()
},
matcherChange (val) {
this.editAlertSilence.matcher = this.editAlertSilence.ruleId || this.editAlertSilence.linkId
},
silenceChange (val) {
this.editAlertSilence.linkId = val.id
this.editAlertSilence.matcher = this.editAlertSilence.ruleId || this.editAlertSilence.linkId
if (this.editAlertSilence.type === 'datacenter') {
this.editAlertSilence.name = val.name
}
if (this.editAlertSilence.type === 'asset') {
this.editAlertSilence.name = val.sn
}
if (this.editAlertSilence.type === 'project') {
this.editAlertSilence.name = val.name
}
if (this.editAlertSilence.type === 'module') {
this.editAlertSilence.name = val.name
}
if (this.editAlertSilence.type === 'endpoint') {
this.editAlertSilence.name = val.name
}
},
clearValue () {
this.editAlertSilence.name = ''
this.editAlertSilence.linkId = ''
},
typeChange (val, linkId) {
let firstArr = []
// const secondArr = []
// const thirddiArr = []
this.typeContentLoading = true
this.editAlertSilence.linkId = linkId || ''
this.editAlertSilence.name = ''
if (val === 'datacenter') {
this.$get('idc', { pageNo: 1, pageSize: -1 }).then(response => {
if (response.code == 200) {
firstArr = response.data.list
if (linkId) {
this.editAlertSilence.name = firstArr.find(item => item.id === linkId).name
}
this.silenceData = firstArr
this.datacenterData = firstArr
this.typeContentLoading = false
}
})
}
if (val === 'asset') {
this.$get('asset?pageNo=1&pageSize=-1').then(res => {
if (res.code == 200) {
const arr = []
res.data.list.forEach(asset => {
asset.name = asset.sn
if (linkId === asset.id) {
this.editAlertSilence.name = asset.name
}
const idcF = arr.find(idc => idc.id === asset.idc.id)
if (idcF) {
idcF.children.push(asset)
} else {
const idc = { ...asset.idc }
idc.children = [asset]
arr.push(idc)
}
})
this.silenceData = arr
this.assetData = arr
this.typeContentLoading = false
}
})
}
if (val === 'project') {
this.$get('project', { pageNo: 1, pageSize: -1 }).then(response => {
if (response.code == 200) {
firstArr = response.data.list
if (linkId) {
this.editAlertSilence.name = firstArr.find(item => item.id === linkId).name
}
this.silenceData = firstArr
this.projectData = firstArr
this.typeContentLoading = false
}
})
}
if (val === 'module') {
this.$get('module?pageNo=1&pageSize=-1').then(res => {
if (res.code == 200) {
const arr = []
res.data.list.forEach(module => {
if (linkId === module.id) {
this.editAlertSilence.name = module.name
}
const projectF = arr.find(project => project.id === module.project.id)
if (projectF) {
projectF.children.push(module)
} else {
const project = { ...module.project }
project.children = [module]
arr.push(project)
}
})
this.silenceData = arr
this.moduleData = arr
this.typeContentLoading = false
}
})
}
if (val === 'endpoint') {
this.$get('endpoint?pageNo=1&pageSize=-1').then(res => {
if (res.code == 200) {
const arr = []
res.data.list.forEach(item => {
item.name = item.host
if (linkId === item.id) {
this.editAlertSilence.name = item.name
}
const projectF = arr.find(project => item.project.id === project.id)
if (projectF) {
const moduleF = projectF.children.find(module => module.id === item.module.id)
if (moduleF) {
moduleF.children.push(item)
} else {
projectF.children.push({ ...item.module, children: [item] })
}
} else {
const project = { ...item.project }
project.children = [{ ...item.module, children: [item] }]
arr.push(project)
}
})
this.silenceData = arr
this.endpointData = arr
this.typeContentLoading = false
}
})
// 新增label
addMatcher () {
this.editAlertSilence.matcher.push({ name: '', value: '', regex: 0 })
},
// 移除单个Label
removeMatcher (index) {
if (this.editAlertSilence.matcher.length === 1) {
this.editAlertSilence.matcher = [{ name: '', value: '', regex: 0 }]
}
this.editAlertSilence.matcher.splice(index, 1)
}
}
}
@@ -566,4 +385,16 @@ export default {
}
}
}
/deep/ .silence-matcher-value{
width: calc(100% - 100px);
}
.silence-matcher-regex{
margin-left: 10px;
}
/deep/ .param-box-row-key{
width: 36%;
}
/deep/ .param-box-row-value{
width: 50%;
}
</style>

View File

@@ -43,16 +43,17 @@
</el-tooltip>
</template>
<template v-else-if="item.prop === 'matchers'">
<div class="nz-silence-tag-box">
<span v-if="scope.row.linkId!==-1" class="nz-silence-tag blue">
<span class="nz-silence-tag-title">{{scope.row.type}}</span>
<span :title="scope.row.linkName" class="nz-silence-tag-content">{{scope.row.linkName}}</span>
</span>
<span v-if="scope.row.ruleId!==-1" class="nz-silence-tag rule-gray">
<span class="nz-silence-tag-title">Alert rule</span>
<span :title="scope.row.ruleName" class="nz-silence-tag-content">{{scope.row.ruleName}}</span>
</span>
</div>
<!-- <div class="nz-silence-tag-box">-->
<!-- <span v-if="scope.row.linkId!==-1" class="nz-silence-tag blue">-->
<!-- <span class="nz-silence-tag-title">{{scope.row.type}}</span>-->
<!-- <span :title="scope.row.linkName" class="nz-silence-tag-content">{{scope.row.linkName}}</span>-->
<!-- </span>-->
<!-- <span v-if="scope.row.ruleId!==-1" class="nz-silence-tag rule-gray">-->
<!-- <span class="nz-silence-tag-title">Alert rule</span>-->
<!-- <span :title="scope.row.ruleName" class="nz-silence-tag-content">{{scope.row.ruleName}}</span>-->
<!-- </span>-->
<!-- </div>-->
matchers
</template>
<template v-else-if="item.prop === 'state'">
<span v-if="scope.row.state===1" class="silence-pending">pending</span>

View File

@@ -43,6 +43,7 @@
{{scope.row[item.prop].name}}
</template>
<template v-else-if="item.prop === 'module'">
<i class="nz-icon nz-icon-overview-module monitorColor"/>
{{scope.row[item.prop].name}}
</template>
<template v-else-if="item.prop === 'alerts'">

View File

@@ -44,7 +44,7 @@
</template>
<template v-else-if="item.prop === 'endpointNum'">
<span class="endpoint-num" @click="showBottomBox('endpoint', scope.row)">
<i class="nz-icon nz-icon-overview-endpoint color969dea"/>
<i class="nz-icon nz-icon-overview-endpoint monitorColor"/>
{{scope.row[item.prop]}}
</span>
</template>

View File

@@ -40,13 +40,13 @@
</template>
<template v-else-if="item.prop === 'moduleNum'" >
<span class="module-num" @click="jumpModule(scope.row)">
<i class="nz-icon nz-icon-overview-module"/>
<i class="nz-icon nz-icon-overview-module monitorColor"/>
{{scope.row[item.prop]}}
</span>
</template>
<template v-else-if="item.prop === 'endpointNum'">
<span class="endpoint-num" @click="jumpEndpoint(scope.row)" >
<i class="nz-icon nz-icon-endpoint" :class="scope.row[item.prop]>0?'colorEF7458':'colorEF7458'"/>
<i class="nz-icon nz-icon-overview-endpoint monitorColor"/>
{{scope.row[item.prop]}}
</span>
</template>

View File

@@ -121,10 +121,14 @@ export default {
startAt: '',
endAt: '',
ruleId: '',
matcher: '',
type: 'asset',
linkId: '',
reason: ''
reason: '',
time: [],
matcher: [
{ name: '', value: '', regex: 0 }
],
name: ''
},
nowTime: ''
}

View File

@@ -40,7 +40,7 @@
<transition name="right-box">
<agent-box v-if="rightBox.show" :prom-server="object" @close="closeRightBox"></agent-box>
</transition>
<el-dialog :title="$t('config.agent.agent.title')" :visible.sync="showAgentDownload" append-to-body class="nz-dialog agent-dialog" width="620px" @close="closeDialog">
<el-dialog :title="$t('config.agent.agent.title')" :visible.sync="showAgentDownload" append-to-body class="nz-dialog agent-dialog" width="800px" @close="closeDialog">
<div v-if="showAgentDownload" class="agent-box">
<el-form v-model="agentParam" class="right-box-form right-box-form-left" label-position = "top" label-width="120px" size="small" style="width: 100%">
<div class="right-box-sub-title">{{$t('config.agent.agent.download')}}</div>
@@ -67,7 +67,7 @@
</el-form-item>
<el-form-item :label="$t('config.agent.agent.type')" class="half-form-item" prop="type">
<el-select v-model="agentParam.type" class="right-box-row-with-btn" placeholder="">
<el-option v-for="item in agent2.theData" :key="item.value" :label="item.label" :value="item.value">
<el-option v-for="item in agent2.theData" :key="item.value" :label="item.label" :value="item.value" :disabled="federationEnabled && item.value == 2">
<span class="panel-dropdown-label-txt" >{{item.label}}</span>
</el-option>
</el-select>
@@ -184,7 +184,8 @@ export default {
type: 1
},
wgetVisible: false,
curlVisible: false
curlVisible: false,
federationEnabled: !Number(localStorage.getItem('nz-prometheus-federation-enabled'))
}
},
methods: {