skyline-console/skyline_console/static/identity.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
82 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{1220:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.transferFilterOption=a.nameDomainColumns=a.enabledColumn=a.getDomainFormItem=a.getCheckedOptions=a.getDomainOptions=a.statusTypes=void 0,r(589);var n=i(r(590)),o=i(r(32)),u=i(r(90)),s=i(r(57)),d=i(r(198)),c=i(r(0)),f=(r(173),i(r(1231))),p=i(r(140)),m=[{label:t("Enable"),value:!0},{label:t("Forbidden"),value:!1}];a.statusTypes=m;var h=e=>{var t,{baseDomains:a}=p.default,{domains:r}=f.default,l=(0,o.default)(t=r||[]).call(t,(t=>-1===(0,u.default)(a).call(a,t.name)||t.id===(e.item||{}).domain_id));return(0,s.default)(l).call(l,(e=>({label:e.name,value:e.id,key:e.id})))};a.getDomainOptions=h;var v=()=>{var e,{domains:t}=f.default;return(0,s.default)(e=t||[]).call(e,(e=>({label:e.name,value:e.id,key:e.id})))};a.getCheckedOptions=v;a.getDomainFormItem=e=>({name:"domain_id",label:t("Affiliated Domain"),type:"select",checkOptions:v(),checkBoxInfo:t("Show All Domain"),options:h(e),allowClear:!1,onChange:t=>{e.setState({domain:t})},required:!0});var g={title:t("Enabled"),dataIndex:"enabled",isHideable:!0,render:e=>!0===e?c.default.createElement(n.default,{color:"green",text:t("Yes")}):c.default.createElement(n.default,{color:"red",text:t("No")}),stringify:e=>e?t("Yes"):t("No")};a.enabledColumn=g;var b=[{dataIndex:"name",title:t("Name")},{dataIndex:"domainName",title:t("Domain")}];a.nameDomainColumns=b;a.transferFilterOption=(e,t)=>{var{domainName:a,name:r}=t;return(0,d.default)(r).call(r,e)||(0,d.default)(a).call(a,e)}},1231:function(e,t,a){"use strict";var r=a(33),l=a(44),i=a(32),n=a(25),o=a(27),u=a(45),s=a(46),d=a(19),c=a(21);d(t,"__esModule",{value:!0}),t.default=t.DomainStore=void 0;var f,p,m=c(a(65)),h=c(a(57)),v=c(a(32)),g=c(a(25)),b=c(a(51)),y=c(a(71)),j=c(a(36)),_=c(a(54)),S=(c(a(72)),a(34)),D=c(a(48)),x=c(a(53));function C(e,t){var a=r(e);if(l){var o=l(e);t&&(o=i(o).call(o,(function(t){return n(e,t).enumerable}))),a.push.apply(a,o)}return a}function R(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)o(a=C(Object(r),!0)).call(a,(function(t){(0,j.default)(e,t,r[t])}));else if(u)s(e,u(r));else{var l;o(l=C(Object(r))).call(l,(function(t){d(e,t,n(r,t))}))}}return e}var w=(f=class extends x.default{constructor(){super(...arguments),(0,y.default)(this,"domains",p,this)}get client(){return D.default.keystone.domains}get userClient(){return D.default.keystone.users}get userGroupClient(){return D.default.keystone.groups}get projectClient(){return D.default.keystone.projects}listDidFetch(e){var t=this;return(0,b.default)((function*(){if(!e.length)return e;var[a,r,l]=yield m.default.all([t.userClient.list(),t.projectClient.list(),t.userGroupClient.list()]);return(0,h.default)(e).call(e,(e=>{var t,i,n,o=(0,v.default)(t=a.users||[]).call(t,(t=>t.domain_id===e.id)),u=(0,v.default)(i=r.projects||[]).call(i,(t=>t.domain_id===e.id)),s=(0,v.default)(n=l.groups||[]).call(n,(t=>t.domain_id===e.id));return R(R({},e),{},{users:o,userCount:o.length,projects:u,projectCount:u.length,groups:s,groupCount:s.length})}))}))()}detailDidFetch(e){var t=this;return(0,b.default)((function*(){var{id:a}=e,[r,l,i]=yield m.default.all([t.userClient.list({domain_id:a}),t.projectClient.list({domain_id:a}),t.userGroupClient.list({domain_id:a})]),{users:n=[]}=r||{},{projects:o=[]}=l||{},{groups:u=[]}=i||{};return R(R({},e),{},{users:n,userCount:n.length,projects:o,projectCount:o.length,groups:u,groupCount:u.length})}))()}fetchDomain(){var e=this;return(0,b.default)((function*(){var t=yield e.client.list();e.domains=t.domains}))()}edit(e){var t=this;return(0,b.default)((function*(){var{id:a,description:r}=e,l={domain:{description:r}};return t.submitting(t.client.patch(a,l))}))()}forbidden(e){var t=this;return(0,b.default)((function*(){var{id:a}=e;return t.submitting(t.client.patch(a,{domain:{enabled:!1}}))}))()}enable(e){var t=this;return(0,b.default)((function*(){var{id:a}=e;return t.submitting(t.client.patch(a,{domain:{enabled:!0}}))}))()}},p=(0,_.default)(f.prototype,"domains",[S.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),(0,_.default)(f.prototype,"fetchDomain",[S.action],(0,g.default)(f.prototype,"fetchDomain"),f.prototype),(0,_.default)(f.prototype,"edit",[S.action],(0,g.default)(f.prototype,"edit"),f.prototype),(0,_.default)(f.prototype,"forbidden",[S.action],(0,g.default)(f.prototype,"forbidden"),f.prototype),(0,_.default)(f.prototype,"enable",[S.action],(0,g.default)(f.prototype,"enable"),f.prototype),f);t.DomainStore=w;var I=new w;t.default=I},1244:function(e,t,a){"use strict";var r=a(33),l=a(44),i=a(32),n=a(25),o=a(27),u=a(45),s=a(46),d=a(19),c=a(21);d(t,"__esModule",{value:!0}),t.default=t.RoleStore=void 0;var f,p,m,h=c(a(32)),v=c(a(25)),g=c(a(51)),b=c(a(71)),y=c(a(36)),j=c(a(54)),_=(c(a(72)),a(34)),S=c(a(48)),D=c(a(53)),x=c(a(429));function C(e,t){var a=r(e);if(l){var o=l(e);t&&(o=i(o).call(o,(function(t){return n(e,t).enumerable}))),a.push.apply(a,o)}return a}function R(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)o(a=C(Object(r),!0)).call(a,(function(t){(0,y.default)(e,t,r[t])}));else if(u)s(e,u(r));else{var l;o(l=C(Object(r))).call(l,(function(t){d(e,t,n(r,t))}))}}return e}var w=(f=class extends D.default{constructor(){super(...arguments),(0,b.default)(this,"implyRoles",p,this),(0,b.default)(this,"systemRoles",m,this),(0,y.default)(this,"checkSystemRole",(e=>"admin"===e.name||"reader"===e.name))}get client(){return S.default.keystone.roles}detailDidFetch(e){var t=this;return(0,g.default)((function*(){var{id:a}=e,{role_inference:{implies:r=[]}={}}=yield t.client.implies.list(a);return R(R({},e),{},{implies:r})}))()}fetchSystemRoles(){var e=this;return(0,g.default)((function*(){e.systemRoles.isLoading=!0;var t=yield e.client.list(),{roles:a=[]}=t,r=(0,h.default)(a).call(a,(t=>e.checkSystemRole(t)));return e.systemRoles.data=r,e.systemRoles.isLoading=!1,r}))()}update(e,t){var{id:a}=e,r={};return r[this.responseKey]=t,this.submitting(this.client.patch(a,r))}},p=(0,j.default)(f.prototype,"implyRoles",[_.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),m=(0,j.default)(f.prototype,"systemRoles",[_.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new x.default}}),(0,j.default)(f.prototype,"fetchSystemRoles",[_.action],(0,v.default)(f.prototype,"fetchSystemRoles"),f.prototype),(0,j.default)(f.prototype,"update",[_.action],(0,v.default)(f.prototype,"update"),f.prototype),f);t.RoleStore=w;var I=new w;t.default=I},1306:function(e,a,r){"use strict";var l=r(33),i=r(44),n=r(32),o=r(25),u=r(27),s=r(45),d=r(46),c=r(19),f=r(160),p=r(21);c(a,"__esModule",{value:!0}),a.default=a.User=void 0;var m=p(r(198)),h=p(r(57)),v=p(r(1299)),g=p(r(32)),b=p(r(36)),y=p(r(0)),j=r(406),_=p(r(1194)),S=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var a=R(t);if(a&&a.has(e))return a.get(e);var r={},l=c&&o;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var n=l?o(e,i):null;n&&(n.get||n.set)?c(r,i,n):r[i]=e[i]}r.default=e,a&&a.set(e,r);return r}(r(1207)),D=r(334),x=r(1220),C=p(r(1589));function R(e){if("function"!=typeof f)return null;var t=new f,a=new f;return(R=function(e){return e?a:t})(e)}function w(e,t){var a=l(e);if(i){var r=i(e);t&&(r=n(r).call(r,(function(t){return o(e,t).enumerable}))),a.push.apply(a,r)}return a}class I extends _.default{constructor(){super(...arguments),(0,b.default)(this,"updateFetchParams",(e=>{var{match:t}=this.props,{id:a}=t.params||{},r=function(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)u(a=w(Object(r),!0)).call(a,(function(t){(0,b.default)(e,t,r[t])}));else if(s)d(e,s(r));else{var l;u(l=w(Object(r))).call(l,(function(t){c(e,t,o(r,t))}))}}return e}({},e);return this.inUserGroupDetail?(r.groupId=a,r.withProjectRole=!1,r.withSystemRole=!0):this.inDomainDetail?(r.domain_id=a,r.withProjectRole=!1,r.withSystemRole=!0):this.inProjectDetail?(r.projectId=a,r.withProjectRole=!0,r.withSystemRole=!0):this.inRoleDetail?(r.roleId=a,r.withProjectRole=!0,r.withSystemRole=!0):this.inDetailPage||(r.withProjectRole=!1,r.withSystemRole=!0),r}))}init(){this.store=this.inDetailPage?new S.UserStore:S.default}get policy(){return"identity:list_users"}get name(){return t("users")}get inDomainDetail(){var e;return this.inDetailPage&&(0,m.default)(e=this.path).call(e,"domain-admin/detail")}get inProjectDetail(){var e;return this.inDetailPage&&(0,m.default)(e=this.path).call(e,"project-admin/detail")}get inUserGroupDetail(){var e;return this.inDetailPage&&(0,m.default)(e=this.path).call(e,"identity/user-group")}get inRoleDetail(){var e;return this.inDetailPage&&(0,m.default)(e=this.path).call(e,"identity/role-admin")}getBaseColumns(){return[{title:t("User ID/Name"),dataIndex:"name",routeName:"userDetailAdmin"},{title:t("Real Name"),dataIndex:"real_name",isHideable:!0},{title:t("Roles"),dataIndex:"projectRoles",isHideable:!0,render:(e,t)=>{var a,{projects:r}=t;return(0,h.default)(a=(0,v.default)(r)).call(a,(e=>{var{roles:t=[]}=e||{};return(0,h.default)(t).call(t,(e=>y.default.createElement("div",{key:e.id},e.name)))}))},stringify:(e,t)=>{var a,{projects:r}=t;return(0,h.default)(a=(0,v.default)(r)).call(a,(e=>{var{roles:t=[]}=e||{};return(0,h.default)(t).call(t,(e=>e.name)).join(", ")}))}},{title:t("Project Scope"),dataIndex:"projects",isHideable:!0,render:e=>{var t;return(0,h.default)(t=(0,v.default)(e)).call(t,(e=>{var{project:{id:t,name:a}}=e,r=this.getLinkRender("projectDetail",a,{id:t});return y.default.createElement("div",{key:t},r)}))},stringify:e=>{var t;return(0,h.default)(t=(0,v.default)(e)).call(t,(e=>{var{project:t}=e;return t.name})).join("; ")}},{title:t("Affiliated Domain"),dataIndex:"domainName",isHideable:!0},{title:t("System Roles"),dataIndex:"systemRoles",render:e=>{var t;return(0,h.default)(t=e||[]).call(t,(e=>y.default.createElement("div",{key:e.id},e.name)))},stringify:e=>{var t;return(0,h.default)(t=e||[]).call(t,(e=>e.name)).join("; ")}},{title:t("Email"),dataIndex:"email",isHideable:!0},{title:t("phone"),dataIndex:"phone",isHideable:!0},x.enabledColumn]}getColumns(){var e=this.getBaseColumns();return!this.inDetailPage||this.inUserGroupDetail?(0,g.default)(e).call(e,(e=>{var t;return!(0,m.default)(t=["projectRoles","projects"]).call(t,e.dataIndex)})):this.inDomainDetail?(0,g.default)(e).call(e,(e=>{var t;return!(0,m.default)(t=["domainName","projects","projectRoles"]).call(t,e.dataIndex)})):this.inRoleDetail?(0,g.default)(e).call(e,(e=>{var t;return!(0,m.default)(t=["projectRoles"]).call(t,e.dataIndex)})):this.inProjectDetail?(0,g.default)(e).call(e,(e=>{var t;return!(0,m.default)(t=["projects"]).call(t,e.dataIndex)})):e}get actionConfigs(){return this.inDetailPage?D.emptyActionConfig:C.default}get searchFilters(){return[{label:t("User Name"),name:"name"},{label:t("Real Name"),name:"real_name"},{label:t("Enabled"),name:"enabled",options:D.yesNoOptions}]}}a.User=I;var P=(0,j.inject)("rootStore")((0,j.observer)(I));a.default=P},1307:function(e,t,a){"use strict";var r=a(19),l=a(21);r(t,"__esModule",{value:!0}),t.roleFilterOption=t.editable=void 0;var i=l(a(198));t.editable=e=>{var{options:{immutable:t}={}}=e||{};return!t&&"true"!==t&&"True"!==t};t.roleFilterOption=(e,t)=>{var a,{label:r=""}=t;return(0,i.default)(a=r.toLowerCase()).call(a,(e||"").toLowerCase())}},1308:function(e,a,r){"use strict";var l=r(33),i=r(44),n=r(32),o=r(25),u=r(27),s=r(45),d=r(46),c=r(19),f=r(160),p=r(21);c(a,"__esModule",{value:!0}),a.default=a.UserGroups=void 0;var m=p(r(198)),h=p(r(57)),v=p(r(33)),g=p(r(81)),b=p(r(32));r(1270);var y=p(r(1271)),j=p(r(36)),_=p(r(199)),S=p(r(0)),D=r(406),x=p(r(1194)),C=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var a=I(t);if(a&&a.has(e))return a.get(e);var r={},l=c&&o;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var n=l?o(e,i):null;n&&(n.get||n.set)?c(r,i,n):r[i]=e[i]}r.default=e,a&&a.set(e,r);return r}(r(1238)),R=(r(173),r(334)),w=p(r(1592));function I(e){if("function"!=typeof f)return null;var t=new f,a=new f;return(I=function(e){return e?a:t})(e)}function P(e,t){var a=l(e);if(i){var r=i(e);t&&(r=n(r).call(r,(function(t){return o(e,t).enumerable}))),a.push.apply(a,r)}return a}class U extends x.default{constructor(){super(...arguments),(0,j.default)(this,"updateFetchParams",(e=>{var{match:t}=this.props,{id:a}=t.params||{},r=function(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)u(a=P(Object(r),!0)).call(a,(function(t){(0,j.default)(e,t,r[t])}));else if(s)d(e,s(r));else{var l;u(l=P(Object(r))).call(l,(function(t){c(e,t,o(r,t))}))}}return e}({},e);return this.inUserDetail?r.userId=a:this.inProjectDetail?r.projectId=a:this.inRoleDetail?r.roleId=a:this.inDomainDetail&&(r.domainId=a),r}))}init(){this.store=this.inDetailPage?new C.GroupStore:C.default}get policy(){return"identity:list_groups"}get name(){return t("user groups")}get isFilterByBackend(){return!1}get inUserDetail(){var e;return this.inDetailPage&&(0,m.default)(e=this.path).call(e,"user-admin/detail")}get inDomainDetail(){var e;return this.inDetailPage&&(0,m.default)(e=this.path).call(e,"domain-admin/detail")}get inProjectDetail(){var e;return this.inDetailPage&&(0,m.default)(e=this.path).call(e,"project-admin/detail")}get inRoleDetail(){var e;return this.inDetailPage&&(0,m.default)(e=this.path).call(e,"role-admin/detail")}getBaseColumns(){return[{title:t("User Group ID/Name"),dataIndex:"name",routeName:"userGroupDetailAdmin"},{title:t("Project Scope (Project Name: Role Names)"),dataIndex:"projects",isHideable:!0,width:500,render:e=>{var t;return(0,_.default)(e)?"-":(0,h.default)(t=(0,v.default)(e)).call(t,(t=>{var{project:a,roles:r}=e[t],l=(0,h.default)(r).call(r,(e=>e.name)).join(", "),{id:i,name:n}=a,o=this.getLinkRender("projectDetail",n,{id:i},{tab:"userGroup"});return S.default.createElement("div",{key:t},S.default.createElement(y.default.Text,{strong:!0},o),": ",l)}))},stringify:e=>{var t;return(0,_.default)(e)?"-":(0,h.default)(t=(0,v.default)(e)).call(t,(t=>{var a,{project:r,roles:l}=e[t],i=(0,h.default)(l).call(l,(e=>e.name)).join("|");return(0,g.default)(a="".concat(r.name,": ")).call(a,i)})).join(";")}},{title:t("Roles"),dataIndex:"rolesInProjectDetailPage",isHideable:!0,render:(e,t)=>{var a,{projects:r={}}=t;return(0,_.default)(r)?"-":(0,h.default)(a=(0,v.default)(r)).call(a,(e=>{var{roles:t}=r[e];return(0,h.default)(t).call(t,(e=>{var{id:t,name:a}=e,r=this.getLinkRender("roleDetail",a,{id:t},{tab:"group"});return S.default.createElement("div",{key:t},r)}))}))},stringify:(e,t)=>{var a,{projects:r={}}=t;return(0,_.default)(r)?"-":(0,h.default)(a=(0,v.default)(r)).call(a,(e=>{var{roles:t}=r[e];return(0,h.default)(t).call(t,(e=>e.name)).join(";")}))}},{title:t("Project Scope"),dataIndex:"projectsInRoleDetailPage",isHideable:!0,render:(e,t)=>{var a,{projects:r={}}=t;return(0,_.default)(r)?"-":(0,h.default)(a=(0,v.default)(r)).call(a,(e=>{var{project:t}=r[e],{id:a,name:l}=t,i=this.getLinkRender("projectDetail",l,{id:a},{tab:"userGroup"});return S.default.createElement("div",{key:a},i)}))},stringify:(e,t)=>{var a,{projects:r={}}=t;return(0,_.default)(r)?"-":(0,h.default)(a=(0,v.default)(r)).call(a,(e=>{var{project:t}=r[e];return t.name})).join(";")}},{title:t("Affiliated Domain"),dataIndex:"domainName",isHideable:!0},{title:t("Description"),dataIndex:"description",isHideable:!0}]}getColumns(){var e=this.getBaseColumns();return!this.inDetailPage||this.inUserDetail?(0,b.default)(e).call(e,(e=>{var t;return!(0,m.default)(t=["rolesInProjectDetailPage","projectsInRoleDetailPage"]).call(t,e.dataIndex)})):this.inDomainDetail?(0,b.default)(e).call(e,(e=>{var t;return!(0,m.default)(t=["domainName","rolesInProjectDetailPage","projectsInRoleDetailPage"]).call(t,e.dataIndex)})):this.inProjectDetail?(0,b.default)(e).call(e,(e=>{var t;return!(0,m.default)(t=["projects","projectsInRoleDetailPage"]).call(t,e.dataIndex)})):this.inRoleDetail?(0,b.default)(e).call(e,(e=>{var t;return!(0,m.default)(t=["projects","rolesInProjectDetailPage"]).call(t,e.dataIndex)})):e}get actionConfigs(){return this.inDetailPage?R.emptyActionConfig:w.default}get searchFilters(){return[{label:t("User Group Name"),name:"name"}]}}a.UserGroups=U;var N=(0,D.inject)("rootStore")((0,D.observer)(U));a.default=N},1348:function(e,a,r){"use strict";var l=r(33),i=r(44),n=r(32),o=r(25),u=r(27),s=r(45),d=r(46),c=r(19),f=r(160),p=r(21);c(a,"__esModule",{value:!0}),a.default=a.Projects=void 0;var m=p(r(27)),h=p(r(33)),v=p(r(32)),g=p(r(198)),b=p(r(102)),y=p(r(57)),j=p(r(81)),_=p(r(226));r(1250);var S=p(r(1251)),D=p(r(36)),x=p(r(0)),C=r(406),R=(r(173),p(r(1194))),w=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var a=M(t);if(a&&a.has(e))return a.get(e);var r={},l=c&&o;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var n=l?o(e,i):null;n&&(n.get||n.set)?c(r,i,n):r[i]=e[i]}r.default=e,a&&a.set(e,r);return r}(r(407)),I=r(334),P=r(1195),U=r(1220),N=p(r(1595)),T=p(r(3922));function M(e){if("function"!=typeof f)return null;var t=new f,a=new f;return(M=function(e){return e?a:t})(e)}function k(e,t){var a=l(e);if(i){var r=i(e);t&&(r=n(r).call(r,(function(t){return o(e,t).enumerable}))),a.push.apply(a,r)}return a}class G extends R.default{constructor(){super(...arguments),(0,D.default)(this,"getUserProjectRole",(e=>{var t,a,{users:r={},groups:l={}}=e||{},i=[],n=[];return(0,m.default)(t=(0,h.default)(r)).call(t,(e=>{var t=r[e];(0,m.default)(t).call(t,(e=>{n.push({role:e}),i.push(e.id)}))})),(0,m.default)(a=(0,h.default)(l)).call(a,(e=>{var{roles:t,group:a}=l[e],r=(0,v.default)(t).call(t,(e=>!(0,g.default)(i).call(i,e.id)));(0,m.default)(r).call(r,(e=>{var t=(0,b.default)(n).call(n,(t=>t.role.id===e.id));t?t.groups.push(a):n.push({role:e,groups:[a]})}))})),n})),(0,D.default)(this,"updateFetchParams",(e=>{var{match:t}=this.props,{id:a}=t.params||{},r=function(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)u(a=k(Object(r),!0)).call(a,(function(t){(0,D.default)(e,t,r[t])}));else if(s)d(e,s(r));else{var l;u(l=k(Object(r))).call(l,(function(t){c(e,t,o(r,t))}))}}return e}({},e);return this.inUserDetail?r.userId=a:this.inUserGroupDetail?r.groupId=a:this.inDomainDetail&&(r.domain_id=a),r}))}init(){this.store=this.inDetailPage?new w.ProjectStore:w.default}get policy(){return"identity:list_projects"}get name(){return t("projects")}get isFilterByBackend(){return!1}get inProject(){var e;return(0,g.default)(e=this.path).call(e,"project-admin")}get inUserDetail(){var e;return this.inDetailPage&&(0,g.default)(e=this.path).call(e,"user-admin/detail")}get inUserGroupDetail(){var e;return this.inDetailPage&&(0,g.default)(e=this.path).call(e,"user-group-admin/detail")}get inDomainDetail(){var e;return this.inDetailPage&&(0,g.default)(e=this.path).call(e,"domain-admin/detail")}getBaseColumns(){var e={title:t("Role"),dataIndex:"userProjectRole",render:(e,a)=>{var r=this.getUserProjectRole(a),l=(0,y.default)(r).call(r,(e=>{var{role:{id:a,name:r},groups:l=[]}=e;if(!l.length){var i=this.getLinkRender("roleDetail",r,{id:a},{tab:"user"});return x.default.createElement("div",{key:"user-role-".concat(a)},i)}var n=this.getLinkRender("roleDetail",r,{id:a},{tab:"groups"}),o=(0,y.default)(l).call(l,(e=>{var t=this.getLinkRender("groupDetail",e.name,{id:e.id});return x.default.createElement("span",{style:{marginRight:"8px"}},t)}));return x.default.createElement("div",{key:"group-role-".concat(a)},n," (",t("authorized by group "),o,")")}));return x.default.createElement("div",null,l)},stringify:(e,a)=>{var r=this.getUserProjectRole(a);return(0,y.default)(r).call(r,(e=>{var a,r,{role:{name:l},groups:i=[]}=e;if(!i.length)return l;var n=(0,y.default)(i).call(i,(e=>e.name)).join("; ");return(0,j.default)(a=(0,j.default)(r="".concat(l," (")).call(r,t("authorized by group "))).call(a,n,")")})).join("; ")}},a={title:t("Role"),dataIndex:"groupProjectRole",render:(e,t)=>{var a,{groups:r={}}=t;return(0,y.default)(a=(0,h.default)(r)).call(a,(e=>{var t=r[e];return(0,y.default)(t).call(t,(t=>{var a,{id:r,name:l}=t,i=this.getLinkRender("roleDetail",l,{id:r},{tab:"group"});return x.default.createElement("div",{key:(0,j.default)(a="".concat(e,"-")).call(a,r)},i)}))}))},stringify:(e,t)=>{var a,{groups:r={}}=t;return(0,y.default)(a=(0,h.default)(r)).call(a,(e=>{var t=r[e];return(0,y.default)(t).call(t,(e=>e.name)).join(" ; ")}))}};return[{title:t("Project ID/Name"),dataIndex:"name",routeName:"projectDetailAdmin"},e,a,{title:t("Member Num"),dataIndex:"num",isHideable:!0,render:(e,a)=>{var{userCount:r,groupCount:l}=a;return x.default.createElement("div",null,x.default.createElement("span",null,t("User Num: "),r),x.default.createElement(S.default,{type:"vertical",className:T.default["header-divider"]}),x.default.createElement("span",null,t("User Group Num: "),l))},stringify:(e,a)=>{var r,l,i,{userCount:n,groupCount:o}=a;return(0,j.default)(r=(0,j.default)(l=(0,j.default)(i="".concat(t("User Num: "))).call(i,n," | ")).call(l,t("User Group Num: "))).call(r,o)}},{title:t("Affiliated Domain"),dataIndex:"domainName",isHideable:!0},U.enabledColumn,{title:t("Tags"),dataIndex:"tags",render:e=>(0,y.default)(e).call(e,((e,t)=>(0,P.SimpleTag)({tag:e,index:t}))),isHideable:!0},{title:t("Description"),dataIndex:"description",isHideable:!0}]}getColumns(){var e=this.getBaseColumns();return this.inProject?(0,v.default)(e).call(e,(e=>{var t;return!(0,g.default)(t=["userProjectRole","groupProjectRole"]).call(t,e.dataIndex)})):this.inDomainDetail?(0,v.default)(e).call(e,(e=>{var t;return!(0,g.default)(t=["domainName","userProjectRole","groupProjectRole"]).call(t,e.dataIndex)})):this.inUserDetail?(0,v.default)(e).call(e,(e=>{var t;return!(0,g.default)(t=["num","groupProjectRole"]).call(t,e.dataIndex)})):this.inUserGroupDetail?(0,v.default)(e).call(e,(e=>{var t;return!(0,g.default)(t=["num","userProjectRole"]).call(t,e.dataIndex)})):e}get actionConfigs(){return this.inDetailPage?I.emptyActionConfig:N.default}get searchFilters(){return[{label:t("Project Name"),name:"name"},{label:t("Enabled"),name:"enabled",options:I.yesNoOptions},{label:t("Tags"),name:"tags",filterFunc:(e,t)=>{var a=t.toLowerCase();return(0,_.default)(e).call(e,(e=>{var t;return(0,g.default)(t=e.toLowerCase()).call(t,a)}))}}]}}a.Projects=G;var E=(0,C.inject)("rootStore")((0,C.observer)(G));a.default=E},1588:function(e,t,a){"use strict";var r=a(19),l=a(21);r(t,"__esModule",{value:!0}),t.default=void 0;var i=l(a(3901)),n=l(a(3902)),o=l(a(3903)),u=l(a(3904)),s=l(a(3905)),d={rowActions:{firstAction:o.default,moreActions:[{action:n.default},{action:u.default},{action:s.default}]},batchActions:[n.default],primaryActions:[i.default]};t.default=d},1589:function(e,t,a){"use strict";var r=a(19),l=a(21);r(t,"__esModule",{value:!0}),t.default=void 0;var i=l(a(1590)),n=l(a(3907)),o=l(a(1591)),u=l(a(3908)),s=l(a(3909)),d=l(a(3910)),c=l(a(3911)),f={rowActions:{firstAction:o.default,moreActions:[{action:d.default},{action:c.default},{action:n.default},{action:u.default},{action:s.default}]},batchActions:[n.default],primaryActions:[i.default]};t.default=f},1590:function(e,a,r){"use strict";var l=r(33),i=r(44),n=r(32),o=r(25),u=r(27),s=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=a.Create=void 0;var p=f(r(57)),m=f(r(27)),h=f(r(33)),v=f(r(198)),g=f(r(65)),b=f(r(32)),y=f(r(90)),j=f(r(62)),_=f(r(51));r(560);var S=f(r(412)),D=f(r(36)),x=f(r(0)),C=r(406),R=r(1238),w=f(r(1207)),I=r(1193),P=(r(173),r(407)),U=f(r(1244)),N=f(r(1231)),T=r(556),M=r(1220),k=r(1307);function G(e,t){var a=l(e);if(i){var r=i(e);t&&(r=n(r).call(r,(function(t){return o(e,t).enumerable}))),a.push.apply(a,r)}return a}function E(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)u(a=G(Object(r),!0)).call(a,(function(t){(0,D.default)(e,t,r[t])}));else if(s)d(e,s(r));else{var l;u(l=G(Object(r))).call(l,(function(t){c(e,t,o(r,t))}))}}return e}class F extends I.FormAction{constructor(e){var a;super(e),a=this,(0,D.default)(this,"projectRolesList",(e=>{var t;return(0,p.default)(t=this.projectRoleList||[]).call(t,(t=>({label:t.name,value:t.id,projectId:e})))})),(0,D.default)(this,"defaultRoles",(()=>[(this.projectRoleList[0]||{}).id])),(0,D.default)(this,"onSelectChange",((e,t,a)=>{var{projectRoles:r}=this.state;e.length&&t.length?r[a]=e:r[a]=[],this.setState({projectRoles:r})})),(0,D.default)(this,"renderSelect",(e=>x.default.createElement(S.default,{size:"small",mode:"multiple",options:this.projectRolesList(e),defaultValue:this.defaultRoles(),filterOption:k.roleFilterOption,onChange:(t,a)=>{this.onSelectChange(t,a,e)}}))),(0,D.default)(this,"onChangeProject",(e=>{var t,a,{projectRoles:r}=this.state;(0,m.default)(t=e||[]).call(t,(e=>{r[e]||(r[e]=this.defaultRoles())})),(0,m.default)(a=(0,h.default)(r)).call(a,(t=>{var a;(0,v.default)(a=e||[]).call(a,t)||delete r[t]})),this.setState(r)})),(0,D.default)(this,"checkName",((e,a)=>{if(!a)return g.default.reject(t("Please input"));var{list:{data:r}}=this.store;return(0,b.default)(r).call(r,(e=>e.name===a))[0]?g.default.reject(t("Invalid: User name can not be duplicated")):g.default.resolve()})),(0,D.default)(this,"onSubmit",function(){var e=(0,_.default)((function*(e){var{projectRoles:t}=a.state;e.defaultRole=a.projectRoleList[0].id,e.projectRoles=t;var{confirmPassword:r,more:l}=e,i=(0,j.default)(e,["confirmPassword","more"]);return a.store.create(i)}));return function(t){return e.apply(this,arguments)}}()),this.state={domain:"default",more:!1,projectRoles:{}}}init(){this.store=w.default,this.userGroupStore=new R.GroupStore,this.projectStore=new P.ProjectStore,this.roleStore=U.default,this.getUserGroups(),this.getProjects(),this.getRoles(),this.getDomains()}getDomains(){N.default.fetchDomain()}getUserGroups(){this.userGroupStore.fetchList({withRole:!1})}getProjects(){this.projectStore.fetchList({withRole:!1})}getRoles(){this.roleStore.fetchList()}static allowed(e,t){var{match:{path:a}}=t;return(0,y.default)(a).call(a,"domain-admin/detail")>=0?g.default.resolve(!1):g.default.resolve(!0)}get name(){return t("Create User")}get listUrl(){return this.getRoutePath("user")}get defaultValue(){return{more:!1,enabled:M.statusTypes[0].value,domain_id:"default"}}get projectList(){var e;return(0,p.default)(e=this.projectStore.list.data||[]).call(e,(e=>({label:e.name,value:e.id})))}get userGroupList(){var e;return(0,p.default)(e=this.userGroupStore.list.data||[]).call(e,(e=>E(E({},e),{},{key:e.id})))}get projects(){var e;return(0,p.default)(e=this.projectStore.list.data||[]).call(e,(e=>E(E({},e),{},{key:e.id})))}get leftProjectTable(){return M.nameDomainColumns}get projectRoleList(){return this.roleStore.list.data||[]}get rightProjectTable(){return[...M.nameDomainColumns,{title:t("Select Project Role"),dataIndex:"id",render:e=>this.renderSelect(e)}]}get leftUserGroupTable(){return M.nameDomainColumns}get rightUserGroupTable(){return M.nameDomainColumns}get formItems(){var{more:e}=this.state,a={labelCol:{xs:{span:4},sm:{span:5}},wrapperCol:{xs:{span:16},sm:{span:15}},colNum:2},r=E(E({},(0,M.getDomainFormItem)(this)),a);return[E(E({name:"name",label:t("User Name"),type:"input",validator:this.checkName,extra:t("User name can not be duplicated"),required:!0},a),{},{maxLength:30}),E({name:"email",label:t("Email"),type:"input",required:!0,validator:T.emailValidate},a),E({name:"password",label:t("Password"),type:"input-password",required:!0,otherRule:(0,T.getPasswordOtherRule)("password")},a),E({name:"phone",label:t("Phone"),type:"phone",required:!0,validator:T.phoneNumberValidate},a),E({name:"confirmPassword",label:t("Confirm Password"),type:"input-password",required:!0,dependencies:["password"],otherRule:(0,T.getPasswordOtherRule)("confirmPassword")},a),r,E({name:"enabled",label:t("Status"),type:"radio",optionType:"default",options:M.statusTypes,required:!0},a),E({name:"description",label:t("Description"),type:"textarea"},a),E(E({name:"real_name",label:t("Real Name"),type:"input",required:!0},a),{},{maxLength:30}),{type:"divider"},{name:"more",label:t("Advanced Options"),type:"more"},{name:"select_project",label:t("Select Project"),type:"transfer",leftTableColumns:this.leftProjectTable,rightTableColumns:this.rightProjectTable,dataSource:this.projects,showSearch:!0,hidden:!e,onChange:this.onChangeProject,filterOption:M.transferFilterOption,loading:this.projectStore.list.isLoading,onRowRight:()=>null},{name:"select_user_group",label:t("Select User Group"),type:"transfer",leftTableColumns:this.leftUserGroupTable,rightTableColumns:this.rightUserGroupTable,dataSource:this.userGroupList,showSearch:!0,hidden:!e,filterOption:M.transferFilterOption,loading:this.userGroupStore.list.isLoading}]}}a.Create=F,(0,D.default)(F,"id","user-create"),(0,D.default)(F,"title",t("Create User")),(0,D.default)(F,"path","/identity/user-admin/create"),(0,D.default)(F,"policy",["identity:create_user","identity:update_user","identity:list_roles"]),(0,D.default)(F,"allowed",(()=>g.default.resolve(!0)));var A=(0,C.inject)("rootStore")((0,C.observer)(F));a.default=A},1591:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=a.EditForm=void 0;var n=i(r(65)),o=i(r(102)),u=i(r(81)),s=i(r(36)),d=r(406),c=r(1193),f=i(r(1207)),p=r(556),m=i(r(674));class h extends c.ModalAction{constructor(){super(...arguments),(0,s.default)(this,"checkName",((e,a)=>{if(!a)return n.default.reject(t("Please input"));var{list:{data:r}}=this.store,{id:l}=this.item;return(0,o.default)(r).call(r,(e=>e.name===a&&e.id!==l))?n.default.reject(t("Invalid: User name can not be duplicated")):n.default.resolve()})),(0,s.default)(this,"onSubmit",(e=>{var{email:t,phone:a,real_name:r,description:l,name:i}=e,{id:n}=this.item;return f.default.edit(n,{email:t,phone:a,real_name:r,description:l,name:i})}))}init(){this.store=f.default}static allowed(){return n.default.resolve(!0)}get actionName(){return t("Edit User")}get defaultValue(){var e,{name:t,email:a,phone:r,real_name:l,description:i,domain:n,domain_id:o}=this.item,s=(0,m.default)(r||"","CN")||{countryCallingCode:"86",nationalNumber:""},{countryCallingCode:d,nationalNumber:c}=s;return{name:t,domainName:(n||{}).name||o,email:a,phone:(0,u.default)(e="+".concat(d," ")).call(e,c),real_name:l,description:i}}get formItems(){return[{name:"name",label:t("User Name"),type:"input",placeholder:t("Please input user name"),validator:this.checkName,extra:t("User")+t("Name can not be duplicated"),required:!0},{name:"email",label:t("Email"),type:"input",validator:p.emailValidate,required:!0},{name:"phone",label:t("Phone"),type:"phone",required:!0,validator:p.phoneNumberValidate},{name:"real_name",label:t("Real Name"),type:"input",required:!0},{name:"domainName",label:t("Affiliated Domain"),type:"input",disabled:!0},{name:"description",label:t("Description"),type:"textarea"}]}}a.EditForm=h,(0,s.default)(h,"id","user-edit"),(0,s.default)(h,"title",t("Edit")),(0,s.default)(h,"policy","identity:update_user");var v=(0,d.inject)("rootStore")((0,d.observer)(h));a.default=v},1592:function(e,t,a){"use strict";var r=a(19),l=a(21);r(t,"__esModule",{value:!0}),t.default=void 0;var i=l(a(1593)),n=l(a(3912)),o=l(a(1594)),u=l(a(3913)),s={rowActions:{firstAction:o.default,moreActions:[{action:u.default},{action:n.default}]},batchActions:[n.default],primaryActions:[i.default]};t.default=s},1593:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=a.Create=void 0;var n=i(r(65)),o=i(r(102)),u=i(r(36)),s=r(406),d=r(1193),c=i(r(1231)),f=i(r(1238)),p=r(1220);class m extends d.ModalAction{constructor(){super(...arguments),(0,u.default)(this,"checkName",((e,a)=>{if(!a)return n.default.reject(t("Please input"));var{list:{data:r=[]}={}}=this.store;return(0,o.default)(r).call(r,(e=>e.name===a))?n.default.reject(t("Invalid: User Group name can not be duplicated")):n.default.resolve()})),(0,u.default)(this,"onSubmit",(e=>this.store.create(e)))}init(){this.store=f.default,this.domainStore=c.default,this.domainStore.fetchDomain()}static allowed(){return n.default.resolve(!0)}get name(){return t("Create User Group")}get defaultValue(){return{domain_id:"default"}}get formItems(){var e=(0,p.getDomainFormItem)(this);return[{name:"name",label:t("User Group Name"),type:"input",placeholder:t("Please input name"),required:!0,validator:this.checkName,extra:t("User Groups")+t("Name can not be duplicated"),maxLength:30},e,{name:"description",label:t("Description"),type:"textarea"}]}}a.Create=m,(0,u.default)(m,"id","user-group-create"),(0,u.default)(m,"title",t("Create User Group")),(0,u.default)(m,"policy","identity:create_group");var h=(0,s.inject)("rootStore")((0,s.observer)(m));a.default=h},1594:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=a.EditForm=void 0;var n=i(r(65)),o=i(r(102)),u=i(r(36)),s=r(406),d=r(1193),c=i(r(1238));class f extends d.ModalAction{constructor(){super(...arguments),(0,u.default)(this,"checkName",((e,a)=>{if(!a)return n.default.reject(t("Please input"));var{list:{data:r}}=this.store,{id:l}=this.item;return(0,o.default)(r).call(r,(e=>e.name===a&&e.id!==l))?n.default.reject(t("Invalid: User Group name can not be duplicated")):n.default.resolve()})),(0,u.default)(this,"onSubmit",(e=>{var{description:t,name:a}=e,{id:r}=this.item;return c.default.edit({id:r,description:t,name:a})}))}init(){this.store=c.default}static allowed(){return n.default.resolve(!0)}get defaultValue(){var{name:e,description:t}=this.item;return{name:e,description:t}}get formItems(){return[{name:"name",label:t("User Group Name"),type:"input",placeholder:t("Please input name"),required:!0,validator:this.checkName,extra:t("User Groups")+t("Name can not be duplicated")},{name:"description",label:t("Description"),type:"textarea"}]}}a.EditForm=f,(0,u.default)(f,"id","user-group-edit"),(0,u.default)(f,"title",t("Edit")),(0,u.default)(f,"policy","identity:update_group");var p=(0,s.inject)("rootStore")((0,s.observer)(f));a.default=p},1595:function(e,t,a){"use strict";var r=a(19),l=a(21);r(t,"__esModule",{value:!0}),t.default=void 0;var i=l(a(3914)),n=l(a(1596)),o=l(a(3915)),u=l(a(3916)),s=l(a(1597)),d=l(a(3917)),c=l(a(3918)),f=l(a(3919)),p=l(a(3920)),m={rowActions:{firstAction:n.default,moreActions:[{action:i.default},{action:f.default},{action:d.default},{action:c.default},{action:o.default},{action:u.default},{action:p.default}]},batchActions:[i.default],primaryActions:[s.default]};t.default=m},1596:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=a.EditForm=void 0;var n=i(r(65)),o=i(r(102)),u=i(r(81)),s=i(r(36)),d=r(406),c=r(1193),f=i(r(407));class p extends c.ModalAction{constructor(){super(...arguments),(0,s.default)(this,"checkName",((e,a)=>{if(!a)return n.default.reject(t("Please input"));var{list:{data:r}}=this.store;return(0,o.default)(r).call(r,(e=>e.name===a&&e.id!==this.item.id))?n.default.reject(t("Invalid: Project name can not be duplicated")):n.default.resolve()})),(0,s.default)(this,"onSubmit",(e=>{var{description:t,name:a}=e,{id:r}=this.item;return f.default.edit({id:r,description:t,name:a})}))}init(){this.store=f.default,this.store.fetchList()}static allowed(){return n.default.resolve(!0)}get name(){var e,{name:a}=this.item;return(0,u.default)(e="".concat(t("Edit")," ")).call(e,a)}get defaultValue(){var{name:e,description:t,enabled:a}=this.item;return{name:e,description:t,enabled:a}}get formItems(){return[{name:"name",label:t("Name"),type:"input",value:this.item.name,validator:this.checkName,extra:t("Project")+t("Name can not be duplicated")},{name:"description",label:t("Description"),type:"textarea"}]}}a.EditForm=p,(0,s.default)(p,"id","project-edit"),(0,s.default)(p,"title",t("Edit")),(0,s.default)(p,"policy","identity:update_project");var m=(0,d.inject)("rootStore")((0,d.observer)(p));a.default=m},1597:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=a.Create=void 0;var n=i(r(65)),o=i(r(32)),u=i(r(36)),s=r(406),d=r(1193),c=i(r(1231)),f=i(r(407)),p=r(556),m=r(1220);class h extends d.ModalAction{constructor(e){super(e),(0,u.default)(this,"checkName",((e,a)=>{if(!a)return n.default.reject(t("Please input"));var{nameRegexWithoutChinese:r}=p.regex;if(!r.test(a))return n.default.reject(t("Invalid: Project name can not be chinese"));var{list:{data:l}}=this.projectStore;return(0,o.default)(l).call(l,(e=>e.name===a))[0]?n.default.reject(t("Invalid: Project name can not be duplicated")):n.default.resolve()})),(0,u.default)(this,"onSubmit",(e=>(e.enabled=e.enabled.value,this.projectStore.create(e)))),this.state={domain:null,newUserRoles:{},newGroupRoles:{}}}init(){this.domainStore=c.default,this.projectStore=f.default,this.getDomains()}getDomains(){this.domainStore.fetchDomain()}static allowed(){return n.default.resolve(!0)}get name(){return t("Create Project")}get defaultValue(){return{domain_id:"default",enabled:m.statusTypes[0]}}get formItems(){var e=(0,m.getDomainFormItem)(this);return[{name:"name",label:t("Name"),type:"input",required:!0,placeholder:t("Please input name"),validator:this.checkName,extra:t("Project")+t("Name can not be duplicated"),maxLength:30},e,{name:"enabled",label:t("Status"),type:"radio",optionType:"default",options:m.statusTypes,required:!0,isWrappedValue:!0,tip:t("Disabling the project will have a negative impact. If the users associated with the project are only assigned to the project, they will not be able to log in")},{name:"description",label:t("Description"),type:"textarea"}]}}a.Create=h,(0,u.default)(h,"id","project-create"),(0,u.default)(h,"title",t("Create Project")),(0,u.default)(h,"policy",["identity:create_project","identity:list_domains","identity:list_roles","identity:list_users"]);var v=(0,s.inject)("rootStore")((0,s.observer)(h));a.default=v},1599:function(e,t,a){"use strict";var r=a(19),l=a(21);r(t,"__esModule",{value:!0}),t.default=void 0;var i=l(a(3959)),n=l(a(3960)),o={rowActions:{firstAction:l(a(3961)).default,moreActions:[{action:n.default}]},batchActions:[n.default],primaryActions:[i.default]};t.default=o},3898:function(e,t,a){"use strict";var r=a(19),l=a(21);r(t,"__esModule",{value:!0}),t.default=void 0;var i=l(a(413)),n=l(a(3899)),o=e=>(0,i.default)(n.default,e);t.default=o},3899:function(e,t,a){"use strict";var r=a(19),l=a(21);r(t,"__esModule",{value:!0}),t.default=void 0;var i=l(a(1212)),n=l(a(567)),o=l(a(3900)),u=l(a(3906)),s=l(a(1348)),d=l(a(1597)),c=l(a(1596)),f=l(a(3924)),p=l(a(1306)),m=l(a(1590)),h=l(a(1591)),v=l(a(3928)),g=l(a(1308)),b=l(a(1593)),y=l(a(1594)),j=l(a(3957)),_=l(a(3958)),S=l(a(3962)),D="/identity",x=[{path:D,component:i.default,routes:[{path:"".concat(D,"/domain-admin"),component:o.default,exact:!0},{path:"".concat(D,"/domain-admin/detail/:id"),component:u.default,exact:!0},{path:"".concat(D,"/project"),component:s.default,exact:!0},{path:"".concat(D,"/project-admin"),component:s.default,exact:!0},{path:"".concat(D,"/project/create"),component:d.default,exact:!0},{path:"".concat(D,"/project-admin/create"),component:d.default,exact:!0},{path:"".concat(D,"/project/edit/:id"),component:c.default,exact:!0},{path:"".concat(D,"/project-admin/edit/:id"),component:c.default,exact:!0},{path:"".concat(D,"/user"),component:p.default,exact:!0},{path:"".concat(D,"/user-admin"),component:p.default,exact:!0},{path:"".concat(D,"/user-admin/create"),component:m.default,exact:!0},{path:"".concat(D,"/user-admin/edit/:id"),component:h.default,exact:!0},{path:"".concat(D,"/user-admin/detail/:id"),component:v.default,exact:!0},{path:"".concat(D,"/user-group-admin"),component:g.default,exact:!0},{path:"".concat(D,"/user-group-admin/detail/:id"),component:j.default,exact:!0},{path:"".concat(D,"/user-group-admin/create"),component:b.default,exact:!0},{path:"".concat(D,"/user-group-admin/edit/:id"),component:y.default,exact:!0},{path:"".concat(D,"/role-admin"),component:_.default,exact:!0},{path:"".concat(D,"/role-admin/detail/:id"),component:S.default,exact:!0},{path:"".concat(D,"/project/detail/:id"),component:f.default,exact:!0},{path:"".concat(D,"/project-admin/detail/:id"),component:f.default,exact:!0},{path:"*",component:n.default}]}];t.default=x},3900:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=a.Domains=void 0;var n=i(r(36)),o=r(406),u=i(r(1194)),s=i(r(1231)),d=r(1220),c=i(r(1588));class f extends u.default{constructor(){super(...arguments),(0,n.default)(this,"getColumns",(()=>[{title:t("Domain ID/Name"),dataIndex:"name",routeName:"domainDetailAdmin"},{title:t("Project Num"),dataIndex:"projectCount",isHideable:!0},{title:t("User Num"),dataIndex:"userCount",isHideable:!0},{title:t("User Group Num"),dataIndex:"groupCount",isHideable:!0},d.enabledColumn,{title:t("Description"),dataIndex:"description",isHideable:!0}]))}init(){this.store=s.default}get policy(){return"identity:list_domains"}get name(){return t("domains")}get isFilterByBackend(){return!1}get actionConfigs(){return c.default}get searchFilters(){return[{label:t("Domain Name"),name:"name"}]}}a.Domains=f;var p=(0,o.inject)("rootStore")((0,o.observer)(f));a.default=p},3901:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=a.Create=void 0;var n=i(r(65)),o=i(r(36)),u=r(406),s=i(r(1231)),d=r(1193),c=r(1220);class f extends d.ModalAction{constructor(){super(...arguments),(0,o.default)(this,"onSubmit",(e=>(e.enabled=e.enabled.value,this.store.create(e))))}init(){this.store=s.default}static allowed(){return n.default.resolve(!0)}get name(){return t("Create Domain")}get defaultValue(){return{enabled:c.statusTypes[0]}}get formItems(){return[{name:"name",label:t("Name"),type:"input",placeholder:t("Please input name"),required:!0,help:t("The name cannot be modified after creation")},{name:"description",label:t("Description"),type:"textarea"},{name:"enabled",label:t("Status"),type:"radio",optionType:"default",options:c.statusTypes,required:!0,isWrappedValue:!0,help:t("Forbidden the domain will have a negative impact, all project and user in domain will be forbidden")}]}}a.Create=f,(0,o.default)(f,"id","domain-create"),(0,o.default)(f,"title",t("Create Domain")),(0,o.default)(f,"policy","identity:create_domain");var p=(0,u.inject)("rootStore")((0,u.observer)(f));a.default=p},3902:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=void 0;var n=i(r(36)),o=r(1193),u=i(r(1231));class s extends o.ConfirmAction{constructor(){super(...arguments),(0,n.default)(this,"policy","identity:delete_domain"),(0,n.default)(this,"allowedCheckFunc",(e=>!e.enabled)),(0,n.default)(this,"onSubmit",(e=>{var{id:t}=e;return u.default.delete({id:t})}))}get id(){return"delete"}get title(){return t("Delete Domain")}get isDanger(){return!0}get buttonText(){return t("Delete")}get actionName(){return t("delete domain")}}a.default=s},3903:function(e,a,r){"use strict";var l=r(33),i=r(44),n=r(32),o=r(25),u=r(27),s=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=a.Edit=void 0;var p=f(r(65)),m=f(r(51)),h=f(r(36)),v=r(406),g=r(1193),b=f(r(1231));function y(e,t){var a=l(e);if(i){var r=i(e);t&&(r=n(r).call(r,(function(t){return o(e,t).enumerable}))),a.push.apply(a,r)}return a}class j extends g.ModalAction{constructor(){var e;super(...arguments),e=this,(0,h.default)(this,"onSubmit",function(){var t=(0,m.default)((function*(t){var{id:a}=e.item;return e.store.edit(function(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)u(a=y(Object(r),!0)).call(a,(function(t){(0,h.default)(e,t,r[t])}));else if(s)d(e,s(r));else{var l;u(l=y(Object(r))).call(l,(function(t){c(e,t,o(r,t))}))}}return e}({id:a},t))}));return function(e){return t.apply(this,arguments)}}())}init(){this.store=b.default}static allowed(){return p.default.resolve(!0)}get defaultValue(){var{name:e,description:t}=this.item;return{name:e,description:t}}get formItems(){return[{name:"name",label:t("Name"),type:"input",placeholder:t("Please input name"),help:t("The name cannot be modified after creation"),disabled:!0},{name:"description",label:t("Description"),type:"textarea"}]}}a.Edit=j,(0,h.default)(j,"id","domain-edit"),(0,h.default)(j,"title",t("Edit Domain")),(0,h.default)(j,"buttonText",t("Edit")),(0,h.default)(j,"policy","identity:update_domain");var _=(0,v.inject)("rootStore")((0,v.observer)(j));a.default=_},3904:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=void 0;var n=i(r(36)),o=r(1193),u=i(r(1231));class s extends o.ConfirmAction{constructor(){super(...arguments),(0,n.default)(this,"policy","identity:update_domain"),(0,n.default)(this,"allowedCheckFunc",(e=>!e||this.isEnable(e))),(0,n.default)(this,"onSubmit",(()=>{var{id:e}=this.item;return u.default.enable({id:e})}))}get id(){return"Enable"}get title(){return t("Enable Domain")}get buttonText(){return t("Enable")}get actionName(){return t("Enable Domain")}isEnable(e){return!0!==e.enabled}}a.default=s},3905:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=void 0;var n=i(r(57)),o=i(r(36)),u=i(r(91)),s=r(1193),d=i(r(1231));class c extends s.ConfirmAction{constructor(){super(...arguments),(0,o.default)(this,"policy","identity:update_domain"),(0,o.default)(this,"allowedCheckFunc",(e=>!e||this.isForbidden(e))),(0,o.default)(this,"confirmContext",(e=>{var a=(0,u.default)(e)?(0,n.default)(e).call(e,(e=>e.name)).join(","):e.name;return t("Are you sure to forbidden domain { name }? Forbidden the domain will have negative effect, and users associated with the domain will not be able to log in if they are only assigned to the domain",{name:a})})),(0,o.default)(this,"onSubmit",(()=>{var{id:e}=this.item;return d.default.forbidden({id:e})}))}get id(){return"Forbidden"}get title(){return t("Forbidden Domain")}get buttonText(){return t("Forbidden")}get actionName(){return t("Forbidden Domain")}get isDanger(){return!0}isForbidden(e){return!1!==e.enabled}}a.default=c},3906:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=a.DomainDetail=void 0;var n=r(406),o=r(1231),u=i(r(1200)),s=r(1220),d=i(r(1306)),c=i(r(1308)),f=i(r(1348)),p=i(r(1588));class m extends u.default{get name(){return t("domain")}get policy(){return"identity:get_domain"}get listUrl(){return this.getRoutePath("domain")}get actionConfigs(){return p.default}get detailInfos(){return[{title:t("Domain Name"),dataIndex:"name"},s.enabledColumn,{title:t("Project Num"),dataIndex:"projectCount"},{title:t("User Num"),dataIndex:"userCount"},{title:t("User Group Num"),dataIndex:"groupCount"},{title:t("Description"),dataIndex:"description"}]}get tabs(){return[{title:t("Projects"),key:"project",component:f.default},{title:t("Users"),key:"user",component:d.default},{title:t("User Groups"),key:"userGroup",component:c.default}]}init(){this.store=new o.DomainStore}}a.DomainDetail=m;var h=(0,n.inject)("rootStore")((0,n.observer)(m));a.default=h},3907:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=void 0;var n=i(r(36)),o=r(1193),u=i(r(1207));class s extends o.ConfirmAction{constructor(){super(...arguments),(0,n.default)(this,"policy","identity:delete_user"),(0,n.default)(this,"onSubmit",(e=>{var{id:t}=e;return u.default.delete({id:t})}))}get id(){return"delete"}get title(){return t("Delete User")}get isDanger(){return!0}get buttonText(){return t("Delete")}get actionName(){return t("delete user")}}a.default=s},3908:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=void 0;var n=i(r(36)),o=r(1193),u=i(r(1207));class s extends o.ConfirmAction{constructor(){super(...arguments),(0,n.default)(this,"policy","identity:update_user"),(0,n.default)(this,"allowedCheckFunc",(e=>!e||this.isEnable(e))),(0,n.default)(this,"onSubmit",(()=>{var{id:e}=this.item;return u.default.enable({id:e})}))}get id(){return"Enable"}get title(){return t("Enable User")}get buttonText(){return t("Enable")}get actionName(){return t("Enable User")}isEnable(e){return!e.enabled}}a.default=s},3909:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=void 0;var n=i(r(57)),o=i(r(36)),u=i(r(91)),s=r(1193),d=i(r(1207));class c extends s.ConfirmAction{constructor(){super(...arguments),(0,o.default)(this,"policy","identity:update_user"),(0,o.default)(this,"allowedCheckFunc",(e=>!e||this.isForbidden(e))),(0,o.default)(this,"confirmContext",(e=>{var a=(0,u.default)(e)?(0,n.default)(e).call(e,(e=>e.name)).join(","):e.name;return t("Are you sure to forbidden user { name }? Forbidden the user will not allow login in ",{name:a})})),(0,o.default)(this,"onSubmit",(()=>{var{id:e}=this.item;return d.default.forbidden({id:e})}))}get id(){return"Forbidden"}get title(){return t("Forbidden User")}get buttonText(){return t("Forbidden")}get isDanger(){return!0}get actionName(){return t("Forbidden User")}isForbidden(e){return!!e.enabled}}a.default=c},3910:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=a.SystemRole=void 0;var n=i(r(57)),o=i(r(27)),u=i(r(198)),s=i(r(65)),d=i(r(90)),c=i(r(51)),f=i(r(36)),p=r(406),m=r(1193),h=r(1207),v=i(r(1244));class g extends m.ModalAction{constructor(){var e;super(...arguments),e=this,(0,f.default)(this,"onSubmit",function(){var t=(0,c.default)((function*(t){var{role:a}=t,{systemRoles:r,id:l}=e.item,i=[],d=a?[a]:[],c=(0,n.default)(r).call(r,(e=>e.id));return(0,o.default)(r).call(r,(t=>{var{id:a}=t;(0,u.default)(d).call(d,a)||i.push(e.store.deleteSystemRole({id:l,roleId:a}))})),(0,o.default)(d).call(d,(t=>{(0,u.default)(c).call(c,t)||i.push(e.store.assignSystemRole({id:l,roleId:t}))})),yield s.default.all(i)}));return function(e){return t.apply(this,arguments)}}())}init(){this.store=new h.UserStore,this.roleStore=v.default,this.getRoleList()}getRoleList(){this.roleStore.fetchSystemRoles()}get name(){return t("edit system permission")}get rolesList(){var e;return(0,n.default)(e=this.roleStore.systemRoles.data||[]).call(e,(e=>({label:e.name,value:e.id})))}get defaultValue(){var{name:e,systemRoles:t=[]}=this.item,a=(0,n.default)(t).call(t,(e=>e.id))[0];return a?{name:e,role:a}:{name:e}}static allowed(e,t){var{match:{path:a=""}={}}=t||{};return(0,d.default)(a).call(a,"domain-admin/detail")>=0?s.default.resolve(!1):s.default.resolve(!0)}get formItems(){return[{name:"name",label:t("User"),type:"label",iconType:"user"},{name:"role",label:t("Role"),type:"select",options:this.rolesList,loading:this.roleStore.systemRoles.isLoading}]}}a.SystemRole=g,(0,f.default)(g,"id","edit-system-permission"),(0,f.default)(g,"title",t("Edit System Permission")),(0,f.default)(g,"policy","identity:list_roles");var b=(0,p.inject)("rootStore")((0,p.observer)(g));a.default=b},3911:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=a.Password=void 0;var n=i(r(65)),o=i(r(36)),u=r(406),s=r(1193),d=r(556),c=i(r(1207));class f extends s.ModalAction{constructor(){super(...arguments),(0,o.default)(this,"onSubmit",(e=>{var{id:t}=this.item,{password:a}=e;return c.default.changePassword({id:t,password:a})}))}get name(){return t("Update user password")}get defaultValue(){var{name:e}=this.item;return{name:e,password:"",confirmPassword:""}}get formItems(){return[{name:"name",label:t("User"),type:"label",iconType:"user"},{name:"password",label:t("Password"),type:"input-password",required:!0,otherRule:(0,d.getPasswordOtherRule)("password")},{name:"confirmPassword",label:t("Confirm Password"),dependencies:["password"],type:"input-password",required:!0,otherRule:(0,d.getPasswordOtherRule)("confirmPassword")}]}}a.Password=f,(0,o.default)(f,"id","update-user-password"),(0,o.default)(f,"title",t("Update User Password")),(0,o.default)(f,"policy","identity:update_user"),(0,o.default)(f,"allowed",(()=>n.default.resolve(!0)));var p=(0,u.inject)("rootStore")((0,u.observer)(f));a.default=p},3912:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=void 0;var n=i(r(36)),o=r(1193),u=i(r(1238));class s extends o.ConfirmAction{constructor(){super(...arguments),(0,n.default)(this,"policy","identity:delete_group"),(0,n.default)(this,"onSubmit",(e=>{var{id:t}=e;return u.default.delete({id:t})}))}get id(){return"delete"}get title(){return t("Delete Group")}get isDanger(){return!0}get buttonText(){return t("Delete")}get actionName(){return t("delete group")}}a.default=s},3913:function(e,a,r){"use strict";var l=r(33),i=r(44),n=r(32),o=r(25),u=r(27),s=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=a.ManageUser=void 0;var p=f(r(27)),m=f(r(90)),h=f(r(65)),v=f(r(57)),g=f(r(51)),b=f(r(36)),y=r(406),j=r(1207),_=r(1238),S=r(1193),D=r(1220);function x(e,t){var a=l(e);if(i){var r=i(e);t&&(r=n(r).call(r,(function(t){return o(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)u(a=x(Object(r),!0)).call(a,(function(t){(0,b.default)(e,t,r[t])}));else if(s)d(e,s(r));else{var l;u(l=x(Object(r))).call(l,(function(t){c(e,t,o(r,t))}))}}return e}class R extends S.ModalAction{constructor(){var e;super(...arguments),e=this,(0,b.default)(this,"onSubmit",function(){var t=(0,g.default)((function*(t){var a,{select_user:r}=t,{id:l}=e.item,i=[];return(0,p.default)(a=e.groupUsers).call(a,(t=>{-1===(0,m.default)(r).call(r,t)&&i.push(e.store.deleteGroupUsers({id:l,userId:t}))})),(0,p.default)(r).call(r,(t=>{var a;-1===(0,m.default)(a=e.groupUsers).call(a,t)&&i.push(e.store.addGroupUsers({id:l,userId:t}))})),yield h.default.all(i)}));return function(e){return t.apply(this,arguments)}}())}get name(){return t("Manage user")}static get modalSize(){return"large"}getModalSize(){return"large"}init(){var e=this;return(0,g.default)((function*(){e.state.groupUsers=[],e.store=new _.GroupStore,e.userStore=new j.UserStore,e.getGroupUsers(),e.getAllUser()}))()}getAllUser(){this.userStore.fetchList({withProjectRole:!1,withSystemRole:!1})}getGroupUsers(){var e=this;return(0,g.default)((function*(){yield e.store.fetchGroupUsers(e.item),e.setState({groupUsers:e.groupUsers}),e.updateDefaultValue()}))()}get userList(){var e=this.userStore.list.data||[];return(0,v.default)(e).call(e,(e=>C(C({},e),{},{key:e.id})))}get groupUsers(){var e;return(0,v.default)(e=this.store.groupUsers||[]).call(e,(e=>e.id))}get leftUserTable(){return D.nameDomainColumns}get rightUserTable(){return D.nameDomainColumns}get defaultValue(){var{name:e,domainName:t}=this.item;return{name:e,domain:t,select_user:this.groupUsers}}get formItems(){return[{name:"name",type:"label",label:t("Name"),iconType:"group"},{name:"domain",type:"label",label:t("Domain")},{name:"select_user",type:"transfer",label:t("User"),leftTableColumns:this.leftUserTable,rightTableColumns:this.rightUserTable,dataSource:this.userList,disabled:!1,showSearch:!0,filterOption:D.transferFilterOption,loading:this.userStore.list.isLoading}]}}a.ManageUser=R,(0,b.default)(R,"id","manage-user"),(0,b.default)(R,"title",t("Manage User")),(0,b.default)(R,"policy",["identity:list_users_in_group","identity:list_users_in_group","identity:add_user_to_group"]),(0,b.default)(R,"allowed",(()=>h.default.resolve(!0)));var w=(0,y.inject)("rootStore")((0,y.observer)(R));a.default=w},3914:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=void 0;var n=i(r(36)),o=r(1193),u=i(r(407));class s extends o.ConfirmAction{constructor(){super(...arguments),(0,n.default)(this,"policy","identity:delete_project"),(0,n.default)(this,"submitErrorMsg",((e,a)=>{var r=this.getName(e);return 400===a.status&&a.reason&&403===a.reason.code&&/^Resource(.*?)exists$/.test(a.reason.message)?t("There are resources under the project and cannot be deleted."):t("Unable to {action} {name}.",{action:this.actionName||this.title,name:r})})),(0,n.default)(this,"onSubmit",(e=>{var{id:t}=e;return u.default.delete({id:t})}))}get id(){return"delete"}get title(){return t("Delete Project")}get isDanger(){return!0}get buttonText(){return t("Delete")}get actionName(){return t("delete project")}}a.default=s},3915:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=void 0;var n=i(r(36)),o=r(1193),u=i(r(407));class s extends o.ConfirmAction{constructor(){super(...arguments),(0,n.default)(this,"policy","identity:update_project"),(0,n.default)(this,"allowedCheckFunc",(e=>!e||this.isEnable(e))),(0,n.default)(this,"onSubmit",(()=>{var{id:e}=this.item;return u.default.enable({id:e})}))}get id(){return"Enable"}get title(){return t("Enable Project")}get buttonText(){return t("Enable")}get actionName(){return t("Enable Project")}isEnable(e){return!0!==e.enabled}}a.default=s},3916:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=void 0;var n=i(r(57)),o=i(r(36)),u=i(r(91)),s=r(1193),d=i(r(407));class c extends s.ConfirmAction{constructor(){super(...arguments),(0,o.default)(this,"policy","identity:update_project"),(0,o.default)(this,"allowedCheckFunc",(e=>!e||this.isForbidden(e))),(0,o.default)(this,"confirmContext",(e=>{var a=(0,u.default)(e)?(0,n.default)(e).call(e,(e=>e.name)).join(","):e.name;return t("Are you sure to forbidden project { name }? Forbidden the project will have negative effect, and users associated with the project will not be able to log in if they are only assigned to the project",{name:a})})),(0,o.default)(this,"onSubmit",(()=>{var{id:e}=this.item;return d.default.forbidden({id:e})}))}get id(){return"Forbidden"}get title(){return t("Forbidden Project")}get buttonText(){return t("Forbidden")}get actionName(){return t("Forbidden Project")}get isDanger(){return!0}isForbidden(e){return!1!==e.enabled}}a.default=c},3917:function(e,a,r){"use strict";var l=r(33),i=r(44),n=r(32),o=r(25),u=r(27),s=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=a.ManageUser=void 0;var p=f(r(57)),m=f(r(27)),h=f(r(33)),v=f(r(198)),g=f(r(65)),b=f(r(174)),y=f(r(51));r(560);var j=f(r(412)),_=f(r(36)),S=f(r(0)),D=r(406),x=(r(173),f(r(407))),C=r(1207),R=r(1244),w=r(1193),I=r(1220),P=r(1307);function U(e,t){var a=l(e);if(i){var r=i(e);t&&(r=n(r).call(r,(function(t){return o(e,t).enumerable}))),a.push.apply(a,r)}return a}function N(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)u(a=U(Object(r),!0)).call(a,(function(t){(0,_.default)(e,t,r[t])}));else if(s)d(e,s(r));else{var l;u(l=U(Object(r))).call(l,(function(t){c(e,t,o(r,t))}))}}return e}class T extends w.ModalAction{constructor(){var e;super(...arguments),e=this,(0,_.default)(this,"userRolesList",(e=>{var t;return(0,p.default)(t=this.projectRoleList).call(t,(t=>({label:t.name,value:t.id,key:t.id,user_id:e})))})),(0,_.default)(this,"defaultRoles",(e=>{var t,{users:a}=this.item;return a[e]?(0,p.default)(t=a[e]).call(t,(e=>e.id)):[this.projectRoleList[0].id]})),(0,_.default)(this,"renderSelect",(e=>S.default.createElement(j.default,{size:"small",mode:"multiple",options:this.userRolesList(e),defaultValue:this.defaultRoles(e),filterOption:P.roleFilterOption,onChange:(t,a)=>{this.onSelectChange(t,a,e)}}))),(0,_.default)(this,"onSelectChange",((e,t,a)=>{var{userRoles:r}=this.state;e.length&&t.length?r[a]=e:r[a]=[],this.setState({userRoles:r})})),(0,_.default)(this,"onChangeUser",(e=>{var t,a,{userRoles:r}=this.state;(0,m.default)(t=e||[]).call(t,(e=>{r[e]||(r[e]=this.defaultRoles(e))})),(0,m.default)(a=(0,h.default)(r)).call(a,(t=>{var a;(0,v.default)(a=e||[]).call(a,t)||delete r[t]})),this.setState(r)})),(0,_.default)(this,"onSubmit",(0,y.default)((function*(){var t,a,{userRoles:r}=e.state,{id:l}=e.item,i=e.getInitRoleMap(),n=[];return(0,m.default)(t=(0,h.default)(i)).call(t,(e=>{var t;(0,m.default)(t=i[e]||[]).call(t,(t=>{var a=r[e]||[];(0,v.default)(a).call(a,t)||n.push(x.default.removeUserRole({id:l,userId:e,roleId:t}))}))})),(0,m.default)(a=(0,h.default)(r)).call(a,(e=>{var t,a=i[e]||[];(0,m.default)(t=r[e]).call(t,(t=>{(0,v.default)(a).call(a,t)||n.push(x.default.assignUserRole({id:l,userId:e,roleId:t}))}))})),yield g.default.all(n)})))}get name(){return t("Manage user")}init(){var e=this;return(0,y.default)((function*(){e.state.userRoles=e.getInitRoleMap(),e.store=new R.RoleStore,e.userStore=new C.UserStore,e.getRoleList(),e.getUser()}))()}getRoleList(){return this.store.fetchList()}getUser(){this.userStore.fetchList({withProjectRole:!1,withSystemRole:!1})}getInitRoleMap(){var e,{users:t={}}=this.item;return(0,b.default)(e=(0,h.default)(t)).call(e,((e,a)=>{var r;return e[a]=(0,p.default)(r=t[a]).call(r,(e=>e.id)),e}),{})}static get modalSize(){return"large"}getModalSize(){return"large"}get labelCol(){return{xs:{span:4},sm:{span:2}}}get wrapperCol(){return{xs:{span:20},sm:{span:20}}}get userList(){var e=this.userStore.list.data||[];return(0,p.default)(e).call(e,(e=>N(N({},e),{},{key:e.id})))}get projectRoleList(){return this.store.list.data||[]}get leftUserTable(){return I.nameDomainColumns}get rightUserTable(){return[...I.nameDomainColumns,{title:t("Select Project Role"),dataIndex:"id",render:e=>this.renderSelect(e)}]}get defaultValue(){var{name:e,domainName:t}=this.item;return{name:e,domain:t}}get formItems(){var{users:e}=this.item;return[{name:"name",type:"label",label:t("Name"),iconType:"project"},{name:"domain",type:"label",label:t("Domain")},{name:"select_user",type:"transfer",label:t("User"),leftTableColumns:this.leftUserTable,rightTableColumns:this.rightUserTable,dataSource:this.userList,showSearch:!0,oriTargetKeys:e?(0,h.default)(e):[],onChange:this.onChangeUser,filterOption:I.transferFilterOption,wrapperCol:this.wrapperCol,loading:this.userStore.list.isLoading,onRowRight:()=>null}]}}a.ManageUser=T,(0,_.default)(T,"id","management-user"),(0,_.default)(T,"title",t("Manage User")),(0,_.default)(T,"policy","identity:update_project"),(0,_.default)(T,"allowed",(()=>g.default.resolve(!0)));var M=(0,D.inject)("rootStore")((0,D.observer)(T));a.default=M},3918:function(e,a,r){"use strict";var l=r(33),i=r(44),n=r(32),o=r(25),u=r(27),s=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=a.ManageUserGroup=void 0;var p=f(r(57)),m=f(r(27)),h=f(r(33)),v=f(r(198)),g=f(r(65)),b=f(r(174)),y=f(r(51));r(560);var j=f(r(412)),_=f(r(36)),S=f(r(0)),D=r(406),x=(r(173),f(r(407))),C=r(1238),R=f(r(1244)),w=r(1193),I=r(1220),P=r(1307);function U(e,t){var a=l(e);if(i){var r=i(e);t&&(r=n(r).call(r,(function(t){return o(e,t).enumerable}))),a.push.apply(a,r)}return a}function N(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)u(a=U(Object(r),!0)).call(a,(function(t){(0,_.default)(e,t,r[t])}));else if(s)d(e,s(r));else{var l;u(l=U(Object(r))).call(l,(function(t){c(e,t,o(r,t))}))}}return e}class T extends w.ModalAction{constructor(){var e;super(...arguments),e=this,(0,_.default)(this,"groupRolesList",(e=>{var t;return(0,p.default)(t=this.projectRoleList).call(t,(t=>({label:t.name,value:t.id,key:t.id,groupId:e})))})),(0,_.default)(this,"defaultRoles",(e=>{var t,{groups:a}=this.item;return a[e]?(0,p.default)(t=a[e]).call(t,(e=>e.id)):[this.projectRoleList[0].id]})),(0,_.default)(this,"renderSelect",(e=>S.default.createElement(j.default,{size:"small",mode:"multiple",options:this.groupRolesList(e),defaultValue:this.defaultRoles(e),filterOption:P.roleFilterOption,onChange:(t,a)=>{this.onSubChange(t,a,e)}}))),(0,_.default)(this,"onSubChange",((e,t,a)=>{var{groupRoles:r}=this.state;e.length&&t.length?r[a]=e:r[a]={},this.setState({groupRoles:r})})),(0,_.default)(this,"onChangeUserGroup",(e=>{var t,a,{groupRoles:r}=this.state;(0,m.default)(t=e||[]).call(t,(e=>{r[e]||(r[e]=this.defaultRoles(e))})),(0,m.default)(a=(0,h.default)(r)).call(a,(t=>{var a;(0,v.default)(a=e||[]).call(a,t)||delete r[t]})),this.setState(r)})),(0,_.default)(this,"onSubmit",(0,y.default)((function*(){var t,a,{groupRoles:r={}}=e.state,{id:l}=e.item,i=e.getInitRoleMap(),n=[];return(0,m.default)(t=(0,h.default)(i)).call(t,(e=>{var t;(0,m.default)(t=i[e]||[]).call(t,(t=>{var a=r[e]||[];(0,v.default)(a).call(a,t)||n.push(x.default.removeGroupRole({id:l,groupId:e,roleId:t}))}))})),(0,m.default)(a=(0,h.default)(r)).call(a,(e=>{var t,a=i[e]||[];(0,m.default)(t=r[e]).call(t,(t=>{(0,v.default)(a).call(a,t)||n.push(x.default.assignGroupRole({id:l,groupId:e,roleId:t}))}))})),yield g.default.all(n)})))}init(){var e=this;return(0,y.default)((function*(){e.state.groupRoles=e.getInitRoleMap(),e.userGroupStore=new C.GroupStore,e.store=R.default,e.getRoleList(),e.getGroupGroup()}))()}get name(){return t("Manage user group")}getInitRoleMap(){var e,{groups:t={}}=this.item;return(0,b.default)(e=(0,h.default)(t)).call(e,((e,a)=>{var r;return e[a]=(0,p.default)(r=t[a]).call(r,(e=>e.id)),e}),{})}getGroupGroup(){this.userGroupStore.fetchList()}getRoleList(){this.store.fetchList()}static get modalSize(){return"large"}getModalSize(){return"large"}get labelCol(){return{xs:{span:4},sm:{span:2}}}get wrapperCol(){return{xs:{span:20},sm:{span:20}}}get groupList(){var e;return(0,p.default)(e=this.userGroupStore.list.data||[]).call(e,(e=>N(N({},e),{},{key:e.id})))}get projectRoleList(){return this.store.list.data||[]}get leftGroupGroupTable(){return I.nameDomainColumns}get rightGroupGroupTable(){return[...I.nameDomainColumns,{title:t("Select Project Role"),dataIndex:"id",render:e=>this.renderSelect(e)}]}get defaultValue(){var{name:e,domainName:t}=this.item;return{name:e,domain:t}}get formItems(){var{groups:e}=this.item;return[{name:"name",type:"label",label:t("Name"),iconType:"project"},{name:"domain",type:"label",label:t("Domain")},{name:"select_group",label:t("User Group"),type:"transfer",leftTableColumns:this.leftGroupGroupTable,rightTableColumns:this.rightGroupGroupTable,dataSource:this.groupList,disabled:!1,showSearch:!0,oriTargetKeys:e?(0,h.default)(e):[],filterOption:I.transferFilterOption,onChange:this.onChangeUserGroup,wrapperCol:this.wrapperCol,loading:this.userGroupStore.list.isLoading,onRowRight:()=>null}]}}a.ManageUserGroup=T,(0,_.default)(T,"id","manage-group-group"),(0,_.default)(T,"title",t("Manage User Group")),(0,_.default)(T,"policy","identity:update_project"),(0,_.default)(T,"allowed",(()=>g.default.resolve(!0)));var M=(0,D.inject)("rootStore")((0,D.observer)(T));a.default=M},3919:function(e,a,r){"use strict";var l=r(160),i=r(19),n=r(25),o=r(21);i(a,"__esModule",{value:!0}),a.default=a.ManageQuota=void 0;var u=o(r(65)),s=o(r(27)),d=o(r(33)),c=o(r(102)),f=o(r(57)),p=o(r(62)),m=o(r(51)),h=o(r(36)),v=r(406),g=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var a=S(t);if(a&&a.has(e))return a.get(e);var r={},l=i&&n;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var u=l?n(e,o):null;u&&(u.get||u.set)?i(r,o,u):r[o]=e[o]}r.default=e,a&&a.set(e,r);return r}(r(407)),b=o(r(0)),y=r(1193),j=r(566),_=r(1393);function S(e){if("function"!=typeof l)return null;var t=new l,a=new l;return(S=function(e){return e?a:t})(e)}class D extends y.ModalAction{constructor(){var e;super(...arguments),e=this,(0,h.default)(this,"checkMin",((e,a)=>{var{quota:r}=this.projectStore,{field:l}=e,{used:i}=r[l];return a<i&&-1!==a||!/^-?\d+$/.test(a)?u.default.reject(t("Invalid: Quota value(s) cannot be less than the current usage value(s): { used } used.",{used:i})):u.default.resolve()})),(0,h.default)(this,"getTitleLabel",((e,t,a)=>({name:e,label:"",type:"label",content:b.default.createElement("div",{style:{textAlign:"center",fontWeight:"bolder"}},t),wrapperCol:{span:24},hidden:a}))),(0,h.default)(this,"onSubmit",function(){var t=(0,m.default)((function*(t){return e.store.updateProjectQuota(t)}));return function(e){return t.apply(this,arguments)}}())}init(){this.store=g.default,this.projectStore=new g.ProjectStore,this.volumeTypeStore=new j.VolumeTypeStore,this.getData()}get name(){return t("Edit quota")}get enableCinder(){return this.props.rootStore.checkEndpoint("cinder")}get enableShare(){return this.props.rootStore.checkEndpoint("manilav2")}get enableZun(){return this.props.rootStore.checkEndpoint("zun")}get enableTrove(){return this.props.rootStore.checkEndpoint("trove")&&this.props.rootStore.hasAdminOnlyRole}getData(){var e=this;return(0,m.default)((function*(){var{id:t}=e.item,a=[e.projectStore.fetchProjectQuota({project_id:t})];e.enableCinder&&a.push(e.volumeTypeStore.fetchProjectVolumeTypes(t)),yield u.default.all(a),e.updateDefaultValue()}))()}get tips(){return t("quota set to -1 means there is no quota limit on the current resource")}get defaultValue(){var e,{quota:t={}}=this.projectStore,a={};return(0,s.default)(e=(0,d.default)(t)).call(e,(e=>{var r;if((0,c.default)(r=this.formItems).call(r,(t=>t.name===e))){var{limit:l}=t[e]||{};a[e]=l}})),a}getInputItem(e,t,a){return{name:e,label:t,type:"input-number",labelCol:{span:14},colNum:2,validator:this.checkMin,hidden:a}}get quotaCardList(){var e=[..._.quotaCardList];return this.enableShare&&e.push(_.shareQuotaCard),this.enableZun&&e.push(_.zunQuotaCard),this.enableTrove&&e.push(_.troveQuotaCard),e}getFormItemsByCards(e){var t,a=(0,c.default)(t=this.quotaCardList).call(t,(t=>t.type===e));if(!a)return[];var{type:r,text:l,value:i}=a;return[this.getTitleLabel(r,l),...(0,f.default)(i).call(i,(e=>{var{key:t,text:a}=e;return this.getInputItem(t,a)}))]}getComputeFormItems(){return[...this.getFormItemsByCards("compute"),this.getInputItem("server_group_members",t("Members of Each Server Group"))]}get volumeTypeData(){var{projectVolumeTypes:e=[]}=this.volumeTypeStore;return e}getVolumeTypeFormItems(){var{more:e}=this.state,t=(0,_.getVolumeTypeCards)(this.volumeTypeData),{type:a,text:r,value:l}=t,i=[];return(0,s.default)(l).call(l,(e=>i.push(...e.value))),[this.getTitleLabel(a,r,!e),...(0,f.default)(i).call(i,(t=>this.getInputItem(t.key,t.text,!e)))]}get formItems(){var e=[...this.getComputeFormItems(),...this.getFormItemsByCards("networks")];if(this.enableShare&&e.push(...this.getFormItemsByCards("share")),this.enableZun&&e.push(...this.getFormItemsByCards("zun")),this.enableTrove&&e.push(...this.getFormItemsByCards("trove")),this.enableCinder){var a=this.getFormItemsByCards("storage"),r=this.getVolumeTypeFormItems();e.push(...a),e.push({name:"more",label:t("Advanced Options"),type:"more"},...r)}return e}getSubmitData(e){var{id:t}=this.item,{more:a,compute:r,storage:l,networks:i,volumeTypes:n,share:o,zun:u}=e;return{project_id:t,data:(0,p.default)(e,["more","compute","storage","networks","volumeTypes","share","zun"])}}}a.ManageQuota=D,(0,h.default)(D,"id","quota-management"),(0,h.default)(D,"title",t("Edit Quota")),(0,h.default)(D,"policy",["os_compute_api:os-quota-sets:update","os_compute_api:os-quota-sets:defaults"]),(0,h.default)(D,"allowed",(()=>u.default.resolve(!0)));var x=(0,v.inject)("rootStore")((0,v.observer)(D));a.default=x},3920:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=a.ModifyTags=void 0;var n=i(r(65)),o=i(r(226)),u=i(r(198)),s=i(r(36)),d=i(r(202)),c=i(r(0)),f=r(406),p=r(1193),m=i(r(1543)),h=i(r(3921));class v extends p.ModalAction{constructor(){super(...arguments),(0,s.default)(this,"onSubmit",(e=>h.default.update({project_id:this.props.item.id},e)))}get name(){return t("modify project tags")}init(){this.state={tags:this.props.item.tags}}get formItems(){var{tags:e}=this.state;return[{name:"tags",label:t("Tags"),component:c.default.createElement(m.default,{tags:e}),validator:(e,a)=>{var r=this.props.item.tags||[];if((0,d.default)(a,r))return n.default.resolve(!0);var l="";return(0,o.default)(a).call(a,(e=>{var t=(0,u.default)(e).call(e,"/")||(0,u.default)(e).call(e,",");return t&&(l=e),t}))?n.default.reject(new Error(t("Invalid Tag Value: {tag}",{tag:l}))):(0,o.default)(r).call(r,(function(e){return(0,o.default)(a).call(a,(t=>{var a=e!==t&&t.toLowerCase()===e.toLowerCase();return a&&(l=t),a}))}))?n.default.reject(new Error(t("Duplicate tag name: {tag}",{tag:l}))):n.default.resolve(!0)},extra:c.default.createElement("div",null,c.default.createElement("div",null,"1. ",t("Tags are not case sensitive")),c.default.createElement("div",null,"2. ",t("Forward Slash / is not allowed to be in a tag name")),c.default.createElement("div",null,"3."," ",t("Commas , are not allowed to be in a tag name in order to simplify requests that specify lists of tags")))}]}}a.ModifyTags=v,(0,s.default)(v,"id","modify-project-tags"),(0,s.default)(v,"title",t("Modify Project Tags")),(0,s.default)(v,"buttonText",t("Modify Project Tags")),(0,s.default)(v,"policy","identity:update_project_tags"),(0,s.default)(v,"allowed",(()=>n.default.resolve(!0)));var g=(0,f.inject)("rootStore")((0,f.observer)(v));a.default=g},3921:function(e,t,a){"use strict";var r=a(19),l=a(21);r(t,"__esModule",{value:!0}),t.default=t.TagStore=void 0;var i,n=l(a(25)),o=l(a(54)),u=a(34),s=l(a(48)),d=l(a(53)),c=(i=class extends d.default{get client(){return s.default.keystone.projects.tags}get projectClient(){return s.default.keystone.projects}listFetchByClient(e,t){var{project_id:a}=t;return this.client.list(a,e)}get paramsFunc(){return()=>null}update(e,t){var{project_id:a}=e;return this.submitting(this.projectClient.updateTags(a,t))}},(0,o.default)(i.prototype,"update",[u.action],(0,n.default)(i.prototype,"update"),i.prototype),i);t.TagStore=c;var f=new c;t.default=f},3922:function(e,t,a){var r=a(3923);"string"==typeof r&&(r=[[e.i,r,""]]);var l={hmr:!0,transform:undefined,insertInto:void 0};a(75)(r,l);r.locals&&(e.exports=r.locals)},3923:function(e,t,a){(t=e.exports=a(74)(!1)).push([e.i,"/* init */\n/* specific color */\n/* border */\n/* background */\n/* shadow */\n/* font */\n/* 中号字体 */\n/* animation */\n/* size */\n/* sider */\n.index__header-divider--1YGJP {\n width: 2px;\n margin: 0 5px;\n background-color: rgba(0, 0, 0, 0.45);\n}\n",""]),t.locals={"header-divider":"index__header-divider--1YGJP"}},3924:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=a.Detail=void 0;var n=r(406),o=r(407),u=i(r(1200)),s=r(1220),d=i(r(1308)),c=i(r(1306)),f=i(r(3925)),p=i(r(1595));class m extends u.default{get name(){return t("project")}get policy(){return"identity:list_projects"}get listUrl(){return this.getRoutePath("project")}get actionConfigs(){return p.default}init(){this.store=new o.ProjectStore}get forceLoadingTabs(){return["quota"]}get detailInfos(){return[{title:t("Project Name"),dataIndex:"name"},s.enabledColumn,{title:t("Affiliated Domain"),dataIndex:"domainName"},{title:t("User Num"),dataIndex:"userCount"},{title:t("User Group Num"),dataIndex:"groupCount"},{title:t("Tags"),dataIndex:"tags",render:e=>e.join(",")},{title:t("Description"),dataIndex:"description"}]}get tabs(){return[{title:t("Project Users"),key:"user",component:c.default},{title:t("Project User Groups"),key:"userGroup",component:d.default},{title:t("Project Quota"),key:"quota",component:f.default}]}}a.Detail=m;var h=(0,n.inject)("rootStore")((0,n.observer)(m));a.default=h},3925:function(e,t,a){"use strict";var r=a(160),l=a(19),i=a(25),n=a(21);l(t,"__esModule",{value:!0}),t.default=t.Quota=void 0;var o=n(a(65)),u=n(a(51)),s=n(a(36)),d=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var a=v(t);if(a&&a.has(e))return a.get(e);var r={},n=l&&i;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var u=n?i(e,o):null;u&&(u.get||u.set)?l(r,o,u):r[o]=e[o]}r.default=e,a&&a.set(e,r);return r}(a(0)),c=a(406),f=n(a(1393)),p=a(566),m=a(407),h=n(a(3926));function v(e){if("function"!=typeof r)return null;var t=new r,a=new r;return(v=function(e){return e?a:t})(e)}class g extends d.Component{constructor(e){var t;super(e),t=this,(0,s.default)(this,"getData",(0,u.default)((function*(){var{id:e}=t.props.match.params,a=[t.projectStore.fetchProjectQuota({project_id:e})];return t.enableCinder&&a.push(t.volumeTypeStore.fetchProjectVolumeTypes(e)),o.default.all(a)}))),this.projectStore=new m.ProjectStore,this.volumeTypeStore=new p.VolumeTypeStore}get enableCinder(){return this.props.rootStore.checkEndpoint("cinder")}get volumeTypeData(){return this.enableCinder?this.volumeTypeStore.projectVolumeTypes:[]}render(){return d.default.createElement("div",{className:h.default.wrapper},d.default.createElement(f.default,{getData:this.getData,projectStore:this.projectStore,volumeTypeStore:this.volumeTypeStore,volumeTypeData:this.volumeTypeData}))}}t.Quota=g;var b=(0,c.inject)("rootStore")((0,c.observer)(g));t.default=b},3926:function(e,t,a){var r=a(3927);"string"==typeof r&&(r=[[e.i,r,""]]);var l={hmr:!0,transform:undefined,insertInto:void 0};a(75)(r,l);r.locals&&(e.exports=r.locals)},3927:function(e,t,a){(t=e.exports=a(74)(!1)).push([e.i,"/* init */\n/* specific color */\n/* border */\n/* background */\n/* shadow */\n/* font */\n/* 中号字体 */\n/* animation */\n/* size */\n/* sider */\n.index__wrapper--14spR {\n min-height: calc(100vh - 108px);\n padding: 0 16px 16px 16px;\n}\n",""]),t.locals={wrapper:"index__wrapper--14spR"}},3928:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=a.UserDetail=void 0;var n=i(r(57)),o=i(r(0)),u=r(406),s=r(1207),d=i(r(1200)),c=i(r(1598)),f=r(334),p=r(1220),m=i(r(1308)),h=i(r(1348)),v=i(r(1589));class g extends d.default{get name(){return t("user")}get policy(){return"identity:get_user"}get listUrl(){return this.getRoutePath("user")}get actionConfigs(){return this.isAdminPage?v.default:f.emptyActionConfig}init(){this.store=new s.UserStore}get detailInfos(){return[{title:t("User Name"),dataIndex:"name"},p.enabledColumn,{title:t("System Roles"),dataIndex:"systemRoles",render:e=>{var t;return e&&e.length?(0,n.default)(t=e||[]).call(t,(e=>o.default.createElement("div",{key:e.id},e.name))):"-"}},{title:t("Real Name"),dataIndex:"real_name"},{title:t("Affiliated Domain"),dataIndex:"domainName"},{title:t("Email"),dataIndex:"email",render:e=>e||"-"},{title:t("phone"),dataIndex:"phone"},{title:t("Description"),dataIndex:"description"}]}get tabs(){return[{title:t("Subordinate Projects"),key:"user",component:h.default},{title:t("Subordinate User Groups"),key:"userGroup",component:m.default},{title:t("Application Credentials"),key:"applicationCredentials",component:c.default}]}}a.UserDetail=g;var b=(0,u.inject)("rootStore")((0,u.observer)(g));a.default=b},3957:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=a.Detail=void 0;var n=r(406),o=r(1238),u=i(r(1200)),s=i(r(1306)),d=i(r(1348)),c=i(r(1592));class f extends u.default{get name(){return t("user group")}get policy(){return"identity:get_group"}get listUrl(){return this.getRoutePath("userGroup")}get actionConfigs(){return c.default}init(){this.store=new o.GroupStore}get detailInfos(){return[{title:t("User Group Name"),dataIndex:"name"},{title:t("Affiliated Domain"),dataIndex:"domain",render:(e,t)=>(e||{}).name||t.domain_id},{title:t("User Num"),dataIndex:"userCount"},{title:t("Description"),dataIndex:"description"}]}get tabs(){return[{title:t("Subordinate Projects"),key:"project",component:d.default},{title:t("Sub Users"),key:"user",component:s.default}]}}a.Detail=f;var p=(0,n.inject)("rootStore")((0,n.observer)(f));a.default=p},3958:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=a.Role=void 0;var n=i(r(36)),o=r(406),u=i(r(1194)),s=i(r(1244)),d=i(r(1599));class c extends u.default{constructor(){super(...arguments),(0,n.default)(this,"getColumns",(()=>[{title:t("Role Name"),dataIndex:"name",routeName:"roleDetailAdmin"},{title:t("ID"),dataIndex:"id",isHideable:!0,copyable:!0},{title:t("Description"),dataIndex:"description",isHideable:!0}]))}init(){this.store=s.default}get policy(){return"identity:list_roles"}get name(){return t("roles")}get isFilterByBackend(){return!1}get actionConfigs(){return d.default}get searchFilters(){return[{label:t("Role Name"),name:"name"}]}}a.Role=c;var f=(0,o.inject)("rootStore")((0,o.observer)(c));a.default=f},3959:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=a.Create=void 0;var n=i(r(65)),o=i(r(36)),u=r(406),s=i(r(1244)),d=r(1193);class c extends d.ModalAction{constructor(){super(...arguments),(0,o.default)(this,"onSubmit",(e=>this.store.create(e)))}init(){this.store=s.default}static allowed(){return n.default.resolve(!0)}get name(){return t("Create Role")}get formItems(){return[{name:"name",label:t("Name"),type:"input",placeholder:t("Please input name"),required:!0},{name:"description",label:t("Description"),type:"textarea"}]}}a.Create=c,(0,o.default)(c,"id","role-create"),(0,o.default)(c,"title",t("Create Role")),(0,o.default)(c,"policy","identity:create_role");var f=(0,u.inject)("rootStore")((0,u.observer)(c));a.default=f},3960:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=void 0;var n=i(r(36)),o=r(1193),u=i(r(1244)),s=r(1307);class d extends o.ConfirmAction{constructor(){super(...arguments),(0,n.default)(this,"policy","identity:delete_role"),(0,n.default)(this,"allowedCheckFunc",(e=>(0,s.editable)(e))),(0,n.default)(this,"onSubmit",(e=>{var{id:t}=e;return u.default.delete({id:t})}))}get id(){return"delete"}get title(){return t("Delete Role")}get isDanger(){return!0}get buttonText(){return t("Delete")}get actionName(){return t("delete role")}}a.default=d},3961:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=a.Edit=void 0;var n=i(r(65)),o=i(r(51)),u=i(r(36)),s=r(406),d=r(1193),c=i(r(1244)),f=r(1307);class p extends d.ModalAction{constructor(){var e;super(...arguments),e=this,(0,u.default)(this,"onSubmit",function(){var t=(0,o.default)((function*(t){var{id:a}=e.item;return e.store.update({id:a},t)}));return function(e){return t.apply(this,arguments)}}())}init(){this.store=c.default}get defaultValue(){var{name:e,description:t}=this.item;return{name:e,description:t}}get formItems(){return[{name:"name",label:t("Name"),type:"input",required:!0},{name:"description",label:t("Description"),type:"textarea"}]}}a.Edit=p,(0,u.default)(p,"id","role-edit"),(0,u.default)(p,"title",t("Edit Role")),(0,u.default)(p,"buttonText",t("Edit")),(0,u.default)(p,"policy","identity:update_role"),(0,u.default)(p,"allowed",(e=>n.default.resolve((0,f.editable)(e))));var m=(0,s.inject)("rootStore")((0,s.observer)(p));a.default=m},3962:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=a.RoleDetail=void 0;var n=r(406),o=r(1244),u=i(r(1200)),s=i(r(1306)),d=i(r(1308)),c=i(r(3963)),f=i(r(1599));class p extends u.default{get name(){return t("role")}get policy(){return["identity:get_role","identity:list_role_assignments"]}get listUrl(){return this.getRoutePath("role")}get actionConfigs(){return f.default}init(){this.store=new o.RoleStore}get detailInfos(){return[{title:t("Role Name"),dataIndex:"name"},{title:t("Description"),dataIndex:"description"}]}get tabs(){return[{title:t("Base Info"),key:"base",component:c.default},{title:t("Binding Users"),key:"user",component:s.default},{title:t("Binding Groups"),key:"group",component:d.default}]}}a.RoleDetail=p;var m=(0,n.inject)("rootStore")((0,n.observer)(p));a.default=m},3963:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=a.BaseDetail=void 0;var n=i(r(57)),o=i(r(0)),u=r(406),s=i(r(1202));class d extends s.default{get leftCards(){return[this.roleCard]}get roleCard(){var e=[{label:t("Roles"),dataIndex:"implies",render:e=>e&&e.length?(0,n.default)(e).call(e,(e=>{var{id:t,name:a}=e,r=this.getLinkRender("roleDetail",a,{id:t});return o.default.createElement("div",{key:t},r)})):"-"}];return{title:t("Implied Roles"),options:e}}}a.BaseDetail=d;var c=(0,u.inject)("rootStore")((0,u.observer)(d));a.default=c}}]);