vesta/web/static/js/main.0b1695fb.chunk.js.map
2021-11-01 23:41:59 +02:00

1 line
1.2 MiB

{"version":3,"sources":["reducers/MainNavigation/mainNavigationReducer.js","actions/MainNavigation/mainNavigationTypes.js","reducers/ControlPanelContent/controlPanelContentReducer.js","actions/ControlPanelContent/controlPanelContentTypes.js","reducers/Notification/notificationReducer.js","actions/Notification/notificationTypes.js","reducers/MenuCounters/menuCounterReducer.js","actions/MenuCounters/menuCounterTypes.js","reducers/UserSession/userSessionReducer.js","actions/UserSession/userSessionTypes.js","reducers/Session/sessionReducer.js","actions/Session/sessionTypes.js","reducers/rootReducer.js","components/Spinner/Spinner.jsx","components/Path/Dropdown/Dropdown.jsx","components/Path/Path.jsx","components/Lists/Row/Row.jsx","components/Lists/DirectoryList/DirectoryList.jsx","components/ProgressBar/ProgressBar.jsx","components/Hotkeys/Hotkeys.jsx","components/Modal/AddFile.jsx","components/Modal/AddDirectory.jsx","components/Modal/Rename.jsx","components/Modal/Delete.jsx","components/Modal/NothingSelected.jsx","components/Modal/Permissions.jsx","components/Modal/Move.jsx","components/Modal/Archive.jsx","components/Modal/Extract.jsx","components/Modal/Copy.jsx","components/Modal/Replace.jsx","components/Modal/Modal.jsx","components/Menu/Menu.jsx","FileManagerHelper.js","containers/FileManager/FileManager.js","components/Preview/Editor/Editor.jsx","components/Preview/Photo/Photo.jsx","components/Preview/Video/Video.jsx","components/Preview/Preview.jsx","actions/MainNavigation/mainNavigationActions.js","utils/token.js","ControlPanelService/Ip.js","components/ControlPanel/AddItemLayout/Form/SelectInput/SelectInput.jsx","components/ControlPanel/AddItemLayout/Form/TextInput/TextInput.jsx","components/ControlPanel/AddItemLayout/Form/Checkbox/Checkbox.jsx","components/ControlPanel/Container/Container.jsx","components/ControlPanel/AddItemLayout/AddItemLayout.jsx","components/MainNav/Toolbar/Toolbar.jsx","services/session.js","actions/MenuCounters/menuCounterActions.js","components/InternetProtocol/Edit/EditInternetProtocol.jsx","components/InternetProtocol/Add/AddInternetProtocol.jsx","components/ControlPanel/AddItemLayout/Form/TextArea/TextArea.jsx","ControlPanelService/Server.js","components/Server/Edit/Nginx/EditServerNginx.jsx","components/Server/Edit/Postgresql/Postgresql.jsx","ControlPanelService/Backup.js","components/Backup/Exclusion/Edit/index.jsx","actions/ControlPanelContent/controlPanelContentActions.js","components/MainNav/Toolbar/DropdownFilter/DropdownFilter.jsx","components/MainNav/Toolbar/SearchInput/SearchInput.jsx","ControlPanelService/Favorites.js","components/ControlPanel/ListItem/ListItem.jsx","components/InternetProtocol/InternetProtocol.jsx","components/MainNav/Toolbar/LeftButton/LeftButton.jsx","components/MainNav/Toolbar/Checkbox/Checkbox.jsx","components/MainNav/Toolbar/Select/Select.jsx","ControlPanelService/Select.js","components/ControlPanel/Modal/Modal.jsx","containers/InternetProtocols/InternetProtocols.jsx","ControlPanelService/Web.js","components/ControlPanel/AddItemLayout/Form/Password/Password.jsx","components/WebDomain/Add/AdditionalFtpForEditing/AdditionalFtpForEditing.jsx","components/WebDomain/Add/AdditionalFtpWrapper/AdditionalFtpWrapper.jsx","components/WebDomain/Add/SslSupport/SslSupport.jsx","components/WebDomain/Add/AdvancedOptions/AdvancedOptions.jsx","containers/GenerateCSR/index.jsx","components/WebDomain/Add/AddWebDomain.jsx","components/ControlPanel/AddItemLayout/Form/TextInputWithTextOnTheRight/TextInputWithTextOnTheRight.jsx","ControlPanelService/Db.js","components/Database/Edit/EditDatabase.jsx","ControlPanelService/Firewalls.js","components/Firewall/Edit/EditFirewall.jsx","components/ControlPanel/Hotkeys/Hotkeys.jsx","components/Database/Add/AddDatabase.jsx","components/Firewall/Add/AddFirewall.jsx","ControlPanelService/Cron.js","ControlPanelService/GeneratorOptions.js","components/CronJob/Generator/RunCommandSelect/RunCommandSelect.jsx","components/CronJob/Generator/OtherSelects/SecondTabSelects.jsx","components/CronJob/Generator/OtherSelects/ThirdTabSelects.jsx","components/CronJob/Generator/OtherSelects/FourthTabSelects.jsx","components/CronJob/Generator/OtherSelects/FifthTabSelects.jsx","components/CronJob/Generator/OtherSelects/SelectsWrapper.jsx","components/CronJob/Generator/Generator.jsx","components/CronJob/Edit/EditCronJob.jsx","components/ControlPanel/AddItemLayout/Form/TextInputWithExtraButton/TextInputWithExtraButton.jsx","components/ControlPanel/AddItemLayout/Form/NameServers/NameServers.jsx","ControlPanelService/Package.js","components/Package/Edit/EditPackage.jsx","components/Server/Edit/Httpd/EditHttpd.jsx","components/CronJob/Add/AddCronJob.jsx","components/Package/Add/AddPackage.jsx","components/Server/Edit/EditServerWebOption.jsx","components/Server/Edit/EditServerDnsOption.jsx","components/Server/Edit/EditVestaPlugins.jsx","components/Server/Edit/EditVestaSslOption.jsx","components/Server/Edit/EditDatabaseOption.jsx","components/Server/Edit/EditBackupOption.jsx","components/Server/Edit/EditMailOption.jsx","ControlPanelService/ResetPassword.js","actions/Session/sessionActions.js","components/Server/Edit/EditServer.jsx","components/Server/Edit/Dovecot/Dovecot.jsx","ControlPanelService/Mail.js","components/MailAccount/MailInfoBlock/MailInfoBlock.jsx","components/MailAccount/Edit/EditMailAccount.jsx","components/Mail/Edit/EditMail.jsx","containers/EditMailWrapper/EditMailWrapper.jsx","components/Server/Edit/Service/Service.jsx","components/MailAccount/Add/AddMailAccount.jsx","components/Mail/Add/AddMail.jsx","containers/AddMailWrapper/AddMailWrapper.jsx","ControlPanelService/Dns.js","components/DomainNameSystem/Edit/EditDomainNameSystem.jsx","components/DNSRecord/Edit/EditDNSRecord.jsx","containers/EditDNSWrapper/EditDNSWrapper.jsx","components/WebDomain/Edit/SslSupport/SslSupport.jsx","components/WebDomain/Edit/EditWeb.jsx","components/Server/Edit/PHP/EditPhp.jsx","components/Database/Database.jsx","containers/Databases/Databases.jsx","components/Firewall/Firewall.jsx","containers/Firewalls/Firewalls.jsx","ControlPanelService/Users.js","components/User/Edit/EditUser.jsx","components/Server/Edit/Bind9/Bind9.jsx","components/Server/Edit/Mysql/Mysql.jsx","ControlPanelService/UserNS.js","components/DomainNameSystem/Add/AdvancedOptions/AdvancedOptions.jsx","components/DomainNameSystem/Add/AddDomainNameSystem.jsx","components/DNSRecord/Add/AddDNSRecord.jsx","containers/AddDNSWrapper/AddDNSWrapper.jsx","components/Backup/RestoreSetting/RestoreSetting.jsx","components/Backup/RestoreSettings/BackupRestoreSettings.jsx","components/Backup/Backup.jsx","containers/Backups/Backups.jsx","containers/BackupWrapper/BackupWrapper.jsx","components/Firewall/Add/Banlist/index.jsx","components/CronJob/CronJob.jsx","containers/CronJobs/CronJobs.jsx","components/Package/Package.jsx","containers/Packages/Packages.jsx","ControlPanelService/Languages.js","components/User/Add/AddUser.jsx","ControlPanelService/Updates.js","components/Update/Update.jsx","containers/Updates/Updates.jsx","components/Server/ServerSys.jsx","components/Server/Server.jsx","containers/Servers/Servers.jsx","components/MainNav/Stat-menu/Menu.jsx","components/MainNav/Mobile/MobileTopNav.jsx","ControlPanelService/Notifications.js","components/MainNav/Panel/Notifications/Bell.jsx","components/MainNav/Panel/Notifications/BellUnread.jsx","components/MainNav/Panel/Notifications/Notifications.jsx","actions/Notification/notificationActions.js","components/MainNav/Panel/Panel.jsx","components/MainNav/MainNav.jsx","components/Backup/Exclusion/index.jsx","containers/Backups/Exclusions/index.jsx","components/MailAccount/MailAccount.jsx","containers/MailAccounts/MailAccounts.jsx","components/Mail/Mail.jsx","containers/Mails/Mails.jsx","containers/MailWrapper/MailWrapper.jsx","components/DNSRecord/DNSRecord.jsx","containers/DNSRecords/DNSRecords.jsx","components/DomainNameSystem/DomainNameSystem.jsx","containers/DomainNameSystems/DomainNameSystems.jsx","containers/DNSWrapper/DNSWrapper.jsx","ControlPanelService/Statistics.js","components/Statistic/Statistic.jsx","containers/Statistics/Statistics.jsx","components/User/User.jsx","containers/Users/Users.jsx","ControlPanelService/RRD.js","components/RRD/Timer/Timer.jsx","components/RRD/RRD.jsx","containers/RRDs/RRDs.jsx","components/Firewall/Ban/index.jsx","containers/Firewalls/Banlist/index.jsx","components/WebDomain/WebDomain.jsx","containers/Web/Web.jsx","ControlPanelService/Search.js","components/Searchitem/SearchItem.jsx","containers/Search/Search.jsx","ControlPanelService/Logs.js","components/Log/Log.jsx","containers/Logs/Logs.jsx","containers/ControlPanelContent/ControlPanelContent.jsx","components/TopPanel/TopPanel.jsx","ControlPanelService/WebLogs.js","containers/WebLogs/WebLogs.jsx","components/ControlPanel/LoginLayout/LoginLayout.jsx","components/Login/LoginForm.jsx","containers/ServiceInfo/index.jsx","components/ForgotPassword/index.jsx","containers/App/App.js","containers/App/serviceWorker.js","index.js","store.js"],"names":["INITIAL_STATE","focusedElement","activeElement","adminMenuTabs","userMenuTabs","reducer","state","action","type","value","controlPanelFocusedElement","notifications","notificationReducer","user","menuCounterReducer","session","userSessionReducer","token","error","i18n","userName","panel","sessionReducer","combineReducers","mainNavigation","mainNavigationReducer","controlPanelContent","controlPanelContentReducer","menuCounters","userSession","Spinner","className","role","aria-valuenow","aria-valuemin","aria-valuemax","style","width","Dropdown","props","sorting","useSelector","changeSorting","field","order","isActive","sort","size","date","name","class","data-toggle","aria-haspopup","aria-expanded","onClick","Path","path","openDirectory","openDirectoryHandler","index","pathArray","split","undefined","newPath","splice","join","HOME","splitPath","map","item","key","clickablePath","Row","componentDidMount","document","addEventListener","openOnEnter","componentWillUnmount","removeEventListener","e","activeRow","data","isActiveList","modalVisible","cursor","download","keyCode","isArchive","isFile","changePath","openItem","match","history","push","pathname","search","selectRow","permissions","selectMultiple","selectOnClick","ctrlKey","selected","length","sizeFormatter","bytes","decimals","dm","i","Math","floor","log","parseFloat","pow","toFixed","dateFormatter","fDate","Date","getDay","getDate","getMonth","glyph","icon","faJs","faHtml5","faPhp","faSass","faCss3","this","owner","time","Component","connect","withRouter","DirectoryList","orderType","sortingType","itemsSelected","UNSAFE_componentWillMount","localStorage","getItem","list","setState","handleLiSelection","moveBackOnButton","cacheSorting","setItem","moveBack","isHomeDirectory","rootDir","toggleActiveList","changePathAfterToggle","cacheActiveWindowAndPaths","passData","isSelected","indexOf","listing","shiftKey","addToSelection","resetData","addToPath","openCertainDirectory","sortByType","a","b","localeCompare","sortBySize","sortByDate","sortByName","sortData","rows","sortedData","result","duplicate","passSelection","loading","ProgressBar","progress","Hotkeys","useEffect","window","toggleShortcutsLit","reference","event","isSearchInputFocused","querySelector","toggleHotkeys","ref","Shortcuts","AddFile","close","Cancel","save","Create","AddDirectory","autoFocus","Rename","fName","defaultValue","onChange","Delete","items","NothingSelected","notAvailable","defaultPermissions","read","write","execute","group","others","Permissions","decodeSingleNumber","string","number","parseInt","inArray","onChangeForm","checkbox","target","permissionName","checked","inputRef","encode","changePermissions","handleInputChange","isValid","inputInvalid","decode","array","numbers","find","reduce","acc","permissionObject","roleObject","Object","values","n","inputClasses","classNames","id","maxLength","disabled","Move","Archive","Compress","onBlur","Extract","Copy","Replace","files","replace","Modal","closeOutside","hotkeys","closeModal","saveAndClose","onClose","onChangePermissions","file","onChangeValue","modal","getElementById","content","Menu","inputFile","createRef","hotKeys","newFile","openModal","newDirectory","deleteFile","selection","rename","move","archive","extract","copy","itemType","click","matchArchive","to","src","alt","aria-label","multiple","upload","current","UPLOAD","title","DOWNLOAD","RENAME","RIGHTS","COPY","MOVE","ARCHIVE","EXTRACT","DELETE","server","location","origin","validateAction","url","axios","get","getData","encodePath","deleteItems","promisesArray","then","Promise","all","moveItems","targetPath","copyItems","FileManager","currentUser","parsedQueryString","QueryString","parse","ignoreQueryPrefix","substring","FM","currentPath","changeDirectoryOnLoading","switchActiveList","toggleActiveListOnTab","hotkeysListener","activeWindow","cachePaths","leftList","rightList","setStateAsync","updater","resolve","side","changeDirectory","preventDefault","changeQuery","response","showError","message","toast","position","autoClose","hideProgressBar","closeOnClick","pauseOnHover","draggable","itemName","open","checkExistingFileName","selectedFiles","leftListData","rightListData","selectedFileNames","existingFileNames","newFiles","includes","replaceFiles","formData","FormData","append","post","onUploadProgress","progressEvent","uploadPercent","round","loaded","total","onDelete","inputElement","newDir","onRename","modalInputValue","itemPermissions","archiveItem","extractItem","moveItem","targetDir","copyItem","lastIndexOf","activeList","oldPath","changeInputValue","hotkeysPanel","available","modalWindow","inp","DirectoryLists","el","Helmet","onDeleteFileHandler","hotkeysList","classList","toggle","Editor","useHistory","useState","code","hotKey","checkFileType","res","showToast","catch","err","console","text","success","options","mode","pop","getModeFromFileName","lineNumbers","Save","Close","newCode","Photo","activeSlide","photoGallery","imgClass","formatPath","carouselIndicators","imageClasses","data-target","data-slide-to","carouselPhotos","setPhotoGallery","filter","setActiveImage","activeImage","activeImageIndex","data-ride","href","data-slide","aria-hidden","Video","autoPlay","loop","controls","Preview","lastOpenedDirectory","addFocusedElement","addActiveElement","setAuthToken","getAuthToken","BASE_URL","SelectInput","optionalTitle","htmlFor","option","TextInput","inputValue","setInputValue","readOnly","Checkbox","defaultChecked","checkedState","setCheckedState","Container","children","AddItemLayout","status","newDate","day","month","year","getFullYear","renderDate","Toolbar","toolbarHeight","handleToolbar","documentElement","clientWidth","changeToolbarHeight","scrollTop","scrollY","max","mobile","marginTop","checkAuth","uri","refreshCounters","dispatch","getState","reject","EditInternetProtocol","useDispatch","errorMessage","setErrorMessage","okMessage","setOkMessage","dedicated","ip","QS","fetchData","params","getInternetProtocolInfo","submitFormHandler","updatedIP","entries","database","keys","constructor","formDataObject","updateInternetProtocol","error_msg","ok_msg","IP","HtmlParser","onSubmit","netmask","interface","users","nat","Back","AddInternetProtocol","interfaces","newIp","addInternetProtocol","Add","TextArea","rest","handleAction","updateService","getServiceInfo","service","services","EditServerNginx","restart","setRestart","basicOptions","advancedOptions","toggleOptions","onUpdateConfig","regexp","RegExp","updatedConfig","config","SERVER","service_name","updatedService","worker_processes","worker_connections","client_max_body_size","send_timeout","proxy_connect_timeout","proxy_send_timeout","proxy_read_timeout","gzip","gzip_comp_level","charset","config_path","Postgresql","options_path","EditBackupExclusions","updatedExclusions","updateBackupExclusions","BACKUP","web","mail","db","userdir","addControlPanelContentFocusedElement","DropdownFilter","usersList","Username","Disk","Bandwidth","Starred","webList","Domain","dnsList","Expire","Records","mailList","Accounts","mailAccountList","dbList","Database","User","Host","cronList","Command","packagesList","internetProtocolsList","Netmask","Interface","Owner","firewallList","Action","Protocol","Port","Comment","searchList","Name","filterClassName","renderFilters","SearchInput","searchTerm","setSearchTerm","useRef","handleClick","handleSearchTerm","focusInput","focus","addFavorite","unitId","section","deleteFavorite","ListItem","starred","hasOwnProperty","Boolean","toggleItem","checkItem","outdated","suspended","stopped","focused","sysInfo","printDate","leftNameText","toggleFav","InternetProtocol","NAME","FOCUSED","isChecked","DATE","STARRED","NETMASK","INTERFACE","Domains","U_WEB_DOMAINS","Status","STATUS","OWNER","Users","U_SYS_USERS","edit","handleModal","delete_conf","LeftButton","showLeftMenu","renderIcon","toggleAll","toggled","Select","cronReports","listValues","select","rebuild","suspend","unsuspend","delete","backupList","updatesList","update","serverList","stop","start","backupDetailList","restore","banList","statisticsList","renderOptions","bulkAction","show","onSave","onCancel","showSaveButton","showCancelButton","tabindex","aria-labelledby","display","Confirmation","data-dismiss","OK","InternetProtocols","setLoading","visible","actionUrl","setModal","internetProtocols","ipFav","toggledAll","totalAmount","handleContentSelection","handleFocusedElementShortcuts","handleArrowUp","handleArrowDown","initFocusedElement","focusedElementPosition","findIndex","pack","nextFocusedElement","scrollIntoView","behavior","block","handleDelete","handleEdit","currentInternetProtocolData","displayModal","reformatData","internetProtocolsDuplicate","checkedItem","incomingItem","sortArray","sortingColumn","sortBy","ipFavDuplicate","ipNames","internetProtocol","refreshMenuCounters","modalCancelHandler","forEach","term","changeSearchTerm","generateCSRUri","getCsrInitialData","domain","Password","showGenerationButton","hidePassword","generatedPassword","passwordInputHandler","chars","randomNumber","random","substr","generatePassword","Generate","AdditionalFtpForEditing","onDeleteAdditionalFtp","prefixI18N","prePath","username","v_ftp_user","deleted","is_new","v_ftp_password","v_ftp_path","FTP","v_ftp_email","renderForm","AdditionalFtpWrapper","ftps","unCheckAdditionalFtpBox","ftpUserPrePath","additionalFtp","onDeleteFtp","updatedAdditionalFtps","ftp","additionalFtpArrayLength","additionalFtpsDuplicate","addAdditionalFtp","SslSupport","letsEncrypt","setLetsEncrypt","sslCertificate","setModalVisible","sslKey","AdvancedOptions","sslSupport","statisticsAuthCheckbox","statisticsAuth","updatedDomain","aliases","transform","bool","renderSslSupport","webStats","stat","GenerateSSL","generatedData","newCsr","generateCSR","crt","csr","prePopulateInputs","email","country","locality","org","AddWebDomain","dnsSupport","mailSupport","proxySupport","showAdvancedOptions","ssl_crt","ssl_key","proxy_ext","getInternetProtocolNames","ips","stats","prefix","ftp_pre_path","checkboxHandler","input","newWebDomain","addWeb","WEB","required","Aliases","PROXY_SYSTEM","renderAdvancedOptions","TextInputWithTextOnTheRight","dbCharsets","EditDatabase","databaseUserInputValue","getDatabaseInfo","dbuser","updatedDatabase","updateDatabase","DB","password","host","addBanIpsUri","banIps","banIp","EditFirewall","rule","getFirewallInfo","updateFirewall","FIREWALL","protocol","port","comment","AddDatabase","memo","dbTypes","dbHosts","maxCharLength","databaseInputValue","newDatabase","addDatabase","Type","dbType","dbHost","Charset","dbCharset","AddFirewall","actions","protocols","newFirewall","addFirewall","generatorOptions","minutesRunCommandsOptions","every","hoursRunCommandsOptions","daysRunCommandsOptions","hoursOptions","hourlyMinutesOptions","dailyMinutesOptions","weeklyRunCommandOptions","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday","monthlyRunCommandOptions","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","dateOptions","RunCommandSelect","activeTab","selectName","SecondTabSelects","Minute","ThirdTabSelects","Hour","FourthTabSelects","FifthTabSelects","OtherSelects","renderSelects","Generator","formElement","activeClassName","tab","formatLink","job","Minutes","Hourly","Daily","Weekly","Monthly","generatedCronJob","iterableFormElement","EditMail","h_min","h_hour","h_day","h_wday","h_month","getCronJobInfo","min","hour","wday","updatedJob","updateCronJob","changeInput","updatedGeneratedCronJob","CRON","cmd","TextInputWithExtraButton","previousValue","NameServers","nameServersAmount","usersNS","initNameServersAmount","userNS","onDeleteNameServer","nameServersDuplicate","nameServer","nameServersLength","addNameServer","getPackageList","EditPackage","queryParams","package","pkg","toggleUnlimited","inputName","inputNameToUpdate","PACKAGE","updatedPackage","updatePackage","web_system","web_templates","web_template","web_backend","backend_templates","backend_template","proxy_system","proxy_templates","proxy_template","dns_system","dns_templates","dns_template","shells","shell","web_domains","web_aliases","dns_domains","dns_records","mail_domains","mail_accounts","databases","cron_jobs","backups","disk_quota","bandwidth","nameservers","EditHttpd","AddCronJob","newCronJob","addCronJob","Day","Month","AddPackage","webTemplates","webSystem","backendTemplates","backendSystem","proxySystem","proxyTemplates","dnsTemplates","dnsSystem","sshTemplates","webDomains","webAliases","dnsDomains","dnsRecords","mailDomains","mailAccounts","cronJobs","quota","ssh_access","newPackage","addPackage","EditServerWebOption","webBackend","webBackendPool","EditServerDnsOption","dnsCluster","cluster","EditVestaPluginsOption","lead","sftpValue","setSftpValue","fm_lead","fmValue","setFmValue","softaculousValue","setSoftaculousValue","version","firewall_system","sftp_license_key","licence_key","http_host","renderSftp","fm_license_key","fm_licence_key_option","rel","renderFm","softaculous_lead","fontWeight","renderSoftaculous","EditVestaSslOption","domainsVisible","setDomainsVisible","sslDomains","setSslDomains","ssl_domains","vesta_certificate","sys_ssl_crt","sys_ssl_key","sys_ssl_subject","sys_ssl_aliases","sys_ssl_not_before","sys_ssl_not_after","sys_ssl_signature","sys_ssl_pub_key","sys_ssl_issuer","EditDatabaseOption","mysql","db_pma_url","mysql_hosts","printPhpMyAdminHosts","pgsql","pgsql_url","pgsql_hosts","EditBackupOption","remoteBackup","setRemoteBackup","backup","backup_gzip","backup_dir","backup_remote_adv","backup_type","backup_host","backup_username","backup_password","backup_bpath","EditMailOption","mailCertificateSystem","setMailCertificateSystem","mail_certificate","mail_system","antivirus_system","antispam_system","mail_url","resetPassword","confirmPassword","login","signIn","loginAs","loginas","signInAs","logout","logout_response","removeItem","EditServer","webOption","dnsOption","mailOption","backupOption","sslOption","pluginsOption","dbOption","updatedServer","toggleOption","hostname","timezones","timezone","languages","language","web_backend_pool","v_dns_cluster","dns_cluster","EditVestaPlugins","Dovecot","config1","config_path1","config2","config_path2","config3","config_path3","config4","config_path4","config5","config_path5","config6","config_path6","config7","config_path7","config8","config_path8","getMailList","MailInfoBlock","webMail","hostName","selectedOption","setSelectedOption","imapHostName","smtpHostName","imapEncryption","smtpEncryption","imapPort","smtpPort","mailInfoBlockSelectOptions","EditMailAccount","autoreplyChecked","setAutoreplyChecked","quotaValue","newMailDomain","account","editMailAccount","autoreply","MAIL","fwd","fwd_only","autoreply_message","send_email","webmail","getMailInfo","updateMail","antispam","antivirus","dkim","catchall","EditMailWrapper","isMailAccount","setIsMailAccount","Service","serviceName","AddMailAccount","addMailAccount","v_aliases","forward","AddMail","antiSpamChecked","antiVirusChecked","dkimChecked","addMail","AddMailWrapper","setDomain","updateDNS","recordId","record_id","EditDomainNameSystem","getDNSInfo","DNS","templates","template","exp","soa","ttl","EditDNSRecord","selectOptions","getDNSRecordInfo","updatedRecord","rec","val","priority","EditDNSWrapper","isDnsRecord","setIsDnsRecord","sslCertificateAuthority","sslSubject","sslAliases","sslNotBefore","sslNotAfter","sslSignature","sslPubKey","sslIssuer","EditWeb","webStat","statAuth","getDomainInfo","v_stats","ssl","letsencrypt","proxy","ftp_user","stats_user","updateWebDomain","onChangeAdditionalFtp","object","formatData","WEB_BACKEND","ssl_subject","ssl_aliases","ssl_not_before","ssl_not_after","ssl_signature","ssl_pub_key","ssl_issuer","ssl_ca","sslHome","ssl_home","ftp_users","ftp_user_prepath","EditPhp","max_execution_time","max_input_time","memory_limit","error_reporting","display_errors","post_max_size","upload_max_filesize","SUSPENDED","DATABASE","U_DISK","mb","DBUSER","CHARSET","HOST","TYPE","suspendedStatus","suspend_conf","handleSuspend","suspend_action","Databases","dbFav","dbAdmin","dbAdminLink","currentDatabaseData","db_admin","db_admin_link","dbDuplicate","dbFavDuplicate","databasesDuplicate","dbNames","domainNameSystems","domainNameSystem","Firewall","ACTION","PROTOCOL","COMMENT","PORT","Firewalls","firewalls","firewallFav","firewallExtension","firewall","currentFirewallData","firewallsDuplicate","firewallFavDuplicate","firewallNames","EditUser","updatedUser","updateUser","USER","convertObjectOfObjectsToArrayOfObjects","packages","fname","lname","Bind9","Mysql","max_connections","max_user_connections","wait_timeout","interactive_timeout","max_allowed_packet","dayjs","add","format","AddDomainNameSystem","addDomainNameSystem","AddDNSRecord","newDnsRecord","addDomainNameSystemRecord","AddDNSWrapper","RestoreSetting","checkItemFunc","restoreSetting","textTransform","displayBackupDetailName","restoreLinkParams","BackupRestoreSettings","backupDetailsData","setBackupDetailsData","backupDetails","handleRestore","restoreBackupSetting","reformattedData","cat","toLowerCase","backupDetailsDuplicate","backupDetail","backupDetailNames","udir","bulkRestore","listBackups","Backup","SIZE","RUNTIME","UPDATED","faFileDownload","Backups","backupFav","configureRestoreSettings","currentBackupData","backup_fav","backupDuplicate","backupFavDuplicate","backupsDuplicate","backupNames","ok","BackupWrapper","isBackupSettings","setIsBackupSettings","AddBanIP","userLanguage","getBanIps","chain","newUser","addBanIp","Banlist","CronJob","CMD","Min","MIN","HOUR","DAY","MONTH","WDAY","CronJobs","cronFav","cronJob","currentCronJobData","cron_reports","cron_fav","cronDuplicate","cronFavDuplicate","cronJobsDuplicate","cronJobNames","handleCronNotifications","Package","FNAME","LNAME","WEB_TEMPLATE","PROXY_TEMPLATE","DNS_TEMPLATE","SHELL","WEB_DOMAINS","WEB_ALIASES","DNS_DOMAINS","DNS_RECORDS","MAIL_DOMAINS","MAIL_ACCOUNTS","DATABASES","CRON_JOBS","BACKUPS","BANDWIDTH","DISK_QUOTA","NS","Packages","packagesFav","currentPackageData","packagesDuplicate","packagesFavDuplicate","packageNames","AddUser","vEmail","vNotify","getAllPackages","getAllLanguages","getPackageNames","addUser","Email","Language","LANGUAGE","Update","isUpdated","DESCR","Version","VERSION","ARCH","Release","RELEASE","Updates","updates","autoUpdate","updatesDuplicate","updateNames","UPDATES","Server","HOSTNAME","OS","LOADAVERAGE","Uptime","UPTIME","configure","height","viewBox","fill","xmlns","fill-rule","d","SYSTEM","CPU","Memory","MEM","RTIME","action_url","STATE","Servers","servers","handleConfigure","handleRestart","handleStop","onHandleAction","sys","serversDuplicate","serverNames","menuHeight","handleState","statClassName","activeName","onKeyPress","look","U_BANDWIDTH","U_USERS","spnd","SUSPENDED_USERS","domains","U_WEB_ALIASES","SUSPENDED_WEB","U_DNS_DOMAINS","records","U_DNS_RECORDS","SUSPENDED_DNS","U_MAIL_DOMAINS","accounts","U_MAIL_ACCOUNTS","SUSPENDED_MAIL","U_DATABASES","SUSPENDED_DB","jobs","U_CRON_JOBS","SUSPENDED_CRON","U_BACKUPS","MobileTopNav","Bell","data-name","BellUnread","Notifications","ajax","notification","removeNotification","deleteNotification","TOPIC","ID","NOTICE","marginBottom","Panel","smallNavigationClass","extraClass","signOut","Graphs","Statistics","Log","FIREWALL_SYSTEM","FILEMANAGER_KEY","SOFTACULOUS","Apps","showTopNav","MainNav","tabs","controlFocusedTabWithCallback","useCallback","currentActiveTabPositionInArray","newFocusedMenuTab","handleLeftArrowKey","handleRightArrowKey","handleTopNav","hideMenu","indexInArray","visibleNav","Exclusion","Array","isArray","ITEMS","renderExclusionItems","BackupExclusions","exclusions","exclusion","MailAccount","QUOTA","FWD","AUTOREPLY","MailAccounts","mailAccountsFav","mailAccount","currentMailData","mailAccountsDuplicate","mailAccountsFavDuplicate","mailAccountNames","bulkMailAccountAction","Mail","printStat","ANTIVIRUS","DKIM","ANTISPAM","CATCHALL","list_accounts_button","Mails","mails","mailFav","handleLogs","handleAddRecord","mailsDuplicate","mailFavDuplicate","mailNames","MailWrapper","mailDomain","setMailDomain","DnsRecord","dnsRecord","RECORD","PRIORITY","VALUE","DnsRecords","dnsRecordFav","dnsRecordsFav","dnsDuplicate","dns","dnsRecFavDuplicate","dnsRecordsDuplicate","dnsRecordNames","record","DomainNameSystem","RECORDS","SOA","TTL","Serial","SERIAL","Template","TPL","EXP","RECORDS_I18N","DomainNameSystems","dnsFav","currentDomainNameSystemData","Number","domainNameSystemsDuplicate","first","second","dnsFavDuplicate","domainNameSystemsNames","bulkDomainAction","DNSWrapper","isDnsRecords","setIsDnsRecords","Statistic","printName","Web","U_DISK_WEB","U_DISK_MAIL","U_DISK_DIRS","U_WEB_SSL","IP_OWNED","statistics","statistic","getStatisticsList","STATS","CONTACT","spnd_conf","spnd_action","userFav","addNewObject","handleLogin","currentUserData","userDuplicate","userFavDuplicate","usersDuplicate","userNames","selectedUsers","generateImagePath","period","rrd","Timer","setIsActive","interval","setInterval","countDown","clearInterval","RRD","RRDs","setData","periodI18N","rrds","periodClass","changePeriod","Yearly","dataDuplicate","Ban","TIME","CHAIN","delete_confirmation","BanLists","currentBanIpData","delete_url","total_amount","banIpsDuplicate","banIpNames","WebDomain","ALIAS","U_BANDWIDTH_SIZE","U_BANDWIDTH_MEASURE","U_DISK_SIZE","U_DISK_MEASURE","SSL","LETSENCRYPT","WEB_STATS","PROXY_SUPPORT","PROXY","BACKEND_SUPPORT","renderBackedSupport","BACKEND","spnd_confirmation","webFav","webDomain","currentWebDomainData","webDomainsDuplicate","webFavDuplicate","webDomainNames","SearchItem","RESULT","printLoginActionButton","edit_link","spnd_link","delete_link","Search","searchResults","sortByHandler","Logs","logs","LOG","ControlPanelContent","setHotkeysList","switchPanelTab","from","exact","component","scrollTo","top","TopPanel","menuItems","extraMenuItems","cls","route","renderMenuItems","link","renderExtraMenuItems","WebLogs","goBack","getWebLogs","LoginLayout","LoginForm","formValues","setFormValues","changeInputHandler","LOGIN","tabIndex","ServiceInfo","useParams","getServiceLogs","service_log","line","ReactHtmlParser","ForgotPassword","useLocation","completeStep1","completeStep2","password_confirm","reset","Submit","Confirm","Reset","library","Icon","App","AuthenticatedRoute","authenticated","render","ReactDOM","store","createStore","rootReducer","composeWithDevTools","applyMiddleware","thunk","navigator","serviceWorker","ready","registration","unregister"],"mappings":"w6EAEMA,EAAgB,CACpBC,eAAgB,GAChBC,cAAe,GACfC,cA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","sourcesContent":["import { ADD_FOCUSED_ELEMENT, ADD_ACTIVE_ELEMENT, REMOVE_ACTIVE_ELEMENT, REMOVE_FOCUSED_ELEMENT } from '../../actions/MainNavigation/mainNavigationTypes';\n\nconst INITIAL_STATE = {\n focusedElement: '',\n activeElement: '',\n adminMenuTabs: [\n '/list/user/',\n '/list/web/',\n '/list/dns/',\n '/list/mail/',\n '/list/db/',\n '/list/cron/',\n '/list/backup/',\n '/list/package/',\n '/list/ip/',\n '/list/rrd/',\n '/list/stats/',\n '/list/log/',\n '/list/updates/',\n '/list/firewall/',\n '/list/directory/',\n '/softaculous/',\n '/list/server/'\n ],\n userMenuTabs: [\n '/list/user/',\n '/list/web/',\n '/list/dns/',\n '/list/mail/',\n '/list/db/',\n '/list/cron/',\n '/list/backup/',\n '/list/stats/',\n '/list/log/',\n '/list/directory/',\n '/softaculous/',\n ]\n};\n\nconst reducer = (state = INITIAL_STATE, action) => {\n switch (action.type) {\n case ADD_FOCUSED_ELEMENT:\n return {\n ...state, focusedElement: action.value,\n };\n\n case REMOVE_FOCUSED_ELEMENT:\n return {\n ...state, focusedElement: action.value,\n };\n\n case ADD_ACTIVE_ELEMENT:\n return {\n ...state, activeElement: action.value,\n };\n\n case REMOVE_ACTIVE_ELEMENT:\n return {\n ...state, activeElement: action.value,\n };\n\n default: return state;\n }\n};\n\nexport default reducer;","export const ADD_FOCUSED_ELEMENT = 'ADD_FOCUSED_ELEMENT';\nexport const REMOVE_FOCUSED_ELEMENT = 'REMOVE_FOCUSED_ELEMENT';\nexport const ADD_ACTIVE_ELEMENT = 'ADD_ACTIVE_ELEMENT';\nexport const REMOVE_ACTIVE_ELEMENT = 'REMOVE_ACTIVE_ELEMENT';","import { ADD_CPANEL_FOCUSED_ELEMENT, REMOVE_CPANEL_FOCUSED_ELEMENT } from '../../actions/ControlPanelContent/controlPanelContentTypes';\n\nconst INITIAL_STATE = {\n controlPanelFocusedElement: ''\n};\n\nconst reducer = (state = INITIAL_STATE, action) => {\n switch (action.type) {\n case ADD_CPANEL_FOCUSED_ELEMENT:\n return {\n ...state, controlPanelFocusedElement: action.value,\n };\n\n case REMOVE_CPANEL_FOCUSED_ELEMENT:\n return {\n ...state, controlPanelFocusedElement: '',\n };\n\n default: return state;\n }\n};\n\nexport default reducer;","export const ADD_CPANEL_FOCUSED_ELEMENT = 'ADD_CPANEL_FOCUSED_ELEMENT';\nexport const REMOVE_CPANEL_FOCUSED_ELEMENT = 'REMOVE_CPANEL_FOCUSED_ELEMENT';","import { ADD_NOTIFICATIONS, REMOVE_NOTIFICATIONS } from 'src/actions/Notification/notificationTypes';\n\nconst INITIAL_STATE = {\n notifications: null\n};\n\nconst notificationReducer = (state = INITIAL_STATE, action) => {\n switch (action.type) {\n case ADD_NOTIFICATIONS:\n return {\n ...state,\n notifications: action.value,\n };\n\n case REMOVE_NOTIFICATIONS:\n return {\n ...state,\n notifications: action.value,\n };\n\n default: return state;\n }\n};\n\nexport default notificationReducer;\n","export const ADD_NOTIFICATIONS = 'ADD_NOTIFICATIONS';\nexport const REMOVE_NOTIFICATIONS = 'REMOVE_NOTIFICATIONS';\n","import { REFRESH_COUNTERS } from 'src/actions/MenuCounters/menuCounterTypes';\n\nconst INITIAL_STATE = {\n user: {},\n};\n\nconst menuCounterReducer = (state = INITIAL_STATE, action) => {\n switch (action.type) {\n case REFRESH_COUNTERS:\n return {\n ...state,\n user: action.value.user,\n };\n\n default: return state;\n }\n};\n\nexport default menuCounterReducer;\n","export const REFRESH_COUNTERS = 'REFRESH_COUNTERS';","import { SET_USER_SESSION } from 'src/actions/UserSession/userSessionTypes';\n\nconst INITIAL_STATE = {\n session: {}\n};\n\nconst userSessionReducer = (state = INITIAL_STATE, action) => {\n switch (action.type) {\n case SET_USER_SESSION:\n return {\n ...state,\n session: action.value,\n };\n\n default: return state;\n }\n};\n\nexport default userSessionReducer;\n","export const SET_USER_SESSION = 'SET_USER_SESSION';","import { LOGGED_OUT_AS, LOGIN, LOGOUT, CHECK_AUTH } from '../../actions/Session/sessionTypes';\n\nconst INITIAL_STATE = {\n token: '',\n error: '',\n i18n: {},\n userName: '',\n panel: {}\n};\n\nconst sessionReducer = (state = INITIAL_STATE, action) => {\n switch (action.type) {\n case LOGIN:\n return {\n ...state,\n token: action.value.token,\n userName: action.value.userName,\n i18n: action.value.i18n || {},\n panel: action.value.panel,\n error: action.value.error\n };\n\n case LOGOUT:\n return {\n ...state,\n token: action.value.token,\n userName: action.value.userName,\n i18n: action.value.i18n || {},\n panel: action.value.panel,\n error: action.value.error\n };\n\n case LOGGED_OUT_AS:\n return {\n ...state,\n token: action.value.token,\n userName: action.value.userName,\n i18n: action.value.i18n || {},\n panel: action.value.panel,\n error: action.value.error\n };\n\n case CHECK_AUTH: return {\n ...state,\n token: action.value.token,\n userName: action.value.userName,\n i18n: action.value.i18n || {},\n panel: action.value.panel,\n error: action.value.error\n };\n\n default: return state;\n }\n};\n\nexport default sessionReducer;\n","export const LOGIN = 'LOGIN';\nexport const LOGOUT = 'LOGOUT';\nexport const LOGIN_AS = 'LOGIN_AS';\nexport const CHECK_AUTH = 'CHECK_AUTH';\nexport const LOGGED_OUT_AS = 'LOGGED_OUT_AS';\nexport const RESET_PASSWORD = 'RESET_PASSWORD';","import { combineReducers } from 'redux';\nimport mainNavigationReducer from './MainNavigation/mainNavigationReducer';\nimport controlPanelContentReducer from './ControlPanelContent/controlPanelContentReducer';\nimport notificationReducer from './Notification/notificationReducer';\nimport menuCounterReducer from './MenuCounters/menuCounterReducer';\nimport userSessionReducer from './UserSession/userSessionReducer';\nimport sessionReducer from './Session/sessionReducer';\n\nexport default combineReducers({\n mainNavigation: mainNavigationReducer,\n controlPanelContent: controlPanelContentReducer,\n notifications: notificationReducer,\n menuCounters: menuCounterReducer,\n userSession: userSessionReducer,\n session: sessionReducer,\n});","import React from 'react';\nimport './Spinner.scss';\n\nconst Spinner = () => {\n return (\n <div className=\"spinner-wrapper\">\n <div className=\"progress\">\n <div className=\"progress-bar progress-bar-striped progress-bar-animated\" role=\"progressbar\" aria-valuenow=\"100\" aria-valuemin=\"0\" aria-valuemax=\"100\" style={{ width: \"100%\" }}></div>\n </div>\n </div>\n );\n}\n\nexport default Spinner;","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport './Dropdown.scss';\n\nconst Dropdown = (props) => {\n const { i18n } = useSelector(state => state.session);\n\n const changeSorting = (field, order, props) => {\n if (!props.isActive) {\n return;\n } else {\n props.changeSorting(field, order);\n }\n }\n\n const sort = (sorting) => {\n if (sorting === \"Type\") {\n return i18n.type;\n } else if (sorting === \"Size\") {\n return i18n.size;\n } else if (sorting === \"Date\") {\n return i18n.date;\n } else if (sorting === \"Name\") {\n return i18n.name;\n }\n }\n\n const button = (sorting, order) => {\n if (order === \"descending\") {\n return (\n <button type=\"button\" className=\"btn btn-secondary\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\n {sort(sorting)}\n <span className=\"arrow-down\">&#8595;</span>\n </button>\n );\n } else {\n return (\n <button type=\"button\" className=\"btn btn-secondary\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\n {sort(sorting)}\n <span>&#8593;</span>\n </button>\n );\n }\n }\n\n return (\n <div class=\"btn-group\">\n {button(props.sorting, props.order)}\n <div class=\"dropdown-menu\">\n <ul className=\"dropdown-list\">\n <li>\n <span className={props.sorting === \"Type\" && props.order === \"descending\" ? \"dropdown-item active\" : \"dropdown-item\"} onClick={() => changeSorting(\"Type\", \"descending\", props)}>{i18n.type}<span className=\"arrow-down\">&#8595;</span></span>\n <span className={props.sorting === \"Type\" && props.order === \"ascending\" ? \"dropdown-item active\" : \"dropdown-item\"} onClick={() => changeSorting(\"Type\", \"ascending\", props)}><span>&#8593;</span></span>\n </li>\n <li>\n <span className={props.sorting === \"Size\" && props.order === \"descending\" ? \"dropdown-item active\" : \"dropdown-item\"} onClick={() => changeSorting(\"Size\", \"descending\", props)}>{i18n.size}<span className=\"arrow-down\">&#8595;</span></span>\n <span className={props.sorting === \"Size\" && props.order === \"ascending\" ? \"dropdown-item active\" : \"dropdown-item\"} onClick={() => changeSorting(\"Size\", \"ascending\", props)}><span>&#8593;</span></span>\n </li>\n <li>\n <span className={props.sorting === \"Date\" && props.order === \"descending\" ? \"dropdown-item active\" : \"dropdown-item\"} onClick={() => changeSorting(\"Date\", \"descending\", props)}>{i18n.date}<span className=\"arrow-down\">&#8595;</span></span>\n <span className={props.sorting === \"Date\" && props.order === \"ascending\" ? \"dropdown-item active\" : \"dropdown-item\"} onClick={() => changeSorting(\"Date\", \"ascending\", props)}><span>&#8593;</span></span>\n </li>\n <li>\n <span className={props.sorting === \"Name\" && props.order === \"descending\" ? \"dropdown-item active\" : \"dropdown-item\"} onClick={() => changeSorting(\"Name\", \"descending\", props)}>{i18n.name}<span className=\"arrow-down\">&#8595;</span></span>\n <span className={props.sorting === \"Name\" && props.order === \"ascending\" ? \"dropdown-item active\" : \"dropdown-item\"} onClick={() => changeSorting(\"Name\", \"ascending\", props)}><span>&#8593;</span></span>\n </li>\n </ul>\n </div>\n </div>\n );\n}\n\nexport default Dropdown;","import React from 'react';\nimport { useSelector } from 'react-redux';\n\nimport Dropdown from './Dropdown/Dropdown';\nimport './Path.scss';\n\nconst Path = ({ path, isActive, className, openDirectory, changeSorting, sorting, order }) => {\n const { user } = useSelector(state => state.menuCounters);\n\n const clickablePath = () => {\n let splitPath = path.split('/');\n splitPath.splice(0, 3);\n\n if (path !== user.HOME) {\n return (\n splitPath.map((item, index) => <span className=\"clickable\" key={index} onClick={() => openDirectoryHandler(index)}>&nbsp;/&nbsp;{item}</span>)\n );\n }\n }\n\n const openDirectoryHandler = index => {\n let pathArray = path.split('/');\n\n if (!isActive) {\n return;\n } else {\n if (index !== undefined) {\n let newPathArray = pathArray.splice(0, index + 4);\n let newPath = newPathArray.join('/');\n openDirectory(newPath);\n }\n }\n }\n\n return (\n <div className={className}>\n <div className=\"clickable-wrapper\">\n <span className=\"clickable-path\">\n <span className=\"clickable\" onClick={() => openDirectory(user.HOME)}>{user.HOME}</span>\n {clickablePath()}\n </span>\n </div>\n <Dropdown changeSorting={changeSorting} sorting={sorting} order={order} isActive={isActive} />\n </div>\n );\n}\n\nexport default Path;\n","import React, { Component } from 'react';\nimport { withRouter } from 'react-router-dom';\nimport PropTypes from 'prop-types';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faJs, faCss3, faPhp, faHtml5, faSass } from '@fortawesome/free-brands-svg-icons';\nimport './Row.scss';\nimport { connect } from 'react-redux';\n\nclass Row extends Component {\n static propTypes = {\n selectMultiple: PropTypes.func,\n selectOnClick: PropTypes.func,\n openDirectory: PropTypes.func,\n modalVisible: PropTypes.bool,\n isActiveList: PropTypes.bool,\n activeRow: PropTypes.bool,\n selected: PropTypes.func,\n download: PropTypes.func,\n cursor: PropTypes.number,\n path: PropTypes.string,\n key: PropTypes.number,\n data: PropTypes.array\n }\n\n componentDidMount = () => {\n document.addEventListener(\"keydown\", this.openOnEnter);\n }\n\n componentWillUnmount = () => {\n document.removeEventListener(\"keydown\", this.openOnEnter);\n }\n\n openOnEnter = (e) => {\n const { activeRow, data: { name, type }, isActiveList, modalVisible, openDirectory, cursor, download, path } = this.props;\n\n if (modalVisible || !activeRow || !isActiveList) {\n return;\n }\n\n if (e.keyCode === 13) {\n if (this.isArchive(name) || type === \"l\") {\n download();\n } else if (this.isFile(type) && cursor !== 0) {\n this.changePath(path, name);\n } else {\n openDirectory(name);\n }\n }\n }\n\n openItem = () => {\n const { data: { type, name }, openDirectory, download, path, isActiveList } = this.props;\n\n if (!isActiveList) {\n return;\n }\n\n if (this.isArchive(name) || type === \"l\" || name.match('.mp4')) {\n return download();\n } else if (this.isFile(type)) {\n return this.changePath(path, name);\n } else if (type === 'd') {\n return openDirectory(name);\n }\n }\n\n changePath = (path, name) => {\n this.props.history.push({\n pathname: '/list/directory/preview/',\n search: `?path=${path}/${name}`\n });\n }\n\n selectRow = (e) => {\n const { data: { name, permissions, type }, selectMultiple, selectOnClick, cursor, activeRow } = this.props;\n\n if (e.ctrlKey && cursor !== 0) {\n selectMultiple();\n }\n\n if (activeRow) {\n return;\n }\n\n selectOnClick(cursor, name, permissions, type);\n }\n\n className = () => {\n const { activeRow, selected, isActiveList } = this.props;\n\n if (isActiveList) {\n let isActive = activeRow ? 'active' : '';\n let isSelected = selected ? 'selected' : '';\n return isActive.length ? isActive : isSelected;\n } else {\n let isActive = activeRow ? 'inactive' : '';\n let isSelected = selected ? 'inactive-selected' : '';\n return isActive.length ? isActive : isSelected;\n }\n }\n\n sizeFormatter = (bytes, decimals) => {\n if (bytes === undefined || this.props.data.type === \"d\") {\n return null;\n };\n\n if (bytes === \"0\") {\n return <span className=\"value\">0 <span className=\"unit\">b</span></span>;\n }\n\n let k = 1024,\n dm = decimals <= 0 ? 0 : decimals || 2,\n sizes = ['b', 'kb', 'Mb', 'GB'],\n i = Math.floor(Math.log(bytes) / Math.log(k));\n return (<span className=\"value\">{parseFloat((bytes / Math.pow(k, i)).toFixed(dm))} <span className=\"unit\">{sizes[i]}</span></span>);\n }\n\n dateFormatter = (fDate) => {\n if (fDate === undefined) {\n return null;\n }\n\n let date = new Date(fDate),\n months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n getDay = date.getDate(),\n getMonth = this.props.session.i18n[months[date.getMonth()]];\n return (<span className=\"date\">{getMonth} {getDay}</span>);\n }\n\n glyph = () => {\n const { data: { type, name } } = this.props;\n\n if (type === 'd') {\n return <FontAwesomeIcon icon=\"folder-open\" className=\"folder-open\" />;\n }\n\n if (this.isFile(type)) {\n if (this.isArchive(name)) {\n return <FontAwesomeIcon icon=\"book\" className=\"archive\" />;\n } else if (name.match(/png|jpg|jpeg|gif/g)) {\n return <FontAwesomeIcon icon=\"image\" className=\"image\" />;\n } else if (name.match('.mp4') !== null) {\n return <FontAwesomeIcon icon=\"download\" className=\"download\" />;\n } else if (name.match('.txt')) {\n return <FontAwesomeIcon icon=\"file-alt\" className=\"file-alt\" />;\n } else if (name.match('.js')) {\n return <FontAwesomeIcon icon={faJs} className=\"js\" />;\n } else if (name.match('.html')) {\n return <FontAwesomeIcon icon={faHtml5} className=\"html5\" />;\n } else if (name.match('.php')) {\n return <FontAwesomeIcon icon={faPhp} className=\"php\" />;\n } else if (name.match(/.scss/i)) {\n return <FontAwesomeIcon icon={faSass} className=\"sass\" />;\n } else if (name.match(/.css/i)) {\n return <FontAwesomeIcon icon={faCss3} className=\"css3\" />;\n } else {\n return <FontAwesomeIcon icon=\"file\" className=\"file\" />;\n }\n }\n\n if (type === \"l\") {\n return <FontAwesomeIcon icon=\"download\" className=\"download\" />;\n }\n }\n\n isArchive(name) {\n return name.match(/zip|tgz|tar.gz|gzip|tbz|tar.bz|gz|zip|tar|rar/g);\n }\n\n isFile(type) {\n return type === 'f';\n }\n\n render() {\n const { data: { name, owner, permissions, size, date, time } } = this.props;\n return (\n <li className={this.className()} onClick={this.selectRow} >\n <span className=\"marker\"></span>\n {this.glyph()}\n <span className=\"fName\"><span className=\"name\" onClick={(e) => this.openItem(e)}>{this.props.cursor === 0 ? \"..\" : name}</span></span>\n <span className=\"fPermissions\">{permissions}</span>\n <span className=\"fOwner\">{owner}</span>\n <span className=\"fSize\">{this.sizeFormatter(size)}</span>\n <span className=\"fDate\">{this.dateFormatter(date)}</span>\n <span className=\"fTime\">{time}</span>\n </li>\n );\n }\n}\n\nfunction mapStateToProps(state) {\n return {\n session: state.session\n }\n}\n\nexport default connect(mapStateToProps)(withRouter(Row));\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Spinner from '../../Spinner/Spinner';\nimport Path from '../../Path/Path';\nimport Row from '../Row/Row';\nimport '../List.scss';\n\nclass DirectoryList extends Component {\n static propTypes = {\n changePathAfterToggle: PropTypes.func,\n openCertainDirectory: PropTypes.func,\n openDirectory: PropTypes.func,\n passSelection: PropTypes.func,\n modalVisible: PropTypes.bool,\n changePath: PropTypes.func,\n addToPath: PropTypes.func,\n history: PropTypes.object,\n isActive: PropTypes.bool,\n cursor: PropTypes.number,\n passData: PropTypes.func,\n download: PropTypes.func,\n moveBack: PropTypes.func,\n onClick: PropTypes.func,\n loading: PropTypes.bool,\n path: PropTypes.string,\n list: PropTypes.string,\n data: PropTypes.array\n }\n\n state = {\n orderType: \"descending\",\n sortingType: \"Type\",\n itemsSelected: [],\n cursor: 0\n };\n\n UNSAFE_componentWillMount = () => {\n if (localStorage.getItem(`${this.props.list}Sorting`) && localStorage.getItem(`${this.props.list}Order`)) {\n this.setState({ sortingType: localStorage.getItem(`${this.props.list}Sorting`), orderType: localStorage.getItem(`${this.props.list}Order`) });\n }\n }\n\n componentDidMount = () => {\n document.addEventListener(\"keydown\", this.handleLiSelection);\n document.addEventListener(\"keydown\", this.moveBackOnButton);\n }\n\n componentWillUnmount = () => {\n document.removeEventListener(\"keydown\", this.handleLiSelection);\n document.removeEventListener(\"keydown\", this.moveBackOnButton);\n }\n\n cacheSorting = () => {\n localStorage.setItem(`${this.props.list}Sorting`, this.state.sortingType);\n localStorage.setItem(`${this.props.list}Order`, this.state.orderType);\n }\n\n moveBackOnButton = (e) => {\n if (e.keyCode === 8 && !this.props.modalVisible && this.props.isActive) {\n this.moveBack();\n }\n }\n\n moveBack = () => {\n if (this.isHomeDirectory()) {\n return;\n }\n\n this.props.moveBack();\n }\n\n isHomeDirectory = () => {\n return this.props.path === this.props.rootDir;\n }\n\n toggleActiveList = () => {\n const { history, path, list, onClick, changePathAfterToggle, isActive } = this.props;\n\n if (!isActive) {\n onClick(list);\n changePathAfterToggle(path);\n history.push({\n pathname: '/list/directory/',\n search: `?path=${path}`\n });\n this.cacheActiveWindowAndPaths();\n this.passData();\n }\n }\n\n cacheActiveWindowAndPaths = () => {\n localStorage.setItem(\"activeWindow\", this.props.list);\n localStorage.setItem(`${this.props.list}ListPath`, this.props.path);\n localStorage.setItem(`${this.props.list}ListPath`, this.props.path);\n }\n\n isSelected = (i) => {\n return this.state.itemsSelected.indexOf(i) !== -1;\n }\n\n addToSelection(i) {\n const { itemsSelected } = this.state;\n const result = [...itemsSelected];\n const duplicate = itemsSelected.indexOf(i);\n if (duplicate !== -1) {\n result.splice(duplicate, 1);\n } else {\n if (i === \"\") {\n return;\n }\n\n result.push(i)\n }\n\n this.setState({ itemsSelected: result });\n this.props.passSelection(result);\n }\n\n handleLiSelection = (e) => {\n const { data, isActive, modalVisible, changePath, path } = this.props;\n const { cursor } = this.state;\n\n if (!isActive || modalVisible) {\n return;\n }\n\n if (e.keyCode === 40) {\n if (cursor === data.listing.length - 1) {\n return;\n }\n\n if (e.shiftKey) {\n let name = data.listing[cursor].name;\n this.addToSelection(name);\n }\n\n this.setState({ cursor: cursor + 1 });\n this.passData();\n changePath(path);\n }\n\n if (e.keyCode === 38) {\n if (cursor === 0) {\n return;\n }\n\n if (e.shiftKey) {\n let name = data.listing[cursor].name;\n this.addToSelection(name);\n }\n\n this.setState({ cursor: cursor - 1 });\n this.passData();\n changePath(path);\n }\n }\n\n resetData = () => {\n this.setState({ cursor: 0, itemsSelected: [] });\n }\n\n passData = () => {\n const { data, passData } = this.props;\n const { name, permissions, type } = data.listing[this.state.cursor];\n passData(this.state.cursor, name, permissions, type);\n }\n\n openDirectory = (name) => {\n const { history, path, addToPath, openDirectory } = this.props;\n\n history.push({\n pathname: '/list/directory/',\n search: `?path=${path}/${name}`\n });\n addToPath(name);\n openDirectory();\n this.setState({ cursor: 0 });\n }\n\n openCertainDirectory = (path) => {\n const { history, openCertainDirectory, changePath } = this.props;\n\n if (this.isHomeDirectory()) {\n return;\n }\n\n history.push({\n pathname: '/list/directory/',\n search: `?path=${path}`\n });\n changePath(path);\n openCertainDirectory();\n }\n\n changeSorting = (sortingType, orderType) => {\n this.setState({ sortingType, orderType }, () => this.cacheSorting());\n }\n\n sortByType = (a, b) => {\n if (this.state.orderType === \"descending\" && a.name !== \"\") {\n return a.type.localeCompare(b.type);\n } else if (this.state.orderType === \"ascending\" && b.name !== \"\") {\n return b.type.localeCompare(a.type);\n }\n }\n\n sortBySize = (a, b) => {\n if (this.state.orderType === \"descending\" && a.name !== \"\") {\n return a.size - b.size;\n } else if (this.state.orderType === \"ascending\" && b.name !== \"\") {\n return b.size - a.size;\n }\n }\n\n sortByDate = (a, b) => {\n if (this.state.orderType === \"descending\" && a.name !== \"\") {\n return new Date(a.date) - new Date(b.date);\n } else if (this.state.orderType === \"ascending\" && a.name !== \"\") {\n return new Date(b.date) - new Date(a.date);\n }\n }\n\n sortByName = (a, b) => {\n if (this.state.orderType === \"descending\" && a.name !== \"\") {\n return a.name.localeCompare(b.name);\n } else if (this.state.orderType === \"ascending\" && b.name !== \"\") {\n return b.name.localeCompare(a.name);\n }\n }\n\n sortData = (a, b) => {\n switch (this.state.sortingType) {\n case \"Type\": return this.sortByType(a, b);\n case \"Size\": if (a.type !== \"d\" && b.type !== \"d\") { return this.sortBySize(a, b) }; break;\n case \"Date\": return this.sortByDate(a, b);\n case \"Name\": return this.sortByName(a, b);\n default: return this.sortByType(a, b);\n }\n }\n\n rows = () => {\n const { isActive, modalVisible, path, download } = this.props;\n const { cursor } = this.state;\n const data = { ...this.props.data };\n\n if (data.listing.length !== 0) {\n let sortedData = data.listing.sort((a, b) => this.sortData(a, b));\n return (\n sortedData.map((item, key) =>\n (item.name !== \"\" && sortedData.length !== 0) ?\n (<Row key={key}\n selectOnClick={(cursor, name, permissions, type) => {\n this.setState({ cursor });\n this.props.passData(cursor, name, permissions, type);\n }}\n selectMultiple={() => this.addToSelection(item.name)}\n selected={this.isSelected(item.name)}\n openDirectory={this.openDirectory}\n modalVisible={modalVisible}\n activeRow={key === cursor}\n isActiveList={isActive}\n download={download}\n cursor={key}\n data={item}\n path={path} />) :\n (<Row key={key}\n selectOnClick={(cursor, name, permissions, type) => {\n this.setState({ cursor });\n this.props.passData(cursor, name, permissions, type);\n }}\n openDirectory={this.moveBack}\n modalVisible={modalVisible}\n activeRow={key === cursor}\n isActiveList={isActive}\n cursor={key}\n data={item}\n path={path} />))\n );\n }\n }\n\n render() {\n const { isActive, path, loading } = this.props;\n return (\n <div className={isActive ? \"list active\" : \"list\"} onClick={this.toggleActiveList}>\n <Path className={isActive ? \"active-path\" : \"path\"}\n openDirectory={this.openCertainDirectory}\n changeSorting={this.changeSorting}\n sorting={this.state.sortingType}\n order={this.state.orderType}\n isActive={isActive}\n path={path} />\n <div className=\"list-container\">\n <ul>\n {loading && isActive ? <Spinner /> : this.rows()}\n </ul>\n </div>\n </div>\n );\n }\n}\n\nexport default DirectoryList;\n","import React from 'react';\nimport './ProgressBar.scss';\n\nconst ProgressBar = (props) => {\n return (\n <div class=\"progress\">\n <div class=\"progress-bar\" role=\"progressbar\" style={{ width: `${props.progress}%` }} aria-valuenow={props.progress} aria-valuemin=\"0\" aria-valuemax=\"100\"></div>\n </div>\n );\n}\n\nexport default ProgressBar;","import React, { useEffect } from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { useSelector } from 'react-redux';\nimport './Hotkeys.scss';\n\nconst Hotkeys = props => {\n const { i18n } = useSelector(state => state.session);\n\n useEffect(() => {\n window.addEventListener(\"keyup\", toggleShortcutsLit);\n\n return () => window.removeEventListener(\"keyup\", toggleShortcutsLit);\n }, [props.reference]);\n\n const toggleShortcutsLit = event => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus');\n\n if (event.keyCode === 72 && !isSearchInputFocused) {\n props.toggleHotkeys();\n }\n }\n\n return (\n <div className=\"hotkeys-list hide\" ref={props.reference}>\n <div className=\"head\">\n <div className=\"name\">{i18n.Shortcuts}</div>\n <div className=\"close\" onClick={() => props.toggleHotkeys()}><FontAwesomeIcon icon=\"times\" /></div>\n </div>\n <div className=\"body\">\n <ul>\n <li>\n <span className=\"name\">u</span>\n <span className=\"description\">{i18n['Upload']}</span>\n </li>\n <li>\n <span className=\"name\">n</span>\n <span className=\"description\">{i18n['New Fille']}</span>\n </li>\n <li>\n <span className=\"name\">F7</span>\n <span className=\"description\">{i18n['New Folder']}</span>\n </li>\n <li>\n <span className=\"name\">d</span>\n <span className=\"description\">{i18n['Download']}</span>\n </li>\n <li className=\"space-top\">\n <span className=\"name\">F2 / Shift + F6</span>\n <span className=\"description\">{i18n['Rename']}</span>\n </li>\n <li>\n <span className=\"name\">m</span>\n <span className=\"description\">{i18n['Move']}</span>\n </li>\n <li>\n <span className=\"name\">F5</span>\n <span className=\"description\">{i18n['Copy']}</span>\n </li>\n <li>\n <span className=\"name\">F5</span>\n <span className=\"description\">{i18n['Copy']}</span>\n </li>\n <li>\n <span className=\"name\">F8 / Del</span>\n <span className=\"description\">{i18n['Delete']}</span>\n </li>\n <li>\n <span className=\"name\">F2</span>\n <span className=\"description\">{i18n['Save File (in text editor)']}</span>\n </li>\n <li>\n <span className=\"name\">h</span>\n <span className=\"description\">{i18n['Display/Close shortcuts']}</span>\n </li>\n <li>\n <span className=\"name\">Esc</span>\n <span className=\"description\">{i18n['Close Popup / Cancel']}</span>\n </li>\n <li>\n <span className=\"name\">F10</span>\n <span className=\"description\">{i18n['Close Preview / Editor']}</span>\n </li>\n </ul>\n <ul>\n <li>\n <span className=\"name\">&#8593;</span>\n <span className=\"description\">{i18n['Move Cursor Up']}</span>\n </li>\n <li>\n <span className=\"name\">&#8595;</span>\n <span className=\"description\">{i18n['Move Cursor Down']}</span>\n </li>\n <li>\n <span className=\"name\">&#8592;</span>\n <span className=\"description\">{i18n['Switch to Left Tab']}</span>\n </li>\n <li>\n <span className=\"name\">&#8594;</span>\n <span className=\"description\">{i18n['Switch to Right Tab']}</span>\n </li>\n <li>\n <span className=\"name\">a</span>\n <span className=\"description\">{i18n['Archive']}</span>\n </li>\n <li>\n <span className=\"name\">Enter</span>\n <span className=\"description\">{i18n['Open File / Enter Directory']}</span>\n </li>\n <li>\n <span className=\"name\">F4</span>\n <span className=\"description\">{i18n['Edit File']}</span>\n </li>\n <li>\n <span className=\"name\">Backspace</span>\n <span className=\"description\">{i18n['Go to Parent Directory']}</span>\n </li>\n <li>\n <span className=\"name\">Ctr + Click</span>\n <span className=\"description\">{i18n['Add File to the Current Selection']}</span>\n </li>\n <li>\n <span className=\"name\">Shift + Cursor up/down</span>\n <span className=\"description\">{i18n['Select Bunch of Files']}</span>\n </li>\n </ul>\n </div>\n </div>\n );\n}\n\nexport default Hotkeys;\n","import React from 'react';\nimport { useSelector } from 'react-redux';\n\nconst AddFile = (props) => {\n const { i18n } = useSelector(state => state.session);\n\n return (\n <div className=\"modal-content\">\n <div className=\"modal-header\">\n <h3 className=\"modal-title\" >{i18n['Create file']}</h3>\n </div>\n <div className=\"modal-body\">\n <input type=\"text\" ref={props.reference}></input>\n </div>\n <div className=\"modal-footer\">\n <button type=\"button\" className=\"btn btn-danger mr-auto\" onClick={props.close}>{i18n.Cancel}</button>\n <button type=\"button\" className=\"btn btn-primary\" onClick={props.save}>{i18n.Create}</button>\n </div>\n </div>\n );\n}\n\nexport default AddFile;","import React from 'react';\nimport { useSelector } from 'react-redux';\n\n\nconst AddDirectory = (props) => {\n const { i18n } = useSelector(state => state.session);\n\n return (\n <div className=\"modal-content\">\n <div className=\"modal-header\">\n <h3 className=\"modal-title directory\" >{i18n['Create directory']}</h3>\n </div>\n <div className=\"modal-body\">\n <input type=\"text\" ref={props.reference} autoFocus></input>\n </div>\n <div className=\"modal-footer\">\n <button type=\"button\" className=\"btn btn-danger mr-auto\" onClick={props.close}>{i18n.Cancel}</button>\n <button type=\"button\" className=\"btn btn-primary\" onClick={props.save}>{i18n.Create}</button>\n </div>\n </div>\n );\n}\n\nexport default AddDirectory;","import React from 'react';\nimport { useSelector } from 'react-redux';\n\nconst Rename = (props) => {\n const { i18n } = useSelector(state => state.session);\n\n return (\n <div className=\"modal-content rename\">\n <div className=\"modal-header\">\n <h3 className=\"modal-title rename\">{i18n['Rename']} <span className=\"quot\">&quot;{props.fName}&quot;</span></h3>\n </div>\n <div className=\"modal-body\">\n <input type=\"text\" autoFocus defaultValue={props.fName} onChange={props.onChange} ref={props.reference}></input>\n </div>\n <div className=\"modal-footer\">\n <button type=\"button\" className=\"btn btn-danger mr-auto\" onClick={props.close}>{i18n['Cancel']}</button>\n <button type=\"button\" className=\"btn btn-primary\" onClick={props.save}>{i18n['Rename']}</button>\n </div>\n </div>\n );\n}\n\nexport default Rename;","import React from 'react';\nimport { useSelector } from 'react-redux';\n\nconst Delete = (props) => {\n const { i18n } = useSelector(state => state.session);\n\n return (\n <div className=\"modal-content delete\">\n <div className=\"modal-header\">\n {props.items > 0 ?\n <h3>{i18n['Delete items']} <span className=\"quot\">({props.items})</span> ?</h3> :\n <h3>{i18n['Are you sure you want to delete']} <span className=\"quot\">&quot;{props.fName}&quot;</span>?</h3>}\n </div>\n <div className=\"modal-footer lower\">\n <button type=\"button\" className=\"btn btn-danger mr-auto\" onClick={props.close}>{i18n['Cancel']}</button>\n <button type=\"button\" className=\"btn btn-primary\" onClick={props.save} autoFocus>{i18n['Delete']}</button>\n </div>\n </div>\n );\n}\n\nexport default Delete;","import React from 'react';\nimport { useSelector } from 'react-redux';\n\nconst NothingSelected = (props) => {\n const { i18n } = useSelector(state => state.session);\n\n return (\n <div className=\"modal-content nothing-selected\">\n <div className=\"header\">\n {props.notAvailable ? <h3>{i18n['Directory download not available in current version']}</h3> : <h3>{i18n['No file selected']}</h3>}\n </div>\n <div className=\"modal-footer\">\n <button type=\"button\" className=\"btn btn-danger mr-auto\" onClick={props.close}>{i18n['Close']}</button>\n </div>\n </div>\n );\n}\n\nexport default NothingSelected;","import React, { Component } from 'react';\nimport classNames from 'classname';\nimport { connect } from 'react-redux';\n\nconst defaultPermissions = {\n owner: {\n read: 0,\n write: 0,\n execute: 0,\n },\n group: {\n read: 0,\n write: 0,\n execute: 0,\n },\n others: {\n read: 0,\n write: 0,\n execute: 0,\n },\n}\n\nclass Permissions extends Component {\n constructor(props) {\n super(props);\n this.state = {\n permissions: this.decode(this.props.permissions) || defaultPermissions,\n inputInvalid: false,\n }\n }\n\n inArray(number, array) {\n return !!~array.indexOf(number);\n }\n\n decodeSingleNumber = (string) => {\n const number = parseInt(string, 0);\n\n return {\n read: this.inArray(number, [4, 5, 6, 7]) ? 4 : 0,\n write: this.inArray(number, [2, 3, 6, 7]) ? 2 : 0,\n execute: this.inArray(number, [1, 3, 5, 7]) ? 1 : 0\n };\n }\n\n isValid(numbers = '') {\n if (numbers.length !== 3 || numbers === '000' || numbers.match(/[A-Za-z]/)) {\n return false;\n }\n\n return numbers.split('').find((number) => parseInt(number, 0) < 0 || parseInt(number, 0) > 7) === undefined;\n }\n\n decode(numbers) {\n if (!this.isValid(numbers)) {\n return null;\n }\n\n const numbersArray = numbers.split('');\n const result = numbersArray.map(this.decodeSingleNumber);\n return { owner: result[0], group: result[1], others: result[2] };\n }\n\n encode() {\n function sumPermissions(permissionObject) {\n return Object.values(permissionObject).map((number) => parseInt(number, 0)).reduce((acc, n) => acc + n, 0);\n }\n return ['owner', 'group', 'others'].reduce((acc, role) => {\n const roleObject = this.state.permissions[role];\n return acc + sumPermissions(roleObject);\n }, '');\n }\n\n onChangeForm = (event) => {\n const checkbox = event.target;\n const [role, permissionName] = checkbox.name.split('_');\n this.setState({\n permissions: {\n ...this.state.permissions,\n [role]: {\n ...this.state.permissions[role],\n [permissionName]: checkbox.checked ? checkbox.value : 0,\n }\n }\n }, (state) => {\n this.inputRef.value = this.encode();\n this.props.changePermissions(this.inputRef.value);\n });\n }\n\n handleInputChange = (event) => {\n const value = event.target.value;\n if (!this.isValid(value)) {\n return this.setState({ inputInvalid: true });\n }\n\n this.setState({\n permissions: this.decode(value),\n inputInvalid: false,\n });\n this.props.changePermissions(this.inputRef.value);\n }\n\n render() {\n const { i18n } = this.props.session;\n const { inputInvalid } = this.state;\n const { close, save, fName } = this.props;\n const inputClasses = classNames({\n 'form-control total': true,\n 'error': inputInvalid,\n });\n\n return (\n <div className=\"modal-content permissions\">\n <div className=\"modal-header\">\n <h3 className=\"modal-title perms\">{i18n['Change Rights']} <span className=\"quot\">&quot;{fName}&quot;</span></h3>\n </div>\n <form name=\"form\" onChange={this.onChangeForm}>\n <div>\n <label><input type=\"checkbox\" name={'owner_read'} value=\"4\" checked={!!this.state.permissions[\"owner\"].read} id=\"read\" />{i18n['read by owner']}</label>\n <label><input type=\"checkbox\" name={'owner_write'} value=\"2\" checked={!!this.state.permissions[\"owner\"].write} />{i18n['write by owner']}</label>\n <label><input type=\"checkbox\" name={'owner_execute'} value=\"1\" checked={!!this.state.permissions[\"owner\"].execute} />{i18n['execute/search by owner']}</label>\n </div>\n <div>\n <label><input type=\"checkbox\" name={'group_read'} value=\"4\" checked={!!this.state.permissions[\"group\"].read} id=\"read\" />{i18n['read by group']}</label>\n <label><input type=\"checkbox\" name={'group_write'} value=\"2\" checked={!!this.state.permissions[\"group\"].write} />{i18n['write by group']}</label>\n <label><input type=\"checkbox\" name={'group_execute'} value=\"1\" checked={!!this.state.permissions[\"group\"].execute} />{i18n['execute/search by group']}</label>\n </div>\n <div>\n <label><input type=\"checkbox\" name={'others_read'} value=\"4\" checked={!!this.state.permissions[\"others\"].read} id=\"read\" />{i18n['read by others']}</label>\n <label><input type=\"checkbox\" name={'others_write'} value=\"2\" checked={!!this.state.permissions[\"others\"].write} />{i18n['write by others']}</label>\n <label><input type=\"checkbox\" name={'others_execute'} value=\"1\" checked={!!this.state.permissions[\"others\"].execute} />{i18n['execute/search by others']}</label>\n </div>\n </form>\n <input type=\"text\" className={inputClasses} defaultValue={this.encode()} ref={(ref) => this.inputRef = ref} onChange={this.handleInputChange} maxLength=\"3\" />\n <div className=\"modal-footer\">\n <button type=\"button\" className=\"btn btn-danger mr-auto\" onClick={close}>{i18n['Cancel']}</button>\n <button type=\"button\" className=\"btn btn-primary\" onClick={save} disabled={inputInvalid}>{i18n['OK']}</button>\n </div>\n </div>\n );\n }\n}\n\nfunction mapStateToProps(state) {\n return {\n session: state.session\n }\n}\n\nexport default connect(mapStateToProps)(Permissions);\n","import React from 'react';\nimport { useSelector } from 'react-redux';\n\nconst Move = (props) => {\n const { i18n } = useSelector(state => state.session);\n\n return (\n <div className=\"modal-content\">\n <div className=\"modal-header\">\n {props.items > 0 ?\n <h3 className=\"modal-title\">{i18n['Move files']} <span className=\"quot\">({props.items})</span> {i18n['into']}:</h3> :\n <h3 className=\"modal-title rename\">{i18n['Move']} <span className=\"quot\">&quot;{props.fName}&quot;</span> {i18n['into']}:</h3>}\n </div>\n <div className=\"modal-body\">\n <input type=\"text\" autoFocus defaultValue={props.path} onChange={props.onChange} ref={props.reference}></input>\n </div>\n <div className=\"modal-footer\">\n <button type=\"button\" className=\"btn btn-danger mr-auto\" onClick={props.close}>{i18n['Cancel']}</button>\n <button type=\"button\" className=\"btn btn-primary\" onClick={props.save}>{i18n['Move']}</button>\n </div>\n </div>\n );\n}\n\nexport default Move;","import React from 'react';\nimport { useSelector } from 'react-redux';\n\nconst Archive = (props) => {\n const { i18n } = useSelector(state => state.session);\n\n return (\n <div className=\"modal-content\">\n <div className=\"modal-header\">\n {props.items > 0 ?\n <h3 className=\"modal-title\">{i18n.Compress} <span className=\"quot\">({props.items})</span>?</h3> :\n <h3 className=\"modal-title rename\">{i18n.Compress} <span className=\"quot\">&quot;{props.fName}&quot;</span>?</h3>}\n </div>\n <div className=\"modal-body\">\n <input type=\"text\" autoFocus defaultValue={`${props.path}/${props.fName}.tar.gz`} onBlur={props.onChange} ref={props.reference}></input>\n </div>\n <div className=\"modal-footer\">\n <button type=\"button\" className=\"btn btn-danger mr-auto\" onClick={props.close}>{i18n.Compress}</button>\n <button type=\"button\" className=\"btn btn-primary\" onClick={props.save}>{i18n.Compress}</button>\n </div>\n </div>\n );\n}\n\nexport default Archive;","import React from 'react';\nimport { useSelector } from 'react-redux';\n\nconst Extract = (props) => {\n const { i18n } = useSelector(state => state.session);\n\n return (\n <div className=\"modal-content\">\n <div className=\"modal-header\">\n <h3 className=\"modal-title rename\">{i18n['Extract']} <span className=\"quot\">&quot;{props.fName}&quot;</span>{i18n['into']}</h3>\n </div>\n <div className=\"modal-body\">\n <input type=\"text\" autoFocus defaultValue={props.path} onBlur={props.onChange} ref={props.reference}></input>\n </div>\n <div className=\"modal-footer\">\n <button type=\"button\" className=\"btn btn-danger mr-auto\" onClick={props.close}>{i18n['Cancel']}</button>\n <button type=\"button\" className=\"btn btn-primary\" onClick={props.save}>{i18n['Extract']}</button>\n </div>\n </div>\n );\n}\n\nexport default Extract;","import React from 'react';\nimport { useSelector } from 'react-redux';\n\nconst Copy = (props) => {\n const { i18n } = useSelector(state => state.session);\n\n return (\n <div className=\"modal-content\">\n <div className=\"modal-header\">\n {props.items > 0 ?\n <h3 className=\"modal-title\">{i18n['Copy files']} <span className=\"quot\">({props.items})</span> {i18n['into']}:</h3> :\n <h3 className=\"modal-title rename\">{i18n['Copy']} <span className=\"quot\">&quot;{props.fName}&quot;</span> {i18n['into']}:</h3>}\n </div>\n <div className=\"modal-body\">\n <input type=\"text\" autoFocus defaultValue={props.path} onChange={props.onChange} ref={props.reference}></input>\n </div>\n <div className=\"modal-footer\">\n <button type=\"button\" className=\"btn btn-danger mr-auto\" onClick={props.close}>{i18n['Cancel']}</button>\n <button type=\"button\" className=\"btn btn-primary\" onClick={props.save}>{i18n['Copy']}</button>\n </div>\n </div>\n );\n}\n\nexport default Copy;","import React from 'react';\n\nconst Replace = (props) => {\n return (\n <div className=\"modal-content replace\">\n <div className=\"modal-header\">\n {props.files.length > 1 ?\n <div><h3>These files already exist</h3>\n {props.files.map(item =>\n <span className=\"quot\">&quot;{item.name}&quot; </span>\n )}\n </div> :\n <div><h3>This file already exists</h3>\n <span className=\"quot\">&quot;{props.files[0].name}&quot;</span>\n </div>\n }\n </div>\n <div className=\"modal-footer\">\n <button type=\"button\" className=\"btn btn-primary mr-auto\" onClick={props.close}>Cancel</button>\n <button type=\"button\" className=\"btn btn-danger\" onClick={() => props.replace(props.files)}>Overwrite</button>\n </div>\n </div>\n );\n}\n\nexport default Replace;","import React, { Component } from 'react';\nimport AddFile from './AddFile';\nimport AddDirectory from './AddDirectory';\nimport Rename from './Rename';\nimport Delete from './Delete';\nimport NothingSelected from './NothingSelected';\nimport Permissions from './Permissions';\nimport Move from './Move';\nimport Archive from './Archive';\nimport Extract from './Extract';\nimport Copy from './Copy';\nimport './Modal.scss';\nimport Replace from './Replace';\n\nclass Modal extends Component {\n\n componentDidMount = () => {\n window.addEventListener(\"click\", this.closeOutside);\n document.addEventListener(\"keydown\", this.hotkeys);\n }\n\n componentWillUnmount = () => {\n window.removeEventListener(\"click\", this.closeOutside);\n document.removeEventListener(\"keydown\", this.hotkeys);\n }\n\n hotkeys = (e) => {\n if (e.keyCode === 27) {\n this.closeModal();\n } else if (e.keyCode === 13) {\n this.saveAndClose();\n }\n }\n\n saveAndClose = () => {\n this.props.onClick();\n this.props.onClose();\n }\n\n changePermissions = (permissions) => {\n this.props.onChangePermissions(permissions);\n }\n\n replace = (file) => {\n this.props.onClick(file);\n this.props.onClose();\n }\n\n onChange = (e) => {\n this.props.onChangeValue(e.target.value);\n }\n\n closeModal = () => {\n this.props.onClose();\n }\n\n closeOutside = (e) => {\n let modal = document.getElementById(\"modal\");\n if (e.target === modal) {\n this.props.onClose();\n }\n }\n\n content = () => {\n const { type, reference, fName, permissions, items, path, files, notAvailable } = this.props;\n switch (type) {\n case 'Copy': return <Copy close={this.closeModal} save={this.saveAndClose} reference={reference} onChange={this.onChange} name={type} fName={fName} items={items} path={path} />;\n case 'Move': return <Move close={this.closeModal} save={this.saveAndClose} reference={reference} onChange={this.onChange} name={type} fName={fName} items={items} path={path} />;\n case 'Permissions': return <Permissions close={this.closeModal} save={this.saveAndClose} changePermissions={this.changePermissions} fName={fName} permissions={permissions} />;\n case 'Extract': return <Extract close={this.closeModal} save={this.saveAndClose} reference={reference} onChange={this.onChange} name={type} fName={fName} path={path} />;\n case 'Archive': return <Archive close={this.closeModal} save={this.saveAndClose} reference={reference} onChange={this.onChange} items={items} name={type} fName={fName} path={path} />;\n case 'Rename': return <Rename close={this.closeModal} save={this.saveAndClose} reference={reference} onChange={this.onChange} name={type} fName={fName} />;\n case 'Add directory': return <AddDirectory close={this.closeModal} save={this.saveAndClose} reference={reference} />;\n case 'Delete': return <Delete close={this.closeModal} save={this.saveAndClose} fName={fName} items={items} />;\n case 'Add file': return <AddFile close={this.closeModal} save={this.saveAndClose} reference={reference} />;\n case 'Replace': return <Replace close={this.closeModal} replace={(files) => this.replace(files)} files={files} />\n case 'Nothing selected': return <NothingSelected close={this.closeModal} notAvailable={notAvailable} />;\n default:\n break;\n }\n }\n\n render() {\n return (\n <div>\n <div className=\"modal\" id=\"modal\">\n {this.content()}\n </div>\n </div>\n );\n }\n}\n\nexport default Modal;","import React, { createRef, useEffect } from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport './Menu.scss';\nimport { useSelector } from 'react-redux';\nimport { Link } from 'react-router-dom';\n\nconst Menu = (props) => {\n const { i18n } = useSelector(state => state.session);\n const inputFile = createRef();\n\n useEffect(() => {\n document.addEventListener(\"keydown\", hotKeys);\n\n return () => document.removeEventListener(\"keydown\", hotKeys);\n }, []);\n\n const newFile = () => {\n props.openModal(\"Add file\");\n }\n\n const newDirectory = () => {\n props.openModal(\"Add directory\");\n }\n\n const deleteFile = () => {\n const { selection, openModal, cursor } = props;\n if (selection.length === 0) {\n if (cursor === 0) {\n openModal(\"Nothing selected\");\n } else {\n openModal(\"Delete\");\n }\n } else {\n openModal(\"Delete\", selection.length);\n }\n }\n\n const rename = () => {\n if (props.cursor === 0) {\n props.openModal(\"Nothing selected\");\n } else {\n props.openModal(\"Rename\");\n }\n }\n\n const permissions = () => {\n if (props.cursor === 0) {\n props.openModal(\"Nothing selected\");\n } else {\n props.openModal(\"Permissions\");\n }\n }\n\n const move = () => {\n const { selection, openModal, cursor } = props;\n if (selection.length === 0) {\n if (cursor === 0) {\n openModal(\"Nothing selected\");\n } else {\n openModal(\"Move\");\n }\n } else {\n openModal(\"Move\", selection.length);\n }\n }\n\n const archive = () => {\n const { selection, openModal, cursor } = props;\n\n if (selection.length === 0) {\n if (cursor === 0) {\n openModal(\"Nothing selected\");\n } else {\n openModal(\"Archive\");\n }\n } else {\n openModal(\"Archive\", selection.length);\n }\n }\n\n const extract = () => {\n if (props.cursor === 0) {\n props.openModal(\"Nothing selected\");\n } else {\n props.openModal(\"Extract\");\n }\n }\n\n const copy = () => {\n const { selection, openModal, cursor } = props;\n if (selection.length === 0) {\n if (cursor === 0) {\n openModal(\"Nothing selected\");\n } else {\n openModal(\"Copy\");\n }\n } else {\n openModal(\"Copy\", selection.length);\n }\n }\n\n const upload = (e) => {\n if (e.target.files.length === 0) {\n return;\n }\n\n props.upload(e.target.files);\n }\n\n const download = () => {\n if (props.cursor === 0) {\n props.openModal(\"Nothing selected\");\n } else if (props.itemType === \"d\") {\n props.openModal(\"Nothing selected\", null, true);\n } else {\n props.download();\n }\n }\n\n const hotKeys = (e) => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus');\n\n if (props.modalVisible || isSearchInputFocused) return;\n\n if (e.shiftKey && e.keyCode === 117) {\n rename();\n }\n\n switch (e.keyCode) {\n case 46: return deleteFile();\n case 65: return archive();\n case 68: return download();\n case 77: return move();\n case 78: return newFile();\n case 85: return inputFile.click();\n case 113: return rename();\n case 115: return permissions();\n case 116: return copy();\n case 118: return newDirectory();\n case 119: return deleteFile();\n default: break;\n }\n }\n\n let matchArchive = props.name.match(/.zip|.tgz|.tar.gz|.gzip|.tbz|.tar.bz|.gz|.zip|.tar|.rar/g);\n\n return (\n <div className=\"menu\">\n <div className=\"logo\">\n <Link to=\"/\">\n <img src=\"../../images/logo.png\" alt=\"Logo\" />\n </Link>\n </div>\n <div className=\"btn-group\" role=\"group\" aria-label=\"First group\">\n <input type=\"file\" className=\"upload\" multiple onChange={upload} ref={inputFile} />\n <button type=\"button\" className=\"btn btn-light\" id=\"upload\" onClick={() => inputFile.current.click()}>{i18n.UPLOAD}</button>\n <button type=\"button\" className=\"btn btn-light big\" onClick={newFile}>{i18n['NEW FILE']}</button>\n <button type=\"button\" className=\"btn btn-light small\" onClick={newFile} title={i18n['NEW FILE']}><FontAwesomeIcon icon=\"file\" className=\"icon file\" /></button>\n <button type=\"button\" className=\"btn btn-light big\" onClick={newDirectory}>{i18n['NEW DIR']}</button>\n <button type=\"button\" className=\"btn btn-light small\" onClick={newDirectory} title={i18n['NEW DIR']}><FontAwesomeIcon icon=\"folder\" className=\"icon folder-close\" /></button>\n <button type=\"button\" className=\"btn btn-light big\" onClick={download}>{i18n.DOWNLOAD}</button>\n <button type=\"button\" className=\"btn btn-light small\" onClick={download} title={i18n.DOWNLOAD}><FontAwesomeIcon icon=\"download\" className=\"icon download\" /></button>\n <button type=\"button\" className=\"btn btn-light big\" onClick={rename}>{i18n.RENAME}</button>\n <button type=\"button\" className=\"btn btn-light small\" onClick={rename} title={i18n.RENAME}><FontAwesomeIcon icon=\"italic\" className=\"icon italic\" /></button>\n <button type=\"button\" className=\"btn btn-light big\" onClick={permissions}>{i18n.RIGHTS}</button>\n <button type=\"button\" className=\"btn btn-light small\" onClick={permissions} title={i18n.RIGHTS}><FontAwesomeIcon icon=\"user\" className=\"icon user\" /></button>\n <button type=\"button\" className=\"btn btn-light big\" onClick={copy}>{i18n.COPY}</button>\n <button type=\"button\" className=\"btn btn-light small\" onClick={copy} title={i18n.COPY}><FontAwesomeIcon icon=\"copy\" className=\"icon copy\" /></button>\n <button type=\"button\" className=\"btn btn-light big\" onClick={move}>{i18n.MOVE}</button>\n <button type=\"button\" className=\"btn btn-light small\" onClick={move} title={i18n.MOVE}><FontAwesomeIcon icon=\"paste\" className=\"icon paste\" /></button>\n {matchArchive ? null : <button type=\"button\" className=\"btn btn-light big\" onClick={archive}>{i18n.ARCHIVE}</button>}\n {matchArchive ? null : <button type=\"button\" className=\"btn btn-light small\" onClick={archive} title={i18n.ARCHIVE}><FontAwesomeIcon icon=\"book\" className=\"icon book\" /></button>}\n {matchArchive ? <button type=\"button\" className=\"btn btn-light big\" onClick={extract}>{i18n.EXTRACT}</button> : null}\n {matchArchive ? <button type=\"button\" className=\"btn btn-light small\" onClick={extract} title={i18n.EXTRACT}><FontAwesomeIcon icon=\"box-open\" className=\"icon open\" /></button> : null}\n <button type=\"button\" className=\"btn btn-light big delete\" onClick={deleteFile} >{i18n.DELETE}</button>\n <button type=\"button\" className=\"btn btn-light small\" onClick={deleteFile} title={i18n.DELETE}><FontAwesomeIcon icon=\"trash\" className=\"icon trash\" /></button>\n </div>\n </div>\n );\n}\n\nexport default Menu;\n","import axios from \"axios\";\nimport QueryString from \"qs\";\nconst server = window.location.origin + \"/file_manager/fm_api.php?\";\n\nexport function validateAction(url) {\n return axios.get(url);\n}\n\nexport function cacheData(currentUser, history, rootDir) {\n const parsedQueryString = QueryString.parse(history.location.search, { ignoreQueryPrefix: true });\n\n if (parsedQueryString.path) {\n localStorage.setItem(\"activeWindow\", \"left\");\n localStorage.setItem(\"leftListPath\", parsedQueryString.path);\n localStorage.setItem(\"rightListPath\", parsedQueryString.path);\n return;\n }\n\n if (localStorage.getItem(\"lastUser\") === null || currentUser !== localStorage.getItem(\"lastUser\")) {\n localStorage.setItem(\"lastUser\", currentUser);\n localStorage.setItem(\"activeWindow\", \"left\");\n localStorage.setItem(\"leftListPath\", rootDir);\n localStorage.setItem(\"rightListPath\", rootDir);\n return;\n }\n\n if (localStorage.getItem(\"activeWindow\") === null || localStorage.getItem(\"leftListPath\") === null || localStorage.getItem(\"rightListPath\") === null) {\n let path = history.location.search.substring(6).split('/');\n localStorage.setItem(\"activeWindow\", \"left\");\n localStorage.setItem(\"leftListPath\", path);\n localStorage.setItem(\"rightListPath\", rootDir);\n return;\n }\n}\n\nexport function changeDirectoryOnLoading(server, list) {\n return axios.get(`${server}dir=${encodePath(localStorage.getItem(list))}&action=cd`);\n}\n\nexport function changeDirectory(server, path) {\n return axios.get(`${server}dir=${encodePath(path)}&action=cd`);\n}\n\nexport function getData(path) {\n return axios.get(`${server}dir=%2F${path}&action=cd`);\n}\n\nexport function checkExistingFileName(selectedFiles, activeWindow, leftListData, rightListData) {\n let selectedFileNames = [];\n let existingFileNames = [];\n let newFiles = [];\n\n for (let i = 0; i < selectedFiles.length; i++) {\n selectedFileNames.push(selectedFiles[i]);\n }\n\n if (activeWindow === \"left\") {\n for (let i = 0; i < selectedFileNames.length; i++) {\n if (leftListData.map((item) => { return item.name }).includes(selectedFileNames[i].name)) {\n existingFileNames.push(selectedFileNames[i]);\n } else {\n newFiles.push(selectedFileNames[i]);\n }\n }\n } else {\n for (let i = 0; i < selectedFileNames.length; i++) {\n if (rightListData.map((item) => { return item.name }).includes(selectedFileNames[i].name)) {\n existingFileNames.push(selectedFileNames[i]);\n } else {\n newFiles.push(selectedFileNames[i]);\n }\n }\n }\n\n return { existingFileNames, newFiles };\n}\n\nexport function encodePath(path) {\n let splitPath = path.split('/');\n let encodedPath = splitPath.join('%2F');\n return encodedPath;\n}\n\nexport function activeWindowPath() {\n if (localStorage.getItem(\"activeWindow\") === \"left\") {\n let currentPath = localStorage.getItem(\"leftListPath\");\n return currentPath;\n } else if (localStorage.getItem(\"activeWindow\") === \"right\") {\n let currentPath = localStorage.getItem(\"rightListPath\");\n return currentPath;\n }\n}\n\nexport function deleteItems(url, path, selection) {\n if (!selection.length) {\n return false;\n }\n\n const promisesArray = selection.map(item =>\n validateAction(`${url}item=${path}%2F${item}&dir=${path}&action=delete_files`)\n .then(() => { })\n );\n\n return Promise.all(promisesArray);\n}\n\nexport function moveItems(url, path, targetPath, selection) {\n if (!selection.length) {\n return false;\n }\n\n const promisesArray = selection.map(item =>\n validateAction(`${url}item=${path}%2F${item}&target_name=${targetPath}&action=move_file`)\n .then(() => { })\n );\n\n return Promise.all(promisesArray);\n}\n\nexport function copyItems(url, path, targetPath, selection) {\n if (!selection.length) {\n return false;\n }\n\n const promisesArray = selection.map(item =>\n validateAction(`${url}item=${path}%2F${item}&filename=${item}&dir=${path}&dir_target=${targetPath}&action=copy_file`)\n .then(() => { })\n );\n\n return Promise.all(promisesArray);\n}","import React, { Component } from 'react';\nimport DirectoryList from '../../components/Lists/DirectoryList/DirectoryList';\nimport ProgressBar from '../../components/ProgressBar/ProgressBar';\nimport { toast, ToastContainer } from 'react-toastify';\nimport Hotkeys from '../../components/Hotkeys/Hotkeys';\nimport Modal from '../../components/Modal/Modal';\nimport 'react-toastify/dist/ReactToastify.css';\nimport { withRouter } from 'react-router-dom';\nimport Menu from '../../components/Menu/Menu';\nimport * as FM from '../../FileManagerHelper';\nimport axios from 'axios';\nimport { Helmet } from 'react-helmet';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport 'src/containers/App/App.scss';\nimport { connect } from 'react-redux';\n\nconst server = window.location.origin + \"/file_manager/fm_api.php?\";\nclass FileManager extends Component {\n constructor(props) {\n super(props);\n this.state = {\n leftList: {\n path: this.props.menuCounters.user.HOME,\n files: { listing: [] },\n },\n rightList: {\n path: this.props.menuCounters.user.HOME,\n files: { listing: [] },\n },\n currentPath: this.props.menuCounters.user.HOME,\n currentUser: this.props.menuCounters.user.HOME,\n activeWindow: \"left\",\n modalWindow: null,\n modalVisible: false,\n cursor: 0,\n itemName: \"\",\n itemPermissions: \"\",\n itemType: \"\",\n itemsSelected: [],\n modalInputValue: \"\",\n uploadPercent: \"0\",\n loading: false\n }\n }\n\n UNSAFE_componentWillMount = () => {\n FM.cacheData(this.state.currentUser, this.props.history, this.props.menuCounters.user.HOME);\n let currentPath = FM.activeWindowPath();\n this.setState({ currentPath });\n this.changeDirectoryOnLoading();\n }\n\n componentDidMount = () => {\n if (!localStorage.getItem(\"token\") || !this.props.session.userName) {\n this.props.history.push('/login/');\n }\n\n window.addEventListener(\"keydown\", this.switchActiveList);\n window.addEventListener(\"keydown\", this.toggleActiveListOnTab);\n document.addEventListener(\"keydown\", this.hotkeysListener);\n\n if (localStorage.getItem('activeWindow')) {\n this.setState({ activeWindow: localStorage.getItem('activeWindow') });\n }\n }\n\n componentWillUnmount = () => {\n window.removeEventListener(\"keydown\", this.switchActiveList);\n window.removeEventListener(\"keydown\", this.toggleActiveListOnTab);\n document.removeEventListener(\"keydown\", this.hotkeysListener);\n }\n\n cachePaths = () => {\n localStorage.setItem('activeWindow', this.state.activeWindow);\n localStorage.setItem('leftListPath', this.state.leftList.path);\n localStorage.setItem('rightListPath', this.state.rightList.path);\n }\n\n setStateAsync = updater => new Promise(resolve => this.setState(updater, resolve));\n\n changeDirectoryOnLoading = async () => {\n ['leftList', 'rightList'].map(async (side) => {\n const result = await FM.changeDirectoryOnLoading(server, `${side}Path`);\n let path = localStorage.getItem(`${side}Path`);\n let listing = result.data.listing;\n await this.setStateAsync({ [side]: { files: { listing }, path } });\n });\n\n await this.setStateAsync({ loading: false });\n }\n\n changeDirectory = () => {\n const { activeWindow, currentPath } = this.state;\n FM.changeDirectory(server, currentPath)\n .then(result => {\n let listing = result.data.listing;\n\n if (this.state.leftList.path === this.state.rightList.path) {\n this.setState({ leftList: { files: { listing }, path: currentPath }, rightList: { files: { listing }, path: currentPath }, loading: false });\n this.leftList.resetData();\n this.rightList.resetData();\n } else if (activeWindow === \"left\") {\n this.setState({ leftList: { files: { listing }, path: currentPath }, loading: false });\n this.leftList.resetData();\n } else {\n this.setState({ rightList: { files: { listing }, path: currentPath }, loading: false });\n this.rightList.resetData();\n }\n });\n }\n\n toggleActiveListOnTab = (e) => {\n const { activeWindow, rightList, leftList, currentPath } = this.state;\n\n if (this.state.modalVisible) {\n return;\n }\n\n if (e.keyCode === 9) {\n e.preventDefault();\n if (activeWindow === \"left\") {\n this.setState({ activeWindow: \"right\", currentPath: rightList.path });\n this.rightList.passData();\n } else {\n this.setState({ activeWindow: \"left\", currentPath: leftList.path });\n this.leftList.passData();\n }\n this.changeQuery(currentPath);\n this.cachePaths();\n }\n }\n\n passSelection = (itemsSelected) => {\n this.setState({ itemsSelected });\n }\n\n toggleActiveList = (list) => {\n this.setState({ activeWindow: list });\n }\n\n switchActiveList = (e) => {\n if (this.state.modalVisible) {\n return;\n }\n\n if (e.keyCode === 39) {\n this.setState({ activeWindow: \"right\", currentPath: this.state.rightList.path });\n this.changeQuery(this.state.currentPath);\n this.rightList.passData();\n this.cachePaths();\n } else if (e.keyCode === 37) {\n this.setState({ activeWindow: \"left\", currentPath: this.state.leftList.path });\n this.changeQuery(this.state.currentPath);\n this.leftList.passData();\n this.cachePaths();\n }\n }\n\n validateAction = async (url) => {\n await this.setStateAsync({ loading: true });\n let response = await FM.validateAction(url);\n if (response.data.result) {\n this.changeDirectory();\n } else {\n this.showError(response.data.message);\n }\n }\n\n showError = (error) => {\n toast.error(error, {\n position: \"top-center\",\n autoClose: 3000,\n hideProgressBar: false,\n closeOnClick: true,\n pauseOnHover: true,\n draggable: true\n });\n this.setState({ loading: false });\n }\n\n download = () => {\n const { cursor, currentPath, itemName } = this.state;\n\n if (cursor !== 0) {\n window.open('/api/v1/download/file/?path=' + currentPath + '/' + itemName);\n }\n }\n\n checkExistingFileName = (selectedFiles) => {\n const { activeWindow, leftList, rightList } = this.state;\n const { existingFileNames, newFiles } = FM.checkExistingFileName(selectedFiles, activeWindow, leftList.files.listing, rightList.files.listing);\n\n if (existingFileNames.length !== 0) {\n this.modal(\"Replace\", existingFileNames);\n this.upload(newFiles);\n } else {\n this.upload(selectedFiles);\n }\n }\n\n replaceFiles = (selectedFiles) => {\n for (let i = 0; i < selectedFiles.length; i++) {\n this.validateAction(`${server}item=${FM.encodePath(this.state.currentPath)}%2F${selectedFiles[i].name}&dir=${FM.encodePath(this.state.currentPath)}&action=delete_files`);\n }\n\n this.upload(selectedFiles);\n }\n\n upload = (selectedFiles) => {\n const formData = new FormData();\n\n if (selectedFiles.length === 0) {\n return;\n }\n\n for (let i = 0; i < selectedFiles.length; i++) {\n formData.append('files[]', selectedFiles[i], selectedFiles[i].name);\n }\n\n this.setState({ loading: true }, () => {\n axios.post(`${window.location.origin}/api/v1/upload/?dir=${this.state.currentPath}`, formData, {\n onUploadProgress: progressEvent => {\n let uploadPercent = Math.round(progressEvent.loaded / progressEvent.total * 100);\n this.setState({ uploadPercent });\n }\n }).then(() => {\n this.setState({ uploadPercent: \"0\" });\n this.changeDirectory();\n })\n });\n }\n\n onDelete = async () => {\n const { itemsSelected, itemName, currentPath } = this.state;\n if (itemsSelected.length > 0) {\n await this.setStateAsync({ loading: true });\n await FM.deleteItems(server, FM.encodePath(currentPath), itemsSelected);\n this.changeDirectory();\n } else {\n this.validateAction(`${server}item=${FM.encodePath(currentPath)}%2F${itemName}&dir=${FM.encodePath(currentPath)}&action=delete_files`);\n }\n }\n\n newFile = () => {\n let name = this.inputElement.value;\n this.validateAction(`${server}filename=${name}&dir=${FM.encodePath(this.state.currentPath)}&action=create_file`);\n }\n\n newDir = () => {\n let name = this.inputElement.value;\n this.validateAction(`${server}dirname=${name}&dir=${FM.encodePath(this.state.currentPath)}&action=create_dir`);\n }\n\n onRename = () => {\n const { modalInputValue, itemType, itemName, currentPath } = this.state;\n let name = modalInputValue;\n if (itemType === \"f\") {\n this.validateAction(`${server}item=${itemName}&target_name=${name}&dir=${FM.encodePath(currentPath)}&action=rename_file`);\n } else if (itemType === \"d\") {\n this.validateAction(`${server}item=${itemName}&target_name=${name}&dir=${FM.encodePath(currentPath)}%2F&action=rename_directory`);\n }\n }\n\n onChangePermissions = () => {\n let permissions = this.state.modalInputValue;\n this.validateAction(`${server}dir=${FM.encodePath(this.state.currentPath)}%2F&item=${this.state.itemName}&permissions=${permissions}&action=chmod_item`);\n this.setState({ itemPermissions: permissions });\n }\n\n archiveItem = () => {\n let name = this.inputElement.value;\n\n if (this.state.itemsSelected.length > 0) {\n this.setState({ loading: true }, () => {\n let items = [];\n for (let i = 0; i < this.state.itemsSelected.length; i++) {\n let path = `${this.state.currentPath}/`;\n items.push(path += this.state.itemsSelected[i]);\n }\n this.validateAction(`${server}items=${items}&dst_item=${FM.encodePath(name)}&action=pack_item`);\n this.setState({ itemsSelected: [] });\n })\n } else {\n this.validateAction(`${server}items=${FM.encodePath(this.state.currentPath)}%2F${this.state.itemName}&dst_item=${FM.encodePath(name)}&action=pack_item`);\n }\n }\n\n extractItem = () => {\n let name = this.inputElement.value;\n this.validateAction(`${server}item=${FM.encodePath(this.state.currentPath)}%2F${this.state.itemName}&filename=${this.state.itemName}&dir=${FM.encodePath(this.state.currentPath)}&dir_target=${name}&action=unpack_item`);\n }\n\n moveItem = async () => {\n const { currentPath, itemsSelected, itemName } = this.state;\n let targetDir = this.inputElement.value;\n\n if (itemsSelected.length > 0) {\n await this.setStateAsync({ loading: true });\n await FM.moveItems(server, FM.encodePath(currentPath), targetDir, itemsSelected);\n await this.setStateAsync({ itemsSelected: [] });\n this.changeDirectory();\n } else {\n this.validateAction(`${server}item=${currentPath}%2F${itemName}&target_name=${targetDir}&action=move_file`);\n }\n }\n\n copyItem = async () => {\n const { currentPath, itemsSelected, itemName } = this.state;\n let targetDir = this.inputElement.value;\n\n if (itemsSelected.length > 0) {\n await this.setStateAsync({ loading: true });\n await FM.copyItems(server, FM.encodePath(currentPath), targetDir, itemsSelected);\n await this.setStateAsync({ itemsSelected: [] });\n this.changeDirectory();\n } else {\n this.validateAction(`${server}item=${currentPath}%2F${itemName}&filename=${itemName}&dir=${currentPath}&dir_target=${targetDir}&action=copy_file`);\n }\n }\n\n changeQuery = (path) => {\n this.props.history.push({\n pathname: '/list/directory/',\n search: `?path=${path}`\n });\n }\n\n openDirectory = () => {\n this.setState({ loading: true }, () => {\n this.changeDirectory();\n this.cachePaths();\n });\n }\n\n openCertainDirectory = () => {\n this.setState({ loading: true }, () => {\n this.changeDirectory();\n this.cachePaths();\n });\n }\n\n moveBack = () => {\n const { activeWindow } = this.state;\n\n let list = { ...this.state[`${activeWindow}List`] };\n list.path = list.path.substring(0, list.path.lastIndexOf('/'));\n this.setState({ [`${activeWindow}List`]: list, currentPath: list.path });\n this.props.history.push({ search: `?path=${list.path}` })\n this.openDirectory();\n }\n\n addToPath = (name) => {\n const { activeWindow } = this.state;\n\n let activeList = { ...this.state[`${activeWindow}List`] };\n let oldPath = activeList.path;\n activeList.path = `${oldPath}/${name}`;\n this.setState({ [`${activeWindow}List`]: activeList, currentPath: activeList.path });\n }\n\n changeInputValue = (modalInputValue) => {\n this.setState({ modalInputValue });\n }\n\n changePathAfterToggle = (currentPath) => {\n this.setState({ currentPath });\n }\n\n changePath = (currentPath) => {\n if (this.state.activeWindow === \"left\") {\n this.setState({ leftList: { files: { ...this.state.leftList.files }, path: currentPath }, currentPath });\n } else {\n this.setState({ rightList: { files: { ...this.state.rightList.files }, path: currentPath }, currentPath });\n }\n }\n\n passData = (cursor, itemName, itemPermissions, itemType) => {\n this.setState({ cursor, itemName, itemPermissions, itemType });\n }\n\n closeModal = () => {\n this.setState({ modalVisible: false });\n }\n\n hotkeysListener = (e) => {\n if (this.state.modalVisible) {\n return;\n }\n\n if (e.keyCode === 72) {\n this.hotkeys();\n }\n }\n\n hotkeys = () => {\n if (this.state.hotkeysPanel === \"inactive\") {\n this.setState({ hotkeysPanel: \"active\" });\n } else {\n this.setState({ hotkeysPanel: \"inactive\" });\n }\n }\n\n modal = (type, items, available) => {\n const { modalVisible, itemName, itemPermissions, currentPath } = this.state;\n switch (type) {\n case 'Copy': return this.setState({ modalWindow: <Modal modalVisible={modalVisible} type={type} fName={itemName} path={currentPath} onClick={this.copyItem} items={items} onClose={this.closeModal} onChangeValue={this.changeInputValue} reference={(inp) => this.inputElement = inp} />, modalVisible: true });\n case 'Move': return this.setState({ modalWindow: <Modal modalVisible={modalVisible} type={type} fName={itemName} path={currentPath} onClick={this.moveItem} items={items} onClose={this.closeModal} onChangeValue={this.changeInputValue} reference={(inp) => this.inputElement = inp} />, modalVisible: true });\n case 'Extract': return this.setState({ modalWindow: <Modal modalVisible={modalVisible} type={type} fName={itemName} onClick={this.extractItem} onClose={this.closeModal} onChangeValue={this.changeInputValue} path={currentPath} reference={(inp) => this.inputElement = inp} />, modalVisible: true });\n case 'Archive': return this.setState({ modalWindow: <Modal modalVisible={modalVisible} type={type} fName={itemName} onClick={this.archiveItem} items={items} onClose={this.closeModal} onChangeValue={this.changeInputValue} path={currentPath} reference={(inp) => this.inputElement = inp} />, modalVisible: true });\n case 'Permissions': return this.setState({ modalWindow: <Modal modalVisible={modalVisible} type={type} fName={itemName} onClick={this.onChangePermissions} onClose={this.closeModal} onChangePermissions={this.changeInputValue} permissions={itemPermissions} />, modalVisible: true });\n case 'Rename': return this.setState({ modalWindow: <Modal modalVisible={modalVisible} type={type} fName={itemName} onChangeValue={this.changeInputValue} onClick={this.onRename} onClose={this.closeModal} reference={(inp) => this.inputElement = inp} />, modalVisible: true });\n case 'Add directory': return this.setState({ modalWindow: <Modal modalVisible={modalVisible} type={type} onClick={this.newDir} onClose={this.closeModal} reference={(inp) => this.inputElement = inp} />, modalVisible: true });\n case 'Add file': return this.setState({ modalWindow: <Modal modalVisible={modalVisible} type={type} onClick={this.newFile} onClose={this.closeModal} reference={(inp) => this.inputElement = inp} />, modalVisible: true });\n case 'Delete': return this.setState({ modalWindow: <Modal modalVisible={modalVisible} type={type} fName={itemName} onClick={this.onDelete} onClose={this.closeModal} items={items} />, modalVisible: true });\n case 'Nothing selected': return this.setState({ modalWindow: <Modal modalVisible={modalVisible} notAvailable={available} type={type} onClose={this.closeModal} onClick={this.closeModal} />, modalVisible: true });\n case \"Replace\": return this.setState({ modalWindow: <Modal modalVisible={modalVisible} type={type} files={items} onClick={(files) => this.replaceFiles(files)} onClose={this.closeModal} />, modalVisible: true });\n default:\n break;\n }\n }\n\n render() {\n const { activeWindow, modalWindow, modalVisible, itemsSelected, itemName, loading, uploadPercent, itemType } = this.state;\n const DirectoryLists = ['left', 'right'].map((side) =>\n <DirectoryList\n changePathAfterToggle={this.changePathAfterToggle}\n openCertainDirectory={this.openCertainDirectory}\n isActive={activeWindow === side}\n openDirectory={this.openDirectory}\n passSelection={this.passSelection}\n data={this.state[`${side}List`].files}\n onClick={this.toggleActiveList}\n changePath={this.changePath}\n modalVisible={modalVisible}\n addToPath={this.addToPath}\n cursor={this.state.cursor}\n passData={this.passData}\n rootDir={this.props.menuCounters.user.HOME}\n ref={el => this[`${side}List`] = el}\n download={this.download}\n moveBack={this.moveBack}\n path={this.state[`${side}List`].path}\n history={this.props.history}\n loading={loading}\n list={side} />\n )\n return (\n <div className=\"window\">\n <Helmet>\n <title>{this.props.session.i18n['File Manager']}</title>\n </Helmet>\n {uploadPercent !== \"0\" ? <ProgressBar progress={uploadPercent} /> : null}\n <ToastContainer />\n <Menu\n onDelete={this.onDeleteFileHandler}\n modalVisible={modalVisible}\n download={this.download}\n openModal={this.modal}\n selection={itemsSelected}\n itemType={itemType}\n upload={this.checkExistingFileName}\n cursor={this.state.cursor}\n name={itemName} />\n <div className=\"lists-container\">\n {DirectoryLists}\n <div className=\"fixed-buttons fm\">\n <div className=\"hotkey-button\">\n <button onClick={() => this.hotkeysList.classList.toggle('hide')}>\n <FontAwesomeIcon icon=\"ellipsis-h\" />\n </button>\n </div>\n </div>\n <Hotkeys reference={(inp) => this.hotkeysList = inp} toggleHotkeys={() => this.hotkeysList.classList.toggle('hide')} />\n </div>\n {modalVisible && modalWindow}\n </div>\n );\n }\n}\n\nfunction mapStateToProps(state) {\n return {\n session: state.session,\n menuCounters: state.menuCounters\n }\n}\n\nexport default connect(mapStateToProps)(withRouter(FileManager));\n","import React, { useEffect, useState } from 'react';\nimport CodeMirror from 'react-codemirror';\nimport './Editor.scss';\nimport 'codemirror/lib/codemirror.css';\nimport 'codemirror/mode/javascript/javascript';\nimport 'codemirror/mode/markdown/markdown';\nimport 'codemirror/mode/php/php';\nimport 'codemirror/mode/css/css';\nimport 'codemirror/mode/htmlmixed/htmlmixed';\nimport axios from 'axios';\nimport Spinner from '../../Spinner/Spinner';\nimport { useHistory } from 'react-router-dom';\nimport { toast, ToastContainer } from 'react-toastify';\nimport { useSelector } from 'react-redux';\n\nconst Editor = ({ close, name }) => {\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const [state, setState] = useState({\n code: '',\n loading: false\n });\n\n useEffect(() => {\n document.addEventListener(\"keydown\", hotKey);\n\n let path = `${history.location.search.substring(6, history.location.search.lastIndexOf('/'))}/${name}`;\n setState({ ...state, loading: true });\n\n checkFileType(path)\n .then(res => {\n if (res.data.result) {\n axios.get(`${window.location.origin}/api/v1/edit/file/?path=${encodePath(path)}`)\n .then(result => {\n if (result.data.error) {\n return showToast(res.data.error);\n }\n\n setState({ ...state, code: result.data.content, loading: false });\n })\n .catch(err => console.error(err));\n } else {\n console.error('Something went wrong with file type!');\n }\n })\n .catch(err => console.error(err));\n\n return () => {\n document.removeEventListener(\"keydown\", hotKey);\n }\n }, []);\n\n const checkFileType = path => {\n return axios.get(`${window.location.origin}/file_manager/fm_api.php?dir=${path}&action=check_file_type`);\n }\n\n const encodePath = path => {\n return path.split('/').join('%2F');\n }\n\n const hotKey = e => {\n if (e.keyCode === 113) {\n save();\n }\n }\n\n const save = () => {\n let formData = new FormData();\n let path = history.location.search.substring(6, history.location.search.lastIndexOf('/'));\n\n formData.append('save', 'Save');\n formData.append('contents', state.code);\n\n setState({ ...state, loading: true });\n axios.post(`${window.location.origin}/api/v1/edit/file/?path=${path}%2F${name}`, formData)\n .then(res => {\n if (res.data.error) {\n showToast(res.data.error);\n } else {\n showToast('Saved successfully!');\n }\n setState({ ...state, loading: false });\n })\n .catch(err => console.error(err));\n }\n\n const showToast = text => {\n toast.success(text, {\n position: \"top-center\",\n autoClose: 3000,\n hideProgressBar: false,\n closeOnClick: true,\n pauseOnHover: true,\n draggable: true\n });\n }\n\n const updateCode = newCode => {\n setState({ ...state, code: newCode });\n }\n\n const getModeFromFileName = () => {\n const fileExtension = name.split('.').pop();\n\n switch (fileExtension) {\n case 'js': return 'javascript';\n case 'jsx': return 'javascript';\n case 'php': return 'php';\n case 'css': return 'css';\n case 'scss': return 'css';\n case 'html': return 'htmlmixed';\n default: return 'markdown';\n }\n }\n\n let options = {\n mode: getModeFromFileName(),\n lineNumbers: true\n };\n\n return (\n <div className=\"editor\">\n <ToastContainer />\n <div className=\"panel-editor\">\n <button type=\"button\" className=\"btn btn-primary\" onClick={save}>{i18n.Save}</button>\n <button type=\"button\" className=\"btn btn-danger\" onClick={close}>{i18n.Close}</button>\n </div>\n {state.loading ? <Spinner /> : <CodeMirror value={state.code} onChange={updateCode} options={options} autoFocus />}\n </div>\n );\n}\n\nexport default Editor;\n","import React, { Component } from 'react';\nimport classNames from 'classname';\nimport * as FM from '../../../FileManagerHelper';\nimport './Photo.scss';\nimport Spinner from '../../Spinner/Spinner';\n\nclass Photo extends Component {\n state = {\n activeSlide: 0,\n photoGallery: [],\n loading: false\n }\n\n imgClass = (item) => {\n if (item.match(/.gif/i)) {\n return \"gif\";\n } else {\n return \"img\";\n }\n }\n\n encodePath = (path) => {\n let splitPath = path.split('/');\n splitPath.splice(splitPath.length - 1, 1);\n splitPath.splice(0, 1);\n return splitPath.join('%2F');\n }\n\n formatPath = (path) => {\n let splitPath = path.split('/');\n splitPath.splice(splitPath.length - 1, 1);\n return splitPath.join('/');\n }\n\n carouselIndicators = () => {\n const gallery = this.state.photoGallery;\n return gallery.map((item, i) => {\n const imageClasses = classNames({ 'control-photo': true, 'active': i === this.state.activeSlide });\n const result = (<div data-target=\"#photoGallery\" data-slide-to={i} key={i} className=\"indicator\">\n <img src={`${window.location.origin}/api/v1/view/file/${this.formatPath(this.props.path)}/${item}&raw=true`} alt={i} className={imageClasses} />\n </div>);\n return result;\n });\n }\n\n carouselPhotos = () => {\n const gallery = this.state.photoGallery || [];\n return gallery.map((item, i) => (\n <div className={i === this.state.activeSlide ? 'carousel-item active' : 'carousel-item'} key={i}>\n <div className=\"d-flex align-items-center justify-content-center min-vh-100\">\n <img className={this.imgClass(item)} src={`${window.location.origin}/api/v1/view/file/${this.formatPath(this.props.path)}/${item}&raw=true`} alt={i} />\n </div>\n </div>\n ));\n }\n\n setStateAsync = updater => new Promise(resolve => this.setState(updater, resolve));\n\n setPhotoGallery = async () => {\n await this.setStateAsync({ loading: true });\n const result = await FM.getData(this.encodePath(this.props.path));\n let photoGallery = [...this.state.photoGallery];\n result.data.listing.filter(item => item.name.match(/.png|.jpg|.jpeg|.gif/g) && !item.name.match(/.zip|.tgz|.tar.gz|.gzip|.tbz|.tar.bz|.gz|.zip|.tar|.rar/g) ? photoGallery.push(item.name) : null)\n await this.setStateAsync({ photoGallery, loading: false })\n this.setActiveImage();\n }\n\n setActiveImage = () => {\n let activeImage = this.props.activeImage;\n let activeImageIndex = this.state.photoGallery.indexOf(activeImage);\n this.setState({ activeSlide: activeImageIndex });\n }\n\n componentDidMount() {\n this.setPhotoGallery();\n }\n\n render() {\n return (\n <div>\n {this.state.loading ? <Spinner /> :\n <div id=\"photoGallery\" className=\"carousel slide\" data-ride=\"carousel\">\n <span className=\"close\" onClick={this.props.close}>&times;</span>\n <div className=\"carousel-inner\">\n {this.carouselPhotos()}\n </div>\n <div className=\"carousel-indicators\">\n {this.carouselIndicators()}\n </div>\n <a className=\"carousel-control-prev\" href=\"#photoGallery\" role=\"button\" data-slide=\"prev\">\n <span className=\"carousel-control-prev-icon\" aria-hidden=\"true\"></span>\n <span className=\"sr-only\">Previous</span>\n </a>\n <a className=\"carousel-control-next\" href=\"#photoGallery\" role=\"button\" data-slide=\"next\">\n <span className=\"carousel-control-next-icon\" aria-hidden=\"true\"></span>\n <span className=\"sr-only\">Next</span>\n </a>\n </div>\n }\n </div>\n );\n }\n}\n\nexport default Photo;","import React from 'react';\n// import video from '../../../2.mp4';\nimport './Video.scss';\n\nconst Video = (props) => {\n return (\n <div className=\"video-preview\">\n <span className=\"close\" onClick={props.closeModal}>&times;</span>\n <video className=\"video\" autoPlay loop controls>\n <source src=\"\" type=\"video/mp4\" />\n </video>\n </div>\n );\n}\n\nexport default Video;","import React, { useEffect } from 'react';\nimport { useSelector } from 'react-redux';\nimport { useHistory } from 'react-router';\nimport Editor from './Editor/Editor';\nimport Photo from './Photo/Photo';\nimport Video from './Video/Video';\n\nconst Preview = (props) => {\n const {userName} = useSelector(state => state.session);\n const history = useHistory();\n\n useEffect(() => {\n if (!userName) history.push('/login');\n\n document.addEventListener(\"keydown\", hotkeys);\n\n return () => {\n document.removeEventListener(\"keydown\", hotkeys);\n }\n }, []);\n\n const hotkeys = e => {\n if (e.keyCode === 121) {\n props.onClose();\n }\n }\n\n const onClose = () => {\n let lastOpenedDirectory = history.location.search.substring(6, history.location.search.lastIndexOf('/'));\n history.push({\n pathname: '/list/directory',\n search: `?path=${lastOpenedDirectory}`\n })\n }\n\n const content = () => {\n let split = history.location.search.split('/');\n let name = split[split.length - 1];\n\n if (history.location.pathname !== '/list/directory/preview/') {\n return;\n }\n\n if (name.match('.mp4')) {\n return <Video closeModal={onClose} />;\n } else if (name.match(/png|jpg|jpeg|gif/g)) {\n return <Photo closeModal={onClose} close={onClose} path={history.location.search} activeImage={name} />;\n } else {\n return <Editor close={onClose} name={name} />;\n }\n }\n\n return (\n <div>\n {content()}\n </div>\n );\n}\n\nexport default Preview;","import { ADD_FOCUSED_ELEMENT, ADD_ACTIVE_ELEMENT, REMOVE_FOCUSED_ELEMENT, REMOVE_ACTIVE_ELEMENT } from './mainNavigationTypes';\n\nexport const addFocusedElement = value => {\n return {\n type: ADD_FOCUSED_ELEMENT,\n value\n };\n};\n\nexport const removeFocusedElement = () => {\n return {\n type: REMOVE_FOCUSED_ELEMENT,\n value: ''\n };\n};\n\nexport const addActiveElement = value => {\n return {\n type: ADD_ACTIVE_ELEMENT,\n value\n };\n};\n\nexport const removeActiveElement = () => {\n return {\n type: REMOVE_ACTIVE_ELEMENT,\n value: ''\n };\n};","const itemName = 'token';\n\nexport const setAuthToken = token => localStorage.setItem(itemName, token);\nexport const getAuthToken = () => localStorage.getItem(itemName);\nexport const resetAuthToken = () => localStorage.removeItem(itemName);\n","import axios from \"axios\";\nimport { getAuthToken } from \"src/utils/token\";\n\nconst BASE_URL = window.location.origin;\nconst webApiUri = '/api/v1/list/ip/index.php';\nconst addIpApiUri = '/api/v1/add/ip/index.php';\nconst additionalInfoUri = '/api/v1/add/ip/index.php';\nconst ipInfoUri = '/api/v1/edit/ip/index.php';\nconst updateIpUri = '/api/v1/edit/ip/index.php';\n\nexport const getIpList = () => {\n return axios.get(BASE_URL + webApiUri);\n}\n\nexport const bulkAction = (action, internetProtocols) => {\n const formData = new FormData();\n formData.append(\"action\", action);\n formData.append(\"token\", getAuthToken());\n\n internetProtocols.forEach(internetProtocol => {\n formData.append(\"ip[]\", internetProtocol);\n });\n\n return axios.post(BASE_URL + '/api/v1/bulk/ip/', formData);\n};\n\nexport const handleAction = uri => {\n return axios.get(BASE_URL + uri, {\n params: {\n token: getAuthToken()\n }\n });\n}\n\nexport const getAdditionalInfo = () => {\n return axios.get(BASE_URL + additionalInfoUri);\n}\n\nexport const addInternetProtocol = data => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + addIpApiUri, formDataObject);\n}\n\nexport const getInternetProtocolInfo = ip => {\n return axios.get(BASE_URL + ipInfoUri, {\n params: {\n ip,\n token: getAuthToken()\n }\n });\n}\n\nexport const updateInternetProtocol = (data, ip) => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + updateIpUri, formDataObject, {\n params: {\n ip,\n token: getAuthToken()\n }\n });\n}","import React from 'react';\nimport { useSelector } from 'react-redux';\n\nconst SelectInput = ({ options = [], id, name, title, optionalTitle = '', selected = '', onChange = () => { }, disabled = false }) => {\n const { i18n } = useSelector(state => state.session);\n\n const renderOptions = () => {\n return options.map((option, index) =>\n <option key={index} selected={selected === option} value={option === i18n['Disable and Cancel Licence'] ? 'cancel' : option}>\n {option}\n </option>\n );\n }\n\n return (\n <>\n {\n options\n ? (\n <div className=\"form-group select-group\">\n <label className=\"label-wrapper\" htmlFor={id}>\n {title}\n <span>{optionalTitle}</span>\n </label>\n <select className=\"form-control\" id={id} name={name} disabled={disabled} onChange={event => onChange(event.target.value)}>\n {disabled && <input type=\"hidden\" name={name} value={selected || options[0]} />}\n {renderOptions()}\n </select>\n </div>\n )\n : null\n }\n </>\n );\n}\n\nexport default SelectInput;\n","import React, { useEffect, useState } from 'react';\n\nconst TextInput = ({ id, name, title, optionalTitle = '', type = 'text', onChange = () => { }, value = '', disabled = false }) => {\n const [inputValue, setInputValue] = useState('');\n\n useEffect(() => {\n if (value) {\n setInputValue(value);\n }\n }, [value]);\n\n const changeCheckbox = event => {\n setInputValue(event.target.value);\n onChange(event);\n }\n\n return (\n <div className=\"form-group\">\n <label className=\"label-wrapper\" htmlFor={id}>\n {title}\n <span>{optionalTitle}</span>\n </label>\n <input\n type={type}\n name={name}\n id={id}\n onChange={changeCheckbox}\n readOnly={disabled}\n value={inputValue}\n className=\"form-control\" />\n </div>\n );\n}\n\nexport default TextInput;\n","import React, { useEffect, useState } from 'react';\n\nconst Checkbox = ({ name, id, title, defaultChecked = false, onChange = () => { }, checked }) => {\n const [checkedState, setCheckedState] = useState(defaultChecked);\n\n useEffect(() => {\n setCheckedState(checked);\n }, [checked]);\n\n const changeCheckbox = event => {\n setCheckedState(event.target.checked);\n onChange(event.target.checked);\n }\n\n return (\n <div className=\"form-group\">\n <div className=\"checkbox-wrapper\">\n <input\n type=\"checkbox\"\n name={name}\n id={id}\n checked={checkedState}\n onChange={changeCheckbox}\n defaultChecked={defaultChecked} />\n <label htmlFor={id}>{title}</label>\n </div>\n </div>\n );\n}\n\nexport default Checkbox;\n","import React from 'react';\nimport './Container.scss';\n\nconst Container = props => {\n return(\n <div className={props.className}>\n {props.children}\n </div>\n );\n}\n\nexport default Container;","import React from 'react';\nimport Container from '../Container/Container';\n\nimport './AddItemLayout.scss';\n\nconst AddItemLayout = ({ date = '', time = '', status = '', children }) => {\n const renderDate = () => {\n if (date.length > 0) {\n let newDate = new Date(date);\n let day = newDate.getDate();\n let month = newDate.getMonth();\n let year = newDate.getFullYear();\n let months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n\n return <div className=\"date\">{day} &nbsp; {months[month]} &nbsp; {year}</div>;\n }\n }\n\n return (\n <div className=\"edit-item\">\n <Container className=\"l-col w-14\">\n {renderDate()}\n <div className=\"time\">\n {time}\n </div>\n <div className=\"status uppercase\">\n {status}\n </div>\n </Container>\n {children}\n </div>\n );\n}\n\nexport default AddItemLayout;","import React, { Component } from 'react';\nimport './Toolbar.scss';\n\nclass Toolbar extends Component {\n state = {\n toolbarHeight: 205\n }\n\n componentDidMount() {\n window.addEventListener(\"resize\", this.handleToolbar);\n document.addEventListener(\"scroll\", this.changeToolbarHeight);\n }\n\n componentWillUnmount() {\n window.removeEventListener(\"resize\", this.handleToolbar);\n document.removeEventListener(\"scroll\", this.changeToolbarHeight);\n }\n\n handleToolbar = () => {\n if (document.documentElement.clientWidth < 900) {\n this.setState({\n toolbarHeight: 115\n });\n } else {\n this.setState({\n toolbarHeight: 205\n });\n }\n }\n\n changeToolbarHeight = () => {\n if (document.documentElement.clientWidth > 900) {\n let scrollTop = window.scrollY;\n let toolbarHeight = Math.max(115, 205 - scrollTop);\n this.setState({ toolbarHeight });\n }\n }\n\n className = () => {\n const { className } = this.props;\n\n if (className === \"justify-right\") {\n return this.state.toolbarHeight === 115 ? \"toolbar t-shadow \" + className : \"toolbar \" + className;\n }\n\n return this.state.toolbarHeight === 115 ? \"toolbar t-shadow\" : \"toolbar\";\n }\n\n style = () => {\n if (this.props.mobile) {\n return;\n }\n\n if (document.documentElement.clientWidth > 900) {\n return { marginTop: this.state.toolbarHeight };\n } else {\n return { marginTop: 145 };\n }\n }\n\n render() {\n return (\n <div className={this.className()} style={this.style()}>\n {this.props.children}\n </div>\n );\n }\n}\n\nexport default Toolbar;","import axios from 'axios';\nimport { getAuthToken } from 'src/utils/token';\n\nconst BASE_URL = window.location.origin;\n\nexport const signIn = (data) => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n formDataObject.append(\"token\", getAuthToken());\n\n return axios.post(`${BASE_URL}/api/v1/login/index.php`, formDataObject);\n};\n\nexport const checkAuth = () => {\n let uri = '/api/v1/login/index.php';\n const token = getAuthToken();\n\n if (token) uri += `?token=${token}`;\n\n return axios.get(`${BASE_URL}${uri}`);\n};\n\nexport const signInAs = (username) => {\n return axios.get(`${BASE_URL}/api/v1/login/index.php`, {\n params: {\n loginas: username,\n token: getAuthToken()\n }\n });\n};\n\nexport const signOut = () => {\n return axios.get(`${BASE_URL}/api/v1/logout/index.php`);\n};\n\nexport const getMainData = () => {\n let uri = `${BASE_URL}/api/v1/login/session.php`;\n\n return axios.get(uri);\n};\n\nexport const checkAuthToken = token => {\n let uri = `${BASE_URL}/api/v1/login/session.php`;\n\n if (token) uri += `?token=${token}`;\n\n return axios.get(uri);\n};\n","import { REFRESH_COUNTERS } from './menuCounterTypes';\nimport { checkAuth } from 'src/services/session';\nimport { setAuthToken } from 'src/utils/token';\n\nexport const refreshCounters = () => (dispatch, getState) => {\n return new Promise((resolve, reject) => {\n checkAuth()\n .then(res => {\n const { data, token } = res.data;\n\n if (token) setAuthToken(token);\n\n dispatch({\n type: REFRESH_COUNTERS,\n value: {\n user: data\n }\n });\n\n resolve(token);\n })\n .catch(err => {\n reject();\n console.error(err);\n });\n });\n}\n","import React, { useEffect, useState } from 'react';\n\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport { getInternetProtocolInfo, updateInternetProtocol } from '../../../ControlPanelService/Ip';\nimport SelectInput from '../../ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport TextInput from '../../ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport Checkbox from '../../ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from '../../../components/Spinner/Spinner';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\nimport QS from 'qs';\n\nimport './EditInternetProtocol.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nconst EditInternetProtocol = () => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n loading: false,\n dedicated: false\n });\n\n useEffect(() => {\n let queryParams = QS.parse(history.location.search, { ignoreQueryPrefix: true });\n const { ip } = queryParams;\n\n dispatch(addActiveElement('/list/ip/'));\n dispatch(removeFocusedElement());\n\n if (ip) {\n setState({ ...state, loading: true });\n fetchData(ip);\n }\n }, []);\n\n const fetchData = ip => {\n getInternetProtocolInfo(ip)\n .then(response => {\n setState({\n ...state,\n data: response.data,\n dedicated: !response.data.dedicated,\n loading: false\n });\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err)\n });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedIP = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedIP[name] = value;\n }\n\n updatedIP['token'] = token;\n updatedIP['save'] = 'save';\n updatedIP['v_ip'] = state.data.database;\n\n if (Object.keys(updatedIP).length !== 0 && updatedIP.constructor === Object) {\n setState({ ...state, loading: true });\n\n updateInternetProtocol(updatedIP, state.data.ip)\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n if (error_msg) {\n setErrorMessage(error_msg);\n setOkMessage('');\n } else {\n dispatch(refreshCounters()).then(() => {\n setErrorMessage('');\n setOkMessage(ok_msg);\n });\n }\n }\n })\n .then(() => fetchData(state.data.ip))\n .catch(err => console.error(err));\n }\n }\n\n const onChangeDedicated = value => {\n setState({ ...state, dedicated: value });\n }\n\n return (\n <div className=\"edit-template edit-ip\">\n <Helmet>\n <title>{`Vesta - ${i18n.IP}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Editing IP Address']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}\n </span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout date={state.data.date} time={state.data.time} status={state.data.status}>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"edit-ip\">\n <TextInput id=\"type\" name=\"v_ip\" title={i18n['IP address']} value={state.data.ip} disabled />\n\n <TextInput id=\"type\" name=\"v_netmask\" title={i18n['Netmask']} value={state.data.netmask} disabled />\n\n <TextInput id=\"type\" name=\"v_interface\" title={i18n['Interface']} value={state.data.interface} disabled />\n\n <Checkbox onChange={onChangeDedicated} name=\"v_shared\" id=\"shared\" title={i18n['Shared']} defaultChecked={state.dedicated} />\n\n {\n !state.dedicated && (\n <div className=\"dedicated-form-group\">\n <SelectInput\n options={state.data.users}\n selected={state.data.owner}\n title={i18n['Assigned user']}\n name=\"v_owner\"\n id=\"owner\" />\n </div>\n )\n }\n\n <TextInput id=\"type\" name=\"v_name\" title={i18n['Assigned domain']} value={state.data.name} optionalTitle={i18n['optional']} />\n\n <TextInput id=\"type\" name=\"v_nat\" title={i18n['NAT IP association']} value={state.data.nat} optionalTitle={i18n['optional']} />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/ip/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div>\n );\n}\n\nexport default EditInternetProtocol;","import React, { useEffect, useState } from 'react';\n\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport { addInternetProtocol, getAdditionalInfo } from '../../../ControlPanelService/Ip';\nimport SelectInput from '../../ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport TextInput from '../../ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport Checkbox from '../../ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport Spinner from '../../Spinner/Spinner';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './AddInternetProtocol.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nconst AddInternetProtocol = props => {\n const token = localStorage.getItem(\"token\");\n const { i18n, userName } = useSelector(state => state.session);\n const dispatch = useDispatch();\n const history = useHistory();\n const [state, setState] = useState({\n loading: false,\n dedicated: true,\n okMessage: '',\n errorMessage: '',\n interfaces: [],\n users: []\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/ip/'));\n dispatch(removeFocusedElement());\n\n setState({ ...state, loading: true });\n\n fetchData();\n }, []);\n\n const submitFormHandler = event => {\n event.preventDefault();\n let newIp = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n newIp[name] = value;\n }\n\n if (Object.keys(newIp).length !== 0 && newIp.constructor === Object) {\n setState({ ...state, loading: true });\n addInternetProtocol(newIp)\n .then(result => {\n if (result.status === 200) {\n const { error_msg: errorMessage, ok_msg: okMessage } = result.data;\n\n if (errorMessage) {\n setState({ ...state, errorMessage, okMessage, loading: false });\n } else {\n dispatch(refreshCounters()).then(() => {\n setState({ ...state, okMessage, errorMessage: '', loading: false });\n });\n }\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const fetchData = () => {\n getAdditionalInfo()\n .then(result => {\n setState({ ...state, interfaces: result.data.interfaces, users: result.data.users, loading: false });\n })\n .catch(err => console.error(err));\n }\n\n const onChangeDedicated = value => {\n setState({ ...state, dedicated: value });\n }\n\n return (\n <div className=\"edit-template add-ip\">\n <Helmet>\n <title>{`Vesta - ${i18n.IP}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Adding Package']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {state.errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n {state.errorMessage}</span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {state.okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n <span>{HtmlParser(state.okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> : (\n <form onSubmit={event => submitFormHandler(event)}>\n <input type=\"hidden\" name=\"ok\" value=\"add\" />\n <input type=\"hidden\" name=\"v_owner\" value={userName} />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <TextInput name=\"v_ip\" id=\"ipAddress\" title={i18n['IP address']} />\n\n <TextInput name=\"v_netmask\" id=\"netmask\" title={i18n['Netmask']} />\n\n <SelectInput\n options={state.interfaces}\n name=\"v_interface\"\n id=\"interfaces\"\n title={i18n['Interface']} />\n\n <Checkbox onChange={onChangeDedicated} name=\"v_shared\" id=\"shared\" title={i18n['Shared']} defaultChecked={state.dedicated} />\n\n {\n !state.dedicated\n ? (\n <div className=\"assigned-user\">\n <SelectInput\n options={state.users}\n name=\"v_owner\"\n id=\"users\"\n title={i18n['Assigned user']} />\n </div>\n )\n : null\n }\n\n <TextInput name=\"v_name\" id=\"name\" title={i18n['Assigned domain']} optionalTitle={i18n['optional']} />\n\n <TextInput name=\"v_nat\" id=\"nat\" title={i18n['NAT IP association']} optionalTitle={i18n['optional']} />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Add}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/ip/')}>{i18n.Back}</button>\n </div>\n </form>\n )}\n </AddItemLayout>\n </div>\n );\n}\n\nexport default AddInternetProtocol;","import React from 'react';\n\nconst TextArea = ({ id, name, defaultValue = '', title, optionalTitle = '', rows = '3', disabled = false, ...rest }) => {\n return (\n <div className=\"form-group\">\n <label className=\"label-wrapper\" htmlFor={id}>\n {title}\n <span>{optionalTitle}</span>\n </label>\n <textarea\n className=\"form-control\"\n id={id}\n rows={rows}\n name={name}\n readOnly={disabled}\n defaultValue={defaultValue}\n {...rest}\n >\n </textarea>\n </div>\n );\n}\n\nexport default TextArea;\n","import axios from \"axios\";\nimport { getAuthToken } from \"src/utils/token\";\n\nconst BASE_URL = window.location.origin;\nconst webApiUri = '/api/v1/list/server/index.php';\nconst serverAdditionalInfoUri = '/api/v1/edit/server/index.php';\n\nexport const getServersList = () => {\n return axios.get(BASE_URL + webApiUri);\n}\n\nexport const bulkAction = (action, services) => {\n const formData = new FormData();\n formData.append(\"action\", action);\n formData.append(\"token\", getAuthToken());\n\n services.forEach(service => {\n formData.append(\"service[]\", service);\n });\n\n return axios.post(BASE_URL + '/api/v1/bulk/service/', formData);\n};\n\nexport const handleAction = uri => {\n return axios.get(BASE_URL + uri, {\n params: {\n token: getAuthToken()\n }\n });\n}\n\nexport const getServerAdditionalInfo = () => {\n return axios.get(BASE_URL + serverAdditionalInfoUri, {\n params: {\n token: getAuthToken()\n }\n });\n}\n\nexport const updateService = (data, uri = '') => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + `/api/v1/edit/server/${uri}/index.php`, formDataObject, {\n params: {\n token: getAuthToken()\n }\n });\n}\n\nexport const getServiceInfo = service => {\n return axios.get(`${BASE_URL}/api/v1/edit/server/${service}/index.php`);\n}\n\nexport const getServiceLogs = service => {\n return axios.get(`${BASE_URL}${webApiUri}?${service}`);\n}\n\nexport const services = [\n 'apache2',\n 'clamd',\n 'cron',\n 'crond',\n 'exim',\n 'exim4',\n 'fail2ban',\n 'iptables',\n 'mariadb',\n 'mysqld',\n 'named',\n 'php-fpm',\n 'php5-fpm',\n 'proftpd',\n 'spamassassin',\n 'spamd',\n 'vsftpd',\n];","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"../../../../actions/MainNavigation/mainNavigationActions\";\nimport TextInput from '../../../ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport Checkbox from '../../../ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport TextArea from '../../../ControlPanel/AddItemLayout/Form/TextArea/TextArea';\nimport AddItemLayout from '../../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { getServiceInfo, updateService } from 'src/ControlPanelService/Server';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from '../../../../components/Spinner/Spinner';\nimport Toolbar from '../../../MainNav/Toolbar/Toolbar';\nimport { Link, useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './EditServerNginx.scss';\nimport { Helmet } from 'react-helmet';\nimport HtmlParser from 'react-html-parser';\n\nconst EditServerNginx = props => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [restart, setRestart] = useState(true);\n const [state, setState] = useState({\n data: {},\n loading: false,\n basicOptions: true,\n advancedOptions: false\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/server/'));\n dispatch(removeFocusedElement());\n\n setState({ ...state, loading: true });\n fetchData();\n }, []);\n\n const fetchData = () => {\n getServiceInfo('nginx')\n .then(response => {\n setState({\n ...state,\n data: response.data,\n loading: false\n });\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err)\n });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedService = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedService[name] = value;\n }\n\n if (Object.keys(updatedService).length !== 0 && updatedService.constructor === Object) {\n setState({ ...state, loading: true });\n\n updatedService['v_config'] = state.data.config;\n updatedService['v_restart'] = restart ? 'yes' : 'no';\n\n updateService(updatedService, '/nginx')\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n if (error_msg) {\n setErrorMessage(error_msg);\n setOkMessage('');\n } else {\n setErrorMessage('');\n setOkMessage(ok_msg);\n }\n }\n })\n .then(() => fetchData())\n .catch(err => console.error(err));\n }\n }\n\n const toggleOptions = () => {\n setState({\n ...state,\n advancedOptions: !state.advancedOptions,\n basicOptions: !state.basicOptions\n });\n }\n\n const onUpdateConfig = ({ id, value }) => {\n if (!value) return;\n\n var regexp = new RegExp(`(${id})(.+)(${state.data[id]})`, 'gm');\n const updatedConfig = state.data.config.replace(regexp, `$1$2${value}`);\n setState({ ...state, data: { ...state.data, config: updatedConfig, [id]: value } });\n }\n\n return (\n <div className=\"edit-template edit-nginx\">\n <Helmet>\n <title>{`Vesta - ${i18n.SERVER}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Configuring Server']} / {state.data.service_name}</div>\n <div className=\"link\"><Link to=\"/edit/server/php\">{i18n['Configure']} php.ini</Link></div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}\n </span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"edit-mail\">\n <input type=\"hidden\" name=\"save\" value=\"save\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n {\n !state.basicOptions && (\n <button type=\"button\" onClick={() => toggleOptions()}>\n {i18n['Basic options']}\n {state.basicOptions ? <FontAwesomeIcon icon=\"caret-up\" /> : <FontAwesomeIcon icon=\"caret-down\" />}\n </button>\n )\n }\n\n {\n state.basicOptions && (\n <>\n <TextInput\n id=\"worker_processes\"\n title=\"worker_processes\"\n name=\"v_worker_processes\"\n onChange={event => onUpdateConfig(event.target)}\n value={state.data.worker_processes} />\n\n <TextInput\n id=\"worker_connections\"\n title=\"worker_connections\"\n name=\"v_worker_connections\"\n onChange={event => onUpdateConfig(event.target)}\n value={state.data.worker_connections} />\n\n <TextInput\n id=\"client_max_body_size\"\n title=\"client_max_body_size\"\n name=\"v_client_max_body_size\"\n onChange={event => onUpdateConfig(event.target)}\n value={state.data.client_max_body_size} />\n\n <TextInput\n id=\"send_timeout\"\n title=\"send_timeout\"\n name=\"v_send_timeout\"\n onChange={event => onUpdateConfig(event.target)}\n value={state.data.send_timeout} />\n\n <TextInput\n id=\"proxy_connect_timeout\"\n title=\"proxy_connect_timeout\"\n name=\"v_proxy_connect_timeout\"\n onChange={event => onUpdateConfig(event.target)}\n value={state.data.proxy_connect_timeout} />\n\n <TextInput\n id=\"proxy_send_timeout\"\n title=\"proxy_send_timeout\"\n name=\"v_proxy_send_timeout\"\n onChange={event => onUpdateConfig(event.target)}\n value={state.data.proxy_send_timeout} />\n\n <TextInput\n id=\"proxy_read_timeout\"\n title=\"proxy_read_timeout\"\n name=\"v_proxy_read_timeout\"\n onChange={event => onUpdateConfig(event.target)}\n value={state.data.proxy_read_timeout} />\n\n <TextInput\n id=\"gzip\"\n title=\"gzip\"\n name=\"v_gzip\"\n onChange={event => onUpdateConfig(event.target)}\n value={state.data.gzip} />\n\n <TextInput\n id=\"gzip_comp_level\"\n title=\"gzip_comp_level\"\n name=\"v_gzip_comp_level\"\n onChange={event => onUpdateConfig(event.target)}\n value={state.data.gzip_comp_level} />\n\n <TextInput\n id=\"charset\"\n title=\"charset\"\n name=\"v_charset\"\n onChange={event => onUpdateConfig(event.target)}\n value={state.data.charset} />\n </>\n )\n }\n\n {\n !state.advancedOptions && (\n <button type=\"button\" onClick={() => toggleOptions()}>\n {i18n['Advanced options']}\n {state.advancedOptions ? <FontAwesomeIcon icon=\"caret-up\" /> : <FontAwesomeIcon icon=\"caret-down\" />}\n </button>\n )\n }\n\n <br />\n <br />\n\n {\n state.advancedOptions && (\n <>\n <TextArea\n defaultValue={state.data.config}\n title={state.data.config_path}\n onChange={e => setState({ ...state, data: { ...state.data, config: e.target.value } })}\n name=\"v_config\"\n id=\"v_config\"\n rows=\"25\" />\n\n <br />\n\n <Checkbox\n title={i18n['restart']}\n defaultChecked={true}\n onChange={checked => setRestart(checked)}\n name=\"v_restart\"\n id=\"restart\" />\n </>\n )\n }\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/server/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div>\n );\n}\n\nexport default EditServerNginx;","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"../../../../actions/MainNavigation/mainNavigationActions\";\nimport Checkbox from '../../../ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport TextArea from '../../../ControlPanel/AddItemLayout/Form/TextArea/TextArea';\nimport { getServiceInfo, updateService } from 'src/ControlPanelService/Server';\nimport AddItemLayout from '../../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from '../../../../components/Spinner/Spinner';\nimport Toolbar from '../../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './Postgresql.scss';\nimport { Helmet } from 'react-helmet';\nimport HtmlParser from 'react-html-parser';\n\nconst Postgresql = () => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n loading: false\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/server/'));\n dispatch(removeFocusedElement());\n\n setState({ ...state, loading: true });\n fetchData();\n }, []);\n\n const fetchData = () => {\n getServiceInfo('postgresql')\n .then(response => {\n if (!response.data.config) {\n history.push('/list/server');\n }\n\n setState({ ...state, data: response.data, loading: false });\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err);\n });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedService = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedService[name] = value;\n }\n\n if (Object.keys(updatedService).length !== 0 && updatedService.constructor === Object) {\n setState({ ...state, loading: true });\n\n updateService(updatedService, '/postgresql')\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n setErrorMessage(error_msg || '');\n setOkMessage(ok_msg || '');\n }\n })\n .then(() => fetchData())\n .catch(err => console.error(err));\n }\n }\n\n return (\n <div className=\"edit-template edit-pgsql\">\n <Helmet>\n <title>{`Vesta - ${i18n.SERVER}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">\n {i18n['Configuring Server']} / {state.data.service_name}\n </div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}\n </span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"edit-pgsql\">\n <input type=\"hidden\" name=\"save\" value=\"save\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <TextArea\n defaultValue={state.data.options}\n title={state.data.options_path}\n name=\"v_options\"\n id=\"v_options\"\n rows=\"10\" />\n\n <br />\n\n <TextArea\n defaultValue={state.data.config}\n title={state.data.config_path}\n name=\"v_config\"\n id=\"v_config\"\n rows=\"10\" />\n\n <br />\n\n <Checkbox\n title={i18n['restart']}\n defaultChecked={true}\n name=\"v_restart\"\n id=\"restart\" />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/server/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div >\n );\n}\n\nexport default Postgresql;","import axios from \"axios\";\nimport { getAuthToken } from \"src/utils/token\";\n\nconst BASE_URL = window.location.origin;\nconst webApiUri = '/api/v1/list/backup/index.php';\nconst scheduleBackupUri = '/api/v1/schedule/backup/';\nconst backupDetailsUri = '/api/v1/list/backup/index.php';\nconst backupExclusionsUri = '/api/v1/list/backup/exclusions/index.php';\nconst backupExclusionsInfoUri = '/api/v1/edit/backup/exclusions/index.php';\nconst backupRestoreSettingUri = '/api/v1/schedule/restore/index.php';\nconst bulkRestoreUri = '/api/v1/bulk/restore/index.php';\n\nexport const getBackupList = () => {\n return axios.get(BASE_URL + webApiUri);\n}\n\nexport const bulkAction = (action, backups) => {\n const formData = new FormData();\n formData.append(\"action\", action);\n formData.append(\"token\", getAuthToken());\n\n backups.forEach(backup => {\n formData.append(\"backup[]\", backup);\n });\n\n return axios.post(BASE_URL + '/api/v1/bulk/backup/', formData);\n};\n\nexport const handleAction = uri => {\n return axios.get(BASE_URL + uri, {\n params: {\n token: getAuthToken()\n }\n });\n}\n\nexport const scheduleBackup = () => {\n return axios.get(BASE_URL + scheduleBackupUri);\n}\n\nexport const getBackupDetails = backup => {\n return axios.get(BASE_URL + `${backupDetailsUri}?backup=${backup}`);\n}\n\nexport const restoreBackupSetting = params => {\n return axios.get(BASE_URL + `${backupRestoreSettingUri}${params}`);\n}\n\nexport const bulkRestore = (action, selection, backup) => {\n const formData = new FormData();\n formData.append(\"token\", getAuthToken());\n formData.append(\"action\", action);\n formData.append(\"backup\", backup);\n\n selection.forEach(udir => {\n formData.append(\"udir[]\", udir);\n });\n\n return axios.post(BASE_URL + `${bulkRestoreUri}`, formData);\n}\n\nexport const getBackupExclusions = () => {\n return axios.get(BASE_URL + `${backupExclusionsUri}`);\n}\n\nexport const getBackupExclusionsInfo = () => {\n return axios.get(BASE_URL + `${backupExclusionsInfoUri}`);\n}\n\nexport const updateBackupExclusions = data => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + backupExclusionsInfoUri, formDataObject, {\n params: {\n token: getAuthToken()\n }\n });\n}\n","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"src/actions/MainNavigation/mainNavigationActions\";\nimport { updateBackupExclusions, getBackupExclusionsInfo } from 'src/ControlPanelService/Backup';\nimport TextArea from 'src/components/ControlPanel/AddItemLayout/Form/TextArea/TextArea';\nimport AddItemLayout from 'src/components/ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Toolbar from 'src/components/MainNav/Toolbar/Toolbar';\nimport Spinner from 'src/components/Spinner/Spinner';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { Helmet } from 'react-helmet';\n\nimport './style.scss';\nimport HtmlParser from 'react-html-parser';\n\nconst EditBackupExclusions = () => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n loading: false\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/backup/'));\n dispatch(removeFocusedElement());\n\n setState({ ...state, loading: true });\n fetchData();\n }, []);\n\n const fetchData = () => {\n getBackupExclusionsInfo()\n .then(response => {\n setState({\n ...state,\n data: response.data,\n loading: false\n });\n })\n .catch(err => console.error(err));\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedExclusions = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedExclusions[name] = value;\n }\n\n updatedExclusions['token'] = token;\n updatedExclusions['save'] = 'save';\n\n if (Object.keys(updatedExclusions).length !== 0 && updatedExclusions.constructor === Object) {\n setState({ ...state, loading: true });\n\n updateBackupExclusions(updatedExclusions)\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n setErrorMessage(error_msg || '');\n setOkMessage(ok_msg || '');\n }\n })\n .then(() => fetchData())\n .catch(err => console.error(err));\n }\n }\n\n return (\n <div className=\"edit-template edit-backup-exclusions\">\n <Helmet>\n <title>{`Vesta - ${i18n.BACKUP}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Editing Backup Exclusions']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}\n </span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"edit-backup-exclusions\">\n <TextArea\n title={i18n['Web Domains']}\n defaultValue={state.data.web}\n name=\"v_web\"\n id=\"v_web\" />\n\n <TextArea\n title={i18n['Mail Domains']}\n defaultValue={state.data.mail}\n name=\"v_mail\"\n id=\"v_mail\" />\n\n <TextArea\n title={i18n['Databases']}\n defaultValue={state.data.db}\n name=\"v_db\"\n id=\"v_db\" />\n\n <TextArea\n title={i18n['User Directories']}\n defaultValue={state.data.userdir}\n name=\"v_userdir\"\n id=\"v_userdir\" />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/backup/exclusions')}>{i18n.Back}</button>\n </div>\n </form>\n }\n </AddItemLayout>\n </div>\n );\n}\n\nexport default EditBackupExclusions;\n","import { ADD_CPANEL_FOCUSED_ELEMENT, REMOVE_CPANEL_FOCUSED_ELEMENT } from './controlPanelContentTypes';\n\nexport const addControlPanelContentFocusedElement = value => {\n return {\n type: ADD_CPANEL_FOCUSED_ELEMENT,\n value\n };\n};\n\nexport const removeControlPanelContentFocusedElement = () => {\n return {\n type: REMOVE_CPANEL_FOCUSED_ELEMENT,\n value: ''\n };\n};","import React, { useState } from 'react';\nimport { useSelector } from 'react-redux';\nimport './DropdownFilter.scss';\n\nconst DropdownFilter = props => {\n const { i18n } = useSelector(state => state.session);\n\n const state = {\n usersList: [i18n.Date, i18n.Username, i18n.Disk, i18n.Bandwidth, i18n.Starred],\n webList: [i18n.Date, i18n.Domain, i18n['IP Addresses'], i18n.Disk, i18n.Bandwidth, i18n.Starred],\n dnsList: [i18n.Date, i18n.Expire, i18n.Domain, i18n['IP Addresses'], i18n.Records, i18n.Starred],\n mailList: [i18n.Date, i18n.Domain, i18n.Accounts, i18n.Disk, i18n.Starred],\n mailAccountList: [i18n.Date, i18n.Accounts, i18n.Disk, i18n.Starred],\n dbList: [i18n.Date, i18n.Database, i18n.Disk, i18n.User, i18n.Host, i18n.Starred],\n cronList: [i18n.Date, i18n.Command, i18n.Starred],\n packagesList: [i18n.Date, i18n['Package Name'], i18n.Starred],\n internetProtocolsList: [i18n.Date, i18n.IP, i18n.Netmask, i18n.Interface, i18n.Domain, i18n.Owner, i18n.Starred],\n firewallList: [i18n.Action, i18n.Protocol, i18n.Port, i18n['IP Addresses'], i18n.Comment, i18n.Starred],\n searchList: [i18n.Date, i18n.Name, i18n.Starred]\n };\n\n const changeSorting = (type, order) => {\n props.changeSorting(type, order);\n }\n\n const filterClassName = (sorting, order) => {\n if (props.sorting === sorting && props.order === order) {\n return \"dropdown-item active\";\n }\n\n return \"dropdown-item\";\n }\n\n const renderFilters = () => {\n const { list } = props;\n let activeListFilter = state[list];\n\n return activeListFilter.map((item, index) => {\n return (\n <li key={index}>\n <span className={filterClassName(item, \"descending\")} onClick={() => changeSorting(item, \"descending\")}>{item}<span className=\"arrow-down\">&#8595;</span></span>\n <span className={filterClassName(item, \"ascending\")} onClick={() => changeSorting(item, \"ascending\")}><span>&#8593;</span></span>\n </li>\n );\n });\n }\n\n const button = () => {\n if (props.order === \"descending\") {\n return <span className=\"arrow-down\">&#8595;</span>;\n } else {\n return <span>&#8593;</span>;\n }\n }\n\n return (\n <div className=\"btn-group\">\n <button className=\"btn btn-sm btn-outline-secondary dropdown-toggle\" type=\"button\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\n {i18n['sort by']}: <b>{props.sorting}</b>\n {button()}\n </button>\n <div className=\"dropdown-menu\">\n <ul className=\"dropdown-list\">\n {renderFilters()}\n </ul>\n </div>\n </div >\n );\n}\n\nexport default DropdownFilter;","import React, { useState, useEffect, useRef } from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport './SearchInput.scss';\n\nconst SearchInput = props => {\n const [searchTerm, setSearchTerm] = useState('');\n let inputElement = useRef(null);\n\n const handleClick = () => {\n if (searchTerm && searchTerm !== '') {\n return props.handleSearchTerm(searchTerm);\n }\n\n return;\n }\n\n useEffect(() => {\n window.addEventListener(\"keyup\", focusInput);\n\n return () => window.removeEventListener(\"keyup\", focusInput);\n }, []);\n\n const onSubmit = e => {\n e.preventDefault();\n\n if (searchTerm) {\n handleClick();\n }\n }\n\n const focusInput = event => {\n if (event.keyCode === 70) {\n return inputElement.current.focus();\n }\n }\n\n return (\n <form onSubmit={onSubmit}>\n <div className=\"search-input-form\">\n <input type=\"text\" className=\"form-control\" onChange={e => setSearchTerm(e.target.value)} ref={inputElement} />\n <button className=\"btn btn-outline-secondary\" type=\"submit\" onClick={() => handleClick()}><FontAwesomeIcon icon=\"search\" /></button>\n </div>\n </form>\n );\n}\n\nexport default SearchInput;\n","import axios from \"axios\";\nlet addFavoriteUri = '/api/v1/add/favorite/index.php';\nlet deleteFavoriteUri = '/api/v1/delete/favorite/index.php';\nlet BASE_URL = window.location.origin;\n\n\nexport const addFavorite = (unitId, section) => {\n return axios.get(BASE_URL + addFavoriteUri, {\n params: {\n 'v_unit_id': unitId,\n 'v_section': section\n }\n });\n}\n\nexport const deleteFavorite = (unitId, section) => {\n return axios.get(BASE_URL + deleteFavoriteUri, {\n params: {\n 'v_unit_id': unitId,\n 'v_section': section\n }\n });\n}","import React, { Component, useEffect, useState } from 'react';\nimport Container from '../Container/Container';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { useSelector } from 'react-redux';\nimport './ListItem.scss';\n\nconst ListItem = (props) => {\n const { i18n } = useSelector(state => state.session);\n const [state, setState] = useState({ starred: false });\n\n useEffect(() => {\n if (props.hasOwnProperty('starred')) {\n setState({ ...state, starred: Boolean(props.starred) });\n }\n }, [props.starred]);\n\n const printDate = date => {\n if (date) {\n let newDate = new Date(date);\n let day = newDate.getDate();\n let month = newDate.getMonth() + 1;\n let year = newDate.getFullYear();\n let months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n\n return <div className=\"date\">{day} &nbsp; {months[month - 1]} &nbsp; {year}</div>;\n }\n }\n\n const toggleItem = () => {\n props.checkItem();\n }\n\n const starItem = () => {\n setState({ ...state, starred: !state.starred });\n props.toggleFav(!state.starred);\n }\n\n const className = () => {\n const { starred } = state;\n const { checked, outdated, suspended, stopped, focused, sysInfo } = props;\n let className = 'list-item';\n\n if (checked) {\n className += ' toggled';\n }\n\n if (starred) {\n className += ' starred';\n }\n\n if (outdated) {\n className += ' outdated';\n }\n\n if (suspended) {\n className += ' suspended';\n }\n\n if (stopped) {\n className += ' stopped';\n }\n\n if (focused) {\n className += ' focused';\n }\n\n if (sysInfo) {\n className += ' sys-info';\n }\n\n return className;\n }\n\n return (\n <div className={className()} id={props.id}>\n <Container className=\"l-col w-14\">\n {printDate(props.date)}\n <div className=\"text-status\">\n <div className=\"checkbox\"><input type=\"checkbox\" onChange={toggleItem} checked={props.checked} /></div>\n {props.leftNameText}\n </div>\n <div className=\"star\">\n <div className=\"checkbox\"><input type=\"checkbox\" onChange={toggleItem} checked={props.checked} /></div>\n <div onClick={starItem}><FontAwesomeIcon icon=\"star\" /></div>\n </div>\n {props.suspended && <div className='suspended'>{i18n.suspended}</div>}\n </Container>\n {props.children}\n </div>\n );\n}\n\nexport default ListItem;\n","import React, { Component } from 'react';\nimport ListItem from '../ControlPanel/ListItem/ListItem';\nimport Container from '../ControlPanel/Container/Container';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport './InternetProtocol.scss';\nimport { Link } from 'react-router-dom';\nimport { useSelector } from 'react-redux';\n\nconst InternetProtocol = props => {\n const { data } = props;\n const { i18n } = useSelector(state => state.session);\n const token = localStorage.getItem(\"token\");\n\n const toggleFav = (starred) => {\n if (starred) {\n props.toggleFav(data.NAME, 'add');\n } else {\n props.toggleFav(data.NAME, 'delete');\n }\n }\n\n const checkItem = () => {\n props.checkItem(data.NAME);\n }\n\n const handleDelete = () => {\n props.handleModal(data.delete_conf, `/api/v1/delete/ip/?ip=${data.NAME}`);\n }\n\n return (\n <ListItem\n id={data.NAME}\n focused={data.FOCUSED}\n checked={data.isChecked}\n date={data.DATE}\n starred={data.STARRED}\n toggleFav={toggleFav}\n checkItem={checkItem}>\n\n <Container className=\"r-col w-85\">\n <div className=\"name\">{data.NAME}</div>\n <br />\n <div className=\"stats\">\n <Container className=\"c-1 w-35\">\n <div className=\"ip\"><span className=\"stat\">{data.NETMASK}</span></div>\n <div className=\"soa\"><span className=\"stat\">{data.INTERFACE}</span></div>\n </Container>\n <Container className=\"c-2 w-30\">\n <div>{i18n.Domains}: <span className=\"stat\">{data.U_WEB_DOMAINS}</span></div>\n <div>{i18n.Status}: <span className=\"stat\">{data.STATUS}</span></div>\n </Container>\n <Container className=\"c-3 w-35\">\n <div>{i18n.Owner}: <span className=\"stat\">{data.OWNER}</span></div>\n <div>{i18n.Users}: <span className=\"stat\">{data.U_SYS_USERS.replace(',', ', ')}</span></div>\n </Container>\n </div>\n </Container>\n <div className=\"actions\">\n <div>\n <Link className=\"link-edit\" to={`/edit/ip/?ip=${data.NAME}`}>\n {i18n.edit}\n {data.FOCUSED ? <span className=\"shortcut-button html-unicode\">&#8617;</span> : <FontAwesomeIcon icon=\"pen\" />}\n </Link>\n </div>\n\n <div>\n <button className=\"link-delete\" onClick={() => handleDelete()}>\n {i18n.Delete}\n {data.FOCUSED ? <span className=\"shortcut-button del\">Del</span> : <FontAwesomeIcon icon=\"times\" />}\n </button>\n </div>\n </div>\n </ListItem>\n );\n}\n\nexport default InternetProtocol;","import React from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport './LeftButton.scss';\nimport { Link } from 'react-router-dom';\n\nconst LeftButton = ({ showLeftMenu, list, name, href, onClick = () => { } }) => {\n const leftMenuClassName = () => {\n if (!showLeftMenu) {\n return \"l-menu none\";\n }\n\n if (list === 'server') {\n return \"l-menu server-icon\";\n } else if (list === 'backup-details') {\n return \"l-menu backup-details-icon\";\n }\n\n return \"l-menu\";\n }\n\n const renderIcon = () => {\n if (list === 'server') {\n return <FontAwesomeIcon icon=\"cog\" />\n } else if (list === 'backup-details') {\n return <FontAwesomeIcon icon=\"play\" />\n }\n\n return <FontAwesomeIcon icon=\"plus\" />\n }\n\n return (\n <div className={leftMenuClassName()}>\n {\n href\n ? (<Link to={href}>\n {renderIcon()}\n <span className=\"add\">{name}</span>\n </Link>)\n : (<button onClick={onClick}>\n {renderIcon()}\n <span className=\"add\">{name}</span>\n </button>)\n }\n </div>\n );\n}\n\nexport default LeftButton;\n","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport './Checkbox.scss';\n\nfunction toggleAll(props, e) {\n props.toggleAll(e.target.checked);\n}\n\nconst Checkbox = (props) => {\n const { i18n } = useSelector(state => state.session);\n\n return (\n <div className=\"input-group-prepend\">\n <div className=\"input-group-text\">\n <input type=\"checkbox\" onChange={(e) => toggleAll(props, e)} aria-label=\"Checkbox for following text input\" id=\"checkbox\" checked={props.toggled} />\n </div>\n <span className=\"input-group-text\">\n <label htmlFor=\"checkbox\">{i18n['toggle all']}</label>\n </span>\n </div>\n );\n}\n\nexport default Checkbox;","import React, { useEffect, useState } from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { values } from '../../../../ControlPanelService/Select';\nimport { useSelector } from 'react-redux';\nimport './Select.scss';\n\nconst Select = ({ cronReports, ...props }) => {\n const { i18n } = useSelector(state => state.session);\n const listValues = values(i18n);\n\n const [state, setState] = useState({\n usersList: listValues.usersList,\n webList: listValues.webList,\n dnsList: listValues.dnsList,\n mailList: listValues.mailList,\n dbList: listValues.dbList,\n cronList: listValues.cronList,\n backupList: listValues.backupList,\n packagesList: listValues.packagesList,\n internetProtocolsList: listValues.internetProtocolsList,\n statisticsList: [],\n updatesList: listValues.updatesList,\n firewallList: listValues.firewallList,\n serverList: listValues.serverList,\n backupDetailList: listValues.backupDetailList,\n banList: listValues.banList,\n selected: '',\n });\n\n useEffect(() => {\n const { list } = props;\n setState({ ...state, list });\n }, []);\n\n const defaultValue = () => {\n if (props.list === 'statisticsList') {\n return i18n['show per user'];\n }\n\n return i18n['apply to selected'];\n }\n\n const renderOptions = () => {\n const { list } = props;\n let activeList = state[list];\n\n if (list === 'cronList') {\n if (cronReports) {\n activeList = activeList.filter((item, index) => index !== 0);\n } else {\n activeList = activeList.filter((item, index) => index !== 1);\n }\n }\n\n if (list === 'statisticsList') {\n return props.users.map((item, index) => { return <option key={index} value={item}>{item}</option> });\n } else {\n return activeList.map((item, index) => { return <option key={index} value={item.value}>{item.name}</option> });\n }\n }\n\n const handleSelect = event => {\n setState({ ...state, selected: event.target.value });\n }\n\n const bulkAction = () => {\n props.bulkAction(state.selected);\n setState({ ...state, selected: '' });\n }\n\n return (\n <div className=\"select-wrapper\">\n <select className=\"custom-select\" id=\"inputGroupSelect04\" onChange={handleSelect}>\n <option defaultValue={defaultValue()} value={defaultValue()}>{props.list === \"statisticsList\" ? i18n['show per user'] : i18n['apply to selected']}</option>\n {renderOptions()}\n </select>\n <div className=\"input-group-append\">\n <button className=\"btn btn-outline-secondary\" type=\"button\" onClick={bulkAction}>\n <FontAwesomeIcon icon=\"angle-right\" />\n </button>\n </div>\n </div>\n );\n}\n\nexport default Select;\n","export const values = (select = {}) => {\n return {\n usersList: [\n { value: 'rebuild', name: select.rebuild },\n { value: 'rebuild web', name: select['rebuild web'] },\n { value: 'rebuild dns', name: select['rebuild dns'] },\n { value: 'rebuild mail', name: select['rebuild mail'] },\n { value: 'rebuild db', name: select['rebuild db'] },\n { value: 'rebuild cron', name: select['rebuild cron'] },\n { value: 'update counters', name: select['update counters'] },\n { value: 'suspend', name: select.suspend },\n { value: 'unsuspend', name: select.unsuspend },\n { value: 'delete', name: select.delete }\n ],\n webList: [\n { value: 'suspend', name: select.suspend },\n { value: 'unsuspend', name: select.unsuspend },\n { value: 'delete', name: select.delete }\n ],\n dnsList: [\n { value: 'suspend', name: select.suspend },\n { value: 'unsuspend', name: select.unsuspend },\n { value: 'delete', name: select.delete }\n ],\n mailList: [\n { value: 'suspend', name: select.suspend },\n { value: 'unsuspend', name: select.unsuspend },\n { value: 'delete', name: select.delete }\n ],\n dbList: [\n { value: 'suspend', name: select.suspend },\n { value: 'unsuspend', name: select.unsuspend },\n { value: 'delete', name: select.delete }\n ],\n cronList: [\n { value: 'add-cron-reports', name: select['turn on notifications'] },\n { value: 'delete-cron-reports', name: select['turn off notifications'] },\n { value: 'suspend', name: select.suspend },\n { value: 'unsuspend', name: select.unsuspend },\n { value: 'delete', name: select.delete }\n ],\n backupList: [\n { value: 'delete', name: select.delete }\n ],\n packagesList: [\n { value: 'delete', name: select.delete }\n ],\n internetProtocolsList: [\n { value: 'reread IP', name: select['reread IP'] },\n { value: 'delete', name: select.delete }\n ],\n updatesList: [\n { value: 'update', name: select.update }\n ],\n firewallList: [\n { value: 'suspend', name: select.suspend },\n { value: 'unsuspend', name: select.unsuspend },\n { value: 'delete', name: select.delete }\n ],\n serverList: [\n { value: 'stop', name: select.stop },\n { value: 'start', name: select.start },\n { value: 'restart', name: select.restart }\n ],\n backupDetailList: [\n { value: 'restore', name: select.restore }\n ],\n banList: [\n { value: 'delete', name: select.delete }\n ]\n }\n};","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport './Modal.scss';\n\nconst Modal = ({ show, text, onSave, onCancel, showSaveButton = true, showCancelButton = true }) => {\n const { i18n } = useSelector(state => state.session);\n\n return (\n <div>\n <div className={`modal fade ${show ? 'show' : ''}`} id=\"c-panel-modal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"exampleModalLabel\" aria-hidden=\"true\" style={{ display: show ? 'block' : 'none' }}>\n <div className=\"modal-dialog\" role=\"document\">\n <div className=\"modal-content\">\n <div className=\"modal-header\">\n <h5 className=\"modal-title\" id=\"exampleModalLabel\">{i18n.Confirmation}</h5>\n <button type=\"button\" onClick={() => onCancel()} className=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n </div>\n <div className=\"modal-body\">\n {text}\n </div>\n <div className=\"modal-footer\">\n {showCancelButton ? <button onClick={() => onCancel()} type=\"button\" className=\"btn btn-secondary\" data-dismiss=\"modal\">{i18n.Cancel}</button> : ''}\n {showSaveButton ? <button onClick={() => onSave()} type=\"button\" className=\"btn btn-primary\">{i18n.OK}</button> : ''}\n </div>\n </div>\n </div>\n </div>\n </div>\n )\n};\n\nexport default Modal;\n","import React, { useEffect, useState } from 'react';\nimport { addControlPanelContentFocusedElement, removeControlPanelContentFocusedElement } from '../../actions/ControlPanelContent/controlPanelContentActions';\nimport { addActiveElement, removeFocusedElement } from '../../actions/MainNavigation/mainNavigationActions';\nimport DropdownFilter from '../../components/MainNav/Toolbar/DropdownFilter/DropdownFilter';\nimport * as MainNavigation from '../../actions/MainNavigation/mainNavigationActions';\nimport { bulkAction, getIpList, handleAction } from '../../ControlPanelService/Ip';\nimport SearchInput from '../../components/MainNav/Toolbar/SearchInput/SearchInput';\nimport { addFavorite, deleteFavorite } from '../../ControlPanelService/Favorites';\nimport InternetProtocol from '../../components/InternetProtocol/InternetProtocol';\nimport LeftButton from '../../components/MainNav/Toolbar/LeftButton/LeftButton';\nimport Checkbox from '../../components/MainNav/Toolbar/Checkbox/Checkbox';\nimport Select from '../../components/MainNav/Toolbar/Select/Select';\nimport Toolbar from '../../components/MainNav/Toolbar/Toolbar';\nimport Modal from '../../components/ControlPanel/Modal/Modal';\nimport Spinner from '../../components/Spinner/Spinner';\nimport { useDispatch, useSelector } from 'react-redux';\nimport './InternetProtocols.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\n\nconst InternetProtocols = props => {\n const { i18n } = useSelector(state => state.session);\n const { controlPanelFocusedElement } = useSelector(state => state.controlPanelContent);\n const { focusedElement } = useSelector(state => state.mainNavigation);\n const dispatch = useDispatch();\n const [loading, setLoading] = useState(false);\n const [modal, setModal] = useState({\n text: '',\n visible: false,\n actionUrl: ''\n });\n const [state, setState] = useState({\n internetProtocols: [],\n ipFav: [],\n toggledAll: false,\n sorting: i18n.Date,\n order: \"descending\",\n selection: [],\n totalAmount: ''\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/ip/'));\n dispatch(removeFocusedElement());\n dispatch(removeControlPanelContentFocusedElement());\n fetchData().then(() => setLoading(false));\n\n return () => {\n dispatch(removeControlPanelContentFocusedElement());\n }\n }, []);\n\n useEffect(() => {\n window.addEventListener(\"keydown\", handleContentSelection);\n window.addEventListener(\"keydown\", handleFocusedElementShortcuts);\n\n return () => {\n window.removeEventListener(\"keydown\", handleContentSelection);\n window.removeEventListener(\"keydown\", handleFocusedElementShortcuts);\n };\n }, [controlPanelFocusedElement, focusedElement, state.internetProtocols]);\n\n const handleContentSelection = event => {\n if (event.keyCode === 38 || event.keyCode === 40) {\n if (focusedElement) {\n dispatch(MainNavigation.removeFocusedElement());\n }\n }\n\n if (event.keyCode === 38) {\n event.preventDefault();\n handleArrowUp();\n } else if (event.keyCode === 40) {\n event.preventDefault();\n handleArrowDown();\n }\n }\n\n const initFocusedElement = internetProtocols => {\n internetProtocols[0]['FOCUSED'] = internetProtocols[0]['NAME'];\n setState({ ...state, internetProtocols });\n dispatch(addControlPanelContentFocusedElement(internetProtocols[0]['NAME']));\n }\n\n const handleArrowDown = () => {\n let internetProtocols = [...state.internetProtocols];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(internetProtocols);\n return;\n }\n\n let focusedElementPosition = internetProtocols.findIndex(pack => pack.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== internetProtocols.length - 1) {\n let nextFocusedElement = internetProtocols[focusedElementPosition + 1];\n internetProtocols[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, internetProtocols });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleArrowUp = () => {\n let internetProtocols = [...state.internetProtocols];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(internetProtocols);\n return;\n }\n\n let focusedElementPosition = internetProtocols.findIndex(pack => pack.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== 0) {\n let nextFocusedElement = internetProtocols[focusedElementPosition - 1];\n internetProtocols[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, internetProtocols });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleFocusedElementShortcuts = event => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus');\n\n if (controlPanelFocusedElement && !isSearchInputFocused) {\n switch (event.keyCode) {\n case 8: return handleDelete();\n case 13: return handleEdit();\n default: break;\n }\n }\n }\n\n const handleEdit = () => {\n props.history.push(`/edit/ip/?ip=${controlPanelFocusedElement}`);\n }\n\n const handleDelete = () => {\n const { internetProtocols } = state;\n let currentInternetProtocolData = internetProtocols.filter(pack => pack.NAME === controlPanelFocusedElement)[0];\n\n displayModal(currentInternetProtocolData.delete_conf, `/api/v1/delete/ip/?ip=${controlPanelFocusedElement}`);\n }\n\n const fetchData = () => {\n setLoading(true);\n return new Promise((resolve, reject) => {\n getIpList()\n .then(result => {\n setState({\n ...state,\n internetProtocols: reformatData(result.data.data),\n ipFav: result.data.ipFav,\n selection: [],\n totalAmount: result.data.totalAmount,\n toggledAll: false\n });\n resolve();\n })\n .catch(err => console.error(err));\n });\n }\n\n const reformatData = data => {\n let internetProtocols = [];\n\n for (let i in data) {\n data[i]['NAME'] = i;\n data[i]['FOCUSED'] = controlPanelFocusedElement === i;\n internetProtocols.push(data[i]);\n }\n\n return internetProtocols;\n }\n\n const changeSorting = (sorting, order) => {\n setState({\n ...state,\n sorting,\n order\n });\n }\n\n const internetProtocols = () => {\n const { internetProtocols } = state;\n const ipFav = { ...state.ipFav };\n const result = [];\n\n internetProtocols.forEach(internetProtocol => {\n internetProtocol.FOCUSED = controlPanelFocusedElement === internetProtocol.NAME;\n\n if (ipFav[internetProtocol.NAME]) {\n internetProtocol.STARRED = ipFav[internetProtocol.NAME];\n } else {\n internetProtocol.STARRED = 0;\n }\n\n result.push(internetProtocol);\n });\n\n let sortedResult = sortArray(result);\n\n return sortedResult.map((item, index) => {\n return <InternetProtocol data={item} key={index} toggleFav={toggleFav} checkItem={checkItem} handleModal={displayModal} />;\n });\n }\n\n const checkItem = name => {\n const { selection, internetProtocols } = state;\n let duplicate = [...selection];\n let internetProtocolsDuplicate = internetProtocols;\n let checkedItem = duplicate.indexOf(name);\n\n let incomingItem = internetProtocolsDuplicate.findIndex(ip => ip.NAME === name);\n internetProtocolsDuplicate[incomingItem].isChecked = !internetProtocolsDuplicate[incomingItem].isChecked;\n\n if (checkedItem !== -1) {\n duplicate.splice(checkedItem, 1);\n } else {\n duplicate.push(name);\n }\n\n setState({ ...state, internetProtocols: internetProtocolsDuplicate, selection: duplicate });\n }\n\n const sortArray = array => {\n const { order, sorting } = state;\n let sortingColumn = sortBy(sorting);\n\n if (order === \"descending\") {\n return array.sort((a, b) => (a[sortingColumn] < b[sortingColumn]) ? 1 : ((b[sortingColumn] < a[sortingColumn]) ? -1 : 0));\n } else {\n return array.sort((a, b) => (a[sortingColumn] > b[sortingColumn]) ? 1 : ((b[sortingColumn] > a[sortingColumn]) ? -1 : 0));\n }\n }\n\n const sortBy = sorting => {\n const { Date, IP, Domains, Netmask, Interface, Owner, Starred } = i18n;\n\n switch (sorting) {\n case Date: return 'DATE';\n case IP: return 'IP';\n case Netmask: return 'NETMASK';\n case Interface: return 'INTERFACE';\n case Domains: return 'U_WEB_DOMAINS';\n case Owner: return 'OWNER';\n case Starred: return 'STARRED';\n default: break;\n }\n }\n\n const toggleFav = (value, type) => {\n const { ipFav } = state;\n let ipFavDuplicate = ipFav;\n\n if (type === 'add') {\n ipFavDuplicate[value] = 1;\n\n addFavorite(value, 'ip')\n .then(() => {\n setState({ ...state, ipFav: ipFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n } else {\n ipFavDuplicate[value] = undefined;\n\n deleteFavorite(value, 'ip')\n .then(() => {\n setState({ ...state, ipFav: ipFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n }\n }\n\n const toggleAll = toggled => {\n let internetProtocolsDuplicate = [...state.internetProtocols];\n\n if (toggled) {\n let ipNames = [];\n\n let internetProtocols = internetProtocolsDuplicate.map(internetProtocol => {\n ipNames.push(internetProtocol.NAME);\n internetProtocol.isChecked = true;\n return internetProtocol;\n });\n\n setState({ ...state, internetProtocols, selection: ipNames, toggledAll: toggled });\n } else {\n let internetProtocols = internetProtocolsDuplicate.map(internetProtocol => {\n internetProtocol.isChecked = false;\n return internetProtocol;\n });\n\n setState({ ...state, internetProtocols, selection: [], toggledAll: toggled });\n }\n }\n\n const bulk = action => {\n const { selection } = state;\n\n if (selection.length && action) {\n setLoading(true);\n bulkAction(action, selection)\n .then(result => {\n if (result.status === 200) {\n toggleAll(false);\n fetchData().then(() => refreshMenuCounters());\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const displayModal = (text, actionUrl) => {\n setModal({ ...modal, visible: true, text, actionUrl });\n }\n\n const modalConfirmHandler = () => {\n if (!modal.actionUrl) {\n return modalCancelHandler();\n }\n\n modalCancelHandler();\n setLoading(true);\n handleAction(modal.actionUrl)\n .then(res => {\n if (res.data.error) {\n setLoading(false);\n return displayModal(res.data.error, '');\n }\n fetchData().then(() => refreshMenuCounters())\n })\n .catch(err => { setLoading(false); console.error(err); });\n }\n\n const refreshMenuCounters = () => {\n dispatch(refreshCounters()).then(() => setLoading(false));\n }\n\n const modalCancelHandler = () => {\n setModal({ ...modal, visible: false, text: '', actionUrl: '' });\n }\n\n return (\n <div className=\"internetProtocols\">\n <Helmet>\n <title>{`Vesta - ${i18n.IP}`}</title>\n </Helmet>\n <Toolbar mobile={false} >\n <LeftButton name={i18n['Add IP']} href=\"/add/ip/\" showLeftMenu={true} />\n <div className=\"r-menu\">\n <div className=\"input-group input-group-sm\">\n <Checkbox toggleAll={toggleAll} toggled={state.toggledAll} />\n <Select list='internetProtocolsList' bulkAction={bulk} />\n <DropdownFilter changeSorting={changeSorting} sorting={state.sorting} order={state.order} list=\"internetProtocolsList\" />\n <SearchInput handleSearchTerm={term => props.changeSearchTerm(term)} />\n </div>\n </div>\n </Toolbar>\n <div className=\"ip-wrapper\">\n {loading\n ? <Spinner />\n : (<>\n {internetProtocols()}\n <div className=\"total\">{state.totalAmount}</div>\n </>)}\n </div>\n <Modal\n onSave={modalConfirmHandler}\n onCancel={modalCancelHandler}\n show={modal.visible}\n text={modal.text} />\n </div>\n );\n}\n\nexport default InternetProtocols;\n","import axios from \"axios\";\nimport { getAuthToken } from \"src/utils/token\";\n\nconst BASE_URL = window.location.origin;\nconst addWebUri = '/api/v1/add/web/index.php';\nconst webApiUri = '/api/v1/list/web/index.php';\nconst webStatsUri = '/api/v1/web-stats.php';\nconst domainInfoUri = '/api/v1/edit/web/index.php';\nconst generateCSRUri = '/api/v1/generate/ssl/index.php';\nconst updateDomainUri = '/api/v1/edit/web/index.php';\n\nexport const getWebList = () => {\n return axios.get(BASE_URL + webApiUri);\n}\n\nexport const bulkAction = (action, webDomains) => {\n const formData = new FormData();\n formData.append(\"action\", action);\n formData.append(\"token\", getAuthToken());\n\n webDomains.forEach(webDomain => {\n formData.append(\"domain[]\", webDomain);\n });\n\n return axios.post(BASE_URL + '/api/v1/bulk/web/', formData);\n};\n\nexport const handleAction = uri => {\n return axios.get(BASE_URL + uri, {\n params: {\n token: getAuthToken()\n }\n });\n}\n\nexport const addWeb = data => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + addWebUri, formDataObject);\n}\n\nexport const getWebDomainInfo = domain => {\n return axios.get(BASE_URL + addWebUri, {\n params: {\n token: getAuthToken()\n }\n });\n}\n\nexport const getWebStats = () => {\n return axios.get(BASE_URL + webStatsUri);\n}\n\nexport const getDomainInfo = domain => {\n return axios.get(BASE_URL + domainInfoUri, {\n params: {\n domain,\n token: getAuthToken()\n }\n });\n}\n\nexport const updateWebDomain = (data, domain) => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + updateDomainUri, formDataObject, {\n params: {\n domain,\n token: getAuthToken()\n }\n });\n}\n\nexport const getCsrInitialData = domain => {\n if (domain) {\n return axios.get(BASE_URL + generateCSRUri, {\n params: {\n domain\n }\n });\n } else {\n return axios.get(BASE_URL + generateCSRUri);\n }\n}\n\nexport const generateCSR = (data) => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + generateCSRUri, formDataObject, {\n params: {\n token: getAuthToken()\n }\n });\n}\n","import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport React, { useEffect, useState } from 'react';\nimport { useSelector } from 'react-redux';\n\nconst Password = ({ defaultValue, onChange = () => { }, id, name, title, showGenerationButton = true, ...props }) => {\n const { i18n } = useSelector(state => state.session);\n const [state, setState] = useState({\n hidePassword: false,\n generatedPassword: ''\n });\n\n useEffect(() => {\n if (defaultValue && !state.generatedPassword) {\n setState({ ...state, generatedPassword: defaultValue });\n }\n }, [defaultValue]);\n\n const hidePasswordHandler = () => {\n setState({ ...state, hidePassword: !state.hidePassword });\n }\n\n const generatePassword = () => {\n let chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz';\n let stringLength = 10;\n let result = '';\n\n for (var i = 0; i < stringLength; i++) {\n let randomNumber = Math.floor(Math.random() * chars.length);\n result += chars.substr(randomNumber, 1);\n }\n\n setState({ ...state, generatedPassword: result });\n }\n\n const passwordInputHandler = value => {\n setState({ ...state, generatedPassword: value });\n onChange(value);\n }\n\n return (\n <div className=\"form-group\">\n <label htmlFor=\"password\">\n {title ? title : i18n.Password}\n {\n showGenerationButton && (\n <> / <button type=\"button\" className=\"generate-password\" onClick={() => generatePassword()}>\n {i18n.Generate}\n </button></>\n )\n }\n </label>\n <div className=\"password-wrapper\">\n <input\n type={state.hidePassword ? 'password' : 'text'}\n className=\"form-control\"\n id={`password_${id}`}\n name={name}\n value={state.generatedPassword}\n onChange={event => passwordInputHandler(event.target.value)}\n {...props} />\n <button type=\"button\" onClick={() => hidePasswordHandler()}>\n {state.hidePassword ?\n <span className=\"eye-slash\"><FontAwesomeIcon icon=\"eye-slash\" /></span> :\n <span className=\"eye\"><FontAwesomeIcon icon=\"eye\" /></span>}\n </button>\n </div>\n </div>\n );\n}\n\nexport default Password;\n","import React, { useState } from 'react';\nimport { useSelector } from 'react-redux';\n\nimport Password from '../../../../components/ControlPanel/AddItemLayout/Form/Password/Password';\n\nimport './AdditionalFtpForEditing.scss';\n\nconst AdditionalFtpForEditing = ({ domain, data = {}, onDeleteAdditionalFtp, prefixI18N, prePath, checked, ...props }) => {\n const { i18n, userName } = useSelector(state => state.session);\n const [state, setState] = useState({\n username: data.v_ftp_user || '',\n path: ''\n });\n\n const renderForm = () => {\n if (data.deleted) {\n if (data.is_new === 0) {\n return (<>\n <input type=\"hidden\" name={`v_ftp_user[${data.id}][delete]`} value=\"1\" />\n <input type=\"hidden\" name={`v_ftp_user[${data.id}][is_new]`} value={data.is_new} />\n <input type=\"hidden\" name={`v_ftp_user[${data.id}][v_ftp_user]`} value={data.v_ftp_user} />\n <input type=\"hidden\" name={`v_ftp_user[${data.id}][v_ftp_password]`} value={data.v_ftp_password} />\n <input type=\"hidden\" name={`v_ftp_user[${data.id}][v_ftp_path]`} value={data.v_ftp_path} />\n <input type=\"hidden\" name={`v_ftp_user[${data.id}][v_ftp_pre_path]`} value={prePath} />\n </>);\n }\n } else {\n if (!checked) {\n return <></>;\n }\n\n return (\n <div className=\"additional-ftp\">\n <div className=\"title\">\n <input type=\"hidden\" name={`v_ftp_user[${data.id}][delete]`} value=\"0\" />\n <input type=\"hidden\" name={`v_ftp_user[${data.id}][is_new]`} value=\"1\" />\n\n <span className=\"data.indexed-name\">{i18n.FTP} #{data.id + 1}</span>\n <span>\n &nbsp;\n <button\n type=\"button\"\n onClick={() => onDeleteAdditionalFtp(data.id)}>\n ({i18n.Delete ?? 'Delete'})\n </button>\n </span>\n </div>\n\n <div className=\"form-transform\">\n <div className=\"form-group username\">\n <label htmlFor={`ftp_user_${data.id}`}>{i18n.Username}</label>\n <span className=\"prefix-note\">{prefixI18N}</span>\n <div className=\"input-wrapper\">\n <input\n defaultValue={state.username}\n onChange={event => setState({ ...state, username: event.target.value })}\n type=\"text\"\n disabled={data.v_ftp_user}\n className=\"form-control\"\n id={`ftp_user_${data.id}`}\n name={`v_ftp_user[${data.id}][v_ftp_user]`} />\n <span>{data.v_ftp_user ? data.v_ftp_user : `${userName}_${state.username}`}</span>\n </div>\n </div>\n\n <Password name={`v_ftp_user[${data.id}][v_ftp_password]`} id={data.id} />\n\n <div className=\"form-group\">\n <input type=\"hidden\" name=\"v_ftp_pre_path\" value={prePath} />\n <input type=\"hidden\" name={`v_ftp_user[${data.id}][v_ftp_path_prev]`} value={data.v_ftp_path !== '/' ? '/' : ''} />\n\n <label htmlFor={`path${data.id}`}>{i18n.Path}</label>\n <input\n type=\"text\"\n value={state.path}\n onChange={event => setState({ ...state, path: event.target.value })}\n className=\"form-control\"\n id={`path${data.id}`}\n name={`v_ftp_user[${data.id}][v_ftp_path]`} />\n <span className=\"path-note\">{prePath}</span>\n </div>\n\n {\n data.is_new === 1 && (\n <div className=\"form-group\">\n <label htmlFor={`sendLoginCredentialsToEmailAddress_${data.id}`}>{i18n['Send login credentials to email address']}</label>\n <input\n type=\"email\"\n className=\"form-control\"\n id={`sendLoginCredentialsToEmailAddress_${data.id}`}\n defaultValue={data.v_ftp_email}\n name={`v_ftp_user[${data.id}][v_ftp_email]`} />\n </div>\n )\n }\n\n </div>\n </div >);\n }\n\n return <></>;\n }\n\n return renderForm();\n}\n\nexport default AdditionalFtpForEditing;\n","import React, { useEffect, useState } from 'react';\nimport { useSelector } from 'react-redux';\nimport AdditionalFtpForEditing from '../AdditionalFtpForEditing/AdditionalFtpForEditing';\nimport './AdditionalFtpWrapper.scss';\n\nconst AdditionalFtpWrapper = ({ checked, ftps, unCheckAdditionalFtpBox, prefixI18N, ftpUserPrePath, domain, ...props }) => {\n const { i18n } = useSelector(state => state.session);\n const [state, setState] = useState({\n additionalFtp: []\n });\n\n useEffect(() => {\n if (ftps) {\n const data = ftps.map((item, index) => {\n item['deleted'] = !checked;\n item['id'] = index;\n return item;\n });\n\n setState({ ...state, additionalFtp: data });\n }\n }, [checked, ftps]);\n\n const renderAdditionalFtps = () => {\n return state.additionalFtp.map(ftp => {\n return <AdditionalFtpForEditing\n key={ftp.id}\n prefixI18N={prefixI18N}\n data={ftp}\n checked={checked}\n prePath={ftpUserPrePath}\n domain={domain}\n onDeleteAdditionalFtp={id => onDeleteFtp(id)} />;\n });\n }\n\n const onDeleteFtp = index => {\n let updatedAdditionalFtps = [];\n\n state.additionalFtp.forEach(item => {\n if (item.id === index) {\n item.deleted = true;\n }\n\n updatedAdditionalFtps.push(item);\n });\n\n if (!updatedAdditionalFtps.length) {\n unCheckAdditionalFtpBox();\n }\n\n setState({ ...state, additionalFtp: updatedAdditionalFtps });\n }\n\n const addAdditionalFtp = () => {\n let additionalFtpArrayLength = state.additionalFtp.length;\n let additionalFtpsDuplicate = [...state.additionalFtp];\n\n additionalFtpsDuplicate.push({ id: additionalFtpArrayLength, deleted: false, is_new: 1 });\n\n setState({ ...state, additionalFtp: additionalFtpsDuplicate });\n }\n\n return (\n <div>\n {renderAdditionalFtps()}\n\n {checked && (\n <button type=\"button\" onClick={() => addAdditionalFtp()}>\n {i18n['Add one more FTP Account'] ?? 'Add'}\n </button>)}\n </div>\n );\n}\n\nexport default AdditionalFtpWrapper;\n","import React, { useState } from 'react';\nimport { useSelector } from 'react-redux';\nimport { Link } from 'react-router-dom';\nimport TextArea from 'src/components/ControlPanel/AddItemLayout/Form/TextArea/TextArea';\n\nimport './SslSupport.scss';\n\nconst SslSupport = props => {\n const { i18n } = useSelector(state => state.session);\n const [letsEncrypt, setLetsEncrypt] = useState(false);\n\n return (\n <div className=\"ssl-support\">\n <div className=\"form-group\">\n <div className=\"checkbox-wrapper\">\n <input\n type=\"checkbox\"\n name=\"v_letsencrypt\"\n id=\"lets-encrypt\"\n checked={letsEncrypt}\n onChange={() => setLetsEncrypt(!letsEncrypt)} />\n <label htmlFor=\"lets-encrypt\">{i18n['Lets Encrypt Support']}</label>\n </div>\n <span className=\"lets-encrypt-span\">{letsEncrypt ? i18n['Your certificate will be automatically issued in 5 minutes'] : null}</span>\n </div>\n\n <input type=\"hidden\" value=\"same\" name=\"v_ssl_home\" />\n\n <TextArea\n id=\"ssl-certificate\"\n name=\"v_ssl_crt\"\n title={i18n['SSL Certificate']}\n value={props.sslCertificate}\n disabled={letsEncrypt}\n optionalTitle={<>/ <button type=\"button\" onClick={() => props.setModalVisible(true)} className=\"generate-csr\">{i18n['Generate CSR']}</button></>} />\n\n <div class=\"form-group\">\n <label htmlFor=\"aliases\">{i18n['SSL Key']}</label>\n <textarea class=\"form-control\" id=\"ssl_key\" rows=\"3\" name=\"v_ssl_key\" defaultValue={props.sslKey} disabled={letsEncrypt}></textarea>\n </div>\n\n <div class=\"form-group\">\n <label htmlFor=\"aliases\">{i18n['SSL Certificate Authority / Intermediate']}</label>\n <textarea class=\"form-control\" id=\"ssl_ca\" rows=\"3\" name=\"v_ssl_ca\" disabled={letsEncrypt}></textarea>\n </div>\n </div>\n );\n}\n\nexport default SslSupport;\n","import React, { useEffect, useState } from 'react';\nimport { useSelector } from 'react-redux';\nimport Password from '../../../../components/ControlPanel/AddItemLayout/Form/Password/Password';\nimport AdditionalFtpWrapper from '../AdditionalFtpWrapper/AdditionalFtpWrapper';\nimport Checkbox from 'src/components/ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport SslSupport from '../SslSupport/SslSupport';\n\nimport './AdvancedOptions.scss';\n\nconst AdvancedOptions = ({ prefixI18N, prePath, ...props }) => {\n const { i18n } = useSelector(state => state.session);\n const [state, setState] = useState({\n sslSupport: false,\n additionalFtp: false,\n statisticsAuthCheckbox: false,\n statisticsAuth: false,\n });\n\n useEffect(() => {\n let updatedDomain = `www.${props.domain}`;\n setState({ ...state, aliases: updatedDomain });\n }, [props.domain]);\n\n const renderSslSupport = () => {\n if (state.sslSupport) {\n return <SslSupport sslCertificate={props.sslCertificate} sslKey={props.sslKey} setModalVisible={bool => props.setModalVisible(bool)} />;\n }\n }\n\n const renderWebStats = () => {\n return props.webStats.map(stat => <option value={stat}>{stat}</option>);\n }\n\n const onChangeWebStatsSelect = value => {\n if (value !== 'none') {\n setState({ ...state, statisticsAuth: true });\n } else {\n setState({ ...state, statisticsAuth: false, statisticsAuthCheckbox: false });\n }\n }\n\n return (\n <div style={{ transform: 'translateX(3rem)' }}>\n <div className=\"form-group\">\n <div className=\"checkbox-wrapper\">\n <input\n type=\"checkbox\"\n name=\"v_ssl\"\n id=\"ssl-support\"\n checked={state.sslSupport}\n onChange={() => setState({ ...state, sslSupport: !state.sslSupport })} />\n <label htmlFor=\"ssl-support\">{i18n['SSL Support']}</label>\n </div>\n </div>\n\n {renderSslSupport()}\n\n <div class=\"form-group\">\n <label htmlFor=\"web-stats\">{i18n['Web Statistics']}</label>\n <select class=\"form-control\" id=\"web-stats\" name=\"v_stats\" onChange={event => onChangeWebStatsSelect(event.target.value)}>\n {renderWebStats()}\n </select>\n </div>\n\n <div className={`form-group statistics-authorization ${state.statisticsAuth ? 'show' : 'hide'}`}>\n <div className=\"checkbox-wrapper\">\n <input\n type=\"checkbox\"\n name=\"v_stats_auth\"\n id=\"stats-auth\"\n checked={state.statisticsAuthCheckbox}\n onChange={() => setState({ ...state, statisticsAuthCheckbox: !state.statisticsAuthCheckbox })} />\n <label htmlFor=\"stats-auth\">{i18n['Statistics Authorization']}</label>\n </div>\n </div>\n\n <div className={state.statisticsAuthCheckbox ? 'show web-stats-wrapper' : 'hide'}>\n <div className=\"form-group\">\n <label htmlFor=\"stats-user\">{i18n.Username}</label>\n <input type=\"text\" className=\"form-control\" id=\"stats-user\" name=\"v_stats_user\" />\n </div>\n\n <Password name='v_stats_password' />\n </div>\n\n <Checkbox\n onChange={checked => setState({ ...state, additionalFtp: checked })}\n name=\"v_ftp\"\n id=\"add-ftp\"\n checked={state.additionalFtp}\n title={i18n['Additional FTP Account']} />\n\n <AdditionalFtpWrapper\n checked={state.additionalFtp}\n prefixI18N={prefixI18N}\n ftps={[{ id: 1, deleted: false, is_new: 1 }]}\n ftpUserPrePath={prePath}\n unCheckAdditionalFtpBox={() => setState({ ...state, additionalFtp: false })} />\n </div>\n );\n}\n\nexport default AdvancedOptions;\n","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"src/actions/MainNavigation/mainNavigationActions\";\nimport TextInput from 'src/components/ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport AddItemLayout from 'src/components/ControlPanel/AddItemLayout/AddItemLayout';\nimport TextArea from 'src/components/ControlPanel/AddItemLayout/Form/TextArea/TextArea';\nimport { generateCSR, getCsrInitialData } from 'src/ControlPanelService/Web';\nimport { useDispatch, useSelector } from 'react-redux';\nimport Spinner from 'src/components/Spinner/Spinner';\nimport { useHistory } from 'react-router-dom';\nimport HtmlParser from 'react-html-parser';\n\nconst GenerateSSL = props => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n generatedData: {},\n loading: false,\n domain: ''\n });\n\n useEffect(() => {\n const { domain } = props;\n\n dispatch(addActiveElement('/list/web/'));\n dispatch(removeFocusedElement());\n\n if (domain) {\n fetchData(domain);\n } else {\n fetchData();\n }\n }, []);\n\n const fetchData = (domain = '') => {\n getCsrInitialData(domain)\n .then(response => {\n setState({\n ...state,\n domain,\n generatedData: {},\n data: response.data,\n loading: false\n });\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err);\n });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let newCsr = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n newCsr[name] = value;\n }\n\n newCsr['generate'] = 'generate';\n\n if (Object.keys(newCsr).length !== 0 && newCsr.constructor === Object) {\n setState({ ...state, loading: true });\n\n generateCSR(newCsr)\n .then(result => {\n if (result.status === 200) {\n const { error_msg: errorMessage, ok_msg: okMessage, crt, key, csr } = result.data;\n\n if (errorMessage) {\n setErrorMessage(errorMessage);\n setOkMessage('');\n setState({ ...state, generatedData: {}, loading: false });\n } else {\n setErrorMessage('');\n setOkMessage(okMessage);\n\n setState({ ...state, generatedData: { crt, key, csr }, loading: false });\n }\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n return (\n <div className=\"edit-template edit-user\">\n <AddItemLayout date={state.data.date} time={state.data.time} status={state.data.status}>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"add-user\">\n <input type=\"hidden\" name=\"token\" value={token} />\n\n {\n Object.entries(state.generatedData).length\n ? (<>\n <TextArea\n id=\"csr\"\n name=\"v_csr\"\n title={i18n['SSL CSR']}\n defaultValue={state.generatedData.csr} />\n\n <TextArea\n id=\"crt\"\n name=\"v_crt\"\n title={i18n['SSL Certificate']}\n defaultValue={state.generatedData.crt} />\n\n <TextArea\n id=\"v_key\"\n name=\"key\"\n title={i18n['SSL Key']}\n defaultValue={state.generatedData.key} />\n\n <div className=\"buttons-wrapper\">\n <button type=\"button\" className=\"add\" onClick={() => props.prePopulateInputs(state.generatedData)}>{i18n.Add}</button>\n <button type=\"button\" className=\"back\" onClick={props.closeModal}>{i18n.Back}</button>\n </div>\n </>)\n : (<>\n <TextInput id=\"domain\" name=\"v_domain\" title={i18n['Domain']} value={state.data.domain} />\n\n <TextInput id=\"email\" name=\"v_email\" title={i18n['Email']} value={state.data.email} />\n\n <TextInput id=\"country\" name=\"v_country\" title={i18n['Country']} optionalTitle={`(${i18n['2 letter code']})`} value={state.data.country} />\n\n <TextInput id=\"state\" name=\"v_state\" title={i18n['State / Province']} value={state.data.state} />\n\n <TextInput id=\"locality\" name=\"v_locality\" title={i18n['City / Locality']} value={state.data.locality} />\n\n <TextInput id=\"org\" name=\"v_org\" title={i18n['Organization']} value={state.data.org} />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Generate}</button>\n <button type=\"button\" className=\"back\" onClick={props.closeModal}>{i18n.Back}</button>\n </div>\n </>)\n }\n\n <div className=\"error\"><span className=\"error-message\">{errorMessage}</span></div>\n <div className=\"success\">\n <span className=\"ok-message\"><span>{HtmlParser(okMessage)}</span> </span>\n </div>\n </form>\n }\n </AddItemLayout>\n </div >\n );\n}\n\nexport default GenerateSSL;\n","import React, { useEffect, useState } from 'react';\n\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { addWeb, getWebDomainInfo } from '../../../ControlPanelService/Web';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport AdvancedOptions from './AdvancedOptions/AdvancedOptions';\nimport Checkbox from 'src/components/ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport TextArea from 'src/components/ControlPanel/AddItemLayout/Form/TextArea/TextArea';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport Spinner from '../../Spinner/Spinner';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './AddWebDomain.scss';\nimport GenerateSSL from 'src/containers/GenerateCSR';\nimport 'src/components/Modal/Modal.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nconst AddWebDomain = props => {\n const { i18n, panel, userName } = useSelector(state => state.session);\n const { session } = useSelector(state => state.userSession);\n const dispatch = useDispatch();\n const token = localStorage.getItem(\"token\");\n const [modalVisible, setModalVisible] = useState(false);\n const history = useHistory();\n const [state, setState] = useState({\n loading: false,\n dnsSupport: true,\n mailSupport: true,\n proxySupport: true,\n showAdvancedOptions: false,\n okMessage: '',\n ssl_crt: '',\n ssl_key: '',\n domain: '',\n errorMessage: '',\n webStats: [],\n prefixI18N: '',\n prePath: '',\n proxy_ext: '',\n internetProtocols: []\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/web/'));\n dispatch(removeFocusedElement());\n\n setState({ ...state, loading: true });\n getWebDomainInfo()\n .then(res => {\n setState({\n ...state,\n internetProtocols: getInternetProtocolNames(res.data.ips),\n webStats: res.data.stats,\n prefixI18N: res.data.prefix,\n proxy_ext: res.data.proxy_ext,\n prePath: res.data.ftp_pre_path,\n loading: false\n });\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err);\n })\n }, []);\n\n const getInternetProtocolNames = internetProtocols => {\n let result = [];\n\n for (let i in internetProtocols) {\n result.push(i);\n }\n\n return result;\n }\n\n const renderInternetProtocolsOptions = () => {\n return state.internetProtocols.map(ip => <option value={ip}>{ip}</option>);\n }\n\n const showAdvancedOption = () => {\n setState({ ...state, showAdvancedOptions: !state.showAdvancedOptions });\n }\n\n const renderAdvancedOptions = () => {\n if (state.showAdvancedOptions) {\n return <AdvancedOptions\n prefixI18N={state.prefixI18N}\n setModalVisible={bool => setModalVisible(bool)}\n sslCertificate={state.ssl_crt}\n sslKey={state.ssl_key}\n domain={state.domain}\n webStats={state.webStats}\n prePath={state.prePath} />;\n }\n }\n\n const onBlurChangeAliases = value => {\n setState({ ...state, domain: value });\n }\n\n const checkboxHandler = (input, checked) => {\n setState({ ...state, [input]: checked });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let newWebDomain = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n newWebDomain[name] = value;\n }\n\n if (Object.keys(newWebDomain).length !== 0 && newWebDomain.constructor === Object) {\n setState({ loading: true });\n addWeb(newWebDomain)\n .then(result => {\n if (result.status === 200) {\n const { error_msg: errorMessage, ok_msg: okMessage } = result.data;\n\n if (errorMessage) {\n setState({ ...state, errorMessage, okMessage, loading: false });\n } else {\n dispatch(refreshCounters()).then(() => {\n setState({ ...state, okMessage, errorMessage: '', loading: false });\n });\n }\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n return (\n <div className=\"edit-template add-web\">\n <Helmet>\n <title>{`Vesta - ${i18n.WEB}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Adding Domain']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {state.errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n {state.errorMessage}</span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {state.okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n <span>{HtmlParser(state.okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> : (\n <form onSubmit={event => submitFormHandler(event)}>\n <input type=\"hidden\" name=\"ok\" value=\"add\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <div className=\"form-group\">\n <label htmlFor=\"domain\">{i18n.Domain}</label>\n <input\n type=\"text\"\n className=\"form-control\"\n id=\"domain\"\n required\n name=\"v_domain\"\n onBlur={event => onBlurChangeAliases(event.target.value)} />\n </div>\n\n <div class=\"form-group\">\n <label htmlFor=\"package\">{i18n['IP Address']}</label>\n <select class=\"form-control\" id=\"ip\" name=\"v_ip\">\n {renderInternetProtocolsOptions()}\n </select>\n </div>\n\n <div class=\"form-group\">\n <label htmlFor=\"aliases\">{i18n.Aliases}</label>\n <textarea\n class=\"form-control\"\n id=\"aliases\"\n rows=\"3\"\n name=\"v_aliases\"\n defaultValue={state.aliases}\n ></textarea>\n </div>\n\n {\n panel[userName]['DNS_DOMAINS'] !== '0' && (\n <Checkbox\n onChange={checked => checkboxHandler('dnsSupport', checked)}\n name=\"v_dns\"\n id=\"dns-support\"\n title={i18n['DNS Support'] ?? 'DNS Support'}\n defaultChecked={state.dnsSupport} />\n )\n }\n\n {\n panel[userName]['MAIL_DOMAINS'] !== '0' && (\n <Checkbox\n onChange={checked => checkboxHandler('mailSupport', checked)}\n name=\"v_mail\"\n id=\"mail-support\"\n title={i18n['Mail Support'] ?? 'Mail Support'}\n defaultChecked={state.mailSupport} />\n )\n }\n\n {\n session.PROXY_SYSTEM && (\n <>\n <Checkbox\n onChange={checked => checkboxHandler('proxySupport', checked)}\n name=\"v_proxy\"\n id=\"proxy\"\n title={i18n['Proxy Support'] ?? 'Proxy Support'}\n defaultChecked={state.proxySupport} />\n\n {\n state.proxySupport && (<div style={{ transform: 'translateX(3rem)' }}>\n <TextArea\n id=\"proxy-extensions\"\n name=\"v_proxy_ext\"\n title={i18n['Proxy Extensions']}\n defaultValue={state.proxy_ext} />\n </div>)\n }\n </>\n )\n }\n\n <div className=\"form-group advanced-options-button\">\n <button type=\"button\" onClick={() => showAdvancedOption()}>\n {i18n['Advanced options']}\n {state.showAdvancedOptions ? <FontAwesomeIcon icon=\"caret-down\" /> : <FontAwesomeIcon icon=\"caret-up\" />}\n </button>\n </div>\n\n {renderAdvancedOptions()}\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Add}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/web/')}>{i18n.Back}</button>\n </div>\n </form>\n )}\n </AddItemLayout>\n <div className={`modal fade ${modalVisible ? 'show' : ''}`} id=\"c-panel-modal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"exampleModalLabel\" aria-hidden=\"true\" style={{ display: modalVisible ? 'block' : 'none' }}>\n <div className=\"modal-dialog\" role=\"document\">\n <div className=\"modal-content\">\n <div className=\"modal-header\">\n <h5>{i18n['Generating CSR']}</h5>\n <button type=\"button\" onClick={() => setModalVisible(false)} className=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n </div>\n <GenerateSSL\n domain={state.domain}\n closeModal={() => setModalVisible(false)}\n prePopulateInputs={({ crt, key }) => {\n setState({ ...state, ssl_crt: crt, ssl_key: key });\n setModalVisible(false);\n }} />\n </div>\n </div>\n </div>\n </div >\n );\n}\n\nexport default AddWebDomain;\n","import React, { useEffect, useState } from 'react';\n\nimport './TextInputWithTextOnTheRight.scss';\n\nconst TextInputWithTextOnTheRight = ({ id, title, name, defaultValue = '', optionalTitle = '', disabled = false }) => {\n const [inputValue, setInputValue] = useState('');\n\n useEffect(() => {\n if (defaultValue) {\n setInputValue(defaultValue);\n }\n }, [defaultValue]);\n\n return (\n <div className=\"form-group text-on-the-right\">\n <label className=\"label-wrapper\" htmlFor={id}>\n {title}\n <span>{optionalTitle || ''}</span>\n </label>\n <div className=\"input-wrapper\">\n <input\n defaultValue={`admin_${defaultValue}`}\n type=\"text\"\n className=\"form-control\"\n id={id}\n value={inputValue}\n onChange={event => setInputValue(event.target.value)}\n disabled={disabled}\n name={name} />\n <span><i>{`${inputValue}`}</i></span>\n </div>\n </div>\n );\n}\n\nexport default TextInputWithTextOnTheRight;","import axios from \"axios\";\nimport { getAuthToken } from \"src/utils/token\";\n\nconst BASE_URL = window.location.origin;\nconst webApiUri = '/api/v1/list/db/index.php';\nconst addDbApiUri = '/api/v1/add/db/index.php';\nconst optionalDbInfoUri = '/api/v1/add/db/index.php';\nconst dbInfoUri = '/api/v1/edit/db/index.php';\nconst updateDatabaseUri = '/api/v1/edit/db/index.php';\n\nexport const getDatabaseList = () => {\n return axios.get(BASE_URL + webApiUri);\n}\n\nexport const bulkAction = (action, domainNameSystems) => {\n const formData = new FormData();\n formData.append(\"action\", action);\n formData.append(\"token\", getAuthToken());\n\n domainNameSystems.forEach(domainNameSystem => {\n formData.append(\"database[]\", domainNameSystem);\n });\n\n return axios.post(BASE_URL + '/api/v1/bulk/db/', formData);\n};\n\nexport const handleAction = uri => {\n return axios.get(BASE_URL + uri, {\n params: {\n token: getAuthToken()\n }\n });\n}\n\nexport const getDbOptionalInfo = () => {\n return axios.get(BASE_URL + optionalDbInfoUri);\n}\n\nexport const addDatabase = data => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + addDbApiUri, formDataObject);\n}\n\nexport const dbCharsets = [\n 'big5',\n 'dec8',\n 'cp850',\n 'hp8',\n 'koi8r',\n 'latin1',\n 'latin2',\n 'swe7',\n 'ascii',\n 'ujis',\n 'sjis',\n 'hebrew',\n 'tis620',\n 'euckr',\n 'koi8u',\n 'gb2312',\n 'greek',\n 'cp1250',\n 'gbk',\n 'latin5',\n 'armscii8',\n 'utf8',\n 'ucs2',\n 'cp866',\n 'keybcs2',\n 'macce',\n 'macroman',\n 'cp852',\n 'latin7',\n 'cp1251',\n 'cp1256',\n 'cp1257',\n 'binary',\n 'geostd8',\n 'cp932',\n 'eucjpms'\n];\n\nexport const getDatabaseInfo = database => {\n return axios.get(BASE_URL + dbInfoUri, {\n params: {\n database,\n token: getAuthToken()\n }\n });\n}\n\nexport const updateDatabase = (data, database) => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + updateDatabaseUri, formDataObject, {\n params: {\n database,\n token: getAuthToken()\n }\n });\n}","import React, { useEffect, useState } from 'react';\nimport TextInputWithTextOnTheRight from '../../ControlPanel/AddItemLayout/Form/TextInputWithTextOnTheRight/TextInputWithTextOnTheRight';\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport { getDatabaseInfo, updateDatabase } from '../../../ControlPanelService/Db';\nimport TextInput from '../../ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport Password from '../../ControlPanel/AddItemLayout/Form/Password/Password';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from '../../../components/Spinner/Spinner';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\nimport QS from 'qs';\n\nimport './EditDatabase.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nconst EditDatabase = props => {\n const token = localStorage.getItem(\"token\");\n const { i18n, userName } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n loading: false,\n databaseUserInputValue: ''\n });\n\n useEffect(() => {\n let queryParams = QS.parse(history.location.search, { ignoreQueryPrefix: true });\n const { database } = queryParams;\n\n dispatch(addActiveElement('/list/db/'));\n dispatch(removeFocusedElement());\n\n if (database) {\n setState({ ...state, loading: true });\n fetchData(database);\n }\n }, []);\n\n const fetchData = database => {\n getDatabaseInfo(database)\n .then(response => {\n setState({\n ...state,\n data: response.data,\n databaseUserInputValue: response.data.dbuser.split('_').splice(1).join('_'),\n loading: false\n });\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err);\n });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedDatabase = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedDatabase[name] = value;\n }\n\n updatedDatabase['v_database'] = state.data.database;\n updatedDatabase['v_dbuser'] = `${userName}_${state.databaseUserInputValue}`;\n\n if (Object.keys(updatedDatabase).length !== 0 && updatedDatabase.constructor === Object) {\n setState({ ...state, loading: true });\n\n updateDatabase(updatedDatabase, state.data.database)\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n if (error_msg) {\n setOkMessage('');\n setErrorMessage(error_msg);\n } else {\n dispatch(refreshCounters()).then(() => {\n setOkMessage(ok_msg);\n setErrorMessage('');\n });\n }\n }\n })\n .then(() => fetchData(state.data.database))\n .catch(err => console.error(err));\n }\n }\n\n const databaseUserInputHandler = value => {\n setState({ ...state, databaseUserInputValue: value });\n }\n\n return (\n <div className=\"edit-template edit-db\">\n <Helmet>\n <title>{`Vesta - ${i18n.DB}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Editing Database']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}\n </span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout date={state.data.date} time={state.data.time} status={state.data.status}>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"edit-db\">\n <input type=\"hidden\" name=\"save\" value=\"save\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <TextInputWithTextOnTheRight id=\"database\" name=\"v_database\" title={i18n['Database']} defaultValue={state.data.database} disabled />\n\n <div className=\"form-group\">\n <div className=\"label-wrapper\">\n <label htmlFor=\"user\">{i18n.User}</label>\n </div>\n <div className=\"input-wrapper\">\n <input\n type=\"text\"\n className=\"form-control\"\n id=\"user\"\n value={state.databaseUserInputValue}\n onChange={event => databaseUserInputHandler(event.target.value)}\n name=\"v_dbuser\" />\n <span className=\"italic\"><i>{`${userName}_${state.databaseUserInputValue}`}</i></span>\n </div>\n </div>\n\n <Password name=\"v_password\" defaultValue={state.data.password} />\n\n <TextInput id=\"type\" name=\"v_type\" title={i18n['Type']} value={state.data.type} disabled />\n\n <TextInput id=\"host\" name=\"v_host\" title={i18n['Host']} value={state.data.host} disabled />\n\n <TextInput id=\"charset\" name=\"v_charset\" title={i18n['Charset']} value={state.data.charset} disabled />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/db/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div>\n );\n}\n\nexport default EditDatabase;","import axios from 'axios';\nimport { getAuthToken } from 'src/utils/token';\n\nconst BASE_URL = window.location.origin;\nconst usersUri = '/api/v1/list/firewall/index.php';\nconst addFirewallUri = '/api/v1/add/firewall/index.php';\nconst firewallInfoUri = '/api/v1/edit/firewall/index.php';\nconst updateFirewallUri = '/api/v1/edit/firewall/index.php';\nconst addBanIpsUri = '/api/v1/add/firewall/banlist/index.php';\nconst banListUri = '/api/v1/list/firewall/banlist/index.php';\n\nexport const getFirewallList = () => {\n return axios.get(BASE_URL + usersUri);\n}\n\nexport const getBanList = () => {\n return axios.get(BASE_URL + banListUri);\n}\n\nexport const bulkAction = (action, ips, banIps) => {\n const formData = new FormData();\n formData.append(\"action\", action);\n formData.append(\"token\", getAuthToken());\n\n ips.forEach(ip => {\n const banIp = banIps.find(banIp => banIp.NAME === ip);\n formData.append(\"ipchain[]\", `${ip}:${banIp['CHAIN']}`);\n });\n\n return axios.post(BASE_URL + '/api/v1/bulk/firewall/banlist/', formData);\n};\n\nexport const handleAction = uri => {\n return axios.get(BASE_URL + uri, {\n params: {\n token: getAuthToken()\n }\n });\n}\n\nexport const getBanIps = data => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.get(BASE_URL + addBanIpsUri, {\n params: {\n token: getAuthToken()\n }\n });\n}\n\nexport const addBanIp = (data) => {\n let formDataObject = new FormData();\n\n formDataObject.append('token', getAuthToken());\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + addBanIpsUri, formDataObject, {\n params: {\n token: getAuthToken()\n }\n });\n}\n\nexport const addFirewall = data => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + addFirewallUri, formDataObject);\n}\n\nexport const getFirewallInfo = rule => {\n return axios.get(BASE_URL + firewallInfoUri, {\n params: {\n rule,\n token: getAuthToken()\n }\n });\n}\n\nexport const updateFirewall = (data, rule) => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + updateFirewallUri, formDataObject, {\n params: {\n rule,\n token: getAuthToken()\n }\n });\n}","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport { getFirewallInfo, updateFirewall } from '../../../ControlPanelService/Firewalls';\nimport SelectInput from '../../ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport TextInput from '../../ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from '../../../components/Spinner/Spinner';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\nimport QS from 'qs';\n\nimport './EditFirewall.scss';\nimport { Helmet } from 'react-helmet';\nimport HtmlParser from 'react-html-parser';\n\nconst EditFirewall = props => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n loading: false\n });\n\n useEffect(() => {\n let queryParams = QS.parse(history.location.search, { ignoreQueryPrefix: true });\n const { rule } = queryParams;\n\n dispatch(addActiveElement('/list/firewall/'));\n dispatch(removeFocusedElement());\n\n if (rule) {\n setState({ ...state, loading: true });\n fetchData(rule);\n }\n }, []);\n\n const fetchData = rule => {\n getFirewallInfo(rule)\n .then(response => {\n setState({\n ...state,\n data: response.data,\n loading: false\n });\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err);\n });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedDomain = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedDomain[name] = value;\n }\n\n if (Object.keys(updatedDomain).length !== 0 && updatedDomain.constructor === Object) {\n setState({ ...state, loading: true });\n\n updateFirewall(updatedDomain, state.data.rule)\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n setErrorMessage(error_msg || '');\n setOkMessage(ok_msg || '');\n }\n })\n .then(() => fetchData(state.data.rule))\n .catch(err => console.error(err));\n }\n }\n\n return (\n <div className=\"edit-template edit-firewall\">\n <Helmet>\n <title>{`Vesta - ${i18n.FIREWALL}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Editing Firewall Rule']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}\n </span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout date={state.data.date} time={state.data.time} status={state.data.status}>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"edit-firewall\">\n <input type=\"hidden\" name=\"save\" value=\"save\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <div className=\"form-group select-group\">\n <label className=\"label-wrapper\" htmlFor=\"action\">\n {i18n['Action']}\n </label>\n <select className=\"form-control\" id=\"action\" name=\"v_action\">\n <option selected={state.data.action === 'DROP'} value=\"DROP\">DROP</option>\n <option selected={state.data.action === 'ACCEPT'} value=\"ACCEPT\">ACCEPT</option>\n </select>\n </div>\n\n <div className=\"form-group select-group\">\n <label className=\"label-wrapper\" htmlFor=\"protocol\">\n {i18n['Protocol']}\n </label>\n <select className=\"form-control\" id=\"protocol\" name=\"v_protocol\">\n <option selected={state.data.protocol === 'TCP'} value=\"TCP\">{i18n['TCP']}</option>\n <option selected={state.data.protocol === 'UDP'} value=\"UDP\">{i18n['UDP']}</option>\n <option selected={state.data.protocol === 'ICMP'} value=\"ICMP\">{i18n['ICMP']}</option>\n </select>\n </div>\n\n <TextInput\n optionalTitle={i18n['ranges are acceptable']}\n value={state.data.port}\n title={i18n['Port']}\n name=\"v_port\"\n id=\"port\" />\n\n <TextInput\n optionalTitle={i18n['CIDR format is supported']}\n value={state.data.ip}\n title={i18n['IP address']}\n name=\"v_ip\"\n id=\"ip\" />\n\n <TextInput\n optionalTitle={i18n['optional']}\n value={state.data.comment}\n title={i18n['Comment']}\n name=\"v_comment\"\n id=\"comment\" />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/firewall/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div>\n );\n}\n\nexport default EditFirewall;","import React, { useEffect } from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport './Hotkeys.scss';\nimport { useSelector } from 'react-redux';\n\nconst Hotkeys = props => {\n const { i18n } = useSelector(state => state.session);\n\n useEffect(() => {\n window.addEventListener(\"keyup\", toggleShortcutsLit);\n\n return () => window.removeEventListener(\"keyup\", toggleShortcutsLit);\n }, [props.reference]);\n\n const toggleShortcutsLit = event => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus');\n\n if (event.keyCode === 72 && !isSearchInputFocused) {\n props.toggleHotkeys();\n }\n }\n\n return (\n <div className=\"hotkeys-list hide\" ref={props.reference}>\n <div className=\"head\">\n <div className=\"name\">{i18n.Shortcuts}</div>\n <div className=\"close\" onClick={() => props.toggleHotkeys()}><FontAwesomeIcon icon=\"times\" /></div>\n </div>\n <div className=\"body\">\n <ul>\n <li>\n <span className=\"name\">a</span>\n <span className=\"description\">{i18n['Add New object']}</span>\n </li>\n <li>\n <span className=\"name\">Ctrl + Open</span>\n <span className=\"description\">{i18n['Save Form']}</span>\n </li>\n <li>\n <span className=\"name\">Ctrl + Backspace</span>\n <span className=\"description\">{i18n['Cancel saving form']}</span>\n </li>\n <li className=\"space-top\">\n <span className=\"name\">1</span>\n <span className=\"description\">{i18n['Go to USER list']}</span>\n </li>\n <li>\n <span className=\"name\">2</span>\n <span className=\"description\">{i18n['Go to WEB list']}</span>\n </li>\n <li>\n <span className=\"name\">3</span>\n <span className=\"description\">{i18n['Go to DNS list']}</span>\n </li>\n <li>\n <span className=\"name\">4</span>\n <span className=\"description\">{i18n['Go to MAIL list']}</span>\n </li>\n <li>\n <span className=\"name\">5</span>\n <span className=\"description\">{i18n['Go to DB list']}</span>\n </li>\n <li>\n <span className=\"name\">6</span>\n <span className=\"description\">{i18n['Go to CRON list']}</span>\n </li>\n <li>\n <span className=\"name\">7</span>\n <span className=\"description\">{i18n['Go to BACKUP list']}</span>\n </li>\n </ul>\n <ul>\n <li>\n <span className=\"name\">f</span>\n <span className=\"description\">{i18n['Focus on search']}</span>\n </li>\n <li className=\"space-top\">\n <span className=\"name\">h</span>\n <span className=\"description\">{i18n['Display/Close shortcuts']}</span>\n </li>\n <li className=\"space-top\">\n <span className=\"name\">&#8592;</span>\n <span className=\"description\">{i18n['Move backward through top menu']}</span>\n </li>\n <li>\n <span className=\"name\">&#8594;</span>\n <span className=\"description\">{i18n['Move forward through top menu']}</span>\n </li>\n <li>\n <span className=\"name\">Enter</span>\n <span className=\"description\">{i18n['Enter focused element']}</span>\n </li>\n <li className=\"space-top\">\n <span className=\"name\">&#8593;</span>\n <span className=\"description\">{i18n['Move up through elements list']}</span>\n </li>\n <li>\n <span className=\"name\">&#8595;</span>\n <span className=\"description\">{i18n['Move down through elements list']}</span>\n </li>\n </ul>\n </div>\n </div>\n );\n}\n\nexport default Hotkeys;","import React, { memo, useEffect, useState } from 'react';\n\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport { dbCharsets, addDatabase, getDbOptionalInfo } from '../../../ControlPanelService/Db';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport Password from '../../ControlPanel/AddItemLayout/Form/Password/Password';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport Spinner from '../../Spinner/Spinner';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\nimport './AddDatabase.scss'\n\nconst AddDatabase = memo(props => {\n const { i18n } = useSelector(state => state.session);\n const token = localStorage.getItem(\"token\");\n const dispatch = useDispatch();\n const history = useHistory();\n const [state, setState] = useState({\n loading: false,\n okMessage: '',\n errorMessage: '',\n dbTypes: [],\n dbHosts: [],\n dbCharsets: [],\n user: '',\n maxCharLength: '',\n databaseInputValue: '',\n databaseUserInputValue: '',\n prefixI18N: ''\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/db/'));\n dispatch(removeFocusedElement());\n\n setState({ ...state, loading: true });\n\n getDbOptionalInfo()\n .then(result => {\n if (result.status === 200) {\n setState({\n ...state,\n dbCharsets,\n user: result.data.user,\n dbTypes: result.data.dbTypes,\n prefixI18N: result.data.prefixI18N,\n maxCharLength: result.data.maxCharLength,\n dbHosts: result.data.dbHosts,\n loading: false\n });\n }\n })\n .catch(err => console.err(err));\n }, []);\n\n const renderDatabaseTypesOptions = () => {\n return state.dbTypes.map((dbType, index) => <option key={index} value={dbType}>{dbType}</option>)\n }\n\n const renderDatabaseHostsOptions = () => {\n return state.dbHosts.map((dbHost, index) => <option key={index} value={dbHost}>{dbHost}</option>)\n }\n\n const renderDatabaseCharsetOptions = () => {\n return state.dbCharsets.map((dbCharset, index) =>\n <option\n key={index}\n value={dbCharset}\n selected={dbCharset === 'utf8'}>\n {dbCharset}\n </option>\n );\n }\n\n const databaseUserInputHandler = value => {\n setState({ ...state, databaseUserInputValue: value });\n }\n\n const databaseInputHandler = value => {\n setState({ ...state, databaseInputValue: value });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let newDatabase = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n newDatabase[name] = value;\n }\n\n newDatabase['v_database'] = state.databaseInputValue;\n newDatabase['v_dbuser'] = state.databaseUserInputValue;\n\n if (Object.keys(newDatabase).length !== 0 && newDatabase.constructor === Object) {\n setState({ ...state, loading: true });\n addDatabase(newDatabase)\n .then(result => {\n if (result.status === 200) {\n const { error_msg: errorMessage, ok_msg: okMessage } = result.data;\n\n if (errorMessage) {\n setState({ ...state, errorMessage, okMessage: '', loading: false });\n } else {\n dispatch(refreshCounters()).then(() => {\n setState({ ...state, okMessage, errorMessage: '', loading: false });\n });\n }\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n return (\n <div className=\"edit-template add-db\">\n <Helmet>\n <title>{`Vesta - ${i18n.DB}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Adding database']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {state.errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n {state.errorMessage}</span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {state.okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n <span>{HtmlParser(state.okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> : (\n <form onSubmit={event => submitFormHandler(event)}>\n <input type=\"hidden\" name=\"ok\" value=\"add\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <span className=\"prefix\">{HtmlParser(state.prefixI18N)}</span>\n\n <div className=\"form-group database\">\n <label htmlFor=\"database\">{i18n.Database}</label>\n <div className=\"input-wrapper\">\n <input\n type=\"text\"\n className=\"form-control\"\n id=\"database\"\n onChange={event => databaseInputHandler(event.target.value)}\n value={state.databaseInputValue}\n name=\"v_database\" />\n <span className=\"italic\">{`${state.user}_${state.databaseInputValue}`}</span>\n </div>\n </div>\n\n <div className=\"form-group\">\n <div className=\"label-wrapper\">\n <label htmlFor=\"user\">{i18n.User}</label>\n <span className=\"italic\">({state.maxCharLength})</span>\n </div>\n <div className=\"input-wrapper\">\n <input\n type=\"text\"\n className=\"form-control\"\n id=\"user\"\n value={state.databaseUserInputValue}\n onChange={event => databaseUserInputHandler(event.target.value)}\n name=\"v_dbuser\" />\n <span className=\"italic\">{`${state.user}_${state.databaseUserInputValue}`}</span>\n </div>\n </div>\n\n <Password name={'v_password'} />\n\n <div class=\"form-group\">\n <label htmlFor=\"dbTypes\">{i18n.Type}</label>\n <select class=\"form-control\" id=\"dbTypes\" name=\"v_type\">\n {renderDatabaseTypesOptions()}\n </select>\n </div>\n\n <div class=\"form-group\">\n <label htmlFor=\"dbHosts\">{i18n.Host}</label>\n <select class=\"form-control\" id=\"dbHosts\" name=\"v_host\">\n {renderDatabaseHostsOptions()}\n </select>\n </div>\n\n <div class=\"form-group\">\n <label htmlFor=\"dbCharset\">{i18n.Charset}</label>\n <select class=\"form-control\" id=\"dbCharset\" name=\"v_charset\">\n {renderDatabaseCharsetOptions()}\n </select>\n </div>\n\n <div className=\"form-group\">\n <label htmlFor=\"sendLoginCredentialsToEmailAddress\">{i18n['Send login credentials to email address']}</label>\n <input\n type=\"email\"\n className=\"form-control\"\n id=\"sendLoginCredentialsToEmailAddress\"\n name=\"v_db_email\" />\n </div>\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Add}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/db/')}>{i18n.Back}</button>\n </div>\n </form>\n )}\n </AddItemLayout>\n </div>\n );\n});\n\nexport default AddDatabase;\n","import React, { useEffect, useState } from 'react';\n\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport SelectInput from '../../ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport TextInput from '../../ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { addFirewall } from '../../../ControlPanelService/Firewalls';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './AddFirewall.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nconst AddFirewall = props => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const dispatch = useDispatch();\n const history = useHistory();\n const [state, setState] = useState({\n loading: false,\n actions: [\n i18n['DROP'],\n i18n['ACCEPT']\n ],\n protocols: [\n i18n['TCP'],\n i18n['UDP'],\n i18n['ICMP']\n ],\n okMessage: '',\n errorMessage: ''\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/firewall/'));\n dispatch(removeFocusedElement());\n }, []);\n\n const submitFormHandler = event => {\n event.preventDefault();\n let newFirewall = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n newFirewall[name] = value;\n }\n\n if (Object.keys(newFirewall).length !== 0 && newFirewall.constructor === Object) {\n setState({ ...state, loading: true });\n addFirewall(newFirewall)\n .then(result => {\n if (result.status === 200) {\n const { error_msg: errorMessage, ok_msg: okMessage } = result.data;\n\n if (errorMessage) {\n setState({ ...state, errorMessage, okMessage, loading: false });\n } else {\n dispatch(refreshCounters()).then(() => {\n setState({ ...state, okMessage, errorMessage: '', loading: false });\n });\n }\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n return (\n <div className=\"edit-template add-firewall\">\n <Helmet>\n <title>{`Vesta - ${i18n.FIREWALL}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Adding Firewall Rule']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {state.errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n {state.errorMessage}</span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {state.okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n <span>{HtmlParser(state.okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n <form onSubmit={event => submitFormHandler(event)}>\n <input type=\"hidden\" name=\"ok\" value=\"add\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <SelectInput\n options={state.actions}\n name=\"v_action\"\n id=\"action\"\n title={i18n['Action']} />\n\n <SelectInput\n options={state.protocols}\n name=\"v_protocol\"\n id=\"protocol\"\n title={i18n['Protocol']} />\n\n <TextInput\n name=\"v_port\"\n id=\"port\"\n title={i18n['Port']}\n optionalTitle={i18n['ranges are acceptable']} />\n\n <TextInput\n name=\"v_ip\"\n id=\"ip\"\n title={i18n['IP address']}\n optionalTitle={i18n['CIDR format is supported']} />\n\n <TextInput\n name=\"v_comment\"\n id=\"comment\"\n title={i18n['Comment']}\n optionalTitle={i18n['optional']} />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Add}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/firewall/')}>{i18n.Back}</button>\n </div>\n </form>\n </AddItemLayout>\n </div>\n );\n}\n\nexport default AddFirewall;","import axios from \"axios\";\nimport { getAuthToken } from \"src/utils/token\";\n\nconst BASE_URL = window.location.origin;\nconst webApiUri = '/api/v1/list/cron/index.php';\nconst cronAddApiUri = '/api/v1/add/cron/index.php';\nconst jobInfoUri = '/api/v1/edit/cron/index.php';\nconst updateCronJobUri = '/api/v1/edit/cron/index.php';\n\nexport const getCronList = () => {\n return axios.get(BASE_URL + webApiUri);\n}\n\nexport const bulkAction = (action, domainNameSystems) => {\n const formData = new FormData();\n formData.append(\"action\", action);\n formData.append(\"token\", getAuthToken());\n\n domainNameSystems.forEach(domainNameSystem => {\n formData.append(\"job[]\", domainNameSystem);\n });\n\n return axios.post(BASE_URL + '/api/v1/bulk/cron/', formData);\n};\n\nexport const handleAction = uri => {\n return axios.get(BASE_URL + uri, {\n params: {\n token: getAuthToken()\n }\n });\n}\n\nexport const addCronJob = data => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + cronAddApiUri, formDataObject);\n}\n\nexport const getCronJobInfo = job => {\n return axios.get(BASE_URL + jobInfoUri, {\n params: {\n job,\n token: getAuthToken()\n }\n });\n}\n\nexport const updateCronJob = (data, job) => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + updateCronJobUri, formDataObject, {\n params: {\n job,\n token: getAuthToken()\n }\n });\n}","export const generatorOptions = i18n => {\n return {\n minutesRunCommandsOptions: [\n { name: i18n['every minute'] ?? 'every minute', value: '*' },\n { name: i18n['every two minutes'] ?? 'every two minutes', value: '*/2' },\n { name: `${i18n.every || 'every'} 5`, value: '*/5' },\n { name: `${i18n.every || 'every'} 10`, value: '*/10' },\n { name: `${i18n.every || 'every'} 15`, value: '*/15' },\n { name: `${i18n.every || 'every'} 30`, value: '*/30' }\n ],\n hoursRunCommandsOptions: [\n { name: i18n['every hour'] ?? 'every hour', value: '*' },\n { name: i18n['every two hours'] ?? 'every two hours', value: '*/2' },\n { name: `${i18n.every || 'every'} 6`, value: '*/6' },\n { name: `${i18n.every || 'every'} 12`, value: '*/12' }\n ],\n daysRunCommandsOptions: [\n { name: i18n['every day'] ?? 'every day', value: '*' },\n { name: i18n['every odd day'] ?? 'every odd day', value: '1-31/2' },\n { name: i18n['every even day'] ?? 'every even day', value: '*/2' },\n { name: `${i18n.every || 'every'} 3`, value: '*/3' },\n { name: `${i18n.every || 'every'} 5`, value: '*/5' },\n { name: `${i18n.every || 'every'} 10`, value: '*/10' },\n { name: `${i18n.every || 'every'} 15`, value: '*/15' }\n ],\n hoursOptions: [\n { name: '00', value: '0' },\n { name: '01', value: '1' },\n { name: '02', value: '2' },\n { name: '03', value: '3' },\n { name: '04', value: '4' },\n { name: '05', value: '5' },\n { name: '06', value: '6' },\n { name: '07', value: '7' },\n { name: '08', value: '8' },\n { name: '09', value: '9' },\n { name: '10', value: '10' },\n { name: '11', value: '11' },\n { name: '12', value: '12' },\n { name: '13', value: '13' },\n { name: '14', value: '14' },\n { name: '15', value: '15' },\n { name: '16', value: '16' },\n { name: '17', value: '17' },\n { name: '18', value: '18' },\n { name: '19', value: '19' },\n { name: '20', value: '20' },\n { name: '21', value: '21' },\n { name: '22', value: '22' },\n { name: '23', value: '23' }\n ],\n hourlyMinutesOptions: [\n { name: '00', value: '0' },\n { name: '15', value: '15' },\n { name: '30', value: '30' },\n { name: '45', value: '45' }\n ],\n dailyMinutesOptions: [\n { name: '00', value: '0' },\n { name: '01', value: '1' },\n { name: '02', value: '2' },\n { name: '05', value: '5' },\n { name: '10', value: '10' },\n { name: '15', value: '15' },\n { name: '20', value: '20' },\n { name: '25', value: '25' },\n { name: '30', value: '30' },\n { name: '35', value: '35' },\n { name: '40', value: '40' },\n { name: '45', value: '45' },\n { name: '50', value: '50' },\n { name: '55', value: '55' }\n ],\n weeklyRunCommandOptions: [\n { name: i18n['every day'] ?? 'every day', value: '*' },\n { name: i18n['weekdays (5 days)'] ?? 'weekdays (5 days)', value: '1,2,3,4,5' },\n { name: i18n['weekend (2 days)'] ?? 'weekend (2 days)', value: '0,6' },\n { name: i18n.Monday ?? 'Monday', value: '1' },\n { name: i18n.Tuesday ?? 'Tuesday', value: '2' },\n { name: i18n.Wednesday ?? 'Wednesday', value: '3' },\n { name: i18n.Thursday ?? 'Thursday', value: '4' },\n { name: i18n.Friday ?? 'Friday', value: '5' },\n { name: i18n.Saturday ?? 'Saturday', value: '6' },\n { name: i18n.Sunday ?? 'Sunday', value: '0' }\n ],\n monthlyRunCommandOptions: [\n { name: i18n['every month'] ?? 'every month', value: '*' },\n { name: i18n['every odd month'] ?? 'every odd month', value: '1-11/2' },\n { name: i18n['every even month'] ?? 'every even month', value: '*/2' },\n { name: `${i18n.every || 'every'} 3`, value: '*/3' },\n { name: `${i18n.every || 'every'} 6`, value: '*/6' },\n { name: i18n.Jan ?? 'Jan', value: '1' },\n { name: i18n.Feb ?? 'Feb', value: '2' },\n { name: i18n.Mar ?? 'Mar', value: '3' },\n { name: i18n.Apr ?? 'Apr', value: '4' },\n { name: i18n.May ?? 'May', value: '5' },\n { name: i18n.Jun ?? 'Jun', value: '6' },\n { name: i18n.Jul ?? 'Jul', value: '7' },\n { name: i18n.Aug ?? 'Aug', value: '8' },\n { name: i18n.Sep ?? 'Sep', value: '9' },\n { name: i18n.Oct ?? 'Oct', value: '10' },\n { name: i18n.Nov ?? 'Nov', value: '11' },\n { name: i18n.Dec ?? 'Dec', value: '12' }\n ],\n dateOptions: [\n { name: '1', value: '1' },\n { name: '2', value: '2' },\n { name: '3', value: '3' },\n { name: '4', value: '4' },\n { name: '5', value: '5' },\n { name: '6', value: '6' },\n { name: '7', value: '7' },\n { name: '8', value: '8' },\n { name: '9', value: '9' },\n { name: '10', value: '10' },\n { name: '11', value: '11' },\n { name: '12', value: '12' },\n { name: '13', value: '13' },\n { name: '14', value: '14' },\n { name: '15', value: '15' },\n { name: '16', value: '16' },\n { name: '17', value: '17' },\n { name: '18', value: '18' },\n { name: '19', value: '19' },\n { name: '20', value: '20' },\n { name: '21', value: '21' },\n { name: '22', value: '22' },\n { name: '23', value: '23' },\n { name: '24', value: '24' },\n { name: '25', value: '25' },\n { name: '26', value: '26' },\n { name: '27', value: '27' },\n { name: '28', value: '28' },\n { name: '29', value: '29' },\n { name: '30', value: '30' },\n { name: '31', value: '31' }\n ]\n }\n}\n","import React, { useEffect, useState } from 'react';\nimport { useSelector } from 'react-redux';\nimport { generatorOptions } from '../../../../ControlPanelService/GeneratorOptions';\n\nconst RunCommandSelect = props => {\n const { i18n } = useSelector(state => state.session);\n\n const [state, setState] = useState({\n activeTab: ''\n });\n\n useEffect(() => {\n setState({ ...state, activeTab: props.activeTab });\n }, [props]);\n\n const renderOptions = () => {\n const { daysRunCommandsOptions, hoursRunCommandsOptions, minutesRunCommandsOptions, monthlyRunCommandOptions, weeklyRunCommandOptions } = generatorOptions(i18n);\n\n switch (state.activeTab) {\n case '1': return minutesRunCommandsOptions.map(option => <option value={option.value}>{option.name}</option>);\n case '2': return hoursRunCommandsOptions.map(option => <option value={option.value}>{option.name}</option>);\n case '3': return daysRunCommandsOptions.map(option => <option value={option.value}>{option.name}</option>);\n case '4': return weeklyRunCommandOptions.map(option => <option value={option.value}>{option.name}</option>);\n case '5': return monthlyRunCommandOptions.map(option => <option value={option.value}>{option.name}</option>);\n default: break;\n }\n }\n\n const selectName = () => {\n switch (state.activeTab) {\n case '1': return 'h_min';\n case '2': return 'h_hour';\n case '3': return 'h_day';\n case '4': return 'h_wday';\n case '5': return 'h_month';\n default: break;\n }\n }\n\n return (\n <div class=\"form-group run-command\">\n <label htmlFor=\"run-command\">{i18n['Run Command']}:</label>\n <select className=\"form-control\" name={selectName()}>\n {renderOptions()}\n </select>\n </div >\n );\n}\n\nexport default RunCommandSelect;","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport { generatorOptions } from '../../../../ControlPanelService/GeneratorOptions';\n\nexport default function SecondTabSelects() {\n const { i18n } = useSelector(state => state.session);\n const { hourlyMinutesOptions } = generatorOptions(i18n);\n\n const renderOptions = () => {\n return hourlyMinutesOptions.map((option, index) => <option key={index} value={option.value}>{option.name}</option>);\n }\n\n return (\n <div className='second-tab-selects'>\n <input type=\"hidden\" name=\"h_day\" value=\"*\" />\n <input type=\"hidden\" name=\"h_month\" value=\"*\" />\n <input type=\"hidden\" name=\"h_wday\" value=\"*\" />\n\n <div className=\"form-group minute\">\n <label htmlFor=\"run-command\">{i18n.Minute ?? 'Minute'}:</label>\n <select className=\"form-control\" name=\"h_min\">\n {renderOptions()}\n </select>\n </div>\n </div>\n );\n}","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport { generatorOptions } from '../../../../ControlPanelService/GeneratorOptions';\n\nexport default function ThirdTabSelects() {\n const { i18n } = useSelector(state => state.session);\n const { dailyMinutesOptions, hoursOptions } = generatorOptions(i18n);\n\n const renderHours = () => {\n return hoursOptions.map((option, index) => <option key={index} value={option.value}>{option.name}</option>);\n }\n\n const renderOptions = () => {\n return dailyMinutesOptions.map((option, index) => <option key={index} value={option.value}>{option.name}</option>);\n }\n\n return (\n <div className='third-tab-selects'>\n <input type=\"hidden\" name=\"h_month\" value=\"*\" />\n <input type=\"hidden\" name=\"h_wday\" value=\"*\" />\n\n <div className=\"form-group hour\">\n <label htmlFor=\"run-command\">{i18n.Hour ?? 'Hour'}:</label>\n <select className=\"form-control\" name=\"h_hour\">\n {renderHours()}\n </select>\n </div>\n\n <div className=\"form-group minute\">\n <label htmlFor=\"run-command\">{i18n.Minute ?? 'Minute'}:</label>\n <select className=\"form-control\" name=\"h_min\">\n {renderOptions()}\n </select>\n </div>\n </div>\n );\n}","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport { generatorOptions } from '../../../../ControlPanelService/GeneratorOptions';\n\nexport default function FourthTabSelects() {\n const { i18n } = useSelector(state => state.session);\n const { dailyMinutesOptions, hoursOptions } = generatorOptions(i18n);\n\n const renderHours = () => {\n return hoursOptions.map((option, index) => <option key={index} value={option.value}>{option.name}</option>);\n }\n\n const renderMinutes = () => {\n return dailyMinutesOptions.map((option, index) => <option key={index} value={option.value}>{option.name}</option>);\n }\n\n return (\n <div className='fourth-tab-selects'>\n <input type=\"hidden\" name=\"h_month\" value=\"*\" />\n <input type=\"hidden\" name=\"h_day\" value=\"*\" />\n\n <div className=\"form-group hour\">\n <label htmlFor=\"run-command\">{i18n.Hour ?? 'Hour'}:</label>\n <select className=\"form-control\" name=\"h_hour\">\n {renderHours()}\n </select>\n </div>\n\n <div className=\"form-group minute\">\n <label htmlFor=\"run-command\">{i18n.Minute ?? 'Minute'}:</label>\n <select className=\"form-control\" name=\"h_min\">\n {renderMinutes()}\n </select>\n </div>\n </div>\n );\n}","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport { generatorOptions } from '../../../../ControlPanelService/GeneratorOptions';\n\nexport default function FifthTabSelects() {\n const { i18n } = useSelector(state => state.session);\n const { dailyMinutesOptions, hoursOptions, dateOptions } = generatorOptions(i18n);\n\n const renderDate = () => {\n return dateOptions.map((option, index) => <option key={index} value={option.value}>{option.name}</option>);\n }\n\n const renderHours = () => {\n return hoursOptions.map((option, index) => <option key={index} value={option.value}>{option.name}</option>);\n }\n\n const renderMinutes = () => {\n return dailyMinutesOptions.map((option, index) => <option key={index} value={option.value}>{option.name}</option>);\n }\n\n return (\n <div className='fifth-tab-selects'>\n <input type=\"hidden\" name=\"h_wday\" value=\"*\" />\n\n <div className=\"form-group date\">\n <label htmlFor=\"run-command\">{i18n.Date ?? 'Date'}:</label>\n <select className=\"form-control\" name=\"h_day\">\n {renderDate()}\n </select>\n </div>\n\n <div className=\"form-group hour\">\n <label htmlFor=\"run-command\">{i18n.Hour ?? 'Hour'}:</label>\n <select className=\"form-control\" name=\"h_hour\">\n {renderHours()}\n </select>\n </div>\n\n <div className=\"form-group minute\">\n <label htmlFor=\"run-command\">{i18n.Minute ?? 'Minute'}:</label>\n <select className=\"form-control\" name=\"h_min\">\n {renderMinutes()}\n </select>\n </div>\n </div>\n );\n}","import React, { useEffect, useState } from 'react';\n\nimport SecondTabSelects from './SecondTabSelects';\nimport ThirdTabSelects from './ThirdTabSelects';\nimport FourthTabSelects from './FourthTabSelects';\nimport FifthTabSelects from './FifthTabSelects';\n\nimport './SelectsWrapper.scss';\n\nconst OtherSelects = props => {\n const [state, setState] = useState({\n activeTab: ''\n });\n\n useEffect(() => {\n setState({ ...state, activeTab: props.activeTab });\n }, [props.activeTab]);\n\n const renderSelects = () => {\n switch (state.activeTab) {\n case '1': return (\n <div>\n <input type=\"hidden\" name=\"h_hour\" value=\"*\" />\n <input type=\"hidden\" name=\"h_day\" value=\"*\" />\n <input type=\"hidden\" name=\"h_month\" value=\"*\" />\n <input type=\"hidden\" name=\"h_wday\" value=\"*\" />\n </div>\n )\n case '2': return <SecondTabSelects />;\n case '3': return <ThirdTabSelects />;\n case '4': return <FourthTabSelects />;\n case '5': return <FifthTabSelects />;\n default: break;\n }\n }\n\n return (\n <div className={`tab-${state.activeTab}`}>\n {renderSelects()}\n </div>\n );\n}\n\nexport default OtherSelects;\n","import React, { useEffect, useRef, useState } from 'react';\n\nimport RunCommandSelect from './RunCommandSelect/RunCommandSelect';\nimport SelectsWrapper from './OtherSelects/SelectsWrapper';\nimport { Link, useHistory } from 'react-router-dom';\nimport QS from 'qs';\n\nimport './Generator.scss';\nimport { useSelector } from 'react-redux';\n\nconst Generator = props => {\n const formElement = useRef(null);\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const [state, setState] = useState({\n activeTab: '1'\n });\n\n useEffect(() => {\n let parsedQuery = QS.parse(history.location.search, { ignoreQueryPrefix: true });\n let activeTab = parsedQuery.activeTab || '1';\n\n setState({ ...state, activeTab });\n }, [history.location.search]);\n\n const activeClassName = tab => {\n return state.activeTab === tab ? 'active' : '';\n }\n\n const emulateFormSubmit = () => {\n let generatedCronJob = {};\n\n for (let i = 0; i <= 4; i++) {\n let iterableFormElement = formElement.current[i];\n\n generatedCronJob[iterableFormElement.name] = iterableFormElement.value;\n }\n\n props.generatedCronJob(generatedCronJob);\n }\n\n const formatLink = tab => {\n const { job, mode } = props;\n\n return `/${mode}/cron/?${!!job ? `job=${job}&` : ''}activeTab=${tab}`;\n }\n\n return (\n <div className=\"cron-job-generator\">\n <div className=\"header\">\n <Link to={formatLink('1')} className={activeClassName('1')}>{i18n.Minutes}</Link>\n <Link to={formatLink('2')} className={activeClassName('2')}>{i18n.Hourly}</Link>\n <Link to={formatLink('3')} className={activeClassName('3')}>{i18n.Daily}</Link>\n <Link to={formatLink('4')} className={activeClassName('4')}>{i18n.Weekly}</Link>\n <Link to={formatLink('5')} className={activeClassName('5')}>{i18n.Monthly}</Link>\n </div>\n\n <div className=\"body\">\n\n <form ref={formElement}>\n <RunCommandSelect activeTab={state.activeTab} />\n\n <SelectsWrapper activeTab={state.activeTab} />\n\n <div className=\"form-actions\">\n <button type=\"button\" onClick={emulateFormSubmit}>{i18n.Generate}</button>\n </div>\n </form>\n\n </div>\n </div>\n );\n}\n\nexport default Generator;","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport TextInput from '../../ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport { getCronJobInfo, updateCronJob } from '../../../ControlPanelService/Cron';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from '../../../components/Spinner/Spinner';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport Generator from '../Generator/Generator';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\nimport QS from 'qs';\n\nimport './EditCronJob.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nconst EditMail = props => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n loading: false,\n generatedCronJob: {\n h_min: '*',\n h_hour: '*',\n h_day: '*',\n h_wday: '*',\n h_month: '*'\n }\n });\n\n useEffect(() => {\n let queryParams = QS.parse(history.location.search, { ignoreQueryPrefix: true });\n const { job } = queryParams;\n\n dispatch(addActiveElement('/list/cron/'));\n dispatch(removeFocusedElement());\n\n if (job) {\n setState({ ...state, loading: true });\n fetchData(job)\n }\n }, []);\n\n const fetchData = job => {\n getCronJobInfo(job)\n .then(response => {\n setState({\n ...state,\n generatedCronJob: {\n ...state.generatedCronJob,\n h_min: response.data.min,\n h_hour: response.data.hour,\n h_day: response.data.day,\n h_wday: response.data.wday,\n h_month: response.data.month\n },\n data: response.data,\n loading: false\n });\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err);\n });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedJob = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedJob[name] = value;\n }\n\n if (Object.keys(updatedJob).length !== 0 && updatedJob.constructor === Object) {\n setState({ ...state, loading: true });\n\n updateCronJob(updatedJob, state.data.job)\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n if (error_msg) {\n setOkMessage('');\n setErrorMessage(error_msg);\n } else {\n dispatch(refreshCounters()).then(() => {\n setOkMessage(ok_msg);\n setErrorMessage('');\n });\n }\n }\n })\n .then(() => fetchData(state.data.job))\n .catch(err => console.error(err));\n }\n }\n\n const saveGeneratedCronJob = generatedCronJob => {\n setState({\n ...state,\n generatedCronJob\n });\n }\n\n const changeInput = input => {\n let updatedGeneratedCronJob = {\n ...state.generatedCronJob,\n [input.id]: input.value\n };\n\n setState({\n ...state,\n generatedCronJob: updatedGeneratedCronJob\n });\n }\n\n return (\n <div className=\"edit-template edit-cron\">\n <Helmet>\n <title>{`Vesta - ${i18n.CRON}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Editing Cron Job']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}\n </span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout date={state.data.date} time={state.data.time} status={state.data.status}>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"edit-cron\">\n <input type=\"hidden\" name=\"save\" value=\"save\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <TextInput id=\"command\" name=\"v_cmd\" title={i18n['Command']} value={state.data.cmd} />\n\n <div className=\"cron-form-body\">\n\n <div className=\"body-col-1\">\n <TextInput\n value={state.generatedCronJob.h_min}\n onChange={changeInput}\n title={i18n['Minute']}\n name=\"v_min\"\n id=\"h_min\" />\n\n <TextInput\n value={state.generatedCronJob.h_hour}\n onChange={changeInput}\n title={i18n['Hour']}\n name=\"v_hour\"\n id=\"h_hour\" />\n\n <TextInput\n value={state.generatedCronJob.h_day}\n onChange={changeInput}\n title={i18n['Day']}\n name=\"v_day\"\n id=\"h_day\" />\n\n <TextInput\n value={state.generatedCronJob.h_month}\n onChange={changeInput}\n title={i18n['Month']}\n name=\"v_month\"\n id=\"h_month\" />\n\n <TextInput\n value={state.generatedCronJob.h_wday}\n title={i18n['Day of week']}\n onChange={changeInput}\n name=\"v_wday\"\n id=\"h_wday\" />\n </div>\n\n <div className=\"body-col-2\">\n <Generator mode=\"edit\" job={state.data.job} generatedCronJob={saveGeneratedCronJob} />\n </div>\n\n </div>\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/cron/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div>\n );\n}\n\nexport default EditMail;","import React, { useEffect, useState } from 'react';\n\nconst TextInputWithExtraButton = props => {\n const [state, setState] = useState({\n value: '',\n previousValue: ''\n });\n\n useEffect(() => {\n setState({ ...state, value: props.value });\n }, [props.value]);\n\n useEffect(() => {\n setState({ ...state, value: props.value, previousValue: props.value });\n }, []);\n\n const changeValue = event => {\n let inputValue = event.target.value;\n\n setState({ ...state, value: inputValue, previousValue: inputValue });\n }\n\n return (\n <div class=\"form-group\">\n <label className=\"label-wrapper\" htmlFor={props.id}>\n {props.title}\n <span className=\"lowercase\">{props.optionalTitle ? `(${props.optionalTitle})` : ''}</span>\n </label>\n <div className=\"input-wrapper\">\n <input\n type=\"text\"\n name={props.name}\n id={props.id}\n className=\"form-control\"\n onChange={changeValue}\n value={state.value}\n readOnly={state.value === 'unlimited'} />\n {props.children}\n </div>\n </div>\n );\n}\n\nexport default TextInputWithExtraButton;","import React, { useEffect, useState } from 'react';\nimport { useSelector } from 'react-redux';\n\nconst NameServers = props => {\n const { i18n } = useSelector(state => state.session);\n const [state, setState] = useState({\n nameServersAmount: [],\n usersNS: []\n });\n\n useEffect(() => {\n if (props.usersNS) {\n let initNameServersAmount = props.usersNS.map((userNS, index) => index + 1);\n setState({ ...state, usersNS: props.usersNS, nameServersAmount: initNameServersAmount });\n }\n }, [props.usersNS]);\n\n const renderNameServerInputs = () => {\n return state.nameServersAmount.map((nameServer, index) => {\n if (nameServer < 9) {\n return (\n <div className=\"name-server-input-wrapper\" key={index}>\n <input\n type=\"text\"\n className=\"form-control\"\n id={`v_ns${index + 1}`}\n defaultValue={state.usersNS[index] || ''}\n name={`v_ns${index + 1}`} />\n <button\n type=\"button\"\n className={index < 2 ? 'hide' : 'show delete'}\n onClick={() => onDeleteNameServer(index)}>\n {i18n.delete ?? 'Delete'}\n </button>\n </div>\n );\n }\n });\n }\n\n const addNameServerClassName = () => {\n return state.nameServersAmount.length === 8 ? 'hide' : 'show optional';\n }\n\n const addNameServer = () => {\n let nameServersLength = state.nameServersAmount.length;\n let nameServersDuplicate = [...state.nameServersAmount];\n\n nameServersDuplicate.push(nameServersLength + 1);\n\n setState({ ...state, nameServersAmount: nameServersDuplicate });\n }\n\n const onDeleteNameServer = index => {\n let nameServersDuplicate = [...state.nameServersAmount];\n\n nameServersDuplicate.splice(index - 1, 1);\n\n setState({ ...state, nameServersAmount: nameServersDuplicate });\n }\n\n return (\n <>\n <div className=\"form-group name-servers\">\n <label htmlFor=\"v_ns1\">{i18n['Name servers'] ?? 'Name servers'}</label>\n {renderNameServerInputs()}\n </div>\n\n <button\n type=\"button\"\n className={addNameServerClassName()}\n onClick={() => addNameServer()}>\n {i18n['Add one more Name Server'] ?? 'Add one more Name Server'}\n </button>\n </>\n );\n}\n\nexport default NameServers;","import axios from \"axios\";\nimport { getAuthToken } from \"src/utils/token\";\n\nconst BASE_URL = window.location.origin;\nconst webApiUri = '/api/v1/list/package/index.php';\nconst additionalPackageInfoUri = '/api/v1/add/package/index.php';\nconst addPackageUri = '/api/v1/add/package/index.php';\nconst packageInfoUri = '/api/v1/edit/package/index.php';\nconst updatePackageUri = '/api/v1/edit/package/index.php';\n\nexport const getPackageList = () => {\n return axios.get(BASE_URL + webApiUri);\n}\n\nexport const bulkAction = (action, backups) => {\n const formData = new FormData();\n formData.append(\"action\", action);\n formData.append(\"token\", getAuthToken());\n\n backups.forEach(backup => {\n formData.append(\"package[]\", backup);\n });\n\n return axios.post(BASE_URL + '/api/v1/bulk/package/', formData);\n};\n\nexport const handleAction = uri => {\n return axios.get(BASE_URL + uri, {\n params: {\n token: getAuthToken()\n }\n });\n}\n\nexport const addPackage = data => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + addPackageUri, formDataObject);\n}\n\nexport const getAdditionalPackageInfo = () => {\n return axios.get(BASE_URL + additionalPackageInfoUri);\n}\n\nexport const getPackageInfo = item => {\n return axios.get(BASE_URL + packageInfoUri, {\n params: {\n package: item,\n token: getAuthToken()\n }\n });\n}\n\nexport const updatePackage = (data, item) => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + updatePackageUri, formDataObject, {\n params: {\n package: item\n }\n });\n}\n","import React, { useEffect, useState } from 'react';\n\nimport TextInputWithExtraButton from '../../ControlPanel/AddItemLayout/Form/TextInputWithExtraButton/TextInputWithExtraButton';\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport SelectInput from '../../ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport NameServers from '../../ControlPanel/AddItemLayout/Form/NameServers/NameServers';\nimport { getPackageInfo, updatePackage } from '../../../ControlPanelService/Package';\nimport TextInput from '../../ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from '../../../components/Spinner/Spinner';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\nimport QS from 'qs';\n\nimport './EditPackage.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nconst EditPackage = props => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n loading: false\n });\n\n useEffect(() => {\n let queryParams = QS.parse(history.location.search, { ignoreQueryPrefix: true });\n\n dispatch(addActiveElement('/list/package/'));\n dispatch(removeFocusedElement());\n\n if (queryParams.package) {\n setState({ ...state, loading: true });\n fetchData(queryParams.package);\n }\n }, []);\n\n const fetchData = pkg => {\n getPackageInfo(pkg)\n .then(response => {\n setState({\n ...state,\n data: response.data,\n loading: false\n });\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err);\n });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedPackage = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedPackage[name] = value;\n }\n\n updatedPackage['token'] = token;\n updatedPackage['save'] = 'save';\n updatedPackage['v_package'] = state.data.package;\n\n if (Object.keys(updatedPackage).length !== 0 && updatedPackage.constructor === Object) {\n setState({ ...state, loading: true });\n\n updatePackage(updatedPackage, state.data.package)\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n if (error_msg) {\n setErrorMessage(error_msg);\n setOkMessage('');\n } else {\n dispatch(refreshCounters()).then(() => {\n setErrorMessage('');\n setOkMessage(ok_msg);\n });\n }\n }\n })\n .then(() => fetchData(state.data.package))\n .catch(err => console.error(err));\n }\n }\n\n const toggleUnlimited = inputName => {\n let inputNameToUpdate = state.data[inputName];\n let defaultValue;\n\n if (inputName === 'quota' || inputName === 'bandwidth') {\n defaultValue = '1000';\n } else {\n defaultValue = '1';\n }\n\n setState({\n ...state,\n data: {\n ...state.data,\n [inputName]: inputNameToUpdate !== 'unlimited' ? 'unlimited' : defaultValue\n }\n });\n }\n\n return (\n <div className=\"edit-template edit-package\">\n <Helmet>\n <title>{`Vesta - ${i18n.PACKAGE}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Editing Package']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}\n </span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout date={state.data.date} time={state.data.time} status={state.data.status}>\n {state.loading ? <Spinner /> :\n <form onSubmit={submitFormHandler} id=\"edit-package\">\n <TextInput\n id=\"domain\"\n name=\"v_domain\"\n title={i18n['Package Name']}\n value={state.data.package}\n disabled />\n\n <SelectInput\n optionalTitle={state.data.web_system}\n options={state.data.web_templates}\n selected={state.data.web_template}\n title={i18n['Web Template']}\n name=\"v_web_template\"\n id=\"web-templates\" />\n\n {\n state.data.web_backend && (\n <SelectInput\n optionalTitle={state.data.web_backend}\n options={state.data.backend_templates}\n selected={state.data.backend_template}\n title={i18n['Backend Template']}\n name=\"v_backend_template\"\n id=\"backend-templates\" />\n )\n }\n\n {\n state.data.proxy_system && (\n <SelectInput\n optionalTitle={state.data.proxy_system}\n options={state.data.proxy_templates}\n selected={state.data.proxy_template}\n title={i18n['Proxy Template']}\n name=\"v_proxy_template\"\n id=\"proxy-templates\" />\n )\n }\n\n {\n state.data.dns_system && (\n <SelectInput\n optionalTitle={state.data.dns_system}\n options={state.data.dns_templates}\n selected={state.data.dns_template}\n title={i18n['DNS Template']}\n name=\"v_dns_template\"\n id=\"dns-templates\" />\n )\n }\n\n <SelectInput\n options={state.data.shells}\n selected={state.data.shell}\n title={i18n['SSH Access']}\n name=\"v_shell\"\n id=\"ssh-access\" />\n\n <TextInputWithExtraButton\n title={i18n['Web Domains']}\n id=\"webDomains\"\n name=\"v_web_domains\"\n value={state.data.web_domains}>\n <button type=\"button\" onClick={() => toggleUnlimited('web_domains')}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextInputWithExtraButton\n title={i18n['Web Aliases']}\n optionalTitle={i18n['per domain']}\n id=\"webAliases\"\n name=\"v_web_aliases\"\n value={state.data.web_aliases}>\n <button type=\"button\" onClick={() => toggleUnlimited('web_aliases')}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextInputWithExtraButton\n title={i18n['DNS Domains']}\n id=\"dnsDomains\"\n name=\"v_dns_domains\"\n value={state.data.dns_domains}>\n <button type=\"button\" onClick={() => toggleUnlimited('dns_domains')}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextInputWithExtraButton\n title={i18n['DNS records']}\n optionalTitle={i18n['per domain']}\n id=\"dnsRecords\"\n name=\"v_dns_records\"\n value={state.data.dns_records}>\n <button type=\"button\" onClick={() => toggleUnlimited('dns_records')}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextInputWithExtraButton\n title={i18n['Mail Domains']}\n id=\"mailDomains\"\n name=\"v_mail_domains\"\n value={state.data.mail_domains}>\n <button type=\"button\" onClick={() => toggleUnlimited('mail_domains')}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextInputWithExtraButton\n title={i18n['Mail Accounts']}\n optionalTitle={i18n['per domain']}\n id=\"mailAccounts\"\n name=\"v_mail_accounts\"\n value={state.data.mail_accounts}>\n <button type=\"button\" onClick={() => toggleUnlimited('mail_accounts')}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextInputWithExtraButton\n title={i18n['Databases']}\n id=\"databases\"\n name=\"v_databases\"\n value={state.data.databases}>\n <button type=\"button\" onClick={() => toggleUnlimited('databases')}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextInputWithExtraButton\n title={i18n['Cron Jobs']}\n id=\"cronJobs\"\n name=\"v_cron_jobs\"\n value={state.data.cron_jobs}>\n <button type=\"button\" onClick={() => toggleUnlimited('cron_jobs')}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextInput name=\"v_backups\" id=\"backups\" value={state.data.backups} title={i18n['Backups']} />\n\n <TextInputWithExtraButton\n title={i18n['Quota']}\n optionalTitle={i18n['in megabytes']}\n id=\"quota\"\n name=\"v_disk_quota\"\n value={state.data.disk_quota}>\n <button type=\"button\" onClick={() => toggleUnlimited('disk_quota')}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextInputWithExtraButton\n title={i18n['Bandwidth']}\n optionalTitle={i18n['in megabytes']}\n id=\"bandwidth\"\n name=\"v_bandwidth\"\n value={state.data.bandwidth}>\n <button type=\"button\" onClick={() => toggleUnlimited('bandwidth')}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <NameServers usersNS={state.data.nameservers} />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/package/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div>\n );\n}\n\nexport default EditPackage;","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"../../../../actions/MainNavigation/mainNavigationActions\";\nimport Checkbox from '../../../ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport TextArea from '../../../ControlPanel/AddItemLayout/Form/TextArea/TextArea';\nimport AddItemLayout from '../../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { getServiceInfo, updateService } from 'src/ControlPanelService/Server';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from '../../../../components/Spinner/Spinner';\nimport Toolbar from '../../../MainNav/Toolbar/Toolbar';\nimport { Link, useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './EditHttpd.scss';\nimport { Helmet } from 'react-helmet';\nimport HtmlParser from 'react-html-parser';\n\nconst EditHttpd = props => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n loading: false,\n errorMessage: '',\n okMessage: ''\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/server/'));\n dispatch(removeFocusedElement());\n\n setState({ ...state, loading: true });\n fetchData();\n }, []);\n\n const fetchData = () => {\n getServiceInfo('httpd')\n .then(response => {\n setState({\n ...state,\n data: response.data,\n loading: false\n });\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err);\n });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedService = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedService[name] = value;\n }\n\n if (Object.keys(updatedService).length !== 0 && updatedService.constructor === Object) {\n setState({ ...state, loading: true });\n\n updateService(updatedService, '/httpd')\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n if (error_msg) {\n setErrorMessage(error_msg);\n setOkMessage('');\n } else {\n setErrorMessage('');\n setOkMessage(ok_msg);\n }\n }\n })\n .then(() => fetchData())\n .catch(err => console.error(err));\n }\n }\n\n return (\n <div className=\"edit-template edit-httpd\">\n <Helmet>\n <title>{`Vesta - ${i18n.SERVER}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\"><Link to={`/edit/server/${state.data.service_name}`}>{i18n['Configuring Server']} / {state.data.service_name}</Link></div>\n <div className=\"link\"><Link to=\"/edit/server/php\">{i18n['Configure']} php.ini</Link></div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}\n </span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"edit-httpd\">\n <input type=\"hidden\" name=\"save\" value=\"save\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <TextArea\n defaultValue={state.data.config}\n title={state.data.config_path}\n name=\"v_config\"\n id=\"v_config\"\n rows=\"25\" />\n\n <br />\n\n <Checkbox\n title={i18n['restart']}\n defaultChecked={true}\n name=\"v_restart\"\n id=\"restart\" />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/server/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div>\n );\n}\n\nexport default EditHttpd;","import React, { useEffect, useState } from 'react';\n\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { addCronJob } from '../../../ControlPanelService/Cron';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport Generator from '../Generator/Generator';\nimport { useHistory } from 'react-router-dom';\nimport Spinner from '../../Spinner/Spinner';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './AddCronJob.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nconst AddCronJob = props => {\n const { i18n } = useSelector(state => state.session);\n const token = localStorage.getItem(\"token\");\n const history = useHistory();\n const dispatch = useDispatch();\n const [state, setState] = useState({\n loading: false,\n okMessage: '',\n errorMessage: '',\n generatedCronJob: {\n h_min: '*',\n h_hour: '*',\n h_day: '*',\n h_wday: '*',\n h_month: '*'\n }\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/cron/'));\n dispatch(removeFocusedElement());\n }, []);\n\n const submitFormHandler = event => {\n event.preventDefault();\n let newCronJob = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n newCronJob[name] = value;\n }\n\n if (Object.keys(newCronJob).length !== 0 && newCronJob.constructor === Object) {\n setState({ ...state, loading: true });\n addCronJob(newCronJob)\n .then(result => {\n if (result.status === 200) {\n const { error_msg: errorMessage, ok_msg: okMessage } = result.data;\n\n if (errorMessage) {\n setState({ ...state, errorMessage, okMessage, loading: false });\n } else {\n dispatch(refreshCounters()).then(() => {\n setState({ ...state, okMessage, errorMessage: '', loading: false });\n });\n }\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const saveGeneratedCronJob = generatedCronJob => {\n setState({\n ...state,\n generatedCronJob\n });\n }\n\n const changeInput = input => {\n let updatedGeneratedCronJob = {\n ...state.generatedCronJob,\n [input.id]: input.value\n };\n\n setState({\n ...state,\n generatedCronJob: updatedGeneratedCronJob\n });\n }\n\n return (\n <div className=\"edit-template add-cron\">\n <Helmet>\n <title>{`Vesta - ${i18n.CRON}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Adding Cron Job']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {state.errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n {state.errorMessage}</span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {state.okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n <span>{HtmlParser(state.okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> : (\n <form onSubmit={event => submitFormHandler(event)}>\n <input type=\"hidden\" name=\"ok\" value=\"add\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <div className=\"form-group command\">\n <label htmlFor=\"command\">{i18n.Command ?? 'Command'}</label>\n <input\n type=\"text\"\n className=\"form-control\"\n id=\"command\"\n name=\"v_cmd\" />\n </div>\n\n <div className=\"cron-form-body\">\n\n <div className=\"body-col-1\">\n <div className=\"form-group\">\n <label htmlFor=\"h_min\">{i18n.Minute ?? 'Minute'}</label>\n <input\n type=\"text\"\n className=\"form-control\"\n id=\"h_min\"\n onChange={event => changeInput(event.target)}\n value={state.generatedCronJob.h_min}\n name=\"v_min\" />\n </div>\n\n <div className=\"form-group\">\n <label htmlFor=\"h_hour\">{i18n.Hour ?? 'Hour'}</label>\n <input\n type=\"text\"\n className=\"form-control\"\n id=\"h_hour\"\n onChange={event => changeInput(event.target)}\n value={state.generatedCronJob.h_hour}\n name=\"v_hour\" />\n </div>\n\n <div className=\"form-group\">\n <label htmlFor=\"h_day\">{i18n.Day ?? 'Day'}</label>\n <input\n type=\"text\"\n className=\"form-control\"\n id=\"h_day\"\n onChange={event => changeInput(event.target)}\n value={state.generatedCronJob.h_day}\n name=\"v_day\" />\n </div>\n\n <div className=\"form-group\">\n <label htmlFor=\"h_month\">{i18n.Month ?? 'Month'}</label>\n <input\n type=\"text\"\n className=\"form-control\"\n id=\"h_month\"\n onChange={event => changeInput(event.target)}\n value={state.generatedCronJob.h_month}\n name=\"v_month\" />\n </div>\n\n <div className=\"form-group\">\n <label htmlFor=\"h_wday\">{i18n['Day of week'] ?? 'Days of week'}</label>\n <input\n type=\"text\"\n className=\"form-control\"\n id=\"h_wday\"\n onChange={event => changeInput(event.target)}\n value={state.generatedCronJob.h_wday}\n name=\"v_wday\" />\n </div>\n </div>\n\n <div className=\"body-col-2\">\n <Generator mode=\"add\" generatedCronJob={saveGeneratedCronJob} />\n </div>\n\n </div>\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Add ?? 'Add'}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/cron/')}>{i18n.Back ?? 'Back'}</button>\n </div>\n </form>\n )}\n </AddItemLayout>\n </div>\n );\n}\n\nexport default AddCronJob;","import React, { useEffect, useState } from 'react';\n\nimport TextInputWithExtraButton from '../../ControlPanel/AddItemLayout/Form/TextInputWithExtraButton/TextInputWithExtraButton';\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport { getAdditionalPackageInfo, addPackage } from '../../../ControlPanelService/Package';\nimport NameServers from '../../ControlPanel/AddItemLayout/Form/NameServers/NameServers';\nimport SelectInput from '../../ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport TextInput from '../../ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport Spinner from '../../Spinner/Spinner';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './AddPackage.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nconst AddPackage = props => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const dispatch = useDispatch();\n const history = useHistory();\n const [state, setState] = useState({\n loading: false,\n okMessage: '',\n errorMessage: '',\n webTemplates: [],\n webSystem: '',\n backendTemplates: [],\n backendSystem: '',\n proxySystem: '',\n proxyTemplates: [],\n dnsTemplates: [],\n dnsSystem: '',\n sshTemplates: [],\n usersNS: [],\n webDomains: '1',\n webAliases: '1',\n dnsDomains: '1',\n dnsRecords: '1',\n mailDomains: '1',\n mailAccounts: '1',\n databases: '1',\n cronJobs: '1',\n quota: '1000',\n bandwidth: '1000',\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/package/'));\n dispatch(removeFocusedElement());\n\n setState({ ...state, loading: true });\n\n fetchData();\n }, []);\n\n const fetchData = () => {\n getAdditionalPackageInfo()\n .then(result => {\n setState({\n ...state,\n webTemplates: result.data.web_templates,\n webSystem: result.data.web_system,\n backendTemplates: result.data.backend_templates,\n backendSystem: result.data.web_backend,\n dnsTemplates: result.data.dns_templates,\n dnsSystem: result.data.dns_system,\n proxySystem: result.data.proxy_system,\n proxyTemplates: result.data.proxy_templates,\n sshTemplates: result.data.ssh_access,\n loading: false\n });\n })\n .catch(err => console.err(err));\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let newPackage = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n newPackage[name] = value;\n }\n\n newPackage['token'] = token;\n newPackage['ok'] = 'Add';\n\n if (Object.keys(newPackage).length !== 0 && newPackage.constructor === Object) {\n setState({ ...state, loading: true });\n addPackage(newPackage)\n .then(result => {\n if (result.status === 200) {\n const { error_msg: errorMessage, ok_msg: okMessage } = result.data;\n\n if (errorMessage) {\n setState({ ...state, errorMessage, okMessage, loading: false });\n } else {\n dispatch(refreshCounters()).then(() => {\n setState({ ...state, okMessage, errorMessage: '', loading: false });\n });\n }\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const toggleUnlimited = inputName => {\n let inputNameToUpdate = state[inputName];\n let defaultValue;\n\n if (inputName === 'quota' || inputName === 'bandwidth') {\n defaultValue = '1000';\n } else {\n defaultValue = '1';\n }\n\n if (inputNameToUpdate !== 'unlimited') {\n setState({ ...state, [inputName]: 'unlimited' });\n } else {\n setState({ ...state, [inputName]: defaultValue });\n }\n }\n\n return (\n <div className=\"edit-template add-package\">\n <Helmet>\n <title>{`Vesta - ${i18n.PACKAGE}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Adding Package']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {state.errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n {state.errorMessage}</span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {state.okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n <span>{HtmlParser(state.okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> : (\n <form onSubmit={event => submitFormHandler(event)}>\n <TextInput name=\"v_package\" id=\"packageName\" title={i18n['Package Name']} />\n\n <SelectInput\n options={state.webTemplates}\n name=\"v_web_template\"\n id=\"webTemplates\"\n title={i18n['Web Template']}\n optionalTitle={state.webSystem} />\n\n <SelectInput\n options={state.backendTemplates}\n name=\"v_backend_template\"\n id=\"backendTemplates\"\n title={i18n['Backend Template']}\n optionalTitle={state.backendSystem} />\n\n <SelectInput\n options={state.proxyTemplates}\n name=\"v_proxy_template\"\n id=\"proxyTemplates\"\n title={i18n['Proxy Template']}\n optionalTitle={state.proxySystem} />\n\n <SelectInput\n options={state.dnsTemplates}\n name=\"v_dns_template\"\n id=\"dnsTemplates\"\n title={i18n['DNS Template']}\n optionalTitle={state.dnsSystem} />\n\n <SelectInput\n options={state.sshTemplates}\n name=\"v_shell\"\n id=\"shells\"\n title={i18n['SSH Access']} />\n\n <TextInputWithExtraButton title={i18n['Web Domains']} id=\"webDomains\" name=\"v_web_domains\" value={state.webDomains}>\n <button type=\"button\" onClick={() => toggleUnlimited('webDomains')}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextInputWithExtraButton title={i18n['Web Aliases']} optionalTitle={i18n['per domain']} id=\"webAliases\" name=\"v_web_aliases\" value={state.webAliases}>\n <button type=\"button\" onClick={() => toggleUnlimited('webAliases')}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextInputWithExtraButton title={i18n['DNS Domains']} id=\"dnsDomains\" name=\"v_dns_domains\" value={state.dnsDomains}>\n <button type=\"button\" onClick={() => toggleUnlimited('dnsDomains')}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextInputWithExtraButton title={i18n['DNS records']} optionalTitle={i18n['per domain']} id=\"dnsRecords\" name=\"v_dns_records\" value={state.dnsRecords}>\n <button type=\"button\" onClick={() => toggleUnlimited('dnsRecords')}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextInputWithExtraButton title={i18n['Mail Domains']} id=\"mailDomains\" name=\"v_mail_domains\" value={state.mailDomains}>\n <button type=\"button\" onClick={() => toggleUnlimited('mailDomains')}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextInputWithExtraButton title={i18n['Mail Accounts']} optionalTitle={i18n['per domain']} id=\"mailAccounts\" name=\"v_mail_accounts\" value={state.mailAccounts}>\n <button type=\"button\" onClick={() => toggleUnlimited('mailAccounts')}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextInputWithExtraButton title={i18n['Databases']} id=\"databases\" name=\"v_databases\" value={state.databases}>\n <button type=\"button\" onClick={() => toggleUnlimited('databases')}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextInputWithExtraButton title={i18n['Cron Jobs']} id=\"cronJobs\" name=\"v_cron_jobs\" value={state.cronJobs}>\n <button type=\"button\" onClick={() => toggleUnlimited('cronJobs')}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextInput name=\"v_backups\" id=\"backups\" value=\"1\" title={i18n['Backups']} />\n\n <TextInputWithExtraButton title={i18n['Quota']} optionalTitle={i18n['in megabytes']} id=\"quota\" name=\"v_disk_quota\" value={state.quota}>\n <button type=\"button\" onClick={() => toggleUnlimited('quota')}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextInputWithExtraButton title={i18n['Bandwidth']} optionalTitle={i18n['in megabytes']} id=\"bandwidth\" name=\"v_bandwidth\" value={state.bandwidth}>\n <button type=\"button\" onClick={() => toggleUnlimited('bandwidth')}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <NameServers usersNS={['ns1.example.ltd', 'ns2.example.ltd']} />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Add}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/package/')}>{i18n.Back}</button>\n </div>\n </form>\n )}\n </AddItemLayout>\n </div>\n );\n}\n\nexport default AddPackage;","import React from 'react';\n\nimport TextInput from 'src/components/ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport { Link } from 'react-router-dom';\nimport { useSelector } from 'react-redux';\n\nconst EditServerWebOption = ({ proxySystem, webSystem, webBackend, webBackendPool, visible = false }) => {\n const { i18n } = useSelector(state => state.session);\n\n return (\n <div className=\"server-web-option\" style={{ display: `${visible ? 'block' : 'none'}` }}>\n\n {\n proxySystem && (\n <TextInput\n optionalTitle={<Link to={`/edit/server/${proxySystem}`}>{i18n['configure']}</Link>}\n title={i18n['Proxy Server'] + ' / '}\n name=\"v_proxy_system\"\n value={proxySystem}\n id=\"proxy_system\"\n disabled />\n )\n }\n\n {\n webSystem && (\n <TextInput\n optionalTitle={<Link to={`/edit/server/${webSystem}`}>{i18n['configure']}</Link>}\n title={i18n['Web Server'] + ' / '}\n name=\"v_web_system\"\n value={webSystem}\n id=\"web_system\"\n disabled />\n )\n }\n\n {\n webBackend && (\n <TextInput\n title={i18n['Backend Server']}\n name=\"v_web_backend\"\n value={webBackend}\n id=\"web_backend\"\n disabled />\n )\n }\n\n {\n webBackendPool && (\n <TextInput\n optionalTitle={<Link to={`/edit/server/${webBackendPool}`}>{i18n['configure']}</Link>}\n title={i18n['Backend Pool Mode']}\n name=\"v_web_backend_pool\"\n value={webBackendPool}\n id=\"web_backend_pool\"\n disabled\n />\n )\n }\n\n </div>\n );\n}\n\nexport default EditServerWebOption;","import React from 'react';\n\nimport SelectInput from 'src/components/ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport TextInput from 'src/components/ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport { Link } from 'react-router-dom';\nimport { useSelector } from 'react-redux';\n\nconst EditServerDnsOption = ({ dnsSystem, selected, dnsCluster, visible }) => {\n const { i18n } = useSelector(state => state.session);\n\n const printHosts = () => {\n return Object.keys(dnsCluster).map((cluster, index) => (\n <TextInput\n title={`${i18n['DNS Server']} #${index + 1}`}\n name=\"v_dns_remote_host\"\n id=\"dns-remote-host\"\n value={cluster}\n disabled />\n ));\n }\n\n return (\n <div className=\"server-dns-option\" style={{ display: `${visible ? 'block' : 'none'}` }}>\n <TextInput\n optionalTitle={<Link to={`/edit/server/${dnsSystem}`}>{i18n['configure']}</Link>}\n title={i18n['DNS Server'] + ' / '}\n name=\"v_dns_system\"\n value={dnsSystem}\n id=\"dns_system\"\n disabled />\n\n <SelectInput\n title={i18n['DNS Cluster']}\n selected={selected}\n options={[i18n['no'], i18n['yes']]}\n name=\"v_dns_cluster\"\n id=\"dns-cluster\"\n disabled />\n\n {\n selected === 'yes' && (\n <div className=\"hosts-wrapper\">\n {printHosts()}\n </div>\n )\n }\n </div>\n );\n}\n\nexport default EditServerDnsOption;","import React, { useState } from 'react';\n\nimport SelectInput from 'src/components/ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport TextInput from 'src/components/ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport { useSelector } from 'react-redux';\n\nconst EditVestaPluginsOption = ({ data, visible }) => {\n const { i18n } = useSelector(state => state.session);\n const { session } = useSelector(state => state.userSession);\n const [sftpValue, setSftpValue] = useState(data.lead || session['SFTPJAIL_KEY'] ? 'yes' : 'no');\n const [fmValue, setFmValue] = useState(data.fm_lead || session['FILEMANAGER_KEY'] ? 'yes' : 'no');\n const [softaculousValue, setSoftaculousValue] = useState(session['SOFTACULOUS'] === 'yes' ? 'yes' : 'no');\n\n const renderSoftaculous = () => {\n if (softaculousValue === 'yes') {\n if (session['SOFTACULOUS'] === 'yes') {\n return (<div className=\"soft-module\">\n <div>\n <span style={{ fontWeight: 'bolder' }}>{i18n['* plugin installation will run in background']}</span>\n <span>\n Softaculous is a great Auto Installer having 426 great scripts, 1115 PHP Classes\n and we are still adding more. Softaculous is ideal for Web Hosting companies and\n it could give a significant boost to your sales. These scripts cover most of the\n uses a customer could ever have. We have covered a wide array of Categories so that\n everyone could find the required script one would need to power their Web Site.\n </span>\n </div>\n\n <div className=\"buy-license\">\n <a href=\"https://www.softaculous.com/softaculous/\" target=\"_blank\" rel=\"noopener noreferrer\">\n {i18n['Get Premium License'] ?? 'Get Premium License'}\n </a>\n </div>\n </div>);\n }\n }\n }\n\n const renderSftp = () => {\n if (sftpValue === 'yes') {\n if (!data.sftp_license_key && session['SFTPJAIL_KEY']) {\n return (<div className=\"sftp-module\">\n <div>{i18n['Restrict users so that they cannot use SSH and access only their home directory.']}</div>\n <div className=\"license-description\">\n <span>{i18n['Licence Key']}:</span>\n <TextInput\n title={i18n['License Key']}\n value={data.licence_key}\n name=\"v_sftp_licence\"\n id=\"sftp_licence\" />\n </div>\n </div>)\n } else {\n return (<div className=\"sftp-module\">\n <>\n <span>{i18n['Restrict users so that they cannot use SSH and access only their home directory.']}</span>\n <span>{i18n['This is a commercial module, you would need to purchace license key to enable it.']}</span>\n </>\n <div className=\"license-description\">\n <span>{i18n['Enter License Key']}:</span>\n <TextInput\n title={i18n['Version']}\n name=\"v_sftp_licence\"\n id=\"sftp_licence\" />\n </div>\n\n <div className=\"buy-license\">\n <a href={`https://vestacp.com/checkout/2co.php?product_id=6&referer=${data.http_host}`}>\n {i18n['Buy Licence']} 3$ {i18n['month']}\n </a>\n <a href={`https://vestacp.com/checkout/2co.php?product_id=9&referer=${data.http_host}`}>\n {i18n['Buy Lifetime License']} 18$\n </a>\n </div>\n\n <span>2Checkout.com Inc. (Ohio, USA) is a payment facilitator for goods and services provided by vestacp.com.</span>\n </div>)\n }\n }\n }\n\n const renderFm = () => {\n if (fmValue === 'yes') {\n if (!data.fm_license_key && session['FILEMANAGER_KEY']) {\n return (<div className=\"fm-module\">\n <div>{i18n['Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.']}</div>\n <div className=\"license-description\">\n <span>{i18n['Licence Key']}:</span>\n <TextInput\n title={i18n['Licence Key']}\n value={data.fm_licence_key_option}\n name=\"v_filemanager_licence\"\n id=\"filemanager_licence\" />\n </div>\n </div>);\n } else {\n return (<div className=\"fm-module\">\n <>\n <span>{i18n['Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.']}</span>\n <span>{i18n['This is a commercial module, you would need to purchace license key to enable it.']}</span>\n </>\n <div className=\"license-description\">\n <span>{i18n['Enter License Key']}:</span>\n <TextInput\n title={i18n['Version']}\n value=\"\"\n name=\"v_filemanager_licence\"\n id=\"sftp_licence\" />\n </div>\n\n <div className=\"buy-license\">\n <a href={`https://vestacp.com/checkout/2co.php?product_id=7&referer=${data.http_host}`} target=\"_blank\" rel=\"noopener noreferrer\">\n {i18n['Buy Licence']} 3$ {i18n['month']}\n </a>\n <a href={`https://vestacp.com/checkout/2co.php?product_id=8&referer=${data.http_host}`} target=\"_blank\" rel=\"noopener noreferrer\">\n {i18n['Buy Lifetime License']} 28$\n </a>\n </div>\n\n <span>2Checkout.com Inc. (Ohio, USA) is a payment facilitator for goods and services provided by vestacp.com.</span>\n </div>)\n }\n }\n }\n\n return (\n <div className=\"server-plugins-option\" style={{ display: `${visible ? 'block' : 'none'}` }}>\n <TextInput\n title={i18n['Version']}\n value={data.version}\n name=\"v_version\"\n id=\"version\"\n disabled />\n\n <div className=\"form-group select-group\">\n <label className=\"label-wrapper\" htmlFor=\"quota\">\n {i18n['FileSystem Disk Quota']}\n </label>\n <select className=\"form-control\" id=\"quota\" name=\"v_quota\">\n <option value=\"no\">{i18n['no']}</option>\n <option value=\"yes\" selected={data.disk_quota === 'yes'}>{i18n['yes']}</option>\n </select>\n </div>\n\n <br />\n\n <div className=\"form-group select-group\">\n <label className=\"label-wrapper\" htmlFor=\"firewall\">\n {i18n['Firewall']}\n </label>\n <select className=\"form-control\" id=\"firewall\" name=\"v_firewall\">\n <option value=\"no\">{i18n['no']}</option>\n <option value=\"yes\" selected={data.firewall_system === 'iptables'}>{i18n['yes']}</option>\n </select>\n </div>\n\n <SelectInput\n title={i18n['Reseller Role']}\n options={[i18n['yes']]}\n name=\"v_reseller\"\n id=\"reseller\"\n disabled />\n\n <SelectInput\n title={i18n['Backup Migration Manager']}\n options={[i18n['yes']]}\n name=\"v_backup_manager\"\n id=\"backup_manager\"\n disabled />\n\n <div className=\"form-group select-group\">\n <label className=\"label-wrapper\" htmlFor=\"sftp\">\n {i18n['SFTP Chroot']}\n </label>\n <select className=\"form-control\" id=\"sftp\" name=\"v_sftp\" onChange={event => setSftpValue(event.target.value)}>\n {\n session['SFTPJAIL_KEY']\n ? <option value=\"cancel\">{i18n['Disable and Cancel Licence']}</option>\n : <option value=\"no\">{i18n['no']}</option>\n }\n\n <option value=\"yes\" selected={data.lead || session['SFTPJAIL_KEY']}>{i18n['yes']}</option>\n </select>\n </div>\n\n {renderSftp()}\n\n <br />\n\n <div className=\"form-group select-group\">\n <label className=\"label-wrapper\" htmlFor=\"filemanager\">\n {i18n['File Manager']}\n </label>\n <select className=\"form-control\" id=\"filemanager\" name=\"v_filemanager\" onChange={event => setFmValue(event.target.value)}>\n {\n session['FILEMANAGER_KEY']\n ? <option value=\"cancel\">{i18n['Disable and Cancel Licence']}</option>\n : <option value=\"no\">{i18n['no']}</option>\n }\n\n <option value=\"yes\" selected={data.fm_lead || session['FILEMANAGER_KEY']}>{i18n['yes']}</option>\n </select>\n </div>\n\n {renderFm()}\n\n <br />\n\n <div className=\"form-group select-group\">\n <label className=\"label-wrapper\" htmlFor=\"softaculous\">\n {i18n['Softaculous'] ?? 'Softaculous'}\n </label>\n <select className=\"form-control\" id=\"softaculous\" name=\"v_softaculous\" onChange={event => setSoftaculousValue(event.target.value)}>\n <option value=\"no\">{i18n['no']}</option>\n <option value=\"yes\" selected={data.softaculous_lead || session['SOFTACULOUS'] === 'yes'}>{i18n['yes']}</option>\n </select>\n </div>\n\n {renderSoftaculous()}\n </div>\n );\n}\n\nexport default EditVestaPluginsOption;\n","import React, { useEffect, useState } from 'react';\n\nimport SelectInput from 'src/components/ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport TextArea from 'src/components/ControlPanel/AddItemLayout/Form/TextArea/TextArea';\nimport Checkbox from 'src/components/ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport { Link } from 'react-router-dom';\nimport { useSelector } from 'react-redux';\n\nconst EditVestaSslOption = ({ data, visible }) => {\n const { i18n } = useSelector(state => state.session);\n const [domainsVisible, setDomainsVisible] = useState(false);\n const [sslDomains, setSslDomains] = useState([]);\n\n useEffect(() => {\n const { ssl_domains } = data;\n\n if (ssl_domains) {\n setSslDomains(['', ...ssl_domains]);\n } else {\n setSslDomains(['']);\n }\n\n }, []);\n\n return (\n <div className=\"server-ssl-option\" style={{ display: `${visible ? 'block' : 'none'}` }}>\n <Checkbox\n onChange={checked => setDomainsVisible(checked)}\n title={i18n['Use Web Domain SSL Certificate']}\n defaultChecked={data.vesta_certificate}\n name=\"v_web_ssl_domain_checkbox\"\n id=\"web_ssl_domain_checkbox\"\n checked={domainsVisible}\n />\n\n {\n domainsVisible && (\n <div className=\"domain-group\">\n <SelectInput\n selected={data.vesta_certificate}\n name=\"v_web_ssl_domain\"\n title={i18n['Domain']}\n options={sslDomains}\n id=\"web_ssl_domain\" />\n </div>\n )\n }\n\n <TextArea\n title={i18n['SSL Certificate']}\n defaultValue={data.sys_ssl_crt}\n name=\"v_sys_ssl_crt\"\n id=\"sys_ssl_crt\" />\n\n <TextArea\n defaultValue={data.sys_ssl_key}\n id=\"sys_ssl_key\"\n name=\"v_sys_ssl_key\"\n title={i18n['SSL Key']} />\n\n <div className=\"additional-info\">\n {\n data.sys_ssl_subject && (\n <div>\n <span>{i18n['SUBJECT']}:</span>\n <span>{data.sys_ssl_subject}</span>\n </div>\n )\n }\n\n {\n data.sys_ssl_aliases && (\n <div>\n <span>{i18n['ALIASES']}:</span>\n <span>{data.sys_ssl_aliases}</span>\n </div>\n )\n }\n\n {\n data.sys_ssl_not_before && (\n <div>\n <span>{i18n['NOT_BEFORE']}:</span>\n <span>{data.sys_ssl_not_before}</span>\n </div>\n )\n }\n\n {\n data.sys_ssl_not_after && (\n <div>\n <span>{i18n['NOT_AFTER']}:</span>\n <span>{data.sys_ssl_not_after}</span>\n </div>\n )\n }\n\n {\n data.sys_ssl_signature && (\n <div>\n <span>{i18n['SIGNATURE']}:</span>\n <span>{data.sys_ssl_signature}</span>\n </div>\n )\n }\n\n {\n data.sys_ssl_pub_key && (\n <div>\n <span>{i18n['PUB_KEY']}:</span>\n <span>{data.sys_ssl_pub_key}</span>\n </div>\n )\n }\n\n {\n data.sys_ssl_issuer && (\n <div>\n <span>{i18n['ISSUER']}:</span>\n <span>{data.sys_ssl_issuer}</span>\n </div>\n )\n }\n </div>\n </div>\n );\n}\n\nexport default EditVestaSslOption;","import React, { useEffect, useState } from 'react';\n\nimport SelectInput from 'src/components/ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport TextInput from 'src/components/ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport Checkbox from 'src/components/ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport { Link } from 'react-router-dom';\nimport { useSelector } from 'react-redux';\n\nconst EditDatabaseOption = ({ data, visible }) => {\n const { i18n } = useSelector(state => state.session);\n\n const printPhpMyAdminHosts = () => {\n if (data.mysql_hosts.length) {\n return data.mysql_hosts.map((host, index) => (\n <div className=\"hosts\">\n <TextInput\n title={`${i18n['Host']} #${index + 1}`}\n value={host['HOST']}\n name=\"v_mysql_host\"\n id=\"mysql_host\"\n disabled />\n\n <TextInput\n title={i18n['Password']}\n name=\"v_mysql_password\"\n id=\"mysql_password\" />\n\n <TextInput\n title={i18n['Maximum Number Of Databases']}\n value={host['MAX_DB']}\n name=\"v_mysql_max\"\n id=\"mysql_max\"\n disabled />\n\n <TextInput\n title={i18n['Current Number Of Databases']}\n value={host['U_DB_BASES']}\n name=\"v_mysql_max\"\n id=\"current-databases\"\n disabled />\n </div>\n ));\n }\n }\n\n const printPgSqlHosts = () => {\n return data.pgsql_hosts.map((host, index) => (\n <div className=\"hosts\">\n <TextInput\n title={`${i18n['Host']} #${index + 1}`}\n value={host['HOST']}\n name=\"v_pgsql_host\"\n id=\"pgsql_host\"\n disabled />\n\n <TextInput\n title={i18n['Maximum Number Of Databases']}\n value={host['MAX_DB']}\n name=\"v_psql_max\"\n id=\"psql_max\"\n disabled />\n\n <TextInput\n title={i18n['Current Number Of Databases']}\n value={host['U_DB_BASES']}\n name=\"v_pgsql_max\"\n id=\"pgsql_current\"\n disabled />\n </div>\n ));\n }\n\n return (\n <div className=\"server-mail-option\" style={{ display: `${visible ? 'block' : 'none'}` }}>\n <SelectInput\n optionalTitle={<Link to=\"/edit/server/mysql\">{i18n['configure']}</Link>}\n title={i18n['MySQL Support'] + ' / '}\n selected={data.mysql}\n options={[i18n['no'], i18n['yes']]}\n name=\"v_mysql\"\n id=\"mysql\"\n disabled />\n\n {\n data.mysql === 'yes' && (\n <>\n <TextInput\n title={i18n['phpMyAdmin URL']}\n value={data.db_pma_url}\n name=\"v_mysql_url\"\n id=\"mysql_url\" />\n\n {printPhpMyAdminHosts()}\n </>\n )\n }\n\n <SelectInput\n optionalTitle={<Link to=\"/edit/server/postgresql\">{i18n['configure']}</Link>}\n title={i18n['PostgreSQL Support'] + ' / '}\n selected={data.pgsql}\n options={[i18n['no'], i18n['yes']]}\n name=\"v_pgsql\"\n id=\"pgsql\"\n disabled />\n\n {\n data.pgsql === 'yes' && (\n <>\n <TextInput\n title={i18n['phpPgAdmin URL']}\n value={data.pgsql_url}\n name=\"v_pgsql_url\"\n id=\"pgsql_url\" />\n\n {printPgSqlHosts()}\n </>\n )\n }\n </div>\n );\n}\n\nexport default EditDatabaseOption;","import React, { useState } from 'react';\n\nimport SelectInput from 'src/components/ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport TextInput from 'src/components/ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { useSelector } from 'react-redux';\n\nconst EditBackupOption = ({ data, visible }) => {\n const { i18n } = useSelector(state => state.session);\n const [remoteBackup, setRemoteBackup] = useState(false);\n\n return (\n <div className=\"server-dns-option\" style={{ display: `${visible ? 'block' : 'none'}` }}>\n <SelectInput\n options={[i18n['no'], i18n['yes']]}\n title={i18n['Local backup']}\n selected={data.backup}\n name=\"v_backup\"\n id=\"backup\" />\n\n <SelectInput\n options={['1', '2', '3', '4', '5', '6', '7', '8', '9']}\n title={i18n['Compression level']}\n selected={data.backup_gzip}\n name=\"v_backup_gzip\"\n id=\"backup-gzip\" />\n\n <TextInput\n title={i18n['Directory']}\n value={data.backup_dir}\n name=\"v_backup_dir\"\n id=\"v-backup-dir\" />\n\n {\n data.backup_remote_adv && (\n <>\n <button type=\"button\" onClick={() => setRemoteBackup(!remoteBackup)}>\n {i18n['Remote backup']}\n {remoteBackup ? <FontAwesomeIcon icon=\"caret-up\" /> : <FontAwesomeIcon icon=\"caret-down\" />}\n </button>\n\n {\n remoteBackup && (\n <>\n <SelectInput\n selected={data.backup_type}\n options={data.protocols}\n title={i18n['Protocol']}\n name=\"v_backup_type\"\n id=\"backup_type\" />\n\n <TextInput\n title={i18n['Host']}\n value={data.backup_host}\n name=\"v_backup_host\"\n id=\"backup_host\" />\n\n <TextInput\n title={i18n['Username']}\n value={data.backup_username}\n name=\"v_backup_username\"\n id=\"backup_username\" />\n\n <TextInput\n title={i18n['Password']}\n value={data.backup_password}\n name=\"v_backup_password\"\n id=\"backup_password\" />\n\n <TextInput\n title={i18n['Directory']}\n value={data.backup_bpath}\n name=\"v_backup_bpath\"\n id=\"backup_bpath\" />\n </>\n )\n }\n </>\n )\n }\n </div>\n );\n}\n\nexport default EditBackupOption;","import React, { useEffect, useState } from 'react';\n\nimport SelectInput from 'src/components/ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport TextInput from 'src/components/ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport Checkbox from 'src/components/ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport { Link } from 'react-router-dom';\nimport { useSelector } from 'react-redux';\n\nconst EditMailOption = ({ data, visible }) => {\n const { i18n } = useSelector(state => state.session);\n const [mailCertificateSystem, setMailCertificateSystem] = useState(false);\n\n useEffect(() => {\n if (data.mail_certificate) {\n setMailCertificateSystem(true);\n }\n }, []);\n\n const getMailCertificateOptions = () => {\n let result = ['', ...data.ssl_domains];\n return result;\n }\n\n return (\n <div className=\"server-mail-option\" style={{ display: `${visible ? 'block' : 'none'}` }}>\n <TextInput\n optionalTitle={<Link to={`/edit/server/${data.mail_system}`}>{i18n['configure']}</Link>}\n title={i18n['MAIL Server'] + ' / '}\n name=\"v_mail_system\"\n value={data.mail_system}\n id=\"mail_system\"\n disabled />\n\n {\n data.antivirus_system && (\n <TextInput\n optionalTitle={<Link to={`/edit/server/${data.antivirus_system}`}>{i18n['configure']}</Link>}\n title={i18n['Antivirus'] + ' / '}\n name=\"v_antivirus_system\"\n value={data.antivirus_system}\n id=\"antivirus_system\"\n disabled />\n )\n }\n\n {\n data.antispam_system && (\n <TextInput\n optionalTitle={<Link to={`/edit/server/${data.antispam_system}`}>{i18n['configure']}</Link>}\n title={i18n['DNS Server'] + ' / '}\n name=\"v_antispam_system\"\n value={data.antispam_system}\n id=\"antispam_system\"\n disabled />\n )\n }\n\n <TextInput\n title={i18n['Webmail URL']}\n name=\"v_mail_url\"\n value={data.mail_url}\n id=\"mail-url\" />\n\n <br /><br />\n\n <Checkbox\n onChange={checked => setMailCertificateSystem(checked)}\n title={i18n['Use Web Domain SSL Certificate']}\n name=\"v_mail_ssl_domain_checkbox\"\n id=\"mail-ssl-domain-checkbox\"\n checked={!!data.mail_certificate} />\n\n {\n mailCertificateSystem && (\n <div className=\"mail-cert-info\">\n <SelectInput\n options={getMailCertificateOptions()}\n selected={data.mail_certificate}\n name=\"v_mail_ssl_domain\"\n title={i18n['Domain']}\n id=\"mail-ssl-domain\" />\n\n <div className=\"additional-info\">\n {\n data.sys_ssl_subject && (\n <div>\n <span>{i18n['SUBJECT']}:</span>\n <span>{data.sys_ssl_subject}</span>\n </div>\n )\n }\n\n {\n data.sys_ssl_aliases && (\n <div>\n <span>{i18n['ALIASES']}:</span>\n <span>{data.sys_ssl_aliases}</span>\n </div>\n )\n }\n\n {\n data.sys_ssl_not_before && (\n <div>\n <span>{i18n['NOT_BEFORE']}:</span>\n <span>{data.sys_ssl_not_before}</span>\n </div>\n )\n }\n\n {\n data.sys_ssl_not_after && (\n <div>\n <span>{i18n['NOT_AFTER']}:</span>\n <span>{data.sys_ssl_not_after}</span>\n </div>\n )\n }\n\n {\n data.sys_ssl_signature && (\n <div>\n <span>{i18n['SIGNATURE']}:</span>\n <span>{data.sys_ssl_signature}</span>\n </div>\n )\n }\n\n {\n data.sys_ssl_pub_key && (\n <div>\n <span>{i18n['PUB_KEY']}:</span>\n <span>{data.sys_ssl_pub_key}</span>\n </div>\n )\n }\n\n {\n data.sys_ssl_issuer && (\n <div>\n <span>{i18n['ISSUER']}:</span>\n <span>{data.sys_ssl_issuer}</span>\n </div>\n )\n }\n </div>\n </div>\n )\n }\n </div>\n );\n}\n\nexport default EditMailOption;","import axios from \"axios\";\n\nconst BASE_URL = window.location.origin;\nconst resetPasswordUri = '/api/v1/reset/index.php';\n\nexport const resetPassword = (user = '', code = '', password = '', confirmPassword = '') => {\n const formData = new FormData();\n\n if (password) {\n formData.append('password', password);\n }\n\n if (confirmPassword) {\n formData.append('password_confirm', confirmPassword);\n }\n\n if (user) {\n formData.append('user', user);\n }\n\n if (code) {\n formData.append('code', code);\n }\n\n return axios.post(BASE_URL + resetPasswordUri, formData);\n};\n","import { LOGIN, LOGOUT, LOGGED_OUT_AS, CHECK_AUTH, RESET_PASSWORD } from './sessionTypes';\nimport { checkAuth, signIn, signInAs, signOut } from 'src/services/session';\nimport { resetPassword } from 'src/ControlPanelService/ResetPassword';\nimport { resetAuthToken, setAuthToken } from 'src/utils/token';\nimport { REFRESH_COUNTERS } from '../MenuCounters/menuCounterTypes';\nimport { SET_USER_SESSION } from '../UserSession/userSessionTypes';\n\nconst LOGOUT_RESPONSE = 'logged_out';\nconst LOGOUT_AS_RESPONSE = 'logged_out_as';\n\nexport const login = (user, password) => dispatch => {\n return new Promise((resolve, reject) => {\n signIn({ user, password }).then((response) => {\n const { error, session, token, panel, data, user, i18n } = response.data;\n\n if (token) setAuthToken(token);\n\n dispatch({\n type: LOGIN,\n value: {\n token: token || '',\n panel,\n i18n: i18n || {},\n userName: user,\n error\n },\n });\n dispatch({\n type: REFRESH_COUNTERS,\n value: {\n user: data,\n }\n });\n dispatch({\n type: SET_USER_SESSION,\n value: session\n });\n resolve(token);\n }, (error) => {\n reject(error);\n });\n });\n}\n\nexport const reset = ({ user = '', code = '', password = '', password_confirm = '' }) => dispatch => {\n return new Promise((resolve, reject) => {\n resetPassword(user, code, password, password_confirm).then((response) => {\n const { error, session, token, panel, user } = response.data;\n\n dispatch({\n type: RESET_PASSWORD,\n value: {\n token,\n panel,\n userName: user,\n error\n },\n });\n dispatch({\n type: REFRESH_COUNTERS,\n value: {\n user: {},\n }\n });\n dispatch({\n type: SET_USER_SESSION,\n value: session\n });\n resolve(token);\n }, (error) => {\n reject(error);\n });\n });\n}\n\nexport const loginAs = username => dispatch => {\n return new Promise((resolve, reject) => {\n signInAs(username).then((response) => {\n const { error, token, session, panel, data, user, i18n } = response.data;\n if (token) setAuthToken(token);\n\n dispatch({\n type: LOGIN,\n value: {\n userName: user,\n i18n,\n panel,\n token,\n error\n }\n });\n dispatch({\n type: REFRESH_COUNTERS,\n value: {\n user: data,\n }\n });\n dispatch({\n type: SET_USER_SESSION,\n value: session\n });\n\n resolve(token);\n }, (error) => {\n console.error(error);\n reject();\n });\n });\n}\n\nexport const logout = () => (dispatch, getState) => {\n return new Promise((resolve, reject) => {\n signOut().then((response) => {\n const { logout_response, error, userName, user, i18n, session, panel } = response.data;\n\n if (logout_response === LOGOUT_RESPONSE) {\n resetAuthToken();\n\n dispatch({\n type: LOGOUT,\n value: {\n userName: '',\n token: '',\n panel: {},\n session: {},\n i18n: [],\n error,\n },\n });\n dispatch({\n type: REFRESH_COUNTERS,\n value: {\n user: {},\n }\n });\n dispatch({\n type: SET_USER_SESSION,\n value: {}\n });\n\n resolve();\n } else if (logout_response === LOGOUT_AS_RESPONSE) {\n dispatch({\n type: LOGGED_OUT_AS,\n value: {\n userName,\n panel,\n token: '',\n i18n,\n error,\n },\n });\n dispatch({\n type: REFRESH_COUNTERS,\n value: {\n user,\n }\n });\n dispatch({\n type: SET_USER_SESSION,\n value: session\n });\n\n resolve();\n } else {\n resolve(`Error while signing out: ${logout_response}`);\n }\n }, (error) => {\n console.error(error);\n reject();\n });\n });\n}\n\nexport const checkAuthHandler = () => (dispatch, getState) => {\n return new Promise((resolve, reject) => {\n checkAuth()\n .then(res => {\n const { user, data, session, panel, error, i18n, token } = res.data;\n\n if (token) setAuthToken(token);\n\n dispatch({\n type: CHECK_AUTH,\n value: {\n userName: user,\n i18n,\n panel,\n token,\n error\n }\n });\n dispatch({\n type: REFRESH_COUNTERS,\n value: {\n user: data,\n }\n });\n dispatch({\n type: SET_USER_SESSION,\n value: session\n });\n\n resolve(token);\n })\n .catch(err => {\n reject();\n console.error(err);\n });\n });\n}\n\nexport const refreshUserSession = () => (dispatch, getState) => {\n return new Promise((resolve, reject) => {\n checkAuth()\n .then(res => {\n const { session, token } = res.data;\n\n if (token) setAuthToken(token);\n dispatch({\n type: SET_USER_SESSION,\n value: session\n });\n\n resolve(token);\n })\n .catch(err => {\n reject();\n console.error(err);\n });\n });\n}\n\nexport const removeToken = () => {\n return {\n type: LOGOUT,\n value: {\n token: '',\n error: ''\n }\n }\n}\n","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport { getServerAdditionalInfo, updateService } from '../../../ControlPanelService/Server';\nimport SelectInput from '../../ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport TextInput from '../../ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from '../../../components/Spinner/Spinner';\nimport EditServerWebOption from './EditServerWebOption';\nimport EditServerDnsOption from './EditServerDnsOption';\nimport EditVestaPluginsOption from './EditVestaPlugins';\nimport EditVestaSslOption from './EditVestaSslOption';\nimport EditDatabaseOption from './EditDatabaseOption';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport EditBackupOption from './EditBackupOption';\nimport EditMailOption from './EditMailOption';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './EditServer.scss';\nimport { Helmet } from 'react-helmet';\nimport HtmlParser from 'react-html-parser';\nimport { refreshUserSession } from 'src/actions/Session/sessionActions';\n\nconst EditServer = props => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const { session } = useSelector(state => state.userSession);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n loading: false,\n webOption: false,\n dnsOption: false,\n mailOption: false,\n backupOption: false,\n sslOption: false,\n pluginsOption: false,\n dbOption: false\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/server/'));\n dispatch(removeFocusedElement());\n\n setState({ ...state, loading: true });\n fetchData();\n }, []);\n\n const fetchData = () => {\n getServerAdditionalInfo()\n .then(response => {\n setState({\n ...state,\n data: response.data,\n loading: false\n });\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err);\n });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedServer = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedServer[name] = value;\n }\n\n updatedServer['save'] = 'save';\n updatedServer['token'] = token;\n\n if (updatedServer['v_softaculous'] === 'no' && !session['SOFTACULOUS']) {\n delete updatedServer['v_softaculous'];\n }\n\n if (Object.keys(updatedServer).length !== 0 && updatedServer.constructor === Object) {\n setState({ ...state, loading: true });\n\n updateService(updatedServer)\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n if (error_msg) {\n setErrorMessage(error_msg);\n setOkMessage('');\n } else {\n setErrorMessage('');\n setOkMessage(ok_msg);\n }\n }\n })\n .then(() => dispatch(refreshUserSession()).then(() => fetchData()))\n .catch(err => console.error(err));\n }\n }\n\n const toggleOption = option => {\n setState({\n ...state,\n [option]: !state[option]\n });\n }\n\n return (\n <div className=\"edit-template edit-server\">\n <Helmet>\n <title>{`Vesta - ${i18n.SERVER}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Configuring Server']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}\n </span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"edit-server\">\n <TextInput\n value={state.data.hostname}\n title={i18n['Hostname']}\n name=\"v_hostname\"\n id=\"hostname\" />\n\n {\n state.data.timezones && (\n <div className=\"form-group select-group\">\n <label className=\"label-wrapper\" htmlFor=\"timezone\">\n {i18n['Time Zone']}\n </label>\n <select className=\"form-control\" id=\"timezone\" name=\"v_timezone\">\n {\n Object.keys(state.data.timezones).map(key => {\n const value = state.data.timezones[key];\n\n return <option key={key} value={key} selected={state.data.timezone === key}>{value}</option>;\n })\n }\n </select>\n </div>\n )\n }\n\n <SelectInput\n options={state.data.languages}\n selected={state.data.language}\n title={i18n['Default Language']}\n name=\"v_language\"\n id=\"language\" />\n\n <div className=\"modules\">\n <button type=\"button\" onClick={() => toggleOption('webOption')}>\n {i18n['WEB']}\n {state.webOption ? <FontAwesomeIcon icon=\"caret-up\" /> : <FontAwesomeIcon icon=\"caret-down\" />}\n </button>\n\n <EditServerWebOption\n webBackendPool={state.data.web_backend_pool}\n proxySystem={state.data.proxy_system}\n webBackend={state.data.web_backend}\n webSystem={state.data.web_system}\n visible={state.webOption} />\n\n <button type=\"button\" onClick={() => toggleOption('dnsOption')}>\n {i18n['DNS']}\n {state.dnsOption ? <FontAwesomeIcon icon=\"caret-up\" /> : <FontAwesomeIcon icon=\"caret-down\" />}\n </button>\n\n <EditServerDnsOption\n selected={state.data.v_dns_cluster}\n dnsCluster={state.data.dns_cluster}\n dnsSystem={state.data.dns_system}\n visible={state.dnsOption} />\n\n <button type=\"button\" onClick={() => toggleOption('mailOption')}>\n {i18n['MAIL']}\n {state.mailOption ? <FontAwesomeIcon icon=\"caret-up\" /> : <FontAwesomeIcon icon=\"caret-down\" />}\n </button>\n\n <EditMailOption data={state.data} visible={state.mailOption} />\n\n <button type=\"button\" onClick={() => toggleOption('dbOption')}>\n {i18n['DB']}\n {state.dbOption ? <FontAwesomeIcon icon=\"caret-up\" /> : <FontAwesomeIcon icon=\"caret-down\" />}\n </button>\n\n <EditDatabaseOption data={state.data} visible={state.dbOption} />\n\n <button type=\"button\" onClick={() => toggleOption('backupOption')}>\n {i18n['BACKUP']}\n {state.backupOption ? <FontAwesomeIcon icon=\"caret-up\" /> : <FontAwesomeIcon icon=\"caret-down\" />}\n </button>\n\n <EditBackupOption data={state.data} visible={state.backupOption} />\n\n <button type=\"button\" onClick={() => toggleOption('sslOption')}>\n {i18n['Vesta SSL']}\n {state.sslOption ? <FontAwesomeIcon icon=\"caret-up\" /> : <FontAwesomeIcon icon=\"caret-down\" />}\n </button>\n\n <EditVestaSslOption data={state.data} visible={state.sslOption} />\n\n <button type=\"button\" onClick={() => toggleOption('pluginsOption')}>\n {i18n['Vesta Control Panel Plugins']}\n {state.pluginsOption ? <FontAwesomeIcon icon=\"caret-up\" /> : <FontAwesomeIcon icon=\"caret-down\" />}\n </button>\n\n <EditVestaPluginsOption data={state.data} visible={state.pluginsOption} />\n </div>\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/server/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div>\n );\n}\n\nexport default EditServer;\n","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"../../../../actions/MainNavigation/mainNavigationActions\";\nimport Checkbox from '../../../ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport TextArea from '../../../ControlPanel/AddItemLayout/Form/TextArea/TextArea';\nimport { getServiceInfo, updateService } from 'src/ControlPanelService/Server';\nimport AddItemLayout from '../../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from '../../../../components/Spinner/Spinner';\nimport Toolbar from '../../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './Dovecot.scss';\nimport { Helmet } from 'react-helmet';\nimport HtmlParser from 'react-html-parser';\n\nconst Dovecot = () => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n loading: false\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/server/'));\n dispatch(removeFocusedElement());\n\n setState({ ...state, loading: true });\n fetchData();\n }, []);\n\n const fetchData = () => {\n getServiceInfo('dovecot')\n .then(response => {\n if (!response.data.config) {\n history.push('/list/server');\n }\n\n setState({\n ...state,\n data: response.data,\n loading: false\n });\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err);\n });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedService = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedService[name] = value;\n }\n\n if (Object.keys(updatedService).length !== 0 && updatedService.constructor === Object) {\n setState({ ...state, loading: true });\n\n updateService(updatedService, '/dovecot')\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n setErrorMessage(error_msg || '');\n setOkMessage(ok_msg || '');\n }\n })\n .then(() => fetchData())\n .catch(err => console.error(err));\n }\n }\n\n return (\n <div className=\"edit-template edit-dovecot\">\n <Helmet>\n <title>{`Vesta - ${i18n.SERVER}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">\n {i18n['Configuring Server']} / {state.data.service_name}\n </div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}\n </span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"edit-dovecot\">\n <input type=\"hidden\" name=\"save\" value=\"save\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <TextArea\n defaultValue={state.data.config}\n title={state.data.config_path}\n name=\"v_config\"\n id=\"v_config\"\n rows=\"10\" />\n\n <br />\n\n <TextArea\n defaultValue={state.data.config1}\n title={state.data.config_path1}\n name=\"v_config1\"\n id=\"v_config1\"\n rows=\"10\" />\n\n <br />\n\n <TextArea\n defaultValue={state.data.config2}\n title={state.data.config_path2}\n name=\"v_config2\"\n id=\"v_config2\"\n rows=\"10\" />\n\n <br />\n\n <TextArea\n defaultValue={state.data.config3}\n title={state.data.config_path3}\n name=\"v_config3\"\n id=\"v_config3\"\n rows=\"10\" />\n\n <br />\n\n <TextArea\n defaultValue={state.data.config4}\n title={state.data.config_path4}\n name=\"v_config4\"\n id=\"v_config4\"\n rows=\"10\" />\n\n <br />\n\n <TextArea\n defaultValue={state.data.config5}\n title={state.data.config_path5}\n name=\"v_config5\"\n id=\"v_config5\"\n rows=\"10\" />\n\n <br />\n\n <TextArea\n defaultValue={state.data.config6}\n title={state.data.config_path6}\n name=\"v_config6\"\n id=\"v_config6\"\n rows=\"10\" />\n\n <br />\n\n <TextArea\n defaultValue={state.data.config7}\n title={state.data.config_path7}\n name=\"v_config7\"\n id=\"v_config7\"\n rows=\"10\" />\n\n <br />\n\n <TextArea\n defaultValue={state.data.config8}\n title={state.data.config_path8}\n name=\"v_config8\"\n id=\"v_config8\"\n rows=\"10\" />\n\n <br />\n\n <Checkbox\n title={i18n['restart']}\n defaultChecked={true}\n name=\"v_restart\"\n id=\"restart\" />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/server/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div >\n );\n}\n\nexport default Dovecot;","import axios from \"axios\";\nimport { getAuthToken } from \"src/utils/token\";\n\nconst BASE_URL = window.location.origin;\nconst webApiUri = '/api/v1/list/mail/index.php';\nconst addMailApiUri = '/api/v1/add/mail/index.php';\nconst mailInfoUri = '/api/v1/edit/mail/index.php';\nconst updateMailUri = '/api/v1/edit/mail/index.php';\n\nexport const getMailList = () => {\n return axios.get(BASE_URL + webApiUri);\n}\n\nexport const getMailAccountList = domain => {\n return axios.get(`${BASE_URL}${webApiUri}?domain=${domain}`)\n}\n\nexport const getMailAccountInfo = (domain, account) => {\n return axios.get(`${BASE_URL}${mailInfoUri}?domain=${domain}&account=${account}`)\n}\n\nexport const bulkAction = (action, domainNameSystems) => {\n const formData = new FormData();\n formData.append(\"action\", action);\n formData.append(\"token\", getAuthToken());\n\n domainNameSystems.forEach(domainNameSystem => {\n formData.append(\"domain[]\", domainNameSystem);\n });\n\n return axios.post(BASE_URL + '/api/v1/bulk/mail/', formData);\n};\n\nexport const bulkMailAccountAction = (action, domain, accounts = []) => {\n const formData = new FormData();\n formData.append(\"action\", action);\n formData.append(\"token\", getAuthToken());\n formData.append(\"domain\", domain);\n\n accounts.forEach(account => {\n formData.append(\"account[]\", account);\n });\n\n return axios.post(BASE_URL + '/api/v1/bulk/mail/', formData);\n};\n\nexport const handleAction = uri => {\n return axios.get(BASE_URL + uri, {\n params: {\n token: getAuthToken()\n }\n });\n}\n\nexport const addMail = data => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + addMailApiUri, formDataObject);\n}\n\nexport const addMailAccount = (data, domain) => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(`${BASE_URL}${addMailApiUri}?domain=${domain}`, formDataObject);\n}\n\nexport const editMailAccount = (data, domain, account) => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(`${BASE_URL}${updateMailUri}?domain=${domain}&account=${account}`, formDataObject);\n}\n\nexport const getMailInfo = domain => {\n return axios.get(BASE_URL + mailInfoUri, {\n params: {\n domain,\n token: getAuthToken()\n }\n });\n}\n\nexport const updateMail = (data, domain) => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + updateMailUri, formDataObject, {\n params: {\n domain,\n token: getAuthToken()\n }\n });\n}\n\nexport const mailInfoBlockSelectOptions = i18n => [\n {\n value: i18n['Use server hostname'],\n type: 'hostname',\n },\n {\n value: i18n['Use domain hostname'],\n type: 'domain',\n },\n {\n value: i18n['Use STARTTLS'],\n type: 'starttls',\n },\n {\n value: i18n['Use SSL / TLS'],\n type: 'ssl',\n },\n {\n value: i18n['No encryption'],\n type: 'no_encryption',\n }\n];","import React, { useEffect, useState } from 'react';\nimport { useSelector } from 'react-redux';\nimport { Link } from 'react-router-dom';\nimport { mailInfoBlockSelectOptions } from 'src/ControlPanelService/Mail';\n\nimport './MailInfoBlock.scss';\n\nexport default function MailInfoBlock({ webMail, hostName, domain, userName = '', password }) {\n const { i18n } = useSelector(state => state.session);\n const [selectedOption, setSelectedOption] = useState('');\n const [state, setState] = useState({\n imapHostName: hostName,\n smtpHostName: hostName,\n imapEncryption: i18n['STARTTLS'],\n smtpEncryption: i18n['STARTTLS'],\n imapPort: '143',\n smtpPort: '587',\n });\n\n useEffect(() => {\n if (selectedOption === 'hostname') {\n setState({ ...state, imapHostName: hostName, smtpHostName: hostName });\n } else if (selectedOption === \"domain\") {\n setState({ ...state, imapHostName: domain, smtpHostName: domain });\n } else if (selectedOption === \"starttls\") {\n setState({ ...state, imapPort: '143', imapEncryption: 'STARTTLS', smtpPort: '587', smtpEncryption: 'STARTTLS' });\n } else if (selectedOption === \"ssl\") {\n setState({ ...state, imapPort: '993', imapEncryption: 'SSL / TLS', smtpPort: '465', smtpEncryption: 'SSL / TLS' });\n } else if (selectedOption === \"no_encryption\") {\n setState({\n ...state,\n imapHostName: domain,\n smtpHostName: domain,\n imapPort: '143',\n smtpPort: '25',\n imapEncryption: i18n['No encryption'],\n smtpEncryption: i18n['No encryption']\n });\n }\n }, [selectedOption]);\n\n const renderSelectOptions = () => {\n const options = mailInfoBlockSelectOptions(i18n);\n return options.map(option =>\n <option key={option.type} value={option.type}>{option.value}</option>\n );\n }\n\n return (\n <div className=\"mail-info-block\">\n <div class=\"form-group select-group\">\n <select class=\"form-control\" onChange={event => setSelectedOption(event.target.value)}>\n {renderSelectOptions()}\n </select>\n\n <div className=\"details\">\n <div>\n <span>{i18n['Username']}:</span>\n <span>{`${userName}@${domain}`}</span>\n </div>\n\n <div>\n <span>{i18n['Password']}:</span>\n <span>{password || '******'}</span>\n </div>\n\n <div>\n <span>{i18n['IMAP hostname']}:</span>\n <span>{state.imapHostName}</span>\n </div>\n\n <div>\n <span>{i18n['IMAP port']}:</span>\n <span>{state.imapPort}</span>\n </div>\n\n <div>\n <span>{i18n['IMAP security']}:</span>\n <span>{state.imapEncryption}</span>\n </div>\n\n <div>\n <span>{i18n['IMAP auth method']}:</span>\n <span>{i18n['Normal password']}</span>\n </div>\n\n <div>\n <span>{i18n['SMTP hostname']}:</span>\n <span>{state.smtpHostName}</span>\n </div>\n\n <div>\n <span>{i18n['SMTP port']}:</span>\n <span>{state.smtpPort}</span>\n </div>\n\n <div>\n <span>{i18n['SMTP security']}:</span>\n <span>{state.smtpEncryption}</span>\n </div>\n\n <div>\n <span>{i18n['SMTP auth method']}:</span>\n <span>{i18n['Normal password']}</span>\n </div>\n\n <div>\n <span>{i18n['Webmail URL']}:</span>\n <span><Link to={{ pathname: `${window.location.protocol}//${window.location.hostname}${state.webMail}` }}>{webMail}</Link></span>\n </div>\n\n <input type=\"hidden\" name={i18n['Username']} value={`@${domain}`} />\n <input type=\"hidden\" name={i18n['IMAP hostname']} value={state.imapHostName} />\n <input type=\"hidden\" name={i18n['SMTP hostname']} value={state.smtpHostName} />\n <input type=\"hidden\" name={i18n['IMAP port']} value={state.imapPort} />\n <input type=\"hidden\" name={i18n['SMTP port']} value={state.smtpPort} />\n <input type=\"hidden\" name={i18n['IMAP security']} value={state.imapEncryption} />\n <input type=\"hidden\" name={i18n['SMTP security']} value={state.smtpEncryption} />\n <input type=\"hidden\" name={i18n['IMAP auth method']} value={i18n['Normal password']} />\n <input type=\"hidden\" name={i18n['SMTP auth method']} value={i18n['Normal password']} />\n </div>\n </div>\n </div>\n );\n}","import React, { useEffect, useState } from 'react';\n\nimport TextInputWithExtraButton from 'src/components/ControlPanel/AddItemLayout/Form/TextInputWithExtraButton/TextInputWithExtraButton';\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport TextInput from 'src/components/ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport Password from 'src/components/ControlPanel/AddItemLayout/Form/Password/Password';\nimport TextArea from 'src/components/ControlPanel/AddItemLayout/Form/TextArea/TextArea';\nimport Checkbox from 'src/components/ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport { editMailAccount, getMailAccountInfo } from '../../../ControlPanelService/Mail';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport MailInfoBlock from '../MailInfoBlock/MailInfoBlock';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport Spinner from '../../Spinner/Spinner';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nexport default function EditMailAccount(props) {\n const [autoreplyChecked, setAutoreplyChecked] = useState(false);\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const dispatch = useDispatch();\n const history = useHistory();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n quotaValue: '',\n loading: false,\n password: ''\n });\n\n useEffect(() => {\n dispatch(addActiveElement(`/list/mail/`));\n dispatch(removeFocusedElement());\n setState({ ...state, loading: true });\n\n fetchData();\n }, []);\n\n const submitFormHandler = event => {\n event.preventDefault();\n let newMailDomain = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n newMailDomain[name] = value;\n }\n\n newMailDomain['v_domain'] = props.domain;\n newMailDomain['v_account'] = props.account;\n newMailDomain['Password'] = newMailDomain['v_password'];\n\n if (Object.keys(newMailDomain).length !== 0 && newMailDomain.constructor === Object) {\n setState({ ...state, loading: true });\n editMailAccount(newMailDomain, props.domain, props.account)\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n if (error_msg) {\n setErrorMessage(error_msg);\n setOkMessage('');\n } else {\n dispatch(refreshCounters()).then(() => {\n setErrorMessage('');\n setOkMessage(ok_msg);\n });\n }\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const fetchData = () => {\n setState({ ...state, loading: true });\n\n getMailAccountInfo(props.domain, props.account)\n .then(response => {\n setState({\n ...state,\n data: response.data,\n loading: false\n });\n\n setAutoreplyChecked(response.data.autoreply === 'yes');\n })\n .catch(err => console.error(err));\n }\n\n const toggleQuota = () => {\n const value = state.data.quota === 'unlimited' ? '1000' : 'unlimited';\n setState({ ...state, data: { ...state.data, quota: value } });\n }\n\n const goBack = () => {\n history.push(`/list/mail/?domain=${props.domain}`);\n }\n\n return (\n <div className=\"edit-template add-mail-account\">\n <Helmet>\n <title>{`Vesta - ${i18n.MAIL}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Editing Mail Account']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n {errorMessage}</span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> : (\n <form onSubmit={event => submitFormHandler(event)}>\n <input type=\"hidden\" name=\"save\" value=\"save\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <div className=\"r-1\">\n <div className=\"c-1\">\n <TextInput\n title={i18n['Domain']}\n value={props.domain}\n name=\"v_domain\"\n id=\"domain\"\n disabled />\n\n <Password name=\"v_password\" onChange={password => setState({ ...state, password })} />\n\n <TextInputWithExtraButton title={i18n['Quota']} optionalTitle={i18n['in megabytes']} id=\"quota\" name=\"v_quota\" value={state.data.quota}>\n <button type=\"button\" onClick={toggleQuota}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextArea\n optionalTitle={`${i18n['use local-part']}`}\n defaultValue={state.data.aliases}\n title={i18n['Aliases']}\n name=\"v_aliases\"\n id=\"aliases\" />\n\n <TextArea\n optionalTitle={`${i18n['one or more email addresses']}`}\n defaultValue={state.data.fwd}\n title={i18n['Forward to']}\n name=\"v_fwd\"\n id=\"fwd\" />\n\n <Checkbox\n title={i18n['Do not store forwarded mail']}\n defaultChecked={state.data.fwd_only === 'yes'}\n name=\"v_fwd_only\"\n id=\"fwd_only\" />\n\n <Checkbox\n title={i18n['Autoreply']}\n checked={autoreplyChecked}\n onChange={checked => setAutoreplyChecked(checked)}\n name=\"v_autoreply\"\n id=\"autoreply\" />\n\n {\n autoreplyChecked && (\n <div style={{ transform: 'translateX(3rem)' }}>\n <TextArea\n defaultValue={state.data.autoreply_message}\n title={i18n['Message']}\n name=\"v_autoreply_message\"\n id=\"autoreply_message\" />\n </div>\n )\n }\n\n <TextInput\n title={i18n['Send login credentials to email address']}\n value={state.data.send_email}\n name=\"v_credentials\"\n id=\"credentials\" />\n </div>\n\n <div className=\"c-2\">\n <MailInfoBlock\n webMail={state.data.webmail}\n hostName={state.data.hostname}\n userName={props.account}\n password={state.password}\n domain={props.domain} />\n </div>\n </div>\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Add}</button>\n <button type=\"button\" className=\"back\" onClick={goBack}>{i18n.Back}</button>\n </div>\n </form>\n )}\n </AddItemLayout>\n </div>\n );\n}","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport TextInput from '../../ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport Checkbox from '../../ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport { getMailInfo, updateMail } from '../../../ControlPanelService/Mail';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from '../../../components/Spinner/Spinner';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\nimport QS from 'qs';\n\nimport './EditMail.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nconst EditMail = props => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n loading: false\n });\n\n useEffect(() => {\n let queryParams = QS.parse(history.location.search, { ignoreQueryPrefix: true });\n const { domain } = queryParams;\n\n dispatch(addActiveElement('/list/mail/'));\n dispatch(removeFocusedElement());\n\n if (domain) {\n setState({ ...state, loading: true });\n fetchData(domain);\n }\n }, []);\n\n const fetchData = domain => {\n getMailInfo(domain)\n .then(response => {\n setState({\n ...state,\n data: response.data,\n loading: false\n });\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err);\n });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedDomain = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedDomain[name] = value;\n }\n\n updatedDomain['v_domain'] = state.data.domain;\n\n if (Object.keys(updatedDomain).length !== 0 && updatedDomain.constructor === Object) {\n setState({ ...state, loading: true });\n\n updateMail(updatedDomain, state.data.domain)\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n if (error_msg) {\n setErrorMessage(error_msg);\n setOkMessage('');\n } else {\n dispatch(refreshCounters()).then(() => {\n setErrorMessage('');\n setOkMessage(ok_msg);\n });\n }\n }\n })\n .then(() => fetchData(state.data.domain))\n .catch(err => console.error(err));\n }\n }\n\n return (\n <div className=\"edit-template edit-mail\">\n <Helmet>\n <title>{`Vesta - ${i18n.MAIL}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Editing Mail Domain']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}\n </span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout date={state.data.date} time={state.data.time} status={state.data.status}>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"edit-mail\">\n <input type=\"hidden\" name=\"save\" value=\"save\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <TextInput id=\"domain\" name=\"v_domain\" title={i18n['Domain']} value={state.data.domain} disabled />\n\n <Checkbox\n name=\"v_antispam\"\n id=\"antispam\"\n title={i18n['AntiSpam Support']}\n defaultChecked={state.data.antispam === 'yes'} />\n\n <Checkbox\n name=\"v_antivirus\"\n id=\"antivirus\"\n title={i18n['AntiVirus Support']}\n defaultChecked={state.data.antivirus === 'yes'} />\n\n <Checkbox\n name=\"v_dkim\"\n id=\"dkim\"\n title={i18n['DKIM Support']}\n defaultChecked={state.data.dkim === 'yes'} />\n\n <TextInput id=\"catchall\" name=\"v_catchall\" title={i18n['Catchall email']} value={state.data.catchall} />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/mail/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div>\n );\n}\n\nexport default EditMail;","import React, { useEffect, useState } from 'react';\nimport EditMailAccount from 'src/components/MailAccount/Edit/EditMailAccount';\nimport EditMail from 'src/components/Mail/Edit/EditMail';\nimport { useHistory } from 'react-router-dom';\nimport QueryString from 'qs';\nimport { Helmet } from 'react-helmet';\nimport { useSelector } from 'react-redux';\n\nexport default function EditMailWrapper() {\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const parsedQueryString = QueryString.parse(history.location.search, { ignoreQueryPrefix: true });\n const [isMailAccount, setIsMailAccount] = useState(false);\n\n useEffect(() => {\n if (parsedQueryString.domain && parsedQueryString.account) {\n setIsMailAccount(true);\n } else {\n setIsMailAccount(false);\n }\n }, [history.location]);\n\n return (\n <>\n <Helmet>\n <title>{`Vesta - ${i18n.MAIL}`}</title>\n </Helmet>\n {\n isMailAccount\n ? <EditMailAccount domain={parsedQueryString.domain} account={parsedQueryString.account} />\n : <EditMail />\n }\n </>\n );\n}","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"../../../../actions/MainNavigation/mainNavigationActions\";\nimport Checkbox from '../../../ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport TextArea from '../../../ControlPanel/AddItemLayout/Form/TextArea/TextArea';\nimport AddItemLayout from '../../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { getServiceInfo, updateService } from 'src/ControlPanelService/Server';\nimport Spinner from '../../../../components/Spinner/Spinner';\nimport Toolbar from '../../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './Service.scss';\nimport { Helmet } from 'react-helmet';\nimport HtmlParser from 'react-html-parser';\n\nconst Service = ({ serviceName = '' }) => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n loading: false\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/server/'));\n dispatch(removeFocusedElement());\n\n if (!serviceName) {\n history.push('/list/server');\n }\n\n setState({ ...state, loading: true });\n fetchData(serviceName);\n }, []);\n\n const fetchData = serviceName => {\n getServiceInfo(serviceName)\n .then(response => {\n const { config } = response.data;\n\n if (!config || config.includes(\"file doesn't exist\")) {\n history.push('/list/server');\n }\n\n setState({ ...state, data: response.data, loading: false });\n })\n .catch(err => console.error(err));\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedService = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedService[name] = value;\n }\n\n if (Object.keys(updatedService).length !== 0 && updatedService.constructor === Object) {\n setState({ ...state, loading: true });\n\n updateService(updatedService, serviceName)\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n setErrorMessage(error_msg || '');\n setOkMessage(ok_msg || '');\n }\n })\n .then(() => fetchData(serviceName))\n .catch(err => console.error(err));\n }\n }\n\n return (\n <div className=\"edit-template edit-service\">\n <Helmet>\n <title>{`Vesta - ${i18n.SERVER}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">\n {i18n['Configuring Server']} / {state.data.service_name}\n </div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}\n </span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"edit-service\">\n <input type=\"hidden\" name=\"save\" value=\"save\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <TextArea\n defaultValue={state.data.config}\n title={state.data.config_path}\n name=\"v_config\"\n id=\"v_config\"\n rows=\"18\" />\n\n <br />\n\n <Checkbox\n title={i18n['restart']}\n defaultChecked={true}\n name=\"v_restart\"\n id=\"restart\" />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/server/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div >\n );\n}\n\nexport default Service;","import React, { useEffect, useState } from 'react';\n\nimport TextInputWithExtraButton from 'src/components/ControlPanel/AddItemLayout/Form/TextInputWithExtraButton/TextInputWithExtraButton';\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport TextInput from 'src/components/ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport Password from 'src/components/ControlPanel/AddItemLayout/Form/Password/Password';\nimport TextArea from 'src/components/ControlPanel/AddItemLayout/Form/TextArea/TextArea';\nimport Checkbox from 'src/components/ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { addMailAccount, getMailList } from '../../../ControlPanelService/Mail';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport MailInfoBlock from '../MailInfoBlock/MailInfoBlock';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport Spinner from '../../Spinner/Spinner';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './AddMailAccount.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nexport default function AddMailAccount(props) {\n const { i18n } = useSelector(state => state.session);\n const dispatch = useDispatch();\n const token = localStorage.getItem(\"token\");\n const history = useHistory();\n const [state, setState] = useState({\n data: {},\n advancedOptions: false,\n autoreplyChecked: false,\n quotaValue: '',\n loading: false,\n password: '',\n userName: '',\n okMessage: '',\n errorMessage: '',\n });\n\n useEffect(() => {\n dispatch(addActiveElement(`/list/mail/`));\n dispatch(removeFocusedElement());\n\n fetchData();\n }, []);\n\n const submitFormHandler = event => {\n event.preventDefault();\n let newMailDomain = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n newMailDomain[name] = value;\n }\n\n newMailDomain['ok_acc'] = 'add';\n newMailDomain['token'] = token;\n newMailDomain['v_domain'] = props.domain;\n newMailDomain['Password'] = newMailDomain['v_password'];\n\n if (Object.keys(newMailDomain).length !== 0 && newMailDomain.constructor === Object) {\n setState({ ...state, loading: true });\n addMailAccount(newMailDomain, props.domain)\n .then(result => {\n if (result.status === 200) {\n const { error_msg: errorMessage, ok_msg: okMessage } = result.data;\n\n if (errorMessage) {\n setState({ ...state, errorMessage, okMessage, loading: false });\n } else {\n dispatch(refreshCounters()).then(() => {\n setState({ ...state, okMessage, errorMessage: '', loading: false });\n });\n }\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const fetchData = () => {\n setState({ ...state, loading: true });\n\n getMailList()\n .then(response => {\n setState({\n ...state,\n data: response.data,\n errorMessage: response.data['error_msg'],\n okMessage: response.data['ok_msg'],\n loading: false\n });\n })\n .catch(err => console.error(err));\n }\n\n const toggleOptions = () => {\n setState({ ...state, advancedOptions: !state.advancedOptions });\n }\n\n const toggleQuotaValue = () => {\n if (state.quotaValue !== 'unlimited') {\n setState({ ...state, quotaValue: 'unlimited' });\n } else {\n setState({ ...state, quotaValue: '' });\n }\n }\n\n return (\n <div className=\"edit-template add-mail-account\">\n <Helmet>\n <title>{`Vesta - ${i18n.MAIL}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Adding Mail Account']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {state.errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n {state.errorMessage}</span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {state.okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n <span>{HtmlParser(state.okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> : (\n <form onSubmit={event => submitFormHandler(event)}>\n <div className=\"r-1\">\n <div className=\"c-1\">\n <TextInput\n title={i18n['Domain']}\n value={props.domain}\n name=\"v_domain\"\n id=\"domain\"\n disabled />\n\n <TextInput\n title={i18n['Account']}\n onChange={e => setState({ ...state, username: e.target.value })}\n name=\"v_account\"\n id=\"account\" />\n\n <Password name=\"v_password\" onChange={password => setState({ ...state, password })} />\n </div>\n\n <div className=\"c-2\">\n <MailInfoBlock\n webMail={state.data.webmail}\n hostName={state.data.hostname}\n userName={state.userName}\n password={state.password}\n domain={props.domain} />\n </div>\n </div>\n\n <div className=\"r-2\">\n <button type=\"button\" onClick={toggleOptions}>\n {i18n['Advanced options']}\n {state.advancedOptions ? <FontAwesomeIcon icon=\"caret-up\" /> : <FontAwesomeIcon icon=\"caret-down\" />}\n </button>\n\n {\n state.advancedOptions && (\n <>\n <TextInputWithExtraButton title={i18n['Quota']} optionalTitle={i18n['in megabytes']} id=\"quota\" name=\"v_quota\" value={state.quotaValue}>\n <button type=\"button\" onClick={toggleQuotaValue}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextArea\n optionalTitle={`${i18n['use local-part']}`}\n defaultValue={state.data.v_aliases}\n title={i18n['Aliases']}\n name=\"v_aliases\"\n id=\"aliases\" />\n\n <TextArea\n optionalTitle={`${i18n['one or more email addresses']}`}\n defaultValue={state.data.forward}\n title={i18n['Forward to']}\n name=\"v_fwd\"\n id=\"fwd\" />\n\n <Checkbox\n title={i18n['Do not store forwarded mail']}\n name=\"v_fwd_only\"\n id=\"fwd_only\" />\n </>\n )\n }\n\n <TextInput\n title={i18n['Send login credentials to email address']}\n name=\"v_credentials\"\n id=\"credentials\" />\n </div>\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Add}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push(`/list/mail/?domain=${props.domain}`)}>{i18n.Back}</button>\n </div>\n </form>\n )}\n </AddItemLayout>\n </div>\n );\n}","import React, { useEffect, useState } from 'react';\n\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { addMail } from '../../../ControlPanelService/Mail';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport Spinner from '../../Spinner/Spinner';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './AddMail.scss'\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nconst AddMail = props => {\n const { i18n } = useSelector(state => state.session);\n const dispatch = useDispatch();\n const token = localStorage.getItem(\"token\");\n const history = useHistory();\n const [state, setState] = useState({\n loading: false,\n antiSpamChecked: true,\n antiVirusChecked: true,\n dkimChecked: true,\n okMessage: '',\n errorMessage: '',\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/mail/'));\n dispatch(removeFocusedElement());\n }, []);\n\n const submitFormHandler = event => {\n event.preventDefault();\n let newMailDomain = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n newMailDomain[name] = value;\n }\n\n if (Object.keys(newMailDomain).length !== 0 && newMailDomain.constructor === Object) {\n setState({ ...state, loading: true });\n addMail(newMailDomain)\n .then(result => {\n if (result.status === 200) {\n const { error_msg: errorMessage, ok_msg: okMessage } = result.data;\n\n if (errorMessage) {\n setState({ ...state, errorMessage, okMessage, loading: false });\n } else {\n dispatch(refreshCounters()).then(() => {\n setState({ ...state, okMessage, errorMessage: '', loading: false });\n });\n }\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n return (\n <div className=\"edit-template add-web\">\n <Helmet>\n <title>{`Vesta - ${i18n.MAIL}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Adding Mail Domain']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {state.errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n {state.errorMessage}</span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {state.okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n <span>{HtmlParser(state.okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> : (\n <form onSubmit={event => submitFormHandler(event)}>\n <input type=\"hidden\" name=\"ok\" value=\"add\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <div className=\"form-group\">\n <label htmlFor=\"domain\">{i18n.Domain}</label>\n <input type=\"text\" className=\"form-control\" id=\"domain\" name=\"v_domain\" />\n </div>\n\n <div className=\"form-group\">\n <div className=\"checkbox-wrapper\">\n <input\n type=\"checkbox\"\n name=\"v_antispam\"\n id=\"antispam-support\"\n onChange={event => setState({ ...state, antiSpamChecked: event.target.checked })}\n checked={state.antiSpamChecked} />\n <label htmlFor=\"antispam-support\">{i18n['AntiSpam Support']}</label>\n </div>\n </div>\n\n <div className=\"form-group\">\n <div className=\"checkbox-wrapper\">\n <input\n type=\"checkbox\"\n name=\"v_antivirus\"\n id=\"antivirus-support\"\n onChange={event => setState({ ...state, antiVirusChecked: event.target.checked })}\n checked={state.antiVirusChecked} />\n <label htmlFor=\"antivirus-support\">{i18n['AntiVirus Support']}</label>\n </div>\n </div>\n\n <div className=\"form-group\">\n <div className=\"checkbox-wrapper\">\n <input\n type=\"checkbox\"\n name=\"v_dkim\"\n id=\"dkim-support\"\n onChange={event => setState({ ...state, dkimChecked: event.target.checked })}\n checked={state.dkimChecked} />\n <label htmlFor=\"dkim-support\">{i18n['DKIM Support']}</label>\n </div>\n </div>\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Add}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/mail/')}>{i18n.Back}</button>\n </div>\n </form>\n )}\n </AddItemLayout>\n </div>\n );\n}\n\nexport default AddMail;","import React, { useEffect, useState } from 'react';\nimport AddMailAccount from 'src/components/MailAccount/Add/AddMailAccount';\nimport AddMail from 'src/components/Mail/Add/AddMail';\nimport { useHistory } from 'react-router-dom';\nimport QueryString from 'qs';\nimport { Helmet } from 'react-helmet';\nimport { useSelector } from 'react-redux';\n\nexport default function AddMailWrapper() {\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const [domain, setDomain] = useState(false);\n\n useEffect(() => {\n const parsedQueryString = QueryString.parse(history.location.search, { ignoreQueryPrefix: true });\n\n if (parsedQueryString.domain) {\n setDomain(parsedQueryString.domain);\n } else {\n setDomain('');\n }\n }, [history.location]);\n\n return (\n <>\n <Helmet>\n <title>{`Vesta - ${i18n.MAIL}`}</title>\n </Helmet>\n {\n domain\n ? <AddMailAccount domain={domain} />\n : <AddMail />\n }\n </>\n );\n}","import axios from \"axios\";\nimport { getAuthToken } from \"src/utils/token\";\n\nconst updateDNSUri = '/api/v1/edit/dns/index.php';\nconst addDnsApiUri = '/api/v1/add/dns/index.php';\nconst dNSInfoUri = '/api/v1/edit/dns/index.php';\nconst BASE_URL = window.location.origin;\nconst dnsApiUri = '/api/v1/list/dns/index.php';\n\nexport const getDnsList = () => {\n return axios.get(BASE_URL + dnsApiUri);\n}\n\nexport const getDNSRecordsList = domain => {\n return axios.get(`${BASE_URL}${dnsApiUri}?domain=${domain}`);\n}\n\nexport const getDNSRecordInfo = (domain, recordId) => {\n return axios.get(`${BASE_URL}${updateDNSUri}?domain=${domain}&record_id=${recordId}`);\n}\n\nexport const bulkDomainAction = (action, domains) => {\n const formData = new FormData();\n formData.append(\"action\", action);\n formData.append(\"token\", getAuthToken());\n\n domains.forEach(record => {\n formData.append(\"domain[]\", record);\n });\n\n return axios.post(BASE_URL + '/api/v1/bulk/dns/', formData);\n};\n\nexport const bulkAction = (action, records, domain) => {\n const formData = new FormData();\n formData.append(\"action\", action);\n formData.append(\"token\", getAuthToken());\n formData.append(\"domain\", domain);\n\n records.forEach(record => {\n formData.append(\"record[]\", record);\n });\n\n return axios.post(BASE_URL + '/api/v1/bulk/dns/', formData);\n};\n\nexport const handleAction = uri => {\n return axios.get(BASE_URL + uri, {\n params: {\n token: getAuthToken()\n }\n });\n}\n\nexport const addDomainNameSystem = data => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + addDnsApiUri, formDataObject);\n}\n\nexport const addDomainNameSystemRecord = data => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + addDnsApiUri, formDataObject);\n}\n\nexport const getDNSInfo = domain => {\n return axios.get(BASE_URL + dNSInfoUri, {\n params: {\n domain,\n token: getAuthToken()\n }\n });\n}\n\nexport const updateDNS = (data, domain, recordId) => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + updateDNSUri, formDataObject, {\n params: {\n domain,\n record_id: recordId,\n token: getAuthToken()\n }\n });\n}","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport SelectInput from '../../ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport TextInput from '../../ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { getDNSInfo, updateDNS } from '../../../ControlPanelService/Dns';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from '../../../components/Spinner/Spinner';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\nimport QS from 'qs';\n\nimport './EditDomainNameSystem.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nconst EditDomainNameSystem = props => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n loading: false\n });\n\n useEffect(() => {\n let queryParams = QS.parse(history.location.search, { ignoreQueryPrefix: true });\n const { domain } = queryParams;\n\n dispatch(addActiveElement('/list/dns/'));\n dispatch(removeFocusedElement());\n\n if (domain) {\n setState({ ...state, loading: true });\n fetchData(domain);\n }\n }, []);\n\n const fetchData = domain => {\n getDNSInfo(domain)\n .then(response => {\n setState({\n ...state,\n data: response.data,\n loading: false\n });\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err)\n });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedDomain = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedDomain[name] = value;\n }\n\n updatedDomain['v_domain'] = state.data.domain;\n\n if (Object.keys(updatedDomain).length !== 0 && updatedDomain.constructor === Object) {\n setState({ ...state, loading: true });\n\n updateDNS(updatedDomain, state.data.domain)\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n if (error_msg) {\n setErrorMessage(error_msg);\n setOkMessage('');\n } else {\n dispatch(refreshCounters()).then(() => {\n setErrorMessage('');\n setOkMessage(ok_msg);\n });\n }\n }\n })\n .then(() => fetchData(state.data.domain))\n .catch(err => console.error(err));\n }\n }\n\n return (\n <div className=\"edit-template edit-dns\">\n <Helmet>\n <title>{`Vesta - ${i18n.DNS}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Editing DNS Domain']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}\n </span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout date={state.data.date} time={state.data.time} status={state.data.status}>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"edit-dns\">\n <input type=\"hidden\" name=\"save\" value=\"save\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <TextInput id=\"domain\" name=\"v_domain\" title={i18n['Domain']} value={state.data.domain} disabled />\n\n <TextInput id=\"ip\" name=\"v_ip\" title={i18n['IP Address']} value={state.data.ip} />\n\n <SelectInput\n optionalTitle={state.data.dns_system}\n options={state.data.templates}\n selected={state.data.template}\n title={i18n['Template']}\n name=\"v_template\"\n id=\"templates\" />\n\n <TextInput\n optionalTitle={state.data['YYYY-MM-DD']}\n title={i18n['Expiration Date']}\n value={state.data.exp}\n name=\"v_exp\"\n id=\"exp\" />\n\n <TextInput id=\"soa\" name=\"v_soa\" title=\"SOA\" value={state.data.soa} />\n\n <TextInput id=\"ttl\" name=\"v_ttl\" title=\"TTL\" value={state.data.ttl} />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/dns/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div>\n );\n}\n\nexport default EditDomainNameSystem;","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport SelectInput from 'src/components/ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport TextInput from '../../ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { updateDNS, getDNSRecordInfo } from 'src/ControlPanelService/Dns';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from '../../../components/Spinner/Spinner';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\nimport QS from 'qs';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nexport default function EditDNSRecord(props) {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const dispatch = useDispatch();\n const history = useHistory();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n selectOptions: [\n 'A',\n 'AAAA',\n 'NS',\n 'CNAME',\n 'MX',\n 'TXT',\n 'SRV',\n 'DNSKEY',\n 'KEY',\n 'IPSECKEY',\n 'PTR',\n 'SPF',\n 'TLSA',\n 'CAA'\n ],\n loading: false\n });\n\n useEffect(() => {\n const { domain, record_id } = props;\n\n dispatch(addActiveElement('/list/dns/'));\n dispatch(removeFocusedElement());\n\n if (domain && record_id) {\n setState({ ...state, loading: true });\n fetchData(domain, record_id);\n }\n }, []);\n\n const fetchData = (domain, record_id) => {\n getDNSRecordInfo(domain, record_id)\n .then(response => {\n setState({\n ...state,\n data: response.data,\n loading: false\n });\n })\n .catch(err => console.error(err));\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedRecord = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedRecord[name] = value;\n }\n\n updatedRecord['v_domain'] = state.data.domain;\n updatedRecord['v_record_id'] = props.record_id;\n updatedRecord['v_type'] = state.data.type;\n\n if (Object.keys(updatedRecord).length !== 0 && updatedRecord.constructor === Object) {\n setState({ ...state, loading: true });\n\n updateDNS(updatedRecord, props.domain, props.record_id)\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n if (error_msg) {\n setOkMessage('');\n setErrorMessage(error_msg);\n } else {\n dispatch(refreshCounters()).then(() => {\n setOkMessage(ok_msg);\n setErrorMessage('');\n });\n }\n }\n })\n .then(() => fetchData(props.domain, props.record_id))\n .catch(err => console.error(err));\n }\n }\n\n return (\n <div className=\"edit-template edit-dns-rec\">\n <Helmet>\n <title>{`Vesta - ${i18n.DNS}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Editing DNS Record']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}\n </span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout date={state.data.date} time={state.data.time} status={state.data.status}>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"edit-dns-rec\">\n <input type=\"hidden\" name=\"save\" value=\"save\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <TextInput\n title={i18n['Domain']}\n value={props.domain}\n name=\"v_domain\"\n id=\"domain\"\n disabled />\n\n <TextInput\n value={state.data.rec}\n title={i18n['Record']}\n name=\"v_record_id\"\n id=\"domain\"\n disabled />\n\n <SelectInput\n options={state.selectOptions}\n selected={state.data.type}\n title={i18n['Type']}\n name=\"v_type\"\n id=\"type\"\n disabled />\n\n <TextInput\n title={i18n['IP or Value']}\n value={state.data.val}\n name=\"v_val\"\n id=\"val\" />\n\n <TextInput\n optionalTitle={`(${i18n['optional']})`}\n value={state.data.priority}\n title={i18n['Priority']}\n name=\"v_priority\"\n id=\"priority\" />\n\n <TextInput\n optionalTitle={`(${i18n['internal']})`}\n title={i18n['Record Number']}\n value={state.data.record_id}\n name=\"v_priority\"\n id=\"priority\" />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push(`/list/dns?domain=${props.domain}`)}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div>\n );\n}","import React, { useEffect, useState } from 'react';\nimport EditDomainNameSystem from 'src/components/DomainNameSystem/Edit/EditDomainNameSystem';\nimport EditDNSRecord from 'src/components/DNSRecord/Edit/EditDNSRecord';\nimport { useHistory } from 'react-router-dom';\nimport QueryString from 'qs';\nimport { Helmet } from 'react-helmet';\nimport { useSelector } from 'react-redux';\n\nexport default function EditDNSWrapper() {\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const parsedQueryString = QueryString.parse(history.location.search, { ignoreQueryPrefix: true });\n const [isDnsRecord, setIsDnsRecord] = useState(false);\n\n useEffect(() => {\n if (parsedQueryString.domain && parsedQueryString.record_id) {\n setIsDnsRecord(true);\n } else {\n setIsDnsRecord(false);\n }\n }, [history.location]);\n\n return (\n <>\n <Helmet>\n <title>{`Vesta - ${i18n.DNS}`}</title>\n </Helmet>\n {\n isDnsRecord\n ? <EditDNSRecord domain={parsedQueryString.domain} record_id={parsedQueryString.record_id} />\n : <EditDomainNameSystem />\n }\n </>\n );\n}","import React, { useEffect, useState } from 'react';\nimport { useSelector } from 'react-redux';\nimport Checkbox from '../../../ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport TextArea from '../../../ControlPanel/AddItemLayout/Form/TextArea/TextArea';\n\nimport './SslSupport.scss';\n\nconst SslSupport = props => {\n const { i18n } = useSelector(state => state.session);\n const [letsEncrypt, setLetsEncrypt] = useState(props.letsEncrypt);\n\n useEffect(() => {\n setLetsEncrypt(props.letsEncrypt);\n }, []);\n\n const onChangeLetsEncrypt = checked => {\n setLetsEncrypt(checked);\n }\n\n return (\n <div className=\"ssl-support\">\n <>\n <Checkbox\n onChange={onChangeLetsEncrypt}\n name=\"v_letsencrypt\"\n id=\"lets-encrypt\"\n title={i18n['Lets Encrypt Support']}\n defaultChecked={letsEncrypt} />\n\n {!props.letsEncrypt && <span className=\"lets-encrypt-span\">{letsEncrypt ? i18n['Your certificate will be automatically issued in 5 minutes'] : null}</span>}\n </>\n\n <input type=\"hidden\" value=\"same\" name=\"v_ssl_home\" />\n\n <TextArea\n id=\"ssl-certificate\"\n name=\"v_ssl_crt\"\n title={i18n['SSL Certificate']}\n defaultValue={props.sslCertificate}\n disabled={letsEncrypt}\n optionalTitle={<>/ <button type=\"button\" onClick={() => props.setModalVisible(true)} className=\"generate-csr\">{i18n['Generate CSR']}</button></>} />\n\n <TextArea\n id=\"ssl-key\"\n name=\"v_ssl_key\"\n disabled={letsEncrypt}\n defaultValue={props.sslKey}\n title={i18n['SSL Key']} />\n\n <TextArea\n id=\"ssl-ca\"\n name=\"v_ssl_ca\"\n disabled={letsEncrypt}\n defaultValue={props.sslCertificateAuthority}\n title={i18n['SSL Certificate Authority / Intermediate']}\n optionalTitle={`( ${i18n['optional']} )`} />\n\n <div className=\"additional-info\">\n {\n props.sslSubject.length > 0\n && (\n <div>\n <span>{i18n['SUBJECT']}:</span>\n <span>{props.sslSubject}</span>\n </div>\n )\n }\n\n {\n props.sslAliases.length > 0\n && (\n <div>\n <span>{i18n['ALIASES']}:</span>\n <span>{props.sslAliases}</span>\n </div>\n )\n }\n\n {\n props.sslNotBefore.length > 0\n && (\n <div>\n <span>{i18n['NOT_BEFORE']}:</span>\n <span>{props.sslNotBefore}</span>\n </div>\n )\n }\n\n {\n props.sslNotAfter.length > 0\n && (\n <div>\n <span>{i18n['NOT_AFTER']}:</span>\n <span>{props.sslNotAfter}</span>\n </div>\n )\n }\n\n {\n props.sslSignature.length > 0\n && (\n <div>\n <span>{i18n['SIGNATURE']}:</span>\n <span>{props.sslSignature}</span>\n </div>\n )\n }\n\n {\n props.sslPubKey.length > 0\n && (\n <div>\n <span>{i18n['PUB_KEY']}:</span>\n <span>{props.sslPubKey}</span>\n </div>\n )\n }\n\n {\n props.sslIssuer.length > 0\n && (\n <div>\n <span>{i18n['ISSUER']}:</span>\n <span>{props.sslIssuer}</span>\n </div>\n )\n }\n </div>\n\n <br />\n <br />\n </div>\n );\n}\n\nexport default SslSupport;\n","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport { updateWebDomain, getDomainInfo } from '../../../ControlPanelService/Web';\nimport Password from '../../../components/ControlPanel/AddItemLayout/Form/Password/Password';\nimport SelectInput from '../../ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport AdditionalFtpWrapper from '../Add/AdditionalFtpWrapper/AdditionalFtpWrapper';\nimport TextInput from '../../ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport Checkbox from '../../ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from '../../../components/Spinner/Spinner';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport SslSupport from './SslSupport/SslSupport';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\nimport GenerateSSL from 'src/containers/GenerateCSR';\nimport 'src/components/Modal/Modal.scss';\nimport QS from 'qs';\n\nimport './EditWeb.scss';\nimport TextArea from '../../ControlPanel/AddItemLayout/Form/TextArea/TextArea';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nconst EditWeb = props => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const { session } = useSelector(state => state.userSession);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [modalVisible, setModalVisible] = useState(false);\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n domain: '',\n webStat: '',\n sslSupport: false,\n letsEncrypt: false,\n additionalFtp: false,\n proxySupport: false,\n statAuth: false,\n loading: false\n });\n\n useEffect(() => {\n let queryParams = QS.parse(history.location.search, { ignoreQueryPrefix: true });\n const { domain } = queryParams;\n\n dispatch(addActiveElement('/list/web/'));\n dispatch(removeFocusedElement());\n\n if (domain) {\n setState({ ...state, loading: true });\n fetchData(domain);\n }\n }, []);\n\n const fetchData = domain => {\n getDomainInfo(domain)\n .then(response => {\n setState({\n ...state,\n domain,\n webStat: response.data.v_stats ? response.data.v_stats : 'none',\n sslSupport: response.data.ssl === 'yes',\n letsEncrypt: response.data.letsencrypt === 'yes',\n proxySupport: !!response.data.proxy,\n data: response.data,\n additionalFtp: !!response.data.ftp_user,\n statAuth: response.data.stats_user,\n loading: false\n });\n })\n .catch(err => console.error(err));\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedDomain = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedDomain[name] = value;\n }\n\n updatedDomain['v_domain'] = state.domain;\n\n if (updatedDomain['v_ssl'] === 'on') {\n updatedDomain['v_ssl'] = 'yes';\n } else {\n delete updatedDomain['v_ssl'];\n }\n\n if (updatedDomain['v_letsencrypt'] === 'on') {\n updatedDomain['v_letsencrypt'] = 'yes';\n } else {\n delete updatedDomain['v_letsencrypt'];\n }\n\n if (!updatedDomain['v_ssl_ca']) {\n delete updatedDomain['v_ssl_ca'];\n }\n\n if (!updatedDomain['v_ssl_crt']) {\n delete updatedDomain['v_ssl_crt'];\n }\n\n if (!updatedDomain['v_ssl_key']) {\n delete updatedDomain['v_ssl_key'];\n }\n\n if (Object.keys(updatedDomain).length !== 0 && updatedDomain.constructor === Object) {\n setState({ ...state, loading: true });\n\n updateWebDomain(updatedDomain, state.domain)\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n if (error_msg) {\n setErrorMessage(error_msg);\n setOkMessage('');\n setState({ ...state, loading: false });\n } else {\n dispatch(refreshCounters()).then(() => {\n setErrorMessage('');\n setOkMessage(ok_msg);\n fetchData(state.domain);\n });\n }\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const formatData = object => {\n let result = [];\n\n for (let i in object) {\n result.push(i);\n }\n\n return result;\n }\n\n const onChangeSslSupport = checked => {\n setState({ ...state, sslSupport: checked });\n }\n\n const onChangeProxySupport = checked => {\n setState({ ...state, proxySupport: checked });\n }\n\n const onChangeWebStats = webStat => {\n setState({ ...state, webStat });\n }\n\n const onChangeStatisticsAuth = statAuth => {\n setState({ ...state, statAuth });\n }\n\n const onChangeAdditionalFtp = additionalFtp => {\n setState({ ...state, additionalFtp });\n }\n\n return (\n <div className=\"edit-template edit-web\">\n <Helmet>\n <title>{`Vesta - ${i18n.WEB}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Editing Domain']}</div>\n <div className=\"error\"><span className=\"error-message\">{errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}</span></div>\n <div className=\"success\">\n <span className=\"ok-message\">{okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span> </span>\n </div>\n </Toolbar>\n <AddItemLayout date={state.data.date} time={state.data.time} status={state.data.status}>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"add-web\">\n <input type=\"hidden\" name=\"save\" value=\"save\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <TextInput id=\"domain\" name=\"v_domain\" title={i18n['Domain']} value={state.domain} disabled />\n\n <SelectInput\n options={formatData(state.data.ips)}\n selected={state.data.ip}\n name=\"v_ip\"\n id=\"ip\"\n title={i18n['IP Address']} />\n\n <TextArea\n id=\"proxy-aliases\"\n name=\"v_aliases\"\n title={i18n['Aliases']}\n defaultValue={state.data.aliases} />\n\n <SelectInput\n options={state.data.templates}\n selected={state.data.template}\n name=\"v_template\"\n id=\"web-template\"\n optionalTitle={state.data.web_system}\n title={i18n['Web Template']} />\n\n {\n session.WEB_BACKEND && (\n <SelectInput\n options={state.data.backend_templates}\n selected={state.data.backend_template || 'default'}\n name=\"v_backend_template\"\n id=\"backend-template\"\n optionalTitle={state.data.web_backend}\n title={i18n['Backend Template']} />\n )\n }\n\n {\n state.data.proxy_system && (\n <>\n <Checkbox\n onChange={onChangeProxySupport}\n name=\"v_proxy\"\n id=\"proxy\"\n title={i18n['Proxy Support'] ?? 'Proxy Support'}\n defaultChecked={state.proxySupport} />\n\n {\n state.proxySupport && (<div style={{ transform: 'translateX(3rem)' }}>\n <SelectInput\n options={state.data.proxy_templates}\n selected={state.data.proxy_template || 'default'}\n optionalTitle={state.data.proxy_system}\n name=\"v_proxy_template\"\n id=\"proxy_template\"\n title={i18n['Proxy Template']} />\n\n <TextArea\n id=\"proxy-extensions\"\n name=\"v_proxy_ext\"\n title={i18n['Proxy Extensions']}\n defaultValue={state.data.proxy_ext} />\n </div>)\n }\n </>\n )\n }\n\n <Checkbox\n onChange={onChangeSslSupport}\n name=\"v_ssl\"\n id=\"ssl-support\"\n title={i18n['SSL Support'] ?? 'SSL Support'}\n defaultChecked={state.sslSupport} />\n\n {\n state.sslSupport && (\n <SslSupport\n sslSubject={state.data.ssl_subject}\n sslAliases={state.data.ssl_aliases}\n sslNotBefore={state.data.ssl_not_before}\n sslNotAfter={state.data.ssl_not_after}\n sslSignature={state.data.ssl_signature}\n sslPubKey={state.data.ssl_pub_key}\n sslIssuer={state.data.ssl_issuer}\n sslCertificate={state.data.ssl_crt}\n sslKey={state.data.ssl_key}\n setModalVisible={bool => setModalVisible(bool)}\n sslCertificateAuthority={state.data.ssl_ca}\n domain={state.domain}\n sslHome={state.data.ssl_home}\n letsEncrypt={state.letsEncrypt}\n />\n )\n }\n\n <SelectInput\n options={state.data.stats}\n selected={state.webStat}\n title={i18n['Web Statistics']}\n onChange={onChangeWebStats}\n name=\"v_stats\"\n id=\"stats\" />\n\n {\n state.webStat !== 'none' && (\n <div className=\"web-stat-additional\">\n <Checkbox\n onChange={onChangeStatisticsAuth}\n name=\"v_stats_auth\"\n id=\"stat-auth\"\n defaultChecked={state.data.stats_user}\n title={i18n['Statistics Authorization']} />\n\n {\n state.statAuth && (\n <>\n <TextInput id=\"domain\" name=\"v_stats_user\" title={i18n['Username']} value={state.data.stats_user} />\n\n <Password name='v_stats_password' />\n </>\n )\n }\n </div>\n )\n }\n\n <Checkbox\n onChange={onChangeAdditionalFtp}\n name=\"v_ftp\"\n id=\"add-ftp\"\n checked={state.additionalFtp}\n title={i18n['Additional FTP Account']} />\n\n <AdditionalFtpWrapper\n checked={state.additionalFtp}\n prefixI18N={state.data.prefixI18N}\n ftps={state.data.ftp_users}\n ftpUserPrePath={state.data.ftp_user_prepath}\n unCheckAdditionalFtpBox={() => onChangeAdditionalFtp(false)} />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/web/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n\n <div className={`modal fade ${modalVisible ? 'show' : ''}`} id=\"c-panel-modal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"exampleModalLabel\" aria-hidden=\"true\" style={{ display: modalVisible ? 'block' : 'none' }}>\n <div className=\"modal-dialog\" role=\"document\">\n <div className=\"modal-content\">\n <div className=\"modal-header\">\n <h5>{i18n['Generating CSR']}</h5>\n <button type=\"button\" onClick={() => setModalVisible(false)} className=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n </div>\n <GenerateSSL\n domain={state.domain}\n closeModal={() => setModalVisible(false)}\n prePopulateInputs={({ crt, key }) => {\n setState({ ...state, data: { ...state.data, ssl_crt: crt, ssl_key: key } });\n setModalVisible(false);\n }} />\n </div>\n </div>\n </div>\n </div>\n );\n}\n\nexport default EditWeb;\n","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"../../../../actions/MainNavigation/mainNavigationActions\";\nimport TextInput from '../../../ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport Checkbox from '../../../ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport TextArea from '../../../ControlPanel/AddItemLayout/Form/TextArea/TextArea';\nimport { getServiceInfo, updateService } from 'src/ControlPanelService/Server';\nimport AddItemLayout from '../../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from '../../../../components/Spinner/Spinner';\nimport Toolbar from '../../../MainNav/Toolbar/Toolbar';\nimport { Link, useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './EditPhp.scss';\nimport { Helmet } from 'react-helmet';\nimport HtmlParser from 'react-html-parser';\n\nconst EditPhp = ({ serviceName = '' }) => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [restart, setRestart] = useState(true);\n const [state, setState] = useState({\n data: {},\n loading: false,\n basicOptions: true,\n advancedOptions: false\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/server/'));\n dispatch(removeFocusedElement());\n\n if (!serviceName) {\n history.push('/list/server');\n }\n\n setState({ ...state, loading: true });\n fetchData();\n }, []);\n\n const fetchData = () => {\n getServiceInfo(serviceName)\n .then(response => {\n setState({\n ...state,\n data: response.data,\n loading: false\n });\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err);\n });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedService = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedService[name] = value;\n }\n\n if (Object.keys(updatedService).length !== 0 && updatedService.constructor === Object) {\n setState({ ...state, loading: true });\n\n updatedService['v_config'] = state.data.config;\n updatedService['v_restart'] = restart ? 'yes' : 'no';\n\n updateService(updatedService, `/${serviceName}`)\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n setErrorMessage(error_msg || '');\n setOkMessage(ok_msg || '');\n }\n })\n .then(() => fetchData())\n .catch(err => console.error(err));\n }\n }\n\n const toggleOptions = () => {\n setState({\n ...state,\n advancedOptions: !state.advancedOptions,\n basicOptions: !state.basicOptions\n });\n }\n\n const onUpdateConfig = ({ id, value }) => {\n if (!value) return;\n\n var regexp = new RegExp(`(${id})(.+)(${state.data[id]})`, 'gm');\n const updatedConfig = state.data.config.replace(regexp, `$1$2${value}`);\n setState({ ...state, data: { ...state.data, config: updatedConfig, [id]: value } });\n }\n\n return (\n <div className=\"edit-template edit-php\">\n <Helmet>\n <title>{`Vesta - ${i18n.SERVER}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\"><Link to={`/edit/server/${state.data.web_system}`}>{i18n['Configuring Server']} / {state.data.web_system}</Link></div>\n <div className=\"link\"><Link to=\"/edit/server/php\">{i18n['Configure']} php.ini</Link></div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}\n </span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"edit-mail\">\n <input type=\"hidden\" name=\"save\" value=\"save\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n {\n !state.basicOptions && (\n <button type=\"button\" onClick={() => toggleOptions()}>\n {i18n['Basic options']}\n {state.basicOptions ? <FontAwesomeIcon icon=\"caret-up\" /> : <FontAwesomeIcon icon=\"caret-down\" />}\n </button>\n )\n }\n\n {\n state.basicOptions && (\n <>\n <TextInput\n id=\"max_execution_time\"\n title=\"max_execution_time\"\n name=\"v_max_execution_time\"\n onChange={event => onUpdateConfig(event.target)}\n value={parseInt(state.data.max_execution_time)} />\n\n <TextInput\n id=\"worker_connections\"\n title=\"worker_connections\"\n name=\"v_worker_connections\"\n onChange={event => onUpdateConfig(event.target)}\n value={parseInt(state.data.max_input_time)} />\n\n <TextInput\n id=\"memory_limit\"\n title=\"memory_limit\"\n name=\"v_memory_limit\"\n onChange={event => onUpdateConfig(event.target)}\n value={parseInt(state.data.memory_limit)} />\n\n <TextInput\n id=\"error_reporting\"\n title=\"error_reporting\"\n name=\"v_error_reporting\"\n onChange={event => onUpdateConfig(event.target)}\n value={state.data.error_reporting} />\n\n <TextInput\n id=\"display_errors\"\n title=\"display_errors\"\n name=\"v_display_errors\"\n onChange={event => onUpdateConfig(event.target)}\n value={state.data.display_errors} />\n\n <TextInput\n id=\"post_max_size\"\n title=\"post_max_size\"\n name=\"v_post_max_size\"\n onChange={event => onUpdateConfig(event.target)}\n value={state.data.post_max_size} />\n\n <TextInput\n id=\"upload_max_filesize\"\n title=\"upload_max_filesize\"\n name=\"v_upload_max_filesize\"\n onChange={event => onUpdateConfig(event.target)}\n value={state.data.upload_max_filesize} />\n </>\n )\n }\n\n {\n !state.advancedOptions && (\n <button type=\"button\" onClick={() => toggleOptions()}>\n {i18n['Advanced options']}\n {state.advancedOptions ? <FontAwesomeIcon icon=\"caret-up\" /> : <FontAwesomeIcon icon=\"caret-down\" />}\n </button>\n )\n }\n\n <br />\n <br />\n\n {\n state.advancedOptions && (\n <>\n <TextArea\n onChange={e => setState({ ...state, data: { ...state.data, config: e.target.value } })}\n defaultValue={state.data.config}\n title={state.data.config_path}\n name=\"v_config\"\n id=\"v_config\"\n rows=\"25\" />\n\n <br />\n\n <Checkbox\n title={i18n['restart']}\n defaultChecked={true}\n onChange={checked => setRestart(checked)}\n name=\"v_restart\"\n id=\"restart\" />\n </>\n )\n }\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/server/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div>\n );\n}\n\nexport default EditPhp;","import React from 'react';\nimport ListItem from '../ControlPanel/ListItem/ListItem';\nimport Container from '../ControlPanel/Container/Container';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { Link } from 'react-router-dom';\nimport { useSelector } from 'react-redux';\n\nconst Database = props => {\n const { data } = props;\n const { i18n } = useSelector(state => state.session);\n const token = localStorage.getItem(\"token\");\n\n const toggleFav = (starred) => {\n if (starred) {\n props.toggleFav(data.NAME, 'add');\n } else {\n props.toggleFav(data.NAME, 'delete');\n }\n }\n\n const checkItem = () => {\n props.checkItem(data.NAME);\n }\n\n const handleSuspend = () => {\n let suspendedStatus = data.SUSPENDED === 'yes' ? 'unsuspend' : 'suspend' === 'yes' ? 'unsuspend' : 'suspend';\n props.handleModal(data.suspend_conf, `/api/v1/${suspendedStatus}/db/index.php?database=${data.NAME}`);\n }\n\n const handleDelete = () => {\n props.handleModal(data.delete_conf, `/api/v1/delete/db/index.php?database=${data.NAME}`);\n }\n\n return (\n <ListItem\n id={data.NAME}\n date={data.DATE}\n toggleFav={toggleFav}\n checkItem={checkItem}\n starred={data.STARRED}\n focused={data.FOCUSED}\n checked={data.isChecked}\n suspended={data.SUSPENDED === 'yes'}>\n\n <Container className=\"r-col w-85\">\n <div className=\"name\">{data.DATABASE}</div>\n <br />\n <div className=\"stats\">\n <Container className=\"c-1\">\n <div className=\"disk\">{i18n.Disk}: <span><span className=\"stat\">{data.U_DISK}</span>{i18n.mb}</span></div>\n </Container>\n <Container className=\"c-2\">\n <div>{i18n.User}: <span className=\"stat\">{data.DBUSER}</span></div>\n <div>{i18n.Charset}: <span className=\"stat\">{data.CHARSET}</span></div>\n </Container>\n <Container className=\"c-3\">\n <div>{i18n.Host}: <span className=\"stat\">{data.HOST}</span></div>\n <div>{i18n.Type}: <span className=\"stat\">{data.TYPE}</span></div>\n </Container>\n </div>\n </Container>\n <div className=\"actions\">\n <div>\n <Link className=\"link-edit\" to={`/edit/db/?database=${data.NAME}`}>\n {i18n.edit}\n {data.FOCUSED ? <span className=\"shortcut-button html-unicode\">&#8617;</span> : <FontAwesomeIcon icon=\"pen\" />}\n </Link>\n </div>\n\n <div>\n <button\n className=\"link-gray\"\n onClick={() => handleSuspend()}>\n {i18n[data.suspend_action]}\n {data.FOCUSED ? <span className=\"shortcut-button\">S</span> : <FontAwesomeIcon icon={data.SUSPENDED === 'yes' ? 'unlock' : 'lock'} />}\n </button>\n </div>\n\n <div>\n <button className=\"link-delete\" onClick={() => handleDelete()}>\n {i18n.Delete}\n {data.FOCUSED ? <span className=\"shortcut-button del\">Del</span> : <FontAwesomeIcon icon=\"times\" />}\n </button>\n </div>\n </div>\n </ListItem>\n );\n}\n\nexport default Database;","import React, { useState, useEffect } from 'react';\nimport { addControlPanelContentFocusedElement, removeControlPanelContentFocusedElement } from '../../actions/ControlPanelContent/controlPanelContentActions';\nimport { addActiveElement, removeFocusedElement } from '../../actions/MainNavigation/mainNavigationActions';\nimport DropdownFilter from '../../components/MainNav/Toolbar/DropdownFilter/DropdownFilter';\nimport { bulkAction, getDatabaseList, handleAction } from '../../ControlPanelService/Db';\nimport * as MainNavigation from '../../actions/MainNavigation/mainNavigationActions';\nimport SearchInput from '../../components/MainNav/Toolbar/SearchInput/SearchInput';\nimport { addFavorite, deleteFavorite } from '../../ControlPanelService/Favorites';\nimport LeftButton from '../../components/MainNav/Toolbar/LeftButton/LeftButton';\nimport Checkbox from '../../components/MainNav/Toolbar/Checkbox/Checkbox';\nimport Select from '../../components/MainNav/Toolbar/Select/Select';\nimport Toolbar from '../../components/MainNav/Toolbar/Toolbar';\nimport Modal from '../../components/ControlPanel/Modal/Modal';\nimport Database from '../../components/Database/Database';\nimport { useSelector, useDispatch } from 'react-redux';\nimport Spinner from '../../components/Spinner/Spinner';\nimport './Databases.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\n\nconst Databases = props => {\n const { i18n } = useSelector(state => state.session);\n const { controlPanelFocusedElement } = useSelector(state => state.controlPanelContent);\n const { focusedElement } = useSelector(state => state.mainNavigation);\n const dispatch = useDispatch();\n const [loading, setLoading] = useState(false);\n const [modal, setModal] = useState({\n text: '',\n visible: false,\n actionUrl: '',\n });\n const [state, setState] = useState({\n databases: [],\n dbFav: [],\n toggledAll: false,\n dbAdmin: '',\n dbAdminLink: '',\n sorting: i18n.Date,\n order: \"descending\",\n selection: [],\n totalAmount: ''\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/db/'));\n dispatch(removeFocusedElement());\n dispatch(removeControlPanelContentFocusedElement());\n fetchData().then(() => setLoading(false));\n\n return () => {\n dispatch(removeControlPanelContentFocusedElement());\n }\n }, []);\n\n useEffect(() => {\n window.addEventListener(\"keydown\", handleContentSelection);\n window.addEventListener(\"keydown\", handleFocusedElementShortcuts);\n\n return () => {\n window.removeEventListener(\"keydown\", handleContentSelection);\n window.removeEventListener(\"keydown\", handleFocusedElementShortcuts);\n };\n }, [controlPanelFocusedElement, focusedElement, state.databases]);\n\n const handleContentSelection = event => {\n if (event.keyCode === 38 || event.keyCode === 40) {\n if (focusedElement) {\n dispatch(MainNavigation.removeFocusedElement());\n }\n }\n\n if (event.keyCode === 38) {\n event.preventDefault();\n handleArrowUp();\n } else if (event.keyCode === 40) {\n event.preventDefault();\n handleArrowDown();\n }\n }\n\n const initFocusedElement = databases => {\n databases[0]['FOCUSED'] = databases[0]['NAME'];\n setState({ ...state, databases });\n dispatch(addControlPanelContentFocusedElement(databases[0]['NAME']));\n }\n\n const handleArrowDown = () => {\n let databases = [...state.databases];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(databases);\n return;\n }\n\n let focusedElementPosition = databases.findIndex(database => database.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== databases.length - 1) {\n let nextFocusedElement = databases[focusedElementPosition + 1];\n databases[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, databases });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleArrowUp = () => {\n let databases = [...state.databases];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(databases);\n return;\n }\n\n let focusedElementPosition = databases.findIndex(database => database.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== 0) {\n let nextFocusedElement = databases[focusedElementPosition - 1];\n databases[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, databases });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleFocusedElementShortcuts = event => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus');\n\n if (controlPanelFocusedElement && !isSearchInputFocused) {\n switch (event.keyCode) {\n case 8: return handleDelete();\n case 13: return handleEdit();\n case 83: return handleSuspend();\n default: break;\n }\n }\n }\n\n const handleEdit = () => {\n props.history.push(`/edit/database?domain=${controlPanelFocusedElement}`);\n }\n\n const handleSuspend = () => {\n const { databases } = state;\n let currentDatabaseData = databases.filter(database => database.NAME === controlPanelFocusedElement)[0];\n let suspendedStatus = currentDatabaseData.SUSPENDED === 'yes' ? 'unsuspend' : 'suspend';\n\n displayModal(currentDatabaseData.suspend_conf, `/api/v1/${suspendedStatus}/database/index.php?domain=${controlPanelFocusedElement}`);\n }\n\n const handleDelete = () => {\n const { databases } = state;\n let currentDatabaseData = databases.filter(database => database.NAME === controlPanelFocusedElement)[0];\n\n displayModal(currentDatabaseData.delete_conf, `/api/v1/delete/database/index.php?domain=${controlPanelFocusedElement}`);\n }\n\n const fetchData = () => {\n setLoading(true);\n return new Promise((resolve, reject) => {\n getDatabaseList()\n .then(result => {\n setState({\n ...state,\n databases: reformatData(result.data.data),\n dbAdmin: result.data.db_admin,\n dbAdminLink: result.data.db_admin_link,\n dbFav: result.data.dbFav,\n selection: [],\n toggledAll: false,\n totalAmount: result.data.totalAmount\n });\n resolve();\n })\n .catch(err => console.error(err));\n });\n }\n\n const reformatData = data => {\n let databases = [];\n\n for (let i in data) {\n data[i]['NAME'] = i;\n data[i]['FOCUSED'] = controlPanelFocusedElement === i;\n databases.push(data[i]);\n }\n\n return databases;\n }\n\n const changeSorting = (sorting, order) => {\n setState({\n ...state,\n sorting,\n order\n });\n }\n\n const databases = () => {\n const { databases } = state;\n const result = [];\n const dbFav = { ...state.dbFav };\n\n databases.forEach(database => {\n database.FOCUSED = controlPanelFocusedElement === database.NAME;\n\n if (dbFav[database.NAME]) {\n database.STARRED = dbFav[database.NAME];\n } else {\n database.STARRED = 0;\n }\n\n result.push(database);\n });\n\n let sortedResult = sortArray(result);\n\n return sortedResult.map((item, index) => {\n return <Database data={item} key={index} toggleFav={toggleFav} checkItem={checkItem} handleModal={displayModal} />;\n });\n }\n\n const checkItem = name => {\n const { selection, databases } = state;\n let duplicate = [...selection];\n let dbDuplicate = databases;\n let checkedItem = duplicate.indexOf(name);\n\n let incomingItem = dbDuplicate.findIndex(db => db.NAME === name);\n dbDuplicate[incomingItem].isChecked = !dbDuplicate[incomingItem].isChecked;\n\n if (checkedItem !== -1) {\n duplicate.splice(checkedItem, 1);\n } else {\n duplicate.push(name);\n }\n\n setState({ ...state, databases: dbDuplicate, selection: duplicate });\n }\n\n const sortArray = array => {\n const { order, sorting } = state;\n let sortingColumn = sortBy(sorting);\n\n if (order === \"descending\") {\n return array.sort((a, b) => (a[sortingColumn] < b[sortingColumn]) ? 1 : ((b[sortingColumn] < a[sortingColumn]) ? -1 : 0));\n } else {\n return array.sort((a, b) => (a[sortingColumn] > b[sortingColumn]) ? 1 : ((b[sortingColumn] > a[sortingColumn]) ? -1 : 0));\n }\n }\n\n const sortBy = sorting => {\n const { Date, Database, Disk, User, Host, Starred } = i18n;\n\n switch (sorting) {\n case Date: return 'DATE';\n case Database: return 'DATABASE';\n case Disk: return 'U_DISK';\n case User: return 'DBUSER';\n case Host: return 'HOST';\n case Starred: return 'STARRED';\n default: break;\n }\n }\n\n const toggleFav = (value, type) => {\n const { dbFav } = state;\n let dbFavDuplicate = dbFav;\n\n if (type === 'add') {\n dbFavDuplicate[value] = 1;\n\n addFavorite(value, 'db')\n .then(() => {\n setState({ ...state, dbFav: dbFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n } else {\n dbFavDuplicate[value] = undefined;\n\n deleteFavorite(value, 'db')\n .then(() => {\n setState({ ...state, dbFav: dbFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n }\n }\n\n const toggleAll = toggled => {\n const databasesDuplicate = [...state.databases];\n\n if (toggled) {\n let dbNames = []\n\n let databases = databasesDuplicate.map(database => {\n dbNames.push(database.NAME);\n database.isChecked = true;\n return database;\n });\n\n setState({ ...state, databases, selection: dbNames, toggledAll: toggled });\n } else {\n let databases = databasesDuplicate.map(database => {\n database.isChecked = false;\n return database;\n });\n\n setState({ ...state, databases, selection: [], toggledAll: toggled });\n }\n }\n\n const bulk = action => {\n const { selection } = state;\n\n if (selection.length && action) {\n setLoading(true);\n bulkAction(action, selection)\n .then(result => {\n if (result.status === 200) {\n toggleAll(false);\n fetchData().then(() => refreshMenuCounters());\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const displayModal = (text, url) => {\n setModal({\n ...modal,\n visible: true,\n text: text,\n actionUrl: url\n });\n }\n\n const modalConfirmHandler = () => {\n if (!modal.actionUrl) {\n return modalCancelHandler();\n }\n\n modalCancelHandler();\n setLoading(true);\n handleAction(modal.actionUrl)\n .then(res => {\n if (res.data.error) {\n setLoading(false);\n return displayModal(res.data.error, '');\n }\n fetchData().then(() => refreshMenuCounters())\n })\n .catch(err => { setLoading(false); console.error(err); });\n }\n\n const refreshMenuCounters = () => {\n dispatch(refreshCounters()).then(() => setLoading(false));\n }\n\n const modalCancelHandler = () => {\n setModal({\n ...modal,\n visible: false,\n text: '',\n actionUrl: ''\n });\n }\n\n return (\n <div className=\"databases\">\n <Helmet>\n <title>{`Vesta - ${i18n.DB}`}</title>\n </Helmet>\n <Toolbar mobile={false} >\n <LeftButton name=\"Add Database\" href=\"/add/db\" showLeftMenu={true} />\n <div className=\"r-menu\">\n <div className=\"input-group input-group-sm\">\n <a href={state.dbAdminLink} className=\"button-extra\" type=\"submit\" target=\"_blank\" rel=\"noopener noreferrer\">{state.dbAdmin}</a>\n <Checkbox toggleAll={toggleAll} toggled={state.toggledAll} />\n <Select list='dbList' bulkAction={bulk} />\n <DropdownFilter changeSorting={changeSorting} sorting={state.sorting} order={state.order} list=\"dbList\" />\n <SearchInput handleSearchTerm={term => props.changeSearchTerm(term)} />\n </div>\n </div>\n </Toolbar>\n <div className=\"mails-wrapper\">\n {loading\n ? <Spinner />\n : (<>\n {databases()}\n <div className=\"total\">{state.totalAmount}</div>\n </>)}\n </div>\n <Modal\n onSave={modalConfirmHandler}\n onCancel={modalCancelHandler}\n show={modal.visible}\n text={modal.text} />\n </div>\n );\n}\n\nexport default Databases;\n","import React from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Container from '../ControlPanel/Container/Container';\nimport ListItem from '../ControlPanel/ListItem/ListItem';\nimport { Link } from 'react-router-dom';\nimport './Firewall.scss';\nimport { useSelector } from 'react-redux';\n\nconst Firewall = ({ data, ...props }) => {\n const { i18n } = useSelector(state => state.session);\n\n const toggleFav = (starred) => {\n if (starred) {\n props.toggleFav(data.NAME, 'add');\n } else {\n props.toggleFav(data.NAME, 'delete');\n }\n }\n\n const checkItem = () => {\n props.checkItem(data.NAME);\n }\n\n const handleSuspend = () => {\n let suspendedStatus = data.SUSPENDED === 'yes' ? 'unsuspend' : 'suspend';\n props.handleModal(data.suspend_conf, `/api/v1/${suspendedStatus}/firewall/index.php?rule=${data.NAME}`);\n }\n\n const handleDelete = () => {\n props.handleModal(data.delete_conf, `/api/v1/delete/firewall/index.php?rule=${data.NAME}`);\n }\n\n return (\n <ListItem\n id={data.NAME}\n date={data.DATE}\n starred={data.STARRED}\n focused={data.FOCUSED}\n checked={data.isChecked}\n toggleFav={toggleFav}\n checkItem={checkItem}\n suspended={data.SUSPENDED === 'yes'}>\n\n <Container className=\"cron-jobs-list r-col w-85\">\n <div className=\"stats\">\n <Container className=\"cron-col\">\n <div><span className=\"stat\">{data.ACTION}</span></div>\n </Container>\n <Container className=\"cron-col\">\n <div><span><span className=\"stat\">{data.PROTOCOL}</span> / {data.COMMENT}</span></div>\n </Container>\n <Container className=\"cron-col\">\n <div></div>\n </Container>\n <Container className=\"cron-col\">\n <div><span className=\"stat\">{data.PORT}</span></div>\n </Container>\n <Container className=\"cron-col\">\n <div><span className=\"stat\">{data.IP}</span></div>\n </Container>\n </div>\n </Container>\n <div className=\"actions\">\n <div>\n <Link className=\"link-edit\" to={`/edit/firewall/?rule=${data.NAME}`}>\n {i18n.edit}\n {data.FOCUSED ? <span className=\"shortcut-button html-unicode\">&#8617;</span> : <FontAwesomeIcon icon=\"pen\" />}\n </Link>\n </div>\n\n <div>\n <button\n className=\"link-gray\"\n onClick={() => handleSuspend()}>\n {i18n[data.suspend_action]}\n {data.FOCUSED ? <span className=\"shortcut-button\">S</span> : <FontAwesomeIcon icon={data.SUSPENDED === 'yes' ? 'unlock' : 'lock'} />}\n </button>\n </div>\n\n <div>\n <button className=\"link-delete\" onClick={() => handleDelete()}>\n {i18n.Delete}\n {data.FOCUSED ? <span className=\"shortcut-button del\">Del</span> : <FontAwesomeIcon icon=\"times\" />}\n </button>\n </div>\n </div>\n </ListItem>\n );\n}\n\nexport default Firewall;\n","import React, { useEffect, useState } from 'react';\nimport { addControlPanelContentFocusedElement, removeControlPanelContentFocusedElement } from '../../actions/ControlPanelContent/controlPanelContentActions';\nimport { addActiveElement, removeFocusedElement } from '../../actions/MainNavigation/mainNavigationActions';\nimport { bulkAction, getFirewallList, handleAction } from '../../ControlPanelService/Firewalls';\nimport DropdownFilter from '../../components/MainNav/Toolbar/DropdownFilter/DropdownFilter';\nimport * as MainNavigation from '../../actions/MainNavigation/mainNavigationActions';\nimport SearchInput from '../../components/MainNav/Toolbar/SearchInput/SearchInput';\nimport { addFavorite, deleteFavorite } from '../../ControlPanelService/Favorites';\nimport LeftButton from '../../components/MainNav/Toolbar/LeftButton/LeftButton';\nimport Checkbox from '../../components/MainNav/Toolbar/Checkbox/Checkbox';\nimport Select from '../../components/MainNav/Toolbar/Select/Select';\nimport Toolbar from '../../components/MainNav/Toolbar/Toolbar';\nimport Modal from '../../components/ControlPanel/Modal/Modal';\nimport Firewall from '../../components/Firewall/Firewall';\nimport Spinner from '../../components/Spinner/Spinner';\nimport { useDispatch, useSelector } from 'react-redux';\nimport './Firewalls.scss';\nimport { Helmet } from 'react-helmet';\nimport { Link } from 'react-router-dom';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\n\nconst Firewalls = props => {\n const { i18n } = useSelector(state => state.session);\n const { controlPanelFocusedElement } = useSelector(state => state.controlPanelContent);\n const { focusedElement } = useSelector(state => state.mainNavigation);\n const dispatch = useDispatch();\n const [loading, setLoading] = useState(false);\n const [modal, setModal] = useState({\n text: '',\n visible: false,\n actionUrl: ''\n });\n const [state, setState] = useState({\n firewalls: [],\n firewallFav: [],\n selection: [],\n firewallExtension: '',\n toggledAll: false,\n sorting: i18n.Action,\n order: \"descending\",\n totalAmount: ''\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/firewall/'));\n dispatch(removeFocusedElement());\n dispatch(removeControlPanelContentFocusedElement());\n fetchData().then(() => setLoading(false));\n\n return () => {\n dispatch(removeControlPanelContentFocusedElement());\n }\n }, []);\n\n useEffect(() => {\n window.addEventListener(\"keydown\", handleContentSelection);\n window.addEventListener(\"keydown\", handleFocusedElementShortcuts);\n\n return () => {\n window.removeEventListener(\"keydown\", handleContentSelection);\n window.removeEventListener(\"keydown\", handleFocusedElementShortcuts);\n };\n }, [controlPanelFocusedElement, focusedElement, state.firewalls]);\n\n const handleContentSelection = event => {\n if (event.keyCode === 38 || event.keyCode === 40) {\n if (focusedElement) {\n dispatch(MainNavigation.removeFocusedElement());\n }\n }\n\n if (event.keyCode === 38) {\n event.preventDefault();\n handleArrowUp();\n } else if (event.keyCode === 40) {\n event.preventDefault();\n handleArrowDown();\n }\n }\n\n const initFocusedElement = firewalls => {\n firewalls[0]['FOCUSED'] = firewalls[0]['NAME'];\n setState({ ...state, firewalls });\n dispatch(addControlPanelContentFocusedElement(firewalls[0]['NAME']));\n }\n\n const handleArrowDown = () => {\n let firewalls = [...state.firewalls];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(firewalls);\n return;\n }\n\n let focusedElementPosition = firewalls.findIndex(firewall => firewall.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== firewalls.length - 1) {\n let nextFocusedElement = firewalls[focusedElementPosition + 1];\n firewalls[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, firewalls });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleArrowUp = () => {\n let firewalls = [...state.firewalls];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(firewalls);\n return;\n }\n\n let focusedElementPosition = firewalls.findIndex(firewall => firewall.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== 0) {\n let nextFocusedElement = firewalls[focusedElementPosition - 1];\n firewalls[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, firewalls });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleFocusedElementShortcuts = event => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus');\n\n if (controlPanelFocusedElement && !isSearchInputFocused) {\n switch (event.keyCode) {\n case 8: return handleDelete();\n case 13: return handleEdit();\n case 83: return handleSuspend();\n default: break;\n }\n }\n }\n\n const handleEdit = () => {\n props.history.push(`/edit/firewall?rule=${controlPanelFocusedElement}`);\n }\n\n const handleSuspend = () => {\n const { firewalls } = state;\n let currentFirewallData = firewalls.filter(firewall => firewall.NAME === controlPanelFocusedElement)[0];\n let suspendedStatus = currentFirewallData.SUSPENDED === 'yes' ? 'unsuspend' : 'suspend';\n\n displayModal(currentFirewallData.suspend_conf, `/api/v1/${suspendedStatus}/firewall/index.php?rule=${controlPanelFocusedElement}`);\n }\n\n const handleDelete = () => {\n const { firewalls } = state;\n let currentFirewallData = firewalls.filter(firewall => firewall.NAME === controlPanelFocusedElement)[0];\n\n displayModal(currentFirewallData.delete_conf, `/api/v1/delete/firewall/index.php?rule=${controlPanelFocusedElement}`);\n }\n\n const fetchData = () => {\n setLoading(true);\n return new Promise((resolve, reject) => {\n getFirewallList()\n .then(result => {\n setState({\n ...state,\n firewalls: reformatData(result.data.data),\n firewallFav: result.data.firewallFav,\n selection: [],\n firewallExtension: result.data.firewallExtension,\n totalAmount: result.data.totalAmount,\n toggledAll: false\n });\n resolve();\n })\n .catch(err => console.error(err));\n });\n }\n\n const reformatData = data => {\n let firewalls = [];\n\n for (let i in data) {\n data[i]['NAME'] = i;\n data[i]['FOCUSED'] = controlPanelFocusedElement === i;\n firewalls.push(data[i]);\n }\n\n return firewalls;\n }\n\n const changeSorting = (sorting, order) => {\n setState({\n ...state,\n sorting,\n order\n });\n }\n\n const firewalls = () => {\n const firewallFav = { ...state.firewallFav };\n let firewalls = [...state.firewalls];\n\n firewalls.forEach(firewall => {\n firewall.FOCUSED = controlPanelFocusedElement === firewall.NAME;\n\n if (firewallFav[firewall.NAME]) {\n firewall.STARRED = firewallFav[firewall.NAME];\n } else {\n firewall.STARRED = 0;\n }\n });\n\n let sortedResult = sortArray(firewalls);\n\n return sortedResult.map((item, index) => {\n return <Firewall data={item} key={index} toggleFav={toggleFav} checkItem={checkItem} handleModal={displayModal} />;\n });\n }\n\n const checkItem = name => {\n const { selection, firewalls } = state;\n let duplicate = [...selection];\n let firewallsDuplicate = firewalls;\n let checkedItem = duplicate.indexOf(name);\n\n let incomingItem = firewallsDuplicate.findIndex(db => db.NAME === name);\n firewallsDuplicate[incomingItem].isChecked = !firewallsDuplicate[incomingItem].isChecked;\n\n if (checkedItem !== -1) {\n duplicate.splice(checkedItem, 1);\n } else {\n duplicate.push(name);\n }\n\n setState({ ...state, firewalls: firewallsDuplicate, selection: duplicate });\n }\n\n const sortArray = array => {\n const { order, sorting } = state;\n let sortingColumn = sortBy(sorting);\n\n if (order === \"descending\") {\n return array.sort((a, b) => (a[sortingColumn] < b[sortingColumn]) ? 1 : ((b[sortingColumn] < a[sortingColumn]) ? -1 : 0));\n } else {\n return array.sort((a, b) => (a[sortingColumn] > b[sortingColumn]) ? 1 : ((b[sortingColumn] > a[sortingColumn]) ? -1 : 0));\n }\n }\n\n const sortBy = sorting => {\n const { Action, Protocol, Port, Comment, Starred } = i18n;\n\n switch (sorting) {\n case Action: return 'ACTION';\n case Protocol: return 'PROTOCOL';\n case Port: return 'PORT';\n case i18n['IP address']: return 'IP';\n case Comment: return 'COMMENT';\n case Starred: return 'STARRED';\n default: break;\n }\n }\n\n const toggleFav = (value, type) => {\n const { firewallFav } = state;\n let firewallFavDuplicate = firewallFav;\n\n if (type === 'add') {\n firewallFavDuplicate[value] = 1;\n\n addFavorite(value, 'firewall')\n .then(() => {\n setState({ ...state, firewallFav: firewallFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n } else {\n firewallFavDuplicate[value] = undefined;\n\n deleteFavorite(value, 'firewall')\n .then(() => {\n setState({ ...state, firewallFav: firewallFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n }\n }\n\n const toggleAll = toggled => {\n if (toggled) {\n let firewallNames = [];\n\n let firewalls = state.firewalls.map(firewall => {\n firewallNames.push(firewall.NAME);\n firewall.isChecked = true;\n return firewall;\n });\n\n setState({ ...state, firewalls, selection: firewallNames, toggledAll: toggled });\n } else {\n let firewalls = state.firewalls.map(firewall => {\n firewall.isChecked = false;\n return firewall;\n });\n\n setState({ ...state, firewalls, selection: [], toggledAll: toggled });\n }\n }\n\n const bulk = action => {\n const { selection } = state;\n\n if (selection.length && action) {\n setLoading(true);\n bulkAction(action, selection)\n .then(result => {\n if (result.status === 200) {\n toggleAll(false);\n fetchData().then(() => refreshMenuCounters());\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const displayModal = (text, actionUrl) => {\n setModal({ ...modal, visible: !modal.visible, text, actionUrl });\n }\n\n const modalConfirmHandler = () => {\n if (!modal.actionUrl) {\n return modalCancelHandler();\n }\n\n modalCancelHandler();\n setLoading(true);\n handleAction(modal.actionUrl)\n .then(res => {\n if (res.data.error) {\n setLoading(false);\n return displayModal(res.data.error, '');\n }\n fetchData().then(() => refreshMenuCounters())\n })\n .catch(err => { setLoading(false); console.error(err); });\n }\n\n const refreshMenuCounters = () => {\n dispatch(refreshCounters()).then(() => setLoading(false));\n }\n\n const modalCancelHandler = () => {\n setModal({ ...modal, visible: !modal.visible, text: '', actionUrl: '' });\n }\n\n return (\n <div className=\"firewalls\">\n <Helmet>\n <title>{`Vesta - ${i18n.FIREWALL}`}</title>\n </Helmet>\n <Toolbar mobile={false} >\n <LeftButton href=\"/add/firewall/\" name={i18n['Add Rule']} showLeftMenu={true} />\n <div className=\"r-menu\">\n <div className=\"input-group input-group-sm\">\n <Link to='/list/firewall/banlist/' className=\"button-extra\" type=\"submit\">{i18n['list fail2ban']}</Link>\n <Checkbox toggleAll={toggleAll} toggled={state.toggledAll} />\n <Select list='firewallList' bulkAction={bulk} />\n <DropdownFilter changeSorting={changeSorting} sorting={state.sorting} order={state.order} list=\"firewallList\" />\n <SearchInput handleSearchTerm={term => props.changeSearchTerm(term)} />\n </div>\n </div>\n </Toolbar>\n <div className=\"firewalls-wrapper\">\n {loading\n ? <Spinner />\n : (<>\n {firewalls()}\n <div className=\"total\">{state.totalAmount}</div>\n </>)}\n </div>\n <Modal\n onSave={modalConfirmHandler}\n onCancel={modalCancelHandler}\n show={modal.visible}\n text={modal.text} />\n </div>\n );\n}\n\nexport default Firewalls;\n","import axios from 'axios';\nimport { getAuthToken } from 'src/utils/token';\n\nconst BASE_URL = window.location.origin;\nconst usersUri = '/api/v1/list/user/index.php';\nconst addUsersUri = '/api/v1/add/user/index.php';\nconst userInfoUri = '/api/v1/edit/user/index.php';\nconst updateUserUri = '/api/v1/edit/user/index.php';\n\nexport const getUsersList = () => {\n return axios.get(BASE_URL + usersUri, {\n params: {\n token: getAuthToken()\n }\n });\n}\n\nexport const bulkAction = (action, selectedUsers) => {\n const formData = new FormData();\n formData.append(\"token\", getAuthToken());\n formData.append(\"action\", action);\n\n selectedUsers.forEach(user => {\n formData.append(\"user[]\", user);\n });\n\n return axios.post(BASE_URL + '/api/v1/bulk/user/', formData);\n};\n\nexport const handleAction = uri => {\n return axios.get(BASE_URL + uri, {\n params: {\n token: getAuthToken()\n }\n });\n}\n\nexport const addUser = data => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n formDataObject.append(\"token\", getAuthToken());\n formDataObject.append(\"ok\", \"Add\");\n\n return axios.post(BASE_URL + addUsersUri, formDataObject);\n}\n\nexport const getUserInfo = username => {\n return axios.get(BASE_URL + userInfoUri, {\n params: {\n user: username,\n token: getAuthToken()\n }\n });\n}\n\nexport const updateUser = (data, user) => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + updateUserUri, formDataObject, {\n params: {\n user,\n token: getAuthToken()\n }\n });\n}\n","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport Password from '../../../components/ControlPanel/AddItemLayout/Form/Password/Password';\nimport SelectInput from '../../ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport NameServers from '../../ControlPanel/AddItemLayout/Form/NameServers/NameServers';\nimport TextInput from '../../ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport { updateUser, getUserInfo } from '../../../ControlPanelService/Users';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from '../../../components/Spinner/Spinner';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { Helmet } from 'react-helmet';\nimport HtmlParser from 'react-html-parser';\nimport QS from 'qs';\nimport './EditUser.scss';\n\nconst EditUser = props => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n loading: false,\n username: ''\n });\n\n useEffect(() => {\n let queryParams = QS.parse(history.location.search, { ignoreQueryPrefix: true });\n const { user } = queryParams;\n\n dispatch(addActiveElement('/list/user/'));\n dispatch(removeFocusedElement());\n\n if (user) {\n setState({ ...state, loading: true });\n fetchData(user);\n }\n }, []);\n\n const fetchData = user => {\n getUserInfo(user)\n .then(response => {\n setState({\n ...state,\n username: user,\n data: response.data,\n loading: false\n });\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err);\n });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedUser = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedUser[name] = value;\n }\n\n updatedUser['v_username'] = state.username;\n\n if (Object.keys(updatedUser).length !== 0 && updatedUser.constructor === Object) {\n setState({ ...state, loading: true });\n\n updateUser(updatedUser, state.username)\n .then(result => {\n if (result.status === 200) {\n const { error_msg: errorMessage, ok_msg: okMessage } = result.data;\n\n if (errorMessage) {\n setErrorMessage(errorMessage);\n setOkMessage('');\n } else {\n setErrorMessage('');\n setOkMessage(okMessage);\n }\n }\n })\n .then(() => fetchData(state.username))\n .catch(err => console.error(err));\n }\n }\n\n const convertObjectOfObjectsToArrayOfObjects = object => {\n let result = [];\n\n for (let i in object) {\n result.push(i);\n }\n\n return result;\n }\n\n return (\n <div className=\"edit-template edit-user\">\n <Helmet>\n <title>{`Vesta - ${i18n.USER}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Editing User']}</div>\n <div className=\"error\"><span className=\"error-message\">{errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}</span></div>\n <div className=\"success\">\n <span className=\"ok-message\">{okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span> </span>\n </div>\n </Toolbar>\n <AddItemLayout date={state.data.date} time={state.data.time} status={state.data.status}>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"add-user\">\n <input type=\"hidden\" name=\"save\" value=\"save\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <TextInput id=\"username\" name=\"v_user\" title={i18n['Username']} value={state.username} disabled />\n\n <Password name='v_password' />\n\n <TextInput id=\"email\" name=\"v_email\" title={i18n['Email']} value={state.data.email} />\n\n <SelectInput\n options={convertObjectOfObjectsToArrayOfObjects(state.data.packages)}\n selected={state.data.package}\n name=\"v_package\"\n id=\"packages\"\n title={i18n['Package']} />\n\n <SelectInput\n options={state.data.languages}\n selected={state.data.language}\n name=\"v_language\"\n id=\"languages\"\n title={i18n['Language']} />\n\n <TextInput id=\"first-name\" name=\"v_fname\" title={i18n['First Name']} value={state.data.fname} />\n\n <TextInput id=\"last-name\" name=\"v_lname\" title={i18n['Last Name']} value={state.data.lname} />\n\n <SelectInput\n options={state.data.shells}\n selected={state.data.shell}\n name=\"v_shell\"\n id=\"shell\"\n title={i18n['SSH Access']} />\n\n <NameServers usersNS={state.data.nameservers} />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/user/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div>\n );\n}\n\nexport default EditUser;","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"../../../../actions/MainNavigation/mainNavigationActions\";\nimport Checkbox from '../../../ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport TextArea from '../../../ControlPanel/AddItemLayout/Form/TextArea/TextArea';\nimport AddItemLayout from '../../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { getServiceInfo, updateService } from 'src/ControlPanelService/Server';\nimport Spinner from '../../../../components/Spinner/Spinner';\nimport Toolbar from '../../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './Bind9.scss';\nimport { Helmet } from 'react-helmet';\nimport HtmlParser from 'react-html-parser';\n\nconst Bind9 = () => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n loading: false\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/server/'));\n dispatch(removeFocusedElement());\n\n setState({ ...state, loading: true });\n fetchData();\n }, []);\n\n const fetchData = () => {\n getServiceInfo('bind9')\n .then(response => {\n if (response.data.config.includes('Error')) {\n history.push('/list/server');\n }\n\n setState({ ...state, data: response.data, loading: false });\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err);\n });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedService = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedService[name] = value;\n }\n\n if (Object.keys(updatedService).length !== 0 && updatedService.constructor === Object) {\n setState({ ...state, loading: true });\n\n updateService(updatedService, '/bind9')\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n setErrorMessage(error_msg || '');\n setOkMessage(ok_msg || '');\n }\n })\n .then(() => fetchData())\n .catch(err => console.error(err));\n }\n }\n\n return (\n <div className=\"edit-template edit-bind9\">\n <Helmet>\n <title>{`Vesta - ${i18n.SERVER}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">\n {i18n['Configuring Server']} / {state.data.service_name}\n </div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}\n </span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"edit-bind9\">\n <input type=\"hidden\" name=\"save\" value=\"save\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <TextArea\n defaultValue={state.data.options}\n title={state.data.options_path}\n name=\"v_options\"\n id=\"v_options\"\n rows=\"10\" />\n\n <br />\n\n <TextArea\n defaultValue={state.data.config}\n title={state.data.config_path}\n name=\"v_config\"\n id=\"v_config\"\n rows=\"10\" />\n\n <br />\n\n <Checkbox\n title={i18n['restart']}\n defaultChecked={true}\n name=\"v_restart\"\n id=\"restart\" />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/server/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div >\n );\n}\n\nexport default Bind9;","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"../../../../actions/MainNavigation/mainNavigationActions\";\nimport TextInput from '../../../ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport Checkbox from '../../../ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport TextArea from '../../../ControlPanel/AddItemLayout/Form/TextArea/TextArea';\nimport { getServiceInfo, updateService } from 'src/ControlPanelService/Server';\nimport AddItemLayout from '../../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from '../../../../components/Spinner/Spinner';\nimport Toolbar from '../../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './Mysql.scss';\nimport { Helmet } from 'react-helmet';\nimport HtmlParser from 'react-html-parser';\n\nconst Mysql = ({ serviceName = '' }) => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [restart, setRestart] = useState(true);\n const [state, setState] = useState({\n data: {},\n loading: false,\n basicOptions: true,\n advancedOptions: false\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/server/'));\n dispatch(removeFocusedElement());\n\n if (!serviceName) {\n history.push('/list/server');\n }\n\n setState({ ...state, loading: true });\n fetchData();\n }, []);\n\n const fetchData = () => {\n getServiceInfo('mysql')\n .then(response => {\n if (response.data.config.includes('Error')) {\n history.push('/list/server');\n }\n\n setState({ ...state, data: response.data, loading: false });\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err);\n });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedService = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedService[name] = value;\n }\n\n if (Object.keys(updatedService).length !== 0 && updatedService.constructor === Object) {\n setState({ ...state, loading: true });\n\n updatedService['v_config'] = state.data.config;\n updatedService['v_restart'] = restart ? 'yes' : 'no';\n\n updateService(updatedService, `/${serviceName}`)\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n setErrorMessage(error_msg || '');\n setOkMessage(ok_msg || '');\n }\n })\n .then(() => fetchData())\n .catch(err => console.error(err));\n }\n }\n\n const toggleOptions = () => {\n setState({\n ...state,\n advancedOptions: !state.advancedOptions,\n basicOptions: !state.basicOptions\n });\n }\n\n const onUpdateConfig = ({ id, value }) => {\n if (!value) return;\n\n var regexp = new RegExp(`(${id})(.+)(${state.data[id]})`, 'gm');\n const updatedConfig = state.data.config.replace(regexp, `$1$2${value}`);\n setState({ ...state, data: { ...state.data, config: updatedConfig, [id]: value } });\n }\n\n return (\n <div className=\"edit-template edit-mysql\">\n <Helmet>\n <title>{`Vesta - ${i18n.SERVER}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Configuring Server']} / {state.data.service_name}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}\n </span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"edit-mysql\">\n <input type=\"hidden\" name=\"save\" value=\"save\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n {\n !state.basicOptions && (\n <button type=\"button\" onClick={() => toggleOptions()}>\n {i18n['Basic options']}\n {state.basicOptions ? <FontAwesomeIcon icon=\"caret-up\" /> : <FontAwesomeIcon icon=\"caret-down\" />}\n </button>\n )\n }\n\n {\n state.basicOptions && (\n <>\n <TextInput\n id=\"max_connections\"\n title=\"max_connections\"\n name=\"v_max_connections\"\n onChange={event => onUpdateConfig(event.target)}\n value={state.data.max_connections} />\n\n <TextInput\n id=\"max_user_connections\"\n title=\"v_max_user_connections\"\n name=\"v_max_user_connections\"\n onChange={event => onUpdateConfig(event.target)}\n value={state.data.max_user_connections} />\n\n <TextInput\n id=\"wait_timeout\"\n title=\"v_wait_timeout\"\n name=\"v_wait_timeout\"\n onChange={event => onUpdateConfig(event.target)}\n value={state.data.wait_timeout} />\n\n <TextInput\n id=\"interactive_timeout\"\n title=\"v_interactive_timeout\"\n name=\"v_interactive_timeout\"\n onChange={event => onUpdateConfig(event.target)}\n value={state.data.interactive_timeout} />\n\n <TextInput\n id=\"display_errors\"\n title=\"v_display_errors\"\n name=\"v_display_errors\"\n onChange={event => onUpdateConfig(event.target)}\n value={state.data.max_allowed_packet} />\n </>\n )\n }\n\n {\n !state.advancedOptions && (\n <button type=\"button\" onClick={() => toggleOptions()}>\n {i18n['Advanced options']}\n {state.advancedOptions ? <FontAwesomeIcon icon=\"caret-up\" /> : <FontAwesomeIcon icon=\"caret-down\" />}\n </button>\n )\n }\n\n <br />\n <br />\n\n {\n state.advancedOptions && (\n <>\n <TextArea\n defaultValue={state.data.config}\n title={state.data.config_path}\n onChange={e => setState({ ...state, data: { ...state.data, config: e.target.value } })}\n name=\"v_config\"\n id=\"v_config\"\n rows=\"25\" />\n\n <br />\n\n <Checkbox\n title={i18n['restart']}\n defaultChecked={true}\n onChange={checked => setRestart(checked)}\n name=\"v_restart\"\n id=\"restart\" />\n </>\n )\n }\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/server/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div>\n );\n}\n\nexport default Mysql;","import axios from \"axios\";\n\nconst BASE_URL = window.location.origin;\nconst userNSApiUri = '/api/v1/list-user-ns.php';\n\nexport const getUserNS = () => {\n return axios.get(BASE_URL + userNSApiUri);\n}","import React, { useEffect, useState } from 'react';\nimport dayjs from 'dayjs';\n\nimport './AdvancedOptions.scss';\nimport { useSelector } from 'react-redux';\n\nconst AdvancedOptions = props => {\n const { i18n } = useSelector(state => state.session);\n const [state, setState] = useState({\n nameServersAmount: [],\n userNS: props.userNS\n });\n\n useEffect(() => {\n if (props.userNS.length) {\n let initNameServersAmount = props.userNS.map((userNS, index) => index + 1);\n setState({ ...state, nameServersAmount: initNameServersAmount });\n }\n }, []);\n\n const renderNameServerInputs = () => {\n return state.nameServersAmount.map((nameServer, index) => {\n return (\n <div className=\"name-server-input-wrapper\" key={index}>\n <input\n type=\"text\"\n className=\"form-control\"\n id={`v_ns${nameServer}`}\n defaultValue={state.userNS[index] || ''}\n name={`v_ns${nameServer}`} />\n <button\n type=\"button\"\n className={nameServer < 3 ? 'hide' : 'show delete'}\n onClick={() => onDeleteNameServer(nameServer)}>\n {i18n.delete ?? 'Delete'}\n </button>\n </div>\n );\n });\n }\n\n const onDeleteNameServer = index => {\n let nameServersDuplicate = [...state.nameServersAmount];\n\n nameServersDuplicate.splice(index - 1, 1);\n\n setState({ ...state, nameServersAmount: nameServersDuplicate });\n }\n\n const addNameServer = () => {\n let nameServersLength = state.nameServersAmount.length;\n let nameServersDuplicate = [...state.nameServersAmount];\n\n nameServersDuplicate.push(nameServersLength + 1);\n\n setState({ ...state, nameServersAmount: nameServersDuplicate });\n }\n\n const addNameServerClassName = () => {\n return state.nameServersAmount.length === 8 ? 'hide' : 'show optional';\n }\n\n const getCurrentDatePlusYear = () => {\n let currentDatePlusYear = dayjs().add(1, 'year').format('YYYY-MM-DD');\n return currentDatePlusYear;\n }\n\n return (\n <div>\n <div className=\"form-group exp-date\">\n <label htmlFor=\"exp_date\">\n {i18n['Expiration Date'] ?? 'Expiration Date'}\n <span className=\"optional\">({i18n['YYYY-MM-DD'] ?? 'YYYY-MM-DD'})</span>\n </label>\n <input\n type=\"text\"\n className=\"form-control\"\n id=\"exp_date\"\n required\n defaultValue={getCurrentDatePlusYear()}\n name=\"v_exp\" />\n </div>\n\n <div className=\"form-group\">\n <label htmlFor=\"name_servers\">TTL</label>\n <input\n type=\"text\"\n className=\"form-control\"\n id=\"name_servers\"\n required\n defaultValue=\"14400\"\n name=\"v_ttl\" />\n </div>\n\n <div className=\"form-group name-servers\">\n <label htmlFor=\"v_ns1\">{i18n['Name servers'] ?? 'Name servers'}</label>\n {renderNameServerInputs()}\n </div>\n\n <button\n type=\"button\"\n className={addNameServerClassName()}\n onClick={() => addNameServer()}>\n {i18n['Add one more Name Server'] ?? 'Add one more Name Server'}\n </button>\n </div>\n );\n}\n\nexport default AdvancedOptions;","import React, { useEffect, useState } from 'react';\n\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { getUserNS } from '../../../ControlPanelService/UserNS';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport Spinner from '../../Spinner/Spinner';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './AddDomainNameSystem.scss';\nimport AdvancedOptions from './AdvancedOptions/AdvancedOptions';\nimport { addDomainNameSystem } from '../../../ControlPanelService/Dns';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nconst AddDomainNameSystem = props => {\n const { i18n } = useSelector(state => state.session);\n const dispatch = useDispatch();\n const token = localStorage.getItem(\"token\");\n const history = useHistory();\n const [state, setState] = useState({\n loading: false,\n showAdvancedOptions: false,\n okMessage: '',\n domain: '',\n errorMessage: '',\n userNS: []\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/dns/'));\n dispatch(removeFocusedElement());\n\n setState({ ...state, loading: true });\n getUserNS()\n .then(result => {\n if (result.data.length) {\n setState({ ...state, userNS: result.data, loading: false });\n }\n })\n .catch(err => console.error(err));\n }, []);\n\n const submitFormHandler = event => {\n event.preventDefault();\n let domainNameSystem = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n domainNameSystem[name] = value;\n }\n\n if (Object.keys(domainNameSystem).length !== 0 && domainNameSystem.constructor === Object) {\n setState({ ...state, loading: true });\n addDomainNameSystem(domainNameSystem)\n .then(result => {\n if (result.status === 200) {\n const { error_msg: errorMessage, ok_msg: okMessage } = result.data;\n\n if (errorMessage) {\n setState({ ...state, errorMessage, okMessage, loading: false });\n } else {\n dispatch(refreshCounters()).then(() => {\n setState({ ...state, okMessage, errorMessage: '', loading: false });\n });\n }\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const renderAdvancedOptions = () => {\n if (state.showAdvancedOptions) {\n return <AdvancedOptions prefixI18N={state.prefixI18N} userNS={state.userNS} domain={state.domain} webStats={state.webStats} />;\n }\n }\n\n const showAdvancedOption = () => {\n setState({ ...state, showAdvancedOptions: !state.showAdvancedOptions });\n }\n\n return (\n <div className=\"edit-template add-dns\">\n <Helmet>\n <title>{`Vesta - ${i18n.DNS}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Adding DNS Domain'] ?? 'Adding DNS Domain'}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {state.errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n {state.errorMessage}</span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {state.okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n <span>{HtmlParser(state.okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n\n <AddItemLayout>\n {state.loading ? <Spinner /> : (\n <form onSubmit={event => submitFormHandler(event)}>\n <input type=\"hidden\" name=\"ok\" value=\"add\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <div className=\"form-group\">\n <label htmlFor=\"domain\">{i18n.Domain ?? 'Domain'}</label>\n <input\n type=\"text\"\n className=\"form-control\"\n id=\"domain\"\n required\n name=\"v_domain\" />\n </div>\n\n <div className=\"form-group\">\n <label htmlFor=\"ip_address\">{i18n['IP address'] ?? 'IP address'}</label>\n <input\n type=\"text\"\n className=\"form-control\"\n id=\"ip_address\"\n required\n name=\"v_ip\" />\n </div>\n\n <div className=\"form-group advanced-options-button\">\n <button type=\"button\" onClick={() => showAdvancedOption()}>\n {i18n['Advanced options'] ?? 'Advanced options'}\n {state.showAdvancedOptions ? <FontAwesomeIcon icon=\"caret-down\" /> : <FontAwesomeIcon icon=\"caret-up\" />}\n </button>\n </div>\n\n {renderAdvancedOptions()}\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Add ?? 'Add'}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/dns/')}>{i18n.Back ?? 'Back'}</button>\n </div>\n </form>\n )}\n </AddItemLayout>\n </div>\n );\n}\n\nexport default AddDomainNameSystem;","import React, { useEffect, useState } from 'react';\n\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport SelectInput from 'src/components/ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport TextInput from 'src/components/ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { addDomainNameSystemRecord } from '../../../ControlPanelService/Dns';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport Spinner from '../../Spinner/Spinner';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './AddDNSRecord.scss'\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nexport default function AddDNSRecord(props) {\n const { i18n } = useSelector(state => state.session);\n const dispatch = useDispatch();\n const token = localStorage.getItem(\"token\");\n const history = useHistory();\n const [state, setState] = useState({\n data: {},\n selectOptions: [\n 'A',\n 'AAAA',\n 'NS',\n 'CNAME',\n 'MX',\n 'TXT',\n 'SRV',\n 'DNSKEY',\n 'KEY',\n 'IPSECKEY',\n 'PTR',\n 'SPF',\n 'TLSA',\n 'CAA'\n ],\n loading: false,\n okMessage: '',\n errorMessage: '',\n });\n\n useEffect(() => {\n dispatch(addActiveElement(`/list/dns/`));\n dispatch(removeFocusedElement());\n }, []);\n\n const submitFormHandler = event => {\n event.preventDefault();\n let newDnsRecord = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n newDnsRecord[name] = value;\n }\n\n newDnsRecord['ok_rec'] = 'add';\n newDnsRecord['token'] = token;\n newDnsRecord['v_domain'] = props.domain;\n\n if (Object.keys(newDnsRecord).length !== 0 && newDnsRecord.constructor === Object) {\n setState({ ...state, loading: true });\n addDomainNameSystemRecord(newDnsRecord)\n .then(result => {\n if (result.status === 200) {\n const { error_msg: errorMessage, ok_msg: okMessage } = result.data;\n\n if (errorMessage) {\n setState({ ...state, errorMessage, okMessage, loading: false });\n } else {\n dispatch(refreshCounters()).then(() => {\n setState({ ...state, okMessage, errorMessage: '', loading: false });\n });\n }\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n return (\n <div className=\"edit-template add-dns-record\">\n <Helmet>\n <title>{`Vesta - ${i18n.DNS}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Adding DNS Record']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {state.errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n {state.errorMessage}</span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {state.okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n <span>{HtmlParser(state.okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> : (\n <form onSubmit={event => submitFormHandler(event)}>\n <TextInput\n title={i18n['Domain']}\n value={props.domain}\n name=\"v_domain\"\n id=\"domain\"\n disabled />\n\n <TextInput\n title={i18n['Record']}\n name=\"v_rec\"\n id=\"domain\" />\n\n <SelectInput\n options={state.selectOptions}\n title={i18n['Type']}\n name=\"v_type\"\n id=\"type\" />\n\n <TextInput\n title={i18n['IP or Value']}\n name=\"v_val\"\n id=\"val\" />\n\n <TextInput\n optionalTitle={`(${i18n['optional']})`}\n title={i18n['Priority']}\n name=\"v_priority\"\n id=\"priority\" />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Add}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push(`/list/dns/?domain=${props.domain}`)}>{i18n.Back}</button>\n </div>\n </form>\n )}\n </AddItemLayout>\n </div>\n );\n}","import React, { useEffect, useState } from 'react';\nimport AddDomainNameSystem from 'src/components/DomainNameSystem/Add/AddDomainNameSystem';\nimport AddDNSRecord from 'src/components/DNSRecord/Add/AddDNSRecord';\nimport { useHistory } from 'react-router-dom';\nimport QueryString from 'qs';\nimport { Helmet } from 'react-helmet';\nimport { useSelector } from 'react-redux';\n\nexport default function AddDNSWrapper() {\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const parsedQueryString = QueryString.parse(history.location.search, { ignoreQueryPrefix: true });\n const [isDnsRecord, setIsDnsRecord] = useState(false);\n\n useEffect(() => {\n if (parsedQueryString.domain) {\n setIsDnsRecord(true);\n } else {\n setIsDnsRecord(false);\n }\n }, [history.location]);\n\n return (\n <>\n <Helmet>\n <title>{`Vesta - ${i18n.DNS}`}</title>\n </Helmet>\n {\n isDnsRecord\n ? <AddDNSRecord domain={parsedQueryString.domain} />\n : <AddDomainNameSystem />\n }\n </>\n );\n}","import React from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Container from '../../ControlPanel/Container/Container';\nimport ListItem from '../../ControlPanel/ListItem/ListItem';\nimport { Link } from 'react-router-dom';\n\nimport './RestoreSetting.scss';\nimport { useSelector } from 'react-redux';\n\nexport default function RestoreSetting({ data, checkItemFunc = () => { }, restoreSetting = () => { } }) {\n const { i18n } = useSelector(state => state.session);\n\n const displayBackupDetailName = type => {\n switch (type) {\n case 'WEB': return `WEB ${i18n['domain']}`;\n case 'MAIL': return `MAIL ${i18n['domain']}`;\n case 'DNS': return `DNS ${i18n['domain']}`;\n case 'CRON': return i18n['cron'];\n case 'UDIR': return i18n['user dir'];\n default: return i18n['domain'];\n }\n }\n\n const checkItem = () => {\n checkItemFunc(data.NAME);\n }\n\n return (\n <ListItem\n date={false}\n id={data.NAME}\n focused={data.FOCUSED}\n checked={data.isChecked}\n checkItem={checkItem}>\n\n <Container className=\"r-col w-85\">\n <div className=\"stats\">\n <Container className=\"c-1\">\n <div style={{ textTransform: 'uppercase' }}>{displayBackupDetailName(data.type)}</div>\n </Container>\n <Container className=\"c-2\">\n <b>{data.name}</b>\n </Container>\n <Container className=\"c-3\"></Container>\n <Container className=\"c-4\"></Container>\n <Container className=\"c-5\"></Container>\n </div>\n </Container>\n <div className=\"actions\">\n <div>\n <button className=\"link-restore\" onClick={() => restoreSetting(data.restoreLinkParams)}>\n {i18n['restore']}\n {data.FOCUSED ? <span className=\"shortcut-button\">R</span> : <FontAwesomeIcon icon=\"play\" />}\n </button>\n </div>\n </div>\n </ListItem>\n );\n}","import React, { useState, useEffect } from 'react';\nimport { addControlPanelContentFocusedElement, removeControlPanelContentFocusedElement } from 'src/actions/ControlPanelContent/controlPanelContentActions';\nimport * as MainNavigation from 'src/actions/MainNavigation/mainNavigationActions';\nimport SearchInput from 'src/components/MainNav/Toolbar/SearchInput/SearchInput';\nimport LeftButton from 'src/components/MainNav/Toolbar/LeftButton/LeftButton';\nimport { getBackupDetails, restoreBackupSetting, bulkRestore } from 'src/ControlPanelService/Backup';\nimport Checkbox from 'src/components/MainNav/Toolbar/Checkbox/Checkbox';\nimport Select from 'src/components/MainNav/Toolbar/Select/Select';\nimport Toolbar from 'src/components/MainNav/Toolbar/Toolbar';\nimport RestoreSetting from '../RestoreSetting/RestoreSetting';\nimport Modal from 'src/components/ControlPanel/Modal/Modal';\nimport { useSelector, useDispatch } from 'react-redux';\nimport Spinner from 'src/components/Spinner/Spinner';\nimport { Link } from 'react-router-dom';\nimport { Helmet } from 'react-helmet';\n\nimport './BackupRestoreSettings.scss';\n\nexport default function BackupRestoreSettings(props) {\n const { i18n } = useSelector(state => state.session);\n const token = localStorage.getItem(\"token\");\n const { controlPanelFocusedElement } = useSelector(state => state.controlPanelContent);\n const { focusedElement } = useSelector(state => state.mainNavigation);\n const dispatch = useDispatch();\n const [backupDetailsData, setBackupDetailsData] = useState([]);\n const [modal, setModal] = useState({\n text: '',\n visible: false,\n });\n const [state, setState] = useState({\n loading: false,\n backupDetails: [],\n toggledAll: false,\n selection: [],\n totalAmount: ''\n });\n\n useEffect(() => {\n dispatch(removeControlPanelContentFocusedElement());\n fetchData();\n\n return () => dispatch(removeControlPanelContentFocusedElement());\n }, []);\n\n useEffect(() => {\n window.addEventListener(\"keydown\", handleContentSelection);\n window.addEventListener(\"keydown\", handleFocusedElementShortcuts);\n\n return () => {\n window.removeEventListener(\"keydown\", handleContentSelection);\n window.removeEventListener(\"keydown\", handleFocusedElementShortcuts);\n };\n }, [controlPanelFocusedElement, focusedElement, backupDetailsData]);\n\n const handleContentSelection = event => {\n if (event.keyCode === 65) {\n handleRestore(`?backup=${props.backup}`);\n return;\n }\n\n if (event.keyCode === 38 || event.keyCode === 40) {\n if (focusedElement) {\n dispatch(MainNavigation.removeFocusedElement());\n }\n }\n\n if (event.keyCode === 38) {\n event.preventDefault();\n handleArrowUp();\n } else if (event.keyCode === 40) {\n event.preventDefault();\n handleArrowDown();\n }\n }\n\n const initFocusedElement = backupDetails => {\n backupDetails[0]['FOCUSED'] = backupDetails[0]['NAME'];\n setBackupDetailsData(backupDetails);\n dispatch(addControlPanelContentFocusedElement(backupDetails[0]['NAME']));\n }\n\n const handleArrowDown = () => {\n let backupDetails = [...backupDetailsData];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(backupDetails);\n return;\n }\n\n let nextFocusedElement = backupDetails[controlPanelFocusedElement + 1];\n\n if (nextFocusedElement) {\n backupDetails[controlPanelFocusedElement]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setBackupDetailsData(backupDetails);\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleArrowUp = () => {\n let backupDetails = [...backupDetailsData];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(backupDetails);\n return;\n }\n\n let nextFocusedElement = backupDetails[controlPanelFocusedElement - 1];\n\n if (nextFocusedElement) {\n backupDetails[controlPanelFocusedElement]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setBackupDetailsData(backupDetails);\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleFocusedElementShortcuts = event => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus');\n\n if (controlPanelFocusedElement > 0 || controlPanelFocusedElement !== '' && !isSearchInputFocused) {\n switch (event.keyCode) {\n case 82: return handleRestore();\n default: break;\n }\n }\n }\n\n const handleRestore = params => {\n const paramsUri = params ? params : backupDetailsData[controlPanelFocusedElement].restoreLinkParams;\n\n restoreBackupSetting(paramsUri)\n .then(response => displayModal(response.data.message))\n .catch(err => console.error(err));\n }\n\n const fetchData = () => {\n setState({ ...state, loading: true });\n\n getBackupDetails(props.backup)\n .then(result => {\n reformatData(result.data.data[props.backup]);\n setState({\n ...state,\n totalAmount: result.data.totalAmount,\n selection: [],\n toggledAll: false,\n loading: false\n });\n })\n .catch(err => console.error(err));\n }\n\n const reformatData = data => {\n let reformattedData = ['WEB', 'DNS', 'MAIL', 'DB', 'UDIR', 'CRON'].reduce((acc, cat) => {\n data[cat].split(',').map(item => {\n acc.push({\n type: cat,\n name: item,\n restoreLinkParams: `?backup=${props.backup}&type=${cat.toLowerCase()}&object=${item}`\n });\n });\n\n return acc;\n }, []);\n\n setBackupDetailsData(reformattedData);\n }\n\n const listBackups = () => {\n const backupDetails = [...backupDetailsData];\n const result = [];\n\n backupDetails.forEach((backupDetail, index) => {\n backupDetail.NAME = index;\n backupDetail.FOCUSED = controlPanelFocusedElement === index;\n result.push(backupDetail);\n });\n\n return result.map((item, index) => {\n return <RestoreSetting data={item} key={index} checkItemFunc={name => checkItem(name)} restoreSetting={handleRestore} />;\n });\n }\n\n const checkItem = name => {\n const { selection } = state;\n let duplicate = [...selection];\n let backupDetailsDuplicate = [...backupDetailsData];\n let checkedItem = duplicate.indexOf(name);\n\n let incomingItem = backupDetailsDuplicate.findIndex(backupDetail => backupDetail.NAME === name);\n backupDetailsDuplicate[incomingItem].isChecked = !backupDetailsDuplicate[incomingItem].isChecked;\n\n if (checkedItem !== -1) {\n duplicate.splice(backupDetailsDuplicate[name]['name'], 1);\n } else {\n duplicate.push(backupDetailsDuplicate[name]['name']);\n }\n\n setState({ ...state, selection: duplicate });\n setBackupDetailsData(backupDetailsDuplicate);\n }\n\n const toggleAll = toggled => {\n const backupDetailsDuplicate = [...backupDetailsData];\n\n if (toggled) {\n let backupDetailNames = [];\n let backupDetails = backupDetailsDuplicate.map(backupDetail => {\n backupDetailNames.push(backupDetail.name);\n backupDetail.isChecked = true;\n return backupDetail;\n });\n\n setState({ ...state, selection: backupDetailNames, toggledAll: toggled });\n setBackupDetailsData(backupDetails);\n } else {\n let backupDetails = backupDetailsDuplicate.map(backupDetail => {\n backupDetail.isChecked = false;\n return backupDetail;\n });\n\n setState({ ...state, selection: [], toggledAll: toggled });\n setBackupDetailsData(backupDetails);\n }\n }\n\n const bulk = action => {\n const { selection } = state;\n\n if (selection.length && action) {\n setState({ ...state, loading: true });\n bulkRestore(action, selection, props.backup)\n .then(result => {\n if (result.status === 200) {\n displayModal(result.data.message);\n toggleAll(false);\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const displayModal = text => {\n setState({ ...state, loading: false });\n setModal({ ...modal, visible: true, text });\n }\n\n const modalCancelHandler = () => {\n setModal({ ...modal, visible: false, text: '' });\n }\n\n return (\n <div className=\"mail-accounts backups-restore-settings\">\n <Helmet>\n <title>{`Vesta - ${i18n.BACKUP}`}</title>\n </Helmet>\n <Toolbar mobile={false} >\n <LeftButton name={i18n['Restore All']} list=\"backup-details\" onClick={() => handleRestore(`?backup=${props.backup}`)} showLeftMenu={true} />\n <div className=\"r-menu\">\n <div className=\"input-group input-group-sm\">\n <Checkbox toggleAll={toggleAll} toggled={state.toggledAll} />\n <Select list='backupDetailList' bulkAction={bulk} />\n <SearchInput handleSearchTerm={term => props.changeSearchTerm(term)} />\n </div>\n </div>\n </Toolbar>\n {state.loading\n ? <Spinner />\n : (\n <>\n <div className=\"mail-accounts-wrapper\">\n <div className=\"subtitle\">\n <span>{`${i18n['Listing']} ${props.backup}`}</span>\n </div>\n {listBackups()}\n </div>\n <div className=\"footer-actions-wrapper\">\n <div className=\"total\">{state.totalAmount}</div>\n <div className=\"back\">\n <Link to=\"/list/backup/\">{i18n['Back']}</Link>\n </div>\n </div>\n </>\n )\n }\n\n <Modal\n onSave={modalCancelHandler}\n showCancelButton={false}\n show={modal.visible}\n text={modal.text} />\n </div>\n );\n}","import React, { } from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport ListItem from '../ControlPanel/ListItem/ListItem';\nimport Container from '../ControlPanel/Container/Container';\nimport { faFileDownload } from '@fortawesome/free-solid-svg-icons'\nimport './Backup.scss';\nimport { Link } from 'react-router-dom';\nimport { useSelector } from 'react-redux';\n\nconst Backup = props => {\n const { data } = props;\n const { i18n } = useSelector(state => state.session);\n const token = localStorage.getItem(\"token\");\n\n const toggleFav = (starred) => {\n if (starred) {\n props.toggleFav(props.data.NAME, 'add');\n } else {\n props.toggleFav(props.data.NAME, 'delete');\n }\n }\n\n const checkItem = () => {\n props.checkItem(props.data.NAME);\n }\n\n const handleDelete = () => {\n props.handleModal(data.delete_conf, `/api/v1/delete/backup/?backup=${data.NAME}`);\n }\n\n return (\n <ListItem\n id={data.NAME}\n date={data.DATE}\n toggleFav={toggleFav}\n checkItem={checkItem}\n focused={data.FOCUSED}\n starred={data.STARRED}\n checked={data.isChecked}>\n\n <Container className=\"r-col w-85\">\n <div className=\"name\">{data.NAME}</div>\n <div className=\"stats\">\n <Container className=\"c-1\">\n <div>{i18n['Backup Size']}: <span><span className=\"stat\">{data.SIZE}</span>{i18n.mb}</span></div>\n </Container>\n <Container className=\"c-2\">\n <div>{i18n.Type}: <span className=\"stat\">{data.TYPE}</span></div>\n </Container>\n <Container className=\"c-3\">\n <div>{i18n['Run Time']}: <span className=\"stat\">{data.RUNTIME} minute</span></div>\n </Container>\n </div>\n </Container>\n <div className=\"actions\">\n\n {data.UPDATED === 'no' && <div><a href={`/update/vesta/?pkg=${data.NAME}`}>{i18n.update} <FontAwesomeIcon icon=\"wrench\" /></a></div>}\n\n <div>\n <a className=\"link-download\" href={`/api/v1/download/backup/?backup=${data.NAME}&token=${token}`}>\n {i18n.download}\n {data.FOCUSED ? <span className=\"shortcut-button\">D</span> : <FontAwesomeIcon icon={faFileDownload} />}\n </a>\n </div>\n\n <div>\n <Link className=\"link-download\" to={`/list/backup?backup=${data.NAME}`}>\n {i18n['configure restore settings']}\n {data.FOCUSED ? <span className=\"shortcut-button html-unicode\">&#8617;</span> : <FontAwesomeIcon icon=\"list\" />}\n </Link>\n </div>\n\n <div>\n <button className=\"link-delete\" onClick={() => handleDelete()}>\n {i18n.Delete}\n {data.FOCUSED ? <span className=\"shortcut-button del\">Del</span> : <FontAwesomeIcon icon=\"times\" />}\n </button>\n </div>\n\n </div>\n </ListItem>\n );\n}\n\nexport default Backup;","import React, { useState, useEffect } from 'react';\nimport { addControlPanelContentFocusedElement, removeControlPanelContentFocusedElement } from '../../actions/ControlPanelContent/controlPanelContentActions';\nimport { addActiveElement, removeFocusedElement } from '../../actions/MainNavigation/mainNavigationActions';\nimport { bulkAction, getBackupList, handleAction, scheduleBackup } from '../../ControlPanelService/Backup';\nimport * as MainNavigation from '../../actions/MainNavigation/mainNavigationActions';\nimport SearchInput from '../../components/MainNav/Toolbar/SearchInput/SearchInput';\nimport { addFavorite, deleteFavorite } from '../../ControlPanelService/Favorites';\nimport Checkbox from '../../components/MainNav/Toolbar/Checkbox/Checkbox';\nimport Select from '../../components/MainNav/Toolbar/Select/Select';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Toolbar from '../../components/MainNav/Toolbar/Toolbar';\nimport Modal from '../../components/ControlPanel/Modal/Modal';\nimport Spinner from '../../components/Spinner/Spinner';\nimport { useSelector, useDispatch } from 'react-redux';\nimport Backup from '../../components/Backup/Backup';\nimport { Helmet } from 'react-helmet';\nimport { Link } from 'react-router-dom';\nimport './Backups.scss';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\n\nconst Backups = props => {\n const { i18n } = useSelector(state => state.session);\n const { controlPanelFocusedElement } = useSelector(state => state.controlPanelContent);\n const { focusedElement } = useSelector(state => state.mainNavigation);\n const dispatch = useDispatch();\n const [loading, setLoading] = useState(false);\n const [modal, setModal] = useState({\n text: '',\n visible: false,\n actionUrl: ''\n });\n const [state, setState] = useState({\n backups: [],\n backupFav: [],\n toggledAll: false,\n selection: [],\n totalAmount: ''\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/backup/'));\n dispatch(removeFocusedElement());\n dispatch(removeControlPanelContentFocusedElement());\n fetchData().then(() => setLoading(false));\n\n return () => {\n dispatch(removeControlPanelContentFocusedElement());\n }\n }, []);\n\n useEffect(() => {\n window.addEventListener(\"keydown\", handleContentSelection);\n window.addEventListener(\"keydown\", handleFocusedElementShortcuts);\n\n return () => {\n window.removeEventListener(\"keydown\", handleContentSelection);\n window.removeEventListener(\"keydown\", handleFocusedElementShortcuts);\n };\n }, [controlPanelFocusedElement, focusedElement, state.backups]);\n\n const handleContentSelection = event => {\n if (event.keyCode === 38 || event.keyCode === 40) {\n if (focusedElement) {\n dispatch(MainNavigation.removeFocusedElement());\n }\n }\n\n if (event.keyCode === 38) {\n event.preventDefault();\n handleArrowUp();\n } else if (event.keyCode === 40) {\n event.preventDefault();\n handleArrowDown();\n }\n }\n\n const initFocusedElement = backups => {\n backups[0]['FOCUSED'] = backups[0]['NAME'];\n setState({ ...state, backups });\n dispatch(addControlPanelContentFocusedElement(backups[0]['NAME']));\n }\n\n const handleArrowDown = () => {\n let backups = [...state.backups];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(backups);\n return;\n }\n\n let focusedElementPosition = backups.findIndex(backup => backup.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== backups.length - 1) {\n let nextFocusedElement = backups[focusedElementPosition + 1];\n backups[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, backups });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleArrowUp = () => {\n let backups = [...state.backups];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(backups);\n return;\n }\n\n let focusedElementPosition = backups.findIndex(backup => backup.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== 0) {\n let nextFocusedElement = backups[focusedElementPosition - 1];\n backups[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, backups });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleFocusedElementShortcuts = event => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus');\n\n if (controlPanelFocusedElement && !isSearchInputFocused) {\n switch (event.keyCode) {\n case 8: return handleDelete();\n case 13: return configureRestoreSettings();\n case 68: return download();\n default: break;\n }\n }\n }\n\n const configureRestoreSettings = () => {\n props.history.push(`/list/backup?backup=${controlPanelFocusedElement}`);\n }\n\n const download = () => {\n window.open(`/api/v1/download/backup?backup=${controlPanelFocusedElement}`);\n }\n\n const handleDelete = () => {\n const { backups } = state;\n let currentBackupData = backups.filter(backup => backup.NAME === controlPanelFocusedElement)[0];\n\n displayModal(currentBackupData.delete_conf, `/api/v1/delete/cron/?job=${controlPanelFocusedElement}`);\n }\n\n const fetchData = () => {\n setLoading(true);\n return new Promise((resolve, reject) => {\n getBackupList()\n .then(result => {\n setState({\n ...state,\n backups: reformatData(result.data.data),\n backupFav: result.data.backup_fav,\n totalAmount: result.data.totalAmount,\n selection: [],\n toggledAll: false\n });\n resolve();\n })\n .catch(err => console.error(err));\n });\n }\n\n const reformatData = data => {\n let backups = [];\n\n for (let i in data) {\n data[i]['NAME'] = i;\n data[i]['isChecked'] = false;\n data[i]['FOCUSED'] = controlPanelFocusedElement === i;\n backups.push(data[i]);\n }\n\n return backups;\n }\n\n const backups = () => {\n const { backups } = state;\n const result = [];\n const backupFav = { ...state.backupFav };\n\n backups.forEach(backup => {\n backup.FOCUSED = controlPanelFocusedElement === backup.NAME;\n\n if (backupFav[backup.NAME]) {\n backup.STARRED = backupFav[backup.NAME];\n } else {\n backup.STARRED = 0;\n }\n\n result.push(backup);\n });\n\n return result.map((item, index) => {\n return <Backup data={item} key={index} toggleFav={toggleFav} checkItem={checkItem} handleModal={displayModal} />;\n });\n }\n\n const checkItem = name => {\n const { selection, backups } = state;\n let duplicate = [...selection];\n let backupDuplicate = [...backups];\n let checkedItem = duplicate.indexOf(name);\n\n let incomingItem = backupDuplicate.findIndex(backup => backup.NAME === name);\n backupDuplicate[incomingItem].isChecked = !backupDuplicate[incomingItem].isChecked;\n\n if (checkedItem !== -1) {\n duplicate.splice(checkedItem, 1);\n } else {\n duplicate.push(name);\n }\n\n setState({ ...state, backups: backupDuplicate, selection: duplicate });\n }\n\n const toggleFav = (value, type) => {\n const { backupFav } = state;\n let backupFavDuplicate = backupFav;\n\n if (type === 'add') {\n backupFavDuplicate[value] = 1;\n\n addFavorite(value, 'backup')\n .then(() => {\n setState({ ...state, backupFav: backupFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n } else {\n backupFavDuplicate[value] = undefined;\n\n deleteFavorite(value, 'backup')\n .then(() => {\n setState({ ...state, backupFav: backupFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n }\n }\n\n const toggleAll = toggled => {\n const backupsDuplicate = [...state.backups];\n\n if (toggled) {\n let backupNames = [];\n\n let backups = backupsDuplicate.map(backup => {\n backupNames.push(backup.NAME);\n backup.isChecked = true;\n return backup;\n });\n\n setState({ ...state, backups, selection: backupNames, toggledAll: toggled });\n } else {\n let backups = backupsDuplicate.map(backup => {\n backup.isChecked = false;\n return backup;\n });\n setState({ ...state, backups, selection: [], toggledAll: toggled });\n }\n }\n\n const bulk = action => {\n const { selection } = state;\n\n if (selection.length && action) {\n setLoading(true);\n bulkAction(action, selection)\n .then(result => {\n if (result.status === 200) {\n toggleAll(false);\n fetchData().then(() => refreshMenuCounters());\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const displayModal = (text, url) => {\n setLoading(false);\n setModal({\n ...modal,\n visible: true,\n text: text,\n actionUrl: url\n });\n }\n\n const modalConfirmHandler = () => {\n if (!modal.actionUrl) {\n return modalCancelHandler();\n }\n\n modalCancelHandler();\n setLoading(true);\n handleAction(modal.actionUrl)\n .then(res => {\n if (res.data.error) {\n setLoading(false);\n return displayModal(res.data.error, '');\n }\n fetchData().then(() => refreshMenuCounters())\n })\n .catch(err => { setLoading(false); console.error(err); });\n }\n\n const refreshMenuCounters = () => {\n dispatch(refreshCounters()).then(() => setLoading(false));\n }\n\n const modalCancelHandler = () => {\n setModal({\n ...modal,\n visible: false,\n text: '',\n actionUrl: ''\n });\n }\n\n const scheduleBackupButton = () => {\n setLoading(true);\n scheduleBackup()\n .then(result => {\n if (result.data.error) {\n displayModal(result.data.error, '');\n } else {\n displayModal(result.data.ok, '');\n }\n })\n .catch(err => console.error(err));\n }\n\n return (\n <div className=\"backups\">\n <Helmet>\n <title>{`Vesta - ${i18n.BACKUP}`}</title>\n </Helmet>\n <Toolbar mobile={false} >\n <div className=\"l-menu\">\n <button onClick={scheduleBackupButton}>\n <FontAwesomeIcon icon=\"plus\" />\n <span className=\"add\">{i18n[\"Create Backup\"]}</span>\n </button>\n </div>\n <div className=\"r-menu\">\n <div className=\"input-group input-group-sm\">\n <Link to='/list/backup/exclusions' className=\"button-extra\" type=\"submit\">{i18n['backup exclusions']}</Link>\n <Checkbox toggleAll={toggleAll} toggled={state.toggledAll} />\n <Select list='backupList' bulkAction={bulk} />\n <SearchInput handleSearchTerm={term => props.changeSearchTerm(term)} />\n </div>\n </div>\n </Toolbar>\n <div className=\"backups-wrapper\">\n {loading\n ? <Spinner />\n : (<>\n {backups()}\n <div className=\"total\">{state.totalAmount}</div>\n </>)}\n </div>\n <Modal\n onSave={modalConfirmHandler}\n onCancel={modalCancelHandler}\n show={modal.visible}\n text={modal.text} />\n </div>\n );\n}\n\nexport default Backups;\n","import React, { useEffect, useState } from 'react';\nimport BackupRestoreSettings from '../../components/Backup/RestoreSettings/BackupRestoreSettings';\nimport { useHistory } from 'react-router-dom';\nimport Backups from '../Backups/Backups';\nimport QueryString from 'qs';\nimport { Helmet } from 'react-helmet';\nimport { useSelector } from 'react-redux';\n\nexport default function BackupWrapper(props) {\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const parsedQueryString = QueryString.parse(history.location.search, { ignoreQueryPrefix: true });\n const [isBackupSettings, setIsBackupSettings] = useState(false);\n\n useEffect(() => {\n if (parsedQueryString.backup) {\n setIsBackupSettings(true);\n } else {\n setIsBackupSettings(false);\n }\n }, [history.location]);\n\n return (\n <>\n <Helmet>\n <title>{`Vesta - ${i18n.DNS}`}</title>\n </Helmet>\n {\n isBackupSettings\n ? <BackupRestoreSettings backup={parsedQueryString.backup} />\n : <Backups {...props} changeSearchTerm={props.changeSearchTerm} />\n }\n </>\n );\n}","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"src/actions/MainNavigation/mainNavigationActions\";\nimport AddItemLayout from 'src/components/ControlPanel/AddItemLayout/AddItemLayout';\nimport { getBanIps, addBanIp } from 'src/ControlPanelService/Firewalls';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from 'src/components/Spinner/Spinner';\nimport Toolbar from '../../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { Helmet } from 'react-helmet';\nimport HtmlParser from 'react-html-parser';\n\nconst AddBanIP = () => {\n const { i18n } = useSelector(state => state.session);\n const userLanguage = localStorage.getItem(\"language\");\n const history = useHistory();\n const dispatch = useDispatch();\n const [state, setState] = useState({\n banIps: [],\n errorMessage: '',\n okMessage: '',\n loading: false\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/firewall/'));\n dispatch(removeFocusedElement());\n\n setState({ ...state, loading: true });\n\n getBanIps()\n .then(result => {\n setState({ ...state, ip: result.data.ip, chain: result.data.chain, loading: false });\n });\n }, []);\n\n const submitFormHandler = event => {\n event.preventDefault();\n let newUser = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n newUser[name] = value;\n }\n\n if (Object.keys(newUser).length !== 0 && newUser.constructor === Object) {\n setState({ ...state, loading: true });\n addBanIp(newUser)\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n if (error_msg) {\n setState({ ...state, errorMessage: error_msg, okMessage: '', loading: false });\n } else if (ok_msg) {\n setState({ ...state, errorMessage: '', okMessage: ok_msg, loading: false });\n } else {\n setState({ ...state, loading: false });\n }\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const renderChainOptions = () => {\n return ['SSH', 'WEB', 'FTP', 'DNS', 'MAIL', 'DB', 'VESTA'].map((chain, index) => (\n <option key={index} selected={userLanguage === chain} value={chain}>{chain}</option>\n ));\n }\n\n return (\n <div className=\"edit-template add-user\">\n <Helmet>\n <title>{`Vesta - ${i18n.FIREWALL}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Adding IP Address to Banlist']}</div>\n <div className=\"error\"><span className=\"error-message\">{state.errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {state.errorMessage}</span></div>\n <div className=\"success\">\n <span className=\"ok-message\">{state.okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(state.okMessage)}</span> </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"add-user\">\n <input type=\"hidden\" name=\"ok\" value=\"add\" />\n\n <div class=\"form-group\">\n <label htmlFor=\"chain\">{i18n.Banlist}</label>\n <select class=\"form-control\" id=\"chain\" name=\"v_chain\">\n {renderChainOptions()}\n </select>\n </div>\n\n <div className=\"form-group exp-date\">\n <label htmlFor=\"ip\">\n {i18n['IP address']}\n <span className=\"optional\">({i18n['CIDR format is supported']})</span>\n </label>\n <input\n type=\"text\"\n className=\"form-control\"\n id=\"ip\"\n required\n name=\"v_ip\" />\n </div>\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Add}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/firewall/banlist')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div>\n );\n}\n\nexport default AddBanIP;\n","import React from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport ListItem from '../ControlPanel/ListItem/ListItem';\nimport Container from '../ControlPanel/Container/Container';\nimport './CronJob.scss';\nimport { Link } from 'react-router-dom';\nimport { useSelector } from 'react-redux';\n\nconst CronJob = props => {\n const { data } = props;\n const { i18n } = useSelector(state => state.session);\n const token = localStorage.getItem(\"token\");\n\n const toggleFav = (starred) => {\n if (starred) {\n props.toggleFav(props.data.NAME, 'add');\n } else {\n props.toggleFav(props.data.NAME, 'delete');\n }\n }\n\n const checkItem = () => {\n props.checkItem(props.data.NAME);\n }\n\n const handleSuspend = () => {\n let suspendedStatus = data.SUSPENDED === 'yes' ? 'unsuspend' : 'suspend' === 'yes' ? 'unsuspend' : 'suspend';\n props.handleModal(data.suspend_conf, `/api/v1/${suspendedStatus}/cron/index.php?job=${data.NAME}`);\n }\n\n const handleDelete = () => {\n props.handleModal(data.delete_conf, `/api/v1/delete/cron/index.php?job=${data.NAME}`);\n }\n\n return (\n <ListItem\n id={data.NAME}\n date={data.DATE}\n checkItem={checkItem}\n toggleFav={toggleFav}\n focused={data.FOCUSED}\n starred={data.STARRED}\n checked={data.isChecked}\n suspended={data.SUSPENDED === 'yes'}>\n\n <Container className=\"cron-jobs-list r-col w-85\">\n <div className=\"name\">{data.CMD}</div>\n <div className=\"stats\">\n <Container className=\"cron-col\">\n <div>{i18n.Min} <span>{data.MIN}</span></div>\n </Container>\n <Container className=\"cron-col\">\n <div>{i18n.Hour} <span>{data.HOUR}</span></div>\n </Container>\n <Container className=\"cron-col\">\n <div>{i18n.Day} <span>{data.DAY}</span></div>\n </Container>\n <Container className=\"cron-col\">\n <div>{i18n.Month} <span>{data.MONTH}</span></div>\n </Container>\n <Container className=\"cron-col\">\n <div>{i18n['Day of week']} <span>{data.WDAY}</span></div>\n </Container>\n </div>\n </Container>\n <div className=\"actions\">\n\n <div>\n <Link className=\"link-edit\" to={`/edit/cron/?job=${data.NAME}`}>\n {i18n.edit}\n {data.FOCUSED ? <span className=\"shortcut-button html-unicode\">&#8617;</span> : <FontAwesomeIcon icon=\"pen\" />}\n </Link>\n </div>\n\n <div>\n <button\n className=\"link-gray\"\n onClick={() => handleSuspend()}>\n {i18n[data.suspend_action]}\n {data.FOCUSED ? <span className=\"shortcut-button\">S</span> : <FontAwesomeIcon icon={data.SUSPENDED === 'yes' ? 'unlock' : 'lock'} />}\n </button>\n </div>\n\n <div>\n <button className=\"link-delete\" onClick={() => handleDelete()}>\n {i18n.Delete}\n {data.FOCUSED ? <span className=\"shortcut-button del\">Del</span> : <FontAwesomeIcon icon=\"times\" />}\n </button>\n </div>\n\n </div>\n </ListItem>\n );\n}\n\nexport default CronJob;","import React, { useState, useEffect } from 'react';\nimport { addControlPanelContentFocusedElement, removeControlPanelContentFocusedElement } from '../../actions/ControlPanelContent/controlPanelContentActions';\nimport { addActiveElement, removeFocusedElement } from '../../actions/MainNavigation/mainNavigationActions';\nimport DropdownFilter from '../../components/MainNav/Toolbar/DropdownFilter/DropdownFilter';\nimport { bulkAction, getCronList, handleAction } from '../../ControlPanelService/Cron';\nimport * as MainNavigation from '../../actions/MainNavigation/mainNavigationActions';\nimport SearchInput from '../../components/MainNav/Toolbar/SearchInput/SearchInput';\nimport { addFavorite, deleteFavorite } from '../../ControlPanelService/Favorites';\nimport LeftButton from '../../components/MainNav/Toolbar/LeftButton/LeftButton';\nimport Checkbox from '../../components/MainNav/Toolbar/Checkbox/Checkbox';\nimport Select from '../../components/MainNav/Toolbar/Select/Select';\nimport Toolbar from '../../components/MainNav/Toolbar/Toolbar';\nimport Modal from '../../components/ControlPanel/Modal/Modal';\nimport CronJob from '../../components/CronJob/CronJob';\nimport Spinner from '../../components/Spinner/Spinner';\nimport { useSelector, useDispatch } from 'react-redux';\nimport './CronJobs.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\n\nconst CronJobs = props => {\n const { i18n } = useSelector(state => state.session);\n const { controlPanelFocusedElement } = useSelector(state => state.controlPanelContent);\n const { focusedElement } = useSelector(state => state.mainNavigation);\n const dispatch = useDispatch();\n const [loading, setLoading] = useState(false);\n const [modal, setModal] = useState({\n text: '',\n visible: false,\n actionUrl: '',\n });\n const [state, setState] = useState({\n cronJobs: [],\n cronFav: [],\n toggledAll: false,\n cronReports: '',\n sorting: i18n.Date,\n order: \"descending\",\n selection: [],\n totalAmount: ''\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/cron/'));\n dispatch(removeFocusedElement());\n dispatch(removeControlPanelContentFocusedElement());\n fetchData().then(() => setLoading(false));\n\n return () => {\n dispatch(removeControlPanelContentFocusedElement());\n }\n }, []);\n\n useEffect(() => {\n window.addEventListener(\"keydown\", handleContentSelection);\n window.addEventListener(\"keydown\", handleFocusedElementShortcuts);\n\n return () => {\n window.removeEventListener(\"keydown\", handleContentSelection);\n window.removeEventListener(\"keydown\", handleFocusedElementShortcuts);\n };\n }, [controlPanelFocusedElement, focusedElement, state.cronJobs]);\n\n const handleContentSelection = event => {\n if (event.keyCode === 38 || event.keyCode === 40) {\n if (focusedElement) {\n dispatch(MainNavigation.removeFocusedElement());\n }\n }\n\n if (event.keyCode === 38) {\n event.preventDefault();\n handleArrowUp();\n } else if (event.keyCode === 40) {\n event.preventDefault();\n handleArrowDown();\n }\n }\n\n const initFocusedElement = cronJobs => {\n cronJobs[0]['FOCUSED'] = cronJobs[0]['NAME'];\n setState({ ...state, cronJobs });\n dispatch(addControlPanelContentFocusedElement(cronJobs[0]['NAME']));\n }\n\n const handleArrowDown = () => {\n let cronJobs = [...state.cronJobs];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(cronJobs);\n return;\n }\n\n let focusedElementPosition = cronJobs.findIndex(cronJob => cronJob.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== cronJobs.length - 1) {\n let nextFocusedElement = cronJobs[focusedElementPosition + 1];\n cronJobs[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, cronJobs });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleArrowUp = () => {\n let cronJobs = [...state.cronJobs];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(cronJobs);\n return;\n }\n\n let focusedElementPosition = cronJobs.findIndex(cronJob => cronJob.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== 0) {\n let nextFocusedElement = cronJobs[focusedElementPosition - 1];\n cronJobs[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, cronJobs });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleFocusedElementShortcuts = event => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus');\n\n if (controlPanelFocusedElement && !isSearchInputFocused) {\n switch (event.keyCode) {\n case 8: return handleDelete();\n case 13: return handleEdit();\n case 83: return handleSuspend();\n default: break;\n }\n }\n }\n\n const handleEdit = () => {\n props.history.push(`/edit/cron?job=${controlPanelFocusedElement}`);\n }\n\n const handleSuspend = () => {\n const { cronJobs } = state;\n let currentCronJobData = cronJobs.filter(cronJob => cronJob.NAME === controlPanelFocusedElement)[0];\n let suspendedStatus = currentCronJobData.SUSPENDED === 'yes' ? 'unsuspend' : 'suspend';\n\n displayModal(currentCronJobData.suspend_conf, `/api/v1/${suspendedStatus}/cron/index.php?job=${controlPanelFocusedElement}`);\n }\n\n const handleDelete = () => {\n const { cronJobs } = state;\n let currentCronJobData = cronJobs.filter(cronJob => cronJob.NAME === controlPanelFocusedElement)[0];\n\n displayModal(currentCronJobData.delete_conf, `/api/v1/delete/cron/index.php?job=${controlPanelFocusedElement}`);\n }\n\n const fetchData = () => {\n setLoading(true);\n return new Promise((resolve, reject) => {\n getCronList()\n .then(result => {\n setState({\n ...state,\n cronJobs: reformatData(result.data.data),\n cronReports: result.data.cron_reports,\n cronFav: result.data.cron_fav,\n selection: [],\n toggledAll: false,\n totalAmount: result.data.totalAmount\n });\n resolve();\n })\n .catch(err => console.error(err));\n });\n }\n\n const reformatData = data => {\n let cronJobs = [];\n\n for (let i in data) {\n data[i]['NAME'] = i;\n data[i]['isChecked'] = false;\n data[i]['FOCUSED'] = controlPanelFocusedElement === i;\n cronJobs.push(data[i]);\n }\n\n return cronJobs;\n }\n\n const changeSorting = (sorting, order) => {\n setState({\n ...state,\n sorting,\n order\n });\n }\n\n const cronJobs = () => {\n const { cronJobs } = state;\n const result = [];\n const cronFav = { ...state.cronFav };\n\n cronJobs.forEach(cronJob => {\n cronJob.FOCUSED = controlPanelFocusedElement === cronJob.NAME;\n\n if (cronFav[cronJob.NAME]) {\n cronJob.STARRED = cronFav[cronJob.NAME];\n } else {\n cronJob.STARRED = 0;\n }\n\n result.push(cronJob);\n });\n\n let sortedResult = sortArray(result);\n\n return sortedResult.map((item, index) => {\n return <CronJob data={item} key={index} toggleFav={toggleFav} checkItem={checkItem} handleModal={displayModal} />;\n });\n }\n\n const checkItem = name => {\n const { selection, cronJobs } = state;\n let duplicate = [...selection];\n let cronDuplicate = cronJobs;\n let checkedItem = duplicate.indexOf(name);\n\n let incomingItem = cronDuplicate.findIndex(cronJob => cronJob.NAME === name);\n cronDuplicate[incomingItem].isChecked = !cronDuplicate[incomingItem].isChecked;\n\n if (checkedItem !== -1) {\n duplicate.splice(checkedItem, 1);\n } else {\n duplicate.push(name);\n }\n\n setState({ ...state, cronJobs: cronDuplicate, selection: duplicate });\n }\n\n const sortArray = array => {\n const { order, sorting } = state;\n let sortingColumn = sortBy(sorting);\n\n if (order === \"descending\") {\n return array.sort((a, b) => (a[sortingColumn] < b[sortingColumn]) ? 1 : ((b[sortingColumn] < a[sortingColumn]) ? -1 : 0));\n } else {\n return array.sort((a, b) => (a[sortingColumn] > b[sortingColumn]) ? 1 : ((b[sortingColumn] > a[sortingColumn]) ? -1 : 0));\n }\n }\n\n const sortBy = sorting => {\n const { Date, Command, Starred } = i18n;\n\n switch (sorting) {\n case Date: return 'DATE';\n case Command: return 'CMD';\n case Starred: return 'STARRED';\n default: break;\n }\n }\n\n const toggleFav = (value, type) => {\n const { cronFav } = state;\n let cronFavDuplicate = cronFav;\n\n if (type === 'add') {\n cronFavDuplicate[value] = 1;\n\n addFavorite(value, 'cron')\n .then(() => {\n setState({ ...state, cronFav: cronFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n } else {\n cronFavDuplicate[value] = undefined;\n\n deleteFavorite(value, 'cron')\n .then(() => {\n setState({ ...state, cronFav: cronFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n }\n }\n\n const toggleAll = toggled => {\n const cronJobsDuplicate = [...state.cronJobs];\n\n if (toggled) {\n let cronJobNames = [];\n\n let cronJobs = cronJobsDuplicate.map(cronJob => {\n cronJobNames.push(cronJob.NAME);\n cronJob.isChecked = true;\n return cronJob;\n });\n\n setState({ ...state, cronJobs, selection: cronJobNames, toggledAll: toggled });\n } else {\n let cronJobs = cronJobsDuplicate.map(cronJob => {\n cronJob.isChecked = false;\n return cronJob;\n });\n setState({ ...state, cronJobs, selection: [], toggledAll: toggled });\n }\n }\n\n const bulk = action => {\n const { selection } = state;\n const notifications = state.cronReports === 'yes' ? 'delete-cron-reports' : 'add-cron-reports';\n\n if (action === notifications) {\n return handleCronNotifications();\n }\n\n if (selection.length && action) {\n setLoading(true);\n bulkAction(action, selection)\n .then(result => {\n if (result.status === 200) {\n toggleAll(false);\n fetchData().then(() => refreshMenuCounters());\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const displayModal = (text, url) => {\n setModal({\n ...modal,\n visible: !state.modalVisible,\n text,\n actionUrl: url\n });\n }\n\n const modalConfirmHandler = () => {\n if (!modal.actionUrl) {\n return modalCancelHandler();\n }\n\n modalCancelHandler();\n setLoading(true);\n handleAction(modal.actionUrl)\n .then(res => {\n if (res.data.error) {\n setLoading(false);\n return displayModal(res.data.error, '');\n }\n fetchData().then(() => refreshMenuCounters())\n })\n .catch(err => { setLoading(false); console.error(err); });\n }\n\n const refreshMenuCounters = () => {\n dispatch(refreshCounters()).then(() => setLoading(false));\n }\n\n const modalCancelHandler = () => {\n setModal({\n ...modal,\n visible: false,\n text: '',\n actionUrl: ''\n });\n }\n\n const handleCronNotifications = () => {\n const token = localStorage.getItem(\"token\");\n const url = `/api/v1/${state.cronReports === 'yes' ? 'delete' : 'add'}/cron/reports/?token=${token}`;\n\n handleAction(url)\n .then(res => {\n displayModal(res.data.message, '');\n fetchData();\n })\n .catch(err => console.error(err));\n }\n\n return (\n <div className=\"cronJobs\">\n <Helmet>\n <title>{`Vesta - ${i18n.CRON}`}</title>\n </Helmet>\n <Toolbar mobile={false} >\n <LeftButton name={i18n['Add Cron Job']} href=\"/add/cron\" showLeftMenu={true} />\n <div className=\"r-menu\">\n <div className=\"input-group input-group-sm\">\n <button onClick={handleCronNotifications} className=\"button-extra\" type=\"submit\">\n {state.cronReports === 'yes' ? i18n['turn off notifications'] : i18n['turn on notifications']}\n </button>\n <Checkbox toggleAll={toggleAll} toggled={state.toggledAll} />\n <Select list='cronList' bulkAction={bulk} cronReports={state.cronReports === 'yes'} />\n <DropdownFilter changeSorting={changeSorting} sorting={state.sorting} order={state.order} list=\"cronList\" />\n <SearchInput handleSearchTerm={term => props.changeSearchTerm(term)} />\n </div>\n </div>\n </Toolbar>\n <div className=\"cron-wrapper\">\n {loading\n ? <Spinner />\n : (<>\n {cronJobs()}\n <div className=\"total\">{state.totalAmount}</div>\n </>)}\n </div>\n <Modal\n showCancelButton={modal.actionUrl}\n onCancel={modalCancelHandler}\n onSave={modalConfirmHandler}\n show={modal.visible}\n text={modal.text} />\n </div>\n );\n}\n\nexport default CronJobs;\n","import React, { } from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Container from '../ControlPanel/Container/Container';\nimport ListItem from '../ControlPanel/ListItem/ListItem';\nimport './Package.scss';\nimport { Link } from 'react-router-dom';\nimport { useSelector } from 'react-redux';\n\nconst Package = props => {\n const { data } = props;\n const { i18n } = useSelector(state => state.session);\n\n const printNameServers = servers => {\n let serversArray = servers.split(',');\n\n return serversArray.map(\n (server, index) => <div key={index}>{server}</div>\n );\n }\n\n const toggleFav = (starred) => {\n if (starred) {\n props.toggleFav(data.NAME, 'add');\n } else {\n props.toggleFav(data.NAME, 'delete');\n }\n }\n\n const checkItem = () => {\n props.checkItem(data.NAME);\n }\n\n const handleDelete = () => {\n props.handleModal(data.delete_conf, `/api/v1/delete/package/index.php?package=${data.NAME}`);\n }\n\n return (\n <ListItem\n id={data.NAME}\n date={data.DATE}\n toggleFav={toggleFav}\n checkItem={checkItem}\n starred={data.STARRED}\n focused={data.FOCUSED}\n checked={data.isChecked}>\n\n <Container className=\"r-col w-85\">\n <div className=\"name\">{data.NAME}</div>\n <div>{data.FNAME} {data.LNAME}</div>\n <div className=\"stats\">\n <Container className=\"c-1 w-30\">\n <div>{i18n['Web Template']}: <span><span className=\"stat\">{data.WEB_TEMPLATE}</span></span></div>\n <div>{i18n['Proxy Template']}: <span><span className=\"stat\">{data.PROXY_TEMPLATE}</span></span></div>\n <div>{i18n['DNS Template']}: <span><span className=\"stat\">{data.DNS_TEMPLATE}</span></span></div>\n <div>{i18n['SSH Access']}: <span><span className=\"stat\">{data.SHELL}</span></span></div>\n <div>{i18n['Web Domains']}: <span><span className=\"stat\">{data.WEB_DOMAINS}</span></span></div>\n <div>{i18n['Web Aliases']}: <span><span className=\"stat\">{data.WEB_ALIASES}</span></span></div>\n </Container>\n <Container className=\"c-2 w-35\">\n <div>{i18n['DNS domains']}: <span><span className=\"stat\">{data.DNS_DOMAINS}</span></span></div>\n <div>{i18n['DNS records']}: <span><span className=\"stat\">{data.DNS_RECORDS}</span></span></div>\n <div>{i18n['Mail Domains']}: <span><span className=\"stat\">{data.MAIL_DOMAINS}</span></span></div>\n <div>{i18n['Mail Accounts']}: <span><span className=\"stat\">{data.MAIL_ACCOUNTS}</span></span></div>\n <div>{i18n.Databases}: <span><span className=\"stat\">{data.DATABASES}</span></span></div>\n <div>{i18n['Cron Jobs']}: <span><span className=\"stat\">{data.CRON_JOBS}</span></span></div>\n </Container>\n <Container className=\"c-3 w-35\">\n <div><span>{i18n.Backups}:</span> <span><span className=\"stat\">{data.BACKUPS}</span></span></div>\n <div><span>{i18n.Bandwidth}:</span> <span><span><span className=\"stat\">{data.BANDWIDTH}</span> {i18n.mb}</span></span></div>\n <div><span>{i18n.Disk}:</span> <span><span><span className=\"stat\">{data.DISK_QUOTA}</span> {i18n.mb}</span></span></div>\n <div className=\"ns\"><span>{i18n['Name Servers']}:</span> <span><span className=\"stat\">{printNameServers(data.NS)}</span></span></div>\n </Container>\n </div>\n </Container>\n <div className=\"actions\">\n <div>\n <Link className=\"link-edit\" to={`/edit/package/?package=${data.NAME}`}>\n {i18n.edit}\n {data.FOCUSED ? <span className=\"shortcut-button html-unicode\">&#8617;</span> : <FontAwesomeIcon icon=\"pen\" />}\n </Link>\n </div>\n\n <div>\n <button className=\"link-delete\" onClick={() => handleDelete()}>\n {i18n.Delete}\n {data.FOCUSED ? <span className=\"shortcut-button del\">Del</span> : <FontAwesomeIcon icon=\"times\" />}\n </button>\n </div>\n </div>\n </ListItem>\n );\n}\n\nexport default Package;","import React, { useEffect, useState } from 'react';\nimport { addControlPanelContentFocusedElement, removeControlPanelContentFocusedElement } from '../../actions/ControlPanelContent/controlPanelContentActions';\nimport { addActiveElement, removeFocusedElement } from '../../actions/MainNavigation/mainNavigationActions';\nimport { bulkAction, getPackageList, handleAction } from '../../ControlPanelService/Package';\nimport DropdownFilter from '../../components/MainNav/Toolbar/DropdownFilter/DropdownFilter';\nimport * as MainNavigation from '../../actions/MainNavigation/mainNavigationActions';\nimport SearchInput from '../../components/MainNav/Toolbar/SearchInput/SearchInput';\nimport { addFavorite, deleteFavorite } from '../../ControlPanelService/Favorites';\nimport LeftButton from '../../components/MainNav/Toolbar/LeftButton/LeftButton';\nimport Checkbox from '../../components/MainNav/Toolbar/Checkbox/Checkbox';\nimport Select from '../../components/MainNav/Toolbar/Select/Select';\nimport Toolbar from '../../components/MainNav/Toolbar/Toolbar';\nimport Modal from '../../components/ControlPanel/Modal/Modal';\nimport Package from '../../components/Package/Package';\nimport Spinner from '../../components/Spinner/Spinner';\nimport { useDispatch, useSelector } from 'react-redux';\nimport './Packages.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\n\nconst Packages = props => {\n const { i18n } = useSelector(state => state.session);\n const { controlPanelFocusedElement } = useSelector(state => state.controlPanelContent);\n const { focusedElement } = useSelector(state => state.mainNavigation);\n const dispatch = useDispatch();\n const [loading, setLoading] = useState(false);\n const [modal, setModal] = useState({\n text: '',\n visible: false,\n actionUrl: ''\n });\n const [state, setState] = useState({\n packages: [],\n packagesFav: [],\n toggledAll: false,\n sorting: i18n.Date,\n order: \"descending\",\n selection: [],\n totalAmount: ''\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/package/'));\n dispatch(removeFocusedElement());\n dispatch(removeControlPanelContentFocusedElement());\n fetchData().then(() => setLoading(false));\n\n return () => {\n dispatch(removeControlPanelContentFocusedElement());\n }\n }, []);\n\n useEffect(() => {\n window.addEventListener(\"keydown\", handleContentSelection);\n window.addEventListener(\"keydown\", handleFocusedElementShortcuts);\n\n return () => {\n window.removeEventListener(\"keydown\", handleContentSelection);\n window.removeEventListener(\"keydown\", handleFocusedElementShortcuts);\n };\n }, [controlPanelFocusedElement, focusedElement, state.packages]);\n\n const handleContentSelection = event => {\n if (event.keyCode === 38 || event.keyCode === 40) {\n if (focusedElement) {\n dispatch(MainNavigation.removeFocusedElement());\n }\n }\n\n if (event.keyCode === 38) {\n event.preventDefault();\n handleArrowUp();\n } else if (event.keyCode === 40) {\n event.preventDefault();\n handleArrowDown();\n }\n }\n\n const initFocusedElement = packages => {\n packages[0]['FOCUSED'] = packages[0]['NAME'];\n setState({ ...state, packages });\n dispatch(addControlPanelContentFocusedElement(packages[0]['NAME']));\n }\n\n const handleArrowDown = () => {\n let packages = [...state.packages];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(packages);\n return;\n }\n\n let focusedElementPosition = packages.findIndex(pack => pack.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== packages.length - 1) {\n let nextFocusedElement = packages[focusedElementPosition + 1];\n packages[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, packages });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleArrowUp = () => {\n let packages = [...state.packages];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(packages);\n return;\n }\n\n let focusedElementPosition = packages.findIndex(pack => pack.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== 0) {\n let nextFocusedElement = packages[focusedElementPosition - 1];\n packages[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, packages });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleFocusedElementShortcuts = event => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus');\n\n if (controlPanelFocusedElement && !isSearchInputFocused) {\n switch (event.keyCode) {\n case 8: return handleDelete();\n case 13: return handleEdit();\n default: break;\n }\n }\n }\n\n const handleEdit = () => {\n props.history.push(`/edit/package/?package=${controlPanelFocusedElement}`);\n }\n\n const handleDelete = () => {\n const { packages } = state;\n let currentPackageData = packages.filter(pack => pack.NAME === controlPanelFocusedElement)[0];\n\n displayModal(currentPackageData.delete_conf, `/api/v1/delete/package/index.php?package=${controlPanelFocusedElement}`);\n }\n\n const fetchData = () => {\n setLoading(true);\n return new Promise((resolve, reject) => {\n getPackageList()\n .then(result => {\n setState({\n ...state,\n packages: reformatData(result.data.data),\n packagesFav: result.data.packagesFav,\n totalAmount: result.data.totalAmount,\n selection: [],\n toggledAll: false\n });\n resolve();\n })\n .catch(err => console.error(err));\n });\n }\n\n const reformatData = data => {\n let packages = [];\n\n for (let i in data) {\n data[i]['NAME'] = i;\n data[i]['FOCUSED'] = controlPanelFocusedElement === i;\n packages.push(data[i]);\n }\n\n return packages;\n }\n\n const changeSorting = (sorting, order) => {\n setState({\n ...state,\n sorting,\n order\n });\n }\n\n const packages = () => {\n const { packages } = state;\n const packagesFav = { ...state.packagesFav };\n const result = [];\n\n packages.forEach(pack => {\n pack.FOCUSED = controlPanelFocusedElement === pack.NAME;\n\n if (packagesFav[pack.NAME]) {\n pack.STARRED = packagesFav[pack.NAME];\n } else {\n pack.STARRED = 0;\n }\n\n result.push(pack);\n });\n\n let sortedResult = sortArray(result);\n\n return sortedResult.map((item, index) => {\n return <Package data={item} key={index} toggleFav={toggleFav} checkItem={checkItem} handleModal={displayModal} />;\n });\n }\n\n const checkItem = name => {\n const { selection, packages } = state;\n let duplicate = [...selection];\n let packagesDuplicate = packages;\n let checkedItem = duplicate.indexOf(name);\n\n let incomingItem = packagesDuplicate.findIndex(pack => pack.NAME === name);\n packagesDuplicate[incomingItem].isChecked = !packagesDuplicate[incomingItem].isChecked;\n\n if (checkedItem !== -1) {\n duplicate.splice(checkedItem, 1);\n } else {\n duplicate.push(name);\n }\n\n setState({ ...state, packages: packagesDuplicate, selection: duplicate });\n }\n\n const sortArray = array => {\n const { order, sorting } = state;\n let sortingColumn = sortBy(sorting);\n\n if (order === \"descending\") {\n return array.sort((a, b) => (a[sortingColumn] < b[sortingColumn]) ? 1 : ((b[sortingColumn] < a[sortingColumn]) ? -1 : 0));\n } else {\n return array.sort((a, b) => (a[sortingColumn] > b[sortingColumn]) ? 1 : ((b[sortingColumn] > a[sortingColumn]) ? -1 : 0));\n }\n }\n\n const sortBy = sorting => {\n const { Date, Starred } = i18n;\n\n switch (sorting) {\n case Date: return 'DATE';\n case i18n['Package Name']: return 'NAME';\n case Starred: return 'STARRED';\n default: break;\n }\n }\n\n const toggleFav = (value, type) => {\n const { packagesFav } = state;\n let packagesFavDuplicate = packagesFav;\n\n if (type === 'add') {\n packagesFavDuplicate[value] = 1;\n\n addFavorite(value, 'package')\n .then(() => {\n setState({ ...state, packagesFav: packagesFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n } else {\n packagesFavDuplicate[value] = undefined;\n\n deleteFavorite(value, 'package')\n .then(() => {\n setState({ ...state, packagesFav: packagesFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n }\n }\n\n const toggleAll = toggled => {\n const packagesDuplicate = [...state.packages];\n\n if (toggled) {\n let packageNames = [];\n\n let packages = packagesDuplicate.map(pack => {\n packageNames.push(pack.NAME);\n pack.isChecked = true;\n return pack;\n });\n\n setState({ ...state, packages, selection: packageNames, toggledAll: toggled });\n } else {\n let packages = packagesDuplicate.map(pack => {\n pack.isChecked = false;\n return pack;\n });\n\n setState({ ...state, packages, selection: [], toggledAll: toggled });\n }\n }\n\n const bulk = action => {\n const { selection } = state;\n\n if (selection.length && action) {\n setLoading(true);\n bulkAction(action, selection)\n .then(result => {\n if (result.status === 200) {\n toggleAll(false);\n fetchData().then(() => refreshMenuCounters());\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const displayModal = (text, actionUrl) => {\n setModal({ ...modal, visible: !modal.visible, text, actionUrl })\n }\n\n const modalConfirmHandler = () => {\n if (!modal.actionUrl) {\n return modalCancelHandler();\n }\n\n modalCancelHandler();\n setLoading(true);\n handleAction(modal.actionUrl)\n .then(res => {\n if (res.data.error) {\n setLoading(false);\n return displayModal(res.data.error, '');\n }\n fetchData().then(() => refreshMenuCounters())\n })\n .catch(err => { setLoading(false); console.error(err); });\n }\n\n const refreshMenuCounters = () => {\n dispatch(refreshCounters()).then(() => setLoading(false));\n }\n\n const modalCancelHandler = () => {\n setModal({ ...modal, visible: false, text: '', actionUrl: '' })\n }\n\n return (\n <div className=\"packages\">\n <Helmet>\n <title>{`Vesta - ${i18n.PACKAGE}`}</title>\n </Helmet>\n <Toolbar mobile={false} >\n <LeftButton name={i18n['Add Package']} href=\"/add/package/\" showLeftMenu={true} />\n <div className=\"r-menu\">\n <div className=\"input-group input-group-sm\">\n <Checkbox toggleAll={toggleAll} toggled={state.toggledAll} />\n <Select list='packagesList' bulkAction={bulk} />\n <DropdownFilter changeSorting={changeSorting} sorting={state.sorting} order={state.order} list=\"packagesList\" />\n <SearchInput handleSearchTerm={term => props.changeSearchTerm(term)} />\n </div>\n </div>\n </Toolbar>\n <div className=\"packages-wrapper\">\n {\n loading\n ? <Spinner />\n : (<>\n {packages()}\n <div className=\"total\">{state.totalAmount}</div>\n </>)\n }\n </div>\n <Modal\n onSave={modalConfirmHandler}\n onCancel={modalCancelHandler}\n show={modal.visible}\n text={modal.text} />\n </div>\n );\n}\n\nexport default Packages;\n","import axios from \"axios\";\n\nconst webApiUri = '/api/v1/languages.php';\nconst BASE_URL = window.location.origin;\n\nexport const getLanguages = () => {\n return axios.get(BASE_URL + webApiUri);\n}\n\nexport const languagesMock = [\n \"ar\",\n \"az\",\n \"bg\",\n \"bs\",\n \"cn\",\n \"cz\",\n \"da\",\n \"de\",\n \"el\",\n \"en\",\n \"es\",\n \"fa\",\n \"fi\",\n \"fr\",\n \"hu\",\n \"id\",\n \"it\",\n \"ja\",\n \"ka\",\n \"ko\",\n \"nl\",\n \"no\",\n \"pl\",\n \"pt-BR\",\n \"pt\",\n \"ro\",\n \"ru\",\n \"se\",\n \"sr\",\n \"th\",\n \"tr\",\n \"tw\",\n \"ua\",\n \"ur\",\n \"vi\"\n];","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport Password from '../../../components/ControlPanel/AddItemLayout/Form/Password/Password';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { getLanguages } from '../../../ControlPanelService/Languages';\nimport { getPackageList } from '../../../ControlPanelService/Package';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { addUser } from '../../../ControlPanelService/Users';\nimport Spinner from '../../../components/Spinner/Spinner';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './AddUser.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nconst AddUser = props => {\n const { i18n } = useSelector(state => state.session);\n const { session } = useSelector(state => state.userSession);\n const history = useHistory();\n const dispatch = useDispatch();\n const [state, setState] = useState({\n vEmail: '',\n vNotify: '',\n languages: [],\n packages: [],\n errorMessage: '',\n okMessage: '',\n loading: false\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/user/'));\n dispatch(removeFocusedElement());\n\n setState({ ...state, loading: true });\n\n Promise.all([getAllPackages(), getAllLanguages()])\n .then(result => {\n const [packages, languages] = result;\n let packageNames = getPackageNames(packages.data.data);\n\n setState({ ...state, packages: packageNames, languages: languages.data, loading: false });\n });\n }, []);\n\n const getAllPackages = () => {\n return getPackageList().catch(err => console.error(err));\n }\n\n const getAllLanguages = () => {\n return getLanguages().catch(err => console.error(err));\n }\n\n const getPackageNames = packages => {\n let result = [];\n\n for (let i in packages) {\n result.push(i);\n }\n\n return result;\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let newUser = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n newUser[name] = value;\n }\n\n if (Object.keys(newUser).length !== 0 && newUser.constructor === Object) {\n setState({ ...state, loading: true });\n addUser(newUser)\n .then(result => {\n const { error_msg: errorMessage, ok_msg: okMessage } = result.data;\n\n if (errorMessage) {\n setState({ ...state, errorMessage, okMessage, loading: false });\n } else {\n dispatch(refreshCounters()).then(() => {\n setState({ ...state, okMessage, errorMessage: '', loading: false });\n });\n }\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err);\n });\n }\n }\n\n const renderPackageOptions = () => {\n return state.packages.map((pack, index) => (\n <option key={index} value={pack}>{pack}</option>\n ));\n }\n\n const renderLanguageOptions = () => {\n return state.languages.map((language, index) => (\n <option key={index} selected={session.LANGUAGE === language} value={language}>{language}</option>\n ));\n }\n\n const onChangeEmail = value => {\n setState({ ...state, vEmail: value });\n }\n\n const onBlurEmail = () => {\n if (!state.vNotify) {\n setState({ ...state, vNotify: state.vEmail });\n }\n }\n\n const onChangeSecondEmail = value => {\n setState({ ...state, vNotify: value });\n }\n\n const repeatEmailHandler = checked => {\n if (checked) {\n if (state.vEmail) {\n setState({ ...state, vNotify: state.vEmail });\n }\n } else {\n setState({ ...state, vNotify: '' });\n }\n }\n\n return (\n <div className=\"edit-template add-user\">\n <Helmet>\n <title>{`Vesta - ${i18n.USER}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Adding User']}</div>\n <div className=\"error\"><span className=\"error-message\">{state.errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {state.errorMessage}</span></div>\n <div className=\"success\">\n <span className=\"ok-message\">{state.okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(state.okMessage)}</span> </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"add-user\">\n <div className=\"form-group\">\n <label htmlFor=\"username\">{i18n.Username}</label>\n <input type=\"text\" className=\"form-control\" id=\"username\" name=\"v_username\" />\n </div>\n\n <Password name='v_password' />\n\n <div className=\"form-group\">\n <label htmlFor=\"email\">\n {i18n.Email} /\n <div>\n <input\n type=\"checkbox\"\n id=\"send-credentials\"\n onChange={event => repeatEmailHandler(event.target.checked)} />\n <label htmlFor=\"send-credentials\">{i18n['Send login credentials to email address']}</label>\n </div>\n </label>\n <input\n type=\"email\"\n name=\"v_email\"\n className=\"form-control\"\n id=\"email\"\n value={state.vEmail}\n onChange={event => onChangeEmail(event.target.value)}\n onBlur={() => onBlurEmail()} />\n </div>\n\n <div class=\"form-group\">\n <label htmlFor=\"package\">{i18n.Package}</label>\n <select class=\"form-control\" id=\"package\" name=\"v_package\">\n {renderPackageOptions()}\n </select>\n </div>\n\n <div class=\"form-group\">\n <label htmlFor=\"language\">{i18n.Language}</label>\n <select class=\"form-control\" id=\"language\" name=\"v_language\">\n {renderLanguageOptions()}\n </select>\n </div>\n\n <div className=\"form-group\">\n <label htmlFor=\"firstName\">{i18n['First Name']}</label>\n <input type=\"text\" className=\"form-control\" id=\"firstName\" name=\"v_fname\" />\n </div>\n\n <div className=\"form-group\">\n <label htmlFor=\"lastName\">{i18n['Last Name']}</label>\n <input type=\"text\" className=\"form-control\" id=\"lastName\" name=\"v_lname\" />\n </div>\n\n <div className=\"form-group\">\n <label htmlFor=\"sendLoginCredentialsToEmailAddress\">{i18n['Send login credentials to email address']}</label>\n <input\n type=\"email\"\n className=\"form-control\"\n id=\"sendLoginCredentialsToEmailAddress\"\n value={state.vNotify}\n onChange={e => onChangeSecondEmail(e.target.value)}\n name=\"v_notify\" />\n </div>\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Add}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/user/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div>\n );\n}\n\nexport default AddUser;","import axios from \"axios\";\nimport { getAuthToken } from \"src/utils/token\";\n\nconst deleteAutoUpdateUri = '/api/v1/delete/cron/autoupdate/';\nconst addAutoUpdateUri = '/api/v1/add/cron/autoupdate/';\nconst webApiUri = '/api/v1/list/updates/index.php';\nconst BASE_URL = window.location.origin;\n\nexport const getUpdatesList = () => {\n return axios.get(BASE_URL + webApiUri);\n}\n\nexport const bulkAction = (action, updates) => {\n const formData = new FormData();\n formData.append(\"action\", action);\n formData.append(\"token\", getAuthToken());\n\n updates.forEach(update => {\n formData.append(\"pkg[]\", update);\n });\n\n return axios.post(BASE_URL + '/api/v1/bulk/vesta/', formData);\n};\n\nexport const handleAction = uri => {\n return axios.get(BASE_URL + uri, {\n params: {\n token: getAuthToken()\n }\n });\n}\n\nexport const enableAutoUpdate = () => {\n return axios.get(`${BASE_URL}${addAutoUpdateUri}`, {\n params: {\n token: getAuthToken()\n }\n });\n};\n\nexport const disableAutoUpdate = () => {\n return axios.get(`${BASE_URL}${deleteAutoUpdateUri}`, {\n params: {\n token: getAuthToken()\n }\n });\n};","import React, { } from 'react';\nimport { useSelector } from 'react-redux';\nimport Container from '../ControlPanel/Container/Container';\nimport ListItem from '../ControlPanel/ListItem/ListItem';\nimport './Update.scss';\n\nconst Update = props => {\n const { data } = props;\n const { i18n } = useSelector(state => state.session);\n\n const isUpdated = status => {\n if (status === 'no') {\n return 'OUTDATED';\n }\n\n return 'UPDATED';\n }\n\n const isOutdated = status => {\n return status === \"no\";\n }\n\n const checkItem = () => {\n props.checkItem(props.data.NAME);\n }\n\n return (\n <ListItem\n date={false}\n id={data.NAME}\n checkItem={checkItem}\n focused={data.FOCUSED}\n checked={data.isChecked}\n outdated={isOutdated(data.UPDATED)}\n leftNameText={isUpdated(data.UPDATED)}>\n\n <Container className=\"r-col w-85\">\n <div className=\"name\">{data.NAME}</div>\n <div className=\"stats\">\n <Container className=\"c-1\">\n <div className=\"descr\"><span className=\"stat\">{data.DESCR}</span></div>\n </Container>\n <Container className=\"c-2\">\n <div>{i18n.Version}: <span><span className=\"stat\">{data.VERSION}</span> {`(${data.ARCH})`}</span></div>\n </Container>\n <Container className=\"c-3\">\n <div>{i18n.Release}: <span className=\"stat\">{data.RELEASE}</span></div>\n </Container>\n </div>\n </Container>\n\n </ListItem>\n );\n}\n\nexport default Update;","import React, { useEffect, useState } from 'react';\nimport { addControlPanelContentFocusedElement, removeControlPanelContentFocusedElement } from '../../actions/ControlPanelContent/controlPanelContentActions';\nimport { addActiveElement, removeFocusedElement } from '../../actions/MainNavigation/mainNavigationActions';\nimport { bulkAction, getUpdatesList, enableAutoUpdate, disableAutoUpdate } from '../../ControlPanelService/Updates';\nimport * as MainNavigation from '../../actions/MainNavigation/mainNavigationActions';\nimport SearchInput from '../../components/MainNav/Toolbar/SearchInput/SearchInput';\nimport LeftButton from '../../components/MainNav/Toolbar/LeftButton/LeftButton';\nimport Modal from 'src/components/ControlPanel/Modal/Modal';\nimport Checkbox from '../../components/MainNav/Toolbar/Checkbox/Checkbox';\nimport Select from '../../components/MainNav/Toolbar/Select/Select';\nimport Toolbar from '../../components/MainNav/Toolbar/Toolbar';\nimport { useDispatch, useSelector } from 'react-redux';\nimport Spinner from '../../components/Spinner/Spinner';\nimport Update from '../../components/Update/Update';\nimport './Updates.scss';\nimport { Helmet } from 'react-helmet';\n\nconst Updates = props => {\n const { i18n } = useSelector(state => state.session);\n const { controlPanelFocusedElement } = useSelector(state => state.controlPanelContent);\n const { focusedElement } = useSelector(state => state.mainNavigation);\n const dispatch = useDispatch();\n const [state, setState] = useState({\n updates: [],\n selection: [],\n autoUpdate: '',\n token: '',\n loading: false,\n toggledAll: false\n });\n const [modal, setModal] = useState({\n text: '',\n visible: false,\n actionUrl: ''\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/updates/'));\n dispatch(removeFocusedElement());\n dispatch(removeControlPanelContentFocusedElement());\n fetchData();\n\n return () => {\n dispatch(removeControlPanelContentFocusedElement());\n }\n }, []);\n\n useEffect(() => {\n window.addEventListener(\"keydown\", handleContentSelection);\n\n return () => {\n window.removeEventListener(\"keydown\", handleContentSelection);\n };\n }, [controlPanelFocusedElement, focusedElement, state.updates]);\n\n const handleContentSelection = event => {\n if (event.keyCode === 38 || event.keyCode === 40) {\n if (focusedElement) {\n dispatch(MainNavigation.removeFocusedElement());\n }\n }\n\n if (event.keyCode === 38) {\n event.preventDefault();\n handleArrowUp();\n } else if (event.keyCode === 40) {\n event.preventDefault();\n handleArrowDown();\n }\n }\n\n const initFocusedElement = updates => {\n updates[0]['FOCUSED'] = updates[0]['NAME'];\n setState({ ...state, updates });\n dispatch(addControlPanelContentFocusedElement(updates[0]['NAME']));\n }\n\n const handleArrowDown = () => {\n let updates = [...state.updates];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(updates);\n return;\n }\n\n let focusedElementPosition = updates.findIndex(update => update.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== updates.length - 1) {\n let nextFocusedElement = updates[focusedElementPosition + 1];\n updates[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, updates });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleArrowUp = () => {\n let updates = [...state.updates];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(updates);\n return;\n }\n\n let focusedElementPosition = updates.findIndex(update => update.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== 0) {\n let nextFocusedElement = updates[focusedElementPosition - 1];\n updates[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, updates });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const fetchData = () => {\n setState({ ...state, loading: true });\n\n getUpdatesList()\n .then(result => {\n setState({\n ...state,\n selection: [],\n updates: reformatData(result.data.data),\n autoUpdate: result.data.autoUpdate,\n loading: false\n });\n })\n .catch(err => console.error(err));\n }\n\n const reformatData = data => {\n let updates = [];\n\n for (let i in data) {\n data[i]['NAME'] = i;\n data[i]['FOCUSED'] = controlPanelFocusedElement === i;\n updates.push(data[i]);\n }\n\n return updates;\n }\n\n const updates = () => {\n let updates = [...state.updates];\n\n updates.forEach(update => {\n update.FOCUSED = controlPanelFocusedElement === update.NAME;\n });\n\n return updates.map((item, index) => {\n return <Update data={item} key={index} checkItem={checkItem} />;\n });\n }\n\n const checkItem = name => {\n let duplicate = [...state.selection];\n let updatesDuplicate = [...state.updates];\n let checkedItem = duplicate.indexOf(name);\n\n let incomingItem = updatesDuplicate.findIndex(update => update.NAME === name);\n updatesDuplicate[incomingItem].isChecked = !updatesDuplicate[incomingItem].isChecked;\n\n if (checkedItem !== -1) {\n duplicate.splice(checkedItem, 1);\n } else {\n duplicate.push(name);\n }\n\n setState({ ...state, updates: updatesDuplicate, selection: duplicate });\n }\n\n const toggleAll = toggled => {\n const updatesDuplicate = [...state.updates];\n\n if (toggled) {\n let updateNames = [];\n\n let updates = updatesDuplicate.map(update => {\n updateNames.push(update.NAME);\n update.isChecked = true;\n return update;\n });\n\n setState({ ...state, updates, selection: updateNames, toggledAll: toggled });\n } else {\n let updates = updatesDuplicate.map(update => {\n update.isChecked = false;\n return update;\n });\n\n setState({ ...state, updates, selection: [], toggledAll: toggled });\n }\n }\n\n const bulk = action => {\n const { selection } = state;\n\n if (selection.length && action !== 'apply to selected') {\n bulkAction(action, selection)\n .then(res => {\n toggleAll(false);\n if (res.status === 200) {\n if (res.data.error) {\n setState({ ...state, loading: false });\n return displayModal(res.data.error, '');\n }\n\n displayModal(res.data.message, '');\n fetchData();\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const handleAutoUpdate = () => {\n if (state.autoUpdate === 'Enabled') {\n disableAutoUpdate()\n .then(res => {\n if (res.data.error) {\n setState({ ...state, loading: false });\n return displayModal(res.data.error, '');\n }\n\n displayModal(res.data.message, '');\n fetchData();\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err);\n });\n } else {\n enableAutoUpdate()\n .then(res => {\n if (res.data.error) {\n setState({ ...state, loading: false });\n return displayModal(res.data.error, '');\n }\n\n displayModal(res.data.message, '');\n fetchData();\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err);\n });\n }\n }\n\n const displayModal = (text, url) => {\n setState({ ...state, loading: true });\n setModal({\n ...modal,\n visible: true,\n text: text,\n actionUrl: url\n });\n }\n\n const modalCancelHandler = () => {\n setModal({\n ...modal,\n visible: false,\n text: '',\n actionUrl: ''\n });\n }\n\n const printAutoUpdateButtonName = () => {\n if (state.autoUpdate === 'Enabled') {\n return i18n['disable autoupdate'];\n } else {\n return i18n['enable autoupdate'];\n }\n }\n\n return (\n <div className=\"statistics-list updates\">\n <Helmet>\n <title>{`Vesta - ${i18n.UPDATES}`}</title>\n </Helmet>\n <Toolbar mobile={false} className=\"justify-right\">\n <LeftButton name=\"Add Cron Job\" showLeftMenu={false} />\n <div className=\"r-menu\">\n <div className=\"input-group input-group-sm\">\n <button onClick={handleAutoUpdate} className=\"button-extra\">{printAutoUpdateButtonName()}</button>\n <Checkbox toggleAll={toggleAll} />\n <Select list='updatesList' bulkAction={bulk} />\n <SearchInput handleSearchTerm={term => props.changeSearchTerm(term)} />\n </div>\n </div>\n </Toolbar>\n {state.loading ? <Spinner /> : updates()}\n <Modal\n onSave={modalCancelHandler}\n onCancel={modalCancelHandler}\n show={modal.visible}\n text={modal.text} />\n </div>\n );\n}\n\nexport default Updates;","import React from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Container from '../ControlPanel/Container/Container';\nimport ListItem from '../ControlPanel/ListItem/ListItem';\nimport './ServerSys.scss';\nimport { Link } from 'react-router-dom';\nimport { useSelector } from 'react-redux';\n\nconst Server = props => {\n const { data } = props;\n const { i18n } = useSelector(state => state.session);\n\n const checkItem = () => {\n props.checkItem(props.data.HOSTNAME);\n }\n\n return (\n <ListItem\n id={data.NAME}\n focused={data.FOCUSED}\n sysInfo={data.HOSTNAME}\n checked={data.isChecked}\n checkItem={checkItem}>\n\n <Container className=\"r-col w-85\">\n <div className=\"name\">{data.HOSTNAME}</div>\n <div className=\"stats\">\n <Container className=\"c-1\">\n <div className=\"descr\"><span><span className=\"stat\">{data.OS} {data.VERSION}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {`(${data.ARCH})`}</span></div>\n </Container>\n <Container className=\"c-2\">\n <div>{i18n['Load Average']}: <span><span className=\"stat\">{data.LOADAVERAGE}</span></span></div>\n </Container>\n <Container className=\"c-3\">\n <div><span>{i18n.Uptime}: <span className=\"stat\">{data.UPTIME}</span></span></div>\n </Container>\n </div>\n </Container>\n <div className=\"actions\">\n\n <div>\n <Link className=\"link-list\" to={`/edit/server/`}>\n {i18n.configure}\n {data.FOCUSED ? <span className=\"shortcut-button html-unicode\">&#8617;</span> : <FontAwesomeIcon icon=\"cogs\" />}\n </Link>\n </div>\n\n <div>\n <button className=\"link-download restart\" onClick={() => props.handleAction(`/api/v1/restart/system/?hostname=${data.NAME}`)}>\n {i18n.restart}\n {\n data.FOCUSED\n ? <span className=\"shortcut-button\">R</span>\n : <svg width=\"1em\" height=\"1em\" viewBox=\"0 0 16 16\" class=\"bi bi-arrow-repeat\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" d=\"M2.854 7.146a.5.5 0 0 0-.708 0l-2 2a.5.5 0 1 0 .708.708L2.5 8.207l1.646 1.647a.5.5 0 0 0 .708-.708l-2-2zm13-1a.5.5 0 0 0-.708 0L13.5 7.793l-1.646-1.647a.5.5 0 0 0-.708.708l2 2a.5.5 0 0 0 .708 0l2-2a.5.5 0 0 0 0-.708z\" />\n <path fill-rule=\"evenodd\" d=\"M8 3a4.995 4.995 0 0 0-4.192 2.273.5.5 0 0 1-.837-.546A6 6 0 0 1 14 8a.5.5 0 0 1-1.001 0 5 5 0 0 0-5-5zM2.5 7.5A.5.5 0 0 1 3 8a5 5 0 0 0 9.192 2.727.5.5 0 1 1 .837.546A6 6 0 0 1 2 8a.5.5 0 0 1 .501-.5z\" />\n </svg>\n }\n </button>\n </div>\n </div>\n </ListItem>\n );\n}\n\nexport default Server;","import React from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Container from '../ControlPanel/Container/Container';\nimport ListItem from '../ControlPanel/ListItem/ListItem';\nimport './Server.scss';\nimport { Link } from 'react-router-dom';\nimport { useSelector } from 'react-redux';\n\nconst Server = props => {\n const { data } = props;\n const { i18n } = useSelector(state => state.session);\n\n const checkItem = () => {\n props.checkItem(data.NAME);\n }\n\n return (\n <ListItem\n id={data.NAME}\n focused={data.FOCUSED}\n checked={data.isChecked}\n checkItem={checkItem}>\n\n <Container className=\"r-col w-85\">\n <div className=\"server-name\">{data.NAME}</div>\n <div className=\"stats\">\n <Container className=\"c-1\">\n <div className=\"descr\"><span className=\"stat\">{i18n[data.SYSTEM]}</span></div>\n </Container>\n <Container className=\"c-1\" />\n <Container className=\"c-1\">\n <div className=\"descr\"><span>{i18n.CPU}: <span className=\"stat\">{data.CPU}</span></span></div>\n </Container>\n <Container className=\"c-2\">\n <div><span>{i18n.Memory}: <span className=\"stat\">{data.MEM} {i18n.mb}</span></span></div>\n </Container>\n <Container className=\"c-3\">\n <div><span>{i18n.Uptime}: <span className=\"stat\">{data.RTIME}</span></span></div>\n </Container>\n <Container className=\"c-1\" />\n </div>\n </Container>\n <div className=\"actions\">\n\n <div>\n <Link className=\"link-list\" to={`/edit/server/${data.NAME}`}>\n {i18n.configure}\n {data.FOCUSED ? <span className=\"shortcut-button html-unicode\">&#8617;</span> : <FontAwesomeIcon icon=\"cogs\" />}\n </Link>\n </div>\n\n <div>\n <button className=\"link-delete\" onClick={() => props.handleAction('/api/v1' + data.action_url)}>\n {data.STATE === 'running' ? i18n.stop : i18n.start}\n {data.FOCUSED ? <span className=\"shortcut-button\">S</span> : <FontAwesomeIcon icon={data.STATE === 'running' ? \"stop\" : \"play\"} />}\n </button>\n </div>\n\n <div>\n <button className=\"link-download restart\" onClick={() => props.handleAction(`/api/v1/restart/service/?srv=${data.NAME}`)}>\n {i18n.restart}\n {\n data.FOCUSED\n ? <span className=\"shortcut-button\">R</span>\n : <svg width=\"1em\" height=\"1em\" viewBox=\"0 0 16 16\" class=\"bi bi-arrow-repeat\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" d=\"M2.854 7.146a.5.5 0 0 0-.708 0l-2 2a.5.5 0 1 0 .708.708L2.5 8.207l1.646 1.647a.5.5 0 0 0 .708-.708l-2-2zm13-1a.5.5 0 0 0-.708 0L13.5 7.793l-1.646-1.647a.5.5 0 0 0-.708.708l2 2a.5.5 0 0 0 .708 0l2-2a.5.5 0 0 0 0-.708z\" />\n <path fill-rule=\"evenodd\" d=\"M8 3a4.995 4.995 0 0 0-4.192 2.273.5.5 0 0 1-.837-.546A6 6 0 0 1 14 8a.5.5 0 0 1-1.001 0 5 5 0 0 0-5-5zM2.5 7.5A.5.5 0 0 1 3 8a5 5 0 0 0 9.192 2.727.5.5 0 1 1 .837.546A6 6 0 0 1 2 8a.5.5 0 0 1 .501-.5z\" />\n </svg>\n }\n </button>\n </div>\n\n </div>\n </ListItem>\n );\n}\n\nexport default Server;\n","import React, { useEffect, useState } from 'react';\nimport { addControlPanelContentFocusedElement, removeControlPanelContentFocusedElement } from '../../actions/ControlPanelContent/controlPanelContentActions';\nimport { addActiveElement, removeFocusedElement } from '../../actions/MainNavigation/mainNavigationActions';\nimport { bulkAction, getServersList, handleAction } from '../../ControlPanelService/Server';\nimport SearchInput from '../../components/MainNav/Toolbar/SearchInput/SearchInput';\nimport LeftButton from '../../components/MainNav/Toolbar/LeftButton/LeftButton';\nimport Checkbox from '../../components/MainNav/Toolbar/Checkbox/Checkbox';\nimport Select from '../../components/MainNav/Toolbar/Select/Select';\nimport Toolbar from '../../components/MainNav/Toolbar/Toolbar';\nimport Modal from '../../components/ControlPanel/Modal/Modal';\nimport ServerSys from '../../components/Server/ServerSys';\nimport Spinner from '../../components/Spinner/Spinner';\nimport { useDispatch, useSelector } from 'react-redux';\nimport Server from '../../components/Server/Server';\nimport { Link } from 'react-router-dom';\nimport { Helmet } from 'react-helmet';\nimport './Servers.scss';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\n\nconst Servers = props => {\n const { i18n } = useSelector(state => state.session);\n const { controlPanelFocusedElement } = useSelector(state => state.controlPanelContent);\n const { focusedElement } = useSelector(state => state.mainNavigation);\n const dispatch = useDispatch();\n const [loading, setLoading] = useState(false);\n const [modal, setModal] = useState({\n text: '',\n visible: false,\n actionUrl: '',\n });\n const [state, setState] = useState({\n servers: [],\n selection: [],\n toggledAll: false,\n sorting: i18n.Action,\n order: \"descending\",\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/server/'));\n dispatch(removeFocusedElement());\n dispatch(removeControlPanelContentFocusedElement());\n fetchData().then(() => setLoading(false));\n\n return () => {\n dispatch(removeControlPanelContentFocusedElement());\n }\n }, []);\n\n useEffect(() => {\n window.addEventListener(\"keydown\", handleContentSelection);\n window.addEventListener(\"keydown\", handleFocusedElementShortcuts);\n\n return () => {\n window.removeEventListener(\"keydown\", handleContentSelection);\n window.removeEventListener(\"keydown\", handleFocusedElementShortcuts);\n };\n }, [controlPanelFocusedElement, focusedElement, state.servers]);\n\n const handleContentSelection = event => {\n if (event.keyCode === 38 || event.keyCode === 40) {\n if (focusedElement) {\n dispatch(removeFocusedElement());\n }\n }\n\n if (event.keyCode === 38) {\n event.preventDefault();\n handleArrowUp();\n } else if (event.keyCode === 40) {\n event.preventDefault();\n handleArrowDown();\n }\n }\n\n const initFocusedElement = servers => {\n servers[0]['FOCUSED'] = servers[0]['NAME'];\n setState({ ...state, servers });\n dispatch(addControlPanelContentFocusedElement(servers[0]));\n }\n\n const handleArrowDown = () => {\n let servers = [...state.servers];\n\n if (focusedElement) {\n removeFocusedElement();\n }\n\n if (controlPanelFocusedElement.NAME === '' || controlPanelFocusedElement === '') {\n initFocusedElement(servers);\n return;\n }\n\n let focusedElementPosition = servers.findIndex(server => server.NAME === controlPanelFocusedElement.NAME);\n\n if (focusedElementPosition !== servers.length - 1) {\n let nextFocusedElement = servers[focusedElementPosition + 1];\n servers[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, servers });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement));\n }\n }\n\n const handleArrowUp = () => {\n let servers = [...state.servers];\n\n if (focusedElement) {\n removeFocusedElement();\n }\n\n if (controlPanelFocusedElement.NAME === '' || controlPanelFocusedElement === '') {\n initFocusedElement(servers);\n return;\n }\n\n let focusedElementPosition = servers.findIndex(server => server.NAME === controlPanelFocusedElement.NAME);\n\n if (focusedElementPosition !== 0) {\n let nextFocusedElement = servers[focusedElementPosition - 1];\n servers[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, servers });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement));\n }\n }\n\n const handleFocusedElementShortcuts = event => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus');\n\n if (controlPanelFocusedElement.NAME && !isSearchInputFocused) {\n switch (event.keyCode) {\n case 13: return handleConfigure();\n case 82: return handleRestart();\n case 83: return handleStop();\n default: break;\n }\n }\n }\n\n const handleConfigure = () => {\n if (controlPanelFocusedElement.NAME !== state.servers[0].NAME) {\n props.history.push(`/edit/server/${controlPanelFocusedElement.NAME}`);\n } else {\n props.history.push('/edit/server/');\n }\n }\n\n const handleStop = () => {\n onHandleAction('/api/v1' + controlPanelFocusedElement.action_url);\n }\n\n const handleRestart = () => {\n onHandleAction(`/api/v1/restart/service/?srv=${controlPanelFocusedElement.NAME}`);\n }\n\n const fetchData = () => {\n setLoading(true);\n return new Promise((resolve, reject) => {\n getServersList()\n .then(result => {\n setState({\n ...state,\n selection: [],\n toggledAll: false,\n servers: reformatData(result.data.data, result.data.sys)\n });\n resolve();\n })\n .catch(err => console.error(err));\n });\n }\n\n const reformatData = (servers, sysInfo) => {\n let result = [];\n\n for (let i in servers) {\n servers[i]['NAME'] = i;\n servers[i]['FOCUSED'] = controlPanelFocusedElement.NAME === i;\n\n result.push(servers[i]);\n }\n\n result.splice(0, 0, Object.values(sysInfo)[0]);\n result[0]['NAME'] = result[0]['HOSTNAME'];\n\n return result;\n }\n\n const servers = () => {\n const result = [];\n\n state.servers.forEach(server => {\n server.FOCUSED = controlPanelFocusedElement.NAME === server.NAME;\n result.push(server);\n });\n\n return result.map((item, index) => {\n if (item.HOSTNAME) {\n return <ServerSys data={item} key={index} checkItem={checkItem} handleAction={onHandleAction} />\n } else {\n return <Server data={item} key={index} checkItem={checkItem} handleAction={onHandleAction} />\n }\n });\n }\n\n const onHandleAction = uri => {\n dispatch(removeControlPanelContentFocusedElement());\n if (uri) {\n setLoading(true);\n handleAction(uri)\n .then(res => {\n if (res.data.error) {\n displayModal(res.data.error);\n }\n\n setLoading(false);\n })\n .catch(err => {\n setLoading(false);\n console.error(err)\n });\n }\n }\n\n const toggleAll = toggled => {\n let serversDuplicate = [...state.servers];\n\n if (toggled) {\n let serverNames = [];\n\n let servers = serversDuplicate.map(server => {\n serverNames.push(server.NAME);\n server.isChecked = true;\n return server;\n });\n\n setState({ ...state, servers, selection: serverNames, toggledAll: toggled });\n } else {\n let servers = serversDuplicate.map(server => {\n server.isChecked = false;\n return server;\n });\n\n setState({ ...state, servers, selection: [], toggledAll: toggled });\n }\n }\n\n const bulk = action => {\n const { selection } = state;\n\n if (selection.length && action) {\n setState({ ...state, loading: true });\n bulkAction(action, selection)\n .then(res => {\n if (res.data.error) {\n displayModal(res.data.error);\n }\n\n toggleAll(false);\n fetchData().then(() => refreshMenuCounters());\n })\n .catch(err => console.error(err));\n }\n }\n\n const checkItem = name => {\n const { selection } = state;\n let duplicate = [...selection];\n let serversDuplicate = [...state.servers];\n let checkedItem = duplicate.indexOf(name);\n\n let incomingItem = serversDuplicate.findIndex(server => server.NAME === name);\n serversDuplicate[incomingItem].isChecked = !serversDuplicate[incomingItem].isChecked;\n\n if (checkedItem !== -1) {\n duplicate.splice(checkedItem, 1);\n } else {\n duplicate.push(name);\n }\n\n setState({ ...state, servers: serversDuplicate, selection: duplicate });\n }\n\n const displayModal = text => {\n setModal({ ...modal, visible: true, text });\n }\n\n const modalConfirmHandler = () => {\n if (!modal.actionUrl) {\n return modalCancelHandler();\n }\n\n modalCancelHandler();\n setLoading(true);\n handleAction(modal.actionUrl)\n .then(res => {\n if (res.data.error) {\n setLoading(false);\n return displayModal(res.data.error, '');\n }\n\n fetchData().then(() => refreshMenuCounters());\n })\n .catch(err => { setLoading(false); console.error(err); });\n }\n\n const refreshMenuCounters = () => {\n dispatch(refreshCounters()).then(() => setLoading(false));\n }\n\n const modalCancelHandler = () => {\n setModal({ ...modal, visible: false, text: '' });\n }\n\n return (\n <div className=\"servers-list\">\n <Helmet>\n <title>{`Vesta - ${i18n.SERVER}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <LeftButton href=\"/edit/server/\" list=\"server\" name={i18n.configure} showLeftMenu={true} />\n <div className=\"r-menu\">\n <div className=\"input-group input-group-sm\">\n <Link to=\"/list/server/cpu\" className=\"button-extra\">{i18n['show: CPU / MEM / NET / DISK']}</Link>\n <Checkbox toggleAll={toggleAll} toggled={state.toggledAll} />\n <Select list='serverList' bulkAction={bulk} />\n <SearchInput handleSearchTerm={term => props.changeSearchTerm(term)} />\n </div>\n </div>\n </Toolbar>\n {loading ? <Spinner /> : (\n <div className=\"servers-wrapper\">\n {servers()}\n </div>\n )}\n\n <Modal\n onSave={modalConfirmHandler}\n onCancel={modalCancelHandler}\n showCancelButton={false}\n show={modal.visible}\n text={modal.text} />\n </div>\n );\n}\n\nexport default Servers;\n","import React, { useEffect } from 'react';\nimport { addActiveElement } from '../../../actions/MainNavigation/mainNavigationActions';\nimport { useSelector, useDispatch } from \"react-redux\";\nimport { Link } from \"react-router-dom\";\n\nimport './Menu.scss';\n\nconst className = height => {\n if (height === 35) {\n return \"menu-stat shadow\";\n } else {\n return \"menu-stat\";\n }\n}\n\nconst style = ({ menuHeight, mobile }) => {\n if (mobile) {\n return;\n }\n\n if (document.documentElement.clientWidth > 900) {\n return menuHeight\n } else {\n return 45;\n }\n}\n\nconst Menu = props => {\n const { activeElement, focusedElement } = useSelector(state => state.mainNavigation);\n const { i18n } = useSelector(state => state.session);\n const { session } = useSelector(state => state.userSession);\n const { user } = useSelector(state => state.menuCounters);\n const dispatch = useDispatch();\n\n useEffect(() => {\n if (user.LANGUAGE) {\n localStorage.setItem(\"language\", user.LANGUAGE);\n }\n }, [user]);\n\n const handleState = (tab, event) => {\n if (`${window.location.pathname}${window.location.search}` === tab) {\n return event.preventDefault();\n }\n\n dispatch(addActiveElement(tab));\n }\n\n const statClassName = activeName => {\n return `stat ${activeName === activeElement && 'l-active'} ${activeName === focusedElement && 'focus'}`;\n }\n\n const sizeFormatter = (bytes, decimals) => {\n if (!bytes) return null;\n\n if (bytes === \"0\") {\n return <span className=\"value\">0 <span className=\"unit\">b</span></span>;\n }\n\n let k = 1024,\n dm = decimals <= 0 ? 0 : decimals || 2,\n sizes = ['b', 'kb', 'Mb', 'GB'],\n i = Math.floor(Math.log(bytes) / Math.log(k));\n return (<span className=\"value\">{parseFloat((bytes / Math.pow(k, i)).toFixed(dm))} <span className=\"unit\">{sizes[i]}</span></span>);\n }\n\n return (\n <div className=\"menu-wrapper\">\n <div className={className(props.menuHeight)} style={{ height: style(props) }}>\n <div className={statClassName(\"/list/user/\")}>\n <Link to=\"/list/user/\" onClick={event => handleState(\"/list/user/\", event)} onKeyPress={event => event.preventDefault()}>\n <h3>{i18n.USER}</h3>\n <div className=\"stats\">\n {\n session.look\n ? (<>\n <div><span>{i18n.Disk}:</span> <span>{sizeFormatter(user.U_DISK)}</span></div>\n <div><span>{i18n.Bandwidth}:</span> <span>{sizeFormatter(user.U_BANDWIDTH)}</span></div>\n </>)\n : (<>\n <div><span>{i18n.users}:</span> <span>{user.U_USERS}</span></div>\n <div><span>{i18n.spnd}:</span> <span>{user.SUSPENDED_USERS}</span></div>\n </>)\n }\n </div>\n </Link>\n </div>\n <div className={statClassName(\"/list/web/\")}>\n <Link to=\"/list/web/\" onClick={event => handleState(\"/list/web/\", event)} onKeyPress={event => event.preventDefault()}>\n <h3>{i18n.WEB}</h3>\n <div className=\"stats\">\n <div><span>{i18n.domains}:</span> <span>{user.U_WEB_DOMAINS}</span></div>\n <div><span>{i18n.aliases}:</span> <span>{user.U_WEB_ALIASES}</span></div>\n <div><span>{i18n.spnd}:</span> <span>{user.SUSPENDED_WEB}</span></div>\n </div>\n </Link>\n </div>\n <div className={statClassName(\"/list/dns/\")}>\n <Link to=\"/list/dns/\" onClick={event => handleState(\"/list/dns/\", event)} onKeyPress={event => event.preventDefault()}>\n <h3>{i18n.DNS}</h3>\n <div className=\"stats\">\n <div><span>{i18n.domains}:</span> <span>{user.U_DNS_DOMAINS}</span></div>\n <div><span>{i18n.records}:</span> <span>{user.U_DNS_RECORDS}</span></div>\n <div><span>{i18n.spnd}:</span> <span>{user.SUSPENDED_DNS}</span></div>\n </div>\n </Link>\n </div>\n <div className={statClassName(\"/list/mail/\")}>\n <Link to=\"/list/mail/\" onClick={event => handleState(\"/list/mail/\", event)} onKeyPress={event => event.preventDefault()}>\n <h3>{i18n.MAIL}</h3>\n <div className=\"stats\">\n <div><span>{i18n.domains}:</span> <span>{user.U_MAIL_DOMAINS}</span></div>\n <div><span>{i18n.accounts}:</span> <span>{user.U_MAIL_ACCOUNTS}</span></div>\n <div><span>{i18n.spnd}:</span> <span>{user.SUSPENDED_MAIL}</span></div>\n </div>\n </Link>\n </div>\n <div className={statClassName(\"/list/db/\")}>\n <Link to=\"/list/db/\" onClick={event => handleState(\"/list/db/\", event)} onKeyPress={event => event.preventDefault()}>\n <h3>{i18n.DB}</h3>\n <div className=\"stats\">\n <div><span>{i18n.databases}:</span> <span>{user.U_DATABASES}</span></div>\n <div><span>{i18n.spnd}:</span> <span>{user.SUSPENDED_DB}</span></div>\n </div>\n </Link>\n </div>\n <div className={statClassName(\"/list/cron/\")}>\n <Link to=\"/list/cron/\" onClick={event => handleState(\"/list/cron/\", event)} onKeyPress={event => event.preventDefault()}>\n <h3>{i18n.CRON}</h3>\n <div className=\"stats\">\n <div><span>{i18n.jobs}:</span> <span>{user.U_CRON_JOBS}</span></div>\n <div><span>{i18n.spnd}:</span> <span>{user.SUSPENDED_CRON}</span></div>\n </div>\n </Link>\n </div>\n <div className={statClassName(\"/list/backup/\") + ' last'}>\n <Link to=\"/list/backup/\" onClick={event => handleState(\"/list/backup/\", event)} onKeyPress={event => event.preventDefault()}>\n <h3>{i18n.BACKUP}</h3>\n <div className=\"stats\">\n <div><span>{i18n.backups}:</span> <span>{user.U_BACKUPS}</span></div>\n </div>\n </Link>\n </div>\n </div>\n </div>\n );\n}\n\nexport default Menu;\n","import React, { Component } from 'react';\nimport Menu from '../../MainNav/Stat-menu/Menu';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport './MobileTopNav.scss';\n\nclass MobileTopNav extends Component {\n render() {\n return (\n <div className={this.props.class}>\n <div className=\"mobile-menu\">\n <div>\n <div>Packages</div>\n <div>IP</div>\n <div>Graphs</div>\n <div>Statistics</div>\n <div>Log</div>\n </div>\n <div>\n <div>Updates</div>\n <div>Firewall</div>\n <div className=\"fm\">File Manager</div>\n <div>Apps</div>\n <div>Server</div>\n </div>\n </div>\n <div className=\"mobile-stat-menu\">\n <Menu mobile={true} />\n </div>\n <div className=\"mobile-toolbar\">\n <Toolbar mobile={true} />\n </div>\n </div>\n );\n }\n}\n\nexport default MobileTopNav;","import axios from \"axios\";\nimport { getAuthToken } from \"src/utils/token\";\nlet BASE_URL = window.location.origin;\nlet getNotificationsUri = '/api/v1/list/notifications/index.php';\nlet deleteNotificationsUri = '/api/v1/delete/notification/index.php';\n\nexport const getAppNotifications = () => {\n return axios.get(BASE_URL + getNotificationsUri, {\n params: {\n ajax: 1,\n token: getAuthToken()\n }\n });\n}\n\nexport const deleteNotification = id => {\n return axios.get(BASE_URL + deleteNotificationsUri, {\n params: {\n 'delete': 1,\n 'notification_id': id,\n token: getAuthToken()\n }\n });\n}","import React from 'react';\n\nexport default function Bell(props) {\n return (\n <svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" id=\"_24x24_On_Light_Notification\" data-name=\"24x24/On Light/Notification\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect id=\"view-box\" width=\"24\" height=\"24\" fill=\"none\" />\n <path id=\"Shape\" d=\"M6,17v-.5H2.25A2.253,2.253,0,0,1,0,14.25v-.382a2.542,2.542,0,0,1,1.415-2.289A1.248,1.248,0,0,0,2.1,10.572l.446-4.91a6.225,6.225,0,0,1,12.4,0l.446,4.91a1.26,1.26,0,0,0,.686,1.005,2.547,2.547,0,0,1,1.418,2.29v.382a2.252,2.252,0,0,1-2.25,2.25H11.5V17A2.75,2.75,0,0,1,6,17Zm1.5,0A1.25,1.25,0,0,0,10,17v-.5H7.5ZM4.045,5.8,3.6,10.708A2.738,2.738,0,0,1,2.089,12.92a1.055,1.055,0,0,0-.589.949v.382A.751.751,0,0,0,2.25,15h13A.751.751,0,0,0,16,14.25v-.382a1.054,1.054,0,0,0-.586-.948A2.739,2.739,0,0,1,13.9,10.708L13.456,5.8a4.725,4.725,0,0,0-9.411,0Z\" transform=\"translate(3.25 2.25)\" fill=\"#f8b014\" />\n </svg>);\n}\n","import React from 'react';\n\nexport default function BellUnread(props) {\n return (<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" id=\"_24x24_On_Light_Notification-Alert\" data-name=\"24x24/On Light/Notification-Alert\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect id=\"view-box\" width=\"24\" height=\"24\" fill=\"none\" />\n <path id=\"Shape\" d=\"M6,17v-.5H2.25A2.253,2.253,0,0,1,0,14.25v-.382a2.542,2.542,0,0,1,1.415-2.289A1.247,1.247,0,0,0,2.1,10.572l.446-4.91A6.227,6.227,0,0,1,10.618.286a5.477,5.477,0,0,0-.635,1.374A4.794,4.794,0,0,0,8.75,1.5,4.7,4.7,0,0,0,4.045,5.8L3.6,10.708A2.739,2.739,0,0,1,2.089,12.92a1.055,1.055,0,0,0-.589.949v.382A.751.751,0,0,0,2.25,15h13A.751.751,0,0,0,16,14.25v-.382a1.053,1.053,0,0,0-.586-.948A2.739,2.739,0,0,1,13.9,10.708l-.2-2.18a5.473,5.473,0,0,0,1.526.221l.166,1.822a1.26,1.26,0,0,0,.686,1.005,2.547,2.547,0,0,1,1.418,2.29v.382a2.252,2.252,0,0,1-2.25,2.25H11.5V17A2.75,2.75,0,0,1,6,17Zm1.5,0A1.25,1.25,0,0,0,10,17v-.5H7.5ZM15.047,6.744A3.486,3.486,0,0,1,13.5,6.28L13.456,5.8a4.7,4.7,0,0,0-1.648-3.185,3.5,3.5,0,0,1,.61-1.417A6.221,6.221,0,0,1,14.95,5.662l.1,1.081v0Z\" transform=\"translate(3.25 2.25)\" fill=\"#f8b014\" />\n <path id=\"Shape-2\" data-name=\"Shape\" d=\"M3.5,7A3.5,3.5,0,1,1,7,3.5,3.5,3.5,0,0,1,3.5,7Z\" transform=\"translate(15 2)\" fill=\"#f8b014\" />\n </svg>);\n}\n","import React, { useState, useEffect } from 'react';\nimport { getAppNotifications, deleteNotification } from 'src/ControlPanelService/Notifications';\nimport { addNotifications } from 'src/actions/Notification/notificationActions';\nimport Bell from './Bell';\nimport BellUnread from './BellUnread';\nimport { useDispatch, useSelector } from 'react-redux';\nimport './Notifications.scss';\nimport HtmlParser from 'react-html-parser';\n\nconst Notifications = () => {\n const { i18n } = useSelector(state => state.session);\n const { notifications } = useSelector(state => state.notifications);\n const dispatch = useDispatch();\n const [loading, setLoading] = useState(false);\n\n useEffect(() => {\n if (!notifications) {\n fetchData();\n }\n }, [notifications]);\n\n const fetchData = () => {\n setLoading(true);\n getAppNotifications()\n .then(res => {\n const result = [];\n\n for (let notification in res.data.result) {\n result.push(res.data.result[notification]);\n }\n\n dispatch(addNotifications(result));\n setLoading(false);\n })\n .catch(err => {\n console.error(err);\n setLoading(false);\n });\n }\n\n const removeNotification = id => {\n deleteNotification(id)\n .then(() => {\n fetchData();\n })\n .catch(err => console.error(err));\n }\n\n const renderOptions = () => {\n if (notifications && notifications.length) {\n return notifications.map(item => {\n return (\n <>\n <div className=\"dropdown-item\">\n <span className=\"title\"><b>{item.TOPIC}</b></span>\n <span className=\"delete-notification\" onClick={() => removeNotification(item.ID)}></span>\n </div>\n <div>{HtmlParser(item.NOTICE)}</div>\n <div className=\"dropdown-divider\"></div>\n </>\n );\n });\n } else {\n return (\n <div className=\"dropdown-item\" style={{ cursor: 'default', marginBottom: '10' }}>\n <span className=\"title\">{i18n['no notifications']}</span>\n </div>\n );\n }\n }\n\n return (\n <div className=\"btn-group\">\n <button type=\"button\" className=\"btn btn-danger dropdown-toggle\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\n <div className=\"bell\">\n {\n notifications && notifications.length\n ? <BellUnread />\n : <Bell />\n }\n </div>\n </button>\n <div className=\"dropdown-menu\">\n {loading ? 'Loading' : renderOptions()}\n </div>\n </div>\n );\n};\n\nexport default Notifications;","import { ADD_NOTIFICATIONS, REMOVE_NOTIFICATIONS } from './notificationTypes';\n\nexport const addNotifications = value => {\n return {\n type: ADD_NOTIFICATIONS,\n value\n };\n};\n\nexport const removeNotifications = () => {\n return {\n type: REMOVE_NOTIFICATIONS,\n value: []\n };\n};\n","import React, { useState } from 'react';\nimport { addActiveElement } from '../../../actions/MainNavigation/mainNavigationActions';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { logout } from 'src/actions/Session/sessionActions';\nimport Notifications from './Notifications/Notifications';\nimport { useSelector, useDispatch } from \"react-redux\";\nimport Spinner from 'src/components/Spinner/Spinner';\nimport { Link } from \"react-router-dom\";\nimport './Panel.scss';\n\nconst Panel = props => {\n const { i18n, userName } = useSelector(state => state.session);\n const { session } = useSelector(state => state.userSession);\n const { activeElement, focusedElement } = useSelector(state => state.mainNavigation);\n const dispatch = useDispatch();\n const [loading, setLoading] = useState(false);\n const [state, setState] = useState({\n smallNavigationClass: 'small-navigation hidden'\n });\n\n const toggleNavigation = event => {\n props.showTopNav();\n\n if (state.smallNavigationClass === 'small-navigation hidden') {\n setState({ ...state, smallNavigationClass: 'small-navigation show' });\n } else {\n setState({ ...state, smallNavigationClass: 'small-navigation hidden' });\n }\n }\n\n const className = (activeName, extraClass = '') => {\n let className = 'top-link';\n\n if (activeName === activeElement) {\n className += ' active';\n }\n\n if (activeName === focusedElement) {\n className += ' focus';\n }\n\n return className + ` ${extraClass}`;\n }\n\n const handleState = (tab, event) => {\n if (`${window.location.pathname}${window.location.search}` === tab) {\n return event.preventDefault();\n }\n\n dispatch(addActiveElement(tab));\n }\n\n const signOut = () => {\n setLoading(true);\n\n dispatch(logout())\n .then(() => {\n setLoading(false);\n },\n error => {\n setLoading(false);\n console.error(error);\n });\n }\n\n return (\n <div className=\"panel-wrapper\">\n {loading && <Spinner />}\n\n <div className={`top-panel ${session.look ? 'long-profile' : ''}`}>\n <div className=\"container left-menu\">\n <div className=\"logo\">\n <Link to=\"/list/user/\" onClick={() => dispatch(addActiveElement('/list/user/'))}>\n <div>\n <img src=\"/images/white_logo.png\" alt=\"Logo\" />\n </div>\n </Link>\n </div>\n {userName === 'admin' && (<>\n <div className={className(\"/list/package/\")}>\n <Link to=\"/list/package/\" onClick={event => handleState(\"/list/package/\", event)} onKeyPress={event => event.preventDefault()}>{i18n.Packages}</Link>\n </div>\n <div className={className(\"/list/ip/\")}>\n <Link to=\"/list/ip/\" onClick={event => handleState(\"/list/ip/\", event)} onKeyPress={event => event.preventDefault()}>{i18n.IP}</Link>\n </div>\n <div className={className(\"/list/rrd/\")}>\n <Link to=\"/list/rrd/\" onClick={event => handleState(\"/list/rrd/\", event)} onKeyPress={event => event.preventDefault()}>{i18n.Graphs}</Link>\n </div>\n </>)}\n <div className={className(\"/list/stats/\")}>\n <Link to=\"/list/stats/\" onClick={event => handleState(\"/list/stats/\", event)} onKeyPress={event => event.preventDefault()}>{i18n.Statistics}</Link>\n </div>\n <div className={className(\"/list/log/\")}>\n <Link to=\"/list/log/\" onClick={event => handleState(\"/list/log/\", event)} onKeyPress={event => event.preventDefault()}>{i18n.Log}</Link>\n </div>\n {userName === 'admin' && (<>\n <div className={className(\"/list/updates/\")}>\n <Link to=\"/list/updates/\" onClick={event => handleState(\"/list/updates/\", event)} onKeyPress={event => event.preventDefault()}>{i18n.Updates}</Link>\n </div>\n {session.FIREWALL_SYSTEM && <div className={className(\"/list/firewall/\")}>\n <Link to=\"/list/firewall/\" onClick={event => handleState(\"/list/firewall/\", event)} onKeyPress={event => event.preventDefault()}>{i18n.Firewall}</Link>\n </div>}\n </>)}\n {session.FILEMANAGER_KEY && <div className={className(\"/list/directory/\")}>\n <Link to=\"/list/directory/\">{i18n['File Manager']}</Link>\n </div>}\n {session.SOFTACULOUS === \"yes\" && <div className={className(\"/softaculous/\")}><Link to=\"/softaculous/\" target=\"_blank\">{i18n.Apps ?? 'Apps'}</Link>\n </div>}\n {userName === 'admin' && (\n <div className={className(\"/list/server/\")}>\n <Link to=\"/list/server/\" onClick={event => handleState(\"/list/server/\", event)} onKeyPress={event => event.preventDefault()}>{i18n.Server}</Link>\n </div>\n )}\n </div>\n <div className=\"container profile-menu\">\n <Notifications />\n <div>\n <Link to={`/edit/user?user=${userName}`}>\n {session.look\n ? <div className=\"long-username\">\n <span>{session.user}</span>\n <FontAwesomeIcon icon=\"long-arrow-alt-right\" />\n <span>{session.look}</span>\n </div>\n : userName\n }\n </Link>\n </div>\n <div><button onClick={signOut}>{i18n['Log out']}</button></div>\n </div>\n </div>\n\n <div className=\"top-panel small-device\">\n <div className=\"container left-menu\">\n <div className=\"logo\">LOGO</div>\n </div>\n <div className=\"container hamburger\" onClick={toggleNavigation}>\n <span className=\"bar\"></span>\n <span className=\"bar\"></span>\n <span className=\"bar\"></span>\n </div>\n <div className=\"container profile-menu\">\n <div className=\"bell\">\n <FontAwesomeIcon icon=\"bell\" />\n </div>\n <div><Link to={`/edit/user?user=${userName}`}>{userName}</Link></div>\n <div><button onClick={signOut}>{i18n['Log out']}</button></div>\n </div>\n </div>\n </div>\n );\n}\n\nexport default Panel;","import React, { useState, useEffect, useCallback } from 'react';\nimport { addFocusedElement, addActiveElement, removeActiveElement, removeFocusedElement } from \"../../actions/MainNavigation/mainNavigationActions\";\nimport * as ControlPanelContentActions from \"../../actions/ControlPanelContent/controlPanelContentActions\";\nimport { useSelector, useDispatch } from \"react-redux\";\nimport MobileTopNav from '../MainNav/Mobile/MobileTopNav';\nimport Menu from '../MainNav/Stat-menu/Menu';\nimport Panel from '../MainNav/Panel/Panel';\nimport './MainNav.scss';\nimport { useHistory } from 'react-router';\nimport Spinner from '../Spinner/Spinner';\n\nconst MainNav = () => {\n const history = useHistory();\n const [loading, setLoading] = useState(true);\n const [state, setState] = useState({\n menuHeight: 135,\n tabs: [],\n showTopNav: false\n });\n\n const { userName } = useSelector(state => state.session);\n const { session } = useSelector(state => state.userSession);\n const { user } = useSelector(state => state.menuCounters);\n const { activeElement, focusedElement, adminMenuTabs, userMenuTabs } = useSelector(state => state.mainNavigation);\n const { controlPanelFocusedElement } = useSelector(state => state.controlPanelContent);\n const dispatch = useDispatch();\n\n useEffect(() => {\n if (!userName || !Object.entries(user).length || !Object.entries(session).length) {\n return history.push('/login');\n }\n\n if (session.look) {\n const commonUserRoutes = ['package', 'ip', 'rrd', 'updates', 'firewall', 'server'];\n const splitPath = history.location.pathname.split('/')[2];\n\n if (history.location.pathname === '/add/user/') return history.push('/');\n\n if (commonUserRoutes.includes(splitPath)) {\n return history.push('/');\n }\n }\n\n const tabs = session.look ? userMenuTabs : adminMenuTabs;\n setState({ ...state, tabs });\n\n setLoading(false);\n }, [userName, user, history, session]);\n\n const controlFocusedTabWithCallback = useCallback(event => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus') || document.querySelector('textarea:focus');\n let currentActiveTabPositionInArray;\n\n if (isSearchInputFocused) {\n return;\n }\n\n if (event.keyCode === 37 || event.keyCode === 39) {\n if (controlPanelFocusedElement) {\n dispatch(ControlPanelContentActions.removeControlPanelContentFocusedElement());\n }\n\n if (!focusedElement) {\n dispatch(addFocusedElement(activeElement));\n currentActiveTabPositionInArray = state.tabs.indexOf(activeElement);\n } else {\n currentActiveTabPositionInArray = state.tabs.indexOf(focusedElement);\n }\n }\n\n if (currentActiveTabPositionInArray === -1) {\n return;\n }\n\n if (event.keyCode === 37) {\n let newFocusedMenuTab = handleLeftArrowKey(state.tabs, currentActiveTabPositionInArray);\n dispatch(addFocusedElement(newFocusedMenuTab));\n } else if (event.keyCode === 39) {\n let newFocusedMenuTab = handleRightArrowKey(state.tabs, currentActiveTabPositionInArray);\n dispatch(addFocusedElement(newFocusedMenuTab));\n } else if (event.keyCode === 13) {\n if (!controlPanelFocusedElement && focusedElement && (focusedElement !== activeElement)) {\n history.push({ pathname: focusedElement });\n dispatch(addActiveElement(focusedElement));\n dispatch(removeFocusedElement());\n }\n }\n }, [activeElement, focusedElement, controlPanelFocusedElement]);\n\n useEffect(() => {\n window.addEventListener(\"resize\", handleTopNav);\n window.addEventListener(\"keyup\", controlFocusedTabWithCallback);\n window.addEventListener(\"scroll\", hideMenu);\n\n return () => {\n window.removeEventListener(\"resize\", handleTopNav);\n window.removeEventListener(\"keyup\", controlFocusedTabWithCallback);\n window.removeEventListener(\"scroll\", hideMenu);\n };\n }, [controlFocusedTabWithCallback]);\n\n useEffect(() => {\n dispatch(removeFocusedElement());\n }, [activeElement]);\n\n useEffect(() => {\n dispatch(addActiveElement(history.location.pathname));\n }, []);\n\n const handleLeftArrowKey = (array, indexInArray) => {\n if (indexInArray === 0) {\n return array[array.length - 1];\n } else {\n return array[indexInArray - 1];\n }\n }\n\n const handleRightArrowKey = (array, indexInArray) => {\n if (indexInArray === (array.length - 1)) {\n return array[0];\n } else {\n return array[indexInArray + 1];\n }\n }\n\n const handleTopNav = () => {\n if (document.documentElement.clientWidth < 900) {\n setState({\n ...state,\n menuHeight: 45\n });\n } else {\n setState({\n ...state,\n menuHeight: 135\n });\n }\n }\n\n const hideMenu = () => {\n if (document.documentElement.clientWidth > 900) {\n let scrollTop = window.scrollY;\n let menuHeight = Math.max(45, 135 - scrollTop);\n setState({ ...state, menuHeight });\n }\n }\n\n const showTopNav = () => {\n let showTopNav = !state.showTopNav;\n setState({ ...state, showTopNav });\n }\n\n const topNavClassName = () => {\n if (state.showTopNav) {\n return \"nav-wrapper show-nav\";\n } else {\n return \"nav-wrapper hide-nav\";\n }\n }\n\n const topNavMobile = () => {\n if (state.showTopNav) {\n return \"mobile-top-nav-wrapper show\";\n } else {\n return \"mobile-top-nav-wrapper hide\";\n }\n }\n const topNavigation = () => {\n if (document.documentElement.clientWidth > 900) {\n return (\n <div className={topNavClassName()}>\n <Menu menuHeight={state.menuHeight} mobile={false} />\n </div>\n );\n } else {\n return <MobileTopNav class={topNavMobile()} />;\n }\n }\n\n return (\n <div className=\"main-nav\">\n {\n loading\n ? <Spinner />\n : (<>\n <Panel showTopNav={showTopNav} visibleNav={state.showTopNav} />\n {topNavigation()}\n </>)\n }\n </div>\n );\n}\n\nexport default MainNav;","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport Container from '../../ControlPanel/Container/Container';\n\nimport './style.scss';\n\nconst Exclusion = ({ data, focused }) => {\n const { i18n } = useSelector(state => state.session);\n\n const renderExclusionItems = () => {\n if (!Array.isArray(data.ITEMS)) {\n for (let item in data.ITEMS) {\n return <><b>{item}</b> &nbsp; {data.ITEMS[item]}<br /></>;\n }\n } else {\n return i18n['no exclusions'];\n }\n }\n\n return (\n <div className={focused ? 'statistic-item focused' : 'statistic-item'} id={data.NAME}>\n <Container className=\"l-col w-15\" />\n <Container className=\"r-col w-85\">\n <div className=\"stats\">\n <div className=\"name\">{data.NAME}</div>\n <div className=\"exclusion-items\">{renderExclusionItems()}</div>\n </div>\n </Container>\n </div>\n );\n}\n\nexport default Exclusion;\n","import React, { useEffect, useState } from 'react';\nimport { addControlPanelContentFocusedElement, removeControlPanelContentFocusedElement } from 'src/actions/ControlPanelContent/controlPanelContentActions';\nimport { addActiveElement, removeFocusedElement } from 'src/actions/MainNavigation/mainNavigationActions';\nimport * as MainNavigation from 'src/actions/MainNavigation/mainNavigationActions';\nimport SearchInput from 'src/components/MainNav/Toolbar/SearchInput/SearchInput';\nimport LeftButton from 'src/components/MainNav/Toolbar/LeftButton/LeftButton';\nimport Toolbar from 'src/components/MainNav/Toolbar/Toolbar';\nimport Spinner from 'src/components/Spinner/Spinner';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { Helmet } from 'react-helmet';\nimport Exclusion from 'src/components/Backup/Exclusion';\nimport { getBackupExclusions } from 'src/ControlPanelService/Backup';\n\nconst BackupExclusions = props => {\n const { i18n } = useSelector(state => state.session);\n const { controlPanelFocusedElement } = useSelector(state => state.controlPanelContent);\n const { focusedElement } = useSelector(state => state.mainNavigation);\n const dispatch = useDispatch();\n const [state, setState] = useState({\n exclusions: [],\n loading: false,\n total: 0\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/backup/'));\n dispatch(removeFocusedElement());\n dispatch(removeControlPanelContentFocusedElement());\n fetchData();\n\n return () => {\n dispatch(removeControlPanelContentFocusedElement());\n }\n }, []);\n\n useEffect(() => {\n window.addEventListener(\"keydown\", handleContentSelection);\n\n return () => {\n window.removeEventListener(\"keydown\", handleContentSelection);\n };\n }, [controlPanelFocusedElement, focusedElement, state.exclusions]);\n\n const handleContentSelection = event => {\n if (event.keyCode === 38 || event.keyCode === 40) {\n if (focusedElement) {\n dispatch(MainNavigation.removeFocusedElement());\n }\n }\n\n if (event.keyCode === 38) {\n event.preventDefault();\n handleArrowUp();\n } else if (event.keyCode === 40) {\n event.preventDefault();\n handleArrowDown();\n }\n }\n\n const initFocusedElement = exclusions => {\n exclusions[0]['FOCUSED'] = exclusions[0]['NAME'];\n setState({ ...state, exclusions });\n dispatch(addControlPanelContentFocusedElement(exclusions[0]['NAME']));\n }\n\n const handleArrowDown = () => {\n let exclusions = [...state.exclusions];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(exclusions);\n return;\n }\n\n let focusedElementPosition = exclusions.findIndex(exclusion => exclusion.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== exclusions.length - 1) {\n let nextFocusedElement = exclusions[focusedElementPosition + 1];\n exclusions[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, exclusions });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleArrowUp = () => {\n let exclusions = [...state.exclusions];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(exclusions);\n return;\n }\n\n let focusedElementPosition = exclusions.findIndex(exclusion => exclusion.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== 0) {\n let nextFocusedElement = exclusions[focusedElementPosition - 1];\n exclusions[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, exclusions });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const fetchData = () => {\n setState({ ...state, loading: true });\n\n getBackupExclusions()\n .then(result => {\n setState({\n exclusions: reformatData(result.data.data),\n loading: false\n });\n })\n .catch(err => console.error(err));\n }\n\n const reformatData = data => {\n let exclusions = [];\n\n for (let i in data) {\n exclusions.push({ NAME: i, ITEMS: data[i] });\n }\n\n return exclusions;\n }\n\n const exclusions = () => {\n return state.exclusions.map((item, index) => <Exclusion data={item} key={index} focused={controlPanelFocusedElement === item.NAME} />);\n }\n\n return (\n <div className=\"exclusions-list\">\n <Helmet>\n <title>{`Vesta - ${i18n.BACKUP}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <LeftButton href=\"/edit/backup/exclusions\" list=\"server\" name={i18n.configure} showLeftMenu={true} />\n <div className=\"r-menu\">\n <div className=\"input-group input-group-sm\">\n <SearchInput handleSearchTerm={term => props.changeSearchTerm(term)} />\n </div>\n </div>\n </Toolbar>\n <div className=\"exclusions-wrapper\">\n {state.loading ? <Spinner /> : exclusions()}\n </div>\n </div>\n );\n}\n\nexport default BackupExclusions;\n","import React from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Container from '../ControlPanel/Container/Container';\nimport ListItem from '../ControlPanel/ListItem/ListItem';\nimport { Link } from 'react-router-dom';\nimport { useSelector } from 'react-redux';\n\nexport default function MailAccount(props) {\n const { data, domain } = props;\n const { i18n } = useSelector(state => state.session);\n const token = localStorage.getItem(\"token\");\n const printStat = (stat, text) => {\n if (text === 'no') {\n return <div className=\"crossed\">{stat}</div>;\n }\n\n return <div>{stat}: <span className=\"stat\">{text}</span></div>;\n }\n\n const toggleFav = (starred) => {\n if (starred) {\n props.toggleFav(props.data.NAME, 'add');\n } else {\n props.toggleFav(props.data.NAME, 'delete');\n }\n }\n\n const checkItem = () => {\n props.checkItem(props.data.NAME);\n }\n\n const handleSuspend = () => {\n let suspendedStatus = data.SUSPENDED === 'yes' ? 'unsuspend' : 'suspend' === 'yes' ? 'unsuspend' : 'suspend';\n props.handleModal(data.suspend_conf, `/api/v1/${suspendedStatus}/mail/index.php?domain=${domain}&account=${data.NAME}`);\n }\n\n const handleDelete = () => {\n props.handleModal(data.delete_conf, `/api/v1/delete/mail/index.php?domain=${domain}&account=${data.NAME}`);\n }\n\n return (\n <ListItem\n id={data.NAME}\n focused={data.FOCUSED}\n checked={data.isChecked}\n date={data.DATE}\n starred={data.STARRED}\n toggleFav={toggleFav}\n checkItem={checkItem}\n suspended={data.SUSPENDED === 'yes'}>\n\n <Container className=\"r-col w-85\">\n <div className=\"name\">{`${data.NAME}@${domain}`}</div>\n <div className=\"stats\">\n <Container className=\"c-1\">\n <div className=\"bandwidth\">{i18n.Disk} <span><span className=\"stat\">{data.U_DISK}</span>&nbsp;{i18n.mb}</span></div>\n </Container>\n <Container className=\"c-2\">\n <div>{i18n['Quota']}: <span><span className=\"stat\">{data.QUOTA}</span>&nbsp; {i18n.mb}</span></div>\n <div>{i18n['Forward to']}: <span className=\"stat email\">{data.FWD}</span></div>\n </Container>\n <Container className=\"c-3\">\n {printStat(i18n['Autoreply'], data.AUTOREPLY)}\n </Container>\n </div>\n </Container>\n <div className=\"actions\">\n\n <div>\n <Link className=\"link-edit\" to={`/edit/mail/?domain=${domain}&account=${data.NAME}`}>\n {i18n.edit}\n {data.FOCUSED ? <span className=\"shortcut-button html-unicode\">&#8617;</span> : <FontAwesomeIcon icon=\"pen\" />}\n </Link>\n </div>\n\n <div>\n <button\n className=\"link-gray\"\n onClick={() => handleSuspend()}>\n {i18n[data.suspend_action]}\n {data.FOCUSED ? <span className=\"shortcut-button\">S</span> : <FontAwesomeIcon icon={data.SUSPENDED === 'yes' ? 'unlock' : 'lock'} />}\n </button>\n </div>\n\n <div>\n <button className=\"link-delete\" onClick={() => handleDelete()}>\n {i18n.Delete}\n {data.FOCUSED ? <span className=\"shortcut-button del\">Del</span> : <FontAwesomeIcon icon=\"times\" />}\n </button>\n </div>\n </div>\n </ListItem>\n );\n}","import React, { useState, useEffect } from 'react';\nimport { addControlPanelContentFocusedElement, removeControlPanelContentFocusedElement } from '../../actions/ControlPanelContent/controlPanelContentActions';\nimport { bulkMailAccountAction, getMailAccountList, handleAction } from '../../ControlPanelService/Mail';\nimport DropdownFilter from '../../components/MainNav/Toolbar/DropdownFilter/DropdownFilter';\nimport * as MainNavigation from '../../actions/MainNavigation/mainNavigationActions';\nimport SearchInput from '../../components/MainNav/Toolbar/SearchInput/SearchInput';\nimport { addFavorite, deleteFavorite } from '../../ControlPanelService/Favorites';\nimport LeftButton from '../../components/MainNav/Toolbar/LeftButton/LeftButton';\nimport Checkbox from '../../components/MainNav/Toolbar/Checkbox/Checkbox';\nimport Select from '../../components/MainNav/Toolbar/Select/Select';\nimport MailAccount from 'src/components/MailAccount/MailAccount';\nimport Toolbar from '../../components/MainNav/Toolbar/Toolbar';\nimport Modal from '../../components/ControlPanel/Modal/Modal';\nimport { useSelector, useDispatch } from 'react-redux';\nimport Spinner from '../../components/Spinner/Spinner';\nimport { Link } from 'react-router-dom';\n\nimport './MailAccounts.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\n\nexport default function MailAccounts(props) {\n const { i18n } = useSelector(state => state.session);\n const { controlPanelFocusedElement } = useSelector(state => state.controlPanelContent);\n const { focusedElement } = useSelector(state => state.mainNavigation);\n const dispatch = useDispatch();\n const [loading, setLoading] = useState(false);\n const [modal, setModal] = useState({\n text: '',\n visible: false,\n actionUrl: '',\n });\n const [state, setState] = useState({\n mailAccounts: [],\n mailAccountsFav: [],\n domain: props.domain,\n toggledAll: false,\n sorting: i18n.Date,\n order: \"descending\",\n selection: [],\n totalAmount: ''\n });\n\n useEffect(() => {\n dispatch(removeControlPanelContentFocusedElement());\n fetchData().then(() => setLoading(false));\n\n return () => {\n dispatch(removeControlPanelContentFocusedElement());\n }\n }, []);\n\n useEffect(() => {\n window.addEventListener(\"keydown\", handleContentSelection);\n window.addEventListener(\"keydown\", handleFocusedElementShortcuts);\n\n return () => {\n window.removeEventListener(\"keydown\", handleContentSelection);\n window.removeEventListener(\"keydown\", handleFocusedElementShortcuts);\n };\n }, [controlPanelFocusedElement, focusedElement, state.mailAccounts]);\n\n const handleContentSelection = event => {\n if (event.keyCode === 38 || event.keyCode === 40) {\n if (focusedElement) {\n dispatch(MainNavigation.removeFocusedElement());\n }\n }\n\n if (event.keyCode === 38) {\n event.preventDefault();\n handleArrowUp();\n } else if (event.keyCode === 40) {\n event.preventDefault();\n handleArrowDown();\n }\n }\n\n const initFocusedElement = mailAccounts => {\n mailAccounts[0]['FOCUSED'] = mailAccounts[0]['NAME'];\n setState({ ...state, mailAccounts });\n dispatch(addControlPanelContentFocusedElement(mailAccounts[0]['NAME']));\n }\n\n const handleArrowDown = () => {\n let mailAccounts = [...state.mailAccounts];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(mailAccounts);\n return;\n }\n\n let focusedElementPosition = mailAccounts.findIndex(mailAccount => mailAccount.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== mailAccounts.length - 1) {\n let nextFocusedElement = mailAccounts[focusedElementPosition + 1];\n mailAccounts[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, mailAccounts });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleArrowUp = () => {\n let mailAccounts = [...state.mailAccounts];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(mailAccounts);\n return;\n }\n\n let focusedElementPosition = mailAccounts.findIndex(mailAccount => mailAccount.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== 0) {\n let nextFocusedElement = mailAccounts[focusedElementPosition - 1];\n mailAccounts[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, mailAccounts });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleFocusedElementShortcuts = event => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus');\n\n if (controlPanelFocusedElement && !isSearchInputFocused) {\n switch (event.keyCode) {\n case 8: return handleDelete();\n case 13: return handleEdit();\n case 83: return handleSuspend();\n default: break;\n }\n }\n }\n\n const handleEdit = () => {\n props.history.push(`/edit/mail?domain=${props.domain}&account=${controlPanelFocusedElement}`);\n }\n\n const handleSuspend = () => {\n const { mailAccounts } = state;\n let currentMailData = mailAccounts.filter(mail => mail.NAME === controlPanelFocusedElement)[0];\n let suspendedStatus = currentMailData.SUSPENDED === 'yes' ? 'unsuspend' : 'suspend';\n\n displayModal(currentMailData.suspend_conf, `/api/v1/${suspendedStatus}/mail/index.php?domain=${props.domain}&account=${controlPanelFocusedElement}`);\n }\n\n const handleDelete = () => {\n const { mailAccounts } = state;\n let currentMailData = mailAccounts.filter(mail => mail.NAME === controlPanelFocusedElement)[0];\n\n displayModal(currentMailData.delete_conf, `/api/v1/delete/mail/index.php?domain=${props.domain}&account=${controlPanelFocusedElement}`);\n }\n\n const fetchData = () => {\n setLoading(true);\n return new Promise((resolve, reject) => {\n getMailAccountList(props.domain)\n .then(result => {\n setState({\n ...state,\n mailAccounts: reformatData(result.data.data),\n webMail: result.data.webmail,\n selection: [],\n toggledAll: false,\n mailAccountsFav: result.data.mailAccountsFav,\n totalAmount: result.data.totalAmount\n });\n resolve();\n })\n .catch(err => console.error(err));\n });\n }\n\n const reformatData = data => {\n let mailAccounts = [];\n\n for (let i in data) {\n data[i]['NAME'] = i;\n data[i]['FOCUSED'] = controlPanelFocusedElement === i;\n mailAccounts.push(data[i]);\n }\n\n return mailAccounts;\n }\n\n const changeSorting = (sorting, order) => {\n setState({\n ...state,\n sorting,\n order\n });\n }\n\n const mailAccounts = () => {\n const { mailAccounts } = state;\n const mailAccountsFav = { ...state.mailAccountsFav };\n const result = [];\n\n mailAccounts.forEach(mailAccount => {\n mailAccount.FOCUSED = controlPanelFocusedElement === mailAccount.NAME;\n\n if (mailAccountsFav[mailAccount.NAME]) {\n mailAccount.STARRED = mailAccountsFav[mailAccount.NAME];\n } else {\n mailAccount.STARRED = 0;\n }\n\n result.push(mailAccount);\n });\n let sortedResult = sortArray(result);\n\n return sortedResult.map((item, index) => {\n return <MailAccount data={item} key={index} domain={state.domain} toggleFav={toggleFav} checkItem={checkItem} handleModal={displayModal} />;\n });\n }\n\n const checkItem = name => {\n const { selection, mailAccounts } = state;\n let duplicate = [...selection];\n let mailAccountsDuplicate = mailAccounts;\n let checkedItem = duplicate.indexOf(name);\n\n let incomingItem = mailAccountsDuplicate.findIndex(mailAccount => mailAccount.NAME === name);\n mailAccountsDuplicate[incomingItem].isChecked = !mailAccountsDuplicate[incomingItem].isChecked;\n\n if (checkedItem !== -1) {\n duplicate.splice(checkedItem, 1);\n } else {\n duplicate.push(name);\n }\n\n setState({ ...state, mailAccounts: mailAccountsDuplicate, selection: duplicate });\n }\n\n const sortArray = array => {\n const { order, sorting } = state;\n let sortingColumn = sortBy(sorting);\n\n if (order === \"descending\") {\n return array.sort((a, b) => (a[sortingColumn] < b[sortingColumn]) ? 1 : ((b[sortingColumn] < a[sortingColumn]) ? -1 : 0));\n } else {\n return array.sort((a, b) => (a[sortingColumn] > b[sortingColumn]) ? 1 : ((b[sortingColumn] > a[sortingColumn]) ? -1 : 0));\n }\n }\n\n const sortBy = sorting => {\n const { Date: date, Accounts, Disk, Starred } = i18n;\n\n switch (sorting) {\n case date: return 'DATE';\n case Accounts: return 'ACCOUNTS';\n case Disk: return 'U_DISK';\n case Starred: return 'STARRED';\n default: break;\n }\n }\n\n const toggleFav = (value, type) => {\n const { mailAccountsFav } = state;\n let mailAccountsFavDuplicate = mailAccountsFav;\n\n if (type === 'add') {\n mailAccountsFavDuplicate[value] = 1;\n\n addFavorite(value, 'mail_acc')\n .then(() => {\n setState({ ...state, mailAccountsFav: mailAccountsFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n } else {\n mailAccountsFavDuplicate[value] = undefined;\n\n deleteFavorite(value, 'mail_acc')\n .then(() => {\n setState({ ...state, mailAccountsFav: mailAccountsFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n }\n }\n\n const toggleAll = toggled => {\n const mailAccountsDuplicate = [...state.mailAccounts];\n\n if (toggled) {\n let mailAccountNames = [];\n\n let mailAccounts = mailAccountsDuplicate.map(mailAccount => {\n mailAccountNames.push(mailAccount.NAME);\n mailAccount.isChecked = true;\n return mailAccount;\n });\n\n setState({ ...state, mailAccounts, selection: mailAccountNames, toggledAll: toggled });\n } else {\n let mailAccounts = mailAccountsDuplicate.map(mailAccount => {\n mailAccount.isChecked = false;\n return mailAccount;\n });\n\n setState({ ...state, mailAccounts, selection: [], toggledAll: toggled });\n }\n }\n\n const bulk = action => {\n const { selection } = state;\n if (selection.length && action) {\n setLoading(true);\n bulkMailAccountAction(action, props.domain, selection)\n .then(result => {\n if (result.status === 200) {\n toggleAll(false);\n fetchData().then(() => refreshMenuCounters());\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const displayModal = (text, url) => {\n setModal({\n ...modal,\n visible: true,\n text: text,\n actionUrl: url\n });\n }\n\n const modalConfirmHandler = () => {\n if (!modal.actionUrl) {\n return modalCancelHandler();\n }\n\n modalCancelHandler();\n setLoading(true);\n handleAction(modal.actionUrl)\n .then(res => {\n if (res.data.error) {\n setLoading(false);\n return displayModal(res.data.error, '');\n }\n fetchData().then(() => refreshMenuCounters())\n })\n .catch(err => { setLoading(false); console.error(err); });\n }\n\n const refreshMenuCounters = () => {\n dispatch(refreshCounters()).then(() => setLoading(false));\n }\n\n const modalCancelHandler = () => {\n setModal({\n ...modal,\n visible: false,\n text: '',\n actionUrl: ''\n });\n }\n\n return (\n <div className=\"mail-accounts\">\n <Helmet>\n <title>{`Vesta - ${i18n.MAIL}`}</title>\n </Helmet>\n <Toolbar mobile={false} >\n <LeftButton name={i18n['Add Mail Account']} href={`/add/mail/?domain=${props.domain}`} showLeftMenu={true} />\n <div className=\"r-menu\">\n <div className=\"input-group input-group-sm\">\n <a href={state.webMail} className=\"button-extra\" type=\"submit\">{i18n['open webmail']}</a>\n <Checkbox toggleAll={toggleAll} toggled={state.toggledAll} />\n <Select list='mailList' bulkAction={bulk} />\n <DropdownFilter changeSorting={changeSorting} sorting={state.sorting} order={state.order} list=\"mailAccountList\" />\n <SearchInput handleSearchTerm={term => props.changeSearchTerm(term)} />\n </div>\n </div>\n </Toolbar>\n {loading\n ? <Spinner />\n : (\n <>\n <div className=\"mail-accounts-wrapper\">\n <div className=\"subtitle\">\n <span>{`${i18n['Listing']} ${state.domain}`}</span>\n </div>\n {mailAccounts()}\n </div>\n <div className=\"footer-actions-wrapper\">\n <div className=\"total\">{state.totalAmount}</div>\n <div className=\"back\">\n <Link to=\"/list/mail/\">{i18n['Back']}</Link>\n </div>\n </div>\n </>\n )\n }\n <Modal\n onSave={modalConfirmHandler}\n onCancel={modalCancelHandler}\n show={modal.visible}\n text={modal.text} />\n </div>\n );\n}","import React, { Component } from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Container from '../ControlPanel/Container/Container';\nimport ListItem from '../ControlPanel/ListItem/ListItem';\nimport { Link } from 'react-router-dom';\nimport './Mail.scss';\nimport { useSelector } from 'react-redux';\n\nconst Mail = props => {\n const { data } = props;\n const { i18n } = useSelector(state => state.session);\n const token = localStorage.getItem(\"token\");\n const printStat = (stat, text) => {\n if (text === 'no') {\n return <div className=\"crossed\">{stat}</div>;\n }\n\n return <div>{stat}: <span className=\"stat\">{text}</span></div>;\n }\n\n const toggleFav = (starred) => {\n if (starred) {\n props.toggleFav(props.data.NAME, 'add');\n } else {\n props.toggleFav(props.data.NAME, 'delete');\n }\n }\n\n const checkItem = () => {\n props.checkItem(props.data.NAME);\n }\n\n const handleSuspend = () => {\n let suspendedStatus = data.SUSPENDED === 'yes' ? 'unsuspend' : 'suspend' === 'yes' ? 'unsuspend' : 'suspend';\n props.handleModal(data.suspend_conf, `/api/v1/${suspendedStatus}/mail/index.php?domain=${data.NAME}`);\n }\n\n const handleDelete = () => {\n props.handleModal(data.delete_conf, `/api/v1/delete/mail/index.php?domain=${data.NAME}`);\n }\n\n return (\n <ListItem\n id={data.NAME}\n focused={data.FOCUSED}\n checked={data.isChecked}\n date={data.DATE}\n starred={data.STARRED}\n toggleFav={toggleFav}\n checkItem={checkItem}\n suspended={data.SUSPENDED === 'yes'}>\n\n <Container className=\"r-col w-85\">\n <div className=\"name\">{data.NAME}</div>\n <div className=\"stats\">\n <Container className=\"c-1\">\n <div className=\"bandwidth\">{i18n.Disk} <span><span className=\"stat\">{data.U_DISK}</span>{i18n.mb}</span></div>\n </Container>\n <Container className=\"c-2\">\n {printStat(i18n['AntiVirus Support'], data.ANTIVIRUS)}\n {printStat(i18n['DKIM Support'], data.DKIM)}\n </Container>\n <Container className=\"c-3\">\n {printStat(i18n['AntiSpam Support'], data.ANTISPAM)}\n <div>{i18n['Catchall email']}: <span className=\"stat catchall-mail\">{data.CATCHALL}</span></div>\n </Container>\n </div>\n </Container>\n <div className=\"actions\">\n <div>\n <Link className=\"link-gray\" to={`/list/mail/?domain=${data.NAME}`}>\n {data.list_accounts_button}\n {data.FOCUSED ? <span className=\"shortcut-button\">L</span> : <FontAwesomeIcon icon=\"list\" />}\n </Link>\n </div>\n\n <div>\n <Link className=\"link-edit\" to={`/add/mail/?domain=${data.NAME}`}>\n {i18n['add account']}\n {data.FOCUSED ? <span className=\"shortcut-button\">N</span> : <FontAwesomeIcon icon=\"plus\" />}\n </Link>\n </div>\n\n <div>\n <Link className=\"link-edit\" to={`/edit/mail/?domain=${data.NAME}`}>\n {i18n.edit}\n {data.FOCUSED ? <span className=\"shortcut-button html-unicode\">&#8617;</span> : <FontAwesomeIcon icon=\"pen\" />}\n </Link>\n </div>\n\n <div>\n <button\n className=\"link-gray\"\n onClick={() => handleSuspend()}>\n {i18n[data.suspend_action]}\n {data.FOCUSED ? <span className=\"shortcut-button\">S</span> : <FontAwesomeIcon icon={data.SUSPENDED === 'yes' ? 'unlock' : 'lock'} />}\n </button>\n </div>\n\n <div>\n <button className=\"link-delete\" onClick={() => handleDelete()}>\n {i18n.Delete}\n {data.FOCUSED ? <span className=\"shortcut-button del\">Del</span> : <FontAwesomeIcon icon=\"times\" />}\n </button>\n </div>\n </div>\n </ListItem>\n );\n}\n\nexport default Mail;","import React, { useState, useEffect } from 'react';\nimport { addControlPanelContentFocusedElement, removeControlPanelContentFocusedElement } from '../../actions/ControlPanelContent/controlPanelContentActions';\nimport { addActiveElement, removeFocusedElement } from '../../actions/MainNavigation/mainNavigationActions';\nimport DropdownFilter from '../../components/MainNav/Toolbar/DropdownFilter/DropdownFilter';\nimport { bulkAction, getMailList, handleAction } from '../../ControlPanelService/Mail';\nimport * as MainNavigation from '../../actions/MainNavigation/mainNavigationActions';\nimport SearchInput from '../../components/MainNav/Toolbar/SearchInput/SearchInput';\nimport { addFavorite, deleteFavorite } from '../../ControlPanelService/Favorites';\nimport LeftButton from '../../components/MainNav/Toolbar/LeftButton/LeftButton';\nimport Checkbox from '../../components/MainNav/Toolbar/Checkbox/Checkbox';\nimport Select from '../../components/MainNav/Toolbar/Select/Select';\nimport Toolbar from '../../components/MainNav/Toolbar/Toolbar';\nimport Modal from '../../components/ControlPanel/Modal/Modal';\nimport Spinner from '../../components/Spinner/Spinner';\nimport Mail from '../../components/Mail/Mail';\nimport './Mails.scss';\n\nimport { useSelector, useDispatch } from 'react-redux';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport { Link } from 'react-router-dom';\n\nconst Mails = props => {\n const { i18n } = useSelector(state => state.session);\n const { controlPanelFocusedElement } = useSelector(state => state.controlPanelContent);\n const { focusedElement } = useSelector(state => state.mainNavigation);\n const dispatch = useDispatch();\n const [loading, setLoading] = useState(false);\n const [modal, setModal] = useState({\n text: '',\n visible: false,\n actionUrl: '',\n });\n const [state, setState] = useState({\n mails: [],\n mailFav: [],\n toggledAll: false,\n webmail: '',\n sorting: i18n.Date,\n order: \"descending\",\n selection: [],\n totalAmount: ''\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/mail/'));\n dispatch(removeFocusedElement());\n dispatch(removeControlPanelContentFocusedElement());\n fetchData().then(() => setLoading(false));\n\n return () => {\n dispatch(removeControlPanelContentFocusedElement());\n }\n }, []);\n\n useEffect(() => {\n window.addEventListener(\"keydown\", handleContentSelection);\n window.addEventListener(\"keydown\", handleFocusedElementShortcuts);\n\n return () => {\n window.removeEventListener(\"keydown\", handleContentSelection);\n window.removeEventListener(\"keydown\", handleFocusedElementShortcuts);\n };\n }, [controlPanelFocusedElement, focusedElement, state.mails]);\n\n const handleContentSelection = event => {\n if (event.keyCode === 38 || event.keyCode === 40) {\n if (focusedElement) {\n dispatch(MainNavigation.removeFocusedElement());\n }\n }\n\n if (event.keyCode === 38) {\n event.preventDefault();\n handleArrowUp();\n } else if (event.keyCode === 40) {\n event.preventDefault();\n handleArrowDown();\n }\n }\n\n const initFocusedElement = mails => {\n mails[0]['FOCUSED'] = mails[0]['NAME'];\n setState({ ...state, mails });\n dispatch(addControlPanelContentFocusedElement(mails[0]['NAME']));\n }\n\n const handleArrowDown = () => {\n let mails = [...state.mails];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(mails);\n return;\n }\n\n let focusedElementPosition = mails.findIndex(mail => mail.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== mails.length - 1) {\n let nextFocusedElement = mails[focusedElementPosition + 1];\n mails[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, mails });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleArrowUp = () => {\n let mails = [...state.mails];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(mails);\n return;\n }\n\n let focusedElementPosition = mails.findIndex(mail => mail.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== 0) {\n let nextFocusedElement = mails[focusedElementPosition - 1];\n mails[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, mails });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleFocusedElementShortcuts = event => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus');\n\n if (controlPanelFocusedElement && !isSearchInputFocused) {\n switch (event.keyCode) {\n case 8: return handleDelete();\n case 13: return handleEdit();\n case 76: return handleLogs();\n case 78: return handleAddRecord();\n case 83: return handleSuspend();\n default: break;\n }\n }\n }\n\n const handleAddRecord = () => {\n props.history.push(`/add/mail/?domain=${controlPanelFocusedElement}`);\n }\n\n const handleLogs = () => {\n props.history.push(`/list/mail?domain=${controlPanelFocusedElement}&type=access`);\n }\n\n const handleEdit = () => {\n props.history.push(`/edit/mail?domain=${controlPanelFocusedElement}`);\n }\n\n const handleSuspend = () => {\n const { mails } = state;\n let currentMailData = mails.filter(mail => mail.NAME === controlPanelFocusedElement)[0];\n let suspendedStatus = currentMailData.SUSPENDED === 'yes' ? 'unsuspend' : 'suspend';\n\n displayModal(currentMailData.suspend_conf, `/api/v1/${suspendedStatus}/mail/index.php?domain=${controlPanelFocusedElement}`);\n }\n\n const handleDelete = () => {\n const { mails } = state;\n let currentMailData = mails.filter(mail => mail.NAME === controlPanelFocusedElement)[0];\n\n displayModal(currentMailData.delete_conf, `/api/v1/delete/mail/index.php?domain=${controlPanelFocusedElement}`);\n }\n\n const fetchData = () => {\n setLoading(true);\n return new Promise((resolve, reject) => {\n getMailList()\n .then(result => {\n setState({\n ...state,\n mails: reformatData(result.data.data),\n webmail: result.data.webmail,\n mailFav: result.data.mailFav,\n selection: [],\n toggledAll: false,\n totalAmount: result.data.totalAmount\n });\n resolve();\n })\n .catch(err => console.error(err));\n });\n }\n\n const reformatData = data => {\n let mails = [];\n\n for (let i in data) {\n data[i]['NAME'] = i;\n data[i]['FOCUSED'] = controlPanelFocusedElement === i;\n mails.push(data[i]);\n }\n\n return mails;\n }\n\n const changeSorting = (sorting, order) => {\n setState({\n ...state,\n sorting,\n order\n });\n }\n\n const mails = () => {\n const { mails } = state;\n const mailFav = { ...state.mailFav };\n const result = [];\n\n mails.forEach(mail => {\n mail.FOCUSED = controlPanelFocusedElement === mail.NAME;\n\n if (mailFav[mail.NAME]) {\n mail.STARRED = mailFav[mail.NAME];\n } else {\n mail.STARRED = 0;\n }\n\n result.push(mail);\n });\n let sortedResult = sortArray(result);\n\n return sortedResult.map((item, index) => {\n return <Mail data={item} key={index} toggleFav={toggleFav} checkItem={checkItem} handleModal={displayModal} />;\n });\n }\n\n const checkItem = name => {\n const { selection, mails } = state;\n let duplicate = [...selection];\n let mailsDuplicate = mails;\n let checkedItem = duplicate.indexOf(name);\n\n let incomingItem = mailsDuplicate.findIndex(mail => mail.NAME === name);\n mailsDuplicate[incomingItem].isChecked = !mailsDuplicate[incomingItem].isChecked;\n\n if (checkedItem !== -1) {\n duplicate.splice(checkedItem, 1);\n } else {\n duplicate.push(name);\n }\n\n setState({ ...state, mails: mailsDuplicate, selection: duplicate });\n }\n\n const sortArray = array => {\n const { order, sorting } = state;\n let sortingColumn = sortBy(sorting);\n\n if (order === \"descending\") {\n return array.sort((a, b) => (a[sortingColumn] < b[sortingColumn]) ? 1 : ((b[sortingColumn] < a[sortingColumn]) ? -1 : 0));\n } else {\n return array.sort((a, b) => (a[sortingColumn] > b[sortingColumn]) ? 1 : ((b[sortingColumn] > a[sortingColumn]) ? -1 : 0));\n }\n }\n\n const sortBy = sorting => {\n const { Date, Domains, Accounts, Disk, Starred } = i18n;\n\n switch (sorting) {\n case Date: return 'DATE';\n case Domains: return 'domain_account';\n case Accounts: return 'ACCOUNTS';\n case Disk: return 'U_DISK';\n case Starred: return 'STARRED';\n default: break;\n }\n }\n\n const toggleFav = (value, type) => {\n const { mailFav } = state;\n let mailFavDuplicate = mailFav;\n\n if (type === 'add') {\n mailFavDuplicate[value] = 1;\n\n addFavorite(value, 'mail')\n .then(() => {\n setState({ ...state, mailFav: mailFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n } else {\n mailFavDuplicate[value] = undefined;\n\n deleteFavorite(value, 'mail')\n .then(() => {\n setState({ ...state, mailFav: mailFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n }\n }\n\n const toggleAll = toggled => {\n const mailsDuplicate = [...state.mails];\n\n if (toggled) {\n let mailNames = [];\n\n let mails = mailsDuplicate.map(mail => {\n mailNames.push(mail.NAME);\n mail.isChecked = true;\n return mail;\n });\n\n setState({ ...state, mails, selection: mailNames, toggledAll: toggled });\n } else {\n let mails = mailsDuplicate.map(mail => {\n mail.isChecked = false;\n return mail;\n });\n\n setState({ ...state, mails, selection: [], toggledAll: toggled });\n }\n }\n\n const bulk = action => {\n const { selection } = state;\n\n if (selection.length && action) {\n setLoading(true);\n bulkAction(action, selection)\n .then(result => {\n if (result.status === 200) {\n toggleAll(false);\n fetchData().then(() => refreshMenuCounters());\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const displayModal = (text, url) => {\n setModal({\n ...modal,\n visible: true,\n text: text,\n actionUrl: url\n });\n }\n\n const modalConfirmHandler = () => {\n if (!modal.actionUrl) {\n return modalCancelHandler();\n }\n\n modalCancelHandler();\n setLoading(true);\n handleAction(modal.actionUrl)\n .then(res => {\n if (res.data.error) {\n setLoading(false);\n return displayModal(res.data.error, '');\n }\n fetchData().then(() => refreshMenuCounters())\n })\n .catch(err => { setLoading(false); console.error(err); });\n }\n\n const refreshMenuCounters = () => {\n dispatch(refreshCounters()).then(() => setLoading(false));\n }\n\n const modalCancelHandler = () => {\n setModal({\n ...modal,\n visible: false,\n text: '',\n actionUrl: ''\n });\n }\n\n return (\n <div className=\"mails\">\n <Helmet>\n <title>{`Vesta - ${i18n.MAIL}`}</title>\n </Helmet>\n <Toolbar mobile={false} >\n <LeftButton name=\"Add Mail Domain\" href=\"/add/mail\" showLeftMenu={true} />\n <div className=\"r-menu\">\n <div className=\"input-group input-group-sm\">\n <Link\n to={{ pathname: `${window.location.protocol}//${window.location.hostname}${state.webmail}` }}\n target=\"_blank\"\n className=\"button-extra\"\n type=\"submit\">\n {i18n['open webmail']}\n </Link>\n <Checkbox toggleAll={toggleAll} toggled={state.toggledAll} />\n <Select list='mailList' bulkAction={bulk} />\n <DropdownFilter changeSorting={changeSorting} sorting={state.sorting} order={state.order} list=\"mailList\" />\n <SearchInput handleSearchTerm={term => props.changeSearchTerm(term)} />\n </div>\n </div>\n </Toolbar>\n <div className=\"mails-wrapper\">\n {loading\n ? <Spinner />\n : (<>\n {mails()}\n <div className=\"total\">{state.totalAmount}</div>\n </>)}\n </div>\n <Modal\n onSave={modalConfirmHandler}\n onCancel={modalCancelHandler}\n show={modal.visible}\n text={modal.text} />\n </div>\n );\n}\n\nexport default Mails;","import React, { useEffect, useState } from 'react';\nimport MailAccounts from '../MailAccounts/MailAccounts';\nimport { useHistory } from 'react-router-dom';\nimport Mails from '../Mails/Mails';\nimport QueryString from 'qs';\nimport { Helmet } from 'react-helmet';\nimport { useSelector } from 'react-redux';\n\nexport default function MailWrapper(props) {\n const { i18n } = useSelector(state => state.session);\n const [mailDomain, setMailDomain] = useState('');\n const history = useHistory();\n\n useEffect(() => {\n const parsedQueryString = QueryString.parse(history.location.search, { ignoreQueryPrefix: true });\n\n if (parsedQueryString.domain) {\n setMailDomain(parsedQueryString.domain);\n } else {\n setMailDomain('');\n }\n }, [history.location]);\n\n return (\n <>\n <Helmet>\n <title>{`Vesta - ${i18n.MAIL}`}</title>\n </Helmet>\n {\n mailDomain\n ? <MailAccounts {...props} domain={mailDomain} changeSearchTerm={props.handleSearchTerm} />\n : <Mails {...props} changeSearchTerm={props.handleSearchTerm} />\n }\n </>\n );\n}","import React from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Container from '../ControlPanel/Container/Container';\nimport ListItem from '../ControlPanel/ListItem/ListItem';\nimport { Link } from 'react-router-dom';\nimport { useSelector } from 'react-redux';\n\nexport default function DnsRecord({ data, domain, handleModal, ...props }) {\n const { i18n } = useSelector(state => state.session);\n\n const toggleFav = (starred) => {\n if (starred) {\n props.toggleFav(data.NAME, 'add');\n } else {\n props.toggleFav(data.NAME, 'delete');\n }\n }\n\n const checkItem = () => {\n props.checkItem(data.NAME);\n }\n\n const handleDelete = () => {\n handleModal(data.delete_conf, `/api/v1/delete/dns/?domain=${domain}&record_id=${data.ID}`);\n }\n\n const handleSuspend = () => {\n handleModal(data.suspend_conf, `/api/v1/${data.suspend_action}/dns/?domain=${domain}&record_id=${data.ID}`);\n }\n\n return (\n <ListItem\n id={data.NAME}\n date={data.DATE}\n toggleFav={toggleFav}\n checkItem={checkItem}\n starred={data.STARRED}\n focused={data.FOCUSED}\n checked={data.isChecked}\n suspended={data.SUSPENDED === 'yes'}>\n\n <Container className=\"r-col w-85\">\n <div className=\"name\">{data.dnsRecord}</div>\n <br />\n <div className=\"stats\">\n <Container className=\"c-1\">\n <span className=\"stat\">{`${data.RECORD.substring(0, 12)}${data.RECORD.length > 12 ? '...' : ''}`}</span>\n </Container>\n <Container className=\"c-2\">\n <span className=\"stat\">{data.TYPE}</span>\n </Container>\n <Container className=\"c-3\">\n <span className=\"stat\">{data.PRIORITY}</span>\n </Container>\n <Container className=\"c-4 long-value\">\n <span className=\"stat\">{data.VALUE}</span>\n </Container>\n </div>\n </Container>\n <div className=\"actions\">\n <div>\n <Link className=\"link-edit\" to={`/edit/dns/?domain=${domain}&record_id=${data.ID}`}>\n {i18n.edit}\n {data.FOCUSED ? <span className=\"shortcut-button html-unicode\">&#8617;</span> : <FontAwesomeIcon icon=\"pen\" />}\n </Link>\n </div>\n\n <div>\n <button\n className=\"link-gray\"\n onClick={handleSuspend}>\n {data.suspend_action}\n {data.FOCUSED ? <span className=\"shortcut-button\">S</span> : <FontAwesomeIcon icon={data.SUSPENDED === 'yes' ? 'unlock' : 'lock'} />}\n </button>\n </div>\n\n <div>\n <button className=\"link-delete\" onClick={() => handleDelete()}>\n {i18n.Delete}\n {data.FOCUSED ? <span className=\"shortcut-button del\">Del</span> : <FontAwesomeIcon icon=\"times\" />}\n </button>\n </div>\n </div>\n </ListItem>\n );\n}","import React, { useState, useEffect } from 'react';\nimport { addControlPanelContentFocusedElement, removeControlPanelContentFocusedElement } from '../../actions/ControlPanelContent/controlPanelContentActions';\nimport { bulkAction, getDNSRecordsList, handleAction } from '../../ControlPanelService/Dns';\nimport * as MainNavigation from '../../actions/MainNavigation/mainNavigationActions';\nimport SearchInput from '../../components/MainNav/Toolbar/SearchInput/SearchInput';\nimport { addFavorite, deleteFavorite } from '../../ControlPanelService/Favorites';\nimport LeftButton from '../../components/MainNav/Toolbar/LeftButton/LeftButton';\nimport Checkbox from '../../components/MainNav/Toolbar/Checkbox/Checkbox';\nimport Select from '../../components/MainNav/Toolbar/Select/Select';\nimport Toolbar from '../../components/MainNav/Toolbar/Toolbar';\nimport Modal from 'src/components/ControlPanel/Modal/Modal';\nimport DnsRecord from 'src/components/DNSRecord/DNSRecord';\nimport { useSelector, useDispatch } from 'react-redux';\nimport Spinner from '../../components/Spinner/Spinner';\nimport { Link, useHistory } from 'react-router-dom';\nimport QueryString from 'qs';\n\nimport './DNSRecords.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\n\nexport default function DnsRecords(props) {\n const { i18n } = useSelector(state => state.session);\n const { controlPanelFocusedElement } = useSelector(state => state.controlPanelContent);\n const { focusedElement } = useSelector(state => state.mainNavigation);\n const dispatch = useDispatch();\n const history = useHistory();\n const [loading, setLoading] = useState(false);\n const [modal, setModal] = useState({\n text: '',\n visible: false,\n actionUrl: '',\n });\n const [state, setState] = useState({\n dnsRecords: [],\n dnsRecordFav: [],\n domain: '',\n toggledAll: false,\n sorting: i18n.Date,\n order: \"descending\",\n selection: [],\n totalAmount: ''\n });\n\n useEffect(() => {\n dispatch(removeControlPanelContentFocusedElement());\n fetchData().then(() => setLoading(false));\n\n return () => {\n dispatch(removeControlPanelContentFocusedElement());\n }\n }, []);\n\n useEffect(() => {\n window.addEventListener(\"keydown\", handleContentSelection);\n window.addEventListener(\"keydown\", handleFocusedElementShortcuts);\n\n return () => {\n window.removeEventListener(\"keydown\", handleContentSelection);\n window.removeEventListener(\"keydown\", handleFocusedElementShortcuts);\n };\n }, [controlPanelFocusedElement, focusedElement, state.dnsRecords]);\n\n const handleContentSelection = event => {\n if (event.keyCode === 38 || event.keyCode === 40) {\n if (focusedElement) {\n dispatch(MainNavigation.removeFocusedElement());\n }\n }\n\n if (event.keyCode === 38) {\n event.preventDefault();\n handleArrowUp();\n } else if (event.keyCode === 40) {\n event.preventDefault();\n handleArrowDown();\n }\n }\n\n const initFocusedElement = dnsRecords => {\n dnsRecords[0]['FOCUSED'] = dnsRecords[0]['NAME'];\n setState({ ...state, dnsRecords });\n dispatch(addControlPanelContentFocusedElement(dnsRecords[0]['NAME']));\n }\n\n const handleArrowDown = () => {\n let dnsRecords = [...state.dnsRecords];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(dnsRecords);\n return;\n }\n\n let focusedElementPosition = dnsRecords.findIndex(dnsRecord => dnsRecord.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== dnsRecords.length - 1) {\n let nextFocusedElement = dnsRecords[focusedElementPosition + 1];\n dnsRecords[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, dnsRecords });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleArrowUp = () => {\n let dnsRecords = [...state.dnsRecords];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(dnsRecords);\n return;\n }\n\n let focusedElementPosition = dnsRecords.findIndex(dnsRecord => dnsRecord.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== 0) {\n let nextFocusedElement = dnsRecords[focusedElementPosition - 1];\n dnsRecords[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, dnsRecords });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleFocusedElementShortcuts = event => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus');\n\n if (controlPanelFocusedElement && !isSearchInputFocused) {\n if (event.keyCode === 13) {\n return handleEdit();\n } else if (event.keyCode === 8) {\n return handleDelete();\n }\n }\n }\n\n const handleEdit = () => {\n props.history.push(`/edit/dns/?domain=${controlPanelFocusedElement}`);\n }\n\n const handleDelete = () => {\n const { databases } = state;\n let currentDatabaseData = databases.filter(database => database.NAME === controlPanelFocusedElement)[0];\n\n displayModal(currentDatabaseData.delete_conf, `/api/v1/delete/database/?domain=${controlPanelFocusedElement}`);\n }\n\n const fetchData = () => {\n let parsedQueryString = QueryString.parse(history.location.search, { ignoreQueryPrefix: true });\n setLoading(true);\n return new Promise((resolve, reject) => {\n getDNSRecordsList(parsedQueryString.domain || '')\n .then(result => {\n setState({\n ...state,\n dnsRecords: reformatData(result.data.data),\n dnsRecordFav: result.data.dnsRecordsFav,\n totalAmount: result.data.totalAmount,\n domain: parsedQueryString.domain,\n toggledAll: false,\n selection: []\n });\n resolve();\n })\n .catch(err => console.error(err));\n });\n }\n\n const reformatData = data => {\n let dnsRecords = [];\n\n for (let i in data) {\n data[i]['NAME'] = i;\n data[i]['FOCUSED'] = controlPanelFocusedElement === i;\n dnsRecords.push(data[i]);\n }\n\n return dnsRecords;\n }\n\n const dnsRecords = () => {\n const { dnsRecords } = state;\n const result = [];\n const dnsRecordFav = { ...state.dnsRecordFav };\n\n dnsRecords.forEach(dnsRecord => {\n dnsRecord.FOCUSED = controlPanelFocusedElement === dnsRecord.NAME;\n\n if (dnsRecordFav[dnsRecord.NAME]) {\n dnsRecord.STARRED = dnsRecordFav[dnsRecord.NAME];\n } else {\n dnsRecord.STARRED = 0;\n }\n\n result.push(dnsRecord);\n });\n\n return result.map((item, index) => {\n return <DnsRecord data={item} key={index} domain={state.domain} toggleFav={toggleFav} checkItem={checkItem} handleModal={displayModal} />;\n });\n }\n\n const checkItem = name => {\n const { selection, dnsRecords } = state;\n let duplicate = [...selection];\n let dnsDuplicate = dnsRecords;\n let checkedItem = duplicate.indexOf(name);\n\n let incomingItem = dnsDuplicate.findIndex(dns => dns.NAME === name);\n dnsDuplicate[incomingItem].isChecked = !dnsDuplicate[incomingItem].isChecked;\n\n if (checkedItem !== -1) {\n duplicate.splice(checkedItem, 1);\n } else {\n duplicate.push(name);\n }\n\n setState({ ...state, dnsRecords: dnsDuplicate, selection: duplicate });\n }\n\n const toggleFav = (value, type) => {\n const { dnsRecordFav } = state;\n let dnsRecFavDuplicate = dnsRecordFav;\n\n if (type === 'add') {\n dnsRecFavDuplicate[value] = 1;\n\n addFavorite(value, 'dns_rec')\n .then(() => {\n setState({ ...state, dnsRecordFav: dnsRecFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n } else {\n dnsRecFavDuplicate[value] = undefined;\n\n deleteFavorite(value, 'dns_rec')\n .then(() => {\n setState({ ...state, dnsRecordFav: dnsRecFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n }\n }\n\n const toggleAll = toggled => {\n const dnsRecordsDuplicate = [...state.dnsRecords];\n\n if (toggled) {\n let dnsRecordNames = []\n\n let dnsRecords = dnsRecordsDuplicate.map(dnsRecord => {\n dnsRecordNames.push(dnsRecord.NAME);\n dnsRecord.isChecked = true;\n return dnsRecord;\n });\n\n setState({ ...state, dnsRecords, selection: dnsRecordNames, toggledAll: toggled });\n } else {\n let dnsRecords = dnsRecordsDuplicate.map(dnsRecord => {\n dnsRecord.isChecked = false;\n return dnsRecord;\n });\n\n setState({ ...state, dnsRecords, selection: [], toggledAll: toggled });\n }\n }\n\n const bulk = action => {\n const { selection } = state;\n\n if (selection.length && action) {\n setLoading(true);\n bulkAction(action, selection, state.domain)\n .then(result => {\n if (result.status === 200) {\n toggleAll(false);\n fetchData().then(() => refreshMenuCounters());\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const displayModal = (text, url) => {\n setModal({\n ...modal,\n visible: true,\n text: text,\n actionUrl: url\n });\n }\n\n const modalConfirmHandler = () => {\n if (!modal.actionUrl) {\n return modalCancelHandler();\n }\n\n modalCancelHandler();\n setLoading(true);\n handleAction(modal.actionUrl)\n .then(res => {\n if (res.data.error) {\n setLoading(false);\n return displayModal(res.data.error, '');\n }\n fetchData().then(() => refreshMenuCounters())\n })\n .catch(err => { setLoading(false); console.error(err); });\n }\n\n const refreshMenuCounters = () => {\n dispatch(refreshCounters()).then(() => setLoading(false));\n }\n\n const modalCancelHandler = () => {\n setModal({\n ...modal,\n visible: false,\n text: '',\n actionUrl: ''\n });\n }\n\n return (\n <div className=\"dns-records\">\n <Helmet>\n <title>{`Vesta - ${i18n.DNS}`}</title>\n </Helmet>\n <Toolbar mobile={false} >\n <LeftButton name={i18n['Add DNS Record']} href={`/add/dns/?domain=${state.domain}`} showLeftMenu={true} />\n <div className=\"r-menu\">\n <div className=\"input-group input-group-sm\">\n <Checkbox toggleAll={toggleAll} toggled={state.toggledAll} />\n <Select list='dnsList' bulkAction={bulk} />\n <SearchInput handleSearchTerm={term => props.changeSearchTerm(term)} />\n </div>\n </div>\n </Toolbar>\n {loading\n ? <Spinner />\n : (\n <>\n <div className=\"dns-records-wrapper\">\n <div className=\"subtitle\">\n <span>{`${i18n['Listing']} ${state.domain}`}</span>\n </div>\n {dnsRecords()}\n </div>\n <div className=\"footer-actions-wrapper\">\n <div className=\"total\">{state.totalAmount}</div>\n <div className=\"back\">\n <Link to=\"/list/dns/\">{i18n['Back']}</Link>\n </div>\n </div>\n </>\n )\n }\n <Modal\n onSave={modalConfirmHandler}\n onCancel={modalCancelHandler}\n show={modal.visible}\n text={modal.text} />\n </div>\n );\n}","import React from 'react';\nimport ListItem from '../ControlPanel/ListItem/ListItem';\nimport Container from '../ControlPanel/Container/Container';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport './DomainNameSystem.scss';\nimport { Link } from 'react-router-dom';\nimport { useSelector } from 'react-redux';\n\nconst DomainNameSystem = props => {\n const { data } = props;\n const { i18n } = useSelector(state => state.session);\n const token = localStorage.getItem(\"token\");\n\n const toggleFav = (starred) => {\n if (starred) {\n props.toggleFav(props.data.NAME, 'add');\n } else {\n props.toggleFav(props.data.NAME, 'delete');\n }\n }\n\n const checkItem = () => {\n props.checkItem(props.data.NAME);\n }\n\n const handleSuspend = () => {\n let suspendedStatus = data.SUSPENDED === 'yes' ? 'unsuspend' : 'suspend' === 'yes' ? 'unsuspend' : 'suspend';\n props.handleModal(data.suspend_conf, `/api/v1/${suspendedStatus}/dns/index.php?domain=${data.NAME}`);\n }\n\n const handleDelete = () => {\n props.handleModal(data.delete_conf, `/api/v1/delete/dns/index.php?domain=${data.NAME}`);\n }\n\n return (\n <ListItem\n id={data.NAME}\n checked={data.isChecked}\n starred={data.STARRED}\n date={data.DATE}\n toggleFav={toggleFav}\n checkItem={checkItem}\n suspended={data.SUSPENDED === 'yes'}\n focused={data.FOCUSED} >\n <Container className=\"r-col w-85\">\n <div className=\"name\">{data.NAME} <span className=\"dns-records\">/ {data.RECORDS}</span></div>\n <br />\n <div className=\"stats\">\n <Container className=\"c-1 w-35\">\n <div className=\"ip\">{data.IP}</div>\n <div className=\"soa\"><span className=\"stat\">{data.SOA}</span></div>\n </Container>\n <Container className=\"c-2 w-30\">\n <div>{i18n.TTL}: <span className=\"stat\">{data.TTL}</span></div>\n <div>{i18n.Serial}: <span className=\"stat\">{data.SERIAL}</span></div>\n </Container>\n <Container className=\"c-3 w-35\">\n <div>{i18n.Template}: <span className=\"stat\">{data.TPL}</span></div>\n <div>{i18n.Expire}: <span className=\"stat\">{data.EXP}</span></div>\n </Container>\n </div>\n </Container>\n <div className=\"actions\">\n <div>\n <Link className=\"link-gray\" to={`/list/dns/?domain=${data.NAME}`}>\n {data.RECORDS_I18N}\n {data.FOCUSED ? <span className=\"shortcut-button\">L</span> : <FontAwesomeIcon icon=\"list\" />}\n </Link>\n </div>\n\n <div>\n <Link className=\"link-edit\" to={`/add/dns/?domain=${data.NAME}`}>\n {i18n['add record']}\n {data.FOCUSED ? <span className=\"shortcut-button\">N</span> : <FontAwesomeIcon icon=\"plus\" />}\n </Link>\n </div>\n\n <div>\n <Link className=\"link-edit\" to={`/edit/dns/?domain=${data.NAME}`}>\n {i18n.edit}\n {data.FOCUSED ? <span className=\"shortcut-button html-unicode\">&#8617;</span> : <FontAwesomeIcon icon=\"pen\" />}\n </Link>\n </div>\n\n <div>\n <button\n className=\"link-gray\"\n onClick={() => handleSuspend()}>\n {i18n[data.suspend_action]}\n {data.FOCUSED ? <span className=\"shortcut-button\">S</span> : <FontAwesomeIcon icon={data.SUSPENDED === 'yes' ? 'unlock' : 'lock'} />}\n </button>\n </div>\n\n <div>\n <button type=\"button\" className=\"link-delete\" onClick={() => handleDelete()}>\n {i18n.Delete}\n {data.FOCUSED ? <span className=\"shortcut-button del\">Del</span> : <FontAwesomeIcon icon=\"times\" />}\n </button>\n </div>\n </div>\n </ListItem>\n );\n}\n\nexport default DomainNameSystem;","import React, { useState, useEffect } from 'react';\nimport { addControlPanelContentFocusedElement, removeControlPanelContentFocusedElement } from '../../actions/ControlPanelContent/controlPanelContentActions';\nimport { addActiveElement, removeFocusedElement } from '../../actions/MainNavigation/mainNavigationActions';\nimport DropdownFilter from '../../components/MainNav/Toolbar/DropdownFilter/DropdownFilter';\nimport { bulkDomainAction, getDnsList, handleAction } from '../../ControlPanelService/Dns';\nimport * as MainNavigation from '../../actions/MainNavigation/mainNavigationActions';\nimport SearchInput from '../../components/MainNav/Toolbar/SearchInput/SearchInput';\nimport DomainNameSystem from '../../components/DomainNameSystem/DomainNameSystem';\nimport { addFavorite, deleteFavorite } from '../../ControlPanelService/Favorites';\nimport LeftButton from '../../components/MainNav/Toolbar/LeftButton/LeftButton';\nimport Checkbox from '../../components/MainNav/Toolbar/Checkbox/Checkbox';\nimport Select from '../../components/MainNav/Toolbar/Select/Select';\nimport Toolbar from '../../components/MainNav/Toolbar/Toolbar';\nimport Modal from '../../components/ControlPanel/Modal/Modal';\nimport Spinner from '../../components/Spinner/Spinner';\nimport './DomainNameSystems.scss';\n\nimport { useDispatch, useSelector } from 'react-redux';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\n\nconst DomainNameSystems = props => {\n const { i18n } = useSelector(state => state.session);\n const { controlPanelFocusedElement } = useSelector(state => state.controlPanelContent);\n const { focusedElement } = useSelector(state => state.mainNavigation);\n const dispatch = useDispatch();\n const [loading, setLoading] = useState(false);\n const [modal, setModal] = useState({\n text: '',\n visible: false,\n actionUrl: ''\n });\n const [state, setState] = useState({\n domainNameSystems: [],\n dnsFav: [],\n toggledAll: false,\n sorting: i18n.Date,\n order: \"descending\",\n selection: [],\n totalAmount: '',\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/dns/'));\n dispatch(removeFocusedElement());\n dispatch(removeControlPanelContentFocusedElement());\n fetchData().then(() => setLoading(false));\n\n return () => {\n dispatch(removeControlPanelContentFocusedElement());\n }\n }, []);\n\n useEffect(() => {\n window.addEventListener(\"keydown\", handleContentSelection);\n window.addEventListener(\"keydown\", handleFocusedElementShortcuts);\n\n return () => {\n window.removeEventListener(\"keydown\", handleContentSelection);\n window.removeEventListener(\"keydown\", handleFocusedElementShortcuts);\n };\n }, [controlPanelFocusedElement, focusedElement, state.domainNameSystems]);\n\n const handleContentSelection = event => {\n if (event.keyCode === 38 || event.keyCode === 40) {\n if (focusedElement) {\n dispatch(MainNavigation.removeFocusedElement());\n }\n }\n\n if (event.keyCode === 38) {\n event.preventDefault();\n handleArrowUp();\n } else if (event.keyCode === 40) {\n event.preventDefault();\n handleArrowDown();\n }\n }\n\n const initFocusedElement = domainNameSystems => {\n domainNameSystems[0]['FOCUSED'] = domainNameSystems[0]['NAME'];\n setState({ ...state, domainNameSystems });\n dispatch(addControlPanelContentFocusedElement(domainNameSystems[0]['NAME']));\n }\n\n const handleArrowDown = () => {\n let domainNameSystems = [...state.domainNameSystems];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(domainNameSystems);\n return;\n }\n\n let focusedElementPosition = domainNameSystems.findIndex(domainNameSystem => domainNameSystem.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== domainNameSystems.length - 1) {\n let nextFocusedElement = domainNameSystems[focusedElementPosition + 1];\n domainNameSystems[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, domainNameSystems });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleArrowUp = () => {\n let domainNameSystems = [...state.domainNameSystems];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(domainNameSystems);\n return;\n }\n\n let focusedElementPosition = domainNameSystems.findIndex(domainNameSystem => domainNameSystem.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== 0) {\n let nextFocusedElement = domainNameSystems[focusedElementPosition - 1];\n domainNameSystems[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, domainNameSystems });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleFocusedElementShortcuts = event => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus');\n\n if (controlPanelFocusedElement && !isSearchInputFocused) {\n switch (event.keyCode) {\n case 8: return handleDelete();\n case 13: return handleEdit();\n case 76: return handleLogs();\n case 78: return handleAddRecord();\n case 83: return handleSuspend();\n default: break;\n }\n }\n }\n\n const handleAddRecord = () => {\n props.history.push(`/add/dns/?domain=${controlPanelFocusedElement}`);\n }\n\n const handleLogs = () => {\n props.history.push(`/list/dns?domain=${controlPanelFocusedElement}&type=access`);\n }\n\n const handleEdit = () => {\n props.history.push(`/edit/dns?domain=${controlPanelFocusedElement}`);\n }\n\n const handleSuspend = () => {\n const { domainNameSystems } = state;\n let currentDomainNameSystemData = domainNameSystems.filter(domainNameSystem => domainNameSystem.NAME === controlPanelFocusedElement)[0];\n let suspendedStatus = currentDomainNameSystemData.SUSPENDED === 'yes' ? 'unsuspend' : 'suspend';\n\n displayModal(currentDomainNameSystemData.suspend_conf, `/api/v1/${suspendedStatus}/dns/index.php?domain=${controlPanelFocusedElement}`);\n }\n\n const handleDelete = () => {\n const { domainNameSystems } = state;\n let currentDomainNameSystemData = domainNameSystems.filter(domainNameSystem => domainNameSystem.NAME === controlPanelFocusedElement)[0];\n\n displayModal(currentDomainNameSystemData.delete_conf, `/api/v1/delete/dns/index.php?domain=${controlPanelFocusedElement}`);\n }\n\n const fetchData = () => {\n setLoading(true);\n return new Promise((resolve, reject) => {\n getDnsList()\n .then(result => {\n setState({\n ...state,\n domainNameSystems: reformatData(result.data.data),\n dnsFav: result.data.dnsFav,\n selection: [],\n toggledAll: false,\n totalAmount: result.data.totalAmount\n });\n resolve();\n })\n .catch(err => console.error(err));\n });\n }\n\n const reformatData = data => {\n let domainNameSystems = [];\n\n for (let i in data) {\n data[i]['NAME'] = i;\n data[i]['RECORDS'] = Number(data[i]['RECORDS']);\n data[i]['FOCUSED'] = controlPanelFocusedElement === i;\n domainNameSystems.push(data[i]);\n }\n\n return domainNameSystems;\n }\n\n const changeSorting = (sorting, order) => {\n setState({\n ...state,\n sorting,\n order\n });\n }\n\n const dns = () => {\n const { domainNameSystems } = state;\n const dnsFav = { ...state.dnsFav };\n const result = [];\n\n domainNameSystems.forEach(domainNameSystem => {\n domainNameSystem.FOCUSED = controlPanelFocusedElement === domainNameSystem.NAME;\n\n if (dnsFav[domainNameSystem.NAME]) {\n domainNameSystem.STARRED = dnsFav[domainNameSystem.NAME];\n } else {\n domainNameSystem.STARRED = 0;\n }\n\n result.push(domainNameSystem);\n });\n\n let sortedResult = sortArray(result);\n\n return sortedResult.map((item, index) => {\n return <DomainNameSystem data={item} key={index} toggleFav={toggleFav} checkItem={checkItem} handleModal={displayModal} />;\n });\n }\n\n const checkItem = name => {\n const { selection, domainNameSystems } = state;\n let duplicate = [...selection];\n let domainNameSystemsDuplicate = domainNameSystems;\n let checkedItem = duplicate.indexOf(name);\n\n let incomingItem = domainNameSystemsDuplicate.findIndex(domainNameSystem => domainNameSystem.NAME === name);\n domainNameSystemsDuplicate[incomingItem].isChecked = !domainNameSystemsDuplicate[incomingItem].isChecked;\n\n if (checkedItem !== -1) {\n duplicate.splice(checkedItem, 1);\n } else {\n duplicate.push(name);\n }\n\n setState({ ...state, domainNameSystems: domainNameSystemsDuplicate, selection: duplicate });\n }\n\n const sortArray = array => {\n const { order, sorting } = state;\n let sortingColumn = sortBy(sorting);\n\n if (order === \"descending\") {\n return array.sort((a, b) => {\n const first = a[sortingColumn];\n const second = b[sortingColumn];\n return (first < second) ? 1 : ((second < first) ? -1 : 0);\n });\n } else {\n return array.sort((a, b) => {\n const first = a[sortingColumn];\n const second = b[sortingColumn];\n return (first > second) ? 1 : ((second > first) ? -1 : 0)\n });\n }\n }\n\n const sortBy = sorting => {\n const { Date, Expire, Domain, IP, Records, Starred } = i18n;\n\n switch (sorting) {\n case Date: return 'DATE';\n case Expire: return 'EXP';\n case Domain: return 'NAME';\n case IP: return 'IP';\n case Records: return 'RECORDS';\n case Starred: return 'STARRED';\n default: break;\n }\n }\n\n const toggleFav = (value, type) => {\n const { dnsFav } = state;\n let dnsFavDuplicate = dnsFav;\n\n if (type === 'add') {\n dnsFavDuplicate[value] = 1;\n\n addFavorite(value, 'dns')\n .then(() => {\n setState({ ...state, dnsFav: dnsFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n } else {\n dnsFavDuplicate[value] = undefined;\n\n deleteFavorite(value, 'dns')\n .then(() => {\n setState({ ...state, dnsFav: dnsFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n }\n }\n\n const toggleAll = toggled => {\n const domainNameSystemsDuplicate = [...state.domainNameSystems];\n\n if (toggled) {\n let domainNameSystemsNames = [];\n\n let domainNameSystems = domainNameSystemsDuplicate.map(domainNameSystem => {\n domainNameSystemsNames.push(domainNameSystem.NAME);\n domainNameSystem.isChecked = true;\n return domainNameSystem;\n });\n\n setState({ ...state, domainNameSystems, selection: domainNameSystemsNames, toggledAll: toggled });\n } else {\n let domainNameSystems = domainNameSystemsDuplicate.map(domainNameSystem => {\n domainNameSystem.isChecked = false;\n return domainNameSystem;\n });\n\n setState({ ...state, domainNameSystems, selection: [], toggledAll: toggled });\n }\n }\n\n const bulk = action => {\n const { selection } = state;\n\n if (selection.length && action) {\n setLoading(true);\n bulkDomainAction(action, selection)\n .then(result => {\n if (result.status === 200) {\n toggleAll(false);\n fetchData().then(() => refreshMenuCounters());\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const displayModal = (text, url) => {\n setModal({\n ...modal,\n visible: true,\n text: text,\n actionUrl: url\n });\n }\n\n const modalConfirmHandler = () => {\n if (!modal.actionUrl) {\n return modalCancelHandler();\n }\n\n modalCancelHandler();\n setLoading(true);\n handleAction(modal.actionUrl)\n .then(res => {\n if (res.data.error) {\n setLoading(false);\n return displayModal(res.data.error, '');\n }\n fetchData().then(() => refreshMenuCounters())\n })\n .catch(err => { setLoading(false); console.error(err); });\n }\n\n const refreshMenuCounters = () => {\n dispatch(refreshCounters()).then(() => setLoading(false));\n }\n\n const modalCancelHandler = () => {\n setModal({\n ...modal,\n visible: false,\n text: '',\n actionUrl: ''\n });\n }\n\n return (\n <div className=\"dns\">\n <Helmet>\n <title>{`Vesta - ${i18n.DNS}`}</title>\n </Helmet>\n <Toolbar mobile={false} >\n <LeftButton name={i18n['Add DNS Domain']} href=\"/add/dns\" showLeftMenu={true} />\n <div className=\"r-menu\">\n <div className=\"input-group input-group-sm\">\n <Checkbox toggleAll={toggleAll} toggled={state.toggledAll} />\n <Select list='dnsList' bulkAction={bulk} />\n <DropdownFilter changeSorting={changeSorting} sorting={state.sorting} order={state.order} list=\"dnsList\" />\n <SearchInput handleSearchTerm={term => props.changeSearchTerm(term)} />\n </div>\n </div>\n </Toolbar>\n <div className=\"dns-wrapper\">\n {loading ? <Spinner /> : dns()}\n </div>\n <div className=\"total\">{state.totalAmount}</div>\n <Modal\n onSave={modalConfirmHandler}\n onCancel={modalCancelHandler}\n show={modal.visible}\n text={modal.text} />\n </div>\n );\n}\n\nexport default DomainNameSystems;","import QueryString from 'qs';\nimport React, { useEffect, useState } from 'react';\nimport { Helmet } from 'react-helmet';\nimport { useSelector } from 'react-redux';\nimport { useHistory } from 'react-router-dom';\nimport DnsRecords from '../DNSRecords/DNSRecords';\nimport DomainNameSystems from '../DomainNameSystems/DomainNameSystems';\n\nexport default function DNSWrapper(props) {\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const parsedQueryString = QueryString.parse(history.location.search, { ignoreQueryPrefix: true });\n const [isDnsRecords, setIsDnsRecords] = useState(false);\n\n useEffect(() => {\n if (parsedQueryString.domain) {\n setIsDnsRecords(true);\n } else {\n setIsDnsRecords(false);\n }\n }, [history.location]);\n\n return (\n <>\n <Helmet>\n <title>{`Vesta - ${i18n.DNS}`}</title>\n </Helmet>\n {\n isDnsRecords\n ? <DnsRecords {...props} changeSearchTerm={props.changeSearchTerm} />\n : <DomainNameSystems {...props} changeSearchTerm={props.changeSearchTerm} />\n }\n </>\n );\n}","import axios from \"axios\";\n\nconst BASE_URL = window.location.origin;\nconst webApiUri = '/api/v1/list/stats/index.php';\n\nexport const getStatisticsList = user => {\n return axios.get(BASE_URL + webApiUri + '?user=' + user);\n}","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport Container from '../ControlPanel/Container/Container';\nimport './Statistic.scss';\n\nconst Statistic = props => {\n const { data } = props;\n const { i18n } = useSelector(state => state.session);\n\n const printDate = date => {\n let newDate = new Date(date);\n let day = newDate.getDate();\n let month = newDate.getMonth();\n let year = newDate.getFullYear();\n let months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n\n return <div className=\"date\">{day} &nbsp; {months[month]} &nbsp; {year}</div>;\n }\n\n const printName = date => {\n let newDate = new Date(date);\n let month = newDate.getMonth();\n let year = newDate.getFullYear();\n let months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n\n return <div className=\"date\">{months[month]} &nbsp; {year}</div>;\n }\n\n return (\n <div className={data.FOCUSED ? 'statistic-item focused' : 'statistic-item'} id={data.NAME}>\n <Container className=\"l-col w-15\">\n {printDate(data.DATE)}\n </Container>\n <Container className=\"r-col w-85\">\n <div className=\"name\">{printName(data.DATE)}</div>\n <div className=\"stats\">\n <Container className=\"c-1\">\n <div className=\"bandwidth\">{i18n.Bandwidth} <span><span className=\"stat\">{data.U_BANDWIDTH}</span>{i18n.mb}</span></div>\n <div className=\"disk\">{i18n.Disk}: <span><span className=\"stat\">{data.U_DISK}</span>{i18n.mb}</span></div>\n <div className=\"sub-disk-stats\">\n <div>\n <div>{i18n.Web}: <span><span className=\"stat\">{data.U_DISK_WEB}</span>{i18n.mb}</span></div>\n <div>{i18n.Mail}: <span><span className=\"stat\">{data.U_DISK_MAIL}</span>{i18n.mb}</span></div>\n </div>\n <div>\n <div>{i18n.Databases}: <span><span className=\"stat\">{data.U_DATABASES}</span>{i18n.mb}</span></div>\n <div>{i18n['User Directories']}: <span><span className=\"stat\">{data.U_DISK_DIRS}</span>{i18n.mb}</span></div>\n </div>\n </div>\n </Container>\n <Container className=\"c-2\">\n <div><span>{i18n['Web Domains']}:</span> <span className=\"stat\">{data.U_WEB_DOMAINS}</span></div>\n <div><span>{i18n['SSL Domains']}:</span> <span className=\"stat\">{data.U_WEB_SSL}</span></div>\n <div><span>{i18n['Web Aliases']}:</span> <span className=\"stat\">{data.U_WEB_ALIASES}</span></div>\n <div><span>{i18n['DNS Domains']}:</span> <span className=\"stat\">{data.U_DNS_DOMAINS}</span></div>\n <div><span>{i18n['DNS records']}:</span> <span className=\"stat\">{data.U_DNS_RECORDS}</span></div>\n </Container>\n <Container className=\"c-3\">\n <div><span>{i18n['Mail Domains']}:</span> <span className=\"stat\">{data.U_MAIL_DOMAINS}</span></div>\n <div><span>{i18n['Mail Accounts']}:</span> <span className=\"stat\">{data.U_MAIL_ACCOUNTS}</span></div>\n <div><span>{i18n['Databases']}:</span> <span className=\"stat\">{data.U_DATABASES}</span></div>\n <div><span>{i18n['Cron Jobs']}:</span> <span className=\"stat\">{data.U_CRON_JOBS}</span></div>\n <div><span>{i18n['IP Addresses']}:</span> <span className=\"stat\">{data.IP_OWNED}</span></div>\n </Container>\n </div>\n </Container>\n </div>\n );\n}\n\nexport default Statistic;","import React, { useEffect, useState } from 'react';\nimport { addControlPanelContentFocusedElement, removeControlPanelContentFocusedElement } from '../../actions/ControlPanelContent/controlPanelContentActions';\nimport { addActiveElement, removeFocusedElement } from '../../actions/MainNavigation/mainNavigationActions';\nimport * as MainNavigation from '../../actions/MainNavigation/mainNavigationActions';\nimport SearchInput from '../../components/MainNav/Toolbar/SearchInput/SearchInput';\nimport { getStatisticsList } from '../../ControlPanelService/Statistics';\nimport Select from '../../components/MainNav/Toolbar/Select/Select';\nimport Toolbar from '../../components/MainNav/Toolbar/Toolbar';\nimport Statistic from '../../components/Statistic/Statistic';\nimport Spinner from '../../components/Spinner/Spinner';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { Link } from 'react-router-dom';\nimport './Statistics.scss';\nimport { Helmet } from 'react-helmet';\n\nconst Statistics = props => {\n const { i18n } = useSelector(state => state.session);\n const { controlPanelFocusedElement } = useSelector(state => state.controlPanelContent);\n const { focusedElement } = useSelector(state => state.mainNavigation);\n const dispatch = useDispatch();\n const [state, setState] = useState({\n statistics: [],\n users: [],\n totalAmount: '',\n loading: false,\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/stats/'));\n dispatch(removeFocusedElement());\n dispatch(removeControlPanelContentFocusedElement());\n fetchData();\n\n return () => {\n dispatch(removeControlPanelContentFocusedElement());\n }\n }, []);\n\n useEffect(() => {\n window.addEventListener(\"keydown\", handleContentSelection);\n\n return () => {\n window.removeEventListener(\"keydown\", handleContentSelection);\n };\n }, [controlPanelFocusedElement, focusedElement, state.statistics]);\n\n const handleContentSelection = event => {\n if (event.keyCode === 38 || event.keyCode === 40) {\n if (focusedElement) {\n dispatch(MainNavigation.removeFocusedElement());\n }\n }\n\n if (event.keyCode === 38) {\n event.preventDefault();\n handleArrowUp();\n } else if (event.keyCode === 40) {\n event.preventDefault();\n handleArrowDown();\n }\n }\n\n const initFocusedElement = statistics => {\n statistics[0]['FOCUSED'] = statistics[0]['NAME'];\n setState({ ...state, statistics });\n dispatch(addControlPanelContentFocusedElement(statistics[0]['NAME']));\n }\n\n const handleArrowDown = () => {\n let statistics = [...state.statistics];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(statistics);\n return;\n }\n\n let focusedElementPosition = statistics.findIndex(statistic => statistic.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== statistics.length - 1) {\n let nextFocusedElement = statistics[focusedElementPosition + 1];\n statistics[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, statistics });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleArrowUp = () => {\n let statistics = [...state.statistics];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(statistics);\n return;\n }\n\n let focusedElementPosition = statistics.findIndex(statistic => statistic.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== 0) {\n let nextFocusedElement = statistics[focusedElementPosition - 1];\n statistics[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, statistics });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const fetchData = () => {\n dispatch(removeControlPanelContentFocusedElement());\n setState({ ...state, loading: true });\n\n let search = window.location.search;\n let user = search ? search.split('=')[1] : '';\n\n getStatisticsList(user)\n .then(result => {\n setState({\n ...state,\n statistics: reformatData(result.data.data),\n users: result.data.users || [],\n totalAmount: result.data.totalAmount,\n loading: false\n });\n })\n .catch(err => console.error(err));\n }\n\n const reformatData = data => {\n let statistics = [];\n\n for (let i in data) {\n data[i]['DATE'] = i;\n data[i]['NAME'] = i;\n data[i]['FOCUSED'] = controlPanelFocusedElement === i;\n statistics.push(data[i]);\n }\n\n return statistics;\n }\n\n const statistics = () => {\n let statistics = [...state.statistics];\n\n statistics.forEach(statistic => {\n statistic.FOCUSED = controlPanelFocusedElement === statistic.NAME;\n });\n\n return statistics.map((item, index) => {\n return <Statistic data={item} key={index} />;\n });\n }\n\n const bulkAction = value => {\n let user = value !== '' ? `?user=${value}` : '';\n props.history.push({ search: user });\n fetchData();\n };\n\n return (\n <div className=\"statistics-list\">\n <Helmet>\n <title>{`Vesta - ${i18n.STATS}`}</title>\n </Helmet>\n <Toolbar mobile={false} className=\"justify-right\">\n <div className=\"r-menu\">\n <div className=\"input-group input-group-sm\">\n <Link to=\"/list/stats/\" className=\"button-extra\" type=\"submit\">{i18n['Overall Statistics']}</Link>\n <Select list='statisticsList' users={state.users} bulkAction={bulkAction} />\n <SearchInput handleSearchTerm={term => props.changeSearchTerm(term)} />\n </div>\n </div>\n </Toolbar>\n <div className=\"statistics-wrapper\">\n {state.loading ? <Spinner /> : statistics()}\n </div>\n <div className=\"total\">{state.totalAmount}</div>\n </div>\n );\n}\n\nexport default Statistics;","import React from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { loginAs, logout } from 'src/actions/Session/sessionActions';\nimport Container from '../ControlPanel/Container/Container';\nimport ListItem from '../ControlPanel/ListItem/ListItem';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { Link } from 'react-router-dom';\n\nimport './User.scss';\n\nconst User = ({ data, toggleFav, handleModal, checkItem }) => {\n const { i18n, userName } = useSelector(state => state.session);\n const dispatch = useDispatch();\n\n const printNameServers = servers => {\n let serversArray = servers.split(',');\n\n return serversArray.map(\n (server, index) => <div key={index}>{server}</div>\n );\n }\n\n const signInAs = username => {\n dispatch(loginAs(username));\n }\n\n const signOut = () => {\n dispatch(logout());\n }\n\n const printLoginActionButton = user => {\n let currentUser = userName;\n if (currentUser === user) {\n return (\n <div>\n <button onClick={signOut}>{i18n['Log out']}\n {data.FOCUSED ? <span className=\"shortcut-button\">L</span> : <FontAwesomeIcon icon=\"user-lock\" />}\n </button>\n </div>\n );\n } else {\n return (\n <div>\n <button onClick={() => signInAs(user)}>{i18n['login as']} {user}\n {data.FOCUSED ? <span className=\"shortcut-button\">L</span> : <FontAwesomeIcon icon=\"user-lock\" />}\n </button>\n </div>\n );\n }\n }\n\n const toggleFavorite = (starred) => {\n if (starred) {\n toggleFav(data.NAME, 'add');\n } else {\n toggleFav(data.NAME, 'delete');\n }\n }\n\n const checkItemName = () => {\n checkItem(data.NAME);\n }\n\n const handleSuspend = () => {\n let suspendedStatus = data.SUSPENDED === 'yes' ? 'unsuspend' : 'suspend';\n handleModal(data.spnd_conf, `/api/v1/${suspendedStatus}/user/index.php?user=${data.NAME}`);\n }\n\n const handleDelete = () => {\n handleModal(data.delete_conf, `/api/v1/delete/user/index.php?user=${data.NAME}`);\n }\n\n return (\n <ListItem\n id={data.NAME}\n date={data.DATE}\n checked={data.isChecked}\n starred={data.STARRED}\n toggleFav={toggleFavorite}\n checkItem={checkItemName}\n focused={data.FOCUSED}\n suspended={data.SUSPENDED === 'yes'}>\n\n <Container className=\"r-col w-85\">\n <div className=\"name\">{data.NAME}</div>\n <div>{data.FNAME} {data.LNAME}</div>\n <div className=\"stats\">\n <Container className=\"c-1\">\n <div className=\"bandwidth\">{i18n.Bandwidth} <span><span className=\"stat\">{data.U_BANDWIDTH}</span> {i18n.mb}</span></div>\n <div className=\"disk\">{i18n.Disk}: <span><span className=\"stat\">{data.U_DISK}</span> {i18n.mb}</span></div>\n <div className=\"sub-disk-stats\">\n <div>\n <div><span>{i18n.Web}:</span> <span><b>{data.U_DISK_WEB}</b> {i18n.mb}</span></div>\n <div><span>{i18n.Mail}:</span> <span><b>{data.U_DISK_MAIL}</b> {i18n.mb}</span></div>\n </div>\n <div>\n <div><span>{i18n.Databases}:</span> <span><b>{data.U_DATABASES}</b> {i18n.mb}</span></div>\n <div><span>{i18n['User Directories']}:</span> <span><b>{data.U_DISK_DIRS}</b> {i18n.mb}</span></div>\n </div>\n </div>\n </Container>\n <Container className=\"c-2\">\n <div><span>{i18n['Web Domains']}:</span> <span><b>{data.U_WEB_DOMAINS}</b> / {data.WEB_DOMAINS}</span></div>\n <div><span>{i18n['DNS Domains']}:</span> <span><b>{data.U_DNS_DOMAINS}</b> / {data.DNS_DOMAINS}</span></div>\n <div><span>{i18n['Mail Domains']}:</span> <span><b>{data.U_MAIL_DOMAINS}</b> / {data.MAIL_DOMAINS}</span></div>\n <div><span>{i18n.Databases}:</span> <span><b>{data.U_DATABASES}</b> / {data.DATABASES}</span></div>\n <div><span>{i18n['Cron Jobs']}:</span> <span><b>{data.U_CRON_JOBS}</b> / {data.CRON_JOBS}</span></div>\n <div><span>{i18n.Backups}:</span> <span><b>{data.U_BACKUPS}</b> / {data.BACKUPS}</span></div>\n </Container>\n <Container className=\"c-3\">\n <div><span>{i18n.Email}:</span> <span className=\"stat email\">{data.CONTACT}</span></div>\n <div><span>{i18n.Package}:</span> <span className=\"stat\">{data.PACKAGE}</span></div>\n <div><span>{i18n['SSH Access']}:</span> <span className=\"stat\">{data.SHELL}</span></div>\n <div><span>{i18n['IP Addresses']}:</span> <span className=\"stat\">{data.IP_OWNED}</span></div>\n <div className=\"ns\"><span>{i18n['Name Servers']}:</span> <span className=\"stat\">{printNameServers(data.NS)}</span></div>\n </Container>\n </div>\n </Container>\n <div className=\"actions\">\n {printLoginActionButton(data.NAME)}\n <div>\n <Link to={`/edit/user?user=${data.NAME}`}>{i18n.edit}\n {data.FOCUSED ? <span className=\"shortcut-button html-unicode\">&#8617;</span> : <FontAwesomeIcon icon=\"pen\" />}\n </Link>\n </div>\n <div>\n <button\n className=\"link-gray\"\n onClick={handleSuspend}>\n {data.spnd_action}\n {data.FOCUSED ? <span className=\"shortcut-button\">S</span> : <FontAwesomeIcon icon={data.SUSPENDED === 'yes' ? 'unlock' : 'lock'} />}\n </button>\n </div>\n <div>\n <button className=\"link-delete\" onClick={handleDelete}>\n {i18n.Delete}\n {data.FOCUSED ? <span className=\"shortcut-button del\">Del</span> : <FontAwesomeIcon icon=\"times\" />}\n </button>\n </div>\n </div>\n </ListItem>\n );\n}\n\nexport default User;","import React, { useState, useEffect } from 'react';\nimport { addControlPanelContentFocusedElement, removeControlPanelContentFocusedElement } from '../../actions/ControlPanelContent/controlPanelContentActions';\nimport { addActiveElement, removeFocusedElement } from \"../../actions/MainNavigation/mainNavigationActions\";\nimport DropdownFilter from '../../components/MainNav/Toolbar/DropdownFilter/DropdownFilter';\nimport { bulkAction, getUsersList, handleAction } from '../../ControlPanelService/Users';\nimport * as MainNavigation from '../../actions/MainNavigation/mainNavigationActions';\nimport SearchInput from '../../components/MainNav/Toolbar/SearchInput/SearchInput';\nimport { addFavorite, deleteFavorite } from '../../ControlPanelService/Favorites';\nimport LeftButton from '../../components/MainNav/Toolbar/LeftButton/LeftButton';\nimport Checkbox from '../../components/MainNav/Toolbar/Checkbox/Checkbox';\nimport Select from '../../components/MainNav/Toolbar/Select/Select';\nimport Toolbar from '../../components/MainNav/Toolbar/Toolbar';\nimport Modal from '../../components/ControlPanel/Modal/Modal';\nimport { useDispatch, useSelector } from 'react-redux';\nimport Spinner from '../../components/Spinner/Spinner';\nimport User from '../../components/User/User';\nimport { Helmet } from 'react-helmet';\nimport './Users.scss';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport { useHistory } from 'react-router';\n\nconst Users = props => {\n const { userName, i18n } = useSelector(state => state.session);\n const { session } = useSelector(state => state.userSession);\n const { controlPanelFocusedElement } = useSelector(state => state.controlPanelContent);\n const { focusedElement } = useSelector(state => state.mainNavigation);\n const dispatch = useDispatch();\n const history = useHistory();\n const [loading, setLoading] = useState(false);\n const [modal, setModal] = useState({\n text: '',\n visible: false,\n actionUrl: ''\n });\n const [state, setState] = useState({\n users: [],\n userFav: [],\n toggledAll: false,\n sorting: i18n.Date,\n order: \"descending\",\n selection: [],\n totalAmount: ''\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/user/'));\n dispatch(removeFocusedElement());\n dispatch(removeControlPanelContentFocusedElement());\n fetchData().then(() => setLoading(false));\n\n return () => {\n dispatch(removeControlPanelContentFocusedElement());\n }\n }, []);\n\n useEffect(() => {\n window.addEventListener(\"keydown\", handleContentSelection);\n window.addEventListener(\"keydown\", handleFocusedElementShortcuts);\n window.addEventListener(\"keyup\", addNewObject);\n\n return () => {\n window.removeEventListener(\"keydown\", handleContentSelection);\n window.removeEventListener(\"keydown\", handleFocusedElementShortcuts);\n window.removeEventListener(\"keyup\", addNewObject);\n };\n }, [controlPanelFocusedElement, focusedElement, state.users]);\n\n const addNewObject = event => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus');\n\n if (isSearchInputFocused) {\n return;\n }\n\n if (event.keyCode === 65) {\n switch (history.location.pathname) {\n case '/list/user/': return session.look ? history.push('/add/web/') : history.push('/add/user/');\n default: break;\n }\n }\n }\n\n const fetchData = () => {\n setLoading(true);\n return new Promise((resolve, reject) => {\n getUsersList()\n .then(result => {\n setState({\n ...state,\n users: reformatData(result.data.data),\n userFav: result.data.userFav,\n totalAmount: result.data.totalAmount,\n toggledAll: false,\n selection: []\n });\n resolve();\n })\n .catch(err => console.error(err));\n });\n }\n\n const handleFocusedElementShortcuts = event => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus');\n\n if (controlPanelFocusedElement && !isSearchInputFocused) {\n switch (event.keyCode) {\n case 76: return handleLogin();\n case 83: return handleSuspend();\n case 8: return handleDelete();\n case 13: return handleEdit();\n default: break;\n }\n }\n }\n\n const handleLogin = () => {\n if (userName === controlPanelFocusedElement) {\n props.history.push('/logout');\n } else {\n props.history.push(`/login/?loginas=${controlPanelFocusedElement}`);\n }\n }\n\n const handleEdit = () => {\n props.history.push(`/edit/user?user=${controlPanelFocusedElement}`);\n }\n\n const handleSuspend = () => {\n const { users } = state;\n let currentUserData = users.filter(user => user.NAME === controlPanelFocusedElement)[0];\n let suspendedStatus = currentUserData.SUSPENDED === 'yes' ? 'unsuspend' : 'suspend';\n\n displayModal(currentUserData.spnd_conf, `/api/v1/${suspendedStatus}/user/index.php?user=${controlPanelFocusedElement}`);\n }\n\n const handleDelete = () => {\n const { users } = state;\n let currentUserData = users.filter(user => user.NAME === controlPanelFocusedElement)[0];\n\n displayModal(currentUserData.delete_conf, `/api/v1/delete/user/index.php?user=${controlPanelFocusedElement}`);\n }\n\n const handleContentSelection = event => {\n if (event.keyCode === 38 || event.keyCode === 40) {\n if (focusedElement) {\n dispatch(MainNavigation.removeFocusedElement());\n }\n }\n\n if (event.keyCode === 38) {\n event.preventDefault();\n handleArrowUp();\n } else if (event.keyCode === 40) {\n event.preventDefault();\n handleArrowDown();\n }\n }\n\n const initFocusedElement = users => {\n users[0]['FOCUSED'] = users[0]['NAME'];\n setState({ ...state, users });\n dispatch(addControlPanelContentFocusedElement(users[0]['NAME']));\n }\n\n const handleArrowDown = () => {\n let users = [...state.users];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(users);\n return;\n }\n\n let focusedElementPosition = users.findIndex(user => user.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== users.length - 1) {\n let nextFocusedElement = users[focusedElementPosition + 1];\n users[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, users });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleArrowUp = () => {\n let users = [...state.users];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(users);\n return;\n }\n\n let focusedElementPosition = users.findIndex(user => user.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== 0) {\n let nextFocusedElement = users[focusedElementPosition - 1];\n users[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, users });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const changeSorting = (sorting, order) => {\n setState({\n ...state,\n sorting,\n order\n });\n }\n\n const reformatData = data => {\n let users = [];\n\n for (let i in data) {\n data[i]['NAME'] = i;\n data[i]['isChecked'] = false;\n data[i]['FOCUSED'] = controlPanelFocusedElement === i;\n users.push(data[i]);\n }\n\n return users;\n }\n\n const users = () => {\n const userFav = { ...state.userFav };\n let users = [...state.users];\n\n users.forEach(user => {\n user.FOCUSED = controlPanelFocusedElement === user.NAME;\n\n if (userFav[user.NAME]) {\n user.STARRED = userFav[user.NAME];\n } else {\n user.STARRED = 0;\n }\n });\n\n let sortedResult = sortArray(users);\n\n return sortedResult.map((item, index) => {\n return <User data={item} key={index} toggleFav={toggleFav} checkItem={checkItem} handleModal={displayModal} />;\n });\n }\n\n const checkItem = name => {\n const { selection, users } = state;\n let duplicate = [...selection];\n let userDuplicate = [...users];\n let checkedItem = duplicate.indexOf(name);\n\n let incomingItem = userDuplicate.findIndex(user => user.NAME === name);\n userDuplicate[incomingItem].isChecked = !userDuplicate[incomingItem].isChecked;\n\n if (checkedItem !== -1) {\n duplicate.splice(checkedItem, 1);\n } else {\n duplicate.push(name);\n }\n\n setState({ ...state, users: userDuplicate, selection: duplicate });\n }\n\n const sortArray = array => {\n let sortingColumn = sortBy(state.sorting);\n\n if (state.order === \"descending\") {\n return array.sort((a, b) => (a[sortingColumn] < b[sortingColumn]) ? 1 : ((b[sortingColumn] < a[sortingColumn]) ? -1 : 0));\n } else {\n return array.sort((a, b) => (a[sortingColumn] > b[sortingColumn]) ? 1 : ((b[sortingColumn] > a[sortingColumn]) ? -1 : 0));\n }\n }\n\n const sortBy = sorting => {\n const { Date: date, Username, Disk, Bandwidth, Starred } = i18n;\n\n switch (sorting) {\n case date: return 'DATE';\n case Username: return 'NAME';\n case Disk: return 'U_DISK';\n case Bandwidth: return 'U_BANDWIDTH';\n case Starred: return 'STARRED';\n default: break;\n }\n }\n\n const toggleFav = (value, type) => {\n let userFavDuplicate = state.userFav;\n\n if (type === 'add') {\n userFavDuplicate[value] = 1;\n\n addFavorite(value, 'user')\n .then(() => {\n setState({ ...state, userFav: userFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n } else {\n userFavDuplicate[value] = undefined;\n\n deleteFavorite(value, 'user')\n .then(() => {\n setState({ ...state, userFav: userFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n }\n }\n\n const toggleAll = toggled => {\n const usersDuplicate = [...state.users];\n\n if (toggled) {\n let userNames = [];\n\n let users = usersDuplicate.map(user => {\n userNames.push(user.NAME);\n user.isChecked = true;\n return user;\n });\n\n setState({ ...state, users, selection: userNames, toggledAll: toggled });\n } else {\n let users = usersDuplicate.map(user => {\n user.isChecked = false;\n return user;\n });\n\n setState({ ...state, users, selection: [], toggledAll: toggled });\n }\n }\n\n const bulk = action => {\n if (state.selection.length && action) {\n setLoading(true);\n bulkAction(action, state.selection)\n .then(result => {\n if (result.status === 200) {\n toggleAll(false);\n fetchData().then(() => refreshMenuCounters());\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const displayModal = (text, url) => {\n setModal({\n ...modal,\n visible: true,\n text: text,\n actionUrl: url\n });\n }\n\n const modalConfirmHandler = () => {\n if (!modal.actionUrl) {\n return modalCancelHandler();\n }\n\n modalCancelHandler();\n setLoading(true);\n handleAction(modal.actionUrl)\n .then(res => {\n if (res.data.error) {\n setLoading(false);\n return displayModal(res.data.error, '');\n }\n fetchData().then(() => refreshMenuCounters())\n })\n .catch(err => { setLoading(false); console.error(err); });\n }\n\n const refreshMenuCounters = () => {\n dispatch(refreshCounters()).then(() => setLoading(false));\n }\n\n const modalCancelHandler = () => {\n setModal({\n ...modal,\n visible: false,\n text: '',\n actionUrl: ''\n });\n }\n\n return (\n <div>\n <Helmet>\n <title>{`Vesta - ${i18n.USER}`}</title>\n </Helmet>\n <Toolbar mobile={false} >\n <LeftButton\n name={session.look ? i18n['Add Web Domain'] : i18n['Add User']}\n href={session.look ? \"/add/web/\" : \"/add/user/\"}\n showLeftMenu={true} />\n <div className=\"r-menu\">\n <div className=\"input-group input-group-sm\">\n <Checkbox toggleAll={toggleAll} toggled={state.toggledAll} />\n <Select list='usersList' bulkAction={bulk} />\n <DropdownFilter changeSorting={changeSorting} sorting={state.sorting} order={state.order} list=\"usersList\" />\n <SearchInput handleSearchTerm={term => props.changeSearchTerm(term)} />\n </div>\n </div>\n </Toolbar>\n <div className=\"users-wrapper\">\n {loading\n ? <Spinner />\n : (<>\n {users()}\n <div className=\"total\">{state.totalAmount}</div>\n </>)}\n </div>\n <Modal\n onSave={modalConfirmHandler}\n onCancel={modalCancelHandler}\n show={modal.visible}\n text={modal.text} />\n </div>\n );\n}\n\nexport default Users;\n","import axios from \"axios\";\n\nconst BASE_URL = window.location.origin;\nconst webApiUri = '/api/v1/list/rrd/index.php';\n\nexport const getRrdList = () => {\n return axios.get(BASE_URL + webApiUri);\n}\n\nexport function generateImagePath(period, type, rrd) {\n return `/api/v1/list/rrd/image.php?/rrd/${type}/${period}-${rrd}.png`;\n}\n","import React, { useEffect, useState } from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport './Timer.scss';\n\nconst Timer = props => {\n const [isActive, setIsActive] = useState(true);\n\n useEffect(() => {\n let interval = null;\n\n if (isActive) {\n interval = setInterval(props.countDown, 1000);\n } else if (!isActive && props.time !== 0) {\n clearInterval(interval);\n }\n\n return () => clearInterval(interval);\n }, [isActive, props.time]);\n\n const handlePause = () => {\n setIsActive(!isActive);\n }\n\n return (\n <div className=\"timer-wrapper\">\n <button onClick={() => handlePause()}>\n {!isActive ? <FontAwesomeIcon icon=\"play\" /> : <FontAwesomeIcon icon=\"pause\" />}\n </button>\n <div className=\"circle-wrapper\">\n {/* <svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle class=\"stroke-1\" cx=\"15\" cy=\"15\" r=\"10\" fill=\"white\" style={{ strokeDashoffset: 9 + props.time * 4.2 }}></circle>\n </svg> */}\n <span className=\"seconds\">{props.time}</span>\n </div>\n </div>\n )\n}\n\nexport default Timer;","import React from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faFileDownload } from '@fortawesome/free-solid-svg-icons';\nimport Container from '../ControlPanel/Container/Container';\nimport { generateImagePath } from '../../ControlPanelService/RRD';\nimport './RRD.scss';\nimport { useSelector } from 'react-redux';\n\nconst RRD = props => {\n const { data } = props;\n const { i18n } = useSelector(state => state.session);\n\n const printDate = date => {\n let newDate = new Date(date);\n let day = newDate.getDate();\n let month = newDate.getMonth();\n let year = newDate.getFullYear();\n let months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n\n return <div className=\"date\">{day} &nbsp; {months[month]} &nbsp; {year}</div>;\n }\n\n return (\n <div className={data.FOCUSED ? 'rrd-item focused' : 'rrd-item'} id={data.NAME}>\n <Container className=\"l-col w-15\">\n {printDate(data.DATE)}\n </Container>\n <Container className=\"r-col w-85\">\n <div className=\"name\">{i18n[data.NAME]}</div>\n <div className=\"stats\">\n <Container className=\"w-100\">\n <div><img src={generateImagePath(props.period, data.TYPE, data.RRD)} alt=\"img\" /></div>\n </Container>\n </div>\n </Container>\n <div className=\"actions\">\n <div>\n <a className=\"link-download\" href={generateImagePath(props.period, data.TYPE, data.RRD)}>\n {i18n.download}\n <FontAwesomeIcon icon={faFileDownload} />\n </a>\n </div>\n </div>\n </div>\n );\n}\n\nexport default RRD;","import React, { useEffect, useState } from 'react';\nimport { addControlPanelContentFocusedElement, removeControlPanelContentFocusedElement } from '../../actions/ControlPanelContent/controlPanelContentActions';\nimport { addActiveElement, removeFocusedElement } from '../../actions/MainNavigation/mainNavigationActions';\nimport * as MainNavigation from '../../actions/MainNavigation/mainNavigationActions';\nimport SearchInput from '../../components/MainNav/Toolbar/SearchInput/SearchInput';\nimport Toolbar from '../../components/MainNav/Toolbar/Toolbar';\nimport { getRrdList } from '../../ControlPanelService/RRD';\nimport Spinner from '../../components/Spinner/Spinner';\nimport { useDispatch, useSelector } from 'react-redux';\nimport Timer from '../../components/RRD/Timer/Timer';\nimport RRD from '../../components/RRD/RRD';\nimport './RRDs.scss';\nimport { Helmet } from 'react-helmet';\n\nconst RRDs = props => {\n const { i18n } = useSelector(state => state.session);\n const { controlPanelFocusedElement } = useSelector(state => state.controlPanelContent);\n const { focusedElement } = useSelector(state => state.mainNavigation);\n const dispatch = useDispatch();\n const [data, setData] = useState([]);\n const [state, setState] = useState({\n period: 'daily',\n periodI18N: i18n.Daily,\n time: 15,\n loading: false,\n total: 0\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/rrd/'));\n dispatch(removeFocusedElement());\n dispatch(removeControlPanelContentFocusedElement());\n fetchData();\n\n return () => {\n dispatch(removeControlPanelContentFocusedElement());\n }\n }, []);\n\n useEffect(() => {\n window.addEventListener(\"keydown\", handleContentSelection);\n\n return () => {\n window.removeEventListener(\"keydown\", handleContentSelection);\n };\n }, [controlPanelFocusedElement, focusedElement, data]);\n\n const handleContentSelection = event => {\n if (event.keyCode === 38 || event.keyCode === 40) {\n if (focusedElement) {\n dispatch(MainNavigation.removeFocusedElement());\n }\n }\n\n if (event.keyCode === 38) {\n event.preventDefault();\n handleArrowUp();\n } else if (event.keyCode === 40) {\n event.preventDefault();\n handleArrowDown();\n }\n }\n\n const initFocusedElement = data => {\n data[0]['FOCUSED'] = data[0]['NAME'];\n setData(data);\n dispatch(addControlPanelContentFocusedElement(data[0]['NAME']));\n }\n\n const handleArrowDown = () => {\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(data);\n return;\n }\n\n let focusedElementPosition = data.findIndex(pack => pack.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== data.length - 1) {\n let nextFocusedElement = data[focusedElementPosition + 1];\n data[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setData(data);\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleArrowUp = () => {\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(data);\n return;\n }\n\n let focusedElementPosition = data.findIndex(pack => pack.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== 0) {\n let nextFocusedElement = data[focusedElementPosition - 1];\n data[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setData(data);\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const countDown = () => {\n if (state.time === 0) {\n fetchData();\n } else {\n setState({ ...state, time: state.time - 1 });\n }\n }\n\n const fetchData = () => {\n dispatch(removeControlPanelContentFocusedElement());\n\n setState({ ...state, loading: true });\n\n getRrdList()\n .then(result => {\n setData(reformatData(result.data.data));\n setState({ ...state, time: 15, loading: false });\n })\n .catch(err => console.error(err));\n }\n\n const reformatData = data => {\n let rrds = [];\n\n for (let i in data) {\n data[i]['NAME'] = data[i]['TITLE'];\n data[i]['FOCUSED'] = controlPanelFocusedElement === i;\n rrds.push(data[i]);\n }\n\n return rrds;\n }\n\n const rrds = () => {\n let dataDuplicate = [...data];\n\n dataDuplicate.forEach(rrd => {\n rrd.FOCUSED = controlPanelFocusedElement === rrd.NAME;\n });\n\n return dataDuplicate.map((item, index) => {\n return <RRD period={state.period} data={item} key={index} />;\n });\n }\n\n const printPeriods = () => {\n const periods = [i18n.Daily, i18n.Weekly, i18n.Monthly, i18n.Yearly];\n\n return periods.map(period => (<div className={periodClass(period)} onClick={() => changePeriod(period)}>{period}</div>));\n }\n\n const periodClass = period => {\n if (state.periodI18N === period) {\n return \"period active\";\n } else {\n return \"period\";\n }\n }\n\n const changePeriod = period => {\n switch (period) {\n case i18n.Daily: setState({ ...state, period: 'daily', periodI18N: i18n.Daily, time: 15 }); break;\n case i18n.Weekly: setState({ ...state, period: 'weekly', periodI18N: i18n.Weekly, time: 15 }); break;\n case i18n.Monthly: setState({ ...state, period: 'monthly', periodI18N: i18n.Monthly, time: 15 }); break;\n case i18n.Yearly: setState({ ...state, period: 'yearly', periodI18N: i18n.Yearly, time: 15 }); break;\n default: break;\n }\n }\n\n return (\n <div className=\"rrd-list\">\n <Helmet>\n <title>{`Vesta - ${i18n.RRD}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div className=\"periods-wrapper\">\n {printPeriods()}\n <Timer time={state.time} countDown={countDown} data={state.rrds} />\n </div>\n <SearchInput handleSearchTerm={term => props.changeSearchTerm(term)} />\n </Toolbar>\n <div className=\"rrd-wrapper\">\n {state.loading ? <Spinner /> : rrds()}\n </div>\n </div>\n );\n}\n\nexport default RRDs;","import React from 'react';\nimport ListItem from 'src/components/ControlPanel/ListItem/ListItem';\nimport Container from 'src/components/ControlPanel/Container/Container';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { useSelector } from 'react-redux';\n\nconst Ban = ({ data, ...props }) => {\n const { i18n } = useSelector(state => state.session);\n\n const checkItem = () => {\n props.checkItem(data.NAME);\n }\n\n const handleDelete = () => {\n props.handleModal(data.delete_confirmation, `/api/v1/delete/firewall/banlist/?ip=${data.NAME}&chain=${data.CHAIN}`);\n }\n\n return (\n <ListItem\n id={data.NAME}\n focused={data.FOCUSED}\n checked={data.isChecked}\n date={data.DATE}\n checkItem={checkItem}>\n <Container className=\"r-col w-85\">\n <div className=\"stats\">\n <Container className=\"c-1 w-35\">\n <div><b>{data.DATE}</b> &nbsp; {data.TIME}</div>\n </Container>\n <Container className=\"c-2 w-30\">\n <div></div>\n </Container>\n <Container className=\"c-2 w-30\">\n <div><b>{data.CHAIN}</b></div>\n </Container>\n <Container className=\"c-2 w-30\">\n <div><b>{data.NAME}</b></div>\n </Container>\n </div>\n </Container>\n <div className=\"actions\">\n <div>\n <button className=\"link-delete\" onClick={() => handleDelete()}>\n {i18n.Delete}\n {data.FOCUSED ? <span className=\"shortcut-button del\">Del</span> : <FontAwesomeIcon icon=\"times\" />}\n </button>\n </div>\n </div>\n </ListItem>\n );\n}\n\nexport default Ban;","import React, { useEffect, useState } from 'react';\nimport { addControlPanelContentFocusedElement, removeControlPanelContentFocusedElement } from 'src/actions/ControlPanelContent/controlPanelContentActions';\nimport { addActiveElement, removeFocusedElement } from 'src/actions/MainNavigation/mainNavigationActions';\nimport { bulkAction, getBanList, handleAction } from 'src/ControlPanelService/Firewalls';\nimport * as MainNavigation from 'src/actions/MainNavigation/mainNavigationActions';\nimport SearchInput from 'src/components/MainNav/Toolbar/SearchInput/SearchInput';\nimport LeftButton from 'src/components/MainNav/Toolbar/LeftButton/LeftButton';\nimport Checkbox from 'src/components/MainNav/Toolbar/Checkbox/Checkbox';\nimport Select from 'src/components/MainNav/Toolbar/Select/Select';\nimport Toolbar from 'src/components/MainNav/Toolbar/Toolbar';\nimport Modal from 'src/components/ControlPanel/Modal/Modal';\nimport { useDispatch, useSelector } from 'react-redux';\nimport Spinner from 'src/components/Spinner/Spinner';\nimport Ban from 'src/components/Firewall/Ban';\nimport { Helmet } from 'react-helmet';\nimport { useHistory } from 'react-router';\n\nimport './styles.scss';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\n\nconst BanLists = props => {\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const { controlPanelFocusedElement } = useSelector(state => state.controlPanelContent);\n const { focusedElement } = useSelector(state => state.mainNavigation);\n const dispatch = useDispatch();\n const [loading, setLoading] = useState(false);\n const [modal, setModal] = useState({\n text: '',\n visible: false,\n actionUrl: ''\n });\n const [state, setState] = useState({\n banIps: [],\n selection: [],\n toggledAll: false,\n sorting: i18n.Action,\n order: \"descending\",\n totalAmount: ''\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/firewall/'));\n dispatch(removeFocusedElement());\n dispatch(removeControlPanelContentFocusedElement());\n fetchData().then(() => setLoading(false));\n\n return () => {\n dispatch(removeControlPanelContentFocusedElement());\n }\n }, []);\n\n useEffect(() => {\n window.addEventListener(\"keydown\", handleContentSelection);\n window.addEventListener(\"keydown\", handleFocusedElementShortcuts);\n\n return () => {\n window.removeEventListener(\"keydown\", handleContentSelection);\n window.removeEventListener(\"keydown\", handleFocusedElementShortcuts);\n };\n }, [controlPanelFocusedElement, focusedElement, state.banIps]);\n\n const handleContentSelection = event => {\n if (event.keyCode === 38 || event.keyCode === 40) {\n if (focusedElement) {\n dispatch(MainNavigation.removeFocusedElement());\n }\n }\n\n if (event.keyCode === 38) {\n event.preventDefault();\n handleArrowUp();\n } else if (event.keyCode === 40) {\n event.preventDefault();\n handleArrowDown();\n }\n }\n\n const initFocusedElement = banIps => {\n banIps[0]['FOCUSED'] = banIps[0]['NAME'];\n setState({ ...state, banIps });\n dispatch(addControlPanelContentFocusedElement(banIps[0]['NAME']));\n }\n\n const handleArrowDown = () => {\n let banIps = [...state.banIps];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement.NAME === '') {\n initFocusedElement(banIps);\n return;\n }\n\n let focusedElementPosition = banIps.findIndex(banIp => banIp.NAME === controlPanelFocusedElement.NAME);\n\n if (focusedElementPosition !== banIps.length - 1) {\n let nextFocusedElement = banIps[focusedElementPosition + 1];\n banIps[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, banIps });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleArrowUp = () => {\n let banIps = [...state.banIps];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement.NAME === '') {\n initFocusedElement(banIps);\n return;\n }\n\n let focusedElementPosition = banIps.findIndex(banIp => banIp.NAME === controlPanelFocusedElement.NAME);\n\n if (focusedElementPosition !== 0) {\n let nextFocusedElement = banIps[focusedElementPosition - 1];\n banIps[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, banIps });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleFocusedElementShortcuts = event => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus');\n\n if (controlPanelFocusedElement && !isSearchInputFocused) {\n switch (event.keyCode) {\n case 8: return handleDelete();\n default: break;\n }\n }\n }\n\n const handleDelete = () => {\n const { banIps } = state;\n let currentBanIpData = banIps.filter(banIp => banIp.NAME === controlPanelFocusedElement.NAME)[0];\n\n displayModal(currentBanIpData.delete_conf, controlPanelFocusedElement.delete_url);\n }\n\n const fetchData = () => {\n setLoading(true);\n return new Promise((resolve, reject) => {\n getBanList()\n .then(result => {\n setState({\n ...state,\n banIps: reformatData(result.data.data),\n totalAmount: result.data.total_amount,\n toggledAll: false,\n selection: []\n });\n resolve();\n })\n .catch(err => console.error(err));\n });\n }\n\n const reformatData = data => {\n let banIps = [];\n\n for (let i in data) {\n data[i]['NAME'] = i;\n data[i]['FOCUSED'] = controlPanelFocusedElement.NAME === i;\n banIps.push(data[i]);\n }\n\n return banIps;\n }\n\n const banIps = () => {\n let banIps = [...state.banIps];\n\n banIps.forEach(banIp => {\n banIp.FOCUSED = controlPanelFocusedElement.NAME === banIp.NAME;\n });\n\n return banIps.map((item, index) => {\n return <Ban data={item} key={index} checkItem={checkItem} handleModal={displayModal} />;\n });\n }\n\n const checkItem = name => {\n const { selection, banIps } = state;\n let duplicate = [...selection];\n let banIpsDuplicate = banIps;\n let checkedItem = duplicate.indexOf(name);\n\n let incomingItem = banIpsDuplicate.findIndex(banIp => banIp.NAME === name);\n banIpsDuplicate[incomingItem].isChecked = !banIpsDuplicate[incomingItem].isChecked;\n\n if (checkedItem !== -1) {\n duplicate.splice(checkedItem, 1);\n } else {\n duplicate.push(name);\n }\n\n setState({ ...state, banIps: banIpsDuplicate, selection: duplicate });\n }\n\n const toggleAll = toggled => {\n if (toggled) {\n let banIpNames = [];\n\n let banIps = state.banIps.map(banIp => {\n banIpNames.push(banIp.NAME);\n banIp.isChecked = true;\n return banIp;\n });\n\n setState({ ...state, banIps, selection: banIpNames, toggledAll: toggled });\n } else {\n let banIps = state.banIps.map(banIp => {\n banIp.isChecked = false;\n return banIp;\n });\n\n setState({ ...state, banIps, selection: [], toggledAll: toggled });\n }\n }\n\n const bulk = action => {\n const { selection } = state;\n\n if (selection.length && action) {\n bulkAction(action, selection, state.banIps)\n .then(result => {\n if (result.status === 200) {\n toggleAll(false);\n fetchData();\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const displayModal = (text, actionUrl) => {\n setModal({ ...modal, visible: !modal.visible, text, actionUrl });\n }\n\n const modalConfirmHandler = () => {\n if (!modal.actionUrl) {\n return modalCancelHandler();\n }\n\n modalCancelHandler();\n setLoading(true);\n handleAction(modal.actionUrl)\n .then(res => {\n if (res.data.error) {\n setLoading(false);\n return displayModal(res.data.error, '');\n }\n fetchData();\n })\n .catch(err => { setLoading(false); console.error(err); });\n }\n\n const modalCancelHandler = () => {\n setModal({ ...modal, visible: !modal.visible, text: '', actionUrl: '' });\n }\n\n return (\n <div className=\"firewalls\">\n <Helmet>\n <title>{`Vesta - ${i18n.FIREWALL}`}</title>\n </Helmet>\n <Toolbar mobile={false} >\n <LeftButton href=\"/add/firewall/banlist\" name={i18n['Ban IP Address']} showLeftMenu={true} />\n <div className=\"r-menu\">\n <div className=\"input-group input-group-sm\">\n <Checkbox toggleAll={toggleAll} toggled={state.toggledAll} />\n <Select list='banList' bulkAction={bulk} />\n <SearchInput handleSearchTerm={term => props.changeSearchTerm(term)} />\n </div>\n </div>\n </Toolbar>\n {loading\n ? <Spinner />\n : (<>\n <div className=\"banlist-wrapper\">\n {banIps()}\n <div className=\"buttons-wrapper\">\n <div className=\"total\">{state.totalAmount}</div>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/firewall/')}>{i18n.Back}</button>\n </div>\n </div>\n </>)\n }\n <Modal\n onSave={modalConfirmHandler}\n onCancel={modalCancelHandler}\n show={modal.visible}\n text={modal.text} />\n </div>\n );\n}\n\nexport default BanLists;\n","import React from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Container from '../ControlPanel/Container/Container';\nimport ListItem from '../ControlPanel/ListItem/ListItem';\nimport { Link } from 'react-router-dom';\nimport './WebDomain.scss';\nimport { useSelector } from 'react-redux';\n\nexport default function WebDomain(props) {\n const { data } = props;\n const { i18n } = useSelector(state => state.session);\n\n const printStat = (stat, text) => {\n if (text === 'no' || text === '') {\n return <div className=\"crossed\">{stat}</div>;\n }\n\n return <div>{stat}: <span className=\"stat\">{text}</span></div>;\n }\n\n const toggleFav = (starred) => {\n if (starred) {\n props.toggleFav(data.NAME, 'add');\n } else {\n props.toggleFav(data.NAME, 'delete');\n }\n }\n\n const checkItem = () => {\n props.checkItem(data.NAME);\n }\n\n const renderProxySupport = () => {\n if (!data.PROXY_SYSTEM) return;\n\n if (data.PROXY_SUPPORT === 'no') {\n printStat(i18n['Proxy Support'], '');\n } else {\n printStat(i18n['Proxy Support'], data.PROXY_SUPPORT);\n }\n }\n\n const renderBackedSupport = () => {\n if (!data.WEB_BACKEND) return;\n\n if (data.BACKEND_SUPPORT === 'no') {\n printStat(i18n['Backend Support'] ?? 'Backend Support', '');\n } else {\n printStat(i18n['Backend Support'] ?? 'Backend Support', data.BACKEND_SUPPORT);\n }\n }\n\n const handleSuspend = () => {\n let suspendedStatus = data.SUSPENDED === 'yes' ? 'unsuspend' : 'suspend';\n props.handleModal(data.spnd_confirmation, `/api/v1/${suspendedStatus}/web/index.php?domain=${data.NAME}`);\n }\n\n const handleDelete = () => {\n props.handleModal(data.delete_confirmation, `/api/v1/delete/web/index.php?domain=${data.NAME}`);\n }\n\n return (\n <ListItem\n id={data.NAME}\n checked={data.isChecked}\n starred={data.STARRED}\n date={data.DATE}\n toggleFav={toggleFav}\n checkItem={checkItem}\n suspended={data.SUSPENDED === 'yes'}\n focused={data.FOCUSED} >\n <Container className=\"r-col w-85\">\n <div className=\"name\">\n <div>{data.NAME}</div>\n <div><span className=\"dns-name-span\">{data.ALIAS}</span></div>\n </div>\n <div>{data.IP}</div>\n <div className=\"stats\">\n <Container className=\"c-1 w-25\">\n <div className=\"bandwidth\">{i18n.Bandwidth} <span><span className=\"stat\">{data.U_BANDWIDTH_SIZE}</span>{data.U_BANDWIDTH_MEASURE}</span></div>\n <div className=\"disk\">{i18n.Disk}: <span><span className=\"stat\">{data.U_DISK_SIZE}</span>{data.U_DISK_MEASURE}</span></div>\n </Container>\n <Container className=\"c-2 w-45\">\n <div>{i18n['Web Template']}: <span className=\"stat\">{data.TPL}</span></div>\n {data.SSL === 'no'\n ? printStat(i18n['SSL Support'], '')\n : printStat(i18n['SSL Support'], data.LETSENCRYPT === 'yes' ? i18n['Lets Encrypt'] : i18n[data.SSL])}\n {printStat(i18n['Web Statistics'], data.WEB_STATS)}\n </Container>\n <Container className=\"c-3 w-35\">\n {renderProxySupport()}\n {data.PROXY_SYSTEM && printStat(i18n['Proxy Template'] ?? 'Proxy Template', data.PROXY)}\n {renderBackedSupport()}\n {data.WEB_BACKEND && printStat(i18n['Backend Template'] ?? 'Backend Template', data.BACKEND)}\n {printStat(i18n['Additional FTP Account'], data.FTP)}\n </Container>\n </div>\n </Container>\n <div className=\"actions\">\n <div>\n <Link className=\"link-edit\" to={`/edit/web?domain=${data.NAME}`}>\n {i18n.edit}\n {data.FOCUSED ? <span className=\"shortcut-button html-unicode\">&#8617;</span> : <FontAwesomeIcon icon=\"pen\" />}\n </Link>\n </div>\n <div>\n <Link className=\"link-gray\" to={`/list/web-log?domain=${data.NAME}&type=access`}>\n {i18n['view logs']}\n {data.FOCUSED ? <span className=\"shortcut-button\">L</span> : <FontAwesomeIcon icon=\"list\" />}\n </Link>\n </div>\n {\n data.STATS && (\n <div>\n <a className=\"link-gray\" href={`http://${data.NAME}/vstats/`} target=\"_blank\" rel=\"noopener noreferrer\">\n {i18n['open webstats']}\n {data.FOCUSED ? <span className=\"shortcut-button\">L</span> : <FontAwesomeIcon icon=\"list\" />}\n </a>\n </div>\n )\n }\n <div>\n <button\n className=\"link-gray\"\n onClick={handleSuspend}>\n {i18n[data.spnd_action]}\n {data.FOCUSED ? <span className=\"shortcut-button\">S</span> : <FontAwesomeIcon icon={data.SUSPENDED === 'yes' ? 'unlock' : 'lock'} />}\n </button>\n </div>\n <div>\n <button className=\"link-delete\" onClick={handleDelete}>\n {i18n.Delete}\n {data.FOCUSED ? <span className=\"shortcut-button del\">Del</span> : <FontAwesomeIcon icon=\"times\" />}\n </button>\n </div>\n </div>\n </ListItem>\n );\n}\n","import React, { useState, useEffect } from 'react';\nimport { addControlPanelContentFocusedElement, removeControlPanelContentFocusedElement } from '../../actions/ControlPanelContent/controlPanelContentActions';\nimport { addActiveElement, removeFocusedElement } from '../../actions/MainNavigation/mainNavigationActions';\nimport DropdownFilter from '../../components/MainNav/Toolbar/DropdownFilter/DropdownFilter';\nimport { bulkAction, getWebList, handleAction } from '../../ControlPanelService/Web';\nimport * as MainNavigation from '../../actions/MainNavigation/mainNavigationActions';\nimport SearchInput from '../../components/MainNav/Toolbar/SearchInput/SearchInput';\nimport { addFavorite, deleteFavorite } from '../../ControlPanelService/Favorites';\nimport LeftButton from '../../components/MainNav/Toolbar/LeftButton/LeftButton';\nimport Checkbox from '../../components/MainNav/Toolbar/Checkbox/Checkbox';\nimport Select from '../../components/MainNav/Toolbar/Select/Select';\nimport Toolbar from '../../components/MainNav/Toolbar/Toolbar';\nimport WebDomain from '../../components/WebDomain/WebDomain';\nimport Spinner from '../../components/Spinner/Spinner';\nimport Modal from '../../components/ControlPanel/Modal/Modal';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { Helmet } from 'react-helmet';\nimport './Web.scss';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\n\nconst Web = props => {\n const { i18n } = useSelector(state => state.session);\n const { controlPanelFocusedElement } = useSelector(state => state.controlPanelContent);\n const { focusedElement } = useSelector(state => state.mainNavigation);\n const dispatch = useDispatch();\n const [loading, setLoading] = useState(false);\n const [modal, setModal] = useState({\n text: '',\n visible: false,\n actionUrl: ''\n });\n const [state, setState] = useState({\n webDomains: [],\n webFav: [],\n toggledAll: false,\n sorting: i18n.Date,\n order: \"descending\",\n selection: [],\n totalAmount: ''\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/web/'));\n dispatch(removeFocusedElement());\n dispatch(removeControlPanelContentFocusedElement());\n fetchData().then(() => setLoading(false));\n\n return () => {\n dispatch(removeControlPanelContentFocusedElement());\n }\n }, []);\n\n useEffect(() => {\n window.addEventListener(\"keydown\", handleContentSelection);\n window.addEventListener(\"keydown\", handleFocusedElementShortcuts);\n\n return () => {\n window.removeEventListener(\"keydown\", handleContentSelection);\n window.removeEventListener(\"keydown\", handleFocusedElementShortcuts);\n };\n }, [controlPanelFocusedElement, focusedElement, state.webDomains]);\n\n const handleContentSelection = event => {\n if (event.keyCode === 38 || event.keyCode === 40) {\n if (focusedElement) {\n dispatch(MainNavigation.removeFocusedElement());\n }\n }\n\n if (event.keyCode === 38) {\n event.preventDefault();\n handleArrowUp();\n } else if (event.keyCode === 40) {\n event.preventDefault();\n handleArrowDown();\n }\n }\n\n const initFocusedElement = webDomains => {\n webDomains[0]['FOCUSED'] = webDomains[0]['NAME'];\n setState({ ...state, webDomains });\n dispatch(addControlPanelContentFocusedElement(webDomains[0]['NAME']));\n }\n\n const handleArrowDown = () => {\n let webDomains = [...state.webDomains];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(webDomains);\n return;\n }\n\n let focusedElementPosition = webDomains.findIndex(webDomain => webDomain.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== webDomains.length - 1) {\n let nextFocusedElement = webDomains[focusedElementPosition + 1];\n webDomains[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, webDomains });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleArrowUp = () => {\n let webDomains = [...state.webDomains];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(webDomains);\n return;\n }\n\n let focusedElementPosition = webDomains.findIndex(webDomain => webDomain.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== 0) {\n let nextFocusedElement = webDomains[focusedElementPosition - 1];\n webDomains[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, webDomains });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleFocusedElementShortcuts = event => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus');\n\n if (controlPanelFocusedElement && !isSearchInputFocused) {\n switch (event.keyCode) {\n case 76: return handleLogs();\n case 83: return handleSuspend();\n case 8: return handleDelete();\n case 13: return handleEdit();\n default: break;\n }\n }\n }\n\n const handleLogs = () => {\n props.history.push(`/list/web-log?domain=${controlPanelFocusedElement}&type=access`);\n }\n\n const handleEdit = () => {\n props.history.push(`/edit/web?domain=${controlPanelFocusedElement}`);\n }\n\n const handleSuspend = () => {\n const { webDomains } = state;\n let currentWebDomainData = webDomains.filter(webDomain => webDomain.NAME === controlPanelFocusedElement)[0];\n let suspendedStatus = currentWebDomainData.SUSPENDED === 'yes' ? 'unsuspend' : 'suspend';\n\n displayModal(currentWebDomainData.spnd_confirmation, `/api/v1/${suspendedStatus}/web/index.php?domain=${controlPanelFocusedElement}`);\n }\n\n const handleDelete = () => {\n const { webDomains } = state;\n let currentWebDomainData = webDomains.filter(webDomain => webDomain.NAME === controlPanelFocusedElement)[0];\n\n displayModal(currentWebDomainData.delete_confirmation, `/api/v1/web/index.php?domain=${controlPanelFocusedElement}`);\n }\n\n const fetchData = () => {\n setLoading(true);\n return new Promise((resolve, reject) => {\n getWebList()\n .then(result => {\n setState({\n ...state,\n webDomains: reformatData(result.data.data),\n webFav: result.data.webFav,\n totalAmount: result.data.totalAmount,\n toggledAll: false,\n selection: []\n });\n resolve();\n })\n .catch(err => console.error(err));\n });\n }\n\n const changeSorting = (sorting, order) => {\n setState({\n ...state,\n sorting,\n order\n });\n }\n\n const reformatData = data => {\n let webDomains = [];\n\n for (let i in data) {\n data[i]['NAME'] = i;\n data[i]['FOCUSED'] = controlPanelFocusedElement === i;\n webDomains.push(data[i]);\n }\n\n return webDomains;\n }\n\n const webDomains = () => {\n const webFav = { ...state.webFav };\n let webDomains = [...state.webDomains];\n\n webDomains.forEach(webDomain => {\n webDomain.FOCUSED = controlPanelFocusedElement === webDomain.NAME;\n\n if (webFav[webDomain.NAME]) {\n webDomain.STARRED = webFav[webDomain.NAME];\n } else {\n webDomain.STARRED = 0;\n }\n });\n\n let sortedResult = sortArray(webDomains);\n\n return sortedResult.map((item, index) => {\n return <WebDomain data={item} key={index} toggleFav={toggleFav} checkItem={checkItem} handleModal={displayModal} />;\n });\n }\n\n const checkItem = name => {\n let duplicate = [...state.selection];\n let webDomainsDuplicate = state.webDomains;\n let checkedItem = duplicate.indexOf(name);\n\n let incomingItem = webDomainsDuplicate.findIndex(webDomain => webDomain.NAME === name);\n webDomainsDuplicate[incomingItem].isChecked = !webDomainsDuplicate[incomingItem].isChecked;\n\n if (checkedItem !== -1) {\n duplicate.splice(checkedItem, 1);\n } else {\n duplicate.push(name);\n }\n\n setState({ ...state, webDomains: webDomainsDuplicate, selection: duplicate });\n }\n\n const sortArray = array => {\n let sortingColumn = sortBy(state.sorting);\n\n if (state.order === \"descending\") {\n return array.sort((a, b) => (a[sortingColumn] < b[sortingColumn]) ? 1 : ((b[sortingColumn] < a[sortingColumn]) ? -1 : 0));\n } else {\n return array.sort((a, b) => (a[sortingColumn] > b[sortingColumn]) ? 1 : ((b[sortingColumn] > a[sortingColumn]) ? -1 : 0));\n }\n }\n\n const sortBy = sorting => {\n const { Date: date, Domain, Disk, Bandwidth, Starred } = i18n;\n\n switch (sorting) {\n case date: return 'DATE';\n case Domain: return 'ALIAS';\n case i18n['IP Addresses']: return 'IP';\n case Disk: return 'U_DISK';\n case Bandwidth: return 'U_BANDWIDTH';\n case Starred: return 'STARRED';\n default: break;\n }\n }\n\n const toggleFav = (value, type) => {\n let webFavDuplicate = state.webFav;\n\n if (type === 'add') {\n webFavDuplicate[value] = 1;\n\n addFavorite(value, 'web')\n .then(() => {\n setState({ ...state, webFav: webFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n } else {\n webFavDuplicate[value] = undefined;\n\n deleteFavorite(value, 'web')\n .then(() => {\n setState({ ...state, webFav: webFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n }\n }\n\n const toggleAll = toggled => {\n const webDomainsDuplicate = [...state.webDomains];\n\n if (toggled) {\n let webDomainNames = [];\n\n let webDomains = webDomainsDuplicate.map(webDomain => {\n webDomainNames.push(webDomain.NAME);\n webDomain.isChecked = true;\n return webDomain;\n });\n\n setState({ ...state, webDomains, selection: webDomainNames, toggledAll: toggled });\n } else {\n let webDomains = webDomainsDuplicate.map(webDomain => {\n webDomain.isChecked = false;\n return webDomain;\n });\n\n setState({ ...state, webDomains, selection: [], toggledAll: toggled });\n }\n }\n\n const bulk = action => {\n if (state.selection.length && action) {\n setLoading(true);\n bulkAction(action, state.selection)\n .then(result => {\n toggleAll(false);\n fetchData().then(() => refreshMenuCounters());\n })\n .catch(err => console.error(err));\n }\n }\n\n const displayModal = (text, url) => {\n setModal({\n ...modal,\n visible: true,\n text,\n actionUrl: url\n });\n }\n\n const modalConfirmHandler = () => {\n if (!modal.actionUrl) {\n return modalCancelHandler();\n }\n\n modalCancelHandler();\n setLoading(true);\n handleAction(modal.actionUrl)\n .then(res => {\n if (res.data.error) {\n setLoading(false);\n return displayModal(res.data.error, '');\n }\n fetchData().then(() => refreshMenuCounters())\n })\n .catch(err => { setLoading(false); console.error(err); });\n }\n\n const refreshMenuCounters = () => {\n dispatch(refreshCounters()).then(() => setLoading(false));\n }\n\n const modalCancelHandler = () => {\n setModal({\n ...modal,\n visible: false,\n text: '',\n actionUrl: ''\n });\n }\n\n return (\n <div className=\"web\">\n <Helmet>\n <title>{`Vesta - ${i18n.WEB}`}</title>\n </Helmet>\n <Toolbar mobile={false} >\n <LeftButton name={i18n['Add Web Domain']} href=\"/add/web/\" showLeftMenu={true} />\n <div className=\"r-menu\">\n <div className=\"input-group input-group-sm\">\n <Checkbox toggleAll={toggleAll} toggled={state.toggledAll} />\n <Select list='webList' bulkAction={bulk} />\n <DropdownFilter changeSorting={changeSorting} sorting={state.sorting} order={state.order} list=\"webList\" />\n <SearchInput handleSearchTerm={term => props.changeSearchTerm(term)} />\n </div>\n </div>\n </Toolbar>\n <div className=\"web-domains-wrapper\">\n {loading\n ? <Spinner />\n : (\n <>\n {webDomains()}\n <div className=\"total\">{state.totalAmount}</div>\n </>\n )\n }\n </div>\n <Modal\n onSave={modalConfirmHandler}\n onCancel={modalCancelHandler}\n show={modal.visible}\n text={modal.text} />\n </div>\n );\n}\n\nexport default Web;","import axios from \"axios\";\nimport { getAuthToken } from \"src/utils/token\";\n\nconst BASE_URL = window.location.origin;\nconst webApiUri = '/api/v1/search/';\n\nexport const getSearchResultsList = term => {\n return axios.get(BASE_URL + webApiUri + '?q=' + term);\n}\n\nexport const handleAction = uri => {\n return axios.get(BASE_URL + uri, {\n params: {\n token: getAuthToken()\n }\n });\n}\n","import React from 'react';\nimport { loginAs, logout } from 'src/actions/Session/sessionActions';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Container from '../ControlPanel/Container/Container';\nimport ListItem from '../ControlPanel/ListItem/ListItem';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { Link, useHistory } from 'react-router-dom';\nimport './SearchItem.scss';\n\nconst SearchItem = ({ data, handleModal }) => {\n const { i18n, userName } = useSelector(state => state.session);\n const dispatch = useDispatch();\n const history = useHistory()\n\n const signInAs = user => {\n dispatch(loginAs(user)).then(() => history.push('/'));\n }\n\n const signOut = () => {\n dispatch(logout()).then(() => history.push('/'));\n }\n\n const handleDelete = () => {\n handleModal(data.delete_confirmation, `/api/v1/${data.TYPE === 'user' ? `/api/v1/delete/user/index.php?user=${data.USER}` : data.delete_link}`);\n }\n\n const handleSuspend = () => {\n handleModal(data.spnd_confirmation, `/api/v1/${data.TYPE === 'user' ? `${data.spnd_action}/user/index.php?user=${data.USER}` : data.spnd_link}`);\n }\n\n const printLoginActionButton = () => {\n if (data.TYPE !== 'user') return;\n\n if (userName === data.USER) {\n return (\n <div>\n <button onClick={signOut}>{i18n['Log out']}\n {data.FOCUSED ? <span className=\"shortcut-button\">L</span> : <FontAwesomeIcon icon=\"user-lock\" />}\n </button>\n </div>\n );\n } else {\n return (\n <div>\n <button onClick={() => signInAs(data.USER)}>{i18n['login as']} {data.USER}\n {data.FOCUSED ? <span className=\"shortcut-button\">L</span> : <FontAwesomeIcon icon=\"user-lock\" />}\n </button>\n </div>\n );\n }\n }\n\n return (\n <ListItem date={data.DATE} suspended={data.SUSPENDED === 'yes'}>\n <Container className=\"search-list r-col w-85\">\n <div className=\"name\">{data.RESULT}</div>\n <div className=\"stats\">\n <Container className=\"c-1\">\n <div className=\"object\">{data.TYPE === 'user' ? i18n['USER'] : i18n[data.object]}</div>\n </Container>\n <Container className=\"c-2\">\n <div className=\"owner\">{i18n.Owner}: <span>{data.USER}</span></div>\n </Container>\n <Container className=\"c-3\">\n <div className=\"status\">{i18n.Status}: <span>{data.status}</span></div>\n </Container>\n </div>\n </Container>\n <div className=\"actions\">\n {printLoginActionButton()}\n <div><Link className=\"link-edit\" to={data.edit_link}>{i18n.edit} <FontAwesomeIcon icon=\"pen\" /></Link></div>\n <div>\n <button\n className=\"link-gray\"\n onClick={handleSuspend}>\n {data.spnd_action}\n <FontAwesomeIcon icon={data.SUSPENDED === 'yes' ? 'unlock' : 'lock'} />\n </button>\n </div>\n <div>\n <button\n className=\"link-delete\"\n onClick={handleDelete}>\n {i18n.Delete}\n <FontAwesomeIcon icon=\"times\" />\n </button>\n </div>\n </div>\n </ListItem>\n );\n}\n\nexport default SearchItem;\n","import React, { Component, useEffect, useState } from 'react';\nimport DropdownFilter from '../../components/MainNav/Toolbar/DropdownFilter/DropdownFilter';\nimport { getSearchResultsList, handleAction } from '../../ControlPanelService/Search';\nimport SearchInput from '../../components/MainNav/Toolbar/SearchInput/SearchInput';\nimport SearchItem from '../../components/Searchitem/SearchItem';\nimport Toolbar from '../../components/MainNav/Toolbar/Toolbar';\nimport Modal from '../../components/ControlPanel/Modal/Modal';\nimport Spinner from '../../components/Spinner/Spinner';\nimport './Search.scss';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { useHistory } from 'react-router-dom';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\n\nconst Search = props => {\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [loading, setLoading] = useState(false);\n const [state, setState] = useState({\n searchResults: [],\n totalAmount: '',\n sorting: i18n.Date,\n order: \"descending\",\n total: 0\n });\n const [modal, setModal] = useState({\n visible: false,\n text: '',\n actionUrl: ''\n });\n\n useEffect(() => {\n const { search } = history.location;\n\n if (search) {\n let searchTerm = search.split('=')[1];\n\n if (searchTerm !== '') {\n fetchData(searchTerm).then(() => setLoading(false));\n } else {\n return history.push({ pathname: '/list/user/', search: '' });\n }\n } else if (props.searchTerm !== '') {\n fetchData(props.searchTerm).then(() => setLoading(false));\n } else {\n return history.push({ pathname: '/list/user/', search: '' });\n }\n }, []);\n\n const fetchData = searchTerm => {\n setLoading(true);\n return new Promise((resolve, reject) => {\n getSearchResultsList(searchTerm)\n .then(result => {\n setState({\n ...state,\n searchResults: result.data.data,\n totalAmount: result.data.total\n });\n resolve();\n })\n .catch(err => console.error(err));\n });\n }\n\n const searchResults = () => {\n const { searchResults } = state;\n const result = [];\n\n for (let i in searchResults) {\n result.push(searchResults[i]);\n }\n\n let sortedResult = sortArray(result);\n\n return sortedResult.map((item, index) => {\n return <SearchItem data={item} key={index} handleModal={displayModal} />;\n });\n }\n\n const changeSorting = (sorting, order) => {\n setState({\n ...state,\n sorting,\n order\n });\n }\n\n const sortArray = array => {\n const { order, sorting } = state;\n let sortBy = sortByHandler(sorting);\n\n if (order === \"descending\") {\n return array.sort((a, b) => (a[sortBy] < b[sortBy]) ? 1 : ((b[sortBy] < a[sortBy]) ? -1 : 0));\n } else {\n return array.sort((a, b) => (a[sortBy] > b[sortBy]) ? 1 : ((b[sortBy] > a[sortBy]) ? -1 : 0));\n }\n }\n\n const sortByHandler = sorting => {\n const { Date, Name, Starred } = i18n;\n\n switch (sorting) {\n case Date: return 'DATE';\n case Name: return 'RESULT';\n default: break;\n }\n }\n\n const displayModal = (text, url) => {\n setModal({\n ...modal,\n visible: !modal.visible,\n text,\n actionUrl: url\n });\n }\n\n const modalConfirmHandler = () => {\n if (!modal.actionUrl) {\n return modalCancelHandler();\n }\n\n modalCancelHandler();\n setLoading(true);\n handleAction(modal.actionUrl)\n .then(res => {\n if (res.data.error) {\n setLoading(false);\n return displayModal(res.data.error, '');\n }\n fetchData().then(() => refreshMenuCounters())\n })\n .catch(err => { setLoading(false); console.error(err); });\n }\n\n const refreshMenuCounters = () => {\n dispatch(refreshCounters()).then(() => setLoading(false));\n }\n\n const modalCancelHandler = () => {\n setModal({\n ...modal,\n visible: false,\n text: '',\n actionUrl: ''\n });\n }\n\n return (\n <div className=\"logs-list\">\n <Toolbar mobile={false}>\n <div className=\"search-toolbar-name\">{i18n['Search Results']}</div>\n <div className=\"search-toolbar-right\">\n <DropdownFilter changeSorting={changeSorting} sorting={state.sorting} order={state.order} list=\"searchList\" />\n <SearchInput handleSearchTerm={term => props.changeSearchTerm(term)} />\n </div>\n </Toolbar>\n <div className=\"statistics-wrapper\">\n {loading\n ? <Spinner />\n : (<>\n {searchResults()}\n <div className=\"total\">{state.totalAmount}</div>\n </>)}\n </div>\n <Modal\n onSave={modalConfirmHandler}\n onCancel={modalCancelHandler}\n show={modal.visible}\n text={modal.text} />\n </div>\n );\n}\n\nexport default Search;\n","import axios from \"axios\";\n\nconst BASE_URL = window.location.origin;\nconst webApiUri = '/api/v1/list/log/index.php';\n\nexport const getLogsList = () => {\n return axios.get(BASE_URL + webApiUri);\n}","import React from 'react';\nimport Container from '../ControlPanel/Container/Container';\nimport './Log.scss';\n\nconst Log = props => {\n const { data } = props;\n\n const printDate = date => {\n let newDate = new Date(date);\n let day = newDate.getDate();\n let month = newDate.getMonth();\n let year = newDate.getFullYear();\n let months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n\n return <div className=\"date\">{day} &nbsp; {months[month]} &nbsp; {year}</div>;\n }\n\n return (\n <div className={data.FOCUSED ? 'statistic-item focused' : 'statistic-item'} id={data.NAME}>\n <Container className=\"l-col w-15\">\n {printDate(data.DATE)}\n {data.TIME}\n </Container>\n <Container className=\"r-col w-85\">\n <div className=\"name\">{data.CMD}</div>\n </Container>\n </div>\n );\n}\n\nexport default Log;","import React, { useEffect, useState } from 'react';\nimport { addControlPanelContentFocusedElement, removeControlPanelContentFocusedElement } from '../../actions/ControlPanelContent/controlPanelContentActions';\nimport { addActiveElement, removeFocusedElement } from '../../actions/MainNavigation/mainNavigationActions';\nimport * as MainNavigation from '../../actions/MainNavigation/mainNavigationActions';\nimport SearchInput from '../../components/MainNav/Toolbar/SearchInput/SearchInput';\nimport LeftButton from '../../components/MainNav/Toolbar/LeftButton/LeftButton';\nimport Toolbar from '../../components/MainNav/Toolbar/Toolbar';\nimport { getLogsList } from '../../ControlPanelService/Logs';\nimport Spinner from '../../components/Spinner/Spinner';\nimport { useDispatch, useSelector } from 'react-redux';\nimport Log from '../../components/Log/Log';\nimport './Logs.scss';\nimport { Helmet } from 'react-helmet';\n\nconst Logs = props => {\n const { i18n } = useSelector(state => state.session);\n const { controlPanelFocusedElement } = useSelector(state => state.controlPanelContent);\n const { focusedElement } = useSelector(state => state.mainNavigation);\n const dispatch = useDispatch();\n const [state, setState] = useState({\n logs: [],\n totalAmount: '',\n loading: false,\n total: 0\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/log/'));\n dispatch(removeFocusedElement());\n dispatch(removeControlPanelContentFocusedElement());\n fetchData();\n\n return () => {\n dispatch(removeControlPanelContentFocusedElement());\n }\n }, []);\n\n useEffect(() => {\n window.addEventListener(\"keydown\", handleContentSelection);\n\n return () => {\n window.removeEventListener(\"keydown\", handleContentSelection);\n };\n }, [controlPanelFocusedElement, focusedElement, state.logs]);\n\n const handleContentSelection = event => {\n if (event.keyCode === 38 || event.keyCode === 40) {\n if (focusedElement) {\n dispatch(MainNavigation.removeFocusedElement());\n }\n }\n\n if (event.keyCode === 38) {\n event.preventDefault();\n handleArrowUp();\n } else if (event.keyCode === 40) {\n event.preventDefault();\n handleArrowDown();\n }\n }\n\n const initFocusedElement = logs => {\n logs[0]['FOCUSED'] = logs[0]['NAME'];\n setState({ ...state, logs });\n dispatch(addControlPanelContentFocusedElement(logs[0]['NAME']));\n }\n\n const handleArrowDown = () => {\n let logs = [...state.logs];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(logs);\n return;\n }\n\n let focusedElementPosition = logs.findIndex(log => log.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== logs.length - 1) {\n let nextFocusedElement = logs[focusedElementPosition + 1];\n logs[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, logs });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleArrowUp = () => {\n let logs = [...state.logs];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(logs);\n return;\n }\n\n let focusedElementPosition = logs.findIndex(log => log.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== 0) {\n let nextFocusedElement = logs[focusedElementPosition - 1];\n logs[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, logs });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const fetchData = () => {\n setState({ ...state, loading: true });\n\n getLogsList()\n .then(result => {\n setState({\n logs: reformatData(result.data.data),\n totalAmount: result.data.totalAmount,\n loading: false\n });\n })\n .catch(err => console.error(err));\n }\n\n const reformatData = data => {\n let logs = [];\n\n for (let i in data) {\n data[i]['NAME'] = i;\n data[i]['FOCUSED'] = controlPanelFocusedElement === i;\n logs.push(data[i]);\n }\n\n return logs;\n }\n\n const logs = () => {\n let logs = [...state.logs];\n\n logs.forEach(log => {\n log.FOCUSED = controlPanelFocusedElement === log.NAME;\n });\n\n return logs.map((item, index) => {\n return <Log data={item} key={index} />;\n });\n }\n\n return (\n <div className=\"logs-list\">\n <Helmet>\n <title>{`Vesta - ${i18n.LOG}`}</title>\n </Helmet>\n <Toolbar mobile={false} className=\"justify-right\">\n <LeftButton name=\"Add Cron Job\" showLeftMenu={false} />\n <div className=\"r-menu\">\n <div className=\"input-group input-group-sm\">\n <SearchInput handleSearchTerm={term => props.changeSearchTerm(term)} />\n </div>\n </div>\n </Toolbar>\n <div className=\"logs-wrapper\">\n {state.loading ? <Spinner /> : logs()}\n </div>\n <div className=\"total\">{state.totalAmount}</div>\n </div>\n );\n}\n\nexport default Logs;","import React, { useEffect, useState } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { addActiveElement, removeFocusedElement } from \"../../actions/MainNavigation/mainNavigationActions\";\nimport EditInternetProtocol from '../../components/InternetProtocol/Edit/EditInternetProtocol';\nimport AddInternetProtocol from '../../components/InternetProtocol/Add/AddInternetProtocol';\nimport EditServerNginx from 'src/components/Server/Edit/Nginx/EditServerNginx';\nimport Postgresql from 'src/components/Server/Edit/Postgresql/Postgresql';\nimport EditBackupExclusions from 'src/components/Backup/Exclusion/Edit';\nimport { Route, Switch, Redirect, useHistory } from \"react-router-dom\";\nimport InternetProtocols from '../InternetProtocols/InternetProtocols';\nimport AddWebDomain from '../../components/WebDomain/Add/AddWebDomain';\nimport EditDatabase from '../../components/Database/Edit/EditDatabase';\nimport EditFirewall from '../../components/Firewall/Edit/EditFirewall';\nimport Hotkeys from '../../components/ControlPanel/Hotkeys/Hotkeys';\nimport AddDatabase from '../../components/Database/Add/AddDatabase';\nimport AddFirewall from '../../components/Firewall/Add/AddFirewall';\nimport EditCronJob from '../../components/CronJob/Edit/EditCronJob';\nimport EditPackage from '../../components/Package/Edit/EditPackage';\nimport EditHttpd from 'src/components/Server/Edit/Httpd/EditHttpd';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport AddCronJob from '../../components/CronJob/Add/AddCronJob';\nimport AddPackage from '../../components/Package/Add/AddPackage';\nimport EditServer from '../../components/Server/Edit/EditServer';\nimport Dovecot from 'src/components/Server/Edit/Dovecot/Dovecot';\nimport EditMailWrapper from '../EditMailWrapper/EditMailWrapper';\nimport Service from 'src/components/Server/Edit/Service/Service';\nimport AddMailWrapper from '../AddMailWrapper/AddMailWrapper';\nimport EditDNSWrapper from '../EditDNSWrapper/EditDNSWrapper';\nimport EditWeb from '../../components/WebDomain/Edit/EditWeb';\nimport EditPhp from 'src/components/Server/Edit/PHP/EditPhp';\nimport Databases from '../../containers/Databases/Databases';\nimport Firewalls from '../../containers/Firewalls/Firewalls';\nimport EditUser from '../../components/User/Edit/EditUser';\nimport Bind9 from 'src/components/Server/Edit/Bind9/Bind9';\nimport Mysql from 'src/components/Server/Edit/Mysql/Mysql';\nimport AddDNSWrapper from '../AddDNSWrapper/AddDNSWrapper';\nimport BackupWrapper from '../BackupWrapper/BackupWrapper';\nimport AddBanIP from 'src/components/Firewall/Add/Banlist';\nimport CronJobs from '../../containers/CronJobs/CronJobs';\nimport Packages from '../../containers/Packages/Packages';\nimport { services } from 'src/ControlPanelService/Server';\nimport AddUser from '../../components/User/Add/AddUser';\nimport Updates from '../../containers/Updates/Updates';\nimport Servers from '../../containers/Servers/Servers';\nimport MainNav from '../../components/MainNav/MainNav';\nimport BackupExclusions from '../Backups/Exclusions';\nimport MailWrapper from '../MailWrapper/MailWrapper';\nimport Spinner from 'src/components/Spinner/Spinner';\nimport DNSWrapper from '../DNSWrapper/DNSWrapper';\nimport Statistics from '../Statistics/Statistics';\nimport Users from '../../containers/Users/Users';\nimport RRDs from '../../containers/RRDs/RRDs';\nimport BanList from '../Firewalls/Banlist';\nimport Web from '../../containers/Web/Web';\nimport Search from '../Search/Search';\nimport Logs from '../Logs/Logs';\n\nimport './ControlPanelContent.scss';\n\nconst ControlPanelContent = props => {\n const { userName } = useSelector(state => state.session);\n const history = useHistory();\n const [searchTerm, setSearchTerm] = useState('');\n const [hotkeysList, setHotkeysList] = useState(null);\n const [loading, setLoading] = useState(true);\n const dispatch = useDispatch();\n\n useEffect(() => {\n if (!userName) {\n return history.push('/login');\n } else {\n setLoading(false);\n }\n }, [userName]);\n\n useEffect(() => {\n dispatch(removeFocusedElement());\n window.addEventListener(\"keyup\", switchPanelTab);\n window.addEventListener(\"keyup\", addNewObject);\n\n return () => {\n window.removeEventListener(\"keyup\", switchPanelTab);\n window.removeEventListener(\"keyup\", addNewObject);\n }\n }, []);\n\n const switchPanelTab = event => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus');\n\n if (isSearchInputFocused) {\n return;\n }\n\n switch (event.keyCode) {\n case 49: return history.push('/list/user/');\n case 50: return history.push('/list/web/');\n case 51: return history.push('/list/dns/');\n case 52: return history.push('/list/mail/');\n case 53: return history.push('/list/db/');\n case 54: return history.push('/list/cron/');\n case 55: return history.push('/list/backup/');\n default: break;\n }\n }\n\n const addNewObject = event => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus');\n\n if (isSearchInputFocused) {\n return;\n }\n\n if (event.keyCode === 65) {\n switch (history.location.pathname) {\n case '/list/web/': return history.push('/add/web/');\n case '/list/dns/': return history.push('/add/dns/');\n case '/list/mail/': return history.push('/add/mail/');\n case '/list/db/': return history.push('/add/db/');\n case '/list/cron/': return history.push('/add/cron/');\n case '/list/backup/exclusions': return history.push('/edit/backup/exclusions/');\n case '/list/package/': return history.push('/add/package/');\n case '/list/ip/': return history.push('/add/ip/');\n case '/list/firewall/': return history.push('/add/firewall/');\n default: break;\n }\n }\n }\n\n const handleSearchTerm = searchTerm => {\n setSearchTerm(searchTerm);\n history.push({\n pathname: '/search/',\n search: `?q=${searchTerm}`\n });\n }\n\n const scrollToTop = () => {\n window.scrollTo({ top: 0, behavior: 'smooth' });\n }\n\n return (\n <div>\n <MainNav />\n <div className=\"content\">\n {\n loading\n ? <Spinner />\n : (\n <Switch>\n <Redirect from=\"/\" exact to=\"/list/user/\" />\n <Route path=\"/list/package\" component={props => <Packages {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/add/package\" component={() => <AddPackage />} />\n <Route path=\"/edit/package\" component={() => <EditPackage />} />\n <Route path=\"/list/ip\" component={props => <InternetProtocols {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/add/ip\" component={() => <AddInternetProtocol />} />\n <Route path=\"/edit/ip\" component={() => <EditInternetProtocol />} />\n <Route path=\"/list/rrd\" component={props => <RRDs {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/list/stats\" component={props => <Statistics {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/list/log\" component={props => <Logs {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/list/updates\" component={props => <Updates {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/list/firewall\" exact component={props => <Firewalls {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/list/firewall/banlist\" exact component={props => <BanList {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/add/firewall/banlist\" component={AddBanIP} />\n <Route path=\"/add/firewall\" component={() => <AddFirewall />} />\n <Route path=\"/edit/firewall\" component={() => <EditFirewall />} />\n <Route path=\"/list/server/\" exact component={props => <Servers {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/edit/server/\" exact component={() => <EditServer />} />\n <Route path=\"/edit/server/nginx\" exact component={() => <EditServerNginx />} />\n <Route path=\"/edit/server/php\" exact component={() => <EditPhp serviceName=\"php\" />} />\n <Route path=\"/edit/server/php-fpm\" exact component={() => <EditPhp serviceName=\"php-fpm\" />} />\n <Route path=\"/edit/server/php5-fpm\" exact component={() => <EditPhp serviceName=\"php5-fpm\" />} />\n <Route path=\"/edit/server/httpd\" exact component={() => <EditHttpd />} />\n <Route path=\"/edit/server/dovecot\" exact component={() => <Dovecot />} />\n <Route path=\"/edit/server/bind9\" exact component={() => <Bind9 />} />\n <Route path=\"/edit/server/postgresql\" exact component={() => <Postgresql />} />\n <Route path=\"/edit/server/mysql\" exact component={() => <Mysql serviceName=\"mysql\" />} />\n <Route path=\"/edit/server/mariadb\" exact component={() => <Mysql serviceName=\"mariadb\" />} />\n <Route path=\"/edit/server/mysqld\" exact component={() => <Mysql serviceName=\"mysqld\" />} />\n\n {\n !!services.length && services.map((service, index) => {\n if (service === 'iptables') {\n return <Redirect key={index} from=\"/edit/server/iptables\" exact to=\"/list/firewall\" />\n } else {\n return <Route key={index} path={`/edit/server/${service}`} exact component={() => <Service serviceName={service} />} />\n }\n })\n }\n\n <Route path=\"/list/user\" component={props => <Users changeSearchTerm={handleSearchTerm} {...props} />} />\n <Route path=\"/add/user\" component={() => <AddUser />} />\n <Route path=\"/edit/user\" component={() => <EditUser />} />\n <Route path=\"/list/web\" component={props => <Web {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/add/web\" component={() => <AddWebDomain />} />\n <Route path=\"/edit/web\" component={() => <EditWeb />} />\n <Route path=\"/list/dns\" component={props => <DNSWrapper {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/add/dns\" component={() => <AddDNSWrapper />} />\n <Route path=\"/edit/dns\" component={() => <EditDNSWrapper />} />\n <Route path=\"/list/mail\" component={props => <MailWrapper {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/add/mail\" component={() => <AddMailWrapper />} />\n <Route path=\"/edit/mail\" component={() => <EditMailWrapper />} />\n <Route path=\"/list/db\" component={props => <Databases {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/add/db\" component={() => <AddDatabase />} />\n <Route path=\"/edit/db\" component={() => <EditDatabase />} />\n <Route path=\"/list/cron\" component={props => <CronJobs {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/add/cron\" component={() => <AddCronJob />} />\n <Route path=\"/edit/cron\" component={() => <EditCronJob />} />\n <Route exact path=\"/list/backup\" component={props => <BackupWrapper {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route exact path=\"/list/backup/exclusions\" component={props => <BackupExclusions {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route exact path=\"/edit/backup/exclusions\" component={EditBackupExclusions} />\n <Route path=\"/search/\" component={props => <Search {...props} changeSearchTerm={handleSearchTerm} searchTerm={searchTerm} />} />\n </Switch>\n )}\n </div>\n <div className=\"fixed-buttons\">\n <div className=\"hotkey-button\">\n <button onClick={() => hotkeysList.classList.toggle('hide')}>\n <FontAwesomeIcon icon=\"ellipsis-h\" />\n </button>\n </div>\n <div className=\"scroll-to-top\">\n <button onClick={() => scrollToTop()}>\n <FontAwesomeIcon icon=\"long-arrow-alt-up\" />\n </button>\n </div>\n </div>\n <Hotkeys reference={(inp) => setHotkeysList(inp)} toggleHotkeys={() => hotkeysList.classList.toggle('hide')} />\n </div>\n );\n}\n\nexport default ControlPanelContent;\n","import React, { useState } from 'react';\nimport { addActiveElement } from 'src/actions/MainNavigation/mainNavigationActions';\nimport { logout } from 'src/actions/Session/sessionActions';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { Link, useHistory } from 'react-router-dom';\nimport Spinner from '../Spinner/Spinner';\n\nimport './TopPanel.scss';\n\nconst TopPanel = ({ menuItems = [], extraMenuItems = [] }) => {\n const mainNavigation = useSelector(state => state.mainNavigation);\n const [loading, setLoading] = useState(false);\n const { i18n, userName } = useSelector(state => state.session);\n const dispatch = useDispatch();\n const history = useHistory();\n\n const className = cls => {\n let className = 'nav-link';\n\n if (mainNavigation.activeElement === cls) {\n return className += ' active';\n }\n\n return className;\n }\n\n const renderMenuItems = () => {\n if (!menuItems.length) return;\n\n return menuItems.map(({ route, name }) => (\n <div className={className(route)} key={name}>\n <button onClick={event => handleState(event, route)}>{name}</button>\n </div>\n ));\n }\n\n const renderExtraMenuItems = () => {\n if (!extraMenuItems.length) return;\n\n return extraMenuItems.map(({ link, text, type }, index) => (\n <div className=\"nav-link\" key={index}>\n {\n type === 'download'\n ? <a href={`/api/v1${link}`} target=\"_blank\" rel=\"noopener noreferrer\">{text}</a>\n : <Link to={link} target=\"_blank\">{text}</Link>\n }\n </div>\n ));\n }\n\n const handleState = (event, route) => {\n event.preventDefault();\n history.push(route);\n dispatch(addActiveElement(route));\n }\n\n const signOut = () => {\n setLoading(true);\n\n dispatch(logout())\n .then(() => {\n history.push('/login/');\n setLoading(false);\n },\n error => {\n setLoading(false);\n console.error(error);\n });\n }\n\n return (\n <div className=\"panel-wrapper\">\n {loading && <Spinner />}\n\n <div className=\"top-panel\">\n <div className=\"container left-menu\">\n <div className=\"logo\">\n <Link to=\"/list/user/\">\n <div className=\"logo-img\">\n <img src=\"/images/white_logo.png\" alt=\"Logo\" />\n </div>\n </Link>\n </div>\n\n {renderMenuItems()}\n\n {renderExtraMenuItems()}\n </div>\n\n <div className=\"container profile-menu\">\n <div><Link to={`/edit/user?user=${userName}`}>{userName}</Link></div>\n <div><button className=\"log-out\" onClick={signOut}>{i18n['Log out']}</button></div>\n </div>\n </div>\n </div>\n );\n}\n\nexport default TopPanel;\n","import axios from \"axios\";\n\nconst BASE_URL = window.location.origin;\n\nexport const getWebLogs = uri => {\n return axios.get(BASE_URL + '/api/v1' +uri);\n}","import React, { useEffect, useState } from 'react';\n\nimport { addActiveElement } from 'src/actions/MainNavigation/mainNavigationActions';\nimport TopPanel from 'src/components/TopPanel/TopPanel';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\nimport QueryString from 'qs';\n\nimport './WebLogs.scss';\nimport { getWebLogs } from 'src/ControlPanelService/WebLogs';\nimport Spinner from 'src/components/Spinner/Spinner';\nimport { Helmet } from 'react-helmet';\n\nexport default function WebLogs() {\n const { i18n, userName } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const mainNavigation = useSelector(state => state.mainNavigation);\n const [domain, setDomain] = useState();\n const [state, setState] = useState({\n data: \"\",\n loading: false\n });\n\n useEffect(() => {\n if (!userName) {\n history.push('/login/');\n }\n }, []);\n\n useEffect(() => {\n let parsedQueryString = QueryString.parse(history.location.search, { ignoreQueryPrefix: true });\n const { domain, type } = parsedQueryString;\n\n if (!parsedQueryString && !domain && !type) {\n return history.goBack();\n }\n\n setDomain(domain);\n let uri = `/list/web-log/?domain=${domain}&type=${type}`;\n fetchData(uri);\n\n dispatch(addActiveElement(`/list/web-log/${type}`));\n }, [mainNavigation.activeElement]);\n\n const fetchData = uri => {\n setState({\n ...state,\n loading: true\n });\n\n getWebLogs(uri)\n .then(result => {\n if (result.data) {\n setState({ ...state, data: result.data.data, loading: false });\n }\n })\n .catch(error => {\n console.error(error);\n setState({ ...state, loading: false });\n });\n }\n\n const menuItems = [\n {\n route: `/list/web-log/?domain=${domain}&type=access`,\n name: i18n['AccessLog']\n },\n {\n route: `/list/web-log/?domain=${domain}&type=error`,\n name: i18n['ErrorLog']\n }\n ];\n\n const extraMenuItems = [\n {\n link: `/download/web-log/?domain=${domain ?? ''}&type=access`,\n type: 'download',\n text: i18n['Download AccessLog']\n },\n {\n link: `/download/web-log/?domain=${domain ?? ''}&type=error`,\n type: 'download',\n text: i18n['Download ErrorLog'],\n }\n ];\n\n return (\n <div className=\"web-logs\">\n <Helmet>\n <title>{`Vesta - ${i18n.WEB}`}</title>\n </Helmet>\n <TopPanel menuItems={menuItems} extraMenuItems={extraMenuItems} />\n <div className=\"content\">\n {\n state.loading\n ? <Spinner />\n : (\n <pre>\n {state.data}\n </pre>\n )\n }\n </div>\n </div>\n );\n}\n","import React from 'react';\n\nimport '../AddItemLayout/AddItemLayout.scss';\nimport './LoginLayout.scss';\n\nconst LoginLayout = ({ children }) => {\n return (\n <div className=\"login-layout\">\n {children}\n </div>\n );\n}\n\nexport default LoginLayout;","import React, { useEffect, useState } from 'react';\n\nimport { Link, useHistory } from 'react-router-dom';\nimport Spinner from '../Spinner/Spinner';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { login } from '../../actions/Session/sessionActions';\nimport LoginLayout from '../ControlPanel/LoginLayout/LoginLayout';\nimport TextInput from '../ControlPanel/AddItemLayout/Form/TextInput/TextInput';\n\nimport './Login.scss';\nimport { Helmet } from 'react-helmet';\n\nexport default function LoginForm() {\n const { i18n } = useSelector(state => state.session);\n const dispatch = useDispatch();\n const history = useHistory();\n const [loading, setLoading] = useState(false);\n const [formValues, setFormValues] = useState({\n user: '',\n password: ''\n });\n const session = useSelector(state => state.session);\n const [errorMessage, setErrorMessage] = useState('');\n\n useEffect(() => {\n if (session.error) {\n setErrorMessage(session.error);\n return;\n }\n\n if (session.token && session.userName) {\n history.push('/list/user/');\n }\n }, [session]);\n\n const submitHandler = event => {\n event.preventDefault();\n const { user, password } = formValues;\n\n setLoading(true);\n\n dispatch(login(user, password))\n .then((res) => {\n setLoading(false);\n });\n }\n\n const changeInputHandler = event => {\n const { value, name } = event.target;\n\n setFormValues({\n ...formValues,\n [name]: value\n });\n }\n\n return (\n <div className=\"login-page\">\n <Helmet>\n <title>{`Vesta - ${i18n.LOGIN ?? 'LOGIN'}`}</title>\n </Helmet>\n {loading && <Spinner />}\n <div className=\"login-form-wrapper\">\n <LoginLayout>\n <form onSubmit={submitHandler}>\n <div className=\"c1\">\n <Link to=\"/\">\n <img src=\"/images/logo.png\" alt=\"Logo\" />\n </Link>\n </div>\n <div className=\"c2\">\n <TextInput\n onChange={changeInputHandler}\n title={i18n['Username'] ?? 'Username'}\n value={formValues.user}\n name=\"user\"\n id=\"user\" />\n\n <TextInput\n onChange={changeInputHandler}\n title={i18n['Password'] ?? 'Password'}\n value={formValues.password}\n optionalTitle={(\n <Link className=\"forgot-password\" tabIndex=\"-1\" to=\"/reset\">\n {i18n['forgot password'] ?? 'forgot password'}\n </Link>\n )}\n name=\"password\"\n type=\"password\"\n id=\"password\" />\n\n <button type=\"submit\" disabled={loading} className={loading ? 'disabled' : ''}>\n {i18n['Log in'] ?? 'Log in'}\n </button>\n\n <div className=\"error-message\">{errorMessage}</div>\n </div>\n </form>\n\n <span>\n <a href=\"http://vestacp.com/\">vestacp.com</a>\n </span>\n </LoginLayout>\n </div>\n </div>\n );\n}\n","import React, { useEffect, useState } from 'react';\n\nimport { addActiveElement } from 'src/actions/MainNavigation/mainNavigationActions';\nimport TopPanel from 'src/components/TopPanel/TopPanel';\nimport { useParams, useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport { getServiceLogs } from 'src/ControlPanelService/Server';\nimport Spinner from 'src/components/Spinner/Spinner';\nimport { Helmet } from 'react-helmet';\nimport ReactHtmlParser from 'react-html-parser';\n\nimport './styles.scss';\n\nconst ServiceInfo = () => {\n const { i18n, userName } = useSelector(state => state.session);\n const dispatch = useDispatch();\n const { activeElement } = useSelector(state => state.mainNavigation);\n const history = useHistory();\n const { service } = useParams();\n const [state, setState] = useState({\n data: \"\",\n loading: false\n });\n\n useEffect(() => {\n if (!userName) {\n history.push('/login/');\n }\n }, [userName]);\n\n useEffect(() => {\n fetchData();\n dispatch(addActiveElement(`/list/server/${service}`));\n }, [activeElement]);\n\n const fetchData = () => {\n setState({ ...state, loading: true });\n\n getServiceLogs(service)\n .then(result => {\n setState({ ...state, data: result.data.service_log, loading: false });\n })\n .catch(error => {\n console.error(error);\n setState({ ...state, loading: false });\n });\n }\n\n const menuItems = [\n {\n route: '/list/server/cpu',\n name: i18n['CPU']\n },\n {\n route: '/list/server/mem',\n name: i18n['MEMORY']\n },\n {\n route: '/list/server/disk',\n name: i18n['DISK']\n },\n {\n route: '/list/server/net',\n name: i18n['NETWORK']\n },\n {\n route: '/list/server/web',\n name: i18n['WEB']\n },\n {\n route: '/list/server/dns',\n name: i18n['DNS']\n },\n {\n route: '/list/server/mail',\n name: i18n['MAIL']\n },\n {\n route: '/list/server/db',\n name: i18n['DB']\n }\n ];\n\n return (\n <div className=\"service-info\">\n <Helmet>\n <title>{`Vesta - ${i18n.SERVER}`}</title>\n </Helmet>\n <TopPanel menuItems={menuItems} />\n <div className=\"content\">\n {\n state.loading\n ? <Spinner />\n : (<pre>\n {state.data.length && state.data.map(line => (<>{ReactHtmlParser(line)}<br /></>))}\n </pre>)\n }\n </div>\n </div>\n );\n}\n\nexport default ServiceInfo;\n","import React, { useEffect, useState } from 'react';\n\nimport TextInput from 'src/components/ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport Password from 'src/components/ControlPanel/AddItemLayout/Form/Password/Password';\nimport LoginLayout from 'src/components/ControlPanel/LoginLayout/LoginLayout';\nimport { resetPassword } from 'src/ControlPanelService/ResetPassword';\nimport { Link, useHistory, useLocation } from 'react-router-dom';\nimport { reset } from 'src/actions/Session/sessionActions';\nimport { useDispatch, useSelector } from 'react-redux';\nimport Spinner from 'src/components/Spinner/Spinner';\nimport ReactHtmlParser from 'react-html-parser';\nimport { Helmet } from 'react-helmet';\nimport QueryString from 'qs';\n\nexport default function ForgotPassword() {\n const { i18n } = useSelector(state => state.session);\n const dispatch = useDispatch();\n const history = useHistory();\n const [loading, setLoading] = useState(false);\n const [state, setState] = useState({\n action: '',\n user: '',\n code: '',\n });\n const session = useSelector(state => state.session);\n const location = useLocation();\n const [errorMessage, setErrorMessage] = useState('');\n\n useEffect(() => {\n const parsedQueryString = QueryString.parse(location.search, { ignoreQueryPrefix: true });\n\n setState({\n ...state,\n action: parsedQueryString.action || '',\n user: parsedQueryString.user || '',\n code: parsedQueryString.code || ''\n });\n }, []);\n\n useEffect(() => {\n if (session.error) {\n setErrorMessage(session.error);\n return;\n }\n\n if (session.token && session.userName) {\n history.push('/list/user/');\n }\n }, [session]);\n\n const submitHandler = event => {\n event.preventDefault();\n\n if (!state.code && !state.user) return;\n\n if (!state.action && state.user) {\n completeStep1();\n return;\n }\n\n if (state.action === 'code' && state.user && state.code) {\n completeStep2();\n return;\n }\n\n setLoading(true);\n const data = { user: state.user, code: state.code };\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n data[name] = value;\n }\n\n dispatch(reset(data))\n .then(res => {\n if (res.error) {\n setErrorMessage(res.error);\n } else {\n history.push('/login');\n setErrorMessage('');\n }\n\n setLoading(false);\n });\n }\n\n const changeInputHandler = event => {\n const { value, name } = event.target;\n\n setState({ ...state, [name]: value });\n }\n\n const completeStep1 = () => {\n if (!state.user) return;\n setLoading(true);\n\n resetPassword(state.user)\n .then(res => {\n setErrorMessage(res.data.error || '');\n setState({ ...state, action: 'code' });\n setLoading(false);\n })\n .catch(error => {\n console.error(error);\n setLoading(false);\n });\n }\n\n const completeStep2 = () => {\n setState({ ...state, action: 'confirm' });\n }\n\n return (\n <div className=\"login-page\">\n <Helmet>\n <title>{`Vesta - ${i18n['RESET PASSWORD']}`}</title>\n </Helmet>\n {loading && <Spinner />}\n <div className=\"login-form-wrapper\">\n <LoginLayout>\n <form onSubmit={submitHandler}>\n <div className=\"c1\">\n <Link to=\"/\">\n <img src=\"/images/logo.png\" alt=\"Logo\" />\n </Link>\n </div>\n <div className=\"c2\">\n {\n !state.action && (\n <>\n <TextInput\n onChange={changeInputHandler}\n title={i18n['Username']}\n value={state.user}\n name=\"user\"\n id=\"user\" />\n\n <div className=\"buttons-wrapper\">\n <button className=\"add\" type=\"button\" onClick={completeStep1}>{i18n.Submit}</button>\n <button className=\"back\" type=\"button\" onClick={() => history.push('/login')}>{i18n.Back}</button>\n </div>\n </>\n )\n }\n\n {\n state.action === 'code' && (\n <>\n <span>{ReactHtmlParser(i18n['RESET_CODE_SENT'])}</span><br />\n\n <TextInput\n onChange={changeInputHandler}\n title={i18n['Reset Code']}\n value={state.code}\n name=\"code\"\n id=\"code\" />\n\n <div className=\"buttons-wrapper\">\n <button className=\"add\" type=\"button\" onClick={completeStep2}>{i18n.Confirm}</button>\n <button className=\"back\" type=\"button\" onClick={() => setState({ ...state, action: '', code: '', user: '' })}>{i18n.Back}</button>\n </div>\n </>\n )\n }\n\n {\n state.action === 'confirm' && (\n <>\n <Password name='password' title={i18n['New Password']} showGenerationButton={false} tabIndex={1} />\n\n <Password name='password_confirm' title={i18n['Confirm Password']} showGenerationButton={false} tabIndex={2} />\n\n <div className=\"buttons-wrapper\">\n <button className=\"add\" type=\"submit\" style={{ height: '31px' }}>{i18n.Reset}</button>\n <button className=\"back\" type=\"button\" onClick={() => setState({ ...state, action: 'code', code: '', user: state.user })}>{i18n.Back}</button>\n </div>\n </>\n )\n }\n\n <div className=\"error-message\">{errorMessage}</div>\n </div>\n </form>\n\n <span>\n <a href=\"http://vestacp.com/\">vestacp.com</a>\n </span>\n </LoginLayout>\n </div>\n </div>\n );\n}\n","import React, { useEffect, useState } from 'react';\nimport FileManager from '../FileManager/FileManager';\nimport { Route, Switch, useHistory, Redirect } from \"react-router\";\nimport Preview from '../../components/Preview/Preview';\nimport { library } from '@fortawesome/fontawesome-svg-core';\nimport * as Icon from '@fortawesome/free-solid-svg-icons';\nimport 'bootstrap/dist/css/bootstrap.css';\nimport 'bootstrap/dist/js/bootstrap.min';\nimport './App.scss';\nimport ControlPanelContent from '../ControlPanelContent/ControlPanelContent';\nimport WebLogs from '../WebLogs/WebLogs';\nimport LoginForm from 'src/components/Login/LoginForm';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { checkAuthHandler } from 'src/actions/Session/sessionActions';\nimport ServiceInfo from 'src/containers/ServiceInfo';\nimport ForgotPassword from 'src/components/ForgotPassword';\nimport Spinner from 'src/components/Spinner/Spinner';\n\nlibrary.add(\n Icon.faBook,\n Icon.faDownload,\n Icon.faFile,\n Icon.faFileAlt,\n Icon.faFolderOpen,\n Icon.faImage,\n Icon.faEllipsisH,\n Icon.faFolder,\n Icon.faItalic,\n Icon.faUser,\n Icon.faCopy,\n Icon.faPaste,\n Icon.faTrash,\n Icon.faBoxOpen,\n Icon.faArrowDown,\n Icon.faArrowUp,\n Icon.faBell,\n Icon.faPlus,\n Icon.faAngleRight,\n Icon.faStar,\n Icon.faUserLock,\n Icon.faPen,\n Icon.faLock,\n Icon.faTimes,\n Icon.faSearch,\n Icon.faCog,\n Icon.faList,\n Icon.faWrench,\n Icon.faFileDownload,\n Icon.faPause,\n Icon.faPlay,\n Icon.faCogs,\n Icon.faStop,\n Icon.faUnlock,\n Icon.faLongArrowAltUp,\n Icon.faEye,\n Icon.faEyeSlash,\n Icon.faLongArrowAltRight,\n Icon.faCaretDown,\n Icon.faCaretUp,\n Icon.faInfinity,\n Icon.faPlay\n);\n\nconst App = () => {\n const history = useHistory();\n const dispatch = useDispatch();\n const session = useSelector(state => state.session);\n const [loading, setLoading] = useState(true);\n\n useEffect(() => {\n if (!Object.entries(session.i18n).length) {\n dispatch(checkAuthHandler())\n .then(token => {\n setLoading(false);\n }, (error) => {\n console.error(error);\n return history.push('/login');\n });\n }\n }, [dispatch, history, session]);\n\n const AuthenticatedRoute = ({ authenticated, ...rest }) => {\n return (\n <Route {...rest} render={props =>\n authenticated\n ? <rest.component {...props} />\n : <Redirect to=\"/login\" />} />\n );\n }\n\n return (\n <div className=\"App\">\n {\n loading\n ? <Spinner />\n : (\n <Switch>\n <Route path=\"/login\" exact component={LoginForm} />\n <Route path=\"/reset\" exact component={ForgotPassword} />\n <Route\n path=\"/list/directory/\"\n exact\n component={FileManager} />\n <Route\n path=\"/list/directory/preview/\"\n exact\n component={Preview} />\n <AuthenticatedRoute\n path=\"/list/server/:service\"\n authenticated={session.userName}\n component={ServiceInfo} />\n <AuthenticatedRoute\n path=\"/list/web-log/\"\n exact\n authenticated={session.userName}\n component={WebLogs} />\n <AuthenticatedRoute\n path=\"/\"\n authenticated={session.userName}\n loading={loading}\n component={ControlPanelContent} />\n </Switch>\n )\n }\n </div>\n );\n}\n\nexport default App;\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read http://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.1/8 is considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\nexport function register(config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit http://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl, config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See http://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl, config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl)\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister();\n });\n }\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux'\nimport configureStore from './store';\nimport './index.css';\nimport App from './containers/App/App';\nimport * as serviceWorker from './containers/App/serviceWorker';\nimport { BrowserRouter as Router } from 'react-router-dom';\n\nReactDOM.render(\n <Provider store={configureStore()}>\n <Router>\n <App />\n </Router>\n </Provider>,\n document.getElementById('root')\n);\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: http://bit.ly/CRA-PWA\nserviceWorker.unregister();\n","import { composeWithDevTools } from 'redux-devtools-extension';\nimport { createStore, applyMiddleware } from 'redux';\nimport rootReducer from './reducers/rootReducer';\nimport thunk from 'redux-thunk';\n\nexport default function configureStore() {\n return createStore(\n rootReducer,\n composeWithDevTools(applyMiddleware(thunk))\n );\n}"],"sourceRoot":""}