-
Notifications
You must be signed in to change notification settings - Fork 441
/
153607.281.min.js
1 lines (1 loc) · 6.87 KB
/
153607.281.min.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[281,293,376],{1396:function(e,t,n){e.exports={"add-modal":"add-modal-34ecdc1fd0",tip:"tip-2c7c79dbf5","cancel-modal":"cancel-modal-b9dad1db0d"}},1617:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"e",(function(){return s})),n.d(t,"c",(function(){return u})),n.d(t,"r",(function(){return c})),n.d(t,"i",(function(){return d})),n.d(t,"d",(function(){return l})),n.d(t,"j",(function(){return b})),n.d(t,"a",(function(){return o})),n.d(t,"m",(function(){return p})),n.d(t,"l",(function(){return h})),n.d(t,"f",(function(){return f})),n.d(t,"o",(function(){return O})),n.d(t,"q",(function(){return g})),n.d(t,"g",(function(){return m})),n.d(t,"h",(function(){return v})),n.d(t,"p",(function(){return j})),n.d(t,"k",(function(){return D})),n.d(t,"n",(function(){return k}));var r,i=n(54),a=n(12);!function(e){e.detecting="running",e.finished="finished",e.error="error"}(r||(r={}));var c,s=function(e){var t=e.params;return Object(i.b)({method:"get",url:"/api/v6/baseline/GroupStatistics",params:t},Object(a.g)("获取策略组统计信息"))},u=function(){return Object(i.b)({method:"get",url:"/api/v6/baseline/GetGroupList"},Object(a.g)("获取策略组列表"))};!function(e){e.success="success",e.failure="failed"}(c||(c={}));var o,d=function(e){var t=e.data;return Object(i.b)({method:"post",url:"/api/v6/baseline/Detect",data:t},Object(a.g)("开始基线检查"),!1)},l=function(e){var t=e.params;return Object(i.b)({method:"get",url:"/api/v6/baseline/GroupCheckStatus",params:t},Object(a.g)("策略组检测状态"))},b=function(e){var t=e.data;return Object(i.b)({method:"post",url:"/api/v6/baseline/DetectProgressDetail",data:t},Object(a.g)("基线检查进度详情"))};!function(e){e.All="",e.HasRisk="risk",e.NoRisk="unrisk"}(o||(o={}));var f,p=function(e){var t=e.data,n=e.params;return Object(i.b)({method:"post",url:"/api/v6/baseline/GetBaselineList",data:t,params:n},Object(a.g)("获取基线列表"))},h=function(e){var t=e.data,n=e.params;return Object(i.b)({method:"post",url:"/api/v6/baseline/GetBaselineDetailList",data:t,params:n},Object(a.g)("基线详情列表"))};!function(e){e.Fail="error",e.NoPass="failed",e.Pass="passed"}(f||(f={}));var m,O=function(e){var t=e.data,n=e.params;return Object(i.b)({method:"post",url:"/api/v6/baseline/GetCheckResList",data:t,params:n},Object(a.g)("检查结果列表"))},g=function(e){var t=e.data;return Object(i.b)({method:"post",url:"/api/v6/baseline/GetWhiteHostNum",data:t},Object(a.g)("获取白名单弹框主机数"))};!function(e){e[e.Part=0]="Part",e[e.All=1]="All"}(m||(m={}));var v=function(e){var t=e.data;return Object(i.b)({method:"post",url:"/api/v6/baseline/ChecklistWhiten",data:t},Object(a.g)("检查项加白"))},j=function(e){var t=e.data;return Object(i.b)({method:"post",url:"/api/v6/baseline/GetChecklistDetail",data:t},Object(a.g)("获取一个检查项详情"))};function D(e,t){return Object(i.b)({url:"/api/v6/baseline/GetBaselineCheckList",params:e,data:t,method:"POST"},Object(a.g)("获取基线对应检查项列表"))}function k(e,t){return Object(i.b)({url:"/api/v6/baseline/GetCheckHostList",params:e,data:t,method:"POST"},Object(a.g)("获取检查项影响主机列表"))}},811:function(e,t,n){"use strict";n.r(t),n.d(t,"BaselineDetectCtx",(function(){return s})),n.d(t,"BaselineDetectDetailCtx",(function(){return u})),n.d(t,"useDetectingTransferFinish",(function(){return o})),n.d(t,"isDetectingStatus",(function(){return d})),n.d(t,"isFinishDetectStatus",(function(){return l})),n.d(t,"isTransferDetectFinish",(function(){return b})),n.d(t,"POLLING_INTERVAL_TIME",(function(){return f}));var r=n(0),i=n.n(r),a=n(163),c=n(1617),s=i.a.createContext({policyGroupId:0,policyDetectStatus:c.b.finished,loadingPostBaselineDetect:!1,neverDetect:!0,taskIsDetecting:!1,handleBaselineDetect:function(){},handleSomeDetect:function(){},handleDetectSuccess:function(){},progress:0,loadingDetectCondition:!1,baselineType:void 0}),u=i.a.createContext({policyGroupId:0,policyDetectStatus:c.b.finished,loadingPostBaselineDetect:!1,neverDetect:!0,taskIsDetecting:!1,handleBaselineDetect:function(){},handleSomeDetect:function(){},handleDetectSuccess:function(){},progress:0,loadingDetectCondition:!1,instanceId:void 0,baselineId:void 0,baselineType:void 0});function o(){var e=Object(r.useRef)();return{isTransferDetectStatus:function(t){var n,r=t.detectStatus,i=t.policyGroupId,c=null!==(n=e.current)&&void 0!==n?n:{},s=c.detectStatus,u=c.policyGroupId,o=b(r,s)&&Object(a.eq)(u,i);return e.current=t,o},preData:e}}function d(e){return e===c.b.detecting}function l(e){return e===c.b.finished}function b(e,t){return e===c.b.finished&&t===c.b.detecting}var f=1e4},865:function(e,t,n){"use strict";n.r(t);n(597);var r=n(226),i=(n(197),n(117)),a=n(10),c=n.n(a),s=(n(224),n(97)),u=n(28),o=n.n(u),d=n(50),l=n.n(d),b=n(16),f=n.n(b),p=n(0),h=n.n(p),m=n(115),O=n.n(m),g=n(1617),v=n(12),j=n(1396),D=n.n(j),k=n(811),w="/opt/tiger/compile_path/src/code.byted.org/biz-platform/hids/src/pages/baseline-detect/baseline-detail-page/modal/add-white-modal.tsx";function y(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 _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var P=O.a.bind(D.a);t.default=function(e){var t=e.checklistIds,n=e.instanceListIds,a=e.visible,c=e.onVisibleChange,u=e.onSuccess,d=e.from,b=Object(p.useContext)(k.BaselineDetectDetailCtx),m=b.checkId,O=b.instanceId,j=b.baselineId,D=Object(p.useState)({range:g.g.Part,white_desc:""}),y=l()(D,2),S=y[0],C=y[1];return h.a.createElement(r.a,{className:P("add-modal"),autoFocus:!1,visible:a,title:Object(v.g)("加白名单"),onCancel:function(){return c(!1)},onOk:o()(f.a.mark((function e(){var r;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=S.white_desc,e.next=3,Object(g.h)({data:{checklist_id_list:t||[m],agent_id_list:n||[O],baseline_id:j,whitelist_detail:r||void 0,if_whiten:!0}});case 3:s.a.success(Object(v.g)("加白成功")),c(!1),u(d);case 6:case"end":return e.stop()}}),e)}))),__source:{fileName:w,lineNumber:38,columnNumber:5}},h.a.createElement("div",{className:P("tip"),__source:{fileName:w,lineNumber:60,columnNumber:7}},Object(v.g)("您已选择{host}台主机的{check}个检查项,是否确定加白名单?",{host:n?n.length:1,check:t?t.length:1})),h.a.createElement(i.a.TextArea,{style:{height:80},placeholder:Object(v.g)("填写本次操作说明备注,便于后续查看"),value:S.white_desc,onChange:function(e){return C(_(_({},S),{},{white_desc:e}))},__source:{fileName:w,lineNumber:66,columnNumber:7}}))}}}]);