forked from bytedance/Elkeid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
593f4f.56.min.js
1 lines (1 loc) · 7.06 KB
/
593f4f.56.min.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[56,69],{149:function(e,t,n){"use strict";n.r(t);var r=n(4),o=n.n(r),c=n(20),a=n.n(c),i=n(0),u=n.n(i),l=n(571);function s(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 b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.default=function(e){var t=e.data,n=Object(i.useMemo)((function(){return t}),[t]),r=[50,70],o="30%",c="50%",s=Object(i.useState)({}),d=a()(s,2),f=d[0],p=d[1];return Object(i.useEffect)((function(){p({legend:{selectedMode:!1,data:null==n?void 0:n.map((function(e){return{name:e.label,itemStyle:null!=e&&e.color?{color:e.color}:{}}})),top:"center",cursor:"default",right:"20px",orient:"vertical",icon:"circle",itemWidth:10,itemHeight:10,itemGap:20,formatter:function(e){var t;return" {name|".concat(e,"} {count|").concat(null!==(t=n[null==n?void 0:n.findIndex((function(t){return t.label===e}))].count)&&void 0!==t?t:0,"}")},textStyle:{color:"#606A78",fontFamily:"PingFang Sc",fontSize:12,rich:{name:{width:48},count:{fontFamily:'"ByteNumber Bold"',color:"#000000"}}}},series:[{type:"pie",radius:r,center:[o,c],label:{show:!0,position:"outer",alignTo:"none",bleedMargin:5,color:"#606A78",fontFamily:"PingFang Sc",fontSize:12,formatter:"{b}: {d}%"},labelLine:{show:!0},data:null==n?void 0:n.map((function(e){return{value:e.count,name:e.label,itemStyle:b({borderColor:"#fff",borderWidth:1},null!=e&&e.color?{color:e.color}:{})}}))}]})}),[n]),u.a.createElement(l.a,{option:f,style:{width:"100%",height:"100%"},__source:{fileName:"/data00/webprojectdev/hids_open/src/pages/overview/system-status-chart/index.tsx",lineNumber:85,columnNumber:10}})}},158: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),b=n(551),d=n(149),f=n(559),p="/data00/webprojectdev/hids_open/src/pages/overview/host-status-distribution/index.tsx";t.default=function(){var e=Object(l.useState)([{count:0,label:"运行中",color:"#22BB43"},{count:0,label:"运行异常",color:"#FBB02E"},{count:0,label:"离线",color:"#EB635E"},{count:0,label:"未安装",color:"#E5E8EF"}]),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,a,i;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(f.DescribeHostStatistics)();case 2:a=e.sent,i=a.data,r([{count:null!==(t=null==i?void 0:i.running)&&void 0!==t?t:0,label:"运行中",color:"#22BB43"},{count:null!==(n=null==i?void 0:i.abnormal)&&void 0!==n?n:0,label:"运行异常",color:"#FBB02E"},{count:null!==(o=null==i?void 0:i.offline)&&void 0!==o?o:0,label:"离线",color:"#EB635E"},{count:null!==(c=null==i?void 0:i.uninstalled)&&void 0!==c?c:0,label:"未安装",color:"#E5E8EF"}]);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return Object(l.useEffect)((function(){!function(){c.apply(this,arguments)}()}),[]),s.a.createElement(b.a,{containerStyle:{minHeight:247},contentStyle:{height:220,paddingTop:20},title:"主机状态分布",isCard:!0,__source:{fileName:p,lineNumber:29,columnNumber:5}},s.a.createElement(d.default,{data:null!=n?n:[],__source:{fileName:p,lineNumber:37,columnNumber:7}}))}},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),b="/data00/webprojectdev/hids_open/src/components/common/content-box/index.tsx";function d(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 f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var p=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:p("container",u&&"card"),style:f({},r),__source:{fileName:b,lineNumber:27,columnNumber:5}},n?a.a.createElement("div",{className:p("top-box"),style:f({},c),__source:{fileName:b,lineNumber:29,columnNumber:9}},a.a.createElement("div",{className:p("title"),__source:{fileName:b,lineNumber:30,columnNumber:11}},n),a.a.createElement("div",{__source:{fileName:b,lineNumber:31,columnNumber:11}},t)):null,a.a.createElement("div",{className:p("content-box"),style:f({},o),__source:{fileName:b,lineNumber:34,columnNumber:7}},i))}},559:function(e,t,n){"use strict";n.r(t),n.d(t,"DescribeHostStatistics",(function(){return c})),n.d(t,"DescribeHosts",(function(){return a})),n.d(t,"ExportHostsStatusEnum",(function(){return r})),n.d(t,"ExportHosts",(function(){return i})),n.d(t,"DownloadFile",(function(){return u})),n.d(t,"DescribeTags",(function(){return l})),n.d(t,"AddTags",(function(){return s})),n.d(t,"DeleteTags",(function(){return b})),n.d(t,"UpdateTags",(function(){return d})),n.d(t,"DescribePlatforms",(function(){return f})),n.d(t,"DescribeIDCs",(function(){return p}));var r,o=n(40),c=function(){return Object(o.b)({method:"get",url:"/api/v6/asset-center/DescribeHostStatistics"},"获取主机统计信息")},a=function(e){var t=e.data,n=e.params;return Object(o.b)({method:"post",url:"/api/v6/asset-center/DescribeHosts",data:t,params:n},"获取主机列表信息")};!function(e){e.init="init",e.exporting="exporting",e.saving="saving",e.success="success",e.failed="failed"}(r||(r={}));var i=function(e){var t=e.data;return Object(o.b)({method:"post",url:"/api/v6/asset-center/ExportHosts",data:t},"导出主机信息")},u=function(e){var t=e.params;return Object(o.b)({method:"get",url:"/api/v6/shared/Download/".concat(t.file_name),responseType:"blob"},"下载文件",!1,!1)},l=function(){return Object(o.b)({method:"get",url:"/api/v6/asset-center/DescribeTags"},"获取标签信息")},s=function(e){var t=e.data;return Object(o.b)({method:"post",url:"/api/v6/asset-center/AddTags",data:t},"添加标签",!0)},b=function(e){var t=e.data;return Object(o.b)({method:"post",url:"/api/v6/asset-center/DeleteTags",data:t},"删除标签",!0)},d=function(e){var t=e.data;return Object(o.b)({method:"post",url:"/api/v6/asset-center/UpdateTags",data:t},"修改标签",!0)},f=function(){return Object(o.b)({method:"get",url:"/api/v6/asset-center/DescribePlatform"},"获取操作系统类型")},p=function(){return Object(o.b)({method:"get",url:"/api/v6/asset-center/DescribeIDC"},"获取数据中心类型")}},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"}}}]);