ui5flowdev
Version:
UI5FlowDev enables you to manage and run your UI5 applications on a local server with reverse-proxy support. It also provides you the option to build your applications and deploy them to SAP NetWeaver ABAP.
8 lines • 144 kB
JavaScript
jQuery.sap.registerPreloadedModules({
"version": "2.0",
"name": "com/oprtnl/ui5locserv/Component-preload",
"modules": {
"com/oprtnl/ui5locserv/Component.js": "sap.ui.define([\"sap/ui/core/UIComponent\",\"sap/ui/model/json/JSONModel\",\"com/oprtnl/ui5locserv/model/models\"],function(e,i,o){\"use strict\";return e.extend(\"com.oprtnl.ui5locserv.Component\",{metadata:{manifest:\"json\"},init:function(){e.prototype.init.apply(this,arguments),this.setModel(o.initGlobalPropertiesModel(),\"globalProperties\"),this.setModel(o.initDeviceModel(),\"device\"),this.getRouter().initialize()}})});",
"com/oprtnl/ui5locserv/controller/App.controller.js": "sap.ui.define([\"com/oprtnl/ui5locserv/controller/BaseController\"],function(e){\"use strict\";return e.extend(\"com.oprtnl.ui5locserv.controller.App\",{onInit:function(){this.getView().addStyleClass(this.getContentDensityClass())},onBeforeRendering:function(){}})});",
"com/oprtnl/ui5locserv/controller/AppDetail.controller.js": "sap.ui.define([\"com/oprtnl/ui5locserv/controller/BaseController\",\"com/oprtnl/ui5locserv/model/formatter\",\"sap/m/Dialog\",\"sap/m/Button\",\"sap/m/MessagePopover\",\"sap/m/MessagePopoverItem\",\"sap/m/MessageToast\",\"sap/m/MessageBox\",\"sap/m/Token\",\"sap/m/Link\"],function(e,t,i,s,a,o,r,n,l,p){\"use strict\";return e.extend(\"com.oprtnl.ui5locserv.controller.AppDetail\",{formatter:t,onInit:function(){this.getRouter(this).getRoute(\"appDetail\").attachPatternMatched(this.onObjectMatched,this),this.appDetailFragmentView()},onObjectMatched:function(e){if(this.globalBusyOn(),!this.getView().getModel(\"serverConfig\").getData().sapSystems){var t=this.getGlobalProperty(\"/host\")+this.getGlobalProperty(\"/route-serverConfig\");this.getView().getModel(\"serverConfig\").loadData(t),this.getView().getModel(\"serverConfig\").refresh(!0)}this.getDetailData(e.getParameter(\"arguments\").appName),this.getView().getModel(\"bspApplicationsList\").setSizeLimit(1e6),this.isChangeActive=!1,this.messagesReset(),this.onStartTabSelection()},getDetailData:function(e){if(!this.getView().getModel(\"sapSystemsList\").getData().systems){var t=this.getGlobalProperty(\"/host\")+this.getGlobalProperty(\"/route-sapSystemsList\");this.getView().getModel(\"sapSystemsList\").loadData(t),this.getView().getModel(\"sapSystemsList\").refresh(!0)}if(!this.getView().getModel(\"reverseProxyList\").getData().proxies){var i=this.getGlobalProperty(\"/host\")+this.getGlobalProperty(\"/route-proxyList\");this.getView().getModel(\"reverseProxyList\").loadData(i),this.getView().getModel(\"reverseProxyList\").refresh(!0)}var s={},a=this.getGlobalProperty(\"/host\")+this.getGlobalProperty(\"/route-applicationsList\");this.getView().getModel(\"applicationsList\").loadData(a);var o=this;this.getView().getModel(\"applicationsList\").attachEventOnce(\"requestCompleted\",function(t){var i=o.getView().getModel(\"applicationsList\").getData();if(i.applications){for(var a={},r=0,n=i.applications.length;r<n;r++){if(i.applications[r].tags)for(var l=0,p=i.applications[r].tags.length;l<p;l++)a[i.applications[r].tags[l].name]=!0;i.applications[r].name===e&&(s=i.applications[r])}s.all_tags=[];for(var g in a)s.all_tags.push({name:g})}o.getView().getModel(\"applicationDetail\").setData(s),o.getView().getModel(\"applicationDetail\").refresh(!0),o.globalBusyOff()},this)},onApplicationDelete:function(){var e=this.getView();this.oDeleteConfirm=e.byId(\"appDeleteConfirm\"),this.oDeleteConfirm||(this.oDeleteConfirm=sap.ui.xmlfragment(e.getId(),\"com.oprtnl.ui5locserv.view.DeleteConfirmation\",this),e.addDependent(this.oDeleteConfirm),jQuery.sap.syncStyleClass(this.getView().getController().getContentDensityClass(),this.getView(),this.oDeleteConfirm)),this.valuesAppDeleteReset(),this.oDeleteConfirm.open()},onCheckDeleteConfirmation:function(e){e.getSource().getSelected()?this.getView().byId(\"bAppDeleteConfirm\").setEnabled(!0):this.getView().byId(\"bAppDeleteConfirm\").setEnabled(!1)},valuesAppDeleteReset:function(){this.getView().byId(\"confirmCheck\").setSelected(!1),this.getView().byId(\"bAppDeleteConfirm\").setEnabled(!1),this.messagesReset()},onApplicationDeleteConfirmed:function(){this.globalBusyOn();var e={appName:this.getView().getModel(\"applicationDetail\").getProperty(\"/name\")},t=this;jQuery.ajax({type:\"DELETE\",contentType:\"application/json\",url:this.getGlobalProperty(\"/host\")+this.getGlobalProperty(\"/route-applicationsDelete\"),dataType:\"json\",async:!0,data:JSON.stringify(e),success:function(e){t.showMessageToast(t.responseParse(e)),t.globalBusyOff(),t.oDeleteConfirm.close(),setTimeout(function(){t.onBackConfirmed()},1)},error:function(e){t.globalBusyOff(),t.showMessagePopover([t.responseParse(e)],!0,!0,\"bShowMessages\"),t.oDeleteConfirm.close()}})},onApplicationDeleteCancel:function(){this.oDeleteConfirm.close()},onTabSelection:function(e){switch(e.getParameter(\"key\")){case\"tabDetail\":this.toggleDetailButtons(),this.isChangeActive?this.appDetailFragmentChange():this.appDetailFragmentView();break;case\"tabDataProvider\":this.checkNoDetailChange()&&(this.getView().byId(\"dataProviderList\").removeSelections(),this.selectedDataProvider=!1,this.toggleDataProviderButtons(),this.setDataProviderViewState());break;case\"tabVersion\":this.checkNoDetailChange()&&(this.getView().byId(\"versionList\").removeSelections(),this.selectedVersion=!1,this.toggleVersionButtons(),this.setVersionViewState());break;case\"tabSettings\":this.toggleSettingsButtons();break;default:this.toggleDetailButtons(),this.appDetailFragmentView()}},checkNoDetailChange:function(){var e=this;return this.isChangeActive&&n.warning(e.getI18nText(\"AppDetail.appChangesLost\"),{icon:n.Icon.WARNING,title:e.getI18nText(\"AppDetail.appChangesLostHead\"),actions:[n.Action.OK,n.Action.CANCEL],styleClass:\"sapUiSizeCompact\",initialFocus:n.Action.CLOSE,onClose:function(t){return t===n.Action.CANCEL?(e.toggleDetailButtons(),e.getView().byId(\"appDetailHeaderTabBar\").setSelectedKey(\"tabDetail\"),!1):(e.onDetailDataCancel(),e.getView().byId(\"bApplicationChange\").setVisible(!1),!0)}}),!0},setDataProviderViewState:function(){this.checkNoDataProvider()?(this.getView().byId(\"noDataProvider\").setVisible(!0),this.getView().byId(\"hasDataProvider\").setVisible(!1)):(this.getView().byId(\"noDataProvider\").setVisible(!1),this.getView().byId(\"hasDataProvider\").setVisible(!0))},setVersionViewState:function(){this.checkNoAppVersion()?(this.getView().byId(\"noVersion\").setVisible(!0),this.getView().byId(\"hasVersion\").setVisible(!1)):(this.getView().byId(\"noVersion\").setVisible(!1),this.getView().byId(\"hasVersion\").setVisible(!0))},appDetailFragmentView:function(e){var t=this.getView().byId(\"appDetailVertLayout\");this.oDetailDataFragment&&(this.oDetailDataFragment.destroy(),this.oDetailDataFragment=null),this.oDetailDataFragment=sap.ui.xmlfragment(this.getView().getId(),\"com.oprtnl.ui5locserv.view.AppDetailDisplay\",this),this.getView().addDependent(this.oDetailDataFragment),jQuery.sap.syncStyleClass(this.getView().getController().getContentDensityClass(),this.getView(),this.oDetailDataFragment),t.removeAllContent(),t.insertContent(this.oDetailDataFragment)},onStartTabSelection:function(){this.getView().byId(\"appDetailHeaderTabBar\").setSelectedKey(\"tabDetail\"),this.toggleDetailButtons()},toggleDataProviderButtons:function(){this.getView().byId(\"bApplicationChange\").setVisible(!1),this.getView().byId(\"bDetailDataSave\").setVisible(!1),this.getView().byId(\"bDetailDataCancel\").setVisible(!1),this.getView().byId(\"bCreateVersion\").setVisible(!1),this.getView().byId(\"bDeploySapVersion\").setVisible(!1),this.getView().byId(\"bChangeVersion\").setVisible(!1),this.getView().byId(\"bDeleteVersion\").setVisible(!1),this.getView().byId(\"bCreateDataProvider\").setVisible(!0),this.getView().byId(\"bChangeDataProvider\").setVisible(this.checkDataProviderSelected()),this.getView().byId(\"bDeleteDataProvider\").setVisible(this.checkDataProviderSelected())},toggleVersionButtons:function(){this.getView().byId(\"bApplicationChange\").setVisible(!1),this.getView().byId(\"bDetailDataSave\").setVisible(!1),this.getView().byId(\"bDetailDataCancel\").setVisible(!1),this.getView().byId(\"bCreateVersion\").setVisible(!0),this.getView().byId(\"bCreateDataProvider\").setVisible(!1),this.getView().byId(\"bChangeDataProvider\").setVisible(!1),this.getView().byId(\"bDeleteDataProvider\").setVisible(!1),this.getView().byId(\"bDeploySapVersion\").setVisible(this.checkVersionSelected()),this.getView().byId(\"bChangeVersion\").setVisible(this.checkVersionSelected()),this.getView().byId(\"bDeleteVersion\").setVisible(this.checkVersionSelected())},toggleSettingsButtons:function(){this.getView().byId(\"bApplicationChange\").setVisible(!1),this.getView().byId(\"bDetailDataSave\").setVisible(!1),this.getView().byId(\"bDetailDataCancel\").setVisible(!1),this.getView().byId(\"bCreateVersion\").setVisible(!1),this.getView().byId(\"bCreateDataProvider\").setVisible(!1),this.getView().byId(\"bChangeDataProvider\").setVisible(!1),this.getView().byId(\"bDeleteDataProvider\").setVisible(!1),this.getView().byId(\"bDeploySapVersion\").setVisible(!1),this.getView().byId(\"bChangeVersion\").setVisible(!1),this.getView().byId(\"bDeleteVersion\").setVisible(!1)},toggleDetailButtons:function(){this.isChangeActive?(this.getView().byId(\"bApplicationChange\").setVisible(!1),this.getView().byId(\"bDetailDataSave\").setVisible(!0),this.getView().byId(\"bDetailDataCancel\").setVisible(!0)):(this.getView().byId(\"bApplicationChange\").setVisible(!0),this.getView().byId(\"bDetailDataSave\").setVisible(!1),this.getView().byId(\"bDetailDataCancel\").setVisible(!1)),this.getView().byId(\"bCreateVersion\").setVisible(!1),this.getView().byId(\"bDeploySapVersion\").setVisible(!1),this.getView().byId(\"bChangeVersion\").setVisible(!1),this.getView().byId(\"bDeleteVersion\").setVisible(!1),this.getView().byId(\"bCreateDataProvider\").setVisible(!1),this.getView().byId(\"bChangeDataProvider\").setVisible(!1),this.getView().byId(\"bDeleteDataProvider\").setVisible(!1)},toggleDetailChangeButtons:function(e){e?(this.getView().byId(\"bApplicationChange\").setVisible(!1),this.getView().byId(\"bDetailDataSave\").setVisible(!0),this.getView().byId(\"bDetailDataCancel\").setVisible(!0)):(this.getView().byId(\"bApplicationChange\").setVisible(!0),this.getView().byId(\"bDetailDataSave\").setVisible(!1),this.getView().byId(\"bDetailDataCancel\").setVisible(!1))},checkNoAppVersion:function(){return!this.getView().getModel(\"applicationDetail\").getProperty(\"/versions\")||!(this.getView().getModel(\"applicationDetail\").getProperty(\"/versions\").length>0)},checkNoDataProvider:function(){return!this.getView().getModel(\"applicationDetail\").getProperty(\"/data_providers\")||!(this.getView().getModel(\"applicationDetail\").getProperty(\"/data_providers\").length>0)},checkVersionSelected:function(){return!this.checkNoAppVersion()&&!!this.selectedVersion},checkDataProviderSelected:function(){return!this.checkNoDataProvider()&&!!this.selectedDataProvider},collectDetailDataBeforeChange:function(){this.dataImageBeforeChangeDetail=JSON.parse(JSON.stringify(this.getView().getModel(\"applicationDetail\").getData()))},onDetailDataChange:function(){this.collectDetailDataBeforeChange(),this.appDetailFragmentChange(),this.toggleDetailChangeButtons(!0),this.isChangeActive=!0},appDetailFragmentChange:function(e){var t=this.getView().byId(\"appDetailVertLayout\");this.oDetailDataFragment&&(this.oDetailDataFragment.destroy(),this.oDetailDataFragment=null),this.oDetailDataFragment=sap.ui.xmlfragment(this.getView().getId(),\"com.oprtnl.ui5locserv.view.AppDetailChange\",this),this.getView().addDependent(this.oDetailDataFragment),jQuery.sap.syncStyleClass(this.getView().getController().getContentDensityClass(),this.getView(),this.oDetailDataFragment),t.removeAllContent(),t.insertContent(this.oDetailDataFragment)},onDetailDataCancel:function(){this.getView().getModel(\"applicationDetail\").setData(this.dataImageBeforeChangeDetail),this.appDetailFragmentView(),this.toggleDetailChangeButtons(!1),this.isChangeActive=!1},onDetailDataSave:function(){var e=this,t=this.getView().getModel(\"applicationDetail\").getProperty(\"/name\"),i={name:t,displayName:this.getInputValue(\"displayName\"),appUrl:this.getInputValue(\"appUrl\"),description:this.getInputValue(\"appDescription\"),remoteGitUrl:this.getInputValue(\"appRemoteGitUrl\"),tags:this.getView().getModel(\"applicationDetail\").getProperty(\"/tags\")};jQuery.ajax({type:\"PUT\",contentType:\"application/json\",url:this.getGlobalProperty(\"/host\")+this.getGlobalProperty(\"/route-applicationUpdate\"),dataType:\"json\",async:!0,data:JSON.stringify(i),success:function(i){var s=e.getGlobalProperty(\"/host\")+e.getGlobalProperty(\"/route-applicationsList\");e.getView().getModel(\"applicationsList\").loadData(s),e.getView().getModel(\"applicationsList\").refresh(!0),e.getView().getModel(\"applicationsList\").attachEventOnce(\"requestCompleted\",function(i){e.getDetailData(t)},e),e.appDetailFragmentView(),e.toggleDetailChangeButtons(!1),e.showMessageToast(e.responseParse(i)),e.isChangeActive=!1},error:function(t){e.showMessagePopover([e.responseParse(t)],!0)}})},onDirectoryOpen:function(e){var t=e.getSource().data(\"appPath\");window.open(t,\"_blank\")},onRelUrlPress:function(e){var t=e.getSource().data(\"appUrl\");window.open(t,\"_blank\")},onVersionCreate:function(){var e=this.getView();this.oVersionData=e.byId(\"versionDataChange\"),this.oVersionData||(this.oVersionData=sap.ui.xmlfragment(e.getId(),\"com.oprtnl.ui5locserv.view.AppVersionDataChange\",this),e.addDependent(this.oVersionData),jQuery.sap.syncStyleClass(this.getView().getController().getContentDensityClass(),this.getView(),this.oVersionData));this.getView().getModel(\"applicationDetail\").getProperty(\"/data_providers\");this.getView().byId(\"versionName\").setEditable(!0),this.getView().byId(\"bVersionFolder\").setEnabled(!0),this.valuesVersionDataReset(),this.versionActionType=\"POST\",this.oVersionData.open()},onPathPress:function(e){var t=e.getSource().data(\"appPath\");if(!t)return this.showMessageToast({message:this.getI18nText(\"AppDetail.pathUrlCopyFailed\")}),!1;var i=document.createElement(\"textarea\");i.style.position=\"fixed\",i.style.top=0,i.style.left=0,i.style.width=\"2em\",i.style.height=\"2em\",i.style.padding=0,i.style.border=\"none\",i.style.outline=\"none\",i.style.boxShadow=\"none\",i.style.background=\"transparent\",i.value=t,document.body.appendChild(i),i.select();try{document.execCommand(\"copy\");this.showMessageToast({message:this.getI18nText(\"AppDetail.pathUrlCopySuccessful\")})}catch(e){this.showMessageToast({message:this.getI18nText(\"AppDetail.pathUrlCopyFailed\")})}document.body.removeChild(i)},valuesVersionDataReset:function(){this.valuesCleanup([\"versionName\",\"versionDescription\",\"versionCompPathValue\",\"versionFolder\"]),this.getView().byId(\"versionIsBuild\").setSelected(!1),this.getView().byId(\"versionCompPathLabel\").setVisible(!1),this.getView().byId(\"versionCompPathValue\").setVisible(!1),this.getView().byId(\"versionCompPathValue\").setEditable(!0),this.getView().byId(\"versionIsBuild\").setEditable(!0),this.getView().byId(\"versionIsBuild\").setSelected(!1),this.messagesReset()},onVersionClose:function(){this.valuesVersionDataReset(),this.messagesReset(),this.getView().byId(\"versionDataChange\").close()},onVersionFolderSelect:function(e){var t=this.getView().getModel(\"applicationDetail\").getProperty(\"/app_directory\"),i=this.getGlobalProperty(\"/host\")+this.getGlobalProperty(\"/route-applicationFolderStruct\")+\"/\"+t;this.getView().getModel(\"applicationFolderStructure\").loadData(i,\"\",!1),this.folderPathMap=[],this.actualFolderLevel=0;var s=!1,a=[];this.folderStructureData=this.getView().getModel(\"applicationFolderStructure\").getData(),this.actualFolderStructureData=this.folderStructureData;for(var o=0,r=this.folderStructureData.length;o<r;o++)if(this.folderStructureData[o].name){if(this.folderStructureData[o].subfolder){s=!1;for(var n=0,l=this.folderStructureData[o].subfolder.length;n<l;n++)this.folderStructureData[o].subfolder[n].name&&(s=!0)}else s=!1;a.push({id:o,name:this.folderStructureData[o].name,hasSubFolder:s})}this.getView().getModel(\"applicationFolderStructure\").setData(a),this.oVersionFolderStructure=this.getView().byId(\"applicationFolderStructure\"),this.oVersionFolderStructure||(this.oVersionFolderStructure=sap.ui.xmlfragment(this.getView().getId(),\"com.oprtnl.ui5locserv.view.AppFolderStructureSelect\",this),this.getView().addDependent(this.oVersionFolderStructure),jQuery.sap.syncStyleClass(this.getView().getController().getContentDensityClass(),this.getView(),this.oVersionFolderStructure)),this.getView().byId(\"folderStructureBreadcrumbs\").getLinks()&&this.getView().byId(\"folderStructureBreadcrumbs\").removeAllLinks(),this.getView().byId(\"folderStructureBreadcrumbs\").setCurrentLocationText(\"\");var g=new p({text:\"[root]\"});g.data(\"folderLevel\",-1),g.data(\"controller\",this),this.getView().byId(\"folderStructureBreadcrumbs\").addLink(g),this.getView().byId(\"folderStructureStripText\").setText(this.getI18nText(\"AppDetail.versionFolderText\")),this.getView().byId(\"bFolderStructureSelect\").detachPress(this.onVersionFolderAccept,this),this.getView().byId(\"bFolderStructureSelect\").attachPress(this.onVersionFolderAccept,this),this.oVersionFolderStructure.open()},onFolderStructureLinkSelection:function(e){var t=e.getSource().data(\"folderLevel\"),i=e.getSource().data(\"controller\"),s=[],a=!1;t+=1;for(var o=i.folderStructureData,r=0,n=i.folderPathMap.length;r<t;r++)o=o[i.folderPathMap[r].folderId].subfolder;var l=t;l<0&&(l=0),i.folderPathMap.splice(l),i.actualFolderLevel=l,i.actualFolderStructureData=o;for(var r=0,n=o.length;r<n;r++)if(o[r].name){if(o[r].subfolder){a=!1;for(var g=0,h=o[r].subfolder.length;g<h;g++)o[r].subfolder[g].name&&(a=!0)}else a=!1;s.push({id:r,name:o[r].name,hasSubFolder:a})}i.getView().byId(\"folderStructureBreadcrumbs\").getLinks()&&i.getView().byId(\"folderStructureBreadcrumbs\").removeAllLinks();var d=new p({text:\"[root]\",press:i.onFolderStructureLinkSelection});d.data(\"folderLevel\",-1),d.data(\"controller\",i),i.getView().byId(\"folderStructureBreadcrumbs\").addLink(d);for(var r=0,n=i.folderPathMap.length;r<n;r++){var d=new p({text:i.folderPathMap[r].folderName,press:i.onFolderStructureLinkSelection});d.data(\"folderLevel\",r),d.data(\"controller\",i),i.getView().byId(\"folderStructureBreadcrumbs\").addLink(d)}i.getView().getModel(\"applicationFolderStructure\").setData(s),i.getView().getModel(\"applicationFolderStructure\").refresh()},onFolderStructureItemSelection:function(e){this.selectedFolderStructureId=e.getParameters().listItem.data(\"folderId\");var t=e.getParameters().listItem.data(\"hasSubFolder\"),i=e.getParameters().listItem.data(\"folderName\");this.getView().byId(\"folderStructureList\").removeSelections();var s=null,a=[],o=!1,r=!1;if(this.selectedFolderStructureId>=0){this.folderPathMap[this.actualFolderLevel]||(this.folderPathMap[this.actualFolderLevel]={}),this.folderPathMap[this.actualFolderLevel].folderId=this.selectedFolderStructureId,this.folderPathMap[this.actualFolderLevel].folderName=i,this.folderPathMap[this.actualFolderLevel].hasSubFolder=t,t?this.actualFolderLevel++:r=!0,this.getView().byId(\"folderStructureBreadcrumbs\").getLinks()&&this.getView().byId(\"folderStructureBreadcrumbs\").removeAllLinks();var n=new p({text:\"[root]\",press:this.onFolderStructureLinkSelection});n.data(\"folderLevel\",-1),n.data(\"controller\",this),this.getView().byId(\"folderStructureBreadcrumbs\").addLink(n);for(var l=!0,g=0,h=this.folderPathMap.length;g<h;g++){r&&g===h-1&&(l=!1);var n=new p({text:this.folderPathMap[g].folderName,press:this.onFolderStructureLinkSelection,enabled:l});n.data(\"folderLevel\",g),n.data(\"controller\",this),this.getView().byId(\"folderStructureBreadcrumbs\").addLink(n)}if(r)return;s=this.actualFolderStructureData[this.selectedFolderStructureId].subfolder?this.actualFolderStructureData[this.selectedFolderStructureId].subfolder:this.folderStructureData,this.actualFolderStructureData=s;for(var g=0,h=s.length;g<h;g++)if(s[g].name){if(s[g].subfolder){o=!1;for(var d=0,c=s[g].subfolder.length;d<c;d++)s[g].subfolder[d].name&&(o=!0)}else o=!1;a.push({id:g,name:s[g].name,hasSubFolder:o})}this.getView().getModel(\"applicationFolderStructure\").setData(a),this.getView().getModel(\"applicationFolderStructure\").refresh()}},onFolderStructureCancel:function(){this.getView().byId(\"bFolderStructureSelect\").detachPress(this.onVersionFolderAccept,this),this.getView().byId(\"applicationFolderStructure\").close()},onVersionFolderAccept:function(){var e=this.getView().byId(\"folderStructureBreadcrumbs\").getLinks(),t=\"[root]\";if(e.length)for(var i=1,s=e.length;i<s;i++)t=t+\"/\"+e[i].getText();t+=\"/\",this.getView().byId(\"versionFolder\").setValue(t),t.length>0&&this.getView().byId(\"versionIsBuild\").setEnabled(!0),this.getView().byId(\"bFolderStructureSelect\").detachPress(this.onVersionFolderAccept,this),this.getView().byId(\"applicationFolderStructure\").close()},onBuildSelection:function(){if(!this.getView().byId(\"versionIsBuild\").getSelected())return this.getView().byId(\"versionCompPathValue\").setVisible(!1),this.getView().byId(\"versionCompPathValue\").setEditable(!1),this.messagesReset(),!1;this.setBusyVersionChange(!0);var e={appFolder:this.getView().getModel(\"applicationDetail\").getProperty(\"/app_directory\"),srcPath:this.getView().byId(\"versionFolder\").getValue().replace(\"[root]\",\"\")},t=this;jQuery.ajax({type:\"POST\",contentType:\"application/json\",url:this.getGlobalProperty(\"/host\")+this.getGlobalProperty(\"/route-versionComponent\"),dataType:\"json\",async:!0,data:JSON.stringify(e),success:function(e){t.setInputValue(\"versionCompPathValue\",t.responseParse(e).path),t.showMessageToast(t.responseParse(e)),t.setBusyVersionChange(!1),t.getView().byId(\"versionCompPathLabel\").setVisible(!0),t.getView().byId(\"versionCompPathValue\").setVisible(!0),t.getView().byId(\"versionCompPathValue\").setEditable(!1)},error:function(e){t.setBusyVersionChange(!1),t.showMessagePopover([t.responseParse(e)],!0,!0,\"bShowMessagesVersion\"),n.error(t.getI18nText(\"AppDetail.versionCompPathNotFound\"),{icon:n.Icon.ERROR,title:t.getI18nText(\"AppDetail.versionCompPath\"),actions:[n.Action.CLOSE],styleClass:\"sapUiSizeCompact\",initialFocus:n.Action.CLOSE}),t.getView().byId(\"versionCompPathLabel\").setVisible(!0),t.getView().byId(\"versionCompPathValue\").setVisible(!0),t.getView().byId(\"versionCompPathValue\").setEditable(!0)}})},onVersionSave:function(){if(\"POST\"===this.versionActionType||\"PUT\"===this.versionActionType){if(!this.checkInputValue([\"versionName\"]))return!1;if(!this.checkInputValue([\"versionFolder\"]))return!1;if(this.getView().byId(\"versionIsBuild\").getSelected()&&\"POST\"===this.versionActionType&&!this.checkInputValue([\"versionCompPathValue\"]))return!1}this.messagesReset();var e=this.getView().getModel(\"applicationDetail\").getProperty(\"/name\"),t=this.getView().getModel(\"applicationDetail\").getProperty(\"/app_directory\"),i=this.selectedVersion,s=this.getInputValue(\"versionFolder\").replace(\"[root]\",\"\"),a={appName:e,appFolder:t,versionId:i,versionName:this.getInputValue(\"versionName\"),versionDescription:this.getInputValue(\"versionDescription\"),isBuild:this.getView().byId(\"versionIsBuild\").getSelected(),pathPrefix:this.getInputValue(\"versionCompPathValue\"),versionFolder:s};if(\"POST\"!==this.versionActionType&&\"PUT\"!==this.versionActionType||this.setBusyVersionChange(!0),\"POST\"===this.versionActionType||\"PUT\"===this.versionActionType||\"DELETE\"===this.versionActionType){var o=this;jQuery.ajax({type:o.versionActionType,contentType:\"application/json\",url:this.getGlobalProperty(\"/host\")+this.getGlobalProperty(\"/route-applicationVersion\"),dataType:\"json\",async:!0,data:JSON.stringify(a),success:function(t){var i=o.getGlobalProperty(\"/host\")+o.getGlobalProperty(\"/route-applicationsList\");o.getView().getModel(\"applicationsList\").loadData(i),o.getView().getModel(\"applicationsList\").refresh(!0),o.getView().getModel(\"applicationsList\").attachEventOnce(\"requestCompleted\",function(t){o.getDetailData(e)},o),o.showMessageToast(o.responseParse(t)),o.selectedVersion=!1,o.getView().byId(\"versionList\").removeSelections(),o.setVersionViewState(),o.toggleVersionButtons(),\"POST\"!==o.versionActionType&&\"PUT\"!==o.versionActionType||(o.setBusyVersionChange(!1),o.getView().byId(\"versionDataChange\").close()),o.versionActionType=!1},error:function(e){\"POST\"===o.versionActionType||\"PUT\"===o.versionActionType?(o.setBusyVersionChange(!1),o.showMessagePopover([o.responseParse(e)],!0,!1,\"bShowMessagesVersion\")):o.showMessagePopover([o.responseParse(e)],!0,!1,\"bShowMessages\")}})}},onVersionNameCheck:function(e){var t=e.getSource().getValue();return this.validateVersionName(t)?(e.getSource().setValueStateText(this.getI18nText(\"AppDetail.valueCheckVersionName\")),e.getSource().setValueState(sap.ui.core.ValueState.None),this.getView().byId(\"bVersionSave\").setEnabled(!0),!0):(e.getSource().setValueStateText(this.getI18nText(\"AppDetail.valueCheckVersionNameLength\")),e.getSource().setValueState(sap.ui.core.ValueState.Error),this.getView().byId(\"bVersionSave\").setEnabled(!1),!1)},validateVersionName:function(e){return/^[\\w-.]{1,20}$/.test(e)},setBusyVersionChange:function(e){var t=this;setTimeout(function(){t.getView().byId(\"versionDataChange\").setBusy(e)},0)},onVersionItemSelection:function(e){this.selectedVersion=e.getParameters().listItem.data(\"versionId\"),this.selectedVersionListItem=e.getParameters().listItem,this.toggleVersionButtons()},onVersionDeploymentHistorySelection:function(e){this.selectedVersion=e.getSource().data(\"versionId\");for(var t=this.getView().getModel(\"applicationDetail\").getProperty(\"/versions\"),i=0,s=t.length;i<s;i++)t[i].version_directory===this.selectedVersion&&this.getView().getModel(\"sapDeploymentsHistory\").setData(t[i].deployments);this.versionDeploymentsHistory||(this.versionDeploymentsHistory=sap.ui.xmlfragment(\"com.oprtnl.ui5locserv.view.VersionDeploymentHistory\",this),this.getView().addDependent(this.versionDeploymentsHistory),jQuery.sap.syncStyleClass(this.getView().getController().getContentDensityClass(),this.getView(),this.versionDeploymentsHistory)),this.versionDeploymentsHistory.open()},onVersionDeploymentHistoryClose:function(){this.getView().getModel(\"sapDeploymentsHistory\").setData([]),this.versionDeploymentsHistory.close()},onDeploymentHistoryItemPress:function(e){var t=e.getSource().data(\"bspAppUrl\");this.bspAppUrlView||(this.bspAppUrlView=sap.ui.xmlfragment(\"com.oprtnl.ui5locserv.view.BspAppUrlView\",this),this.getView().addDependent(this.bspAppUrlView),jQuery.sap.syncStyleClass(this.getView().getController().getContentDensityClass(),this.getView(),this.bspAppUrlView)),this.bspAppUrlView.getAggregation(\"content\")[0].setValue(t),this.bspAppUrlView.openBy(e.getSource())},onBspUrlCopy:function(e){var t=this.bspAppUrlView.getAggregation(\"content\")[0].getValue();if(!t)return this.showMessageToast({message:this.getI18nText(\"AppDetail.bspUrlCopyFailed\")}),!1;var i=document.createElement(\"textarea\");i.style.position=\"fixed\",i.style.top=0,i.style.left=0,i.style.width=\"2em\",i.style.height=\"2em\",i.style.padding=0,i.style.border=\"none\",i.style.outline=\"none\",i.style.boxShadow=\"none\",i.style.background=\"transparent\",i.value=t,document.body.appendChild(i),i.select();try{document.execCommand(\"copy\");this.showMessageToast({message:this.getI18nText(\"AppDetail.bspUrlCopySuccessful\")})}catch(e){this.showMessageToast({message:this.getI18nText(\"AppDetail.bspUrlCopyFailed\")})}document.body.removeChild(i)},onBspUrlLink:function(e){var t=this.bspAppUrlView.getAggregation(\"content\")[0].getValue();window.open(t,\"_blank\")},onVersionChange:function(){var e=this.getView();this.oVersionData=e.byId(\"versionDataChange\"),this.oVersionData||(this.oVersionData=sap.ui.xmlfragment(e.getId(),\"com.oprtnl.ui5locserv.view.AppVersionDataChange\",this),e.addDependent(this.oVersionData),jQuery.sap.syncStyleClass(this.getView().getController().getContentDensityClass(),this.getView(),this.oVersionData)),this.valuesVersionDataReset();for(var t=this.getView().getModel(\"applicationDetail\").getProperty(\"/versions\"),i=0,s=t.length;i<s;i++)t[i].version_directory===this.selectedVersion&&(this.setInputValue(\"versionName\",t[i].name),this.setInputValue(\"versionDescription\",t[i].description),this.setInputValue(\"versionFolder\",t[i].path),t[i].build&&this.getView().byId(\"versionIsBuild\").setSelected(!0));this.getView().byId(\"bVersionFolder\").setEnabled(!1),this.getView().byId(\"versionIsBuild\").setEditable(!1),this.versionActionType=\"PUT\",this.oVersionData.open()},onVersionDelete:function(){var e=this.getView(),t=e.byId(\"versionDataChange\");t||(t=sap.ui.xmlfragment(e.getId(),\"com.oprtnl.ui5locserv.view.AppVersionDataChange\",this),e.addDependent(t),jQuery.sap.syncStyleClass(this.getView().getController().getContentDensityClass(),this.getView(),t)),this.valuesVersionDataReset(),this.versionActionType=\"DELETE\",this.onVersionSave()},onVersionSapDeploy:function(){var e=this.getView();this.oVersionDeploy=e.byId(\"versionDeploy\"),this.oVersionDeploy||(this.oVersionDeploy=sap.ui.xmlfragment(e.getId(),\"com.oprtnl.ui5locserv.view.AppVersionDeploy\",this),e.addDependent(this.oVersionDeploy),jQuery.sap.syncStyleClass(this.getView().getController().getContentDensityClass(),this.getView(),this.oVersionDeploy)),this.valuesVersionDeployDataReset();for(var t=this.getView().getModel(\"applicationDetail\").getProperty(\"/versions\"),i=0,s=t.length;i<s;i++)t[i].version_directory===this.selectedVersion&&(this.setInputValue(\"deployVersionName\",t[i].name),this.setInputValue(\"deployVersionDescription\",t[i].description));this.oVersionDeploy.open()},valuesVersionDeployDataReset:function(){this.valuesCleanup([\"deployVersionName\",\"deployVersionDescription\",\"deployVersionSystem\"]),this.messagesReset()},onValueHelpVersionDeploySystem:function(e){this.inputId=e.getSource().getId(),this.valueHelpDialogSystemFilter||(this.valueHelpDialogSystemFilter=sap.ui.xmlfragment(\"com.oprtnl.ui5locserv.view.HelpFilterSystem\",this),this.getView().addDependent(this.valueHelpDialogSystemFilter),jQuery.sap.syncStyleClass(this.getView().getController().getContentDensityClass(),this.getView(),this.valueHelpDialogSystemFilter)),this.valueHelpDialogSystemFilter.getBinding(\"items\").filter([]),this.valueHelpDialogSystemFilter.open()},onValueHelpSystemSearch:function(e){var t=e.getParameter(\"value\");e.getSource().getBinding(\"items\").filter(new sap.ui.model.Filter({filters:[new sap.ui.model.Filter(\"description\",sap.ui.model.FilterOperator.Contains,t),new sap.ui.model.Filter(\"url\",sap.ui.model.FilterOperator.Contains,t)],and:!1}))},onValueHelpSystemFilterClose:function(e){var t=e.getParameter(\"selectedItem\");if(t){var i=this.getView().byId(this.inputId);i.setValue(t.getTitle()),i.data(\"sapSystemUrl\",t.getDescription()),i.data(\"bspUrlPattern\",t.data(\"bspUrlPattern\"))}e.getSource().getBinding(\"items\").filter([])},onValueHelpVersionDeployBspApp:function(e){this.inputId=e.getSource().getId(),this.valueHelpDialogBspAppFilter||(this.valueHelpDialogBspAppFilter=sap.ui.xmlfragment(\"com.oprtnl.ui5locserv.view.HelpFilterBspApp\",this),this.getView().addDependent(this.valueHelpDialogBspAppFilter),jQuery.sap.syncStyleClass(this.getView().getController().getContentDensityClass(),this.getView(),this.valueHelpDialogBspAppFilter)),this.valueHelpDialogBspAppFilter.getBinding(\"items\").filter([]),this.valueHelpDialogBspAppFilter.open()},onValueHelpBspAppSearch:function(e){var t=e.getParameter(\"value\");e.getSource().getBinding(\"items\").filter(new sap.ui.model.Filter({filters:[new sap.ui.model.Filter(\"description\",sap.ui.model.FilterOperator.Contains,t),new sap.ui.model.Filter(\"name\",sap.ui.model.FilterOperator.Contains,t)],and:!1}))},onValueHelpBspAppFilterClose:function(e){var t=e.getParameter(\"selectedItem\");if(t){var i=this.getView().byId(this.inputId);i.setValue(t.getTitle()),i.data(\"id\",t.data(\"id\")),this.getTransportsList()}e.getSource().getBinding(\"items\").filter([])},startTransportsCollection:function(){this.getInputValue(\"bspAppNameNew\")&&this.getInputValue(\"bspAppPackage\")&&this.getTransportsList()},onValueHelpVersionDeployPackage:function(e){this.inputId=e.getSource().getId(),this.valueHelpDialogPackageFilter||(this.valueHelpDialogPackageFilter=sap.ui.xmlfragment(\"com.oprtnl.ui5locserv.view.HelpFilterPackage\",this),this.getView().addDependent(this.valueHelpDialogPackageFilter),jQuery.sap.syncStyleClass(this.getView().getController().getContentDensityClass(),this.getView(),this.valueHelpDialogPackageFilter)),this.valueHelpDialogPackageFilter.getBinding(\"items\").filter([]),this.valueHelpDialogPackageFilter.open()},onValueHelpPackageSearch:function(e){var t=e.getParameter(\"value\");e.getSource().getBinding(\"items\").filter(new sap.ui.model.Filter({filters:[new sap.ui.model.Filter(\"description\",sap.ui.model.FilterOperator.Contains,t),new sap.ui.model.Filter(\"name\",sap.ui.model.FilterOperator.Contains,t)],and:!1}))},onValueHelpPackageFilterClose:function(e){var t=e.getParameter(\"selectedItem\");if(t){var i=this.getView().byId(this.inputId);i.setValue(t.getTitle()),i.data(\"id\",t.data(\"id\")),this.startTransportsCollection()}e.getSource().getBinding(\"items\").filter([])},onValueHelpVersionDeployTransport:function(e){this.inputId=e.getSource().getId(),\nthis.valueHelpDialogTransportFilter||(this.valueHelpDialogTransportFilter=sap.ui.xmlfragment(\"com.oprtnl.ui5locserv.view.HelpFilterTransport\",this),this.getView().addDependent(this.valueHelpDialogTransportFilter),jQuery.sap.syncStyleClass(this.getView().getController().getContentDensityClass(),this.getView(),this.valueHelpDialogTransportFilter)),this.valueHelpDialogTransportFilter.getBinding(\"items\").filter([]),this.valueHelpDialogTransportFilter.open()},onValueHelpTransportSearch:function(e){var t=e.getParameter(\"value\");e.getSource().getBinding(\"items\").filter(new sap.ui.model.Filter({filters:[new sap.ui.model.Filter(\"description\",sap.ui.model.FilterOperator.Contains,t),new sap.ui.model.Filter(\"id\",sap.ui.model.FilterOperator.Contains,t)],and:!1}))},onValueHelpTransportFilterClose:function(e){var t=e.getParameter(\"selectedItem\");if(t){var i=this.getView().byId(this.inputId);i.setValue(t.getTitle()),i.data(\"id\",t.data(\"id\"))}e.getSource().getBinding(\"items\").filter([])},onVersionDeployClose:function(){this.valuesVersionDeployDataReset(),this.getView().byId(\"versionDeploy\").close()},onVersionDeployStart:function(){if(!this.checkInputValue([\"deployVersionSystem\"]))return!1;this.deploymentConfig={systemDescription:this.getInputValue(\"deployVersionSystem\"),systemUrl:this.getView().byId(\"deployVersionSystem\").data(\"sapSystemUrl\"),bspUrlPattern:this.getView().byId(\"deployVersionSystem\").data(\"bspUrlPattern\")},this.messagesReset(),this.valuesVersionDeployDataReset(),this.getView().byId(\"versionDeploy\").close();var e=this.getView();this.oDeployAuthentication=e.byId(\"deploymentBasicAuth\"),this.oDeployAuthentication||(this.oDeployAuthentication=sap.ui.xmlfragment(e.getId(),\"com.oprtnl.ui5locserv.view.BasicAuth\",this),e.addDependent(this.oDeployAuthentication),jQuery.sap.syncStyleClass(this.getView().getController().getContentDensityClass(),this.getView(),this.oDeployAuthentication)),this.setInputValue(\"sapSystemDescription\",this.deploymentConfig.systemDescription),this.valuesCleanup([\"sapDeployUser\",\"sapDeployPassword\"]),this.oDeployAuthentication.open()},onVersionDeployAuthClose:function(){this.valuesCleanup([\"sapSystemDescription\",\"sapDeployUser\",\"sapDeployPassword\"]),this.messagesReset(),this.getView().byId(\"deploymentBasicAuth\").close()},onVersionDeployAuthConfirm:function(){if(!this.checkInputValue([\"sapDeployUser\"]))return!1;if(!this.checkInputValue([\"sapDeployPassword\"]))return!1;this.deploymentConfig.requestHeaders={Authorization:\"Basic \"+btoa(this.getInputValue(\"sapDeployUser\")+\":\"+this.getInputValue(\"sapDeployPassword\"))},this.getView().byId(\"deploymentBasicAuth\").setBusyIndicatorDelay(0),this.getView().byId(\"deploymentBasicAuth\").setBusy(!0);var e={deploymentConfig:this.deploymentConfig},t=this;jQuery.ajax({type:\"POST\",contentType:\"application/json\",url:this.getGlobalProperty(\"/host\")+this.getGlobalProperty(\"/route-bspAppsList\"),dataType:\"json\",async:!0,data:JSON.stringify(e),success:function(e){t.getView().getModel(\"bspApplicationsList\").setData(e),t.messagesReset(),t.getView().byId(\"deploymentBasicAuth\").setBusy(!1),t.valuesCleanup([\"sapSystemDescription\",\"sapDeployUser\",\"sapDeployPassword\"]),t.getView().byId(\"deploymentBasicAuth\").close();var i=t.getView();t.oDeployBsp=i.byId(\"versionDeployBsp\"),t.oDeployBsp||(t.oDeployBsp=sap.ui.xmlfragment(i.getId(),\"com.oprtnl.ui5locserv.view.AppVersionDeployBsp\",t),i.addDependent(t.oDeployBsp),jQuery.sap.syncStyleClass(t.getView().getController().getContentDensityClass(),t.getView(),t.oDeployBsp)),t.messagesReset(),t.valuesCleanup([\"bspAppNameNew\",\"bspAppNameChange\",\"bspAppPackage\",\"deployTransport\",\"bspAppDescription\"]),t.oDeployBsp.open()},error:function(e){t.getView().byId(\"deploymentBasicAuth\").setBusy(!1),t.showMessagePopover([t.responseParse(e)],!0,!1,\"bShowMessagesDeploymentAuthentication\")}})},onVersionDeployCloseBsp:function(){this.valuesCleanup([\"bspAppNameNew\",\"bspAppNameChange\",\"bspAppPackage\",\"deployTransport\",\"bspAppDescription\"]),this.deploymentConfig={},this.messagesReset(),this.getView().byId(\"versionDeployBsp\").close()},onBspApplicationProcType:function(e){e.getParameters().selectedIndex?(this.bspAppDeployTypeNew=!0,this.getView().byId(\"bspAppNameNew\").setVisible(!0),this.getView().byId(\"bspAppDescription\").setVisible(!0),this.getView().byId(\"bspAppDescriptionLabel\").setVisible(!0),this.getView().byId(\"bspAppNameChange\").setVisible(!1),this.valuesCleanup([\"bspAppNameChange\",\"bspAppNameNew\",\"bspAppPackage\",\"bspAppDescription\",\"deployTransport\"]),this.getView().byId(\"bspAppNameChange\").setValue(!1),this.getView().byId(\"bspAppPackageLabel\").setVisible(!0),this.getView().byId(\"bspAppPackage\").setVisible(!0),this.getView().byId(\"deployTransport\").setEnabled(!1)):(this.bspAppDeployTypeNew=!1,this.getView().byId(\"bspAppNameNew\").setVisible(!1),this.getView().byId(\"bspAppDescription\").setVisible(!1),this.getView().byId(\"bspAppDescriptionLabel\").setVisible(!1),this.getView().byId(\"bspAppNameChange\").setVisible(!0),this.valuesCleanup([\"bspAppNameChange\",\"bspAppNameNew\",\"bspAppPackage\",\"bspAppDescription\",\"deployTransport\"]),this.getView().byId(\"bspAppPackageLabel\").setVisible(!1),this.getView().byId(\"bspAppPackage\").setVisible(!1),this.getView().byId(\"deployTransport\").setEnabled(!1))},validateBspAppName:function(e){return/^[\\w\\/]{1,15}$/.test(e)},onBspAppNameCheck:function(e){var t=e.getSource().getValue();return this.validateBspAppName(t)?(e.getSource().setValueStateText(this.getI18nText(\"AppDetail.bspAppNameCheck\")),e.getSource().setValueState(sap.ui.core.ValueState.None),this.getView().byId(\"bVersionDeployStartBsp\").setEnabled(!0),this.startTransportsCollection(),!0):(e.getSource().setValueStateText(this.getI18nText(\"AppDetail.bspAppNameCheck\")),e.getSource().setValueState(sap.ui.core.ValueState.Error),this.getView().byId(\"bVersionDeployStartBsp\").setEnabled(!1),!1)},getTransportsList:function(){if(this.deploymentConfig.bspProperties={},this.bspAppDeployTypeNew){if(!this.checkInputValue([\"bspAppNameNew\"]))return!1;if(!this.checkInputValue([\"bspAppPackage\"]))return!1;this.deploymentConfig.bspProperties.bspApplication=this.getInputValue(\"bspAppNameNew\"),this.deploymentConfig.bspProperties.bspAppPackage=this.getInputValue(\"bspAppPackage\")}else{if(!this.checkInputValue([\"bspAppNameChange\"]))return!1;this.deploymentConfig.bspProperties.bspApplication=this.getInputValue(\"bspAppNameChange\")}this.valuesCleanup([\"deployTransport\"]),this.messagesReset();var e={deploymentConfig:this.deploymentConfig},t=this.getGlobalProperty(\"/host\")+this.getGlobalProperty(\"/route-transportsList\");this.getView().byId(\"versionDeployBsp\").setBusy(!0),this.getView().byId(\"versionDeployBsp\").setBusyIndicatorDelay(0);var i=this;jQuery.ajax({type:\"POST\",contentType:\"application/json\",url:t,dataType:\"json\",async:!0,data:JSON.stringify(e),success:function(e){e.locks.length?i.getView().getModel(\"sapTransportsList\").setData(e.locks):e.requests.length&&i.getView().getModel(\"sapTransportsList\").setData(e.requests),e.messages.length&&i.showMessagePopover(e.messages,!0,!1,\"bShowMessagesVersionDeploymentBsp\"),i.showMessageToast(i.getI18nText(\"AppDetail.transportsListReady\")),i.getView().byId(\"deployTransport\").setEnabled(!0),i.getView().byId(\"versionDeployBsp\").setBusy(!1)},error:function(e){i.getView().byId(\"versionDeployBsp\").setBusy(!1),i.showMessagePopover([i.responseParse(e)],!0,!1,\"bShowMessagesVersionDeploymentBsp\")}})},onVersionDeployStartBsp:function(){if(this.deploymentConfig.bspProperties={},this.bspAppDeployTypeNew||(this.bspAppDeployTypeNew=!1),this.bspAppDeployTypeNew){if(!this.checkInputValue([\"bspAppNameNew\"]))return!1;if(!this.checkInputValue([\"bspAppPackage\"]))return!1;this.deploymentConfig.bspProperties.bspApplication=this.getInputValue(\"bspAppNameNew\"),this.deploymentConfig.bspProperties.bspAppPackage=this.getInputValue(\"bspAppPackage\"),this.deploymentConfig.bspProperties.bspAppDescritpion=this.getInputValue(\"bspAppDescription\"),this.deploymentConfig.bspProperties.isNewApp=!0}else{if(!this.checkInputValue([\"bspAppNameChange\"]))return!1;this.deploymentConfig.bspProperties.bspApplication=this.getInputValue(\"bspAppNameChange\"),this.deploymentConfig.bspProperties.bspApplicationId=this.getView().byId(\"bspAppNameChange\").data(\"id\"),this.deploymentConfig.bspProperties.isNewApp=!1}if(!this.checkInputValue([\"deployTransport\"]))return!1;this.deploymentConfig.bspProperties.bspTransport=this.getInputValue(\"deployTransport\"),this.deploymentConfig.bspProperties.versionDirectory=this.selectedVersion,this.messagesReset();var e={adtConfig:this.deploymentConfig},t=this.bspAppDeployTypeNew?this.getGlobalProperty(\"/host\")+this.getGlobalProperty(\"/route-versionDeployNew\"):this.getGlobalProperty(\"/host\")+this.getGlobalProperty(\"/route-versionDeployChange\");this.getView().byId(\"versionDeployBsp\").setBusy(!0),this.getView().byId(\"versionDeployBsp\").setBusyIndicatorDelay(0);var i=this;jQuery.ajax({type:\"POST\",contentType:\"application/json\",url:t,dataType:\"json\",async:!0,data:JSON.stringify(e),success:function(e){i.getView().getModel(\"deploySyncCheckList\").setData(e),i.showMessageToast(i.getI18nText(\"AppDetail.synchronizationListReady\")),i.getView().byId(\"versionList\").removeSelections(),i.setVersionViewState(),i.toggleVersionButtons(),i.getView().byId(\"versionDeployBsp\").setBusy(!1),i.getView().byId(\"versionDeployBsp\").close();var t=i.getView();i.oDeploySync=t.byId(\"versionDeploySync\"),i.oDeploySync||(i.oDeploySync=sap.ui.xmlfragment(t.getId(),\"com.oprtnl.ui5locserv.view.AppVersionDeploySync\",i),t.addDependent(i.oDeploySync),jQuery.sap.syncStyleClass(i.getView().getController().getContentDensityClass(),i.getView(),i.oDeploySync)),i.oDeploySync.open()},error:function(e){i.getView().byId(\"versionDeployBsp\").setBusy(!1),i.showMessagePopover([i.responseParse(e)],!0,!1,\"bShowMessagesVersionDeploymentBsp\")}})},onVersionDeploySyncCancel:function(){this.deploymentConfig={},this.messagesReset(),this.getView().byId(\"versionDeploySync\").close()},onVersionDeploySyncOk:function(){this.messagesReset();var e={deploymentConfig:this.deploymentConfig,deploymentSync:this.getView().getModel(\"deploySyncCheckList\").getData(),versionId:this.selectedVersion,appName:this.getView().getModel(\"applicationDetail\").getProperty(\"/name\")};this.getView().byId(\"versionDeploySync\").setBusy(!0),this.getView().byId(\"versionDeploySync\").setBusyIndicatorDelay(0);var t=this.getView().getModel(\"applicationDetail\").getProperty(\"/name\"),i=this;jQuery.ajax({type:\"POST\",contentType:\"application/json\",url:this.getGlobalProperty(\"/host\")+this.getGlobalProperty(\"/route-versionDeploySubmit\"),dataType:\"json\",async:!0,data:JSON.stringify(e),success:function(e){i.showMessageToast(i.responseParse(e)),i.getView().getModel(\"deploySyncCheckList\").setData({}),i.selectedVersion=!1,i.getView().byId(\"versionList\").removeSelections(),i.setVersionViewState(),i.toggleVersionButtons();var s=i.getGlobalProperty(\"/host\")+i.getGlobalProperty(\"/route-applicationsList\");i.getView().getModel(\"applicationsList\").loadData(s),i.getView().getModel(\"applicationsList\").refresh(!0),i.getView().getModel(\"applicationsList\").attachEventOnce(\"requestCompleted\",function(e){i.getDetailData(t)},i),i.getView().byId(\"versionDeploySync\").setBusy(!1),i.getView().byId(\"versionDeploySync\").close()},error:function(e){i.getView().byId(\"versionDeploySync\").setBusy(!1),i.showMessagePopover([i.responseParse(e)],!0,!1,\"bShowMessagesVersionDeploymentSync\")}})},onBackButton:function(){var e=this;this.isChangeActive?n.warning(e.getI18nText(\"AppDetail.appChangesLost\"),{icon:n.Icon.WARNING,title:e.getI18nText(\"AppDetail.appChangesLostHead\"),actions:[n.Action.OK,n.Action.CANCEL],styleClass:\"sapUiSizeCompact\",initialFocus:n.Action.CLOSE,onClose:function(t){if(t===n.Action.CANCEL)return!1;e.onBackConfirmed()}}):this.onBackConfirmed()},onBackConfirmed:function(){this.appDetailFragmentView(),this.toggleDetailChangeButtons(!1),this.isChangeActive=!1,this.globalBusyOn(),this.getRouter(this).navTo(\"appList\")},onNewAppTag:function(e){var t=this.getView().byId(\"appAddTag\").getValue();if(!t)return!1;var i=this.getView().getModel(\"applicationDetail\").getData();i.tags||(i.tags=[]),-1==i.tags.findIndex(function(e){return e.name==t})&&i.tags.push({name:t}),this.getView().getModel(\"applicationDetail\").refresh(),this.getView().byId(\"appAddTag\").setValue(\"\")},onTagDelete:function(e){var t=e.getParameters(\"removedTokens\");if(\"removed\"==t.type){this.getView().byId(\"appTags\").getTokens();if(e.getParameters(\"removedTokens\"))for(var i=t.token.getProperty(\"key\"),s=this.getView().getModel(\"applicationDetail\").getData().tags?this.getView().getModel(\"applicationDetail\").getData().tags:[],a=0,o=s.length;a<o;a++)if(s[a].name===i){s.splice(a,1);break}}},onTagSuggestionSelected:function(e){var t=e.getParameter(\"selectedItem\"),i=t.getProperty(\"text\");if(!i)return!1;var s=this.getView().getModel(\"applicationDetail\").getData();s.tags||(s.tags=[]),-1==s.tags.findIndex(function(e){return e.name==i})&&s.tags.push({name:i}),this.getView().getModel(\"applicationDetail\").refresh(),this.getView().byId(\"appAddTag\").setValue(\"\")},onValueHelpTag:function(e){this.inputId=e.getSource().getId(),this.valueHelpTagilter||(this.valueHelpTagilter=sap.ui.xmlfragment(\"com.oprtnl.ui5locserv.view.HelpTag\",this),this.getView().addDependent(this.valueHelpTagilter),jQuery.sap.syncStyleClass(this.getView().getController().getContentDensityClass(),this.getView(),this.valueHelpTagilter)),this.valueHelpTagilter.getBinding(\"items\").filter([]),this.valueHelpTagilter.open()},onValueHelpTagFilterClose:function(e){var t=e.getParameter(\"selectedItem\");if(t){this.getView().byId(this.inputId).setValue(t.getTitle())}e.getSource().getBinding(\"items\").filter([])},onValueHelpTagSearch:function(e){var t=e.getParameter(\"value\");e.getSource().getBinding(\"items\").filter(new sap.ui.model.Filter({filters:[new sap.ui.model.Filter(\"name\",sap.ui.model.FilterOperator.Contains,t)],and:!1}))}})});",
"com/oprtnl/ui5locserv/controller/AppList.controller.js": "sap.ui.define([\"com/oprtnl/ui5locserv/controller/BaseController\",\"com/oprtnl/ui5locserv/model/formatter\",\"sap/m/MessagePopover\",\"sap/m/MessagePopoverItem\"],function(e,t,s,a){\"use strict\";return e.extend(\"com.oprtnl.ui5locserv.controller.AppList\",{formatter:t,onInit:function(){this.globalBusyOn();var e=this.getRouter(this);e.getRoute(\"root\").attachPatternMatched(this.onObjectMatched,this),e.getRoute(\"appList\").attachPatternMatched(this.onObjectMatched,this)},onBeforeRendering:function(){},onObjectMatched:function(e){var t=this,s=this.getGlobalProperty(\"/host\")+this.getGlobalProperty(\"/route-serverConfig\");this.getView().getModel(\"serverConfig\").loadData(s),this.getView().getModel(\"serverConfig\").refresh(!0);var a=this.getGlobalProperty(\"/host\")+this.getGlobalProperty(\"/route-applicationsList\");this.getView().getModel(\"applicationsList\").loadData(a),this.getView().getModel(\"applicationsList\").attachRequestCompleted(this.appListLoaded),this.getView().getModel(\"applicationsList\").refresh(!0);var i=this.getGlobalProperty(\"/host\")+this.getGlobalProperty(\"/route-sapSystemsList\");this.getView().getModel(\"sapSystemsList\").loadData(i),this.getView().getModel(\"sapSystemsList\").refresh(!0);var o=this.getGlobalProperty(\"/host\")+this.getGlobalProperty(\"/route-proxyList\");this.getView().getModel(\"reverseProxyList\").loadData(o),this.getView().getModel(\"reverseProxyList\").refresh(!0),this.messagesReset(),setTimeout(function(){t.globalBusyOff()},0)},onAfterRendering:function(){sap.ui.Device.system.phone&&this.showMessagePopover([{status:\"Warning\",message:this.getI18nText(\"Signup.mobileCheck\")}],!0)},onAppTitlePress:function(e){this.globalBusyOn(),this.getRouter(this).navTo(\"appDetail\",{appName:e.getSource().data(\"appName\")})},onCustomListItemPress:function(e){this.globalBusyOn(),this.getRouter(this).navTo(\"appDetail