(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{1236:function(e,a,r){"use strict";var l=r(33),n=r(44),i=r(32),u=r(25),o=r(27),s=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=a.ObjectStore=void 0;var p,m,v,h,g,y,b,_,S,x,C,w,k,I=f(r(200)),A=f(r(81)),j=f(r(65)),F=f(r(57)),P=f(r(25)),D=f(r(62)),M=f(r(51)),N=f(r(71)),E=f(r(36)),T=f(r(54)),V=(f(r(72)),r(34)),z=f(r(48)),R=r(1491),O=f(r(53));function B(e,t){var a=l(e);if(n){var r=n(e);t&&(r=i(r).call(r,(function(t){return u(e,t).enumerable}))),a.push.apply(a,r)}return a}function q(e){for(var t=1;t{var{name:a,subdir:r}=e,l=r||a;return l.substring((t||"").length)||l})),(0,E.default)(this,"isFolder",(e=>{var t;return e.subdir||"/"===(0,I.default)(t=e.name).call(t,-1)})),(0,E.default)(this,"getItemType",(e=>this.isFolder(e)?"folder":"file")),(0,N.default)(this,"updateData",_,this),(0,N.default)(this,"delete",S,this),(0,N.default)(this,"checkName",x,this),(0,N.default)(this,"copyFiles",C,this),(0,N.default)(this,"cutFiles",w,this),(0,N.default)(this,"pasteFiles",k,this)}get client(){return z.default.swift.container.object}get containerClient(){return z.default.swift.container}get listResponseKey(){return""}get listFilterByProject(){return!1}listFetchByClient(e,t){var a=this;return(0,M.default)((function*(){var{folder:r,container:l}=t,{path:n}=e,i=yield a.client.list(l,e);return a.container={name:l,folder:r,path:n,hasCopy:a.copiedFiles.length>0},i}))()}get paramsFunc(){return e=>{var t,{current:a,container:r,folder:l,search:n="",path:i}=e,u=(0,D.default)(e,["current","container","folder","search","path"]),o=i||(l||n?(0,A.default)(t="".concat(l)).call(t,n):""),s=q({format:"json"},u);return o?s.path=o:s.delimiter="/",s}}listDidFetch(e){var t=this;return(0,M.default)((function*(){return 0===e.length?e:t.updateData(e)}))()}detailFetchByClient(e){var t=this;return(0,M.default)((function*(){var{container:a,name:r}=e,l=yield t.containerClient.showObjectMetadata(a,r),{headers:n={}}=l;return{timestamp:n["x-timestamp"],contentType:n["content-type"],etag:n.etag,size:n["content-length"],originFileName:n["x-object-meta-orig-filename"]}}))()}createFolder(e,t){var a=this;return(0,M.default)((function*(){var r,{folder_name:l,dest_folder:n=""}=t,i=(0,A.default)(r="".concat(n)).call(r,l,"/");return yield a.checkName(e,i),a.submitting(a.containerClient.createFolder(e,i))}))()}createFile(e,t){var a=arguments,r=this;return(0,M.default)((function*(){var l,n=a.length>2&&void 0!==a[2]?a[2]:{},{file:i,dest_folder:u=""}=t,o=(0,A.default)(l="".concat(u)).call(l,i.name);yield r.checkName(e,o);var s={"X-Object-Meta-Orig-Filename":encodeURIComponent(i.name),"Content-Length":i.size,"Content-Type":i.type},d=yield(0,R.getArrayBuffer)(i);return r.submitting(r.containerClient.uploadFile(e,o,d,q({headers:s},n)))}))()}updateFile(e,t,a){var r=arguments,l=this;return(0,M.default)((function*(){var n=r.length>3&&void 0!==r[3]?r[3]:{},i={"X-Object-Meta-Orig-Filename":encodeURIComponent(t.name),"Content-Length":t.size,"Content-Type":t.type},u=yield(0,R.getArrayBuffer)(t);return l.submitting(l.containerClient.uploadFile(e,a,u,q({headers:i},n)))}))()}rename(e,t,a){var r=this;return(0,M.default)((function*(){return r.isSubmitting=!0,yield r.checkName(e,a),yield r.containerClient.copy(e,t,e,a),r.delete({container:e,name:t})}))()}downloadFile(e){var t=this;return(0,M.default)((function*(){var{container:a,name:r}=e;return t.client.show(a,r,null,{responseType:"blob"})}))()}pasteObjects(e){var t=this;return(0,M.default)((function*(){var a,{container:r,name:l}=e,{container:n}=t.copiedFiles[0];return yield j.default.all((0,F.default)(a=t.copiedFiles).call(a,(e=>{var a,{shortName:i,name:u}=e,o=(0,A.default)(a="".concat(l)).call(a,i);return t.containerClient.copy(n,u,r,o)}))),j.default.resolve()}))()}moveObjects(e){var t=this;return(0,M.default)((function*(){var a;yield t.pasteObjects(e);var{container:r}=t.copiedFiles[0];return yield j.default.all((0,F.default)(a=t.copiedFiles).call(a,(e=>{var{name:a}=e;return t.client.delete(r,a)}))),t.copiedFiles=[],t.hasCopy=!1,j.default.resolve()}))()}clearData(e){this.list.reset(),e||(this.copiedFiles=[],this.hasCopy=!1,this.container=null)}},m=(0,T.default)(p.prototype,"container",[V.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),v=(0,T.default)(p.prototype,"data",[V.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),h=(0,T.default)(p.prototype,"hasNext",[V.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),g=(0,T.default)(p.prototype,"copiedFiles",[V.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),y=(0,T.default)(p.prototype,"hasCopy",[V.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),b=(0,T.default)(p.prototype,"isCopy",[V.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),_=(0,T.default)(p.prototype,"updateData",[V.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return e=>{var{name:t,path:a,folder:r,hasCopy:l}=this.container||{};return(0,F.default)(e).call(e,(e=>q(q({},e),{},{container:t,path:a,folder:r,type:this.getItemType(e),hasCopy:l,shortName:this.getShortName(e,r),name:e.subdir||e.name})))}}}),(0,T.default)(p.prototype,"createFolder",[V.action],(0,P.default)(p.prototype,"createFolder"),p.prototype),(0,T.default)(p.prototype,"createFile",[V.action],(0,P.default)(p.prototype,"createFile"),p.prototype),(0,T.default)(p.prototype,"updateFile",[V.action],(0,P.default)(p.prototype,"updateFile"),p.prototype),(0,T.default)(p.prototype,"rename",[V.action],(0,P.default)(p.prototype,"rename"),p.prototype),(0,T.default)(p.prototype,"downloadFile",[V.action],(0,P.default)(p.prototype,"downloadFile"),p.prototype),S=(0,T.default)(p.prototype,"delete",[V.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,M.default)((function*(t){var{container:a,name:r}=t;return e.submitting(e.client.delete(a,r))}));return function(e){return t.apply(this,arguments)}}()}}),x=(0,T.default)(p.prototype,"checkName",[V.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var a=(0,M.default)((function*(a,r){try{yield e.containerClient.showObjectMetadata(a,r);var l={response:{data:t("An object with the same name already exists")}};return j.default.reject(l)}catch(e){return!0}}));return function(e,t){return a.apply(this,arguments)}}()}}),C=(0,T.default)(p.prototype,"copyFiles",[V.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,M.default)((function*(t){return e.copiedFiles=t,e.hasCopy=t.length>0,e.isCopy=!0,j.default.resolve()}));return function(e){return t.apply(this,arguments)}}()}}),w=(0,T.default)(p.prototype,"cutFiles",[V.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,M.default)((function*(t){return e.copiedFiles=t,e.hasCopy=t.length>0,e.isCopy=!1,j.default.resolve()}));return function(e){return t.apply(this,arguments)}}()}}),k=(0,T.default)(p.prototype,"pasteFiles",[V.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,M.default)((function*(t){if(0===e.copiedFiles.length)return j.default.reject();var a=t;return t||(a={container:e.container.name,name:e.container.folder}),e.isCopy?e.pasteObjects(a):e.moveObjects(a)}));return function(e){return t.apply(this,arguments)}}()}}),(0,T.default)(p.prototype,"pasteObjects",[V.action],(0,P.default)(p.prototype,"pasteObjects"),p.prototype),(0,T.default)(p.prototype,"moveObjects",[V.action],(0,P.default)(p.prototype,"moveObjects"),p.prototype),(0,T.default)(p.prototype,"clearData",[V.action],(0,P.default)(p.prototype,"clearData"),p.prototype),p);a.ObjectStore=Q;var L=new Q;a.default=L},1255:function(e,t,a){"use strict";a(19)(t,"__esModule",{value:!0}),t.isFolder=t.isFile=void 0;t.isFile=e=>e&&"file"===e.type;t.isFolder=e=>e&&"folder"===e.type},1283:function(e,t,a){"use strict";var r=a(19),l=a(21);r(t,"__esModule",{value:!0}),t.default=t.QosSpecStore=void 0;var n,i=l(a(65)),u=l(a(25)),o=l(a(51)),s=l(a(54)),d=a(34),c=l(a(48)),f=l(a(53)),p=(n=class extends f.default{get client(){return c.default.cinder.qosSpecs}create(e){var t={},{values:a}=e;return t["".concat(this.responseKey,"s")]=a,this.submitting(this.client.create(t))}editConsumer(e){var{id:t,consumer:a}=e;return this.submitting(this.client.update(t,{qos_specs:{consumer:a}}))}updateVolumeTypeQos(e,t,a){var r=this;return(0,o.default)((function*(){return t&&(yield r.disassociate(t,a)),e&&(yield r.associate(e,a)),i.default.resolve()}))()}associate(e,t){return this.submitting(this.client.associate(e,t))}disassociate(e,t){return this.submitting(this.client.disassociate(e,t))}},(0,s.default)(n.prototype,"create",[d.action],(0,u.default)(n.prototype,"create"),n.prototype),(0,s.default)(n.prototype,"editConsumer",[d.action],(0,u.default)(n.prototype,"editConsumer"),n.prototype),(0,s.default)(n.prototype,"updateVolumeTypeQos",[d.action],(0,u.default)(n.prototype,"updateVolumeTypeQos"),n.prototype),(0,s.default)(n.prototype,"associate",[d.action],(0,u.default)(n.prototype,"associate"),n.prototype),(0,s.default)(n.prototype,"disassociate",[d.action],(0,u.default)(n.prototype,"disassociate"),n.prototype),n);t.QosSpecStore=p;var m=new p;t.default=m},1343: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 n,i,u=l(a(27)),o=l(a(33)),s=l(a(25)),d=l(a(71)),c=l(a(36)),f=(l(a(72)),l(a(54))),p=a(34),m=l(a(48)),v=l(a(53)),h=(n=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,u.default)(t=(0,o.default)(a)).call(t,(e=>{r.push({id:e,keyname:e,name:e,value:a[e]})})),r})),(0,d.default)(this,"delete",i,this)}get client(){return m.default.cinder.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)(n.prototype,"createOrUpdate",[p.action],(0,s.default)(n.prototype,"createOrUpdate"),n.prototype),i=(0,f.default)(n.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))}}}),n);t.ExtraSpecStore=h;var g=new h;t.default=g},1344:function(e,t,a){"use strict";var r=a(19),l=a(21);r(t,"__esModule",{value:!0}),t.default=t.QosSpecKeyStore=void 0;var n,i,u=l(a(27)),o=l(a(33)),s=l(a(25)),d=l(a(71)),c=l(a(36)),f=(l(a(72)),l(a(54))),p=a(34),m=l(a(48)),v=l(a(53)),h=(n=class extends v.default{constructor(){super(...arguments),(0,c.default)(this,"getListDataFromResult",(e=>{var t,{specs:a={}}=e.qos_specs||{},r=[];return(0,u.default)(t=(0,o.default)(a)).call(t,(e=>{r.push({id:e,keyname:e,name:e,value:a[e]})})),r})),(0,d.default)(this,"delete",i,this)}get client(){return m.default.cinder.qosSpecs}listFetchByClient(e){var{id:t}=e;return this.client.show(t)}createOrUpdate(e,t){var a={};return a.qos_specs=t,this.submitting(this.client.update(e,a))}},(0,f.default)(n.prototype,"createOrUpdate",[p.action],(0,s.default)(n.prototype,"createOrUpdate"),n.prototype),i=(0,f.default)(n.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.deleteKeys(t,{keys:[a]}))}}}),n);t.QosSpecKeyStore=h;var g=new h;t.default=g},1345:function(e,a,r){"use strict";var l=r(33),n=r(44),i=r(32),u=r(25),o=r(27),s=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=a.ContainerStore=void 0;var p,m,v,h,g=f(r(65)),y=f(r(25)),b=f(r(51)),_=f(r(71)),S=f(r(36)),x=f(r(54)),C=(f(r(72)),r(34)),w=f(r(48)),k=f(r(53));function I(e,t){var a=l(e);if(n){var r=n(e);t&&(r=i(r).call(r,(function(t){return u(e,t).enumerable}))),a.push.apply(a,r)}return a}function A(e){for(var t=1;tA(A({},e),{},{format:"json"})}get mapper(){return e=>A(A({},e),{},{id:e.name})}detailFetchByClient(e){var t=this;return(0,b.default)((function*(){var{name:a}=e,r=yield t.client.showMetadata(a),{headers:l={}}=r,n=!!l["x-container-read"],i=null;return n&&(i=t.client.url(a)),{used:l["x-container-bytes-used"],object_count:l["x-container-object-count"],storage_policy:l["x-storage-policy"],timestamp:l["x-timestamp"],is_public:n,link:i}}))()}create(e){var t=this;return(0,b.default)((function*(){var{name:a,isPublic:r}=e;return yield t.checkName(a),r?(t.isSubmitting=!0,yield t.client.create(a),t.updatePublic(a,r)):t.submitting(t.client.create(a))}))()}},m=(0,x.default)(p.prototype,"checkName",[C.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var a=(0,b.default)((function*(a){try{yield e.client.showMetadata(a);var r={response:{data:t("A container with the same name already exists")}};return g.default.reject(r)}catch(e){return!0}}));return function(e){return a.apply(this,arguments)}}()}}),(0,x.default)(p.prototype,"create",[C.action],(0,y.default)(p.prototype,"create"),p.prototype),v=(0,x.default)(p.prototype,"delete",[C.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,b.default)((function*(t){var{id:a}=t;return e.submitting(e.client.delete(a))}));return function(e){return t.apply(this,arguments)}}()}}),h=(0,x.default)(p.prototype,"updatePublic",[C.action],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return function(){var t=(0,b.default)((function*(t,a){var r={"X-Container-Read":a?".r:*,.rlistings":""};return e.submitting(e.client.updateMetadata(t,r))}));return function(e,a){return t.apply(this,arguments)}}()}}),p);a.ContainerStore=j;var F=new j;a.default=F},1561:function(e,a,r){"use strict";var l=r(33),n=r(44),i=r(32),u=r(25),o=r(27),s=r(45),d=r(46),c=r(19),f=r(160),p=r(21);c(a,"__esModule",{value:!0}),a.default=a.Snapshots=void 0;var m=p(r(62)),v=p(r(36)),h=r(406),g=p(r(1194)),y=r(557),b=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var a=S(t);if(a&&a.has(e))return a.get(e);var r={},l=c&&u;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var i=l?u(e,n):null;i&&(i.get||i.set)?c(r,n,i):r[n]=e[n]}r.default=e,a&&a.set(e,r);return r}(r(582)),_=p(r(1562));function S(e){if("function"!=typeof f)return null;var t=new f,a=new f;return(S=function(e){return e?a:t})(e)}function x(e,t){var a=l(e);if(n){var r=n(e);t&&(r=i(r).call(r,(function(t){return u(e,t).enumerable}))),a.push.apply(a,r)}return a}function C(e){for(var t=1;t{var{tab:t,id:a}=e,r=(0,m.default)(e,["tab","id"]);return this.inDetailPage?C(C({},r),{},{volume_id:a}):r})),(0,v.default)(this,"getColumns",(()=>[{title:t("ID/Name"),dataIndex:"name",routeName:this.getRouteName("snapshotDetail")},{title:t("Project ID/Name"),dataIndex:"project_name",hidden:!this.isAdminPage,sorter:!1},{title:t("Host"),dataIndex:"host",isHideable:!0,valueRender:"noValue",hidden:!this.isAdminPage,sorter:!1},{title:t("Size"),dataIndex:"size",isHideable:!0,unit:"GiB",sorter:!1},{title:t("Status"),dataIndex:"status",valueMap:y.volumeStatus},{title:t("Volume ID/Name"),dataIndex:"volume_name",isLink:!0,idKey:"volume_id",routeName:this.getRouteName("volumeDetail"),routeQuery:{tab:"snapshot"},isHideable:!0,sorter:!1,hidden:this.inDetailPage},{title:t("Created At"),dataIndex:"created_at",isHideable:!0,valueRender:"sinceTime"}]))}init(){this.inDetailPage?(this.store=new b.SnapshotStore,this.downloadStore=this.store):(this.store=b.default,this.downloadStore=new b.SnapshotStore),this.downloadStore=new b.SnapshotStore}get policy(){return"volume:get_all_snapshots"}get name(){return t("volume snapshots")}get actionConfigs(){return this.isAdminPage?_.default.adminConfigs:_.default.actionConfigs}get transitionStatusList(){return y.snapshotTransitionStatuses}get isFilterByBackend(){return!0}get isSortByBackend(){return!0}get adminPageHasProjectFilter(){return!0}get defaultSortKey(){return"created_at"}shouldRefreshDetail(){return!1}get searchFilters(){return[{label:t("Name"),name:"name"},{label:t("Status"),name:"status",options:[{label:t("Available"),key:"AVAILABLE"},{label:t("Error"),key:"ERROR"}]}]}}a.Snapshots=w;var k=(0,h.inject)("rootStore")((0,h.observer)(w));a.default=k},1562:function(e,t,a){"use strict";var r=a(19),l=a(21);r(t,"__esModule",{value:!0}),t.default=void 0;var n=l(a(3697)),i=l(a(3698)),u=l(a(3699)),o={actionConfigs:{rowActions:{firstAction:i.default,moreActions:[{action:n.default},{action:u.default}]},batchActions:[u.default]},adminConfigs:{rowActions:{firstAction:u.default},batchActions:[u.default]}};t.default=o},1563:function(e,a,r){"use strict";var l=r(33),n=r(44),i=r(32),u=r(25),o=r(27),s=r(45),d=r(46),c=r(19),f=r(160),p=r(21);c(a,"__esModule",{value:!0}),a.default=a.Backup=void 0;var m=p(r(32)),v=p(r(62)),h=p(r(36)),g=r(406),y=p(r(1194)),b=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var a=C(t);if(a&&a.has(e))return a.get(e);var r={},l=c&&u;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var i=l?u(e,n):null;i&&(i.get||i.set)?c(r,n,i):r[n]=e[n]}r.default=e,a&&a.set(e,r);return r}(r(1242)),_=p(r(1546)),S=r(1302),x=p(r(1564));function C(e){if("function"!=typeof f)return null;var t=new f,a=new f;return(C=function(e){return e?a:t})(e)}function w(e,t){var a=l(e);if(n){var r=n(e);t&&(r=i(r).call(r,(function(t){return u(e,t).enumerable}))),a.push.apply(a,r)}return a}function k(e){for(var t=1;t{var e=[{title:t("ID/Name"),dataIndex:"name",routeName:this.getRouteName("backupDetail"),sortKey:"id"},{title:t("Project ID/Name"),dataIndex:"project_name",hidden:!this.isAdminPage,sortKey:"project_id"},{title:t("Volume ID/Name"),dataIndex:"volume_name",isLink:!0,routeQuery:{tab:"backup"},routeName:this.getRouteName("volumeDetail"),idKey:"volume_id",sortKey:"volume_id"},{title:t("Backup Mode"),dataIndex:"is_incremental",isHideable:!0,render:e=>e?t("Incremental Backup"):t("Full Backup"),sorter:!1},{title:t("Size"),dataIndex:"size",isHideable:!0,unit:"GiB",sorter:!1},{title:t("Status"),dataIndex:"status",isHideable:!0,valueMap:S.backupStatus},{title:t("Created At"),dataIndex:"created_at",isHideable:!0,valueRender:"sinceTime"}];return this.inDetailPage?(0,m.default)(e).call(e,(e=>"volume_name"!==e.dataIndex)):e})),(0,h.default)(this,"updateFetchParamsByPage",(e=>{if(this.inDetailPage){var{id:t}=e;return k({volume_id:t},(0,v.default)(e,["id"]))}return e}))}get name(){return t("volume backups")}get policy(){return"backup:get_all"}get actionConfigs(){var{actionConfigsAdmin:e,actionConfigs:t}=x.default;return this.isAdminPage?e:this.inDetailPage?k(k({},t),{},{primaryActions:[_.default]}):t}get adminPageHasProjectFilter(){return!0}get isFilterByBackend(){return!0}get isSortByBackend(){return!0}get defaultSortKey(){return"created_at"}init(){this.store=this.inDetailPage?new b.BackupStore:b.default,this.downloadStore=new b.BackupStore}get searchFilters(){return[{label:t("Name"),name:"name"}]}}a.Backup=I;var A=(0,g.inject)("rootStore")((0,g.observer)(I));a.default=A},1564:function(e,t,a){"use strict";var r=a(19),l=a(21);r(t,"__esModule",{value:!0}),t.default=void 0;var n=l(a(3703)),i=l(a(3704)),u=l(a(3705)),o=l(a(3706)),s=l(a(3707)),d={actionConfigs:{rowActions:{firstAction:o.default,moreActions:[{action:n.default},{action:u.default},{action:i.default}]},batchActions:[i.default],primaryActions:[s.default]},actionConfigsAdmin:{rowActions:{firstAction:i.default,moreActions:[]},batchActions:[i.default],primaryActions:[]}};t.default=d},1565:function(e,t,a){"use strict";var r=a(19),l=a(21);r(t,"__esModule",{value:!0}),t.default=void 0;var n=l(a(3713)),i=l(a(3714)),u=l(a(3715)),o={rowActions:{firstAction:i.default,moreActions:[{action:u.default}]},primaryActions:[n.default],batchActions:[u.default]};t.default=o},1566:function(e,t,a){"use strict";var r=a(19),l=a(21);r(t,"__esModule",{value:!0}),t.default=void 0;var n=l(a(3717)),i=l(a(3718)),u=l(a(3719)),o=l(a(3720)),s=l(a(3721)),d=l(a(3722)),c=l(a(3723)),f={rowActions:{firstAction:o.default,moreActions:[{action:c.default},{action:i.default},{action:u.default},{action:s.default},{action:d.default}]},primaryActions:[n.default],batchActions:[d.default]};t.default=f},3695:function(e,t,a){"use strict";var r=a(19),l=a(21);r(t,"__esModule",{value:!0}),t.default=void 0;var n=l(a(413)),i=l(a(3696)),u=e=>(0,n.default)(i.default,e);t.default=u},3696:function(e,t,a){"use strict";var r=a(19),l=a(21);r(t,"__esModule",{value:!0}),t.default=void 0;var n=l(a(1212)),i=l(a(567)),u=l(a(1561)),o=l(a(3700)),s=l(a(1399)),d=l(a(1545)),c=l(a(3702)),f=l(a(1563)),p=l(a(3709)),m=l(a(3711)),v=l(a(3724)),h=l(a(3731)),g=l(a(1567)),y=l(a(3737)),b=l(a(3742)),_="/storage",S=[{path:_,component:n.default,routes:[{path:"".concat(_,"/volume"),component:s.default,exact:!0},{path:"".concat(_,"/volume-admin"),component:s.default,exact:!0},{path:"".concat(_,"/volume/create"),component:d.default,exact:!0},{path:"".concat(_,"/volume/detail/:id"),component:c.default,exact:!0},{path:"".concat(_,"/volume-admin/detail/:id"),component:c.default,exact:!0},{path:"".concat(_,"/snapshot"),component:u.default,exact:!0},{path:"".concat(_,"/snapshot-admin"),component:u.default,exact:!0},{path:"".concat(_,"/snapshot/detail/:id"),component:o.default,exact:!0},{path:"".concat(_,"/snapshot-admin/detail/:id"),component:o.default,exact:!0},{path:"".concat(_,"/backup"),component:f.default,exact:!0},{path:"".concat(_,"/backup-admin"),component:f.default,exact:!0},{path:"".concat(_,"/backup/detail/:id"),component:p.default,exact:!0},{path:"".concat(_,"/backup-admin/detail/:id"),component:p.default,exact:!0},{path:"".concat(_,"/volume-type-admin"),component:m.default,exact:!0},{path:"".concat(_,"/volume-type-admin/detail/:id"),component:v.default,exact:!0},{path:"".concat(_,"/volume-type-admin/qos/detail/:id"),component:h.default,exact:!0},{path:"".concat(_,"/storage-admin"),component:g.default,exact:!0},{path:"".concat(_,"/container"),component:y.default,exact:!0},{path:"".concat(_,"/container/detail/:container"),component:b.default,exact:!0},{path:"".concat(_,"/container/detail/:container/:folder"),component:b.default,exact:!0},{path:"*",component:i.default}]}];t.default=S},3697:function(e,a,r){"use strict";var l=r(19),n=r(21);l(a,"__esModule",{value:!0}),a.default=a.CreateVolume=void 0;var i=n(r(65)),u=n(r(102)),o=n(r(81)),s=n(r(51)),d=n(r(36)),c=r(406),f=r(1193),p=n(r(410)),m=r(557);class v extends f.ModalAction{constructor(){super(...arguments),(0,d.default)(this,"onSubmit",(e=>{var{name:t,size:a,volume_type:r}=e,{item:{id:l}}=this,n={name:t,size:a,snapshot_id:l};return n.volume_type=r||this.volumeType,p.default.create(n)}))}init(){this.store=p.default,this.getVolumeTypes(),(0,m.fetchQuota)(this,this.item.size)}get name(){return t("create volume")}static get disableSubmit(){return(0,m.checkQuotaDisable)()}static get showQuota(){return!0}get showQuota(){return!0}get quotaInfo(){return(0,m.getQuotaInfo)(this)}get volumeTypeParams(){return{}}getVolumeTypes(){var e=this;return(0,s.default)((function*(){var t,{volume_id:a}=e.item,[r,l]=yield i.default.all([e.store.fetchVolumeTypes(e.volumeTypeParams),e.store.fetchDetail({id:a})]),{volume_type:n}=l,o=(0,u.default)(t=e.volumeTypes).call(t,(e=>e.label===n));o&&(e.volumeType=o.value,(0,m.setCreateVolumeType)(n)),e.updateFormValue("volume_type",e.volumeType),e.updateDefaultValue()}))()}get volumeTypes(){return this.store.volumeTypes||[]}get defaultValue(){var{name:e,size:t}=this.item;return{snapshot:e,size:t,volume_type:this.volumeType}}get minSize(){return this.item.size}get formItems(){var e,{more:a}=this.state;return[{name:"snapshot",label:t("Volume Snapshot"),type:"label",iconType:"snapshot"},{name:"name",label:t("Name"),type:"input-name",placeholder:t("Please input name"),required:!0},{name:"size",label:t("Capacity (GiB)"),type:"input-int",min:this.minSize,extra:(0,o.default)(e="".concat(t("Min size"),": ")).call(e,this.minSize,"GiB"),required:!0,onChange:m.onVolumeSizeChange},{name:"more",type:"more",label:t("Advanced Options")},{name:"volume_type",label:t("Volume Type"),type:"select",options:this.volumeTypes,placeholder:t("Please select volume type"),hidden:!a,onChange:m.onVolumeTypeChange,allowClear:!1}]}}a.CreateVolume=v,(0,d.default)(v,"id","create"),(0,d.default)(v,"title",t("Create Volume")),(0,d.default)(v,"policy","volume:create"),(0,d.default)(v,"allowed",(()=>i.default.resolve(!0)));var h=(0,c.inject)("rootStore")((0,c.observer)(v));a.default=h},3698:function(e,a,r){"use strict";var l=r(19),n=r(21);l(a,"__esModule",{value:!0}),a.default=a.EditAction=void 0;var i=n(r(65)),u=n(r(36)),o=r(406),s=r(1193),d=n(r(582));class c extends s.ModalAction{constructor(){super(...arguments),(0,u.default)(this,"onSubmit",(e=>{var{id:t}=this.item;return d.default.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",placeholder:t("Please input name"),required:!0},{name:"description",label:t("Description"),type:"textarea"}]}}a.EditAction=c,(0,u.default)(c,"id","edit"),(0,u.default)(c,"title",t("Edit")),(0,u.default)(c,"policy","volume:update_snapshot"),(0,u.default)(c,"allowed",(()=>i.default.resolve(!0)));var f=(0,o.inject)("rootStore")((0,o.observer)(c));a.default=f},3699:function(e,a,r){"use strict";var l=r(19),n=r(21);l(a,"__esModule",{value:!0}),a.default=void 0;var i=n(r(36)),u=n(r(91)),o=r(1193),s=n(r(582));class d extends o.ConfirmAction{constructor(){super(...arguments),(0,i.default)(this,"policy","volume:delete_snapshot"),(0,i.default)(this,"allowedCheckFunc",(e=>!this.hasCreatedVolumes(e))),(0,i.default)(this,"hasCreatedVolumes",(e=>e.child_volumes&&e.child_volumes.length>0)),(0,i.default)(this,"performErrorMsg",(e=>{var a=(0,u.default)(e)?e[0]:e,{child_volumes:r=[]}=a,l=t('You are not allowed to delete snapshot "{ name }".',{name:a.name});if(this.hasCreatedVolumes(a)){var n=r.join(", ");l=t('You are not allowed to delete snapshot "{ name }", which is used by creating volume "{volumes}".',{name:a.name,volumes:n})}return l})),(0,i.default)(this,"onSubmit",(e=>s.default.delete({id:e.id})))}get id(){return"delete"}get title(){return t("Delete Volume Snapshot")}get isDanger(){return!0}get buttonText(){return t("Delete")}get actionName(){return t("delete volume snapshot")}}a.default=d},3700:function(e,a,r){"use strict";var l=r(19),n=r(21);l(a,"__esModule",{value:!0}),a.default=a.Detail=void 0;var i=r(406),u=r(582),o=n(r(1200)),s=r(557),d=n(r(1399)),c=n(r(3701)),f=n(r(1562));class p extends o.default{get name(){return t("volume snapshot")}get policy(){return"volume:get_snapshot"}get listUrl(){return this.getRoutePath("snapshot")}get actionConfigs(){return this.isAdminPage?f.default.adminConfigs:f.default.actionConfigs}get detailInfos(){return[{title:t("Name"),dataIndex:"name"},{title:t("Description"),dataIndex:"description",valueRender:"noValue"},{title:t("Status"),dataIndex:"status",valueMap:s.volumeStatus},{title:t("Size"),dataIndex:"size",unit:"GiB"},{title:t("Created At"),dataIndex:"created_at",valueRender:"toLocalTime"}]}get tabs(){var{child_volumes:e=[]}=this.detailData||{},a=[{title:t("Detail"),key:"base",component:c.default}];return e&&e.length&&a.push({title:t("Created Volumes"),key:"volumes",component:d.default}),a}init(){this.store=new u.SnapshotStore}}a.Detail=p;var m=(0,i.inject)("rootStore")((0,i.observer)(p));a.default=m},3701:function(e,a,r){"use strict";var l=r(19),n=r(21);l(a,"__esModule",{value:!0}),a.default=a.BaseDetail=void 0;var i=r(406),u=n(r(1202));class o extends u.default{get leftCards(){return[this.volumeCard]}get volumeCard(){var e=[{label:t("Volume"),dataIndex:"volume_id",render:(e,t)=>e?this.getLinkRender("volumeDetail",t.volume_name||e,{id:e},{tab:"snapshot"}):"-"}];return{title:t("Snapshot Source"),options:e}}}a.BaseDetail=o;var s=(0,i.inject)("rootStore")((0,i.observer)(o));a.default=s},3702:function(e,a,r){"use strict";var l=r(19),n=r(21);l(a,"__esModule",{value:!0}),a.default=a.VolumeDetail=void 0;var i=r(406),u=r(410),o=n(r(1200)),s=n(r(1563)),d=n(r(1561)),c=r(557),f=n(r(3708)),p=n(r(1544));class m extends o.default{get name(){return t("volume")}get policy(){return"volume:get"}get listUrl(){return this.getRoutePath("volume")}getActionData(){return this.detailData.itemInList||{}}get actionConfigs(){return this.isAdminPage?p.default.adminConfig:p.default.actionConfigs}get detailInfos(){return[{title:t("Name"),dataIndex:"name"},{title:t("Description"),dataIndex:"description"},{title:t("Shared"),dataIndex:"multiattach",valueRender:"yesNo"},{title:t("Status"),dataIndex:"status",valueMap:c.volumeStatus},{title:t("Size"),dataIndex:"size",unit:"GiB"},{title:t("Created At"),dataIndex:"created_at",valueRender:"toLocalTime"},{title:t("Type"),dataIndex:"volume_type"},{title:t("Encrypted"),dataIndex:"encrypted",valueRender:"yesNo"}]}get tabs(){return[{title:t("Detail"),key:"base",component:f.default},{title:t("Volume Backups"),key:"backup",component:s.default},{title:t("Volume Snapshots"),key:"snapshot",component:d.default}]}init(){this.store=new u.VolumeStore}}a.VolumeDetail=m;var v=(0,i.inject)("rootStore")((0,i.observer)(m));a.default=v},3703:function(e,a,r){"use strict";var l=r(19),n=r(21);l(a,"__esModule",{value:!0}),a.default=a.Restore=void 0;var i=n(r(65)),u=n(r(1233)),o=n(r(81)),s=n(r(57)),d=n(r(51)),c=n(r(36)),f=r(1193),p=n(r(1242)),m=r(410),v=r(1397),h=r(406),g=r(1302),y=r(557),b=r(1195);class _ extends f.ModalAction{constructor(){super(...arguments),(0,c.default)(this,"checkVolume",(()=>{var e=this.volumeStore.detail||{},{status:a}=e||{};return"available"===a||"in-use"===a?i.default.resolve():i.default.reject(t("The volume associated with the backup is not available, unable to restore."))})),(0,c.default)(this,"checkInstance",(()=>{var e=this.serverStore.list.data||{};return(0,u.default)(e).call(e,(e=>(0,b.isShutOff)(e)))?i.default.resolve():i.default.reject(t("The instance is not shut down, unable to restore."))})),(0,c.default)(this,"onSubmit",(()=>{var{enable:e}=this.state;if(!e)return i.default.reject();var{volume_id:t,id:a}=this.item,r={volume_id:t};return p.default.restore(a,r)}))}init(){this.store=p.default,this.volumeStore=new m.VolumeStore,this.serverStore=new v.ServerGroupInstanceStore,this.state.volume=null,this.state.instances=[],this.state.enable=!1,this.getVolume()}get name(){return t("Restore backup")}get tips(){return g.restoreTip}get volumeName(){var e,a,{volume_name:r,volume_id:l}=this.item,n=this.volumeStore.detail||{},{status:i}=n||{},u=y.volumeStatus[i]||i||"-";return(0,o.default)(e=(0,o.default)(a="".concat(r||l,"(")).call(a,t("Status"),": ")).call(e,u,")")}get instanceNames(){var e=this.serverStore.list.data||[];return(0,s.default)(e).call(e,(e=>{var a,r,{status:l,name:n}=e,i=b.instanceStatus[l]||l||"-";return(0,o.default)(a=(0,o.default)(r="".concat(n,"(")).call(r,t("Status"),": ")).call(a,i,")")})).join(" | ")}get defaultValue(){return{volumeName:this.volumeName,instanceNames:this.instanceNames}}getVolume(){var e=this;return(0,d.default)((function*(){var t=!1,{volume_id:a}=e.item,r=yield e.volumeStore.fetchDetail({id:a}),{status:l}=r;if("available"===l)t=!0;else if("in-use"===l){var n,i={members:(0,s.default)(n=r.attachments).call(n,(e=>e.server_id)),isServerGroup:!0},o=yield e.serverStore.fetchList(i);t=(0,u.default)(o).call(o,(e=>(0,b.isShutOff)(e)))}e.setState({enable:t}),e.updateDefaultValue()}))()}get formItems(){var e=[{name:"volumeName",label:t("Volume"),type:"label",iconType:"volume",validator:this.checkVolume}];return this.instanceNames&&e.push({name:"instanceNames",label:t("Instance"),type:"label",iconType:"instance",validator:this.checkInstance}),e}}a.Restore=_,(0,c.default)(_,"id","restore-backup"),(0,c.default)(_,"title",t("Restore Backup")),(0,c.default)(_,"policy","backup:restore"),(0,c.default)(_,"allowed",(()=>i.default.resolve(!0)));var S=(0,h.inject)("rootStore")((0,h.observer)(_));a.default=S},3704:function(e,a,r){"use strict";var l=r(19),n=r(21);l(a,"__esModule",{value:!0}),a.default=void 0;var i=n(r(36)),u=r(1193),o=n(r(1242));class s extends u.ConfirmAction{constructor(){super(...arguments),(0,i.default)(this,"policy","backup:delete"),(0,i.default)(this,"aliasPolicy","cinder:backup:delete"),(0,i.default)(this,"allowedCheckFunc",(()=>!0)),(0,i.default)(this,"onSubmit",(e=>{var{id:t}=e||this.item;return o.default.delete({id:t})}))}get id(){return"delete"}get title(){return t("Delete Volume Backup")}get isDanger(){return!0}get buttonText(){return t("Delete")}get actionName(){return t("delete volume backup")}get isAsyncAction(){return!0}}a.default=s},3705:function(e,a,r){"use strict";var l=r(33),n=r(44),i=r(32),u=r(25),o=r(27),s=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=a.CreateVolume=void 0;var p=f(r(27)),m=f(r(32)),v=f(r(81)),h=f(r(65)),g=f(r(62)),y=f(r(36)),b=r(406),_=r(1193),S=f(r(410)),x=r(557);function C(e,t){var a=l(e);if(n){var r=n(e);t&&(r=i(r).call(r,(function(t){return u(e,t).enumerable}))),a.push.apply(a,r)}return a}class w extends _.ModalAction{constructor(){super(...arguments),(0,y.default)(this,"onSubmit",(e=>{var{backupName:t,availability_zone:a}=e,r=(0,g.default)(e,["backupName","availability_zone"]),l=function(e){for(var t=1;te.zoneState.available))).call(e,(e=>{r.push({value:e.zoneName,label:e.zoneName})})),r}get volumeTypes(){return this.volumeStore.volumeTypes}static get disableSubmit(){return(0,x.checkQuotaDisable)()}static get showQuota(){return!0}get showQuota(){return!0}get quotaInfo(){return(0,x.getQuotaInfo)(this)}get defaultValue(){var{name:e,size:t}=this.item;return{size:t,backupName:e}}get minSize(){return this.item.size}get formItems(){var e;return[{name:"backupName",label:t("Volume Backup"),type:"label",iconType:"backup"},{name:"name",label:t("Name"),type:"input-name",required:!0},{name:"size",label:t("Capacity (GiB)"),type:"input-int",min:this.minSize,extra:(0,v.default)(e="".concat(t("Min size"),": ")).call(e,this.minSize,"GiB"),required:!0,onChange:x.onVolumeSizeChange},{name:"volume_type",label:t("Volume Type"),type:"select",required:!0,options:this.volumeTypes,placeholder:t("Please select volume type"),onChange:x.onVolumeTypeChange},{name:"availability_zone",label:t("Availability Zone"),type:"select",options:this.availableZones,required:!0,placeholder:t("Please select availability zone")}]}}a.CreateVolume=w,(0,y.default)(w,"id","create"),(0,y.default)(w,"title",t("Create Volume")),(0,y.default)(w,"policy","volume:create"),(0,y.default)(w,"aliasPolicy","cinder:volume:create"),(0,y.default)(w,"allowed",(e=>h.default.resolve("available"===e.status)));var k=(0,b.inject)("rootStore")((0,b.observer)(w));a.default=k},3706:function(e,a,r){"use strict";var l=r(19),n=r(21);l(a,"__esModule",{value:!0}),a.default=a.Edit=void 0;var i=n(r(65)),u=n(r(36)),o=r(406),s=r(1193),d=n(r(1242));class c extends s.ModalAction{constructor(){super(...arguments),(0,u.default)(this,"onSubmit",(e=>{var{id:t}=this.item;return d.default.edit({id:t},e)}))}static allowed(){return i.default.resolve(!0)}get formItems(){return[{name:"name",label:t("Name"),type:"input-name",required:!0},{name:"description",label:t("Description"),type:"textarea"}]}}a.Edit=c,(0,u.default)(c,"id","edit-backup"),(0,u.default)(c,"title",t("Edit Volume Backup")),(0,u.default)(c,"buttonText",t("Edit")),(0,u.default)(c,"policy","backup:update"),(0,u.default)(c,"aliasPolicy","cinder:backup:update");var f=(0,o.inject)("rootStore")((0,o.observer)(c));a.default=f},3707:function(e,a,r){"use strict";var l=r(33),n=r(44),i=r(32),u=r(25),o=r(27),s=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=a.Create=void 0;var p=f(r(65)),m=f(r(62)),v=f(r(36)),h=r(406),g=r(1193),y=f(r(410)),b=f(r(1242)),_=r(1302),S=r(557);function x(e,t){var a=l(e);if(n){var r=n(e);t&&(r=i(r).call(r,(function(t){return u(e,t).enumerable}))),a.push.apply(a,r)}return a}function C(e){for(var t=1;t{var{selectedRows:t=[]}=e||{},a=t[0]||{};this.store.setCurrentVolume(a)})),(0,v.default)(this,"disabledVolume",(e=>{if(!(0,S.isAvailableOrInUse)(e))return!0;var{size:t}=e,{gigabytes:{left:a=0}={},backups:{left:r=0}={}}=(0,_.getQuota)(this.state.quota);return 0===r||-1!==a&&a{var{volume:{selectedRowKeys:t,selectedRows:a}}=e,r=(0,m.default)(e,["volume"]),l=(0,S.isInUse)(a[0]),n=C(C({},r),{},{volume_id:t[0],force:l});return this.store.create(n)}))}get name(){return t("Create Volume Backup")}static get modalSize(){return"large"}getModalSize(){return"large"}init(){b.default.setCurrentVolume({}),this.store=b.default,this.volumeStore=y.default,(0,_.fetchQuota)(this)}get tips(){return _.createTip}get defaultValue(){return{incremental:!1}}static get disableSubmit(){return(0,_.checkQuotaDisable)()}static get showQuota(){return!0}get showQuota(){return!0}get quotaInfo(){return(0,_.getQuotaInfo)(this)}get formItems(){return[{name:"name",label:t("Volume Backup Name"),type:"input-name",required:!0},{name:"incremental",label:t("Backup Mode"),type:"radio",options:_.backupModeList,tip:_.modeTip},C(C({name:"volume",label:t("Volume"),type:"select-table",backendPageStore:this.volumeStore,required:!0,disabledFunc:this.disabledVolume},S.volumeSelectTablePropsBackend),{},{onChange:this.onVolumeChange})]}}a.Create=w,(0,v.default)(w,"id","create"),(0,v.default)(w,"title",t("Create Volume Backup")),(0,v.default)(w,"policy","backup:create"),(0,v.default)(w,"aliasPolicy","cinder:backup:create"),(0,v.default)(w,"allowed",(()=>p.default.resolve(!0)));var k=(0,h.inject)("rootStore")((0,h.observer)(w));a.default=k},3708:function(e,a,r){"use strict";var l=r(19),n=r(21);l(a,"__esModule",{value:!0}),a.default=a.BaseDetail=void 0;var i=n(r(57)),u=n(r(0)),o=r(406),s=n(r(1202));class d extends s.default{get leftCards(){var e=[this.attachmentsCard],{snapshot_id:t,volume_image_metadata:a,transfer:r}=this.detailData;return t&&e.push(this.snapshotCard),a&&e.push(this.imageCard),r&&e.push(this.transferCard),e}get attachmentsCard(){var e=[{label:t("Attached To"),dataIndex:"attachmentsContrib",render:e=>e&&0!==e.length?(0,i.default)(e).call(e,(e=>u.default.createElement("div",{key:e.server_id},e.device," on"," ",this.getLinkRender("instanceDetail",e.server_name||e.server_id,{id:e.server_id},{tab:"volumes"})))):"-"}];return{title:t("Attachments Info"),options:e}}get imageCard(){var{volume_image_metadata:{image_id:e,image_name:a},snapshot_id:r}=this.detailData,l=[{label:t("Image"),dataIndex:"volume_image_metadata.image_name",render:()=>this.getLinkRender("imageDetail",a,{id:e},null)}];return{title:r?t("Image Info"):t("Volume Source"),options:l}}get snapshotCard(){var{snapshot_id:e}=this.detailData,a=[{label:t("Volume Snapshot"),dataIndex:"snapshot.name",render:t=>this.getLinkRender("snapshotDetail",t||e,{id:e},null)}];return{title:t("Volume Source"),options:a}}get transferCard(){var e=[{label:t("ID"),dataIndex:"transfer.id"},{label:t("Name"),dataIndex:"transfer.name"},{label:t("Created"),dataIndex:"transfer.created_at",valueRender:"toLocalTime"}];return{title:t("Volume Transfer"),options:e}}}a.BaseDetail=d;var c=(0,o.inject)("rootStore")((0,o.observer)(d));a.default=c},3709:function(e,a,r){"use strict";var l=r(19),n=r(21);l(a,"__esModule",{value:!0}),a.default=a.Detail=void 0;var i=r(406),u=n(r(1242)),o=n(r(1200)),s=r(1302),d=n(r(3710)),c=n(r(1564));class f extends o.default{get name(){return t("volume backup")}get policy(){return"backup:get"}get listUrl(){return this.getRoutePath("backup")}get actionConfigs(){return this.isAdminPage?c.default.actionConfigsAdmin:c.default.actionConfigs}get detailInfos(){return[{title:t("Name"),dataIndex:"name"},{title:t("Volume ID"),dataIndex:"volume_id"},{title:t("Backup Mode"),dataIndex:"is_incremental",isHideable:!0,render:e=>e?t("Incremental Backup"):t("Full Backup")},{title:t("Size"),dataIndex:"size",unit:"GiB"},{title:t("Description"),dataIndex:"description"},{title:t("Status"),dataIndex:"status",valueMap:s.backupStatus},{title:t("Project ID"),dataIndex:"project_id",valueRender:"noValue",hidden:!this.isAdminPage},{title:t("Created At"),dataIndex:"created_at",valueRender:"toLocalTime"}]}get tabs(){return[{title:t("Detail"),key:"base",component:d.default}]}init(){this.store=u.default}}a.Detail=f;var p=(0,i.inject)("rootStore")((0,i.observer)(f));a.default=p},3710:function(e,a,r){"use strict";var l=r(19),n=r(21);l(a,"__esModule",{value:!0}),a.default=a.BaseDetail=void 0;var i=r(406),u=n(r(1202));class o extends u.default{get leftCards(){return[this.volumeCard]}get volumeCard(){var e=[{label:t("Volume ID"),dataIndex:"volume_id",copyable:{text:this.detailData.volume_id},render:e=>this.getLinkRender("volumeDetail",e,{id:e})},{label:t("Volume"),dataIndex:"volume_name",render:e=>e||"-"}];return{title:t("Volume Info"),options:e}}}a.BaseDetail=o;var s=(0,i.inject)("rootStore")((0,i.observer)(o));a.default=s},3711:function(e,a,r){"use strict";var l=r(19),n=r(21);l(a,"__esModule",{value:!0}),a.default=a.VolumeTypaAll=void 0;var i=r(406),u=n(r(1234)),o=n(r(3712)),s=n(r(3716));class d extends u.default{get tabs(){return[{title:t("Volume Types"),key:"volume-type",component:s.default},{title:t("QoS Specs"),key:"qos",component:o.default}]}}a.VolumeTypaAll=d;var c=(0,i.inject)("rootStore")((0,i.observer)(d));a.default=c},3712:function(e,a,r){"use strict";var l=r(19),n=r(21);l(a,"__esModule",{value:!0}),a.default=a.QosSpecs=void 0;var i=n(r(335)),u=n(r(57)),o=n(r(1265)),s=n(r(81)),d=n(r(36)),c=n(r(0)),f=r(406),p=n(r(1194)),m=r(1301),v=n(r(1283)),h=n(r(1565));class g extends p.default{constructor(){super(...arguments),(0,d.default)(this,"getColumns",(()=>[{title:t("ID/Name"),dataIndex:"name",routeName:"volumeTypeQosDetailAdmin"},{title:t("Consumer"),dataIndex:"consumer",isHideable:!0,valueMap:m.consumerTypes},{title:t("Specs"),dataIndex:"specs",isHideable:!0,render:e=>{var t;return e&&"{}"!==(0,i.default)(e)?(0,u.default)(t=(0,o.default)(e)).call(t,(e=>{var[t,a]=e;return c.default.createElement("div",{key:t},t,"=",a)})):"-"},stringify:e=>{var t;return e&&"{}"!==(0,i.default)(e)?(0,u.default)(t=(0,o.default)(e)).call(t,(e=>{var t,[a,r]=e;return(0,s.default)(t="".concat(a,"=")).call(t,r)})).join("\n"):"-"}}]))}init(){this.store=v.default}get policy(){return"volume_extension:qos_specs_manage:get_all"}get name(){return t("qos specs")}get hasTab(){return!0}get actionConfigs(){return h.default}get searchFilters(){return[{label:t("Name"),name:"name"}]}get fetchDataByAllProjects(){return!1}}a.QosSpecs=g;var y=(0,f.inject)("rootStore")((0,f.observer)(g));a.default=y},3713:function(e,a,r){"use strict";var l=r(19),n=r(21);l(a,"__esModule",{value:!0}),a.default=a.Create=void 0;var i=n(r(65)),u=n(r(36)),o=r(406),s=r(1193),d=n(r(1283));class c extends s.ModalAction{constructor(){super(...arguments),(0,u.default)(this,"onSubmit",(e=>this.store.create({values:e})))}get name(){return t("Create QoS Spec")}get formItems(){return[{name:"name",label:t("Name"),type:"input-name",placeholder:t("Please input name"),required:!0},{name:"consumer",label:t("Consumer"),type:"select",options:[{value:"front-end",label:t("Frontend")},{value:"back-end",label:t("Backend")},{value:"both",label:t("Both of Frontend and Backend")}],required:!0}]}init(){this.store=d.default}}a.Create=c,(0,u.default)(c,"id","create"),(0,u.default)(c,"title",t("Create QoS Spec")),(0,u.default)(c,"policy","volume_extension:qos_specs_manage:create"),(0,u.default)(c,"allowed",(()=>i.default.resolve(!0)));var f=(0,o.inject)("rootStore")((0,o.observer)(c));a.default=f},3714:function(e,a,r){"use strict";var l=r(33),n=r(44),i=r(32),u=r(25),o=r(27),s=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=a.EditConsumer=void 0;var p=f(r(65)),m=f(r(36)),v=r(406),h=r(1193),g=f(r(1283));function y(e,t){var a=l(e);if(n){var r=n(e);t&&(r=i(r).call(r,(function(t){return u(e,t).enumerable}))),a.push.apply(a,r)}return a}function b(e){for(var t=1;tthis.store.editConsumer(b(b({},this.item),e))))}get name(){return t("Edit Consumer")}get defaultValue(){var{consumer:e}=this.item;return{consumer:e}}get formItems(){return[{name:"consumer",label:t("Consumer"),type:"select",options:[{value:"front-end",label:t("Frontend")},{value:"back-end",label:t("Backend")},{value:"both",label:t("Both of Frontend and Backend")}],required:!0}]}init(){this.store=g.default}}a.EditConsumer=_,(0,m.default)(_,"id","editConsumer"),(0,m.default)(_,"title",t("Edit Consumer")),(0,m.default)(_,"buttonText",t("Edit")),(0,m.default)(_,"policy","volume_extension:qos_specs_manage:update"),(0,m.default)(_,"allowed",(()=>p.default.resolve(!0)));var S=(0,v.inject)("rootStore")((0,v.observer)(_));a.default=S},3715:function(e,a,r){"use strict";var l=r(19),n=r(21);l(a,"__esModule",{value:!0}),a.default=void 0;var i=n(r(36)),u=r(1193),o=n(r(1283));class s extends u.ConfirmAction{constructor(){super(...arguments),(0,i.default)(this,"policy","volume_extension:qos_specs_manage:delete"),(0,i.default)(this,"onSubmit",(e=>o.default.delete(e)))}get id(){return"delete"}get title(){return t("Delete QoS Spec")}get isDanger(){return!0}get buttonText(){return t("Delete")}get actionName(){return t("Delete QoS Spec")}}a.default=s},3716:function(e,a,r){"use strict";var l=r(33),n=r(44),i=r(32),u=r(25),o=r(27),s=r(45),d=r(46),c=r(19),f=r(160),p=r(21);c(a,"__esModule",{value:!0}),a.default=a.VolumeType=void 0;var m=p(r(36)),v=p(r(559)),h=r(406),g=p(r(1194)),y=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var a=S(t);if(a&&a.has(e))return a.get(e);var r={},l=c&&u;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var i=l?u(e,n):null;i&&(i.get||i.set)?c(r,n,i):r[n]=e[n]}r.default=e,a&&a.set(e,r);return r}(r(566)),b=r(557),_=p(r(1566));function S(e){if("function"!=typeof f)return null;var t=new f,a=new f;return(S=function(e){return e?a:t})(e)}function x(e,t){var a=l(e);if(n){var r=n(e);t&&(r=i(r).call(r,(function(t){return u(e,t).enumerable}))),a.push.apply(a,r)}return a}function C(e){for(var t=1;t{var t=C(C({},e),{},{showEncryption:!0,showQoS:!0});return(0,v.default)(e,"is_public")?t:C(C({},t),{},{is_public:"None"})})),(0,m.default)(this,"getColumns",(()=>[{title:t("ID/Name"),dataIndex:"name",routeName:"volumeTypeDetailAdmin"},{title:t("Description"),dataIndex:"description",isHideable:!0,valueRender:"noValue"},{title:t("Associated QoS Spec"),dataIndex:"qos_specs_name",isLink:!0,routeName:"volumeTypeQosDetailAdmin",idKey:"qos_specs_id"},{title:t("Encryption"),dataIndex:"encryption",isHideable:!0,render:e=>e&&e.provider||"-"},{title:t("Public"),dataIndex:"is_public",valueRender:"yesNo"},{title:t("Shared"),dataIndex:"multiattach",valueRender:"yesNo",titleTip:b.multiTip,width:120}]))}init(){this.store=y.default,this.downloadStore=new y.VolumeTypeStore}get policy(){return"volume_extension:type_get_all"}get name(){return t("volume types")}get isFilterByBackend(){return!0}get fetchDataByAllProjects(){return!1}get actionConfigs(){return _.default}get hasTab(){return!0}get searchFilters(){return[{label:t("Name"),name:"name"},{label:t("Associated QoS Spec"),name:"qos_specs_id"}]}}a.VolumeType=w;var k=(0,h.inject)("rootStore")((0,h.observer)(w));a.default=k},3717:function(e,a,r){"use strict";var l=r(33),n=r(44),i=r(32),u=r(25),o=r(27),s=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=a.Create=void 0;var p=f(r(27)),m=f(r(90)),v=f(r(57)),h=f(r(65)),g=f(r(62)),y=f(r(36)),b=r(406),_=r(1193),S=f(r(566)),x=r(1235),C=r(407),w=r(34),k=r(557);function I(e,t){var a=l(e);if(n){var r=n(e);t&&(r=i(r).call(r,(function(t){return u(e,t).enumerable}))),a.push.apply(a,r)}return a}function A(e){for(var t=1;t{var{multiattach:t,isPublic:a=!1,accessControl:r={}}=e,l=A({},(0,g.default)(e,["multiattach","isPublic","accessControl"])),n=[];if(t&&(l.extra_specs={multiattach:" True"}),a)l["os-volume-type-access:is_public"]=!0;else{l["os-volume-type-access:is_public"]=!1;var{selectedRowKeys:i=[]}=r;n=[...i]}return this.store.create(l,n)}))}get name(){return t("create volume type")}init(){this.store=S.default,this.projectStore=new C.ProjectStore,this.getProjects()}getProjects(){this.projectStore.fetchList()}get projects(){return this.projectStore.list.data||[]}get services(){var e=[{label:t("Do not set with a backend"),value:-1}],a=[],r=(0,w.toJS)(this.serviceStore.cinderServiceList.data)||[];return r.length>0&&(0,p.default)(r).call(r,(t=>{if("cinder-volume"===t.binary){var{host:r}=t,l=r.split("@")[1];if(-1===(0,m.default)(a).call(a,l)){var n={label:l,value:l};e.push(n),a.push(l)}}})),e}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:"multiattach",label:t("Shared"),type:"check",content:t("Shared"),extra:k.multiTip},{name:"isPublic",label:t("Public"),type:"check",content:t("Public")},A({name:"accessControl",label:t("Access Control"),type:"select-table",isMulti:!0,hidden:a,data:this.projects,isLoading:this.projectStore.list.isLoading},x.projectTableOptions)]}}a.Create=j,(0,y.default)(j,"id","create"),(0,y.default)(j,"title",t("Create Volume Type")),(0,y.default)(j,"policy","volume_extension:type_create"),(0,y.default)(j,"allowed",(()=>h.default.resolve(!0)));var F=(0,b.inject)("rootStore")((0,b.observer)(j));a.default=F},3718:function(e,a,r){"use strict";var l=r(19),n=r(21);l(a,"__esModule",{value:!0}),a.default=a.CreateEncryption=void 0;var i=n(r(65)),u=n(r(36)),o=r(406),s=r(1193),d=n(r(566));class c extends s.ModalAction{constructor(){super(...arguments),(0,u.default)(this,"onSubmit",(e=>{var{id:t}=this.item;return this.store.createEncryption(t,e)}))}get name(){return t("create encryption")}get defaultValue(){var{name:e}=this.item;return{name:e}}get formItems(){return[{name:"name",label:t("Volume Type"),type:"label",iconType:"volume"},{name:"provider",label:t("Provider"),type:"input",placeholder:t("Please input provider"),extra:t('The Provider is the encryption provider format (e.g. "luks")'),required:!0,style:{width:"100%"}},{name:"control_location",label:t("Control Location"),type:"select",options:[{value:"front-end",label:t("Front End")},{value:"back-end",label:t("Back End")}],required:!0},{name:"cipher",label:t("Cipher"),type:"input",placeholder:t("Please input cipher")},{name:"key_size",label:t("Key Size (bits)"),type:"input-int",placeholder:t("Please input key size"),style:{width:"100%"}}]}init(){this.store=d.default}}a.CreateEncryption=c,(0,u.default)(c,"id","create"),(0,u.default)(c,"title",t("Create Encryption")),(0,u.default)(c,"policy","volume_extension:volume_type_encryption:create"),(0,u.default)(c,"allowed",(e=>i.default.resolve(!(e.encryption&&!e.encryption.deleted_at))));var f=(0,o.inject)("rootStore")((0,o.observer)(c));a.default=f},3719:function(e,a,r){"use strict";var l=r(19),n=r(21);l(a,"__esModule",{value:!0}),a.default=void 0;var i=n(r(65)),u=n(r(36)),o=r(1193),s=n(r(566));class d extends o.ConfirmAction{constructor(){super(...arguments),(0,u.default)(this,"policy","volume_extension:volume_type_encryption:delete"),(0,u.default)(this,"allowedCheckFunc",(e=>i.default.resolve(e.encryption&&!e.encryption.deleted_at))),(0,u.default)(this,"onSubmit",(()=>{var{id:e,encryption:t}=this.item;return s.default.deleteEncryption(e,t.encryption_id)}))}get id(){return"delete-encryption"}get title(){return t("Delete Encryption")}get isDanger(){return!0}get buttonText(){return t("Delete Encryption")}get actionName(){return t("Delete Encryption")}}a.default=d},3720:function(e,a,r){"use strict";var l=r(33),n=r(44),i=r(32),u=r(25),o=r(27),s=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=a.ManageQos=void 0;var p=f(r(57)),m=f(r(335)),v=f(r(1265)),h=f(r(65)),g=f(r(36)),y=f(r(0)),b=r(406),_=r(1193),S=r(1301),x=f(r(1283));function C(e,t){var a=l(e);if(n){var r=n(e);t&&(r=i(r).call(r,(function(t){return u(e,t).enumerable}))),a.push.apply(a,r)}return a}function w(e){for(var t=1;t{var{id:t,qos_specs_id:a}=this.item,{qosSpec:r}=e,l=r.selectedRowKeys[0];return this.store.updateVolumeTypeQos(l,a,{vol_type_id:t})}))}get name(){return t("manage qos spec")}static get modalSize(){return"large"}getModalSize(){return"large"}init(){this.store=x.default,this.getQos()}getQos(){this.store.fetchList()}get QosMap(){var e;return(0,p.default)(e=this.store.list.data||[]).call(e,(e=>w(w({},e),{},{key:e.id})))}get defaultValue(){var{name:e}=this.item;return{volumeType:e,qosSpec:{selectedRowKeys:this.item.qos_specs_id?[this.item.qos_specs_id]:[]}}}get formItems(){return[{name:"volumeType",label:t("Volume Type"),type:"label",iconType:"volume"},{name:"qosSpec",label:t("QoS Spec"),type:"select-table",required:!1,data:this.QosMap,isLoading:this.store.list.isLoading,isMulti:!1,filterParams:[{label:t("Name"),name:"name"}],columns:[{title:t("Name"),dataIndex:"name"},{title:t("Consumer"),dataIndex:"consumer",valueMap:S.consumerTypes},{title:t("Specs"),dataIndex:"specs",render:e=>{var t;return e&&"{}"!==(0,m.default)(e)?(0,p.default)(t=(0,v.default)(e)).call(t,(e=>{var[t,a]=e;return y.default.createElement("div",{key:t},t,"=",a)})):"-"}}]}]}}a.ManageQos=k,(0,g.default)(k,"id","manage-qos"),(0,g.default)(k,"title",t("Manage QoS Spec")),(0,g.default)(k,"policy","volume_extension:qos_specs_manage:update"),(0,g.default)(k,"allowed",(()=>h.default.resolve(!0)));var I=(0,b.inject)("rootStore")((0,b.observer)(k));a.default=I},3721:function(e,a,r){"use strict";var l=r(19),n=r(21);l(a,"__esModule",{value:!0}),a.default=a.EditAction=void 0;var i=n(r(57)),u=n(r(32)),o=n(r(65)),s=n(r(36)),d=r(406),c=r(1193),f=n(r(566));class p extends c.ModalAction{constructor(){super(...arguments),(0,s.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,i.default)(e=(0,u.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.EditAction=p,(0,s.default)(p,"id","edit"),(0,s.default)(p,"title",t("Edit")),(0,s.default)(p,"policy","volume_extension:type_update"),(0,s.default)(p,"allowed",(()=>o.default.resolve(!0)));var m=(0,d.inject)("rootStore")((0,d.observer)(p));a.default=m},3722:function(e,a,r){"use strict";var l=r(19),n=r(21);l(a,"__esModule",{value:!0}),a.default=void 0;var i=n(r(36)),u=r(1193),o=n(r(566));class s extends u.ConfirmAction{constructor(){super(...arguments),(0,i.default)(this,"policy","volume_extension:type_delete"),(0,i.default)(this,"onSubmit",(e=>o.default.delete(e)))}get id(){return"delete"}get title(){return t("Delete Volume Type")}get isDanger(){return!0}get buttonText(){return t("Delete")}get actionName(){return t("Delete Volume Type")}}a.default=s},3723:function(e,a,r){"use strict";var l=r(33),n=r(44),i=r(32),u=r(25),o=r(27),s=r(45),d=r(46),c=r(19),f=r(160),p=r(21);c(a,"__esModule",{value:!0}),a.default=a.ManageAccess=void 0;var m=p(r(32)),v=p(r(90)),h=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=k(t);if(a&&a.has(e))return a.get(e);var r={},l=c&&u;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var i=l?u(e,n):null;i&&(i.get||i.set)?c(r,n,i):r[n]=e[n]}r.default=e,a&&a.set(e,r);return r}(r(566)),x=r(1193),C=r(407),w=r(1235);function k(e){if("function"!=typeof f)return null;var t=new f,a=new f;return(k=function(e){return e?a:t})(e)}function I(e,t){var a=l(e);if(n){var r=n(e);t&&(r=i(r).call(r,(function(t){return u(e,t).enumerable}))),a.push.apply(a,r)}return a}function A(e){for(var t=1;t{var{access:t={},isPublic:a}=e,{is_public:r,id:l}=this.item,n={id:l};if(a!==r&&(n.newPublic=a),!a){var i,{selectedRowKeys:u=[]}=t;n.adds=(0,m.default)(u).call(u,(e=>{var t;return(0,v.default)(t=this.currentAccess).call(t,e)<0})),n.dels=(0,m.default)(i=this.currentAccess).call(i,(e=>(0,v.default)(u).call(u,e)<0))}return S.default.updateProjectAccess(n)}))}init(){this.store=new S.VolumeTypeStore,this.projectStore=new C.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,h.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("Volume Type"),type:"label",iconType:"volume"},{name:"isPublic",label:t("Public"),type:"check",content:t("Public")},A({name:"access",label:t("Access Control"),type:"select-table",isMulti:!0,hidden:e,data:this.projects,isLoading:this.projectStore.list.isLoading},w.projectTableOptions)]}}a.ManageAccess=j,(0,b.default)(j,"id","manage-access"),(0,b.default)(j,"title",t("Manage Access")),(0,b.default)(j,"policy",["volume_extension:volume_type_access","volume_extension:volume_type_access:addProjectAccess","volume_extension:volume_type_access:removeProjectAccess"]),(0,b.default)(j,"allowed",(()=>g.default.resolve(!0)));var F=(0,_.inject)("rootStore")((0,_.observer)(j));a.default=F},3724:function(e,a,r){"use strict";var l=r(19),n=r(21);l(a,"__esModule",{value:!0}),a.default=a.Detail=void 0;var i=n(r(199)),u=r(406),o=r(566),s=n(r(1200)),d=n(r(3725)),c=n(r(3730)),f=n(r(1566));class p extends s.default{get name(){return t("volume type")}get policy(){return"volume_extension:type_get"}get listUrl(){return this.getRoutePath("volumeType")}get actionConfigs(){return f.default}get detailInfos(){return[{title:t("Name"),dataIndex:"name"},{title:t("Description"),dataIndex:"description"},{title:t("Public"),dataIndex:"is_public",isHideable:!0,valueRender:"yesNo"},{title:t("QoS Spec ID"),dataIndex:"qos_specs_id",valueRender:"noValue"}]}get tabs(){var{encryption:e}=this.detailData,a=[{title:t("Extra Specs"),key:"ExtraSpec",component:d.default}];return(0,i.default)(e)||a.unshift({title:t("Detail"),key:"baseDetail",component:c.default}),a}init(){this.store=new o.VolumeTypeStore}}a.Detail=p;var m=(0,u.inject)("rootStore")((0,u.observer)(p));a.default=m},3725:function(e,a,r){"use strict";var l=r(19),n=r(21);l(a,"__esModule",{value:!0}),a.default=a.ExtraSpecs=void 0;var i=n(r(36)),u=r(406),o=n(r(1194)),s=r(1343),d=n(r(3726));class c extends o.default{constructor(){super(...arguments),(0,i.default)(this,"getColumns",(()=>[{title:t("Key"),dataIndex:"keyname"},{title:t("Value"),dataIndex:"value"}]))}init(){this.store=new s.ExtraSpecStore}get policy(){return"volume_extension:types_extra_specs: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,u.inject)("rootStore")((0,u.observer)(c));a.default=f},3726:function(e,t,a){"use strict";var r=a(19),l=a(21);r(t,"__esModule",{value:!0}),t.default=void 0;var n=l(a(3727)),i=l(a(3728)),u=l(a(3729)),o={rowActions:{firstAction:u.default,moreActions:[{action:i.default}]},batchActions:[u.default],primaryActions:[n.default]};t.default=o},3727:function(e,a,r){"use strict";var l=r(19),n=r(21);l(a,"__esModule",{value:!0}),a.default=a.Create=void 0;var i=n(r(1204)),u=n(r(65)),o=n(r(36)),s=r(406),d=r(1193),c=n(r(1343));class f extends d.ModalAction{constructor(){super(...arguments),(0,o.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,i.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,o.default)(f,"id","create"),(0,o.default)(f,"title",t("Create Extra Spec")),(0,o.default)(f,"policy","volume_extension:types_extra_specs:create"),(0,o.default)(f,"allowed",(()=>u.default.resolve(!0)));var p=(0,s.inject)("rootStore")((0,s.observer)(f));a.default=p},3728:function(e,a,r){"use strict";var l=r(19),n=r(21);l(a,"__esModule",{value:!0}),a.default=a.Edit=void 0;var i=n(r(65)),u=n(r(36)),o=r(406),s=r(1193),d=n(r(1343));class c extends s.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("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,u.default)(c,"id","edit"),(0,u.default)(c,"title",t("Edit Extra Spec")),(0,u.default)(c,"buttonText",t("Edit")),(0,u.default)(c,"policy","volume_extension:types_extra_specs:update"),(0,u.default)(c,"allowed",(()=>i.default.resolve(!0)));var f=(0,o.inject)("rootStore")((0,o.observer)(c));a.default=f},3729:function(e,a,r){"use strict";var l=r(19),n=r(21);l(a,"__esModule",{value:!0}),a.default=void 0;var i=n(r(36)),u=r(1193),o=n(r(1343));class s extends u.ConfirmAction{constructor(){super(...arguments),(0,i.default)(this,"policy","volume_extension:types_extra_specs:delete"),(0,i.default)(this,"onSubmit",(e=>{var{id:t}=this.containerProps.detail,{keyname:a}=e,r={id:t,keyname:a};return o.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=s},3730:function(e,a,r){"use strict";var l=r(19),n=r(21);l(a,"__esModule",{value:!0}),a.default=a.BaseDetail=void 0;var i=r(406),u=n(r(1202)),o=r(1301);class s extends u.default{get leftCards(){return[this.encryptionInfo]}get encryptionInfo(){var e=[{label:t("Provider"),dataIndex:"encryption.provider"},{label:t("Control Location"),dataIndex:"encryption.control_location",valueMap:o.controls},{label:t("Cipher"),dataIndex:"encryption.cipher"},{label:t("Key Size (bits)"),dataIndex:"encryption.key_size"},{label:t("Created At"),dataIndex:"encryption.created_at",valueRender:"toLocalTime"}];return{title:t("Encryption Info"),options:e}}}a.BaseDetail=s;var d=(0,i.inject)("rootStore")((0,i.observer)(s));a.default=d},3731:function(e,a,r){"use strict";var l=r(19),n=r(21);l(a,"__esModule",{value:!0}),a.default=a.Detail=void 0;var i=r(406),u=r(1283),o=n(r(1200)),s=r(1301),d=n(r(3732)),c=n(r(1565));class f extends o.default{get name(){return t("volume type qos")}get policy(){return"volume_extension:qos_specs_manage:get"}get listUrl(){return this.getRoutePath("volumeType",null,{tab:"qos"})}get actionConfigs(){return c.default}get detailData(){return this.store.detail.qos_specs}get detailInfos(){return[{title:t("Name"),dataIndex:"name"},{title:t("Consumer"),dataIndex:"consumer",valueMap:s.consumerTypes}]}get tabs(){return[{title:t("Extra Specs"),key:"ExtraSpec",component:d.default}]}init(){this.store=new u.QosSpecStore}}a.Detail=f;var p=(0,i.inject)("rootStore")((0,i.observer)(f));a.default=p},3732:function(e,a,r){"use strict";var l=r(19),n=r(21);l(a,"__esModule",{value:!0}),a.default=a.ExtraSpecs=void 0;var i=n(r(36)),u=r(406),o=n(r(1194)),s=r(1344),d=n(r(3733));class c extends o.default{constructor(){super(...arguments),(0,i.default)(this,"getColumns",(()=>[{title:t("Key"),dataIndex:"keyname"},{title:t("Value"),dataIndex:"value"}]))}init(){this.store=new s.QosSpecKeyStore}get policy(){return"volume_extension:qos_specs_manage:get"}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,u.inject)("rootStore")((0,u.observer)(c));a.default=f},3733:function(e,t,a){"use strict";var r=a(19),l=a(21);r(t,"__esModule",{value:!0}),t.default=void 0;var n=l(a(3734)),i=l(a(3735)),u=l(a(3736)),o={rowActions:{firstAction:u.default,moreActions:[{action:i.default}]},batchActions:[u.default],primaryActions:[n.default]};t.default=o},3734:function(e,a,r){"use strict";var l=r(19),n=r(21);l(a,"__esModule",{value:!0}),a.default=a.Create=void 0;var i=n(r(1204)),u=n(r(65)),o=n(r(36)),s=r(406),d=r(1193),c=n(r(1344));class f extends d.ModalAction{constructor(){super(...arguments),(0,o.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 instanceName(){return(0,i.default)(this).keyname}get keysMap(){return[{label:"read_iops_sec",value:"read_iops_sec"},{label:"read_iops_sec_per_gb",value:"read_iops_sec_per_gb"},{label:"read_iops_sec_per_gb_min",value:"read_iops_sec_per_gb_min"},{label:"read_iops_sec_max",value:"read_iops_sec_max"},{label:"write_iops_sec",value:"write_iops_sec"},{label:"write_iops_sec_per_gb",value:"write_iops_sec_per_gb"},{label:"write_iops_sec_per_gb_min",value:"write_iops_sec_per_gb_min"},{label:"write_iops_sec_max",value:"write_iops_sec_max"},{label:"total_iops_sec",value:"total_iops_sec"},{label:"total_iops_sec_per_gb",value:"total_iops_sec_per_gb"},{label:"total_iops_sec_per_gb_min",value:"total_iops_sec_per_gb_min"},{label:"total_iops_sec_max",value:"total_iops_sec_max"},{label:"read_bytes_sec",value:"read_bytes_sec"},{label:"read_bytes_sec_per_gb",value:"read_bytes_sec_per_gb"},{label:"read_bytes_sec_per_gb_min",value:"read_bytes_sec_per_gb_min"},{label:"read_bytes_sec_max",value:"read_bytes_sec_max"},{label:"write_bytes_sec",value:"write_bytes_sec"},{label:"write_bytes_sec_per_gb",value:"write_bytes_sec_per_gb"},{label:"write_bytes_sec_per_gb_min",value:"write_bytes_sec_per_gb_min"},{label:"write_bytes_sec_max",value:"write_bytes_sec_max"},{label:"total_bytes_sec",value:"total_bytes_sec"},{label:"total_bytes_sec_per_gb",value:"total_bytes_sec_per_gb"},{label:"total_bytes_sec_per_gb_min",value:"total_bytes_sec_per_gb_min"},{label:"total_bytes_sec_max",value:"total_bytes_sec_max"}]}get defaultValue(){return{keyname:this.keysMap[0].value}}get formItems(){return[{name:"keyname",label:t("Key"),type:"select",options:this.keysMap,placeholder:t("Please select key")},{name:"value",label:t("Value"),type:"input",placeholder:t("Please input value"),required:!0}]}init(){this.store=c.default}}a.Create=f,(0,o.default)(f,"id","create"),(0,o.default)(f,"title",t("Create Extra Spec")),(0,o.default)(f,"policy","volume_extension:qos_specs_manage:update"),(0,o.default)(f,"allowed",(()=>u.default.resolve(!0)));var p=(0,s.inject)("rootStore")((0,s.observer)(f));a.default=p},3735:function(e,a,r){"use strict";var l=r(19),n=r(21);l(a,"__esModule",{value:!0}),a.default=a.Edit=void 0;var i=n(r(65)),u=n(r(36)),o=r(406),s=r(1193),d=n(r(1344));class c extends s.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("Edit Extra Spec")}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,u.default)(c,"id","edit"),(0,u.default)(c,"title",t("Edit Extra Spec")),(0,u.default)(c,"buttonText",t("Edit")),(0,u.default)(c,"policy","volume_extension:qos_specs_manage:update"),(0,u.default)(c,"allowed",(()=>i.default.resolve(!0)));var f=(0,o.inject)("rootStore")((0,o.observer)(c));a.default=f},3736:function(e,a,r){"use strict";var l=r(19),n=r(21);l(a,"__esModule",{value:!0}),a.default=void 0;var i=n(r(36)),u=r(1193),o=n(r(1344));class s extends u.ConfirmAction{constructor(){super(...arguments),(0,i.default)(this,"policy","volume_extension:qos_specs_manage:update"),(0,i.default)(this,"onSubmit",(e=>{var{keyname:t}=e,{id:a}=this.containerProps.detail,r={id:a,keyname:t};return o.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=s},3737:function(e,a,r){"use strict";var l=r(160),n=r(19),i=r(25),u=r(21);n(a,"__esModule",{value:!0}),a.default=a.Container=void 0;var o=u(r(580));r(576);var s=u(r(577)),d=u(r(36));r(1198);var c=u(r(1199));r(1196);var f=u(r(1197));r(1268);var p=u(r(1269)),m=u(r(51)),v=k(r(0)),h=r(406),g=(r(173),u(r(1194))),y=k(r(1345)),b=r(161),_=r(1203),S=r(569),x=r(76),C=u(r(3738));function w(e){if("function"!=typeof l)return null;var t=new l,a=new l;return(w=function(e){return e?a:t})(e)}function k(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var a=w(t);if(a&&a.has(e))return a.get(e);var r={},l=n&&i;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var o=l?i(e,u):null;o&&(o.get||o.set)?n(r,u,o):r[u]=e[u]}return r.default=e,a&&a.set(e,r),r}function I(e){var{name:a}=e,[r,l]=(0,v.useState)([]),[n,i]=(0,v.useState)(!1);(0,v.useEffect)((()=>{var e=null;return(0,m.default)((function*(){i(!0);var t=yield(new y.ContainerStore).fetchDetail({name:a});e=(0,o.default)((()=>{i(!1),l(t)}),200)}))(),()=>{clearTimeout(e)}}),[]);var u=n?v.default.createElement(p.default,{loading:n}):v.default.createElement(v.default.Fragment,null,v.default.createElement(c.default,null,v.default.createElement(f.default,{span:8},t("Object Count")),v.default.createElement(f.default,{span:12},r.object_count)),v.default.createElement(c.default,null,v.default.createElement(f.default,{span:8},t("Size")),v.default.createElement(f.default,{span:12},(0,b.bytesFilter)(r.used))),v.default.createElement(c.default,null,v.default.createElement(f.default,{span:8},t("Created At")),v.default.createElement(f.default,{span:12},(0,S.getStrFromTimestamp)(r.timestamp))),v.default.createElement(c.default,null,v.default.createElement(f.default,{span:8},t("Storage Policy")),v.default.createElement(f.default,{span:12},r.storage_policy)),v.default.createElement(c.default,null,v.default.createElement(f.default,{span:8},t("Public Access")),v.default.createElement(f.default,{span:12},r.link?v.default.createElement("a",{type:"link",href:r.link,target:"_blank",rel:"noreferrer"},t("Click To View")):t("Private"))));return v.default.createElement("div",{key:"container_".concat(a),style:{width:300}},u)}class A extends g.default{constructor(){super(...arguments),(0,d.default)(this,"getColumns",(()=>[{title:t("Name"),dataIndex:"name",render:(e,t)=>this.getLinkRender("containerDetail",e||t.id,{id:t.id})},{title:t("Size"),dataIndex:"bytes",valueRender:"bytes"},{title:t("Last Updated"),dataIndex:"last_modified",isHideable:!0,valueRender:"sinceTime"},{title:t("Detail Info"),dataIndex:"detail",isHideable:!0,render:(e,a)=>{var r=v.default.createElement(I,{name:a.name});return v.default.createElement(s.default,{content:r,destroyTooltipOnHide:!0,trigger:"click"},v.default.createElement("span",{className:"link-class"},t("Detail Info")))}}]))}init(){this.store=y.default}get policy(){return _.allCanChangePolicy}get checkEndpoint(){return!0}get endpoint(){return(0,x.swiftEndpoint)()}get name(){return t("containers")}get actionConfigs(){return C.default}get hideCustom(){return!0}get hideDownload(){return!0}get rowKey(){return"name"}get searchFilters(){return[{label:t("Name"),name:"name"}]}}a.Container=A;var j=(0,h.inject)("rootStore")((0,h.observer)(A));a.default=j},3738:function(e,t,a){"use strict";var r=a(19),l=a(21);r(t,"__esModule",{value:!0}),t.default=void 0;var n=l(a(3739)),i=l(a(3740)),u={rowActions:{firstAction:l(a(3741)).default,moreActions:[{action:i.default}]},batchActions:[i.default],primaryActions:[n.default]};t.default=u},3739:function(e,a,r){"use strict";var l=r(19),n=r(21);l(a,"__esModule",{value:!0}),a.default=a.Create=void 0;var i=n(r(65)),u=n(r(51)),o=n(r(36)),s=r(406),d=r(1193),c=n(r(1345)),f=r(1203);class p extends d.ModalAction{constructor(){super(...arguments),(0,o.default)(this,"onSubmit",function(){var e=(0,u.default)((function*(e){return c.default.create(e)}));return function(t){return e.apply(this,arguments)}}())}get name(){return t("Create Container")}get tips(){return t("Note: Please consider the container name carefully since it couldn't be changed after created.")}get formItems(){return[{name:"name",label:t("Name"),type:"input-name",required:!0,isSwiftFile:!0,maxLength:63},{name:"isPublic",label:t("Public Access"),type:"switch",tip:t("A public container will allow anyone to use the objects in your container through a public URL.")}]}}a.Create=p,(0,o.default)(p,"id","create"),(0,o.default)(p,"title",t("Create Container")),(0,o.default)(p,"policy",f.allCanChangePolicy),(0,o.default)(p,"allowed",((e,t)=>{var{isAdminPage:a}=t;return i.default.resolve(!a)}));var m=(0,s.inject)("rootStore")((0,s.observer)(p));a.default=m},3740:function(e,a,r){"use strict";var l=r(19),n=r(21);l(a,"__esModule",{value:!0}),a.default=void 0;var i=n(r(36)),u=r(1193),o=n(r(1345)),s=r(1203);class d extends u.ConfirmAction{constructor(){super(...arguments),(0,i.default)(this,"policy",s.allCanChangePolicy),(0,i.default)(this,"onSubmit",(e=>{var{id:t}=e;return o.default.delete({id:t})}))}get id(){return"delete"}get title(){return t("Delete Container")}get name(){return t("Delete Container")}get isDanger(){return!0}get buttonText(){return t("Delete")}get actionName(){return t("delete container")}}a.default=d},3741:function(e,a,r){"use strict";var l=r(160),n=r(19),i=r(25),u=r(21);n(a,"__esModule",{value:!0}),a.default=a.Access=void 0;var o=u(r(65)),s=u(r(51)),d=u(r(36)),c=r(406),f=r(1193),p=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var a=v(t);if(a&&a.has(e))return a.get(e);var r={},l=n&&i;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var o=l?i(e,u):null;o&&(o.get||o.set)?n(r,u,o):r[u]=e[u]}r.default=e,a&&a.set(e,r);return r}(r(1345)),m=r(1203);function v(e){if("function"!=typeof l)return null;var t=new l,a=new l;return(v=function(e){return e?a:t})(e)}class h extends f.ModalAction{constructor(){var e;super(...arguments),e=this,(0,d.default)(this,"onSubmit",function(){var t=(0,s.default)((function*(t){var{isPublic:a=!1}=t;return p.default.updatePublic(e.item.name,a)}));return function(e){return t.apply(this,arguments)}}())}get name(){return t("Update Access")}init(){this.detailStore=new p.ContainerStore,this.fetchDetail()}fetchDetail(){var e=this;return(0,s.default)((function*(){yield e.detailStore.fetchDetail({name:e.item.name}),e.updateDefaultValue()}))()}get defaultValue(){var{is_public:e}=this.detailStore.detail||{};return{isPublic:e||!1}}get formItems(){return[{name:"isPublic",label:t("Public Access"),type:"switch",tip:t("A public container will allow anyone to use the objects in your container through a public URL.")}]}}a.Access=h,(0,d.default)(h,"id","access"),(0,d.default)(h,"title",t("Update Access")),(0,d.default)(h,"policy",m.allCanChangePolicy),(0,d.default)(h,"allowed",((e,t)=>{var{isAdminPage:a}=t;return o.default.resolve(!a)}));var g=(0,c.inject)("rootStore")((0,c.observer)(h));a.default=g},3742:function(e,a,r){"use strict";var l=r(33),n=r(44),i=r(32),u=r(25),o=r(27),s=r(45),d=r(46),c=r(19),f=r(160),p=r(21);c(a,"__esModule",{value:!0}),a.default=a.ContainerObject=void 0;var m=p(r(580)),v=p(r(32)),h=p(r(57)),g=p(r(200));r(576);var y=p(r(577)),b=p(r(36));r(1198);var _=p(r(1199));r(1196);var S=p(r(1197));r(1268);var x=p(r(1269)),C=p(r(51)),w=p(r(202)),k=z(r(0)),I=r(406),A=(r(173),p(r(1194))),j=z(r(1236)),F=r(161),P=r(1203),D=r(34),M=r(1255),N=r(569),E=p(r(3743)),T=p(r(3745));function V(e){if("function"!=typeof f)return null;var t=new f,a=new f;return(V=function(e){return e?a:t})(e)}function z(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var a=V(t);if(a&&a.has(e))return a.get(e);var r={},l=c&&u;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var i=l?u(e,n):null;i&&(i.get||i.set)?c(r,n,i):r[n]=e[n]}return r.default=e,a&&a.set(e,r),r}function R(e,t){var a=l(e);if(n){var r=n(e);t&&(r=i(r).call(r,(function(t){return u(e,t).enumerable}))),a.push.apply(a,r)}return a}function O(e){for(var t=1;t{var e=null;return(0,C.default)((function*(){s(!0);var t=yield(new j.ObjectStore).fetchDetail({container:r,name:l});e=(0,m.default)((()=>{s(!1),u(t)}),200)}))(),()=>{clearTimeout(e)}}),[]);var d=o?k.default.createElement(x.default,{loading:o}):k.default.createElement(k.default.Fragment,null,k.default.createElement(_.default,null,k.default.createElement(S.default,{span:8},t("Name")),k.default.createElement(S.default,{span:12,style:{wordBreak:"break-all"}},n)),i.etag&&k.default.createElement(_.default,null,k.default.createElement(S.default,{span:8},t("Hash")),k.default.createElement(S.default,{span:12},i.etag)),k.default.createElement(_.default,null,k.default.createElement(S.default,{span:8},t("Content Type")),k.default.createElement(S.default,{span:12,style:{wordBreak:"break-all"}},i.contentType)),k.default.createElement(_.default,null,k.default.createElement(S.default,{span:8},t("Created At")),k.default.createElement(S.default,{span:12},(0,N.getStrFromTimestamp)(i.timestamp))),k.default.createElement(_.default,null,k.default.createElement(S.default,{span:8},t("Size")),k.default.createElement(S.default,{span:12},(0,F.bytesFilter)(i.size||a.bytes))),!(0,M.isFolder)(a)&&k.default.createElement(_.default,null,k.default.createElement(S.default,{span:8},t("Origin File Name")),k.default.createElement(S.default,{span:12,style:{wordBreak:"break-all"}},decodeURIComponent(i.originFileName))));return k.default.createElement("div",{key:"object_".concat(l),style:{width:300}},d)}class q extends A.default{constructor(){super(...arguments),(0,b.default)(this,"getRequestFolder",(e=>{if(!e)return"";var t=decodeURIComponent(e);return"/"!==t[t.length-1]?"".concat(t,"/"):t})),(0,b.default)(this,"updateFetchParams",(e=>{var{folder:t}=this.params;return O(O({},e),{},{folder:this.getRequestFolder(t)})})),(0,b.default)(this,"getColumns",(()=>[{title:t("Name"),dataIndex:"shortName",render:(e,t)=>{var{type:a,container:r}=t;if("folder"===a){var l=encodeURIComponent(t.name);return this.getLinkRender("folderDetail",e,{container:r,folder:l})}return e}},{title:t("Size"),dataIndex:"bytes",isHideable:!0,valueRender:"formatSize",render:(e,t)=>"folder"===t.type?"-":(0,F.bytesFilter)(e)},{title:t("Last Updated"),dataIndex:"last_modified",isHideable:!0,valueRender:"sinceTime"},{title:t("Detail"),dataIndex:"detail",isHideable:!0,render:(e,a)=>{var r=k.default.createElement(B,{item:a});return k.default.createElement(y.default,{content:r,destroyTooltipOnHide:!0,trigger:"click"},k.default.createElement("span",{className:"link-class"},t("Detail")))}}])),(0,b.default)(this,"handleRefresh",(e=>{var{inAction:t,inSelect:a}=this;if(!(t||a&&!e)&&(e||!(this.autoRefreshCount>=this.autoRefreshCountMax))){e&&(this.autoRefreshCount=0);var{page:r,limit:l,sortKey:n,sortOrder:i,filters:u}=this.list,o=O(O({page:r,limit:l,sortKey:n,sortOrder:i},(0,D.toJS)(u)),{},{silent:!e});e&&(o.page=1),this.handleFetch(o,!0),this.inDetailPage&&e&&this.shouldRefreshDetail&&this.refreshDetailData()}}))}init(){this.store=j.default}get policy(){return P.allCanReadPolicy}get name(){return t("container objects")}get rowKey(){return"name"}get actionConfigs(){return T.default}get clearListUnmount(){return!0}get hasTab(){return!0}get hideDownload(){return!0}get isInFolder(){var{folder:e}=this.params;return!!e}get ableAutoFresh(){return!1}get primaryActionsExtra(){var{hasCopy:e,container:t}=this.store;return{hasCopy:e,container:t}}getCheckboxProps(e){if((0,M.isFolder)(e))return{disabled:!0,name:e.shortName}}componentDidUpdate(e){(0,w.default)(this.props.match.params,e.match.params)||this.handleRefresh(!0)}get searchFilters(){return[{label:t("Name"),name:"shortName"}]}renderHeader(){var e,{container:a="",folder:r=""}=this.params||{},l=(0,v.default)(e=decodeURIComponent(r).split("/")).call(e,(e=>!!e)),n=[{path:this.getRoutePath("containerDetail",{id:a}),link:this.getLinkRender("containerDetail",a,{id:a})}],i=(0,h.default)(l).call(l,((e,t)=>{var r=(0,g.default)(l).call(l,0,t+1).join("/");return{path:this.getRoutePath("folderDetail",{container:a,folder:encodeURIComponent(r)}),link:this.getLinkRender("folderDetail",e,{container:a,folder:encodeURIComponent(r)})}}));n.push(...i);var u=k.default.createElement("span",{className:E.default["item-next"]},">"),o=(0,h.default)(n).call(n,((e,t)=>k.default.createElement("span",{key:e.path},e.link," ",t{var r;return a.length<2?u.default.reject(new Error((0,o.default)(r="".concat(t("Invalid: "))).call(r,t("Please input at least 2 characters.")))):u.default.resolve()}}]}}a.CreateFolder=h,(0,c.default)(h,"id","create"),(0,c.default)(h,"title",t("Create Folder")),(0,c.default)(h,"policy",v.allCanChangePolicy),(0,c.default)(h,"allowed",((e,t)=>{var{isAdminPage:a}=t;return u.default.resolve(!a)}));var g=(0,f.inject)("rootStore")((0,f.observer)(h));a.default=g},3747:function(e,a,r){"use strict";var l=r(160),n=r(19),i=r(25),u=r(21);n(a,"__esModule",{value:!0}),a.default=void 0;var o=u(r(65)),s=u(r(51)),d=u(r(36)),c=r(1193),f=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var a=v(t);if(a&&a.has(e))return a.get(e);var r={},l=n&&i;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var o=l?i(e,u):null;o&&(o.get||o.set)?n(r,u,o):r[u]=e[u]}r.default=e,a&&a.set(e,r);return r}(r(1236)),p=r(1203),m=r(1255);function v(e){if("function"!=typeof l)return null;var t=new l,a=new l;return(v=function(e){return e?a:t})(e)}class h extends c.ConfirmAction{constructor(){var e;super(...arguments),e=this,(0,d.default)(this,"getItemName",(e=>e.shortName)),(0,d.default)(this,"policy",p.allCanChangePolicy),(0,d.default)(this,"onSubmit",function(){var a=(0,s.default)((function*(a){if((0,m.isFile)(a))return e.showConfirmErrorBeforeSubmit=!1,f.default.delete(a);var r=new f.ObjectStore,{container:l,name:n}=a;return(yield r.fetchList({container:l,path:n})).length>0?(e.showConfirmErrorBeforeSubmit=!0,e.confirmErrorMessageBeforeSubmit=t("Unable to {action}, because : {reason}, instance: {name}.",{action:e.actionName||e.title,name:e.item.name,reason:t("the folder is not empty")}),o.default.reject()):(e.showConfirmErrorBeforeSubmit=!1,f.default.delete(a))}));return function(e){return a.apply(this,arguments)}}())}get id(){return"delete"}get isFile(){return!this.item||(0,m.isFile)(this.item)}get title(){return this.isFile?t("Delete File"):t("Delete Folder")}get name(){return this.title}get isDanger(){return!0}get buttonText(){return t("Delete")}get actionName(){return this.title}}a.default=h},3748:function(e,a,r){"use strict";var l=r(160),n=r(19),i=r(25),u=r(21);n(a,"__esModule",{value:!0}),a.default=a.UploadFile=void 0;var o=u(r(65)),s=u(r(1204)),d=u(r(62)),c=u(r(51)),f=u(r(36)),p=r(406),m=r(1193),v=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var a=g(t);if(a&&a.has(e))return a.get(e);var r={},l=n&&i;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var o=l?i(e,u):null;o&&(o.get||o.set)?n(r,u,o):r[u]=e[u]}r.default=e,a&&a.set(e,r);return r}(r(1236)),h=r(1203);function g(e){if("function"!=typeof l)return null;var t=new l,a=new l;return(g=function(e){return e?a:t})(e)}class y extends m.ModalAction{constructor(){var e;super(...arguments),e=this,(0,f.default)(this,"sizeValidate",((e,a)=>{if(!a)return o.default.reject(t("Please select a file"));var{size:r}=a;return r<=1024*this.maxSize*1024*1024?o.default.resolve():o.default.reject(t("Please upload files smaller than { size }G on the page. It is recommended to upload files over { size }G using API.",{size:this.maxSize}))})),(0,f.default)(this,"onSubmit",function(){var t=(0,c.default)((function*(t){var{container:a}=t,r=(0,d.default)(t,["container"]),l=e.getUploadRequestConf();return e.store.createFile(a,r,l)}));return function(e){return t.apply(this,arguments)}}())}init(){this.store=new v.ObjectStore,this.maxSize=1}get name(){return t("Upload File")}get instanceName(){return(0,s.default)(this).file.name}get hasRequestCancelCallback(){return!0}get defaultValue(){var{name:e,folder:t}=v.default.container||{};return{container:e,dest_folder:t}}get formItems(){var{folder:e}=v.default.container||{};return[{name:"container",label:t("Container Name"),type:"label"},{name:"dest_folder",label:t("Dest Folder"),type:"label",hidden:!e},{name:"file",label:t("Select File"),type:"upload",required:!0,validator:this.sizeValidate}]}}a.UploadFile=y,(0,f.default)(y,"id","upload-file"),(0,f.default)(y,"title",t("Upload File")),(0,f.default)(y,"policy",h.allCanChangePolicy),(0,f.default)(y,"allowed",((e,t)=>{var{isAdminPage:a}=t;return o.default.resolve(!a)}));var b=(0,p.inject)("rootStore")((0,p.observer)(y));a.default=b},3749:function(e,a,r){"use strict";var l=r(19),n=r(21);l(a,"__esModule",{value:!0}),a.default=void 0;var i=n(r(51)),u=n(r(36)),o=r(1193),s=r(1255),d=n(r(1236)),c=r(1203),f=n(r(1298));class p extends o.ConfirmAction{constructor(){super(...arguments),(0,u.default)(this,"policy",c.allCanChangePolicy),(0,u.default)(this,"getItemName",(e=>e.shortName)),(0,u.default)(this,"allowedCheckFunc",(e=>(0,s.isFile)(e))),(0,u.default)(this,"onSubmit",function(){var e=(0,i.default)((function*(e){return d.default.downloadFile(e).then((t=>{var{shortName:a}=e;return t.data?f.default.saveAs(t.data,a):f.default.saveAs(t,a)}))}));return function(t){return e.apply(this,arguments)}}())}get id(){return"download"}get title(){return t("Download File")}get name(){return t("Download File")}get actionName(){return t("Download File")}}a.default=p},3750:function(e,a,r){"use strict";var l=r(19),n=r(21);l(a,"__esModule",{value:!0}),a.default=void 0;var i=n(r(65)),u=n(r(36)),o=r(1193),s=n(r(1236)),d=r(1203),c=r(1255);class f extends o.ConfirmAction{constructor(){super(...arguments),(0,u.default)(this,"getItemName",(e=>e.shortName)),(0,u.default)(this,"policy",d.allCanChangePolicy),(0,u.default)(this,"allowedCheckFunc",(e=>(0,c.isFile)(e))),(0,u.default)(this,"onSubmit",((e,t,a,r,l)=>a?0===r?s.default.copyFiles(l):i.default.resolve():s.default.copyFiles([e])))}get id(){return"CopyFile"}get title(){return t("Copy File")}get name(){return this.title}get buttonText(){return t("Copy")}get passiveAction(){return t("be copied")}get actionName(){return this.title}}a.default=f},3751:function(e,a,r){"use strict";var l=r(19),n=r(21);l(a,"__esModule",{value:!0}),a.default=void 0;var i=n(r(65)),u=n(r(36)),o=r(1193),s=n(r(1236)),d=r(1203),c=r(1255);class f extends o.ConfirmAction{constructor(){super(...arguments),(0,u.default)(this,"getItemName",(e=>e.shortName)),(0,u.default)(this,"policy",d.allCanChangePolicy),(0,u.default)(this,"allowedCheckFunc",(e=>(0,c.isFile)(e))),(0,u.default)(this,"onSubmit",((e,t,a,r,l)=>a?0===r?s.default.cutFiles(l):i.default.resolve():s.default.cutFiles([e])))}get id(){return"CutFile"}get title(){return t("Cut File")}get name(){return this.title}get buttonText(){return t("Cut")}get actionName(){return this.title}get passiveAction(){return t("be cut")}}a.default=f},3752:function(e,a,r){"use strict";var l=r(160),n=r(19),i=r(25),u=r(21);n(a,"__esModule",{value:!0}),a.default=a.Edit=void 0;var o=u(r(65)),s=u(r(51)),d=u(r(36)),c=r(406),f=r(1193),p=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=n&&i;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var o=l?i(e,u):null;o&&(o.get||o.set)?n(r,u,o):r[u]=e[u]}r.default=e,a&&a.set(e,r);return r}(r(1236)),m=r(1203),v=r(1255);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 g extends f.ModalAction{constructor(){var e;super(...arguments),e=this,(0,d.default)(this,"sizeValidate",((e,a)=>{if(!a)return o.default.reject(t("Please select a file"));var{size:r}=a;return r<=1024*this.maxSize*1024*1024?o.default.resolve():o.default.reject(t("Please upload files smaller than { size }G on the page. It is recommended to upload files over { size }G using API.",{size:this.maxSize}))})),(0,d.default)(this,"onSubmit",function(){var t=(0,s.default)((function*(t){var{container:a,file:r}=t,l=e.getUploadRequestConf();return e.store.updateFile(a,r,e.item.name,l)}));return function(e){return t.apply(this,arguments)}}())}init(){this.store=new p.ObjectStore,this.maxSize=1}get name(){return t("Upload File")}get instanceName(){return this.item.shortName}get hasRequestCancelCallback(){return!0}get tips(){return t("Editing only changes the content of the file, not the file name.")}get defaultValue(){var{folder:e,shortName:t,container:a}=this.item;return{container:a,dest_folder:e,shortName:t}}get formItems(){var{folder:e}=p.default.container||{};return[{name:"container",label:t("Container Name"),type:"label"},{name:"dest_folder",label:t("Folder Name"),type:"label",hidden:!e},{name:"shortName",label:t("Filename"),type:"label"},{name:"file",label:t("Select File"),type:"upload",required:!0,validator:this.sizeValidate}]}}a.Edit=g,(0,d.default)(g,"id","edit-file"),(0,d.default)(g,"title",t("Edit")),(0,d.default)(g,"policy",m.allCanChangePolicy),(0,d.default)(g,"allowed",((e,t)=>{var{isAdminPage:a}=t;return o.default.resolve((0,v.isFile)(e)&&!a)}));var y=(0,c.inject)("rootStore")((0,c.observer)(g));a.default=y},3753:function(e,a,r){"use strict";var l=r(19),n=r(21);l(a,"__esModule",{value:!0}),a.default=void 0;var i=n(r(57)),u=n(r(81)),o=n(r(36)),s=n(r(0)),d=r(1193),c=n(r(1236)),f=r(1203),p=r(1255);class m extends d.ConfirmAction{constructor(){super(...arguments),(0,o.default)(this,"getItemName",(e=>e?e.shortName:this.folderInStore||t("Root directory"))),(0,o.default)(this,"policy",f.allCanChangePolicy),(0,o.default)(this,"confirmContext",(e=>{var a=this.getName(e);return s.default.createElement("div",null,s.default.createElement("p",null,this.unescape(t("Are you sure to {action} (instance: {name})?",{action:this.actionNameDisplay||this.title,name:a}))),s.default.createElement("p",null,this.unescape(t("Source Path: {path}",{path:this.getSourcePath()}))),s.default.createElement("p",null,this.unescape(t("Files: {names}",{names:this.getFileNames()}))),s.default.createElement("p",null,t("The file with the same name will be overwritten.")))})),(0,o.default)(this,"allowedCheckFunc",(e=>{if(!e){var{hasCopy:t}=c.default;return t&&this.checkFolder()}return(0,p.isFolder)(e)&&e.hasCopy&&this.checkFolder(e)})),(0,o.default)(this,"checkFolder",(e=>{var{container:t,folder:a}=this.copiedFiles[0]||{};return e?e.container!==t||e.name!==a:this.containerInStore!==t||this.folderInStore!==a})),(0,o.default)(this,"performErrorMsg",(e=>{if(!c.default.hasCopy)return t("There is currently no file to paste.");if(!this.checkFolder(e))return t("Unable to paste into the same folder.");var a=this.getName(e);return t("You are not allowed to {action}, instance: {name}.",{action:this.actionNameDisplay||this.title,name:a})})),(0,o.default)(this,"onSubmit",(e=>e?c.default.pasteFiles(e):c.default.pasteFiles()))}get id(){return"PasteFile"}get title(){return t("Paste File")}get name(){return this.title}get buttonText(){return t("Paste")}get actionName(){return t("paste files to folder")}get copiedFiles(){var{copiedFiles:e=[]}=c.default;return e}get folderInStore(){var{container:{folder:e}={}}=c.default;return e}get containerInStore(){var{container:{name:e}={}}=c.default;return e}getFileNames(){var e;return(0,i.default)(e=this.copiedFiles).call(e,(e=>e.shortName)).join(", ")}getSourcePath(){var e,{container:t,folder:a}=this.copiedFiles[0]||{};return(0,u.default)(e="".concat(t,"/")).call(e,a)}}a.default=m},3754:function(e,a,r){"use strict";var l=r(19),n=r(21);l(a,"__esModule",{value:!0}),a.default=a.Rename=void 0;var i=n(r(81)),u=n(r(65)),o=n(r(51)),s=n(r(36)),d=r(406),c=r(1193),f=n(r(1236)),p=r(1203),m=r(1255);class v extends c.ModalAction{constructor(){var e;super(...arguments),e=this,(0,s.default)(this,"onSubmit",function(){var t=(0,o.default)((function*(t){var a,{container:r,folder:l,name:n}=e.item,{newname:u}=t,o=l?(0,i.default)(a="".concat(l,"/")).call(a,u):u;return f.default.rename(r,n,o)}));return function(e){return t.apply(this,arguments)}}())}init(){this.store=f.default}get name(){return t("Rename")}get instanceName(){return this.item.shortName}get defaultValue(){var{folder:e,shortName:t,container:a}=this.item;return{container:a,dest_folder:e,shortName:t}}get tip(){return t("Rename is to copy the current file to the new file address and delete the current file, which will affect the creation time of the file.")}get formItems(){var{folder:e}=f.default.container||{};return[{name:"container",label:t("Container Name"),type:"label"},{name:"dest_folder",label:t("Folder Name"),type:"label",hidden:!e},{name:"shortName",label:t("Filename"),type:"label"},{name:"newname",label:t("Rename"),type:"input-name",isSwiftFile:!0,required:!0,maxLength:63}]}}a.Rename=v,(0,s.default)(v,"id","rename"),(0,s.default)(v,"title",t("Rename")),(0,s.default)(v,"policy",p.allCanChangePolicy),(0,s.default)(v,"allowed",(e=>u.default.resolve((0,m.isFile)(e))));var h=(0,d.inject)("rootStore")((0,d.observer)(v));a.default=h}}]);