TimeTrex/interface/html5/dist/wizard-install-InstallWizardController.bundle.js

1 line
198 KiB
JavaScript
Raw Permalink Normal View History

2022-12-13 07:10:06 +01:00
"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["wizard-install-InstallWizardController"],{6868:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"InstallWizardController\": () => (/* binding */ InstallWizardController)\n/* harmony export */ });\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\nclass InstallWizardController extends BaseWizardController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '.install-wizard',\n\n\t\t\ttype_array: null,\n\n\t\t\tcountry_array: null,\n\n\t\t\ttime_zone_array: null,\n\n\t\t\texternal_installer: null,\n\n\t\t\tcompany_id: null,\n\n\t\t\tuser_id: null,\n\n\t\t\tedit_view_error_ui_dic: {},\n\n\n\t\t} );\n\n\t\tsuper( options );\n\t}\n\n\tinit( options ) {\n\t\t//this._super('initialize', options );\n\t\tthis.title_1 = $( this.el ).find( '.title-1' );\n\t\tthis.steps = 5;\n\t\tthis.script_name = 'wizard_install';\n\t\tthis.wizard_id = 'InstallWizard';\n\t\tthis.api = TTAPI.APIInstall;\n\t\tServiceCaller.extra_url = '&disable_db=1';\n\t\tif ( _.size( LocalCacheData.getAllURLArgs() ) > 0 ) {\n\t\t\tvar url_args = LocalCacheData.getAllURLArgs();\n\t\t\tthis.current_step = url_args.a;\n\t\t\tthis.external_installer = url_args.external_installer;\n\t\t} else {\n\t\t\tthis.current_step = 'license';\n\t\t\tthis.external_installer = 0;\n\t\t}\n\n\t\tthis.render();\n\t}\n\n\trender() {\n\t\tvar $this = this;\n\t\tvar title = $( this.el ).find( '.title' );\n\n\t\tthis.next_btn = $( this.el ).find( '.forward-btn' );\n\t\tthis.back_btn = $( this.el ).find( '.back-btn' );\n\t\tthis.done_btn = $( this.el ).find( '.done-btn' );\n\n\t\ttitle.text( $.i18n._( 'Install Wizard' ) );\n\n\t\tthis.initCurrentStep();\n\t}\n\n\tinitCurrentStep( step ) {\n\t\tvar $this = this;\n\n\t\tif ( step ) {\n\t\t} else {\n\t\t\tstep = this.current_step;\n\t\t}\n\n\t\tProgressBar.showOverlay();\n\n\t\tswitch ( step ) {\n\t\t\tcase 'license':\n\t\t\t\tthis.api.getLicense( {\n\t\t\t\t\tonResult: function( res ) {\n\t\t\t\t\t\t$this.stepsDataDic[$this.current_step] = res.getResult();\n\t\t\t\t\t\t$this._initCurrentStep();\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\tbreak;\n\t\t\tcase 'requirements':\n\t\t\t\tthis.api.getRequirements( this.external_installer, {\n\t\t\t\t\tonResult: function( res ) {\n\t\t\t\t\t\tif ( res.isValid() ) {\n\t\t\t\t\t\t\tif ( res.getResult().action ) {\n\t\t\t\t\t\t\t\t$this.onNextClick();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$this.stepsDataDic[$this.current_step] = res.getResult();\n\t\t\t\t\t\t\t\t$this._initCurrentStep();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this.current_step = 'license';\n\t\t\t\t\t\t\t$this.initCurrentStep();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\tbreak;\n\t\t\tcase 'databaseSchema':\n\t\t\t\tServiceCaller.extra_url = false;\n\t\t\t\tthis.api.getDatabaseSchema( {\n\t\t\t\t\tonResult: function( res ) {\n\t\t\t\t\t\tif ( res.isValid() ) {\n\t\t\t\t\t\t\t$this.stepsDataDic[$this.current_step] = res.getResult();\n\t\t\t\t\t\t\t$this._initCurrentStep();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this.current_step = 'license';\n\t\t\t\t\t\t\t$this.initCurrentStep();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\tbreak;\n\t\t\tcase 'databaseConfig':\n\t\t\t\tthis.api.getDatabaseConfig( {\n\t\t\t\t\tonResult: function( res ) {\n\t\t\t\t\t\tif ( res.isValid() ) {\n\t\t\t\t\t\t\t$this.stepsDataDic[$this.current_step] = res.getResult();\n\t\t\t\t\t\t\t$this.type_array = res.getResult().type_options;\n\t\t\t\t\t\t\t$this._initCurrentStep();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this.current_step = 'license';\n\t\t\t\t\t\t\t$this.initCurrentStep();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\tbreak;\n\t\t\tcase 'postUpgrade':\n\t\t\t\tthis.api.postUpgrade( {\n\t\t\t\t\tonResult: function( res ) {\n\t\t\t\t\t\tif ( res.isValid() ) {\n\t\t\t\t\t\t\t$this.stepsDataDic[$this.