PageSourceSearch

https://portal.clumio.com/protect-static/static/js/app-5953.dcc2ac9e.js

js clumio.com collected 2026-10-03 19:06:24 UTC 16,118 bytes, 2 lines download raw bytes

1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="3e0f98bb-a6b2-44b4-9d24-bdf70db50eaa",e._sentryDebugIdIdentifier="sentry-dbid-3e0f98bb-a6b2-44b4-9d24-bdf70db50eaa")}catch(e){}("undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:{}).SENTRY_RELEASE={id:"0951d5be5c89f17d03cf1c5831d37e7d103be82a"};(self.webpackChunkprotect=self.webpackChunkprotect||[]).push([[5953],{5953(e,t,n){n.d(t,{v:()=>ne});var l=n(42036),i=n(55256),o=n(29881),a=n(64387),s=n.n(a),r=n(46183),c=n(52229),d=n(42873),u=n(63331),m=n.n(u),p=n(49947),E=n.n(p),y=n(61524),v=n.n(y),g=n(12283),f=n(41793),T=n.n(f),I=n(75269),_=n(9036),A=n(34847);const N=({canOverride:e,currentInEffectRule:t})=>{var n;const[i]=(0,o.useTranslation)();return l.createElement(d.FlexItem,{className:v()("info-group","current-rule-info")},e?l.createElement(E(),null,l.createElement(o.Trans,{i18nKey:"rulesEngine.directAssignment.protectionModal.selectionWillOverride"},"Your selection will override the current protection rule (",l.createElement(E(),{variant:"link",display:"inline",linkProps:{role:r.EButtonRole.NAVIGATION,href:A.Ay.PAGE_ROUTES.PROTECTION_RULES,reactRouterLink:c.Link}},"see all rules"),")"),":"):null,l.createElement("div",{className:"details"},l.createElement(E(),{variant:"label"},i("rulesEngine.common.previewAssetsColumns.rule")),l.createElement(E(),{variant:"label"},i("common.policy")),l.createElement(E(),null,t.rule_name),l.createElement(E(),null,null!==(n=t.policy_name)&&void 0!==n?n:"-")))},O=()=>{const[e]=(0,o.useTranslation)();return l.createElement("div",{className:v()("rules-list-grid","heading")},l.createElement(E(),{weight:"bold"},e("rulesEngine.list.name")),l.createElement(E(),{weight:"bold"},e("common.policy")))},b=({matchingRules:e,inEffectRuleName:t,setModalType:n})=>{const[i]=(0,o.useTranslation)(),[a,s]=(0,l.useState)(!1);return l.createElement(d.FlexLayout,{className:v()("info-group","collapsed-container"),flexDirection:r.EFlexDirection.COLUMN,itemSpacing:r.ELayoutItemSpacing.ZERO},l.createElement("div",null,l.createElement(E(),{className:"collapse-title",variant:"link",linkProps:{role:r.EButtonRole.BUTTON,onClick:()=>s(!a)}},l.createElement(d.FlexLayout,{flexDirection:r.EFlexDirection.ROW,alignItems:r.EFlexAlignItems.CENTER,itemSpacing:r.ELayoutItemSpacing.SIXPIXEL},i("rulesEngine.directAssignment.protectionModal.doesntApply",{count:e.length}),l.createElement(g.IconChevronDown,{className:v()("arrow",{expanded:a}),fontSize:20})))),l.createElement(T(),{isOpen:a},l.createElement(d.FlexItem,{className:"rules-list-container"},l.createElement(O,null),e.map((e=>l.createElement("div",{key:`${e.policy_id}-${e.rule_id}`,className:v()("rules-list-grid","card")},l.createElement(E(),{color:"disabled"},e.rule_name),l.createElement(E(),{color:"disabled"},e.policy_name||"-"),l.createElement(E(),{color:"disabled"},i(`rulesEngine.directAssignment.protectionModal.reasons.${e.reason}`,{current:t})),e.rule_id===_.Pw&&l.createElement(g.IconTrash,{onClick:()=>n("delete"),fontSize:"18px",color:(0,I.getDesignTokens)().icon.COLOR_INTERACTIVE_DEFAULT_FONT,style:{cursor:"pointer"}})))))))};var P,h=n(96471),R=n(4653),C=n(79378),S=n(94130),L=n.n(S),F=n(7277),k=n(12692),D=n(23584),x=n(11624),M=n(15817);!function(e){e.IN_EFFECT="rule_matched_rule_and_policy_applicable",e.HIGHER_RULE_MATCHED="rule_skipped_higher_priority_rule_matched",e.POLICY_NOT_FOUND="rule_skipped_policy_not_found",e.POLICY_DOESNT_SUPPORT_DATASOURCE="rule_skipped_policy_does_not_support_datasource",e.UNSUPPORTED_DATAPLANE_REGION="rule_skipped_asset_in_unsupported_dataplane_region"}(P||(P={}));const w=(e,t,n=1)=>{switch(t){case"add":return{heading:e("rulesEngine.directAssignment.protectionModal.protect.title",{count:n}),type:r.EModalType.CREATE};case"update":return{heading:e("rulesEngine.directAssignment.protectionModal.update.title"),type:r.EModalType.EDIT};case"delete":default:return{heading:e("asyncProtection.crud.modalTitle.delete"),type:r.EModalType.REMOVE}}};var U=n(41513);const G=({handlePolicyChange:e,entityType:t,currentInEffectPolicyId:n})=>{var a,s;const[r]=(0,o.useTranslation)(),[c,d]=(0,l.useState)(n),u=(0,x.qx)().find((e=>e.entityType===t)),{data:m,isLoading:p,isFetching:E,fetchNextPage:y,hasNextPage:v,isFetchingNextPage:g}=(0,U.H_)({filter:(0,R.constructApiFilter)({[h.EFilters.POLICY_OPERATION_TYPE]:(0,F.r1)([null!==(a=null===u||void 0===u?void 0:u.policyAssetType)&&void 0!==a?a:""])},{[h.EFilters.POLICY_OPERATION_TYPE]:h.EListFilterOperator.IN})},{refetchOnWindowFocus:!1},{Accept:"application/api.clumio.*=v1&policy-rules=v0+json"}),f=e=>{const{isDisabled:o,disabledMessage:a}=((e,t,n)=>{let l=!(0,M.isHateoasPresent)(h.EHateoasActions.PROTECT_ENTITIES,n._links),i="";if(t===h.EEntityType.NEPTUNE||t===h.EEntityType.DOCUMENTDB){const t=n.operations.every((e=>e.type!==h.EPolicyOperation.RDS_ROLLING))&&n.operations.every((e=>e.type!==h.EPolicyOperation.RDS_BACKUP));n.operations.some((e=>e.type===h.EPolicyOperation.RDS_GRANULAR))&&t&&(l=!0,i=e("policy.neptuneDocDBArchivePolicyApplicationDisabledText")),n.operations.some((e=>e.type===h.EPolicyOperation.RDS_SNAPSHOT))&&t&&(l=!0,i=e("policy.neptuneDocDBPITRPolicyApplicationDisabledText"))}return{isDisabled:l,disabledMessage:i}})(r,t,e);return l.createElement(C.Option,Object.assign({key:e.id,disabled:o,value:e,selected:c===e.id},(0,i.testAttr)(e.name)),l.createElement(R.ToggleTooltip,{visible:o,title:a},(null===u||void 0===u?void 0:u.protectedEntityType)&&l.createElement(k.A,{policy:e,isCurrent:e.id===n,operation:o?void 0:D.fi[u.protectedEntityType][0]})))},T=null!==(s=(e=>null===e||void 0===e?void 0:e.pages.reduce(((e,t)=>{var n;return[...e,...null!==(n=null===t||void 0===t?void 0:t._embedded.items)&&void 0!==n?n:[]]}),[]))(m))&&void 0!==s?s:[],I=T.find((e=>e.id===c));return l.createElement(L(),Object.assign({optionsKey:"id"},(0,i.testAttr)("select-policy"),{onChange:(t,n)=>{e(n[0]),d(n[0])},placeholder:r(n&&!I?"common.unknownPolicy":"common.selectPolicy"),className:"policy-item-name",isLoading:p||E,infiniteScrollProps:{itemRenderer:f,items:T,loadMore:y,isLoading:g,areAllItemsLoaded:!v,selectedItem:I?f(I):null},listWidth:600},(0,i.testAttr)("select-policy")))};var j=n(81581),B=n(74180);const H=({modalType:e,protectionInfo:t,entity:n,setPolicyId:i,setInEffectRuleType:a,setModalType:s})=>{var u,p,y,v;const[g]=(0,o.useTranslation)(),{global:f,ou:T}=(0,j.HA)({limit:100,embed:A.Ay.EMBED_READ_POLICY}),I=f.isLoading||T.isLoading,O=((e,t)=>{if(!e||!t)return[];const n=e.findIndex((({id:e})=>e===x._T)),l=[...e];return t.length&&l.splice(n,1,...t),l})(null===(u=f.data)||void 0===u?void 0:u._embedded.items,null===(p=T.data)||void 0===p?void 0:p._embedded.items),{data:h,isLoading:R}=(0,B.iN)(n.id),C=null!==(y=null===h||void 0===h?void 0:h.matches)&&void 0!==y?y:[],[S,L,F]=((e,t=[])=>{const n=e.find((({reason:e})=>e===P.IN_EFFECT)),l=t.findIndex((({id:e})=>e===_.Pw)),i=n?t.findIndex((({id:e})=>e===n.rule_id)):t.length,o=-1!==i?i:t.findIndex((({id:e})=>e===x._T));return[n,!((null===n||void 0===n?void 0:n.rule_id)!==_.Pw),o>=l]}
1)(C,O);(0,l.useEffect)((()=>{if(!I&&!R)if(L)a("asset-level");else{a(F?"lower-than-asset-level":"higher-than-asset-level")}}),[L,F,I,R]);const k=null===C||void 0===C?void 0:C.filter((({reason:e})=>e!==P.IN_EFFECT)),D=null===(v=C.find((({rule_id:e})=>e===_.Pw)))||void 0===v?void 0:v.policy_name;return"delete"===e?l.createElement(E(),null,l.createElement(o.Trans,{i18nKey:"rulesEngine.directAssignment.protectionModal.confirmDelete"},"Are you sure you want to remove",l.createElement(E(),{weight:"bold",display:"inline"},{policyName:D||g("rulesEngine.directAssignmentTitle")}),"from",l.createElement(E(),{weight:"bold",display:"inline"},{assetName:n.name})),"?"):I||R?l.createElement(m(),null):l.createElement(d.FlexLayout,{className:"modal-body",flexDirection:r.EFlexDirection.COLUMN,itemSpacing:r.ELayoutItemSpacing.SIXTEENPIXEL},F?l.createElement(d.FlexItem,{className:"info-group"},l.createElement(d.FlexItem,null,l.createElement(E(),{display:"inline"},l.createElement(o.Trans,{i18nKey:"rulesEngine.directAssignment.protectionModal.description",values:{assetId:n.nativeId,assetName:n.name}},"Select a policy to apply to",l.createElement(E(),{weight:"bold",display:"inline"},{assetName:n.name}),n.nativeId))),l.createElement(G,{currentInEffectPolicyId:L?null===S||void 0===S?void 0:S.policy_id:void 0,entityType:n.type,handlePolicyChange:i})):l.createElement(d.FlexItem,null,l.createElement(E(),null,g("rulesEngine.directAssignment.protectionModal.cantAssign"))),!L&&(null===t||void 0===t?void 0:t.policyId)&&S?l.createElement(N,{canOverride:F,currentInEffectRule:S}):null,(null===k||void 0===k?void 0:k.length)?l.createElement(b,{setModalType:s,matchingRules:k,inEffectRuleName:null===S||void 0===S?void 0:S.rule_name}):null,!L&&"add"!==e||(null===k||void 0===k?void 0:k.length)?null:l.createElement(E(),null,l.createElement(o.Trans,{i18nKey:"rulesEngine.directAssignment.protectionModal.protectMultipleAssets"},"Or you can apply a policy to multiple assets at once using",l.createElement(E(),{variant:"link",display:"inline",linkProps:{role:r.EButtonRole.NAVIGATION,href:A.Ay.PAGE_ROUTES.PROTECTION_RULES,reactRouterLink:c.Link}},"Protection Rules"),".")),F?null:l.createElement(E(),null,l.createElement(o.Trans,{i18nKey:"rulesEngine.directAssignment.protectionModal.updateRules"},"To change or remove the policy, go to",l.createElement(E(),{variant:"link",display:"inline",linkProps:{role:r.EButtonRole.NAVIGATION,href:A.Ay.PAGE_ROUTES.PROTECTION_RULES,reactRouterLink:c.Link}},"Protection Rules"),".")))};var X=n(78521);const Y=({modalType:e,entity:t,bulkEntityIds:n,setPolicyId:i})=>{const[a]=(0,o.useTranslation)(),{t:s}=(0,X.useCommonTranslation)(),u=null===n||void 0===n?void 0:n.length,m="update"===e;return"delete"===e?l.createElement(E(),null,s("policy.removePolicyMulti",{selectedEntities:s("policy.assetValue",{count:u})})):l.createElement(d.FlexLayout,{className:"modal-body",flexDirection:r.EFlexDirection.COLUMN,itemSpacing:r.ELayoutItemSpacing.SIXTEENPIXEL},l.createElement(d.FlexItem,{className:"info-group"},l.createElement(d.FlexItem,null,l.createElement(E(),{display:"inline"},s("policy.selectPolicyToApply",{applyTo:s("policy.assetValue",{count:u})}))),l.createElement(G,{entityType:t.type,handlePolicyChange:i})),m?l.createElement(E(),null,a("rulesEngine.directAssignment.protectionModal.multipleAssetsChangeNote")):null,l.createElement(E(),null,l.createElement(o.Trans,{i18nKey:"rulesEngine.directAssignment.protectionModal.protectMultipleAssets"},"Or you can apply a policy to multiple assets at once using",l.createElement(E(),{variant:"link",display:"inline",linkProps:{role:r.EButtonRole.NAVIGATION,href:A.Ay.PAGE_ROUTES.PROTECTION_RULES,reactRouterLink:c.Link}},"Protection Rules"),".")))};var K=n(612),V=n(61093),W=n.n(V),$=n(25762),q=n.n($),z=n(2033),J=n(95372),Q=n(61068),Z=n(7311);const ee=({setModalType:e,currentPolicyId:t,selectedPolicyId:n,modalType:a,inEffectRuleType:s,entity:c,bulkEntityIds:u,onClose:m,setIsLoading:p})=>{var E;const[y]=(0,o.useTranslation)(),v=(0,K.useQueryClient)(),g=(null!==(E=null===u||void 0===u?void 0:u.length)&&void 0!==E?E:0)>1,f=g&&u?u:[c.id],{mutate:T,isLoading:I}=(0,B.Nd)(),[_,A]=(0,l.useState)(),[N,O]=(0,Q.A)(),{data:b}=(0,U.Ev)(null!==n&&void 0!==n?n:"",{enabled:!!n},(0,z.J2)()),P=e=>{A(e.task_id);const t=`policy-apply-notification-${Date.now()}`;b&&N({id:t,dismissAfter:i.constants.NOTIFICATION_DISMISS_AFTER_LONG,content:l.createElement(W(),{onClose:()=>O(t),type:"info"},(0,D.Rl)(b,y,(0,D.Tj)(c.type,g),c.name,g?f.length:void 0))})},R=e=>{A(e.task_id);const t=`policy-remove-notification-${Date.now()}`;N({id:t,dismissAfter:i.constants.NOTIFICATION_DISMISS_AFTER_LONG,content:l.createElement(W(),{onClose:()=>O(t),type:"info"},y("common.successfulPolicyRemoval"))})},C=()=>{T({items:f.map((e=>({action:Z.o3.ASSIGN,entity:{id:e,type:c.type},policy_id:n})))},{onSuccess:P})},S=()=>{T({items:f.map((e=>({action:Z.o3.UNASSIGN,entity:{id:e,type:c.type}})))},{onSuccess:R})},{taskStatusDetails:L}=(0,J.RQ)(null!==_&&void 0!==_?_:"",{enabled:!!_});(0,l.useEffect)((()=>{L.status===h.ETaskStatus.COMPLETED&&_&&!I&&(m(!0),f.forEach((e=>v.removeQueries((0,B.Se)(e)))))}),[L.status,_,I]),(0,l.useEffect)((()=>{p(!(!_||L.status===h.ETaskStatus.COMPLETED)||I)}),[I,L.status,_]);const F=()=>l.createElement(q(),Object.assign({variant:"primary",disabled:!n||n===t&&"asset-level"===s||I,onClick:C},(0,i.testAttr)("apply-policy")),y("common.applyPolicy"));switch(a){case"delete":return l.createElement(d.FlexLayout,{flexDirection:r.EFlexDirection.ROW,justifyContent:r.EFlexJustifyContent.SPACE_BETWEEN},l.createElement(q(),{variant:"secondary",onClick:()=>e("update")},y("common.cancel")),l.createElement(q(),Object.assign({variant:"destructive",disabled:I,onClick:S},(0,i.testAttr)("remove-policy")),y("common.remove")));case"add":return l.createElement(d.FlexLayout,{flexDirection:r.EFlexDirection.ROW,justifyContent:r.EFlexJustifyContent.FLEXEND},F());case"update":return g||"higher-than-asset-level"!==s?l.createElement(d.FlexLayout,{flexDirection:r.EFlexDirection.ROW,justifyContent:r.EFlexJustifyContent.FLEXEND},(g||"asset-level"===s)&&l.createElement(q(),Object.assign({variant:"destructive",disabled:I,onClick:()=>e("delete")},(0,i.testAttr)("remove-policy")),y("common.removePolicy")),F()):null;default:return null}},te=({protectionInfo:e,onClose:t,entity:n,bulkEntityIds:i})=>{var a,c;const[d]=(0,o.useTranslation)(),u=(null!==(a=null===i||void 0===i?void 0:i.length)&&void 0!==a?a:0)>1,[m,p]=(0,l.useState)((null===e||void 0===e?void 0:e.policyId)?"update":"add"),[E,y]=(0,l.useState)("higher-than-asset-level"),[v,g]=(0,l.useState)(!1),[f,T]=(0,l.useState)(),I=e=>{T(e)};return l.createElement(s(),{className:"direct-assignment-protection-modal",isOpen:!0,size:r.EModalSize.LARGE,headerOptions:Object.assign({onCloseClick:()=>t()}
1,w(d,m,null!==(c=null===i||void 0===i?void 0:i.length)&&void 0!==c?c:1)),body:u?l.createElement(Y,{modalType:m,entity:n,bulkEntityIds:i,setPolicyId:I}):l.createElement(H,{modalType:m,setInEffectRuleType:y,protectionInfo:e,entity:n,setPolicyId:I,setModalType:p}),footer:l.createElement(ee,{entity:n,bulkEntityIds:i,modalType:m,setModalType:p,inEffectRuleType:E,currentPolicyId:null===e||void 0===e?void 0:e.policyId,selectedPolicyId:f,onClose:t,setIsLoading:g}),loading:v})},ne=(e,t="",n,o,a)=>{const[s,r]=(0,l.useState)(!1),c=(0,i.useMemoComparator)(n),d=(0,i.useMemoComparator)(a),u=()=>r(!s),m=(0,l.useMemo)((()=>{var i,r;return s&&n?l.createElement(te,{onClose:(e=!1)=>{u(),e&&o&&o()},entity:{id:n.id,name:n.name,nativeId:t,type:e},protectionInfo:{ruleId:null===(i=n.protection_info)||void 0===i?void 0:i.rule_id,policyId:null===(r=n.protection_info)||void 0===r?void 0:r.policy_id},bulkEntityIds:a}):null}),[s,c,d]);return[u,m]}},12692(e,t,n){n.d(t,{A:()=>d});var l=n(42036),i=n(29881),o=n(42873),a=n(3147),s=n.n(a),r=n(46183),c=n(55256);const d=({policy:e,isCurrent:t,operation:n,hideSLA:a})=>{const[d]=(0,i.useTranslation)();let u;if("operations"in e){const{operations:t}=e,l=t.find((e=>e.type===n));u=null===l||void 0===l?void 0:l.slas[0]}return l.createElement("div",{className:"policy-selection-item-container",role:"button"},l.createElement(o.FlexLayout,{className:"policy-selection-item",itemSpacing:r.ELayoutItemSpacing.EIGHTPIXEL},l.createElement(o.FlexItem,Object.assign({title:e.name,className:"policy-item-name",flexGrow:r.EFlexItemGrow.ONE},(0,c.testAttr)(e.name)),e.name),l.createElement(o.FlexItem,{className:"current-policy-indicator-container"},t&&l.createElement("span",{className:"current-policy-indicator"},d("common.current"))),l.createElement(o.FlexItem,{className:"backup-sla"},u&&!a?l.createElement(s(),null,`${(0,c.backupConfigFrequencyFormatter)(d,u,"backup-frequency")}, ${(0,c.backupConfigFrequencyFormatter)(d,u,"retention-duration")}`):null)))}}}]);
2//# sourceMappingURL=app-5953.dcc2ac9e.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.