All Downloads are FREE. Search and download functionalities are using the official Maven repository.

web-interface.assets.bb8c8232-5861.4f0e1d7f83b638e05630.js Maven / Gradle / Ivy

There is a newer version: 6.1.4
Show newest version
"use strict";(()=>{(self.webpackChunkgraylog_web_interface=self.webpackChunkgraylog_web_interface||[]).push([["bb8c8232-5861"],{"W+DnNXDH":(Ft,$,s)=>{s.r($),s.d($,{default:()=>pt});var e=s("Z7aTuO5B"),ie=s("yAXMqwrl"),v=s("IOI9nV80"),f=s("rIl5IEuP"),z=s("8fnsnG21"),P=s("PhRf2fIG"),G=s("6dLKCZdN"),se=s("E+CaPsQD"),D=s("d4kzUuQm"),F=s("J6y4/h8P"),Z=s("ZaccISJq"),ae=s("pp5t3b0P"),re=s.n(ae),de=s("3UCnSGqh"),X=s.n(de),M=s("DUKaTDO2"),O=s("jAGDuYSC"),Y=s("eFxcQyPT"),L=s("MdYBRjRJ"),ce=s("gyRmhZSW"),ue=s("6gJIQhoE");const me={pagination:{total:0},list:[],attributes:[]},pe=async(t,n)=>{const o=(0,L.H3)(`/system/indices/index_sets/types/${t}`),l=(0,ce.A)(o,n.page,n.pageSize,n.query,{filters:(0,ue.A)(n.filters),sort:n.sort.attributeId,order:n.sort.direction});return(0,Y.Ay)("GET",l).then(({elements:i,total:a,attributes:u})=>({list:i.map(r=>({id:r.field_name,fieldName:r.field_name,type:r.type,origin:r.origin,isReserved:r.is_reserved})),pagination:{total:a},attributes:u}))},Ee=(t,n,{enabled:o})=>{const{data:l,isLoading:i,refetch:a}=(0,M.useQuery)(["indexSetFieldTypes",n],()=>pe(t,n),{onError:u=>{O.A.error(`Loading index field types failed with status: ${u}`,"Could not load index field types")},keepPreviousData:!0,enabled:o});return{data:l!=null?l:me,isLoading:i,refetch:a}};var fe=s("MZSqcZgA"),ye=s("Dg3D5NJi"),ge=s("qO9czYNI"),Se=s("gjuIj59j"),ve=s("f6qZmSzy"),he=s("rVdVsuGH"),W=s("8OvTct/Z"),j=s("0t7Ye+61"),T=s("v4GbOr/o"),Ie=s("7FTHePOw"),k=s.n(Ie);const xe="/system/indices/mappings/remove_mapping",Fe=async({indexSets:t,fields:n,rotated:o})=>{const l=(0,L.H3)(xe),i={index_sets:t,fields:n,rotate:o};return(0,Y.Ay)("PUT",l,i)},Ce=t=>{const n=(0,M.useQueryClient)(),o=(0,M.useMutation)(Fe,{onError:l=>{O.A.error(`Removing custom field type failed with status: ${l}`,"Could not remove custom field type")},onSuccess:l=>{let i=0;const a=k()(l,({successfully_performed:u,succeeded:r,errors:c,failures:p},m)=>{const y=p.map(({entity_id:d,failure_explanation:I})=>({entityId:d,failureExplanation:I}));return i=i+y.length+c.length,{indexSetId:m,successfullyPerformed:u,succeeded:r.map(({field_name:d,type:I,origin:E,is_reserved:C})=>({isReserved:C,fieldName:d,type:I,origin:E,id:d})),errors:c,failures:y}});return n.refetchQueries({queryKey:["indexSetFieldTypes"],type:"active"}),i===0?(O.A.success("Custom field type removed successfully","Success!"),t.onSuccessHandler(a)):t.onErrorHandler(a)}});return{removeCustomFieldTypeMutation:o.mutateAsync,isLoading:o.isLoading}},Re=({errors:t,failures:n,title:o})=>e.createElement("div",null,e.createElement("h4",null,e.createElement("b",null,o,":")),e.createElement("ul",null,!!t.length&&e.createElement("li",null,e.createElement("h5",null,e.createElement("b",null,"General errors:")),e.createElement("ul",null,t.map(l=>e.createElement("li",{key:l},e.createElement("i",null,l))))),!!n.length&&e.createElement("li",null,e.createElement("h4",null,e.createElement("b",null,"Field errors:")),e.createElement("ul",null,n.map(({entityId:l,failureExplanation:i})=>e.createElement("li",{key:l},e.createElement("b",null,l)," - ",e.createElement("i",null,i))))))),Pe=({removalResponse:t,indexSets:n})=>e.createElement(f.Alert,{bsStyle:"danger",title:"Removing some of field type overrides failed"},Object.values(t).map(({indexSetId:o,failures:l,errors:i})=>e.createElement(Re,{key:o,failures:l,errors:i,title:n[o].title})));var Te=s("JNPySgKz"),H=s("ty2gyrHp"),Ae=s("D8q7xuJq"),w=s("A4KcNqtF");const Q=()=>{const{indexSet:t}=(0,z.P)(P.zE),{data:{customFieldMappings:n,name:o,description:l},isFetched:i}=(0,Ae.A)(t==null?void 0:t.field_type_profile),{data:{fieldTypes:a},isLoading:u}=(0,w.A)(),r=(0,e.useMemo)(()=>{const c=t==null?void 0:t.field_type_profile;return i&&!u&&c?k()(X()(n,"field"),p=>a[p.type]):{}},[n,a,t==null?void 0:t.field_type_profile,i,u]);return(0,e.useMemo)(()=>({customFieldMappingsByField:r,name:o,description:l,id:t==null?void 0:t.field_type_profile}),[r,l,o,t==null?void 0:t.field_type_profile])},Me=F.default.h5`
  font-weight: bold;
  margin-bottom: 5px;
`,Oe=({indexSets:t})=>t?Object.fromEntries(t.map(n=>[n.id,n])):null,Le=({overriddenProfilesFieldsWithType:t})=>e.createElement(e.Fragment,null,t.map(({field:n,type:o},l)=>{const i=l===t.length-1;return e.createElement("span",{key:`${n}-${o}`},e.createElement("b",null,n,":")," ",e.createElement("i",null,o),i?"":", ")})),De=({fields:t,indexSets:n,setRotated:o,rotated:l,indexSetIds:i})=>{const a=t.join(", "),u=i.map(d=>n[d].title).join(", "),{customFieldMappingsByField:r,name:c,id:p}=Q(),m=(0,e.useMemo)(()=>t.filter(d=>!r[d]).join(", "),[r,t]),y=(0,e.useMemo)(()=>t.filter(d=>r[d]).map(d=>({field:d,type:r[d]})),[r,t]);return e.createElement("div",null,e.createElement(f.Alert,null,"After removing the overridden field type for ",e.createElement("b",null,a)," in ",e.createElement("b",null,u),m&&e.createElement(e.Fragment,null,", the settings of your ",e.createElement("i",null,"search engine")," will be applied for fields: ",e.createElement("b",null,m)),!!y.length&&e.createElement(e.Fragment,null,", ","the settings from ",e.createElement(H.N,{to:D.Ay.SYSTEM.INDICES.FIELD_TYPE_PROFILES.edit(p)},c)," ( namely ",e.createElement(Le,{overriddenProfilesFieldsWithType:y}),")"," ","will be applied.")),e.createElement(Me,null,"Select Rotation Strategy"),e.createElement("p",null,"To see and use field type changes for ",e.createElement("b",null,a),", you have to rotate indices. You can automatically rotate affected indices after submitting this form or do that manually later."),e.createElement(f.Input,{type:"checkbox",id:"rotate",name:"rotate",label:"Rotate affected indices after change",onChange:()=>o(d=>!d),checked:l}))},J=({show:t,fields:n,onClose:o,indexSetIds:l})=>{const{setSelectedEntities:i}=(0,Te.A)(),a=(0,z.P)(P.zE,Oe),[u,r]=(0,e.useState)(null),[c,p]=(0,e.useState)(!0),m=(0,e.useCallback)(h=>{const b=new Set(Object.values(h).flatMap(x=>x.succeeded.map(({fieldName:N})=>N)));i(x=>x.filter(N=>!b.has(N)))},[i]),y=(0,e.useCallback)(h=>{m(h),r(h)},[m]),d=(0,e.useCallback)(h=>{m(h),o()},[o,m]),{removeCustomFieldTypeMutation:I}=Ce({onErrorHandler:y,onSuccessHandler:d}),E=(0,W.A)(),{pathname:C}=(0,j.A)(),g=(0,e.useMemo)(()=>(0,L.i)(C),[C]),R=(0,e.useCallback)(h=>{h.preventDefault(),r(null),I({fields:n,indexSets:l,rotated:c}).then(()=>{E(T.g.SEARCH_FIELD_VALUE_ACTION.REMOVE_CUSTOM_FIELD_TYPE_REMOVED,{app_pathname:g,app_action_value:{value:"removed-custom-field-type",rotated:c}})})},[n,l,I,c,E,g]),A=(0,e.useCallback)(()=>{E(T.g.SEARCH_FIELD_VALUE_ACTION.REMOVE_CUSTOM_FIELD_TYPE_CLOSED,{app_pathname:g,app_action_value:"removed-custom-field-type-closed"}),o()},[o,E,g]);return(0,e.useEffect)(()=>{P.pG.list(!1),E(T.g.SEARCH_FIELD_VALUE_ACTION.REMOVE_CUSTOM_FIELD_TYPE_OPENED,{app_pathname:g,app_action_value:"removed-custom-field-type-opened"})},[E,g]),e.createElement(f.BootstrapModalForm,{title:e.createElement("span",null,"Remove Field Type Overrides"),submitButtonText:"Remove field type overrides",onSubmitForm:R,onCancel:A,show:t,bsSize:"large"},a?e.createElement(De,{rotated:c,setRotated:p,fields:n,indexSetIds:l,indexSets:a}):e.createElement(v.y$,null),u&&e.createElement(Pe,{removalResponse:u,indexSets:a}))};var K=s("zQXwj91r");const q=t=>t.origin==="OVERRIDDEN_PROFILE"||t.origin==="OVERRIDDEN_INDEX",be=({onSubmitCallback:t,fieldType:n,indexSetId:o})=>{const[l,i]=(0,e.useState)(!1),[a,u]=(0,e.useState)(!1),r=()=>i(m=>!m),c=()=>u(m=>!m),p=q(n);return e.createElement(e.Fragment,null,e.createElement(f.Button,{onClick:c,role:"button",bsSize:"xsmall",disabled:n.isReserved,title:`Edit field type for ${n.fieldName}`,tabIndex:0},"Edit ",n.isReserved&&e.createElement(v.Zf,{displayLeftMargin:!0,title:"Reserved field is not editable",pullRight:!1},"We use reserved fields internally and expect a certain structure from them. Changing the field type for reserved fields might impact the stability of Graylog")),p&&e.createElement(f.Button,{onClick:r,role:"button",bsSize:"xsmall",title:"Reset custom type",tabIndex:0},"Reset"),l&&e.createElement(J,{show:!0,fields:[n.fieldName],onClose:r,indexSetIds:[o]}),a&&e.createElement(K.A,{initialSelectedIndexSets:[o],initialData:{fieldName:n.fieldName,type:n.type},onClose:c,show:!0,showSelectionTable:!1,onSubmitCallback:t,showFieldSelect:!1}))},Ne={OVERRIDDEN_INDEX:({type:t})=>e.createElement("span",null,"Field type ",e.createElement("i",null,t)," comes from the individual, custom field type mapping. It overrides possible mappings from the search engine index mapping, either immediately (if index was rotated) or during the next rotation."),OVERRIDDEN_PROFILE:({type:t,fieldName:n})=>{const{customFieldMappingsByField:o,name:l}=Q(),i=o==null?void 0:o[n];return e.createElement("div",null,"Field type ",e.createElement("i",null,t)," comes from the individual, custom field type mapping. It overrides not only possible mappings from the search engine index mapping, but also mapping ",e.createElement("b",null,n,": "),e.createElement("i",null,i)," present in profile ",e.createElement(H.N,{to:D.Ay.SYSTEM.INDICES.LIST},l))},PROFILE:({type:t})=>{const{id:n,name:o}=Q();return e.createElement("p",null,"Field type ",e.createElement("i",null,t)," comes from profile ",e.createElement(H.N,{to:D.Ay.SYSTEM.INDICES.FIELD_TYPE_PROFILES.edit(n)},o),". It overrides possible mappings from the search engine index mapping, either immediately (if index was rotated) or during the next rotation.")},INDEX:({type:t})=>e.createElement("p",null,"Field type ",e.createElement("i",null,t)," comes from the search engine index mapping. It could have been created dynamically, set by Graylog instance or come from historical profiles and/or custom mappings.")},Be=({origin:t,type:n,fieldName:o})=>{const{data:{fieldTypes:l}}=(0,w.A)(),i=Ne[t];return e.createElement(i,{type:l==null?void 0:l[n],fieldName:o})},ze={overriddenProfile:{title:"Origin explanation",content:({type:t,origin:n,fieldName:o})=>e.createElement(Be,{origin:n,type:t,fieldName:o})}},Ye={INDEX:"gray",OVERRIDDEN_INDEX:"primary",OVERRIDDEN_PROFILE:"warning",PROFILE:"default"},_=({title:t,origin:n})=>e.createElement(f.Badge,{bsStyle:Ye[n]},t),He=({origin:t,title:n})=>e.createElement(_,{origin:t,title:n});var Qe=s("LQfvSgYI");const Ue=F.styled.div`
  cursor: pointer;
`,Ve=({id:t,children:n})=>{const{toggleSection:o}=(0,Qe.A)(),l=()=>o(t,"overriddenProfile");return e.createElement(Ue,{onClick:l},n)},Ge=t=>{const{data:{fieldTypes:n}}=(0,w.A)(),o=(0,e.useMemo)(()=>{var l;const i=(l=t==null?void 0:t.find(({id:a})=>a==="origin"))==null?void 0:l.filter_options;return X()(i,"value")},[t]);return(0,e.useMemo)(()=>({attributes:{type:{renderCell:l=>e.createElement("span",null,n[l])},origin:{renderCell:(l,{id:i})=>{var a;return e.createElement(Ve,{id:i},e.createElement(_,{origin:l,title:(a=o==null?void 0:o[l])==null?void 0:a.title}))},staticWidth:200},is_reserved:{renderCell:l=>l?e.createElement(v.In,{title:"Field has reserved field type",name:"check"}):null,staticWidth:120}}}),[n,o])},Xe="/system/indices/mappings/set_profile",We=async({indexSetId:t,profileId:n,rotated:o})=>{const l=(0,L.H3)(Xe),i={index_sets:[t],rotate:o,profile_id:n};return(0,Y.Ay)("PUT",l,i)},je=()=>{const t=(0,M.useQueryClient)(),n=(0,M.useMutation)(We,{onError:o=>{O.A.error(`Setting index set profile failed with status: ${o}`,"Could not set index set profile")},onSuccess:()=>(O.A.success("Set index set profile successfully","Success!"),t.refetchQueries({queryKey:["indexSetFieldTypes"],type:"active"}))});return{setIndexSetFieldTypeProfile:n.mutateAsync,isLoading:n.isLoading}};var we=s("JA6mCPyt");const $e="/system/indices/mappings/remove_profile_from",Ze=async({indexSetId:t,rotated:n})=>{const o=(0,L.H3)($e),l={index_sets:[t],rotate:n};return(0,Y.Ay)("PUT",o,l)},ke=()=>{const t=(0,M.useQueryClient)(),n=(0,M.useMutation)(Ze,{onError:o=>{O.A.error(`Removing profile from index failed with status: ${o}`,"Could not remove profile from index")},onSuccess:()=>(O.A.success("Removed profile from index successfully","Success!"),t.refetchQueries({queryKey:["indexSetFieldTypes"],type:"active"}))});return{removeProfileFromIndex:n.mutateAsync,isLoading:n.isLoading}},Je=F.default.h5`
  font-weight: bold;
  margin-bottom: 5px;
`,Ke=(0,F.default)(v.l6)`
  width: 400px;
  margin-bottom: 20px;
`,qe=({show:t,onClose:n,currentProfile:o})=>{const{indexSetId:l}=(0,G.A)(),[i,a]=(0,e.useState)(!0),[u,r]=(0,e.useState)(null),{setIndexSetFieldTypeProfile:c,isLoading:p}=je(),{removeProfileFromIndex:m,isLoading:y}=ke(),{options:d,isLoading:I}=(0,we.A)(),E=(0,W.A)(),{pathname:C}=(0,j.A)(),g=(0,e.useMemo)(()=>(0,L.i)(C),[C]),R=(0,e.useCallback)(x=>{x.preventDefault(),c({indexSetId:l,rotated:i,profileId:u}).then(()=>{E(T.g.INDEX_SET_FIELD_TYPE_PROFILE.CHANGE_FOR_INDEX_CHANGED,{app_pathname:g,app_action_value:{value:"index-field-type-profile-changed",rotated:i}})}).then(()=>P.pG.get(l)).then(()=>n())},[c,l,i,u,E,g,n]),A=(0,e.useCallback)(()=>{m({indexSetId:l,rotated:i}).then(()=>{E(T.g.INDEX_SET_FIELD_TYPE_PROFILE.CHANGE_FOR_INDEX_CHANGED,{app_pathname:g,app_action_value:{value:"index-field-type-profile-removed",rotated:i}})}).then(()=>(n(),P.pG.get(l)))},[l,n,m,i,E,g]),h=(0,e.useCallback)(()=>{E(T.g.INDEX_SET_FIELD_TYPE_PROFILE.CHANGE_FOR_INDEX_CANCELED,{app_pathname:g,app_action_value:"removed-custom-field-type-closed"}),n()},[n,E,g]);(0,e.useEffect)(()=>{r(o),E(T.g.INDEX_SET_FIELD_TYPE_PROFILE.CHANGE_FOR_INDEX_OPENED,{app_pathname:g,app_action_value:"removed-custom-field-type-opened"})},[E,g,o]);const b=x=>r(x);return e.createElement(f.Modal,{onHide:h,show:t,"data-testid":"modal-form"},e.createElement("form",{onSubmit:R},e.createElement(f.Modal.Header,{closeButton:!0},e.createElement(f.Modal.Title,null,e.createElement("span",null,"Set Profile"))),e.createElement(f.Modal.Body,null,e.createElement("div",null,e.createElement(f.Input,{id:"index_set_profile",label:"Select profile"},e.createElement(Ke,{inputId:"index_set_profile",options:d,value:u,onChange:b,inputProps:{"aria-label":"Select index set profile"},placeholder:"Select index set profile",disabled:I,required:!0})),e.createElement(Je,null,"Select Rotation Strategy"),e.createElement("p",null,"To see and use new profile setting (changing or removal) for index set, you have to rotate indices. You can automatically rotate affected indices after submitting this form or do that manually later."),e.createElement(f.Input,{type:"checkbox",id:"rotate",name:"rotate",label:"Rotate affected indices after change",onChange:()=>a(x=>!x),checked:i}))),e.createElement(f.Modal.Footer,null,e.createElement(v.E6,{submitButtonText:"Set profile",submitLoadingText:"Set profile...",onCancel:n,submitButtonType:"submit",disabledSubmit:p||y,isSubmitting:p||y,leftCol:o&&e.createElement(f.Button,{onClick:A,disabled:p||y,bsStyle:"danger"},"Remove profile")}))))},_e=F.styled.div`
  display: flex;
  gap: 5px;
  align-items: center;
`,et=()=>{const{name:t,id:n,description:o}=Q(),[l,i]=(0,e.useState)(!1),a=()=>i(r=>!r),u=n?o:"Field type mapping profile not set yet";return e.createElement(_e,{title:u},e.createElement("b",null,"Field type mapping profile:"),n?e.createElement(H.N,{target:"_blank",to:D.Ay.SYSTEM.INDICES.FIELD_TYPE_PROFILES.edit(n)},t):e.createElement("i",null,"Not set"),e.createElement(v.K0,{name:"edit_square",onClick:a,title:"Set field type profile"}),l&&e.createElement(qe,{show:l,onClose:a,currentProfile:n}))};var ee=s("tnyWuV3Q"),tt=s("Z2BtcgLJ"),te=s("cB7h3AEX"),nt=s("/7OuCFNo");const lt=(0,F.styled)(te.A)`
  pointer-events: all;
`,ot=({indexSetId:t,selectedEntitiesData:n})=>{const{pushWithState:o}=(0,nt.A)(),l=(0,W.A)(),{pathname:i}=(0,j.A)(),a=(0,e.useMemo)(()=>(0,L.i)(i),[i]),[u,r]=(0,e.useState)(!1),c=Object.values(n).map(({fieldName:d,type:I})=>({field:d,type:I})),p=()=>r(d=>!d),m=(0,e.useCallback)(()=>{l(T.g.INDEX_SET_FIELD_TYPE_PROFILE.CREATE_PROFILE_FROM_SELECTED_RAN,{app_pathname:a,app_action_value:{value:"ran-create-profile-from-selected",selectedLength:c.length}}),o(D.Ay.SYSTEM.INDICES.FIELD_TYPE_PROFILES.CREATE,{customFieldMappings:c})},[c,o,l,a]),y=(0,e.useMemo)(()=>Object.values(n).filter(q).map(({fieldName:d})=>d),[n]);return e.createElement(e.Fragment,null,e.createElement(tt.A,null,e.createElement(e.Fragment,null,e.createElement(lt,{disabled:!y.length,onSelect:p},"Reset",!y.length&&"(overridden only)"),e.createElement(te.A,{onSelect:m},"Create new profile"))),u&&e.createElement(J,{show:!0,fields:y,onClose:p,indexSetIds:[t]}))},ne="index-set-field-types",U={pageSize:20,sort:{attributeId:"field_name",direction:"asc"},displayedColumns:["field_name","type","origin","is_reserved"],columnsOrder:["field_name","type","origin","is_reserved"]},it=(0,F.default)(v.In)(({theme:t,$value:n})=>(0,F.css)`
  color: ${n==="true"?t.colors.variant.success:t.colors.variant.danger};
  margin-right: 5px;
`),st=F.default.div`
  margin-bottom: 5px;
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
`,at=t=>!t.isReserved,rt={is_reserved:(t,n)=>e.createElement(e.Fragment,null,e.createElement(it,{name:t==="true"?"check_circle":"cancel",$value:t}),n),origin:(t,n)=>e.createElement(He,{title:n,origin:t})},dt=()=>{const{indexSetId:t}=(0,G.A)(),{indexSet:n}=(0,z.P)(P.zE),[o,l]=(0,e.useState)({}),[i,a]=(0,ve.A)(),[u,r]=(0,Z.useQueryParam)("query",Z.StringParam),{layoutConfig:c,isInitialLoading:p}=(0,ye.A)({entityTableId:ne,defaultPageSize:U.pageSize,defaultDisplayedAttributes:U.displayedColumns,defaultSort:U.sort}),m=(0,he.Ay)(void 0,c.pageSize,!1),y=(0,e.useMemo)(()=>({query:u,page:m.page,pageSize:c.pageSize,sort:c.sort,filters:i}),[m.page,c.pageSize,c.sort,u,i]),{mutate:d}=(0,ge.A)(ne),I=(0,e.useCallback)(S=>{m.resetPage(),d({perPage:S})},[m,d]),E=(0,e.useCallback)(S=>{m.resetPage(),d({sort:S})},[m,d]),C=(0,e.useCallback)(S=>{d({displayedAttributes:S})},[d]),{isLoading:g,data:{list:R,pagination:A,attributes:h},refetch:b}=Ee(t,y,{enabled:!p}),x=Ge(h),N=(0,e.useCallback)(S=>{var V;const B=(V=S==null?void 0:S[t])==null?void 0:V.fieldName;B&&o[B]&&l({...o,[B]:S[t]}),b()},[t,b,o]),le=(0,e.useMemo)(()=>(0,ee.A)(n),[n]),Et=(0,e.useCallback)(S=>e.createElement(be,{fieldType:S,indexSetId:t,onSubmitCallback:N}),[t,N]),ft=(0,e.useCallback)(S=>{m.resetPage(),r(S)},[m,r]),yt=(0,e.useCallback)(()=>r(""),[r]),gt=(0,e.useCallback)(S=>{m.resetPage(),a(S)},[m,a]),St=(0,e.useMemo)(()=>({onChangeSelection:S=>{l(V=>{const B=new Set(S),vt=re()(V,(oe,xt)=>B.has(xt)),ht=R.filter(({fieldName:oe})=>B.has(oe)),It=X()(ht,"id");return{...vt,...It}})},actions:e.createElement(ot,{indexSetId:t,selectedEntitiesData:o}),isEntitySelectable:at}),[t,R,o]);return p||g?e.createElement(v.y$,null):e.createElement(v.OW,{totalItems:A==null?void 0:A.total,pageSize:c.pageSize,showPageSizeSelect:!1},e.createElement(st,null,e.createElement(v.B9,{onSearch:ft,onReset:yt,query:u,placeholder:"Enter search query for the field name..."},e.createElement(Se.A,{attributes:h,urlQueryFilters:i,setUrlQueryFilters:gt,filterValueRenderers:rt})),le&&e.createElement(et,null)),(A==null?void 0:A.total)===0&&e.createElement(v.WE,null,"No fields have been found."),!!(R!=null&&R.length)&&e.createElement(fe.A,{data:R,visibleColumns:c.displayedAttributes,columnsOrder:U.columnsOrder,onColumnsChange:C,onSortChange:E,activeSort:c.sort,pageSize:y.pageSize,onPageSizeChange:I,actionsCellWidth:120,columnRenderers:x,columnDefinitions:h,rowActions:le&&Et,expandedSectionsRenderer:ze,bulkSelection:St}))},ct=({indexSetId:t})=>{const[n,o]=(0,e.useState)(!1),l=()=>o(i=>!i);return e.createElement(e.Fragment,null,e.createElement(f.Button,{bsStyle:"success",onClick:l},"Change field type"),n&&e.createElement(K.A,{initialSelectedIndexSets:[t],onClose:l,showFieldSelect:!0,show:!0,showSelectionTable:!1}))};var ut=s("+K2jZtwG"),mt=s("Zr9SSA9t");const pt=()=>{const{indexSetId:t}=(0,G.A)(),[n,o]=(0,e.useState)(!0),l=(0,ie.useNavigate)(),{indexSet:i}=(0,z.P)(P.zE),a=(0,ut.A)();(0,e.useEffect)(()=>{a?P.pG.get(t).then(()=>o(!1)):l(D.Ay.NOTFOUND)},[a,t,l]);const u=(0,e.useMemo)(()=>(0,ee.A)(i),[i]);return e.createElement(v.Qc,{title:`Index Set - ${i?i.title:""}`},e.createElement(mt.TC,null),e.createElement(v.zY,{title:`Configure ${i?i.title:"Index Set"} Field Types`,documentationLink:{title:"Index model documentation",path:se.A.PAGES.INDEX_MODEL},actions:u&&e.createElement(ct,{indexSetId:t})},e.createElement("span",null,"The data represents field types from 2 last indices and the fields with custom field type. You can modify the current field types configuration for this index set.")),e.createElement(f.Row,{className:"content"},e.createElement(f.Col,{md:12},n?e.createElement(v.y$,null):e.createElement(dt,null))))}}}]);})();

//# sourceMappingURL=bb8c8232-5861.4f0e1d7f83b638e05630.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy