skyline-console/skyline_console/static/configuration.bundle.1663167892.js
zhangjingwei 49dca85560 feat: update dist for rc1 release
1. Update dist for rc1 release
2. Update version in the package.json

Change-Id: Iaf7c0f5261f0e89b7a38acc1d2be5482bc2384a2
2022-09-14 23:08:02 +08:00

1 line
45 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{1349:function(e,t,a){"use strict";var r=a(19),n=a(21);r(t,"__esModule",{value:!0}),t.default=t.NeutronAgentStore=void 0;var i=n(a(48)),l=n(a(53));class u extends l.default{get client(){return i.default.neutron.agents}get listFilterByProject(){return!0}}t.NeutronAgentStore=u;var s=new u;t.default=s},1411:function(e,t,a){"use strict";var r=a(33),n=a(44),i=a(32),l=a(25),u=a(27),s=a(45),o=a(46),d=a(19),c=a(21);d(t,"__esModule",{value:!0}),t.default=t.ServiceStore=void 0;var f,v=c(a(57)),p=c(a(25)),m=c(a(36)),g=c(a(54)),h=a(34),b=c(a(48)),y=c(a(53));function _(e,t){var a=r(e);if(n){var u=n(e);t&&(u=i(u).call(u,(function(t){return l(e,t).enumerable}))),a.push.apply(a,u)}return a}function S(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)u(a=_(Object(r),!0)).call(a,(function(t){(0,m.default)(e,t,r[t])}));else if(s)o(e,s(r));else{var n;u(n=_(Object(r))).call(n,(function(t){d(e,t,l(r,t))}))}}return e}var x=(f=class extends y.default{get client(){return b.default.cinder.services}enable(e){return this.submitting(this.client.enable(e))}disable(e){return this.submitting(this.client.reason(e))}listDidFetch(e){return e.length?(0,v.default)(e).call(e,((e,t)=>S(S({},e),{},{id:t}))):e}},(0,g.default)(f.prototype,"enable",[h.action],(0,p.default)(f.prototype,"enable"),f.prototype),(0,g.default)(f.prototype,"disable",[h.action],(0,p.default)(f.prototype,"disable"),f.prototype),f);t.ServiceStore=x;var I=new x;t.default=I},1412:function(e,t,a){"use strict";var r=a(33),n=a(44),i=a(32),l=a(25),u=a(27),s=a(45),o=a(46),d=a(19),c=a(21);d(t,"__esModule",{value:!0}),t.default=t.NeutronAgentRouterStore=void 0;var f,v,p,m=c(a(57)),g=c(a(65)),h=c(a(51)),b=c(a(71)),y=c(a(36)),_=c(a(54)),S=(c(a(72)),c(a(91))),x=a(34),I=c(a(48)),w=c(a(53));function A(e,t){var a=r(e);if(n){var u=n(e);t&&(u=i(u).call(u,(function(t){return l(e,t).enumerable}))),a.push.apply(a,u)}return a}function C(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)u(a=A(Object(r),!0)).call(a,(function(t){(0,y.default)(e,t,r[t])}));else if(s)o(e,s(r));else{var n;u(n=A(Object(r))).call(n,(function(t){d(e,t,l(r,t))}))}}return e}var N=(f=class extends w.default{constructor(){super(...arguments),(0,y.default)(this,"getFatherResourceId",(e=>e.agentId)),(0,b.default)(this,"remove",v,this),(0,b.default)(this,"add",p,this)}get client(){return I.default.neutron.agents.l3Routers}get listFilterByProject(){return!0}get isSubResource(){return!0}get mapper(){return e=>{var{external_gateway_info:t,created_at:a}=e||{};return C(C({},e),{},{hasExternalGateway:!!t,externalNetworkId:t&&t.network_id||"",externalNetworkName:t&&t.network_name||"",externalFixedIps:t&&t.external_fixed_ips||[],standard_attr_id:a})}}listDidFetch(e,t,a){return(0,h.default)((function*(){var{agentId:t}=a;return(0,m.default)(e).call(e,(e=>C(C({},e),{},{agentId:t})))}))()}},v=(0,_.default)(f.prototype,"remove",[x.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return e=>{var{agentId:t,id:a}=e;return this.submitting(this.client.delete(t,a))}}}),p=(0,_.default)(f.prototype,"add",[x.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return(e,t)=>{var{agentId:a}=e;if(!(0,S.default)(t))return this.submitting(this.client.create(a,t));var r=(0,m.default)(t).call(t,(e=>this.client.create(a,e)));return this.submitting(g.default.allSettled(r))}}}),f);t.NeutronAgentRouterStore=N;var k=new N;t.default=k},1413:function(e,t,a){"use strict";var r=a(33),n=a(44),i=a(32),l=a(25),u=a(27),s=a(45),o=a(46),d=a(19),c=a(21);d(t,"__esModule",{value:!0}),t.default=t.NeutronAgentNetworkStore=void 0;var f,v,p,m=c(a(57)),g=c(a(65)),h=c(a(51)),b=c(a(71)),y=c(a(36)),_=c(a(54)),S=(c(a(72)),c(a(91))),x=a(34),I=c(a(48)),w=c(a(53));function A(e,t){var a=r(e);if(n){var u=n(e);t&&(u=i(u).call(u,(function(t){return l(e,t).enumerable}))),a.push.apply(a,u)}return a}function C(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)u(a=A(Object(r),!0)).call(a,(function(t){(0,y.default)(e,t,r[t])}));else if(s)o(e,s(r));else{var n;u(n=A(Object(r))).call(n,(function(t){d(e,t,l(r,t))}))}}return e}var N=(f=class extends w.default{constructor(){super(...arguments),(0,y.default)(this,"getFatherResourceId",(e=>e.agentId)),(0,b.default)(this,"remove",v,this),(0,b.default)(this,"add",p,this)}get client(){return I.default.neutron.agents.dhcpNetworks}get isSubResource(){return!0}get listFilterByProject(){return!0}get mapper(){return e=>{var{created_at:t}=e;return C(C({},e),{},{standard_attr_id:t})}}listDidFetch(e,t,a){return(0,h.default)((function*(){var{agentId:t}=a;return(0,m.default)(e).call(e,(e=>C(C({},e),{},{agentId:t})))}))()}},v=(0,_.default)(f.prototype,"remove",[x.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return e=>{var{agentId:t,id:a}=e;return this.submitting(this.client.delete(t,a))}}}),p=(0,_.default)(f.prototype,"add",[x.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return(e,t)=>{var{agentId:a}=e;if(!(0,S.default)(t))return this.submitting(this.client.create(a,t));var r=(0,m.default)(t).call(t,(e=>this.client.create(a,e)));return this.submitting(g.default.allSettled(r))}}}),f);t.NeutronAgentNetworkStore=N;var k=new N;t.default=k},1600:function(e,t,a){"use strict";var r=a(19),n=a(21);r(t,"__esModule",{value:!0}),t.default=void 0;var i=n(a(3977)),l=n(a(3978)),u={rowActions:{firstAction:null,moreActions:[{action:i.default},{action:l.default}]},batchActions:[],primaryActions:[]};t.default=u},1601:function(e,t,a){"use strict";var r=a(19),n=a(21);r(t,"__esModule",{value:!0}),t.default=void 0;var i=n(a(3997)),l=n(a(3998)),u=n(a(3999)),s=n(a(4e3)),o={rowActions:{firstAction:u.default,moreActions:[{action:s.default},{action:l.default}]},batchActions:[l.default],primaryActions:[i.default]};t.default=o},3964:function(e,t,a){"use strict";var r=a(19),n=a(21);r(t,"__esModule",{value:!0}),t.default=void 0;var i=n(a(413)),l=n(a(3965)),u=e=>(0,i.default)(l.default,e);t.default=u},3965:function(e,t,a){"use strict";var r=a(19),n=a(21);r(t,"__esModule",{value:!0}),t.default=void 0;var i=n(a(1212)),l=n(a(567)),u=n(a(3966)),s=n(a(3981)),o=n(a(3986)),d=n(a(3996)),c=n(a(4001)),f="/configuration-admin",v=[{path:f,component:i.default,routes:[{path:"".concat(f,"/info"),component:u.default,exact:!0},{path:"".concat(f,"/neutron/detail/:id"),component:o.default,exact:!0},{path:"".concat(f,"/setting"),component:s.default,exact:!0},{path:"".concat(f,"/metadata"),component:d.default,exact:!0},{path:"".concat(f,"/metadata/detail/:id"),component:c.default,exact:!0},{path:"*",component:l.default}]}];t.default=v},3966:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=a.Service=void 0;var l=r(406),u=i(r(1234)),s=i(r(3967)),o=i(r(3968)),d=i(r(3972)),c=i(r(3976)),f=i(r(3979));class v extends u.default{get enableCinder(){return this.props.rootStore.checkEndpoint("cinder")}get enableHeat(){return this.props.rootStore.checkEndpoint("heat")}get tabs(){var e=[{title:t("Services"),key:"catalog",component:s.default},{title:t("Compute Services"),key:"computeServices",component:o.default},{title:t("Neutron Agents"),key:"neutronAgent",component:c.default}];return this.enableCinder&&e.push({title:t("Block Storage Services"),key:"cinderService",component:d.default}),this.enableHeat&&e.push({title:t("Orchestration Services"),key:"heatService",component:f.default}),e}}a.Service=v;var p=(0,l.inject)("rootStore")((0,l.observer)(v));a.default=p},3967:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=a.Catalog=void 0;var l=i(r(57)),u=i(r(81)),s=i(r(36)),o=i(r(0)),d=r(406),c=i(r(1194)),f=r(161),v=i(r(1511));class p extends c.default{constructor(){super(...arguments),(0,s.default)(this,"getColumns",(()=>[{title:t("Name"),dataIndex:"name",width:150},{title:t("Service"),dataIndex:"type",isHideable:!0,width:150},{title:t("Region"),dataIndex:"region",isHideable:!0,width:150},{title:t("Endpoints"),dataIndex:"endpoints",isHideable:!0,render:e=>e.length?(0,l.default)(e).call(e,(e=>o.default.createElement("div",{key:"endpoint-".concat((0,f.generateId)())},o.default.createElement("b",null,e.interface,": "),o.default.createElement("span",null,e.url)))):"-",stringify:e=>e.length?(0,l.default)(e).call(e,(e=>{var t;return(0,u.default)(t="".concat(e.interface,": ")).call(t,e.url)})).join("\n"):"-"}]))}init(){this.store=v.default}get policy(){return"identity:get_auth_catalog"}get name(){return t("services")}get hasTab(){return!0}get searchFilters(){return[]}}a.Catalog=p;var m=(0,d.inject)("rootStore")((0,d.observer)(p));a.default=m},3968:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=a.ComputeService=void 0;var l=i(r(81)),u=i(r(36)),s=r(406),o=i(r(1194)),d=r(1254),c=r(583),f=r(161),v=i(r(3969));class p extends o.default{constructor(){super(...arguments),(0,u.default)(this,"getColumns",(()=>[{title:t("Name"),dataIndex:"binary"},{title:t("Host"),dataIndex:"host",isHideable:!0},{title:t("Availability Zone"),dataIndex:"zone",isHideable:!0},{title:t("Service Status"),dataIndex:"status",valueMap:d.serviceStatus,tip:(e,a)=>{var r,{disabled_reason:n}=a||{};return n?(0,l.default)(r="".concat(t("Reason: ")," ")).call(r,n):""}},{title:t("Service State"),dataIndex:"state",valueMap:d.serviceState},{title:t("Last Updated"),dataIndex:"updated_at",isHideable:!0,valueRender:"sinceTime"}]))}init(){this.store=new c.ComputeHostStore}get policy(){return"os_compute_api:os-services:list"}get name(){return t("compute services")}get hasTab(){return!0}get actionConfigs(){return v.default}get fetchDataByAllProjects(){return!1}get searchFilters(){return[{label:t("Name"),name:"binary"},{label:t("Service Status"),name:"status",options:(0,f.getOptions)(d.serviceStatus)},{label:t("Service State"),name:"state",options:(0,f.getOptions)(d.serviceState)}]}}a.ComputeService=p;var m=(0,s.inject)("rootStore")((0,s.observer)(p));a.default=m},3969:function(e,t,a){"use strict";var r=a(19),n=a(21);r(t,"__esModule",{value:!0}),t.default=void 0;var i=n(a(3970)),l=n(a(3971)),u={rowActions:{moreActions:[{action:i.default},{action:l.default}]},batchActions:[],primaryActions:[]};t.default=u},3970:function(e,a,r){"use strict";var n=r(33),i=r(44),l=r(32),u=r(25),s=r(27),o=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=a.DisableAction=void 0;var v=f(r(1204)),p=f(r(65)),m=f(r(36)),g=r(406),h=f(r(583)),b=r(1193);function y(e,t){var a=n(e);if(i){var r=i(e);t&&(r=l(r).call(r,(function(t){return u(e,t).enumerable}))),a.push.apply(a,r)}return a}function _(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)s(a=y(Object(r),!0)).call(a,(function(t){(0,m.default)(e,t,r[t])}));else if(o)d(e,o(r));else{var n;s(n=y(Object(r))).call(n,(function(t){c(e,t,u(r,t))}))}}return e}class S extends b.ModalAction{constructor(){super(...arguments),(0,m.default)(this,"onSubmit",(e=>{var{binary:t,id:a}=this.item,r=_(_({},e),{},{binary:t,id:a});return h.default.disable(r)}))}init(){this.store=h.default}get name(){return t("disable compute service")}get instanceName(){return this.item.binary||(0,v.default)(this).binary}get defaultValue(){var{host:e,binary:t}=this.item;return{host:e,binary:t}}get formItems(){return[{name:"binary",label:t("Compute Service"),type:"label",iconType:"instance"},{name:"host",label:t("Current Host"),type:"label",iconType:"host"},{name:"disabled_reason",label:t("Reason"),type:"textarea",maxLength:64}]}}a.DisableAction=S,(0,m.default)(S,"id","disable-host"),(0,m.default)(S,"title",t("Disable Compute Service")),(0,m.default)(S,"buttonText",t("Disable")),(0,m.default)(S,"isDanger",!0),(0,m.default)(S,"allowed",(e=>p.default.resolve("enabled"===e.status&&"nova-compute"===e.binary))),(0,m.default)(S,"policy","os_compute_api:os-services:update");var x=(0,g.inject)("rootStore")((0,g.observer)(S));a.default=x},3971:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=void 0;var l=i(r(36)),u=r(1193),s=i(r(583));class o extends u.ConfirmAction{constructor(){super(...arguments),(0,l.default)(this,"getItemName",(e=>e.host)),(0,l.default)(this,"policy","os_compute_api:os-services:update"),(0,l.default)(this,"allowedCheckFunc",(e=>!e||"disabled"===e.status)),(0,l.default)(this,"onSubmit",(()=>{var{id:e}=this.item;return s.default.enable({id:e})}))}get id(){return"enable-service"}get title(){return t("Enable Compute Service")}get buttonText(){return t("Enable")}get actionName(){return t("enable compute service")}}a.default=o},3972:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=a.CinderService=void 0;var l=i(r(81)),u=i(r(36)),s=r(406),o=i(r(1194)),d=r(1254),c=i(r(1411)),f=r(161),v=i(r(3973));class p extends o.default{constructor(){super(...arguments),(0,u.default)(this,"getColumns",(()=>[{title:t("Name"),dataIndex:"binary"},{title:t("Host"),dataIndex:"host",isHideable:!0},{title:t("Availability Zone"),dataIndex:"zone",isHideable:!0},{title:t("Service Status"),dataIndex:"status",valueMap:d.serviceStatus,tip:(e,a)=>{if("enabled"===e)return"";var r,{disabled_reason:n}=a||{};return n?(0,l.default)(r="".concat(t("Reason: ")," ")).call(r,n):""}},{title:t("Service State"),dataIndex:"state",valueMap:d.serviceState},{title:t("Last Updated"),dataIndex:"updated_at",isHideable:!0,valueRender:"sinceTime"}]))}init(){this.store=c.default}get policy(){return"volume_extension:services:index"}get name(){return t("cinder services")}get hasTab(){return!0}get actionConfigs(){return v.default}get searchFilters(){return[{label:t("Name"),name:"binary"},{label:t("Service Status"),name:"status",options:(0,f.getOptions)(d.serviceStatus)},{label:t("Service State"),name:"state",options:(0,f.getOptions)(d.serviceState)}]}}a.CinderService=p;var m=(0,s.inject)("rootStore")((0,s.observer)(p));a.default=m},3973:function(e,t,a){"use strict";var r=a(19),n=a(21);r(t,"__esModule",{value:!0}),t.default=void 0;var i=n(a(3974)),l=n(a(3975)),u={rowActions:{firstAction:null,moreActions:[{action:i.default},{action:l.default}]},batchActions:[],primaryActions:[]};t.default=u},3974:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=void 0;var l=i(r(36)),u=r(1193),s=i(r(1411));class o extends u.ConfirmAction{constructor(){super(...arguments),(0,l.default)(this,"getItemName",(e=>e.binary)),(0,l.default)(this,"policy","volume_extension:services:update"),(0,l.default)(this,"allowedCheckFunc",(e=>!e||this.canEnable(e))),(0,l.default)(this,"onSubmit",(e=>{var{host:t,binary:a}=e||this.item,r={host:t,binary:a};return s.default.enable(r)}))}get id(){return"enable"}get title(){return t("Enable Service")}get buttonText(){return t("Enable")}get actionName(){return t("enable cinder service")}canEnable(e){return"disabled"===e.status}}a.default=o},3975:function(e,a,r){"use strict";var n=r(33),i=r(44),l=r(32),u=r(25),s=r(27),o=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=a.DisableAction=void 0;var v=f(r(1204)),p=f(r(65)),m=f(r(36)),g=r(406),h=f(r(1411)),b=r(1193);function y(e,t){var a=n(e);if(i){var r=i(e);t&&(r=l(r).call(r,(function(t){return u(e,t).enumerable}))),a.push.apply(a,r)}return a}function _(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)s(a=y(Object(r),!0)).call(a,(function(t){(0,m.default)(e,t,r[t])}));else if(o)d(e,o(r));else{var n;s(n=y(Object(r))).call(n,(function(t){c(e,t,u(r,t))}))}}return e}class S extends b.ModalAction{constructor(){super(...arguments),(0,m.default)(this,"onSubmit",(e=>{var{binary:t,host:a}=this.item,r=_(_({},e),{},{binary:t,host:a});return h.default.disable(r)}))}init(){this.store=h.default}get name(){return t("disable cinder service")}get instanceName(){return this.item.binary||(0,v.default)(this).binary}get defaultValue(){var{host:e,binary:t}=this.item;return{host:e,binary:t}}get formItems(){return[{name:"binary",label:t("Cinder Service"),type:"label",iconType:"volume"},{name:"host",label:t("Host"),type:"label",iconType:"host"},{name:"disabled_reason",label:t("Reason"),type:"textarea",required:!0,maxLength:200}]}}a.DisableAction=S,(0,m.default)(S,"id","disable-service"),(0,m.default)(S,"title",t("Disable Cinder Service")),(0,m.default)(S,"buttonText",t("Disable")),(0,m.default)(S,"isDanger",!0),(0,m.default)(S,"allowed",(e=>p.default.resolve("enabled"===e.status))),(0,m.default)(S,"policy","volume_extension:services:update");var x=(0,g.inject)("rootStore")((0,g.observer)(S));a.default=x},3976:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=a.NeutronAgent=void 0;var l=i(r(57)),u=i(r(36)),s=r(406),o=i(r(1194)),d=r(1254),c=i(r(1349)),f=i(r(1600));class v extends o.default{constructor(){super(...arguments),(0,u.default)(this,"getColumns",(()=>[{title:t("ID/Name"),dataIndex:"binary",isLink:!0,routeName:"neutronAgentDetailAdmin"},{title:t("Type"),dataIndex:"agent_type",isHideable:!0},{title:t("Host"),dataIndex:"host",isHideable:!0},{title:t("Availability Zone"),dataIndex:"availability_zone",render:e=>e||"-"},{title:t("Service Status"),dataIndex:"admin_state_up",render:e=>(0,d.getNeutronAgentServiceStatus)(e)||"-"},{title:t("Service State"),dataIndex:"alive",render:e=>(0,d.getNeutronAgentServiceState)(e)||"-",isStatus:!0},{title:t("Last Updated"),dataIndex:"heartbeat_timestamp",isHideable:!0,valueRender:"sinceTime"}]))}init(){this.store=c.default}get policy(){return"get_agent"}get name(){return t("neutron agents")}get hasTab(){return!0}get actionConfigs(){return f.default}get searchFilters(){var e,a;return[{label:t("Name"),name:"binary"},{label:t("Service Status"),name:"admin_state_up",options:(0,l.default)(e=[!0,!1]).call(e,(e=>({label:(0,d.getNeutronAgentServiceStatus)(e),key:e})))},{label:t("Service State"),name:"alive",options:(0,l.default)(a=[!0,!1]).call(a,(e=>({label:(0,d.getNeutronAgentServiceState)(e),key:e})))}]}}a.NeutronAgent=v;var p=(0,s.inject)("rootStore")((0,s.observer)(v));a.default=p},3977:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=void 0;var l=i(r(36)),u=r(1193),s=i(r(1349));class o extends u.ConfirmAction{constructor(){super(...arguments),(0,l.default)(this,"getItemName",(e=>e.binary)),(0,l.default)(this,"policy","update_agent"),(0,l.default)(this,"allowedCheckFunc",(e=>!e||this.canEnable(e))),(0,l.default)(this,"onSubmit",(e=>{var{id:t}=e||this.item;return s.default.edit({id:t},{admin_state_up:!0})}))}get id(){return"enable"}get title(){return t("Enable Neutron Agent")}get buttonText(){return t("Enable")}get actionName(){return t("enable neutron agent")}canEnable(e){return!1===e.admin_state_up}}a.default=o},3978:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=void 0;var l=i(r(36)),u=r(1193),s=i(r(1349));class o extends u.ConfirmAction{constructor(){super(...arguments),(0,l.default)(this,"getItemName",(e=>e.binary)),(0,l.default)(this,"policy","update_agent"),(0,l.default)(this,"allowedCheckFunc",(e=>!e||this.canDisable(e))),(0,l.default)(this,"onSubmit",(e=>{var{id:t}=e||this.item;return s.default.edit({id:t},{admin_state_up:!1})}))}get id(){return"disable"}get title(){return t("Disable Neutron Agent")}get isDanger(){return!0}get buttonText(){return t("Disable")}get actionName(){return t("disable neutron agent")}canDisable(e){return!0===e.admin_state_up}}a.default=o},3979:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=a.HeatService=void 0;var l=i(r(36)),u=r(406),s=i(r(1194)),o=r(1254),d=r(161),c=i(r(3980));class f extends s.default{constructor(){super(...arguments),(0,l.default)(this,"getColumns",(()=>[{title:t("Name"),dataIndex:"binary"},{title:t("Engine ID"),dataIndex:"engine_id",isHideable:!0},{title:t("Host"),dataIndex:"host",isHideable:!0},{title:t("Status"),dataIndex:"status",valueMap:o.serviceState},{title:t("Last Updated"),dataIndex:"updated_at",isHideable:!0,valueRender:"sinceTime"}]))}init(){this.store=c.default}get policy(){return"service:index"}get aliasPolicy(){return"heat:service:index"}get name(){return t("heat services")}get hasTab(){return!0}get searchFilters(){return[{label:t("Name"),name:"binary"},{label:t("Status"),name:"status",options:(0,d.getOptions)(o.serviceState)}]}}a.HeatService=f;var v=(0,u.inject)("rootStore")((0,u.observer)(f));a.default=v},3980:function(e,t,a){"use strict";var r=a(19),n=a(21);r(t,"__esModule",{value:!0}),t.default=t.HeatServiceStore=void 0;var i=n(a(48)),l=n(a(53));class u extends l.default{get client(){return i.default.heat.services}}t.HeatServiceStore=u;var s=new u;t.default=s},3981:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=a.Setting=void 0;var l=i(r(36)),u=r(406),s=i(r(1194)),o=i(r(1276)),d=r(1203),c=i(r(3982));class f extends s.default{constructor(){super(...arguments),(0,l.default)(this,"getColumns",(()=>[{title:t("Type"),dataIndex:"key"},{title:t("Effective Mode"),dataIndex:"restart_service",titleTip:t("Effective mode after configuration changes"),render:e=>e?t("Take effect after restart"):t("Immediate effect")}]))}init(){this.store=o.default}get policy(){return d.onlyAdminCanReadPolicy}get name(){return t("settings")}get rowKey(){return"key"}get hideCustom(){return!0}get actionConfigs(){return c.default}get searchFilters(){return[]}}a.Setting=f;var v=(0,u.inject)("rootStore")((0,u.observer)(f));a.default=v},3982:function(e,t,a){"use strict";var r=a(19),n=a(21);r(t,"__esModule",{value:!0}),t.default=void 0;var i=n(a(3983)),l=n(a(3984)),u=n(a(3985)),s={rowActions:{firstAction:i.default,moreActions:[{action:l.default},{action:u.default}]},batchActions:[u.default],primaryActions:[]};t.default=s},3983:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=a.View=void 0;var l=i(r(65)),u=i(r(36)),s=i(r(0)),o=r(1193),d=r(406),c=r(1203),f=i(r(1316));class v extends o.ModalAction{constructor(){super(...arguments),(0,u.default)(this,"renderContent",(()=>{var e={value:this.item.value,mode:"json",options:{readOnly:!0}};return s.default.createElement(f.default,e)})),(0,u.default)(this,"onSubmit",null)}get id(){return"view"}get name(){return t("View")}get instanceName(){return this.item.key}static allowed(){return l.default.resolve(!0)}get defaultValue(){var{key:e}=this.item;return{key:e}}get labelCol(){return{xs:{span:4},sm:{span:4}}}get wrapperCol(){return{xs:{span:20},sm:{span:20}}}get formItems(){return[{name:"key",type:"label",label:t("Name")},{name:"value",type:"other",label:t("Value"),content:this.renderContent()}]}}a.View=v,(0,u.default)(v,"title",t("View Detail")),(0,u.default)(v,"readOnly",!0),(0,u.default)(v,"enableSystemReader",!0),(0,u.default)(v,"policy",c.onlyAdminCanReadPolicy);var p=(0,d.inject)("rootStore")((0,d.observer)(v));a.default=p},3984:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=a.Edit=void 0;var l=i(r(65)),u=i(r(335)),s=i(r(36)),o=i(r(0)),d=r(1193),c=i(r(1276)),f=i(r(1316)),v=r(406),p=r(1203);class m extends d.ModalAction{constructor(){super(...arguments),(0,s.default)(this,"onChange",(e=>{var t={};try{t=JSON.parse(e)}catch(e){t=this.item.value}this.setState({value:t,inputValue:e})})),(0,s.default)(this,"renderContent",(()=>{var e={value:this.item.value,mode:"json",onChange:this.onChange};return o.default.createElement(f.default,e)})),(0,s.default)(this,"checkKeyValues",(()=>{var{inputValue:e}=this.state;try{return JSON.parse(e),!0}catch(e){return!1}})),(0,s.default)(this,"onSubmit",(()=>{var{key:e}=this.item,{value:t}=this.state,a={key:e,value:t};return c.default.update(a)}))}get id(){return"edit"}get instanceName(){return this.item.key}static allowed(){return l.default.resolve(!0)}init(){this.state.value=this.item.value,this.state.inputValue=(0,u.default)(this.item.value)}get defaultValue(){var{key:e}=this.item;return{key:e}}get labelCol(){return{xs:{span:4},sm:{span:4}}}get wrapperCol(){return{xs:{span:20},sm:{span:20}}}get formItems(){return[{name:"key",type:"label",label:t("Name")},{name:"value",type:"other",label:t("Value"),content:this.renderContent(),validator:()=>this.checkKeyValues()?l.default.resolve():l.default.reject(t("Please enter JSON in the correct format!"))}]}}a.Edit=m,(0,s.default)(m,"policy",p.onlyAdminCanChangePolicy);var g=(0,v.inject)("rootStore")((0,v.observer)(m));a.default=g},3985:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=void 0;var l=i(r(36)),u=r(1193),s=i(r(1276)),o=r(1203);class d extends u.ConfirmAction{constructor(){super(...arguments),(0,l.default)(this,"getItemName",(e=>e.key)),(0,l.default)(this,"policy",o.onlyAdminCanChangePolicy),(0,l.default)(this,"onSubmit",(e=>{var{key:t}=e||this.item;return s.default.delete({id:t})}))}get id(){return"reset"}get title(){return t("Reset To Initial Value")}get buttonType(){return"primary"}get isDanger(){return!0}get actionName(){return t("Reset To Initial Value")}}a.default=d},3986:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=a.KeypairDetail=void 0;var l=r(406),u=r(1349),s=i(r(1200)),o=r(1254),d=i(r(3987)),c=i(r(3988)),f=i(r(3992)),v=i(r(1600));class p extends s.default{get name(){return t("neutron agent")}get policy(){return"get_agent"}get listUrl(){return this.getRoutePath("systemInfo",null,{tab:"neutronAgent"})}get actionConfigs(){return v.default}get detailInfos(){return[{title:t("Type"),dataIndex:"agent_type"},{title:t("Service Status"),dataIndex:"admin_state_up",render:e=>(0,o.getNeutronAgentServiceStatus)(e)||"-"},{title:t("Service State"),dataIndex:"alive",render:e=>(0,o.getNeutronAgentServiceState)(e)||"-"},{title:t("Host"),dataIndex:"host"},{title:t("Availability Zone"),dataIndex:"availability_zone"},{title:t("Created At"),dataIndex:"created_at"},{title:t("Description"),dataIndex:"description"}]}get tabs(){var e=[{title:t("Detail"),key:"detail",component:d.default}];return"L3 agent"===this.detailData.agent_type?e.push({title:t("Routers"),key:"router",component:c.default}):"DHCP agent"===this.detailData.agent_type&&e.push({title:t("Networks"),key:"network",component:f.default}),e}init(){this.store=new u.NeutronAgentStore}}a.KeypairDetail=p;var m=(0,l.inject)("rootStore")((0,l.observer)(p));a.default=m},3987:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=a.BaseDetail=void 0;var l=i(r(335)),u=i(r(0)),s=r(406),o=i(r(1202));class d extends o.default{get leftCards(){return[this.baseCard]}get rightCards(){return[this.configCard]}get baseCard(){var e=[{label:t("Name"),dataIndex:"binary"},{label:t("Topic"),dataIndex:"topic"},{label:t("Resources Synced"),dataIndex:"resources_synced"},{label:t("Heartbeat Timestamp"),dataIndex:"heartbeat_timestamp",valueRender:"toLocalTime"},{label:t("Started At"),dataIndex:"started_at"}];return{title:t("Base Info"),options:e}}get configCard(){var{configurations:e="{}"}=this.detailData||{},a=[{label:"",content:u.default.createElement("div",null,u.default.createElement("pre",null,(0,l.default)(e,null,4)))}];return{labelCol:0,title:t("Configuration"),options:a}}}a.BaseDetail=d;var c=(0,s.inject)("rootStore")((0,s.observer)(d));a.default=c},3988:function(e,a,r){"use strict";var n=r(33),i=r(44),l=r(32),u=r(25),s=r(27),o=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=a.Router=void 0;var v=f(r(62)),p=f(r(36)),m=r(406),g=f(r(1194)),h=r(1219),b=r(1412),y=f(r(3989));function _(e,t){var a=n(e);if(i){var r=i(e);t&&(r=l(r).call(r,(function(t){return u(e,t).enumerable}))),a.push.apply(a,r)}return a}class S extends g.default{constructor(){super(...arguments),(0,p.default)(this,"getColumns",(()=>(0,h.getRouterColumns)(this))),(0,p.default)(this,"updateFetchParams",(e=>{var{id:t}=e;return function(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)s(a=_(Object(r),!0)).call(a,(function(t){(0,p.default)(e,t,r[t])}));else if(o)d(e,o(r));else{var n;s(n=_(Object(r))).call(n,(function(t){c(e,t,u(r,t))}))}}return e}({agentId:t},(0,v.default)(e,["id"]))}))}init(){this.store=new b.NeutronAgentRouterStore}get policy(){return"get_l3-routers"}get name(){return t("routers")}get actionConfigs(){return y.default}get isFilterByBackend(){return!1}get searchFilters(){return h.routerFilters}get adminPageHasProjectFilter(){return!0}}a.Router=S;var x=(0,m.inject)("rootStore")((0,m.observer)(S));a.default=x},3989:function(e,t,a){"use strict";var r=a(19),n=a(21);r(t,"__esModule",{value:!0}),t.default=void 0;var i=n(a(3990)),l=n(a(3991)),u={rowActions:{firstAction:l.default,moreActions:[]},primaryActions:[i.default],batchActions:[l.default]};t.default=u},3990:function(e,a,r){"use strict";var n=r(33),i=r(44),l=r(32),u=r(25),s=r(27),o=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=a.AddRouter=void 0;var v=f(r(90)),p=f(r(57)),m=f(r(1204)),g=f(r(65)),h=f(r(51)),b=f(r(36)),y=r(406),_=r(568),S=f(r(1412)),x=r(1193),I=r(1219),w=r(578);function A(e,t){var a=n(e);if(i){var r=i(e);t&&(r=l(r).call(r,(function(t){return u(e,t).enumerable}))),a.push.apply(a,r)}return a}function C(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)s(a=A(Object(r),!0)).call(a,(function(t){(0,b.default)(e,t,r[t])}));else if(o)d(e,o(r));else{var n;s(n=A(Object(r))).call(n,(function(t){c(e,t,u(r,t))}))}}return e}class N extends x.ModalAction{constructor(){super(...arguments),(0,b.default)(this,"disabledFunc",(e=>{var t,{id:a}=e;return(0,v.default)(t=this.l3Routes).call(t,a)>=0})),(0,b.default)(this,"onSubmit",(e=>{var{router:{selectedRowKeys:t=[]}={}}=e,a=(0,p.default)(t).call(t,(e=>({router_id:e}))),{agentId:r}=this;return this.store.add({agentId:r},a)}))}init(){this.store=S.default,this.routerStore=new _.RouterStore,this.getL3Routes()}static get modalSize(){return"large"}getModalSize(){return"large"}get name(){return t("add router")}get instanceName(){var{router:{selectedRows:e=[]}={}}=(0,m.default)(this);return(0,p.default)(e).call(e,(e=>e.name)).join(", ")}get detail(){var{detail:e={}}=this.containerProps;return e}get agentId(){return this.detail.id}getL3Routes(){var e=this;return(0,h.default)((function*(){var{agentId:t}=e;t&&(yield e.store.fetchList({agentId:t,all_projects:!0}),e.updateDefaultValue())}))()}get l3Routes(){var e;return(0,p.default)(e=this.store.list.data||[]).call(e,(e=>e.id))}get defaultValue(){var{binary:e}=this.detail;return{binary:e}}getColumns(){var e=(0,I.getRouterColumns)(this);return e[0].render=null,e[1].render=w.projectRender,e}getFilters(){return[...I.routerFilters,{label:t("Project ID"),name:"project_id"}]}get formItems(){return[{name:"binary",label:t("Name"),type:"label",iconType:"host"},C({name:"router",label:t("Router"),type:"select-table",backendPageStore:this.routerStore,disabledFunc:this.disabledFunc,extraParams:{all_projects:!0},required:!0,isMulti:!0,filterParams:this.getFilters(),columns:this.getColumns()},I.routerSortProps)]}}a.AddRouter=N,(0,b.default)(N,"id","add-router"),(0,b.default)(N,"title",t("Add Router")),(0,b.default)(N,"policy","create_l3-router"),(0,b.default)(N,"allowed",(()=>g.default.resolve(!0)));var k=(0,y.inject)("rootStore")((0,y.observer)(N));a.default=k},3991:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=void 0;var l=i(r(36)),u=r(1193),s=i(r(1412));class o extends u.ConfirmAction{constructor(){super(...arguments),(0,l.default)(this,"policy","delete_l3-router"),(0,l.default)(this,"onSubmit",(e=>{var{id:t,agentId:a}=e;return s.default.remove({id:t,agentId:a})}))}get id(){return"remove"}get title(){return t("Remove Router")}get isDanger(){return!0}get buttonText(){return t("Remove")}get actionName(){return t("remove router")}}a.default=o},3992:function(e,a,r){"use strict";var n=r(33),i=r(44),l=r(32),u=r(25),s=r(27),o=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=a.Networks=void 0;var v=f(r(562)),p=f(r(62)),m=f(r(36)),g=r(406),h=f(r(1194)),b=r(564),y=r(1413),_=r(334),S=f(r(3993));function x(e,t){var a=n(e);if(i){var r=i(e);t&&(r=l(r).call(r,(function(t){return u(e,t).enumerable}))),a.push.apply(a,r)}return a}class I extends h.default{constructor(){super(...arguments),(0,m.default)(this,"getColumns",(()=>{var e=(0,b.networkColumns)(this);return(0,v.default)(e).call(e,1,0,{title:t("Project ID/Name"),dataIndex:"project_name",isHideable:!0}),e})),(0,m.default)(this,"updateFetchParams",(e=>{var{id:t}=e;return function(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)s(a=x(Object(r),!0)).call(a,(function(t){(0,m.default)(e,t,r[t])}));else if(o)d(e,o(r));else{var n;s(n=x(Object(r))).call(n,(function(t){c(e,t,u(r,t))}))}}return e}({agentId:t},(0,p.default)(e,["id"]))}))}init(){this.store=new y.NeutronAgentNetworkStore}get policy(){return"get_dhcp-networks"}get name(){return t("networks")}get actionConfigs(){return S.default}get adminPageHasProjectFilter(){return!0}get searchFilters(){return[{label:t("Name"),name:"name"},{label:t("Shared"),name:"shared",options:_.yesNoOptions},{label:t("External"),name:"router:external",options:_.yesNoOptions}]}}a.Networks=I;var w=(0,g.inject)("rootStore")((0,g.observer)(I));a.default=w},3993:function(e,t,a){"use strict";var r=a(19),n=a(21);r(t,"__esModule",{value:!0}),t.default=void 0;var i=n(a(3994)),l=n(a(3995)),u={rowActions:{firstAction:l.default,moreActions:[]},primaryActions:[i.default],batchActions:[l.default]};t.default=u},3994:function(e,a,r){"use strict";var n=r(33),i=r(44),l=r(32),u=r(25),s=r(27),o=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=a.AddNetwork=void 0;var v=f(r(198)),p=f(r(562)),m=f(r(57)),g=f(r(1204)),h=f(r(65)),b=f(r(51)),y=f(r(36)),_=r(406),S=r(228),x=f(r(1413)),I=r(1193),w=r(564),A=r(334),C=r(578);function N(e,t){var a=n(e);if(i){var r=i(e);t&&(r=l(r).call(r,(function(t){return u(e,t).enumerable}))),a.push.apply(a,r)}return a}function k(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)s(a=N(Object(r),!0)).call(a,(function(t){(0,y.default)(e,t,r[t])}));else if(o)d(e,o(r));else{var n;s(n=N(Object(r))).call(n,(function(t){c(e,t,u(r,t))}))}}return e}class M extends I.ModalAction{constructor(){super(...arguments),(0,y.default)(this,"disabledFunc",(e=>{var t,{id:a}=e;return(0,v.default)(t=this.dhcpNetworks).call(t,a)})),(0,y.default)(this,"getColumns",(()=>{var e=(0,w.networkColumns)(this);return(0,p.default)(e).call(e,1,0,{title:t("Project ID/Name"),dataIndex:"project_name",render:C.projectRender,sortKey:"project_id"}),e})),(0,y.default)(this,"onSubmit",(e=>{var{network:{selectedRowKeys:t=[]}={}}=e,a=(0,m.default)(t).call(t,(e=>({network_id:e}))),{agentId:r}=this;return this.store.add({agentId:r},a)}))}init(){this.store=x.default,this.networkStore=new S.NetworkStore,this.getDhcpNetworks()}static get modalSize(){return"large"}getModalSize(){return"large"}get name(){return t("add network")}get instanceName(){var{network:{selectedRows:e=[]}={}}=(0,g.default)(this);return(0,m.default)(e).call(e,(e=>e.name)).join(", ")}get detail(){var{detail:e={}}=this.containerProps;return e}get agentId(){return this.detail.id}getDhcpNetworks(){var e=this;return(0,b.default)((function*(){var{agentId:t}=e;t&&(yield e.store.fetchList({agentId:t,all_projects:!0}),e.updateDefaultValue())}))()}get dhcpNetworks(){var e;return(0,m.default)(e=this.store.list.data||[]).call(e,(e=>e.id))}get defaultValue(){var{binary:e}=this.detail;return{binary:e}}getSearchFilters(){return[{label:t("Name"),name:"name"},{label:t("Shared"),name:"shared",options:A.yesNoOptions},{label:t("External"),name:"router:external",options:A.yesNoOptions},{label:t("Project ID"),name:"project_id"}]}get formItems(){return[{name:"binary",label:t("Name"),type:"label",iconType:"host"},k({name:"network",label:t("Network"),type:"select-table",backendPageStore:this.networkStore,disabledFunc:this.disabledFunc,extraParams:{all_projects:!0},required:!0,isMulti:!0,filterParams:this.getSearchFilters(),columns:this.getColumns()},w.networkSortProps)]}}a.AddNetwork=M,(0,y.default)(M,"id","add-network"),(0,y.default)(M,"title",t("Add Network")),(0,y.default)(M,"policy","create_dhcp-network"),(0,y.default)(M,"allowed",(()=>h.default.resolve(!0)));var j=(0,_.inject)("rootStore")((0,_.observer)(M));a.default=j},3995:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=void 0;var l=i(r(36)),u=r(1193),s=i(r(1413));class o extends u.ConfirmAction{constructor(){super(...arguments),(0,l.default)(this,"policy","delete_dhcp-network"),(0,l.default)(this,"onSubmit",(e=>{var{id:t,agentId:a}=e;return s.default.remove({id:t,agentId:a})}))}get id(){return"remove"}get title(){return t("Remove Network")}get isDanger(){return!0}get buttonText(){return t("Remove")}get actionName(){return t("remove network")}}a.default=o},3996:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=a.Metadata=void 0;var l=i(r(57)),u=i(r(36)),s=i(r(0)),o=r(406),d=r(201),c=i(r(1194)),f=i(r(1243)),v=i(r(1601));class p extends c.default{constructor(){super(...arguments),(0,u.default)(this,"getColumns",(()=>[{title:t("Name"),dataIndex:"display_name",render:(e,t)=>e?s.default.createElement(d.Link,{to:"/configuration-admin/metadata/detail/".concat(t.namespace)},e):"-"},{title:t("Description"),dataIndex:"description",isHideable:!0,width:350},{title:t("Resource Types"),dataIndex:"resource_type_associations",isHideable:!0,render:e=>e?(0,l.default)(e).call(e,(e=>s.default.createElement("div",{key:e.name},e.name))):"-",stringify:e=>e?(0,l.default)(e).call(e,(e=>e.name)).join(";"):"-"},{title:t("Public"),dataIndex:"public",valueRender:"yesNo",isHideable:!0},{title:t("Protected"),dataIndex:"protected",valueRender:"yesNo",isHideable:!0}]))}init(){this.store=f.default}get policy(){return"get_metadef_namespaces"}get name(){return t("metadata")}get actionConfigs(){return v.default}}a.Metadata=p;var m=(0,o.inject)("rootStore")((0,o.observer)(p));a.default=m},3997:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=a.Create=void 0;var l=i(r(65)),u=i(r(36)),s=r(406),o=i(r(1243)),d=r(1193);class c extends d.ModalAction{constructor(){super(...arguments),(0,u.default)(this,"onSubmit",(e=>{var{metadata:t,options:a={}}=e,r={};try{r=JSON.parse(t)}catch(e){}var{isPublic:n=!1,isProtected:i=!1}=a;return r.protected=i||!1,r.visibility=!0===n?"public":"private",this.store.create(r)}))}init(){this.store=o.default}get name(){return t("Import metadata")}get formItems(){return[{name:"metadata",label:t("Metadata"),type:"textarea-from-file",placeholder:t("Please input metadata"),required:!0,rows:6},{name:"options",label:t("Options"),type:"check-group",options:[{label:t("Public"),value:"isPublic"},{label:t("Protected"),value:"isProtected"}]}]}}a.Create=c,(0,u.default)(c,"id","create"),(0,u.default)(c,"title",t("Import Metadata")),(0,u.default)(c,"policy","add_metadef_namespace"),(0,u.default)(c,"allowed",(()=>l.default.resolve(!0)));var f=(0,s.inject)("rootStore")((0,s.observer)(c));a.default=f},3998:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=void 0;var l=i(r(36)),u=r(1193),s=i(r(1243));class o extends u.ConfirmAction{constructor(){super(...arguments),(0,l.default)(this,"policy","delete_metadef_namespace"),(0,l.default)(this,"allowedCheckFunc",(e=>!e.protected)),(0,l.default)(this,"onSubmit",(e=>{var{namespace:t}=e;return s.default.delete({id:t})}))}get id(){return"delete"}get title(){return t("Delete Metadata")}get isDanger(){return!0}get buttonText(){return t("Delete")}get actionName(){return t("Delete metadata")}}a.default=o},3999:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=a.Edit=void 0;var l=i(r(65)),u=i(r(36)),s=r(406),o=i(r(1243)),d=r(1193);class c extends d.ModalAction{constructor(){super(...arguments),(0,u.default)(this,"onSubmit",(e=>{var{display_name:t,description:a}=this.item,{namespace:r,options:n}=e,{isPublic:i,isProtected:l}=n,u={display_name:t,description:a,namespace:r,protected:l,visibility:!0===i?"public":"private"};return o.default.edit({id:r},u)}))}init(){this.store=o.default}get name(){return t("Edit metadata")}get instanceName(){return this.item.display_name}get defaultValue(){var{namespace:e,protected:t,visibility:a}=this.item;return{namespace:e,options:{isProtected:t,isPublic:"public"===a}}}get formItems(){return[{name:"namespace",label:t("Namespace"),iconType:"metadata",type:"label"},{name:"options",label:t("Options"),type:"check-group",options:[{label:t("Public"),value:"isPublic"},{label:t("Protected"),value:"isProtected"}]}]}}a.Edit=c,(0,u.default)(c,"id","edit"),(0,u.default)(c,"title",t("Edit Metadata")),(0,u.default)(c,"buttonText",t("Edit")),(0,u.default)(c,"policy","modify_metadef_namespace"),(0,u.default)(c,"allowed",(()=>l.default.resolve(!0)));var f=(0,s.inject)("rootStore")((0,s.observer)(c));a.default=f},4e3:function(e,a,r){"use strict";var n=r(33),i=r(44),l=r(32),u=r(25),s=r(27),o=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=a.Manage=void 0;var v=f(r(27)),p=f(r(57)),m=f(r(65));r(1205);var g=f(r(1206)),h=f(r(36)),b=f(r(0)),y=r(406),_=r(34),S=r(1243),x=r(1193);r(173);function I(e,t){var a=n(e);if(i){var r=i(e);t&&(r=l(r).call(r,(function(t){return u(e,t).enumerable}))),a.push.apply(a,r)}return a}function w(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)s(a=I(Object(r),!0)).call(a,(function(t){(0,h.default)(e,t,r[t])}));else if(o)d(e,o(r));else{var n;s(n=I(Object(r))).call(n,(function(t){c(e,t,u(r,t))}))}}return e}class A extends x.ModalAction{constructor(){super(...arguments),(0,h.default)(this,"updatePrefix",((e,t)=>{var{name:a}=t;t.prefix=e;var r=(0,_.toJS)(this.store.resourceTypes);(0,v.default)(r).call(r,(t=>{t.name===a&&(t.prefix=e)})),this.store.resourceTypes=r})),(0,h.default)(this,"renderInput",((e,a)=>{var r=t("Please input prefix");return b.default.createElement(g.default,{placeholder:r,value:e,onChange:e=>{this.updatePrefix(e.currentTarget.value,a)},onClick:e=>{e&&e.stopPropagation()}})})),(0,h.default)(this,"onSubmit",(e=>{var t,{associations:a={}}=e,{selectedRowKeys:r=[]}=a,{resource_type_associations:n=[],namespace:i}=this.item,l={},u={},s={},o=[],d=[];(0,v.default)(t=this.resourceTypes).call(t,(e=>{e.prefix=e.prefix||"",l[e.name]=e}));var c=(0,p.default)(r).call(r,(e=>(u[e]=l[e],{name:e,prefix:l[e].prefix||""})));return(0,v.default)(n).call(n,(e=>{s[e.name]=e,u[e.name]?u[e.name].prefix!==e.prefix&&o.push(e):o.push(e)})),(0,v.default)(c).call(c,(e=>{s[e.name]?s[e.name].prefix!==e.prefix&&d.push(e):d.push(e)})),0===d.length&&0===o.length?m.default.resolve():this.store.manageResourceTypes(i,o,d)}))}init(){this.store=new S.MetadataStore,this.getResourceTypes()}get name(){return t("manage resource types")}static get modalSize(){return"large"}getModalSize(){return"large"}getResourceTypes(){this.store.fetchResourceTypes(this.item)}get resourceTypes(){var e;return(0,p.default)(e=this.store.resourceTypes||[]).call(e,(e=>w(w({},e),{},{id:e.name})))}get defaultValue(){var{namespace:e,resource_type_associations:t=[]}=this.item;return{namespace:e,associations:{selectedRowKeys:(0,p.default)(t).call(t,(e=>e.name))}}}get formItems(){return[{name:"namespace",label:t("Namespace"),iconType:"metadata",type:"label"},{name:"associations",label:t("Resource Types"),type:"select-table",data:this.resourceTypes,isLoading:this.store.resourceTypeLoading,isMulti:!0,filterParams:[{label:t("Name"),name:"name"}],columns:[{title:t("Name"),dataIndex:"name"},{title:t("Prefix"),dataIndex:"prefix",render:(e,t)=>this.renderInput(e,t)}]}]}}a.Manage=A,(0,h.default)(A,"id","manage"),(0,h.default)(A,"title",t("Manage Resource Types")),(0,h.default)(A,"policy",["list_metadef_resource_types","add_metadef_resource_type_association","remove_metadef_resource_type_association"]),(0,h.default)(A,"allowed",(e=>m.default.resolve(!e.protected)));var C=(0,y.inject)("rootStore")((0,y.observer)(A));a.default=C},4001:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=a.MetadataDetail=void 0;var l=r(406),u=r(1243),s=i(r(1200)),o=i(r(4002)),d=i(r(1601));class c extends s.default{get name(){return t("metadata")}get policy(){return"get_metadef_namespace"}get listUrl(){return this.getRoutePath("metadata")}get actionConfigs(){return d.default}get detailInfos(){return[{title:t("Name"),dataIndex:"display_name"},{title:t("Created At"),dataIndex:"created_at",valueRender:"toLocalTime"},{title:t("Updated At"),dataIndex:"updated_at",valueRender:"toLocalTime"}]}get tabs(){return[{title:t("Detail"),key:"detail",component:o.default}]}init(){this.store=new u.MetadataStore}}a.MetadataDetail=c;var f=(0,l.inject)("rootStore")((0,l.observer)(c));a.default=f},4002:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=a.BaseDetail=void 0;var l=i(r(57)),u=i(r(81)),s=i(r(335)),o=i(r(0)),d=r(406),c=i(r(1202)),f=i(r(4003));class v extends c.default{get leftCards(){return[this.baseInfoCard,this.resourceCard]}get rightCards(){return[this.jsonCard]}get baseInfoCard(){var e=[{label:t("Namespace"),dataIndex:"namespace"},{label:t("Description"),dataIndex:"description"}];return{title:t("Base Info"),options:e}}get resourceCard(){var{resource_type_associations:e=[]}=this.detailData||{},a=(0,l.default)(e).call(e,(e=>{var a,{name:r,prefix:n}=e;return{label:r,content:(0,u.default)(a="".concat(t("Prefix"),": ")).call(a,n||"-")}}));return{title:t("Associated Resource Types"),options:a}}get jsonCard(){var e=[{label:"",content:o.default.createElement("pre",{className:f.default["json-data"]},(0,s.default)(this.detailData,null,4))}];return{labelCol:0,title:t("Content"),options:e}}}a.BaseDetail=v;var p=(0,d.inject)("rootStore")((0,d.observer)(v));a.default=p},4003:function(e,t,a){var r=a(4004);"string"==typeof r&&(r=[[e.i,r,""]]);var n={hmr:!0,transform:undefined,insertInto:void 0};a(75)(r,n);r.locals&&(e.exports=r.locals)},4004:function(e,t,a){(t=e.exports=a(74)(!1)).push([e.i,".styles__json-data--euQUb {\n white-space: pre-wrap;\n word-wrap: break-word;\n}\n",""]),t.locals={"json-data":"styles__json-data--euQUb"}}}]);