vesta/web/static/js/main.57f35a42.chunk.js.map
2022-02-23 18:49:31 +03: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/Panel/panel.js","actions/Panel/panelTypes.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","sessionReducer","panel","panelReducer","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","history","useHistory","useEffect","push","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","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","id","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","overflow","progress","Hotkeys","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","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","changeDirectory","encodePath","getData","deleteItems","promisesArray","then","Promise","all","moveItems","targetPath","copyItems","FileManager","currentUser","parsedQueryString","QueryString","parse","ignoreQueryPrefix","substring","FM","currentPath","leftList","rightList","changeDirectoryOnLoading","switchActiveList","toggleActiveListOnTab","hotkeysListener","activeWindow","cachePaths","setStateAsync","updater","resolve","side","leftListResponse","rightListResponse","leftListing","rightListing","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","Helmet","onDeleteFileHandler","el","hotkeysList","classList","toggle","Editor","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","setToolbarHeight","handleToolbar","changeToolbarHeight","documentElement","clientWidth","scrollTop","scrollY","newToolbarHeight","max","mobile","marginTop","checkAuth","uri","refreshCounters","dispatch","getState","reject","EditInternetProtocol","useDispatch","errorMessage","setErrorMessage","okMessage","setOkMessage","dedicated","ip","QS","fetchData","params","getInternetProtocolInfo","submitFormHandler","updatedIP","entries","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","NAT","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","v_ftp_path","deleted","is_new","v_ftp_password","FTP","v_ftp_email","renderForm","AdditionalFtpWrapper","ftps","unCheckAdditionalFtpBox","ftpUserPrePath","additionalFtp","onDeleteFtp","updatedAdditionalFtps","ftp","additionalFtpArrayLength","additionalFtpsDuplicate","addAdditionalFtp","SslSupport","letsEncrypt","setLetsEncrypt","setModalVisible","sslKey","AdvancedOptions","sslSupport","statisticsAuthCheckbox","statisticsAuth","updatedDomain","aliases","transform","sslCertificate","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","database","getDatabaseInfo","dbuser","updatedDatabase","updateDatabase","DB","password","host","addBanIpsUri","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","DB_PMA_URL","DB_PGA_URL","mysql","mysql_hosts","printPhpMyAdminHosts","pgsql","pgsql_hosts","EditBackupOption","remoteBackup","setRemoteBackup","backup","backup_gzip","backup_dir","backup_type","backup_host","backup_username","backup_password","backup_bpath","EditMailOption","MAIL_URL","mailCertificateSystem","setMailCertificateSystem","mail_certificate","mail_system","antivirus_system","antispam_system","resetPassword","confirmPassword","login","signIn","loginAs","loginas","signInAs","logout","logout_response","removeItem","EditServer","webOption","dnsOption","mailOption","backupOption","sslOption","pluginsOption","dbOption","updatedServer","toLowerCase","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","getCredentials","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","U_DISK_PERCENT","DBUSER","CHARSET","HOST","TYPE","suspendedStatus","suspend_conf","handleSuspend","suspend_action","Databases","dbFav","dbAdmin","dbAdminLink","db_myadmin_link","db_pgadmin_link","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","bulkFirewallAction","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","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","banIps","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","STATE","SYSTEM","CPU","Memory","MEM","RTIME","action_url","Servers","servers","handleConfigure","handleRestart","handleStop","onHandleAction","sys","serversDuplicate","serverNames","menuHeight","handleState","statClassName","activeName","onKeyPress","look","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","extraClass","Graphs","Statistics","Log","FIREWALL_SYSTEM","FILEMANAGER_KEY","SOFTACULOUS","Apps","Bell","data-name","BellUnread","Notifications","ajax","notification","removeNotification","deleteNotification","TOPIC","ID","NOTICE","marginBottom","Panel","smallNavigationClass","toggleNavigation","showTopNav","signOut","renderNotifications","renderSmallNavigation","MainNav","tabs","controlFocusedTabWithCallback","useCallback","currentActiveTabPositionInArray","newFocusedMenuTab","handleLeftArrowKey","handleRightArrowKey","handleTopNav","hideMenu","indexInArray","visibleNav","innerWidth","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","U_BANDWIDTH","U_BANDWIDTH_PERCENT","Web","U_DISK_WEB","U_DISK_MAIL","U_DISK_DIRS","U_WEB_SSL","IP_OWNED","statistics","statistic","getStatisticsList","STATS","logOut","logInAs","U_BANDWIDTH_MEASURE","U_DISK_MEASURE","U_DISK_WEB_MEASURE","U_DISK_MAIL_MEASURE","U_DATABASES_MEASURE","U_DISK_DIRS_MEASURE","CONTACT","spnd_conf","spnd_action","userFav","addNewObject","handleLogin","currentUserData","logOutHandler","logInAsHandler","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","banIp","currentBanIpData","delete_url","total_amount","banIpsDuplicate","banIpNames","WebDomain","ALIAS","U_BANDWIDTH_SIZE","U_DISK_SIZE","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","srv","service_log","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":"26EAEMA,EAAgB,CACpBC,eAAgB,GAChBC,cAAe,GACfC,cAAe,CACb,cACA,aACA,aACA,cACA,YACA,cACA,gBACA,iBACA,YACA,aACA,eACA,aACA,iBACA,kBACA,mBACA,gBACA,iBAEFC,aAAc,CACZ,cACA,aACA,aACA,cACA,YACA,cACA,gBACA,eACA,aACA,mBACA,kBA8BWC,EA1BC,WAAoC,IAAnCC,EAAkC,uDAA1BN,EAAeO,EAAW,uCACjD,OAAQA,EAAOC,MACb,ICzC+B,sBD8C/B,IC7CkC,yBD8ChC,OAAO,2BACFF,GADL,IACYL,eAAgBM,EAAOE,QAGrC,ICjD8B,qBDsD9B,ICrDiC,wBDsD/B,OAAO,2BACFH,GADL,IACYJ,cAAeK,EAAOE,QAGpC,QAAS,OAAOH,IE3DdN,EAAgB,CACpBU,2BAA4B,IAmBfL,EAhBC,WAAoC,IAAnCC,EAAkC,uDAA1BN,EAAeO,EAAW,uCACjD,OAAQA,EAAOC,MACb,ICRsC,6BDSpC,OAAO,2BACFF,GADL,IACYI,2BAA4BH,EAAOE,QAGjD,ICZyC,gCDavC,OAAO,2BACFH,GADL,IACYI,2BAA4B,KAG1C,QAAS,OAAOJ,IEhBdN,EAAgB,CACpBW,cAAe,IAqBFC,EAlBa,WAAoC,IAAnCN,EAAkC,uDAA1BN,EAAeO,EAAW,uCAC7D,OAAQA,EAAOC,MACb,ICR6B,oBDc7B,ICbgC,uBDc9B,OAAO,2BACFF,GADL,IAEEK,cAAeJ,EAAOE,QAG1B,QAAS,OAAOH,IElBdN,EAAgB,CACpBa,KAAM,IAeOC,EAZY,W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EAAQK,SACvB8J,QAASA,EACTg+C,UAAWL,QC5GPniC,QACW,cAA7Bnb,OAAOsH,SAASoxB,UAEe,UAA7B14B,OAAOsH,SAASoxB,UAEhB14B,OAAOsH,SAASoxB,SAASj+B,MACvB,2DCTN0lD,IAASD,OACP,kBAAC,IAAD,CAAUE,MCJHC,sBACLC,EACAC,8BAAoBC,0BAAgBC,QDGpC,kBAAC,KAAD,KACE,kBAAC,GAAD,QAGJjnD,SAASyL,eAAe,SDkHpB,kBAAmBy7C,WACrBA,UAAUC,cAAcC,MAAM34C,MAAK,SAAA44C,GACjCA,EAAaC,mB","file":"static/js/main.57f35a42.chunk.js","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: []\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};\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 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 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 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 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 { REFRESH_PANEL } from '../../actions/Panel/panelTypes';\n\nconst INITIAL_STATE = {\n panel: {}\n};\n\nconst panelReducer = (state = INITIAL_STATE, action) => {\n switch (action.type) {\n case REFRESH_PANEL:\n return {\n ...state,\n panel: action.value.panel\n };\n\n default: return state;\n }\n};\n\nexport default panelReducer;\n","export const REFRESH_PANEL = 'REFRESH_PANEL';\n","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';\nimport panelReducer from './Panel/panel';\n\nexport default combineReducers({\n mainNavigation: mainNavigationReducer,\n controlPanelContent: controlPanelContentReducer,\n notifications: notificationReducer,\n menuCounters: menuCounterReducer,\n userSession: userSessionReducer,\n session: sessionReducer,\n panel: panelReducer,\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, { useEffect } from 'react';\nimport { useSelector } from 'react-redux';\nimport { useHistory } from 'react-router';\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 const history = useHistory();\n\n useEffect(() => {\n if (!user) return history.push('/login');\n }, [user]);\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} id={name}>\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 upload\" style={{ overflow: props.progress !== \"0\" ? 'visible' : 'hidden' }}>\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;\n","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.Cancel}</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: '',\n files: { listing: [] },\n },\n rightList: {\n path: '',\n files: { listing: [] },\n },\n currentPath: '',\n currentUser: '',\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 if (!this.props.session.userName) return this.props.history.push('/login');\n\n FM.cacheData(this.state.currentUser, this.props.history, this.props.menuCounters.user.HOME);\n let currentPath = FM.activeWindowPath();\n this.setState({\n currentPath,\n currentUser: this.props.menuCounters.user.HOME,\n leftList: { ...this.state.leftList, path: this.props.menuCounters.user.HOME },\n rightList: { ...this.state.rightList, path: this.props.menuCounters.user.HOME }\n });\n this.changeDirectoryOnLoading();\n }\n\n componentDidMount = () => {\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 { leftList, rightList } = this.state;\n Promise.all([FM.changeDirectory(server, leftList.path), FM.changeDirectory(server, rightList.path)])\n .then(result => {\n const [leftListResponse, rightListResponse] = result;\n let leftListing = leftListResponse.data.listing;\n let rightListing = rightListResponse.data.listing;\n\n this.setState({ leftList: { ...leftList, files: { listing: leftListing } }, rightList: { ...rightList, files: { listing: rightListing } }, loading: false });\n\n this.leftList.resetData();\n this.rightList.resetData();\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 await this.setStateAsync({ 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 return (\n <div className=\"window\">\n <Helmet>\n <title>{this.props.session.i18n['File Manager']}</title>\n </Helmet>\n {uploadPercent !== \"0\" && <ProgressBar progress={uploadPercent} />}\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 {this.props.session.userName && ['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 <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 changeInputHandler = 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={changeInputHandler}\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, { useEffect, useState } from 'react';\nimport './Toolbar.scss';\n\nconst Toolbar = props => {\n const [toolbarHeight, setToolbarHeight] = useState(185);\n\n useEffect(() => {\n window.addEventListener(\"resize\", handleToolbar);\n document.addEventListener(\"scroll\", changeToolbarHeight);\n\n return () => {\n window.removeEventListener(\"resize\", handleToolbar);\n document.removeEventListener(\"scroll\", changeToolbarHeight);\n }\n }, []);\n\n const handleToolbar = () => {\n if (document.documentElement.clientWidth < 900) {\n setToolbarHeight(95);\n } else {\n setToolbarHeight(185);\n }\n }\n\n const changeToolbarHeight = () => {\n if (document.documentElement.clientWidth > 900) {\n let scrollTop = window.scrollY;\n let newToolbarHeight = Math.max(95, 185 - scrollTop);\n setToolbarHeight(newToolbarHeight);\n }\n }\n\n const className = () => {\n const { className } = props;\n\n if (className === \"justify-right\") {\n return toolbarHeight === 95 ? \"toolbar t-shadow \" + className : \"toolbar \" + className;\n }\n\n return toolbarHeight === 95 ? \"toolbar t-shadow\" : \"toolbar\";\n }\n\n const style = () => {\n if (props.mobile) {\n return;\n }\n\n if (document.documentElement.clientWidth > 900) {\n return { marginTop: toolbarHeight };\n } else {\n return { marginTop: 33 };\n }\n }\n\n return (\n <div className={className()} style={style()} id=\"v-toolbar\">\n {props.children}\n </div>\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';\nimport { REFRESH_PANEL } from '../Panel/panelTypes';\n\nexport const refreshCounters = () => (dispatch, getState) => {\n return new Promise((resolve, reject) => {\n checkAuth()\n .then(res => {\n const { data, token, panel } = res.data;\n\n if (token) setAuthToken(token);\n\n dispatch({\n type: REFRESH_COUNTERS,\n value: {\n user: data\n }\n });\n\n dispatch({\n type: REFRESH_PANEL,\n value: {\n panel\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.ip;\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 || stopped) {\n className += ' suspended';\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 {props.stopped && <div className='stopped'>{i18n.stopped}</div>}\n </Container>\n {props.children}\n </div>\n );\n}\n\nexport default ListItem;\n","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';\nimport './InternetProtocol.scss';\n\nconst InternetProtocol = props => {\n const { 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 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.NAT ? <>{data.NAT} <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> {data.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(/,/g, ', ')}</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;\n","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 onChange(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: data.v_ftp_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}][v_ftp_user]`} value={data.v_ftp_user} />\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={data.is_new} />\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.indexOf('/') !== 0 ? `/${event.target.value}` : 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}{state.path}</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 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 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, userName } = useSelector(state => state.session);\n const { panel } = useSelector(state => state.panel);\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 aliases: '',\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, aliases: `www.${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 bulkFirewallAction = (action, ips) => {\n const formData = new FormData();\n formData.append(\"action\", action);\n formData.append(\"token\", getAuthToken());\n\n ips.forEach(ip => {\n formData.append(\"rule[]\", ip);\n });\n\n return axios.post(BASE_URL + '/api/v1/bulk/firewall/', formData);\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 'DROP',\n 'ACCEPT'\n ],\n protocols: [\n 'TCP',\n 'UDP',\n '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['no']]}\n name=\"v_reseller\"\n id=\"reseller\"\n disabled />\n\n <SelectInput\n title={i18n['Backup Migration Manager']}\n options={[i18n['no']]}\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 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 EditDatabaseOption = ({ data, visible }) => {\n const { DB_PMA_URL, DB_PGA_URL } = useSelector(state => state.userSession.session);\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={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={DB_PGA_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={['no', '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 <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 <div style={{ transform: 'translateX(3rem)' }}>\n <br />\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 </div>\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 { MAIL_URL } = useSelector(state => state.userSession.session);\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={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';\nimport { REFRESH_PANEL } from '../Panel/panelTypes';\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 i18n: i18n || {},\n userName: user,\n error\n },\n });\n dispatch({\n type: REFRESH_PANEL,\n value: {\n panel\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 userName: user,\n error\n },\n });\n dispatch({\n type: REFRESH_PANEL,\n value: {\n panel\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 token,\n error\n }\n });\n dispatch({\n type: REFRESH_PANEL,\n value: {\n panel\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 session: {},\n i18n: [],\n error,\n },\n });\n dispatch({\n type: REFRESH_PANEL,\n value: {\n panel: {}\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 token: '',\n i18n,\n error,\n },\n });\n dispatch({\n type: REFRESH_PANEL,\n value: {\n panel\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 token,\n error\n }\n });\n dispatch({\n type: REFRESH_PANEL,\n value: {\n panel\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 if (updatedServer['v_backup_type']) {\n updatedServer['v_backup_type'] = updatedServer['v_backup_type'].toLowerCase();\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 const getCredentials = () => {\n let result = '';\n\n result += `${i18n['Username']}:${userName}@${domain}\\n`;\n result += `${i18n['Password']}:${password}\\n`;\n result += `${i18n['IMAP hostname']}:${state.imapHostName}\\n`;\n result += `${i18n['IMAP port']}:${state.imapPort}\\n`;\n result += `${i18n['IMAP security']}:${state.imapEncryption}\\n`;\n result += `${i18n['IMAP auth method']}:${i18n['Normal password']}\\n`;\n result += `${i18n['SMTP hostname']}:${state.smtpHostName}\\n`;\n result += `${i18n['SMTP port']}:${state.smtpPort}\\n`;\n result += `${i18n['SMTP security']}:${state.smtpEncryption}\\n`;\n result += `${i18n['SMTP auth method']}:${i18n['Normal password']}\\n`;\n result += `${i18n['Webmail URL']}:${`http://${window.location.hostname}${webMail}`}\\n`;\n\n return result;\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: `http://${window.location.hostname}${webMail}` }} target=\"_blank\">{webMail}</Link></span>\n </div>\n\n <input type=\"hidden\" name=\"v_credentials\" value={getCredentials()} />\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 setState({ ...state, loading: false });\n } else {\n dispatch(refreshCounters()).then(() => {\n setErrorMessage('');\n setOkMessage(ok_msg);\n setState({ ...state, 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 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.Save}</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['v_password'] = state.password;\n\n if (!newMailDomain['v_quota']) newMailDomain['v_quota'] = '';\n if (!newMailDomain['v_aliases']) newMailDomain['v_aliases'] = '';\n if (!newMailDomain['v_fwd']) newMailDomain['v_fwd'] = '';\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_send_email\"\n id=\"send_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/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\">\n {i18n.Disk}: <span><span className=\"stat\">{data.U_DISK}</span>{i18n.mb}</span>\n <div className=\"percent\" style={{ width: `${data.U_DISK_PERCENT}%` || '0%' }}></div>\n </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';\nimport { Link } from 'react-router-dom';\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 db_myadmin_link: '',\n db_pgadmin_link: '',\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 db_myadmin_link: result.data.db_myadmin_link,\n db_pgadmin_link: result.data.db_pgadmin_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 {state.db_myadmin_link && <Link to={{ pathname: state.db_myadmin_link }} className=\"button-extra\" type=\"submit\" target=\"_blank\">phpMyAdmin</Link>}\n {state.db_pgadmin_link && <Link to={{ pathname: state.db_pgadmin_link }} className=\"button-extra\" type=\"submit\" target=\"_blank\">phpPgAdmin</Link>}\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 { bulkFirewallAction, 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 bulkFirewallAction(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 { 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().then(() => setLoading(false));\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 const { session } = useSelector(state => state.userSession);\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 {session.PROXY_SYSTEM && <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 stopped={data.STATE === 'stopped'}\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';\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 fetchData().then(() => 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(() => setLoading(false));\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(() => setLoading(false));\n })\n .catch(err => { setLoading(false); console.error(err); });\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/service/?srv=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';\nimport Spinner from 'src/components/Spinner/Spinner';\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, userName } = useSelector(state => state.session);\n const { panel } = useSelector(state => state.panel);\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 if (!panel[userName]) return <Spinner />;\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 && panel[session.look]\n ? (<>\n <div>\n <span>{i18n.Disk}:</span>\n <span>\n <span className=\"value\">\n {panel[session.look]['U_DISK']}\n <span className=\"unit\">{panel[session.look]['U_DISK_MEASURE']}</span>\n </span>\n </span>\n </div>\n <div>\n <span>{i18n.Bandwidth}:</span>\n <span>\n <span className=\"value\">\n {panel[session.look]['U_BANDWIDTH']}\n <span className=\"unit\">{panel[session.look]['U_BANDWIDTH_MEASURE']}</span>\n </span>\n </span>\n </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 {\n panel[userName]['WEB_DOMAINS'] !== '0' && (<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 }\n\n {\n panel[userName]['DNS_DOMAINS'] !== '0' && (<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 }\n\n {\n panel[userName]['MAIL_DOMAINS'] !== '0' && (<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 }\n\n {\n panel[userName]['DATABASES'] !== '0' && (<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 }\n\n {\n panel[userName]['CRON_JOBS'] !== '0' && (<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 }\n\n {\n panel[userName]['BACKUPS'] !== '0' && (<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 }\n </div>\n </div>\n );\n}\n\nexport default Menu;\n","import React from 'react';\nimport Menu from '../../MainNav/Stat-menu/Menu';\nimport { addActiveElement } from '../../../actions/MainNavigation/mainNavigationActions';\nimport { useSelector, useDispatch } from \"react-redux\";\nimport { Link } from \"react-router-dom\";\nimport './MobileTopNav.scss';\n\nconst MobileTopNav = 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\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 return (\n <div className={props.class}>\n <div className=\"mobile-menu\">\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=\"mobile-stat-menu\">\n <Menu mobile={true} />\n </div>\n </div>\n );\n}\n\nexport default MobileTopNav;\n","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.length) {\n console.log(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.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.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;\n","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 { panel } = useSelector(state => state.panel);\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 const renderNotifications = () => {\n if (panel[userName]) {\n if (panel[userName]['NOTIFICATIONS'] === 'yes') {\n return <Notifications />;\n }\n }\n }\n\n const renderSmallNavigation = () => {\n if (document.documentElement.clientWidth < 900) {\n return (<div className=\"top-panel small-device\">\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 </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 {renderNotifications()}\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 }\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 {renderNotifications()}\n <div className=\"edit-user\">\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 className=\"logout-button\"><button onClick={signOut}>{i18n['Log out']}</button></div>\n </div>\n </div>\n\n {renderSmallNavigation()}\n </div>\n );\n}\n\nexport default Panel;\n","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\n const topNavigation = () => {\n if (window.innerWidth > 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\">\n {i18n.Disk}\n <span><span className=\"stat\">{data.U_DISK}</span>&nbsp;{i18n.mb}</span>\n <div className=\"percent\" style={{ width: `${data.U_DISK_PERCENT}%` || '0%' }}></div>\n </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 {state.webMail && <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\">\n {i18n.Disk}\n <span><span className=\"stat\">{data.U_DISK}</span>{i18n.mb}</span>\n <div className=\"percent\" style={{ width: `${data.U_DISK_PERCENT}%` || '0%' }}></div>\n </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 {state.webmail && <Link\n to={{ pathname: `http://${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;\n","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.changeSearchTerm} />\n : <Mails {...props} changeSearchTerm={props.changeSearchTerm} />\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\">\n {i18n.Bandwidth}\n <span><span className=\"stat\">{data.U_BANDWIDTH}</span>{i18n.mb}</span>\n <div className=\"percent\" style={{ width: `${data.U_BANDWIDTH_PERCENT}%` || '0%' }}></div>\n </div>\n <div className=\"disk\">\n {i18n.Disk}: <span><span className=\"stat\">{data.U_DISK}</span>{i18n.mb}</span>\n <div className=\"percent\" style={{ width: `${data.U_DISK_PERCENT}%` || '0%' }}></div>\n </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 Container from '../ControlPanel/Container/Container';\nimport ListItem from '../ControlPanel/ListItem/ListItem';\nimport { useSelector } from 'react-redux';\nimport { Link } from 'react-router-dom';\n\nimport './User.scss';\n\nconst User = ({ data, toggleFav, handleModal, checkItem, logOut, logInAs }) => {\n const { i18n, userName } = 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 printLoginActionButton = user => {\n let currentUser = userName;\n if (currentUser === user) {\n return (\n <div>\n <button onClick={logOut}>{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={() => logInAs(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\">\n {i18n.Bandwidth}\n <span><span className=\"stat\">{data.U_BANDWIDTH}</span> {data.U_BANDWIDTH_MEASURE}</span>\n <div className=\"percent\" style={{ width: `${data.U_BANDWIDTH_PERCENT}%` || '0%' }}></div>\n </div>\n <div className=\"disk\">\n {i18n.Disk}: <span><span className=\"stat\">{data.U_DISK}</span> {data.U_DISK_MEASURE}</span>\n <div className=\"percent\" style={{ width: `${data.U_DISK_PERCENT}%` || '0%' }}></div>\n </div>\n <div className=\"sub-disk-stats\">\n <div>\n <div><span>{i18n.Web}:</span> <span><b>{data.U_DISK_WEB}</b> {data.U_DISK_WEB_MEASURE}</span></div>\n <div><span>{i18n.Mail}:</span> <span><b>{data.U_DISK_MAIL}</b> {data.U_DISK_MAIL_MEASURE}</span></div>\n </div>\n <div>\n <div><span>{i18n.Databases}:</span> <span><b>{data.U_DATABASES}</b> {data.U_DATABASES_MEASURE}</span></div>\n <div><span>{i18n['User Directories']}:</span> <span><b>{data.U_DISK_DIRS}</b> {data.U_DISK_DIRS_MEASURE}</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';\nimport { loginAs, logout } from 'src/actions/Session/sessionActions';\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} logOut={logOutHandler} logInAs={logInAsHandler} />;\n });\n }\n\n const logOutHandler = () => {\n setLoading(true);\n dispatch(logout()).then(() => setLoading(false));\n }\n\n const logInAsHandler = username => {\n setLoading(true);\n dispatch(loginAs(username)).then(() => setLoading(false));\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';\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().then(() => setLoading(false));\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(() => setLoading(false));\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.replace(/,/g, ', ')}</span></div>\n </div>\n <div>{data.IP}</div>\n <div className=\"stats\">\n <Container className=\"c-1 w-25\">\n <div className=\"bandwidth\">\n {i18n.Bandwidth}\n <span><span className=\"stat\">{data.U_BANDWIDTH_SIZE}</span>{data.U_BANDWIDTH_MEASURE}</span>\n <div className=\"percent\" style={{ width: `${data.U_BANDWIDTH_PERCENT}%` || '0%' }}></div>\n </div>\n <div className=\"disk\">\n {i18n.Disk}: <span><span className=\"stat\">{data.U_DISK_SIZE}</span>{data.U_DISK_MEASURE}</span>\n <div className=\"percent\" style={{ width: `${data.U_DISK_PERCENT}%` || '0%' }}></div>\n </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';\nimport { useHistory } from 'react-router-dom';\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 { panel } = useSelector(state => state.panel);\n const { userName } = useSelector(state => state.session);\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 webDomains: [],\n webFav: [],\n toggledAll: false,\n sorting: i18n.Date,\n order: \"descending\",\n selection: [],\n totalAmount: ''\n });\n\n useEffect(() => {\n if (panel[userName]['WEB_DOMAINS'] === '0') {\n return history.push('/');\n }\n\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';\nimport PerfectScrollbar from 'react-perfect-scrollbar';\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 <PerfectScrollbar>\n {renderMenuItems()}\n {renderExtraMenuItems()}\n </PerfectScrollbar>\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';\nimport HtmlParser from 'react-html-parser';\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 prefix: \"\",\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/?domain=${domain}&type=${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, prefix: result.data.prefix, 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 <h6><b>{state.prefix}</b></h6>\n <br />\n {\n state.loading\n ? <Spinner />\n : (\n <pre>\n {HtmlParser(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 { 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';\nimport QueryString from 'qs';\n\nconst ServiceInfo = () => {\n const { i18n, userName } = useSelector(state => state.session);\n const dispatch = useDispatch();\n const history = useHistory();\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 let queryParams = QueryString.parse(history.location.search, { ignoreQueryPrefix: true });\n\n if (!queryParams.srv) {\n fetchData('cpu');\n dispatch(addActiveElement('/list/server/service/?srv=cpu'));\n return;\n }\n\n if (!menuItems.find(item => item.service === queryParams.srv)) {\n dispatch(addActiveElement('/list/server/service/?srv=cpu'));\n history.push('/list/server/service/?srv=cpu');\n return;\n }\n\n fetchData(queryParams.srv);\n dispatch(addActiveElement(`/list/server/service/?srv=${queryParams.srv}`));\n }, [history.location.search]);\n\n const fetchData = serviceName => {\n setState({ ...state, loading: true });\n\n getServiceLogs(serviceName)\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/service/?srv=cpu',\n service: 'cpu',\n name: i18n['CPU']\n },\n {\n route: '/list/server/service/?srv=mem',\n service: 'mem',\n name: i18n['MEMORY']\n },\n {\n route: '/list/server/service/?srv=disk',\n service: 'disk',\n name: i18n['DISK']\n },\n {\n route: '/list/server/service/?srv=net',\n service: 'net',\n name: i18n['NETWORK']\n },\n {\n route: '/list/server/service/?srv=web',\n service: 'web',\n name: i18n['WEB']\n },\n {\n route: '/list/server/service/?srv=dns',\n service: 'dns',\n name: i18n['DNS']\n },\n {\n route: '/list/server/service/?srv=mail',\n service: 'mail',\n name: i18n['MAIL']\n },\n {\n route: '/list/server/service/?srv=db',\n service: '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 && ReactHtmlParser(state.data)}\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":""}