forked from bytedance/Elkeid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
06e636.44.min.js
1 lines (1 loc) · 8.46 KB
/
06e636.44.min.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[44,54,115],{151:function(e,t,n){"use strict";n.r(t);var r=n(20),o=n.n(r),c=n(0),a=n.n(c),i=n(86),u=n.n(i),l=n(551),s=n(563),m=n(531),b=n.n(m),d="/data00/webprojectdev/hids_open/src/pages/overview/top-ten-box/index.tsx",f=u.a.bind(b.a),p=function(e){var t=e.name,n=e.count,r=e.percent,o=e.index;return a.a.createElement("div",{className:f("count-box"),__source:{fileName:d,lineNumber:47,columnNumber:5}},a.a.createElement("div",{className:f("left-box"),__source:{fileName:d,lineNumber:48,columnNumber:7}},a.a.createElement("div",{className:f("index"),style:function(){switch(o){case 1:return{color:"#fff",backgroundColor:"#F53F3F"};case 2:return{color:"#fff",backgroundColor:"#F77234"};case 3:return{color:"#fff",backgroundColor:"#F7BA1E"};default:return null}}(),__source:{fileName:d,lineNumber:49,columnNumber:9}},o),a.a.createElement("div",{className:f("name"),style:void 0===t?{color:"#86909C"}:{},__source:{fileName:d,lineNumber:52,columnNumber:9}},void 0===t?"暂无":a.a.createElement(s.a,{content:t,__source:{fileName:d,lineNumber:53,columnNumber:40}}))),a.a.createElement("div",{className:f("right-box"),__source:{fileName:d,lineNumber:56,columnNumber:7}},"0%"===r?a.a.createElement("div",{className:f("no-count"),__source:{fileName:d,lineNumber:58,columnNumber:11}}):a.a.createElement("div",{className:f("progress"),__source:{fileName:d,lineNumber:60,columnNumber:11}},a.a.createElement("div",{className:f("progress-content"),style:{width:null!=r?r:"0%"},__source:{fileName:d,lineNumber:61,columnNumber:13}})),a.a.createElement("div",{className:f("count"),style:void 0===n?{color:"#86909C"}:{},__source:{fileName:d,lineNumber:64,columnNumber:9}},void 0===n?"0":function(){if(n>=1e3){var e=(n/1e3).toFixed(1);return-1!==e.indexOf(".0")&&(e=e.slice(0,e.length-2)),"".concat(e,"k")}return n}())))};t.default=function(e){var t=e.title,n=e.value,r=Object(c.useState)(),i=o()(r,2),u=i[0],s=i[1],m=Object(c.useState)(),b=o()(m,2),v=b[0],N=b[1];return Object(c.useEffect)((function(){var e,t,r,o,c,a,i,u=[];null!=n&&n.length&&(u=null!==(c=null==n?void 0:n.slice(0,10))&&void 0!==c?c:[]);(null===(e=u)||void 0===e||e.sort((function(e,t){return(null==t?void 0:t.count)-(null==e?void 0:e.count)})),N(null===(t=u)||void 0===t||null===(r=t[0])||void 0===r?void 0:r.count),(null===(o=u)||void 0===o?void 0:o.length)<10)&&(u=null===(a=u)||void 0===a?void 0:a.concat(Array(10-(null===(i=u)||void 0===i?void 0:i.length)).fill(void 0)));s(u)}),[n]),a.a.createElement(l.a,{title:"".concat(t,"主机 TOP 10"),containerStyle:{padding:0},topBoxStyle:{padding:"16px 20px 0"},contentStyle:{paddingTop:12},isCard:!0,__source:{fileName:d,lineNumber:92,columnNumber:5}},a.a.createElement("div",{className:f("header"),__source:{fileName:d,lineNumber:99,columnNumber:7}},a.a.createElement("div",{__source:{fileName:d,lineNumber:100,columnNumber:9}},"主机"),a.a.createElement("div",{__source:{fileName:d,lineNumber:101,columnNumber:9}},t,"数")),null==u?void 0:u.map((function(e,t){return a.a.createElement(p,{key:t,index:t+1,name:null==e?void 0:e.name,count:null==e?void 0:e.count,percent:null!=e&&e.count&&v?"".concat(parseFloat("".concat((null==e?void 0:e.count)/v*100)),"%"):"0%",__source:{fileName:d,lineNumber:104,columnNumber:9}})})))}},156:function(e,t,n){"use strict";n.r(t);var r=n(41),o=n.n(r),c=n(20),a=n.n(c),i=n(26),u=n.n(i),l=n(0),s=n.n(l),m=n(151),b=n(567);t.default=function(){var e=Object(l.useState)(),t=a()(e,2),n=t[0],r=t[1];function c(){return(c=o()(u.a.mark((function e(){var t,n,o,c;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(b.GetTop10AlarmHosts)();case 2:n=e.sent,o=n.data,c=null!==(t=null==o?void 0:o.map((function(e){return{name:null==e?void 0:e.hostname,count:null==e?void 0:e.alarms}})))&&void 0!==t?t:[],r(c);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return Object(l.useEffect)((function(){!function(){c.apply(this,arguments)}()}),[]),s.a.createElement(m.default,{title:"告警",value:n,__source:{fileName:"/data00/webprojectdev/hids_open/src/pages/overview/alarm-top/index.tsx",lineNumber:17,columnNumber:10}})}},531:function(e,t,n){e.exports={header:"header-769a6869ca","count-box":"count-box-7d67e68dcb","left-box":"left-box-3f71407c68",index:"index-895436802a",name:"name-a921729298","right-box":"right-box-38f4911c0e",progress:"progress-1fb0f1963e","progress-content":"progress-content-99893d947b","no-count":"no-count-2cfcdd6b9e",count:"count-2b621b9228"}},551:function(e,t,n){"use strict";var r=n(4),o=n.n(r),c=n(0),a=n.n(c),i=n(86),u=n.n(i),l=n(564),s=n.n(l),m="/data00/webprojectdev/hids_open/src/components/common/content-box/index.tsx";function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=u.a.bind(s.a);t.a=function(e){var t=e.util,n=e.title,r=e.containerStyle,o=e.contentStyle,c=e.topBoxStyle,i=e.children,u=e.isCard;return a.a.createElement("div",{className:f("container",u&&"card"),style:d({},r),__source:{fileName:m,lineNumber:27,columnNumber:5}},n?a.a.createElement("div",{className:f("top-box"),style:d({},c),__source:{fileName:m,lineNumber:29,columnNumber:9}},a.a.createElement("div",{className:f("title"),__source:{fileName:m,lineNumber:30,columnNumber:11}},n),a.a.createElement("div",{__source:{fileName:m,lineNumber:31,columnNumber:11}},t)):null,a.a.createElement("div",{className:f("content-box"),style:d({},o),__source:{fileName:m,lineNumber:34,columnNumber:7}},i))}},563:function(e,t,n){"use strict";n(302);var r=n(121),o=n(4),c=n.n(o),a=n(0),i=n.n(a),u="/data00/webprojectdev/hids_open/src/components/common/ellipsis-box/index.tsx";function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t=e.content,n=e.style;return i.a.createElement(r.a.Paragraph,{style:s({marginBottom:0},n),ellipsis:{rows:1,showTooltip:{type:"tooltip",props:{content:i.a.createElement("span",{style:{wordBreak:"break-all"},__source:{fileName:u,lineNumber:17,columnNumber:29}},t)}}},key:t,__source:{fileName:u,lineNumber:11,columnNumber:5}},t)}},564:function(e,t,n){e.exports={container:"container-ff5344dbc2","top-box":"top-box-0ebc1e6648",title:"title-1f92f6896d","content-box":"content-box-518d5e101b",card:"card-3d582462db"}},567:function(e,t,n){"use strict";n.r(t),n.d(t,"GetTop10AlarmHosts",(function(){return o})),n.d(t,"GetTop10VulnHosts",(function(){return c})),n.d(t,"GetHostPlatformStatistics",(function(){return a})),n.d(t,"GetAgentVersionStatistics",(function(){return i})),n.d(t,"GetLast7DaysAlarmStatistics",(function(){return u})),n.d(t,"GetLast7DaysVulnStatistics",(function(){return l})),n.d(t,"GetLast7DaysOperationStatistics",(function(){return s}));var r=n(40),o=function(){return Object(r.b)({method:"get",url:"/api/v6/asset-center/DescribeTop10AlarmHosts"},"获取告警数TOP10的主机列表")},c=function(){return Object(r.b)({method:"get",url:"/api/v6/asset-center/DescribeTop10VulnHosts"},"获取漏洞数TOP10的主机列表")},a=function(){return Object(r.b)({method:"get",url:"/api/v6/asset-center/DescribeHostPlatformStatistics"},"获取主机系统统计")},i=function(){return Object(r.b)({method:"get",url:"/api/v6/asset-center/DescribeAgentVersionStatistics"},"获取客户端版本统计")},u=function(){return Object(r.b)({method:"get",url:"/api/v6/situation/DescribeLast7DaysAlarmStatistics"},"获取最近7天安全告警统计")},l=function(){return Object(r.b)({method:"get",url:"/api/v6/situation/DescribeLast7DaysVulnStatistics"},"获取最近7天漏洞情报统计")},s=function(){return Object(r.b)({method:"get",url:"/api/v6/situation/DescribeLast7DaysOperationStatistics"},"获取最近7天运营态势")}}}]);