assets.6205.0e0b27ac87e130a629ea.js Maven / Gradle / Ivy
"use strict";(self.webpackChunkopen_metadata=self.webpackChunkopen_metadata||[]).push([[6205],{3765:function(e,t,n){var a=n(8081),i=n.n(a),r=n(23645),s=n.n(r)()(i());s.push([e.id,'/*\n * Copyright 2023 Collate.\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/*\n * Copyright 2022 Collate.\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* navbar+tab_height+padding = 64+46+12 */\n.service-doc-panel {\n background: #fff;\n padding-bottom: 8px;\n}\n.service-doc-panel .toastui-editor-contents h1:first-child {\n padding-top: 8px !important;\n}\n.service-doc-panel .toastui-editor-contents > * {\n padding: 5px 35px !important;\n}\n',""]),t.Z=s},86879:function(e,t,n){n.d(t,{Z:function(){return k}});var a=n(70655),i=n(71230),r=n(15746),s=n(96486),o=n(67294),l=n(68432),c=n(16139),u=n(39117),d=n(73975),m=n(69523),p=n(24135),h=n(93379),f=n.n(h),g=n(7795),v=n.n(g),b=n(90569),y=n.n(b),E=n(3565),w=n.n(E),S=n(19216),L=n.n(S),C=n(44589),T=n.n(C),Z=n(3765),A={};A.styleTagTransform=T(),A.setAttributes=w(),A.insert=y().bind(null,"head"),A.domAPI=v(),A.insertStyleElement=L(),f()(Z.Z,A),Z.Z&&Z.Z.locals&&Z.Z.locals;var k=function(e){var t=e.serviceType,n=e.serviceName,h=e.activeField,f=e.isWorkflow,g=e.workflowType,v=(0,l.$)().i18n,b=(0,a.CR)((0,o.useState)(!1),2),y=b[0],E=b[1],w=(0,a.CR)((0,o.useState)(""),2),S=w[0],L=w[1],C=(0,o.useCallback)((function(e){var t;if(e){var n=e.split("/");if(c.JJ.test(e))return n[1];var a=null!==(t=(0,s.last)(n))&&void 0!==t?t:"";return c.X$.test(a)?(0,s.first)(a.split("_")):a}}),[]);return(0,o.useEffect)((function(){(0,a.mG)(void 0,void 0,void 0,(function(){var e,i,r,s,o,l,c;return(0,a.Jh)(this,(function(m){switch(m.label){case 0:E(!0),m.label=1;case 1:return m.trys.push([1,3,4,5]),e="",i=v.language===d.Qv.English,r=v.language+"/"+t+"/"+n+".md",s=d.Qv.English+"/"+t+"/"+n+".md",f&&g&&(r=v.language+"/"+t+"/workflows/"+g+".md",s=d.Qv.English+"/"+t+"/workflows/"+g+".md"),[4,Promise.allSettled([(0,u.bA)(r),i?Promise.reject(""):(0,u.bA)(s)])];case 2:return o=a.CR.apply(void 0,[m.sent(),2]),l=o[0],c=o[1],"fulfilled"===l.status&&(e=l.value),i||"fulfilled"!==c.status||(e=c.value),L(e),[3,5];case 3:return m.sent(),L(""),[3,5];case 4:return E(!1),[7];case 5:return[2]}}))}))}),[n,t]),(0,o.useEffect)((function(){var e=C(h);if(e){var t=document.querySelector('[data-id="'+e+'"]');t&&(t.scrollIntoView({block:"center",behavior:"smooth",inline:"center"}),t.setAttribute("data-highlighted","true"))}}),[h,C]),y?o.createElement(m.Z,null):o.createElement(i.Z,{"data-testid":"service-requirements"},o.createElement(r.Z,{span:24},o.createElement(p.Z,{enableSeeMoreVariant:!1,markdown:S})))}},96205:function(e,t,n){n.r(t);var a=n(70655),i=n(49409),r=n(71230),s=n(15746),o=n(71577),l=n(67294),c=n(68432),u=n(15137),d=n(79686),m=n(86879),p=n(26387),h=n(69523),f=n(96162),g=n(85071),v=n(53026),b=n(17309),y=n(75312),E=n(30996),w=n(96840),S=n(46321);t.default=function(){var e=(0,c.$)().t,t=(0,u.k6)(),n=(0,a.CR)(i.Z.useForm(),1)[0],L=(0,a.CR)((0,l.useState)(""),2),C=L[0],T=L[1],Z=(0,a.CR)((0,l.useState)(!1),2),A=Z[0],k=Z[1],I=(0,a.CR)((0,l.useState)(!1),2),N=I[0],U=I[1],P=(0,l.useMemo)((function(){return[{name:e("label.setting-plural"),url:(0,w.si)()},{name:e("label.custom-logo"),url:(0,w.si)(f.CZ.OPEN_METADATA,f.lx.CUSTOM_LOGO)},{name:e("label.edit-entity",{entity:e("label.custom-logo-configuration")}),url:""}]}),[]),O=[{name:"customLogoUrlPath",label:e("label.logo-url"),type:b.U.TEXT,required:!1,id:"root/customLogoUrlPath",props:{"data-testid":"customLogoUrlPath",autoFocus:!0},rules:[{type:"url",message:e("message.entity-is-not-valid-url",{entity:e("label.logo-url")})}]},{name:"customMonogramUrlPath",label:e("label.monogram-url"),type:b.U.TEXT,required:!1,id:"root/customMonogramUrlPath",props:{"data-testid":"customMonogramUrlPath"},rules:[{type:"url",message:e("message.entity-is-not-valid-url",{entity:e("label.monogram-url")})}]},{name:"customFaviconUrlPath",label:e("label.favicon-url"),type:b.U.TEXT,required:!1,id:"root/customFaviconUrlPath",props:{"data-testid":"customFaviconUrlPath"},rules:[{type:"url",message:e("message.entity-is-not-valid-url",{entity:e("label.favicon-url")})}]}],R=function(){return t.goBack()},F=l.createElement("div",{className:"max-width-md w-9/10 service-form-container"},l.createElement(p.Z,{titleLinks:P}),l.createElement(i.Z,{className:"m-t-md","data-testid":"custom-logo-config-form",form:n,layout:"vertical",onFinish:function(t){return(0,a.mG)(void 0,void 0,void 0,(function(){var n,i;return(0,a.Jh)(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,3,4]),U(!0),n={config_type:v.Sd.CustomLogoConfiguration,config_value:t},[4,(0,y.Br)(n)];case 1:return a.sent(),(0,S.XA)(e("server.update-entity-success",{entity:e("label.custom-logo-configuration")})),R(),[3,4];case 2:return i=a.sent(),(0,S.Eo)(i),[3,4];case 3:return U(!1),[7];case 4:return[2]}}))}))},onFocus:function(e){e.preventDefault(),e.stopPropagation(),T(e.target.id)}},(0,E.GL)(O),l.createElement(r.Z,{justify:"end"},l.createElement(s.Z,null,l.createElement(o.Z,{"data-testid":"cancel-button",type:"link",onClick:R},e("label.cancel"))),l.createElement(s.Z,null,l.createElement(o.Z,{"data-testid":"save-button",htmlType:"submit",loading:N,type:"primary"},e("label.save")))))),x=l.createElement(m.Z,{activeField:C,serviceName:g.QZ,serviceType:g.rn});return(0,l.useEffect)((function(){(0,a.mG)(void 0,void 0,void 0,(function(){var e,t,i;return(0,a.Jh)(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,3,4]),k(!0),[4,(0,y.nL)(v.Sd.CustomLogoConfiguration)];case 1:return e=r.sent().data,n.setFieldsValue((0,a.pi)({},null!==(i=e.config_value)&&void 0!==i?i:{})),[3,4];case 2:return t=r.sent(),(0,S.Eo)(t),[3,4];case 3:return k(!1),[7];case 4:return[2]}}))}))}),[]),A?l.createElement(h.Z,null):l.createElement(d.Z,{firstPanel:{children:F,minWidth:700,flex:.7},pageTitle:e("label.edit-entity",{entity:e("label.service")}),secondPanel:{children:x,className:"service-doc-panel",minWidth:60,overlay:{displayThreshold:200,header:e("label.setup-guide"),rotation:"counter-clockwise"}}})}}}]);
© 2015 - 2025 Weber Informatics LLC | Privacy Policy