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

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

1 line
364 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{1194:function(e,a,r){"use strict";var n=r(33),i=r(44),l=r(32),s=r(25),o=r(27),u=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=void 0;var p=f(r(580)),h=f(r(81)),m=f(r(102)),g=f(r(33)),v=f(r(1299)),y=f(r(90)),b=f(r(32)),_=f(r(226)),S=f(r(200)),x=f(r(27)),w=f(r(198)),I=f(r(57)),C=f(r(1233)),k=f(r(3436));r(3442);var D=f(r(1529));r(1227);var P=f(r(418));r(3447);var T=f(r(3450));r(573);var A=f(r(421));r(333);var M=f(r(332)),R=f(r(62)),N=f(r(409)),E=f(r(51)),j=f(r(36)),F=f(r(165)),L=f(r(559)),z=f(r(91)),O=f(r(202)),B=f(r(131)),V=f(r(111)),U=f(r(346)),q=f(r(199)),Q=f(r(0)),G=r(341),K=f(r(4)),H=r(34),W=(r(173),f(r(1530))),Y=r(161),Z=f(r(1228)),J=r(569),X=f(r(1203)),$=f(r(1296)),ee=r(558),te=f(r(3470));function ae(e,t){var a=n(e);if(i){var r=i(e);t&&(r=l(r).call(r,(function(t){return s(e,t).enumerable}))),a.push.apply(a,r)}return a}function re(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)o(a=ae(Object(r),!0)).call(a,(function(t){(0,j.default)(e,t,r[t])}));else if(u)d(e,u(r));else{var n;o(n=ae(Object(r))).call(n,(function(t){c(e,t,s(r,t))}))}}return e}class ne extends Q.default.Component{constructor(e){var a,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e),a=this,(0,j.default)(this,"setRefreshDataTimerTransition",(()=>{this.stopRefreshAuto(),this.dataTimerTransition||(this.dataTimerTransition=(0,p.default)((()=>{this.handleRefresh(),this.dataTimerTransition=null}),1e3*this.dataDurationTransition))})),(0,j.default)(this,"setRefreshDataTimerAuto",(()=>{if(this.stopRefreshTransition(),this.ableAutoFresh){var{autoRefresh:e}=this.state;e&&!this.dataTimerAuto&&(this.dataTimerAuto=(0,p.default)((()=>{this.autoRefreshCount+=1,this.handleRefresh(),this.dataTimerAuto=null}),1e3*this.dataDurationAuto))}})),(0,j.default)(this,"onStopRefreshAuto",(()=>{this.setState({autoRefresh:!1}),this.stopRefreshAuto()})),(0,j.default)(this,"onClickAction",(()=>{this.inAction=!0,this.autoRefreshCount=0})),(0,j.default)(this,"onFinishAction",(()=>{this.inAction=!1,this.handleSelectRowKeys([]),this.handleRefresh(!0)})),(0,j.default)(this,"onCancelAction",(()=>{this.inAction=!1,this.getDataSource()})),(0,j.default)(this,"handleInputFocus",(e=>{this.inAction=e,e||this.setRefreshDataTimerAuto()})),(0,j.default)(this,"fetchListWithTry",function(){var e=(0,E.default)((function*(e){try{e&&(yield e())}catch(e){var{message:r="",data:n,status:i}=(e||{}).response||e||{};if(401===i){var l=t("The session has expired, please log in again.");Z.default.errorWithDetail(null,l)}else if(500===i){var s,o=t("System is error, please try again later."),u=(0,h.default)(s="".concat(t("Get {name} error.",{name:a.name.toLowerCase()})," ")).call(s,o);Z.default.errorWithDetail(null,u)}else{var d={message:n||r||e||"",status:i};Z.default.errorWithDetail(d,t("Get {name} error.",{name:a.name.toLowerCase()}))}a.list.isLoading=!1,a.list.silent=!1}}));return function(t){return e.apply(this,arguments)}}()),(0,j.default)(this,"updateFetchParamsByPage",(e=>e)),(0,j.default)(this,"updateFetchParams",(e=>e)),(0,j.default)(this,"fetchDataByPage",function(){var e=(0,E.default)((function*(e){yield a.store.fetchListByPage(e),a.list.silent=!1}));return function(t){return e.apply(this,arguments)}}()),(0,j.default)(this,"fetchData",function(){var e=(0,E.default)((function*(e){yield a.store.fetchList(e),a.list.silent=!1}));return function(t){return e.apply(this,arguments)}}()),(0,j.default)(this,"fetchDownloadData",function(){var e=(0,E.default)((function*(e){return a.isFilterByBackend?yield a.downloadStore.fetchListByPage(a.updateFetchParamsByPage(e)):yield a.downloadStore.fetchList(a.updateFetchParams(e))}));return function(t){return e.apply(this,arguments)}}()),(0,j.default)(this,"getDownloadData",(0,E.default)((function*(){var e=(0,N.default)({},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{filters:t}=a.state,r=re(re(re(re({},a.props.match.params),e),t),{},{sortKey:e.sortKey||a.isSortByBackend&&a.defaultSortKey||"",sortOrder:e.sortOrder||a.isSortByBackend&&a.defaultSortOrder||""});!a.isAdminPage&&a.fetchDataByCurrentProject?r.project_id=a.currentProjectId:a.isAdminPage&&a.fetchDataByAllProjects&&a.allProjectsKey&&(r[a.allProjectsKey]=!0);var n=yield a.fetchDownloadData(r);return n}))),(0,j.default)(this,"startRefreshAuto",(()=>{this.autoRefreshCount=0,this.setState({autoRefresh:!0}),this.handleRefresh()})),(0,j.default)(this,"stopRefreshAuto",(()=>{clearTimeout(this.dataTimerAuto),this.dataTimerAuto=null})),(0,j.default)(this,"stopRefreshTransition",(()=>{clearTimeout(this.dataTimerTransition),this.dataTimerTransition=null})),(0,j.default)(this,"getFilteredValue",(e=>this.list.filters[e])),(0,j.default)(this,"checkIsProjectFilter",(e=>e.name===this.projectFilterKey)),(0,j.default)(this,"getSearchFilters",(()=>{var e=this.searchFilters;return this.isAdminPage&&this.adminPageHasProjectFilter?(0,m.default)(e).call(e,(e=>this.checkIsProjectFilter(e)))?e:[...e,{label:t("Project ID"),name:this.projectFilterKey}]:e})),(0,j.default)(this,"filterDataByTime",(e=>{if(!this.filterTimeKey)return!0;var{timeFilter:{value:t=0,start:a,end:r}={}}=this.state;if(0===t)return!0;var n=(0,V.default)(e,this.filterTimeKey,0);return 1!==t?(0,J.checkTimeIn)(n,(new Date).getTime()-t,null):(0,J.checkTimeIn)(n,a,r)})),(0,j.default)(this,"checkFilterInclude",(e=>{var t,a=(0,m.default)(t=this.searchFilters).call(t,(t=>t.name===e));return(0,L.default)(a,"include")?a.include:!(0,L.default)(a,"options")})),(0,j.default)(this,"filterData",(e=>{var t;if(!this.filterDataByTime(e))return!1;var{filters:a}=this.state;if(1===(0,g.default)(a).length&&a.keywords){var r,{keywords:n}=a;return!!(0,m.default)(r=(0,v.default)(e)).call(r,(e=>((0,B.default)(e)||(0,z.default)(e))&&(0,y.default)(e).call(e,n)>=0))}return!(0,m.default)(t=(0,g.default)(a)).call(t,(t=>{var r,n=(0,V.default)(e,t),i=a[t],{filterFunc:l}=(0,m.default)(r=this.getSearchFilters()).call(r,(e=>e.name===t));if(l)return!l(n,i,e);var s,o=this.checkFilterInclude(t);return(0,B.default)(n)&&(0,B.default)(i)?o?(0,y.default)(s=n.toLowerCase()).call(s,i.toLowerCase())<0:n.toLowerCase()!==i.toLowerCase():!(0,O.default)(n,i)}))})),(0,j.default)(this,"getDataSource",(()=>{var e,{data:t,filters:a={}}=this.list,{timeFilter:r={}}=this.state,{id:n,tab:i}=a,l=(0,R.default)(a,["id","tab"]),s=[];this.isFilterByBackend?s=(0,H.toJS)(t):(s=(0,b.default)(e=(0,H.toJS)(t)||[]).call(e,(e=>this.filterData(e,(0,H.toJS)(l),(0,H.toJS)(r)))),this.updateList({total:s.length}));return(0,_.default)(s).call(s,(e=>this.itemInTransitionFunction(e)))?this.setRefreshDataTimerTransition():this.setRefreshDataTimerAuto(),this.updateHintsByData(s),this.setTableHeight(),s})),(0,j.default)(this,"getFilters",(()=>{var e,{filters:t}=this.list;return re(re({},(0,G.parse)((0,S.default)(e=this.location.search).call(e,1))),(0,H.toJS)(t))})),(0,j.default)(this,"handleMoreMenuClick",(e=>(t,a)=>{var r,n=(0,m.default)(r=this.enabledItemActions).call(r,(e=>e.key===a));n&&n.onClick&&n.onClick(e)})),(0,j.default)(this,"refreshDetailData",(()=>{var{refreshDetail:e}=this.props;e&&e()})),(0,j.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:n,sortKey:i,sortOrder:l,filters:s}=this.list,o=re(re({page:r,limit:n,sortKey:i,sortOrder:l},(0,H.toJS)(s)),{},{silent:!e});this.handleFetch(o,!0),this.inDetailPage&&(e||this.forceRefreshTopDetailWhenListRefresh)&&this.shouldRefreshDetail&&this.refreshDetailData()}})),(0,j.default)(this,"updateList",(e=>{var t;this.list&&(this.list.update?this.list.update(e):(0,x.default)(t=(0,g.default)(e)).call(t,(t=>{this.list[t]=e[t]})))})),(0,j.default)(this,"getPureParamsByFrontend",(e=>{var t,{page:a,limit:r,sortKey:n,sortOrder:i}=e,l=(0,R.default)(e,["page","limit","sortKey","sortOrder"]),s={page:a,limit:r};if(this.isSortByBackend&&(s.sortKey=n,s.sortOrder=i),!this.searchFilters.length){var{keywords:o}=l,u=(0,R.default)(l,["keywords"]);return re(re({},s),u)}return(0,x.default)(t=(0,g.default)(l)).call(t,(e=>{var t;(0,m.default)(t=this.searchFilters).call(t,(t=>t.name===e))||(s[e]=l[e])})),s})),(0,j.default)(this,"handleFetch",((e,t)=>{if(!t||this.isFilterByBackend){var{sortKey:a,limit:r,page:n,current:i,sortOrder:l}=e;(0,R.default)(e,["sortKey","limit","page","current","sortOrder"]);n===this.list.page&&r===this.list.limit||(this.autoRefreshCount=0),this.isFilterByBackend?this.getDataWithPolicy(re(re({},e),this.list.filters||{})):this.updateList({page:n,limit:r,sortKey:a,sortOrder:l})}else this.getDataWithPolicy(this.getPureParamsByFrontend(e))})),(0,j.default)(this,"handleFetchBySort",(e=>{if(this.isSortByBackend){var t=re(re({},e),{},{page:1});this.handleFetch(t,!0)}else{var{sortKey:a,limit:r,page:n,sortOrder:i}=e;this.updateList({page:n,limit:r,sortKey:a,sortOrder:i})}})),(0,j.default)(this,"handleFilterChange",((e,t)=>{var{page:a,limit:r,sortKey:n,sortOrder:i}=e,l=(0,R.default)(e,["page","limit","sortKey","sortOrder"]);this.isFilterByBackend?(this.list.filters=e,this.setState({timeFilter:t},(()=>{this.handleFetch(e,!0)}))):(this.updateList({page:a,sortKey:n,sortOrder:i,filters:l}),this.setState({filters:l,timeFilter:t}))})),(0,j.default)(this,"handleSelectRowKeys",(e=>{this.store.setSelectRowKeys("list",e),e&&0!==e.length?(this.inSelect=!0,this.autoRefreshCount=0):(this.inSelect=!1,this.getDataSource())})),(0,j.default)(this,"onCloseSuccessHint",(()=>{})),(0,j.default)(this,"getTablePageSize",(e=>{var t=[10,20,50,100],a=this.pageSizeOptions||t;return(0,w.default)(a).call(a,e)?e:a[0]||t[0]})),(0,j.default)(this,"renderMore",((e,t)=>{if((0,q.default)(this.enabledItemActions))return null;var a=this.renderMoreMenu(t);return null===a?null:Q.default.createElement(A.default,{content:a,trigger:"click",placement:"bottomRight"},Q.default.createElement(M.default,{icon:"more",type:"flat"}))})),(0,j.default)(this,"renderMoreMenu",(e=>{var t,a=(0,I.default)(t=this.enabledItemActions).call(t,(t=>((0,U.default)(t.show)?t.show(e):t.show||!0)?Q.default.createElement(P.default.MenuItem,{key:t.key},Q.default.createElement(T.default,{name:t.icon})," ",Q.default.createElement("span",null,t.text)):null));return(0,C.default)(a).call(a,(e=>null===e))?null:Q.default.createElement(P.default,{onClick:this.handleMoreMenuClick(e)},a)})),this.options=n,this.state={filters:{},timeFilter:{},autoRefresh:!0,newHints:!1,tableHeight:this.getTableHeight()},this.dataTimerTransition=null,this.dataTimerAuto=null,this.dataDurationTransition=10,this.dataDurationAuto=30,this.autoRefreshTotalTime=600,this.autoRefreshCount=0,this.autoRefreshCountMax=Math.floor(this.autoRefreshTotalTime/this.dataDurationAuto),this.infoMessage="",this.successMessage="",this.errorMessage="",this.warnMessage="",this.inAction=!1,this.inSelect=!1,this.setTableHeight=(0,k.default)(r=this.setTableHeight).call(r,this),this.debounceSetTableHeight=this.debounceSetTableHeight.call(this),this.init()}componentDidMount(){this.unsubscribe=this.routing.history.subscribe((e=>{if(e.pathname===this.props.match.url&&e.key===this.props.location.key){var t=this.initFilter;if(!this.filterTimeKey){var{limit:a,page:r}=this.store.list;this.list.filters={},this.handleFetch(re(re({},t),{},{limit:a,page:r}),!0)}}})),window.addEventListener("resize",this.debounceSetTableHeight)}componentDidUpdate(e){if(this.inDetailPage){var{detail:t}=e,{detail:a}=this.props;(0,q.default)(t)||(0,q.default)(a)||(0,O.default)(t,a)||this.handleRefresh(!0)}}componentWillUnmount(){this.unsubscribe&&this.unsubscribe(),this.disposer&&this.disposer(),this.unMountActions&&this.unMountActions(),this.stopRefreshTransition(),this.stopRefreshAuto(),this.clearListUnmount&&this.store.clearData&&this.store.clearData("listUnmount"),window.removeEventListener("resize",this.debounceSetTableHeight)}get policy(){return""}get aliasPolicy(){return""}get name(){return""}get title(){return"".concat(this.name,"s")}get className(){return""}get path(){var{location:{pathname:e=""}={}}=this.props;return e||""}get inDetailPage(){var{detail:e}=this.props;return!!e}get detailName(){if(!this.inDetailPage)return"";var{detailName:e}=this.props;return e}get shouldRefreshDetail(){return!0}get location(){return this.props.location}get isAdminPage(){var{pathname:e}=this.location;return(0,Y.isAdminPage)(e)}get hasAdminRole(){return this.props.rootStore.hasAdminRole}getRouteName(e){return this.isAdminPage?"".concat(e,"Admin"):e}getRoutePath(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRouteName(e);return(0,ee.getPath)({key:r,params:t,query:a})}getLinkRender(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=this.getRouteName(e);return(0,ee.getLinkRender)({key:n,params:a,query:r,value:t})}get prefix(){return this.props.match.url}get params(){return this.props.match.params||{}}get routing(){return this.props.rootStore.routing}get list(){return this.store.list}get isLoading(){return this.list.isLoading||this.store.isSubmitting}get tips(){return[]}get rowKey(){return"id"}get hasTab(){return!1}get hasSubTab(){return!1}get hideCustom(){return!1}get hideSearch(){return!1}get hideRefresh(){return!1}get hideDownload(){return!1}get checkEndpoint(){return!1}get endpoint(){return""}get endpointError(){return this.checkEndpoint&&!this.endpoint}get initFilter(){var e;return(0,G.parse)((0,S.default)(e=this.location.search).call(e,1))||{}}get hintHeight(){var e=0;return this.infoMessage&&(e+=50),this.warnMessage&&(e+=50),this.errorMessage&&(e+=50),this.successMessage&&(e+=50),e}get tableTopHeight(){var e=document.getElementById("sl-table-header-search"),t=90+(e?e.scrollHeight:50)+16;return this.hasSubTab?t+88:this.hasTab?t+44:t}getTableHeight(){var e=window.innerHeight;if(this.inDetailPage)return-1;var t=document.getElementsByClassName("ant-table-header")[0],a=t?t.offsetHeight:51,r=e-this.tableTopHeight-this.hintHeight-50-a;return r>0?r:1}get tableWidth(){return 800}get isFilterByBackend(){return!1}get isSortByBackend(){return!1}get ableSkipPageByBackend(){return!1}get enabledItemActions(){var e;return(0,b.default)(e=this.itemActions).call(e,(e=>!e.action))}get adminPageHasProjectFilter(){return!1}get transitionStatusList(){return[]}get fetchDataByAllProjects(){return!0}get currentUser(){var{user:e}=this.props.rootStore||{};return e||{}}get currentProjectId(){return this.props.rootStore.projectId}get fetchDataByCurrentProject(){return!1}get defaultSortKey(){return""}get defaultSortOrder(){return"descend"}get clearListUnmount(){return!1}get itemInTransitionFunction(){return e=>{var t,{status:a}=e;return(0,y.default)(t=this.transitionStatusList).call(t,a)>=0}}get ableAutoFresh(){return!0}get actionConfigs(){return{batchActions:[],primaryActions:[],rowActions:[]}}get primaryActions(){return this.actionConfigs.primaryActions}get batchActions(){return this.actionConfigs.batchActions}get itemActions(){return this.actionConfigs.rowActions}get searchFilters(){return[]}get expandable(){}get filterTimeKey(){}get projectFilterKey(){return"project_id"}get pageSizeOptions(){return[10,20,50,100]}get hideTotal(){return!1}get primaryActionsExtra(){return null}get allProjectsKey(){return"all_projects"}get forceRefreshTopDetailWhenListRefresh(){return!1}getEmptyProps(){return{}}getEnabledTableProps(){var e=this.getTableProps();return(0,q.default)(this.batchActions)&&(e.onSelectRowKeys=null),e}getCheckboxProps(e){return{disabled:!1,name:e.name}}getBaseTableProps(){var{keyword:e,selectedRowKeys:a,total:r,page:n,limit:i,silent:l,sortKey:s,sortOrder:o,timerFilter:u}=this.list,d={total:r,current:Number(n),pageSize:this.getTablePageSize(i),showTotal:e=>t("Total {total} items",{total:e}),showSizeChanger:!0};this.pageSizeOptions&&(d.pageSizeOptions=this.pageSizeOptions);var{autoRefresh:c,tableHeight:f}=this.state;return re({resourceName:this.name,detailName:this.detailName,data:this.getDataSource(),columns:this.getColumns(),filters:this.getFilters(),timerFilter:u,searchFilters:this.getSearchFilters(),keyword:e,pagination:d,primaryActions:this.primaryActions,batchActions:this.batchActions,itemActions:this.itemActions,getCheckboxProps:this.getCheckboxProps,isLoading:this.isLoading,silentLoading:l,rowKey:this.rowKey,selectedRowKeys:(0,H.toJS)(a),scrollY:f,sortKey:s,sortOrder:o,defaultSortKey:this.defaultSortKey,defaultSortOrder:this.defaultSortOrder,getDownloadData:this.getDownloadData,containerProps:this.props,expandable:this.expandable,showTimeFilter:!!this.filterTimeKey,filterTimeDefaultValue:this.filterTimeDefaultValue,isPageByBack:this.isFilterByBackend,isSortByBack:this.isSortByBackend,ableSkipPageByBackend:this.ableSkipPageByBackend,autoRefresh:c,startRefreshAuto:this.startRefreshAuto,stopRefreshAuto:this.onStopRefreshAuto,onClickAction:this.onClickAction,onFinishAction:this.onFinishAction,onCancelAction:this.onCancelAction,dataDurationAuto:this.dataDurationAuto,handleInputFocus:this.handleInputFocus,hideTotal:this.hideTotal,hideDownload:this.hideDownload,primaryActionsExtra:this.primaryActionsExtra,isAdminPage:this.isAdminPage,initFilter:this.initFilter},this.getEnabledTableProps())}getTableProps(){return{onRefresh:this.handleRefresh,onFetch:this.handleFetch,onFetchBySort:this.handleFetchBySort,onSelectRowKeys:this.handleSelectRowKeys,onFilterChange:this.handleFilterChange,hideCustom:this.hideCustom,hideSearch:this.hideSearch,hideRefresh:this.hideRefresh,hideAutoRefresh:!this.ableAutoFresh}}getData(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{silent:t}=e,a=(0,R.default)(e,["silent"]);t&&(this.list.silent=!0);var r=re(re(re({},this.props.match.params),a),{},{sortKey:a.sortKey||this.isSortByBackend&&this.defaultSortKey||"",sortOrder:a.sortOrder||this.isSortByBackend&&this.defaultSortOrder||""});if(!this.isAdminPage&&this.fetchDataByCurrentProject?r.project_id=this.currentProjectId:this.isAdminPage&&this.fetchDataByAllProjects&&this.allProjectsKey&&(r[this.allProjectsKey]=!0),this.isFilterByBackend){var{limit:n}=r;n&&(r.limit=this.getTablePageSize(n)),this.fetchListWithTry((()=>this.fetchDataByPage(this.updateFetchParamsByPage(r))))}else this.fetchListWithTry((()=>this.fetchData(this.updateFetchParams(r))))}getDataWithPolicy(e){if(this.currentUser&&!(0,q.default)(this.currentUser)&&!this.endpointError){if(!(0,X.default)({policy:this.policy,aliasPolicy:this.aliasPolicy,actionName:this.name})){var a={message:t("You don't have access to get {name}.",{name:this.name.toLowerCase()}),status:401};return Z.default.errorWithDetail(a,t("Unable to get {name}.",{name:this.name.toLowerCase()})),this.list.isLoading=!1,void(this.list.silent=!1)}this.getData(e)}}setTableHeight(){if(!this.inAction){var e=this.getTableHeight(),{tableHeight:t}=this.state;e!==t&&this.setState({tableHeight:e})}}getColumns(){return[]}debounceSetTableHeight(){return(0,F.default)(this.setTableHeight,1e3)}updateHintsByOthers(){this.updateHints&&(this.updateHints(),(0,p.default)(this.setTableHeight,0),this.setState({newHints:!0}))}updateHintsByData(e){}init(){this.store={list:{}},this.downloadStore={}}renderTable(){try{var e=this.getBaseTableProps();return Q.default.createElement(W.default,e)}catch(e){var t=this.getRoutePath("overview");return Q.default.createElement($.default,{title:this.name,link:t,codeError:!0})}}renderInfoHint(){return this.infoMessage?Q.default.createElement(D.default,{message:this.infoMessage,type:"info",showIcon:!0,className:te.default.hint}):null}renderSuccessHint(){return this.successMessage?Q.default.createElement(D.default,{message:this.successMessage,type:"success",showIcon:!0,closable:!0,className:te.default.hint,onClose:this.onCloseSuccessHint}):null}renderWarnHint(){return this.warnMessage?Q.default.createElement(D.default,{message:this.warnMessage,type:"warning",showIcon:!0,className:te.default.hint}):null}renderErrorHint(){return this.errorMessage?Q.default.createElement(D.default,{message:this.errorMessage,type:"error",showIcon:!0,closable:!0,className:te.default.hint}):null}renderHint(){var{newHints:e}=this.state;return e||this.infoMessage||this.warnMessage||this.successMessage||this.errorMessage?Q.default.createElement("div",{className:(0,K.default)(te.default.hints,"list-hints")},this.renderInfoHint(),this.renderSuccessHint(),this.renderWarnHint(),this.renderErrorHint()):null}renderHeader(){return null}render(){if(this.endpointError){var e=this.getRoutePath("overview");return Q.default.createElement($.default,{title:this.name,link:e,endpointError:!0})}var t=this.renderTable();return Q.default.createElement("div",{className:(0,K.default)(te.default.wrapper,"list-container",this.className)},this.renderHeader(),this.renderHint(),t)}}a.default=ne},1195:function(e,a,r){"use strict";var n=r(33),i=r(44),l=r(32),s=r(25),o=r(27),u=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.isBootFromVolume=a.allowAttachInterfaceStatus=a.SimpleTag=a.actionColumn=a.actionEvent=a.actionMap=a.instanceStatusFilter=a.allowAttachVolumeInstance=a.canCreateIronicByEndpoint=a.instanceSelectTablePropsBackend=a.instanceSortProps=a.instanceFilters=a.instanceColumnsBackend=a.isIronicInstance=a.physicalNodeTypes=a.getIpInitValue=a.getUserData=a.hasRootVolume=a.isIsoInstance=a.isNotError=a.isPaused=a.isStopped=a.isActive=a.isShutOff=a.isActiveOrShutOff=a.isNotLockedOrAdmin=a.checkStatus=a.lockRender=a.isLocked=a.isNotDeleting=a.isNotLocked=a.isBuilding=a.instanceStatus=a.powerStatus=a.taskStatus=a.stableStatus=a.transitionStatus=void 0;var p=f(r(198)),h=f(r(102)),m=f(r(57)),g=f(r(200));r(1266);var v=f(r(1267)),y=f(r(36));r(411);var b=f(r(227)),_=f(r(199)),S=f(r(0)),x=f(r(584)),w=(r(173),r(1533)),I=r(76),C=r(334),k=f(r(1534)),D=f(r(3472)),P=f(r(3473));function T(e,t){var a=n(e);if(i){var r=i(e);t&&(r=l(r).call(r,(function(t){return s(e,t).enumerable}))),a.push.apply(a,r)}return a}function A(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)o(a=T(Object(r),!0)).call(a,(function(t){(0,y.default)(e,t,r[t])}));else if(u)d(e,u(r));else{var n;o(n=T(Object(r))).call(n,(function(t){c(e,t,s(r,t))}))}}return e}var M=S.default.createElement(b.default,{title:t("The instance has been locked. If you want to do more, please unlock it first.")},S.default.createElement("img",{src:D.default,alt:"lock",style:{width:"12px"}})),R=S.default.createElement("img",{src:P.default,alt:"unlock",style:{width:"12px"}}),N={build:t("Build"),building:t("Building"),stopped:t("Stopped"),recovering:t("Recovering"),rescued:t("Rescued"),resized:t("Resized"),scheduling:t("Scheduling"),reboot:t("Reboot"),hard_reboot:t("Hard Reboot"),migrating:t("Migrating")};a.transitionStatus=N;var E={deleted:t("Deleted"),active:t("Active"),shutoff:t("Shutoff"),paused:t("Paused"),error:t("Error"),resize:t("Resizing or Migrating"),verify_resize:t("Resizing or Migrating"),revert_resize:t("Revert Resize/Migrate"),password:t("Password"),rebuild:t("Rebuild"),rescue:t("Rescue"),"soft-delete":t("Soft Deleted"),soft_deleted:t("Soft Deleted"),shelved:t("Shelved"),shelved_offloaded:t("Shelved Offloaded"),suspended:t("Suspended"),stopped:t("Shutoff")};a.stableStatus=E;var j={null:t("No Task"),scheduling:t("Scheduling"),block_device_mapping:t("Block Device Mapping"),networking:t("Networking"),spawning:t("Spawning"),image_snapshot:t("Snapshotting"),image_snapshot_pending:t("Image Snapshot Pending"),image_pending_upload:t("Image Pending Upload"),image_uploading:t("Image Uploading"),image_backup:t("Image Backup"),updating_password:t("Updating Password"),resize_prep:t("Resizing or Migrating"),resize_migrating:t("Resizing or Migrating"),resize_migrated:t("Resizing or Migrating"),resize_finish:t("Resizing or Migrating"),resize_reverting:t("Reverting Resize or Migrate"),resize_confirming:t("Confirming Resize or Migrate"),rebooting:t("Rebooting"),reboot_pending:t("Rebooting"),reboot_started:t("Rebooting"),rebooting_hard:t("Hard Rebooting"),reboot_pending_hard:t("Hard Rebooting"),reboot_started_hard:t("Hard Rebooting"),pausing:t("Pausing"),unpausing:t("Resuming"),suspending:t("Suspending"),resuming:t("Resuming"),"powering-off":t("Powering Off"),"powering-on":t("Powering On"),rescuing:t("Rescuing"),unrescuing:t("Unrescuing"),rebuilding:t("Rebuilding"),rebuild_block_device_mapping:t("Rebuild Block Device Mapping"),rebuild_spawning:t("Rebuild Spawning"),migrating:t("Migrating"),deleting:t("Deleting"),"soft-deleting":t("Soft Deleting"),restoring:t("Restoring"),shelving:t("Shelving"),shelving_image_pending_upload:t("Shelving Image Pending Upload"),shelving_image_uploading:t("Shelving Image Uploading"),shelving_offloading:t("Shelving Offloading"),unshelving:t("Unshelving")};a.taskStatus=j;var F={"NO STATE":t("No State"),RUNNING:t("Running"),BLOCKED:t("Blocked"),PAUSED:t("Paused"),SHUTDOWN:t("Shut Down"),SHUTOFF:t("Shut Off"),CRASHED:t("Crashed"),SUSPENDED:t("Suspended"),FAILED:t("Failed"),BUILDING:t("Building")};a.powerStatus=F;var L=A(A(A(A({},N),E),j),F);a.instanceStatus=L;a.isBuilding=e=>"build"===e.status;var z=e=>!e.locked;a.isNotLocked=z;var O=e=>!e.task_state||"deleting"!==e.task_state.toLowerCase();a.isNotDeleting=O;var B=e=>!!e.locked;a.isLocked=B;var V=e=>e?M:R;a.lockRender=V;var U=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],{status:r,vm_state:n}=t;return(0,p.default)(e).call(e,r.toLowerCase())||a&&n&&(0,p.default)(e).call(e,n.toLowerCase())};a.checkStatus=U;a.isNotLockedOrAdmin=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!B(e)||t};a.isActiveOrShutOff=e=>U(["active","shutoff"],e);a.isShutOff=e=>U(["shutoff"],e);a.isActive=e=>U(["active"],e);a.isStopped=e=>U(["stopped"],e);a.isPaused=e=>U(["paused"],e);a.isNotError=e=>!U(["error"],e);a.isIsoInstance=e=>{var{iso_server:t=!1}=e;return t};a.hasRootVolume=e=>{var{root_device_name:t="/dev/vda",volumes_attached:a=[]}=e;return!!(0,h.default)(a).call(a,(e=>e.is_root_volume||e.device===t))};var q='Content-Type: multipart/mixed; boundary="===============2309984059743762475=="\nMIME-Version: 1.0\n\n--===============2309984059743762475==\nContent-Type: text/cloud-config; charset="us-ascii" \nMIME-Version: 1.0\nContent-Transfer-Encoding: 7bit\nContent-Disposition: attachment; filename="ssh-pwauth-script.txt" \n\n#cloud-config\ndisable_root: false\nssh_pwauth: true\npassword: USER_PASSWORD\n\n--===============2309984059743762475==\nContent-Type: text/x-shellscript; charset="us-ascii" \nMIME-Version: 1.0\nContent-Transfer-Encoding: 7bit\nContent-Disposition: attachment; filename="passwd-script.txt" \n\n#!/bin/sh\necho \'root:USER_PASSWORD\' | chpasswd\n\n--===============2309984059743762475==\nContent-Type: text/x-shellscript; charset="us-ascii" \nMIME-Version: 1.0\nContent-Transfer-Encoding: 7bit\nContent-Disposition: attachment; filename="init-shell.txt" \n\nUSER_DATA\n\n--===============2309984059743762475==--',Q='Content-Type: multipart/mixed; boundary="===============2309984059743762475==" \nMIME-Version: 1.0\n\n--===============2309984059743762475==\nContent-Type: text/cloud-config; charset="us-ascii" \nMIME-Version: 1.0\nContent-Transfer-Encoding: 7bit\nContent-Disposition: attachment; filename="ssh-pwauth-script.txt" \n\n#cloud-config\ndisable_root: false\nssh_pwauth: true\npassword: USER_PASSWORD\n\n--===============2309984059743762475==\nContent-Type: text/x-shellscript; charset="us-ascii" \nMIME-Version: 1.0\nContent-Transfer-Encoding: 7bit\nContent-Disposition: attachment; filename="passwd-script.txt" \n\n#!/bin/sh\necho \'root:USER_PASSWORD\' | chpasswd\n\n--===============2309984059743762475==--',G='Content-Type: multipart/mixed; boundary="===============2309984059743762475==" \nMIME-Version: 1.0\n\n--===============2309984059743762475==\nContent-Type: text/x-shellscript; charset="us-ascii" \nMIME-Version: 1.0\nContent-Transfer-Encoding: 7bit\nContent-Disposition: attachment; filename="init-shell.txt" \n\nUSER_DATA\n\n--===============2309984059743762475==--';a.getUserData=(e,t)=>e&&t?q.replace(/USER_PASSWORD/g,e).replace(/USER_DATA/g,t):e?Q.replace(/USER_PASSWORD/g,e):G.replace(/USER_DATA/g,t);a.getIpInitValue=e=>{if(!e)return null;var{start:t}=e.allocation_pools[0];return t};var K=[{label:t("Smart Scheduling"),value:"smart"},{label:t("Manually Specify"),value:"manually"}];a.physicalNodeTypes=K;var H=e=>{var{flavor_info:{extra_specs:t={}}={}}=e;return"bare_metal"===t[":architecture"]};a.isIronicInstance=H;var W=[{title:t("Name"),dataIndex:"name",sortKey:"display_name"},{title:t("Image"),sorter:!1,dataIndex:"image_os_distro",render:(e,t)=>S.default.createElement(x.default,{type:e,title:t.image_name})},{title:t("Fixed IP"),dataIndex:"fixed_addresses",width:120,sorter:!1,render:e=>e&&e.length?(0,m.default)(e).call(e,(e=>S.default.createElement("span",{key:e},e,S.default.createElement("br",null)))):"-"},{title:t("Floating IP"),dataIndex:"floating_addresses",width:120,sorter:!1,render:e=>e&&e.length?(0,m.default)(e).call(e,(e=>S.default.createElement("span",{key:e},e,S.default.createElement("br",null)))):"-"},{title:t("Flavor"),dataIndex:"flavor",sorter:!1},{title:t("Status"),dataIndex:"status",sorter:!1,render:e=>L[e&&e.toLowerCase()]||"-"},{title:t("Locked"),dataIndex:"locked",isHideable:!0,render:V},{title:t("Created At"),dataIndex:"created_at",valueRender:"sinceTime"}];a.instanceColumnsBackend=W;var Y=[{label:t("Name"),name:"name"}];a.instanceFilters=Y;var Z={isSortByBack:!0,defaultSortKey:"created_at",defaultSortOrder:"descend"};a.instanceSortProps=Z;var J=A(A({},Z),{},{filterParams:Y,columns:W});a.instanceSelectTablePropsBackend=J;a.canCreateIronicByEndpoint=()=>(0,I.ironicOriginEndpoint)();a.allowAttachVolumeInstance=e=>U(["active","paused","stopped","resized","soft-delete","shelved","shelved_offloaded"],e)&&O(e)&&z(e)&&!H(e);var X={label:t("Status"),name:"status",options:[{label:t("Active"),key:"ACTIVE"},{label:t("Building"),key:"BUILD"},{label:t("Paused"),key:"PAUSED"},{label:t("Suspended"),key:"SUSPENDED"},{label:t("Error"),key:"ERROR"},{label:t("Shutoff"),key:"SHUTOFF"},{label:t("Shelved Offloaded"),key:"SHELVED_OFFLOADED"}]};a.instanceStatusFilter=X;var $={attach_interface:t("Attach Interface"),detach_interface:t("Detach Interface"),attach_volume:t("Attach Volume"),detach_volume:t("Detach Volume"),create:t("Create"),stop:t("Stop"),reboot:t("Reboot"),suspend:t("Suspend"),resume:t("Resume"),shelve:t("Shelve"),unshelve:t("Unshelve"),start:t("Start"),lock:t("Lock"),unlock:t("Unlock"),pause:t("Pause"),unpause:t("Unpause"),createImage:t("Create Snapshot"),resize:t("Extend Root Volume"),confirmResize:t("Resize"),"live-resize":t("Online Resize"),extend_volume:t("Extend Volume"),changePassword:t("Change Password"),rebuild:t("Rebuild"),migrate:t("Migrate"),"live-migration":t("Live Migrate"),delete:t("Delete"),restore:t("Recover")};a.actionMap=$;var ee={compute_restore_instance:t("Resume Instance"),compute_soft_delete_instance:t("Soft Delete Instance"),compute_post_live_migration_at_destination:t("Live Migration At Destination"),compute_pre_live_migration:t("Pre Live Migration"),compute_live_migration:t("Compute Live Migration"),compute_check_can_live_migrate_source:t("Check Can Live Migrate Source"),compute_check_can_live_migrate_destination:t("Check Can Live Migrate Destination"),conductor_live_migrate_instance:t("Conductor Live Migrate Instance"),compute_confirm_resize:t("Resized"),compute_finish_resize:t("Finish Resize"),compute_resize_instance:t("Resize Instance"),compute_prep_resize:t("Prep Resize"),cold_migrate:t("Cold Migrate"),conductor_migrate_server:t("Conductor Migrate Server"),compute_rebuild_instance:t("Rebuild Instance"),rebuild_server:t("Rebuild Instance"),compute_set_admin_password:t("Set Admin Password"),compute_extend_volume:t("Extend Volume"),compute_live_resize_instance:t("Compute Live Resize Instance"),conductor_live_resize_instance:t("Conductor Live Resize Instance"),api_snapshot_instance:t("Snapshot Instance"),api_lock:t("Lock"),api_unlock:t("Unlock"),compute_detach_volume:t("Detach Volume"),compute_attach_volume:t("Attach Volume"),compute_detach_interface:t("Detach Interface"),compute_attach_interface:t("Attach Interface"),compute__do_build_and_run_instance:t("Do Build And Run Instance"),compute_suspend_instance:t("Compute Suspend Instance"),compute_start_instance:t("Compute Start Instance"),compute_stop_instance:t("Compute Stop Instance"),compute_resume_instance:t("Compute Resume Instance"),compute_pause_instance:t("Compute Pause Instance"),compute_unpause_instance:t("Compute Unpause Instance"),compute_reboot_instance:t("Compute Reboot Instance")};a.actionEvent=ee;a.actionColumn=e=>[{title:t("Operation Name"),dataIndex:"action",valueMap:$},{title:t("Project ID/Name"),dataIndex:"project_name",isHideable:!0,hidden:!e.isAdminPage},{title:t("Operation Time"),dataIndex:"start_time",valueRender:"toLocalTimeMoment"},{title:t("Request ID"),dataIndex:"request_id",isHideable:!0,render:(e,t)=>S.default.createElement(S.default.Fragment,null,S.default.createElement("span",null,e),S.default.createElement(k.default,{id:t.instance_uuid,requestId:e,store:new w.ActionLogStore,actionEvent:ee}))},{title:t("User ID"),dataIndex:"user_id",isHideable:!0,hidden:!e.isAdminPage,render:t=>e.getLinkRender("userDetail",t,{id:t},null)}];a.SimpleTag=e=>{var{tag:t,index:a}=e,r=t.length>20,n=r?"".concat((0,g.default)(t).call(t,0,20),"..."):t,i=S.default.createElement(v.default,{key:t,color:C.projectTagsColors[a%10],style:{marginTop:2,marginBottom:2}},S.default.createElement("span",{style:{whiteSpace:"pre-wrap"}},n));return r?S.default.createElement(b.default,{key:t,title:S.default.createElement("span",{style:{whiteSpace:"pre-wrap"}},t)},i):i};a.allowAttachInterfaceStatus=["active","paused","stopped"];a.isBootFromVolume=e=>{var{origin_data:t}=e||{};return t&&!(0,_.default)(t)?!t.image:!e.image}},1200:function(e,a,r){"use strict";var n=r(33),i=r(44),l=r(32),s=r(25),o=r(27),u=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=void 0;var p=f(r(198)),h=f(r(200)),m=f(r(102)),g=f(r(57)),v=f(r(32)),y=f(r(90)),b=f(r(81));r(1260);var _=f(r(1261)),S=f(r(409)),x=f(r(1273));r(333);var w=f(r(332));r(1250);var I=f(r(1251)),C=f(r(1379)),k=f(r(596));r(1270);var D=f(r(1271)),P=f(r(36)),T=f(r(111)),A=f(r(199)),M=f(r(0)),R=r(341),N=f(r(4)),E=r(161),j=(r(173),r(555),f(r(1296))),F=f(r(3537)),L=f(r(1228)),z=r(34),O=f(r(1203)),B=f(r(1249)),V=r(334),U=r(558),q=r(578),Q=f(r(3540));function G(e,t){var a=n(e);if(i){var r=i(e);t&&(r=l(r).call(r,(function(t){return s(e,t).enumerable}))),a.push.apply(a,r)}return a}function K(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)o(a=G(Object(r),!0)).call(a,(function(t){(0,P.default)(e,t,r[t])}));else if(u)d(e,u(r));else{var n;o(n=G(Object(r))).call(n,(function(t){c(e,t,s(r,t))}))}}return e}class H extends M.default.Component{constructor(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e),(0,P.default)(this,"onCollapsedCallback",(()=>{})),(0,P.default)(this,"handleChangeTab",(e=>{this.handleFetch({tab:e},!0)})),(0,P.default)(this,"handleFetch",((e,t)=>{this.routing.query(e,t)})),(0,P.default)(this,"handleDetailInfo",(()=>{var{collapsed:e}=this.state;this.setState({collapsed:!e},(()=>{this.onCollapsedCallback(!e)}))})),(0,P.default)(this,"getDesc",((e,t)=>{var{dataIndex:a,render:r,valueRender:n,valueMap:i,unit:l}=t,s=(0,T.default)(e,a);if(r)return r(s,e);if(n){var o=E.renderFilterMap[n];return o&&o(s)}return i?(0,q.getValueMapRender)(t)(s):l?(0,q.getUnitRender)(t)(s):void 0===s||""===s?"-":s})),(0,P.default)(this,"fetchData",((e,t)=>{if(this.store.fetchDetail){var a=K(K(K({},this.params),e||{}),{},{all_projects:this.isAdminPage,silent:t}),r=this.updateFetchParams(a);this.store.fetchDetail(r).catch(this.catch)}})),(0,P.default)(this,"getRouteProps",(()=>({}))),(0,P.default)(this,"fetchDataWithPolicy",((e,a)=>{if((0,O.default)({policy:this.policy,aliasPolicy:this.aliasPolicy,actionName:this.name}))this.fetchData(a,e);else{var r={message:t("You don't have access to get {name}.",{name:this.name.toLowerCase()}),status:401};L.default.errorWithDetail(r,t("Unable to get {name} detail.",{name:this.name.toLowerCase()}))}})),(0,P.default)(this,"refreshDetailByTab",(()=>{this.fetchDataWithPolicy(!0)})),(0,P.default)(this,"refreshDetailByAction",(e=>{this.fetchDataWithPolicy(e)})),(0,P.default)(this,"handleRefresh",(()=>{this.fetchDataWithPolicy(!1)})),(0,P.default)(this,"catch",(e=>{var{data:a,status:r}=(e||{}).response||e||{};if(401===r){var n=t("The session has expired, please log in again.");L.default.errorWithDetail(null,n)}else if(404===r)this.setState({notFound:!0}),L.default.warn(t("{name} {id} could not be found.",{name:this.name.toLowerCase(),id:this.id}));else{var i={message:a,status:r};L.default.errorWithDetail(i,t("Get {name} detail error.",{name:this.name.toLowerCase()}))}})),(0,P.default)(this,"goBack",(()=>{this.routing.push(this.listUrl)})),(0,P.default)(this,"updateFetchParams",(e=>e)),(0,P.default)(this,"onFinishAction",((e,t,a)=>{if(e&&a)this.goBack();else{var r,n=!(0,p.default)(r=this.forceLoadingTabs).call(r,this.tab.key);this.refreshDetailByAction(n)}})),this.options=a,this.state={notFound:!1,collapsed:!1},this.init()}componentDidMount(){this.fetchDataWithPolicy()}componentDidUpdate(e){var{id:t}=e.match.params;this.id!==t&&this.handleRefresh(!0)}get params(){return this.props.match.params||{}}get id(){return this.props.match.params.id}get policy(){return""}get aliasPolicy(){return""}get name(){return""}get routing(){return this.props.rootStore.routing}get path(){var{location:{pathname:e=""}={}}=this.props;return e||""}get isAdminPage(){var{pathname:e}=this.props.location;return(0,E.isAdminPage)(e)}getRouteName(e){return this.isAdminPage?"".concat(e,"Admin"):e}getRoutePath(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRouteName(e);return(0,U.getPath)({key:r,params:t,query:a})}getLinkRender(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=this.getRouteName(e);return(0,U.getLinkRender)({key:n,params:a,query:r,value:t})}get tabs(){return[]}get tab(){var e,t;if(0===this.tabs.length)return null;var a=(0,R.parse)((0,h.default)(e=this.routing.location.search).call(e,1)),{tab:r}=a;return(0,m.default)(t=this.tabs).call(t,(e=>e.key===r))||this.tabs[0]}get actionConfigs(){return V.emptyActionConfig}get rowActions(){return[]}get detailTabs(){return[{title:"tab1",key:"tab1",component:null},{title:"tab2",key:"tab2",component:null}]}get titleLabel(){return"ID:"}get titleValue(){return this.params.id}get detailTitle(){var{collapsed:e}=this.state,{Paragraph:a}=D.default,r=e?M.default.createElement(k.default,null):M.default.createElement(C.default,null);return M.default.createElement("div",null,M.default.createElement("span",{className:Q.default["title-label"]},this.titleLabel),M.default.createElement("span",{className:Q.default["header-title"]},M.default.createElement(a,{style:{display:"inherit"},copyable:!0},this.titleValue)),M.default.createElement(I.default,{type:"vertical",className:Q.default["header-divider"]}),M.default.createElement(w.default,{onClick:this.goBack,type:"link"},t("Back")),M.default.createElement(w.default,{type:"link",icon:M.default.createElement(x.default,null),onClick:this.handleRefresh}),M.default.createElement(w.default,{onClick:this.handleDetailInfo,icon:r,type:"link",className:Q.default["header-button"]}))}get className(){return""}get listUrl(){return""}get detailData(){return(0,z.toJS)(this.store.detail)||{}}get isLoading(){return this.store.isLoading}get detailInfos(){return[]}get forceLoadingTabs(){return[]}getActionData(){return this.detailData}init(){this.store={detail:{},isLoading:!0}}renderDetailInfos(){var e,t,{Paragraph:a}=D.default,{collapsed:r}=this.state;if((0,A.default)(this.detailData))return M.default.createElement(F.default,{title:this.detailTitle,descriptions:[],loading:this.isLoading});var n=r?[]:(0,g.default)(e=(0,v.default)(t=this.detailInfos).call(t,(e=>!e.hidden))).call(e,(e=>{var t,r,n,{title:i,dataIndex:l,copyable:s}=e;this.isLoading||!this.detailData||(0,A.default)(this.detailData)?t="-":"-"!==(t=this.getDesc(this.detailData,e))&&(s||0===(0,y.default)(r=l.toLowerCase()).call(r,"id")||(0,y.default)(n=l.toLowerCase()).call(n,"_id")>=0)&&(t=M.default.createElement(a,{style:{margin:0},copyable:s},t));return{label:i,content:t}}));return M.default.createElement(F.default,{title:this.detailTitle,descriptions:n,loading:this.isLoading})}renderTabComponent(e){var t,{component:a,key:r}=e;return a?M.default.createElement(e.component,(0,S.default)({},this.props,{detail:this.detailData,detailName:(0,b.default)(t="".concat(this.name,"-")).call(t,this.id),refreshDetail:this.refreshDetailByTab})):M.default.createElement("span",null,r)}renderTab(e,t){return e!==t.key?M.default.createElement(_.default.TabPane,{tab:t.title,key:t.key}):M.default.createElement(_.default.TabPane,{tab:t.title,key:t.key},this.renderTabComponent(t))}renderTabs(){var e;if((0,A.default)(this.detailData)||this.isLoading)return null;if(!this.tab)return null;var t=(0,g.default)(e=this.tabs).call(e,(e=>this.renderTab(this.tab.key,e)));return M.default.createElement("div",{className:(0,N.default)(Q.default["tab-wrapper"],this.className)},M.default.createElement(_.default,{activeKey:this.tab.key,onChange:this.handleChangeTab},t))}renderActions(){var e=this.getActionData();return(0,A.default)(e)||this.store.isLoading?null:M.default.createElement(B.default,{actions:this.actionConfigs.rowActions||this.actions,onFinishAction:this.onFinishAction,item:this.getActionData(),containerProps:{isAdminPage:this.isAdminPage},isAdminPage:this.isAdminPage})}render(){return this.state.notFound?M.default.createElement(j.default,{title:this.name,link:this.listUrl,goList:!0}):M.default.createElement("div",{className:(0,N.default)(Q.default.main,this.className,"detail-main")},M.default.createElement("div",{className:Q.default["action-wrapper"]},this.renderActions()),M.default.createElement("div",{className:Q.default.header},this.renderDetailInfos()),M.default.createElement("div",{className:Q.default.tabs},this.renderTabs()))}}a.default=H},1202:function(e,t,a){"use strict";var r=a(33),n=a(44),i=a(32),l=a(25),s=a(27),o=a(45),u=a(46),d=a(19),c=a(21);d(t,"__esModule",{value:!0}),t.default=void 0;var f=c(a(57)),p=c(a(36)),h=c(a(559)),m=c(a(0)),g=c(a(4)),v=c(a(3582)),y=a(34),b=a(161),_=a(558),S=c(a(3585));function x(e,t){var a=r(e);if(n){var s=n(e);t&&(s=i(s).call(s,(function(t){return l(e,t).enumerable}))),a.push.apply(a,s)}return a}class w extends m.default.Component{constructor(e){super(e),(0,p.default)(this,"fetchData",(e=>{this.shouldFetchDetail&&this.store.fetchDetail&&this.store.fetchDetail(function(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)s(a=x(Object(r),!0)).call(a,(function(t){(0,p.default)(e,t,r[t])}));else if(o)u(e,o(r));else{var n;s(n=x(Object(r))).call(n,(function(t){d(e,t,l(r,t))}))}}return e}({id:this.id},e)).catch(this.catch)})),this.init()}componentDidMount(){this.fetchData()}get id(){var{id:e}=this.props.match.params;return e}get currentUser(){var{user:e}=this.props.rootStore||{};return e||{}}get currentProjectId(){return this.props.rootStore.projectId}get projectId(){var{project_id:e,tenant_id:t,owner:a,owner_id:r}=this.detailData;return e||t||a||r}get isMyResource(){return this.projectId===this.currentProjectId}get detailData(){return this.props.detail||(0,y.toJS)(this.store.detail)}get isLoading(){return this.store.isLoading}get routing(){return this.props.rootStore.routing}get path(){var{location:{pathname:e=""}={}}=this.props;return e||""}get leftCards(){return[]}get rightCards(){return[]}get isAdminPage(){var{pathname:e=""}=this.props.location||{};return(0,b.isAdminPage)(e)}get shouldFetchDetail(){return!1}get leftCardsStyle(){return{}}getRouteName(e){return this.isAdminPage?"".concat(e,"Admin"):e}getRoutePath(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRouteName(e);return(0,_.getPath)({key:r,params:t,query:a})}getLinkRender(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=this.getRouteName(e);return(0,_.getLinkRender)({key:n,params:a,query:r,value:t})}init(){this.store={}}renderLeftCards(){var e;return(0,f.default)(e=this.leftCards).call(e,((e,t)=>{var{title:a,titleHelp:r,options:n,render:i,labelCol:l,contentCol:s,button:o,sourceData:u}=e;return i?i():m.default.createElement(v.default,{key:"card-left-".concat(t),className:"detail-left-card",data:u||this.detailData,title:a,titleHelp:r,options:n,loading:this.isLoading,labelCol:l,contentCol:s,button:o})}))}renderRightCards(){var e;return(0,f.default)(e=this.rightCards).call(e,((e,t)=>{var{title:a,options:r,labelCol:n,titleHelp:i,render:l,button:s,className:o}=e;if(l)return l();var u=8,d=16;return(0,h.default)(e,"labelCol")&&(d=24-(u=n)),m.default.createElement(v.default,{key:"card-right-".concat(t),className:(0,g.default)("detail-right-card",o),data:this.detailData,title:a,titleHelp:i,options:r,loading:this.isLoading,labelCol:u,contentCol:d,button:s})}))}renderModal(){return null}render(){return m.default.createElement("div",{className:(0,g.default)(S.default.main)},m.default.createElement("div",{className:S.default["left-side"],id:"detail-left-side",style:this.leftCardsStyle},this.renderLeftCards()),m.default.createElement("div",{className:S.default["right-side"],id:"detail-right-side"},this.renderRightCards()),this.renderModal())}}t.default=w},1207:function(e,t,a){"use strict";var r=a(33),n=a(44),i=a(32),l=a(25),s=a(27),o=a(45),u=a(46),d=a(19),c=a(21);d(t,"__esModule",{value:!0}),t.default=t.UserStore=void 0;var f,p,h=c(a(27)),m=c(a(102)),g=c(a(33)),v=c(a(65)),y=c(a(57)),b=c(a(32)),_=c(a(25)),S=c(a(51)),x=c(a(62)),w=c(a(71)),I=c(a(36)),C=c(a(54)),k=(c(a(72)),a(34)),D=c(a(429)),P=c(a(48)),T=c(a(140)),A=c(a(407)),M=c(a(1238)),R=c(a(53));function N(e,t){var a=r(e);if(n){var s=n(e);t&&(s=i(s).call(s,(function(t){return l(e,t).enumerable}))),a.push.apply(a,s)}return a}function E(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)s(a=N(Object(r),!0)).call(a,(function(t){(0,I.default)(e,t,r[t])}));else if(o)u(e,o(r));else{var n;s(n=N(Object(r))).call(n,(function(t){d(e,t,l(r,t))}))}}return e}var j=(f=class extends R.default{constructor(){super(...arguments),(0,w.default)(this,"userProjects",p,this),(0,I.default)(this,"addGroupUsers",((e,t)=>M.default.addGroupUsers({id:e,userId:t}))),(0,I.default)(this,"addProjectUser",((e,t,a)=>A.default.assignUserRole({id:e,userId:t,roleId:a}))),(0,I.default)(this,"getProjectMapRoles",((e,t,a,r)=>{var n={},{id:i}=e;return(0,h.default)(t).call(t,(e=>{var{scope:{project:{id:t}={}}={},role:{id:l}={},user:{id:s}={}}=e;if(s===i&&l&&t){var o=(0,m.default)(a).call(a,(e=>e.id===l));if(n[t])n[t].roles=[...n[t].roles,o];else{var u=(0,m.default)(r).call(r,(e=>e.id===t));n[t]={project:u,roles:[o]}}}})),n})),(0,I.default)(this,"getSystemRoles",((e,t,a,r)=>{var n=[],{id:i}=e||{};return(0,h.default)(t).call(t,(e=>{var{role:{id:t}={},user:{id:r}={}}=e;if(r===i&&t){var l=(0,m.default)(a).call(a,(e=>e.id===t));n.push(l)}})),n})),(0,I.default)(this,"updateUser",((e,t,a,r,n,i)=>{var l=this.getProjectMapRoles(e,t,r,n),s=this.getSystemRoles(e,a,r,n),o=(0,m.default)(i).call(i,(t=>t.id===e.domain_id));return E(E({},e),{},{projects:l,projectCount:(0,g.default)(l).length,domain:o,domainName:(o||{}).name||e.domain_id,systemRoles:s})}))}get client(){return P.default.keystone.users}get domainClient(){return P.default.keystone.domains}get systemGroupClient(){return P.default.keystone.systemGroups}get roleClient(){return P.default.keystone.roles}get roleAssignmentClient(){return P.default.keystone.roleAssignments}get projectClient(){return P.default.keystone.projects}get systemUserClient(){return P.default.keystone.systemUsers}get groupClient(){return P.default.keystone.groups}listFetchByClient(e,t){var{groupId:a}=t;return a?this.groupClient.users.list(a,e):this.client.list(e)}get paramsFunc(){return e=>{var{id:t,projectId:a,groupId:r,roleId:n,withProjectRole:i,withSystemRole:l,all_projects:s}=e;return(0,x.default)(e,["id","projectId","groupId","roleId","withProjectRole","withSystemRole","all_projects"])}}create(e){var t=this;return(0,S.default)((function*(){var a,r={},{select_project:n,select_user_group:i=[],projectRoles:l,defaultRole:s}=e,o=(0,x.default)(e,["select_project","select_user_group","projectRoles","defaultRole"]);r[t.responseKey]=o,t.isSubmitting=!0;var u=yield t.client.create(r),{user:{id:d}}=u,c=[];return(0,h.default)(i).call(i,(e=>{c.push(t.addGroupUsers(e,d))})),(0,h.default)(a=(0,g.default)(l)).call(a,(e=>{var a=l[e];(0,h.default)(a).call(a,(a=>{c.push(t.addProjectUser(e,d,a))}))})),yield v.default.all(c),t.isSubmitting=!1,u}))()}getUserProjects(){var e=this;return(0,S.default)((function*(){e.userProjects.update({isLoading:!0});var{user:{user:{id:t}}}=T.default,{projects:a}=yield e.client.projects.list(t);return e.userProjects.update({data:a,isLoading:!1}),a}))()}listDidFetch(e,t,a){var r=this;return(0,S.default)((function*(){if(!e.length)return e;var{withProjectRole:t=!0,withSystemRole:n=!0,projectId:i,roleId:l,domain_id:s}=a,o=t||n,u={};l&&(u["role.id"]=l),i&&(u["scope.project.id"]=i);var d=[t?r.roleAssignmentClient.list(u):null,n?r.roleAssignmentClient.list({"scope.system":"all"}):null,o?r.roleClient.list():null,t?r.projectClient.list():null,s?null:r.domainClient.list()],[c,f,p,h,g]=yield v.default.all(d),{roles:_=[]}=p||{},{domains:S=[]}=g||{},{role_assignments:x=[]}=c||{},{role_assignments:w=[]}=f||{},{projects:I=[]}=h||{},C=(0,y.default)(e).call(e,(e=>r.updateUser(e,x,w,_,I,S)));return i?(0,b.default)(C).call(C,(e=>!!e.projectCount)):l?(0,b.default)(C).call(C,(e=>{var{projectCount:t,systemRoles:a}=e;return!!t||!!(0,m.default)(a).call(a,(e=>e.id===l))})):C}))()}detailDidFetch(e){var t=this;return(0,S.default)((function*(){var{id:a}=e,r={"user.id":a,"scope.system":"all"},n=[t.roleAssignmentClient.list(r),t.roleClient.list(),t.domainClient.list()],[i,l,s]=yield v.default.all(n),{roles:o=[]}=l||{},{domains:u=[]}=s,{role_assignments:d=[]}=i||{};return t.updateUser(e,[],d,o,[],u)}))()}enable(e){var t=this;return(0,S.default)((function*(){var{id:a}=e;return t.submitting(t.client.patch(a,{user:{enabled:!0}}))}))()}forbidden(e){var t=this;return(0,S.default)((function*(){var{id:a}=e;return t.submitting(t.client.patch(a,{user:{enabled:!1}}))}))()}changePassword(e){var t=this;return(0,S.default)((function*(){var{id:a,password:r}=e,n={user:{password:r}};return t.submitting(t.client.patch(a,n))}))()}changePasswordUser(e){var t=this;return(0,S.default)((function*(){var{id:a,password:r,original_password:n}=e,i={user:{password:r,original_password:n}};return t.submitting(t.client.updatePassword(a,i))}))()}assignSystemRole(e){var t=this;return(0,S.default)((function*(){var{id:a,roleId:r}=e;return t.systemUserClient.roles.update(a,r)}))()}deleteSystemRole(e){var t=this;return(0,S.default)((function*(){var{id:a,roleId:r}=e;return t.systemUserClient.roles.delete(a,r)}))()}edit(e,t){var a=this;return(0,S.default)((function*(){var{email:r,phone:n,real_name:i,description:l,name:s}=t,o={user:{email:r,phone:n,real_name:i,description:l,name:s}};return a.submitting(a.client.patch(e,o))}))()}},p=(0,C.default)(f.prototype,"userProjects",[k.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new D.default}}),(0,C.default)(f.prototype,"create",[k.action],(0,_.default)(f.prototype,"create"),f.prototype),(0,C.default)(f.prototype,"getUserProjects",[k.action],(0,_.default)(f.prototype,"getUserProjects"),f.prototype),(0,C.default)(f.prototype,"enable",[k.action],(0,_.default)(f.prototype,"enable"),f.prototype),(0,C.default)(f.prototype,"forbidden",[k.action],(0,_.default)(f.prototype,"forbidden"),f.prototype),(0,C.default)(f.prototype,"changePassword",[k.action],(0,_.default)(f.prototype,"changePassword"),f.prototype),(0,C.default)(f.prototype,"changePasswordUser",[k.action],(0,_.default)(f.prototype,"changePasswordUser"),f.prototype),(0,C.default)(f.prototype,"assignSystemRole",[k.action],(0,_.default)(f.prototype,"assignSystemRole"),f.prototype),(0,C.default)(f.prototype,"deleteSystemRole",[k.action],(0,_.default)(f.prototype,"deleteSystemRole"),f.prototype),(0,C.default)(f.prototype,"edit",[k.action],(0,_.default)(f.prototype,"edit"),f.prototype),f);t.UserStore=j;var F=new j;t.default=F},1210:function(e,a,r){"use strict";var n=r(33),i=r(44),l=r(32),s=r(25),o=r(27),u=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.getPortsAndReasons=function(e,a){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return(0,h.default)(e).call(e,(e=>{var n=!0,i="",l=e.fixed_ip_address;if(k(l))if(e["router:external"])i=t("Is external network port"),n=!1;else if(e.floatingIP){var s;i=(0,m.default)(s="".concat(t("Is associate to floating ip: ")," ")).call(s,e.floatingIP),n=!1}else(0,g.default)(a).call(a,(t=>t.subnet_id===e.subnet_id))<0&&(i="".concat(r?t("It is unreachable for this floating ip."):t("It is unreachable for all floating ips.")),n=!1);else i="".concat(t("It is IPv6 type.")),n=!1;return C(C({},e),{},{key:l,name:l,available:n,reason:i})}))},a.getPortsForPortFormItem=function(e){this.portStore.fetchList({device_owner:e,project_id:this.currentProjectId})},a.getPortFormItem=function(){var e,a=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],{portFixedIPs:r,fixedIpLoading:n}=this.state,i=[{label:t("Name"),name:"name"},{label:t("Fixed IP"),name:"fixed_ips",filterFunc:(e,t)=>{var a;return(0,v.default)(a=e||[]).call(a,(e=>{var a;return(0,y.default)(a=e.ip_address).call(a,t)}))}}];a&&i.push({label:t("Bind Resource Name"),name:"server_name"},{label:t("Status"),name:"status",options:(0,b.default)(e=(0,w.getOptions)(D)).call(e,(e=>{var t;return(0,y.default)(t=["ACTIVE","DOWN"]).call(t,e.key)}))});var l=[{title:t("ID/Name"),dataIndex:"name",routeName:this.getRouteName("portDetail")},{title:t("Description"),dataIndex:"description"},{title:t("Fixed IPs"),dataIndex:"fixed_ips",render:e=>S.default.createElement(S.default.Fragment,null,(0,h.default)(e).call(e,((e,t)=>S.default.createElement("div",{key:"ip_address_".concat(t)},e.ip_address))))},{title:t("Created At"),dataIndex:"created_at",valueRender:"sinceTime"}];if(a){var s=[{title:t("Status"),dataIndex:"status",valueMap:D},{title:t("Bind Resource"),dataIndex:"server_name",render:(e,t)=>{var{device_id:a}=t;if(!a)return"-";var r=this.getLinkRender("instanceDetail",a,{id:a},{tab:"interface"});return S.default.createElement(S.default.Fragment,null,r,S.default.createElement("br",null),e||"-")}}];(0,_.default)(l).call(l,4,0,...s)}return[{name:"virtual_adapter",label:t("Virtual Adapter"),type:"select-table",required:!0,rowKey:"id",data:this.portStore.list.data||[],isLoading:this.portStore.list.isLoading,disabledFunc:this.portsDisableFunc,onChange:this.handlePortSelect,isMulti:!1,filterParams:i,columns:l},{name:"fixed_ip_address",label:t("Fixed IP"),type:"select-table",rowKey:"fixed_ip_address",required:!0,data:r,isLoading:n,isMulti:!1,filterParams:[{label:t("Ip Address"),name:"name"}],columns:[{title:t("Ip Address"),dataIndex:"name"},{title:t("Subnet ID"),dataIndex:"subnet_id"},{title:t("Reason"),dataIndex:"reason"}],disabledFunc:e=>!e.available}]},a.portFilters=a.portColumns=a.portSortProps=a.bindingTypes=a.portState=a.portStatus=void 0;var p=f(r(36)),h=f(r(57)),m=f(r(81)),g=f(r(1338)),v=f(r(226)),y=f(r(198)),b=f(r(32)),_=f(r(562)),S=f(r(0)),x=r(556),w=r(161);function I(e,t){var a=n(e);if(i){var r=i(e);t&&(r=l(r).call(r,(function(t){return s(e,t).enumerable}))),a.push.apply(a,r)}return a}function C(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)o(a=I(Object(r),!0)).call(a,(function(t){(0,p.default)(e,t,r[t])}));else if(u)d(e,u(r));else{var n;o(n=I(Object(r))).call(n,(function(t){c(e,t,s(r,t))}))}}return e}var{isIPv4:k}=x.ipValidate,D={ACTIVE:t("Active"),BUILD:t("Build"),DOWN:t("Down"),ERROR:t("Error")};a.portStatus=D;var P={UP:t("Up"),DOWN:t("Down")};a.portState=P;var T={normal:t("Normal"),direct:t("Direct"),macvtap:t("MacVTap")};a.bindingTypes=T;a.portSortProps={isSortByBack:!0,defaultSortKey:"status",defaultSortOrder:"descend"};var A=[{title:t("ID/Name"),dataIndex:"name",sorter:!1,render:(e,t)=>S.default.createElement("div",null,S.default.createElement("div",null,t.id),S.default.createElement("div",null,e||"-"))},{title:t("Owned Network"),dataIndex:"network_name",isLink:!0,idKey:"network_id",sorter:!1},{title:t("IPv4 Address"),dataIndex:"ipv4",render:e=>(0,h.default)(e).call(e,(e=>S.default.createElement("div",{key:e},e))),sorter:!1},{title:t("IPv6 Address"),dataIndex:"ipv6",render:e=>(0,h.default)(e).call(e,(e=>S.default.createElement("div",{key:e},e))),sorter:!1},{title:t("Mac Address"),dataIndex:"mac_address",sorter:!1},{title:t("Status"),dataIndex:"status",valueMap:D,sorter:!1}];a.portColumns=A;var M=[{label:t("Name"),name:"name"}];a.portFilters=M},1212:function(e,t,a){"use strict";var r=a(19),n=a(21);r(t,"__esModule",{value:!0}),t.default=t.BaseLayout=void 0;var i=a(0),l=a(406),s=n(a(413));class o extends i.Component{constructor(e){super(e),this.routes=e.route.routes}render(){var{isAdminPage:e,sliderCollapsed:t}=this.props,a={isAdminPage:e,sliderCollapsed:t};return(0,s.default)(this.routes,a)}}t.BaseLayout=o;var u=(0,l.inject)("rootStore")((0,l.observer)(o));t.default=u},1213:function(e,a,r){"use strict";var n=r(33),i=r(44),l=r(32),s=r(25),o=r(27),u=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.getFlavorArchInfo=a.isBareMetalFlavor=a.isBareMetal=a.getFamilyItemValue=a.getAllArchitecture=a.gpuColumns=a.cpuArchColumn=a.extraColumns=a.getBaseColumns=a.isComputeOptimized=a.isGpuVisual=a.isGpuCategory=a.categoryHasEphemeral=a.categoryHasIOPS=a.hasEphemeralTypes=a.hasIOPSTypes=a.flavorCategoryList=a.bareMetalCategoryList=a.heterogeneousCategoryList=a.armCategoryList=a.ironicCategoryList=a.x86CategoryList=a.flavorArchitectures=a.pageTypeMap=a.pageTypeList=a.cpuThreadPolicyMap=a.cpuThreadPolicyList=a.cpuPolicyList=void 0;var p=f(r(90)),h=f(r(102)),m=f(r(27)),g=f(r(81)),v=f(r(36)),y=r(161);function b(e,t){var a=n(e);if(i){var r=i(e);t&&(r=l(r).call(r,(function(t){return s(e,t).enumerable}))),a.push.apply(a,r)}return a}function _(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)o(a=b(Object(r),!0)).call(a,(function(t){(0,v.default)(e,t,r[t])}));else if(u)d(e,u(r));else{var n;o(n=b(Object(r))).call(n,(function(t){c(e,t,s(r,t))}))}}return e}var S={dedicated:t("Dedicated"),shared:t("Shared")};a.cpuPolicyList=S;var x=[{label:t("Prefer(Thread siblings are preferred)"),value:"prefer"},{label:t("Isolate(No multithreading)"),value:"isolate"},{label:t("Require(Need multithreading)"),value:"require"}];a.cpuThreadPolicyList=x;var w={prefer:t("Prefer"),isolate:t("Isolate"),require:t("Require")};a.cpuThreadPolicyMap=w;var I=[{label:t("Large(Optimal performance)"),value:"large"},{label:t("Small(Not recommended)"),value:"small"},{label:t("Any(Random)"),value:"any"},{label:t("Custom"),value:"custom"}];a.pageTypeList=I;var C={large:t("Large"),small:t("Small"),any:t("Any")};a.pageTypeMap=C;var k={x86_architecture:t("X86 Architecture"),heterogeneous_computing:t("Heterogeneous Computing"),bare_metal:t("Bare Metal"),arm_architecture:t("ARM Architecture"),custom:t("Custom"),all:t("All Flavors")};a.flavorArchitectures=k;var D={general_purpose:t("General Purpose"),compute_optimized:t("Compute Optimized"),memory_optimized:t("Memory Optimized"),big_data:t("Big Data"),local_ssd:t("Local SSD"),high_clock_speed:t("High Clock Speed")};a.x86CategoryList=D;var P={general_purpose:t("General Purpose")};a.ironicCategoryList=P;var T=D;a.armCategoryList=T;var A={compute_optimized_type_with_gpu:t("Compute Optimized Type with GPU"),visualization_compute_optimized_type_with_gpu:t("Visualization Compute Optimized Type with GPU"),compute_optimized_type:t("Compute Optimized Type")};a.heterogeneousCategoryList=A;var M={general_purpose:t("General Purpose")};a.bareMetalCategoryList=M;var R=_(_({},D),A);a.flavorCategoryList=R;var N=["general_purpose","compute_optimized","memory_optimized","high_clock_speed","compute_optimized_type_with_gpu","visualization_compute_optimized_type_with_gpu","compute_optimized_type"];a.hasIOPSTypes=N;var E=["big_data","local_ssd","compute_optimized_type_with_gpu"];a.hasEphemeralTypes=E;a.categoryHasIOPS=e=>e&&(0,p.default)(N).call(N,e)>=0;a.categoryHasEphemeral=e=>e&&(0,p.default)(E).call(E,e)>=0;a.isGpuCategory=e=>e&&(0,p.default)(e).call(e,"_gpu")>=0;a.isGpuVisual=e=>"visualization_compute_optimized_type_with_gpu"===e;a.isComputeOptimized=e=>"compute_optimized_type"===e;a.getBaseColumns=e=>[{title:t("ID/Name"),dataIndex:"name",routeName:e?e.getRouteName("flavorDetail"):""},{title:t("Category"),dataIndex:"category",valueMap:R},{title:t("CPU"),dataIndex:"vcpus",isHideable:!0},{title:t("Memory"),dataIndex:"ram",isHideable:!0,render:e=>(0,y.formatSize)(e,2)},{title:t("Internal Network Bandwidth(Gbps)"),dataIndex:"quota:vif_outbound_average",isHideable:!0,width:120,render:e=>e?e/1e3/125:"-"},{title:t("Ephemeral Disk (GiB)"),dataIndex:"OS-FLV-EXT-DATA:ephemeral",isHideable:!0},{title:t("Storage IOPS"),dataIndex:"quota:disk_total_iops_sec",isHideable:!0,render:e=>e||"-"}];var j=[{title:t("Public"),dataIndex:"is_public",isHideable:!0,valueRender:"yesNo"}];a.extraColumns=j;var F={title:t("CPU Arch"),dataIndex:"cpu_arch",isHideable:!0};a.cpuArchColumn=F;var L=[{title:t("GPU Type"),dataIndex:"gpuType",isHideable:!0},{title:t("GPU Count"),dataIndex:"gpuCount",isHideable:!0},{title:t("NUMA Nodes"),dataIndex:"hw:numa_nodes",isHideable:!0},{title:t("CPU Policy"),dataIndex:"hw:cpu_policy",isHideable:!0,valueMap:S},{title:t("CPU Thread Policy"),dataIndex:"hw:cpu_thread_policy",isHideable:!0,valueMap:w},{title:t("Memory Page"),dataIndex:"hw:mem_page_size",isHideable:!0,valueMap:C}];a.gpuColumns=L;a.getAllArchitecture=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=[];try{var r,n,i=(0,h.default)(r=e||[]).call(r,(e=>"flavor_families"===e.key));(0,m.default)(n=i&&i.value||[]).call(n,(e=>{e.architecture&&a.push(e.architecture)}))}catch(e){}return t&&a.push("custom"),a};a.getFamilyItemValue=e=>{var t,a=(0,h.default)(t=e||[]).call(t,(e=>"flavor_families"===e.key));return a?a.value:[]};var z=e=>"bare_metal"===e;a.isBareMetal=z;a.isBareMetalFlavor=e=>{var{extra_specs:t={}}=e.originData||e||{};return z(t[":architecture"])||"required"===t["trait:CUSTOM_GOLD"]};a.getFlavorArchInfo=e=>{var t,{architecture:a="",category:r=""}=e||{};return a?"custom"===a?k[a]:(0,g.default)(t="".concat(k[a]||a," - ")).call(t,R[r]||r):"-"}},1214:function(e,a,r){"use strict";var n=r(33),i=r(44),l=r(32),s=r(25),o=r(27),u=r(45),d=r(46),c=r(19),f=r(160),p=r(21);c(a,"__esModule",{value:!0}),a.default=void 0,r(1198);var h=p(r(1199)),m=p(r(1524));r(1196);var g=p(r(1197));r(1205);var v=p(r(1206)),y=p(r(36)),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={},n=c&&s;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=n?s(e,i):null;l&&(l.get||l.set)?c(r,i,l):r[i]=e[i]}r.default=e,a&&a.set(e,r);return r}(r(0)),_=(r(173),p(r(16)));r(555);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=n(e);if(i){var r=i(e);t&&(r=l(r).call(r,(function(t){return s(e,t).enumerable}))),a.push.apply(a,r)}return a}function w(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)o(a=x(Object(r),!0)).call(a,(function(t){(0,y.default)(e,t,r[t])}));else if(u)d(e,u(r));else{var n;o(n=x(Object(r))).call(n,(function(t){c(e,t,s(r,t))}))}}return e}class I extends b.Component{constructor(e){super(e),(0,y.default)(this,"onChange",(e=>{var{onChange:t}=this.props;t&&t(e)})),(0,y.default)(this,"onKeyChange",(e=>{this.onChange(w(w({},this.state),{},{key:e.target.value}))})),(0,y.default)(this,"onValueChange",(e=>{this.onChange(w(w({},this.state),{},{value:e.target.value}))})),this.state={key:"",value:""}}static getDerivedStateFromProps(e,t){var{key:a,value:r}=e.value||{};return a!==t.key||r!==t.value?{key:a,value:r}:null}render(){var{key:e,value:a}=this.state,{keyReadonly:r,valueReadonly:n,keySpan:i,valueSpan:l}=this.props;return b.default.createElement(h.default,null,b.default.createElement(g.default,{span:i||4},b.default.createElement(v.default,{value:e,placeholder:t["Please input key"],onChange:this.onKeyChange,readOnly:r,required:!0})),b.default.createElement(g.default,{span:1,style:{textAlign:"center",lineHeight:"30px"}},b.default.createElement(m.default,{rotate:90})),b.default.createElement(g.default,{span:l||8},b.default.createElement(v.default,{value:a,placeholder:t["Please input key"],onChange:this.onValueChange,readOnly:n,required:!0})))}}a.default=I,(0,y.default)(I,"propTypes",{onChange:_.default.func,value:_.default.object,keyReadonly:_.default.bool,valueReadonly:_.default.bool,keySpan:_.default.number,valueSpan:_.default.number}),(0,y.default)(I,"defaultProps",{onChange:null,value:{key:"",value:""},keyReadonly:!1,valueReadonly:!1})},1218:function(e,t,a){"use strict";var r=a(33),n=a(44),i=a(32),l=a(25),s=a(27),o=a(45),u=a(46),d=a(19),c=a(21);d(t,"__esModule",{value:!0}),t.default=t.FlavorStore=void 0;var f,p,h=c(a(198)),m=c(a(32)),g=c(a(65)),v=c(a(57)),y=c(a(27)),b=c(a(25)),_=c(a(51)),S=c(a(62)),x=c(a(71)),w=c(a(36)),I=c(a(54)),C=(c(a(72)),a(34)),k=c(a(48)),D=c(a(53));function P(e,t){var a=r(e);if(n){var s=n(e);t&&(s=i(s).call(s,(function(t){return l(e,t).enumerable}))),a.push.apply(a,s)}return a}function T(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)s(a=P(Object(r),!0)).call(a,(function(t){(0,w.default)(e,t,r[t])}));else if(o)u(e,o(r));else{var n;s(n=P(Object(r))).call(n,(function(t){d(e,t,l(r,t))}))}}return e}var A=(f=class extends D.default{constructor(){super(...arguments),(0,x.default)(this,"access",p,this),(0,w.default)(this,"getGpuInfo",(e=>{var{extra_specs:t={}}=e||{},a=t["pci_passthrough:alias"],r=t["resources:VGPU"],n=t[":category"],i="-",l="-",s="-",o="-";if(r&&(i="vgpu",l=r),a)if(n&&!(0,h.default)(n).call(n,"visualization_")){var u=a.split(",")[0],d=a.split(",")[1];i=u.split(":")[0],l=u.split(":")[1],d&&(s=d.split(":")[0],o=d.split(":")[1])}else{var c=a.split(",")[0];s=c.split(":")[0],o=c.split(":")[1]}return{gpuType:i,gpuCount:l,usbType:s,usbCount:o}}))}get listWithDetail(){return!0}get client(){return k.default.nova.flavors}get mapperBeforeFetchProject(){return e=>{var{extra_specs:{key:t}={}}=e,a=(0,S.default)(e.extra_specs,["key"]),r=(0,S.default)(e,["extra_specs"]),n=this.getGpuInfo(e);return T(T(T(T({},r),a),{},{architecture:a[":architecture"]||"custom",category:a[":category"]},n),{},{is_public:r["os-flavor-access:is_public"],originData:e})}}get paramsFunc(){return e=>{var{all_projects:t,name:a}=e,r=(0,S.default)(e,["all_projects","name"]);return t?T(T({},r),{},{is_public:"None"}):T({name:a},r)}}listDidFetch(e,t,a){return(0,_.default)((function*(){var{tab:t}=a;return t?(0,m.default)(e).call(e,(e=>e.architecture===t)):e}))()}fetchAccess(e){var t=this;return(0,_.default)((function*(){var a=yield t.client.access.list(e);t.access=a.flavor_access}))()}create(e,t,a){var r=this;return(0,_.default)((function*(){var n={};n[r.responseKey]=e,r.isSubmitting=!0;var i=yield r.client.create(n),{id:l}=i.flavor,s={extra_specs:t};return a&&a.length>0&&(yield g.default.all((0,v.default)(a).call(a,(e=>{var t={addTenantAccess:{tenant:e}};return r.client.action(l,t)})))),r.submitting(r.client.extraSpecs.create(l,s))}))()}updateAccess(e,t,a){var r=this;return(0,_.default)((function*(){return r.isSubmitting=!0,yield g.default.all((0,v.default)(t).call(t,(t=>{var a={addTenantAccess:{tenant:t}};return r.client.action(e,a)}))),r.submitting(g.default.all((0,v.default)(a).call(a,(t=>{var a={removeTenantAccess:{tenant:t}};return r.client.action(e,a)}))))}))()}createExtraSpecs(e,t){var a=this;return(0,_.default)((function*(){var r={extra_specs:t};return a.submitting(a.client.extraSpecs.create(e,r))}))()}deleteExtraSpecs(e,t){var a=this;return(0,_.default)((function*(){return a.submitting(a.client.extraSpecs.delete(e,t))}))()}putExtraSpecs(e,t,a){var r=this;return(0,_.default)((function*(){return r.submitting(r.client.extraSpecs.update(e,t,a))}))()}updateExtraSpecs(e){var t=arguments,a=this;return(0,_.default)((function*(){var r=t.length>1&&void 0!==t[1]?t[1]:[],n=t.length>2&&void 0!==t[2]?t[2]:[],i=t.length>3&&void 0!==t[3]?t[3]:[];if(r.length>0){var l={};(0,y.default)(r).call(r,(e=>{l[e.key]=e.value})),yield a.createExtraSpecs(e,l)}return n.length>0&&(yield g.default.all((0,v.default)(n).call(n,(t=>a.putExtraSpecs(e,t.key,{[t.key]:t.value}))))),i.length>0&&(yield g.default.all((0,v.default)(i).call(i,(t=>a.deleteExtraSpecs(e,t))))),g.default.resolve()}))()}},p=(0,I.default)(f.prototype,"access",[C.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),(0,I.default)(f.prototype,"fetchAccess",[C.action],(0,b.default)(f.prototype,"fetchAccess"),f.prototype),(0,I.default)(f.prototype,"create",[C.action],(0,b.default)(f.prototype,"create"),f.prototype),(0,I.default)(f.prototype,"updateAccess",[C.action],(0,b.default)(f.prototype,"updateAccess"),f.prototype),(0,I.default)(f.prototype,"createExtraSpecs",[C.action],(0,b.default)(f.prototype,"createExtraSpecs"),f.prototype),(0,I.default)(f.prototype,"deleteExtraSpecs",[C.action],(0,b.default)(f.prototype,"deleteExtraSpecs"),f.prototype),(0,I.default)(f.prototype,"putExtraSpecs",[C.action],(0,b.default)(f.prototype,"putExtraSpecs"),f.prototype),(0,I.default)(f.prototype,"updateExtraSpecs",[C.action],(0,b.default)(f.prototype,"updateExtraSpecs"),f.prototype),f);t.FlavorStore=A;var M=new A;t.default=M},1219:function(e,a,r){"use strict";var n=r(33),i=r(44),l=r(32),s=r(25),o=r(27),u=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.getRoutersWithIDAndExtInfo=P,a.getLinkedRouterIdsByFip=function(e,t){return A.apply(this,arguments)},a.getCanReachSubnetIdsWithRouterId=M,a.getCanReachSubnetIdsWithRouterIdInComponent=function(e){return N.apply(this,arguments)},a.getRouterSelectTablePropsBackend=a.routerSortProps=a.routerFilters=a.getRouterColumns=a.getRouterState=a.routerState=a.routerStatus=void 0;var p=f(r(51)),h=f(r(36)),m=f(r(57)),g=f(r(32)),v=f(r(0)),y=f(r(568)),b=r(1224),_=r(161);function S(e,t){var a=n(e);if(i){var r=i(e);t&&(r=l(r).call(r,(function(t){return s(e,t).enumerable}))),a.push.apply(a,r)}return a}function x(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)o(a=S(Object(r),!0)).call(a,(function(t){(0,h.default)(e,t,r[t])}));else if(u)d(e,u(r));else{var n;o(n=S(Object(r))).call(n,(function(t){c(e,t,s(r,t))}))}}return e}var w={ACTIVE:t("Active"),ERROR:t("Error")};a.routerStatus=w;var I={UP:t("Up"),DOWN:t("Down")};a.routerState=I;a.getRouterState=e=>e?t("Up"):t("Down");var C=e=>[{title:t("ID/Name"),dataIndex:"name",routeName:e.getRouteName("routerDetail")},{title:t("Project ID/Name"),dataIndex:"project_name",isHideable:!0,hidden:!e.isAdminPage,sortKey:"project_id"},{title:t("Status"),dataIndex:"status",valueMap:w},{title:t("Open External Gateway"),dataIndex:"hasExternalGateway",valueRender:"yesNo",isHideable:!0,sorter:!1},{title:t("External Network"),dataIndex:"externalNetworkId",isHideable:!0,sorter:!1,render:t=>e.getLinkRender("networkDetail",t,{id:t})},{title:t("External Fixed IP"),dataIndex:"externalFixedIps",isHideable:!0,sorter:!1,render:e=>(0,m.default)(e).call(e,(e=>v.default.createElement("div",{key:e.ip_address},e.ip_address)))||"-",stringify:e=>(0,m.default)(e).call(e,(e=>e.ip_address)).join(",")||"-"},{title:t("Created At"),dataIndex:"created_at",valueRender:"sinceTime",isHideable:!0,sorter:!1}];a.getRouterColumns=C;var k=[{label:t("Name"),name:"name"},{label:t("Status"),name:"status",options:(0,_.getOptions)(w)}];a.routerFilters=k;var D={isSortByBack:!0,defaultSortKey:"status",defaultSortOrder:"descend"};a.routerSortProps=D;function P(e){return T.apply(this,arguments)}function T(){return(T=(0,p.default)((function*(e){var t={fields:["id","external_gateway_info"],project_id:e};return yield y.default.pureFetchList(t)}))).apply(this,arguments)}function A(){return(A=(0,p.default)((function*(e,t){var a,r=yield P(e);return(0,m.default)(a=(0,g.default)(r).call(r,(e=>e.external_gateway_info&&e.external_gateway_info.network_id===t.floating_network_id))).call(a,(e=>e.id))}))).apply(this,arguments)}function M(e,t){return R.apply(this,arguments)}function R(){return(R=(0,p.default)((function*(e,t){var a=yield P(e);t&&(a=(0,g.default)(a).call(a,t));var r=yield(0,b.getPortsWithFixedIPs)();return{canReachSubnetIdsWithRouterId:(0,b.getSubnetToRouter)(r,a),routerIdWithExternalNetworkInfo:a}}))).apply(this,arguments)}function N(){return(N=(0,p.default)((function*(e){var{canReachSubnetIdsWithRouterId:t,routerIdWithExternalNetworkInfo:a}=yield M(this.currentProjectId,e);return this.setState({canReachSubnetIdsWithRouterId:t,routerIdWithExternalNetworkInfo:a}),t}))).apply(this,arguments)}a.getRouterSelectTablePropsBackend=e=>x(x({},D),{},{columns:C(e),filterParams:k})},1224:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.getSubnetToRouter=function(e,t){var a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=[];return(0,l.default)(e).call(e,(e=>{var n;(0,s.default)(t).call(t,(t=>!(a&&!t.external_gateway_info)&&t.id===e.device_id))&&(0,l.default)(n=e.fixed_ips).call(n,(t=>{r.push({subnet_id:t.subnet_id,router_id:e.device_id})}))})),r},a.getPortsWithFixedIPs=function(){return C.apply(this,arguments)},a.getInterfaceWithReason=function(e){return k.apply(this,arguments)},a.saveAndBuildPromisesFromInterfaces=D,a.getReasonForExternalNetworkPortOrAlreadyBindFip=T,a.getFipsFromRouterId=M,a.handleFixedIPChange=function(e){return N.apply(this,arguments)},a.getPortForwardingName=a.portForwardingProtocols=a.getFIPFormItemForAssociate=a.disableFIPAssociate=a.getFIPFormItemExtra=a.getFixedIPFormItemForAssociate=a.transitionStatuses=a.resourceType=a.floatingIpStatus=void 0;var l=i(r(27)),s=i(r(102)),o=i(r(81)),u=i(r(65)),d=i(r(226)),c=i(r(198)),f=i(r(57)),p=i(r(32)),h=i(r(1299)),m=i(r(51)),g=i(r(199)),v=i(r(575)),y=i(r(228)),b=r(556),_=i(r(336)),S=r(1340),{isIPv4:x}=b.ipValidate,w={AVAILABLE:t("Available"),PENDING:t("Pending"),ACTIVE:t("Active"),ERROR:t("Error"),DOWN:t("Down")};a.floatingIpStatus=w;var I={compute:t("Instance"),Octavia:t("Load Balancer"),"network:router_gateway":t("Router"),database:t("Database Instance"),null:"-"};a.resourceType=I;function C(){return(C=(0,m.default)((function*(){return yield v.default.pureFetchList({device_owner:["network:router_interface_distributed","network:router_interface","network:ha_router_replicated_interface"],fields:["fixed_ips","device_id","device_owner"]})}))).apply(this,arguments)}function k(){return(k=(0,m.default)((function*(e){var[t,a,r]=yield D(e);return yield T(t,a,r)}))).apply(this,arguments)}function D(e){return P.apply(this,arguments)}function P(){return(P=(0,m.default)((function*(e){var t=[],a=[],r=[];return(0,l.default)(e).call(e,(e=>{var n,i=e.port_id||e.id,s=e.mac_addr||e.mac_address||"",o=e.net_id||e.network_id;(0,l.default)(n=e.fixed_ips).call(n,(e=>{r.push({port_id:i,fixed_ip_address:e.ip_address,mac_address:s,subnet_id:e.subnet_id,network_id:o}),t.push(y.default.fetchDetail({id:o})),x(e.ip_address)?a.push(_.default.pureFetchList({fixed_ip_address:e.ip_address})):a.push(u.default.resolve([]))}))})),[r,t,a]}))).apply(this,arguments)}function T(e,t,a){return A.apply(this,arguments)}function A(){return(A=(0,m.default)((function*(e,t,a){var r=[...e],n=yield u.default.all(t);(0,l.default)(n).call(n,((e,t)=>{r[t].network_name=e.name}));var i=yield y.default.pureFetchList({"router:external":!0});(0,l.default)(r).call(r,(e=>{(0,d.default)(i).call(i,(t=>{var a;return(0,c.default)(a=t.subnets).call(a,e.subnet_id)}))?e["router:external"]=!0:e["router:external"]=!1}));var s=yield u.default.all(a);return(0,l.default)(s).call(s,((e,t)=>{r[t].floatingIP=e[0]&&e[0].port_id===r[t].port_id&&e[0].floating_ip_address||""})),r}))).apply(this,arguments)}function M(e){return R.apply(this,arguments)}function R(){return(R=(0,m.default)((function*(e){var t,{routerIdWithExternalNetworkInfo:a}=this.state,r=(0,s.default)(a).call(a,(t=>t.id===e.router_id));if(!r.external_gateway_info)return[];var n=r.external_gateway_info.network_id,i=yield _.default.pureFetchList({floating_network_id:n,status:"DOWN",project_id:this.currentProjectId}),l=yield y.default.fetchDetail({id:n});return(0,f.default)(t=(0,p.default)(i).call(i,(e=>!e.fixed_ip_address&&!e.port_details))).call(t,(e=>(e.network_name=l.name,e.name=e.floating_ip_address,e)))}))).apply(this,arguments)}function N(){return(N=(0,m.default)((function*(e){this.setState({fipLoading:!0});var{canReachSubnetIdsWithRouterId:t}=this.state;e.selectedRows.length||this.setState({fixed_ip:null,canAssociateFloatingIPs:[],fipLoading:!1});var a=e.selectedRows[0],r=[],n=(0,p.default)(t).call(t,(e=>e.subnet_id===a.subnet_id)),i=yield u.default.all((0,f.default)(n).call(n,(e=>M.call(this,e))));(0,l.default)(i).call(i,(e=>{r.push(...e)}));var s={};(0,l.default)(r).call(r,(e=>{s[e.id]=e}));var o=(0,h.default)(s);this.setState({fixed_ip:a,canAssociateFloatingIPs:o,fipLoading:!1})}))).apply(this,arguments)}a.transitionStatuses=["PENDING"];a.getFixedIPFormItemForAssociate=(e,a)=>{var{portLoading:r}=a.state;return{name:"fixed_ip",label:e,type:"select-table",required:!0,data:a.ports,isLoading:r,isMulti:!1,filterParams:[{label:t("Ip Address"),name:"name"}],columns:[{title:t("Ip Address"),dataIndex:"name"},{title:t("Mac Address"),dataIndex:"mac_address"},{title:t("Network"),dataIndex:"network_name"},{title:t("Subnet ID"),dataIndex:"subnet_id"},{title:t("Reason"),dataIndex:"reason"}],disabledFunc:e=>!e.available,onChange:a.handleFixedIPChange}};a.getFIPFormItemExtra=()=>(0,S.enablePFW)()?t("The floating IP configured with port forwardings cannot be bound"):"";a.disableFIPAssociate=e=>!!(e.port_forwardings||[]).length;a.getFIPFormItemForAssociate=e=>{var{canAssociateFloatingIPs:a,fipLoading:r}=e.state;return{name:"fip",label:t("Floating Ip Address"),type:"select-table",required:!0,data:a,isLoading:r,isMulti:!1,extra:e.getFIPFormItemExtra(),disabledFunc:e.disableFIPAssociate,filterParams:[{label:t("Floating Ip Address"),name:"name"}],columns:[{title:t("Floating Ip Address"),dataIndex:"name"},{title:t("Network"),dataIndex:"network_name"},{title:t("Created At"),dataIndex:"created_at",valueRender:"sinceTime"}]}};var E={tcp:t("TCP"),udp:t("UDP")};a.portForwardingProtocols=E;a.getPortForwardingName=function(){var e,t,a,r,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if((0,g.default)(n))return"";var{protocol:l,external_port:s,external_port_range:u,internal_ip_address:d,internal_port:c,internal_port_range:f}=n,p=E[l]||l,h=(0,o.default)(e=(0,o.default)(t="".concat(s||u," => ")).call(t,d,":")).call(e,c||f),m=i?(0,o.default)(a="".concat(i,":")).call(a,h):h;return(0,o.default)(r="".concat(p,": ")).call(r,m)}},1228:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=void 0;var l=i(r(229)),s=i(r(81));r(1676);var o=i(r(641)),u=i(r(599)),d=i(r(603)),c=i(r(602)),f=i(r(591)),p=i(r(131)),h=i(r(199)),m=i(r(0)),g=(r(173),i(r(16))),v=(r(555),i(r(1316))),y=i(r(1436)),b=i(r(140)),_=r(161),S=r(1699),x=i(r(1700)),w=e=>{var{title:a=t("Error"),type:r="error",description:n="",onClose:i,top:l=48}=e,s="#F5222D",p=null;"info"===r?(s="#0068FF",p=m.default.createElement(f.default,{theme:"filled",style:{color:s}})):"success"===r?(s="#57E39B",p=m.default.createElement(c.default,{theme:"filled",style:{color:s}})):"error"===r?(s="#EB354D",p=m.default.createElement(d.default,{theme:"filled",style:{color:s}})):"process"===r?(s="#0068FF",p=m.default.createElement(u.default,{style:{color:s}})):"warn"===r&&(s="#FEDF40",p=m.default.createElement(f.default,{theme:"filled",style:{color:s}}));var h="error"===r||"warn"===r?0:4.5;o.default.open({message:(0,_.unescapeHtml)(a),duration:h,icon:p,description:(0,_.unescapeHtml)(n),className:x.default.notify,onClose:i,top:l,style:{whiteSpace:"pre-line"}})};w.propTypes={title:g.default.string,type:g.default.string,description:g.default.string};var I=(e,t)=>{b.default.addNoticeCount(),w({title:e,description:t,type:"error",onClose:()=>{b.default.removeNoticeCount()}})},C={open:w,success:(e,t)=>{w({title:e,description:t,type:"success"})},error:I,warn:(e,t)=>{w({title:e,description:t,type:"warn"})},info:(e,t)=>{w({title:e,description:t,type:"info"})},process:(e,t)=>{w({title:e,description:t,type:"process"})},errorWithDetail:(e,a)=>{var r,{status:n,message:i}=e||{},o=a;if(n&&(0,l.default)(n,10)>=500)if((0,h.default)(i)||S.statusMap[n])o+=S.statusMap[n];else{var u,d;if((0,p.default)(i))o+=(0,s.default)(d="".concat(t("message"))).call(d,t("."));else if(i.reason){var c;o+=(0,s.default)(c="".concat(t("message.reason"))).call(c,t("."))}o+=(0,s.default)(u="".concat(t("Status Code"),": ")).call(u,n)}else r=e?m.default.createElement(y.default,{style:{float:"right"},buttonType:"link",buttonText:t("Click to show detail"),component:m.default.createElement(v.default,{className:x.default["code-editor"],value:e,mode:"json",options:{readOnly:!0}})}):"";I(o,r)}};a.default=C},1234:function(e,t,a){"use strict";var r=a(160),n=a(19),i=a(25),l=a(21);n(t,"__esModule",{value:!0}),t.default=void 0;var s=l(a(200)),o=l(a(102)),u=l(a(57));a(1260);var d=l(a(1261)),c=l(a(409)),f=l(a(36)),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=_(t);if(a&&a.has(e))return a.get(e);var r={},l=n&&i;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var o=l?i(e,s):null;o&&(o.get||o.set)?n(r,s,o):r[s]=e[s]}r.default=e,a&&a.set(e,r);return r}(a(0)),h=a(341),m=l(a(4)),g=(a(173),a(161)),v=a(558),y=l(a(1296)),b=l(a(3609));function _(e){if("function"!=typeof r)return null;var t=new r,a=new r;return(_=function(e){return e?a:t})(e)}class S extends p.Component{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e),(0,f.default)(this,"handleFetch",((e,t)=>{this.routing.query(e,t)})),(0,f.default)(this,"handleChangeTab",(e=>{this.handleFetch({tab:e},!0)})),this.options=t,this.state={},this.init()}get routing(){return this.props.rootStore.routing}get location(){return this.props.location||{}}get isAdminPage(){var{pathname:e}=this.location;return(0,g.isAdminPage)(e)}get hasAdminRole(){return this.props.rootStore.hasAdminRole}get endpoint(){return""}get checkEndpoint(){return!1}get name(){return""}get endpointError(){return this.checkEndpoint&&!this.endpoint}getRouteName(e){return this.isAdminPage?"".concat(e,"Admin"):e}getRoutePath(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRouteName(e);return(0,v.getPath)({key:r,params:t,query:a})}getLinkRender(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=this.getRouteName(e);return(0,v.getLinkRender)({key:n,params:a,query:r,value:t})}get tabs(){return[{title:"tab1",key:"tab1",component:null},{title:"tab2",key:"tab2",component:null}]}getTab(){var e,t=(0,h.parse)((0,s.default)(e=this.routing.location.search).call(e,1)),{tab:a}=t;return a}get tab(){var e;if(0===this.tabs.length)return null;var t=this.getTab();return(0,o.default)(e=this.tabs).call(e,(e=>e.key===t))||this.tabs[0]}init(){}renderTabComponent(e){var{component:t,key:a}=e;return t?p.default.createElement(e.component,(0,c.default)({},this.props,{tab:this.tab.key})):p.default.createElement("span",{key:a},a)}renderTab(e,t){return e!==t.key?p.default.createElement(d.default.TabPane,{tab:t.title,key:t.key}):p.default.createElement(d.default.TabPane,{tab:t.title,key:t.key},this.renderTabComponent(t))}renderTabs(){var e;if(!this.tab)return null;if(this.endpointError){var t=this.getRoutePath("overview");return p.default.createElement(y.default,{title:this.name,link:t,endpointError:!0})}var a=(0,u.default)(e=this.tabs).call(e,(e=>this.renderTab(this.tab.key,e)));return p.default.createElement("div",{className:(0,m.default)(b.default.wrapper,this.className)},p.default.createElement(d.default,{activeKey:this.tab.key,onChange:this.handleChangeTab},a))}render(){return this.renderTabs()}}t.default=S},1235:function(e,a,r){"use strict";r(19)(a,"__esModule",{value:!0}),a.projectTableOptions=a.projectColumns=a.projectFilter=void 0;var n=r(334),i=[{label:t("Project Name"),name:"name"},{label:t("Enabled"),name:"enabled",options:n.yesNoOptions}];a.projectFilter=i;var l=[{title:t("Project Name"),dataIndex:"name"},{title:t("User Num"),dataIndex:"userCount"},{title:t("Enabled"),dataIndex:"enabled",valueRender:"yesNo"},{title:t("description"),dataIndex:"description",isHideable:!0}];a.projectColumns=l;var s={filterParams:i,columns:l};a.projectTableOptions=s},1238:function(e,t,a){"use strict";var r=a(33),n=a(44),i=a(32),l=a(25),s=a(27),o=a(45),u=a(46),d=a(19),c=a(21);d(t,"__esModule",{value:!0}),t.default=t.GroupStore=void 0;var f,p,h,m,g=c(a(27)),v=c(a(102)),y=c(a(33)),b=c(a(65)),_=c(a(32)),S=c(a(57)),x=c(a(25)),w=c(a(51)),I=c(a(62)),C=c(a(71)),k=c(a(36)),D=c(a(54)),P=(c(a(72)),a(34)),T=c(a(48)),A=c(a(53));function M(e,t){var a=r(e);if(n){var s=n(e);t&&(s=i(s).call(s,(function(t){return l(e,t).enumerable}))),a.push.apply(a,s)}return a}function R(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)s(a=M(Object(r),!0)).call(a,(function(t){(0,k.default)(e,t,r[t])}));else if(o)u(e,o(r));else{var n;s(n=M(Object(r))).call(n,(function(t){d(e,t,l(r,t))}))}}return e}var N=(f=class extends A.default{constructor(){super(...arguments),(0,C.default)(this,"systemRoles",p,this),(0,C.default)(this,"domainRoles",h,this),(0,C.default)(this,"groupUsers",m,this),(0,k.default)(this,"updateUserGroup",((e,t,a,r,n)=>{var i={},{id:l}=e||{};(0,g.default)(t).call(t,(e=>{var{scope:{project:{id:t}={}}={},group:{id:r}={},role:{id:s}={}}=e;if(r===l&&s){var o=(0,v.default)(a).call(a,(e=>e.id===s));if(t)if(i[t])i[t].roles=[...i[t].roles,o];else{var u=(0,v.default)(n).call(n,(e=>e.id===t));i[t]={project:u,roles:[o]}}}}));var s=(0,v.default)(r).call(r,(t=>t.id===e.domain_id));return R(R({},e),{},{projects:i,projectCount:(0,y.default)(i).length,domain:s,domainName:(s||{}).name||e.domain_id})}))}get client(){return T.default.keystone.groups}get domainClient(){return T.default.keystone.domains}get systemGroupClient(){return T.default.keystone.systemGroups}get roleClient(){return T.default.keystone.roles}get roleAssignmentClient(){return T.default.keystone.roleAssignments}get userClient(){return T.default.keystone.users}get projectClient(){return T.default.keystone.projects}get paramsFunc(){return e=>{var{id:t,userId:a,groupId:r,roleId:n,projectId:i,domainId:l,withRole:s,all_projects:o}=e;return(0,I.default)(e,["id","userId","groupId","roleId","projectId","domainId","withRole","all_projects"])}}listFetchByClient(e,t){var{userId:a}=t;return a?this.userClient.groups.list(a,e):this.client.list(e)}edit(e){var t=this;return(0,w.default)((function*(){var{id:a,description:r,name:n}=e,i={group:{description:r,name:n}};return t.submitting(t.client.patch(a,i))}))()}fetchSystemRole(e){var t=this;return(0,w.default)((function*(){var{id:a}=e;t.systemRoles=[];var r=yield t.systemGroupClient.roles.list(a);t.systemRoles=r.roles}))()}assignSystemRole(e){var t=this;return(0,w.default)((function*(){var{id:a,roleId:r}=e;return t.systemGroupClient.roles.update(a,r)}))()}deleteSystemRole(e){var t=this;return(0,w.default)((function*(){var{id:a,roleId:r}=e;return t.systemGroupClient.roles.delete(a,r)}))()}fetchDomainRole(e){var t=this;return(0,w.default)((function*(){var{id:a,domain_id:r}=e;t.domainRoles=[];var n=yield t.domainClient.groups.roles.list(r,a);t.domainRoles=n.roles}))()}assignDomainRole(e){var t=this;return(0,w.default)((function*(){var{id:a,roleId:r,domain_id:n}=e;return t.domainClient.groups.roles.update(n,a,r)}))()}deleteDomainRole(e){var t=this;return(0,w.default)((function*(){var{id:a,roleId:r,domain_id:n}=e;return t.domainClient.groups.roles.delete(n,a,r)}))()}fetchGroupUsers(e){var t=this;return(0,w.default)((function*(){var{id:a}=e,r=yield t.client.users.list(a),{users:n}=r;return t.groupUsers=n,n}))()}deleteGroupUsers(e){var t=this;return(0,w.default)((function*(){var{id:a,userId:r}=e;return t.client.users.delete(a,r)}))()}addGroupUsers(e){var t=this;return(0,w.default)((function*(){var{id:a,userId:r}=e;return t.client.users.update(a,r)}))()}listDidFetch(e,t,a){var r=this;return(0,w.default)((function*(){if(!e.length)return e;var{projectId:t,roleId:n,domainId:i,withRole:l=!0}=a,s={};t&&(s["scope.project.id"]=t),n&&(s["role.id"]=n);var[o,u,d,c]=yield b.default.all([l?r.roleAssignmentClient.list(s):null,l?r.roleClient.list():null,r.domainClient.list(),l?r.projectClient.list():null]),{roles:f=[]}=u||{},{domains:p=[]}=d,{projects:h=[]}=c||{},{role_assignments:m=[]}=o||{},g=e;return i&&(g=(0,_.default)(e).call(e,(e=>e.domain_id===i))),g=(0,S.default)(g).call(g,(e=>r.updateUserGroup(e,m,f,p,h))),t||n?(0,_.default)(g).call(g,(e=>e.projectCount)):g}))()}detailDidFetch(e){var t=this;return(0,w.default)((function*(){var{id:a}=e,[r,n]=yield b.default.all([t.domainClient.list(),t.client.users.list(a)]),{domains:i=[]}=r,{users:l=[]}=n,s=t.updateUserGroup(e,[],[],i,[]);return s.userCount=l.length,s}))()}},p=(0,D.default)(f.prototype,"systemRoles",[P.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),h=(0,D.default)(f.prototype,"domainRoles",[P.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),m=(0,D.default)(f.prototype,"groupUsers",[P.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),(0,D.default)(f.prototype,"edit",[P.action],(0,x.default)(f.prototype,"edit"),f.prototype),(0,D.default)(f.prototype,"fetchSystemRole",[P.action],(0,x.default)(f.prototype,"fetchSystemRole"),f.prototype),(0,D.default)(f.prototype,"assignSystemRole",[P.action],(0,x.default)(f.prototype,"assignSystemRole"),f.prototype),(0,D.default)(f.prototype,"deleteSystemRole",[P.action],(0,x.default)(f.prototype,"deleteSystemRole"),f.prototype),(0,D.default)(f.prototype,"fetchDomainRole",[P.action],(0,x.default)(f.prototype,"fetchDomainRole"),f.prototype),(0,D.default)(f.prototype,"assignDomainRole",[P.action],(0,x.default)(f.prototype,"assignDomainRole"),f.prototype),(0,D.default)(f.prototype,"deleteDomainRole",[P.action],(0,x.default)(f.prototype,"deleteDomainRole"),f.prototype),(0,D.default)(f.prototype,"fetchGroupUsers",[P.action],(0,x.default)(f.prototype,"fetchGroupUsers"),f.prototype),(0,D.default)(f.prototype,"deleteGroupUsers",[P.action],(0,x.default)(f.prototype,"deleteGroupUsers"),f.prototype),(0,D.default)(f.prototype,"addGroupUsers",[P.action],(0,x.default)(f.prototype,"addGroupUsers"),f.prototype),f);t.GroupStore=N;var E=new N;t.default=E},1242:function(e,t,a){"use strict";var r=a(33),n=a(44),i=a(32),l=a(25),s=a(27),o=a(45),u=a(46),d=a(19),c=a(21);d(t,"__esModule",{value:!0}),t.default=t.BackupStore=void 0;var f,p,h=c(a(81)),m=c(a(25)),g=c(a(62)),v=c(a(51)),y=c(a(71)),b=c(a(36)),_=c(a(54)),S=(c(a(72)),a(34)),x=c(a(48)),w=c(a(53)),I=a(410);function C(e,t){var a=r(e);if(n){var s=n(e);t&&(s=i(s).call(s,(function(t){return l(e,t).enumerable}))),a.push.apply(a,s)}return a}function k(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)s(a=C(Object(r),!0)).call(a,(function(t){(0,b.default)(e,t,r[t])}));else if(o)u(e,o(r));else{var n;s(n=C(Object(r))).call(n,(function(t){d(e,t,l(r,t))}))}}return e}var D=(f=class extends w.default{constructor(){super(...arguments),(0,y.default)(this,"currentVolumeSize",p,this),(0,b.default)(this,"updateParamsSortPage",((e,t,a)=>{var r;t&&a&&(e.sort=(0,h.default)(r="".concat(t,":")).call(r,"descend"===a?"desc":"asc"))}))}get client(){return x.default.cinder.backups}get listWithDetail(){return!0}get mapperBeforeFetchProject(){return e=>k(k({},e),{},{project_id:e.project_id||e["os-backup-project-attr:project_id"]})}detailDidFetch(e){return(0,v.default)((function*(){var{volume_id:t}=e;try{var a=new I.VolumeStore,r=yield a.fetchDetail({id:t});e.volume=r,e.volume_name=r.name}catch(e){}return e}))()}get paramsFuncPage(){return e=>{var{current:t,all_projects:a}=e;return k({all_tenants:a},(0,g.default)(e,["current","all_projects"]))}}restore(e,t){var a={restore:t||{}};return this.submitting(this.client.restore(e,a))}setCurrentVolume(e){var{size:t=0}=e||{};this.currentVolumeSize=t||0}},p=(0,_.default)(f.prototype,"currentVolumeSize",[S.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),(0,_.default)(f.prototype,"restore",[S.action],(0,m.default)(f.prototype,"restore"),f.prototype),(0,_.default)(f.prototype,"setCurrentVolume",[S.action],(0,m.default)(f.prototype,"setCurrentVolume"),f.prototype),f);t.BackupStore=D;var P=new D;t.default=P},1243:function(e,t,a){"use strict";var r=a(33),n=a(44),i=a(32),l=a(25),s=a(27),o=a(45),u=a(46),d=a(19),c=a(21);d(t,"__esModule",{value:!0}),t.default=t.MetadataStore=void 0;var f,p,h,m=c(a(65)),g=c(a(57)),v=c(a(27)),y=c(a(25)),b=c(a(51)),_=c(a(71)),S=c(a(36)),x=c(a(54)),w=(c(a(72)),a(34)),I=c(a(48)),C=c(a(53));function k(e,t){var a=r(e);if(n){var s=n(e);t&&(s=i(s).call(s,(function(t){return l(e,t).enumerable}))),a.push.apply(a,s)}return a}function D(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)s(a=k(Object(r),!0)).call(a,(function(t){(0,S.default)(e,t,r[t])}));else if(o)u(e,o(r));else{var n;s(n=k(Object(r))).call(n,(function(t){d(e,t,l(r,t))}))}}return e}var P=(f=class extends C.default{constructor(){super(...arguments),(0,_.default)(this,"resourceTypes",p,this),(0,_.default)(this,"resourceTypeLoading",h,this)}get client(){return I.default.glance.namespaces}get resourceTypeClient(){return I.default.glance.resourceTypes}get needGetProject(){return!1}listDidFetch(e,t,a){var r=this;return(0,b.default)((function*(){var{manage:t,resource_types:n}=a;if(!t)return e;var i=yield m.default.all((0,g.default)(e).call(e,(e=>{var{namespace:t}=e;return r.client.show(t,{resource_type:n})})));(0,v.default)(e).call(e,((e,t)=>{e.detail=i[t]}));var l=[];return(0,v.default)(e).call(e,(e=>{var t;e.detail.objects?(0,v.default)(t=e.detail.objects).call(t,(t=>{l.push(D(D({},e),{},{detail:t,isObject:!0,objName:t.name,objDescription:t.description}))})):l.push(e)})),l}))()}get mapper(){return e=>{var{visibility:t,namespace:a,display_name:r,resource_type_associations:n=[]}=e;return(0,v.default)(n).call(n,(e=>{e.prefix=e.prefix||""})),D(D({},e),{},{public:"public"===t,id:a,name:r,resource_type_associations:n})}}fetchDetail(e){var t=this;return(0,b.default)((function*(){var{id:a}=e;t.isLoading=!0;var r=yield t.client.show(a);return t.detail=r,t.isLoading=!1,r}))()}edit(e,t){var{id:a}=e;return this.submitting(this.client.update(a,t))}create(e){return this.submitting(this.client.create(e))}fetchResourceTypes(e){var t=this;return(0,b.default)((function*(){t.resourceTypeLoading=!0;var a=yield t.resourceTypeClient.list(),{resource_type_associations:r=[]}=e||{},{resource_types:n=[]}=a,i={};(0,v.default)(r).call(r,(e=>{i[e.name]=e.prefix||""})),(0,v.default)(n).call(n,(e=>{e.id=e.name,i[e.name]&&(e.prefix=i[e.name])})),t.resourceTypes=n,t.resourceTypeLoading=!1}))()}manageResourceTypes(e,t,a){var r=this;return(0,b.default)((function*(){return r.isSubmitting=!0,yield m.default.all((0,g.default)(t).call(t,(t=>r.client.resourceTypes.delete(e,t.name)))),r.submitting(m.default.all((0,g.default)(a).call(a,(t=>{var a={name:t.name,prefix:t.prefix};return r.client.resourceTypes.create(e,a)}))))}))()}},p=(0,x.default)(f.prototype,"resourceTypes",[w.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),h=(0,x.default)(f.prototype,"resourceTypeLoading",[w.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),(0,x.default)(f.prototype,"fetchDetail",[w.action],(0,y.default)(f.prototype,"fetchDetail"),f.prototype),(0,x.default)(f.prototype,"edit",[w.action],(0,y.default)(f.prototype,"edit"),f.prototype),(0,x.default)(f.prototype,"create",[w.action],(0,y.default)(f.prototype,"create"),f.prototype),(0,x.default)(f.prototype,"fetchResourceTypes",[w.action],(0,y.default)(f.prototype,"fetchResourceTypes"),f.prototype),(0,x.default)(f.prototype,"manageResourceTypes",[w.action],(0,y.default)(f.prototype,"manageResourceTypes"),f.prototype),f);t.MetadataStore=P;var T=new P;t.default=T},1245:function(e,a,r){"use strict";var n=r(33),i=r(44),l=r(32),s=r(25),o=r(27),u=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.getFormDefaultValues=a.getFormItems=a.getFormItemType=a.getTemplate=a.rollbackTip=a.paramTip=a.yamlTip=a.getYaml=a.validateYaml=a.stackStatus=void 0;var p=f(r(65)),h=f(r(27)),m=f(r(33)),g=f(r(36)),v=f(r(99)),y=f(r(559)),b=f(r(1369)),_=r(334);function S(e,t){var a=n(e);if(i){var r=i(e);t&&(r=l(r).call(r,(function(t){return s(e,t).enumerable}))),a.push.apply(a,r)}return a}var x={INIT_IN_PROGRESS:t("Init In Progress"),INIT_COMPLETE:t("Init Complete"),INIT_FAILED:t("Init Failed"),CREATE_IN_PROGRESS:t("Create In Progress"),CREATE_COMPLETE:t("Create Complete"),CREATE_FAILED:t("Create Failed"),DELETE_IN_PROGRESS:t("Delete In Progress"),DELETE_COMPLETE:t("Delete Complete"),DELETE_FAILED:t("Delete Failed"),UPDATE_IN_PROGRESS:t("Update In Progress"),UPDATE_COMPLETE:t("Update Complete"),UPDATE_FAILED:t("Update Failed"),ROLLBACK_IN_PROGRESS:t("Rollback In Progress"),ROLLBACK_COMPLETE:t("Rollback Complete"),ROLLBACK_FAILED:t("Rollback Failed"),SUSPEND_IN_PROGRESS:t("Suspend In Progress"),SUSPEND_COMPLETE:t("Suspend Complete"),SUSPEND_FAILED:t("Suspend Failed"),RESUME_IN_PROGRESS:t("Resume In Progress"),RESUME_COMPLETE:t("Resume Complete"),RESUME_FAILED:t("Resume Failed"),ADOPT_IN_PROGRESS:t("Adopt In Progress"),ADOPT_COMPLETE:t("Adopt Complete"),ADOPT_FAILED:t("Adopt Failed"),SNAPSHOT_IN_PROGRESS:t("Snapshot In Progress"),SNAPSHOT_COMPLETE:t("Snapshot Complete"),SNAPSHOT_FAILED:t("Snapshot Failed"),CHECK_IN_PROGRESS:t("Check In Progress"),CHECK_COMPLETE:t("Check Complete"),CHECK_FAILED:t("Check Failed")};a.stackStatus=x;a.validateYaml=(e,a)=>{try{b.default.load(a)}catch(e){return p.default.reject(t("A template is a YAML file that contains configuration information, please enter the correct format."))}return p.default.resolve()};a.getYaml=e=>{try{return b.default.load(e,{schema:b.default.JSON_SCHEMA})}catch(e){return null}};var w=t("A template is a YAML file that contains configuration information.");a.yamlTip=w;var I=t("When your Yaml file is a fixed template, variable variables can be stored in an environment variable file to implement template deployment. The parameters in the environment variable file need to match the parameters defined in the template file.");a.paramTip=I;var C=t('If "Enable" fails to roll back, the resource will be deleted after the creation fails; if "Disable" fails to roll back, the resource will be retained after the creation fails.');a.rollbackTip=C;a.getTemplate=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{content:t}=e;return t};var k=e=>{switch(e){case"number":return{type:"input-number"};case"json":return{type:"input-json"};case"boolean":return{type:"radio",options:_.yesNoOptions};default:return{type:"input"}}};a.getFormItemType=k;a.getFormItems=e=>{var t=[];try{var a,r=b.default.load(e);if(!(0,v.default)(r))return t;var n=r.parameters;(0,h.default)(a=(0,m.default)(n)).call(a,(e=>{var a=n[e],{type:r="string",description:i="",label:l,hidden:f}=a,p=function(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)o(a=S(Object(r),!0)).call(a,(function(t){(0,g.default)(e,t,r[t])}));else if(u)d(e,u(r));else{var n;o(n=S(Object(r))).call(n,(function(t){c(e,t,s(r,t))}))}}return e}({name:e,label:l||e,extra:i,required:!0,hidden:f},k(r));t.push(p)}))}catch(e){}return t};a.getFormDefaultValues=e=>{var t={};try{var a,r=b.default.load(e);if(!(0,v.default)(r))return t;var n=r.parameters||{};(0,h.default)(a=(0,m.default)(n)).call(a,(e=>{var a=n[e];(0,y.default)(a,"default")?t[e]=a.default:"boolean"===a.type&&(t[e]=!1)}))}catch(e){}return t}},1253:function(e,a,r){"use strict";var n=r(33),i=r(44),l=r(32),s=r(25),o=r(27),u=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=a.StepCreate=void 0;var p=f(r(65)),h=f(r(198)),m=f(r(1204)),g=f(r(57)),v=f(r(1335)),y=f(r(81)),b=f(r(27)),_=f(r(33)),S=f(r(90));r(1239);var x=f(r(1240)),w=f(r(409));r(589);var I=f(r(590));r(1336);var C=f(r(426)),k=f(r(62)),D=f(r(51)),P=f(r(36)),T=f(r(131)),A=f(r(1537)),M=f(r(199)),R=f(r(0)),N=r(406),E=r(34),j=(r(173),r(1193)),F=f(r(408)),L=f(r(407)),z=f(r(4)),O=r(1195),B=r(161),V=f(r(1228)),U=f(r(3485)),q=f(r(3489)),Q=f(r(3491)),G=f(r(3498)),K=f(r(1540));function H(e,t){var a=n(e);if(i){var r=i(e);t&&(r=l(r).call(r,(function(t){return s(e,t).enumerable}))),a.push.apply(a,r)}return a}function W(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)o(a=H(Object(r),!0)).call(a,(function(t){(0,P.default)(e,t,r[t])}));else if(u)d(e,u(r));else{var n;o(n=H(Object(r))).call(n,(function(t){c(e,t,s(r,t))}))}}return e}class Y extends j.StepAction{constructor(){super(...arguments),(0,P.default)(this,"onCountChange",(e=>{var{data:t}=this.state;this.setState({data:W(W({},t),{},{count:e})})})),(0,P.default)(this,"onSubmit",(e=>e?this.store.create(e):(this.errorMsg&&V.default.error(this.errorMsg),p.default.reject()))),(0,P.default)(this,"onOk",(()=>{var{data:e}=this.state;this.values=e;var a=this.getSubmitData(e);a?this.onSubmit(a).then((()=>{this.routing.push(this.listUrl),V.default.success(this.successText)}),(e=>{if(e&&!(0,M.default)(e)){var{response:{data:a}={}}=e||{},{forbidden:{message:r=""}={}}=a||{};r&&(0,T.default)(r)&&(0,h.default)(r).call(r,"Quota exceeded")?V.default.error(t("Quota exceeded")):V.default.errorWithDetail(a,this.errorText)}})):V.default.errorWithDetail(null,this.errorText)}))}init(){this.store=F.default,this.projectStore=L.default,this.state.quotaLoading=!0,this.getQuota(),this.status="success",this.errorMsg=""}static allowed(e,t){var{isAdminPage:a=!1}=t;return p.default.resolve(!a)}getQuota(){var e=this;return(0,D.default)((function*(){e.setState({quotaLoading:!0}),yield p.default.all([e.projectStore.fetchProjectNovaQuota(),e.projectStore.fetchProjectCinderQuota()]),e.setState({quotaLoading:!1}),e.onCountChange(1)}))()}get disableNext(){return!!this.errorMsg}get disableSubmit(){return!!this.errorMsg}get instanceQuota(){var{instances:{left:e=0}={}}=(0,E.toJS)(this.projectStore.novaQuota)||{};return-1===e?1/0:e}get name(){return t("Create instance")}get enableCinder(){return this.props.rootStore.checkEndpoint("cinder")}get listUrl(){var{image:e,volume:t,servergroup:a}=this.locationParams;return e?this.getRoutePath("image"):t?this.getRoutePath("volume"):a?this.getRoutePath("serverGroupDetail",{id:a}):this.getRoutePath("instance")}get hasConfirmStep(){return!1}get steps(){return[{title:t("Base Config"),component:G.default},{title:t("Network Config"),component:Q.default},{title:t("System Config"),component:q.default},{title:t("Confirm Config"),component:U.default}]}get instanceName(){var e,t,{name:a,count:r=1}=(0,m.default)(this)||{};return 1===r?this.unescape(a):this.unescape((0,g.default)(e=(0,v.default)(t=new Array(r)).call(t,r)).call(e,((e,t)=>{var r;return(0,y.default)(r="".concat(a,"-")).call(r,t+1)})).join(", "))}get successText(){return t("The creation instruction was issued successfully, instance: {name}. \n You can wait for a few seconds to follow the changes of the list data or manually refresh the data to get the final display result.",{action:this.name.toLowerCase(),name:this.instanceName})}get showQuota(){return!0}get quotaInfo(){var{quotaLoading:e}=this.state;if(e)return[];var{instances:a={},cores:r={},ram:n={}}=(0,E.toJS)(this.projectStore.novaQuota)||{},{data:i={}}=this.state,{count:l=1}=i,s=this.checkQuotaInput(),o=W(W({},a),{},{add:s?0:l,name:"instance",title:t("Instance")}),{newCPU:u,newRam:d}=this.getFlavorInput(),c=W(W({},r),{},{add:s?0:u,name:"cpu",title:t("CPU"),type:"line"}),f=W(W({},n),{},{add:s?0:d,name:"ram",title:t("Memory (GiB)"),type:"line"}),p=this.getVolumeQuota(),{totalNewCount:h,totalNewSize:m}=this.getVolumeInputMap(),g=W(W({},p.volumes),{},{add:s?0:h,name:"volume",title:t("Volume"),type:"line"}),v=W(W({},p.gigabytes),{},{add:s?0:m,name:"volumeSize",title:t("Volume Capacity (GiB)"),type:"line"}),y=this.getServerGroupQuota(),b=[o,c,f,g,v];if(y){var{add:_}=y,S=W(W({},(0,k.default)(y,["add"])),{},{add:s?0:_});b.push(S)}return b}get errorText(){var{status:e}=this.state;return"error"===e?t("Unable to create instance: insufficient quota to create resources."):this.ipBatchError?t("Unable to create instance: batch creation is not supported when specifying IP."):t("The creation instruction has been issued, please refresh to see the actual situation in the list.")}getVolumeQuota(){var e,t=(0,E.toJS)(this.projectStore.cinderQuota)||{},a={};return(0,b.default)(e=(0,_.default)(t)).call(e,(e=>{((0,h.default)(e).call(e,"volumes")||(0,h.default)(e).call(e,"gigabytes"))&&(a[e]=t[e])})),a}getQuotaMessage(e,a,r){var{left:n=0}=a||{};return-1===n?"":e>n?t("Insufficient {name} quota to create resources(left { quota }, input { input }).",{name:r,quota:n,input:e}):""}getVolumeInputMap(){var{data:e}=this.state,{systemDisk:t={},dataDisk:a=[],count:r=1,source:{value:n}={},instanceSnapshotDisk:i={}}=e,l={},s={},o=0,u=0;if("instanceSnapshot"===n&&i){var{size:d,typeOption:{label:c}={}}=i;c&&(l[c]=l[c]?l[c]+1:1,s[c]=s[c]?s[c]+d:d,o+=1*r,u+=d*r)}else if(t.type){var{size:f}=t,{label:p}=t.typeOption||{};l[p]=l[p]?l[p]+1:1,s[p]=s[p]?s[p]+f:f,o+=1*r,u+=f*r}return a&&(0,b.default)(a).call(a,(e=>{if(e.value&&e.value.type){var{size:t}=e.value,{label:a}=e.value.typeOption||{};l[a]=l[a]?l[a]+1*r:1*r,s[a]=s[a]?s[a]+t*r:t*r,o+=1*r,u+=t*r}})),{totalNewCount:o,totalNewSize:u,newCountMap:l,newSizeMap:s}}checkVolumeQuota(){var e,a;if(!this.enableCinder)return"";var r="",{totalNewCount:n,totalNewSize:i,newCountMap:l,newSizeMap:s}=this.getVolumeInputMap(),o=this.getVolumeQuota(),u=this.getQuotaMessage(n,o.volumes,t("volume"));if(u)return u;var d=this.getQuotaMessage(i,o.gigabytes,t("volume capacity"));return d||((0,b.default)(e=(0,_.default)(l)).call(e,(e=>{var a=this.getQuotaMessage(l[e],o["volumes_".concat(e)],t("volume type {type}",{type:e}));a&&(r=a)})),r||((0,b.default)(a=(0,_.default)(s)).call(a,(e=>{var a=this.getQuotaMessage(s[e],o["gigabytes_".concat(e)],t("volume type {type} capacity",{type:e}));a&&(r=a)})),r))}getFlavorInput(){var{data:e}=this.state,{flavor:t={},count:a=1}=e,{selectedRows:r=[]}=t,{vcpus:n=0,ram:i=0}=r[0]||{};return{newCPU:n*a,newRam:(0,B.getGiBValue)(i)*a}}checkFlavorQuota(){var{newCPU:e,newRam:a}=this.getFlavorInput(),{cores:r={},ram:n={}}=this.projectStore.novaQuota,{left:i=0}=r||{},{left:l=0}=n||{};return-1!==i&&i<e?this.getQuotaMessage(e,r,t("CPU")):-1!==l&&l<a?this.getQuotaMessage(a,n,t("Memory")):""}getServerGroupQuota(){var{data:e}=this.state,{serverGroupRow:a,count:r=1}=e;if(!a)return null;var{server_group_members:{limit:n=0}={}}=this.projectStore.novaQuota,{members:i=[]}=a||{},l=i.length;return{add:r,used:l,limit:n,left:-1===n?-1:n-l,title:t("Server Group Member"),name:"serverGroupMember",type:"line"}}checkSeverGroupQuota(){var e=this.getServerGroupQuota();if(!e)return"";var{add:a,left:r}=e||{};return-1!==r&&r<a?this.getQuotaMessage(a,e,t("Server Group Member")):""}get badgeStyle(){return{marginTop:8,marginBottom:8,marginLeft:10,maxWidth:600}}checkInstanceQuota(){var{quotaLoading:e}=this.state;if(e)return"";var{instances:a={}}=this.projectStore.novaQuota||{};return 0===this.instanceQuota?this.getQuotaMessage(1,a,t("Instance")):""}checkQuotaInput(){var e=this.checkInstanceQuota(),t=this.checkFlavorQuota(),a=this.checkVolumeQuota(),r=this.checkSeverGroupQuota(),n=e||t||a||r;return n?(this.status="error",this.errorMsg!==n&&C.default.error(n),this.errorMsg=n,n):(this.status="success",this.errorMsg="","")}renderBadge(){var e=this.checkQuotaInput();return"success"===this.status?null:R.default.createElement("div",{style:this.badgeStyle},R.default.createElement(I.default,{status:"error",text:e}))}renderExtra(){return null}renderFooterLeft(){var{data:e}=this.state,{count:a=1,source:{value:r}={}}=e,n={min:1,max:"bootableVolume"===r?1:(0,A.default)(this.instanceQuota)?this.instanceQuota:100,precision:0,onChange:this.onCountChange,formatter:e=>"$ ".concat(e).replace(/\D/g,"")};return R.default.createElement("div",{style:{display:"flex"}},R.default.createElement("div",{style:{display:"flex",alignItems:"center"}},R.default.createElement("div",{className:K.default["number-input"]},R.default.createElement("span",null,t("Count")),R.default.createElement(x.default,(0,w.default)({},n,{value:a,className:(0,z.default)(K.default.input,"instance-count")}))),this.renderExtra()),this.renderBadge())}getVolumeAndImageData(e){if("error"===this.status)return null;var{bootableVolume:t,dataDisk:a,image:r,instanceSnapshot:n,instanceSnapshotDisk:i,source:l,systemDisk:s}=e,{value:o}=l,u="bootableVolume"===o?null:"image"===o?r.selectedRowKeys[0]:n.selectedRowKeys[0];if(!this.enableCinder)return{imageRef:u};var d={};if("bootableVolume"!==o){var{deleteType:c,type:f,size:p}=s||{};d={boot_index:0,uuid:u,source_type:"image",volume_size:p,destination_type:"volume",volume_type:f,delete_on_termination:1===c},"instanceSnapshot"===o&&i&&(delete d.volume_size,delete d.volume_type,delete d.delete_on_termination)}else d={boot_index:0,uuid:t.selectedRowKeys[0],source_type:"volume",destination_type:"volume"};var h=a?(0,g.default)(a).call(a,(e=>{var{size:t,type:a,deleteType:r}=e.value||{};return{source_type:"blank",volume_size:t,destination_type:"volume",volume_type:a,delete_on_termination:1===r}})):[];return"image"===o&&"iso"===r.selectedRows[0].disk_format&&h[0]&&(h[0].boot_index=0,h[0].device_type="disk",d.boot_index=1,d.device_type="cdrom"),{volumes:[d,...h],imageRef:u}}getNetworkData(e){var{networks:t=[],ports:a={}}=e,r=!1,n=[];(0,b.default)(t).call(t,(e=>{var t={uuid:e.value.network};1===e.value.ipType&&e.value.ip&&(t.fixed_ip=e.value.ip,r=!0),n.push(t)}));var{selectedRowKeys:i=[]}=a||{};return(0,b.default)(i).call(i,(e=>{var t={port:e};n.push(t)})),{data:n,hasIp:r}}getSubmitData(e){if("error"===this.status)return null;var{volumes:t,imageRef:a}=this.getVolumeAndImageData(e),{data:r,hasIp:n}=this.getNetworkData(e),{availableZone:i,keypair:l,loginType:s,password:o,physicalNode:u,physicalNodeType:d,securityGroup:c,flavor:f,userData:p="",serverGroup:h,name:m,count:v=1}=e;if(n&&v>1)return this.ipBatchError=!0,null;var{selectedRows:y=[]}=c||{},b={security_groups:(0,g.default)(y).call(y,(e=>({name:e.id}))),name:m,flavorRef:f.selectedRowKeys[0],availability_zone:i.value,networks:r};this.enableCinder&&(b.block_device_mapping_v2=t),a&&!t&&(b.imageRef=a),"keypair"===s.value?b.key_name=l.selectedRowKeys[0]:b.adminPass=o,v>1&&(b.min_count=v,b.max_count=v,b.return_reservation_id=!0),"smart"!==d.value&&(b.hypervisor_hostname=u.selectedRows[0].hypervisor_hostname),(b.adminPass||p)&&(b.user_data=btoa((0,O.getUserData)(b.adminPass,p)));var _={server:b};return h&&h.selectedRowKeys.length>0&&(_["OS-SCH-HNT:scheduler_hints"]={group:h.selectedRowKeys[0]}),_}}a.StepCreate=Y,(0,P.default)(Y,"id","instance-create"),(0,P.default)(Y,"title",t("Create Instance")),(0,P.default)(Y,"path",((e,t)=>{var a,{detail:r,match:n}=t||{};return!r||(0,M.default)(r)?"/compute/instance/create":(0,S.default)(a=n.path).call(a,"/compute/server")>=0?"/compute/instance/create?servergroup=".concat(r.id):void 0})),(0,P.default)(Y,"policy",["os_compute_api:servers:create","os_compute_api:os-availability-zone:list"]);var Z=(0,N.inject)("rootStore")((0,N.observer)(Y));a.default=Z},1254:function(e,a,r){"use strict";r(19)(a,"__esModule",{value:!0}),a.getNeutronAgentServiceStatus=a.getNeutronAgentServiceState=a.serviceState=a.serviceStatus=void 0;var n={enabled:t("Enabled"),disabled:t("Disabled")};a.serviceStatus=n;var i={up:t("Up"),down:t("Down")};a.serviceState=i;a.getNeutronAgentServiceState=e=>e?i.up:i.down;a.getNeutronAgentServiceStatus=e=>e?n.enabled:n.disabled},1262:function(e,t,a){"use strict";var r=a(33),n=a(44),i=a(32),l=a(25),s=a(27),o=a(45),u=a(46),d=a(19),c=a(21);d(t,"__esModule",{value:!0}),t.default=t.AvailabilityZoneStore=void 0;var f,p=c(a(27)),h=c(a(33)),m=c(a(57)),g=c(a(25)),v=c(a(36)),y=c(a(51)),b=c(a(54)),_=c(a(1259)),S=c(a(199)),x=a(34),w=c(a(48)),I=c(a(53));function C(e,t){var a=r(e);if(n){var s=n(e);t&&(s=i(s).call(s,(function(t){return l(e,t).enumerable}))),a.push.apply(a,s)}return a}function k(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)s(a=C(Object(r),!0)).call(a,(function(t){(0,v.default)(e,t,r[t])}));else if(o)u(e,o(r));else{var n;s(n=C(Object(r))).call(n,(function(t){d(e,t,l(r,t))}))}}return e}var D=(f=class extends I.default{get client(){return w.default.nova.zone}get listResponseKey(){return this.responseKey}get listWithDetail(){return!0}get mapper(){return e=>{var{available:t}=e.zoneState;return e.available=t,e}}listDidFetch(e){return(0,y.default)((function*(){var t=[];return(0,p.default)(e).call(e,(e=>{var{hosts:a}=e;if((0,_.default)(a))t.push(e);else{var r,n={};(0,p.default)(r=(0,h.default)(a)).call(r,(e=>{var t=a[e];t["nova-compute"]&&(n[e]=t)})),(0,S.default)(n)||t.push(k(k({},e),{},{host:n}))}})),t}))()}fetchListWithoutDetail(){var e=this;return(0,y.default)((function*(){var t=(yield e.client.list())[e.listResponseKey];e.list.data=(0,m.default)(t).call(t,e.mapper)}))()}},(0,b.default)(f.prototype,"fetchListWithoutDetail",[x.action],(0,g.default)(f.prototype,"fetchListWithoutDetail"),f.prototype),f);t.AvailabilityZoneStore=D;var P=new D;t.default=P},1274:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.securityGroupFilter=a.securityGroupColumns=void 0;var l=i(r(0)),s=i(r(3492)),o=[{title:t("Name"),dataIndex:"name"},{title:t("Description"),dataIndex:"description"},{title:t("Created At"),dataIndex:"created_at",valueRender:"sinceTime"},{title:t("Rules"),dataIndex:"rules",render:(e,t)=>l.default.createElement(s.default,{item:t})}];a.securityGroupColumns=o;var u=[{label:t("Name"),name:"name"}];a.securityGroupFilter=u},1275:function(e,a,r){"use strict";var n=r(160),i=r(19),l=r(25),s=r(21);i(a,"__esModule",{value:!0}),a.default=a.FlavorSelectTable=void 0;var o=s(r(102)),u=s(r(32)),d=s(r(90)),c=s(r(562)),f=s(r(57));r(581);var p=s(r(423)),h=s(r(51)),m=s(r(36)),g=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var a=I(t);if(a&&a.has(e))return a.get(e);var r={},n=i&&l;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var o=n?l(e,s):null;o&&(o.get||o.set)?i(r,s,o):r[s]=e[s]}r.default=e,a&&a.set(e,r);return r}(r(0)),v=r(406),y=r(34),b=s(r(1321)),_=(r(173),s(r(1276))),S=s(r(1218)),x=r(1213),w=s(r(3499));function I(e){if("function"!=typeof n)return null;var t=new n,a=new n;return(I=function(e){return e?a:t})(e)}class C extends g.Component{constructor(e){super(e),(0,m.default)(this,"onArchChange",(e=>{this.setState({arch:e.target.value})})),(0,m.default)(this,"onCategoryChange",(e=>{this.setState({category:e.target.value})})),(0,m.default)(this,"onChange",(e=>{var{onChange:t}=this.props;t&&t(e)})),this.state={arch:null,category:null},this.init()}get labelStyle(){return{marginRight:16}}getSettings(){var e=this;return(0,h.default)((function*(){yield e.settingStore.fetchList(),e.initDefaultValue()}))()}getFlavors(){var e=this;return(0,h.default)((function*(){var{allProjects:t=!1}=e.props;yield e.flavorStore.fetchList({all_projects:t}),e.initDefaultValue()}))()}get architectures(){var e,t={architecture:"custom"},a={architecture:"all"},{isIronic:r=!1,filterIronic:n=!0}=this.props,i=(0,o.default)(e=this.settingStore.list.data||[]).call(e,(e=>"flavor_families"===e.key));if(!i)return[a,t];var l=[];try{var s;l=(0,u.default)(s=i.value||[]).call(s,(e=>{var{architecture:t}=e;return!!t&&(!n||(r?(0,x.isBareMetal)(t):!(0,x.isBareMetal)(t)))}))}catch(e){}return[a,...l,t]}get categories(){var e,{arch:t}=this.state;if(!t)return[];var a=(0,o.default)(e=this.architectures).call(e,(e=>e.architecture===t));return a&&a.categories||[]}get flavors(){var e,t,a,r,{flavor:n,isIronic:i=!1,filterIronic:l=!0,excludeFlavors:s=[]}=this.props,{arch:o,category:c}=this.state;return o?(0,u.default)(e=(0,u.default)(t=(0,u.default)(a=(0,u.default)(r=this.flavorStore.list.data||[]).call(r,(e=>!(s.length>0)||(0,d.default)(s).call(s,e.id)<0))).call(a,(e=>!n||e.name!==n))).call(t,(e=>!l||(i?(0,x.isBareMetalFlavor)(e):!(0,x.isBareMetalFlavor)(e))))).call(e,(e=>"all"===o||("custom"===o?e.architecture===o:e.architecture===o&&e.category===c))):[]}getBaseColumns(){var{category:e,arch:a}=this.state,r=[...(0,x.getBaseColumns)()];return r[0].title=t("Name"),(0,c.default)(r).call(r,1,1),(0,x.categoryHasIOPS)(e)||(r=(0,u.default)(r).call(r,(e=>"quota:disk_total_iops_sec"!==e.dataIndex))),(0,x.categoryHasEphemeral)(e)||(r=(0,u.default)(r).call(r,(e=>"OS-FLV-EXT-DATA:ephemeral"!==e.dataIndex))),"all"===a&&(r=[...r,{title:t("Architecture"),dataIndex:"id",render:(e,t)=>(0,x.getFlavorArchInfo)(t)}]),r}getGpuColumns(){var{category:e}=this.state;return"compute_optimized_type"===e?(0,u.default)(x.gpuColumns).call(x.gpuColumns,(e=>{var t;return(0,d.default)(t=e.dataIndex).call(t,"gpu")<0})):(0,u.default)(x.gpuColumns).call(x.gpuColumns,(e=>{var t;return(0,d.default)(t=e.dataIndex).call(t,"gpu")>=0}))}get columns(){var{arch:e}=this.state,t=this.getBaseColumns();if((0,x.isBareMetal)(e))return[...(0,u.default)(t).call(t,((e,t)=>t<3))];if("heterogeneous_computing"!==e)return t;var a=this.getGpuColumns();return[...t,...a]}initDefaultValue(){var{value:{selectedRowKeys:e=[]}={}}=this.props;if(e.length>0){var t,a=(0,o.default)(t=(0,y.toJS)(this.flavorStore.list.data)||[]).call(t,(t=>t.id===e[0]));if(a){var{architecture:r,category:n}=a;this.setState({arch:r,category:n})}}else{var i=this.architectures[0].architecture,l=null;this.architectures[0].categories&&(l=this.architectures[0].categories[0].name),this.setState({arch:i,category:l})}}init(){this.settingStore=_.default,this.flavorStore=S.default,this.getSettings(),this.getFlavors()}renderArchButtons(){var e,{arch:t}=this.state,a=(0,f.default)(e=this.architectures).call(e,(e=>{var{architecture:t}=e,a=x.flavorArchitectures[t]||t;return g.default.createElement(p.default.Button,{value:t,key:t},a)}));return g.default.createElement(p.default.Group,{id:"flavor-select-arch",onChange:this.onArchChange,value:t,buttonStyle:"solid"},a)}renderCategoryButtons(){var e,{category:t}=this.state,a=(0,f.default)(e=this.categories).call(e,(e=>{var{name:t}=e,a=x.flavorCategoryList[t]||t;return g.default.createElement(p.default.Button,{value:t,key:t},a)}));return g.default.createElement(p.default.Group,{id:"flavor-select-category",onChange:this.onCategoryChange,value:t,buttonStyle:"solid"},a)}renderArchSelect(){return g.default.createElement("div",{className:w.default["flavor-tab"]},g.default.createElement("span",{className:w.default["flavor-label"]},t("Architecture")),this.renderArchButtons())}renderCategorySelect(){var{arch:e}=this.state;return"custom"===e||"all"===e?null:g.default.createElement("div",{className:w.default["flavor-tab"]},g.default.createElement("span",{className:w.default["flavor-label"]},t("Category")),this.renderCategoryButtons())}renderTableHeader(){return g.default.createElement("div",null,this.renderArchSelect(),this.renderCategorySelect())}render(){var{value:e,disabledFunc:a}=this.props,r=this.settingStore.list.isLoading&&this.flavorStore.list.isLoading,n={columns:this.columns,data:this.flavors,tableHeader:this.renderTableHeader(),isLoading:r,filterParams:[{label:t("Name"),name:"name"}],value:e,onChange:this.onChange,disabledFunc:a};return g.default.createElement(b.default,n)}}a.FlavorSelectTable=C;var k=(0,v.inject)("rootStore")((0,v.observer)(C));a.default=k},1276:function(e,t,a){"use strict";var r=a(19),n=a(21);r(t,"__esModule",{value:!0}),t.default=t.SettingStore=void 0;var i,l=n(a(32)),s=n(a(25)),o=n(a(51)),u=n(a(54)),d=a(34),c=n(a(48)),f=n(a(53)),p=(i=class extends f.default{get client(){return c.default.skyline.setting}listDidFetch(e){return(0,o.default)((function*(){return(0,l.default)(e).call(e,(e=>!e.hidden))}))()}update(e){return this.submitting(this.client.update(null,e))}},(0,u.default)(i.prototype,"update",[d.action],(0,s.default)(i.prototype,"update"),i.prototype),i);t.SettingStore=p;var h=new p;t.default=h},1300:function(e,a,r){"use strict";r(19)(a,"__esModule",{value:!0}),a.default=void 0;var n={"anti-affinity":t("Anti-Affinity"),affinity:t("Affinity"),"soft-anti-affinity":t("Soft-Anti-Affinity"),"soft-affinity":t("Soft-Affinity")};a.default=n},1301:function(e,a,r){"use strict";r(19)(a,"__esModule",{value:!0}),a.volumeTypeSelectProps=a.volumeTypeFilters=a.volumeTypeColumns=a.controls=a.creationMethod=a.consumerTypes=void 0;var n=r(557),i={"front-end":t("Frontend"),"back-end":t("Backend"),both:t("Both of Frontend and Backend")};a.consumerTypes=i;var l={manu:t("Manu"),auto:t("Auto")};a.creationMethod=l;var s={"front-end":t("Front End"),"back-end":t("Back End")};a.controls=s;var o=[{title:t("Name"),dataIndex:"name"},{title:t("Description"),dataIndex:"description",isHideable:!0,valueRender:"noValue"},{title:t("Public"),dataIndex:"is_public",valueRender:"yesNo"},{title:t("Shared"),dataIndex:"multiattach",valueRender:"yesNo",titleTip:n.multiTip,width:120}];a.volumeTypeColumns=o;var u=[{label:t("Name"),name:"name"}];a.volumeTypeFilters=u;var d={columns:o,filterParams:u};a.volumeTypeSelectProps=d},1302:function(e,a,r){"use strict";var n=r(33),i=r(44),l=r(32),s=r(25),o=r(27),u=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.fetchQuota=function(e){return C.apply(this,arguments)},a.checkQuotaDisable=a.getQuotaInfo=a.getAdd=a.getQuota=a.restoreTip=a.modeTip=a.backupModeList=a.createTip=a.backupStatus=void 0;var p=f(r(36)),h=f(r(51)),m=f(r(0)),g=f(r(407)),v=f(r(1242));function y(e,t){var a=n(e);if(i){var r=i(e);t&&(r=l(r).call(r,(function(t){return s(e,t).enumerable}))),a.push.apply(a,r)}return a}function b(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)o(a=y(Object(r),!0)).call(a,(function(t){(0,p.default)(e,t,r[t])}));else if(u)d(e,u(r));else{var n;o(n=y(Object(r))).call(n,(function(t){c(e,t,s(r,t))}))}}return e}var _={available:t("Available"),error:t("Error"),updating:t("Updating"),deleting:t("Deleting"),error_deleting:t("Error Deleting"),restoring:t("Restoring"),creating:t("Creating")};a.backupStatus=_;var S=m.default.createElement("span",null,m.default.createElement("span",{style:{fontWeight:600}},t("When you do online backup of the volume that has been bound, you need to pay attention to the following points:")),m.default.createElement("p",null,t("1. The backup can only capture the data that has been written to the volume at the beginning of the backup task, excluding the data in the cache at that time.")),m.default.createElement("p",null,t("2. To ensure the integrity of the data, it is recommended that you suspend the write operation of all files when creating a backup.")));a.createTip=S;var x=[{value:!1,label:t("Full Backup")},{value:!0,label:t("Increment Backup")}];a.backupModeList=x;var w=t("Create a full backup, the system will automatically create a new backup chain, the full backup name is the backup chain name; Create an incremental backup, the system will automatically create an incremental backup under the newly created backup chain.");a.modeTip=w;var I=m.default.createElement("span",null,m.default.createElement("span",{style:{fontWeight:600}},t("When you restore a backup, you need to meet one of the following conditions:")),m.default.createElement("p",null,t("1. The volume associated with the backup is available.")),m.default.createElement("p",null,t("2. The volume associated with the backup has been mounted, and the instance is shut down.")));function C(){return(C=(0,h.default)((function*(e){e.setState({quota:{},quotaLoading:!0});var t=yield g.default.fetchProjectCinderQuota();e.setState({quota:t,quotaLoading:!1})}))).apply(this,arguments)}a.restoreTip=I;var k=e=>{var{backups:t={},backup_gigabytes:a={}}=e||{};return{backups:t,gigabytes:a}};a.getQuota=k;var D=e=>{var{backups:t,gigabytes:a}=k(e),{left:r=0}=t||{},{left:n=0,limit:i}=a||{},{currentVolumeSize:l=0}=v.default,s=0!==r&&(0!==n&&(-1===i||n>=l))?1:0;return{add:s,addSize:1===s?l:0}};a.getAdd=D;a.getQuotaInfo=e=>{var{quota:a={},quotaLoading:r}=e.state;if(r)return[];var{backups:n={},gigabytes:i={}}=k(a),{add:l,addSize:s}=D(a);return[b(b({},n),{},{add:l,name:"backup",title:t("Volume Backup")}),b(b({},i),{},{add:s,name:"gigabytes",title:t("Volume Backup Capacity (GiB)"),type:"line"})]};a.checkQuotaDisable=()=>{var{cinderQuota:e={}}=g.default,{add:t}=D(e);return 0===t}},1303:function(e,a,r){"use strict";var n=r(33),i=r(44),l=r(32),s=r(25),o=r(27),u=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.getQoSPolicyTabs=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=w({backendPageStore:this.qosPolicyStore},e),r=[{title:t("Current Project QoS Policies"),key:"project",props:(0,b.default)({},a,w(w({},P({self:this})),{},{extraParams:{project_id:this.currentProjectId}}))},{title:t("Shared QoS Policies"),key:"shared",props:(0,b.default)({},a,w(w({},P({shared:!0,self:this})),{},{extraParams:{shared:!0}}))}];this.hasAdminRole&&r.push({title:t("All QoS Policies"),key:"all",props:(0,b.default)({},a,w(w({},P({all:!0,self:this})),{},{extraParams:{all_projects:!0}}))});return r},a.getQosPolicySelectTableProps=a.qosPolicySortProps=a.getQosPolicyFilters=a.getQosPolicyColumns=void 0;var p=f(r(81)),h=f(r(57)),m=f(r(562)),g=f(r(36));r(1198);var v=f(r(1199));r(1196);var y=f(r(1197)),b=f(r(593)),_=f(r(0)),S=(r(173),r(334));function x(e,t){var a=n(e);if(i){var r=i(e);t&&(r=l(r).call(r,(function(t){return s(e,t).enumerable}))),a.push.apply(a,r)}return a}function w(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)o(a=x(Object(r),!0)).call(a,(function(t){(0,g.default)(e,t,r[t])}));else if(u)d(e,u(r));else{var n;o(n=x(Object(r))).call(n,(function(t){c(e,t,s(r,t))}))}}return e}var I=e=>{var a,r,n,i,l,s,o,u,d;return"egress"===e.direction?(0,p.default)(s=(0,p.default)(o=(0,p.default)(u=(0,p.default)(d="".concat(t("Egress"),": ")).call(d,t("Max BandWidth"),": ")).call(u,e.max_kbps/1024," Mbps; ")).call(o,t("Max Burst"),": ")).call(s,e.max_burst_kbps/1024," Mbps"):"ingress"===e.direction?(0,p.default)(a=(0,p.default)(r=(0,p.default)(n=(0,p.default)(i="".concat(t("Ingress"),": ")).call(i,t("Max BandWidth"),": ")).call(n,e.max_kbps/1024," Mbps; ")).call(r,t("Max Burst"),": ")).call(a,e.max_burst_kbps/1024," Mbps"):(0,p.default)(l="".concat(t("DSCP Marking"),": ")).call(l,e.dscp_mark)},C=e=>{var{self:a,all:r=!1}=e,n=[{title:t("ID/Name"),dataIndex:"name",routeName:a.getRouteName("networkQosDetail")},{title:t("Description"),dataIndex:"description",sorter:!1},{title:t("Rules Number"),dataIndex:"rulesNumber",render:(e,t)=>t.rules.length,isHideable:!0,sorter:!1},{title:t("Rules"),dataIndex:"rules",render:e=>_.default.createElement(v.default,null,(0,h.default)(e).call(e,(e=>_.default.createElement(y.default,{span:24,key:e.direction},I(e))))),stringify:e=>(0,h.default)(e).call(e,(e=>I(e))).join("\n")},{title:t("Shared"),dataIndex:"shared",valueRender:"yesNo",width:80,sorter:!1},{title:t("Default Policy"),dataIndex:"is_default",valueRender:"yesNo",isHideable:!0,width:100,sorter:!1},{title:t("Created At"),dataIndex:"created_at",valueRender:"toLocalTime",isHideable:!0,sorter:!1}];return r&&(0,m.default)(n).call(n,2,0,{title:t("Project ID/Name"),dataIndex:"project_name",sortKey:"project_id"}),n};a.getQosPolicyColumns=C;var k=e=>{var{self:a,shared:r=!1}=e,n=[{label:t("Name"),name:"name"},{label:t("Description"),name:"description"}];return r||n.push({label:t("Shared"),name:"shared",options:S.yesNoOptions}),a.hasAdminRole&&n.push({label:t("Project ID"),name:"tenant_id"}),n};a.getQosPolicyFilters=k;var D={isSortByBack:!0,defaultSortKey:"name",defaultSortOrder:"descend"};a.qosPolicySortProps=D;var P=e=>{var{self:t,all:a,shared:r}=e;return w(w({},D),{},{columns:C({self:t,all:a}),filterParams:k({self:t,shared:r})})};a.getQosPolicySelectTableProps=P},1316:function(e,t,a){"use strict";var r=a(160),n=a(19),i=a(25),l=a(21);n(t,"__esModule",{value:!0}),t.default=void 0;var s=l(a(198)),o=l(a(27)),u=l(a(33)),d=l(a(335)),c=l(a(409)),f=l(a(36)),p=l(a(131)),h=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var a=_(t);if(a&&a.has(e))return a.get(e);var r={},l=n&&i;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var o=l?i(e,s):null;o&&(o.get||o.set)?n(r,s,o):r[s]=e[s]}r.default=e,a&&a.set(e,r);return r}(a(0)),m=l(a(16)),g=l(a(4)),v=a(1679),y=l(a(1680)),b=l(a(1682));function _(e){if("function"!=typeof r)return null;var t=new r,a=new r;return(_=function(e){return e?a:t})(e)}var S=e=>{if(!(0,p.default)(e))return e;if((0,s.default)(e).call(e,"<html>")){var t=/<\/h1>[\r\n]([\s\S]*)<\/body>/.exec(e);if(t)return t[1].replace(/<br \/>/g,"")}try{return JSON.parse(e)}catch(t){return e}},x=(e,t)=>{var a;return(0,p.default)(e)?S(e):((0,o.default)(a=(0,u.default)(e)).call(a,(t=>{(0,p.default)(e[t])&&(e[t]=S(e[t]))})),"json"===t?(0,d.default)(e,null,2):"yaml"===t?(0,v.getValue)(e):e)};class w extends h.PureComponent{constructor(e){super(e),(0,f.default)(this,"handleChange",(e=>{var{onChange:t}=this.props;t(e)})),this.state={value:x(e.value,e.mode),originValue:e.value}}static getDerivedStateFromProps(e,t){var{value:a,mode:r}=e;return a!==t.originValue?{value:x(a,r),originValue:a}:null}render(){var{className:e,mode:t,options:a}=this.props;return h.default.createElement(b.default,(0,c.default)({},a,{className:(0,g.default)(y.default.editor,e),value:this.state.value,mode:t,onChange:this.handleChange}))}}(0,f.default)(w,"propTypes",{value:m.default.oneOfType([m.default.string,m.default.object,m.default.array]),mode:m.default.string,options:m.default.object,onChange:m.default.func}),(0,f.default)(w,"defaultProps",{value:{},mode:"yaml",options:{},onChange(){}});var I=w;t.default=I},1333:function(e,t,a){"use strict";var r=a(160),n=a(19),i=a(25),l=a(21);n(t,"__esModule",{value:!0}),t.default=void 0;var s=l(a(57)),o=l(a(409)),u=l(a(51)),d=l(a(36)),c=l(a(202)),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 s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var o=l?i(e,s):null;o&&(o.get||o.set)?n(r,s,o):r[s]=e[s]}r.default=e,a&&a.set(e,r);return r}(a(0)),p=l(a(16)),h=a(161),m=l(a(1375)),g=a(1374);function v(e){if("function"!=typeof r)return null;var t=new r,a=new r;return(v=function(e){return e?a:t})(e)}class y extends f.Component{static propTypes(){return{visibleButtonNumber:p.default.number,primaryActions:p.default.array,onFinishAction:p.default.func,onCancelAction:p.default.func,routing:p.default.object.isRequired,containerProps:p.default.object,onClickAction:p.default.func,primaryActionsExtra:p.default.any}}constructor(e){super(e),(0,d.default)(this,"onClickAction",(()=>{var{onClickAction:e}=this.props;e&&e()})),this.state={primaryAllowedResults:[]},this.actionList=this.getActionList(e)}componentDidMount(){this.getActionsAllowed()}componentDidUpdate(e){(0,c.default)(e,this.props)||this.getActionsAllowed()}getActionsAllowed(){var e=this;return(0,u.default)((function*(){var{containerProps:t,primaryActionsExtra:a,isAdminPage:r}=e.props,{detail:n=null}=t,i=yield(0,g.getAllowedResults)({actions:e.actionList,data:n,containerProps:t,key:null,extra:a,isAdminPage:r});e.setState({primaryAllowedResults:i})}))()}getActionList(e){var{primaryActions:t,containerProps:a}=e;return(0,s.default)(t).call(t,(e=>(0,g.getAction)(e,null,a)))}render(){var e,{primaryAllowedResults:t}=this.state,{onFinishAction:a,routing:r,containerProps:n,onCancelAction:i,onClickAction:l}=this.props,u=(0,s.default)(e=this.actionList).call(e,((e,s)=>{var u="primary-".concat((0,h.generateId)()),{id:d,title:c,buttonType:p,actionType:g,buttonText:v,isDanger:y}=e,b={id:d,title:c,name:v||c,buttonType:p,isDanger:y,actionType:g,action:e};return f.default.createElement(m.default,(0,o.default)({},b,{key:u,isAllowed:t[s],onFinishAction:a,routing:r,containerProps:n,onClickAction:l,onCancelAction:i}))}));return f.default.createElement(f.default.Fragment,null,u)}}t.default=y,(0,d.default)(y,"defaultProps",{visibleButtonNumber:3,primaryActions:[],onFinishAction:null,onCancelAction:null,containerProps:{},primaryActionsExtra:null})},1334:function(e,t,a){"use strict";var r=a(33),n=a(44),i=a(32),l=a(25),s=a(27),o=a(45),u=a(46),d=a(19),c=a(21);d(t,"__esModule",{value:!0}),t.default=t.InstanceVolumeStore=void 0;var f=c(a(57)),p=c(a(65)),h=c(a(27)),m=c(a(51)),g=c(a(62)),v=c(a(36)),y=c(a(48)),b=c(a(53)),_=a(161),S=a(557);function x(e,t){var a=r(e);if(n){var s=n(e);t&&(s=i(s).call(s,(function(t){return l(e,t).enumerable}))),a.push.apply(a,s)}return a}function w(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)s(a=x(Object(r),!0)).call(a,(function(t){(0,v.default)(e,t,r[t])}));else if(o)u(e,o(r));else{var n;s(n=x(Object(r))).call(n,(function(t){d(e,t,l(r,t))}))}}return e}class I extends b.default{constructor(){super(...arguments),(0,v.default)(this,"getFatherResourceId",(e=>e.serverId))}get client(){return y.default.nova.servers.volumeAttachments}get isSubResource(){return!0}get paramsFunc(){return e=>{var{id:t,serverId:a,all_projects:r,projectId:n,serverName:i}=e;return(0,g.default)(e,["id","serverId","all_projects","projectId","serverName"])}}get mapperBeforeFetchProject(){return(e,t)=>{var{projectId:a}=t;return w(w({},e),{},{project_id:a})}}get mapper(){return e=>(0,S.updateVolume)(e)}get groupArraySize(){return 10}listDidFetch(e,t){var a=this;return(0,m.default)((function*(){if(0===e.length)return e;var r=(0,f.default)(e).call(e,(e=>e.volumeId)),n=(0,_.groupArray)(r,a.groupArraySize),i=yield p.default.all((0,f.default)(n).call(n,(e=>{var r={uuid:e,all_projects:t};return a.skylineClient.extension.volumes(r)}))),l=[];return(0,h.default)(i).call(i,(e=>{l.push(...e.volumes)})),l}))()}}t.InstanceVolumeStore=I;var C=new I;t.default=C},1337:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.hypervisorFilters=a.hypervisorColumns=void 0;var l=i(r(81));r(411);var s=i(r(227)),o=i(r(0)),u=i(r(1398)),d=(r(173),[{title:t("Hostname"),dataIndex:"service_host"},{title:t("Type"),dataIndex:"hypervisor_type"},{title:t("VCPU (Core)"),dataIndex:"vcpus_used_percent",render:(e,a)=>{var r;return"ironic"===a.hypervisor_type?o.default.createElement(s.default,{title:t("vCPUs and ram are not used for bare metal scheduling")},o.default.createElement("span",null,"-")):o.default.createElement(u.default,{value:e,label:(0,l.default)(r="".concat(a.vcpus_used," / ")).call(r,a.vcpus)})},width:180,stringify:(e,a)=>{var r,n,i,s;return(0,l.default)(r=(0,l.default)(n=(0,l.default)(i=(0,l.default)(s="".concat(e,"% (")).call(s,t("Used"),": ")).call(i,a.vcpus_used," / ")).call(n,t("Total"),": ")).call(r,a.vcpus,")")}},{title:t("Configured Memory (GiB)"),dataIndex:"memory_mb_percent",render:(e,a)=>{var r;return"ironic"===a.hypervisor_type?o.default.createElement(s.default,{title:t("vCPUs and ram are not used for bare metal scheduling")},o.default.createElement("span",null,"-")):o.default.createElement(u.default,{value:e,label:(0,l.default)(r="".concat(a.memory_mb_used_gb," / ")).call(r,a.memory_mb_gb)})},width:180,stringify:(e,a)=>{var r,n,i,s;return(0,l.default)(r=(0,l.default)(n=(0,l.default)(i=(0,l.default)(s="".concat(e,"% (")).call(s,t("Used"),": ")).call(i,a.memory_mb_used_gb," / ")).call(n,t("Total"),": ")).call(r,a.memory_mb_gb,")")}},{title:t("Instances"),dataIndex:"running_vms"}]);a.hypervisorColumns=d;var c=[{label:t("Hostname"),name:"service_host"},{label:t("Type"),name:"hypervisor_type"}];a.hypervisorFilters=c},1339:function(e,t,a){"use strict";var r=a(33),n=a(44),i=a(32),l=a(25),s=a(27),o=a(45),u=a(46),d=a(19),c=a(21);d(t,"__esModule",{value:!0}),t.default=t.InstanceSnapshotStore=void 0;var f=c(a(32)),p=c(a(65)),h=c(a(27)),m=c(a(102)),g=c(a(51)),v=c(a(62)),y=c(a(36)),b=c(a(48)),_=a(563),S=c(a(53));function x(e,t){var a=r(e);if(n){var s=n(e);t&&(s=i(s).call(s,(function(t){return l(e,t).enumerable}))),a.push.apply(a,s)}return a}function w(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)s(a=x(Object(r),!0)).call(a,(function(t){(0,y.default)(e,t,r[t])}));else if(o)u(e,o(r));else{var n;s(n=x(Object(r))).call(n,(function(t){d(e,t,l(r,t))}))}}return e}class I extends S.default{constructor(){super(...arguments),(0,y.default)(this,"updateParamsSortPage",((e,t,a)=>{t&&a&&(e.sort_key=t,e.sort_dir="descend"===a?"desc":"asc")})),(0,y.default)(this,"updateParamsSort",this.updateParamsSortPage)}get client(){return b.default.glance.images}get listFilterByProject(){return!0}get fetchListByLimit(){return!0}get paramsFunc(){return this.paramsFuncPage}get paramsFuncPage(){return(e,t)=>{var{id:a,current:r,owner:n}=e,i=w({},(0,v.default)(e,["id","current","owner"]));return n?i.owner=n:t||(i.owner=this.currentProjectId),i}}get mapperBeforeFetchProject(){return e=>w(w({},e),{},{project_name:e.owner_project_name||e.project_name,project_id:e.owner||e.project_id})}listDidFetch(e,t,a){return(0,g.default)((function*(){if(0===e.length)return e;var r=(0,f.default)(e).call(e,_.isSnapshot),{id:n}=a;if(!n)return r;var i={all_tenants:t},l=yield p.default.all([b.default.cinder.snapshots.list(i),b.default.nova.servers.volumeAttachments.list(n,{})]),s=l[0].snapshots,o=l[1].volumeAttachments,u=[];return(0,h.default)(r).call(r,(e=>{var{block_device_mapping:t="[]",instance_id:a}=e;if(a===n)u.push(e);else{var r,i=(0,m.default)(r=JSON.parse(t)).call(r,(e=>0===e.boot_index));if(i){e.snapshotId=i.snapshot_id;var l=(0,m.default)(s).call(s,(e=>e.id===i.snapshot_id));if(l){var d=l.volume_id;(0,m.default)(o).call(o,(e=>e.volumeId===d))&&u.push(e)}}else{var{instance_uuid:c}=e;n===c&&u.push(e)}}})),u}))()}detailDidFetch(e){return(0,g.default)((function*(){var t;e.originData=w({},e);var{block_device_mapping:a="[]"}=e,r=(0,m.default)(t=JSON.parse(a)).call(t,(e=>0===e.boot_index)),n=null,i="";if(r){var{snapshot_id:l}=r;e.snapshotId=l;var s=(yield b.default.cinder.snapshots.show(l)).snapshot;e.snapshotDetail=s;var{volume_id:o}=s,u=(yield b.default.cinder.volumes.show(o)).volume;e.volumeDetail=u,n=u.attachments.length>0?u.attachments[0].server_id:""}else{var{instance_uuid:d}=e;n=d}var c={};try{if(n){c=yield b.default.nova.servers.show(n);var{server:{name:f}={}}=c;i=f}}catch(e){}return e.instance={server_id:n,server_name:i},e.instanceDetail=c.server||{},e}))()}}t.InstanceSnapshotStore=I;var C=new I;t.default=C},1340:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.enablePFW=function(){var{neutronExtensions:e}=s.default,t=!1,a=!1;return(0,l.default)(e).call(e,(e=>{"floating-ip-port-forwarding"===e.alias?t=!0:"expose-port-forwarding-in-fip"===e.alias&&(a=!0)})),t&&a},a.availabilityZoneResource=a.availabilityZoneState=void 0;var l=i(r(27)),s=i(r(140)),o={available:t("Available"),unavailable:t("Unavailable")};a.availabilityZoneState=o;var u={router:t("Router"),network:t("Network")};a.availabilityZoneResource=u},1341:function(e,a,r){"use strict";var n=r(33),i=r(44),l=r(32),s=r(25),o=r(27),u=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=a.Port=void 0;var p=f(r(81)),h=f(r(198)),m=f(r(57)),g=f(r(32)),v=f(r(562)),y=f(r(62)),b=f(r(36)),_=f(r(0)),S=r(406),x=f(r(1194)),w=r(561),I=r(1210),C=r(334),k=f(r(1549));function D(e,t){var a=n(e);if(i){var r=i(e);t&&(r=l(r).call(r,(function(t){return s(e,t).enumerable}))),a.push.apply(a,r)}return a}function P(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)o(a=D(Object(r),!0)).call(a,(function(t){(0,b.default)(e,t,r[t])}));else if(u)d(e,u(r));else{var n;o(n=D(Object(r))).call(n,(function(t){c(e,t,s(r,t))}))}}return e}class T extends x.default{constructor(){super(...arguments),(0,b.default)(this,"updateFetchParamsByPage",(e=>{var{id:t}=e,a=P({},(0,y.default)(e,["id"]));return this.isInstanceDetail?a.device_id=t:this.isNetworkDetail&&(a.network_id=t),a})),(0,b.default)(this,"updateFetchParams",(e=>{var{id:t,networkId:a}=e;return P({network_id:a,subnetId:t},(0,y.default)(e,["id","networkId"]))})),(0,b.default)(this,"renderResource",((e,t)=>{var a,{device_id:r,device_owner:n}=t;if(!n)return r||"-";var i,l=r,s=null;"compute:nova"===n?(l=e?(0,p.default)(i="".concat(r," (")).call(i,e,")"):r,s=this.getLinkRender("instanceDetail",l,{id:r},{tab:"interface"})):(0,h.default)(a=["network:router_interface","network:ha_router_replicated_interface","network:router_ha_interface"]).call(a,n)?s=this.getLinkRender("routerDetail",l,{id:r}):"network:floatingip"===n&&(s=this.getLinkRender("fipDetail",l,{id:r}));return s?_.default.createElement(_.default.Fragment,null,n,_.default.createElement("br",null),s):_.default.createElement(_.default.Fragment,null,n,_.default.createElement("br",null),r||"-")})),(0,b.default)(this,"getPortDetailRoute",(()=>this.isSubnetDetail?{routeName:this.getRouteName("subnetPortDetail"),routeParamsFunc:e=>({networkId:e.network_id,subnetId:e.subnet_id,id:e.id})}:this.isNetworkDetail?{routeName:this.getRouteName("networkPortDetail"),routeParamsFunc:e=>({networkId:e.network_id,id:e.id})}:this.isInstanceDetail?{routeName:this.getRouteName("instancePortDetail"),routeParamsFunc:e=>({instanceId:e.device_id,id:e.id})}:{routeName:this.getRouteName("portDetail")})),(0,b.default)(this,"getColumns",(()=>{var e=[P({title:t("ID/Name"),dataIndex:"name"},this.getPortDetailRoute()),{title:t("Project ID/Name"),dataIndex:"project_name",hidden:!this.isAdminPage,isHideable:!0,sortKey:"project_id"},{title:t("Bind Resource"),dataIndex:"server_name",stringify:(e,t)=>{var a,r,n,i,{device_id:l,device_owner:s}=t;return l&&"compute:nova"===s&&e?(0,p.default)(n=(0,p.default)(i="".concat(s," \n ")).call(i,l," (")).call(n,e,")"):(0,p.default)(a=(0,p.default)(r="\n ".concat(s," ")).call(r,s&&"\n","\n ")).call(a,l||"-","\n ")},render:this.renderResource,isHideable:!0,sorter:!1},{title:t("Owned Network"),dataIndex:"network_name",isLink:!0,routeName:this.getRouteName("networkDetail"),idKey:"network_id",sorter:!1},{title:t("IPv4 Address"),dataIndex:"ipv4",render:e=>(0,m.default)(e).call(e,(e=>_.default.createElement("div",{key:e},e))),isHideable:!0,stringify:e=>e.join(","),sorter:!1},{title:t("IPv6 Address"),dataIndex:"ipv6",render:e=>(0,m.default)(e).call(e,(e=>_.default.createElement("div",{key:e},e))),isHideable:!0,stringify:e=>e.join(","),sorter:!1},{title:t("Mac Address"),dataIndex:"mac_address",isHideable:!0},{title:t("Status"),dataIndex:"status",valueMap:I.portStatus}];return this.isInstanceDetail?(0,g.default)(e).call(e,(e=>"server_name"!==e.dataIndex)):this.isNetworkDetail?(0,g.default)(e).call(e,(e=>"network_name"!==e.dataIndex)):e}))}init(){this.store=new w.PortStore,this.downloadStore=new w.PortStore}get isInstanceDetail(){var e,t;return this.inDetailPage&&((0,h.default)(e=this.path).call(e,"compute/instance")||(0,h.default)(t=this.path).call(t,"management/recycle-bin"))}get isNetworkDetail(){var e,t;return this.inDetailPage&&((0,h.default)(e=this.path).call(e,"networks/detail")||(0,h.default)(t=this.path).call(t,"networks-admin/detail"))&&!this.isSubnetDetail}get isSubnetDetail(){var e;return this.inDetailPage&&(0,h.default)(e=this.path).call(e,"subnet")}get isRecycleBinDetail(){var e;return this.inDetailPage&&(0,h.default)(e=this.path).call(e,"recycle-bin")}get isFilterByBackend(){return!this.isSubnetDetail}get isSortByBackend(){return this.isFilterByBackend}get defaultSortKey(){return this.isFilterByBackend?"status":""}get policy(){return"get_port"}get name(){return t("ports")}get adminPageHasProjectFilter(){return!0}get actionConfigs(){return this.isRecycleBinDetail?C.emptyActionConfig:this.isAdminPage?k.default.adminActions:this.inDetailPage?this.isInstanceDetail?k.default.actionConfigsInDetail:k.default.noActions:k.default.actionConfigs}get searchFilters(){var e=[{label:t("Name"),name:"name"},{label:t("Status"),name:"status",options:[{label:t("Active"),key:"ACTIVE"},{label:t("Down"),key:"DOWN"},{label:t("Error"),key:"ERROR"},{label:t("Build"),key:"BUILD"},{label:t("N/A"),key:"N/A"}]}];this.isNetworkDetail||(0,v.default)(e).call(e,1,0,{label:t("Owned Network"),name:"network_name"});var a={label:t("Device Owner"),name:"device_owner",options:[{label:t("Instance"),key:"compute:nova",checkLabel:t("View virtual adapters"),isQuick:!0},{label:t("Router"),key:"network:router_ha_interface,network:ha_router_replicated_interface,network:router_interface,network:router_gateway,network:router_interface_distributed,network:router_centralized_snat"},{label:t("Floating IP"),key:"network:floatingip,network:floatingip_agent_gateway"},{label:t("DHCP Agent"),key:"network:dhcp"},{label:t("Others"),key:"network:local_ip,network:routed,network:distributed,compute:kuryr,Octavia"},{label:t("Unbounded"),key:"none"}]};return this.isSubnetDetail&&(a.filterFunc=(e,t)=>"none"===t?!e:e&&(0,h.default)(t).call(t,e)),this.isInstanceDetail||e.push(a),e}}a.Port=T;var A=(0,S.inject)("rootStore")((0,S.observer)(T));a.default=A},1392:function(e,t,a){var r=a(2010);"string"==typeof r&&(r=[[e.i,r,""]]);var n={hmr:!0,transform:undefined,insertInto:void 0};a(75)(r,n);r.locals&&(e.exports=r.locals)},1393:function(e,a,r){"use strict";var n=r(160),i=r(19),l=r(25),s=r(21);i(a,"__esModule",{value:!0}),a.default=a.QuotaOverview=a.getVolumeTypeCards=a.troveQuotaCard=a.zunQuotaCard=a.shareQuotaCard=a.quotaCardList=void 0;var o=s(r(57)),u=s(r(32)),d=s(r(81)),c=s(r(65)),f=s(r(33));r(589);var p=s(r(590)),h=s(r(51));r(1394);var m=s(r(1329));r(337);var g=s(r(338));r(1196);var v=s(r(1197));r(1229);var y=s(r(1230));r(1198);var b=s(r(1199));r(1222);var _=s(r(1223)),S=s(r(36));r(411);var x=s(r(227)),w=s(r(1248)),I=s(r(343)),C=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var a=M(t);if(a&&a.has(e))return a.get(e);var r={},n=i&&l;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var o=n?l(e,s):null;o&&(o.get||o.set)?i(r,s,o):r[s]=e[s]}r.default=e,a&&a.set(e,r);return r}(r(0)),k=(r(173),r(555),r(406)),D=s(r(566)),P=s(r(407)),T=s(r(140)),A=s(r(1392));function M(e){if("function"!=typeof n)return null;var t=new n,a=new n;return(M=function(e){return e?a:t})(e)}var R={normal:{color:"#4CC9F0",text:t("Normal")},danger:{color:"#4361EE",text:t("Danger")},full:{color:"#E8684A",text:t("Full")}},N=C.default.createElement("span",null,t("Key Pairs"),C.default.createElement(x.default,{title:t("The number of allowed key pairs for each user.")},C.default.createElement(w.default,{style:{marginLeft:4}}))),E=[{text:t("Compute"),type:"compute",value:[{text:t("Instances"),key:"instances"},{text:t("vCPUs"),key:"cores"},{text:t("Memory (GiB)"),key:"ram"},{text:N,key:"key_pairs"},{text:t("Server Groups"),key:"server_groups"}]},{text:t("Storage"),type:"storage",value:[{text:t("Volumes"),key:"volumes"},{text:t("Volume Capacity (GiB)"),key:"gigabytes"},{text:t("Volume Snapshots"),key:"snapshots"},{text:t("Volume Backups"),key:"backups"},{text:t("Volume Backup Capacity (GiB)"),key:"backup_gigabytes"}]},{text:t("Network"),type:"networks",value:[{text:t("Routers"),key:"router"},{text:t("Networks"),key:"network"},{text:t("Subnets"),key:"subnet"},{text:t("Floating IPs"),key:"floatingip"},{text:t("Ports"),key:"port"},{text:t("Security Groups"),key:"security_group"},{text:t("Security Group Rules"),key:"security_group_rule"}]}];a.quotaCardList=E;var j={text:t("Share"),type:"share",value:[{text:t("Shares"),key:"shares"},{text:t("Share Capacity (GiB)"),key:"share_gigabytes"},{text:t("Share Networks"),key:"share_networks"},{text:t("Share Groups"),key:"share_groups"}]};a.shareQuotaCard=j;var F={text:t("Containers Management"),type:"zun",value:[{text:t("Containers"),key:"zun_containers"},{text:t("CPUs"),key:"zun_cpu"},{text:t("Memory (MiB)"),key:"zun_memory"},{text:t("Containers Disk (GiB)"),key:"zun_disk"}]};a.zunQuotaCard=F;var L={text:t("Database"),type:"trove",value:[{text:t("Database Instance"),key:"trove_instances"},{text:t("Database Disk (GiB)"),key:"trove_volumes"}]};a.troveQuotaCard=L;var z=e=>{var a=(0,o.default)(e).call(e,((e,a)=>({index:a,value:[{text:t("{name} type",{name:e.name}),key:"volumes_".concat(e.name)},{text:t("{name} type capacity (GiB)",{name:e.name}),key:"gigabytes_".concat(e.name)},{text:t("{name} type snapshots",{name:e.name}),key:"snapshots_".concat(e.name)}]})));return{text:t("Storage Types"),type:"volumeTypes",value:a}};a.getVolumeTypeCards=z;class O extends C.Component{constructor(e){var a;super(e),a=this,(0,S.default)(this,"getFilteredValue",(e=>(0,u.default)(e).call(e,(e=>!e.hidden)))),(0,S.default)(this,"getItemInfo",((e,a)=>{var r=0;e[a.key]&&(0,I.default)(e[a.key].used)&&-1!==e[a.key].limit&&(r=e[a.key].used/e[a.key].limit*100);var n,i="-";e[a.key]&&(0,I.default)(e[a.key].used)&&(i=(0,d.default)(n="".concat(e[a.key].used," / ")).call(n,-1===e[a.key].limit?t("Unlimit"):e[a.key].limit));var l=r>=90&&R.full.color||r>=80&&R.danger.color||R.normal.color,s=C.default.createElement("span",null,a.text," : ",i),{server_group_members:o}=e;return"server_groups"===a.key&&o&&(s=C.default.createElement("span",null,s," (",t("Members of Each Group")," :",-1===o.limit?t("Unlimit"):o.limit,")")),C.default.createElement(C.default.Fragment,null,C.default.createElement("div",{className:A.default["progress-title"]},s),C.default.createElement(x.default,{title:s,placement:"top",getPopupContainer:e=>e.parentNode},C.default.createElement(_.default,{style:{marginTop:13,marginBottom:13},percent:r,showInfo:!1,strokeColor:l})))})),(0,S.default)(this,"renderQuotaCardList",(()=>{var e,{isLoading:t}=this.state;return C.default.createElement(b.default,{className:A.default.content},(0,o.default)(e=this.quotaCardList).call(e,(e=>C.default.createElement(v.default,{className:A.default.card,span:24,key:e.type},C.default.createElement(y.default,{title:e.text,bordered:!1,loading:t,size:"small"},C.default.createElement(b.default,{gutter:24},this.renderQuotaCardContent(e)))))),this.enableCinder?C.default.createElement(v.default,{className:A.default.card,span:24,key:this.volumeTypesQuota.type},C.default.createElement(y.default,{title:this.volumeTypesQuota.text,bordered:!1,loading:t,size:"small"},this.renderVolumeTypes())):null)})),(0,S.default)(this,"renderQuotaCard",(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,o.default)(t).call(t,(t=>C.default.createElement(v.default,{key:t.text,span:12},a.getItemInfo(e,t))))})),(0,S.default)(this,"renderVolumeTypes",(()=>{var{isLoading:e}=this.state;return e?C.default.createElement(g.default,null):C.default.createElement(m.default,{itemLayout:"vertical",size:"large",pagination:{hideOnSinglePage:!0,pageSize:5,size:"small"},dataSource:this.volumeTypesQuota.value,renderItem:e=>{var t;return C.default.createElement(b.default,{key:e.index,gutter:[16]},(0,o.default)(t=e.value).call(t,(e=>C.default.createElement(v.default,{span:8,key:e.text},this.getItemInfo(this.projectStore.quota,e)))))}})})),this.state={isLoading:!0};var{projectStore:r,volumeTypeStore:n}=e;this.projectStore=r||P.default,this.volumeTypeStore=n||D.default}componentDidMount(){this.getData()}getData(){var e=this;return(0,h.default)((function*(){var{getData:t}=e.props;if(t)yield t();else{var{user:a}=e.props.rootStore,{project:{id:r=""}={}}=a,n=[e.projectStore.fetchProjectQuota({project_id:r,withKeyPair:!0})];e.enableCinder&&n.push(e.volumeTypeStore.fetchList()),yield c.default.all(n)}e.setState({isLoading:!1})}))()}get enableCinder(){return T.default.checkEndpoint("cinder")}get enableShare(){return T.default.checkEndpoint("manilav2")}get enableZun(){return T.default.checkEndpoint("zun")}get enableTrove(){return T.default.checkEndpoint("trove")&&T.default.hasAdminOnlyRole}get volumeTypeData(){var{volumeTypeData:e}=this.props;return e||this.volumeTypeStore.list.data}get volumeTypesQuota(){return z(this.volumeTypeData)}get quotaCardList(){var e=[...this.props.quotaCardList||E];return this.enableCinder||(e=(0,u.default)(e).call(e,(e=>"storage"!==e.type))),this.enableShare&&e.push(j),this.enableZun&&e.push(F),this.enableTrove&&e.push(L),e}get quotaAction(){return this.props.quotaAction}renderQuotaCardContent(e){var{isLoading:t}=this.state;return t?C.default.createElement(g.default,null):this.renderQuotaCard(this.projectStore.quota,this.getFilteredValue(e.value))}render(){var e,{isLoading:a}=this.state;return C.default.createElement(y.default,{className:A.default.bottom,bodyStyle:{padding:0},loading:a,headStyle:{paddingLeft:"20px"},title:C.default.createElement("div",{className:A.default.title},C.default.createElement("span",{className:A.default.text},t("Quota Overview")),(0,o.default)(e=(0,f.default)(R)).call(e,(e=>C.default.createElement("span",{key:e,className:A.default.badge},C.default.createElement(p.default,{color:R[e].color,text:R[e].text}))))),extra:this.quotaAction},this.renderQuotaCardList())}}a.QuotaOverview=O;var B=(0,k.inject)("rootStore")((0,k.observer)(O));a.default=B},1397:function(e,t,a){"use strict";var r=a(33),n=a(44),i=a(32),l=a(25),s=a(27),o=a(45),u=a(46),d=a(19),c=a(21);d(t,"__esModule",{value:!0}),t.default=t.ServerGroupInstanceStore=void 0;var f=c(a(65)),p=c(a(57)),h=c(a(27)),m=c(a(36)),g=c(a(51)),v=c(a(62)),y=a(161),b=c(a(53));function _(e,t){var a=r(e);if(n){var s=n(e);t&&(s=i(s).call(s,(function(t){return l(e,t).enumerable}))),a.push.apply(a,s)}return a}function S(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)s(a=_(Object(r),!0)).call(a,(function(t){(0,m.default)(e,t,r[t])}));else if(o)u(e,o(r));else{var n;s(n=_(Object(r))).call(n,(function(t){d(e,t,l(r,t))}))}}return e}class x extends b.default{get listResponseKey(){return"servers"}get paramsFunc(){return e=>{var{all_projects:t,members:a,isServerGroup:r}=e;return(0,v.default)(e,["all_projects","members","isServerGroup"])}}get groupArraySize(){return 1}requestList(e,t){var a=this;return(0,g.default)((function*(){var{members:r,isServerGroup:n,all_projects:i}=t;if(r&&n&&0===r.length)return[];var l=(0,y.groupArray)(r,a.groupArraySize),s=yield f.default.all((0,p.default)(l).call(l,(t=>{var r=S(S({},e),{},{uuid:t,all_projects:i});return a.skylineClient.extension.servers(r)}))),o=[];return(0,h.default)(s).call(s,(e=>{o.push(...e[a.listResponseKey])})),o}))()}listDidFetch(e){return(0,g.default)((function*(){return 0===e.length?e:(0,p.default)(e).call(e,(e=>S(S({},e),{},{tags:(e.origin_data||{}).tags||[]})))}))()}}t.ServerGroupInstanceStore=x;var w=new x;t.default=w},1398:function(e,t,a){"use strict";var r=a(160),n=a(19),i=a(25),l=a(21);n(t,"__esModule",{value:!0}),t.default=void 0,a(411);var s=l(a(227));a(1222);var o=l(a(1223)),u=l(a(36)),d=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var a=f(t);if(a&&a.has(e))return a.get(e);var r={},l=n&&i;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var o=l?i(e,s):null;o&&(o.get||o.set)?n(r,s,o):r[s]=e[s]}r.default=e,a&&a.set(e,r);return r}(a(0)),c=(a(173),l(a(16)));function f(e){if("function"!=typeof r)return null;var t=new r,a=new r;return(f=function(e){return e?a:t})(e)}class p extends d.Component{constructor(){super(...arguments),(0,u.default)(this,"getColor",(()=>{var{value:e,wanValue:t,dangerValue:a,infoColor:r,warnColor:n,dangerColor:i}=this.props;return e<t?r:e<a?n:i}))}render(){var{value:e,label:t}=this.props,a={percent:e,size:"small",strokeColor:this.getColor()};t&&(a.showInfo=!1);var r=void 0===e?"-":"".concat(e,"%");return d.default.createElement(s.default,{title:r,placement:"top"},d.default.createElement(o.default,a),t)}}t.default=p,(0,u.default)(p,"propTypes",{wanValue:c.default.number,dangerValue:c.default.number,infoColor:c.default.string,warnColor:c.default.string,dangerColor:c.default.string,value:c.default.number,label:c.default.string}),(0,u.default)(p,"defaultProps",{wanValue:70,dangerValue:90,infoColor:"rgba(0, 104, 255, 0.65)",warnColor:"rgba(254, 223, 64, 0.65)",dangerColor:"rgba(235, 53, 77, 0.65)",label:""})},1399:function(e,a,r){"use strict";var n=r(33),i=r(44),l=r(32),s=r(25),o=r(27),u=r(45),d=r(46),c=r(19),f=r(160),p=r(21);c(a,"__esModule",{value:!0}),a.default=a.Volume=void 0;var h=p(r(57)),m=p(r(198)),g=p(r(62)),v=p(r(36)),y=r(406),b=p(r(1194)),_=r(557),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={},n=c&&s;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=n?s(e,i):null;l&&(l.get||l.set)?c(r,i,l):r[i]=e[i]}r.default=e,a&&a.set(e,r);return r}(r(410)),x=r(3542),w=r(1334),I=r(334),C=p(r(1544));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 D(e,t){var a=n(e);if(i){var r=i(e);t&&(r=l(r).call(r,(function(t){return s(e,t).enumerable}))),a.push.apply(a,r)}return a}function P(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)o(a=D(Object(r),!0)).call(a,(function(t){(0,v.default)(e,t,r[t])}));else if(u)d(e,u(r));else{var n;o(n=D(Object(r))).call(n,(function(t){c(e,t,s(r,t))}))}}return e}class T extends b.default{constructor(){super(...arguments),(0,v.default)(this,"getColumns",(()=>(0,_.getVolumeColumnsList)(this))),(0,v.default)(this,"updateFetchParams",(e=>{if(this.isVolumeSnapshotDetail){var{child_volumes:t=[]}=this.props.detail||{},a=(0,h.default)(t).call(t,(e=>e.volume_id)),{id:r}=e;return P(P({},(0,g.default)(e,["id"])),{},{volumeIds:a})}if(this.inDetailPage){var{id:n}=e;return P(P({},(0,g.default)(e,["id"])),{},{serverId:n})}return e}))}init(){this.isVolumeSnapshotDetail?this.store=new x.SnapshotVolumeStore:this.inDetailPage?(this.store=new w.InstanceVolumeStore,this.downloadStore=this.store):(this.store=S.default,this.downloadStore=new S.VolumeStore)}get policy(){return"volume:get_all"}get name(){return t("volumes")}get isRecycleBinDetail(){var e;return this.inDetailPage&&(0,m.default)(e=this.path).call(e,"recycle-bin")}get isVolumeSnapshotDetail(){var e;return this.inDetailPage&&(0,m.default)(e=this.path).call(e,"storage/snapshot")}get isInstanceDetail(){var e;return this.inDetailPage&&(0,m.default)(e=this.path).call(e,"compute/instance")}get actionConfigs(){return this.isRecycleBinDetail?I.emptyActionConfig:this.isAdminPage?this.inDetailPage&&!this.isVolumeSnapshotDetail?C.default.instanceDetailAdminConfig:C.default.adminConfig:this.inDetailPage?C.default.instanceDetailConfig:C.default.actionConfigs}get transitionStatusList(){return _.volumeTransitionStatuses}get isFilterByBackend(){return!this.inDetailPage}get isSortByBackend(){return this.isFilterByBackend}get adminPageHasProjectFilter(){return!0}get defaultSortKey(){return"created_at"}get searchFilters(){return _.volumeFilters}}a.Volume=T;var A=(0,y.inject)("rootStore")((0,y.observer)(T));a.default=A},1401:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=a.poolColumns=void 0;var l=i(r(81)),s=i(r(0)),o=i(r(1398)),u=[{title:t("Name"),dataIndex:"name"},{title:t("Protocol"),dataIndex:"storage_protocol"},{title:t("Backend Name"),dataIndex:"volume_backend_name",isHideable:!0},{title:t("Storage Capacity(GiB)"),dataIndex:"usedGBPercent",isHideable:!0,render:(e,t)=>{var a;return e?s.default.createElement(o.default,{value:e,label:(0,l.default)(a="".concat(t.usedGB," / ")).call(a,t.total_capacity_gb)}):"-"},stringify:(e,a)=>{var r,n,i,s;return e?(0,l.default)(r=(0,l.default)(n=(0,l.default)(i=(0,l.default)(s="".concat(e,"% (")).call(s,t("Used"),": ")).call(i,a.usedGB," / ")).call(n,t("Total"),": ")).call(r,a.total_capacity_gb,")"):"-"}}];a.poolColumns=u;var d=u;a.default=d},1402:function(e,a,r){"use strict";var n=r(33),i=r(44),l=r(32),s=r(25),o=r(27),u=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=a.FloatingIps=void 0;var p=f(r(198)),h=f(r(27)),m=f(r(33)),g=f(r(57)),v=f(r(32)),y=f(r(588)),b=f(r(339));r(576);var _=f(r(577)),S=f(r(595));r(1394);var x=f(r(1329)),w=f(r(51)),I=f(r(62)),C=f(r(36)),k=f(r(199)),D=f(r(0)),P=r(406),T=f(r(1194)),A=r(1224),M=r(336),R=r(334),N=(r(173),r(555),r(76)),E=r(161),j=f(r(1548));function F(e,t){var a=n(e);if(i){var r=i(e);t&&(r=l(r).call(r,(function(t){return s(e,t).enumerable}))),a.push.apply(a,r)}return a}function L(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)o(a=F(Object(r),!0)).call(a,(function(t){(0,C.default)(e,t,r[t])}));else if(u)d(e,u(r));else{var n;o(n=F(Object(r))).call(n,(function(t){c(e,t,s(r,t))}))}}return e}class z extends T.default{constructor(){var e;super(...arguments),e=this,(0,C.default)(this,"updateFetchParams",(e=>{if(this.inQosDetail){var{id:t}=e;return L({qos_policy_id:t},(0,I.default)(e,["id"]))}return e})),(0,C.default)(this,"fetchDataByPage",function(){var t=(0,w.default)((function*(t){yield e.store.fetchListWithResourceName(t),e.list.silent=!1}));return function(e){return t.apply(this,arguments)}}())}init(){this.store=new M.FloatingIpStore,this.downloadStore=new M.FloatingIpStore}get qosEndpoint(){return(0,N.qosEndpoint)()}get isFilterByBackend(){return!this.inQosDetail}get isSortByBackend(){return!this.inQosDetail}get defaultSortKey(){return"status"}get inQosDetail(){var e;return this.inDetailPage&&(0,p.default)(e=this.path).call(e,"qos")}get isRecycleBinDetail(){var e;return this.inDetailPage&&(0,p.default)(e=this.path).call(e,"recycle-bin")}get inInstanceDetail(){var e;return this.inDetailPage&&(0,p.default)(e=this.path).call(e,"instance")}getData(){var e=arguments,t=()=>super.getData,a=this;return(0,w.default)((function*(){var r=e.length>0&&void 0!==e[0]?e[0]:{},{silent:n}=r,i=(0,I.default)(r,["silent"]);if(a.inDetailPage&&!a.inQosDetail){var l;n&&(a.list.silent=!0);var{detail:{addresses:s=[]}={}}=a.props,o=[];(0,h.default)(l=(0,m.default)(s)).call(l,(e=>{var t,a;o.push(...(0,g.default)(t=(0,v.default)(a=s[e]).call(a,(e=>"fixed"===e["OS-EXT-IPS:type"]))).call(t,(e=>e.addr)))})),i.fixed_ip_address=o,i.all_projects=a.isAdminPage,o.length>0?yield a.store.fetchListWithResourceName(i):a.list.isLoading=!1}else t().call(a,L({silent:n},i))}))()}get fetchDataByCurrentProject(){return!0}get policy(){return"get_floatingip"}get name(){return t("floating ips")}get actionConfigs(){return this.isRecycleBinDetail?R.emptyActionConfig:this.inInstanceDetail?this.isAdminPage?j.default.instanceDetailAdminConfigs:j.default.instanceDetailConfigs:this.inQosDetail?this.isAdminPage?j.default.qosDetailAdminConfigs:j.default.qosDetailConfigs:this.isAdminPage?j.default.adminConfigs:j.default.actionConfigs}get transitionStatusList(){return A.transitionStatuses}get adminPageHasProjectFilter(){return!0}getRecordPortForwarding(e){var t;return(0,y.default)(t=e.port_forwardings||[]).call(t,((e,t)=>e.external_port-t.external_port))}getPortForwardingDetail(e,t){var{key:a}=t,r=(0,I.default)(t,["key"]);if((0,k.default)(r))return"";var{floating_ip_address:n}=e;return(0,A.getPortForwardingName)(r,n)}get portForwardingResourcesName(){return t("Port Forwardings")}getPortForwardingRender(e){var a=this.getRecordPortForwarding(e),{length:r}=a;if(!r)return null;var n=0;r>10&&r%10&&(n=10-r%10);var i=(0,b.default)({length:n},(e=>({key:"zero-".concat(e)}))),l=[...(0,g.default)(a).call(a,(e=>L(L({},e),{},{key:e.external_port||e.external_port_range}))),...i],s=D.default.createElement(x.default,{itemLayout:"vertical",size:"small",pagination:{hideOnSinglePage:!0,pageSize:10,size:"small",showSizeChanger:!1},dataSource:l,renderItem:t=>D.default.createElement("div",{style:{height:"30px",lineHeight:"30px"}},this.getPortForwardingDetail(e,t))});return D.default.createElement(_.default,{content:s,title:this.portForwardingResourcesName,destroyTooltipOnHide:!0,placement:"right"},t("{number} {resource}",{number:a.length,resource:this.portForwardingResourcesName})," ",D.default.createElement(S.default,null))}getPortForwardingStringify(e){var a=this.getRecordPortForwarding(e);if(!a.length)return"";var r=(0,g.default)(a).call(a,(t=>this.getPortForwardingDetail(e,t)));return[t("{number} {resource}",{number:a.length,resource:this.portForwardingResourcesName}),...r].join("\n")}getResourceRender(e,t){return e&&"-"!==e?e:this.getPortForwardingRender(t)||"-"}geResourceStringify(e,t){return e&&"-"!==e?e:this.getPortForwardingStringify(t)||"-"}getColumns(){return[{title:t("ID/Floating IP"),dataIndex:"floating_ip_address",isLink:!0,routeName:this.getRouteName("fipDetail")},{title:t("QoS Policy"),dataIndex:"qos_policy_name",isLink:!0,routeName:this.getRouteName("networkQosDetail"),idKey:"qos_policy_id",hidden:!this.qosEndpoint||this.inQosDetail,sorter:!1},{title:t("Project ID/Name"),dataIndex:"project_name",hidden:!this.isAdminPage,sortKey:"project_id"},{title:t("Description"),dataIndex:"description",render:e=>e||"-",isHideable:!0,sorter:!1},{title:t("Associated Resource"),dataIndex:"resource_name",render:(e,t)=>this.getResourceRender(e,t),stringify:(e,t)=>this.geResourceStringify(e,t),isHideable:!0,sorter:!1},{title:t("Status"),dataIndex:"status",valueMap:A.floatingIpStatus},{title:t("Created At"),dataIndex:"created_at",valueRender:"toLocalTime",isHideable:!0,sorter:!1}]}get searchFilters(){return[{label:t("Floating IP"),name:"floating_ip_address"},{label:t("Status"),name:"status",options:(0,E.getOptions)(A.floatingIpStatus)}]}}a.FloatingIps=z;var O=(0,P.inject)("rootStore")((0,P.observer)(z));a.default=O},1403:function(e,a,r){"use strict";var n=r(33),i=r(44),l=r(32),s=r(25),o=r(27),u=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=a.CreatePortForwarding=void 0;var p=f(r(57)),h=f(r(65)),m=f(r(229)),g=f(r(102)),v=f(r(81)),y=f(r(339)),b=f(r(32)),_=f(r(198)),S=f(r(1204)),x=f(r(562)),w=f(r(51)),I=f(r(62)),C=f(r(36)),k=f(r(99)),D=f(r(1259)),P=f(r(0)),T=r(406),A=r(1193),M=r(1219),R=r(561),N=r(1210),E=r(1224),j=f(r(598)),F=r(1340),L=r(556),z=r(161);function O(e,t){var a=n(e);if(i){var r=i(e);t&&(r=l(r).call(r,(function(t){return s(e,t).enumerable}))),a.push.apply(a,r)}return a}function B(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)o(a=O(Object(r),!0)).call(a,(function(t){(0,C.default)(e,t,r[t])}));else if(u)d(e,u(r));else{var n;o(n=O(Object(r))).call(n,(function(t){c(e,t,s(r,t))}))}}return e}var{portRangeRegex:V}=L.regex;class U extends A.ModalAction{constructor(){var e;super(...arguments),e=this,(0,C.default)(this,"portsDisableFunc",(e=>0===e.fixed_ips.length)),(0,C.default)(this,"onSubmit",(e=>{var{external_port_range:t,internal_port_range:a}=e,r=(0,I.default)(e,["external_port_range","internal_port_range"]);if(!t||this.supportRange)return j.default.create({id:this.item.id,data:e});var n=this.getPortsByInput(t),i=this.getPortsByInput(a),l=(0,p.default)(n).call(n,((e,t)=>j.default.create({id:this.item.id,data:B(B({},r),{},{external_port:e,internal_port:i[t]})})));return h.default.all(l)})),(0,C.default)(this,"handlePortSelect",function(){var t=(0,w.default)((function*(t){e.setState({fixedIpLoading:!0});var{canReachSubnetIdsWithRouterId:a}=e.state,r=yield(0,E.getInterfaceWithReason)(t.selectedRows),n=(0,N.getPortsAndReasons)(r,a,!0);e.setState({portFixedIPs:n,fixed_ip_address:void 0,fixedIpLoading:!1}),e.formRef.current&&e.formRef.current.resetFields(["fixed_ip_address","internal_port"])}));return function(e){return t.apply(this,arguments)}}()),(0,C.default)(this,"checkPortUsedBase",((e,t,a,r)=>{var{external_port:n,internal_port:i,external_port_range:l,internal_port_range:s}=e,o="external"===t?l:s;if(o){var[u,d]=this.getRangeFromString(o);return a>=u&&a<=d&&e.protocol===r}return a===("external"===t?n:i)&&e.protocol===r})),(0,C.default)(this,"checkPortUsedInternal",((e,t)=>{if(!e)return!1;var a=this.formRef.current.getFieldsValue(["virtual_adapter","fixed_ip_address"]),r=a.fixed_ip_address.selectedRows[0].fixed_ip_address,n=a.virtual_adapter.selectedRows[0].id;return t.internal_port_id===n&&t.internal_ip_address===r})),(0,C.default)(this,"checkPortUsed",((e,t)=>{var{alreadyUsedPorts:a,protocol:r}=this.state,n=(0,m.default)(e,10);return(0,g.default)(a).call(a,(e=>{var a=this.checkPortUsedBase(e,t,n,r);return"external"===t?a:this.checkPortUsedInternal(a,e)}))})),(0,C.default)(this,"checkExtPortUsed",(e=>this.checkPortUsed(e,"external"))),(0,C.default)(this,"getRangeFromString",(e=>{var t=(e||"").split(":");return!t.length||t.length>2?[]:[(0,m.default)(t[0],10),(0,m.default)(t[1],10)]})),(0,C.default)(this,"getPortForwardingContent",(e=>{var t,a,{external_port:r,external_port_range:n,internal_ip_address:i,internal_port:l,internal_port_range:s}=e;return(0,v.default)(t=(0,v.default)(a="".concat(r||n," => ")).call(a,i,":")).call(t,l||s)})),(0,C.default)(this,"getUsedError",((e,a)=>1===e.length&&(0,k.default)(e[0])?t("The {name} has already been used by other {resource}({content}), please change.",{name:a,resource:this.resource,content:this.getPortForwardingContent(e[0])}):t("The {name} {ports} have already been used, please change.",{name:a,ports:e.join(",")}))),(0,C.default)(this,"checkRangeInput",(e=>{var[a,r]=this.getRangeFromString(e),n=r-a+1;return n<=1?{error:t("The value of the upper limit of the range must be greater than the value of the lower limit of the range.")}:n>this.maxRangeSize?{error:this.maxRangeSizeTip}:{length:n,start:a,end:r}})),(0,C.default)(this,"getPortsByRange",((e,t)=>(0,y.default)({length:t},((t,a)=>e+a)))),(0,C.default)(this,"getPortsByInput",(e=>{var{length:t,start:a}=this.checkRangeInput(e);return this.getPortsByRange(a,t)})),(0,C.default)(this,"checkPortRangeUsed",((e,a,r)=>{var n=this.getPortsByRange(e,a),i=(0,b.default)(n).call(n,(e=>"external"===r?this.checkExtPortUsed(e):this.checkInternalPortUsed(e)));if(i.length){var l="external"===r?t("external ports"):t("internal ports");return{error:this.getUsedError(i,l)}}return{ports:n,length:a}})),(0,C.default)(this,"checkTwoRangeLength",((e,a)=>e!==a?t("The size of the external port range is required to be the same as the size of the internal port range"):"")),(0,C.default)(this,"checkExternalPortInput",((e,a)=>{var r=(0,_.default)(e).call(e,":"),n=(0,_.default)(a).call(a,":");if(a&&r!==n)return t("Ports are either single values or ranges");if(!r){var i=this.checkExtPortUsed(e);return i?this.getUsedError([i],t("external port")):""}var{start:l,length:s,error:o}=this.checkRangeInput(e);if(o)return o;var{error:u}=this.checkPortRangeUsed(l,s,"external");if(u)return u;if(!V.test(a))return"";var{length:d}=this.checkRangeInput(a);return d?this.checkTwoRangeLength(s,d):""})),(0,C.default)(this,"validateExternalPort",((e,t)=>{var a=null==t?"":"".concat(t),{internal_port:r}=this.formRef.current.getFieldsValue(["internal_port"]);if(!V.test(a))return h.default.resolve(!0);var n=this.checkExternalPortInput(a,(r||"").toString()||"");return n?h.default.reject(n):h.default.resolve(!0)})),(0,C.default)(this,"checkInternalPortUsed",(e=>this.checkPortUsed(e,"internal"))),(0,C.default)(this,"checkInternalPortInput",((e,a)=>{var r=(0,_.default)(e).call(e,":"),n=(0,_.default)(a).call(a,":");if(e&&r!==n)return t("Ports are either single values or ranges");if(!n){var i=this.checkInternalPortUsed(a);return i?this.getUsedError([i],t("internal port")):""}var{start:l,length:s,error:o}=this.checkRangeInput(a);if(o)return o;var{error:u}=this.checkPortRangeUsed(l,s,"internal");if(u)return u;if(!V.test(e))return"";var{length:d}=this.checkRangeInput(e);return d?this.checkTwoRangeLength(s,d):""})),(0,C.default)(this,"validateInternalPort",((e,t)=>{var a=null==t?"":"".concat(t);if(!V.test(a))return h.default.resolve(!0);var{external_port:r}=this.formRef.current.getFieldsValue(["external_port"]),n=this.checkInternalPortInput((r||"").toString()||"",a);return n?h.default.reject(n):h.default.resolve()})),(0,C.default)(this,"onFixedIpChange",(e=>{this.setState({fixed_ip_address:e},(()=>{this.formRef.current.resetFields(["internal_port"])}))}))}get name(){return t("Create Port Forwarding")}get resource(){return t("port forwarding")}get resources(){return t("port forwardings")}init(){this.portStore=new R.PortStore,this.state=B(B({},this.state),{},{alreadyUsedPorts:[],portFixedIPs:[],canReachSubnetIdsWithRouterId:[],routerIdWithExternalNetworkInfo:[],supportRange:!0}),this.getPorts(),this.getRangeSupport(),this.getFipAlreadyUsedPorts(),this.getExtraInfo()}getExtraInfo(){M.getCanReachSubnetIdsWithRouterIdInComponent.call(this,(e=>{var{item:t}=this;return e.external_gateway_info&&e.external_gateway_info.network_id===t.floating_network_id}))}get fipId(){return this.item.id}getFipAlreadyUsedPorts(){var e=this;return(0,w.default)((function*(){var t=yield j.default.fetchList({fipId:e.fipId});e.setState({alreadyUsedPorts:t||[]})}))()}get instanceName(){return(0,E.getPortForwardingName)(this.submitData||(0,S.default)(this),this.item.floating_ip_address)}static get modalSize(){return"large"}getModalSize(){return"large"}get defaultValue(){var{floating_ip_address:e}=this.item;return{floatingIp:e}}getSubmitData(e){var{floatingIp:t,virtual_adapter:{selectedRows:a=[]}={},fixed_ip_address:{selectedRows:r=[]}={},external_port:n,internal_port:i}=e,l=B({},(0,I.default)(e,["floatingIp","virtual_adapter","fixed_ip_address","external_port","internal_port"]));return(0,_.default)(n).call(n,":")?l.external_port_range=n:l.external_port=n,(0,_.default)(i).call(i,":")?l.internal_port_range=i:l.internal_port=i,l.internal_ip_address=r[0].fixed_ip_address,l.internal_port_id=a[0].id,this.submitData=l,l}get nameForStateUpdate(){return["protocol"]}get portDeviceOwner(){return["compute:nova",""]}getPorts(){N.getPortsForPortFormItem.call(this,this.portDeviceOwner)}getRangeSupport(){var e=this;return(0,w.default)((function*(){try{yield j.default.fetchListByPage({limit:1,fipId:e.fipId,external_port_range:"80:81"}),e.setState({supportRange:!0})}catch(t){e.setState({supportRange:!1})}}))()}get supportRange(){var{supportRange:e}=this.state;return e}get maxRangeSize(){return this.supportRange?1/0:20}get maxRangeSizeTip(){return t("The maximum batch size is {size}, that is, the size of the port range cannot exceed {size}.",{size:this.maxRangeSize})}get tips(){return P.default.createElement("div",null,P.default.createElement("p",null,t("1. You can create {resources} using ports or port ranges.",{resources:this.resources})),P.default.createElement("p",null,t("2. In the same protocol, you cannot create multiple {resources} for the same source port or source port range.",{resources:this.resources})),P.default.createElement("p",null,t("3. When using a port range to create a port mapping, the size of the external port range is required to be the same as the size of the internal port range. For example, the external port range is 80:90 and the internal port range is 8080:8090.")),!this.supportRange&&P.default.createElement("p",null,t("4. When you use a port range to create {resources}, multiple {resources} will be created in batches. ",{resources:this.resources})+this.maxRangeSizeTip))}get formItems(){var{fixed_ip_address:e={selectedRows:[]}}=this.state,a=t("Input external port or port range(example: 80 or 80:160)"),r=t("Input internal port or port range(example: 80 or 80:160)"),n=[{name:"floatingIp",label:t("Floating Ip"),type:"label",iconType:"floatingIp"},{name:"description",label:t("Description"),type:"textarea"},{name:"protocol",label:t("Protocol"),type:"select",options:(0,z.getOptions)(E.portForwardingProtocols),required:!0},{name:"external_port",label:t("External Port/Port Range"),type:"port-range",required:!0,validator:this.validateExternalPort,dependencies:["protocol","internal_port"],placeholder:a,extra:a,hasRequiredCheck:!1},{name:"internal_port",label:t("Internal Port/Port Range"),type:"port-range",hidden:0===e.selectedRows.length,required:!0,validator:this.validateInternalPort,dependencies:["protocol","external_port"],placeholder:r,extra:r,hasRequiredCheck:!1}],[i,l]=N.getPortFormItem.call(this);return i.label=t("Target Port"),l.label=t("Target IP Address"),l.onChange=this.onFixedIpChange,(0,x.default)(n).call(n,4,0,i,l),n}}a.CreatePortForwarding=U,(0,C.default)(U,"id","create-port-forwarding"),(0,C.default)(U,"title",t("Create Port Forwarding")),(0,C.default)(U,"policy","create_floatingip_port_forwarding"),(0,C.default)(U,"allowed",(e=>h.default.resolve((0,D.default)(e.fixed_ip_address)&&(0,F.enablePFW)())));var q=(0,T.inject)("rootStore")((0,T.observer)(U));a.default=q},1410:function(e,t,a){"use strict";var r=a(19),n=a(21);r(t,"__esModule",{value:!0}),t.default=t.CredentialStore=void 0;var i,l=n(a(3929)),s=n(a(27)),o=n(a(25)),u=n(a(51)),d=n(a(62)),c=n(a(54)),f=a(34),p=n(a(48)),h=n(a(140)),m=n(a(1207)),g=n(a(53)),v=(i=class extends g.default{get isSubResource(){return!0}get client(){return p.default.keystone.users.applicationCredentials}get paramsFunc(){return e=>{var{current:t,id:a,all_projects:r}=e;return(0,d.default)(e,["current","id","all_projects"])}}create(e){var t={};return t[this.responseKey]=e,this.submitting(this.client.create(h.default.user.user.id,t))}listDidFetch(e,t){return(0,u.default)((function*(){if(!t)try{var a=yield m.default.getUserProjects(),r=new l.default;(0,s.default)(a).call(a,(e=>{r.set(e.id,e.name)})),(0,s.default)(e).call(e,(e=>{e.project_name=r.get(e.project_id)||"-"}))}catch(t){return e}return e}))()}},(0,c.default)(i.prototype,"create",[f.action],(0,o.default)(i.prototype,"create"),i.prototype),i);t.CredentialStore=v;var y=new v;t.default=y},1436:function(e,a,r){"use strict";var n=r(160),i=r(19),l=r(25),s=r(21);i(a,"__esModule",{value:!0}),a.default=void 0;var o=s(r(65));r(333);var u=s(r(332));r(1317);var d=s(r(1318)),c=s(r(36)),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=m(t);if(a&&a.has(e))return a.get(e);var r={},n=i&&l;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var o=n?l(e,s):null;o&&(o.get||o.set)?i(r,s,o):r[s]=e[s]}r.default=e,a&&a.set(e,r);return r}(r(0)),p=(r(173),s(r(16))),h=r(161);function m(e){if("function"!=typeof n)return null;var t=new n,a=new n;return(m=function(e){return e?a:t})(e)}class g extends f.Component{static propTypes(){return{title:p.default.string.isRequired,buttonType:p.default.string,render:p.default.func,component:p.default.node,item:p.default.any,modalSize:p.default.string,okText:p.default.string,cancelText:p.default.string,handleOk:p.default.func,className:p.default.func,buttonText:p.default.string,buttonClassName:p.default.string,showCancelButton:p.default.bool,style:p.default.object,onClickButton:p.default.func,onFinishAction:p.default.func,onCancelAction:p.default.func}}constructor(e){super(e),(0,c.default)(this,"getModalWidth",(e=>{switch(e){case"small":return 520;case"middle":return 720;case"large":return 1200;default:return 520}})),(0,c.default)(this,"onClick",(e=>{e&&e.stopPropagation();var{onClickButton:t}=this.props;t&&t(),this.showModal()})),(0,c.default)(this,"onFinishAction",(()=>{var{onFinishAction:e}=this.props;e&&e()})),(0,c.default)(this,"handleOk",(()=>{var{handleOk:e}=this.props;e?(this.setState({submitLoading:!0}),e()instanceof o.default?e().finally((()=>{this.hideModal(),this.onFinishAction(),this.setState({submitLoading:!1})})):(this.hideModal(),this.onFinishAction(),this.setState({submitLoading:!1}))):(this.hideModal(),this.onFinishAction())})),(0,c.default)(this,"handleCancel",(()=>{var{onCancelAction:e}=this.props;e&&e(),this.hideModal()})),(0,c.default)(this,"hideModal",(()=>{this.setState({visible:!1})})),(0,c.default)(this,"showModal",(()=>{this.setState({visible:!0})})),this.state={visible:!1,submitLoading:!1}}renderModal(){var{visible:e,submitLoading:t}=this.state;if(!e)return null;var{title:a,item:r,modalSize:n,className:i,okText:l,cancelText:s,render:o,component:u,showCancelButton:c}=this.props,p=this.getModalWidth(n),m=o?o(r):u,g={visible:e,title:a,key:"modal-".concat((0,h.generateId)()),className:i,width:p,onOk:this.handleOk,onCancel:this.handleCancel,okText:l,cancelText:s,confirmLoading:t};return c||(g.cancelButtonProps={style:{display:"none"}}),f.default.createElement(d.default,g,m)}render(){var{buttonText:e,title:t,danger:a,style:r,buttonType:n,buttonClassName:i}=this.props;return f.default.createElement(f.default.Fragment,null,f.default.createElement(u.default,{type:n,danger:a,onClick:this.onClick,className:i,style:r},e||t),this.renderModal())}}a.default=g,(0,c.default)(g,"defaultProps",{buttonType:"primary",render:null,component:null,item:null,okText:t("Confirm"),cancelText:t("Cancel"),handleOk:null,className:"",buttonClassName:"",showCancelButton:!1,style:{},onClickButton:null,onFinishAction:null,onCancelAction:null})},1530:function(e,a,r){"use strict";var n=r(33),i=r(44),l=r(32),s=r(25),o=r(27),u=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=a.BaseTable=void 0;var p=f(r(57)),h=f(r(32)),m=f(r(198)),g=f(r(81)),v=f(r(27)),y=f(r(90));r(572);var b=f(r(574)),_=f(r(1525)),S=f(r(1523)),x=f(r(1273));r(573);var w=f(r(421)),I=f(r(1368));r(1205);var C=f(r(1206));r(333);var k=f(r(332)),D=f(r(62));r(1270);var P=f(r(1271)),T=f(r(1248));r(411);var A=f(r(227)),M=f(r(595)),R=f(r(36)),N=f(r(131)),E=f(r(91)),j=f(r(111)),F=f(r(1531)),L=f(r(0)),z=f(r(16)),O=f(r(4)),B=f(r(1396)),V=r(34),U=(r(173),f(r(1450))),q=f(r(1452)),Q=(r(555),f(r(3451))),G=r(578),K=r(161),H=r(243),W=r(558),Y=r(406),Z=f(r(140)),J=f(r(3454)),X=f(r(1249)),$=f(r(1333)),ee=f(r(3461)),te=f(r(3464)),ae=f(r(3468));function re(e,t){var a=n(e);if(i){var r=i(e);t&&(r=l(r).call(r,(function(t){return s(e,t).enumerable}))),a.push.apply(a,r)}return a}function ne(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)o(a=re(Object(r),!0)).call(a,(function(t){(0,R.default)(e,t,r[t])}));else if(u)d(e,u(r));else{var n;o(n=re(Object(r))).call(n,(function(t){c(e,t,s(r,t))}))}}return e}class ie extends L.default.Component{constructor(e){var a,r,n;super(e),(0,R.default)(this,"getDataIndex",(e=>(0,E.default)(e)?e.join(","):e)),(0,R.default)(this,"getSortKey",(e=>{var{field:t,column:a}=e;return t&&a?a.sortKey||a.dataIndex:null})),(0,R.default)(this,"handleChange",((e,t,a,r)=>{var{action:n}=r,i=ne({limit:e.pageSize,page:e.current,current:e.current,sortKey:this.getSortKey(a),sortOrder:a.order},t),{ableSkipPageByBackend:l,isPageByBack:s}=this.props;if("sort"===n){if(s&&!l){var{pagination:o}=this.props;i=ne(ne({},i),{},{limit:o.pageSize,page:o.current,current:o.current})}this.sortKey=this.getSortKey(a),this.sortOrder=a.order,this.props.onFetchBySort(i)}else this.props.onFetch(i)})),(0,R.default)(this,"handlePageChange",((e,t)=>{var{filters:a}=this.state,{onFetch:r,defaultSortKey:n,defaultSortOrder:i}=this.props;r&&r(ne({limit:t,page:e,current:e,sortKey:this.sortKey||n,sortOrder:this.sortOrder||i},a))})),(0,R.default)(this,"handleRefresh",(()=>{this.props.onRefresh(!0)})),(0,R.default)(this,"handleRowHide",(e=>{var t,a=(0,p.default)(t=this.hideableRows).call(t,(e=>e.value));this.setState({hideRow:(0,h.default)(a).call(a,(t=>!(0,m.default)(e).call(e,t)))},(()=>{var e;(0,H.setLocalStorageItem)((0,g.default)(e="".concat(this.useId,"-")).call(e,this.props.resourceName),this.state.hideRow)}))})),(0,R.default)(this,"handleCancelSelect",(()=>{this.props.onSelectRowKeys([])})),(0,R.default)(this,"handleFilterChange",((e,t)=>{if(!(0,B.default)(e,this.props.filters)||!(0,B.default)(t,this.props.timeFilter)){this.setState({filters:e,timeFilter:t});var{pageSize:a}=this.props.pagination,{sortKey:r,sortOrder:n,onFilterChange:i}=this.props;i&&i(ne({limit:a,page:1,sortKey:r,sortOrder:n},e),t)}})),(0,R.default)(this,"handleTimeChange",(e=>{this.handleFilterChange(this.state.filters,e)})),(0,R.default)(this,"handleFilterInput",(e=>{var t={};(0,v.default)(e).call(e,(e=>{t[(0,h.default)(e).name]=e.value})),this.handleFilterChange(t,this.state.timeFilter)})),(0,R.default)(this,"handleInputFocus",(e=>{var{handleInputFocus:t}=this.props;t&&t(e)})),(0,R.default)(this,"handleFilterInputText",(e=>{var t={},{value:a}=e.currentTarget;a&&(t.keywords=a),this.handleFilterChange(t,this.state.timeFilter)})),(0,R.default)(this,"hasItemActions",(()=>{var{firstAction:e,moreActions:t,actionList:a}=this.itemActions;return!!e||(!(!t||!t.length)||a&&a.length>0)})),(0,R.default)(this,"getProjectId",(e=>e.project_id||e.owner||e.fingerprint||e.tenant)),(0,R.default)(this,"getProjectRender",(e=>e||((e,t)=>{var a=this.getProjectId(t);if(!a)return"-";var r=(0,W.getLinkRender)({key:"projectDetailAdmin",params:{id:a},value:a});return L.default.createElement(L.default.Fragment,null,L.default.createElement("div",null,Z.default.hasAdminRole?r:a),L.default.createElement("div",null,e||"-"))}))),(0,R.default)(this,"getNoValueRender",(e=>e||(e=>(0,K.getNoValue)(e)))),(0,R.default)(this,"getPriceRender",((e,t)=>e||(e=>{var t=(0,N.default)(e)?e:(e||0).toFixed(2);return L.default.createElement("span",{style:{color:"#f50"}},t)}))),(0,R.default)(this,"getTipRender",(function(e,t,a){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:M.default,n=(n,i)=>{var l=e(n,i),s=t?t(n,i):(0,j.default)(i,a);return l?L.default.createElement("div",null,s,L.default.createElement(A.default,{title:l},L.default.createElement(r,{style:{marginLeft:8}}))):s};return n})),(0,R.default)(this,"getColumnTitle",(e=>{var{title:t,titleTip:a}=e;return a?L.default.createElement("span",null,t,L.default.createElement(A.default,{title:a},L.default.createElement(T.default,{style:{marginLeft:8}}))):t})),(0,R.default)(this,"getBaseColumns",(e=>(0,p.default)(e).call(e,(e=>{var{Paragraph:t}=P.default,{sortable:a,dataIndex:r,valueRender:n,sorter:i,sortOrder:l,render:s,copyable:o,tip:u,isStatus:d,isName:c,isLink:f,routeName:p,linkPrefix:h,isPrice:m,valueMap:g,unit:v}=e,y=(0,D.default)(e,["sortable","dataIndex","valueRender","sorter","sortOrder","render","copyable","tip","isStatus","isName","isLink","routeName","linkPrefix","isPrice","valueMap","unit"]),b=(0,G.getColumnSorter)(e,this.props),_=l||b?(0,G.getSortOrder)(r,this.props):null,S=s||(0,G.getRender)(n);if(g&&(S=(0,G.getValueMapRender)(e)),v&&(S=(0,G.getUnitRender)(e)),(0,G.checkIsStatusColumn)(r,d)&&(S=(0,G.getStatusRender)(S)),"description"===r&&(S=this.getNoValueRender(S)),"project_name"===r&&(S=this.getProjectRender(S)),"name"===r&&p||f){var{rowKey:x}=this.props;S=(0,G.getNameRenderByRouter)(S,e,x)}if("name"===r&&h||c){var{rowKey:w}=this.props;S=(0,G.getNameRender)(S,e,w)}if(("cost"===r||m)&&(S=this.getPriceRender(S,e)),o&&(S=e=>e&&"-"!==e?L.default.createElement(t,{copyable:!0},e):"-"),u){var{tipIcon:I}=e;S=this.getTipRender(u,S,r,I)}var C=ne(ne({},y),{},{title:this.getColumnTitle(e),dataIndex:r,align:e.align||"left"});return b&&(C.sorter=b),l&&(C.sortOrder=_),(0,G.updateColumnSort)(C,this.props),S&&(C.render=S),ne(ne({},C),{},{render:(e,t)=>(0,G.columnRender)(C.render,e,t)})})))),(0,R.default)(this,"getColumns",(()=>{var e,{columns:a,containerProps:r,onClickAction:n,onFinishAction:i,onCancelAction:l,isAdminPage:s}=this.props,{hideRow:o}=this.state,u=(0,h.default)(e=(0,h.default)(a).call(a,(e=>!e.hidden))).call(e,(e=>!(0,F.default)(o,this.getDataIndex(e.dataIndex)))),d=this.getBaseColumns(u);return this.hasItemActions()?[...d,{title:t("Action"),key:"operation",width:150,render:(e,t,a)=>L.default.createElement(X.default,{isAdminPage:s,actions:this.itemActions,onFinishAction:i,onCancelAction:l,item:t,index:a,containerProps:r,onClickAction:n})}]:d})),(0,R.default)(this,"stopRefreshAuto",(()=>{this.setState({autoRefresh:!1});var{stopRefreshAuto:e}=this.props;e&&e()})),(0,R.default)(this,"startRefreshAuto",(()=>{this.setState({autoRefresh:!0});var{startRefreshAuto:e}=this.props;e&&e()})),(0,R.default)(this,"renderSelectedTitle",(()=>L.default.createElement("div",{className:ae.default["select-title"]},L.default.createElement("div",null,this.renderBatchActions()),L.default.createElement("div",null,L.default.createElement(k.default,{type:"flat",className:ae.default["cancel-select"],onClick:this.handleCancelSelect},t("Cancel Select")))))),(0,R.default)(this,"renderTableTitle",(()=>this.renderNormalTitle())),(0,R.default)(this,"renderRowMenu",(()=>{var{hideRow:e}=this.state;return L.default.createElement(J.default,{className:ae.default["column-menu"],options:this.hideableRows,value:(e=>{var t,a=[];return(0,v.default)(t=this.hideableRows).call(t,(t=>{-1===(0,y.default)(e).call(e,t.value)&&a.push(t.value)})),a})(e),onChange:this.handleRowHide})})),(0,R.default)(this,"renderTableFooter",(e=>{var{page:t,current:a,pageSize:r,total:n,pageSizeOptions:i}=this.props.pagination,{isLoading:l,hideTotal:s}=this.props;return L.default.createElement(q.default,{current:t||a||1,pageSize:r,onChange:this.handlePageChange,currentDataSize:e.length,pageSizeOptions:i||[10,20,50,100],total:n,isLoading:l,onFocusChange:this.handleInputFocus,hideTotal:s})})),this.state={hideRow:(0,H.getLocalStorageItem)((0,g.default)(a="".concat(this.useId,"-")).call(a,this.props.resourceName))||[],filters:[],timeFilter:{},autoRefresh:e.autoRefresh},this.sortKey=e.defaultSortKey,this.sortOrder=e.defaultSortOrder,this.suggestions=(0,p.default)(r=(0,h.default)(n=e.columns).call(n,(e=>e.search&&e.dataIndex))).call(r,(e=>{var t;return{label:e.title,key:e.dataIndex,options:e.filters&&(0,p.default)(t=e.filters).call(t,(e=>({label:e.text,key:e.value})))}}))}get hideableRows(){var e,t,a;return(0,p.default)(e=(0,h.default)(t=(0,h.default)(a=this.props.columns).call(a,(e=>!e.hidden))).call(t,(e=>e.isHideable))).call(e,(e=>({label:e.title,value:this.getDataIndex(e.dataIndex)||e.key})))}get useId(){var{user:e={}}=(0,V.toJS)(this.props.rootStore)||{},{user:{id:t}={}}=e||{};return t}get itemActions(){var{itemActions:e={}}=this.props;return e}filterDownloadColumns(e){var a,r,{rowKey:n}=this.props,i=(0,p.default)(a=(0,h.default)(e).call(e,(e=>!e.hidden))).call(a,(e=>{var{title:a,splitColumnForDownload:r=!0}=e;if((0,m.default)(a).call(a,"/")&&r){var i,l,[s,o]=e.title.split("/"),u=o;if(s.length>2)u=(0,g.default)(l="".concat(s.split("ID")[0])).call(l,o);var d=e.idKey||n,c=null;return(0,m.default)(i=e.title).call(i,t("Project"))&&"project_name"===e.dataIndex&&(d="project_id",c=(e,t)=>this.getProjectId(t)),[{title:s,dataIndex:d,render:c},ne(ne({},e),{},{title:u})]}return e}));return(0,g.default)(r=[]).call(r,...i)}renderBatchActions(){var{batchActions:e,selectedRowKeys:t,data:a,rowKey:r,containerProps:n,onClickAction:i,onFinishAction:l,onCancelAction:s,resourceName:o,isAdminPage:u}=this.props,d=(0,h.default)(a).call(a,(e=>(0,y.default)(t).call(t,e[r])>=0));return e?L.default.createElement(ee.default,{isAdminPage:u,visibleButtonNumber:3,selectedItemKeys:t,selectedItems:d,batchActions:e,onFinishAction:l,onCancelAction:s,containerProps:n,onClickAction:i,resourceName:o}):null}renderTimeFilter(){var{showTimeFilter:e,filterTimeDefaultValue:t}=this.props;if(!e)return null;var a={onChange:this.handleTimeChange,className:ae.default.timer};return void 0!==t&&(a.defaultValue=t),L.default.createElement(Q.default,a)}renderSearch(){var{hideSearch:e,searchFilters:a,initFilter:r={}}=this.props;return e?null:a.length>0?L.default.createElement("div",{className:ae.default["search-row"]},L.default.createElement(U.default,{filterParams:a,initValue:r,onInputChange:this.handleFilterInput,onInputFocus:this.handleInputFocus,placeholder:t("Multiple filter tags are separated by enter")})):L.default.createElement("div",{className:ae.default["search-row"]},L.default.createElement(C.default,{placeholder:t("Enter query conditions to filter"),onChange:this.handleFilterInputText}))}renderActions(){var{isAdminPage:e,primaryActions:t,containerProps:a,onClickAction:r,onFinishAction:n,onCancelAction:i,primaryActionsExtra:l}=this.props;return t?L.default.createElement($.default,{isAdminPage:e,primaryActions:t,containerProps:a,onClickAction:r,onFinishAction:n,onCancelAction:i,primaryActionsExtra:l}):null}renderCustomButton(){var{hideCustom:e}=this.props;return e?null:L.default.createElement(w.default,{overlay:this.renderRowMenu()},L.default.createElement(k.default,{className:ae.default["custom-button"],type:"default",icon:L.default.createElement(I.default,null)}))}renderDownload(){var{pagination:e,data:t,columns:a,resourceName:r,detailName:n,getDownloadData:i,onClickAction:l,onCancelAction:s,hideDownload:o}=this.props;if(o)return null;var{total:u}=e,d={data:t,columns:this.filterDownloadColumns(a),total:u,getValueRenderFunc:G.getValueRenderFunc,resourceName:r,extraName:n,getData:i,onBeginDownload:l,onFinishDownload:s,onCancelDownload:s};return L.default.createElement(te.default,d)}renderRefresh(){var{hideRefresh:e}=this.props;return e?null:L.default.createElement(k.default,{type:"default",icon:L.default.createElement(x.default,null),onClick:this.handleRefresh})}renderRefreshAuto(){var{hideAutoRefresh:e}=this.props;if(e)return null;var{autoRefresh:a}=this.state;if(a){var r=t("Stop auto refreshing data");return L.default.createElement(A.default,{title:r},L.default.createElement(k.default,{type:"primary",icon:L.default.createElement(S.default,null),onClick:this.stopRefreshAuto}))}var n=t("Start auto refreshing data");return L.default.createElement(A.default,{title:n},L.default.createElement(k.default,{type:"default",icon:L.default.createElement(_.default,null),onClick:this.startRefreshAuto}))}renderNormalTitle(){return L.default.createElement("div",{className:ae.default["table-header"],id:"sl-table-header-search"},L.default.createElement("div",{className:(0,O.default)(ae.default["table-header-btns"],"table-header-btns")},this.renderRefresh(),this.renderActions(),this.renderBatchActions(),this.renderCustomButton(),this.renderDownload(),this.renderRefreshAuto()),this.renderTimeFilter(),this.renderSearch())}render(){var{className:e,data:t,isLoading:a,silentLoading:r,rowKey:n,selectedRowKeys:i,onSelectRowKeys:l,hideHeader:s,getCheckboxProps:o,pagination:u,scrollY:d,expandable:c,isPageByBack:f=!0,ableSkipPageByBackend:p,childrenColumnName:h}=this.props,m=null,g=!(!p&&f)&&ne(ne({},u),{},{size:"small"});s||this.renderTableTitle;var v=!p&&f?this.renderTableFooter:null;l&&(m={selectedRowKeys:i,getCheckboxProps:o,onChange:l});var y=this.renderTableTitle(),_=this.getColumns(),S={};return d>0&&(S.y=d||400),L.default.createElement("div",null,y,L.default.createElement(b.default,{className:(0,O.default)(ae.default.table,"sl-table",e),rowKey:n,columns:_,dataSource:(0,V.toJS)(t),loading:!r&&a,onChange:this.handleChange,pagination:g,rowSelection:m,sortDirections:["ascend","descend","ascend"],scroll:S,showSorterTooltip:!1,expandable:c,footer:v,childrenColumnName:h}))}}a.BaseTable=ie,(0,R.default)(ie,"propTypes",{data:z.default.oneOfType([z.default.array,z.default.object]).isRequired,columns:z.default.array.isRequired,selectedRowKeys:z.default.array,isLoading:z.default.bool,pagination:z.default.object,filters:z.default.object,keyword:z.default.string,rowKey:z.default.any,onFetch:z.default.func,onFilterChange:z.default.func,onSelectRowKeys:z.default.func,getCheckboxProps:z.default.func,hideHeader:z.default.bool,hideSearch:z.default.bool,hideCustom:z.default.bool,batchActions:z.default.array,alwaysUpdate:z.default.bool,emptyText:z.default.oneOfType([z.default.string||z.default.func]),resourceName:z.default.string,detailName:z.default.string,expandable:z.default.object,showTimeFilter:z.default.bool,timeFilter:z.default.any,isPageByBack:z.default.bool,isSortByBack:z.default.bool,ableSkipPageByBackend:z.default.bool,autoRefresh:z.default.bool,hideRefresh:z.default.bool,hideAutoRefresh:z.default.bool,startRefreshAuto:z.default.func,stopRefreshAuto:z.default.func,dataDurationAuto:z.default.number,defaultSortKey:z.default.string,defaultSortOrder:z.default.string,hideTotal:z.default.bool,hideDownload:z.default.bool,primaryActionsExtra:z.default.any,isAdminPage:z.default.bool,containerProps:z.default.any}),(0,R.default)(ie,"defaultProps",{rowKey:"name",selectedRowKeys:[],onFetch(){},hideHeader:!1,hideSearch:!1,hideCustom:!1,resourceName:"",detailName:"",expandable:void 0,showTimeFilter:!1,isPageByBack:!1,isSortByBack:!1,autoRefresh:!0,hideRefresh:!1,hideAutoRefresh:!1,dataDurationAuto:15,defaultSortKey:"",defaultSortOrder:"",hideTotal:!1,hideDownload:!1,primaryActionsExtra:null,isAdminPage:!1,ableSkipPageByBackend:!1});var le=(0,Y.inject)("rootStore")(ie);a.default=le},1533:function(e,t,a){"use strict";var r=a(19),n=a(21);r(t,"__esModule",{value:!0}),t.default=t.ActionLogStore=void 0;var i=n(a(48)),l=n(a(53));class s extends l.default{get client(){return i.default.nova.servers.instanceActions}get isSubResource(){return!0}get paramsFunc(){return()=>({})}detailFetchByClient(e){var{id:t,requestId:a}=e;return this.client.show(t,a)}}t.ActionLogStore=s;var o=new s;t.default=o},1534:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=function(e){var{id:a,requestId:r,store:n,actionEvent:i}=e,f=[{title:t("Operation Name"),dataIndex:"event",key:"event",render:e=>i[e]||e},{title:t("Start Time"),dataIndex:"start_time",key:"start_time",render:e=>(0,d.getLocalTimeStr)(e)},{title:t("End Time"),dataIndex:"finish_time",key:"finish_time",render:e=>e?(0,d.getLocalTimeStr)(e):"-"},{title:t("Execution Result"),dataIndex:"result",key:"result",render:e=>"Success"===e?t("Success"):"-"}],p=function(){var e=(0,o.default)((function*(){var e,t=(yield n.fetchDetail({id:a,requestId:r}))||{},{events:i=[]}=t;return(0,l.default)(e=(0,s.default)(i).call(i)).call(e)}));return function(){return e.apply(this,arguments)}}();return u.default.createElement(c.default,{columns:f,getData:p})};var l=i(r(647)),s=i(r(200)),o=i(r(51)),u=i(r(0)),d=r(569),c=i(r(623))},1539:function(e,a,r){"use strict";var n=r(33),i=r(44),l=r(32),s=r(25),o=r(27),u=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=a.CreateKeypair=void 0;var p=f(r(65)),h=f(r(51)),m=f(r(36)),g=r(406),v=r(1193),y=f(r(420)),b=f(r(407)),_=f(r(1298));function S(e,t){var a=n(e);if(i){var r=i(e);t&&(r=l(r).call(r,(function(t){return s(e,t).enumerable}))),a.push.apply(a,r)}return a}function x(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)o(a=S(Object(r),!0)).call(a,(function(t){(0,m.default)(e,t,r[t])}));else if(u)d(e,u(r));else{var n;o(n=S(Object(r))).call(n,(function(t){c(e,t,s(r,t))}))}}return e}var w=()=>{var{total:e=0,data:t=[]}=y.default.list||{};return e||t.length},I=e=>{var{limit:t=0}=e||{};return-1===t||t>w()?1:0};class C extends v.ModalAction{constructor(){super(...arguments),(0,m.default)(this,"onSubmit",(e=>{var{name:t,public_key:a}=e,r={name:t,public_key:a,type:"ssh"};return y.default.create(r).then((e=>{if(!a){var{keypair:{private_key:r}}=e,n="".concat(t,".pem"),i=new Blob([r],{type:"text/plain;charset=utf-8"});_.default.saveAs(i,n)}}))}))}get name(){return t("Create Keypair")}init(){this.state.quota={},this.state.quotaLoading=!0,this.projectStore=b.default,this.getQuota()}get tips(){return t("Quota of key pair means: the number of allowed key pairs for each user.")}static get disableSubmit(){var{novaQuota:{key_pairs:e={}}}=b.default;return 0===I(e)}static get showQuota(){return!0}get showQuota(){return!0}getQuota(){var e=this;return(0,h.default)((function*(){e.setState({quotaLoading:!0});var t=yield e.projectStore.fetchProjectNovaQuota(),{key_pairs:a={}}=t||{};e.setState({quota:a,quotaLoading:!1})}))()}get quotaInfo(){var{quota:e={},quotaLoading:a}=this.state;if(a)return[];var r=I(e),n=w();return[x(x({},e),{},{add:r,used:n,name:"key_pair",title:t("Key Pair")})]}get defaultValue(){return{type:"create"}}get createTypeList(){return[{value:"create",label:t("Create Keypair")},{value:"import",label:t("Import Keypair")}]}get formItems(){var{type:e}=this.state,a="create"===e;return[{name:"type",label:t("Create Type"),type:"radio",options:this.createTypeList},{name:"name",label:t("Name"),type:"input-name",required:!0,isKeypair:!0},{name:"public_key",label:t("Public Key"),type:"textarea-from-file",hidden:a,required:!a}]}}a.CreateKeypair=C,(0,m.default)(C,"id","create-keypair"),(0,m.default)(C,"title",t("Create Keypair")),(0,m.default)(C,"policy","os_compute_api:os-keypairs:create"),(0,m.default)(C,"allowed",(()=>p.default.resolve(!0)));var k=(0,g.inject)("rootStore")((0,g.observer)(C));a.default=k},1540:function(e,t,a){var r=a(3490);"string"==typeof r&&(r=[[e.i,r,""]]);var n={hmr:!0,transform:undefined,insertInto:void 0};a(75)(r,n);r.locals&&(e.exports=r.locals)},1543:function(e,a,r){"use strict";var n=r(160),i=r(19),l=r(25),s=r(21);i(a,"__esModule",{value:!0}),a.default=void 0,r(1198);var o=s(r(1199)),u=s(r(1294));r(1196);var d=s(r(1197));r(411);var c=s(r(227));r(1266);var f=s(r(1267));r(1205);var p=s(r(1206)),h=s(r(409)),m=s(r(32)),g=s(r(226)),v=s(r(57)),y=s(r(200)),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=x(t);if(a&&a.has(e))return a.get(e);var r={},n=i&&l;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var o=n?l(e,s):null;o&&(o.get||o.set)?i(r,s,o):r[s]=e[s]}r.default=e,a&&a.set(e,r);return r}(r(0)),_=(r(173),r(555),r(334)),S=s(r(16));function x(e){if("function"!=typeof n)return null;var t=new n,a=new n;return(x=function(e){return e?a:t})(e)}var w=e=>{var{tags:a,onChange:r,maxLength:n,maxCount:i}=e,[l,s]=(0,b.useState)(a),[S,x]=(0,b.useState)(!1),[w,I]=(0,b.useState)(""),[C,k]=(0,b.useState)(-1),[D,P]=(0,b.useState)(""),T=n&&n>0?{maxLength:n}:{},A=i&&i>0||-1;var M=null,R=null,N=e=>{M=e};function E(e){P(e.target.value)}function j(){var e=[...l];e[C]=D,s(e),P(""),k(-1)}function F(){var e=w.toLocaleLowerCase();w&&!(0,g.default)(l).call(l,(t=>t.toLowerCase()===e))&&(-1!==A&&l.length<i||-1===A)&&s([...l,w]),x(!1),I("")}return(0,b.useEffect)((()=>{R&&R.focus()}),[S]),(0,b.useEffect)((()=>{M&&M.focus()}),[C]),(0,b.useEffect)((()=>{r(l)}),[l]),b.default.createElement(o.default,{gutter:[0,8]},(0,v.default)(l).call(l,((e,t)=>{if(C===t)return b.default.createElement(p.default,(0,h.default)({ref:N,style:{width:78,marginRight:8,verticalAlign:"top"},key:e,size:"small",value:D,onChange:E,onBlur:j,onPressEnter:j},T));var a=e.length>20,r=a?"".concat((0,y.default)(e).call(e,0,20),"..."):e,n=b.default.createElement(f.default,{key:e,closable:!0,onClose:()=>{return t=e,void s((0,m.default)(l).call(l,(e=>e!==t)));var t},color:_.projectTagsColors[t%10]},b.default.createElement("span",{style:{whiteSpace:"pre-wrap"},onDoubleClick:a=>{k(t),P(e),a.preventDefault()}},r));return b.default.createElement(d.default,{span:24,key:e},a?b.default.createElement(c.default,{title:b.default.createElement("span",{style:{whiteSpace:"pre-wrap"}},e)},n):n)})),b.default.createElement(d.default,{span:24},S&&b.default.createElement(p.default,(0,h.default)({ref:e=>{R=e},style:{width:78,marginRight:8,verticalAlign:"top"},type:"text",size:"small",value:w,onChange:function(e){I(e.target.value)},onBlur:F,onPressEnter:F},T)),!S&&b.default.createElement(f.default,{onClick:function(){x(!0)}},b.default.createElement(u.default,null)," ",t("New Tag"))))};w.propTypes={tags:S.default.array,onChange:S.default.func,maxLength:S.default.number,maxCount:S.default.number};var I=w;a.default=I},1544:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=void 0;var l=i(r(1545)),s=i(r(3548)),o=i(r(3549)),u=i(r(3550)),d=i(r(3551)),c=i(r(3552)),f=i(r(3553)),p=i(r(3554)),h=i(r(3555)),m=i(r(3556)),g=i(r(1546)),v=i(r(3557)),y=i(r(3558)),b=i(r(3559)),_=i(r(3560)),S=i(r(3561)),x=i(r(3562)),w=i(r(3563)),I=i(r(3564)),C={title:t("Data Protection"),actions:[f.default,g.default,b.default,m.default,u.default]},k={title:t("Instance Related"),actions:[I.default,w.default,d.default,c.default]},D={title:t("Capacity & Type"),actions:[p.default,h.default]},P={rowActions:{firstAction:s.default,moreActions:[C,k,D,{action:o.default},{action:S.default},{action:x.default}]},batchActions:[o.default],primaryActions:[l.default,_.default]},T={rowActions:{firstAction:s.default,moreActions:[C,k,D,{action:o.default},{action:S.default},{action:x.default}]},batchActions:[],primaryActions:[]},A={actionConfigs:P,adminConfig:{rowActions:{firstAction:o.default,moreActions:[{action:v.default},{action:y.default}]},batchActions:[o.default],primaryActions:[]},instanceDetailConfig:T,instanceDetailAdminConfig:{rowActions:{firstAction:v.default,moreActions:[{action:y.default}]},batchActions:[],primaryActions:[]}};a.default=A},1545:function(e,a,r){"use strict";var n=r(33),i=r(44),l=r(32),s=r(25),o=r(27),u=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(102)),h=f(r(65)),m=f(r(1400)),g=f(r(57)),v=f(r(1335)),y=f(r(81)),b=f(r(1204)),_=f(r(27)),S=f(r(32));r(1239);var x=f(r(1240)),w=f(r(409));r(1336);var I=f(r(426)),C=f(r(51)),k=f(r(36)),D=f(r(0)),P=r(406),T=f(r(1376)),A=r(569),M=r(557),R=f(r(582)),N=f(r(565)),E=f(r(410)),j=f(r(566)),F=f(r(407)),L=f(r(1242)),z=(r(173),r(34)),O=r(1193),B=f(r(4)),V=r(563),U=r(1301),q=r(161),Q=f(r(3546));function G(e,t){var a=n(e);if(i){var r=i(e);t&&(r=l(r).call(r,(function(t){return s(e,t).enumerable}))),a.push.apply(a,r)}return a}function K(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)o(a=G(Object(r),!0)).call(a,(function(t){(0,k.default)(e,t,r[t])}));else if(u)d(e,u(r));else{var n;o(n=G(Object(r))).call(n,(function(t){c(e,t,s(r,t))}))}}return e}class H extends O.FormAction{constructor(){var e;super(...arguments),e=this,(0,k.default)(this,"onImageTabChange",(e=>{this.setState({imageTab:e})})),(0,k.default)(this,"onConfirmCancel",(()=>{var{initVolumeType:e}=this.state,{selectedRows:t,selectedRowKeys:a,snapshotId:r}=e,n={selectedRows:t,selectedRowKeys:a,snapshotId:"".concat(r,"-1")};this.setState({initVolumeType:n})})),(0,k.default)(this,"onVolumeTypeChange",(e=>{var{selectedRows:a=[]}=e;if(0===a.length)return(0,M.setCreateVolumeType)(""),void this.setState({multiattach:!1});var{id:r,extra_specs:{multiattach:n="False"}={},name:i}=a[0];if((0,M.setCreateVolumeType)(i),this.sourceTypeIsSnapshot){var{initVolumeType:{selectedRowKeys:l=[]},confirmCount:s=0}=this.state;r!==l[0]&&s<1&&(T.default.warn({title:t("Note: Are you sure you need to modify the volume type?"),content:M.snapshotTypeTip,onCancel:this.onConfirmCancel}),this.setState({confirmCount:1}))}this.setState({multiattach:"<is> True"===n})})),(0,k.default)(this,"onSnapshotChange",function(){var t=(0,C.default)((function*(t){var{selectedRows:a=[]}=t||{},r="",n=null;if(a.length){var i,{origin_data:{volume_type_id:l}={},id:s}=a[0]||{};if(l)r=l,n=(0,p.default)(i=e.volumeTypes).call(i,(e=>e.id===r));else try{var o,u=yield e.snapshotStore.fetchDetail({id:s}),{volume:{volume_type:d}}=u||{};n=(0,p.default)(o=e.volumeTypes).call(o,(e=>e.name===d)),r=n.id}catch(e){}if(n){var c={selectedRowKeys:[r],selectedRows:[n],snapshotId:s};e.setState({initVolumeType:c})}}}));return function(e){return t.apply(this,arguments)}}()),(0,k.default)(this,"onCountChange",(e=>{(0,M.setCreateVolumeCount)(e),this.setState({count:e},(()=>{this.onCountChangeCallback&&this.onCountChangeCallback()}))})),(0,k.default)(this,"getCountMax",(()=>{var{volumes:{left:e=0}={}}=this.getVolumeQuota();return-1===e?1/0:e})),(0,k.default)(this,"onSubmit",(e=>{var t,a,{count:r}=this.state;if(this.message)return h.default.reject(this.message);var{backup:n,image:i,snapshot:l,size:s,availableZone:o,shared:u,name:d,volume_type:c}=e,f={name:d,size:s,availability_zone:"noSelect"!==o?o:null,multiattach:u,volume_type:c.selectedRowKeys[0]};return n&&(0,m.default)(n.selectedRowKeys)&&n.selectedRowKeys.length&&(f.backup_id=n.selectedRowKeys[0]),i&&(0,m.default)(i.selectedRowKeys)&&i.selectedRowKeys.length&&(f.imageRef=i.selectedRowKeys[0]),l&&(0,m.default)(l.selectedRowKeys)&&l.selectedRowKeys.length&&(f.snapshot_id=l.selectedRowKeys[0]),1===r?this.volumeStore.create(f):(0,q.allSettled)((0,g.default)(t=(0,v.default)(a=new Array(r)).call(a,r)).call(t,((e,t)=>{var a,r=K(K({},f),{},{name:(0,y.default)(a="".concat(f.name,"-")).call(a,t+1)});return this.volumeStore.create(r)})))}))}init(){this.state=K(K({},this.state),{},{quotaLoading:!0,count:1,sharedDisabled:!1,confirmCount:0}),this.message="",this.snapshotStore=R.default,this.imageStore=N.default,this.volumeStore=E.default,this.volumeTypeStore=j.default,this.backupStore=L.default,this.getQuota(),this.getAvailZones(),this.getImages(),this.getVolumeTypes()}get listUrl(){return this.getRoutePath("volume")}get name(){return t("create volume")}static allowed(){return h.default.resolve(!0)}get disableSubmit(){var{quotaLoading:e}=this.state;if(e)return!0;var{cinderQuota:t={}}=F.default,{add:a,error:r}=(0,M.getAdd)(t),n=0===a;return n?r!==this.message&&(I.default.error(r),this.message=r):this.message="",n}get instanceName(){var e,t,{name:a}=(0,b.default)(this)||{},{count:r=1}=this.state;return 1===r?a:(0,g.default)(e=(0,v.default)(t=new Array(r)).call(t,r)).call(e,((e,t)=>{var r;return(0,y.default)(r="".concat(a,"-")).call(r,t+1)})).join(", ")}get errorText(){return this.message?t("Unable to create volume: insufficient quota to create resources."):super.errorText}get showQuota(){return!0}getVolumeQuota(){var{quota:e={}}=this.state;return(0,M.getQuota)(e)}get quotaInfo(){return(0,M.getQuotaInfo)(this)}get defaultSize(){return this.quotaIsLimit&&this.maxSize<10?this.maxSize:10}get defaultValue(){var{initVolumeType:e}=this.state;return{source:this.sourceTypes[0],size:this.defaultSize,project:this.currentProjectName,availableZone:(this.availableZones[0]||[]).value,volume_type:e}}get availableZones(){var e,a,r=[{label:t("Not select"),value:"noSelect"}];return(0,_.default)(e=(0,S.default)(a=this.volumeStore.availabilityZones||[]).call(a,(e=>e.zoneState.available))).call(e,(e=>{r.push({value:e.zoneName,label:e.zoneName})})),r}get images(){var e,{imageTab:t}=this.state,a=(0,S.default)(e=this.imageStore.list.data||[]).call(e,(e=>!(!(0,V.canImageCreateInstance)(e)&&!(0,V.canImageCreateIronicInstance)(e))&&(t?(0,V.getImageOS)(e)===t&&"active"===e.status:e)));return(0,g.default)(a).call(a,(e=>K(K({},e),{},{key:e.id})))}get volumeTypes(){return(0,z.toJS)(this.volumeTypeStore.list.data||[])}get backups(){var e;return(0,g.default)(e=this.backupStore.list.data||[]).call(e,(e=>K(K({},e),{},{key:e.id})))}get sourceTypes(){return[{label:t("Blank Volume"),value:"blank-volume"},{label:t("Image"),value:"image"},{label:t("Volume Snapshot"),value:"snapshot"}]}get quotaIsLimit(){var{gigabytes:{limit:e}={}}=this.getVolumeQuota();return-1!==e}get maxSize(){var{gigabytes:{left:e=0}={}}=this.getVolumeQuota();return-1===e?1e3:e}getAvailZones(){this.volumeStore.fetchAvailabilityZoneList()}getImages(){this.imageStore.fetchList({all_projects:this.hasAdminRole})}getVolumeTypes(){var e=this;return(0,C.default)((function*(){var t=yield e.volumeTypeStore.fetchList();if(t.length>0){var a=t[0],{id:r,name:n}=a,i={selectedRowKeys:[r],selectedRows:[a]};(0,M.setCreateVolumeType)(n),e.setState({initVolumeType:i,volume_type:a},(()=>{e.updateFormValue("volume_type",i),e.updateDefaultValue()}))}}))()}getQuota(){var e=this;return(0,C.default)((function*(){yield(0,M.fetchQuota)(e,0),(0,M.setCreateVolumeSize)(e.defaultSize),e.onCountChange(1),e.updateDefaultValue()}))()}get systemTabs(){return(0,V.getImageSystemTabs)()}getVolumeTypeExtra(){if(this.sourceTypeIsSnapshot)return M.snapshotTypeTip;var{multiattach:e=!1}=this.state;return e?M.multiTip:void 0}get sourceTypeIsImage(){var{source:e}=this.state;return e===this.sourceTypes[1].value}get sourceTypeIsSnapshot(){var{source:e}=this.state;return e===this.sourceTypes[2].value}getDiskMinSize(){var e=0;if(this.sourceTypeIsImage){var{min_disk:t=0,size:a=0}=this.state.image||{},r=Math.ceil(a/1024/1024/1024);e=Math.max(t,r,1)}else if(this.sourceTypeIsSnapshot){var{size:n=0}=this.state.snapshot||{};e=n}return Math.max(e,1)}get nameForStateUpdate(){return["source","image","snapshot","size","volume_type"]}get formItems(){var e,{initVolumeType:a}=this.state,r=this.getDiskMinSize();return[{name:"project",label:t("Project"),type:"label"},{name:"availableZone",label:t("Available Zone"),type:"select",placeholder:t("Please select"),options:this.availableZones,tip:t("Unless you know clearly which AZ to create the volume in, you don not need to fill in here.")},{type:"divider"},{name:"source",label:t("Data Source Type"),type:"radio",options:this.sourceTypes,required:!0,isWrappedValue:!0},{name:"image",label:t("Operating System"),type:"select-table",data:this.images,isLoading:this.imageStore.list.isLoading,required:this.sourceTypeIsImage,isMulti:!1,hidden:!this.sourceTypeIsImage,filterParams:[{label:t("Name"),name:"name"}],columns:(0,V.getImageColumns)(this),tabs:this.systemTabs,defaultTabValue:this.systemTabs[0].value,selectedLabel:t("Image"),onTabChange:this.onImageTabChange},{name:"snapshot",label:t("Volume Snapshot"),type:"select-table",backendPageStore:this.snapshotStore,required:this.sourceTypeIsSnapshot,isMulti:!1,hidden:!this.sourceTypeIsSnapshot,isSortByBack:!0,defaultSortKey:"created_at",defaultSortOrder:"descend",onChange:this.onSnapshotChange,filterParams:[{label:t("Name"),name:"name"}],columns:[{title:t("Name"),dataIndex:"name"},{title:t("Size"),dataIndex:"size",unit:"GiB",sorter:!1},{title:t("Status"),dataIndex:"status",valueMap:M.volumeStatus},{title:t("Description"),dataIndex:"description",sorter:!1},{title:t("Created At"),dataIndex:"created_at",render:e=>(0,A.getSinceTime)(e)}]},{type:"divider"},K(K({name:"volume_type",label:t("Volume Type"),type:"select-table",tip:t('The volume type needs to set "multiattach" in the metadata to support shared volume attributes.')},U.volumeTypeSelectProps),{},{data:this.volumeTypes,isLoading:this.volumeTypeStore.list.isLoading,required:!0,extra:this.getVolumeTypeExtra(),onChange:this.onVolumeTypeChange,initValue:a}),{name:"size",label:t("Capacity (GiB)"),type:"slider-input",max:this.maxSize,min:r,description:(0,y.default)(e="".concat(r,"GiB-")).call(e,this.maxSize,"GiB"),required:this.quotaIsLimit,hidden:!this.quotaIsLimit,onChange:M.onVolumeSizeChange},{name:"size",label:t("Capacity (GiB)"),type:"input-int",min:r,hidden:this.quotaIsLimit,required:!this.quotaIsLimit,onChange:M.onVolumeSizeChange},{type:"divider"},{name:"name",label:t("Name"),type:"input-name",placeholder:t("Please input name"),required:!0},{title:t("Description"),dataIndex:"description"}]}onCountChangeCallback(){}renderFooterLeft(){var{count:e=1}=this.state,a={min:1,max:this.getCountMax(),precision:0,onChange:this.onCountChange,formatter:e=>"$ ".concat(e).replace(/\D/g,"")};return D.default.createElement("div",null,D.default.createElement("span",null,t("Count")),D.default.createElement(x.default,(0,w.default)({},a,{value:e,className:(0,B.default)(Q.default.input,"volume-count")})))}}a.Create=H,(0,k.default)(H,"id","volume-create"),(0,k.default)(H,"title",t("Create Volume")),(0,k.default)(H,"path","/storage/volume/create"),(0,k.default)(H,"policy","volume:create");var W=(0,P.inject)("rootStore")((0,P.observer)(H));a.default=W},1546:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=a.CreateBackup=void 0;var l=i(r(81)),s=i(r(65)),o=i(r(36)),u=r(406),d=r(1193),c=i(r(1242)),f=r(557),p=r(1302);class h extends d.ModalAction{constructor(){super(...arguments),(0,o.default)(this,"onSubmit",(e=>{var{id:t}=this.item,{name:a,incremental:r}=e,n={name:a,incremental:r,volume_id:t,force:(0,f.isInUse)(this.item)};return this.store.create(n)}))}get name(){return t("Create volume backup")}get tips(){return p.createTip}get defaultValue(){var e,t,{name:a,id:r,volume_type:n,size:i}=this.item;return{volume:(0,l.default)(e=(0,l.default)(t="".concat(a||r,"(")).call(t,n," | ")).call(e,i,"GiB)"),incremental:!1}}get formItems(){return[{name:"volume",label:t("Volume"),type:"label",iconType:"volume"},{name:"name",label:t("Volume Backup Name"),type:"input-name",required:!0},{name:"incremental",label:t("Backup Mode"),type:"radio",options:p.backupModeList,tip:p.modeTip}]}init(){this.store=c.default,c.default.setCurrentVolume(this.item),(0,p.fetchQuota)(this)}static get disableSubmit(){return(0,p.checkQuotaDisable)()}static get showQuota(){return!0}get showQuota(){return!0}get quotaInfo(){return(0,p.getQuotaInfo)(this)}}a.CreateBackup=h,(0,o.default)(h,"id","create-backup"),(0,o.default)(h,"title",t("Create Volume Backup")),(0,o.default)(h,"buttonText",t("Create Backup")),(0,o.default)(h,"policy","backup:create"),(0,o.default)(h,"aliasPolicy","cinder:backup:create"),(0,o.default)(h,"allowed",(e=>s.default.resolve((0,f.isAvailableOrInUse)(e))));var m=(0,u.inject)("rootStore")((0,u.observer)(h));a.default=m},1547:function(e,t,a){"use strict";var r=a(33),n=a(44),i=a(32),l=a(25),s=a(27),o=a(45),u=a(46),d=a(19),c=a(21);d(t,"__esModule",{value:!0}),t.default=t.PoolStore=void 0;var f=c(a(36)),p=c(a(62)),h=c(a(343)),m=c(a(48)),g=c(a(53));function v(e,t){var a=r(e);if(n){var s=n(e);t&&(s=i(s).call(s,(function(t){return l(e,t).enumerable}))),a.push.apply(a,s)}return a}function y(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)s(a=v(Object(r),!0)).call(a,(function(t){(0,f.default)(e,t,r[t])}));else if(o)u(e,o(r));else{var n;s(n=v(Object(r))).call(n,(function(t){d(e,t,l(r,t))}))}}return e}class b extends g.default{get client(){return m.default.cinder.pools}get listFilterByProject(){return!1}get paramsFunc(){return e=>{var{keywords:t}=e;return y(y({},(0,p.default)(e,["keywords"])),{},{detail:!0})}}get mapper(){return e=>{var{name:t,capabilities:a={}}=e,r=y({name:t},a),{total_capacity_gb:n,free_capacity_gb:i}=a;return(0,h.default)(n)&&(0,h.default)(i)&&(r.usedGB=(n-i).toFixed(2),r.usedGBPercent=100*(r.usedGB/n).toFixed(2)),r}}}t.PoolStore=b;var _=new b;t.default=_},1548:function(e,t,a){"use strict";var r=a(19),n=a(21);r(t,"__esModule",{value:!0}),t.default=void 0;var i=a(334),l=n(a(3565)),s=n(a(3566)),o=n(a(3567)),u=n(a(3568)),d=n(a(3569)),c=n(a(1403)),f={firstAction:d.default,moreActions:[{action:s.default},{action:u.default},{action:c.default},{action:o.default}]},p={actionConfigs:{rowActions:f,batchActions:[o.default],primaryActions:[l.default]},adminConfigs:{rowActions:{firstAction:o.default},batchActions:[o.default],primaryActions:[l.default]},instanceDetailConfigs:{rowActions:{firstAction:u.default}},instanceDetailAdminConfigs:i.emptyActionConfig,qosDetailConfigs:{rowActions:f},qosDetailAdminConfigs:{rowActions:{firstAction:o.default}}};t.default=p},1549:function(e,t,a){"use strict";var r=a(19),n=a(21);r(t,"__esModule",{value:!0}),t.default=void 0;var i=n(a(3570)),l=n(a(3571)),s=n(a(3572)),o=n(a(3573)),u=n(a(3574)),d=n(a(3575)),c=n(a(3576)),f=n(a(3577)),p=n(a(1550)),h={actionConfigs:{rowActions:{firstAction:s.default,moreActions:[{action:o.default},{action:c.default},{action:f.default},{action:u.default},{action:d.default},{action:p.default},{},{action:l.default}]},batchActions:[l.default],primaryActions:[i.default]},actionConfigsInDetail:{rowActions:{firstAction:u.default,moreActions:[{action:d.default}]},batchActions:[],primaryActions:[]},noActions:{rowActions:{firstAction:null,moreActions:[]},batchActions:[],primaryActions:[]},adminActions:{rowActions:{firstAction:l.default,moreActions:[]},batchActions:[l.default],primaryActions:[]}};t.default=h},1550:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=a.ManageSecurityGroup=void 0;var l=i(r(65)),s=i(r(57)),o=i(r(51)),u=i(r(36)),d=i(r(111)),c=r(406),f=r(1193),p=i(r(561)),h=r(416),m=r(1274),g=r(34);class v extends f.ModalAction{constructor(){super(...arguments),(0,u.default)(this,"onSubmit",(e=>{var{securityGroup:{selectedRowKeys:t=[]}={},port_security_enabled:a}=e,{id:r}=this.item,n={port:{security_groups:a?t:[],port_security_enabled:a}};return this.securityGroupStore.updatePortSecurityGroup({id:r,reqBody:n})}))}get name(){return t("Manage Security Group")}init(){this.securityGroupStore=new h.SecurityGroupStore,this.currentSecurityGroups=[],this.state.sgInitValue={selectedRowKeys:[],selectedRows:[]},this.detail=null,this.getPortDetail()}static get modalSize(){return"large"}getModalSize(){return"large"}get defaultValue(){var{sgInitValue:e}=this.state,{selectedRowKeys:t=[]}=e||{};return t.length?{port_security_enabled:this.item.port_security_enabled,securityGroup:e}:{}}getPortDetail(){var e=this;return(0,o.default)((function*(){var{id:t,security_groups:a,port_security_enabled:r}=e.item,n=a;a||(n=(yield p.default.fetchDetail({id:t})).security_groups);var i=yield l.default.all((0,s.default)(n).call(n,(t=>e.securityGroupStore.fetchDetail({id:t})))),o={selectedRowKeys:(0,s.default)(n).call(n,(e=>(0,g.toJS)(e))),selectedRows:(0,s.default)(i).call(i,(e=>(0,g.toJS)(e)))};e.setState({sgInitValue:o,port_security_enabled:r}),e.updateFormValue("securityGroup",o),e.updateFormValue("port_security_enabled",r)}))()}get messageHasItemName(){var{item:e}=this.props;return!!e&&e.name}get formItems(){var{sgInitValue:e,port_security_enabled:a}=this.state;return[{name:"port_security_enabled",label:t("Port Security"),type:"switch",onChange:e=>{this.setState({port_security_enabled:e})},required:!0},{name:"securityGroup",label:t("Security Group"),type:"select-table",tips:t("The security group is similar to the firewall function for setting up network access control, or you can go to the console and create a new security group. (Note: The security group you selected will work on all virtual LANS on the instances.)"),backendPageStore:this.securityGroupStore,extraParams:{project_id:this.currentProjectId},initValue:e,isMulti:!0,filterParams:m.securityGroupFilter,columns:m.securityGroupColumns,onRow:()=>{},hidden:!a}]}}a.ManageSecurityGroup=v,(0,u.default)(v,"id","manage-security-group"),(0,u.default)(v,"title",t("Manage Security Group")),(0,u.default)(v,"policy","update_port:port_security_enabled"),(0,u.default)(v,"allowed",(e=>l.default.resolve(0===(0,d.default)(e,"origin_data.allowed_address_pairs",[]).length)));var y=(0,c.inject)("rootStore")((0,c.observer)(v));a.default=y},1567:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=a.Storage=void 0;var l=i(r(62)),s=i(r(36)),o=r(406),u=i(r(1194)),d=i(r(1547)),c=r(1401);class f extends u.default{constructor(){super(...arguments),(0,s.default)(this,"getColumns",(()=>c.poolColumns)),(0,s.default)(this,"updateFetchParams",(e=>{var{all_projects:t}=e;return(0,l.default)(e,["all_projects"])}))}init(){this.store=d.default}get policy(){return"scheduler_extension:scheduler_stats:get_pools"}get name(){return t("storage backend")}get rowKey(){return"name"}get searchFilters(){return[{label:t("Name"),name:"name"},{label:t("Protocol"),name:"storage_protocol"},{label:t("Backend Name"),name:"volume_backend_name"}]}}a.Storage=f;var p=(0,o.inject)("rootStore")((0,o.observer)(f));a.default=p},1598:function(e,a,r){"use strict";var n=r(33),i=r(44),l=r(32),s=r(25),o=r(27),u=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=a.Credentials=void 0;var p=f(r(57)),h=f(r(198)),m=f(r(36)),g=f(r(0)),v=r(406),y=f(r(1194)),b=r(1410),_=f(r(140)),S=r(3954);function x(e,t){var a=n(e);if(i){var r=i(e);t&&(r=l(r).call(r,(function(t){return s(e,t).enumerable}))),a.push.apply(a,r)}return a}function w(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)o(a=x(Object(r),!0)).call(a,(function(t){(0,m.default)(e,t,r[t])}));else if(u)d(e,u(r));else{var n;o(n=x(Object(r))).call(n,(function(t){c(e,t,s(r,t))}))}}return e}class I extends y.default{constructor(){super(...arguments),(0,m.default)(this,"getColumns",(()=>[{title:t("ID/Name"),dataIndex:"name",isName:!0,hasNoDetail:!0},{title:t("Project ID/Name"),dataIndex:"project_name"},{title:t("Description"),dataIndex:"description",isHideable:!0},{title:t("Expires At"),dataIndex:"expires_at",valueRender:"toLocalTime",isHideable:!0},{title:t("Roles"),dataIndex:"roles",render:e=>{var t;return(0,p.default)(t=e||[]).call(t,(e=>g.default.createElement("div",{key:e.id},e.name)))},stringify:e=>(0,p.default)(e).call(e,(e=>e.name)).join("\n")}])),(0,m.default)(this,"updateFetchParams",(e=>this.isUserDetail?e:w(w({},e),{},{id:_.default.user.user.id})))}init(){this.store=new b.CredentialStore,this.downloadStore=new b.CredentialStore}get isUserDetail(){var e;return this.inDetailPage&&(0,h.default)(e=this.path).call(e,"user-admin/detail")}get policy(){return"identity:get_application_credential"}get name(){return t("application credential")}get actionConfigs(){return this.isUserDetail?S.detailConfigs:S.actionConfigs}get searchFilters(){return[{label:t("Name"),name:"name"}]}}a.Credentials=I;var C=(0,v.inject)("rootStore")((0,v.observer)(I));a.default=C},1679:function(e,t,a){"use strict";var r=a(19),n=a(21);r(t,"__esModule",{value:!0}),t.getValue=void 0;var i=n(a(335)),l=n(a(99)),s=n(a(1369));t.getValue=e=>{if((0,l.default)(e))try{return s.default.safeDump(e,{noRefs:!0})}catch(t){return(0,i.default)(e,null,2)}return String(e)}},1680:function(e,t,a){var r=a(1681);"string"==typeof r&&(r=[[e.i,r,""]]);var n={hmr:!0,transform:undefined,insertInto:void 0};a(75)(r,n);r.locals&&(e.exports=r.locals)},1681:function(e,t,a){(t=e.exports=a(74)(!1)).push([e.i,".index__editor--3eLoM {\n min-height: 60vh;\n border-radius: 4px;\n}\n",""]),t.locals={editor:"index__editor--3eLoM"}},1682:function(e,t,a){"use strict";var r=a(19),n=a(21);r(t,"__esModule",{value:!0}),t.default=void 0;var i=n(a(409)),l=n(a(0)),s=n(a(1370)),o=n(a(1292));a(1688),a(1689),a(1690);var u=a(1692);o.default.config.setModuleUrl("ace/mode/json_worker",u);class d extends l.default.Component{render(){return l.default.createElement(s.default,(0,i.default)({theme:"github",width:"auto",height:"100%",tabSize:2,debounceChangePeriod:200,editorProps:{$blockScrolling:!0},showPrintMargin:!1,wrapEnabled:!0},this.props))}}t.default=d},1690:function(e,t,a){var r=a(1691);"string"==typeof r&&(r=[[e.i,r,""]]);var n={hmr:!0,transform:undefined,insertInto:void 0};a(75)(r,n);r.locals&&(e.exports=r.locals)},1691:function(e,t,a){(t=e.exports=a(74)(!1)).push([e.i,"/* stylelint-disable selector-class-pattern */\n.custom__ace_editor--2x9Bb {\n font-family: Monaco, Menlo, Consolas, 'Courier New', monospace;\n line-height: 20px !important;\n -webkit-font-smoothing: auto;\n}\n.custom__ace_editor--2x9Bb.custom__ace-chaos--NJP1L {\n color: #fff;\n background-color: #242e42;\n}\n.custom__ace_editor--2x9Bb.custom__ace-chaos--NJP1L .custom__ace_gutter--1cP4P {\n color: #537f7e;\n background-color: #242e42;\n border-right: 1px solid #4a5974;\n}\n.custom__ace_editor--2x9Bb.custom__ace-chaos--NJP1L .custom__ace_variable--ViPst,\n.custom__ace_editor--2x9Bb.custom__ace-chaos--NJP1L .custom__ace_identifier--249iw,\n.custom__ace_editor--2x9Bb.custom__ace-chaos--NJP1L .custom__ace_meta--2PQjL.custom__ace_tag--2I4Xk {\n color: #75e0f2;\n}\n.custom__ace_editor--2x9Bb.custom__ace-chaos--NJP1L .custom__ace_keyword--TdUSy {\n color: #fff;\n}\n.custom__ace_editor--2x9Bb.custom__ace-chaos--NJP1L .custom__ace_string--3lFMH {\n color: #ebe087;\n}\n.custom__ace_editor--2x9Bb.custom__ace-chaos--NJP1L .custom__ace_constant--bDEu2.custom__ace_numeric--2gqBl {\n color: #bd99ff;\n}\n.custom__ace_editor--2x9Bb.custom__ace-chaos--NJP1L .custom__ace_marker-layer--6Ofnc .custom__ace_active-line--3gBy- {\n background-color: #36435c;\n}\n.custom__ace_editor--2x9Bb.custom__ace-chaos--NJP1L .custom__ace_indent-guide--2YcVM {\n padding: 2px 0;\n border-right: 1px dotted #777;\n}\n.custom__ace_editor--2x9Bb.custom__ace-chaos--NJP1L .custom__ace_marker-layer--6Ofnc .custom__ace_selection--1U_DQ {\n background-color: #4a5974;\n}\n.custom__ace_editor--2x9Bb.custom__ace-chaos--NJP1L .custom__ace_comment--1foUc {\n color: #aaa;\n}\n.custom__ace_editor--2x9Bb.custom__ace-chaos--NJP1L .custom__ace_fold--3dVBm:hover {\n background-color: #fff;\n}\n.custom__ace_editor--2x9Bb.custom__ace-chaos--NJP1L .custom__ace_line--3FuBW .custom__ace_fold--3dVBm {\n height: auto;\n}\n",""]),t.locals={ace_editor:"custom__ace_editor--2x9Bb","ace-chaos":"custom__ace-chaos--NJP1L",ace_gutter:"custom__ace_gutter--1cP4P",ace_variable:"custom__ace_variable--ViPst",ace_identifier:"custom__ace_identifier--249iw",ace_meta:"custom__ace_meta--2PQjL",ace_tag:"custom__ace_tag--2I4Xk",ace_keyword:"custom__ace_keyword--TdUSy",ace_string:"custom__ace_string--3lFMH",ace_constant:"custom__ace_constant--bDEu2",ace_numeric:"custom__ace_numeric--2gqBl","ace_marker-layer":"custom__ace_marker-layer--6Ofnc","ace_active-line":"custom__ace_active-line--3gBy-","ace_indent-guide":"custom__ace_indent-guide--2YcVM",ace_selection:"custom__ace_selection--1U_DQ",ace_comment:"custom__ace_comment--1foUc",ace_fold:"custom__ace_fold--3dVBm",ace_line:"custom__ace_line--3FuBW"}},1699:function(e,a,r){"use strict";r(19)(a,"__esModule",{value:!0}),a.statusMap=void 0;var n={500:t("Internal Server Error (code: 500) "),501:t("Not Implemented (code: 501) "),502:t("Bad Gateway (code: 502) "),503:t("Service Unavailable (code: 503) "),504:t("Gateway Time-out (code: 504) "),505:t("HTTP Version not supported (code: 505) ")};a.statusMap=n},1700:function(e,t,a){var r=a(1701);"string"==typeof r&&(r=[[e.i,r,""]]);var n={hmr:!0,transform:undefined,insertInto:void 0};a(75)(r,n);r.locals&&(e.exports=r.locals)},1701:function(e,t,a){(t=e.exports=a(74)(!1)).push([e.i,".index__notify--2uuPy .ant-notification-notice-icon {\n font-size: 18px;\n}\n.index__notify--2uuPy .ant-notification-notice-message {\n font-size: 12px;\n word-break: break-all;\n}\n.index__notify--2uuPy .ant-notification-notice-with-icon .ant-notification-notice-message {\n margin-left: 32px;\n}\n.index__code-editor--D2lB7 {\n height: 400px !important;\n min-height: 400px !important;\n}\n",""]),t.locals={notify:"index__notify--2uuPy","code-editor":"index__code-editor--D2lB7"}},2010:function(e,t,a){(t=e.exports=a(74)(!1)).push([e.i,"/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */\n/* stylelint-disable no-duplicate-selectors */\n/* stylelint-disable */\n/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */\n/* init */\n/* specific color */\n/* border */\n/* background */\n/* shadow */\n/* font */\n/* 中号字体 */\n/* animation */\n/* size */\n/* sider */\n.style__container--3Y09L {\n height: 100%;\n padding: 44px;\n overflow: auto;\n}\n.style__container--3Y09L .style__main-icon--1ECQa {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.style__container--3Y09L .style__action-button--2uJsF {\n color: #a3a3a3;\n font-size: 18px;\n line-height: 88px;\n background: #fff;\n border-radius: 4px;\n -webkit-box-shadow: 0 2px 20px 0 rgba(0, 0, 0, 0.09);\n box-shadow: 0 2px 20px 0 rgba(0, 0, 0, 0.09);\n opacity: 0.9;\n}\n.style__container--3Y09L .style__action-icon--3cQV7 {\n display: block;\n width: 50px;\n height: 50px;\n margin-left: 60px;\n}\n.style__container--3Y09L .ant-card {\n -webkit-box-shadow: 0 2px 20px 0 rgba(0, 0, 0, 0.09);\n box-shadow: 0 2px 20px 0 rgba(0, 0, 0, 0.09);\n}\n.style__container--3Y09L .ant-card-head {\n font-size: 16px;\n}\n.style__container--3Y09L .style__left--2FbNm {\n height: 100%;\n}\n.style__container--3Y09L .style__left--2FbNm .style__top--3UBpB .style__title--18DKB {\n display: table-cell;\n vertical-align: bottom;\n}\n.style__container--3Y09L .style__left--2FbNm .style__top--3UBpB .style__title--18DKB .style__text--2ZnVb {\n color: #252525;\n font-size: 21px;\n}\n.style__container--3Y09L .style__left--2FbNm .style__top--3UBpB .style__title--18DKB .style__action--1T3zl {\n margin-left: 40px;\n color: #000;\n font-size: 16px;\n}\n.style__container--3Y09L .style__right--18Zal {\n height: 100%;\n}\n.style__container--3Y09L .style__right--18Zal .style__project--2WhsJ {\n position: relative;\n}\n.style__container--3Y09L .style__right--18Zal .style__project--2WhsJ .style__meta--VzBqf {\n margin-bottom: 16px;\n padding-bottom: 16px;\n border-bottom: 1px dashed #e8e8e8;\n}\n.style__container--3Y09L .style__right--18Zal .style__project--2WhsJ .ant-descriptions-item-label {\n width: 130px;\n}\n.style__outer--GK3KD {\n position: relative;\n width: 100%;\n height: 10rem;\n overflow: hidden;\n font-size: 12px;\n}\n.style__outer--GK3KD .style__inner--19_DW {\n position: absolute;\n left: 0;\n width: 100%;\n height: 100%;\n overflow-x: hidden;\n overflow-y: scroll;\n}\n.style__outer--GK3KD .style__inner--19_DW::-webkit-scrollbar {\n display: none;\n}\n.style__bottom--1cuhB {\n border-radius: 4px;\n}\n.style__bottom--1cuhB .ant-card {\n -webkit-box-shadow: unset;\n box-shadow: unset;\n}\n.style__bottom--1cuhB .style__title--18DKB .style__text--2ZnVb {\n color: #252525;\n font-size: 16px;\n}\n.style__bottom--1cuhB .style__title--18DKB .style__badge--1KS_6 {\n margin-left: 22px;\n}\n.style__bottom--1cuhB .style__title--18DKB .style__badge--1KS_6 .ant-badge-status-dot {\n width: 10px;\n height: 10px;\n}\n.style__bottom--1cuhB .style__title--18DKB .style__badge--1KS_6 .ant-badge-status-text {\n font-size: 14px;\n}\n.style__bottom--1cuhB .style__action--1T3zl {\n float: right;\n margin-top: 6px;\n color: #0068ff;\n font-size: 12px;\n cursor: pointer;\n}\n.style__bottom--1cuhB .style__content--1BVOG .style__card--3BNS7 {\n padding: 8px;\n}\n.style__bottom--1cuhB .style__content--1BVOG .style__card--3BNS7 .ant-card-head {\n border-bottom: none;\n}\n.style__bottom--1cuhB .style__content--1BVOG .style__card--3BNS7 .ant-card-head .ant-card-head-title {\n padding-bottom: 0;\n color: #565656;\n font-weight: 500;\n font-size: 16px;\n}\n.style__bottom--1cuhB .style__content--1BVOG .style__card--3BNS7 .style__progress-title--1khEP {\n overflow: hidden;\n font-size: 14px;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n",""]),t.locals={container:"style__container--3Y09L","main-icon":"style__main-icon--1ECQa","action-button":"style__action-button--2uJsF","action-icon":"style__action-icon--3cQV7",left:"style__left--2FbNm",top:"style__top--3UBpB",title:"style__title--18DKB",text:"style__text--2ZnVb",action:"style__action--1T3zl",right:"style__right--18Zal",project:"style__project--2WhsJ",meta:"style__meta--VzBqf",outer:"style__outer--GK3KD",inner:"style__inner--19_DW",bottom:"style__bottom--1cuhB",badge:"style__badge--1KS_6",content:"style__content--1BVOG",card:"style__card--3BNS7","progress-title":"style__progress-title--1khEP"}},3451:function(e,a,r){"use strict";var n=r(33),i=r(44),l=r(32),s=r(25),o=r(27),u=r(45),d=r(46),c=r(19),f=r(160),p=r(21);c(a,"__esModule",{value:!0}),a.default=void 0,r(581);var h=p(r(423)),m=p(r(36));r(1319);var g=p(r(1320)),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=S(t);if(a&&a.has(e))return a.get(e);var r={},n=c&&s;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=n?s(e,i):null;l&&(l.get||l.set)?c(r,i,l):r[i]=e[i]}r.default=e,a&&a.set(e,r);return r}(r(0)),y=(r(173),r(334)),b=r(569),_=p(r(3452));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=n(e);if(i){var r=i(e);t&&(r=l(r).call(r,(function(t){return s(e,t).enumerable}))),a.push.apply(a,r)}return a}function w(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)o(a=x(Object(r),!0)).call(a,(function(t){(0,m.default)(e,t,r[t])}));else if(u)d(e,u(r));else{var n;o(n=x(Object(r))).call(n,(function(t){c(e,t,s(r,t))}))}}return e}var{RangePicker:I}=g.default,{h:C,d:k,w:D}=y.MILLISECOND_IN_TIME_UNIT;class P extends v.Component{constructor(e){super(e),(0,m.default)(this,"onChangeType",(e=>{var t={value:e};1!==e&&(t.start=void 0,t.end=void 0),this.setState(w({},t),(()=>{this.onChange(t)}))})),(0,m.default)(this,"onChange",(e=>{var{onChange:t}=this.props;t&&t(w(w({},this.state),e))})),(0,m.default)(this,"onDateChange",(e=>{var t={start:e?e[0]:null,end:e?e[1]:null};this.setState(w({},t),(()=>{this.onChange(t)}))}));var{defaultValue:t}=e;this.state={defaultValue:void 0!==t?t:C,value:null,start:null,end:null}}componentDidMount(){var{defaultValue:e,value:t}=this.state;this.onChangeType(t||e)}get options(){return[{label:t("All"),value:0},{label:t("In the last hour"),value:C},{label:t("Recently a day"),value:k},{label:t("In the last 7 days"),value:D},{label:t("In the last 30 days"),value:30*k},{label:t("Custom"),value:1}]}render(){var{defaultValue:e,value:t}=this.state;return v.default.createElement("div",{className:_.default.wrapper},v.default.createElement(h.default.Group,{defaultValue:e,value:t,options:this.options,buttonStyle:"solid",optionType:"button",onChange:e=>this.onChangeType(e.target.value)}),1===t&&v.default.createElement(I,{onCalendarChange:this.onDateChange,format:b.timeFormatStr.YMDHm,showTime:!0}))}}a.default=P},3452:function(e,t,a){var r=a(3453);"string"==typeof r&&(r=[[e.i,r,""]]);var n={hmr:!0,transform:undefined,insertInto:void 0};a(75)(r,n);r.locals&&(e.exports=r.locals)},3453:function(e,t,a){(t=e.exports=a(74)(!1)).push([e.i,".index__wrapper--2C8q2 {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n min-width: 450px;\n}\n",""]),t.locals={wrapper:"index__wrapper--2C8q2"}},3454:function(e,t,a){"use strict";var r=a(160),n=a(19),i=a(25),l=a(21);n(t,"__esModule",{value:!0}),t.default=void 0;var s=l(a(57)),o=l(a(628));a(1227);var u=l(a(418)),d=l(a(36)),c=l(a(592)),f=l(a(3455)),p=l(a(1531)),h=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 s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var o=l?i(e,s):null;o&&(o.get||o.set)?n(r,s,o):r[s]=e[s]}r.default=e,a&&a.set(e,r);return r}(a(0)),m=l(a(16)),g=(a(173),a(555),l(a(3459)));function v(e){if("function"!=typeof r)return null;var t=new r,a=new r;return(v=function(e){return e?a:t})(e)}class y extends h.Component{constructor(){super(...arguments),(0,d.default)(this,"changeVisibleList",(e=>{var t=e.key,{value:a,onChange:r}=this.props,[...n]=a;(0,p.default)(n,t)?(0,f.default)(n,(e=>e===t)):n.push(t),r(n)}))}isVisibleOption(e){var{value:t}=e,{value:a}=this.props;return(0,p.default)(a,t)}renderHeader(){var{title:e}=this.props;return(0,c.default)(e)?null:h.default.createElement("header",null,e)}renderOptions(){var{options:e}=this.props,t=(0,s.default)(e).call(e,(e=>this.renderOption(e)));return h.default.createElement(u.default,{onClick:this.changeVisibleList,theme:"light"},t)}renderOption(e){var t=this.isVisibleOption(e),{value:a,label:r}=e,n=t?h.default.createElement(o.default,null):h.default.createElement("span",{className:g.default.empty});return h.default.createElement(u.default.Item,{key:a},n,r)}render(){var{className:e}=this.props;return h.default.createElement("div",{className:e},this.renderHeader(),this.renderOptions())}}(0,d.default)(y,"propTypes",{value:m.default.array,onChange:m.default.func.isRequired,className:m.default.string,title:m.default.node,options:m.default.array.isRequired}),(0,d.default)(y,"defaultProps",{value:[]});var b=y;t.default=b},3459:function(e,t,a){var r=a(3460);"string"==typeof r&&(r=[[e.i,r,""]]);var n={hmr:!0,transform:undefined,insertInto:void 0};a(75)(r,n);r.locals&&(e.exports=r.locals)},3460:function(e,t,a){(t=e.exports=a(74)(!1)).push([e.i,".index__empty--2DMK4 {\n display: inline-block;\n width: 24px;\n}\n",""]),t.locals={empty:"index__empty--2DMK4"}},3461:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=x,r(411);var l=i(r(227));r(573);var s=i(r(421));r(333);var o=i(r(332)),u=i(r(596)),d=i(r(409));r(1227);var c=i(r(418)),f=i(r(57)),p=i(r(200)),h=i(r(0)),m=(r(173),r(555),i(r(16))),g=r(161),v=i(r(1375)),y=r(1374),b=i(r(3462)),_=(e,t)=>{var{id:a,title:r,actionType:n,buttonType:i,buttonText:l,isDanger:s}=e;return{id:a,title:r,name:l||r,actionType:n,buttonType:i,isDanger:s,action:e,isAllowed:t.length>0,items:t,isBatch:!0,needHide:!1}};function S(e){var{actions:a,selectedItems:r,onFinishAction:n,containerProps:i,onClickAction:l,onCancelAction:p}=e;if(a.length<1)return null;var m=(0,f.default)(a).call(a,(e=>{var t="table-batch-more-".concat((0,g.generateId)()),a=_(e,r),{isDanger:s,name:o}=a;return a.onFinishAction=n,a.isDanger=!!s,r.length?h.default.createElement(c.default.Item,{key:t},h.default.createElement(v.default,(0,d.default)({},a,{buttonType:"link",onFinishAction:n,containerProps:i,onClickAction:l,onCancelAction:p,buttonClassName:b.default["more-action-btn"]}))):h.default.createElement(c.default.Item,{key:t,disabled:!0,style:{textAlign:"center"}},o)})),y=h.default.createElement(c.default,null,m);return h.default.createElement(s.default,{overlay:y,overlayClassName:b.default["table-batch-menu"]},h.default.createElement(o.default,{type:"primary"},t("More Actions")," ",h.default.createElement(u.default,null)))}function x(e){var a,r,{selectedItems:n,visibleButtonNumber:i,batchActions:s,onFinishAction:u,containerProps:c,onClickAction:m,onCancelAction:b,resourceName:x,isAdminPage:w}=e,I=[],C=[],k=(0,y.getActionsByPolicy)({actions:s,containerProps:c,isAdminPage:w});return i<k.length?i<0?C=k:(I=(0,p.default)(k).call(k,0,i),C=(0,p.default)(k).call(k,i)):I=k,r=(0,f.default)(I).call(I,(e=>{var{isDanger:a=!1,buttonType:r="default"}=e;return n&&0!==n.length?h.default.createElement(v.default,(0,d.default)({},_(e,n),{key:"table-batch-action-".concat((0,g.generateId)()),onFinishAction:u,containerProps:c,onClickAction:m,onCancelAction:b})):h.default.createElement(l.default,{title:t("Please select {name} first",{name:x}),key:"tooltip-".concat((0,g.generateId)())},h.default.createElement(o.default,{type:r,disabled:!0,danger:a},e.buttonText||e.title))})),a=h.default.createElement(S,{actions:C,selectedItems:n,onFinishAction:u,containerProps:c,onClickAction:m,onCancelAction:b}),h.default.createElement(h.default.Fragment,null,r,a)}x.defaultProps={visibleButtonNumber:1},x.prototypes={visibleButtonNumber:m.default.number}},3462:function(e,t,a){var r=a(3463);"string"==typeof r&&(r=[[e.i,r,""]]);var n={hmr:!0,transform:undefined,insertInto:void 0};a(75)(r,n);r.locals&&(e.exports=r.locals)},3463:function(e,t,a){(t=e.exports=a(74)(!1)).push([e.i,".index__table-action--1o0Rg {\n margin-right: 5px;\n}\n.index__more-action-btn--oi5mL {\n width: 100%;\n text-align: center;\n}\n.index__table-batch-menu--39tMs .ant-dropdown-menu-item {\n padding-right: 0;\n padding-left: 0;\n}\n",""]),t.locals={"table-action":"index__table-action--1o0Rg","more-action-btn":"index__more-action-btn--oi5mL","table-batch-menu":"index__table-batch-menu--39tMs"}},3464:function(e,a,r){"use strict";var n=r(160),i=r(19),l=r(25),s=r(21);i(a,"__esModule",{value:!0}),a.default=void 0;var o=s(r(57)),u=s(r(198)),d=s(r(81)),c=s(r(27)),f=s(r(65));r(573);var p=s(r(421));r(1227);var h=s(r(418)),m=s(r(601));r(1222);var g=s(r(1223));r(411);var v=s(r(227));r(333);var y=s(r(332)),b=s(r(1382)),_=s(r(51)),S=s(r(36)),x=s(r(91)),w=s(r(99)),I=s(r(111)),C=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var a=N(t);if(a&&a.has(e))return a.get(e);var r={},n=i&&l;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var o=n?l(e,s):null;o&&(o.get||o.set)?i(r,s,o):r[s]=e[s]}r.default=e,a&&a.set(e,r);return r}(r(0)),k=s(r(16)),D=s(r(1298)),P=(r(555),r(173),r(3465)),T=r(161),A=s(r(1228)),M=s(r(1376)),R=s(r(3466));function N(e){if("function"!=typeof n)return null;var t=new n,a=new n;return(N=function(e){return e?a:t})(e)}class E extends C.Component{constructor(e){var a;super(e),a=this,(0,S.default)(this,"getSimpleValue",((e,t,a)=>{var r,n;return(0,x.default)(e)?(0,o.default)(e).call(e,((e,r)=>{if(C.default.isValidElement(e))try{return t[a][r]}catch(e){return""}return e})).join("\n"):(0,w.default)(e)?C.default.isValidElement(e)?(0,u.default)(n=[void 0,"",null]).call(n,t[a])?"-":t[a].toString():t[a]:(0,u.default)(r=[void 0,"",null]).call(r,e)?"-":e})),(0,S.default)(this,"getColumnData",((e,t)=>{var a,{dataIndex:r,render:n,valueRender:i,stringify:l,valueMap:s,unit:o}=t,{getValueRenderFunc:u}=this.props,c=(0,I.default)(e,r);if(l)return l(c,e);if(i){var f=u("sinceTime"===i?"toLocalTime":i);return this.getSimpleValue(f(c,e),e,r)}return n?this.getSimpleValue(n(c,e),e,r):o?(0,d.default)(a="".concat(c)).call(a,o):s?s[c]||c:this.getSimpleValue(c,e,r)})),(0,S.default)(this,"confirmExportMax",(()=>{var{totalMax:e,total:a}=this.props;M.default.warn({title:t("Are you sure to download data?"),content:t("The total amount of data is { total }, and the interface can support downloading { totalMax } pieces of data. If you need to download all the data, please contact the administrator.",{totalMax:e,total:a}),onCancel:this.onConfirmCancel,onOk:this.beginDownload})})),(0,S.default)(this,"downloadAllData",(()=>{var{total:e,totalMax:t}=this.props;e&&e>t?this.confirmExportMax():this.beginDownload()})),(0,S.default)(this,"getFileName",(e=>{var a,r,n,i,l=(0,T.toLocalTimeFilter)((new Date).getTime()),{resourceName:s,extraName:o}=this.props,u=o?(0,d.default)(a="".concat(o,"-")).call(a,s):s;return e?(0,d.default)(r=(0,d.default)(n="".concat(u,"-")).call(n,t("all"),"-")).call(r,l,".csv"):(0,d.default)(i="".concat(u,"-")).call(i,l,".csv")})),(0,S.default)(this,"exportCurrentData",((e,a)=>{var r=this.getDownloadHeader(),n=this.getDownloadData(),i=new P.Parser({fields:r}).parse(n),l=new Blob(["\ufeff"+i],{type:"text/plain;charset=utf-8"}),s=a?this.getFileName("all"):this.getFileName();D.default.saveAs(l,s),a?A.default.success(t("All data downloaded.")):A.default.success(t("Current data downloaded."))})),(0,S.default)(this,"exportCurrentDataAll",(()=>{this.exportCurrentData(null,!0)})),(0,S.default)(this,"exportAllData",(()=>{var e=this.getDownloadHeader(),a=this.getDownloadDataAll(),r=new P.Parser({fields:e}).parse(a),n=new Blob(["\ufeff"+r],{type:"text/plain;charset=utf-8"}),i=this.getFileName("all");D.default.saveAs(n,i),A.default.success(t("All data downloaded."))})),(0,S.default)(this,"cancelDownload",(()=>{this.setState({isDownloading:!1},(()=>{var{onFinishDownload:e}=this.props;e&&e()})),A.default.warn(t("Download canceled!"))})),(0,S.default)(this,"beginDownload",(()=>{this.setState({isDownloading:!0,percent:0,current:1,allData:[]},(()=>{var{onBeginDownload:e}=this.props;e&&e(),this.getDownloadDataForAll()}))})),(0,S.default)(this,"finishDownload",(()=>{this.setState({isDownloading:!1},(()=>{this.exportAllData();var{onFinishDownload:e}=this.props;e&&e()}))})),(0,S.default)(this,"getDownloadDataForAll",(0,_.default)((function*(){var{current:e,allData:t,isDownloading:r}=a.state,{totalMax:n}=a.props,i=Math.min(a.total||0,n);if(r){var{getData:l}=a.props,s=yield l({page:e,limit:a.pageSize}),o=[...t,...s];if(s.length<a.pageSize||o.length>=i)a.setState({allData:o,percent:100},(()=>{a.finishDownload()}));else{var u=0;(u=i?Math.floor(o.length/i*100):10*e)>100&&(u=100),a.setState({allData:o,current:e+1,percent:u},(()=>{a.getDownloadDataForAll()}))}}}))),this.state={isDownloading:!1,current:1,allData:[]}}get pageSize(){return 100}get total(){return this.props.total}getDownloadHeader(){var{columns:e}=this.props;return(0,o.default)(e).call(e,(e=>({label:e.title,value:e.dataIndex,default:""})))}getDownloadData(){var{columns:e,data:t}=this.props;return(0,o.default)(t).call(t,(t=>{var a={};return(0,c.default)(e).call(e,(e=>{var r=this.getColumnData(t,e);a[e.dataIndex]=r})),a}))}getDownloadDataAll(){var{columns:e}=this.props,{allData:t}=this.state;return(0,o.default)(t).call(t,(t=>{var a={};return(0,c.default)(e).call(e,(e=>{var r=this.getColumnData(t,e);a[e.dataIndex]=r})),a}))}renderDownloadCurrent(){return C.default.createElement(v.default,{title:t("Download all data")},C.default.createElement(y.default,{type:"default",onClick:this.exportCurrentDataAll,icon:C.default.createElement(b.default,null)}))}renderProgress(){var{isDownloading:e,percent:t}=this.state;return e?C.default.createElement(g.default,{percent:t,status:"active",className:R.default.progress}):null}renderCancelBtn(){var{isDownloading:e}=this.state;return e?C.default.createElement(v.default,{title:t("Cancel Download")},C.default.createElement(y.default,{type:"danger",shape:"circle",onClick:this.cancelDownload,icon:C.default.createElement(m.default,null),size:"small"})):null}renderDownloadAll(){var e=C.default.createElement(h.default,null,C.default.createElement(h.default.Item,{key:"current",onClick:this.exportCurrentData},t("Download current data")),C.default.createElement(h.default.Item,{key:"all",onClick:this.downloadAllData},t("Download all data")));return C.default.createElement(C.default.Fragment,null,C.default.createElement(p.default,{overlay:e},C.default.createElement(y.default,{type:"default",icon:C.default.createElement(b.default,null)})),this.renderProgress(),this.renderCancelBtn())}render(){var{total:e,data:t}=this.props;return e===t.length?this.renderDownloadCurrent():this.renderDownloadAll()}}a.default=E,(0,S.default)(E,"propTypes",{columns:k.default.array,data:k.default.array,total:k.default.number,getValueRenderFunc:k.default.func.isRequired,resourceName:k.default.string,extraName:k.default.string,getData:k.default.func,totalMax:k.default.number}),(0,S.default)(E,"defaultProps",{columns:[],data:[],total:0,totalMax:1e4,resourceName:"",extraName:"",getData:()=>f.default.resolve({data:{items:[],count:0}})})},3466:function(e,t,a){var r=a(3467);"string"==typeof r&&(r=[[e.i,r,""]]);var n={hmr:!0,transform:undefined,insertInto:void 0};a(75)(r,n);r.locals&&(e.exports=r.locals)},3467:function(e,t,a){(t=e.exports=a(74)(!1)).push([e.i,".index__progress--1I8an {\n width: 100px;\n margin-right: 10px;\n}\n",""]),t.locals={progress:"index__progress--1I8an"}},3468:function(e,t,a){var r=a(3469);"string"==typeof r&&(r=[[e.i,r,""]]);var n={hmr:!0,transform:undefined,insertInto:void 0};a(75)(r,n);r.locals&&(e.exports=r.locals)},3469:function(e,t,a){(t=e.exports=a(74)(!1)).push([e.i,"/* init */\n/* specific color */\n/* border */\n/* background */\n/* shadow */\n/* font */\n/* 中号字体 */\n/* animation */\n/* size */\n/* sider */\n.index__table--33j8W {\n overflow: hidden;\n background-color: #fff;\n border-radius: 4px;\n -webkit-box-shadow: 0 4px 8px 0 rgba(36, 46, 66, 0.06);\n box-shadow: 0 4px 8px 0 rgba(36, 46, 66, 0.06);\n}\n.index__table--33j8W .ant-table-container {\n -webkit-box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.05);\n box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.05);\n}\n.index__table--33j8W .ant-table-pagination.ant-pagination {\n margin: 0;\n padding: 8px 16px;\n}\n.index__button--3bdor {\n min-width: 96px;\n margin-left: 10px;\n}\n.index__select-title--1m-fB {\n padding: 2px;\n}\n.index__cancel-select--1WxJX {\n color: #fff;\n}\n.index__create--2BjrH {\n min-width: 96px;\n margin-left: 12px;\n}\n.index__action--2MndJ {\n padding: 0 4px;\n color: #329dce;\n font-weight: 600;\n cursor: pointer;\n}\n.index__column-menu--3pO2n {\n width: 160px;\n overflow: hidden;\n border-radius: 4px;\n -webkit-box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.2);\n box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.2);\n}\n.index__column-menu--3pO2n .ant-menu-vertical > .ant-menu-item {\n height: 30px;\n line-height: 30px;\n}\n.index__custom-button--3b70- {\n margin-left: 0;\n}\n.index__table-header--3WB0r {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n}\n.index__table-header-btns--2QPSM {\n position: relative;\n display: inline-block;\n margin-bottom: 16px;\n}\n.index__table-header-btns--2QPSM button {\n margin-right: 10px;\n}\n.index__table-header-btns--2QPSM .ant-btn[disabled] {\n -webkit-box-shadow: 0 2px 0 rgba(0, 0, 0, 0.045);\n box-shadow: 0 2px 0 rgba(0, 0, 0, 0.045);\n}\n.index__search-row--7P1c7 {\n float: right;\n min-width: 350px;\n}\n.index__search-input--1izmf {\n width: 288px;\n height: 32px;\n}\n",""]),t.locals={table:"index__table--33j8W",button:"index__button--3bdor","select-title":"index__select-title--1m-fB","cancel-select":"index__cancel-select--1WxJX",create:"index__create--2BjrH",action:"index__action--2MndJ","column-menu":"index__column-menu--3pO2n","custom-button":"index__custom-button--3b70-","table-header":"index__table-header--3WB0r","table-header-btns":"index__table-header-btns--2QPSM","search-row":"index__search-row--7P1c7","search-input":"index__search-input--1izmf"}},3470:function(e,t,a){var r=a(3471);"string"==typeof r&&(r=[[e.i,r,""]]);var n={hmr:!0,transform:undefined,insertInto:void 0};a(75)(r,n);r.locals&&(e.exports=r.locals)},3471:function(e,t,a){(t=e.exports=a(74)(!1)).push([e.i,"/* init */\n/* specific color */\n/* border */\n/* background */\n/* shadow */\n/* font */\n/* 中号字体 */\n/* animation */\n/* size */\n/* sider */\n.index__wrapper--3q1S2 {\n min-height: calc(100vh - 108px);\n margin-top: 16px;\n padding: 0 16px;\n}\n.index__hint--3yEH0 {\n margin-bottom: 16px;\n}\n.index__hints--1QRzH .ant-alert-warning {\n background-color: #fffbe6;\n border: 1px solid #ffe58f;\n}\n.index__hints--1QRzH .ant-alert-warning .ant-alert-icon {\n color: #faad14;\n}\n",""]),t.locals={wrapper:"index__wrapper--3q1S2",hint:"index__hint--3yEH0",hints:"index__hints--1QRzH"}},3472:function(e,t,a){"use strict";a.r(t),t.default="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMThweCIgaGVpZ2h0PSIyNHB4IiB2aWV3Qm94PSIwIDAgMTggMjQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8dGl0bGU+bG9jazwvdGl0bGU+CiAgICA8ZyBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyBpZD0ibG9jayIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTAuMDAwMDAwLCAwLjAwMDAwMCkiIGZpbGw9IiNFQjM1NEQiIGZpbGwtcnVsZT0ibm9uemVybyI+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik0xMi4zOTk0MDY2LDkuNzYzMzE4ODEgTDE1LjA2MjEzMTksOS43OTg4MTMxIEwxNS4wNjIxMzE5LDcuMDI2OTIzMDggQzE1LjA2MjEzMTksMi43NTc2OTIzMSAxMi42MjMwNTQ0LDAgOC44NDkwOTg1NiwwIEM1LjA3NTE0MjczLDAgMi42MzYwODc3NCwyLjc1NzY5MjMxIDIuNjM2MDg3NzQsNy4wMjY5MjMwOCBMMi42MzYwODc3NCw5Ljc2MzMxODgxIEw1LjI5ODgxMzEsOS43NjMzMTg4MSBMNS4yOTg4MTMxLDcuMDI2OTIzMDggQzUuMjk4ODEzMSw1LjcxNDE5NzcyIDUuNjQ0OTY2OTUsMi42NjI3MjUzNiA4Ljg0OTA5ODU2LDIuNjYyNzI1MzYgQzExLjkzNzg2ODEsMi42NjI3MjUzNiAxMi4zOTk0MDY2LDUuMzk3MzQwNzUgMTIuMzk5NDA2Niw3LjAyNjkyMzA4IEwxMi4zOTk0MDY2LDkuNzYzMzE4ODEgWiIgaWQ9InBhdGgiPjwvcGF0aD4KICAgICAgICAgICAgPHBhdGggZD0iTTE1LjA4ODc0Nyw5Ljc5ODgxMzEgTDIuNjYyNzI1MzYsOS43OTg4MTMxIEMxLjE5MjkwMTE1LDkuNzk4ODEzMSAwLDEwLjk5MTcxNDIgMCwxMi40NjE1Mzg1IEwwLDIxLjMzNzI3NDYgQzAsMjIuODA3MDk4OSAxLjE5MjkwMTE1LDI0IDIuNjYyNzI1MzYsMjQgTDE1LjA4ODc0NywyNCBDMTYuNTU4NTcxMiwyNCAxNy43NTE0NzI0LDIyLjgwNzA5ODkgMTcuNzUxNDcyNCwyMS4zMzcyNzQ2IEwxNy43NTE0NzI0LDEyLjQ2MTUzODUgQzE3Ljc1MTQ3MjQsMTAuOTkxNzM2OCAxNi41NTg1NzEyLDkuNzk4ODEzMSAxNS4wODg3NDcsOS43OTg4MTMxIFogTTkuNzYzMjk2MjgsMTcuNTQxMTIwOCBMOS43NjMyOTYyOCwxOS41NjIxMzE5IEM5Ljc2MzI5NjI4LDIwLjA1MTE2NDQgOS4zNjQ3OTExNywyMC40NDk3MTQ1IDguODc1NzM2MTgsMjAuNDQ5NzE0NSBDOC4zODY2ODExOSwyMC40NDk3MTQ1IDcuOTg4MTUzNTUsMjAuMDUxMTg2OSA3Ljk4ODE1MzU1LDE5LjU2MjEzMTkgTDcuOTg4MTUzNTUsMTcuNTQxMTIwOCBDNy40NTkxNjQ2NywxNy4yMzMxNDMgNy4xMDA1OTM0NSwxNi42Njc3NTg0IDcuMTAwNTkzNDUsMTYuMDExODIzOSBDNy4xMDA1OTM0NSwxNS4wMzE5NTYxIDcuODk1ODQ1ODYsMTQuMjM2NjgxMiA4Ljg3NTczNjE4LDE0LjIzNjY4MTIgQzkuODU1NjI2NTEsMTQuMjM2NjgxMiAxMC42NTA5MDE1LDE1LjAzMTk1NjEgMTAuNjUwOTAxNSwxNi4wMTE4NDY1IEMxMC42NTA5MDE1LDE2LjY2Njg1NyAxMC4yOTIzMDc3LDE3LjIzMzE0MyA5Ljc2MzI5NjI4LDE3LjU0MTE0MzMgTDkuNzYzMjk2MjgsMTcuNTQxMTIwOCBaIiBpZD0ic2hhcGUiPjwvcGF0aD4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg=="},3473:function(e,t,a){"use strict";a.r(t),t.default="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjRweCIgaGVpZ2h0PSIyNHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8dGl0bGU+dW5sb2NrPC90aXRsZT4KICAgIDxnIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSIzLi1JY29uIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtNzguMDAwMDAwLCAtNzI5LjAwMDAwMCkiIGZpbGw9IiM1MTUxNTEiIGZpbGwtcnVsZT0ibm9uemVybyI+CiAgICAgICAgICAgIDxnIGlkPSJ1bmxvY2siIHRyYW5zZm9ybT0idHJhbnNsYXRlKDc4LjAwMDAwMCwgNzI5LjAwMDAwMCkiPgogICAgICAgICAgICAgICAgPHBhdGggZD0iTTEwLjE1MzgyODEsNy4zMDggTDEwLjE1MzgyODEsOC4zMDc3MDMxMiBMMTIuOTIzMDg1OSw4LjMwNzcwMzEyIEwxMi45MjMwODU5LDcuMzA4IEMxMi45MjMwODU5LDIuODY4IDEwLjM4NjQ0NTMsMCA2LjQ2MTUzMTI1LDAgQzIuNTM2NjE3MTksMCAwLDIuODY4IDAsNy4zMDggTDAsMTAuMTUzODUxNiBMMi43NjkyMzQzNywxMC4xNTM4NTE2IEwyLjc2OTIzNDM3LDcuMzA4IEMyLjc2OTIzNDM3LDUuOTQyNzY1NjIgMy4xMjkyMzQzOCwyLjc2OTIzNDM3IDYuNDYxNTMxMjUsMi43NjkyMzQzNyBDOS42NzM4NTE1NiwyLjc2OTIzNDM3IDEwLjE1Mzg1MTYsNS42MTMyMzQzOCAxMC4xNTM4NTE2LDcuMzA4IEwxMC4xNTM4MjgxLDcuMzA4IFoiPjwvcGF0aD4KICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0yMS4yMzA3NjU2LDkuMjMwNzY1NjMgTDguMzA3NzAzMTIsOS4yMzA3NjU2MyBDNi43NzkwODU5NCw5LjIzMDc2NTYzIDUuNTM4NDY4NzUsMTAuNDcxMzgyOCA1LjUzODQ2ODc1LDEyIEw1LjUzODQ2ODc1LDIxLjIzMDc2NTYgQzUuNTM4NDY4NzUsMjIuNzU5MzgyOCA2Ljc3OTA4NTk0LDI0IDguMzA3NzAzMTIsMjQgTDIxLjIzMDc2NTYsMjQgQzIyLjc1OTM4MjgsMjQgMjQsMjIuNzU5MzgyOCAyNCwyMS4yMzA3NjU2IEwyNCwxMiBDMjQsMTAuNDcxNDA2MyAyMi43NTkzODI4LDkuMjMwNzY1NjMgMjEuMjMwNzY1Niw5LjIzMDc2NTYzIFogTTE1LjY5MjI5NjksMTcuMjgyNzY1NiBMMTUuNjkyMjk2OSwxOS4zODQ2MTcyIEMxNS42OTIyOTY5LDE5Ljg5MzIxMDkgMTUuMjc3ODUxNiwyMC4zMDc3MDMxIDE0Ljc2OTIzNDQsMjAuMzA3NzAzMSBDMTQuMjYwNjE3MiwyMC4zMDc3MDMxIDEzLjg0NjE0ODQsMTkuODkzMjM0NCAxMy44NDYxNDg0LDE5LjM4NDYxNzIgTDEzLjg0NjE0ODQsMTcuMjgyNzY1NiBDMTMuMjk2LDE2Ljk2MjQ2ODcgMTIuOTIzMDg1OSwxNi4zNzQ0Njg4IDEyLjkyMzA4NTksMTUuNjkyMjk2OSBDMTIuOTIzMDg1OSwxNC42NzMyMzQ0IDEzLjc1MDE0ODQsMTMuODQ2MTQ4NCAxNC43NjkyMzQ0LDEzLjg0NjE0ODQgQzE1Ljc4ODMyMDMsMTMuODQ2MTQ4NCAxNi42MTU0MDYyLDE0LjY3MzIzNDQgMTYuNjE1NDA2MiwxNS42OTIzMjAzIEMxNi42MTU0MDYyLDE2LjM3MzUzMTMgMTYuMjQyNDY4OCwxNi45NjI0Njg3IDE1LjY5MjI5NjksMTcuMjgyNzg5MSBMMTUuNjkyMjk2OSwxNy4yODI3NjU2IFoiPjwvcGF0aD4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+"},3485:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=a.ConfirmStep=void 0;var l=i(r(65)),s=i(r(81)),o=i(r(57)),u=i(r(1538)),d=i(r(32)),c=i(r(198));r(1198);var f=i(r(1199));r(1196);var p=i(r(1197)),h=i(r(36)),m=i(r(0)),g=r(406),v=i(r(1201)),y=r(1195);r(173);class b extends v.default{constructor(){super(...arguments),(0,h.default)(this,"allowed",(()=>l.default.resolve()))}init(){}get title(){return"ConfirmStep"}get name(){return"ConfirmStep"}get enableCinder(){return this.props.rootStore.checkEndpoint("cinder")}getDisk(e){var t,a,{size:r,typeOption:n,deleteTypeLabel:i}=e;return(0,s.default)(t=(0,s.default)(a="".concat(n.label," ")).call(a,r,"GiB ")).call(t,i)}getBootableVolumeDisk(){var e,{bootableVolume:t}=this.props.context,{size:a,volume_type:r}=t.selectedRows[0];return(0,s.default)(e="".concat(r," ")).call(e,a,"GiB")}getSystemDisk(){if(!this.enableCinder)return null;var{context:e}=this.props,{systemDisk:t,source:{value:a}={},instanceSnapshotDisk:r}=e;return"bootableVolume"===a?this.getBootableVolumeDisk():"instanceSnapshot"===a&&null!==r?this.getDisk(r):this.getDisk(t)}getDataDisk(){if(!this.enableCinder)return null;var{context:e}=this.props,{dataDisk:t=[]}=e;return(0,o.default)(t).call(t,(e=>this.getDisk(e.value)))}getFlavor(){var e,t,a,{context:r}=this.props,{flavor:n}=r,{disk:i,ram:l,vcpus:o}=n.selectedRows[0];return i?(0,s.default)(e=(0,s.default)(t="".concat(o,"VCPU/")).call(t,i,"GiB/")).call(e,(0,u.default)(l/1024,10),"GiB"):(0,s.default)(a="".concat(o,"VCPU/")).call(a,(0,u.default)(l/1024,10),"GiB")}getSourceValue(){var{context:e}=this.props,{source:t}=e,{selectedRows:a=[],selectedRowKeys:r=[]}=e[t.value];return a.length?a[0].name:r[0]}getVirtualLANs(){var{context:e}=this.props,{networks:t=[]}=e,a=(0,o.default)(t).call(t,(e=>{var t,a,r,{networkOption:n,subnetOption:i,ipTypeOption:l,ip:o}=e.value,u=1===l.value?i.name||i.label:"";return(0,s.default)(t=(0,s.default)(a=(0,s.default)(r="".concat(n.name||n.label," ")).call(r,l.label," ")).call(a,u," ")).call(t,1===l.value?o:"")}));return m.default.createElement(f.default,null,(0,o.default)(a).call(a,(e=>m.default.createElement(p.default,{span:24,key:e},e))))}getPorts(){var{context:e}=this.props,{ports:{selectedRows:t=[]}={}}=e,a=(0,o.default)(t).call(t,(e=>e.name||e.id));return m.default.createElement(f.default,null,(0,o.default)(a).call(a,(e=>m.default.createElement(p.default,{span:24,key:e},e))))}getSecurityGroups(){var{context:e}=this.props,{securityGroup:{selectedRows:t=[]}={}}=e,a=(0,o.default)(t).call(t,(e=>e.name));return m.default.createElement(f.default,null,(0,o.default)(a).call(a,(e=>m.default.createElement(p.default,{span:24,key:e},e))))}getLoginType(){var e,{context:t}=this.props,{loginType:a,keypair:r}=t,{value:n,label:i}=a;return(0,s.default)(e="".concat(i," ")).call(e,"keypair"===n?r.selectedRows[0].name:"")}getPhysicalNode(){var{context:e}=this.props,{physicalNodeType:t,physicalNode:a}=e;return t?"smart"===t.value?t.label:a.selectedRows[0].hypervisor_hostname:y.physicalNodeTypes[0].label}getServerGroup(){var{context:e}=this.props,{serverGroup:t}=e;return t&&t.selectedRows.length?t.selectedRows[0].name:"-"}getIso(){var{context:e}=this.props,{iso:t}=e;return t&&0!==t.length?(0,o.default)(t).call(t,(e=>e.value)).join(" "):"-"}goStep(e){var{goStep:t}=this.props;t&&t(e)}get defaultValue(){return{}}get formItems(){var e,a,{context:r}=this.props,n=[{label:t("Start Source"),value:r.source.label},{label:t("System Disk"),value:this.getSystemDisk()},{label:t("Available Zone"),value:r.availableZone.label},{label:t("Start Source Name"),value:this.getSourceValue()},{label:t("Data Disk"),value:this.getDataDisk()},{label:t("Project"),value:r.project},{label:t("Flavor"),value:this.getFlavor()}];return this.enableCinder||(n=(0,d.default)(n).call(n,(e=>{var a;return!(0,c.default)(a=[t("System Disk"),t("Data Disk")]).call(a,e.label)}))),[{name:"confirm-count",label:t("Count"),type:"label",content:r.count||1},{name:"confirm-config",label:t("Config Overview"),type:"descriptions",title:t("Base Config"),onClick:()=>{this.goStep(0)},items:n},{type:"short-divider"},{name:"confirm-config-network",label:" ",type:"descriptions",title:t("Network Config"),onClick:()=>{this.goStep(1)},items:[{label:(0,s.default)(e="".concat(t("Virtual LAN"),"(")).call(e,t("New"),")"),value:this.getVirtualLANs(),span:1},{label:(0,s.default)(a="".concat(t("Virtual LAN"),"(")).call(a,t("Created"),")"),value:this.getPorts(),span:1},{label:t("Security Group"),value:this.getSecurityGroups(),span:1}]},{type:"short-divider"},{name:"confirm-config-system",label:" ",type:"descriptions",title:t("System Config"),onClick:()=>{this.goStep(2)},items:[{label:t("Name"),value:r.name},{label:t("Login Type"),value:this.getLoginType()},{label:t("Physical Node"),value:this.getPhysicalNode()},{label:t("Server Group"),value:this.getServerGroup()}]}]}}a.ConfirmStep=b;var _=(0,g.inject)("rootStore")((0,g.observer)(b));a.default=_},3489:function(e,a,r){"use strict";var n=r(33),i=r(44),l=r(32),s=r(25),o=r(27),u=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=a.SystemStep=void 0;var p=f(r(65)),h=f(r(102)),m=f(r(57)),g=f(r(32)),v=f(r(51)),y=f(r(36)),b=f(r(559)),_=f(r(0)),S=r(406),x=f(r(420)),w=f(r(408)),I=f(r(586)),C=f(r(585)),k=f(r(1300)),D=f(r(1201)),P=r(556),T=r(1337),A=r(1195),M=r(161),R=f(r(1539)),N=f(r(1249)),E=f(r(1540));function j(e,t){var a=n(e);if(i){var r=i(e);t&&(r=l(r).call(r,(function(t){return s(e,t).enumerable}))),a.push.apply(a,r)}return a}function F(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)o(a=j(Object(r),!0)).call(a,(function(t){(0,y.default)(e,t,r[t])}));else if(u)d(e,u(r));else{var n;o(n=j(Object(r))).call(n,(function(t){c(e,t,s(r,t))}))}}return e}class L extends D.default{constructor(){var e;super(...arguments),e=this,(0,y.default)(this,"allowed",(()=>p.default.resolve())),(0,y.default)(this,"onFinishCreateKeyPair",(0,v.default)((function*(){var{createdItem:t}=e.keyPairStore,a=yield e.getKeypairs(),r=(0,h.default)(a).call(a,(e=>e.name===(t||{}).name));if(r){var n={selectedRowKeys:[r.id],selectedRows:[r]};e.setState({initKeyPair:n},(()=>{e.updateDefaultValue()}))}}))),(0,y.default)(this,"onValuesChange",(e=>{(0,b.default)(e,"serverGroup")&&this.onServerGroupChange(e.serverGroup)})),(0,y.default)(this,"onServerGroupChange",(e=>{var{selectedRows:t=[]}=e||{};this.updateContext({serverGroupRow:t[0]||null})}))}init(){this.keyPairStore=x.default,this.serverStore=w.default,this.hypervisorStore=I.default,this.serverGroupStore=C.default,this.getKeypairs(),this.hasAdminRole&&this.getHypervisors(),this.getServerGroups()}get hypervisorColumns(){var e=[...T.hypervisorColumns];return e[0]={title:t("Hostname"),dataIndex:"hypervisor_hostname"},e}get hypervisorFilters(){var e=[...T.hypervisorFilters];return e[0]={label:t("Hostname"),name:"hypervisor_hostname"},e}get title(){return"SystemStep"}get name(){return"SystemStep"}get keypairs(){var e;return(0,m.default)(e=this.keyPairStore.list.data||[]).call(e,(e=>F(F({},e),{},{key:e.name,id:e.name})))}get hypervisors(){var e;return(0,m.default)(e=this.hypervisorStore.list.data||[]).call(e,(e=>F(F({},e),{},{key:e.id,name:e.hypervisor_hostname})))}get serverGroups(){var e;return(0,g.default)(e=this.serverGroupStore.list.data||[]).call(e,(e=>{var{servergroup:t}=this.locationParams;return!t||e.id===t}))}get serverGroupRequired(){var{more:e}=this.state,{servergroup:t}=this.locationParams;return!!t&&e}get inputHelp(){var{input:e=""}=this.state;return t("Entered: {length, plural, =1 {one character} other {# characters} }(maximum {maxCount} characters)",{length:e.length,maxCount:1e3})}get sourceInfo(){var{context:e={}}=this.props,{source:t={},image:a={},bootableVolume:r={},instanceSnapshot:n={}}=e;if("image"===t.value){var{selectedRows:i=[]}=a;return i.length&&i[0]}if("bootableVolume"===t.value){var{selectedRows:l=[]}=r,s=l.length&&l[0].origin_data||{},o=l.length&&l[0].volume_image_metadata;return s.volume_image_metadata||o}if("instanceSnapshot"===t.value){var{selectedRows:u=[]}=n;return u.length&&u[0]}return!1}get isWindowsImage(){return this.sourceInfo&&"windows"===this.sourceInfo.os_distro}get defaultValue(){var e,{servergroup:t}=this.locationParams,{context:a={}}=this.props,r={loginType:a.loginType||(this.isWindowsImage?this.loginTypes[1]:this.loginTypes[0]),more:!1,physicalNodeType:A.physicalNodeTypes[0],userData:""};t&&(r.serverGroup={selectedRowKeys:[t],selectedRows:(0,g.default)(e=this.serverGroups).call(e,(e=>e.id===t))});var{initKeyPair:n,name:i}=this.state;return n&&(r.keypair=n),i&&(r.name=i),r}get loginTypes(){return[{label:t("Keypair"),value:"keypair",disabled:this.isWindowsImage},{label:t("Password"),value:"password"}]}getKeypairs(){var e=this;return(0,v.default)((function*(){return e.keyPairStore.fetchList()}))()}getHypervisors(){this.hypervisorStore.fetchList()}getServerGroups(){var e=this;return(0,v.default)((function*(){yield e.serverGroupStore.fetchList(),e.updateDefaultValue();var{servergroup:t}=e.locationParams;t&&e.onServerGroupChange({selectedRows:e.serverGroups})}))()}get nameForStateUpdate(){return["name","loginType","password","confirmPassword","more","physicalNodeType","serverGroup"]}get loginUserName(){return this.sourceInfo&&this.sourceInfo.os_admin_user}getKeyPairHeader(){var{isLoading:e}=this.keyPairStore.list||{};return e?null:_.default.createElement("div",{style:{marginBottom:10}},_.default.createElement("span",null,t("The key pair allows you to SSH into your newly created instance. You can select an existing key pair, import a key pair, or generate a new key pair.")),_.default.createElement("span",{className:E.default["action-wrapper"]},_.default.createElement(N.default,{actions:{moreActions:[{action:R.default}]},onFinishAction:this.onFinishCreateKeyPair})))}get formItems(){var{loginType:e,more:a=!1,physicalNodeType:r}=this.state,n=e===this.loginTypes[1].value,i=r===A.physicalNodeTypes[1].value,{initKeyPair:l}=this.state;return[{name:"name",label:t("Name"),type:"input-name",required:!0,isInstance:!0},{name:"loginType",label:t("Login Type"),type:"radio",options:this.loginTypes,isWrappedValue:!0},{name:"username",label:t("Login Name"),content:this.loginUserName||"-",extra:this.loginUserName?"":t("The feasible configuration of cloud-init or cloudbase-init service in the image is not synced to image's properties, so the Login Name is unknown."),tip:t("Whether the Login Name can be used is up to the feasible configuration of cloud-init or cloudbase-init service in the image.")},{name:"keypair",label:t("Keypair"),type:"select-table",data:this.keypairs,isLoading:this.keyPairStore.list.isLoading,required:!n,hidden:n,header:this.getKeyPairHeader(),initValue:l,tip:t("The SSH key is a way to remotely log in to the instance. The cloud platform only helps to keep the public key. Please keep your private key properly."),filterParams:[{label:t("Name"),name:"name"}],columns:[{title:t("Name"),dataIndex:"name"},{title:t("Fingerprint"),dataIndex:"fingerprint"}],selectedLabel:t("Keypair")},{name:"password",label:t("Login Password"),type:"input-password",required:n,hidden:!n,otherRule:(0,P.getPasswordOtherRule)("password","instance")},{name:"confirmPassword",label:t("Confirm Password"),type:"input-password",required:n,hidden:!n,otherRule:(0,P.getPasswordOtherRule)("confirmPassword","instance")},{type:"divider"},{name:"more",label:t("Advanced Options"),type:"more"},{name:"physicalNodeType",label:t("Physical Node"),type:"radio",hidden:!a||!this.hasAdminRole,options:A.physicalNodeTypes,isWrappedValue:!0},{name:"physicalNode",label:" ",type:"select-table",hidden:!this.hasAdminRole||!a||!i,required:i,data:this.hypervisors,isLoading:this.hypervisorStore.list.isLoading,extra:t("You can manually specify a physical node to create an instance."),columns:this.hypervisorColumns,filterParams:this.hypervisorFilters},{name:"serverGroup",label:t("Server Group"),type:"select-table",hidden:!a,data:this.serverGroups,isLoading:this.serverGroupStore.list.isLoading,required:this.serverGroupRequired,extra:t("Using server groups, you can create cloud hosts on the same/different physical nodes as much as possible to meet the affinity/non-affinity requirements of business applications."),columns:[{title:t("Name"),dataIndex:"name"},{title:t("Member Count"),dataIndex:"members",render:e=>e.length},{title:t("Policy"),dataIndex:"policy",valueMap:k.default}],filterParams:[{label:t("Name"),name:"name"},{label:t("Policy"),name:"policy",options:(0,M.getOptions)(k.default)}]},{name:"userData",label:t("User Data"),type:"textarea-from-file",validator:P.asciiValidator,hidden:!a,extra:t("The user needs to ensure that the input is a shell script that can run completely and normally.")}]}}a.SystemStep=L;var z=(0,S.inject)("rootStore")((0,S.observer)(L));a.default=z},3490:function(e,t,a){(t=e.exports=a(74)(!1)).push([e.i,"/* init */\n/* specific color */\n/* border */\n/* background */\n/* shadow */\n/* font */\n/* 中号字体 */\n/* animation */\n/* size */\n/* sider */\n.index__input--2eKC2 {\n margin-right: 32px;\n margin-left: 16px;\n}\n.index__number-input--3TVxi {\n min-width: 165px;\n}\n.index__action-wrapper--2DjKP {\n margin-left: 8px;\n}\n.index__action-wrapper--2DjKP .ant-btn-link {\n padding: 5.6px 15px !important;\n border-color: #0068FF;\n}\n",""]),t.locals={input:"index__input--2eKC2","number-input":"index__number-input--3TVxi","action-wrapper":"index__action-wrapper--2DjKP"}},3491:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=a.NetworkStep=void 0;var l=i(r(65)),s=i(r(102)),o=i(r(57)),u=i(r(27)),d=i(r(90)),c=i(r(1233)),f=i(r(51)),p=i(r(36)),h=i(r(91)),m=i(r(199)),g=i(r(0)),v=r(406),y=r(228),b=r(414),_=r(416),S=r(561),x=r(556),w=i(r(1201)),I=i(r(1383)),C=r(564),k=r(1274),D=r(1210),P=r(558),{isIPv4:T,isIpv6:A}=x.ipValidate;class M extends w.default{constructor(){var e;super(...arguments),e=this,(0,p.default)(this,"allowed",(()=>l.default.resolve())),(0,p.default)(this,"getSubnetPromise",function(){var t=(0,f.default)((function*(t){if(!e.subnetMap[t]){var a=yield e.subnetStore.fetchList({network_id:t});e.subnetMap[t]=a}return e.subnetMap[t]}));return function(e){return t.apply(this,arguments)}}()),(0,p.default)(this,"checkNetworks",(e=>!(!(0,h.default)(e)||(0,m.default)(e)||(0,m.default)(e[0].value))&&(!(0,s.default)(e).call(e,(e=>!e.value||!e.value.network))&&!(0,s.default)(e).call(e,(e=>1===e.value.ipType&&!T(e.value.ip)&&!A(e.value.ip)))))),(0,p.default)(this,"disabledNetwork",(e=>!e.subnets||0===e.subnets.length)),(0,p.default)(this,"onNetworkChange",(e=>{var{selectedRows:t}=e;this.setState({networkSelectRows:t},(()=>{this.getSubnets()})),this.updateContext({networkSelectRows:t})})),(0,p.default)(this,"checkNetworkAndPort",(e=>{var{getFieldValue:a}=e;return{validator(){var e=a("networkSelect"),r=a("ports"),{selectedRowKeys:n=[]}=e||{},{selectedRowKeys:i=[]}=r||{};return 0===n.length&&0===i?l.default.reject(t("Please select")):l.default.resolve()}}})),(0,p.default)(this,"onPortChange",(e=>{var{selectedRows:t=[]}=e||{};this.updateContext({portSelectRows:t})}))}init(){this.networkStore=new y.NetworkStore,this.subnetStore=new b.SubnetStore,this.securityGroupStore=new _.SecurityGroupStore,this.portStore=new S.PortStore,this.subnetMap={}}get title(){return"NetworkStep"}get name(){return"NetworkStep"}get defaultValue(){return{networks:[]}}getSubnets(){var e=this;return(0,f.default)((function*(){var{networkSelectRows:t,networks:a=[]}=e.state,r=yield l.default.all((0,o.default)(t).call(t,(t=>e.getSubnetPromise(t.id)))),n=[];(0,u.default)(r).call(r,(e=>{n.push(...e)}));var i=[],c=(0,o.default)(t).call(t,((e,t)=>{var r=(0,s.default)(n).call(n,(t=>t.network_id===e.id)),l=(0,s.default)(a).call(a,((t,a)=>t.value.network===e.id&&(i.push(a),!0)));return l||{value:{network:e.id,subnet:r.id,networkOption:e,subnetOption:r,ipTypeOption:C.ipTypeOptions[0],ipType:0},index:t}})),f=(0,o.default)(t).call(t,(e=>e.id));(0,u.default)(a).call(a,((e,t)=>{(0,d.default)(i).call(i,t)<0&&(0,d.default)(f).call(f,e.value.network)>=0&&c.push(e)})),e.updateFormValue("networks",c),e.setState({subnets:n,initValue:c})}))()}get nameForStateUpdate(){return["networkSelect","networks","ports"]}get formItems(){var{networkSelectRows:e=[],subnets:a,initValue:r=[],ports:n=[]}=this.state,i=e.length>0,s=e.length&&(0,c.default)(e).call(e,(e=>e.port_security_enabled)),o=0===n.length,u=0===e.length;return[{name:"networkSelect",label:t("Networks"),type:"network-select-table",disabledFunc:this.disabledNetwork,onChange:this.onNetworkChange,showExternal:!0,isMulti:!0,required:o,otherRule:this.checkNetworkAndPort,dependencies:["ports"],header:g.default.createElement("div",null,t("Please reasonably plan the network and subnet to which the virtual network card belongs."),t(" You can go to the console to "),(0,P.getLinkRender)({key:"network",value:"".concat(t("create a new network/subnet")," > ")}))},{name:"networks",label:t("Virtual LAN"),type:"add-select",networks:e,hidden:!i,subnets:a,itemComponent:I.default,required:i,addTextTips:t("Virtual LANs"),addText:t("Add Virtual LAN"),minCount:e.length||0,optionsByIndex:!0,initValue:r,validator:(e,t)=>this.checkNetworks(t)?l.default.resolve():l.default.reject("")},{name:"divider1",type:"divider"},{name:"ports",type:"select-table",label:t("Ports"),extraParams:{project_id:this.currentProjectId,status:"DOWN"},backendPageStore:this.portStore,isMulti:!0,header:t("Ports provide extra communication channels to your instances. You can select ports instead of networks or a mix of both (The port executes its own security group rules by default)."),filterParams:D.portFilters,columns:D.portColumns,dependencies:["networkSelect"],otherRule:this.checkNetworkAndPort,required:u,onChange:this.onPortChange},{name:"divider2",type:"divider"},{name:"securityGroup",label:t("Security Group"),type:"select-table",tip:t("Each instance belongs to at least one security group, which needs to be specified when it is created. Instances in the same security group can communicate with each other on the network, and instances in different security groups are disconnected from the internal network by default."),backendPageStore:this.securityGroupStore,extraParams:{project_id:this.currentProjectId},hidden:!s,required:s,isMulti:!0,header:g.default.createElement("div",{style:{marginBottom:8}},t("The security group is similar to the firewall function and is used to set up network access control. "),t(" You can go to the console to "),(0,P.getLinkRender)({key:"securityGroup",value:"".concat(t("create a new security group"),"> ")}),t("Note: The security group you use will act on all virtual adapters of the instance.")),filterParams:k.securityGroupFilter,columns:k.securityGroupColumns,onRow:()=>{}}]}}a.NetworkStep=M;var R=(0,v.inject)("rootStore")((0,v.observer)(M));a.default=R},3492:function(e,a,r){"use strict";var n=r(160),i=r(19),l=r(25),s=r(21);i(a,"__esModule",{value:!0}),a.default=void 0;var o=s(r(409)),u=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var a=p(t);if(a&&a.has(e))return a.get(e);var r={},n=i&&l;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var o=n?l(e,s):null;o&&(o.get||o.set)?i(r,s,o):r[s]=e[s]}r.default=e,a&&a.set(e,r);return r}(r(0)),d=s(r(3493)),c=r(347),f=r(558);function p(e){if("function"!=typeof n)return null;var t=new n,a=new n;return(p=function(e){return e?a:t})(e)}class h extends u.Component{getDetailUrl(e){var t=this.isAdminPage?"securityGroupDetailAdmin":"securityGroupDetail";return(0,f.getPath)({key:t,params:{id:e}})}render(){var{item:{security_group_rules:e=[]}={}}=this.props,a={buttonType:"link",title:t("Security Group Rules"),buttonText:t("View Rules"),modalSize:"middle",columns:(0,c.getSelfColumns)(this),data:e};return u.default.createElement(d.default,(0,o.default)({},a,{style:{paddingLeft:0}}))}}a.default=h},3493:function(e,a,r){"use strict";var n=r(160),i=r(19),l=r(25),s=r(21);i(a,"__esModule",{value:!0}),a.default=void 0,r(572);var o=s(r(574)),u=s(r(36)),d=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var a=p(t);if(a&&a.has(e))return a.get(e);var r={},n=i&&l;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var o=n?l(e,s):null;o&&(o.get||o.set)?i(r,s,o):r[s]=e[s]}r.default=e,a&&a.set(e,r);return r}(r(0)),c=s(r(1436)),f=s(r(16));r(173);function p(e){if("function"!=typeof n)return null;var t=new n,a=new n;return(p=function(e){return e?a:t})(e)}class h extends d.Component{constructor(){super(...arguments),(0,u.default)(this,"renderTable",(()=>{var{data:e,columns:t}=this.props;return d.default.createElement(o.default,{columns:t,dataSource:e})}))}static propTypes(){return{title:f.default.string.isRequired,buttonType:f.default.string,isDanger:f.default.bool,data:f.default.array,columns:f.default.array,modalSize:f.default.string,className:f.default.func,buttonText:f.default.string,style:f.default.string}}render(){var{buttonType:e,isDanger:t,title:a,buttonText:r,modalSize:n,style:i}=this.props,l={buttonType:e,isDanger:t,title:a,buttonText:r,modalSize:n,style:i,render:this.renderTable};return d.default.createElement(c.default,l)}}a.default=h,(0,u.default)(h,"defaultProps",{buttonType:"link",isDanger:!1,data:[],columns:[],modalSize:"middle",className:"",buttonText:t("View Detail"),title:t("Detail")})},3498:function(e,a,r){"use strict";var n=r(33),i=r(44),l=r(32),s=r(25),o=r(27),u=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=a.BaseStep=void 0;var p=f(r(65)),h=f(r(102)),m=f(r(57)),g=f(r(32));r(1198);var v=f(r(1199));r(1196);var y=f(r(1197)),b=f(r(51)),_=f(r(36)),S=f(r(0)),x=r(406),w=r(34),I=(r(173),r(557)),C=f(r(408)),k=f(r(565)),D=f(r(1339)),P=f(r(566)),T=f(r(1262)),A=r(410),M=r(563),R=f(r(1201)),N=f(r(1468)),E=r(1213),j=f(r(1275));function F(e,t){var a=n(e);if(i){var r=i(e);t&&(r=l(r).call(r,(function(t){return s(e,t).enumerable}))),a.push.apply(a,r)}return a}function L(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)o(a=F(Object(r),!0)).call(a,(function(t){(0,_.default)(e,t,r[t])}));else if(u)d(e,u(r));else{var n;o(n=F(Object(r))).call(n,(function(t){c(e,t,s(r,t))}))}}return e}class z extends R.default{constructor(){var e;super(...arguments),e=this,(0,_.default)(this,"allowed",(()=>p.default.resolve())),(0,_.default)(this,"onImageTabChange",(e=>{this.setState({imageTab:e})})),(0,_.default)(this,"checkSystemDisk",((e,t)=>t.type?p.default.resolve():p.default.reject(""))),(0,_.default)(this,"onFlavorChange",(e=>{this.updateContext({flavor:e})})),(0,_.default)(this,"onInstanceSnapshotChange",function(){var a=(0,b.default)((function*(a){var r,n,{min_disk:i,size:l,id:s}=a.selectedRows[0]||{};if(!s)return e.updateContext({instanceSnapshotDisk:null}),void e.setState({instanceSnapshotDisk:null,instanceSnapshotMinSize:0});var o=yield e.instanceSnapshotStore.fetchDetail({id:s}),{snapshotDetail:{size:u=0,volume_type_id:d}={},block_device_mapping:c="",volumeDetail:f}=o;f||(e.updateContext({instanceSnapshotDisk:null}),e.setState({instanceSnapshotDisk:null,instanceSnapshotMinSize:0}));var p=Math.max(i,l,u),m={};try{m=JSON.parse(c)}catch(e){}var{volume_type:g}=f,{delete_on_termination:v}=m[0]||{},y=v?1:0,b=v?t("Deleted with the instance"):t("Not deleted with the instance"),_=d||((0,h.default)(r=e.volumeTypes).call(r,(e=>e.label===g))||{}).value,S=(0,h.default)(n=e.volumeTypes).call(n,(e=>e.value===_)),x=f?{type:_,typeOption:S,size:u,deleteType:y,deleteTypeLabel:b}:null;e.updateFormValue("instanceSnapshotDisk",x),e.updateContext({instanceSnapshotDisk:x}),e.setState({instanceSnapshotDisk:x,instanceSnapshotMinSize:p})}));return function(e){return a.apply(this,arguments)}}()),(0,_.default)(this,"onBootableVolumeChange",(e=>{this.updateContext({bootableVolume:e})})),(0,_.default)(this,"onSystemDiskChange",(e=>{this.updateContext({systemDisk:e})})),(0,_.default)(this,"onDataDiskChange",(e=>{this.updateContext({dataDisk:e})})),(0,_.default)(this,"getInstanceSnapshotDisk",(()=>{var{instanceSnapshotDisk:e}=this.state,{instanceSnapshotDisk:t}=this.props.context;return e||t})),(0,_.default)(this,"renderSnapshotDisk",(()=>{var e=this.getInstanceSnapshotDisk();if(null===e)return null;var{deleteTypeLabel:a,typeOption:r={},size:n}=e||{};if(!n)return null;var i={marginRight:10,maxWidth:"20%"};return S.default.createElement(v.default,{gutter:24},S.default.createElement(y.default,{span:8},S.default.createElement("span",{style:i},t("Type")),r.label),S.default.createElement(y.default,{span:8},S.default.createElement("span",{style:i},t("Size")),n,S.default.createElement("span",{style:i},"GiB")),S.default.createElement(y.default,{span:8},a))}))}init(){this.serverStore=C.default,this.imageStore=k.default,this.volumeStore=new A.VolumeStore,this.volumeTypeStore=P.default,this.instanceSnapshotStore=D.default,this.getAvailZones(),this.getImages(),this.getVolumeTypes(),this.getVolumes(),this.getInstanceSnapshots(),this.initSourceChange()}get title(){return"BaseStep"}get name(){return"BaseStep"}get isStep(){return!0}get defaultValue(){var{volume:e,snapshot:t}=this.locationParams,a=this.imageSourceType;return e?a=this.volumeSourceType:t&&(a=this.snapshotSourceType),{systemDisk:this.defaultVolumeType,source:a,project:this.currentProjectName,dataDisk:[]}}get availableZones(){var e,t;return(0,m.default)(e=(0,g.default)(t=T.default.list.data||[]).call(t,(e=>e.zoneState.available))).call(e,(e=>({value:e.zoneName,label:e.zoneName})))}get images(){var{imageTab:e}=this.state,{image:t}=this.locationParams,a=t?[(0,w.toJS)(this.imageStore.detail)]:this.imageStore.list.data||[],r=(0,g.default)(a).call(a,(t=>!!(0,M.canImageCreateInstance)(t)&&(e?(0,M.getImageOS)(t)===e:t)));return(0,m.default)(r).call(r,(e=>L(L({},e),{},{key:e.id})))}get snapshots(){var{snapshot:e}=this.locationParams;if(!e){var{list:{data:t}}=this.instanceSnapshotStore;return t||[]}return[(0,w.toJS)(this.instanceSnapshotStore.detail)]}get enableCinder(){return this.props.rootStore.checkEndpoint("cinder")}get volumeTypes(){var e;return(0,m.default)(e=this.volumeTypeStore.list.data||[]).call(e,(e=>({label:e.name,value:e.id,originData:(0,w.toJS)(e)})))}get volumes(){var e,t,a,{volume:r}=this.locationParams;return r?(0,g.default)(a=[(0,w.toJS)(this.volumeStore.detail)]).call(a,(e=>(0,I.canCreateInstance)(e))):(0,m.default)(e=(0,g.default)(t=this.volumeStore.list.data||[]).call(t,(e=>(0,I.canCreateInstance)(e)))).call(e,(e=>L(L({},e),{},{key:e.id})))}get defaultVolumeType(){return{size:10,deleteType:1}}get sourceTypes(){var{image:e,snapshot:a,volume:r}=this.locationParams,n=[{label:t("Image"),value:"image",disabled:r||a},{label:t("Instance Snapshot"),value:"instanceSnapshot",disabled:e||r}];return this.enableCinder&&n.push({label:t("Bootable Volume"),value:"bootableVolume",disabled:e||a}),n}get imageSourceType(){var e;return(0,h.default)(e=this.sourceTypes).call(e,(e=>"image"===e.value))}get snapshotSourceType(){var e;return(0,h.default)(e=this.sourceTypes).call(e,(e=>"instanceSnapshot"===e.value))}get volumeSourceType(){var e;return this.enableCinder?(0,h.default)(e=this.sourceTypes).call(e,(e=>"bootableVolume"===e.value)):{}}getAvailZones(){var e=this;return(0,b.default)((function*(){yield T.default.fetchListWithoutDetail(),e.availableZones.length&&e.updateFormValue("availableZone",e.availableZones[0])}))()}getImages(){var e=this;return(0,b.default)((function*(){var t,{volume:a,image:r,snapshot:n}=e.locationParams;a||n||(r?yield e.imageStore.fetchDetail({id:r}):yield e.imageStore.fetchList({all_projects:e.hasAdminRole}),r&&e.updateFormValue("image",{selectedRowKeys:[r],selectedRows:(0,g.default)(t=e.images).call(t,(e=>e.id===r))}))}))()}getVolumeTypes(){var e=this;return(0,b.default)((function*(){e.enableCinder&&(yield e.volumeTypeStore.fetchList())}))()}getVolumes(){var e=this;return(0,b.default)((function*(){var t,{image:a,snapshot:r,volume:n}=e.locationParams;a||r||e.enableCinder&&(n?(yield e.volumeStore.fetchDetail({id:n}),e.updateContext({source:e.volumeSourceType})):yield e.volumeStore.fetchList({sortKey:"bootable",sortOrder:"ascend"}),n&&e.updateFormValue("volume",{selectedRowKeys:[n],selectedRows:(0,g.default)(t=e.volumes).call(t,(e=>e.id===n))}))}))()}getInstanceSnapshots(){var e=this;return(0,b.default)((function*(){var t,{snapshot:a}=e.locationParams;a?(yield e.instanceSnapshotStore.fetchDetail({id:a}),a&&e.updateFormValue("instanceSnapshot",{selectedRowKeys:[a],selectedRows:(0,g.default)(t=e.snapshots).call(t,(e=>e.id===a))})):e.instanceSnapshotStore.fetchList()}))()}get systemTabs(){return(0,M.getImageSystemTabs)()}get nameForStateUpdate(){return["source","image","instanceSnapshot","bootableVolume","flavor"]}getSystemDiskMinSize(){var e=(this.state.flavor||{}).disk||0,t=0;if(this.sourceTypeIsImage){var{min_disk:a=0,size:r=0}=this.state.image||{},n=Math.ceil(r/1024/1024/1024);return t=Math.max(a,n,1),Math.max(e,t,1)}if(this.sourceTypeIsSnapshot){var{instanceSnapshotMinSize:i=0}=this.state;return Math.max(e,i,1)}return Math.max(e,1)}get sourceTypeIsImage(){var{source:e}=this.state;return e===this.imageSourceType.value}get sourceTypeIsSnapshot(){var{source:e}=this.state;return e===this.snapshotSourceType.value}get sourceTypeIsVolume(){var{source:e}=this.state;return e===this.volumeSourceType.value}getImageExtraWords(){var{flavor:{category:e}={}}=this.state;return(0,E.isGpuCategory)(e)?t("For GPU type, you need to install GPU drivers in the instance operating system."):""}initSourceChange(){var{snapshot:e,volume:t}=this.locationParams;e?this.onSourceChange(this.snapshotSourceType):t?this.onSourceChange(this.volumeSourceType):this.onSourceChange(this.imageSourceType)}onSourceChange(e){this.updateContext({source:e})}get imageColumns(){return(0,M.getImageColumns)(this)}get instanceSnapshotColumns(){return[{title:t("Name"),dataIndex:"name"},{title:t("Disk Format"),dataIndex:"disk_format",valueMap:M.imageFormats},{title:t("Min System Disk"),dataIndex:"min_disk",unit:"GiB"},{title:t("Min Memory"),dataIndex:"min_ram",render:e=>"".concat(e/1024,"GiB")},{title:t("Status"),dataIndex:"status",valueMap:M.imageStatus},{title:t("Created At"),dataIndex:"created_at",isHideable:!0,valueRender:"sinceTime"}]}get volumeColumns(){return[{title:t("Name"),dataIndex:"name"},{title:t("Size"),dataIndex:"size",unit:"GiB",width:80},{title:t("Status"),dataIndex:"status",valueMap:I.volumeStatus,width:80},{title:t("Type"),dataIndex:"volume_type"},{title:t("Created At"),dataIndex:"created_at",valueRender:"sinceTime"}]}get showSystemDisk(){var e=this.getInstanceSnapshotDisk();return this.enableCinder&&(this.sourceTypeIsImage||this.sourceTypeIsSnapshot&&null===e)}getFlavorComponent(){return S.default.createElement(j.default,{onChange:this.onFlavorChange})}get formItems(){var{image:e}=this.locationParams,a=e?this.imageStore.isLoading:this.imageStore.list.isLoading;return[{name:"project",label:t("Project"),type:"label"},{name:"availableZone",label:t("Available Zone"),type:"select",placeholder:t("Please select"),isWrappedValue:!0,required:!0,options:this.availableZones,tip:t("Availability zone refers to a physical area where power and network are independent of each other in the same area. In the same region, the availability zone and the availability zone can communicate with each other in the intranet, and the available zones can achieve fault isolation.")},{type:"divider"},{name:"flavor",label:t("Specification"),type:"select-table",component:this.getFlavorComponent(),required:!0,wrapperCol:{xs:{span:24},sm:{span:18}}},{name:"source",label:t("Start Source"),type:"radio",options:this.sourceTypes,required:!0,isWrappedValue:!0,tip:t("The start source is a template used to create an instance. You can choose an image or a bootable volume."),onChange:e=>{this.onSourceChange(e)}},{name:"image",label:t("Operating System"),type:"select-table",data:this.images,isLoading:a,required:this.sourceTypeIsImage,isMulti:!1,display:this.sourceTypeIsImage,extra:this.getImageExtraWords(),filterParams:[{label:t("Name"),name:"name"}],columns:this.imageColumns,tabs:this.systemTabs,defaultTabValue:this.locationParams.os_distro||this.systemTabs[0].value,selectedLabel:t("Image"),onTabChange:this.onImageTabChange},{name:"instanceSnapshot",label:t("Instance Snapshot"),type:"select-table",data:this.snapshots,required:this.sourceTypeIsSnapshot,isMulti:!1,hidden:!this.sourceTypeIsSnapshot,display:this.sourceTypeIsSnapshot,onChange:this.onInstanceSnapshotChange,filterParams:[{label:t("Name"),name:"name"}],columns:this.instanceSnapshotColumns},{name:"bootableVolume",label:t("Bootable Volume"),type:"select-table",data:this.volumes,isLoading:this.volumeStore.list.isLoading,required:this.sourceTypeIsVolume,isMulti:!1,display:this.sourceTypeIsVolume&&this.enableCinder,onChange:this.onBootableVolumeChange,filterParams:[{label:t("Name"),name:"name"}],columns:this.volumeColumns},{type:"divider"},{name:"systemDisk",label:t("System Disk"),type:"instance-volume",options:this.volumeTypes,required:this.showSystemDisk,hidden:!this.showSystemDisk,validator:this.checkSystemDisk,minSize:this.getSystemDiskMinSize(),extra:t("Disk size is limited by the min disk of flavor, image, etc."),onChange:this.onSystemDiskChange},{name:"instanceSnapshotDisk",label:t("System Disk"),hidden:this.showSystemDisk,component:this.renderSnapshotDisk()},{name:"dataDisk",label:t("Data Disk"),type:"add-select",options:this.volumeTypes,defaultItemValue:this.defaultVolumeType,itemComponent:N.default,minCount:0,addTextTips:t("Data Disks"),addText:t("Add Data Disks"),extra:t("Too many disks mounted on the instance will affect the read and write performance. It is recommended not to exceed 16 disks."),onChange:this.onDataDiskChange,display:this.enableCinder}]}}a.BaseStep=z;var O=(0,x.inject)("rootStore")((0,x.observer)(z));a.default=O},3499:function(e,t,a){var r=a(3500);"string"==typeof r&&(r=[[e.i,r,""]]);var n={hmr:!0,transform:undefined,insertInto:void 0};a(75)(r,n);r.locals&&(e.exports=r.locals)},3500:function(e,t,a){(t=e.exports=a(74)(!1)).push([e.i,".index__flavor-label--GI_En {\n display: inline-block;\n min-width: 50px;\n margin-right: 16px;\n}\n.index__flavor-tab--2Mc6u {\n margin-bottom: 16px;\n}\n",""]),t.locals={"flavor-label":"index__flavor-label--GI_En","flavor-tab":"index__flavor-tab--2Mc6u"}},3537:function(e,t,a){"use strict";var r=a(19),n=a(21);r(t,"__esModule",{value:!0}),t.default=void 0,a(1268);var i=n(a(1269));a(1252);var l=n(a(1241)),s=n(a(57)),o=n(a(0)),u=(a(173),n(a(16))),d=a(161),c=n(a(3538)),f=e=>{var{title:t,descriptions:a,loading:r}=e,n=(0,s.default)(a).call(a,(e=>("number"==typeof e.content&&(e.content=e.content.toString()),o.default.createElement(l.default.Item,{label:e.label,className:c.default.item,key:"label-".concat((0,d.generateId)())},e.content))));return o.default.createElement(i.default,{loading:r},o.default.createElement(l.default,{colon:!1,title:t},n))},p=u.default.shape({label:u.default.oneOfType([u.default.string,u.default.node]),content:u.default.any});f.propTypes={title:u.default.oneOfType([u.default.string,u.default.node]),descriptions:u.default.arrayOf(p),loading:u.default.bool};var h=f;t.default=h},3538:function(e,t,a){var r=a(3539);"string"==typeof r&&(r=[[e.i,r,""]]);var n={hmr:!0,transform:undefined,insertInto:void 0};a(75)(r,n);r.locals&&(e.exports=r.locals)},3539:function(e,t,a){(t=e.exports=a(74)(!1)).push([e.i,".index__item--3lFuh {\n margin-bottom: 10px;\n background-color: #fff;\n}\n.index__item--3lFuh .ant-descriptions-item-label {\n width: 100px;\n color: #8a8a8a;\n}\n.index__item--3lFuh .ant-descriptions-item-content {\n word-break: break-all;\n}\n",""]),t.locals={item:"index__item--3lFuh"}},3540:function(e,t,a){var r=a(3541);"string"==typeof r&&(r=[[e.i,r,""]]);var n={hmr:!0,transform:undefined,insertInto:void 0};a(75)(r,n);r.locals&&(e.exports=r.locals)},3541:function(e,t,a){(t=e.exports=a(74)(!1)).push([e.i,"/* init */\n/* specific color */\n/* border */\n/* background */\n/* shadow */\n/* font */\n/* 中号字体 */\n/* animation */\n/* size */\n/* sider */\n.index__main--1q8mG {\n position: relative;\n height: 100%;\n overflow: auto;\n}\n.index__sider--3LZqm {\n position: absolute;\n top: 0;\n left: 0;\n width: 354px;\n min-width: 354px;\n}\n@media screen and (max-width: 1280px) {\n .index__sider--3LZqm {\n width: 300px;\n min-width: 300px;\n }\n}\n.index__content--1OSKS {\n padding-left: 374px;\n}\n@media screen and (max-width: 1280px) {\n .index__content--1OSKS {\n padding-left: 320px;\n }\n}\n.index__nav--2zbId {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n height: 48px;\n margin: 0 0 12px;\n padding: 0 14px;\n background-color: #124191;\n border-radius: 4px;\n}\n.index__navItem--uT8lm {\n min-width: 96px;\n height: 32px;\n margin: 0 6px;\n padding: 0 14px;\n color: #fff;\n font-weight: 500;\n line-height: 32px;\n text-align: center;\n border: 1px solid transparent;\n -webkit-transition: all 0.3s;\n transition: all 0.3s;\n}\n.index__navItem--uT8lm:first-child {\n margin: 0 6px 0 0;\n}\n.index__navItem--uT8lm.index__active--oKb1h {\n background-color: #1890ff;\n border-color: #1890ff;\n border-radius: 4px;\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.index__navItem--uT8lm.index__active--oKb1h:hover {\n color: #fff;\n}\n.index__loading--3cfaa {\n padding: 30px 0;\n text-align: center;\n}\n.index__header--2mGuj {\n padding-right: 16px;\n padding-bottom: 30px;\n padding-left: 16px;\n background-color: #fff;\n}\n.index__header--2mGuj .ant-descriptions-title {\n margin-bottom: 0;\n}\n.index__header-title--3X2Ku {\n font-style: italic;\n}\n.index__title-label--3TrNR {\n margin-right: 8px;\n font-style: italic;\n}\n.index__header-button--2VTui {\n float: right;\n}\n.index__header-divider--3b6-4 {\n width: 2px;\n margin: 0 14px 0 24px;\n background-color: rgba(0, 0, 0, 0.45);\n}\n.index__tabs--VwWK2 {\n margin-top: -42px;\n}\n.index__tabs--VwWK2 .ant-tabs-bar {\n padding-right: 16px;\n padding-left: 16px;\n}\n.index__tabs--VwWK2 .ant-tabs-nav-wrap {\n padding-left: 30px;\n}\n.index__tab-wrapper--2DZuY {\n width: 100%;\n}\n.index__tab-wrapper--2DZuY .list-container {\n margin-top: 0;\n}\n.index__action-wrapper--pIcIO {\n position: absolute;\n right: 80px;\n}\n.index__action-wrapper--pIcIO .ant-btn-link {\n padding: 5.6px 15px !important;\n border-color: #0068FF;\n}\n.index__action-wrapper--pIcIO .ant-divider-vertical {\n border-left: none;\n}\n.index__action-wrapper--pIcIO .ant-btn-dangerous {\n color: #c4233e;\n background: transparent;\n border-color: #c4233e;\n}\n.index__action-wrapper--pIcIO .ant-btn-link[disabled],\n.index__action-wrapper--pIcIO .ant-btn-link[disabled]:hover,\n.index__action-wrapper--pIcIO .ant-btn-link[disabled]:focus,\n.index__action-wrapper--pIcIO .ant-btn-link[disabled]:active {\n border-color: rgba(0, 0, 0, 0.25);\n}\n.index__action-wrapper--pIcIO .ant-btn-dangerous.ant-btn-link:active {\n color: #c4233e;\n background: transparent;\n border-color: #c4233e;\n}\n.index__action-wrapper--pIcIO .ant-btn-dangerous:hover,\n.index__action-wrapper--pIcIO .ant-btn-dangerous:focus {\n color: #f76070;\n background: #fff;\n border-color: #f76070;\n}\n",""]),t.locals={main:"index__main--1q8mG",sider:"index__sider--3LZqm",content:"index__content--1OSKS",nav:"index__nav--2zbId",navItem:"index__navItem--uT8lm",active:"index__active--oKb1h",loading:"index__loading--3cfaa",header:"index__header--2mGuj","header-title":"index__header-title--3X2Ku","title-label":"index__title-label--3TrNR","header-button":"index__header-button--2VTui","header-divider":"index__header-divider--3b6-4",tabs:"index__tabs--VwWK2","tab-wrapper":"index__tab-wrapper--2DZuY","action-wrapper":"index__action-wrapper--pIcIO"}},3542:function(e,t,a){"use strict";var r=a(33),n=a(44),i=a(32),l=a(25),s=a(27),o=a(45),u=a(46),d=a(19),c=a(21);d(t,"__esModule",{value:!0}),t.default=t.SnapshotVolumeStore=void 0;var f=c(a(65)),p=c(a(57)),h=c(a(27)),m=c(a(36)),g=c(a(51)),v=c(a(53)),y=a(161),b=a(557);function _(e,t){var a=r(e);if(n){var s=n(e);t&&(s=i(s).call(s,(function(t){return l(e,t).enumerable}))),a.push.apply(a,s)}return a}class S extends v.default{get mapper(){return e=>(0,b.updateVolume)(e)}get groupArraySize(){return 10}requestList(e,t){var a=this;return(0,g.default)((function*(){var{volumeIds:r=[]}=t,n=(0,y.groupArray)(r,a.groupArraySize),i=yield f.default.all((0,p.default)(n).call(n,(t=>{var r=function(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)s(a=_(Object(r),!0)).call(a,(function(t){(0,m.default)(e,t,r[t])}));else if(o)u(e,o(r));else{var n;s(n=_(Object(r))).call(n,(function(t){d(e,t,l(r,t))}))}}return e}({uuid:t},e);return a.skylineClient.extension.volumes(r)}))),c=[];return(0,h.default)(i).call(i,(e=>{c.push(...e.volumes)})),c}))()}}t.SnapshotVolumeStore=S;var x=new S;t.default=x},3546:function(e,t,a){var r=a(3547);"string"==typeof r&&(r=[[e.i,r,""]]);var n={hmr:!0,transform:undefined,insertInto:void 0};a(75)(r,n);r.locals&&(e.exports=r.locals)},3547:function(e,t,a){(t=e.exports=a(74)(!1)).push([e.i,".index__input--1LaXS {\n margin-right: 32px;\n margin-left: 16px;\n}\n",""]),t.locals={input:"index__input--1LaXS"}},3548:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=a.EditAction=void 0;var l=i(r(65)),s=i(r(36)),o=r(406),u=r(1193),d=i(r(410)),c=r(557);class f extends u.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(){return[{name:"name",label:t("Name"),type:"input-name",placeholder:t("Please input name"),required:!0},{name:"description",label:t("Description"),type:"textarea"}]}init(){this.store=d.default}}a.EditAction=f,(0,s.default)(f,"id","edit"),(0,s.default)(f,"title",t("Edit")),(0,s.default)(f,"policy","volume:update"),(0,s.default)(f,"allowed",(e=>l.default.resolve((0,c.isAvailableOrInUse)(e))));var p=(0,o.inject)("rootStore")((0,o.observer)(f));a.default=p},3549:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=void 0;var l=i(r(90)),s=i(r(27));r(411);var o=i(r(227)),u=i(r(1248));r(571);var d=i(r(417)),c=i(r(36)),f=i(r(91)),p=i(r(0)),h=r(1193),m=i(r(410));r(173),r(555);class g extends h.ConfirmAction{constructor(){super(...arguments),(0,c.default)(this,"policy","volume:delete"),(0,c.default)(this,"canDelete",(e=>{var t;return(0,l.default)(t=["available","error","error_extending"]).call(t,e.status)>=0})),(0,c.default)(this,"allowedCheckFunc",(e=>this.canDelete(e))),(0,c.default)(this,"onSubmit",(e=>{var{id:t,isCascadeDeleted:a=!0}=e||this.item;return a?m.default.cascadeDelete({id:t}):m.default.delete({id:t})})),(0,c.default)(this,"initCascadeValue",(e=>{this.onChangeCascade(!0,e)})),(0,c.default)(this,"confirmContext",(e=>{var a=this.getName(e);return this.initCascadeValue(e),p.default.createElement("div",null,p.default.createElement("p",{style:{marginBottom:"16px"}},this.unescape(t("Are you sure to delete volume { name }? ",{name:a}))),p.default.createElement("div",null,this.renderCascadeDeletion(e),this.renderCascadeDeletionTip()))}))}get id(){return"delete"}get title(){return t("Delete Volume")}get name(){return t("Delete Volume")}get isDanger(){return!0}get buttonText(){return t("Delete")}get actionName(){return t("delete volume")}onChangeCascade(e,t){(0,f.default)(t)?(0,s.default)(t).call(t,(t=>{t.isCascadeDeleted=e})):t.isCascadeDeleted=e}renderCascadeDeletion(e){return p.default.createElement(d.default,{defaultChecked:!0,onChange:t=>{this.onChangeCascade(t.target.checked,e)}},t("Cascading deletion"))}get cascadeDeletionTip(){return t("Using cascading deletion, when the volume has snapshots, the associated snapshot will be automatically deleted first, and then the volume will be deleted, thereby improving the success rate of deleting the volume.")}renderCascadeDeletionTip(){return p.default.createElement(o.default,{title:this.cascadeDeletionTip},p.default.createElement(u.default,null))}}a.default=g},3550:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=a.RestoreAction=void 0;var l=i(r(81)),s=i(r(65)),o=i(r(36)),u=r(406),d=r(1193),c=r(410),f=i(r(582)),p=r(557),h=r(569);class m extends d.ModalAction{constructor(){super(...arguments),(0,o.default)(this,"onSubmit",(e=>{var{snapshot:{selectedRowKeys:t=[]}={}}=e,{id:a}=this.item;return this.store.revert(a,{snapshot_id:t[0]})}))}init(){this.store=new c.VolumeStore,this.snapshotStore=f.default}static get modalSize(){return"large"}getModalSize(){return"large"}get defaultValue(){var e,t,{name:a,id:r="-",volume_type:n="-",size:i}=this.item;return{volume:(0,l.default)(e=(0,l.default)(t="".concat(a||r,"(")).call(t,n," | ")).call(e,i,"GiB)")}}get formItems(){var{id:e}=this.item;return[{name:"volume",label:t("Volume"),type:"label",iconType:"volume"},{name:"snapshot",label:t("Select Volume Snapshot"),type:"select-table",backendPageStore:this.snapshotStore,extraParams:{volume_id:e},required:!0,isMulti:!1,isSortByBack:!0,defaultSortKey:"created_at",defaultSortOrder:"descend",filterParams:[{label:t("Name"),name:"name"}],columns:[{title:t("Name"),dataIndex:"name"},{title:t("Size"),dataIndex:"size",unit:"GiB",sorter:!1},{title:t("Status"),dataIndex:"status",valueMap:p.volumeStatus},{title:t("Created At"),dataIndex:"created_at",render:e=>(0,h.getSinceTime)(e)}]}]}get name(){return t("Restore from snapshot")}}a.RestoreAction=m,(0,o.default)(m,"id","Restore from snapshot"),(0,o.default)(m,"title",t("Restore From Snapshot")),(0,o.default)(m,"policy","volume:create"),(0,o.default)(m,"allowed",(e=>s.default.resolve("available"===e.status)));var g=(0,u.inject)("rootStore")((0,u.observer)(m));a.default=g},3551:function(e,a,r){"use strict";var n=r(33),i=r(44),l=r(32),s=r(25),o=r(27),u=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=a.Attach=void 0;var p=f(r(102)),h=f(r(65)),m=f(r(57)),g=f(r(81)),v=f(r(36)),y=r(406),b=r(1193),_=r(408),S=f(r(410)),x=r(1195),w=r(557);function I(e,t){var a=n(e);if(i){var r=i(e);t&&(r=l(r).call(r,(function(t){return s(e,t).enumerable}))),a.push.apply(a,r)}return a}function C(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)o(a=I(Object(r),!0)).call(a,(function(t){(0,v.default)(e,t,r[t])}));else if(u)d(e,u(r));else{var n;o(n=I(Object(r))).call(n,(function(t){c(e,t,s(r,t))}))}}return e}class k extends b.ModalAction{constructor(){super(...arguments),(0,v.default)(this,"disabledInstance",(e=>!(0,x.allowAttachVolumeInstance)(e))),(0,v.default)(this,"alreadyAttached",(e=>{var{attachments:t=[]}=this.item;return!!(0,p.default)(t).call(t,(t=>t.server_id===e.id))})),(0,v.default)(this,"onSubmit",(e=>{var{instance:t}=e,{id:a}=this.item,{selectedRowKeys:r}=t;return h.default.all((0,m.default)(r).call(r,(e=>this.vmStore.attachVolume({id:e,body:{volumeAttachment:{volumeId:a}}}))))}))}init(){this.store=S.default,this.vmStore=new _.ServerStore}get name(){return t("Attach")}get isAsyncAction(){return!0}static get modalSize(){return"large"}getModalSize(){return"large"}get defaultValue(){var e,t,{name:a,id:r,size:n,volume_type:i}=this.item;return{volume:(0,g.default)(e=(0,g.default)(t="".concat(a||r,"(")).call(t,i," | ")).call(e,n,"GiB)")}}get formItems(){return[{name:"volume",label:t("Volume"),type:"label",iconType:"volume"},C({name:"instance",label:t("Instance"),type:"select-table",required:!0,backendPageStore:this.vmStore,disabledFunc:this.disabledInstance,extraParams:{noReminder:!0},isMulti:!1},x.instanceSelectTablePropsBackend)]}}a.Attach=k,(0,v.default)(k,"id","attach"),(0,v.default)(k,"title",t("Attach")),(0,v.default)(k,"policy","os_compute_api:os-volumes-attachments:create"),(0,v.default)(k,"allowed",(e=>h.default.resolve((0,w.isAvailable)(e)||(0,w.isMultiAttach)(e))));var D=(0,y.inject)("rootStore")((0,y.observer)(k));a.default=D},3552:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=a.Detach=void 0;var l=i(r(65)),s=i(r(57)),o=i(r(81)),u=i(r(1400)),d=i(r(36)),c=r(406),f=r(1193),p=i(r(408)),h=r(1397),m=r(557),g=r(1195);class v extends f.ModalAction{constructor(){super(...arguments),(0,d.default)(this,"disabledInstance",(e=>!(0,g.allowAttachVolumeInstance)(e))),(0,d.default)(this,"onSubmit",(e=>{var{instance:t}=e,{id:a}=this.item,{selectedRowKeys:r}=t;return l.default.all((0,s.default)(r).call(r,(e=>this.store.detachVolume({id:e,volumes:[a]}))))}))}get name(){return t("Detach")}init(){this.store=p.default,this.instanceStore=new h.ServerGroupInstanceStore,this.getInstances()}static get modalSize(){return"large"}getModalSize(){return"large"}get instances(){return this.instanceStore.list.data||[]}getInstances(){var e,t=(0,s.default)(e=this.item.attachments||[]).call(e,(e=>e.server_id));this.instanceStore.fetchList({members:t})}get defaultValue(){var e,t,{name:a,size:r,volume_type:n}=this.item;return{volume:(0,o.default)(e=(0,o.default)(t="".concat(a,"(")).call(t,n," | ")).call(e,r,"GiB)")}}get formItems(){return[{name:"volume",label:t("Volume"),type:"label",iconType:"volume"},{name:"instance",label:t("Instance"),type:"select-table",required:!0,data:this.instances,isMulti:!0,filterParams:[{label:t("Name"),name:"name"}],columns:g.instanceColumnsBackend,isLoading:this.instanceStore.list.isLoading,disabledFunc:this.disabledInstance}]}}a.Detach=v,(0,d.default)(v,"id","detach"),(0,d.default)(v,"title",t("Detach")),(0,d.default)(v,"isDanger",!0),(0,d.default)(v,"policy","os_compute_api:os-volumes-attachments:delete"),(0,d.default)(v,"allowed",(e=>l.default.resolve((0,m.isInUse)(e)&&!(0,m.isOsDisk)(e)&&(0,u.default)(e.attachments)&&e.attachments.length)));var y=(0,c.inject)("rootStore")((0,c.observer)(v));a.default=y},3553:function(e,a,r){"use strict";var n=r(33),i=r(44),l=r(32),s=r(25),o=r(27),u=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=a.CreateSnapshot=void 0;var p=f(r(81)),h=f(r(65)),m=f(r(51)),g=f(r(36)),v=r(406),y=r(1193),b=f(r(582)),_=r(557),S=f(r(407));function x(e,t){var a=n(e);if(i){var r=i(e);t&&(r=l(r).call(r,(function(t){return s(e,t).enumerable}))),a.push.apply(a,r)}return a}function w(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)o(a=x(Object(r),!0)).call(a,(function(t){(0,g.default)(e,t,r[t])}));else if(u)d(e,u(r));else{var n;o(n=x(Object(r))).call(n,(function(t){c(e,t,s(r,t))}))}}return e}var I=e=>{var{snapshots:t={}}=e,{currentVolumeType:a}=b.default;return{snapshotQuota:t,typeQuota:e["snapshots_".concat(a)]||{}}},C=e=>{var{snapshotQuota:t,typeQuota:a}=I(e),{left:r=0}=t||{},{left:n=0}=a||{};return 0!==r&&0!==n?1:0};class k extends y.ModalAction{constructor(){super(...arguments),(0,g.default)(this,"onSubmit",(e=>{var{id:t,status:a}=this.item,{name:r}=e,n={name:r,volume_id:t,force:"in-use"===a};return this.store.create(n)}))}init(){b.default.setCurrentVolumeType(this.item),this.state.quota={},this.state.quotaLoading=!0,this.store=b.default,this.projectStore=S.default,this.getQuota()}get name(){return t("create volume snapshot")}get defaultValue(){var e,t,{name:a,id:r,volume_type:n,size:i}=this.item;return{volume:(0,p.default)(e=(0,p.default)(t="".concat(a||r,"(")).call(t,n," | ")).call(e,i,"GiB)")}}static get disableSubmit(){var{cinderQuota:e={}}=S.default;return 0===C(e)}static get showQuota(){return!0}get showQuota(){return!0}getQuota(){var e=this;return(0,m.default)((function*(){e.setState({quotaLoading:!0});var t=yield e.projectStore.fetchProjectCinderQuota();e.setState({quota:t,quotaLoading:!1})}))()}get quotaInfo(){var{quota:e={},quotaLoading:a}=this.state;if(a)return[];var{snapshotQuota:r={},typeQuota:n={}}=I(e),i=C(e),l=w(w({},r),{},{add:i,name:"snapshot",title:t("Volume Snapshot")}),{volume_type:s}=this.item;return[l,w(w({},n),{},{add:i,name:"type",title:t("{name} type snapshots",{name:s}),type:"line"})]}get formItems(){return[{name:"volume",label:t("Volume"),type:"label",iconType:"volume"},{name:"name",label:t("Volume Snapshot Name"),type:"input-name",placeholder:t("Please input snapshot name"),required:!0}]}}a.CreateSnapshot=k,(0,g.default)(k,"id","create-snapshot"),(0,g.default)(k,"title",t("Create Volume Snapshot")),(0,g.default)(k,"buttonText",t("Create Snapshot")),(0,g.default)(k,"policy","volume:create_snapshot"),(0,g.default)(k,"allowed",(e=>h.default.resolve((0,_.isAvailableOrInUse)(e))));var D=(0,v.inject)("rootStore")((0,v.observer)(k));a.default=D},3554:function(e,a,r){"use strict";var n=r(160),i=r(19),l=r(25),s=r(21);i(a,"__esModule",{value:!0}),a.default=a.ExtendVolume=void 0;var o=s(r(65)),u=s(r(81)),d=s(r(62)),c=s(r(51)),f=s(r(36)),p=s(r(199)),h=r(406),m=r(1193),g=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var a=b(t);if(a&&a.has(e))return a.get(e);var r={},n=i&&l;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var o=n?l(e,s):null;o&&(o.get||o.set)?i(r,s,o):r[s]=e[s]}r.default=e,a&&a.set(e,r);return r}(r(410)),v=s(r(407)),y=r(557);function b(e){if("function"!=typeof n)return null;var t=new n,a=new n;return(b=function(e){return e?a:t})(e)}class _ extends m.ModalAction{constructor(){var e;super(...arguments),e=this,(0,f.default)(this,"onSizeChange",(e=>{var t=e-this.itemSize;(0,y.setCreateVolumeSize)(t)})),(0,f.default)(this,"checkInstance",(()=>{var{lockedError:e}=this.state;return e?o.default.reject(e):o.default.resolve()})),(0,f.default)(this,"onSubmit",function(){var t=(0,c.default)((function*(t){var{new_size:a}=t,{id:r}=e.item;return e.store.extendSize(r,{new_size:a})}));return function(e){return t.apply(this,arguments)}}())}get name(){return t("Extend volume")}init(){this.store=g.default,this.state.showNotice=!0,this.volumeStore=new g.VolumeStore,this.projectStore=v.default,(0,y.fetchQuota)(this,1,this.item.volume_type)}get tips(){return t("After the volume is expanded, the volume cannot be reduced.")}static get disableSubmit(){return(0,y.checkQuotaDisable)(!1)}static get showQuota(){return!0}get showQuota(){return!0}get quotaInfo(){var{quota:e={},quotaLoading:t}=this.state;if(t||(0,p.default)(e))return[];var[a,r,n,i]=(0,y.getQuotaInfo)(this,!1),{type:l}=r;return[(0,d.default)(r,["type"]),i]}get isQuotaLimited(){var{gigabytes:{limit:e}={}}=this.projectStore.cinderQuota||{};return-1!==e}get leftSize(){var{gigabytes:{left:e=0}={}}=this.projectStore.cinderQuota||{};return e}get itemSize(){var{size:e}=this.item;return e}get minSize(){return this.itemSize+1}get maxSize(){var{size:e}=this.item;return e+this.leftSize}get defaultValue(){var e,t,{name:a,id:r,volume_type:n,size:i}=this.item;return{volume:(0,u.default)(e=(0,u.default)(t="".concat(a||r,"(")).call(t,n," | ")).call(e,i,"GiB)"),new_size:this.minSize}}get formItems(){var e;return[{name:"volume",label:t("Volume"),type:"label",iconType:"volume"},{name:"new_size",label:t("Capacity (GiB)"),type:"slider-input",max:this.maxSize,min:this.minSize,description:(0,u.default)(e="".concat(this.minSize,"GiB-")).call(e,this.maxSize,"GiB"),required:!0,display:this.isQuotaLimited,onChange:this.onSizeChange,validator:this.checkInstance},{name:"new_size",label:t("Capacity (GiB)"),type:"input-int",min:this.minSize,required:!0,display:!this.isQuotaLimited,onChange:this.onSizeChange,validator:this.checkInstance}]}}a.ExtendVolume=_,(0,f.default)(_,"id","extend-snapshot"),(0,f.default)(_,"title",t("Extend Volume")),(0,f.default)(_,"policy","volume:extend"),(0,f.default)(_,"allowed",(e=>o.default.resolve((0,y.isAvailableOrInUse)(e))));var S=(0,h.inject)("rootStore")((0,h.observer)(_));a.default=S},3555:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=a.ChangeType=void 0;var l=i(r(57)),s=i(r(32)),o=i(r(81)),u=i(r(65)),d=i(r(36)),c=r(406),f=r(1193),p=i(r(410)),h=i(r(566)),m=r(557);class g extends f.ModalAction{constructor(){super(...arguments),(0,d.default)(this,"onSubmit",(e=>{var{id:t}=this.item,{new_type:a}=e,r={new_type:a,migration_policy:"on-demand"};return this.store.retype(t,r)}))}get name(){return t("Change type")}get tips(){return t("If the capacity of the disk is large,the type modify operation may takes several hours. Please be cautious.")}init(){this.store=p.default,this.volumeTypeStore=h.default,this.getVolumeTypes()}getVolumeTypes(){this.volumeTypeStore.fetchList()}get isAsyncAction(){return!0}get volumeTypes(){var e,{volume_type:t}=this.item,{data:a=[]}=this.volumeTypeStore.list;return(0,l.default)(e=(0,s.default)(a).call(a,(e=>e.name!==t))).call(e,(e=>({label:e.name,value:e.id})))}get defaultValue(){var e,t,{name:a,id:r,volume_type:n,size:i}=this.item;return{volume:(0,o.default)(e=(0,o.default)(t="".concat(a||r,"(")).call(t,n," | ")).call(e,i,"GiB)"),volume_type:(this.volumeTypes[0]||{}).value}}get formItems(){return[{name:"volume",label:t("Volume"),type:"label",iconType:"volume"},{name:"new_type",label:t("Volume Type"),type:"select",required:!0,options:this.volumeTypes}]}}a.ChangeType=g,(0,d.default)(g,"id","change-type"),(0,d.default)(g,"title",t("Change Type")),(0,d.default)(g,"policy","volume:retype"),(0,d.default)(g,"allowed",(e=>u.default.resolve((0,m.isAvailableOrInUse)(e)&&!(0,m.isOsDisk)(e))));var v=(0,c.inject)("rootStore")((0,c.observer)(g));a.default=v},3556:function(e,a,r){"use strict";var n=r(33),i=r(44),l=r(32),s=r(25),o=r(27),u=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=a.CloneVolume=void 0;var p=f(r(102)),h=f(r(81)),m=f(r(65)),g=f(r(51)),v=f(r(62)),y=f(r(36)),b=r(406),_=r(1193),S=f(r(410)),x=r(557);function w(e,t){var a=n(e);if(i){var r=i(e);t&&(r=l(r).call(r,(function(t){return s(e,t).enumerable}))),a.push.apply(a,r)}return a}function I(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)o(a=w(Object(r),!0)).call(a,(function(t){(0,y.default)(e,t,r[t])}));else if(u)d(e,u(r));else{var n;o(n=w(Object(r))).call(n,(function(t){c(e,t,s(r,t))}))}}return e}class C extends _.ModalAction{constructor(){super(...arguments),(0,y.default)(this,"onSubmit",(e=>{var{volume:t,more:a}=e,r=I(I({},(0,v.default)(e,["volume","more"])),{},{source_volid:this.item.id});return this.store.create(r)}))}get name(){return t("Clone volume")}get tips(){return t("It is recommended that you perform this cloning operation on a disk without any reading/writing")}init(){this.store=S.default,this.getVolumeTypes(),(0,x.fetchQuota)(this,this.item.size)}getVolumeTypes(){var e=this;return(0,g.default)((function*(){var t;yield e.store.fetchVolumeTypes();var a=(0,p.default)(t=e.volumeTypes).call(t,(t=>t.label===e.item.volume_type));e.defaultType=a,a&&(0,x.setCreateVolumeType)(e.item.volume_type),e.updateDefaultValue()}))()}get volumeTypes(){return this.store.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 e,t,{name:a,id:r,volume_type:n,size:i}=this.item;return{volume:(0,h.default)(e=(0,h.default)(t="".concat(a||r,"(")).call(t,n," | ")).call(e,i,"GiB)"),volume_type:(this.defaultType||{}).value,size:i}}get maxSize(){var{quota:{gigabytes:{left:e=0}={}}={}}=this.state;return-1===e?1/0:e}get formItems(){var{size:e}=this.item,{more:a}=this.state;return[{name:"volume",label:t("Volume"),type:"label",iconType:"volume"},{name:"name",label:t("Volume Name"),type:"input-name",required:!0},{name:"size",label:t("Capacity (GiB)"),type:"input-int",min:e,max:this.maxSize,required:!0,onChange:x.onVolumeSizeChange},{name:"more",type:"more",label:t("Advanced Options")},{name:"volume_type",label:t("Volume Type"),type:"select",options:this.volumeTypes,onChange:x.onVolumeTypeChange,allowClear:!1,hidden:!a}]}}a.CloneVolume=C,(0,y.default)(C,"id","clone-volume"),(0,y.default)(C,"title",t("Clone Volume")),(0,y.default)(C,"policy","volume:create"),(0,y.default)(C,"allowed",(e=>m.default.resolve((0,x.isAvailableOrInUse)(e))));var k=(0,b.inject)("rootStore")((0,b.observer)(C));a.default=k},3557:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=a.UpdateStatus=void 0;var l=i(r(81)),s=i(r(65)),o=i(r(36)),u=r(406),d=r(1193),c=i(r(410));class f extends d.ModalAction{constructor(){super(...arguments),(0,o.default)(this,"handleStatusChange",(e=>{this.setState({status:e})})),(0,o.default)(this,"onSubmit",(e=>{var{id:t}=this.item;return delete e.volume,this.store.resetStatus(t,e)}))}get name(){return t("update status")}get defaultValue(){var e,t,{name:a,id:r,volume_type:n,size:i}=this.item;return{volume:(0,l.default)(e=(0,l.default)(t="".concat(a||r,"(")).call(t,n," | ")).call(e,i,"GiB)"),status:"available"}}get tips(){return t('Do not reset the normally mounted volume to the "available"、"maintenance" or "error" status. The reset state does not remove the volume from the instance. If you need to remove the volume from the instance, please go to the console of the corresponding project and use the "detach" operation.')}get formItems(){var{status:e}=this.state,a=[{value:"available",label:t("Available")},{value:"maintenance",label:t("Maintained")},{value:"error",label:t("Error")},{value:"in-use",label:t("In Use")}];return[{name:"volume",label:t("Volume"),type:"label",iconType:"volume"},{name:"status",label:t("Status"),type:"select",required:!0,options:a,onChange:this.handleStatusChange,extra:"in-use"===e?t("The volume status can be reset to in-use only when the previous status is in-use."):""}]}init(){this.store=c.default}}a.UpdateStatus=f,(0,o.default)(f,"id","update-status"),(0,o.default)(f,"title",t("Update Status")),(0,o.default)(f,"policy","volume_extension:volume_admin_actions:reset_status"),(0,o.default)(f,"allowed",(()=>s.default.resolve(!0)));var p=(0,u.inject)("rootStore")((0,u.observer)(f));a.default=p},3558:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=a.Migrate=void 0;var l=i(r(81)),s=i(r(65)),o=i(r(36)),u=r(406),d=r(1193),c=i(r(410)),f=r(557),p=i(r(1547)),h=r(1401);class m extends d.ModalAction{constructor(){super(...arguments),(0,o.default)(this,"disableFunc",(e=>{var{host:t}=this.item;return e.name===t})),(0,o.default)(this,"onSubmit",(e=>{var{pool:t}=e,{item:{id:a}}=this,{selectedRowKeys:r=[]}=t||{};return c.default.migrate(a,{host:r[0]})}))}static get modalSize(){return"large"}getModalSize(){return"large"}get name(){return t("Migrate volume")}init(){this.poolStore=p.default,this.getPools()}get defaultValue(){var e,t,{name:a,id:r,volume_type:n,size:i,host:s}=this.item;return{volume:(0,l.default)(e=(0,l.default)(t="".concat(a||r,"(")).call(t,n," | ")).call(e,i,"GiB)"),host:s}}getPools(){this.poolStore.fetchList()}get pools(){return this.poolStore.list.data||[]}get formItems(){return[{name:"volume",label:t("Volume"),type:"label",iconType:"volume"},{name:"host",label:t("Current Storage Backend"),type:"label",iconType:"instance"},{name:"pool",label:t("Target Storage Backend"),type:"select-table",required:!0,data:this.pools,isLoading:this.poolStore.list.isLoading,disabledFunc:this.disableFunc,rowKey:"name",columns:h.poolColumns}]}}a.Migrate=m,(0,o.default)(m,"id","migrate-volume"),(0,o.default)(m,"title",t("Migrate Volume")),(0,o.default)(m,"policy","volume_extension:volume_admin_actions:migrate_volume"),(0,o.default)(m,"allowed",(e=>s.default.resolve((0,f.isAvailableOrInUse)(e))));var g=(0,u.inject)("rootStore")((0,u.observer)(m));a.default=g},3559:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=a.CreateImage=void 0;var l=i(r(57)),s=i(r(33)),o=i(r(65)),u=i(r(36)),d=r(406),c=r(1193),f=r(563),p=i(r(410)),h=r(557);class m extends c.ModalAction{constructor(){super(...arguments),(0,u.default)(this,"onSubmit",(e=>{var{id:t}=this.item;return this.store.uploadImage(t,e)}))}get name(){return t("Create Image")}get defaultValue(){return{disk_format:"raw"}}get osList(){var e;return(0,l.default)(e=(0,s.default)(f.imageOS)).call(e,(e=>({value:e,label:f.imageOS[e]})))}get formatList(){var e;return(0,l.default)(e=(0,s.default)(f.volumeCreateImageTypes)).call(e,(e=>({label:f.volumeCreateImageTypes[e],value:e})))}get formItems(){return[{name:"image_name",label:t("Image Name"),type:"input-name",placeholder:t("Please input name"),isImage:!0,required:!0},{name:"disk_format",label:t("Format"),type:"select",options:this.formatList,required:!0}]}init(){this.store=p.default}}a.CreateImage=m,(0,u.default)(m,"id","create-image"),(0,u.default)(m,"title",t("Create Image")),(0,u.default)(m,"policy","volume_extension:volume_actions:upload_image"),(0,u.default)(m,"allowed",(e=>o.default.resolve((0,h.isAvailable)(e))));var g=(0,d.inject)("rootStore")((0,d.observer)(m));a.default=g},3560:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=a.AcceptVolumeTransfer=void 0;var l=i(r(65)),s=i(r(36)),o=r(406),u=r(1193),d=i(r(410));class c extends u.ModalAction{constructor(){super(...arguments),(0,s.default)(this,"onSubmit",(e=>{var{transfer_id:t,auth_key:a}=e;return d.default.acceptVolumeTransfer(t,{auth_key:a})}))}get name(){return t("Accept Volume Transfer")}get defaultValue(){return{}}get messageHasItemName(){return!1}get formItems(){return[{name:"transfer_id",label:t("Transfer ID"),type:"input",placeholder:t("Please input transfer id"),required:!0},{name:"auth_key",label:t("Auth Key"),type:"input",placeholder:t("Please input auth key"),required:!0}]}}a.AcceptVolumeTransfer=c,(0,s.default)(c,"id","accept-volume-transfer"),(0,s.default)(c,"title",t("Accept Volume Transfer")),(0,s.default)(c,"policy",(()=>"volume:accept_transfer")),(0,s.default)(c,"allowed",(()=>l.default.resolve(!0)));var f=(0,o.inject)("rootStore")((0,o.observer)(c));a.default=f},3561:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=a.CreateTransfer=void 0;var l=i(r(81)),s=i(r(65)),o=i(r(36)),u=r(406),d=r(1193),c=i(r(410)),f=r(557);class p extends d.ModalAction{constructor(){super(...arguments),(0,o.default)(this,"downloadTxt",((e,t)=>{var a=document.createElement("a");a.href="data:text/plain;charset=utf-8,".concat(t),a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a)})),(0,o.default)(this,"onSubmit",(e=>{var{name:t}=e,{id:a}=this.item;return this.store.createTransfer({name:t,volume_id:a}).then((e=>{if(e&&e.transfer){var t,a,{id:r,name:n,auth_key:i}=e.transfer;this.downloadTxt("Volume Transfer ".concat(r,".txt"),(0,l.default)(t=(0,l.default)(a="Transfer Name: ".concat(n,"\nTransfer ID: ")).call(a,r,"\nAuth Key: ")).call(t,i))}}))}))}get name(){return t("Create Transfer")}get defaultValue(){return{name:""}}get tips(){return t("Ownership of a volume can be transferred from one project to another. The transfer process of the volume needs to perform the transfer operation in the original owner's project, and complete the \"accept\" operation in the receiver's project.")}get formItems(){return[{name:"name",label:t("Transfer Name"),type:"input-name",required:!0,placeholder:t("Please input name")}]}init(){this.store=c.default}}a.CreateTransfer=p,(0,o.default)(p,"id","create-transfer"),(0,o.default)(p,"title",t("Create Transfer")),(0,o.default)(p,"policy","volume:create_transfer"),(0,o.default)(p,"allowed",(e=>s.default.resolve((0,f.isAvailable)(e)&&!e.encrypted)));var h=(0,u.inject)("rootStore")((0,u.observer)(p));a.default=h},3562:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=void 0;var l=i(r(65)),s=i(r(36)),o=r(1193),u=i(r(410));class d extends o.ConfirmAction{constructor(){super(...arguments),(0,s.default)(this,"policy","volume:delete_transfer"),(0,s.default)(this,"allowedCheckFunc",(e=>l.default.resolve("awaiting-transfer"===e.status))),(0,s.default)(this,"confirmContext",(e=>{var{name:a}=e;return t("Are you sure to cancel transfer volume { name }? ",{name:a})})),(0,s.default)(this,"onSubmit",(e=>{var{id:t}=e;return u.default.cancelTransfer({id:t})}))}get id(){return"cancel-transfer"}get title(){return t("Cancel Transfer")}get name(){return t("Cancel Transfer")}get buttonText(){return t("Cancel Transfer")}get actionName(){return t("Cancel Transfer")}}a.default=d},3563:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=a.StepCreate=void 0;var l=i(r(65)),s=i(r(36)),o=r(406),u=i(r(1253)),d=r(557);class c extends u.default{static path(e){return"/compute/instance/create?volume=".concat(e.id)}static allowed(e){return l.default.resolve((0,d.canCreateInstance)(e))}}a.StepCreate=c,(0,s.default)(c,"id","instance-create"),(0,s.default)(c,"title",t("Create Instance")),(0,s.default)(c,"policy","os_compute_api:servers:create:attach_volume");var f=(0,o.inject)("rootStore")((0,o.observer)(c));a.default=f},3564:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=a.Bootable=void 0;var l=i(r(65)),s=i(r(1204)),o=i(r(36)),u=r(406),d=r(1193),c=i(r(410));class f extends d.ModalAction{constructor(){super(...arguments),(0,o.default)(this,"onSubmit",(e=>{var{bootable:t}=e,{id:a}=this.item;return c.default.changeBootable(a,{bootable:t})}))}static allowed(){return l.default.resolve(!0)}get name(){var{bootable:e}=(0,s.default)(this);return e?t("Bootable"):t("Unbootable")}get defaultValue(){var{item:e}=this.props;return{bootable:"true"===e.bootable}}get formItems(){return[{name:"bootable",label:t("Bootable"),checkedText:t("Bootable"),uncheckedText:t("Unbootable"),type:"switch",required:!0}]}}a.Bootable=f,(0,o.default)(f,"id","volume-bootable"),(0,o.default)(f,"title",t("Bootable")),(0,o.default)(f,"buttonText",t("Bootable")),(0,o.default)(f,"policy","volume:update");var p=(0,u.inject)("rootStore")((0,u.observer)(f));a.default=p},3565:function(e,a,r){"use strict";var n=r(33),i=r(44),l=r(32),s=r(25),o=r(27),u=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=a.Allocate=void 0;var p=f(r(57)),h=f(r(65)),m=f(r(62)),g=f(r(51)),v=f(r(36)),y=f(r(0)),b=r(406),_=r(1193),S=r(336),x=r(228),w=f(r(407)),I=f(r(414)),C=r(415),k=r(1303),D=r(76);function P(e,t){var a=n(e);if(i){var r=i(e);t&&(r=l(r).call(r,(function(t){return s(e,t).enumerable}))),a.push.apply(a,r)}return a}function T(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)o(a=P(Object(r),!0)).call(a,(function(t){(0,v.default)(e,t,r[t])}));else if(u)d(e,u(r));else{var n;o(n=P(Object(r))).call(n,(function(t){c(e,t,s(r,t))}))}}return e}class A extends _.ModalAction{constructor(){var e;super(...arguments),e=this,(0,v.default)(this,"handleNetworkChange",function(){var t=(0,g.default)((function*(t){var a=yield I.default.fetchList({network_id:t});e.setState({subnets:(0,p.default)(a).call(a,(e=>({allocation_pools:e.allocation_pools,ip_version:e.ip_version,value:e.id,label:e.name}))),selectedNetwork:t}),e.formRef.current.setFieldsValue({subnet_id:null})}));return function(e){return t.apply(this,arguments)}}()),(0,v.default)(this,"handleSubnetChange",(e=>{this.setState({selectedSubnet:e})})),(0,v.default)(this,"onSubmit",(e=>{var{subnet_id:t,batch_allocate:a,count:r,qos_policy_id:n}=e,i=(0,m.default)(e,["subnet_id","batch_allocate","count","qos_policy_id"]);if(t&&(i.subnet_id=t.value),n&&n.selectedRowKeys.length>0&&(i.qos_policy_id=n.selectedRowKeys[0]),a){i.floating_ip_address=null;for(var l=[],s=0;s<r;s++)l.push(this.store.create(i));return h.default.all(l)}return this.store.create(i)})),(0,v.default)(this,"onCountChange",(e=>{this.setState({count:e})})),(0,v.default)(this,"onProjectChange",(e=>{this.setState({projectId:e},(()=>{this.getQuota()}))}))}get name(){return t("Allocate IP")}static get modalSize(){return(0,D.qosEndpoint)()?"large":"small"}getModalSize(){return(0,D.qosEndpoint)()?"large":"small"}get qosEndpoint(){return(0,D.qosEndpoint)()}init(){this.store=new S.FloatingIpStore,this.networkStore=new x.NetworkStore,this.qosPolicyStore=new C.QoSPolicyStore,this.projectStore=w.default,this.state=T(T({},this.state||{}),{},{selectedNetwork:null,selectedSubnet:null,networks:[],subnets:[],qosPolicy:null,count:2,quota:{},quotaLoading:!0,projectId:this.currentProjectId,maxCount:2}),this.getExternalNetworks(),this.isAdminPage&&w.default.fetchList(),this.getQuota()}getExternalNetworks(){var e=this;return(0,g.default)((function*(){var t=yield e.networkStore.pureFetchList({"router:external":!0});e.setState({networks:t})}))()}get messageHasItemName(){return!1}static get disableSubmit(){var{neutronQuota:{floatingip:{left:e=0}={}}}=w.default;return 0===e}static get showQuota(){return!0}get showQuota(){return!0}getQuota(){var e=this;return(0,g.default)((function*(){var{projectId:t,count:a}=e.state;e.setState({quotaLoading:!0});var r=yield e.projectStore.fetchProjectNeutronQuota(t),{floatingip:n={}}=r||{},{left:i=0}=n;e.setState({quota:n,quotaLoading:!1,maxCount:i});var l=a;i<a?l=i:i>0&&0===a&&(l=1),l!==a&&(e.updateFormValue("count",l),e.setState({count:l}))}))()}get quotaInfo(){var{quota:e={},quotaLoading:a,batchAllocate:r=!1,count:n}=this.state;if(a)return[];var{left:i=0}=e,l=0;return 0!==i&&(l=r?n:1),[T(T({},e),{},{add:l,name:"floatingip",title:t("Floating IP")})]}get defaultValue(){return{project_id:this.currentProjectId,count:2}}get formItems(){var e,a,{networks:r,selectedNetwork:n,subnets:i,selectedSubnet:l,batchAllocate:s=!1,maxCount:o}=this.state,u=(0,p.default)(r).call(r,(e=>({label:e.name,value:e.id}))),d=(0,p.default)(e=w.default.list.data).call(e,(e=>({label:e.name,value:e.id})));return[{name:"floating_network_id",label:t("Network"),type:"select",options:u,onChange:this.handleNetworkChange,required:!0},{name:"project_id",label:t("Project"),type:"select",showSearch:!0,hidden:!this.isAdminPage,required:this.isAdminPage,options:d,onChange:this.onProjectChange},{name:"subnet_id",label:t("Owned Subnet"),type:"select",options:i,isWrappedValue:!0,onChange:e=>this.handleSubnetChange(e),extra:l&&y.default.createElement(y.default.Fragment,null,y.default.createElement("span",null,t("Allocation Pools")),(0,p.default)(a=l.allocation_pools).call(a,((e,t)=>y.default.createElement("div",{key:"pool.start.".concat(t)},e.start,"--",e.end)))),hidden:!n,required:!1},{name:"batch_allocate",label:t("Batch Allocate"),type:"check",onChange:e=>{this.setState({batchAllocate:e})}},{name:"count",label:t("Count"),type:"input-int",min:1,max:o,hidden:!s,required:!0,onChange:this.onCountChange},{name:"floating_ip_address",label:t("Floating IP Address"),hidden:!l||s,type:"ip-input",version:l&&(l.ip_version||4)},{name:"description",label:t("Description"),type:"textarea"},{name:"qos_policy_id",label:t("QoS Policy"),type:"tab-select-table",tabs:k.getQoSPolicyTabs.call(this),isMulti:!1,tip:t("Choosing a QoS policy can limit bandwidth and DSCP"),onChange:this.onQosChange,display:!!this.qosEndpoint}]}}a.Allocate=A,(0,v.default)(A,"id","allocate"),(0,v.default)(A,"title",t("Allocate IP")),(0,v.default)(A,"policy","create_floatingip"),(0,v.default)(A,"allowed",(()=>h.default.resolve(!0)));var M=(0,b.inject)("rootStore")((0,b.observer)(A));a.default=M},3566:function(e,a,r){"use strict";var n=r(33),i=r(44),l=r(32),s=r(25),o=r(27),u=r(45),d=r(46),c=r(19),f=r(160),p=r(21);c(a,"__esModule",{value:!0}),a.default=a.Associate=void 0;var h=p(r(65)),m=p(r(1204)),g=p(r(57)),v=p(r(51)),y=p(r(36)),b=p(r(1259)),_=p(r(559)),S=p(r(0)),x=r(406),w=r(1193),I=E(r(408)),C=E(r(568)),k=p(r(584)),D=r(1219),P=p(r(336)),T=r(575),A=r(1195),M=r(1210),R=r(1224);function N(e){if("function"!=typeof f)return null;var t=new f,a=new f;return(N=function(e){return e?a:t})(e)}function E(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var a=N(t);if(a&&a.has(e))return a.get(e);var r={},n=c&&s;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=n?s(e,i):null;l&&(l.get||l.set)?c(r,i,l):r[i]=e[i]}return r.default=e,a&&a.set(e,r),r}function j(e,t){var a=n(e);if(i){var r=i(e);t&&(r=l(r).call(r,(function(t){return s(e,t).enumerable}))),a.push.apply(a,r)}return a}function F(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)o(a=j(Object(r),!0)).call(a,(function(t){(0,y.default)(e,t,r[t])}));else if(u)d(e,u(r));else{var n;o(n=j(Object(r))).call(n,(function(t){c(e,t,s(r,t))}))}}return e}class L extends w.ModalAction{constructor(){var e;super(...arguments),e=this,(0,y.default)(this,"routersDisableFunc",(e=>{var{floating_network_id:t}=this.item;return!(e.hasExternalGateway&&e.external_gateway_info&&e.external_gateway_info.network_id===t&&0===e.external_gateway_info.external_fixed_ips.length)})),(0,y.default)(this,"portsDisableFunc",(e=>0===e.fixed_ips.length)),(0,y.default)(this,"onValuesChange",(e=>{if((0,_.default)(e,"resourceType")){var{resourceType:t}=e;this.setState({resourceType:t})}})),(0,y.default)(this,"handleInstanceSelect",function(){var t=(0,v.default)((function*(t){if(e.setState({instanceLoading:!0}),0===t.selectedRows.length)return e.setState({instanceFixedIPs:l,instanceLoading:!1}),h.default.resolve().then((()=>{e.formRef.current.setFieldsValue({port:null})}));var{id:a}=t.selectedRows[0],r=yield I.default.fetchInterfaceList({id:a}),n=yield(0,R.getInterfaceWithReason)(r),{canReachSubnetIdsWithRouterId:i}=e.state,l=(0,M.getPortsAndReasons)(n,i,!0);return e.setState({instanceFixedIPs:l,instanceLoading:!1}),h.default.resolve().then((()=>{e.formRef.current.setFieldsValue({port:null})}))}));return function(e){return t.apply(this,arguments)}}()),(0,y.default)(this,"handlePortSelect",function(){var t=(0,v.default)((function*(t){e.setState({fixedIpLoading:!0});var{canReachSubnetIdsWithRouterId:a}=e.state,r=yield(0,R.getInterfaceWithReason)(t.selectedRows),n=(0,M.getPortsAndReasons)(r,a,!0);return e.setState({portFixedIPs:n,fixedIpLoading:!1}),h.default.resolve().then((()=>{e.formRef.current.setFieldsValue({fixed_ip_address:null})}))}));return function(e){return t.apply(this,arguments)}}()),(0,y.default)(this,"onSubmit",(e=>{var{resourceType:t}=e,{id:a}=this.item,r={};if(r.id=a,"instance"===t){var{port:{selectedRows:n=[]}={}}=e;r.port_id=n[0].port_id,r.fixed_ip_address=n[0].fixed_ip_address}else if("port"===t){var{virtual_adapter:{selectedRows:i=[]}={},fixed_ip_address:{selectedRows:l=[]}={}}=e;r.port_id=i[0].id,r.fixed_ip_address=l[0].fixed_ip_address}else if("router"===t){var{router:s}=e,o=s.selectedRows[0];return C.default.associateFip({id:o.id,fip:this.item,router:o})}return P.default.associateFip(r)}))}get name(){return t("Associate Floating IP")}init(){this.store=new I.ServerStore,this.routersStore=new C.RouterStore,this.portStore=new T.PortStore,D.getCanReachSubnetIdsWithRouterIdInComponent.call(this,(e=>{var{item:t}=this;return e.external_gateway_info&&e.external_gateway_info.network_id===t.floating_network_id})),this.state={instanceFixedIPs:[],portFixedIPs:[],canReachSubnetIdsWithRouterId:[],routerIdWithExternalNetworkInfo:[]},this.getPorts()}get instanceName(){return this.item.floating_ip_address||(0,m.default)(this).name}static get modalSize(){return"large"}getModalSize(){return"large"}get instances(){return this.store.list.data||[]}get resourceTypeMap(){return[{value:"instance",label:t("Instance")},{value:"port",label:t("Virtual Adapter")}]}get defaultValue(){var{floating_ip_address:e}=this.item;return{floatingIp:e,resourceType:"instance"}}get portDeviceOwner(){return[""]}getPorts(){M.getPortsForPortFormItem.call(this,this.portDeviceOwner)}get formItems(){var{resourceType:e="instance",instanceFixedIPs:a,instanceLoading:r}=this.state,n=[{name:"floatingIp",label:t("Floating Ip"),type:"label",iconType:"floatingIp"},{name:"resourceType",label:t("Resource Type"),type:"radio",required:!0,options:this.resourceTypeMap}];switch(e){case"instance":n.push(F({name:"instance",label:t("Instance"),type:"select-table",required:!0,backendPageStore:this.store,extraParams:{noReminder:!0},disabledFunc:e=>0===e.fixed_addresses.length,onChange:this.handleInstanceSelect,isMulti:!1},A.instanceSelectTablePropsBackend),{name:"port",label:t("Instance IP"),type:"select-table",required:!0,data:a,isLoading:r,isMulti:!1,filterParams:[{label:t("Ip Address"),name:"name"}],columns:[{title:t("Ip Address"),dataIndex:"name"},{title:t("Mac Address"),dataIndex:"mac_address"},{title:t("Network"),dataIndex:"network_name"},{title:t("Reason"),dataIndex:"reason"}],disabledFunc:e=>!e.available});break;case"lb":n.push({name:"loadbalance",label:t("Load Balancer"),type:"select-table",required:!0,data:[],isMulti:!1,filterParams:[{label:t("Name"),name:"name"},{label:t("IP"),name:"private_ip"}],columns:[{title:t("Name"),dataIndex:"name"},{title:t("Image"),dataIndex:"image",render:e=>S.default.createElement(k.default,{type:e,title:e})},{title:t("Fixed IP"),dataIndex:"fixed_addresses",render:e=>(0,g.default)(e).call(e,(e=>S.default.createElement("span",{key:e},e,S.default.createElement("br",null))))},{title:t("Floating IP"),dataIndex:"floating_addresses",render:e=>e?(0,g.default)(e).call(e,(e=>S.default.createElement("span",{key:e},e,S.default.createElement("br",null)))):"-"},{title:t("Flavor"),dataIndex:"flavor"},{title:t("Created At"),dataIndex:"created",valueRender:"sinceTime"}]});break;case"router":n.push(F({name:"router",label:t("Router"),type:"select-table",required:!0,backendPageStore:this.routersStore,disabledFunc:this.routersDisableFunc,isMulti:!1},(0,D.getRouterSelectTablePropsBackend)(this)));break;case"port":n.push(...M.getPortFormItem.call(this,!1))}return n}}a.Associate=L,(0,y.default)(L,"id","associate"),(0,y.default)(L,"title",t("Associate")),(0,y.default)(L,"policy","update_floatingip"),(0,y.default)(L,"allowed",(e=>h.default.resolve(!(0,R.disableFIPAssociate)(e)&&(0,b.default)(e.fixed_ip_address)&&"DOWN"===e.status&&(0,b.default)(e.port_details))));var z=(0,x.inject)("rootStore")((0,x.observer)(L));a.default=z},3567:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=void 0;var l=i(r(65)),s=i(r(27)),o=i(r(32)),u=i(r(62));r(571);var d=i(r(417)),c=i(r(36)),f=i(r(1259)),p=i(r(91)),h=i(r(0)),m=r(1193),g=i(r(336));r(173);class v extends m.ConfirmAction{constructor(){super(...arguments),(0,c.default)(this,"policy","delete_floatingip"),(0,c.default)(this,"getItemName",(e=>e.floating_ip_address)),(0,c.default)(this,"confirmContext",(e=>{var a=null;if(this.needForceRelease(e)&&(a=h.default.createElement("div",null,h.default.createElement(d.default,{style:{marginTop:"14px"},onChange:t=>{this.onChangeType(t.target.checked,e)}},t("Force release")))),!this.messageHasItemName)return h.default.createElement("div",null,h.default.createElement("p",null," ",t("Are you sure to {action}?",{action:this.actionNameDisplay||this.title})),a);var r=this.getName(e);return h.default.createElement("div",null,h.default.createElement("p",null," ",this.unescape(t("Are you sure to {action} (instance: {name})?",{action:this.actionNameDisplay||this.title,name:r}))),a)})),(0,c.default)(this,"onSubmit",(e=>{var{forceRelease:a}=e,r=(0,u.default)(e,["forceRelease"]);if(this.hasCheckBox&&!a){var n=t("Floating ip has already been associate, Please check Force release");return l.default.reject(n)}return g.default.delete(r)}))}get id(){return"delete"}get title(){return t("Release")}get isDanger(){return!0}get buttonText(){return t("Release")}get actionName(){return t("Release")}onChangeType(e,t){(0,p.default)(t)?(0,s.default)(t).call(t,(t=>{t.forceRelease=e})):t.forceRelease=e}needForceRelease(e){var t=!1;(0,p.default)(e)?((0,s.default)(e).call(e,(e=>{e.forceRelease=!1})),(0,o.default)(e).call(e,(e=>!((0,f.default)(e.fixed_ip_address)&&"DOWN"===e.status&&(0,f.default)(e.port_details))))[0]&&(t=!0)):(e.forceRelease=!1,t=!((0,f.default)(e.fixed_ip_address)&&"DOWN"===e.status&&(0,f.default)(e.port_details)));return this.hasCheckBox=t,t}}a.default=v},3568:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=void 0;var l=i(r(36)),s=i(r(1259)),o=r(1193),u=i(r(336));class d extends o.ConfirmAction{constructor(){super(...arguments),(0,l.default)(this,"policy","update_floatingip"),(0,l.default)(this,"allowedCheckFunc",(e=>!(0,s.default)(e.fixed_ip_address)&&"DOWN"!==e.status)),(0,l.default)(this,"getItemName",(e=>e.floating_ip_address)),(0,l.default)(this,"onSubmit",(e=>u.default.disassociateFip(e)))}get id(){return"disassociate"}get title(){return t("Disassociate")}get buttonText(){return t("Disassociate")}get actionName(){return t("Disassociate")}}a.default=d},3569:function(e,a,r){"use strict";var n=r(33),i=r(44),l=r(32),s=r(25),o=r(27),u=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=a.Edit=void 0;var p=f(r(65)),h=f(r(36)),m=r(406),g=r(1193),v=f(r(336)),y=r(1303),b=r(415),_=r(76);function S(e,t){var a=n(e);if(i){var r=i(e);t&&(r=l(r).call(r,(function(t){return s(e,t).enumerable}))),a.push.apply(a,r)}return a}class x extends g.ModalAction{constructor(){super(...arguments),(0,h.default)(this,"onSubmit",(e=>{var{description:t,qos_policy_id:a}=e;return v.default.edit({id:this.item.id},{description:t,qos_policy_id:a.selectedRowKeys.length?a.selectedRowKeys[0]:null})}))}static get modalSize(){return(0,_.qosEndpoint)()?"large":"small"}getModalSize(){return(0,_.qosEndpoint)()?"large":"small"}get qosEndpoint(){return(0,_.qosEndpoint)()}init(){this.qosPolicyStore=new b.QoSPolicyStore}get defaultValue(){var{item:e}=this.props;return function(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)o(a=S(Object(r),!0)).call(a,(function(t){(0,h.default)(e,t,r[t])}));else if(u)d(e,u(r));else{var n;o(n=S(Object(r))).call(n,(function(t){c(e,t,s(r,t))}))}}return e}({description:this.item.description},this.qosEndpoint?{qos_policy_id:{selectedRowKeys:e.qos_policy_id?[e.qos_policy_id]:[],selectedRows:e.qos_policy_id?[{id:e.qos_policy_id,name:e.qos_policy_id}]:[]}}:{})}get instanceName(){return this.item.floating_ip_address}get formItems(){return[{name:"description",label:t("Description"),type:"textarea"},{name:"qos_policy_id",label:t("QoS Policy"),type:"tab-select-table",tabs:y.getQoSPolicyTabs.call(this),isMulti:!1,tip:t("Choosing a QoS policy can limit bandwidth and DSCP"),display:!!this.qosEndpoint}]}}a.Edit=x,(0,h.default)(x,"id","edit-floating-ip"),(0,h.default)(x,"policy","update_floatingip"),(0,h.default)(x,"allowed",(()=>p.default.resolve(!0)));var w=(0,m.inject)("rootStore")((0,m.observer)(x));a.default=w},3570:function(e,a,r){"use strict";var n=r(33),i=r(44),l=r(32),s=r(25),o=r(27),u=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=a.CreateAction=void 0;var p=f(r(57)),h=f(r(65));r(333);var m=f(r(332)),g=f(r(1323)),v=f(r(62)),y=f(r(51)),b=f(r(36)),_=f(r(0)),S=r(406),x=r(1193),w=(r(555),r(173),r(228)),I=r(416),C=r(415),k=f(r(561)),D=f(r(407)),P=r(414),T=r(1303),A=r(76);function M(e,t){var a=n(e);if(i){var r=i(e);t&&(r=l(r).call(r,(function(t){return s(e,t).enumerable}))),a.push.apply(a,r)}return a}function R(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)o(a=M(Object(r),!0)).call(a,(function(t){(0,b.default)(e,t,r[t])}));else if(u)d(e,u(r));else{var n;o(n=M(Object(r))).call(n,(function(t){c(e,t,s(r,t))}))}}return e}class N extends x.ModalAction{constructor(){var e;super(...arguments),e=this,(0,b.default)(this,"fetchSubnetDetails",function(){var t=(0,y.default)((function*(t){var a=yield e.subnetStore.fetchList({network_id:t});e.setState({subnetDetails:a||[]})}));return function(e){return t.apply(this,arguments)}}()),(0,b.default)(this,"handleOwnedNetworkChange",(e=>{var t=e.selectedRowKeys[0];this.setState({network_id:t}),this.formRef.current.setFieldsValue({fixed_ips:void 0}),this.getSubnets(t)})),(0,b.default)(this,"onSubmit",(e=>{var{mac_address:{type:t,mac:a},security_groups:r,enableQosPolicy:n,qos_policy_id:i,more:l,network_id:s,fixed_ips:o,bindingProfile:u}=e,d=(0,v.default)(e,["mac_address","security_groups","enableQosPolicy","qos_policy_id","more","network_id","fixed_ips","bindingProfile"]),c=R(R({},o&&o.length>0?{fixed_ips:(0,p.default)(o).call(o,(e=>{var t={subnet_id:e.subnet};return e.ip_address&&"manual"===e.ip_address.type&&(t.ip_address=e.ip_address.ip),t}))}:{}),{},{network_id:s.selectedRowKeys[0]},d);return t&&"auto"!==t&&(c.mac_address=a),n&&i&&(c.qos_policy_id=0===i.selectedRowKeys.length?null:i.selectedRowKeys[0]),r&&(c.security_groups=r.selectedRowKeys||void 0),c.project_id=this.currentProjectId,u&&(c["binding:profile"]=JSON.parse(u)),k.default.create(c)}))}get qosEndpoint(){return(0,A.qosEndpoint)()}init(){this.state.quota={},this.state.quotaLoading=!0,this.projectStore=D.default,this.networkStore=new w.NetworkStore,this.securityGroupStore=new I.SecurityGroupStore,this.qosPolicyStore=new C.QoSPolicyStore,this.subnetStore=new P.SubnetStore,this.getQuota()}getSubnets(e){var t=this;return(0,y.default)((function*(){yield t.networkStore.fetchDetail({id:e}),yield t.fetchSubnetDetails(e)}))()}get name(){return t("Create Virtual Adapter")}static get modalSize(){return"large"}getModalSize(){return"large"}get tips(){return t("Virtual adapter mainly used for binding instance and other operations, occupying the quota of the port.")}static get disableSubmit(){var{neutronQuota:{port:{used:e=0,limit:t=0}={}}}=D.default;return-1!==t&&e>=t}static get showQuota(){return!0}get showQuota(){return!0}getQuota(){var e=this;return(0,y.default)((function*(){e.setState({quotaLoading:!0});var t=yield e.projectStore.fetchProjectNeutronQuota(),{port:a={}}=t||{};e.setState({quota:a,quotaLoading:!1})}))()}get quotaInfo(){var{quota:e={},quotaLoading:a}=this.state;if(a)return[];var{used:r=0,limit:n=0}=e,i=-1!==n&&r>=n?0:1;return[R(R({},e),{},{add:i,name:"port",title:t("Ports")})]}get defaultValue(){return{more:!1,mac_address:{type:"auto"},qos_policy:"disable",port_security_enabled:!0,enableQosPolicy:!1}}get securityGroups(){var e;return(0,p.default)(e=this.securityGroupStore.list.data||[]).call(e,(e=>R(R({},e),{},{key:e.id})))}get formItems(){var e,{more:a,network_id:r,subnetDetails:n=[],port_security_enabled:i=!0,enableQosPolicy:l=!1}=this.state,s=(0,p.default)(e="normal,macvtap,direct,baremetal,direct-physical,virtio-forwarder,smart-nic".split(",")).call(e,(e=>({label:e,value:e})));return[{name:"name",label:t("Name"),type:"input-name",required:!0,withoutChinese:!0},{name:"description",label:t("Description"),type:"textarea",required:!1},{name:"network_id",label:t("Owned Network"),type:"network-select-table",onChange:this.handleOwnedNetworkChange,required:!0},{name:"fixed_ips",label:t("Owned Subnet"),type:"ip-distributor",subnets:n,hidden:!r},{name:"ipv6",label:"IPv6",type:"label",style:{marginBottom:24},content:_.default.createElement("span",null,t("The selected VPC/ subnet does not have IPv6 enabled.")," ",_.default.createElement(m.default,{type:"link"},t("To open")," ",_.default.createElement(g.default,null))," "),hidden:!0},{name:"mac_address",label:t("Mac Address"),wrapperCol:{span:16},required:!0,type:"mac-address"},{name:"port_security_enabled",label:t("Port Security"),type:"switch",tip:t("Disabling port security will turn off the security group policy protection and anti-spoofing protection on the port. General applicable scenarios: NFV or operation and maintenance Debug."),onChange:e=>{this.setState({port_security_enabled:e})}},{name:"security_groups",label:t("Security Group"),type:"select-table",tips:t("The security group is similar to the firewall function for setting up network access control, or you can go to the console and create a new security group. (Note: The security group you selected will work on all virtual LANS on the instances.)"),data:this.securityGroups,isLoading:this.securityGroupStore.list.isLoading,extraParams:{project_id:this.currentProjectId},backendPageStore:this.securityGroupStore,isMulti:!0,hidden:!i,required:i,filterParams:[{label:t("Name"),name:"name"}],columns:[{title:t("Name"),dataIndex:"name"},{title:t("Description"),dataIndex:"description"},{title:t("Created At"),dataIndex:"created_at",valueRender:"toLocalTime"}]},{name:"binding:vnic_type",label:t("Port Type"),type:"select",options:s,hidden:!a},{name:"enableQosPolicy",label:t("Enable QoS Policy"),type:"switch",onChange:e=>{this.setState({enableQosPolicy:e})},hidden:!a,display:!!this.qosEndpoint},{name:"qos_policy_id",label:t("QoS Policy"),type:"tab-select-table",tabs:T.getQoSPolicyTabs.call(this),isMulti:!1,required:l,tip:t("Choosing a QoS policy can limit bandwidth and DSCP"),hidden:!(a&&l),display:!!this.qosEndpoint},{name:"bindingProfile",label:t("Binding Profile"),type:"aceEditor",hidden:!a,mode:"json",wrapEnabled:!0,tabSize:2,width:"100%",height:"200px",setOptions:{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!0},validator:(e,a)=>{if(void 0!==a&&""!==a)try{return JSON.parse(a),h.default.resolve(!0)}catch(e){return h.default.reject(new Error(t("Illegal JSON scheme")))}return h.default.resolve(!0)}},{name:"more",label:t("Advanced Options"),type:"more"}]}}a.CreateAction=N,(0,b.default)(N,"id","create-virtual-adapter"),(0,b.default)(N,"title",t("Create Virtual Adapter")),(0,b.default)(N,"policy","create_port"),(0,b.default)(N,"allowed",(()=>h.default.resolve(!0)));var E=(0,S.inject)("rootStore")((0,S.observer)(N));a.default=E},3571:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=void 0;var l=i(r(36)),s=r(1193),o=i(r(561));class u extends s.ConfirmAction{constructor(){super(...arguments),(0,l.default)(this,"policy","delete_port"),(0,l.default)(this,"allowedCheckFunc",(e=>!e||this.isOwnerOrAdmin(e))),(0,l.default)(this,"onSubmit",(e=>o.default.delete(e)))}get id(){return"delete"}get title(){return t("Delete Virtual Adapter")}get isDanger(){return!0}get buttonText(){return t("Delete")}get actionName(){return t("delete virtual adapter")}isOwnerOrAdmin(){return!0}}a.default=u},3572:function(e,a,r){"use strict";var n=r(33),i=r(44),l=r(32),s=r(25),o=r(27),u=r(45),d=r(46),c=r(19),f=r(21);c(a,"__esModule",{value:!0}),a.default=a.Edit=void 0;var p,h=f(r(62)),m=f(r(36)),g=f(r(57)),v=f(r(65)),y=r(406),b=r(1193),_=f(r(561));function S(e,t){var a=n(e);if(i){var r=i(e);t&&(r=l(r).call(r,(function(t){return s(e,t).enumerable}))),a.push.apply(a,r)}return a}function x(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)o(a=S(Object(r),!0)).call(a,(function(t){(0,m.default)(e,t,r[t])}));else if(u)d(e,u(r));else{var n;o(n=S(Object(r))).call(n,(function(t){c(e,t,s(r,t))}))}}return e}var w=(0,g.default)(p="normal,macvtap,direct,baremetal,direct-physical,virtio-forwarder,smart-nic".split(",")).call(p,(e=>({label:e,value:e})));class I extends b.ModalAction{constructor(){super(...arguments),(0,m.default)(this,"onSubmit",(e=>{var{item:{id:t}={}}=this.props,{mac_address:{type:a,mac:r},more:n}=e,i=x({},(0,h.default)(e,["mac_address","more"]));return a&&"auto"!==a&&(i.mac_address=r),_.default.update({id:t},i)}))}get defaultValue(){var{item:e}=this.props;return x(x({},e),{},{mac_address:{type:"manual",mac:e.mac_address},"binding:vnic_type":e.binding_vnic_type})}get formItems(){var{more:e}=this.state;return[{name:"name",label:t("Name"),type:"input-name",required:!0,withoutChinese:!0},{name:"mac_address",label:t("Mac Address"),wrapperCol:{span:16},type:"mac-address",required:!0},{name:"binding:vnic_type",label:t("Port Type"),type:"select",required:!0,options:w,hidden:!e},{name:"description",label:t("Description"),type:"textarea"},{name:"more",label:t("Advanced Options"),type:"more"}]}}a.Edit=I,(0,m.default)(I,"id","edit-virtual-adapter"),(0,m.default)(I,"title",t("Edit")),(0,m.default)(I,"buttonText",t("Edit")),(0,m.default)(I,"policy","update_port"),(0,m.default)(I,"allowed",(()=>v.default.resolve(!0)));var C=(0,y.inject)("rootStore")((0,y.observer)(I));a.default=C},3573:function(e,a,r){"use strict";var n=r(33),i=r(44),l=r(32),s=r(25),o=r(27),u=r(45),d=r(46),c=r(19),f=r(160),p=r(21);c(a,"__esModule",{value:!0}),a.default=a.Attach=void 0;var h=p(r(198)),m=p(r(65)),g=p(r(36)),v=r(406),y=r(1193),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={},n=c&&s;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=n?s(e,i):null;l&&(l.get||l.set)?c(r,i,l):r[i]=e[i]}r.default=e,a&&a.set(e,r);return r}(r(408)),_=r(1195);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=n(e);if(i){var r=i(e);t&&(r=l(r).call(r,(function(t){return s(e,t).enumerable}))),a.push.apply(a,r)}return a}function w(e){for(var t=1;t<arguments.length;t++){var a,r=null!=arguments[t]?arguments[t]:{};if(t%2)o(a=x(Object(r),!0)).call(a,(function(t){(0,g.default)(e,t,r[t])}));else if(u)d(e,u(r));else{var n;o(n=x(Object(r))).call(n,(function(t){c(e,t,s(r,t))}))}}return e}class I extends y.ModalAction{constructor(){super(...arguments),(0,g.default)(this,"onSubmit",(e=>{var{id:t}=this.props.item,{instance:{selectedRowKeys:a=[]}={}}=e;return b.default.addInterface({id:a[0],body:{interfaceAttachment:{port_id:t}}})}))}init(){this.store=new b.ServerStore}get name(){return t("Attach Instance")}static get modalSize(){return"large"}getModalSize(){return"large"}get defaultValue(){var{name:e,id:t}=this.item;return{virtual_adapter:e,virtual_adapter_id:t}}get formItems(){return[{name:"virtual_adapter",label:t("Virtual Adapter"),type:"label"},{name:"virtual_adapter_id",label:t("Virtual Adapter ID"),type:"label",hidden:!0},w({name:"instance",label:t("Instance"),type:"select-table",backendPageStore:this.store,extraParams:{noReminder:!0},disabledFunc:e=>e.locked||!(0,h.default)(_.allowAttachInterfaceStatus).call(_.allowAttachInterfaceStatus,e.vm_state),required:!0,isMulti:!1},_.instanceSelectTablePropsBackend)]}}a.Attach=I,(0,g.default)(I,"id","attach_instance"),(0,g.default)(I,"title",t("Attach Instance")),(0,g.default)(I,"policy","os_compute_api:os-attach-interfaces:create"),(0,g.default)(I,"allowed",(e=>m.default.resolve(""===e.device_id)));var C=(0,v.inject)("rootStore")((0,v.observer)(I));a.default=C},3574:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=void 0;var l=i(r(51)),s=i(r(36)),o=r(1193),u=i(r(408));class d extends o.ConfirmAction{constructor(){var e;super(...arguments),e=this,(0,s.default)(this,"policy","os_compute_api:os-attach-interfaces:delete"),(0,s.default)(this,"allowedCheckFunc",(e=>!!e.device_id&&"compute:nova"===e.device_owner)),(0,s.default)(this,"onSubmit",(0,l.default)((function*(){var{id:t,device_id:a}=e.item;return u.default.detachInterface({id:a,ports:[t]})})))}get id(){return"detach_instance"}get title(){return t("Detach Instance")}get buttonText(){return t("Detach")}get actionName(){return t("detach instance")}get isAsyncAction(){return!0}}a.default=d},3575:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=a.ModifyQoS=void 0;var l=i(r(65)),s=i(r(51)),o=i(r(36)),u=i(r(0)),d=r(406),c=r(1193),f=r(415),p=i(r(561)),h=r(1303),m=r(76);class g extends c.ModalAction{constructor(){super(...arguments),(0,o.default)(this,"onSubmit",(e=>{var{id:t}=this.item,{enableQosPolicy:a,qos_policy_id:r}=e,n={qos_policy_id:null};return a&&r&&(n.qos_policy_id=0===r.selectedRowKeys.length?null:r.selectedRowKeys[0]),p.default.update({id:t},n)}))}get name(){return t("Modify QoS")}get labelCol(){return{xs:{span:6},sm:{span:4}}}static get modalSize(){return"large"}getModalSize(){return"large"}init(){this.qosPolicyStore=new f.QoSPolicyStore,this.state={qosPolicy:{name:"",id:""}},this.item.qos_policy_id&&this.getQosPolicyItem()}getQosPolicyItem(){var e=this;return(0,s.default)((function*(){var t=yield e.qosPolicyStore.fetchDetail({id:e.item.qos_policy_id});e.setState({qosPolicy:t})}))()}get instanceName(){return this.item.name||this.item.id}get defaultValue(){var e=null!==this.item.qos_policy_id;return{enableQosPolicy:e,qos_policy_id:{selectedRowKeys:e?[this.item.qos_policy_id]:[],selectedRows:e?[{id:this.item.qos_policy_id,name:this.item.qos_policy_id}]:[]}}}get formItems(){var{enableQosPolicy:e=null!==this.item.qos_policy_id,qosPolicy:a}=this.state;return[{name:"enableQosPolicy",label:t("Enable QoS Policy"),type:"switch",onChange:e=>{this.setState({enableQosPolicy:e})}},{name:"name",label:t("Current QoS policy name"),type:"label",content:u.default.createElement("div",null,a.name||t("Not yet bound")),hidden:!e},{name:"qos_policy_id",label:t("QoS Policy"),type:"tab-select-table",tabs:h.getQoSPolicyTabs.call(this,{disabledFunc:e=>e.id===this.item.qos_policy_id}),isMulti:!1,required:!0,tip:t("Choosing a QoS policy can limit bandwidth and DSCP"),hidden:!e}]}}a.ModifyQoS=g,(0,o.default)(g,"id","modify_qos"),(0,o.default)(g,"title",t("Modify QoS")),(0,o.default)(g,"policy","update_port"),(0,o.default)(g,"allowed",(()=>l.default.resolve(!!(0,m.qosEndpoint)())));var v=(0,d.inject)("rootStore")((0,d.observer)(g));a.default=v},3576:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=a.AssociateFip=void 0;var l=i(r(65)),s=i(r(51)),o=i(r(36)),u=r(406),d=i(r(336)),c=r(1193),f=r(1195),p=r(1210),h=r(1219),m=r(1224);class g extends c.ModalAction{constructor(){super(...arguments),(0,o.default)(this,"handleFixedIPChange",(e=>m.handleFixedIPChange.call(this,e))),(0,o.default)(this,"onSubmit",(e=>{var{fixed_ip:t,fip:a}=e,r=t.selectedRows[0],n=a.selectedRowKeys[0];return d.default.associateFip({id:n,port_id:this.item.id,fixed_ip_address:r.fixed_ip_address})}))}init(){this.getInterfaces(),h.getCanReachSubnetIdsWithRouterIdInComponent.call(this),this.state={interfaces:[],fixed_ip:null,canAssociateFloatingIPs:[],canReachSubnetIdsWithRouterId:[],portLoading:!0}}getInterfaces(){var e=this;return(0,s.default)((function*(){var t=[e.item],a=yield(0,m.getInterfaceWithReason)(t);e.setState({interfaces:a,portLoading:!1})}))()}static get modalSize(){return"large"}getModalSize(){return"large"}get name(){return t("Associate Floating IP")}get ports(){var{interfaces:e,canReachSubnetIdsWithRouterId:t}=this.state;return p.getPortsAndReasons.call(this,e,t)}get defaultValue(){var{name:e}=this.item;return{virtualAdapter:e}}getFIPFormItemExtra(){return(0,m.getFIPFormItemExtra)()}disableFIPAssociate(e){return(0,m.disableFIPAssociate)(e)}get formItems(){var e=(0,m.getFixedIPFormItemForAssociate)(t("Fixed IP"),this),a=(0,m.getFIPFormItemForAssociate)(this);return[{name:"virtualAdapter",label:t("Virtual Adapter"),type:"label",iconType:"instance"},e,a]}}a.AssociateFip=g,(0,o.default)(g,"id","AssociateFip"),(0,o.default)(g,"title",t("Associate Floating IP")),(0,o.default)(g,"policy","update_floatingip"),(0,o.default)(g,"allowed",((e,t)=>{var{isAdminPage:a=!1}=t;return l.default.resolve(!a&&(0,f.isNotError)(e)&&e.associatedDetail&&e.associatedDetail.length<e.ipv4.length)}));var v=(0,u.inject)("rootStore")((0,u.observer)(g));a.default=v},3577:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=a.DisAssociateFip=void 0;var l=i(r(65)),s=i(r(36)),o=r(406),u=i(r(336)),d=r(1193),c=r(1195);class f extends d.ModalAction{constructor(){super(...arguments),(0,s.default)(this,"onSubmit",(e=>{var{floating_ip:t}=e,{id:a}=t.selectedRows[0];return u.default.disassociateFip({id:a})}))}static get modalSize(){return"large"}getModalSize(){return"large"}get name(){return t("Disassociate Floating IP")}get defaultValue(){var{name:e}=this.item;return{virtualAdapter:e}}get formItems(){var{associatedDetail:e}=this.item;return[{name:"virtualAdapter",label:t("Virtual Adapter"),type:"label",iconType:"instance"},{name:"floating_ip",label:t("Floating IP"),type:"select-table",required:!0,data:e,isMulti:!1,tagKey:"floating_ip_address",filterParams:[{label:t("Fixed IP Address"),name:"fixed_ip_address"}],columns:[{title:t("Fixed IP Address"),dataIndex:"fixed_ip_address"},{title:t("Floating IP Address"),dataIndex:"floating_ip_address"}]}]}}a.DisAssociateFip=f,(0,s.default)(f,"id","DisAssociateFip"),(0,s.default)(f,"title",t("Disassociate Floating IP")),(0,s.default)(f,"policy","update_floatingip"),(0,s.default)(f,"allowed",((e,t)=>{var{isAdminPage:a=!1}=t;return l.default.resolve(!a&&(0,c.isNotError)(e)&&e.associatedDetail&&e.associatedDetail.length)}));var p=(0,o.inject)("rootStore")((0,o.observer)(f));a.default=p},3582:function(e,t,a){"use strict";var r=a(19),n=a(21);r(t,"__esModule",{value:!0}),t.default=void 0;var i=n(a(90)),l=n(a(57));a(576);var s=n(a(577)),o=n(a(591));a(1268);var u=n(a(1269));a(1198);var d=n(a(1199));a(1196);var c=n(a(1197));a(411);var f=n(a(227));a(1270);var p=n(a(1271)),h=n(a(343)),m=n(a(111)),g=n(a(559)),v=n(a(0)),y=(a(173),a(555),n(a(16))),b=n(a(4)),_=a(161),S=a(578),x=n(a(635)),w=n(a(3583)),{Paragraph:I}=p.default,C=(e,t)=>{var{content:a,dataIndex:r,render:n,valueRender:l,copyable:s,valueMap:o,unit:u}=t;if((0,g.default)(t,"content"))return s?v.default.createElement(I,{copyable:s},a):a;var d=(0,m.default)(e,r);if(n)d=n(d,e);else if(l){var c=_.renderFilterMap[l];d=c&&c(d)}else o?d=(0,S.getValueMapRender)(t)(d):u&&(d=(0,S.getUnitRender)(t)(d));return(0,h.default)(d)||(d=d||"-"),((e,t,a,r)=>{var n,l,s=(0,m.default)(a,t);return(0,i.default)(n=t.toLowerCase()).call(n,"status")>=0||(0,i.default)(l=t.toLowerCase()).call(l,"state")>=0?v.default.createElement(x.default,{status:s,text:e}):"-"!==e&&(/_?id/g.test(t.toLowerCase())&&!1!==r||r)?v.default.createElement(I,{copyable:r},e):e||"-"})(d,r,e,s)},k=(e,t,a,r,n)=>(0,l.default)(e).call(e,((e,i)=>v.default.createElement(u.default,{loading:a,key:"detail-row-".concat(i)},v.default.createElement(d.default,{className:(0,b.default)(w.default["card-item"],"sl-card-item")},v.default.createElement(c.default,{span:r},(e=>{var{label:t,tooltip:a=""}=e;return a?v.default.createElement(f.default,{title:a},v.default.createElement("span",null,t)):t})(e)),v.default.createElement(c.default,{span:n},C(t,e)))))),D=e=>{var t,{title:a,titleHelp:r,loading:n,options:i,data:l,labelCol:c,contentCol:f,className:p,button:h}=e;return r&&(t=v.default.createElement(s.default,{arrowPointAtCenter:"true",placement:"rightTop",content:r,getPopupContainer:e=>e.parentNode},v.default.createElement(o.default,{className:w.default["title-help"]}))),v.default.createElement("div",{className:(0,b.default)(w.default.card,p)},v.default.createElement("div",{className:w.default["card-content"]},v.default.createElement(u.default,{loading:n},v.default.createElement(d.default,{className:(0,b.default)(w.default["card-item"],"sl-card-item")},v.default.createElement("h3",null," ",a," "),t,h)),k(i,l,n,c,f)))},P=y.default.shape({label:y.default.oneOfType([y.default.string,y.default.node]),content:y.default.any,tooltip:y.default.oneOfType([y.default.string,y.default.node]),dataIndex:y.default.string,valueRender:y.default.string});D.defaultProps={labelCol:8,contentCol:16,options:[],title:"",titleHelp:"",loading:!1,data:{}},D.propTypes={title:y.default.oneOfType([y.default.string,y.default.node]),titleHelp:y.default.any,options:y.default.arrayOf(P),loading:y.default.bool,data:y.default.object,labelCol:y.default.number,contentCol:y.default.number};var T=D;t.default=T},3583:function(e,t,a){var r=a(3584);"string"==typeof r&&(r=[[e.i,r,""]]);var n={hmr:!0,transform:undefined,insertInto:void 0};a(75)(r,n);r.locals&&(e.exports=r.locals)},3584:function(e,t,a){(t=e.exports=a(74)(!1)).push([e.i,"/* init */\n/* specific color */\n/* border */\n/* background */\n/* shadow */\n/* font */\n/* 中号字体 */\n/* animation */\n/* size */\n/* sider */\n.index__card--Na2sx {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n margin-bottom: 16px;\n background-color: #fff;\n border-radius: 4px;\n -webkit-box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.05);\n box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.05);\n}\n.index__card--Na2sx .index__card-content--26JCN {\n padding: 16px;\n}\n.index__card--Na2sx .index__card-content--26JCN .index__card-item--1w9VY {\n margin-bottom: 8px;\n}\n.index__card--Na2sx .index__card-content--26JCN .index__card-item--1w9VY h3 {\n margin-bottom: 0;\n}\n.index__card--Na2sx .index__card-content--26JCN .index__card-item--1w9VY .index__title-help--8XKV- {\n margin-left: 8px;\n line-height: 26px;\n}\n.index__card--Na2sx .index__card-content--26JCN .index__card-item--1w9VY div {\n word-break: break-all;\n}\n.index__card--Na2sx .index__card-content--26JCN :last-child {\n margin-bottom: 0;\n}\n.index__card--Na2sx .index__card-content--26JCN .ant-typography {\n word-break: break-all;\n}\n",""]),t.locals={card:"index__card--Na2sx","card-content":"index__card-content--26JCN","card-item":"index__card-item--1w9VY","title-help":"index__title-help--8XKV-"}},3585:function(e,t,a){var r=a(3586);"string"==typeof r&&(r=[[e.i,r,""]]);var n={hmr:!0,transform:undefined,insertInto:void 0};a(75)(r,n);r.locals&&(e.exports=r.locals)},3586:function(e,t,a){(t=e.exports=a(74)(!1)).push([e.i,"/* init */\n/* specific color */\n/* border */\n/* background */\n/* shadow */\n/* font */\n/* 中号字体 */\n/* animation */\n/* size */\n/* sider */\n.index__main--TubAm {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n padding: 0 16px;\n}\n.index__main--TubAm .index__left-side--pbUVD {\n width: 380px;\n padding-right: 16px;\n}\n.index__main--TubAm .index__right-side--3v5zG {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n}\n",""]),t.locals={main:"index__main--TubAm","left-side":"index__left-side--pbUVD","right-side":"index__right-side--3v5zG"}},3609:function(e,t,a){var r=a(3610);"string"==typeof r&&(r=[[e.i,r,""]]);var n={hmr:!0,transform:undefined,insertInto:void 0};a(75)(r,n);r.locals&&(e.exports=r.locals)},3610:function(e,t,a){(t=e.exports=a(74)(!1)).push([e.i,"/* init */\n/* specific color */\n/* border */\n/* background */\n/* shadow */\n/* font */\n/* 中号字体 */\n/* animation */\n/* size */\n/* sider */\n.index__wrapper--26YmP {\n min-height: calc(100vh - 108px);\n}\n.index__wrapper--26YmP .ant-tabs > .ant-tabs-nav {\n background-color: #fff;\n}\n.index__wrapper--26YmP .ant-tabs-nav-wrap {\n padding: 0 16px;\n}\n.index__wrapper--26YmP .list-container {\n margin-top: 0;\n}\n",""]),t.locals={wrapper:"index__wrapper--26YmP"}},3954:function(e,t,a){"use strict";var r=a(19),n=a(21);r(t,"__esModule",{value:!0}),t.detailConfigs=t.actionConfigs=void 0;var i=n(a(3955)),l=n(a(3956)),s={rowActions:{firstAction:l.default},batchActions:[l.default],primaryActions:[i.default]};t.actionConfigs=s;var o={rowActions:{firstAction:l.default},batchActions:[l.default],primaryActions:[]};t.detailConfigs=o},3955:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=a.Create=void 0;var l=i(r(57)),s=i(r(32)),o=i(r(33)),u=i(r(335)),d=i(r(65)),c=i(r(62)),f=i(r(36)),p=r(406),h=r(1193),m=i(r(1410)),g=i(r(119)),v=i(r(140)),y=r(34),b=i(r(1298));class _ extends h.ModalAction{constructor(){super(...arguments),(0,f.default)(this,"onSubmit",(e=>{var t,a;(e.expires_at&&(e.expires_at=e.expires_at.clone().endOf("day")),e.roles)&&(e.roles=(0,l.default)(t=(0,s.default)(a=(0,o.default)(e.roles)).call(a,(t=>e.roles[t]))).call(t,(e=>({id:e}))));return m.default.create(e).then((e=>{var t=e.application_credential,{links:a,roles:r,system:n,unrestricted:i,user_id:l,name:s}=t,o=(0,c.default)(t,["links","roles","system","unrestricted","user_id","name"]),d="".concat(s,".json"),f=new Blob([(0,u.default)(o,null,2)],{type:"text/plain;charset=utf-8"});b.default.saveAs(f,d)}))}))}static get modalSize(){return"middle"}getModalSize(){return"middle"}get name(){return t("Create Application Credentials")}static allowed(){return d.default.resolve(!0)}get roleOptions(){var e=(0,y.toJS)(v.default.roles);return(0,l.default)(e).call(e,(e=>({label:e.name,value:e.id})))}get formItems(){return[{name:"name",label:t("Name"),type:"input-name",required:!0},{name:"expires_at",label:t("Expires At"),type:"date-picker",showToday:!1,disabledDate:e=>e&&e<(0,g.default)().subtract(1,"days").endOf("d"),required:!1},{name:"roles",label:t("Roles"),type:"check-group",options:this.roleOptions,extra:t("If not provided, the roles assigned to the application credential will be the same as the roles in the current token."),span:12},{name:"description",label:t("Description"),type:"textarea",required:!1}]}}a.Create=_,(0,f.default)(_,"id","create-application_credentials"),(0,f.default)(_,"title",t("Create Application Credentials")),(0,f.default)(_,"policy","identity:create_application_credential");var S=(0,p.inject)("rootStore")((0,p.observer)(_));a.default=S},3956:function(e,a,r){"use strict";var n=r(19),i=r(21);n(a,"__esModule",{value:!0}),a.default=void 0;var l=i(r(36)),s=r(1193),o=i(r(1410));class u extends s.ConfirmAction{constructor(){super(...arguments),(0,l.default)(this,"policy","identity:delete_application_credential"),(0,l.default)(this,"onSubmit",(e=>{var{user_id:t,id:a}=e;return o.default.client.delete(t,a)}))}get id(){return"delete"}get title(){return t("Delete Application Credential")}get isDanger(){return!0}get buttonText(){return t("Delete")}get actionName(){return t("delete application credential")}}a.default=u}}]);