skyline-console/skyline_console/static/share.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
115 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{1232:function(e,a,r){"use strict";var l=r(33),i=r(44),s=r(32),n=r(25),u=r(27),o=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.setCreateShareSize=D,a.fetchShareQuota=function(e){return T.apply(this,arguments)},a.getShareSizeInStore=a.onShareSizeChange=a.checkQuotaDisable=a.getQuotaInfo=a.getAdd=a.getQuota=a.shareAccessType=a.shareAccessLevel=a.shareAccessRuleState=a.shareVisibility=a.shareProtocol=a.replicaState=a.accessRuleStatus=a.shareStatus=void 0;var p=f(r(174)),h=f(r(27)),v=f(r(1335)),m=f(r(57)),g=f(r(36)),y=f(r(51)),b=f(r(199)),_=f(r(407)),S=f(r(1246));function w(e,t){var a=l(e);if(i){var r=i(e);t&&(r=s(r).call(r,(function(t){return n(e,t).enumerable}))),a.push.apply(a,r)}return a}function x(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,g.default)(e,t,r[t])}));else if(o)d(e,o(r));else{var l;u(l=w(Object(r))).call(l,(function(t){c(e,t,n(r,t))}))}}return e}var k={creating:t("Creating"),creating_from_snapshot:t("Creating From Snapshot"),deleting:t("Deleting"),deleted:t("Deleted"),error:t("Error"),error_deleting:t("Error Deleting"),available:t("Available"),inactive:t("Inactive"),manage_starting:t("Manage Starting"),manage_error:t("Manage Error"),unmanage_starting:t("Unmanage Starting"),unmanage_error:t("Unmanage Error"),unmanaged:t("Unmanaged"),extending:t("Extending"),extending_error:t("Extending Error"),shrinking:t("Shrinking"),shrinking_error:t("Shrinking Error"),shrinking_possible_data_loss_error:t("Shrinking Possible Data Loss Error"),migrating:t("Migrating"),migrating_to:t("Migrating To"),replication_change:t("Replication Change"),reverting:t("Reverting"),reverting_error:t("Reverting Error")};a.shareStatus=k;var A={active:t("Active"),error:t("Error"),syncing:t("Syncing")};a.accessRuleStatus=A;var I={active:t("Active"),error:t("Error"),in_sync:t("Syncing"),out_of_sync:t("Out of Sync")};a.replicaState=I;var C={NFS:t("NFS"),CIFS:t("CIFS"),GlusterFS:t("GlusterFS"),HDFS:t("HDFS"),CephFS:t("CephFS"),MAPRFS:t("MAPRFS")};a.shareProtocol=C;var N={public:t("Public"),private:t("Private")};a.shareVisibility=N;var j={new:t("New"),active:t("Active"),error:t("Error"),queued_to_apply:t("Queued To Apply"),queued_to_deny:t("Queued To Deny"),denying:t("Denying"),applying:t("Applying")};a.shareAccessRuleState=j;var P={rw:t("Read and write"),ro:t("Read only")};a.shareAccessLevel=P;var M={ip:t("IP"),cert:t("Cert"),user:t("User"),cephx:t("Cephx")};function D(e){S.default.setCreateShareSize(e)}function T(){return(T=(0,y.default)((function*(e){e.setState({quota:{},quotaLoading:!0});var t=yield _.default.fetchProjectShareQuota();e.setState({quota:t,quotaLoading:!1})}))).apply(this,arguments)}a.shareAccessType=M;var R=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["shares","gigabytes"];return(0,b.default)(e)?{}:(0,p.default)(t).call(t,((t,a)=>(t[a]=e[a]||{},t)),{})};a.getQuota=R;var G=function(e){var t,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["shares","gigabytes"],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[1,1];if((0,b.default)(e))return[];var l=R(e,a),i=!1;return(0,h.default)(a).call(a,((e,t)=>{if(!i){var a=l[e],{left:s=0}=a||{},n=r[t];-1!==s&&s<n&&(i=!0)}})),i?(0,v.default)(t=new Array(a.length)).call(t,0):r};a.getAdd=G;var E={shares:t("Share"),gigabytes:t("Share Capacity (GiB)"),share_networks:t("Share Network"),share_groups:t("Share Group")};a.getQuotaInfo=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["shares","gigabytes"],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[1,1],{quota:r={},quotaLoading:l}=e.state;if(l||(0,b.default)(r))return[];var i=G(r,t,a),s=R(r,t);return(0,m.default)(t).call(t,((e,t)=>{var a=0===t?"ring":"line",r=E[e];return x(x({},s[e]||{}),{},{add:i[t],name:e,title:r,type:a})}))};a.checkQuotaDisable=(e,t)=>{var{shareQuota:a={}}=_.default;return 0===G(a,e,t)[0]};a.onShareSizeChange=e=>{D(e)};a.getShareSizeInStore=()=>S.default.shareSizeForCreate},1246:function(e,t,a){"use strict";var r=a(33),l=a(44),i=a(32),s=a(25),n=a(27),u=a(45),o=a(46),d=a(19),c=a(21);d(t,"__esModule",{value:!0}),t.default=t.ShareStore=void 0;var f,p,h,v,m,g,y=c(a(57)),b=c(a(65)),_=c(a(25)),S=c(a(51)),w=c(a(62)),x=c(a(71)),k=c(a(36)),A=c(a(54)),I=(c(a(72)),a(34)),C=c(a(48)),N=c(a(53));function j(e,t){var a=r(e);if(l){var n=l(e);t&&(n=i(n).call(n,(function(t){return s(e,t).enumerable}))),a.push.apply(a,n)}return a}function P(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)n(a=j(Object(r),!0)).call(a,(function(t){(0,k.default)(e,t,r[t])}));else if(u)o(e,u(r));else{var l;n(l=j(Object(r))).call(l,(function(t){d(e,t,s(r,t))}))}}return e}var M=(f=class extends N.default{constructor(){super(...arguments),(0,x.default)(this,"zones",p,this),(0,x.default)(this,"zoneOptions",h,this),(0,x.default)(this,"quotaSet",v,this),(0,x.default)(this,"shareSizeForCreate",m,this),(0,k.default)(this,"updateMarkerParams",((e,t)=>({limit:e,offset:t}))),(0,k.default)(this,"updateParamsSortPage",((e,t,a)=>{t&&a&&(e.sort_key=t,e.sort_dir="descend"===a?"desc":"asc")})),(0,k.default)(this,"deleteItem",(e=>{var{id:t,share_group_id:a}=e;return a?this.client.delete(t,null,{share_group_id:a}):this.client.delete(t)})),(0,x.default)(this,"delete",g,this)}get client(){return C.default.manila.shares}get zoneClient(){return C.default.manila.azones}get accessClient(){return C.default.manila.shareAccessRules}get quotaClient(){return C.default.manila.quotaSets}get shareGroupClient(){return C.default.manila.shareGroups}get shareNetworkClient(){return C.default.manila.shareNetworks}get listWithDetail(){return!0}parseMarker(){return""}get paramsFuncPage(){return e=>{var{current:t=1,all_projects:a,limit:r=10}=e,l=1===t?"":(t-1)*r;return P(P({},(0,w.default)(e,["current","all_projects","limit"])),{},{all_tenants:a?1:0,offset:l,limit:r,is_public:!0})}}get mapper(){return e=>{var{project_id:t}=e;return P(P({},e),{},{isMine:t===this.currentProjectId})}}fetchAvailableZones(){var e=this;return(0,S.default)((function*(){var{availability_zones:t=[]}=yield e.zoneClient.list();e.zones=t,e.zoneOptions=(0,y.default)(t).call(t,(e=>({value:e.id,label:e.name})))}))()}detailDidFetch(e){var t=this;return(0,S.default)((function*(){var{id:a,share_group_id:r,share_network_id:l}=e||{},i=P({},e),s=[t.client.exportLocations.list(a),t.accessClient.list({share_id:a}),r?t.shareGroupClient.show(r):null,l?t.shareNetworkClient.show(l):null],[n,u,o,d]=yield b.default.all(s);return i.exportLocations=n.export_locations,r&&(i.shareGroup=o.share_group),l&&(i.shareNetwork=d.share_network),i.accessList=u.access_list,i}))()}fetchQuota(){var e=this;return(0,S.default)((function*(){var t=yield e.quotaClient.showDetail(e.currentProjectId);e.quotaSet=t.quota_set}))()}update(e,t){var a={};return a[this.responseKey]=t,this.submitting(this.client.update(e,a))}extendSize(e,t){var a={extend:t};return this.submitting(this.client.action(e,a))}resetStatus(e,t){var a={reset_status:t};return this.submitting(this.client.action(e,a))}setCreateShareSize(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.shareSizeForCreate=e}},p=(0,A.default)(f.prototype,"zones",[I.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),h=(0,A.default)(f.prototype,"zoneOptions",[I.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),v=(0,A.default)(f.prototype,"quotaSet",[I.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),m=(0,A.default)(f.prototype,"shareSizeForCreate",[I.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),(0,A.default)(f.prototype,"fetchAvailableZones",[I.action],(0,_.default)(f.prototype,"fetchAvailableZones"),f.prototype),(0,A.default)(f.prototype,"fetchQuota",[I.action],(0,_.default)(f.prototype,"fetchQuota"),f.prototype),(0,A.default)(f.prototype,"update",[I.action],(0,_.default)(f.prototype,"update"),f.prototype),(0,A.default)(f.prototype,"extendSize",[I.action],(0,_.default)(f.prototype,"extendSize"),f.prototype),(0,A.default)(f.prototype,"resetStatus",[I.action],(0,_.default)(f.prototype,"resetStatus"),f.prototype),g=(0,A.default)(f.prototype,"delete",[I.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return e=>this.submitting(this.deleteItem(e))}}),(0,A.default)(f.prototype,"setCreateShareSize",[I.action],(0,_.default)(f.prototype,"setCreateShareSize"),f.prototype),f);t.ShareStore=M;var D=new M;t.default=D},1257:function(e,t,a){"use strict";var r=a(33),l=a(44),i=a(32),s=a(25),n=a(27),u=a(45),o=a(46),d=a(19),c=a(21);d(t,"__esModule",{value:!0}),t.default=t.ShareTypeStore=void 0;var f,p,h=c(a(65)),v=c(a(57)),m=c(a(25)),g=c(a(51)),y=c(a(71)),b=c(a(36)),_=c(a(54)),S=(c(a(72)),a(34)),w=c(a(48)),x=c(a(53));function k(e,t){var a=r(e);if(l){var n=l(e);t&&(n=i(n).call(n,(function(t){return s(e,t).enumerable}))),a.push.apply(a,n)}return a}function A(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)n(a=k(Object(r),!0)).call(a,(function(t){(0,b.default)(e,t,r[t])}));else if(u)o(e,u(r));else{var l;n(l=k(Object(r))).call(l,(function(t){d(e,t,s(r,t))}))}}return e}var I=(f=class extends x.default{constructor(){super(...arguments),(0,y.default)(this,"access",p,this)}get client(){return w.default.manila.types}get paramsFunc(){return e=>e}get mapper(){return e=>A(A({},e),{},{is_public:e["share_type_access:is_public"]})}create(e){var t=arguments,a=this;return(0,g.default)((function*(){var r=t.length>1&&void 0!==t[1]?t[1]:[],l={};if(l[a.responseKey]=e,0===r.length)return a.submitting(a.client.create(l));a.isSubmitting=!0;var i=yield a.client.create(l),{id:s}=i[a.responseKey];return a.addProjectAccess(s,r)}))()}update(e,t){var a={};return a[this.responseKey]=t,this.submitting(this.client.update(e,a))}addProjectAccess(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.submitting(h.default.all((0,v.default)(t).call(t,(t=>{var a={addProjectAccess:{project:t}};return this.client.action(e,a)}))))}removeProjectAccess(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.submitting(h.default.all((0,v.default)(t).call(t,(t=>{var a={removeProjectAccess:{project:t}};return this.client.action(e,a)}))))}updateProjectAccess(e){var t=this;return(0,g.default)((function*(){var{id:a,adds:r=[],dels:l=[],newPublic:i}=e,s=r.length>0||l.length>0;if(void 0!==i){if(i||!s)return t.update(a,{"share_type_access:is_public":i});yield t.update(a,{"share_type_access:is_public":i})}return yield t.removeProjectAccess(a,l),t.addProjectAccess(a,r)}))()}fetchProjectAccess(e){var t=this;return(0,g.default)((function*(){var a=yield t.client.getAccess(e);t.access=a.share_type_access}))()}},p=(0,_.default)(f.prototype,"access",[S.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),(0,_.default)(f.prototype,"create",[S.action],(0,m.default)(f.prototype,"create"),f.prototype),(0,_.default)(f.prototype,"update",[S.action],(0,m.default)(f.prototype,"update"),f.prototype),(0,_.default)(f.prototype,"addProjectAccess",[S.action],(0,m.default)(f.prototype,"addProjectAccess"),f.prototype),(0,_.default)(f.prototype,"removeProjectAccess",[S.action],(0,m.default)(f.prototype,"removeProjectAccess"),f.prototype),(0,_.default)(f.prototype,"updateProjectAccess",[S.action],(0,m.default)(f.prototype,"updateProjectAccess"),f.prototype),(0,_.default)(f.prototype,"fetchProjectAccess",[S.action],(0,m.default)(f.prototype,"fetchProjectAccess"),f.prototype),f);t.ShareTypeStore=I;var C=new I;t.default=C},1258:function(e,t,a){"use strict";var r=a(33),l=a(44),i=a(32),s=a(25),n=a(27),u=a(45),o=a(46),d=a(19),c=a(21);d(t,"__esModule",{value:!0}),t.default=t.ShareNetworkStore=void 0;var f,p=c(a(57)),h=c(a(339)),v=c(a(579)),m=c(a(65)),g=c(a(102)),y=c(a(25)),b=c(a(51)),_=c(a(36)),S=c(a(62)),w=c(a(54)),x=a(34),k=c(a(48)),A=c(a(53));function I(e,t){var a=r(e);if(l){var n=l(e);t&&(n=i(n).call(n,(function(t){return s(e,t).enumerable}))),a.push.apply(a,n)}return a}function C(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)n(a=I(Object(r),!0)).call(a,(function(t){(0,_.default)(e,t,r[t])}));else if(u)o(e,u(r));else{var l;n(l=I(Object(r))).call(l,(function(t){d(e,t,s(r,t))}))}}return e}var N=(f=class extends A.default{get client(){return k.default.manila.shareNetworks}get networkClient(){return k.default.neutron.networks}get subnetClient(){return k.default.neutron.subnets}get listWithDetail(){return!0}get paramsFunc(){return e=>{var{all_projects:t,keywords:a}=e;return C(C({},(0,S.default)(e,["all_projects","keywords"])),{},{all_tenants:t?1:0})}}detailDidFetch(e){var t=this;return(0,b.default)((function*(){var a,r,l,i,{share_network_subnets:s=[]}=e,n=(0,p.default)(s).call(s,(e=>e.neutron_subnet_id)),u=(0,p.default)(s).call(s,(e=>e.neutron_net_id)),o=(0,p.default)(a=(0,h.default)(new v.default(n))).call(a,(e=>t.subnetClient.show(e))),d=(0,p.default)(r=(0,h.default)(new v.default(u))).call(r,(e=>t.networkClient.show(e))),c=yield m.default.all(o),f=yield m.default.all(d);return C(C({},e),{},{subnets:(0,p.default)(l=(0,p.default)(s).call(s,(e=>(0,g.default)(c).call(c,(t=>t.subnet.id===e.neutron_subnet_id))))).call(l,(e=>e.subnet)),networks:(0,p.default)(i=(0,p.default)(s).call(s,(e=>(0,g.default)(f).call(f,(t=>t.network.id===e.neutron_net_id))))).call(i,(e=>e.network))})}))()}update(e,t){var a={};return a[this.responseKey]=t,this.submitting(this.client.update(e,a))}},(0,w.default)(f.prototype,"update",[x.action],(0,y.default)(f.prototype,"update"),f.prototype),f);t.ShareNetworkStore=N;var j=new N;t.default=j},1264:function(e,t,a){"use strict";var r=a(33),l=a(44),i=a(32),s=a(25),n=a(27),u=a(45),o=a(46),d=a(19),c=a(21);d(t,"__esModule",{value:!0}),t.default=t.ShareGroupTypeStore=void 0;var f,p,h=c(a(57)),v=c(a(32)),m=c(a(102)),g=c(a(65)),y=c(a(25)),b=c(a(51)),_=c(a(62)),S=c(a(71)),w=c(a(36)),x=c(a(54)),k=(c(a(72)),a(34)),A=c(a(48)),I=c(a(53));function C(e,t){var a=r(e);if(l){var n=l(e);t&&(n=i(n).call(n,(function(t){return s(e,t).enumerable}))),a.push.apply(a,n)}return a}function N(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)n(a=C(Object(r),!0)).call(a,(function(t){(0,w.default)(e,t,r[t])}));else if(u)o(e,u(r));else{var l;n(l=C(Object(r))).call(l,(function(t){d(e,t,s(r,t))}))}}return e}var j=(f=class extends I.default{constructor(){super(...arguments),(0,S.default)(this,"access",p,this)}get client(){return A.default.manila.shareGroupTypes}get shareTypeClient(){return A.default.manila.types}get paramsFunc(){return e=>{var{keywords:t}=e;return(0,_.default)(e,["keywords"])}}create(e){var t=arguments,a=this;return(0,b.default)((function*(){var r=t.length>1&&void 0!==t[1]?t[1]:[],l={};if(l[a.responseKey]=e,0===r.length)return a.submitting(a.client.create(l));a.isSubmitting=!0;var i=yield a.client.create(l),{id:s}=i[a.responseKey];return a.addProjectAccess(s,r)}))()}listDidFetch(e,t,a){var r=this;return(0,b.default)((function*(){if(!e.length)return e;var{is_public:t}=a,l="all"===t?{is_public:t}:{},i=yield r.shareTypeClient.list(l),{share_types:s=[]}=i;return(0,h.default)(e).call(e,(e=>{var t,{share_types:a=[]}=e;return N(N({},e),{},{shareTypes:(0,v.default)(t=(0,h.default)(a).call(a,(e=>(0,m.default)(s).call(s,(t=>t.id===e))))).call(t,(e=>!!e))})}))}))()}detailDidFetch(e,t){var a=this;return(0,b.default)((function*(){var r,l=t?{is_public:"all"}:{},i=yield a.shareTypeClient.list(l),{share_types:s=[]}=i,{share_types:n=[]}=e;return N(N({},e),{},{shareTypes:(0,v.default)(r=(0,h.default)(n).call(n,(e=>(0,m.default)(s).call(s,(t=>t.id===e))))).call(r,(e=>!!e))})}))()}update(e,t){var a={};return a[this.responseKey]=t,this.submitting(this.client.update(e,a))}addProjectAccess(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.submitting(g.default.all((0,h.default)(t).call(t,(t=>{var a={addProjectAccess:{project:t}};return this.client.action(e,a)}))))}removeProjectAccess(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.submitting(g.default.all((0,h.default)(t).call(t,(t=>{var a={removeProjectAccess:{project:t}};return this.client.action(e,a)}))))}updateProjectAccess(e){var t=this;return(0,b.default)((function*(){var{id:a,adds:r=[],dels:l=[],newPublic:i}=e,s=r.length>0||l.length>0;if(void 0!==i){if(i||!s)return t.update(a,{"share_type_access:is_public":i});yield t.update(a,{"share_type_access:is_public":i})}return yield t.removeProjectAccess(a,l),t.addProjectAccess(a,r)}))()}fetchProjectAccess(e){var t=this;return(0,b.default)((function*(){var a=yield t.client.getAccess(e);t.access=a.share_group_type_access}))()}},p=(0,x.default)(f.prototype,"access",[k.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),(0,x.default)(f.prototype,"create",[k.action],(0,y.default)(f.prototype,"create"),f.prototype),(0,x.default)(f.prototype,"update",[k.action],(0,y.default)(f.prototype,"update"),f.prototype),(0,x.default)(f.prototype,"addProjectAccess",[k.action],(0,y.default)(f.prototype,"addProjectAccess"),f.prototype),(0,x.default)(f.prototype,"removeProjectAccess",[k.action],(0,y.default)(f.prototype,"removeProjectAccess"),f.prototype),(0,x.default)(f.prototype,"updateProjectAccess",[k.action],(0,y.default)(f.prototype,"updateProjectAccess"),f.prototype),(0,x.default)(f.prototype,"fetchProjectAccess",[k.action],(0,y.default)(f.prototype,"fetchProjectAccess"),f.prototype),f);t.ShareGroupTypeStore=j;var P=new j;t.default=P},1289:function(e,t,a){"use strict";var r=a(33),l=a(44),i=a(32),s=a(25),n=a(27),u=a(45),o=a(46),d=a(19),c=a(21);d(t,"__esModule",{value:!0}),t.default=t.ShareGroupStore=void 0;var f,p=c(a(57)),h=c(a(102)),v=c(a(25)),m=c(a(51)),g=c(a(62)),y=c(a(36)),b=c(a(54)),_=a(34),S=c(a(48)),w=c(a(53)),x=a(1264),k=a(1258);function A(e,t){var a=r(e);if(l){var n=l(e);t&&(n=i(n).call(n,(function(t){return s(e,t).enumerable}))),a.push.apply(a,n)}return a}function I(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)n(a=A(Object(r),!0)).call(a,(function(t){(0,y.default)(e,t,r[t])}));else if(u)o(e,u(r));else{var l;n(l=A(Object(r))).call(l,(function(t){d(e,t,s(r,t))}))}}return e}var C=(f=class extends w.default{constructor(){super(...arguments),(0,y.default)(this,"updateParamsSortPage",((e,t,a)=>{t&&a&&(e.sort_key=t,e.sort_dir="descend"===a?"desc":"asc")}))}get client(){return S.default.manila.shareGroups}get listWithDetail(){return!0}get paramsFuncPage(){return e=>{var{all_projects:t,current:a,keywords:r}=e,l=I({},(0,g.default)(e,["all_projects","current","keywords"]));return t&&(l.all_tenants=1),l}}detailDidFetch(e,t){return(0,m.default)((function*(){var{share_network_id:a,share_group_type_id:r,share_types:l}=e,i=yield(new x.ShareGroupTypeStore).fetchDetail({id:r,all_projects:t}),s=(0,p.default)(l).call(l,(e=>{var t;return(0,h.default)(t=i.shareTypes).call(t,(t=>t.id===e))||{id:e}})),n=null;return a&&(n=yield(new k.ShareNetworkStore).fetchDetail({id:a})),I(I({},e),{},{shareGroupType:i,shareTypes:s,shareNetwork:n})}))()}update(e,t){var a={};return a[this.responseKey]=t,this.submitting(this.client.update(e,a))}},(0,b.default)(f.prototype,"update",[_.action],(0,v.default)(f.prototype,"update"),f.prototype),f);t.ShareGroupStore=C;var N=new C;t.default=N},1311:function(e,a,r){"use strict";var l=r(33),i=r(44),s=r(32),n=r(25),u=r(27),o=r(45),d=r(46),c=r(19),f=r(160),p=r(21);c(a,"__esModule",{value:!0}),a.default=a.Share=void 0;var h=p(r(32)),v=p(r(198)),m=p(r(62)),g=p(r(36)),y=r(406),b=p(r(1194)),_=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var a=x(t);if(a&&a.has(e))return a.get(e);var r={},l=c&&n;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=l?n(e,i):null;s&&(s.get||s.set)?c(r,i,s):r[i]=e[i]}r.default=e,a&&a.set(e,r);return r}(r(1246)),S=r(1232),w=p(r(1611));function x(e){if("function"!=typeof f)return null;var t=new f,a=new f;return(x=function(e){return e?a:t})(e)}function k(e,t){var a=l(e);if(i){var r=i(e);t&&(r=s(r).call(r,(function(t){return n(e,t).enumerable}))),a.push.apply(a,r)}return a}class A extends b.default{constructor(){super(...arguments),(0,g.default)(this,"updateFetchParamsByPage",(e=>{var{id:t}=e,a=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,g.default)(e,t,r[t])}));else if(o)d(e,o(r));else{var l;u(l=k(Object(r))).call(l,(function(t){c(e,t,n(r,t))}))}}return e}({},(0,m.default)(e,["id"]));return this.inShareGroupDetailPage&&(a.share_group_id=t),this.inShareTypeDetailPage&&(a.share_type_id=t),this.inShareNetworkDetailPage&&(a.share_network_id=t),this.inShareServerDetailPage&&(a.share_server_id=t),a})),(0,g.default)(this,"getColumns",(()=>{var e=[{title:t("ID/Name"),dataIndex:"name",routeName:this.getRouteName("shareDetail")},{title:t("Project ID/Name"),dataIndex:"project_name",isHideable:!0,hidden:!this.isAdminPage,sortKey:"project_id"},{title:t("Description"),dataIndex:"description",isHideable:!0,sorter:!1},{title:t("Availability Zone"),dataIndex:"availability_zone",sorter:!1},{title:t("Share Type"),dataIndex:"share_type_name",render:(e,t)=>e||t.share_type,sortKey:"share_type_id"},{title:t("Size"),dataIndex:"size",unit:"GiB"},{title:t("Protocol"),dataIndex:"share_proto",valueMap:S.shareProtocol},{title:t("Public"),dataIndex:"is_public",isHideable:!0,valueRender:"yesNo",sorter:!1},{title:t("Status"),dataIndex:"status",valueMap:S.shareStatus},{title:t("Share Network"),dataIndex:"share_network_id",isHideable:!0,render:e=>e?this.getLinkRender("shareNetworkDetail",e,{id:e}):"-"},{title:t("Share Group"),dataIndex:"share_group_id",isHideable:!0,render:e=>e?this.getLinkRender("shareGroupDetail",e,{id:e}):"-"},{title:t("Created At"),dataIndex:"created_at",isHideable:!0,valueRender:"sinceTime"}];return this.inShareGroupDetailPage?(0,h.default)(e).call(e,(e=>"share_group_id"!==e.dataIndex)):this.inShareNetworkDetailPage?(0,h.default)(e).call(e,(e=>"share_network_id"!==e.dataIndex)):this.inShareTypeDetailPage?(0,h.default)(e).call(e,(e=>"share_type_name"!==e.dataIndex)):e}))}init(){this.store=this.inDetailPage?new _.ShareStore:_.default,this.downloadStore=new _.ShareStore}get policy(){return"share:get_all"}get name(){return t("share")}get isFilterByBackend(){return!0}get inShareGroupDetailPage(){var e;return this.inDetailPage&&(0,v.default)(e=this.path).call(e,"share-group")}get inShareTypeDetailPage(){var e;return this.inDetailPage&&(0,v.default)(e=this.path).call(e,"share-type")}get inShareNetworkDetailPage(){var e;return this.inDetailPage&&(0,v.default)(e=this.path).call(e,"share-network")}get inShareServerDetailPage(){var e;return this.inDetailPage&&(0,v.default)(e=this.path).call(e,"share-server")}get isSortByBackend(){return!0}get defaultSortKey(){return"created_at"}get actionConfigs(){return this.isAdminPage?w.default.actionConfigsAdmin:w.default.actionConfigs}get searchFilters(){return[{label:t("Name"),name:"name"}]}}a.Share=A;var I=(0,y.inject)("rootStore")((0,y.observer)(A));a.default=I},1357:function(e,a,r){"use strict";r(19)(a,"__esModule",{value:!0}),a.shareTypeTip=a.checkShareTypeSupportServer=a.shareTypeFilters=a.shareTypeColumns=a.yesNoOptions=void 0;var l=[{label:t("Yes"),key:!0,value:!0},{label:t("No"),key:!1,value:!1}];a.yesNoOptions=l;var i=[{title:t("ID/Name"),dataIndex:"name",routeName:"shareTypeDetailAdmin"},{title:t("Description"),dataIndex:"description",isHideable:!0,valueRender:"noValue"},{title:t("Public"),dataIndex:"share_type_access:is_public",valueRender:"yesNo"}];a.shareTypeColumns=i;var s=[{name:"name",label:t("Name")}];a.shareTypeFilters=s;a.checkShareTypeSupportServer=e=>{var{extra_specs:t={}}=e,{driver_handles_share_servers:a}=t;return"True"===a||"true"===a||!0===a};var n=t("Note that when using a share type with the driver_handles_share_servers extra spec as False, you should not provide a share network.");a.shareTypeTip=n},1358:function(e,a,r){"use strict";var l=r(33),i=r(44),s=r(32),n=r(25),u=r(27),o=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=a.Create=a.extraFormItem=a.keyValueValidator=void 0;var p=f(r(65)),h=f(r(102)),v=f(r(57)),m=f(r(62)),g=f(r(36)),y=f(r(199)),b=r(406),_=r(1193),S=f(r(1257)),w=r(1235),x=r(407),k=f(r(1214)),A=r(1357),I=r(161);function C(e,t){var a=l(e);if(i){var r=i(e);t&&(r=s(r).call(r,(function(t){return n(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=C(Object(r),!0)).call(a,(function(t){(0,g.default)(e,t,r[t])}));else if(o)d(e,o(r));else{var l;u(l=C(Object(r))).call(l,(function(t){c(e,t,n(r,t))}))}}return e}var j=(e,a)=>(0,y.default)(a)?p.default.resolve():(0,h.default)(a).call(a,(e=>{var{key:t,value:a}=e.value||{};return!t||!a}))?p.default.reject(t("Please enter complete key value!")):p.default.resolve();a.keyValueValidator=j;var P={name:"extra",label:t("Extra Specs"),type:"add-select",itemComponent:k.default,addText:t("Add Extra Spec"),keySpan:8,validator:j};a.extraFormItem=P;class M extends _.ModalAction{constructor(){super(...arguments),(0,g.default)(this,"onSubmit",(e=>{var{driver_handles_share_servers:t,isPublic:a=!1,accessControl:r={},extra:l=[]}=e,i=N({},(0,m.default)(e,["driver_handles_share_servers","isPublic","accessControl","extra"])),s=[],n=(0,I.updateAddSelectValueToObj)(l);if(n.driver_handles_share_servers=t,i.extra_specs=n,a)i["os-share-type-access:is_public"]=!0;else{i["os-share-type-access:is_public"]=!1;var{selectedRowKeys:u=[]}=r;s=[...u]}return this.store.create(i,s)}))}get name(){return t("create share type")}init(){this.store=S.default,this.projectStore=new x.ProjectStore,this.getProjects()}getProjects(){this.projectStore.fetchList()}get projects(){return this.projectStore.list.data||[]}static get modalSize(){return"large"}getModalSize(){return"large"}get nameForStateUpdate(){return["isPublic"]}get defaultValue(){return{isPublic:!0}}get formItems(){var e,{isPublic:a}=this.state;return[{name:"name",label:t("Name"),type:"input-name",names:(0,v.default)(e=this.store.list.data).call(e,(e=>e.name)),required:!0},{name:"description",label:t("Description"),type:"textarea"},{name:"driver_handles_share_servers",label:t("Driver Handles Share Servers"),type:"select",options:A.yesNoOptions,required:!0},{name:"isPublic",label:t("Public"),type:"check",content:t("Public"),required:!0},N({name:"accessControl",label:t("Access Control"),type:"select-table",isMulti:!0,hidden:a,data:this.projects,isLoading:this.projectStore.list.isLoading},w.projectTableOptions),P]}}a.Create=M,(0,g.default)(M,"id","create"),(0,g.default)(M,"title",t("Create Share Type")),(0,g.default)(M,"policy","share_type:create"),(0,g.default)(M,"allowed",(()=>p.default.resolve(!0)));var D=(0,b.inject)("rootStore")((0,b.observer)(M));a.default=D},1359:function(e,t,a){"use strict";var r=a(19),l=a(21);r(t,"__esModule",{value:!0}),t.default=t.ExtraSpecStore=void 0;var i,s,n=l(a(27)),u=l(a(33)),o=l(a(25)),d=l(a(71)),c=l(a(36)),f=(l(a(72)),l(a(54))),p=a(34),h=l(a(48)),v=l(a(53)),m=(i=class extends v.default{constructor(){super(...arguments),(0,c.default)(this,"getFatherResourceId",(e=>e.id)),(0,c.default)(this,"getListDataFromResult",(e=>{var t,{extra_specs:a}=e,r=[];return(0,n.default)(t=(0,u.default)(a)).call(t,(e=>{r.push({id:e,keyName:e,name:e,value:a[e]})})),r})),(0,d.default)(this,"delete",s,this)}get client(){return h.default.manila.types.extraSpecs}get isSubResource(){return!0}createOrUpdate(e,t){var a={extra_specs:t};return this.submitting(this.client.create(e,a))}},(0,f.default)(i.prototype,"createOrUpdate",[p.action],(0,o.default)(i.prototype,"createOrUpdate"),i.prototype),s=(0,f.default)(i.prototype,"delete",[p.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return e=>{var{id:t,keyName:a}=e;return this.submitting(this.client.delete(t,a))}}}),i);t.ExtraSpecStore=m;var g=new m;t.default=g},1360:function(e,t,a){"use strict";var r=a(19),l=a(21);r(t,"__esModule",{value:!0}),t.default=t.GroupSpecStore=void 0;var i,s,n=l(a(27)),u=l(a(33)),o=l(a(25)),d=l(a(71)),c=l(a(36)),f=(l(a(72)),l(a(54))),p=a(34),h=l(a(48)),v=l(a(53)),m=(i=class extends v.default{constructor(){super(...arguments),(0,c.default)(this,"getFatherResourceId",(e=>e.id)),(0,c.default)(this,"getListDataFromResult",(e=>{var t,{group_specs:a}=e,r=[];return(0,n.default)(t=(0,u.default)(a)).call(t,(e=>{r.push({id:e,keyName:e,name:e,value:a[e]})})),r})),(0,d.default)(this,"delete",s,this)}get client(){return h.default.manila.shareGroupTypes.groupSpecs}get isSubResource(){return!0}createOrUpdate(e,t){var a={group_specs:t};return this.submitting(this.client.create(e,a))}},(0,f.default)(i.prototype,"createOrUpdate",[p.action],(0,o.default)(i.prototype,"createOrUpdate"),i.prototype),s=(0,f.default)(i.prototype,"delete",[p.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return e=>{var{id:t,keyName:a}=e;return this.submitting(this.client.delete(t,a))}}}),i);t.GroupSpecStore=m;var g=new m;t.default=g},1361:function(e,t,a){"use strict";var r=a(19),l=a(21);r(t,"__esModule",{value:!0}),t.default=t.ShareInstanceStore=void 0;var i,s,n=l(a(25)),u=l(a(51)),o=l(a(62)),d=l(a(71)),c=(l(a(36)),l(a(54))),f=(l(a(72)),a(34)),p=l(a(48)),h=l(a(53)),v=(i=class extends h.default{constructor(){super(...arguments),(0,d.default)(this,"forceDelete",s,this)}get client(){return p.default.manila.shareInstances}get paramsFunc(){return e=>{var{keywords:t}=e;return(0,o.default)(e,["keywords"])}}detailDidFetch(e){var t=this;return(0,u.default)((function*(){var{id:a}=e||{},{export_locations:r=[]}=yield t.client.exportLocations.list(a);return e.exportLocations=r,e}))()}resetStatus(e,t){var a={reset_status:t};return this.submitting(this.client.action(e,a))}},s=(0,c.default)(i.prototype,"forceDelete",[f.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return e=>{var{id:t}=e;return this.submitting(this.client.action(t,{force_delete:null}))}}}),(0,c.default)(i.prototype,"resetStatus",[f.action],(0,n.default)(i.prototype,"resetStatus"),i.prototype),i);t.ShareInstanceStore=v;var m=new v;t.default=m},1362:function(e,t,a){"use strict";var r=a(19),l=a(21);r(t,"__esModule",{value:!0}),t.default=t.ShareMetadataStore=void 0;var i,s,n=l(a(27)),u=l(a(33)),o=l(a(25)),d=l(a(71)),c=l(a(36)),f=(l(a(72)),l(a(54))),p=a(34),h=l(a(48)),v=l(a(53)),m=(i=class extends v.default{constructor(){super(...arguments),(0,c.default)(this,"getFatherResourceId",(e=>e.id)),(0,c.default)(this,"getListDataFromResult",(e=>{var t,{metadata:a}=e,r=[];return(0,n.default)(t=(0,u.default)(a)).call(t,(e=>{r.push({id:e,keyName:e,name:e,value:a[e]})})),r})),(0,d.default)(this,"delete",s,this)}get client(){return h.default.manila.shares.metadata}get isSubResource(){return!0}createOrUpdate(e,t){var a={metadata:t};return this.submitting(this.client.create(e,a))}},(0,f.default)(i.prototype,"createOrUpdate",[p.action],(0,o.default)(i.prototype,"createOrUpdate"),i.prototype),s=(0,f.default)(i.prototype,"delete",[p.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return e=>{var{id:t,keyName:a}=e;return this.submitting(this.client.delete(t,a))}}}),i);t.ShareMetadataStore=m;var g=new m;t.default=g},1363:function(e,t,a){"use strict";var r=a(33),l=a(44),i=a(32),s=a(25),n=a(27),u=a(45),o=a(46),d=a(19),c=a(21);d(t,"__esModule",{value:!0}),t.default=t.ShareAccessRuleStore=void 0;var f,p,h,v=c(a(25)),m=c(a(57)),g=c(a(65)),y=c(a(51)),b=c(a(62)),_=c(a(71)),S=c(a(36)),w=(c(a(72)),c(a(54))),x=c(a(199)),k=a(34),A=c(a(48)),I=c(a(53));function C(e,t){var a=r(e);if(l){var n=l(e);t&&(n=i(n).call(n,(function(t){return s(e,t).enumerable}))),a.push.apply(a,n)}return a}function N(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)n(a=C(Object(r),!0)).call(a,(function(t){(0,S.default)(e,t,r[t])}));else if(u)o(e,u(r));else{var l;n(l=C(Object(r))).call(l,(function(t){d(e,t,s(r,t))}))}}return e}var j=(f=class extends I.default{constructor(){super(...arguments),(0,_.default)(this,"delete",p,this),(0,_.default)(this,"manageMetadata",h,this)}get client(){return A.default.manila.shareAccessRules}get shareClient(){return A.default.manila.shares}get listResponseKey(){return this.responseKey}get paramsFunc(){return e=>{var{id:t,keywords:a}=e;return N(N({},(0,b.default)(e,["id","keywords"])),{},{share_id:t})}}update(e,t){var a={};return a[this.responseKey]=t,this.submitting(this.client.update(e,a))}create(e,t){var a={allow_access:t};return this.submitting(this.shareClient.action(e,a))}},(0,w.default)(f.prototype,"update",[k.action],(0,v.default)(f.prototype,"update"),f.prototype),(0,w.default)(f.prototype,"create",[k.action],(0,v.default)(f.prototype,"create"),f.prototype),p=(0,w.default)(f.prototype,"delete",[k.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return(e,t)=>{var a={deny_access:{access_id:t}};return this.submitting(this.shareClient.action(e,a))}}}),h=(0,w.default)(f.prototype,"manageMetadata",[k.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,y.default)((function*(t,a,r){(0,x.default)(a)||(yield e.client.updateMetadata(t,{metadata:a}));var l=(0,m.default)(r).call(r,(a=>e.client.metadata.delete(t,a)));return e.submitting(g.default.all(l))}));return function(e,a,r){return t.apply(this,arguments)}}()}}),f);t.ShareAccessRuleStore=j;var P=new j;t.default=P},1419:function(e,a,r){"use strict";r(19)(a,"__esModule",{value:!0}),a.shareGroupFilters=a.getShareGroupColumns=a.shareGroupStatus=void 0;var l={available:t("Available"),error:t("Error"),creating:t("Creating"),deleting:t("Deleting")};a.shareGroupStatus=l;a.getShareGroupColumns=e=>[{title:t("ID/Name"),dataIndex:"name",routeName:e.getRouteName("shareGroupDetail")},{title:t("Project ID/Name"),dataIndex:"project_name",isHideable:!0,hidden:!e.isAdminPage,sortKey:"project_id"},{title:t("Description"),dataIndex:"description",isHideable:!0,sorter:!1},{title:t("Availability Zone"),dataIndex:"availability_zone",sorter:!1},{title:t("Share Network"),dataIndex:"share_network_id",render:t=>t?e.getLinkRender("shareNetworkDetail",t,{id:t}):"-"},{title:t("Status"),dataIndex:"status",valueMap:l},{title:t("Created At"),dataIndex:"created_at",isHideable:!0,valueRender:"sinceTime"}];var i=[{label:t("Name"),name:"name"}];a.shareGroupFilters=i},1420:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.shareNetworkFilters=a.getShareNetworkColumns=void 0;var s=i(r(57)),n=i(r(0)),u=i(r(657)),o=i(r(4122));a.getShareNetworkColumns=e=>[{title:t("ID/Name"),dataIndex:"name",routeName:e.getRouteName("shareNetworkDetail")},{title:t("Project ID/Name"),dataIndex:"project_name",isHideable:!0,hidden:!e.isAdminPage},{title:t("Description"),dataIndex:"description",isHideable:!0},{title:t("Neutron Net"),dataIndex:"networks",render:(t,a)=>{var{share_network_subnets:r=[]}=a,l=(0,s.default)(r).call(r,(t=>{var{neutron_net_id:a}=t,r=e.getLinkRender("networkDetail",a,{id:a});return n.default.createElement("div",{key:t.id},r)})),i=(0,s.default)(r).call(r,(e=>e.neutron_net_id));return n.default.createElement(n.default.Fragment,null,l," ",n.default.createElement(o.default,{networkIds:i}))},stringify:(e,t)=>{var a,{share_network_subnets:r=[]}=t;return(0,s.default)(a=r||[]).call(a,(e=>e.neutron_net_id)).join(", ")}},{title:t("Neutron Subnet"),dataIndex:"share_network_subnets",render:(e,t)=>{var{share_network_subnets:a=[]}=t,r=(0,s.default)(a).call(a,(e=>{var{neutron_subnet_id:t}=e;return n.default.createElement("div",{key:e.id},t)})),l=(0,s.default)(a).call(a,(e=>e.neutron_subnet_id));return n.default.createElement(n.default.Fragment,null,r," ",n.default.createElement(u.default,{subnetIds:l}))},stringify:(e,t)=>{var a,{share_network_subnets:r=[]}=t;return(0,s.default)(a=r||[]).call(a,(e=>e.neutron_subnet_id)).join(", ")}},{title:t("Created At"),dataIndex:"created_at",isHideable:!0,valueRender:"sinceTime"}];var d=[{name:"name",label:t("Name")}];a.shareNetworkFilters=d},1421:function(e,t,a){"use strict";var r=a(19),l=a(21);r(t,"__esModule",{value:!0}),t.default=t.ShareServerStore=void 0;var i=l(a(62)),s=l(a(48)),n=l(a(53));class u extends n.default{get client(){return s.default.manila.shareServers}get paramsFunc(){return e=>{var{all_projects:t,keywords:a}=e;return(0,i.default)(e,["all_projects","keywords"])}}}t.ShareServerStore=u;var o=new u;t.default=o},1610: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(1358)),s=l(a(4118)),n=l(a(4119)),u=l(a(4120)),o={rowActions:{firstAction:s.default,moreActions:[{action:u.default},{action:n.default}]},primaryActions:[i.default],batchActions:[n.default]};t.default=o},1611: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(1612)),s=l(a(4123)),n=l(a(4124)),u=l(a(4125)),o=l(a(4126)),d=l(a(4127)),c=l(a(4128)),f={actionConfigs:{rowActions:{firstAction:n.default,moreActions:[{action:s.default},{action:d.default},{action:u.default},{action:o.default}]},primaryActions:[i.default],batchActions:[s.default]},actionConfigsAdmin:{rowActions:{firstAction:s.default,moreActions:[{action:c.default}]},primaryActions:[],batchActions:[s.default]}};t.default=f},1612:function(e,a,r){"use strict";var l=r(33),i=r(44),s=r(32),n=r(25),u=r(27),o=r(45),d=r(46),c=r(19),f=r(160),p=r(21);c(a,"__esModule",{value:!0}),a.default=a.Create=void 0;var h=p(r(226)),v=p(r(32)),m=p(r(198)),g=p(r(65)),y=p(r(51)),b=p(r(62)),_=p(r(36)),S=p(r(199)),w=p(r(1386)),x=r(406),k=r(1193),A=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var a=L(t);if(a&&a.has(e))return a.get(e);var r={},l=c&&n;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=l?n(e,i):null;s&&(s.get||s.set)?c(r,i,s):r[i]=e[i]}r.default=e,a&&a.set(e,r);return r}(r(1246)),I=r(1258),C=r(1289),N=r(1257),j=r(1419),P=r(1357),M=r(1420),D=r(1232),T=r(578),R=r(1358),G=r(161),E=r(1203);function L(e){if("function"!=typeof f)return null;var t=new f,a=new f;return(L=function(e){return e?a:t})(e)}function O(e,t){var a=l(e);if(i){var r=i(e);t&&(r=s(r).call(r,(function(t){return n(e,t).enumerable}))),a.push.apply(a,r)}return a}function z(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)u(a=O(Object(r),!0)).call(a,(function(t){(0,_.default)(e,t,r[t])}));else if(o)d(e,o(r));else{var l;u(l=O(Object(r))).call(l,(function(t){c(e,t,n(r,t))}))}}return e}var F=["shares","gigabytes"],q=()=>[1,(0,D.getShareSizeInStore)()||1];class K extends k.FormAction{constructor(){super(...arguments),(0,_.default)(this,"onShareTypeChange",(e=>{var t,{selectedRows:a=[],selectedRowKeys:r=[]}=e;if(0!==a.length){var l=(0,h.default)(a).call(a,(e=>!(0,P.checkShareTypeSupportServer)(e))),i=(0,v.default)(t=this.shareGroupStore.list.data||[]).call(t,(e=>{var t;return(0,m.default)(t=e.share_types||[]).call(t,r[0])}));this.setState({showNetworks:!l,shareGroups:i})}else this.setState({showNetworks:!1,shareGroups:[]})})),(0,_.default)(this,"onSubmit",(e=>{var{shareType:t,shareNetwork:a,shareGroup:r,project:l,metadata:i,is_public:s}=e,n=(0,b.default)(e,["shareType","shareNetwork","shareGroup","project","metadata","is_public"]),{showNetworks:u=!1}=this.state,o=z(z({},n),{},{share_type:t.selectedRowKeys[0],metadata:(0,G.updateAddSelectValueToObj)(i)});this.checkShowPublic()&&s&&(o.is_public=s);var{selectedRowKeys:d=[]}=a||{},{selectedRowKeys:c=[]}=r||{};return u&&d.length&&(o.share_network_id=d[0]),c.length&&(o.share_group_id=c[0]),this.store.create(o)}))}get name(){return t("create share")}get listUrl(){return this.getRoutePath("share")}init(){this.store=A.default,this.networkStore=new I.ShareNetworkStore,this.shareTypeStore=new N.ShareTypeStore,this.shareStore=new A.ShareStore,this.shareGroupStore=new C.ShareGroupStore,this.shareStore.fetchQuota(),this.shareTypeStore.fetchList(),this.networkStore.fetchList(),this.shareGroupStore.fetchList(),this.shareStore.fetchAvailableZones(),this.state.showNetworks=!1,this.state.shareGroups=[],this.getQuota()}getQuota(){var e=this;return(0,y.default)((function*(){yield(0,D.fetchShareQuota)(e),(0,D.setCreateShareSize)(e.defaultSize),e.updateDefaultValue()}))()}get disableSubmit(){var{quota:e,quotaLoading:t}=this.state;return!(!(0,S.default)(e)&&!t)||(0,D.checkQuotaDisable)(F,q())}get showQuota(){return!0}getShareQuota(){var{quota:e={}}=this.state;return(0,D.getQuota)(e,F)}get quotaInfo(){return(0,D.getQuotaInfo)(this,F,q())}get defaultSize(){return this.quotaIsLimit&&this.maxSize<10?this.maxSize:10}get defaultValue(){return{size:this.defaultSize,project:this.currentProjectName}}get quotaIsLimit(){var{gigabytes:{limit:e}={}}=this.getShareQuota();return-1!==e}get maxSize(){var{gigabytes:{left:e=0}={}}=this.getShareQuota();return-1===e?1e3:e||1}get shareTypeColumns(){var[,...e]=(0,w.default)(P.shareTypeColumns);return[T.idNameColumn,...e]}get shareNetworkColumns(){var[,...e]=(0,M.getShareNetworkColumns)(this);return[T.idNameColumn,...e]}get shareGroupColumns(){var[,...e]=(0,j.getShareGroupColumns)(this);return[T.idNameColumn,...e]}get shareProtocolOptions(){return(0,G.getOptions)(D.shareProtocol)}checkShowPublic(){return(0,E.checkPolicyRule)("share:create_public_share")}get formItems(){var{showNetworks:e=!1,shareGroups:a=[]}=this.state,r=z(z({},R.extraFormItem),{},{name:"metadata",label:t("Metadata"),addText:t("Add Metadata")});return[{name:"project",label:t("Project"),type:"label"},{name:"availability_zone",label:t("Availability Zone"),type:"select",options:this.shareStore.zoneOptions},{type:"divider"},{name:"name",label:t("Name"),type:"input-name",required:!0},{name:"description",label:t("Description"),type:"textarea"},{name:"share_proto",label:t("Share Protocol"),type:"select",required:!0,options:this.shareProtocolOptions},{name:"size",label:t("Capacity (GiB)"),type:"slider-input",max:this.maxSize,min:1,description:"".concat(1,"GiB-").concat(this.maxSize,"GiB"),required:this.quotaIsLimit,display:this.quotaIsLimit,onChange:D.onShareSizeChange},{name:"size",label:t("Capacity (GiB)"),type:"input-int",min:1,display:!this.quotaIsLimit,required:!this.quotaIsLimit,onChange:D.onShareSizeChange},{name:"is_public",label:t("Public"),type:"check",content:t("Public"),tip:t("If set then all tenants will be able to see this share."),display:this.checkShowPublic()},{name:"shareType",label:t("Share Type"),type:"select-table",required:!0,columns:this.shareTypeColumns,filterParams:P.shareTypeFilters,isLoading:this.shareTypeStore.list.isLoading,data:this.shareTypeStore.list.data||[],onChange:this.onShareTypeChange,extra:P.shareTypeTip},{type:"divider"},{name:"shareNetwork",label:t("Share Network"),type:"select-table",columns:this.shareNetworkColumns,filterParams:M.shareNetworkFilters,isLoading:this.networkStore.list.isLoading,data:this.networkStore.list.data||[],display:e,required:e},{name:"shareGroup",label:t("Share Group"),type:"select-table",columns:this.shareGroupColumns,filterParams:j.shareGroupFilters,isLoading:this.shareGroupStore.list.isLoading,data:a,disabledFunc:e=>"available"!==e.status},{type:"divider"},r]}}a.Create=K,(0,_.default)(K,"id","create"),(0,_.default)(K,"title",t("Create Share")),(0,_.default)(K,"path","/share/share/create"),(0,_.default)(K,"policy","share:create"),(0,_.default)(K,"allowed",(()=>g.default.resolve(!0)));var V=(0,x.inject)("rootStore")((0,x.observer)(K));a.default=V},1613:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.shareGroupTypeFilters=a.shareGroupTypeColumns=void 0;var s=i(r(57)),n=i(r(0)),u=[{title:t("ID/Name"),dataIndex:"name",routeName:"shareGroupTypeDetailAdmin"},{title:t("Public"),dataIndex:"is_public",valueRender:"yesNo"},{title:t("Share Types"),dataIndex:"shareTypes",render:e=>{var t;return(0,s.default)(t=e||[]).call(t,(e=>n.default.createElement("div",{key:e.id},e.name)))},stringify:e=>{var t;return(0,s.default)(t=e||[]).call(t,(e=>e.name)).join(";")||"-"}}];a.shareGroupTypeColumns=u;var o=[{name:"name",label:t("Name")}];a.shareGroupTypeFilters=o},1614: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(4135)),s=l(a(4136)),n={rowActions:{firstAction:l(a(4137)).default,moreActions:[{action:s.default}]},primaryActions:[i.default],batchActions:[s.default]};t.default=n},1615: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(4145)),s=l(a(4146)),n={rowActions:{firstAction:i.default,moreActions:[{action:s.default}]},primaryActions:[],batchActions:[i.default]};t.default=n},1616: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(4150)),s=l(a(4151)),n={actionConfigs:{rowActions:{firstAction:l(a(4152)).default,moreActions:[{action:s.default}]},primaryActions:[i.default],batchActions:[s.default]},actionConfigsAdmin:{rowActions:{firstAction:s.default,moreActions:[]},primaryActions:[],batchActions:[s.default]}};t.default=n},1617: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(4156)),s=l(a(4157)),n={actionConfigs:{rowActions:{firstAction:l(a(4158)).default,moreActions:[{action:s.default}]},primaryActions:[i.default],batchActions:[s.default]},actionConfigsAdmin:{rowActions:{firstAction:s.default,moreActions:[]},primaryActions:[],batchActions:[s.default]}};t.default=n},1618:function(e,a,r){"use strict";var l=r(33),i=r(44),s=r(32),n=r(25),u=r(27),o=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=a.Create=a.metadataFormItem=void 0;var p=f(r(198)),h=f(r(65)),v=f(r(62)),m=f(r(36)),g=r(406),y=r(1193),b=f(r(1363)),_=r(1358),S=f(r(1214)),w=r(161),x=r(1232);function k(e,t){var a=l(e);if(i){var r=i(e);t&&(r=s(r).call(r,(function(t){return n(e,t).enumerable}))),a.push.apply(a,r)}return a}function A(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,m.default)(e,t,r[t])}));else if(o)d(e,o(r));else{var l;u(l=k(Object(r))).call(l,(function(t){c(e,t,n(r,t))}))}}return e}var I={name:"metadata",label:t("Metadata"),type:"add-select",itemComponent:S.default,addText:t("Add Metadata"),keySpan:8,validator:_.keyValueValidator};a.metadataFormItem=I;class C extends y.ModalAction{constructor(){super(...arguments),(0,m.default)(this,"onSubmit",((e,t)=>{var{detail:{id:a}={}}=t,{metadata:r}=e,l=A(A({},(0,v.default)(e,["metadata"])),{},{metadata:(0,w.updateAddSelectValueToObj)(r)});return this.store.create(a,l)}))}get name(){return t("add access rule")}static get modalSize(){return"middle"}getModalSize(){return"middle"}init(){this.store=b.default}get typeOptions(){return(0,w.getOptions)(x.shareAccessType)}get levelOptions(){return(0,w.getOptions)(x.shareAccessLevel)}get typeTip(){return t("'ip' rule represents IPv4 or IPv6 address, 'cert' rule represents TLS certificate, 'user' rule represents username or usergroup, 'cephx' rule represents ceph auth ID.")}get nameForStateUpdate(){return["access_type"]}getAccessExtra(){var{access_type:e}=this.state,{detail:{share_proto:a}={}}=this.containerProps||{},r=["NFS","CIFS"];return(0,p.default)(r).call(r,a)&&"ip"===e?t('All network segments are indicated by "*", not "0.0.0.0/0"'):""}get formItems(){return[{name:"access_type",label:t("Access Type"),type:"select",options:this.typeOptions,required:!0,tip:this.typeTip},{name:"access_level",label:t("Access Level"),type:"select",options:this.levelOptions,required:!0},{name:"access_to",label:t("Access To"),type:"input",required:!0,extra:this.getAccessExtra()},I]}}a.Create=C,(0,m.default)(C,"id","create"),(0,m.default)(C,"title",t("Add Access Rule")),(0,m.default)(C,"policy","share:allow_access"),(0,m.default)(C,"allowed",(()=>h.default.resolve(!0)));var N=(0,g.inject)("rootStore")((0,g.observer)(C));a.default=N},1619:function(e,a,r){"use strict";r(19)(a,"__esModule",{value:!0}),a.shareServerStatus=void 0;var l={active:t("Active"),error:t("Error"),creating:t("Creating"),deleting:t("Deleting")};a.shareServerStatus=l},1620: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(4173)),s={rowActions:{firstAction:i.default,moreActions:[]},primaryActions:[],batchActions:[i.default]};t.default=s},4115: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)),s=l(a(4116)),n=e=>(0,i.default)(s.default,e);t.default=n},4116: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)),s=l(a(567)),n=l(a(4117)),u=l(a(4121)),o=l(a(4134)),d=l(a(4138)),c=l(a(4144)),f=l(a(4147)),p=l(a(4149)),h=l(a(4153)),v=l(a(4155)),m=l(a(4159)),g=l(a(1311)),y=l(a(4161)),b=l(a(1612)),_=l(a(4172)),S=l(a(4174)),w=l(a(4176)),x="/share",k=[{path:x,component:i.default,routes:[{path:"".concat(x,"/share-type-admin"),component:n.default,exact:!0},{path:"".concat(x,"/share-type-admin/detail/:id"),component:u.default,exact:!0},{path:"".concat(x,"/share-group-type-admin"),component:o.default,exact:!0},{path:"".concat(x,"/share-group-type-admin/detail/:id"),component:d.default,exact:!0},{path:"".concat(x,"/share-instance-admin"),component:c.default,exact:!0},{path:"".concat(x,"/share-instance-admin/detail/:id"),component:f.default,exact:!0},{path:"".concat(x,"/share-network"),component:p.default,exact:!0},{path:"".concat(x,"/share-network/detail/:id"),component:h.default,exact:!0},{path:"".concat(x,"/share-network-admin"),component:p.default,exact:!0},{path:"".concat(x,"/share-network-admin/detail/:id"),component:h.default,exact:!0},{path:"".concat(x,"/share-group"),component:v.default,exact:!0},{path:"".concat(x,"/share-group/detail/:id"),component:m.default,exact:!0},{path:"".concat(x,"/share-group-admin"),component:v.default,exact:!0},{path:"".concat(x,"/share-group-admin/detail/:id"),component:m.default,exact:!0},{path:"".concat(x,"/share"),component:g.default,exact:!0},{path:"".concat(x,"/share/detail/:id"),component:y.default,exact:!0},{path:"".concat(x,"/share/create"),component:b.default,exact:!0},{path:"".concat(x,"/share-admin"),component:g.default,exact:!0},{path:"".concat(x,"/share-admin/detail/:id"),component:y.default,exact:!0},{path:"".concat(x,"/share-server-admin"),component:_.default,exact:!0},{path:"".concat(x,"/share-server-admin/detail/:id"),component:S.default,exact:!0},{path:"".concat(x,"/storage-admin"),component:w.default,exact:!0},{path:"*",component:s.default}]}];t.default=k},4117:function(e,a,r){"use strict";var l=r(33),i=r(44),s=r(32),n=r(25),u=r(27),o=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=a.ShareType=void 0;var p=f(r(36)),h=r(406),v=f(r(1194)),m=f(r(1257)),g=r(1357),y=f(r(1610));function b(e,t){var a=l(e);if(i){var r=i(e);t&&(r=s(r).call(r,(function(t){return n(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)u(a=b(Object(r),!0)).call(a,(function(t){(0,p.default)(e,t,r[t])}));else if(o)d(e,o(r));else{var l;u(l=b(Object(r))).call(l,(function(t){c(e,t,n(r,t))}))}}return e}class S extends v.default{constructor(){super(...arguments),(0,p.default)(this,"updateFetchParams",(e=>_(_({},e),{},{is_public:"all"}))),(0,p.default)(this,"getColumns",(()=>g.shareTypeColumns))}init(){this.store=m.default}get policy(){return"share_type:index"}get name(){return t("share types")}get fetchDataByAllProjects(){return!1}get actionConfigs(){return y.default}}a.ShareType=S;var w=(0,h.inject)("rootStore")((0,h.observer)(S));a.default=w},4118: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 s=i(r(57)),n=i(r(32)),u=i(r(65)),o=i(r(36)),d=r(406),c=r(1193),f=i(r(1257));class p extends c.ModalAction{constructor(){super(...arguments),(0,o.default)(this,"onSubmit",(e=>{var{id:t}=this.item;return this.store.update(t,e)}))}get defaultValue(){var{name:e,description:t}=this.item;return{name:e,description:t}}get formItems(){var e,a;return[{name:"name",label:t("Name"),type:"input-name",names:(0,s.default)(e=(0,n.default)(a=this.store.list.data).call(a,(e=>e.id!==this.item.id))).call(e,(e=>e.name)),required:!0},{name:"description",label:t("Description"),type:"textarea"}]}init(){this.store=f.default}}a.Edit=p,(0,o.default)(p,"id","edit"),(0,o.default)(p,"title",t("Edit")),(0,o.default)(p,"policy","share_type:update"),(0,o.default)(p,"allowed",(()=>u.default.resolve(!0)));var h=(0,d.inject)("rootStore")((0,d.observer)(p));a.default=h},4119:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=void 0;var s=i(r(36)),n=r(1193),u=i(r(1257));class o extends n.ConfirmAction{constructor(){super(...arguments),(0,s.default)(this,"policy","share_type:delete"),(0,s.default)(this,"onSubmit",(e=>u.default.delete(e)))}get id(){return"delete"}get title(){return t("Delete Share Type")}get isDanger(){return!0}get buttonText(){return t("Delete")}get actionName(){return t("Delete Share Type")}}a.default=o},4120:function(e,a,r){"use strict";var l=r(33),i=r(44),s=r(32),n=r(25),u=r(27),o=r(45),d=r(46),c=r(19),f=r(160),p=r(21);c(a,"__esModule",{value:!0}),a.default=a.ManageAccess=void 0;var h=p(r(32)),v=p(r(90)),m=p(r(57)),g=p(r(65)),y=p(r(51)),b=p(r(36)),_=r(406),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=A(t);if(a&&a.has(e))return a.get(e);var r={},l=c&&n;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=l?n(e,i):null;s&&(s.get||s.set)?c(r,i,s):r[i]=e[i]}r.default=e,a&&a.set(e,r);return r}(r(1257)),w=r(1193),x=r(407),k=r(1235);function A(e){if("function"!=typeof f)return null;var t=new f,a=new f;return(A=function(e){return e?a:t})(e)}function I(e,t){var a=l(e);if(i){var r=i(e);t&&(r=s(r).call(r,(function(t){return n(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=I(Object(r),!0)).call(a,(function(t){(0,b.default)(e,t,r[t])}));else if(o)d(e,o(r));else{var l;u(l=I(Object(r))).call(l,(function(t){c(e,t,n(r,t))}))}}return e}class N extends w.ModalAction{constructor(){super(...arguments),(0,b.default)(this,"onSubmit",(e=>{var{access:t={},isPublic:a}=e,{is_public:r,id:l}=this.item,i={id:l};if(a!==r&&(i.newPublic=a),!a){var s,{selectedRowKeys:n=[]}=t;i.adds=(0,h.default)(n).call(n,(e=>{var t;return(0,v.default)(t=this.currentAccess).call(t,e)<0})),i.dels=(0,h.default)(s=this.currentAccess).call(s,(e=>(0,v.default)(n).call(n,e)<0))}return S.default.updateProjectAccess(i)}))}init(){this.store=new S.ShareTypeStore,this.projectStore=new x.ProjectStore,this.getAccess(),this.getProjects()}static get modalSize(){return"large"}getModalSize(){return"large"}getAccess(){var e=this;return(0,y.default)((function*(){var{is_public:t}=e.item;t||(yield e.store.fetchProjectAccess(e.item.id),e.updateDefaultValue())}))()}getProjects(){var e=this;return(0,y.default)((function*(){yield e.projectStore.fetchList(),e.updateDefaultValue()}))()}get name(){return t("Manage Access")}get projects(){return this.projectStore.list.data||[]}get defaultValue(){var{name:e,is_public:t}=this.item;return{name:e,isPublic:t,access:{selectedRowKeys:this.currentAccess}}}get currentAccess(){var e;return(0,m.default)(e=this.store.access||[]).call(e,(e=>e.project_id))}get nameForStateUpdate(){return["isPublic"]}get formItems(){var{isPublic:e}=this.state;return[{name:"name",label:t("Share Type"),type:"label",iconType:"volume"},{name:"isPublic",label:t("Public"),type:"check",content:t("Public")},C({name:"access",label:t("Access Control"),type:"select-table",isMulti:!0,hidden:e,data:this.projects,isLoading:this.projectStore.list.isLoading},k.projectTableOptions)]}}a.ManageAccess=N,(0,b.default)(N,"id","manage-access"),(0,b.default)(N,"title",t("Manage Access")),(0,b.default)(N,"policy",["share_type:list_project_access","share_type:add_project_access","share_type:remove_project_access"]),(0,b.default)(N,"allowed",(()=>g.default.resolve(!0)));var j=(0,_.inject)("rootStore")((0,_.observer)(N));a.default=j},4121: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 s=r(406),n=r(1257),u=i(r(1200)),o=i(r(1311)),d=i(r(4129)),c=i(r(1610));class f extends u.default{get name(){return t("share type")}get policy(){return"share_type:show"}get listUrl(){return this.getRoutePath("shareType")}get actionConfigs(){return c.default}get detailInfos(){return[{title:t("Name"),dataIndex:"name"},{title:t("Description"),dataIndex:"description"},{title:t("Public"),dataIndex:"is_public",isHideable:!0,valueRender:"yesNo"}]}get tabs(){return[{title:t("Extra Specs"),key:"ExtraSpec",component:d.default},{title:t("Shares"),key:"share",component:o.default}]}init(){this.store=new n.ShareTypeStore}}a.Detail=f;var p=(0,s.inject)("rootStore")((0,s.observer)(f));a.default=p},4122:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=function(e){var{networkIds:a=[]}=e;if(!a.length)return null;var r=[{dataIndex:"name",title:t("Name")},{title:t("External"),dataIndex:"router:external",valueRender:"yesNo"},{title:t("Shared"),dataIndex:"shared",valueRender:"yesNo"},{title:t("Status"),dataIndex:"status",render:e=>o.networkStatus[e]||e}];return n.default.createElement(d.default,{columns:r,getRequests:()=>(0,s.default)(a).call(a,(e=>(new u.NetworkStore).fetchDetail({id:e})))})};var s=i(r(57)),n=i(r(0)),u=r(228),o=r(564),d=i(r(623))},4123:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=void 0;var s=i(r(36)),n=r(1193),u=i(r(1246));class o extends n.ConfirmAction{constructor(){super(...arguments),(0,s.default)(this,"policy","share:delete"),(0,s.default)(this,"allowedCheckFunc",(e=>this.isAdminPage||e.isMine)),(0,s.default)(this,"onSubmit",(e=>u.default.delete(e)))}get id(){return"delete"}get title(){return t("Delete Share")}get isDanger(){return!0}get buttonText(){return t("Delete")}get actionName(){return t("Delete Share")}}a.default=o},4124:function(e,a,r){"use strict";var l=r(33),i=r(44),s=r(32),n=r(25),u=r(27),o=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)),h=f(r(62)),v=f(r(36)),m=r(406),g=r(1193),y=f(r(1246)),b=r(1203);function _(e,t){var a=l(e);if(i){var r=i(e);t&&(r=s(r).call(r,(function(t){return n(e,t).enumerable}))),a.push.apply(a,r)}return a}class S extends g.ModalAction{constructor(){super(...arguments),(0,v.default)(this,"onSubmit",(e=>{var{id:t}=this.item,{is_public:a}=e,r=function(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,v.default)(e,t,r[t])}));else if(o)d(e,o(r));else{var l;u(l=_(Object(r))).call(l,(function(t){c(e,t,n(r,t))}))}}return e}({},(0,h.default)(e,["is_public"]));return this.checkShowPublic()&&(r.is_public=a),this.store.update(t,r)}))}get defaultValue(){var{name:e,description:t,is_public:a}=this.item;return{display_name:e,display_description:t,is_public:a}}checkShowPublic(){return(0,b.checkPolicyRule)("share:set_public_share")}get formItems(){return[{name:"display_name",label:t("Name"),type:"input-name",required:!0},{name:"display_description",label:t("Description"),type:"textarea"},{name:"is_public",label:t("Public"),type:"check",content:t("Public"),tip:t("If set then all tenants will be able to see this share."),display:this.checkShowPublic()}]}init(){this.store=y.default}}a.Edit=S,(0,v.default)(S,"id","edit"),(0,v.default)(S,"title",t("Edit")),(0,v.default)(S,"policy","share:update"),(0,v.default)(S,"allowed",(e=>p.default.resolve(e.isMine)));var w=(0,m.inject)("rootStore")((0,m.observer)(S));a.default=w},4125:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=a.ManageMetadata=void 0;var s=i(r(65)),n=i(r(36)),u=r(406),o=r(558),d=r(1193);class c extends d.FormAction{get listUrl(){return this.getRoutePath("share")}get name(){return t("Manage Metadata")}}a.ManageMetadata=c,(0,n.default)(c,"id","manage-metadata"),(0,n.default)(c,"title",t("Manage Metadata")),(0,n.default)(c,"path",((e,t)=>{var{isAdminPage:a}=t,r=a?"shareDetailAdmin":"shareDetail",{id:l}=e;return(0,o.getPath)({key:r,params:{id:l},query:{tab:"metadata"}})})),(0,n.default)(c,"policy","share:update_share_metadata"),(0,n.default)(c,"allowed",(e=>s.default.resolve(e.isMine)));var f=(0,u.inject)("rootStore")((0,u.observer)(c));a.default=f},4126:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=a.ManageAccessRule=void 0;var s=i(r(65)),n=i(r(36)),u=r(406),o=r(558),d=r(1193);class c extends d.FormAction{get listUrl(){return this.getRoutePath("share")}get name(){return t("Manage Access Rule")}}a.ManageAccessRule=c,(0,n.default)(c,"id","manage-access-rule"),(0,n.default)(c,"title",t("Manage Access Rule")),(0,n.default)(c,"path",((e,t)=>{var{isAdminPage:a}=t,r=a?"shareDetailAdmin":"shareDetail",{id:l}=e;return(0,o.getPath)({key:r,params:{id:l},query:{tab:"rule"}})})),(0,n.default)(c,"policy","share_access_rule:index"),(0,n.default)(c,"allowed",(e=>s.default.resolve(e.isMine)));var f=(0,u.inject)("rootStore")((0,u.observer)(c));a.default=f},4127:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=a.ExtendShare=void 0;var s=i(r(81)),n=i(r(65)),u=i(r(51)),o=i(r(36)),d=r(406),c=r(1193),f=i(r(1246));class p extends c.ModalAction{constructor(){var e;super(...arguments),e=this,(0,o.default)(this,"onSubmit",function(){var t=(0,u.default)((function*(t){var{new_size:a}=t,{id:r}=e.item;return e.store.extendSize(r,{new_size:a})}));return function(e){return t.apply(this,arguments)}}())}get name(){return t("Extend Share")}get defaultValue(){var e,{name:t,id:a,size:r}=this.item;return{share:(0,s.default)(e="".concat(t||a,"(")).call(e,r,"GiB)"),new_size:r+1}}get tips(){return t("After the share is expanded, the share cannot be reduced.")}getQuota(){var e=this;return(0,u.default)((function*(){yield e.store.fetchQuota(),e.updateDefaultValue()}))()}get isQuotaLimited(){var{gigabytes:{limit:e}={}}=this.store.quotaSet||{};return-1!==e}get leftSize(){var{gigabytes:{limit:e=10,in_use:t=0,reserved:a=0}={}}=this.store.quotaSet||{};return e-t-a}get maxSize(){var{size:e}=this.item;return e+this.leftSize}isQuotaEnough(){return!this.isQuotaLimited||this.leftSize>=1}get formItems(){var e,{size:a}=this.item,r=a+1;return this.isQuotaEnough()?[{name:"share",label:t("Share"),type:"label",iconType:"volume"},{name:"new_size",label:t("Capacity (GiB)"),type:"slider-input",max:this.maxSize,min:r,description:(0,s.default)(e="".concat(r,"GiB-")).call(e,this.maxSize,"GiB"),required:!0,display:this.isQuotaLimited},{name:"new_size",label:t("Capacity (GiB)"),type:"input-int",min:r,required:!0,display:!this.isQuotaLimited}]:[{type:"label",component:t("Quota is not enough for extend share.")}]}init(){this.store=f.default,this.getQuota()}}a.ExtendShare=p,(0,o.default)(p,"id","extend-share"),(0,o.default)(p,"title",t("Extend Share")),(0,o.default)(p,"policy","share:extend"),(0,o.default)(p,"allowed",(e=>n.default.resolve(e.isMine)));var h=(0,d.inject)("rootStore")((0,d.observer)(p));a.default=h},4128:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=a.ResetStatus=void 0;var s=i(r(32)),n=i(r(198)),u=i(r(65)),o=i(r(36)),d=r(406),c=r(1193),f=i(r(1246)),p=r(1232),h=r(161);class v extends c.ModalAction{constructor(){super(...arguments),(0,o.default)(this,"onSubmit",(e=>{var{id:t}=this.item;return this.store.resetStatus(t,e)}))}get name(){return t("Reset Status")}get defaultValue(){var{name:e,status:t}=this.item;return{name:e,oldStatus:p.shareStatus[t]||t}}get statusOptions(){var e,t=["available","error"],{status:a}=this.item,r=(0,s.default)(t).call(t,(e=>e!==a));return(0,s.default)(e=(0,h.getOptions)(p.shareStatus)).call(e,(e=>(0,n.default)(r).call(r,e.value)))}get formItems(){return[{name:"name",label:t("Name"),type:"label",iconType:"volume"},{name:"oldStatus",label:t("Current Status"),type:"label"},{name:"status",label:t("New Status"),type:"select",options:this.statusOptions,required:!0}]}init(){this.store=f.default}}a.ResetStatus=v,(0,o.default)(v,"id","reset"),(0,o.default)(v,"title",t("Reset Status")),(0,o.default)(v,"policy","share:reset_status"),(0,o.default)(v,"allowed",(()=>u.default.resolve(!0)));var m=(0,d.inject)("rootStore")((0,d.observer)(v));a.default=m},4129:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=a.ExtraSpecs=void 0;var s=i(r(36)),n=r(406),u=i(r(1194)),o=r(1359),d=i(r(4130));class c extends u.default{constructor(){super(...arguments),(0,s.default)(this,"getColumns",(()=>[{title:t("Key"),dataIndex:"keyName"},{title:t("Value"),dataIndex:"value"}]))}init(){this.store=new o.ExtraSpecStore}get policy(){return"share_types_extra_spec:index"}get name(){return t("extra specs")}get actionConfigs(){return d.default}get searchFilters(){return[{label:t("Key"),name:"keyName"}]}}a.ExtraSpecs=c;var f=(0,n.inject)("rootStore")((0,n.observer)(c));a.default=f},4130: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(4131)),s=l(a(4132)),n=l(a(4133)),u={rowActions:{firstAction:n.default,moreActions:[{action:s.default}]},batchActions:[n.default],primaryActions:[i.default]};t.default=u},4131: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 s=i(r(1204)),n=i(r(65)),u=i(r(36)),o=r(406),d=r(1193),c=i(r(1359));class f extends d.ModalAction{constructor(){super(...arguments),(0,u.default)(this,"onSubmit",(e=>{var{id:t}=this.containerProps.detail,{keyName:a,value:r}=e,l={[a]:r};return this.store.createOrUpdate(t,l)}))}get name(){return t("Create Extra Spec")}get defaultValue(){return{}}get instanceName(){return(0,s.default)(this).keyName}get formItems(){return[{name:"keyName",label:t("Key"),type:"input",required:!0,placeholder:t("Please input key")},{name:"value",label:t("Value"),type:"input",placeholder:t("Please input value"),required:!0}]}init(){this.store=c.default}}a.Create=f,(0,u.default)(f,"id","create"),(0,u.default)(f,"title",t("Create Extra Spec")),(0,u.default)(f,"policy","share_types_extra_spec:create"),(0,u.default)(f,"allowed",(()=>n.default.resolve(!0)));var p=(0,o.inject)("rootStore")((0,o.observer)(f));a.default=p},4132: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 s=i(r(65)),n=i(r(36)),u=r(406),o=r(1193),d=i(r(1359));class c extends o.ModalAction{constructor(){super(...arguments),(0,n.default)(this,"onSubmit",(e=>{var{id:t}=this.containerProps.detail,{keyName:a,value:r}=e,l={[a]:r};return this.store.createOrUpdate(t,l)}))}get name(){return t("Edit Extra Spec")}get instanceName(){return this.item.keyName}get defaultValue(){var{keyName:e,value:t}=this.item;return{keyName:e,value:t}}get formItems(){return[{name:"keyName",label:t("Key"),type:"input",disabled:!0,placeholder:t("Please input key")},{name:"value",label:t("Value"),type:"input",placeholder:t("Please input value")}]}init(){this.store=d.default}}a.Edit=c,(0,n.default)(c,"id","edit"),(0,n.default)(c,"title",t("Edit Extra Spec")),(0,n.default)(c,"buttonText",t("Edit")),(0,n.default)(c,"policy","share_types_extra_spec:update"),(0,n.default)(c,"allowed",(()=>s.default.resolve(!0)));var f=(0,u.inject)("rootStore")((0,u.observer)(c));a.default=f},4133:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=void 0;var s=i(r(36)),n=r(1193),u=i(r(1359));class o extends n.ConfirmAction{constructor(){super(...arguments),(0,s.default)(this,"policy","share_types_extra_spec:delete"),(0,s.default)(this,"allowedCheckFunc",(e=>"driver_handles_share_servers"!==e.keyName)),(0,s.default)(this,"onSubmit",(e=>{var{id:t}=this.containerProps.detail,{keyName:a}=e,r={id:t,keyName:a};return u.default.delete(r)}))}get id(){return"delete"}get title(){return t("Delete Extra Specs")}get isDanger(){return!0}get buttonText(){return t("Delete")}get actionName(){return t("Delete Extra Specs")}}a.default=o},4134:function(e,a,r){"use strict";var l=r(33),i=r(44),s=r(32),n=r(25),u=r(27),o=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=a.ShareGroupType=void 0;var p=f(r(36)),h=r(406),v=f(r(1194)),m=f(r(1264)),g=r(1613),y=f(r(1614));function b(e,t){var a=l(e);if(i){var r=i(e);t&&(r=s(r).call(r,(function(t){return n(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)u(a=b(Object(r),!0)).call(a,(function(t){(0,p.default)(e,t,r[t])}));else if(o)d(e,o(r));else{var l;u(l=b(Object(r))).call(l,(function(t){c(e,t,n(r,t))}))}}return e}class S extends v.default{constructor(){super(...arguments),(0,p.default)(this,"updateFetchParams",(e=>_(_({},e),{},{is_public:"all"}))),(0,p.default)(this,"getColumns",(()=>g.shareGroupTypeColumns))}init(){this.store=m.default}get policy(){return"share_type:index"}get name(){return t("share types")}get fetchDataByAllProjects(){return!1}get actionConfigs(){return y.default}}a.ShareGroupType=S;var w=(0,h.inject)("rootStore")((0,h.observer)(S));a.default=w},4135:function(e,a,r){"use strict";var l=r(33),i=r(44),s=r(32),n=r(25),u=r(27),o=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)),h=f(r(65)),v=f(r(62)),m=f(r(36)),g=r(406),y=r(1193),b=f(r(1264)),_=f(r(1257)),S=r(1235),w=r(407),x=r(161),k=r(1358);function A(e,t){var a=l(e);if(i){var r=i(e);t&&(r=s(r).call(r,(function(t){return n(e,t).enumerable}))),a.push.apply(a,r)}return a}function I(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,m.default)(e,t,r[t])}));else if(o)d(e,o(r));else{var l;u(l=A(Object(r))).call(l,(function(t){c(e,t,n(r,t))}))}}return e}class C extends y.ModalAction{constructor(){super(...arguments),(0,m.default)(this,"onSubmit",(e=>{var{is_public:t,accessControl:a={},extra:r=[],shareTypes:l}=e,i=(0,v.default)(e,["is_public","accessControl","extra","shareTypes"]),s=I({is_public:t,share_types:l.selectedRowKeys},i),n=[],u=(0,x.updateAddSelectValueToObj)(r);if(s.group_specs=u,!t){var{selectedRowKeys:o=[]}=a;n=[...o]}return this.store.create(s,n)}))}get name(){return t("create share group type")}init(){this.store=b.default,this.typeStore=_.default,this.projectStore=new w.ProjectStore,this.getTypes(),this.getProjects()}getTypes(){this.typeStore.fetchList({is_public:"all"})}getProjects(){this.projectStore.fetchList()}get projects(){return this.projectStore.list.data||[]}static get modalSize(){return"large"}getModalSize(){return"large"}get nameForStateUpdate(){return["is_public"]}get defaultValue(){return{is_public:!0}}get shareTypes(){return _.default.list.data||[]}get formItems(){var e,{is_public:a}=this.state;return[{name:"name",label:t("Name"),type:"input-name",names:(0,p.default)(e=this.store.list.data).call(e,(e=>e.name)),required:!0},{name:"shareTypes",label:t("Share Types"),type:"select-table",required:!0,isMulti:!0,data:this.shareTypes,isLoading:_.default.list.isLoading,filterParams:[{label:t("Name"),name:"name"}],columns:[{title:t("Name"),dataIndex:"name"},{title:t("Description"),dataIndex:"description",valueRender:"noValue"},{title:t("Public"),dataIndex:"is_public",valueRender:"yesNo"}]},{name:"is_public",label:t("Public"),type:"check",content:t("Public"),required:!0},I({name:"accessControl",label:t("Access Control"),type:"select-table",isMulti:!0,hidden:a,data:this.projects,isLoading:this.projectStore.list.isLoading},S.projectTableOptions),k.extraFormItem]}}a.Create=C,(0,m.default)(C,"id","create"),(0,m.default)(C,"title",t("Create Share Group Type")),(0,m.default)(C,"policy","share_group_type:create"),(0,m.default)(C,"allowed",(()=>h.default.resolve(!0)));var N=(0,g.inject)("rootStore")((0,g.observer)(C));a.default=N},4136:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=void 0;var s=i(r(36)),n=r(1193),u=i(r(1264));class o extends n.ConfirmAction{constructor(){super(...arguments),(0,s.default)(this,"policy","share_group_type:delete"),(0,s.default)(this,"onSubmit",(e=>u.default.delete(e)))}get id(){return"delete"}get title(){return t("Delete Share Group Type")}get isDanger(){return!0}get buttonText(){return t("Delete")}get actionName(){return t("Delete Share Group Type")}}a.default=o},4137:function(e,a,r){"use strict";var l=r(33),i=r(44),s=r(32),n=r(25),u=r(27),o=r(45),d=r(46),c=r(19),f=r(160),p=r(21);c(a,"__esModule",{value:!0}),a.default=a.ManageAccess=void 0;var h=p(r(32)),v=p(r(90)),m=p(r(57)),g=p(r(65)),y=p(r(51)),b=p(r(36)),_=r(406),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=A(t);if(a&&a.has(e))return a.get(e);var r={},l=c&&n;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=l?n(e,i):null;s&&(s.get||s.set)?c(r,i,s):r[i]=e[i]}r.default=e,a&&a.set(e,r);return r}(r(1264)),w=r(1193),x=r(407),k=r(1235);function A(e){if("function"!=typeof f)return null;var t=new f,a=new f;return(A=function(e){return e?a:t})(e)}function I(e,t){var a=l(e);if(i){var r=i(e);t&&(r=s(r).call(r,(function(t){return n(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=I(Object(r),!0)).call(a,(function(t){(0,b.default)(e,t,r[t])}));else if(o)d(e,o(r));else{var l;u(l=I(Object(r))).call(l,(function(t){c(e,t,n(r,t))}))}}return e}class N extends w.ModalAction{constructor(){super(...arguments),(0,b.default)(this,"onSubmit",(e=>{var t,{access:a={}}=e,{id:r}=this.item,l={id:r},{selectedRowKeys:i=[]}=a;return l.adds=(0,h.default)(i).call(i,(e=>{var t;return(0,v.default)(t=this.currentAccess).call(t,e)<0})),l.dels=(0,h.default)(t=this.currentAccess).call(t,(e=>(0,v.default)(i).call(i,e)<0)),S.default.updateProjectAccess(l)}))}init(){this.store=new S.ShareGroupTypeStore,this.projectStore=new x.ProjectStore,this.getAccess(),this.getProjects()}static get modalSize(){return"large"}getModalSize(){return"large"}getAccess(){var e=this;return(0,y.default)((function*(){var{is_public:t}=e.item;t||(yield e.store.fetchProjectAccess(e.item.id),e.updateDefaultValue())}))()}getProjects(){var e=this;return(0,y.default)((function*(){yield e.projectStore.fetchList(),e.updateDefaultValue()}))()}get name(){return t("Manage Access")}get projects(){return this.projectStore.list.data||[]}get defaultValue(){var{name:e}=this.item;return{name:e,access:{selectedRowKeys:this.currentAccess}}}get currentAccess(){var e;return(0,m.default)(e=this.store.access||[]).call(e,(e=>e.project_id))}get formItems(){var{isPublic:e}=this.state;return[{name:"name",label:t("Share Type"),type:"label",iconType:"volume"},C({name:"access",label:t("Access Control"),type:"select-table",isMulti:!0,hidden:e,data:this.projects,isLoading:this.projectStore.list.isLoading},k.projectTableOptions)]}}a.ManageAccess=N,(0,b.default)(N,"id","manage-access"),(0,b.default)(N,"title",t("Manage Access")),(0,b.default)(N,"policy",["share_group_type:list_project_access","share_group_type:add_project_access","share_group_type:remove_project_access"]),(0,b.default)(N,"allowed",(e=>g.default.resolve(!e.is_public)));var j=(0,_.inject)("rootStore")((0,_.observer)(N));a.default=j},4138: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 s=r(406),n=r(1264),u=i(r(1200)),o=i(r(4139)),d=i(r(1614));class c extends u.default{get name(){return t("share group type")}get policy(){return"share_group_type:show"}get listUrl(){return this.getRoutePath("shareGroupType")}get actionConfigs(){return d.default}get detailInfos(){return[{title:t("Name"),dataIndex:"name"},{title:t("Public"),dataIndex:"is_public",isHideable:!0,valueRender:"yesNo"}]}get tabs(){return[{title:t("Extra Specs"),key:"extraSpec",component:o.default}]}init(){this.store=new n.ShareGroupTypeStore}}a.Detail=c;var f=(0,s.inject)("rootStore")((0,s.observer)(c));a.default=f},4139:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=a.ExtraSpecs=void 0;var s=i(r(36)),n=r(406),u=i(r(1194)),o=r(1360),d=i(r(4140));class c extends u.default{constructor(){super(...arguments),(0,s.default)(this,"getColumns",(()=>[{title:t("Key"),dataIndex:"keyName"},{title:t("Value"),dataIndex:"value"}]))}init(){this.store=new o.GroupSpecStore}get policy(){return"share_group_types_spec:index"}get name(){return t("extra specs")}get actionConfigs(){return d.default}get searchFilters(){return[{label:t("Key"),name:"keyName"}]}}a.ExtraSpecs=c;var f=(0,n.inject)("rootStore")((0,n.observer)(c));a.default=f},4140: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(4141)),s=l(a(4142)),n=l(a(4143)),u={rowActions:{firstAction:n.default,moreActions:[{action:s.default}]},batchActions:[n.default],primaryActions:[i.default]};t.default=u},4141: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 s=i(r(1204)),n=i(r(65)),u=i(r(36)),o=r(406),d=r(1193),c=i(r(1360));class f extends d.ModalAction{constructor(){super(...arguments),(0,u.default)(this,"onSubmit",(e=>{var{id:t}=this.containerProps.detail,{keyName:a,value:r}=e,l={[a]:r};return this.store.createOrUpdate(t,l)}))}get name(){return t("Create Extra Spec")}get defaultValue(){return{}}get instanceName(){return(0,s.default)(this).keyName}get formItems(){return[{name:"keyName",label:t("Key"),type:"input",required:!0,placeholder:t("Please input key")},{name:"value",label:t("Value"),type:"input",placeholder:t("Please input value"),required:!0}]}init(){this.store=c.default}}a.Create=f,(0,u.default)(f,"id","create"),(0,u.default)(f,"title",t("Create Extra Spec")),(0,u.default)(f,"policy","share_group_types_spec:create"),(0,u.default)(f,"allowed",(()=>n.default.resolve(!0)));var p=(0,o.inject)("rootStore")((0,o.observer)(f));a.default=p},4142: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 s=i(r(65)),n=i(r(36)),u=r(406),o=r(1193),d=i(r(1360));class c extends o.ModalAction{constructor(){super(...arguments),(0,n.default)(this,"onSubmit",(e=>{var{id:t}=this.containerProps.detail,{keyName:a,value:r}=e,l={[a]:r};return this.store.createOrUpdate(t,l)}))}get name(){return t("Edit Extra Spec")}get instanceName(){return this.item.keyName}get defaultValue(){var{keyName:e,value:t}=this.item;return{keyName:e,value:t}}get formItems(){return[{name:"keyName",label:t("Key"),type:"input",disabled:!0,placeholder:t("Please input key")},{name:"value",label:t("Value"),type:"input",placeholder:t("Please input value")}]}init(){this.store=d.default}}a.Edit=c,(0,n.default)(c,"id","edit"),(0,n.default)(c,"title",t("Edit Extra Spec")),(0,n.default)(c,"buttonText",t("Edit")),(0,n.default)(c,"policy","share_group_types_spec:update"),(0,n.default)(c,"allowed",(()=>s.default.resolve(!0)));var f=(0,u.inject)("rootStore")((0,u.observer)(c));a.default=f},4143:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=void 0;var s=i(r(36)),n=r(1193),u=i(r(1360));class o extends n.ConfirmAction{constructor(){super(...arguments),(0,s.default)(this,"policy","share_group_types_spec:delete"),(0,s.default)(this,"allowedCheckFunc",(()=>!0)),(0,s.default)(this,"onSubmit",(e=>{var{id:t}=this.containerProps.detail,{keyName:a}=e,r={id:t,keyName:a};return u.default.delete(r)}))}get id(){return"delete"}get title(){return t("Delete Extra Specs")}get isDanger(){return!0}get buttonText(){return t("Delete")}get actionName(){return t("Delete Extra Specs")}}a.default=o},4144:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=a.ShareInstance=void 0;var s=i(r(36)),n=r(406),u=i(r(1194)),o=i(r(1361)),d=r(1232),c=i(r(1615));class f extends u.default{constructor(){super(...arguments),(0,s.default)(this,"getColumns",(()=>[{title:t("ID"),dataIndex:"id",routeName:"shareInstanceDetailAdmin",isLink:!0,withoutName:!0},{title:t("Host"),dataIndex:"host",isHideable:!0},{title:t("Status"),dataIndex:"status",valueMap:d.shareStatus},{title:t("Availability Zone"),dataIndex:"availability_zone"},{title:t("Share Network"),dataIndex:"share_network_id",isLink:!0,routeName:this.getRouteName("shareNetworkDetail"),idKey:"share_network_id",withoutName:!0},{title:t("Share Server"),dataIndex:"share_server_id",isLink:!0,routeName:this.getRouteName("shareServerDetail"),idKey:"share_server_id",withoutName:!0},{title:t("Share Id"),dataIndex:"share_id",isLink:!0,routeName:this.getRouteName("shareDetail"),idKey:"share_id",withoutName:!0}]))}init(){this.store=o.default}get policy(){return"share_instance:index"}get name(){return t("share instances")}get fetchDataByAllProjects(){return!1}get actionConfigs(){return c.default}}a.ShareInstance=f;var p=(0,n.inject)("rootStore")((0,n.observer)(f));a.default=p},4145:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=void 0;var s=i(r(36)),n=r(1193),u=i(r(1361));class o extends n.ConfirmAction{constructor(){super(...arguments),(0,s.default)(this,"policy","share_instance:force_delete"),(0,s.default)(this,"onSubmit",(e=>u.default.forceDelete(e)))}get id(){return"delete"}get title(){return t("Force Delete Share Instance")}get isDanger(){return!0}get buttonText(){return t("Force Delete")}get actionName(){return t("Force Delete Share Instance")}}a.default=o},4146:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=a.ResetStatus=void 0;var s=i(r(32)),n=i(r(198)),u=i(r(65)),o=i(r(36)),d=r(406),c=r(1193),f=i(r(1361)),p=r(1232),h=r(161);class v extends c.ModalAction{constructor(){super(...arguments),(0,o.default)(this,"onSubmit",(e=>{var{id:t}=this.item;return this.store.resetStatus(t,e)}))}get name(){return t("Reset Status")}get defaultValue(){var{id:e,status:t}=this.item;return{id:e,oldStatus:p.shareStatus[t]||t}}get instanceName(){return(this.item||{}).id}get statusOptions(){var e,t=["available","error"],{status:a}=this.item,r=(0,s.default)(t).call(t,(e=>e!==a));return(0,s.default)(e=(0,h.getOptions)(p.shareStatus)).call(e,(e=>(0,n.default)(r).call(r,e.value)))}get formItems(){return[{name:"id",label:t("Share Instance"),type:"label",iconType:"instance"},{name:"oldStatus",label:t("Current Status"),type:"label"},{name:"status",label:t("New Status"),type:"select",options:this.statusOptions,required:!0}]}init(){this.store=f.default}}a.ResetStatus=v,(0,o.default)(v,"id","reset"),(0,o.default)(v,"title",t("Reset Status")),(0,o.default)(v,"policy","share_instance:reset_status"),(0,o.default)(v,"allowed",(()=>u.default.resolve(!0)));var m=(0,d.inject)("rootStore")((0,d.observer)(v));a.default=m},4147: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 s=r(406),n=r(1361),u=i(r(1200)),o=r(1232),d=i(r(4148)),c=i(r(1615));class f extends u.default{get name(){return t("share instance")}get policy(){return"share_instance:show"}get listUrl(){return this.getRoutePath("shareInstance")}get actionConfigs(){return c.default}get detailInfos(){return[{title:t("Host"),dataIndex:"host"},{title:t("Status"),dataIndex:"status",valueMap:o.shareStatus},{title:t("Created"),dataIndex:"created_at",valueRender:"toLocalTime"},{title:t("Updated"),dataIndex:"updated_at",valueRender:"toLocalTime"}]}get tabs(){return[{title:t("Base Info"),key:"baseInfo",component:d.default}]}init(){this.store=new n.ShareInstanceStore}}a.Detail=f;var p=(0,s.inject)("rootStore")((0,s.observer)(f));a.default=p},4148: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 s=i(r(57)),n=i(r(81)),u=i(r(0)),o=r(406),d=i(r(1202)),c=r(1232),f=r(161);class p extends d.default{get leftCards(){return[this.baseInfoCard]}get rightCards(){return[this.exportLocations]}get baseInfoCard(){var e=[{label:t("Host"),dataIndex:"host"},{label:t("Availability Zone"),dataIndex:"availability_zone"},{label:t("Share Network"),dataIndex:"share_network_id"},{label:t("Share Server"),dataIndex:"share_server_id"},{label:t("Share Id"),dataIndex:"share_id"},{label:t("Access Rules Status"),dataIndex:"access_rules_status",valueMap:c.accessRuleStatus},{label:t("Progress"),dataIndex:"progress"},{label:t("Cast Rules To Read Only"),dataIndex:"cast_rules_to_readonly",valueRender:"yesNo"}];return{title:t("Base Info"),options:e}}get exportLocations(){var{exportLocations:e=[]}=this.detailData||{},a=(0,s.default)(e).call(e,((e,a)=>{var r;return{label:(0,n.default)(r="".concat(t("Export Location")," ")).call(r,a+1),dataIndex:"exportLocations",render:()=>u.default.createElement("div",{key:e.id},u.default.createElement("div",null,u.default.createElement("span",{style:{fontWeight:"bold"}},t("Path"),": "),e.path),u.default.createElement("div",null,u.default.createElement("span",{style:{fontWeight:"bold"}},t("Preferred"),": "),(0,f.getYesNo)(e.preferred)),u.default.createElement("div",null,u.default.createElement("span",{style:{fontWeight:"bold"}},t("Is admin only"),":"),(0,f.getYesNo)(e.is_admin_only)))}}));return{title:t("Export Locations"),options:a,labelCol:4}}}a.BaseDetail=p;var h=(0,o.inject)("rootStore")((0,o.observer)(p));a.default=h},4149:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=a.ShareNetwork=void 0;var s=i(r(36)),n=r(406),u=i(r(1194)),o=i(r(1258)),d=r(1420),c=i(r(1616));class f extends u.default{constructor(){super(...arguments),(0,s.default)(this,"getColumns",(()=>(0,d.getShareNetworkColumns)(this)))}init(){this.store=o.default}get policy(){return"share_network:detail"}get name(){return t("share types")}get actionConfigs(){return this.isAdminPage?c.default.actionConfigsAdmin:c.default.actionConfigs}}a.ShareNetwork=f;var p=(0,n.inject)("rootStore")((0,n.observer)(f));a.default=p},4150:function(e,a,r){"use strict";var l=r(33),i=r(44),s=r(32),n=r(25),u=r(27),o=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(65)),h=f(r(32)),v=f(r(198)),m=f(r(27)),g=f(r(102)),y=f(r(226)),b=f(r(81)),_=f(r(51)),S=f(r(62)),w=f(r(36)),x=r(406),k=r(1193),A=f(r(1258)),I=r(228),C=r(414),N=r(575);function j(e,t){var a=l(e);if(i){var r=i(e);t&&(r=s(r).call(r,(function(t){return n(e,t).enumerable}))),a.push.apply(a,r)}return a}class P extends k.ModalAction{constructor(){super(...arguments),(0,w.default)(this,"onNetworkChange",(e=>{var{selectedRowKeys:t=[]}=e;0!==t.length?this.setState({networkId:t[0]},(()=>{this.getSubnets()})):this.setState({networkId:null,subnets:[]})})),(0,w.default)(this,"onSubmit",(e=>{var{network:t,subnet:a}=e,r=(0,S.default)(e,["network","subnet"]),l=function(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)u(a=j(Object(r),!0)).call(a,(function(t){(0,w.default)(e,t,r[t])}));else if(o)d(e,o(r));else{var l;u(l=j(Object(r))).call(l,(function(t){c(e,t,n(r,t))}))}}return e}({neutron_net_id:t.selectedRowKeys[0],neutron_subnet_id:a.selectedRowKeys[0]},r);return this.store.create(l)}))}get name(){return t("create share network")}init(){this.store=A.default,this.networkStore=new I.NetworkStore,this.subnetStore=new C.SubnetStore,this.portStore=new N.PortStore}static get modalSize(){return"large"}getModalSize(){return"large"}getSubnets(){var e=this;return(0,_.default)((function*(){var{networkId:t}=e.state;if(t){var[a,r]=yield p.default.all([e.subnetStore.fetchList({network_id:t}),e.portStore.fetchList({network_id:t})]),l=["network:router_interface","network:ha_router_replicated_interface","network:router_interface_distributed"],i=(0,h.default)(r).call(r,(e=>(0,v.default)(l).call(l,e.device_owner)));(0,m.default)(a).call(a,(e=>{var t=(0,g.default)(i).call(i,(t=>{var{fixed_ips:a=[]}=t;return(0,y.default)(a).call(a,(t=>t.subnet_id===e.id))}));e.selectable=!!t})),e.setState({subnets:a})}}))()}get nameForStateUpdate(){return["network"]}get formItems(){var{networkId:e,subnets:a}=this.state;return[{name:"name",label:t("Name"),type:"input-name",required:!0},{name:"description",label:t("Description"),type:"textarea"},{name:"network",label:t("Network"),type:"network-select-table",required:!0,onChange:this.onNetworkChange},{name:"subnet",label:t("Subnet"),type:"select-table",data:a,isLoading:e&&this.subnetStore.list.isLoading&&this.portStore.list.isLoading,required:!0,extra:t("Only subnets that are already connected to the router can be selected."),disabledFunc:e=>!e.selectable,filterParams:[{label:t("Name"),name:"name"}],columns:[{title:t("Name"),dataIndex:"name"},{title:t("Cidr"),dataIndex:"cidr"},{title:t("Allocation Pools"),dataIndex:"allocation_pools",render:e=>{var t;return e&&0!==e.length?(0,b.default)(t="".concat(e[0].start," -- ")).call(t,e[0].end):"-"}},{title:t("Created At"),dataIndex:"created_at",valueRender:"sinceTime"}],display:!!e}]}}a.Create=P,(0,w.default)(P,"id","create"),(0,w.default)(P,"title",t("Create Share Network")),(0,w.default)(P,"policy","share_network:create"),(0,w.default)(P,"allowed",(()=>p.default.resolve(!0)));var M=(0,x.inject)("rootStore")((0,x.observer)(P));a.default=M},4151:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=void 0;var s=i(r(36)),n=r(1193),u=i(r(1258));class o extends n.ConfirmAction{constructor(){super(...arguments),(0,s.default)(this,"policy","share_network:delete"),(0,s.default)(this,"onSubmit",(e=>u.default.delete(e)))}get id(){return"delete"}get title(){return t("Delete Share Network")}get isDanger(){return!0}get buttonText(){return t("Delete")}get actionName(){return t("Delete Share Network")}}a.default=o},4152: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 s=i(r(65)),n=i(r(36)),u=r(406),o=r(1193),d=i(r(1258));class c extends o.ModalAction{constructor(){super(...arguments),(0,n.default)(this,"onSubmit",(e=>{var{id:t}=this.item;return this.store.update(t,e)}))}get defaultValue(){var{name:e,description:t}=this.item;return{name:e,description:t}}get formItems(){return[{name:"name",label:t("Name"),type:"input-name",required:!0},{name:"description",label:t("Description"),type:"textarea"}]}init(){this.store=d.default}}a.Edit=c,(0,n.default)(c,"id","edit"),(0,n.default)(c,"title",t("Edit")),(0,n.default)(c,"policy","share_network:update"),(0,n.default)(c,"allowed",(()=>s.default.resolve(!0)));var f=(0,u.inject)("rootStore")((0,u.observer)(c));a.default=f},4153: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 s=r(406),n=r(1258),u=i(r(1200)),o=i(r(1311)),d=i(r(4154)),c=i(r(1616));class f extends u.default{get name(){return t("share network")}get policy(){return"share_network:show"}get listUrl(){return this.getRoutePath("shareNetwork")}get actionConfigs(){return this.isAdminPage?c.default.actionConfigsAdmin:c.default.actionConfigs}get detailInfos(){return[{title:t("Name"),dataIndex:"name"},{title:t("Description"),dataIndex:"description"},{title:t("Created At"),dataIndex:"created_at",valueRender:"toLocalTime"},{title:t("Updated"),dataIndex:"updated_at",valueRender:"toLocalTime"}]}get tabs(){return[{title:t("Base Info"),key:"baseInfo",component:d.default},{title:t("Shares"),key:"share",component:o.default}]}init(){this.store=new n.ShareNetworkStore}}a.Detail=f;var p=(0,s.inject)("rootStore")((0,s.observer)(f));a.default=p},4154: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 s=i(r(57)),n=i(r(81)),u=i(r(0)),o=r(406),d=i(r(1202));class c extends d.default{get leftCards(){return[this.baseInfoCard]}get rightCards(){return[this.subnetInfos]}get baseInfoCard(){var e=[{label:t("Project ID"),dataIndex:"project_id"}];return{title:t("Base Info"),options:e}}get subnetInfos(){var{share_network_subnets:e=[],networks:a=[],subnets:r=[]}=this.detailData||{},l=(0,s.default)(e).call(e,((e,l)=>{var i;return{label:(0,n.default)(i="".concat(t("Share Network Subnet")," ")).call(i,l+1),dataIndex:"subnet",render:()=>{var i=r[l]||{},n=a[l]||{},o=[{label:t("ID"),value:e.id},{label:t("Neutron Net"),value:this.getLinkRender("networkDetail",n.name,{id:n.id})},{label:t("Neutron Subnet"),value:i.name},{label:t("IP Version"),value:e.ip_vesion||"-"},{label:t("Network Type"),value:e.network_type||"-"},{label:t("Segmentation Id"),value:e.segmentation_id||"-"},{label:t("Availability Zone"),value:e.availability_zone||"-"},{label:t("Cidr"),value:e.cidr||"-"},{label:t("Gateway"),value:e.gateway||"-"},{label:t("MTU"),value:e.mtu||"-"}],d=(0,s.default)(o).call(o,(e=>u.default.createElement("div",{key:e.label},u.default.createElement("span",{style:{fontWeight:"bold"}},e.label,": "),u.default.createElement("span",null,e.value))));return u.default.createElement("div",{key:e.id},d)}}}));return{title:t("Share Network Subnets"),options:l,labelCol:4}}}a.BaseDetail=c;var f=(0,o.inject)("rootStore")((0,o.observer)(c));a.default=f},4155:function(e,a,r){"use strict";var l=r(160),i=r(19),s=r(25),n=r(21);i(a,"__esModule",{value:!0}),a.default=a.ShareGroup=void 0;var u=n(r(36)),o=r(406),d=n(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=h(t);if(a&&a.has(e))return a.get(e);var r={},l=i&&s;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var u=l?s(e,n):null;u&&(u.get||u.set)?i(r,n,u):r[n]=e[n]}r.default=e,a&&a.set(e,r);return r}(r(1289)),f=r(1419),p=n(r(1617));function h(e){if("function"!=typeof l)return null;var t=new l,a=new l;return(h=function(e){return e?a:t})(e)}class v extends d.default{constructor(){super(...arguments),(0,u.default)(this,"getColumns",(()=>(0,f.getShareGroupColumns)(this)))}init(){this.store=c.default,this.downloadStore=new c.ShareGroupStore}get policy(){return"share_group:get_all"}get name(){return t("share groups")}get isFilterByBackend(){return!0}get isSortByBackend(){return!0}get defaultSortKey(){return"created_at"}get actionConfigs(){return this.isAdminPage?p.default.actionConfigsAdmin:p.default.actionConfigs}get searchFilters(){return f.shareGroupFilters}}a.ShareGroup=v;var m=(0,o.inject)("rootStore")((0,o.observer)(v));a.default=m},4156:function(e,a,r){"use strict";var l=r(33),i=r(44),s=r(32),n=r(25),u=r(27),o=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(226)),h=f(r(65)),v=f(r(62)),m=f(r(36)),g=f(r(1386)),y=r(406),b=r(1193),_=f(r(1289)),S=r(1258),w=r(1264),x=r(1246),k=r(1613),A=r(1357),I=r(1420),C=r(578);function N(e,t){var a=l(e);if(i){var r=i(e);t&&(r=s(r).call(r,(function(t){return n(e,t).enumerable}))),a.push.apply(a,r)}return a}function j(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)u(a=N(Object(r),!0)).call(a,(function(t){(0,m.default)(e,t,r[t])}));else if(o)d(e,o(r));else{var l;u(l=N(Object(r))).call(l,(function(t){c(e,t,n(r,t))}))}}return e}class P extends b.ModalAction{constructor(){super(...arguments),(0,m.default)(this,"onGroupTypeChange",(e=>{var{selectedRows:t=[]}=e;0!==t.length?this.setState({types:t[0].shareTypes}):this.setState({types:[]})})),(0,m.default)(this,"onShareTypeChange",(e=>{var{selectedRows:t=[]}=e;if(0!==t.length){var a=(0,p.default)(t).call(t,(e=>!(0,A.checkShareTypeSupportServer)(e)));this.setState({showNetworks:!a})}else this.setState({showNetworks:!1})})),(0,m.default)(this,"onSubmit",(e=>{var{shareGroupType:t,shareType:a,shareNetwork:r}=e,l=(0,v.default)(e,["shareGroupType","shareType","shareNetwork"]),{showNetworks:i=!1}=this.state,s=j(j({},l),{},{share_group_type_id:t.selectedRowKeys[0],share_types:a.selectedRowKeys}),{selectedRowKeys:n=[]}=r||{};return i&&n.length&&(s.share_network_id=n[0]),this.store.create(s)}))}get name(){return t("create share group")}init(){this.store=_.default,this.networkStore=new S.ShareNetworkStore,this.groupTypeStore=new w.ShareGroupTypeStore,this.shareStore=new x.ShareStore,this.groupTypeStore.fetchList(),this.networkStore.fetchList(),this.getZones(),this.state.types=[],this.state.showNetworks=!1}static get modalSize(){return"large"}getModalSize(){return"large"}getZones(){this.shareStore.fetchAvailableZones()}getShareTypes(){return[]}get groupTypes(){return this.groupTypeStore.list.data||[]}get shareGroupTypeColumns(){var[,...e]=(0,g.default)(k.shareGroupTypeColumns);return[C.idNameColumn,...e]}get shareTypeColumns(){var[,...e]=(0,g.default)(A.shareTypeColumns);return[C.idNameColumn,...e]}get shareNetworkColumns(){var[,...e]=(0,I.getShareNetworkColumns)(this);return[C.idNameColumn,...e]}get formItems(){var{types:e=[],showNetworks:a=!1}=this.state;return[{name:"name",label:t("Name"),type:"input-name",required:!0},{name:"description",label:t("Description"),type:"textarea"},{name:"availability_zone",label:t("Availability Zone"),type:"select",options:this.shareStore.zoneOptions},{name:"shareGroupType",label:t("Share Group Type"),type:"select-table",required:!0,onChange:this.onGroupTypeChange,columns:this.shareGroupTypeColumns,filterParams:k.shareGroupTypeFilters,isLoading:this.groupTypeStore.list.isLoading,data:this.groupTypes,disabledFunc:e=>!e.shareTypes.length},{name:"shareType",label:t("Share Type"),type:"select-table",isMulti:!0,required:!0,columns:this.shareTypeColumns,filterParams:A.shareTypeFilters,data:e,display:!!e.length,onChange:this.onShareTypeChange,extra:A.shareTypeTip},{name:"shareNetwork",label:t("Share Network"),type:"select-table",columns:this.shareNetworkColumns,filterParams:I.shareNetworkFilters,isLoading:this.networkStore.list.isLoading,data:this.networkStore.list.data||[],display:a,required:a}]}}a.Create=P,(0,m.default)(P,"id","create"),(0,m.default)(P,"title",t("Create Share Group")),(0,m.default)(P,"policy","share_group:create"),(0,m.default)(P,"allowed",(()=>h.default.resolve(!0)));var M=(0,y.inject)("rootStore")((0,y.observer)(P));a.default=M},4157:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=void 0;var s=i(r(36)),n=r(1193),u=i(r(1289));class o extends n.ConfirmAction{constructor(){super(...arguments),(0,s.default)(this,"policy","share_group:delete"),(0,s.default)(this,"onSubmit",(e=>u.default.delete(e)))}get id(){return"delete"}get title(){return t("Delete Share Group")}get isDanger(){return!0}get buttonText(){return t("Delete")}get actionName(){return t("Delete Share Group")}}a.default=o},4158: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 s=i(r(65)),n=i(r(36)),u=r(406),o=r(1193),d=i(r(1289));class c extends o.ModalAction{constructor(){super(...arguments),(0,n.default)(this,"onSubmit",(e=>{var{id:t}=this.item;return this.store.update(t,e)}))}get defaultValue(){var{name:e,description:t}=this.item;return{name:e,description:t}}get formItems(){return[{name:"name",label:t("Name"),type:"input-name",required:!0},{name:"description",label:t("Description"),type:"textarea"}]}init(){this.store=d.default}}a.Edit=c,(0,n.default)(c,"id","edit"),(0,n.default)(c,"title",t("Edit")),(0,n.default)(c,"policy","share_group:update"),(0,n.default)(c,"allowed",(()=>s.default.resolve(!0)));var f=(0,u.inject)("rootStore")((0,u.observer)(c));a.default=f},4159: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 s=r(406),n=r(1289),u=i(r(1200)),o=r(1419),d=i(r(1311)),c=i(r(4160)),f=i(r(1617));class p extends u.default{get name(){return t("share group")}get policy(){return"share_group:get"}get listUrl(){return this.getRoutePath("shareGroup")}get actionConfigs(){return this.isAdminPage?f.default.actionConfigsAdmin:f.default.actionConfigs}get detailInfos(){return[{title:t("Name"),dataIndex:"name"},{title:t("Description"),dataIndex:"description"},{title:t("Status"),dataIndex:"status",valueMap:o.shareGroupStatus},{title:t("Created At"),dataIndex:"created_at",valueRender:"toLocalTime"}]}get tabs(){return[{title:t("Base Info"),key:"baseInfo",component:c.default},{title:t("Shares"),key:"share",component:d.default}]}init(){this.store=new n.ShareGroupStore}}a.Detail=p;var h=(0,s.inject)("rootStore")((0,s.observer)(p));a.default=h},4160: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 s=i(r(81)),n=i(r(57)),u=i(r(0)),o=r(406),d=i(r(1202));class c extends d.default{get leftCards(){return[this.baseInfoCard,this.shareNetworkCard]}get rightCards(){return[this.shareGroupTypeCard]}get baseInfoCard(){var e=[{label:t("Project ID"),dataIndex:"project_id"},{label:t("Availability Zone"),dataIndex:"availability_zone"},{label:t("Host"),dataIndex:"host"}];return{title:t("Base Info"),options:e}}get shareGroupTypeCard(){var{shareGroupType:e,shareTypes:a}=this.detailData,r=[{label:t("Share Group Type"),dataIndex:"share_group_type",render:()=>{var t,{id:a,name:r}=e;return this.isAdminPage?this.getLinkRender("shareGroupTypeDetail",r,{id:a}):(0,s.default)(t="".concat(r,"(")).call(t,a,")")}},{label:t("Share Types"),dataIndex:"share_types",render:()=>this.isAdminPage?(0,n.default)(a).call(a,(e=>{var{id:t,name:a}=e||{};if(!t)return null;var r=this.getLinkRender("shareTypeDetail",a||t,{id:t});return u.default.createElement("div",{key:t},r)})):(0,n.default)(a).call(a,(e=>{var{id:t,name:a}=e||{};return a?u.default.createElement("div",{key:t},a,"(",t,")"):t}))}];return{title:t("Share Group Type"),options:r,labelCol:4}}get shareNetworkCard(){var{shareNetwork:e}=this.detailData,a=[{label:t("Share Network"),dataIndex:"share_network_id",render:t=>t?this.getLinkRender("shareNetworkDetail",e.name,{id:t}):"-"}];return{title:t("Share Network"),options:a}}}a.BaseDetail=c;var f=(0,o.inject)("rootStore")((0,o.observer)(c));a.default=f},4161: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 s=r(406),n=r(1246),u=i(r(1200)),o=r(1232),d=i(r(4162)),c=i(r(4163)),f=i(r(4168)),p=i(r(1611));class h extends u.default{get name(){return t("share")}get policy(){return"share:get"}get listUrl(){return this.getRoutePath("share")}get actionConfigs(){return this.isAdminPage?p.default.actionConfigsAdmin:p.default.actionConfigs}get detailInfos(){return[{title:t("Name"),dataIndex:"name"},{title:t("Description"),dataIndex:"description"},{title:t("Status"),dataIndex:"status",valueMap:o.shareStatus},{title:t("Created At"),dataIndex:"created_at",valueRender:"toLocalTime"}]}get tabs(){return[{title:t("Base Info"),key:"baseInfo",component:d.default},{title:t("Metadata"),key:"metadata",component:c.default},{title:t("Access Rules"),key:"rule",component:f.default}]}init(){this.store=new n.ShareStore}}a.Detail=h;var v=(0,s.inject)("rootStore")((0,s.observer)(h));a.default=v},4162: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 s=i(r(57)),n=i(r(81)),u=i(r(0)),o=r(406),d=i(r(1202)),c=r(1232),f=r(161);class p extends d.default{get leftCards(){var e=[this.baseInfoCard,this.shareTypeCard],{share_network_id:t,share_group_id:a}=this.detailData;return t&&e.push(this.shareNetworkCard),a&&e.push(this.shareGroupCard),e}get rightCards(){return[this.exportLocationsCard]}get baseInfoCard(){var e=[{label:t("Project ID"),dataIndex:"project_id"},{label:t("Availability Zone"),dataIndex:"availability_zone"},{label:t("Host"),dataIndex:"host"},{label:t("Size"),dataIndex:"size",unit:"GiB"},{label:t("Protocol"),dataIndex:"share_proto",valueMap:c.shareProtocol},{label:t("Public"),dataIndex:"is_public",valueRender:"yesNo"},{label:t("Mount snapshot support"),dataIndex:"mount_snapshot_support",valueRender:"yesNo"}];return{title:t("Base Info"),options:e}}get shareTypeCard(){var e=[{label:t("Share Type ID"),dataIndex:"share_type"},{label:t("Share Type Name"),dataIndex:"share_type_name"}];return{title:t("Share Type"),options:e}}get shareNetworkCard(){var{shareNetwork:e}=this.detailData,a=[{label:t("Share Network"),dataIndex:"share_network_id",render:t=>t?this.getLinkRender("shareNetworkDetail",e.name,{id:t}):"-"}];return{title:t("Share Network"),options:a}}get shareGroupCard(){var{shareGroup:e}=this.detailData,a=[{label:t("Share Group"),dataIndex:"share_group_id",render:t=>t?this.getLinkRender("shareGroupDetail",e.name,{id:t}):"-"}];return{title:t("Share Group"),options:a}}get exportLocationsCard(){var{exportLocations:e=[]}=this.detailData||{},a=(0,s.default)(e).call(e,((e,a)=>{var r;return{label:(0,n.default)(r="".concat(t("Export Location")," ")).call(r,a+1),dataIndex:"exportLocations",render:()=>u.default.createElement("div",{key:e.id},u.default.createElement("div",null,u.default.createElement("span",{style:{fontWeight:"bold"}},t("Path"),": "),e.path),u.default.createElement("div",null,u.default.createElement("span",{style:{fontWeight:"bold"}},t("Preferred"),": "),(0,f.getYesNo)(e.preferred)),u.default.createElement("div",null,u.default.createElement("span",{style:{fontWeight:"bold"}},t("Is admin only"),":"),(0,f.getYesNo)(e.is_admin_only)),u.default.createElement("div",null,u.default.createElement("span",{style:{fontWeight:"bold"}},t("Share Replica ID"),":"," "),e.share_instance_id))}}));return{title:t("Export Locations"),options:a,labelCol:4}}}a.BaseDetail=p;var h=(0,o.inject)("rootStore")((0,o.observer)(p));a.default=h},4163:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=a.Metadata=void 0;var s=i(r(36)),n=r(406),u=i(r(1194)),o=r(1362),d=r(334),c=i(r(4164));class f extends u.default{constructor(){super(...arguments),(0,s.default)(this,"getColumns",(()=>[{title:t("Key"),dataIndex:"keyName"},{title:t("Value"),dataIndex:"value"}]))}init(){this.store=new o.ShareMetadataStore}get policy(){return"share:get_share_metadata"}get name(){return t("share metadata")}get actionConfigs(){if(this.isAdminPage)return c.default.actionConfigsAdmin;var{detail:{isMine:e}={}}=this.props;return e?c.default.actionConfigs:d.emptyActionConfig}get searchFilters(){return[{label:t("Key"),name:"keyName"}]}}a.Metadata=f;var p=(0,n.inject)("rootStore")((0,n.observer)(f));a.default=p},4164: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(4165)),s=l(a(4166)),n=l(a(4167)),u={actionConfigs:{rowActions:{firstAction:n.default,moreActions:[{action:s.default}]},batchActions:[n.default],primaryActions:[i.default]},actionConfigsAdmin:{rowActions:{firstAction:n.default,moreActions:[]},batchActions:[n.default],primaryActions:[]}};t.default=u},4165: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 s=i(r(1204)),n=i(r(65)),u=i(r(36)),o=r(406),d=r(1193),c=i(r(1362));class f extends d.ModalAction{constructor(){super(...arguments),(0,u.default)(this,"onSubmit",(e=>{var{id:t}=this.containerProps.detail,{keyName:a,value:r}=e,l={[a]:r};return this.store.createOrUpdate(t,l)}))}get name(){return t("Create Share Metadata")}get defaultValue(){return{}}get instanceName(){return(0,s.default)(this).keyName}get formItems(){return[{name:"keyName",label:t("Key"),type:"input",required:!0,placeholder:t("Please input key")},{name:"value",label:t("Value"),type:"input",placeholder:t("Please input value"),required:!0}]}init(){this.store=c.default}}a.Create=f,(0,u.default)(f,"id","create"),(0,u.default)(f,"title",t("Create Share Metadata")),(0,u.default)(f,"policy","share:update_share_metadata"),(0,u.default)(f,"allowed",(()=>n.default.resolve(!0)));var p=(0,o.inject)("rootStore")((0,o.observer)(f));a.default=p},4166: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 s=i(r(65)),n=i(r(36)),u=r(406),o=r(1193),d=i(r(1362));class c extends o.ModalAction{constructor(){super(...arguments),(0,n.default)(this,"onSubmit",(e=>{var{id:t}=this.containerProps.detail,{keyName:a,value:r}=e,l={[a]:r};return this.store.createOrUpdate(t,l)}))}get name(){return t("Edit Share Metadata")}get instanceName(){return this.item.keyName}get defaultValue(){var{keyName:e,value:t}=this.item;return{keyName:e,value:t}}get formItems(){return[{name:"keyName",label:t("Key"),type:"input",disabled:!0,placeholder:t("Please input key")},{name:"value",label:t("Value"),type:"input",placeholder:t("Please input value")}]}init(){this.store=d.default}}a.Edit=c,(0,n.default)(c,"id","edit"),(0,n.default)(c,"title",t("Edit Share Metadata")),(0,n.default)(c,"buttonText",t("Edit")),(0,n.default)(c,"policy","share:update_share_metadata"),(0,n.default)(c,"allowed",(()=>s.default.resolve(!0)));var f=(0,u.inject)("rootStore")((0,u.observer)(c));a.default=f},4167:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=void 0;var s=i(r(36)),n=r(1193),u=i(r(1362));class o extends n.ConfirmAction{constructor(){super(...arguments),(0,s.default)(this,"policy","share:delete_share_metadata"),(0,s.default)(this,"allowedCheckFunc",(()=>!0)),(0,s.default)(this,"onSubmit",(e=>{var{id:t}=this.containerProps.detail,{keyName:a}=e,r={id:t,keyName:a};return u.default.delete(r)}))}get id(){return"delete"}get title(){return t("Delete Share Metadata")}get isDanger(){return!0}get buttonText(){return t("Delete")}get actionName(){return t("Delete Share Metadata")}}a.default=o},4168:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=a.ShareAccessRule=void 0;var s=i(r(36)),n=r(406),u=i(r(1194)),o=i(r(1363)),d=r(1232),c=r(334),f=i(r(4169));class p extends u.default{constructor(){super(...arguments),(0,s.default)(this,"getColumns",(()=>[{title:t("ID"),dataIndex:"id"},{title:t("Access Type"),dataIndex:"access_type"},{title:t("Access To"),dataIndex:"access_to"},{title:t("Access Level"),dataIndex:"access_level",valueMap:d.shareAccessLevel},{title:t("State"),dataIndex:"state",valueMap:d.shareAccessRuleState},{title:t("Access Key"),dataIndex:"access_key"},{title:t("Created At"),dataIndex:"created_at",valueRender:"toLocalTime",isHideable:!0},{title:t("Updated At"),dataIndex:"updated_at",valueRender:"toLocalTime",isHideable:!0}]))}init(){this.store=o.default}get policy(){return"share_access_rule:index"}get name(){return t("share access rules")}get actionConfigs(){if(this.isAdminPage)return f.default.actionConfigsAdmin;var{detail:{isMine:e}={}}=this.props;return e?f.default.actionConfigs:c.emptyActionConfig}}a.ShareAccessRule=p;var h=(0,n.inject)("rootStore")((0,n.observer)(p));a.default=h},4169: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(1618)),s=l(a(4170)),n=l(a(4171)),u={actionConfigs:{rowActions:{firstAction:s.default,moreActions:[{action:n.default}]},primaryActions:[i.default],batchActions:[s.default]},actionConfigsAdmin:{rowActions:{firstAction:s.default,moreActions:[]},primaryActions:[],batchActions:[s.default]}};t.default=u},4170:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=void 0;var s=i(r(36)),n=r(1193),u=i(r(1363));class o extends n.ConfirmAction{constructor(){super(...arguments),(0,s.default)(this,"policy","share:deny_access"),(0,s.default)(this,"onSubmit",((e,t)=>{var{detail:{id:a}={}}=t;return u.default.delete(a,e.id)}))}get id(){return"delete"}get title(){return t("Delete Share Access Rule")}get isDanger(){return!0}get buttonText(){return t("Delete")}get actionName(){return t("Delete Share Access Rule")}}a.default=o},4171:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=a.ManageMetadata=void 0;var s=i(r(32)),n=i(r(33)),u=i(r(198)),o=i(r(65)),d=i(r(36)),c=r(406),f=i(r(1363)),p=r(1193),h=r(161),v=r(1618);class m extends p.ModalAction{constructor(){super(...arguments),(0,d.default)(this,"onSubmit",(e=>{var t,{metadata:a={}}=e,{id:r,metadata:l={}}=this.item,i=(0,h.updateAddSelectValueToObj)(a),o=(0,s.default)(t=(0,n.default)(l)).call(t,(e=>{var t;return!(0,u.default)(t=(0,n.default)(i)).call(t,e)}));return this.store.manageMetadata(r,i,o)}))}init(){this.store=f.default}static get modalSize(){return"large"}getModalSize(){return"large"}get messageHasItemName(){return!1}get name(){return t("Manage Metadata")}get defaultValue(){var{metadata:e}=this.item;return{metadata:(0,h.updateObjToAddSelectArray)(e||{})}}get formItems(){return[v.metadataFormItem]}}a.ManageMetadata=m,(0,d.default)(m,"id","manage-metadata"),(0,d.default)(m,"title",t("Manage Metadata")),(0,d.default)(m,"policy",["share_access_metadata:update","share_access_metadata:delete"]),(0,d.default)(m,"allowed",(()=>o.default.resolve(!0)));var g=(0,c.inject)("rootStore")((0,c.observer)(m));a.default=g},4172:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=a.ShareServer=void 0;var s=i(r(36)),n=r(406),u=i(r(1194)),o=i(r(1421)),d=r(1619),c=i(r(1620));class f extends u.default{constructor(){super(...arguments),(0,s.default)(this,"getColumns",(()=>[{title:t("ID"),dataIndex:"id",routeName:"shareServerDetailAdmin",isLink:!0,withoutName:!0},{title:t("Host"),dataIndex:"host",isHideable:!0},{title:t("Project ID/Name"),dataIndex:"project_name",isHideable:!0},{title:t("Status"),dataIndex:"status",valueMap:d.shareServerStatus},{title:t("Share Network"),dataIndex:"share_network_name",isLink:!0,routeName:this.getRouteName("shareNetworkDetail"),idKey:"share_network_id"}]))}init(){this.store=o.default}get policy(){return"share_server:index"}get name(){return t("share servers")}get actionConfigs(){return c.default}}a.ShareServer=f;var p=(0,n.inject)("rootStore")((0,n.observer)(f));a.default=p},4173:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=void 0;var s=i(r(36)),n=r(1193),u=i(r(1421));class o extends n.ConfirmAction{constructor(){super(...arguments),(0,s.default)(this,"policy","share_server:delete"),(0,s.default)(this,"onSubmit",(e=>u.default.delete(e)))}get id(){return"delete"}get title(){return t("Delete Share Server")}get isDanger(){return!0}get buttonText(){return t("Delete")}get actionName(){return t("Delete Share Server")}}a.default=o},4174: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 s=r(406),n=r(1421),u=i(r(1200)),o=r(1619),d=i(r(1311)),c=i(r(4175)),f=i(r(1620));class p extends u.default{get name(){return t("share server")}get policy(){return"share_server:show"}get listUrl(){return this.getRoutePath("shareServer")}get actionConfigs(){return f.default}get detailInfos(){return[{title:t("Host"),dataIndex:"host"},{title:t("Status"),dataIndex:"status",valueMap:o.shareServerStatus},{title:t("Created"),dataIndex:"created_at",valueRender:"toLocalTime"},{title:t("Updated"),dataIndex:"updated_at",valueRender:"toLocalTime"}]}get tabs(){return[{title:t("Base Info"),key:"baseInfo",component:c.default},{title:t("Shares"),key:"share",component:d.default}]}init(){this.store=new n.ShareServerStore}}a.Detail=p;var h=(0,s.inject)("rootStore")((0,s.observer)(p));a.default=h},4175: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 s=r(406),n=i(r(1202));class u extends n.default{get leftCards(){return[this.baseInfoCard]}get rightCards(){return[this.detailCard]}get baseInfoCard(){var e=[{label:t("Host"),dataIndex:"host"},{label:t("Share Network"),dataIndex:"share_network_name",render:(e,t)=>{if(!e)return"-";var{share_network_id:a}=t;return this.getLinkRender("shareNetworkDetail",e,{id:a})}}];return{title:t("Base Info"),options:e}}get detailCard(){var e=[{label:t("Instance ID"),dataIndex:"backend_details.instance_id"},{label:t("IP"),dataIndex:"backend_details.ip"},{label:t("Public Address"),dataIndex:"backend_details.public_address"},{label:t("Username"),dataIndex:"backend_details.username"},{label:t("Password"),dataIndex:"backend_details.password"},{label:t("Router ID"),dataIndex:"backend_details.router_id"},{label:t("Subnet ID"),dataIndex:"backend_details.subnet_id"},{label:t("Service Port ID"),dataIndex:"backend_details.service_port_id"}];return{title:t("Detail Info"),options:e,labelCol:4}}}a.BaseDetail=u;var o=(0,s.inject)("rootStore")((0,s.observer)(u));a.default=o},4176:function(e,a,r){"use strict";var l=r(19),i=r(21);l(a,"__esModule",{value:!0}),a.default=a.Storage=void 0;var s=i(r(81)),n=i(r(200)),u=i(r(36)),o=r(406),d=r(1567),c=i(r(4177)),f=r(1401);class p extends d.Storage{constructor(){super(...arguments),(0,u.default)(this,"getColumns",(()=>{var e=[...f.poolColumns];return e[2].dataIndex="share_backend_name",e}))}init(){this.store=c.default}get policy(){return"scheduler_stats:pools:detail"}get searchFilters(){var e,a=super.searchFilters;return(0,s.default)(e=(0,n.default)(a).call(a,0,2)).call(e,{label:t("Backend Name"),name:"share_backend_name"})}}a.Storage=p;var h=(0,o.inject)("rootStore")((0,o.observer)(p));a.default=h},4177:function(e,t,a){"use strict";var r=a(33),l=a(44),i=a(32),s=a(25),n=a(27),u=a(45),o=a(46),d=a(19),c=a(21);d(t,"__esModule",{value:!0}),t.default=t.PoolStore=void 0;var f=c(a(36)),p=c(a(343)),h=c(a(48)),v=c(a(53));function m(e,t){var a=r(e);if(l){var n=l(e);t&&(n=i(n).call(n,(function(t){return s(e,t).enumerable}))),a.push.apply(a,n)}return a}class g extends v.default{get client(){return h.default.manila.pools}get mapper(){return e=>{var{name:t,capabilities:a={}}=e,r=function(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)n(a=m(Object(r),!0)).call(a,(function(t){(0,f.default)(e,t,r[t])}));else if(u)o(e,u(r));else{var l;n(l=m(Object(r))).call(l,(function(t){d(e,t,s(r,t))}))}}return e}({name:t},a),{total_capacity_gb:l,free_capacity_gb:i}=a;return(0,p.default)(l)&&(0,p.default)(i)&&(r.usedGB=(l-i).toFixed(2),r.usedGBPercent=100*(r.usedGB/l).toFixed(2)),r}}}t.PoolStore=g;var y=new g;t.default=y}}]);