vesta/web/static/js/main.8c41693f.chunk.js.map
2021-11-23 00:45:37 +02:00

1 line
1.2 MiB

{"version":3,"sources":["reducers/MainNavigation/mainNavigationReducer.js","actions/MainNavigation/mainNavigationTypes.js","reducers/ControlPanelContent/controlPanelContentReducer.js","actions/ControlPanelContent/controlPanelContentTypes.js","reducers/Notification/notificationReducer.js","actions/Notification/notificationTypes.js","reducers/MenuCounters/menuCounterReducer.js","actions/MenuCounters/menuCounterTypes.js","reducers/UserSession/userSessionReducer.js","actions/UserSession/userSessionTypes.js","reducers/Session/sessionReducer.js","actions/Session/sessionTypes.js","reducers/rootReducer.js","components/Spinner/Spinner.jsx","components/Path/Dropdown/Dropdown.jsx","components/Path/Path.jsx","components/Lists/Row/Row.jsx","components/Lists/DirectoryList/DirectoryList.jsx","components/ProgressBar/ProgressBar.jsx","components/Hotkeys/Hotkeys.jsx","components/Modal/AddFile.jsx","components/Modal/AddDirectory.jsx","components/Modal/Rename.jsx","components/Modal/Delete.jsx","components/Modal/NothingSelected.jsx","components/Modal/Permissions.jsx","components/Modal/Move.jsx","components/Modal/Archive.jsx","components/Modal/Extract.jsx","components/Modal/Copy.jsx","components/Modal/Replace.jsx","components/Modal/Modal.jsx","components/Menu/Menu.jsx","FileManagerHelper.js","containers/FileManager/FileManager.js","components/Preview/Editor/Editor.jsx","components/Preview/Photo/Photo.jsx","components/Preview/Video/Video.jsx","components/Preview/Preview.jsx","actions/MainNavigation/mainNavigationActions.js","utils/token.js","ControlPanelService/Ip.js","components/ControlPanel/AddItemLayout/Form/SelectInput/SelectInput.jsx","components/ControlPanel/AddItemLayout/Form/TextInput/TextInput.jsx","components/ControlPanel/AddItemLayout/Form/Checkbox/Checkbox.jsx","components/ControlPanel/Container/Container.jsx","components/ControlPanel/AddItemLayout/AddItemLayout.jsx","components/MainNav/Toolbar/Toolbar.jsx","services/session.js","actions/MenuCounters/menuCounterActions.js","components/InternetProtocol/Edit/EditInternetProtocol.jsx","components/InternetProtocol/Add/AddInternetProtocol.jsx","components/ControlPanel/AddItemLayout/Form/TextArea/TextArea.jsx","ControlPanelService/Server.js","components/Server/Edit/Nginx/EditServerNginx.jsx","components/Server/Edit/Postgresql/Postgresql.jsx","ControlPanelService/Backup.js","components/Backup/Exclusion/Edit/index.jsx","actions/ControlPanelContent/controlPanelContentActions.js","components/MainNav/Toolbar/DropdownFilter/DropdownFilter.jsx","components/MainNav/Toolbar/SearchInput/SearchInput.jsx","ControlPanelService/Favorites.js","components/ControlPanel/ListItem/ListItem.jsx","components/InternetProtocol/InternetProtocol.jsx","components/MainNav/Toolbar/LeftButton/LeftButton.jsx","components/MainNav/Toolbar/Checkbox/Checkbox.jsx","components/MainNav/Toolbar/Select/Select.jsx","ControlPanelService/Select.js","components/ControlPanel/Modal/Modal.jsx","containers/InternetProtocols/InternetProtocols.jsx","ControlPanelService/Web.js","components/ControlPanel/AddItemLayout/Form/Password/Password.jsx","components/WebDomain/Add/AdditionalFtpForEditing/AdditionalFtpForEditing.jsx","components/WebDomain/Add/AdditionalFtpWrapper/AdditionalFtpWrapper.jsx","components/WebDomain/Add/SslSupport/SslSupport.jsx","components/WebDomain/Add/AdvancedOptions/AdvancedOptions.jsx","containers/GenerateCSR/index.jsx","components/WebDomain/Add/AddWebDomain.jsx","components/ControlPanel/AddItemLayout/Form/TextInputWithTextOnTheRight/TextInputWithTextOnTheRight.jsx","ControlPanelService/Db.js","components/Database/Edit/EditDatabase.jsx","ControlPanelService/Firewalls.js","components/Firewall/Edit/EditFirewall.jsx","components/ControlPanel/Hotkeys/Hotkeys.jsx","components/Database/Add/AddDatabase.jsx","components/Firewall/Add/AddFirewall.jsx","ControlPanelService/Cron.js","ControlPanelService/GeneratorOptions.js","components/CronJob/Generator/RunCommandSelect/RunCommandSelect.jsx","components/CronJob/Generator/OtherSelects/SecondTabSelects.jsx","components/CronJob/Generator/OtherSelects/ThirdTabSelects.jsx","components/CronJob/Generator/OtherSelects/FourthTabSelects.jsx","components/CronJob/Generator/OtherSelects/FifthTabSelects.jsx","components/CronJob/Generator/OtherSelects/SelectsWrapper.jsx","components/CronJob/Generator/Generator.jsx","components/CronJob/Edit/EditCronJob.jsx","components/ControlPanel/AddItemLayout/Form/TextInputWithExtraButton/TextInputWithExtraButton.jsx","components/ControlPanel/AddItemLayout/Form/NameServers/NameServers.jsx","ControlPanelService/Package.js","components/Package/Edit/EditPackage.jsx","components/Server/Edit/Httpd/EditHttpd.jsx","components/CronJob/Add/AddCronJob.jsx","components/Package/Add/AddPackage.jsx","components/Server/Edit/EditServerWebOption.jsx","components/Server/Edit/EditServerDnsOption.jsx","components/Server/Edit/EditVestaPlugins.jsx","components/Server/Edit/EditVestaSslOption.jsx","components/Server/Edit/EditDatabaseOption.jsx","components/Server/Edit/EditBackupOption.jsx","components/Server/Edit/EditMailOption.jsx","ControlPanelService/ResetPassword.js","actions/Session/sessionActions.js","components/Server/Edit/EditServer.jsx","components/Server/Edit/Dovecot/Dovecot.jsx","ControlPanelService/Mail.js","components/MailAccount/MailInfoBlock/MailInfoBlock.jsx","components/MailAccount/Edit/EditMailAccount.jsx","components/Mail/Edit/EditMail.jsx","containers/EditMailWrapper/EditMailWrapper.jsx","components/Server/Edit/Service/Service.jsx","components/MailAccount/Add/AddMailAccount.jsx","components/Mail/Add/AddMail.jsx","containers/AddMailWrapper/AddMailWrapper.jsx","ControlPanelService/Dns.js","components/DomainNameSystem/Edit/EditDomainNameSystem.jsx","components/DNSRecord/Edit/EditDNSRecord.jsx","containers/EditDNSWrapper/EditDNSWrapper.jsx","components/WebDomain/Edit/SslSupport/SslSupport.jsx","components/WebDomain/Edit/EditWeb.jsx","components/Server/Edit/PHP/EditPhp.jsx","components/Database/Database.jsx","containers/Databases/Databases.jsx","components/Firewall/Firewall.jsx","containers/Firewalls/Firewalls.jsx","ControlPanelService/Users.js","components/User/Edit/EditUser.jsx","components/Server/Edit/Bind9/Bind9.jsx","components/Server/Edit/Mysql/Mysql.jsx","ControlPanelService/UserNS.js","components/DomainNameSystem/Add/AdvancedOptions/AdvancedOptions.jsx","components/DomainNameSystem/Add/AddDomainNameSystem.jsx","components/DNSRecord/Add/AddDNSRecord.jsx","containers/AddDNSWrapper/AddDNSWrapper.jsx","components/Backup/RestoreSetting/RestoreSetting.jsx","components/Backup/RestoreSettings/BackupRestoreSettings.jsx","components/Backup/Backup.jsx","containers/Backups/Backups.jsx","containers/BackupWrapper/BackupWrapper.jsx","components/Firewall/Add/Banlist/index.jsx","components/CronJob/CronJob.jsx","containers/CronJobs/CronJobs.jsx","components/Package/Package.jsx","containers/Packages/Packages.jsx","ControlPanelService/Languages.js","components/User/Add/AddUser.jsx","ControlPanelService/Updates.js","components/Update/Update.jsx","containers/Updates/Updates.jsx","components/Server/ServerSys.jsx","components/Server/Server.jsx","containers/Servers/Servers.jsx","components/MainNav/Stat-menu/Menu.jsx","components/MainNav/Mobile/MobileTopNav.jsx","ControlPanelService/Notifications.js","components/MainNav/Panel/Notifications/Bell.jsx","components/MainNav/Panel/Notifications/BellUnread.jsx","components/MainNav/Panel/Notifications/Notifications.jsx","actions/Notification/notificationActions.js","components/MainNav/Panel/Panel.jsx","components/MainNav/MainNav.jsx","components/Backup/Exclusion/index.jsx","containers/Backups/Exclusions/index.jsx","components/MailAccount/MailAccount.jsx","containers/MailAccounts/MailAccounts.jsx","components/Mail/Mail.jsx","containers/Mails/Mails.jsx","containers/MailWrapper/MailWrapper.jsx","components/DNSRecord/DNSRecord.jsx","containers/DNSRecords/DNSRecords.jsx","components/DomainNameSystem/DomainNameSystem.jsx","containers/DomainNameSystems/DomainNameSystems.jsx","containers/DNSWrapper/DNSWrapper.jsx","ControlPanelService/Statistics.js","components/Statistic/Statistic.jsx","containers/Statistics/Statistics.jsx","components/User/User.jsx","containers/Users/Users.jsx","ControlPanelService/RRD.js","components/RRD/Timer/Timer.jsx","components/RRD/RRD.jsx","containers/RRDs/RRDs.jsx","components/Firewall/Ban/index.jsx","containers/Firewalls/Banlist/index.jsx","components/WebDomain/WebDomain.jsx","containers/Web/Web.jsx","ControlPanelService/Search.js","components/Searchitem/SearchItem.jsx","containers/Search/Search.jsx","ControlPanelService/Logs.js","components/Log/Log.jsx","containers/Logs/Logs.jsx","containers/ControlPanelContent/ControlPanelContent.jsx","components/TopPanel/TopPanel.jsx","ControlPanelService/WebLogs.js","containers/WebLogs/WebLogs.jsx","components/ControlPanel/LoginLayout/LoginLayout.jsx","components/Login/LoginForm.jsx","containers/ServiceInfo/index.jsx","components/ForgotPassword/index.jsx","containers/App/App.js","containers/App/serviceWorker.js","index.js","store.js"],"names":["INITIAL_STATE","focusedElement","activeElement","adminMenuTabs","userMenuTabs","reducer","state","action","type","value","controlPanelFocusedElement","notifications","notificationReducer","user","menuCounterReducer","session","userSessionReducer","token","error","i18n","userName","panel","sessionReducer","combineReducers","mainNavigation","mainNavigationReducer","controlPanelContent","controlPanelContentReducer","menuCounters","userSession","Spinner","className","role","aria-valuenow","aria-valuemin","aria-valuemax","style","width","Dropdown","props","sorting","useSelector","changeSorting","field","order","isActive","sort","size","date","name","class","data-toggle","aria-haspopup","aria-expanded","onClick","Path","path","openDirectory","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","replaceAll","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","sslCertificate","setModalVisible","sslKey","AdvancedOptions","sslSupport","statisticsAuthCheckbox","statisticsAuth","updatedDomain","aliases","transform","bool","renderSslSupport","webStats","stat","GenerateSSL","generatedData","newCsr","generateCSR","crt","csr","prePopulateInputs","email","country","locality","org","AddWebDomain","dnsSupport","mailSupport","proxySupport","showAdvancedOptions","ssl_crt","ssl_key","proxy_ext","getInternetProtocolNames","ips","stats","prefix","ftp_pre_path","checkboxHandler","input","newWebDomain","addWeb","WEB","required","Aliases","PROXY_SYSTEM","renderAdvancedOptions","TextInputWithTextOnTheRight","dbCharsets","EditDatabase","databaseUserInputValue","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","mysql","mail_url","mysql_hosts","printPhpMyAdminHosts","pgsql","pgsql_url","pgsql_hosts","EditBackupOption","remoteBackup","setRemoteBackup","backup","backup_gzip","backup_dir","backup_type","backup_host","backup_username","backup_password","backup_bpath","EditMailOption","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","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_BANDWIDTH","U_USERS","spnd","SUSPENDED_USERS","domains","U_WEB_ALIASES","SUSPENDED_WEB","U_DNS_DOMAINS","records","U_DNS_RECORDS","SUSPENDED_DNS","U_MAIL_DOMAINS","accounts","U_MAIL_ACCOUNTS","SUSPENDED_MAIL","U_DATABASES","SUSPENDED_DB","jobs","U_CRON_JOBS","SUSPENDED_CRON","U_BACKUPS","MobileTopNav","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","signOut","showTopNav","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_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","useParams","getServiceLogs","service_log","line","ReactHtmlParser","ForgotPassword","useLocation","completeStep1","completeStep2","password_confirm","reset","Submit","Confirm","Reset","library","Icon","App","AuthenticatedRoute","authenticated","render","ReactDOM","store","createStore","rootReducer","composeWithDevTools","applyMiddleware","thunk","navigator","serviceWorker","ready","registration","unregister"],"mappings":"w6EAEMA,EAAgB,CACpBC,eAAgB,GAChBC,cAAe,GACfC,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,MAqBFC,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,WAAoC,IAAnCR,EAAkC,uDAA1BN,EAAeO,EAAW,uCAC5D,OAAQA,EAAOC,MACb,ICR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K,SACvBynD,UAAWW,KACb,kBAAC4B,EAAD,CACE5nD,KAAK,IACL6nD,cAAetqD,EAAQK,SACvB6J,QAASA,EACT49C,UAAWL,QC5GP/hC,QACW,cAA7Bnb,OAAOsH,SAASoxB,UAEe,UAA7B14B,OAAOsH,SAASoxB,UAEhB14B,OAAOsH,SAASoxB,SAASj+B,MACvB,2DCTNwlD,IAASD,OACP,kBAAC,IAAD,CAAUE,MCJHC,sBACLC,EACAC,8BAAoBC,0BAAgBC,QDGpC,kBAAC,KAAD,KACE,kBAAC,GAAD,QAGJ/mD,SAASyL,eAAe,SDkHpB,kBAAmBu7C,WACrBA,UAAUC,cAAcC,MAAMz4C,MAAK,SAAA04C,GACjCA,EAAaC,mB","file":"static/js/main.8c41693f.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: null\n};\n\nconst notificationReducer = (state = INITIAL_STATE, action) => {\n switch (action.type) {\n case ADD_NOTIFICATIONS:\n return {\n ...state,\n notifications: action.value,\n };\n\n case REMOVE_NOTIFICATIONS:\n return {\n ...state,\n notifications: action.value,\n };\n\n default: return state;\n }\n};\n\nexport default notificationReducer;\n","export const ADD_NOTIFICATIONS = 'ADD_NOTIFICATIONS';\nexport const REMOVE_NOTIFICATIONS = 'REMOVE_NOTIFICATIONS';\n","import { REFRESH_COUNTERS } from 'src/actions/MenuCounters/menuCounterTypes';\n\nconst INITIAL_STATE = {\n user: {},\n};\n\nconst menuCounterReducer = (state = INITIAL_STATE, action) => {\n switch (action.type) {\n case REFRESH_COUNTERS:\n return {\n ...state,\n user: action.value.user,\n };\n\n default: return state;\n }\n};\n\nexport default menuCounterReducer;\n","export const REFRESH_COUNTERS = 'REFRESH_COUNTERS';","import { SET_USER_SESSION } from 'src/actions/UserSession/userSessionTypes';\n\nconst INITIAL_STATE = {\n session: {}\n};\n\nconst userSessionReducer = (state = INITIAL_STATE, action) => {\n switch (action.type) {\n case SET_USER_SESSION:\n return {\n ...state,\n session: action.value,\n };\n\n default: return state;\n }\n};\n\nexport default userSessionReducer;\n","export const SET_USER_SESSION = 'SET_USER_SESSION';","import { LOGGED_OUT_AS, LOGIN, LOGOUT, CHECK_AUTH } from '../../actions/Session/sessionTypes';\n\nconst INITIAL_STATE = {\n token: '',\n error: '',\n i18n: {},\n userName: '',\n panel: {}\n};\n\nconst sessionReducer = (state = INITIAL_STATE, action) => {\n switch (action.type) {\n case LOGIN:\n return {\n ...state,\n token: action.value.token,\n userName: action.value.userName,\n i18n: action.value.i18n || {},\n panel: action.value.panel,\n error: action.value.error\n };\n\n case LOGOUT:\n return {\n ...state,\n token: action.value.token,\n userName: action.value.userName,\n i18n: action.value.i18n || {},\n panel: action.value.panel,\n error: action.value.error\n };\n\n case LOGGED_OUT_AS:\n return {\n ...state,\n token: action.value.token,\n userName: action.value.userName,\n i18n: action.value.i18n || {},\n panel: action.value.panel,\n error: action.value.error\n };\n\n case CHECK_AUTH: return {\n ...state,\n token: action.value.token,\n userName: action.value.userName,\n i18n: action.value.i18n || {},\n panel: action.value.panel,\n error: action.value.error\n };\n\n default: return state;\n }\n};\n\nexport default sessionReducer;\n","export const LOGIN = 'LOGIN';\nexport const LOGOUT = 'LOGOUT';\nexport const LOGIN_AS = 'LOGIN_AS';\nexport const CHECK_AUTH = 'CHECK_AUTH';\nexport const LOGGED_OUT_AS = 'LOGGED_OUT_AS';\nexport const RESET_PASSWORD = 'RESET_PASSWORD';","import { combineReducers } from 'redux';\nimport mainNavigationReducer from './MainNavigation/mainNavigationReducer';\nimport controlPanelContentReducer from './ControlPanelContent/controlPanelContentReducer';\nimport notificationReducer from './Notification/notificationReducer';\nimport menuCounterReducer from './MenuCounters/menuCounterReducer';\nimport userSessionReducer from './UserSession/userSessionReducer';\nimport sessionReducer from './Session/sessionReducer';\n\nexport default combineReducers({\n mainNavigation: mainNavigationReducer,\n controlPanelContent: controlPanelContentReducer,\n notifications: notificationReducer,\n menuCounters: menuCounterReducer,\n userSession: userSessionReducer,\n session: sessionReducer,\n});","import React from 'react';\nimport './Spinner.scss';\n\nconst Spinner = () => {\n return (\n <div className=\"spinner-wrapper\">\n <div className=\"progress\">\n <div className=\"progress-bar progress-bar-striped progress-bar-animated\" role=\"progressbar\" aria-valuenow=\"100\" aria-valuemin=\"0\" aria-valuemax=\"100\" style={{ width: \"100%\" }}></div>\n </div>\n </div>\n );\n}\n\nexport default Spinner;","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport './Dropdown.scss';\n\nconst Dropdown = (props) => {\n const { i18n } = useSelector(state => state.session);\n\n const changeSorting = (field, order, props) => {\n if (!props.isActive) {\n return;\n } else {\n props.changeSorting(field, order);\n }\n }\n\n const sort = (sorting) => {\n if (sorting === \"Type\") {\n return i18n.type;\n } else if (sorting === \"Size\") {\n return i18n.size;\n } else if (sorting === \"Date\") {\n return i18n.date;\n } else if (sorting === \"Name\") {\n return i18n.name;\n }\n }\n\n const button = (sorting, order) => {\n if (order === \"descending\") {\n return (\n <button type=\"button\" className=\"btn btn-secondary\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\n {sort(sorting)}\n <span className=\"arrow-down\">&#8595;</span>\n </button>\n );\n } else {\n return (\n <button type=\"button\" className=\"btn btn-secondary\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\n {sort(sorting)}\n <span>&#8593;</span>\n </button>\n );\n }\n }\n\n return (\n <div class=\"btn-group\">\n {button(props.sorting, props.order)}\n <div class=\"dropdown-menu\">\n <ul className=\"dropdown-list\">\n <li>\n <span className={props.sorting === \"Type\" && props.order === \"descending\" ? \"dropdown-item active\" : \"dropdown-item\"} onClick={() => changeSorting(\"Type\", \"descending\", props)}>{i18n.type}<span className=\"arrow-down\">&#8595;</span></span>\n <span className={props.sorting === \"Type\" && props.order === \"ascending\" ? \"dropdown-item active\" : \"dropdown-item\"} onClick={() => changeSorting(\"Type\", \"ascending\", props)}><span>&#8593;</span></span>\n </li>\n <li>\n <span className={props.sorting === \"Size\" && props.order === \"descending\" ? \"dropdown-item active\" : \"dropdown-item\"} onClick={() => changeSorting(\"Size\", \"descending\", props)}>{i18n.size}<span className=\"arrow-down\">&#8595;</span></span>\n <span className={props.sorting === \"Size\" && props.order === \"ascending\" ? \"dropdown-item active\" : \"dropdown-item\"} onClick={() => changeSorting(\"Size\", \"ascending\", props)}><span>&#8593;</span></span>\n </li>\n <li>\n <span className={props.sorting === \"Date\" && props.order === \"descending\" ? \"dropdown-item active\" : \"dropdown-item\"} onClick={() => changeSorting(\"Date\", \"descending\", props)}>{i18n.date}<span className=\"arrow-down\">&#8595;</span></span>\n <span className={props.sorting === \"Date\" && props.order === \"ascending\" ? \"dropdown-item active\" : \"dropdown-item\"} onClick={() => changeSorting(\"Date\", \"ascending\", props)}><span>&#8593;</span></span>\n </li>\n <li>\n <span className={props.sorting === \"Name\" && props.order === \"descending\" ? \"dropdown-item active\" : \"dropdown-item\"} onClick={() => changeSorting(\"Name\", \"descending\", props)}>{i18n.name}<span className=\"arrow-down\">&#8595;</span></span>\n <span className={props.sorting === \"Name\" && props.order === \"ascending\" ? \"dropdown-item active\" : \"dropdown-item\"} onClick={() => changeSorting(\"Name\", \"ascending\", props)}><span>&#8593;</span></span>\n </li>\n </ul>\n </div>\n </div>\n );\n}\n\nexport default Dropdown;","import React, { 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';\n\nexport const refreshCounters = () => (dispatch, getState) => {\n return new Promise((resolve, reject) => {\n checkAuth()\n .then(res => {\n const { data, token } = res.data;\n\n if (token) setAuthToken(token);\n\n dispatch({\n type: REFRESH_COUNTERS,\n value: {\n user: data\n }\n });\n\n resolve(token);\n })\n .catch(err => {\n reject();\n console.error(err);\n });\n });\n}\n","import React, { useEffect, useState } from 'react';\n\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport { getInternetProtocolInfo, updateInternetProtocol } from '../../../ControlPanelService/Ip';\nimport SelectInput from '../../ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport TextInput from '../../ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport Checkbox from '../../ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from '../../../components/Spinner/Spinner';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\nimport QS from 'qs';\n\nimport './EditInternetProtocol.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nconst EditInternetProtocol = () => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n loading: false,\n dedicated: false\n });\n\n useEffect(() => {\n let queryParams = QS.parse(history.location.search, { ignoreQueryPrefix: true });\n const { ip } = queryParams;\n\n dispatch(addActiveElement('/list/ip/'));\n dispatch(removeFocusedElement());\n\n if (ip) {\n setState({ ...state, loading: true });\n fetchData(ip);\n }\n }, []);\n\n const fetchData = ip => {\n getInternetProtocolInfo(ip)\n .then(response => {\n setState({\n ...state,\n data: response.data,\n dedicated: !response.data.dedicated,\n loading: false\n });\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err)\n });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedIP = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedIP[name] = value;\n }\n\n updatedIP['token'] = token;\n updatedIP['save'] = 'save';\n updatedIP['v_ip'] = state.data.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.replaceAll(',', ', ')}</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 }\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 { Link } from 'react-router-dom';\nimport TextArea from 'src/components/ControlPanel/AddItemLayout/Form/TextArea/TextArea';\n\nimport './SslSupport.scss';\n\nconst SslSupport = props => {\n const { i18n } = useSelector(state => state.session);\n const [letsEncrypt, setLetsEncrypt] = useState(false);\n\n return (\n <div className=\"ssl-support\">\n <div className=\"form-group\">\n <div className=\"checkbox-wrapper\">\n <input\n type=\"checkbox\"\n name=\"v_letsencrypt\"\n id=\"lets-encrypt\"\n checked={letsEncrypt}\n onChange={() => setLetsEncrypt(!letsEncrypt)} />\n <label htmlFor=\"lets-encrypt\">{i18n['Lets Encrypt Support']}</label>\n </div>\n <span className=\"lets-encrypt-span\">{letsEncrypt ? i18n['Your certificate will be automatically issued in 5 minutes'] : null}</span>\n </div>\n\n <input type=\"hidden\" value=\"same\" name=\"v_ssl_home\" />\n\n <TextArea\n id=\"ssl-certificate\"\n name=\"v_ssl_crt\"\n title={i18n['SSL Certificate']}\n value={props.sslCertificate}\n disabled={letsEncrypt}\n optionalTitle={<>/ <button type=\"button\" onClick={() => props.setModalVisible(true)} className=\"generate-csr\">{i18n['Generate CSR']}</button></>} />\n\n <div class=\"form-group\">\n <label htmlFor=\"aliases\">{i18n['SSL Key']}</label>\n <textarea class=\"form-control\" id=\"ssl_key\" rows=\"3\" name=\"v_ssl_key\" defaultValue={props.sslKey} disabled={letsEncrypt}></textarea>\n </div>\n\n <div class=\"form-group\">\n <label htmlFor=\"aliases\">{i18n['SSL Certificate Authority / Intermediate']}</label>\n <textarea class=\"form-control\" id=\"ssl_ca\" rows=\"3\" name=\"v_ssl_ca\" disabled={letsEncrypt}></textarea>\n </div>\n </div>\n );\n}\n\nexport default SslSupport;\n","import React, { useEffect, useState } from 'react';\nimport { useSelector } from 'react-redux';\nimport Password from '../../../../components/ControlPanel/AddItemLayout/Form/Password/Password';\nimport AdditionalFtpWrapper from '../AdditionalFtpWrapper/AdditionalFtpWrapper';\nimport Checkbox from 'src/components/ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport SslSupport from '../SslSupport/SslSupport';\n\nimport './AdvancedOptions.scss';\n\nconst AdvancedOptions = ({ prefixI18N, prePath, ...props }) => {\n const { i18n } = useSelector(state => state.session);\n const [state, setState] = useState({\n sslSupport: false,\n additionalFtp: false,\n statisticsAuthCheckbox: false,\n statisticsAuth: false,\n });\n\n useEffect(() => {\n let updatedDomain = `www.${props.domain}`;\n setState({ ...state, aliases: updatedDomain });\n }, [props.domain]);\n\n const renderSslSupport = () => {\n if (state.sslSupport) {\n return <SslSupport sslCertificate={props.sslCertificate} sslKey={props.sslKey} setModalVisible={bool => props.setModalVisible(bool)} />;\n }\n }\n\n const renderWebStats = () => {\n return props.webStats.map(stat => <option value={stat}>{stat}</option>);\n }\n\n const onChangeWebStatsSelect = value => {\n if (value !== 'none') {\n setState({ ...state, statisticsAuth: true });\n } else {\n setState({ ...state, statisticsAuth: false, statisticsAuthCheckbox: false });\n }\n }\n\n return (\n <div style={{ transform: 'translateX(3rem)' }}>\n <div className=\"form-group\">\n <div className=\"checkbox-wrapper\">\n <input\n type=\"checkbox\"\n name=\"v_ssl\"\n id=\"ssl-support\"\n checked={state.sslSupport}\n onChange={() => setState({ ...state, sslSupport: !state.sslSupport })} />\n <label htmlFor=\"ssl-support\">{i18n['SSL Support']}</label>\n </div>\n </div>\n\n {renderSslSupport()}\n\n <div class=\"form-group\">\n <label htmlFor=\"web-stats\">{i18n['Web Statistics']}</label>\n <select class=\"form-control\" id=\"web-stats\" name=\"v_stats\" onChange={event => onChangeWebStatsSelect(event.target.value)}>\n {renderWebStats()}\n </select>\n </div>\n\n <div className={`form-group statistics-authorization ${state.statisticsAuth ? 'show' : 'hide'}`}>\n <div className=\"checkbox-wrapper\">\n <input\n type=\"checkbox\"\n name=\"v_stats_auth\"\n id=\"stats-auth\"\n checked={state.statisticsAuthCheckbox}\n onChange={() => setState({ ...state, statisticsAuthCheckbox: !state.statisticsAuthCheckbox })} />\n <label htmlFor=\"stats-auth\">{i18n['Statistics Authorization']}</label>\n </div>\n </div>\n\n <div className={state.statisticsAuthCheckbox ? 'show web-stats-wrapper' : 'hide'}>\n <div className=\"form-group\">\n <label htmlFor=\"stats-user\">{i18n.Username}</label>\n <input type=\"text\" className=\"form-control\" id=\"stats-user\" name=\"v_stats_user\" />\n </div>\n\n <Password name='v_stats_password' />\n </div>\n\n <Checkbox\n onChange={checked => setState({ ...state, additionalFtp: checked })}\n name=\"v_ftp\"\n id=\"add-ftp\"\n checked={state.additionalFtp}\n title={i18n['Additional FTP Account']} />\n\n <AdditionalFtpWrapper\n checked={state.additionalFtp}\n prefixI18N={prefixI18N}\n ftps={[{ id: 1, deleted: false, is_new: 1 }]}\n ftpUserPrePath={prePath}\n unCheckAdditionalFtpBox={() => setState({ ...state, additionalFtp: false })} />\n </div>\n );\n}\n\nexport default AdvancedOptions;\n","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"src/actions/MainNavigation/mainNavigationActions\";\nimport TextInput from 'src/components/ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport AddItemLayout from 'src/components/ControlPanel/AddItemLayout/AddItemLayout';\nimport TextArea from 'src/components/ControlPanel/AddItemLayout/Form/TextArea/TextArea';\nimport { generateCSR, getCsrInitialData } from 'src/ControlPanelService/Web';\nimport { useDispatch, useSelector } from 'react-redux';\nimport Spinner from 'src/components/Spinner/Spinner';\nimport { useHistory } from 'react-router-dom';\nimport HtmlParser from 'react-html-parser';\n\nconst GenerateSSL = props => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n generatedData: {},\n loading: false,\n domain: ''\n });\n\n useEffect(() => {\n const { domain } = props;\n\n dispatch(addActiveElement('/list/web/'));\n dispatch(removeFocusedElement());\n\n if (domain) {\n fetchData(domain);\n } else {\n fetchData();\n }\n }, []);\n\n const fetchData = (domain = '') => {\n getCsrInitialData(domain)\n .then(response => {\n setState({\n ...state,\n domain,\n generatedData: {},\n data: response.data,\n loading: false\n });\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err);\n });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let newCsr = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n newCsr[name] = value;\n }\n\n newCsr['generate'] = 'generate';\n\n if (Object.keys(newCsr).length !== 0 && newCsr.constructor === Object) {\n setState({ ...state, loading: true });\n\n generateCSR(newCsr)\n .then(result => {\n if (result.status === 200) {\n const { error_msg: errorMessage, ok_msg: okMessage, crt, key, csr } = result.data;\n\n if (errorMessage) {\n setErrorMessage(errorMessage);\n setOkMessage('');\n setState({ ...state, generatedData: {}, loading: false });\n } else {\n setErrorMessage('');\n setOkMessage(okMessage);\n\n setState({ ...state, generatedData: { crt, key, csr }, loading: false });\n }\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n return (\n <div className=\"edit-template edit-user\">\n <AddItemLayout date={state.data.date} time={state.data.time} status={state.data.status}>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"add-user\">\n <input type=\"hidden\" name=\"token\" value={token} />\n\n {\n Object.entries(state.generatedData).length\n ? (<>\n <TextArea\n id=\"csr\"\n name=\"v_csr\"\n title={i18n['SSL CSR']}\n defaultValue={state.generatedData.csr} />\n\n <TextArea\n id=\"crt\"\n name=\"v_crt\"\n title={i18n['SSL Certificate']}\n defaultValue={state.generatedData.crt} />\n\n <TextArea\n id=\"v_key\"\n name=\"key\"\n title={i18n['SSL Key']}\n defaultValue={state.generatedData.key} />\n\n <div className=\"buttons-wrapper\">\n <button type=\"button\" className=\"add\" onClick={() => props.prePopulateInputs(state.generatedData)}>{i18n.Add}</button>\n <button type=\"button\" className=\"back\" onClick={props.closeModal}>{i18n.Back}</button>\n </div>\n </>)\n : (<>\n <TextInput id=\"domain\" name=\"v_domain\" title={i18n['Domain']} value={state.data.domain} />\n\n <TextInput id=\"email\" name=\"v_email\" title={i18n['Email']} value={state.data.email} />\n\n <TextInput id=\"country\" name=\"v_country\" title={i18n['Country']} optionalTitle={`(${i18n['2 letter code']})`} value={state.data.country} />\n\n <TextInput id=\"state\" name=\"v_state\" title={i18n['State / Province']} value={state.data.state} />\n\n <TextInput id=\"locality\" name=\"v_locality\" title={i18n['City / Locality']} value={state.data.locality} />\n\n <TextInput id=\"org\" name=\"v_org\" title={i18n['Organization']} value={state.data.org} />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Generate}</button>\n <button type=\"button\" className=\"back\" onClick={props.closeModal}>{i18n.Back}</button>\n </div>\n </>)\n }\n\n <div className=\"error\"><span className=\"error-message\">{errorMessage}</span></div>\n <div className=\"success\">\n <span className=\"ok-message\"><span>{HtmlParser(okMessage)}</span> </span>\n </div>\n </form>\n }\n </AddItemLayout>\n </div >\n );\n}\n\nexport default GenerateSSL;\n","import React, { useEffect, useState } from 'react';\n\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { addWeb, getWebDomainInfo } from '../../../ControlPanelService/Web';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport AdvancedOptions from './AdvancedOptions/AdvancedOptions';\nimport Checkbox from 'src/components/ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport TextArea from 'src/components/ControlPanel/AddItemLayout/Form/TextArea/TextArea';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport Spinner from '../../Spinner/Spinner';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './AddWebDomain.scss';\nimport GenerateSSL from 'src/containers/GenerateCSR';\nimport 'src/components/Modal/Modal.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nconst AddWebDomain = props => {\n const { i18n, panel, userName } = useSelector(state => state.session);\n const { session } = useSelector(state => state.userSession);\n const dispatch = useDispatch();\n const token = localStorage.getItem(\"token\");\n const [modalVisible, setModalVisible] = useState(false);\n const history = useHistory();\n const [state, setState] = useState({\n loading: false,\n dnsSupport: true,\n mailSupport: true,\n proxySupport: true,\n showAdvancedOptions: false,\n okMessage: '',\n ssl_crt: '',\n ssl_key: '',\n domain: '',\n errorMessage: '',\n webStats: [],\n prefixI18N: '',\n prePath: '',\n 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 { i18n } = useSelector(state => state.session);\n\n const printPhpMyAdminHosts = () => {\n if (data.mysql_hosts.length) {\n return data.mysql_hosts.map((host, index) => (\n <div className=\"hosts\">\n <TextInput\n title={`${i18n['Host']} #${index + 1}`}\n value={host['HOST']}\n name=\"v_mysql_host\"\n id=\"mysql_host\"\n disabled />\n\n <TextInput\n title={i18n['Password']}\n name=\"v_mysql_password\"\n id=\"mysql_password\" />\n\n <TextInput\n title={i18n['Maximum Number Of Databases']}\n value={host['MAX_DB']}\n name=\"v_mysql_max\"\n id=\"mysql_max\"\n disabled />\n\n <TextInput\n title={i18n['Current Number Of Databases']}\n value={host['U_DB_BASES']}\n name=\"v_mysql_max\"\n id=\"current-databases\"\n disabled />\n </div>\n ));\n }\n }\n\n const printPgSqlHosts = () => {\n return data.pgsql_hosts.map((host, index) => (\n <div className=\"hosts\">\n <TextInput\n title={`${i18n['Host']} #${index + 1}`}\n value={host['HOST']}\n name=\"v_pgsql_host\"\n id=\"pgsql_host\"\n disabled />\n\n <TextInput\n title={i18n['Maximum Number Of Databases']}\n value={host['MAX_DB']}\n name=\"v_psql_max\"\n id=\"psql_max\"\n disabled />\n\n <TextInput\n title={i18n['Current Number Of Databases']}\n value={host['U_DB_BASES']}\n name=\"v_pgsql_max\"\n id=\"pgsql_current\"\n disabled />\n </div>\n ));\n }\n\n return (\n <div className=\"server-mail-option\" style={{ display: `${visible ? 'block' : 'none'}` }}>\n <SelectInput\n optionalTitle={<Link to=\"/edit/server/mysql\">{i18n['configure']}</Link>}\n title={i18n['MySQL Support'] + ' / '}\n selected={data.mysql}\n options={[i18n['no'], i18n['yes']]}\n name=\"v_mysql\"\n id=\"mysql\"\n disabled />\n\n {\n data.mysql === 'yes' && (\n <>\n <TextInput\n title={i18n['phpMyAdmin URL']}\n value={data.mail_url}\n name=\"v_mysql_url\"\n id=\"mysql_url\" />\n\n {printPhpMyAdminHosts()}\n </>\n )\n }\n\n <SelectInput\n optionalTitle={<Link to=\"/edit/server/postgresql\">{i18n['configure']}</Link>}\n title={i18n['PostgreSQL Support'] + ' / '}\n selected={data.pgsql}\n options={[i18n['no'], i18n['yes']]}\n name=\"v_pgsql\"\n id=\"pgsql\"\n disabled />\n\n {\n data.pgsql === 'yes' && (\n <>\n <TextInput\n title={i18n['phpPgAdmin URL']}\n value={data.pgsql_url}\n name=\"v_pgsql_url\"\n id=\"pgsql_url\" />\n\n {printPgSqlHosts()}\n </>\n )\n }\n </div>\n );\n}\n\nexport default EditDatabaseOption;","import React, { useState } from 'react';\n\nimport SelectInput from 'src/components/ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport TextInput from 'src/components/ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { useSelector } from 'react-redux';\n\nconst EditBackupOption = ({ data, visible }) => {\n const { i18n } = useSelector(state => state.session);\n const [remoteBackup, setRemoteBackup] = useState(false);\n\n return (\n <div className=\"server-dns-option\" style={{ display: `${visible ? 'block' : 'none'}` }}>\n <SelectInput\n options={['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 { i18n } = useSelector(state => state.session);\n const [mailCertificateSystem, setMailCertificateSystem] = useState(false);\n\n useEffect(() => {\n if (data.mail_certificate) {\n setMailCertificateSystem(true);\n }\n }, []);\n\n const getMailCertificateOptions = () => {\n let result = ['', ...data.ssl_domains];\n return result;\n }\n\n return (\n <div className=\"server-mail-option\" style={{ display: `${visible ? 'block' : 'none'}` }}>\n <TextInput\n optionalTitle={<Link to={`/edit/server/${data.mail_system}`}>{i18n['configure']}</Link>}\n title={i18n['MAIL Server'] + ' / '}\n name=\"v_mail_system\"\n value={data.mail_system}\n id=\"mail_system\"\n disabled />\n\n {\n data.antivirus_system && (\n <TextInput\n optionalTitle={<Link to={`/edit/server/${data.antivirus_system}`}>{i18n['configure']}</Link>}\n title={i18n['Antivirus'] + ' / '}\n name=\"v_antivirus_system\"\n value={data.antivirus_system}\n id=\"antivirus_system\"\n disabled />\n )\n }\n\n {\n data.antispam_system && (\n <TextInput\n optionalTitle={<Link to={`/edit/server/${data.antispam_system}`}>{i18n['configure']}</Link>}\n title={i18n['DNS Server'] + ' / '}\n name=\"v_antispam_system\"\n value={data.antispam_system}\n id=\"antispam_system\"\n disabled />\n )\n }\n\n <TextInput\n title={i18n['Webmail URL']}\n name=\"v_mail_url\"\n value={data.mail_url}\n id=\"mail-url\" />\n\n <br /><br />\n\n <Checkbox\n onChange={checked => setMailCertificateSystem(checked)}\n title={i18n['Use Web Domain SSL Certificate']}\n name=\"v_mail_ssl_domain_checkbox\"\n id=\"mail-ssl-domain-checkbox\"\n checked={!!data.mail_certificate} />\n\n {\n mailCertificateSystem && (\n <div className=\"mail-cert-info\">\n <SelectInput\n options={getMailCertificateOptions()}\n selected={data.mail_certificate}\n name=\"v_mail_ssl_domain\"\n title={i18n['Domain']}\n id=\"mail-ssl-domain\" />\n\n <div className=\"additional-info\">\n {\n data.sys_ssl_subject && (\n <div>\n <span>{i18n['SUBJECT']}:</span>\n <span>{data.sys_ssl_subject}</span>\n </div>\n )\n }\n\n {\n data.sys_ssl_aliases && (\n <div>\n <span>{i18n['ALIASES']}:</span>\n <span>{data.sys_ssl_aliases}</span>\n </div>\n )\n }\n\n {\n data.sys_ssl_not_before && (\n <div>\n <span>{i18n['NOT_BEFORE']}:</span>\n <span>{data.sys_ssl_not_before}</span>\n </div>\n )\n }\n\n {\n data.sys_ssl_not_after && (\n <div>\n <span>{i18n['NOT_AFTER']}:</span>\n <span>{data.sys_ssl_not_after}</span>\n </div>\n )\n }\n\n {\n data.sys_ssl_signature && (\n <div>\n <span>{i18n['SIGNATURE']}:</span>\n <span>{data.sys_ssl_signature}</span>\n </div>\n )\n }\n\n {\n data.sys_ssl_pub_key && (\n <div>\n <span>{i18n['PUB_KEY']}:</span>\n <span>{data.sys_ssl_pub_key}</span>\n </div>\n )\n }\n\n {\n data.sys_ssl_issuer && (\n <div>\n <span>{i18n['ISSUER']}:</span>\n <span>{data.sys_ssl_issuer}</span>\n </div>\n )\n }\n </div>\n </div>\n )\n }\n </div>\n );\n}\n\nexport default EditMailOption;","import axios from \"axios\";\n\nconst BASE_URL = window.location.origin;\nconst resetPasswordUri = '/api/v1/reset/index.php';\n\nexport const resetPassword = (user = '', code = '', password = '', confirmPassword = '') => {\n const formData = new FormData();\n\n if (password) {\n formData.append('password', password);\n }\n\n if (confirmPassword) {\n formData.append('password_confirm', confirmPassword);\n }\n\n if (user) {\n formData.append('user', user);\n }\n\n if (code) {\n formData.append('code', code);\n }\n\n return axios.post(BASE_URL + resetPasswordUri, formData);\n};\n","import { LOGIN, LOGOUT, LOGGED_OUT_AS, CHECK_AUTH, RESET_PASSWORD } from './sessionTypes';\nimport { checkAuth, signIn, signInAs, signOut } from 'src/services/session';\nimport { resetPassword } from 'src/ControlPanelService/ResetPassword';\nimport { resetAuthToken, setAuthToken } from 'src/utils/token';\nimport { REFRESH_COUNTERS } from '../MenuCounters/menuCounterTypes';\nimport { SET_USER_SESSION } from '../UserSession/userSessionTypes';\n\nconst LOGOUT_RESPONSE = 'logged_out';\nconst LOGOUT_AS_RESPONSE = 'logged_out_as';\n\nexport const login = (user, password) => dispatch => {\n return new Promise((resolve, reject) => {\n signIn({ user, password }).then((response) => {\n const { error, session, token, panel, data, user, i18n } = response.data;\n\n if (token) setAuthToken(token);\n\n dispatch({\n type: LOGIN,\n value: {\n token: token || '',\n panel,\n i18n: i18n || {},\n userName: user,\n error\n },\n });\n dispatch({\n type: REFRESH_COUNTERS,\n value: {\n user: data,\n }\n });\n dispatch({\n type: SET_USER_SESSION,\n value: session\n });\n resolve(token);\n }, (error) => {\n reject(error);\n });\n });\n}\n\nexport const reset = ({ user = '', code = '', password = '', password_confirm = '' }) => dispatch => {\n return new Promise((resolve, reject) => {\n resetPassword(user, code, password, password_confirm).then((response) => {\n const { error, session, token, panel, user } = response.data;\n\n dispatch({\n type: RESET_PASSWORD,\n value: {\n token,\n panel,\n userName: user,\n error\n },\n });\n dispatch({\n type: REFRESH_COUNTERS,\n value: {\n user: {},\n }\n });\n dispatch({\n type: SET_USER_SESSION,\n value: session\n });\n resolve(token);\n }, (error) => {\n reject(error);\n });\n });\n}\n\nexport const loginAs = username => dispatch => {\n return new Promise((resolve, reject) => {\n signInAs(username).then((response) => {\n const { error, token, session, panel, data, user, i18n } = response.data;\n if (token) setAuthToken(token);\n\n dispatch({\n type: LOGIN,\n value: {\n userName: user,\n i18n,\n panel,\n token,\n error\n }\n });\n dispatch({\n type: REFRESH_COUNTERS,\n value: {\n user: data,\n }\n });\n dispatch({\n type: SET_USER_SESSION,\n value: session\n });\n\n resolve(token);\n }, (error) => {\n console.error(error);\n reject();\n });\n });\n}\n\nexport const logout = () => (dispatch, getState) => {\n return new Promise((resolve, reject) => {\n signOut().then((response) => {\n const { logout_response, error, userName, user, i18n, session, panel } = response.data;\n\n if (logout_response === LOGOUT_RESPONSE) {\n resetAuthToken();\n\n dispatch({\n type: LOGOUT,\n value: {\n userName: '',\n token: '',\n panel: {},\n session: {},\n i18n: [],\n error,\n },\n });\n dispatch({\n type: REFRESH_COUNTERS,\n value: {\n user: {},\n }\n });\n dispatch({\n type: SET_USER_SESSION,\n value: {}\n });\n\n resolve();\n } else if (logout_response === LOGOUT_AS_RESPONSE) {\n dispatch({\n type: LOGGED_OUT_AS,\n value: {\n userName,\n panel,\n token: '',\n i18n,\n error,\n },\n });\n dispatch({\n type: REFRESH_COUNTERS,\n value: {\n user,\n }\n });\n dispatch({\n type: SET_USER_SESSION,\n value: session\n });\n\n resolve();\n } else {\n resolve(`Error while signing out: ${logout_response}`);\n }\n }, (error) => {\n console.error(error);\n reject();\n });\n });\n}\n\nexport const checkAuthHandler = () => (dispatch, getState) => {\n return new Promise((resolve, reject) => {\n checkAuth()\n .then(res => {\n const { user, data, session, panel, error, i18n, token } = res.data;\n\n if (token) setAuthToken(token);\n\n dispatch({\n type: CHECK_AUTH,\n value: {\n userName: user,\n i18n,\n panel,\n token,\n error\n }\n });\n dispatch({\n type: REFRESH_COUNTERS,\n value: {\n user: data,\n }\n });\n dispatch({\n type: SET_USER_SESSION,\n value: session\n });\n\n resolve(token);\n })\n .catch(err => {\n reject();\n console.error(err);\n });\n });\n}\n\nexport const refreshUserSession = () => (dispatch, getState) => {\n return new Promise((resolve, reject) => {\n checkAuth()\n .then(res => {\n const { session, token } = res.data;\n\n if (token) setAuthToken(token);\n dispatch({\n type: SET_USER_SESSION,\n value: session\n });\n\n resolve(token);\n })\n .catch(err => {\n reject();\n console.error(err);\n });\n });\n}\n\nexport const removeToken = () => {\n return {\n type: LOGOUT,\n value: {\n token: '',\n error: ''\n }\n }\n}\n","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport { getServerAdditionalInfo, updateService } from '../../../ControlPanelService/Server';\nimport SelectInput from '../../ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport TextInput from '../../ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from '../../../components/Spinner/Spinner';\nimport EditServerWebOption from './EditServerWebOption';\nimport EditServerDnsOption from './EditServerDnsOption';\nimport EditVestaPluginsOption from './EditVestaPlugins';\nimport EditVestaSslOption from './EditVestaSslOption';\nimport EditDatabaseOption from './EditDatabaseOption';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport EditBackupOption from './EditBackupOption';\nimport EditMailOption from './EditMailOption';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './EditServer.scss';\nimport { Helmet } from 'react-helmet';\nimport HtmlParser from 'react-html-parser';\nimport { refreshUserSession } from 'src/actions/Session/sessionActions';\n\nconst EditServer = props => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const { session } = useSelector(state => state.userSession);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n loading: false,\n webOption: false,\n dnsOption: false,\n mailOption: false,\n backupOption: false,\n sslOption: false,\n pluginsOption: false,\n dbOption: false\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/server/'));\n dispatch(removeFocusedElement());\n\n setState({ ...state, loading: true });\n fetchData();\n }, []);\n\n const fetchData = () => {\n getServerAdditionalInfo()\n .then(response => {\n setState({\n ...state,\n data: response.data,\n loading: false\n });\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err);\n });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedServer = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedServer[name] = value;\n }\n\n 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 {/* <TextInput\n value={state.data.port}\n title={i18n['Default Port'] ?? 'Default Port'}\n name=\"port\"\n id=\"port\" /> */}\n\n <div className=\"modules\">\n <button type=\"button\" onClick={() => toggleOption('webOption')}>\n {i18n['WEB']}\n {state.webOption ? <FontAwesomeIcon icon=\"caret-up\" /> : <FontAwesomeIcon icon=\"caret-down\" />}\n </button>\n\n <EditServerWebOption\n webBackendPool={state.data.web_backend_pool}\n proxySystem={state.data.proxy_system}\n webBackend={state.data.web_backend}\n webSystem={state.data.web_system}\n visible={state.webOption} />\n\n <button type=\"button\" onClick={() => toggleOption('dnsOption')}>\n {i18n['DNS']}\n {state.dnsOption ? <FontAwesomeIcon icon=\"caret-up\" /> : <FontAwesomeIcon icon=\"caret-down\" />}\n </button>\n\n <EditServerDnsOption\n selected={state.data.v_dns_cluster}\n dnsCluster={state.data.dns_cluster}\n dnsSystem={state.data.dns_system}\n visible={state.dnsOption} />\n\n <button type=\"button\" onClick={() => toggleOption('mailOption')}>\n {i18n['MAIL']}\n {state.mailOption ? <FontAwesomeIcon icon=\"caret-up\" /> : <FontAwesomeIcon icon=\"caret-down\" />}\n </button>\n\n <EditMailOption data={state.data} visible={state.mailOption} />\n\n <button type=\"button\" onClick={() => toggleOption('dbOption')}>\n {i18n['DB']}\n {state.dbOption ? <FontAwesomeIcon icon=\"caret-up\" /> : <FontAwesomeIcon icon=\"caret-down\" />}\n </button>\n\n <EditDatabaseOption data={state.data} visible={state.dbOption} />\n\n <button type=\"button\" onClick={() => toggleOption('backupOption')}>\n {i18n['BACKUP']}\n {state.backupOption ? <FontAwesomeIcon icon=\"caret-up\" /> : <FontAwesomeIcon icon=\"caret-down\" />}\n </button>\n\n <EditBackupOption data={state.data} visible={state.backupOption} />\n\n <button type=\"button\" onClick={() => toggleOption('sslOption')}>\n {i18n['Vesta SSL']}\n {state.sslOption ? <FontAwesomeIcon icon=\"caret-up\" /> : <FontAwesomeIcon icon=\"caret-down\" />}\n </button>\n\n <EditVestaSslOption data={state.data} visible={state.sslOption} />\n\n <button type=\"button\" onClick={() => toggleOption('pluginsOption')}>\n {i18n['Vesta Control Panel Plugins']}\n {state.pluginsOption ? <FontAwesomeIcon icon=\"caret-up\" /> : <FontAwesomeIcon icon=\"caret-down\" />}\n </button>\n\n <EditVestaPluginsOption data={state.data} visible={state.pluginsOption} />\n </div>\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/server/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div>\n );\n}\n\nexport default EditServer;\n","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"../../../../actions/MainNavigation/mainNavigationActions\";\nimport Checkbox from '../../../ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport TextArea from '../../../ControlPanel/AddItemLayout/Form/TextArea/TextArea';\nimport { getServiceInfo, updateService } from 'src/ControlPanelService/Server';\nimport AddItemLayout from '../../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from '../../../../components/Spinner/Spinner';\nimport Toolbar from '../../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './Dovecot.scss';\nimport { Helmet } from 'react-helmet';\nimport HtmlParser from 'react-html-parser';\n\nconst Dovecot = () => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n loading: false\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/server/'));\n dispatch(removeFocusedElement());\n\n setState({ ...state, loading: true });\n fetchData();\n }, []);\n\n const fetchData = () => {\n getServiceInfo('dovecot')\n .then(response => {\n if (!response.data.config) {\n history.push('/list/server');\n }\n\n setState({\n ...state,\n data: response.data,\n loading: false\n });\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err);\n });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedService = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedService[name] = value;\n }\n\n if (Object.keys(updatedService).length !== 0 && updatedService.constructor === Object) {\n setState({ ...state, loading: true });\n\n updateService(updatedService, '/dovecot')\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n setErrorMessage(error_msg || '');\n setOkMessage(ok_msg || '');\n }\n })\n .then(() => fetchData())\n .catch(err => console.error(err));\n }\n }\n\n return (\n <div className=\"edit-template edit-dovecot\">\n <Helmet>\n <title>{`Vesta - ${i18n.SERVER}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">\n {i18n['Configuring Server']} / {state.data.service_name}\n </div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}\n </span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"edit-dovecot\">\n <input type=\"hidden\" name=\"save\" value=\"save\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <TextArea\n defaultValue={state.data.config}\n title={state.data.config_path}\n name=\"v_config\"\n id=\"v_config\"\n rows=\"10\" />\n\n <br />\n\n <TextArea\n defaultValue={state.data.config1}\n title={state.data.config_path1}\n name=\"v_config1\"\n id=\"v_config1\"\n rows=\"10\" />\n\n <br />\n\n <TextArea\n defaultValue={state.data.config2}\n title={state.data.config_path2}\n name=\"v_config2\"\n id=\"v_config2\"\n rows=\"10\" />\n\n <br />\n\n <TextArea\n defaultValue={state.data.config3}\n title={state.data.config_path3}\n name=\"v_config3\"\n id=\"v_config3\"\n rows=\"10\" />\n\n <br />\n\n <TextArea\n defaultValue={state.data.config4}\n title={state.data.config_path4}\n name=\"v_config4\"\n id=\"v_config4\"\n rows=\"10\" />\n\n <br />\n\n <TextArea\n defaultValue={state.data.config5}\n title={state.data.config_path5}\n name=\"v_config5\"\n id=\"v_config5\"\n rows=\"10\" />\n\n <br />\n\n <TextArea\n defaultValue={state.data.config6}\n title={state.data.config_path6}\n name=\"v_config6\"\n id=\"v_config6\"\n rows=\"10\" />\n\n <br />\n\n <TextArea\n defaultValue={state.data.config7}\n title={state.data.config_path7}\n name=\"v_config7\"\n id=\"v_config7\"\n rows=\"10\" />\n\n <br />\n\n <TextArea\n defaultValue={state.data.config8}\n title={state.data.config_path8}\n name=\"v_config8\"\n id=\"v_config8\"\n rows=\"10\" />\n\n <br />\n\n <Checkbox\n title={i18n['restart']}\n defaultChecked={true}\n name=\"v_restart\"\n id=\"restart\" />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/server/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div >\n );\n}\n\nexport default Dovecot;","import axios from \"axios\";\nimport { getAuthToken } from \"src/utils/token\";\n\nconst BASE_URL = window.location.origin;\nconst webApiUri = '/api/v1/list/mail/index.php';\nconst addMailApiUri = '/api/v1/add/mail/index.php';\nconst mailInfoUri = '/api/v1/edit/mail/index.php';\nconst updateMailUri = '/api/v1/edit/mail/index.php';\n\nexport const getMailList = () => {\n return axios.get(BASE_URL + webApiUri);\n}\n\nexport const getMailAccountList = domain => {\n return axios.get(`${BASE_URL}${webApiUri}?domain=${domain}`)\n}\n\nexport const getMailAccountInfo = (domain, account) => {\n return axios.get(`${BASE_URL}${mailInfoUri}?domain=${domain}&account=${account}`)\n}\n\nexport const bulkAction = (action, domainNameSystems) => {\n const formData = new FormData();\n formData.append(\"action\", action);\n formData.append(\"token\", getAuthToken());\n\n domainNameSystems.forEach(domainNameSystem => {\n formData.append(\"domain[]\", domainNameSystem);\n });\n\n return axios.post(BASE_URL + '/api/v1/bulk/mail/', formData);\n};\n\nexport const bulkMailAccountAction = (action, domain, accounts = []) => {\n const formData = new FormData();\n formData.append(\"action\", action);\n formData.append(\"token\", getAuthToken());\n formData.append(\"domain\", domain);\n\n accounts.forEach(account => {\n formData.append(\"account[]\", account);\n });\n\n return axios.post(BASE_URL + '/api/v1/bulk/mail/', formData);\n};\n\nexport const handleAction = uri => {\n return axios.get(BASE_URL + uri, {\n params: {\n token: getAuthToken()\n }\n });\n}\n\nexport const addMail = data => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + addMailApiUri, formDataObject);\n}\n\nexport const addMailAccount = (data, domain) => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(`${BASE_URL}${addMailApiUri}?domain=${domain}`, formDataObject);\n}\n\nexport const editMailAccount = (data, domain, account) => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(`${BASE_URL}${updateMailUri}?domain=${domain}&account=${account}`, formDataObject);\n}\n\nexport const getMailInfo = domain => {\n return axios.get(BASE_URL + mailInfoUri, {\n params: {\n domain,\n token: getAuthToken()\n }\n });\n}\n\nexport const updateMail = (data, domain) => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + updateMailUri, formDataObject, {\n params: {\n domain,\n token: getAuthToken()\n }\n });\n}\n\nexport const mailInfoBlockSelectOptions = i18n => [\n {\n value: i18n['Use server hostname'],\n type: 'hostname',\n },\n {\n value: i18n['Use domain hostname'],\n type: 'domain',\n },\n {\n value: i18n['Use STARTTLS'],\n type: 'starttls',\n },\n {\n value: i18n['Use SSL / TLS'],\n type: 'ssl',\n },\n {\n value: i18n['No encryption'],\n type: 'no_encryption',\n }\n];","import React, { useEffect, useState } from 'react';\nimport { useSelector } from 'react-redux';\nimport { Link } from 'react-router-dom';\nimport { mailInfoBlockSelectOptions } from 'src/ControlPanelService/Mail';\n\nimport './MailInfoBlock.scss';\n\nexport default function MailInfoBlock({ webMail, hostName, domain, userName = '', password }) {\n const { i18n } = useSelector(state => state.session);\n const [selectedOption, setSelectedOption] = useState('');\n const [state, setState] = useState({\n imapHostName: hostName,\n smtpHostName: hostName,\n imapEncryption: i18n['STARTTLS'],\n smtpEncryption: i18n['STARTTLS'],\n imapPort: '143',\n smtpPort: '587',\n });\n\n useEffect(() => {\n if (selectedOption === 'hostname') {\n setState({ ...state, imapHostName: hostName, smtpHostName: hostName });\n } else if (selectedOption === \"domain\") {\n setState({ ...state, imapHostName: domain, smtpHostName: domain });\n } else if (selectedOption === \"starttls\") {\n setState({ ...state, imapPort: '143', imapEncryption: 'STARTTLS', smtpPort: '587', smtpEncryption: 'STARTTLS' });\n } else if (selectedOption === \"ssl\") {\n setState({ ...state, imapPort: '993', imapEncryption: 'SSL / TLS', smtpPort: '465', smtpEncryption: 'SSL / TLS' });\n } else if (selectedOption === \"no_encryption\") {\n setState({\n ...state,\n imapHostName: domain,\n smtpHostName: domain,\n imapPort: '143',\n smtpPort: '25',\n imapEncryption: i18n['No encryption'],\n smtpEncryption: i18n['No encryption']\n });\n }\n }, [selectedOption]);\n\n const renderSelectOptions = () => {\n const options = mailInfoBlockSelectOptions(i18n);\n return options.map(option =>\n <option key={option.type} value={option.type}>{option.value}</option>\n );\n }\n\n return (\n <div className=\"mail-info-block\">\n <div class=\"form-group select-group\">\n <select class=\"form-control\" onChange={event => setSelectedOption(event.target.value)}>\n {renderSelectOptions()}\n </select>\n\n <div className=\"details\">\n <div>\n <span>{i18n['Username']}:</span>\n <span>{`${userName}@${domain}`}</span>\n </div>\n\n <div>\n <span>{i18n['Password']}:</span>\n <span>{password || '******'}</span>\n </div>\n\n <div>\n <span>{i18n['IMAP hostname']}:</span>\n <span>{state.imapHostName}</span>\n </div>\n\n <div>\n <span>{i18n['IMAP port']}:</span>\n <span>{state.imapPort}</span>\n </div>\n\n <div>\n <span>{i18n['IMAP security']}:</span>\n <span>{state.imapEncryption}</span>\n </div>\n\n <div>\n <span>{i18n['IMAP auth method']}:</span>\n <span>{i18n['Normal password']}</span>\n </div>\n\n <div>\n <span>{i18n['SMTP hostname']}:</span>\n <span>{state.smtpHostName}</span>\n </div>\n\n <div>\n <span>{i18n['SMTP port']}:</span>\n <span>{state.smtpPort}</span>\n </div>\n\n <div>\n <span>{i18n['SMTP security']}:</span>\n <span>{state.smtpEncryption}</span>\n </div>\n\n <div>\n <span>{i18n['SMTP auth method']}:</span>\n <span>{i18n['Normal password']}</span>\n </div>\n\n <div>\n <span>{i18n['Webmail URL']}:</span>\n <span><Link to={{ pathname: `http://${window.location.hostname}${webMail}` }} target=\"_blank\">{webMail}</Link></span>\n </div>\n\n <input type=\"hidden\" name={i18n['Username']} value={`@${domain}`} />\n <input type=\"hidden\" name={i18n['IMAP hostname']} value={state.imapHostName} />\n <input type=\"hidden\" name={i18n['SMTP hostname']} value={state.smtpHostName} />\n <input type=\"hidden\" name={i18n['IMAP port']} value={state.imapPort} />\n <input type=\"hidden\" name={i18n['SMTP port']} value={state.smtpPort} />\n <input type=\"hidden\" name={i18n['IMAP security']} value={state.imapEncryption} />\n <input type=\"hidden\" name={i18n['SMTP security']} value={state.smtpEncryption} />\n <input type=\"hidden\" name={i18n['IMAP auth method']} value={i18n['Normal password']} />\n <input type=\"hidden\" name={i18n['SMTP auth method']} value={i18n['Normal password']} />\n </div>\n </div>\n </div>\n );\n}","import React, { useEffect, useState } from 'react';\n\nimport TextInputWithExtraButton from 'src/components/ControlPanel/AddItemLayout/Form/TextInputWithExtraButton/TextInputWithExtraButton';\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport TextInput from 'src/components/ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport Password from 'src/components/ControlPanel/AddItemLayout/Form/Password/Password';\nimport TextArea from 'src/components/ControlPanel/AddItemLayout/Form/TextArea/TextArea';\nimport Checkbox from 'src/components/ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport { editMailAccount, getMailAccountInfo } from '../../../ControlPanelService/Mail';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport MailInfoBlock from '../MailInfoBlock/MailInfoBlock';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport Spinner from '../../Spinner/Spinner';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nexport default function EditMailAccount(props) {\n const [autoreplyChecked, setAutoreplyChecked] = useState(false);\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const dispatch = useDispatch();\n const history = useHistory();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n quotaValue: '',\n loading: false,\n password: ''\n });\n\n useEffect(() => {\n dispatch(addActiveElement(`/list/mail/`));\n dispatch(removeFocusedElement());\n setState({ ...state, loading: true });\n\n fetchData();\n }, []);\n\n const submitFormHandler = event => {\n event.preventDefault();\n let newMailDomain = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n newMailDomain[name] = value;\n }\n\n newMailDomain['v_domain'] = props.domain;\n newMailDomain['v_account'] = props.account;\n newMailDomain['Password'] = newMailDomain['v_password'];\n\n if (Object.keys(newMailDomain).length !== 0 && newMailDomain.constructor === Object) {\n setState({ ...state, loading: true });\n editMailAccount(newMailDomain, props.domain, props.account)\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n if (error_msg) {\n setErrorMessage(error_msg);\n setOkMessage('');\n } else {\n dispatch(refreshCounters()).then(() => {\n setErrorMessage('');\n setOkMessage(ok_msg);\n });\n }\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const fetchData = () => {\n setState({ ...state, loading: true });\n\n getMailAccountInfo(props.domain, props.account)\n .then(response => {\n setState({\n ...state,\n data: response.data,\n loading: false\n });\n\n setAutoreplyChecked(response.data.autoreply === 'yes');\n })\n .catch(err => console.error(err));\n }\n\n const toggleQuota = () => {\n const value = state.data.quota === 'unlimited' ? '1000' : 'unlimited';\n setState({ ...state, data: { ...state.data, quota: value } });\n }\n\n const goBack = () => {\n history.push(`/list/mail/?domain=${props.domain}`);\n }\n\n return (\n <div className=\"edit-template add-mail-account\">\n <Helmet>\n <title>{`Vesta - ${i18n.MAIL}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Editing Mail Account']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n {errorMessage}</span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> : (\n <form onSubmit={event => submitFormHandler(event)}>\n <input type=\"hidden\" name=\"save\" value=\"save\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <div className=\"r-1\">\n <div className=\"c-1\">\n <TextInput\n title={i18n['Domain']}\n value={props.domain}\n name=\"v_domain\"\n id=\"domain\"\n disabled />\n\n <Password name=\"v_password\" onChange={password => setState({ ...state, password })} />\n\n <TextInputWithExtraButton title={i18n['Quota']} optionalTitle={i18n['in megabytes']} id=\"quota\" name=\"v_quota\" value={state.data.quota}>\n <button type=\"button\" onClick={toggleQuota}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextArea\n optionalTitle={`${i18n['use local-part']}`}\n defaultValue={state.data.aliases}\n title={i18n['Aliases']}\n name=\"v_aliases\"\n id=\"aliases\" />\n\n <TextArea\n optionalTitle={`${i18n['one or more email addresses']}`}\n defaultValue={state.data.fwd}\n title={i18n['Forward to']}\n name=\"v_fwd\"\n id=\"fwd\" />\n\n <Checkbox\n title={i18n['Do not store forwarded mail']}\n defaultChecked={state.data.fwd_only === 'yes'}\n name=\"v_fwd_only\"\n id=\"fwd_only\" />\n\n <Checkbox\n title={i18n['Autoreply']}\n checked={autoreplyChecked}\n onChange={checked => setAutoreplyChecked(checked)}\n name=\"v_autoreply\"\n id=\"autoreply\" />\n\n {\n autoreplyChecked && (\n <div style={{ transform: 'translateX(3rem)' }}>\n <TextArea\n defaultValue={state.data.autoreply_message}\n title={i18n['Message']}\n name=\"v_autoreply_message\"\n id=\"autoreply_message\" />\n </div>\n )\n }\n\n <TextInput\n title={i18n['Send login credentials to email address']}\n value={state.data.send_email}\n name=\"v_credentials\"\n id=\"credentials\" />\n </div>\n\n <div className=\"c-2\">\n <MailInfoBlock\n webMail={state.data.webmail}\n hostName={state.data.hostname}\n userName={props.account}\n password={state.password}\n domain={props.domain} />\n </div>\n </div>\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Add}</button>\n <button type=\"button\" className=\"back\" onClick={goBack}>{i18n.Back}</button>\n </div>\n </form>\n )}\n </AddItemLayout>\n </div>\n );\n}","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport TextInput from '../../ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport Checkbox from '../../ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport { getMailInfo, updateMail } from '../../../ControlPanelService/Mail';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from '../../../components/Spinner/Spinner';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\nimport QS from 'qs';\n\nimport './EditMail.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nconst EditMail = props => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n loading: false\n });\n\n useEffect(() => {\n let queryParams = QS.parse(history.location.search, { ignoreQueryPrefix: true });\n const { domain } = queryParams;\n\n dispatch(addActiveElement('/list/mail/'));\n dispatch(removeFocusedElement());\n\n if (domain) {\n setState({ ...state, loading: true });\n fetchData(domain);\n }\n }, []);\n\n const fetchData = domain => {\n getMailInfo(domain)\n .then(response => {\n setState({\n ...state,\n data: response.data,\n loading: false\n });\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err);\n });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedDomain = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedDomain[name] = value;\n }\n\n updatedDomain['v_domain'] = state.data.domain;\n\n if (Object.keys(updatedDomain).length !== 0 && updatedDomain.constructor === Object) {\n setState({ ...state, loading: true });\n\n updateMail(updatedDomain, state.data.domain)\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n if (error_msg) {\n setErrorMessage(error_msg);\n setOkMessage('');\n } else {\n dispatch(refreshCounters()).then(() => {\n setErrorMessage('');\n setOkMessage(ok_msg);\n });\n }\n }\n })\n .then(() => fetchData(state.data.domain))\n .catch(err => console.error(err));\n }\n }\n\n return (\n <div className=\"edit-template edit-mail\">\n <Helmet>\n <title>{`Vesta - ${i18n.MAIL}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Editing Mail Domain']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}\n </span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout date={state.data.date} time={state.data.time} status={state.data.status}>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"edit-mail\">\n <input type=\"hidden\" name=\"save\" value=\"save\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <TextInput id=\"domain\" name=\"v_domain\" title={i18n['Domain']} value={state.data.domain} disabled />\n\n <Checkbox\n name=\"v_antispam\"\n id=\"antispam\"\n title={i18n['AntiSpam Support']}\n defaultChecked={state.data.antispam === 'yes'} />\n\n <Checkbox\n name=\"v_antivirus\"\n id=\"antivirus\"\n title={i18n['AntiVirus Support']}\n defaultChecked={state.data.antivirus === 'yes'} />\n\n <Checkbox\n name=\"v_dkim\"\n id=\"dkim\"\n title={i18n['DKIM Support']}\n defaultChecked={state.data.dkim === 'yes'} />\n\n <TextInput id=\"catchall\" name=\"v_catchall\" title={i18n['Catchall email']} value={state.data.catchall} />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/mail/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div>\n );\n}\n\nexport default EditMail;","import React, { useEffect, useState } from 'react';\nimport EditMailAccount from 'src/components/MailAccount/Edit/EditMailAccount';\nimport EditMail from 'src/components/Mail/Edit/EditMail';\nimport { useHistory } from 'react-router-dom';\nimport QueryString from 'qs';\nimport { Helmet } from 'react-helmet';\nimport { useSelector } from 'react-redux';\n\nexport default function EditMailWrapper() {\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const parsedQueryString = QueryString.parse(history.location.search, { ignoreQueryPrefix: true });\n const [isMailAccount, setIsMailAccount] = useState(false);\n\n useEffect(() => {\n if (parsedQueryString.domain && parsedQueryString.account) {\n setIsMailAccount(true);\n } else {\n setIsMailAccount(false);\n }\n }, [history.location]);\n\n return (\n <>\n <Helmet>\n <title>{`Vesta - ${i18n.MAIL}`}</title>\n </Helmet>\n {\n isMailAccount\n ? <EditMailAccount domain={parsedQueryString.domain} account={parsedQueryString.account} />\n : <EditMail />\n }\n </>\n );\n}","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"../../../../actions/MainNavigation/mainNavigationActions\";\nimport Checkbox from '../../../ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport TextArea from '../../../ControlPanel/AddItemLayout/Form/TextArea/TextArea';\nimport AddItemLayout from '../../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { getServiceInfo, updateService } from 'src/ControlPanelService/Server';\nimport Spinner from '../../../../components/Spinner/Spinner';\nimport Toolbar from '../../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './Service.scss';\nimport { Helmet } from 'react-helmet';\nimport HtmlParser from 'react-html-parser';\n\nconst Service = ({ serviceName = '' }) => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n loading: false\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/server/'));\n dispatch(removeFocusedElement());\n\n if (!serviceName) {\n history.push('/list/server');\n }\n\n setState({ ...state, loading: true });\n fetchData(serviceName);\n }, []);\n\n const fetchData = serviceName => {\n getServiceInfo(serviceName)\n .then(response => {\n const { config } = response.data;\n\n if (!config || config.includes(\"file doesn't exist\")) {\n history.push('/list/server');\n }\n\n setState({ ...state, data: response.data, loading: false });\n })\n .catch(err => console.error(err));\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedService = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedService[name] = value;\n }\n\n if (Object.keys(updatedService).length !== 0 && updatedService.constructor === Object) {\n setState({ ...state, loading: true });\n\n updateService(updatedService, serviceName)\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n setErrorMessage(error_msg || '');\n setOkMessage(ok_msg || '');\n }\n })\n .then(() => fetchData(serviceName))\n .catch(err => console.error(err));\n }\n }\n\n return (\n <div className=\"edit-template edit-service\">\n <Helmet>\n <title>{`Vesta - ${i18n.SERVER}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">\n {i18n['Configuring Server']} / {state.data.service_name}\n </div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}\n </span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"edit-service\">\n <input type=\"hidden\" name=\"save\" value=\"save\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <TextArea\n defaultValue={state.data.config}\n title={state.data.config_path}\n name=\"v_config\"\n id=\"v_config\"\n rows=\"18\" />\n\n <br />\n\n <Checkbox\n title={i18n['restart']}\n defaultChecked={true}\n name=\"v_restart\"\n id=\"restart\" />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/server/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div >\n );\n}\n\nexport default Service;","import React, { useEffect, useState } from 'react';\n\nimport TextInputWithExtraButton from 'src/components/ControlPanel/AddItemLayout/Form/TextInputWithExtraButton/TextInputWithExtraButton';\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport TextInput from 'src/components/ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport Password from 'src/components/ControlPanel/AddItemLayout/Form/Password/Password';\nimport TextArea from 'src/components/ControlPanel/AddItemLayout/Form/TextArea/TextArea';\nimport Checkbox from 'src/components/ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { addMailAccount, getMailList } from '../../../ControlPanelService/Mail';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport MailInfoBlock from '../MailInfoBlock/MailInfoBlock';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport Spinner from '../../Spinner/Spinner';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './AddMailAccount.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nexport default function AddMailAccount(props) {\n const { i18n } = useSelector(state => state.session);\n const dispatch = useDispatch();\n const token = localStorage.getItem(\"token\");\n const history = useHistory();\n const [state, setState] = useState({\n data: {},\n advancedOptions: false,\n autoreplyChecked: false,\n quotaValue: '',\n loading: false,\n password: '',\n userName: '',\n okMessage: '',\n errorMessage: '',\n });\n\n useEffect(() => {\n dispatch(addActiveElement(`/list/mail/`));\n dispatch(removeFocusedElement());\n\n fetchData();\n }, []);\n\n const submitFormHandler = event => {\n event.preventDefault();\n let newMailDomain = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n newMailDomain[name] = value;\n }\n\n newMailDomain['ok_acc'] = 'add';\n newMailDomain['token'] = token;\n newMailDomain['v_domain'] = props.domain;\n newMailDomain['Password'] = newMailDomain['v_password'];\n\n if (Object.keys(newMailDomain).length !== 0 && newMailDomain.constructor === Object) {\n setState({ ...state, loading: true });\n addMailAccount(newMailDomain, props.domain)\n .then(result => {\n if (result.status === 200) {\n const { error_msg: errorMessage, ok_msg: okMessage } = result.data;\n\n if (errorMessage) {\n setState({ ...state, errorMessage, okMessage, loading: false });\n } else {\n dispatch(refreshCounters()).then(() => {\n setState({ ...state, okMessage, errorMessage: '', loading: false });\n });\n }\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const fetchData = () => {\n setState({ ...state, loading: true });\n\n getMailList()\n .then(response => {\n setState({\n ...state,\n data: response.data,\n errorMessage: response.data['error_msg'],\n okMessage: response.data['ok_msg'],\n loading: false\n });\n })\n .catch(err => console.error(err));\n }\n\n const toggleOptions = () => {\n setState({ ...state, advancedOptions: !state.advancedOptions });\n }\n\n const toggleQuotaValue = () => {\n if (state.quotaValue !== 'unlimited') {\n setState({ ...state, quotaValue: 'unlimited' });\n } else {\n setState({ ...state, quotaValue: '' });\n }\n }\n\n return (\n <div className=\"edit-template add-mail-account\">\n <Helmet>\n <title>{`Vesta - ${i18n.MAIL}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Adding Mail Account']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {state.errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n {state.errorMessage}</span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {state.okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n <span>{HtmlParser(state.okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> : (\n <form onSubmit={event => submitFormHandler(event)}>\n <div className=\"r-1\">\n <div className=\"c-1\">\n <TextInput\n title={i18n['Domain']}\n value={props.domain}\n name=\"v_domain\"\n id=\"domain\"\n disabled />\n\n <TextInput\n title={i18n['Account']}\n onChange={e => setState({ ...state, userName: e.target.value })}\n name=\"v_account\"\n id=\"account\" />\n\n <Password name=\"v_password\" onChange={password => setState({ ...state, password })} />\n </div>\n\n <div className=\"c-2\">\n <MailInfoBlock\n webMail={state.data.webmail}\n hostName={state.data.hostname}\n userName={state.userName}\n password={state.password}\n domain={props.domain} />\n </div>\n </div>\n\n <div className=\"r-2\">\n <button type=\"button\" onClick={toggleOptions}>\n {i18n['Advanced options']}\n {state.advancedOptions ? <FontAwesomeIcon icon=\"caret-up\" /> : <FontAwesomeIcon icon=\"caret-down\" />}\n </button>\n\n {\n state.advancedOptions && (\n <>\n <TextInputWithExtraButton title={i18n['Quota']} optionalTitle={i18n['in megabytes']} id=\"quota\" name=\"v_quota\" value={state.quotaValue}>\n <button type=\"button\" onClick={toggleQuotaValue}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextArea\n optionalTitle={`${i18n['use local-part']}`}\n defaultValue={state.data.v_aliases}\n title={i18n['Aliases']}\n name=\"v_aliases\"\n id=\"aliases\" />\n\n <TextArea\n optionalTitle={`${i18n['one or more email addresses']}`}\n defaultValue={state.data.forward}\n title={i18n['Forward to']}\n name=\"v_fwd\"\n id=\"fwd\" />\n\n <Checkbox\n title={i18n['Do not store forwarded mail']}\n name=\"v_fwd_only\"\n id=\"fwd_only\" />\n </>\n )\n }\n\n <TextInput\n title={i18n['Send login credentials to email address']}\n name=\"v_credentials\"\n id=\"credentials\" />\n </div>\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Add}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push(`/list/mail/?domain=${props.domain}`)}>{i18n.Back}</button>\n </div>\n </form>\n )}\n </AddItemLayout>\n </div>\n );\n}","import React, { useEffect, useState } from 'react';\n\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { addMail } from '../../../ControlPanelService/Mail';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport Spinner from '../../Spinner/Spinner';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './AddMail.scss'\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nconst AddMail = props => {\n const { i18n } = useSelector(state => state.session);\n const dispatch = useDispatch();\n const token = localStorage.getItem(\"token\");\n const history = useHistory();\n const [state, setState] = useState({\n loading: false,\n antiSpamChecked: true,\n antiVirusChecked: true,\n dkimChecked: true,\n okMessage: '',\n errorMessage: '',\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/mail/'));\n dispatch(removeFocusedElement());\n }, []);\n\n const submitFormHandler = event => {\n event.preventDefault();\n let newMailDomain = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n newMailDomain[name] = value;\n }\n\n if (Object.keys(newMailDomain).length !== 0 && newMailDomain.constructor === Object) {\n setState({ ...state, loading: true });\n addMail(newMailDomain)\n .then(result => {\n if (result.status === 200) {\n const { error_msg: errorMessage, ok_msg: okMessage } = result.data;\n\n if (errorMessage) {\n setState({ ...state, errorMessage, okMessage, loading: false });\n } else {\n dispatch(refreshCounters()).then(() => {\n setState({ ...state, okMessage, errorMessage: '', loading: false });\n });\n }\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n return (\n <div className=\"edit-template add-web\">\n <Helmet>\n <title>{`Vesta - ${i18n.MAIL}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Adding Mail Domain']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {state.errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n {state.errorMessage}</span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {state.okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n <span>{HtmlParser(state.okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> : (\n <form onSubmit={event => submitFormHandler(event)}>\n <input type=\"hidden\" name=\"ok\" value=\"add\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <div className=\"form-group\">\n <label htmlFor=\"domain\">{i18n.Domain}</label>\n <input type=\"text\" className=\"form-control\" id=\"domain\" name=\"v_domain\" />\n </div>\n\n <div className=\"form-group\">\n <div className=\"checkbox-wrapper\">\n <input\n type=\"checkbox\"\n name=\"v_antispam\"\n id=\"antispam-support\"\n onChange={event => setState({ ...state, antiSpamChecked: event.target.checked })}\n checked={state.antiSpamChecked} />\n <label htmlFor=\"antispam-support\">{i18n['AntiSpam Support']}</label>\n </div>\n </div>\n\n <div className=\"form-group\">\n <div className=\"checkbox-wrapper\">\n <input\n type=\"checkbox\"\n name=\"v_antivirus\"\n id=\"antivirus-support\"\n onChange={event => setState({ ...state, antiVirusChecked: event.target.checked })}\n checked={state.antiVirusChecked} />\n <label htmlFor=\"antivirus-support\">{i18n['AntiVirus Support']}</label>\n </div>\n </div>\n\n <div className=\"form-group\">\n <div className=\"checkbox-wrapper\">\n <input\n type=\"checkbox\"\n name=\"v_dkim\"\n id=\"dkim-support\"\n onChange={event => setState({ ...state, dkimChecked: event.target.checked })}\n checked={state.dkimChecked} />\n <label htmlFor=\"dkim-support\">{i18n['DKIM Support']}</label>\n </div>\n </div>\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Add}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/mail/')}>{i18n.Back}</button>\n </div>\n </form>\n )}\n </AddItemLayout>\n </div>\n );\n}\n\nexport default AddMail;","import React, { useEffect, useState } from 'react';\nimport AddMailAccount from 'src/components/MailAccount/Add/AddMailAccount';\nimport AddMail from 'src/components/Mail/Add/AddMail';\nimport { useHistory } from 'react-router-dom';\nimport QueryString from 'qs';\nimport { Helmet } from 'react-helmet';\nimport { useSelector } from 'react-redux';\n\nexport default function AddMailWrapper() {\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const [domain, setDomain] = useState(false);\n\n useEffect(() => {\n const parsedQueryString = QueryString.parse(history.location.search, { ignoreQueryPrefix: true });\n\n if (parsedQueryString.domain) {\n setDomain(parsedQueryString.domain);\n } else {\n setDomain('');\n }\n }, [history.location]);\n\n return (\n <>\n <Helmet>\n <title>{`Vesta - ${i18n.MAIL}`}</title>\n </Helmet>\n {\n domain\n ? <AddMailAccount domain={domain} />\n : <AddMail />\n }\n </>\n );\n}","import axios from \"axios\";\nimport { getAuthToken } from \"src/utils/token\";\n\nconst updateDNSUri = '/api/v1/edit/dns/index.php';\nconst addDnsApiUri = '/api/v1/add/dns/index.php';\nconst dNSInfoUri = '/api/v1/edit/dns/index.php';\nconst BASE_URL = window.location.origin;\nconst dnsApiUri = '/api/v1/list/dns/index.php';\n\nexport const getDnsList = () => {\n return axios.get(BASE_URL + dnsApiUri);\n}\n\nexport const getDNSRecordsList = domain => {\n return axios.get(`${BASE_URL}${dnsApiUri}?domain=${domain}`);\n}\n\nexport const getDNSRecordInfo = (domain, recordId) => {\n return axios.get(`${BASE_URL}${updateDNSUri}?domain=${domain}&record_id=${recordId}`);\n}\n\nexport const bulkDomainAction = (action, domains) => {\n const formData = new FormData();\n formData.append(\"action\", action);\n formData.append(\"token\", getAuthToken());\n\n domains.forEach(record => {\n formData.append(\"domain[]\", record);\n });\n\n return axios.post(BASE_URL + '/api/v1/bulk/dns/', formData);\n};\n\nexport const bulkAction = (action, records, domain) => {\n const formData = new FormData();\n formData.append(\"action\", action);\n formData.append(\"token\", getAuthToken());\n formData.append(\"domain\", domain);\n\n records.forEach(record => {\n formData.append(\"record[]\", record);\n });\n\n return axios.post(BASE_URL + '/api/v1/bulk/dns/', formData);\n};\n\nexport const handleAction = uri => {\n return axios.get(BASE_URL + uri, {\n params: {\n token: getAuthToken()\n }\n });\n}\n\nexport const addDomainNameSystem = data => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + addDnsApiUri, formDataObject);\n}\n\nexport const addDomainNameSystemRecord = data => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + addDnsApiUri, formDataObject);\n}\n\nexport const getDNSInfo = domain => {\n return axios.get(BASE_URL + dNSInfoUri, {\n params: {\n domain,\n token: getAuthToken()\n }\n });\n}\n\nexport const updateDNS = (data, domain, recordId) => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + updateDNSUri, formDataObject, {\n params: {\n domain,\n record_id: recordId,\n token: getAuthToken()\n }\n });\n}","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport SelectInput from '../../ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport TextInput from '../../ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { getDNSInfo, updateDNS } from '../../../ControlPanelService/Dns';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from '../../../components/Spinner/Spinner';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\nimport QS from 'qs';\n\nimport './EditDomainNameSystem.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nconst EditDomainNameSystem = props => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n loading: false\n });\n\n useEffect(() => {\n let queryParams = QS.parse(history.location.search, { ignoreQueryPrefix: true });\n const { domain } = queryParams;\n\n dispatch(addActiveElement('/list/dns/'));\n dispatch(removeFocusedElement());\n\n if (domain) {\n setState({ ...state, loading: true });\n fetchData(domain);\n }\n }, []);\n\n const fetchData = domain => {\n getDNSInfo(domain)\n .then(response => {\n setState({\n ...state,\n data: response.data,\n loading: false\n });\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err)\n });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedDomain = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedDomain[name] = value;\n }\n\n updatedDomain['v_domain'] = state.data.domain;\n\n if (Object.keys(updatedDomain).length !== 0 && updatedDomain.constructor === Object) {\n setState({ ...state, loading: true });\n\n updateDNS(updatedDomain, state.data.domain)\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n if (error_msg) {\n setErrorMessage(error_msg);\n setOkMessage('');\n } else {\n dispatch(refreshCounters()).then(() => {\n setErrorMessage('');\n setOkMessage(ok_msg);\n });\n }\n }\n })\n .then(() => fetchData(state.data.domain))\n .catch(err => console.error(err));\n }\n }\n\n return (\n <div className=\"edit-template edit-dns\">\n <Helmet>\n <title>{`Vesta - ${i18n.DNS}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Editing DNS Domain']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}\n </span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout date={state.data.date} time={state.data.time} status={state.data.status}>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"edit-dns\">\n <input type=\"hidden\" name=\"save\" value=\"save\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <TextInput id=\"domain\" name=\"v_domain\" title={i18n['Domain']} value={state.data.domain} disabled />\n\n <TextInput id=\"ip\" name=\"v_ip\" title={i18n['IP Address']} value={state.data.ip} />\n\n <SelectInput\n optionalTitle={state.data.dns_system}\n options={state.data.templates}\n selected={state.data.template}\n title={i18n['Template']}\n name=\"v_template\"\n id=\"templates\" />\n\n <TextInput\n optionalTitle={state.data['YYYY-MM-DD']}\n title={i18n['Expiration Date']}\n value={state.data.exp}\n name=\"v_exp\"\n id=\"exp\" />\n\n <TextInput id=\"soa\" name=\"v_soa\" title=\"SOA\" value={state.data.soa} />\n\n <TextInput id=\"ttl\" name=\"v_ttl\" title=\"TTL\" value={state.data.ttl} />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/dns/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div>\n );\n}\n\nexport default EditDomainNameSystem;","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport SelectInput from 'src/components/ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport TextInput from '../../ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { updateDNS, getDNSRecordInfo } from 'src/ControlPanelService/Dns';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from '../../../components/Spinner/Spinner';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\nimport QS from 'qs';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nexport default function EditDNSRecord(props) {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const dispatch = useDispatch();\n const history = useHistory();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n selectOptions: [\n 'A',\n 'AAAA',\n 'NS',\n 'CNAME',\n 'MX',\n 'TXT',\n 'SRV',\n 'DNSKEY',\n 'KEY',\n 'IPSECKEY',\n 'PTR',\n 'SPF',\n 'TLSA',\n 'CAA'\n ],\n loading: false\n });\n\n useEffect(() => {\n const { domain, record_id } = props;\n\n dispatch(addActiveElement('/list/dns/'));\n dispatch(removeFocusedElement());\n\n if (domain && record_id) {\n setState({ ...state, loading: true });\n fetchData(domain, record_id);\n }\n }, []);\n\n const fetchData = (domain, record_id) => {\n getDNSRecordInfo(domain, record_id)\n .then(response => {\n setState({\n ...state,\n data: response.data,\n loading: false\n });\n })\n .catch(err => console.error(err));\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedRecord = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedRecord[name] = value;\n }\n\n updatedRecord['v_domain'] = state.data.domain;\n updatedRecord['v_record_id'] = props.record_id;\n updatedRecord['v_type'] = state.data.type;\n\n if (Object.keys(updatedRecord).length !== 0 && updatedRecord.constructor === Object) {\n setState({ ...state, loading: true });\n\n updateDNS(updatedRecord, props.domain, props.record_id)\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n if (error_msg) {\n setOkMessage('');\n setErrorMessage(error_msg);\n } else {\n dispatch(refreshCounters()).then(() => {\n setOkMessage(ok_msg);\n setErrorMessage('');\n });\n }\n }\n })\n .then(() => fetchData(props.domain, props.record_id))\n .catch(err => console.error(err));\n }\n }\n\n return (\n <div className=\"edit-template edit-dns-rec\">\n <Helmet>\n <title>{`Vesta - ${i18n.DNS}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Editing DNS Record']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}\n </span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout date={state.data.date} time={state.data.time} status={state.data.status}>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"edit-dns-rec\">\n <input type=\"hidden\" name=\"save\" value=\"save\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <TextInput\n title={i18n['Domain']}\n value={props.domain}\n name=\"v_domain\"\n id=\"domain\"\n disabled />\n\n <TextInput\n value={state.data.rec}\n title={i18n['Record']}\n name=\"v_record_id\"\n id=\"domain\"\n disabled />\n\n <SelectInput\n options={state.selectOptions}\n selected={state.data.type}\n title={i18n['Type']}\n name=\"v_type\"\n id=\"type\"\n disabled />\n\n <TextInput\n title={i18n['IP or Value']}\n value={state.data.val}\n name=\"v_val\"\n id=\"val\" />\n\n <TextInput\n optionalTitle={`(${i18n['optional']})`}\n value={state.data.priority}\n title={i18n['Priority']}\n name=\"v_priority\"\n id=\"priority\" />\n\n <TextInput\n optionalTitle={`(${i18n['internal']})`}\n title={i18n['Record Number']}\n value={state.data.record_id}\n name=\"v_priority\"\n id=\"priority\" />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push(`/list/dns?domain=${props.domain}`)}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div>\n );\n}","import React, { useEffect, useState } from 'react';\nimport EditDomainNameSystem from 'src/components/DomainNameSystem/Edit/EditDomainNameSystem';\nimport EditDNSRecord from 'src/components/DNSRecord/Edit/EditDNSRecord';\nimport { useHistory } from 'react-router-dom';\nimport QueryString from 'qs';\nimport { Helmet } from 'react-helmet';\nimport { useSelector } from 'react-redux';\n\nexport default function EditDNSWrapper() {\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const parsedQueryString = QueryString.parse(history.location.search, { ignoreQueryPrefix: true });\n const [isDnsRecord, setIsDnsRecord] = useState(false);\n\n useEffect(() => {\n if (parsedQueryString.domain && parsedQueryString.record_id) {\n setIsDnsRecord(true);\n } else {\n setIsDnsRecord(false);\n }\n }, [history.location]);\n\n return (\n <>\n <Helmet>\n <title>{`Vesta - ${i18n.DNS}`}</title>\n </Helmet>\n {\n isDnsRecord\n ? <EditDNSRecord domain={parsedQueryString.domain} record_id={parsedQueryString.record_id} />\n : <EditDomainNameSystem />\n }\n </>\n );\n}","import React, { useEffect, useState } from 'react';\nimport { useSelector } from 'react-redux';\nimport Checkbox from '../../../ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport TextArea from '../../../ControlPanel/AddItemLayout/Form/TextArea/TextArea';\n\nimport './SslSupport.scss';\n\nconst SslSupport = props => {\n const { i18n } = useSelector(state => state.session);\n const [letsEncrypt, setLetsEncrypt] = useState(props.letsEncrypt);\n\n useEffect(() => {\n setLetsEncrypt(props.letsEncrypt);\n }, []);\n\n const onChangeLetsEncrypt = checked => {\n setLetsEncrypt(checked);\n }\n\n return (\n <div className=\"ssl-support\">\n <>\n <Checkbox\n onChange={onChangeLetsEncrypt}\n name=\"v_letsencrypt\"\n id=\"lets-encrypt\"\n title={i18n['Lets Encrypt Support']}\n defaultChecked={letsEncrypt} />\n\n {!props.letsEncrypt && <span className=\"lets-encrypt-span\">{letsEncrypt ? i18n['Your certificate will be automatically issued in 5 minutes'] : null}</span>}\n </>\n\n <input type=\"hidden\" value=\"same\" name=\"v_ssl_home\" />\n\n <TextArea\n id=\"ssl-certificate\"\n name=\"v_ssl_crt\"\n title={i18n['SSL Certificate']}\n defaultValue={props.sslCertificate}\n disabled={letsEncrypt}\n optionalTitle={<>/ <button type=\"button\" onClick={() => props.setModalVisible(true)} className=\"generate-csr\">{i18n['Generate CSR']}</button></>} />\n\n <TextArea\n id=\"ssl-key\"\n name=\"v_ssl_key\"\n disabled={letsEncrypt}\n defaultValue={props.sslKey}\n title={i18n['SSL Key']} />\n\n <TextArea\n id=\"ssl-ca\"\n name=\"v_ssl_ca\"\n disabled={letsEncrypt}\n defaultValue={props.sslCertificateAuthority}\n title={i18n['SSL Certificate Authority / Intermediate']}\n optionalTitle={`( ${i18n['optional']} )`} />\n\n <div className=\"additional-info\">\n {\n props.sslSubject.length > 0\n && (\n <div>\n <span>{i18n['SUBJECT']}:</span>\n <span>{props.sslSubject}</span>\n </div>\n )\n }\n\n {\n props.sslAliases.length > 0\n && (\n <div>\n <span>{i18n['ALIASES']}:</span>\n <span>{props.sslAliases}</span>\n </div>\n )\n }\n\n {\n props.sslNotBefore.length > 0\n && (\n <div>\n <span>{i18n['NOT_BEFORE']}:</span>\n <span>{props.sslNotBefore}</span>\n </div>\n )\n }\n\n {\n props.sslNotAfter.length > 0\n && (\n <div>\n <span>{i18n['NOT_AFTER']}:</span>\n <span>{props.sslNotAfter}</span>\n </div>\n )\n }\n\n {\n props.sslSignature.length > 0\n && (\n <div>\n <span>{i18n['SIGNATURE']}:</span>\n <span>{props.sslSignature}</span>\n </div>\n )\n }\n\n {\n props.sslPubKey.length > 0\n && (\n <div>\n <span>{i18n['PUB_KEY']}:</span>\n <span>{props.sslPubKey}</span>\n </div>\n )\n }\n\n {\n props.sslIssuer.length > 0\n && (\n <div>\n <span>{i18n['ISSUER']}:</span>\n <span>{props.sslIssuer}</span>\n </div>\n )\n }\n </div>\n\n <br />\n <br />\n </div>\n );\n}\n\nexport default SslSupport;\n","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport { updateWebDomain, getDomainInfo } from '../../../ControlPanelService/Web';\nimport Password from '../../../components/ControlPanel/AddItemLayout/Form/Password/Password';\nimport SelectInput from '../../ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport AdditionalFtpWrapper from '../Add/AdditionalFtpWrapper/AdditionalFtpWrapper';\nimport TextInput from '../../ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport Checkbox from '../../ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from '../../../components/Spinner/Spinner';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport SslSupport from './SslSupport/SslSupport';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\nimport GenerateSSL from 'src/containers/GenerateCSR';\nimport 'src/components/Modal/Modal.scss';\nimport QS from 'qs';\n\nimport './EditWeb.scss';\nimport TextArea from '../../ControlPanel/AddItemLayout/Form/TextArea/TextArea';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nconst EditWeb = props => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const { session } = useSelector(state => state.userSession);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [modalVisible, setModalVisible] = useState(false);\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n domain: '',\n webStat: '',\n sslSupport: false,\n letsEncrypt: false,\n additionalFtp: false,\n proxySupport: false,\n statAuth: false,\n loading: false\n });\n\n useEffect(() => {\n let queryParams = QS.parse(history.location.search, { ignoreQueryPrefix: true });\n const { domain } = queryParams;\n\n dispatch(addActiveElement('/list/web/'));\n dispatch(removeFocusedElement());\n\n if (domain) {\n setState({ ...state, loading: true });\n fetchData(domain);\n }\n }, []);\n\n const fetchData = domain => {\n getDomainInfo(domain)\n .then(response => {\n setState({\n ...state,\n domain,\n webStat: response.data.v_stats ? response.data.v_stats : 'none',\n sslSupport: response.data.ssl === 'yes',\n letsEncrypt: response.data.letsencrypt === 'yes',\n proxySupport: !!response.data.proxy,\n data: response.data,\n additionalFtp: !!response.data.ftp_user,\n statAuth: response.data.stats_user,\n loading: false\n });\n })\n .catch(err => console.error(err));\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedDomain = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedDomain[name] = value;\n }\n\n updatedDomain['v_domain'] = state.domain;\n\n if (updatedDomain['v_ssl'] === 'on') {\n updatedDomain['v_ssl'] = 'yes';\n } else {\n delete updatedDomain['v_ssl'];\n }\n\n if (updatedDomain['v_letsencrypt'] === 'on') {\n updatedDomain['v_letsencrypt'] = 'yes';\n } else {\n delete updatedDomain['v_letsencrypt'];\n }\n\n if (!updatedDomain['v_ssl_ca']) {\n delete updatedDomain['v_ssl_ca'];\n }\n\n if (!updatedDomain['v_ssl_crt']) {\n delete updatedDomain['v_ssl_crt'];\n }\n\n if (!updatedDomain['v_ssl_key']) {\n delete updatedDomain['v_ssl_key'];\n }\n\n if (Object.keys(updatedDomain).length !== 0 && updatedDomain.constructor === Object) {\n setState({ ...state, loading: true });\n\n updateWebDomain(updatedDomain, state.domain)\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n if (error_msg) {\n setErrorMessage(error_msg);\n setOkMessage('');\n setState({ ...state, loading: false });\n } else {\n dispatch(refreshCounters()).then(() => {\n setErrorMessage('');\n setOkMessage(ok_msg);\n fetchData(state.domain);\n });\n }\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const formatData = object => {\n let result = [];\n\n for (let i in object) {\n result.push(i);\n }\n\n return result;\n }\n\n const onChangeSslSupport = checked => {\n setState({ ...state, sslSupport: checked });\n }\n\n const onChangeProxySupport = checked => {\n setState({ ...state, proxySupport: checked });\n }\n\n const onChangeWebStats = webStat => {\n setState({ ...state, webStat });\n }\n\n const onChangeStatisticsAuth = statAuth => {\n setState({ ...state, statAuth });\n }\n\n const onChangeAdditionalFtp = additionalFtp => {\n setState({ ...state, additionalFtp });\n }\n\n return (\n <div className=\"edit-template edit-web\">\n <Helmet>\n <title>{`Vesta - ${i18n.WEB}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Editing Domain']}</div>\n <div className=\"error\"><span className=\"error-message\">{errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}</span></div>\n <div className=\"success\">\n <span className=\"ok-message\">{okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span> </span>\n </div>\n </Toolbar>\n <AddItemLayout date={state.data.date} time={state.data.time} status={state.data.status}>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"add-web\">\n <input type=\"hidden\" name=\"save\" value=\"save\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <TextInput id=\"domain\" name=\"v_domain\" title={i18n['Domain']} value={state.domain} disabled />\n\n <SelectInput\n options={formatData(state.data.ips)}\n selected={state.data.ip}\n name=\"v_ip\"\n id=\"ip\"\n title={i18n['IP Address']} />\n\n <TextArea\n id=\"proxy-aliases\"\n name=\"v_aliases\"\n title={i18n['Aliases']}\n defaultValue={state.data.aliases} />\n\n <SelectInput\n options={state.data.templates}\n selected={state.data.template}\n name=\"v_template\"\n id=\"web-template\"\n optionalTitle={state.data.web_system}\n title={i18n['Web Template']} />\n\n {\n session.WEB_BACKEND && (\n <SelectInput\n options={state.data.backend_templates}\n selected={state.data.backend_template || 'default'}\n name=\"v_backend_template\"\n id=\"backend-template\"\n optionalTitle={state.data.web_backend}\n title={i18n['Backend Template']} />\n )\n }\n\n {\n state.data.proxy_system && (\n <>\n <Checkbox\n onChange={onChangeProxySupport}\n name=\"v_proxy\"\n id=\"proxy\"\n title={i18n['Proxy Support'] ?? 'Proxy Support'}\n defaultChecked={state.proxySupport} />\n\n {\n state.proxySupport && (<div style={{ transform: 'translateX(3rem)' }}>\n <SelectInput\n options={state.data.proxy_templates}\n selected={state.data.proxy_template || 'default'}\n optionalTitle={state.data.proxy_system}\n name=\"v_proxy_template\"\n id=\"proxy_template\"\n title={i18n['Proxy Template']} />\n\n <TextArea\n id=\"proxy-extensions\"\n name=\"v_proxy_ext\"\n title={i18n['Proxy Extensions']}\n defaultValue={state.data.proxy_ext} />\n </div>)\n }\n </>\n )\n }\n\n <Checkbox\n onChange={onChangeSslSupport}\n name=\"v_ssl\"\n id=\"ssl-support\"\n title={i18n['SSL Support'] ?? 'SSL Support'}\n defaultChecked={state.sslSupport} />\n\n {\n state.sslSupport && (\n <SslSupport\n sslSubject={state.data.ssl_subject}\n sslAliases={state.data.ssl_aliases}\n sslNotBefore={state.data.ssl_not_before}\n sslNotAfter={state.data.ssl_not_after}\n sslSignature={state.data.ssl_signature}\n sslPubKey={state.data.ssl_pub_key}\n sslIssuer={state.data.ssl_issuer}\n sslCertificate={state.data.ssl_crt}\n sslKey={state.data.ssl_key}\n setModalVisible={bool => setModalVisible(bool)}\n sslCertificateAuthority={state.data.ssl_ca}\n domain={state.domain}\n sslHome={state.data.ssl_home}\n letsEncrypt={state.letsEncrypt}\n />\n )\n }\n\n <SelectInput\n options={state.data.stats}\n selected={state.webStat}\n title={i18n['Web Statistics']}\n onChange={onChangeWebStats}\n name=\"v_stats\"\n id=\"stats\" />\n\n {\n state.webStat !== 'none' && (\n <div className=\"web-stat-additional\">\n <Checkbox\n onChange={onChangeStatisticsAuth}\n name=\"v_stats_auth\"\n id=\"stat-auth\"\n defaultChecked={state.data.stats_user}\n title={i18n['Statistics Authorization']} />\n\n {\n state.statAuth && (\n <>\n <TextInput id=\"domain\" name=\"v_stats_user\" title={i18n['Username']} value={state.data.stats_user} />\n\n <Password name='v_stats_password' />\n </>\n )\n }\n </div>\n )\n }\n\n <Checkbox\n onChange={onChangeAdditionalFtp}\n name=\"v_ftp\"\n id=\"add-ftp\"\n checked={state.additionalFtp}\n title={i18n['Additional FTP Account']} />\n\n <AdditionalFtpWrapper\n checked={state.additionalFtp}\n prefixI18N={state.data.prefixI18N}\n ftps={state.data.ftp_users}\n ftpUserPrePath={state.data.ftp_user_prepath}\n unCheckAdditionalFtpBox={() => onChangeAdditionalFtp(false)} />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/web/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n\n <div className={`modal fade ${modalVisible ? 'show' : ''}`} id=\"c-panel-modal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"exampleModalLabel\" aria-hidden=\"true\" style={{ display: modalVisible ? 'block' : 'none' }}>\n <div className=\"modal-dialog\" role=\"document\">\n <div className=\"modal-content\">\n <div className=\"modal-header\">\n <h5>{i18n['Generating CSR']}</h5>\n <button type=\"button\" onClick={() => setModalVisible(false)} className=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n </div>\n <GenerateSSL\n domain={state.domain}\n closeModal={() => setModalVisible(false)}\n prePopulateInputs={({ crt, key }) => {\n setState({ ...state, data: { ...state.data, ssl_crt: crt, ssl_key: key } });\n setModalVisible(false);\n }} />\n </div>\n </div>\n </div>\n </div>\n );\n}\n\nexport default EditWeb;\n","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"../../../../actions/MainNavigation/mainNavigationActions\";\nimport TextInput from '../../../ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport Checkbox from '../../../ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport TextArea from '../../../ControlPanel/AddItemLayout/Form/TextArea/TextArea';\nimport { getServiceInfo, updateService } from 'src/ControlPanelService/Server';\nimport AddItemLayout from '../../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from '../../../../components/Spinner/Spinner';\nimport Toolbar from '../../../MainNav/Toolbar/Toolbar';\nimport { Link, useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './EditPhp.scss';\nimport { Helmet } from 'react-helmet';\nimport HtmlParser from 'react-html-parser';\n\nconst EditPhp = ({ serviceName = '' }) => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [restart, setRestart] = useState(true);\n const [state, setState] = useState({\n data: {},\n loading: false,\n basicOptions: true,\n advancedOptions: false\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/server/'));\n dispatch(removeFocusedElement());\n\n if (!serviceName) {\n history.push('/list/server');\n }\n\n setState({ ...state, loading: true });\n fetchData();\n }, []);\n\n const fetchData = () => {\n getServiceInfo(serviceName)\n .then(response => {\n setState({\n ...state,\n data: response.data,\n loading: false\n });\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err);\n });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedService = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedService[name] = value;\n }\n\n if (Object.keys(updatedService).length !== 0 && updatedService.constructor === Object) {\n setState({ ...state, loading: true });\n\n updatedService['v_config'] = state.data.config;\n updatedService['v_restart'] = restart ? 'yes' : 'no';\n\n updateService(updatedService, `/${serviceName}`)\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n setErrorMessage(error_msg || '');\n setOkMessage(ok_msg || '');\n }\n })\n .then(() => fetchData())\n .catch(err => console.error(err));\n }\n }\n\n const toggleOptions = () => {\n setState({\n ...state,\n advancedOptions: !state.advancedOptions,\n basicOptions: !state.basicOptions\n });\n }\n\n const onUpdateConfig = ({ id, value }) => {\n if (!value) return;\n\n var regexp = new RegExp(`(${id})(.+)(${state.data[id]})`, 'gm');\n const updatedConfig = state.data.config.replace(regexp, `$1$2${value}`);\n setState({ ...state, data: { ...state.data, config: updatedConfig, [id]: value } });\n }\n\n return (\n <div className=\"edit-template edit-php\">\n <Helmet>\n <title>{`Vesta - ${i18n.SERVER}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\"><Link to={`/edit/server/${state.data.web_system}`}>{i18n['Configuring Server']} / {state.data.web_system}</Link></div>\n <div className=\"link\"><Link to=\"/edit/server/php\">{i18n['Configure']} php.ini</Link></div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}\n </span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"edit-mail\">\n <input type=\"hidden\" name=\"save\" value=\"save\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n {\n !state.basicOptions && (\n <button type=\"button\" onClick={() => toggleOptions()}>\n {i18n['Basic options']}\n {state.basicOptions ? <FontAwesomeIcon icon=\"caret-up\" /> : <FontAwesomeIcon icon=\"caret-down\" />}\n </button>\n )\n }\n\n {\n state.basicOptions && (\n <>\n <TextInput\n id=\"max_execution_time\"\n title=\"max_execution_time\"\n name=\"v_max_execution_time\"\n onChange={event => onUpdateConfig(event.target)}\n value={parseInt(state.data.max_execution_time)} />\n\n <TextInput\n id=\"worker_connections\"\n title=\"worker_connections\"\n name=\"v_worker_connections\"\n onChange={event => onUpdateConfig(event.target)}\n value={parseInt(state.data.max_input_time)} />\n\n <TextInput\n id=\"memory_limit\"\n title=\"memory_limit\"\n name=\"v_memory_limit\"\n onChange={event => onUpdateConfig(event.target)}\n value={parseInt(state.data.memory_limit)} />\n\n <TextInput\n id=\"error_reporting\"\n title=\"error_reporting\"\n name=\"v_error_reporting\"\n onChange={event => onUpdateConfig(event.target)}\n value={state.data.error_reporting} />\n\n <TextInput\n id=\"display_errors\"\n title=\"display_errors\"\n name=\"v_display_errors\"\n onChange={event => onUpdateConfig(event.target)}\n value={state.data.display_errors} />\n\n <TextInput\n id=\"post_max_size\"\n title=\"post_max_size\"\n name=\"v_post_max_size\"\n onChange={event => onUpdateConfig(event.target)}\n value={state.data.post_max_size} />\n\n <TextInput\n id=\"upload_max_filesize\"\n title=\"upload_max_filesize\"\n name=\"v_upload_max_filesize\"\n onChange={event => onUpdateConfig(event.target)}\n value={state.data.upload_max_filesize} />\n </>\n )\n }\n\n {\n !state.advancedOptions && (\n <button type=\"button\" onClick={() => toggleOptions()}>\n {i18n['Advanced options']}\n {state.advancedOptions ? <FontAwesomeIcon icon=\"caret-up\" /> : <FontAwesomeIcon icon=\"caret-down\" />}\n </button>\n )\n }\n\n <br />\n <br />\n\n {\n state.advancedOptions && (\n <>\n <TextArea\n onChange={e => setState({ ...state, data: { ...state.data, config: e.target.value } })}\n defaultValue={state.data.config}\n title={state.data.config_path}\n name=\"v_config\"\n id=\"v_config\"\n rows=\"25\" />\n\n <br />\n\n <Checkbox\n title={i18n['restart']}\n defaultChecked={true}\n onChange={checked => setRestart(checked)}\n name=\"v_restart\"\n id=\"restart\" />\n </>\n )\n }\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/server/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div>\n );\n}\n\nexport default EditPhp;","import React from 'react';\nimport ListItem from '../ControlPanel/ListItem/ListItem';\nimport Container from '../ControlPanel/Container/Container';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { Link } from 'react-router-dom';\nimport { useSelector } from 'react-redux';\n\nconst Database = props => {\n const { data } = props;\n const { i18n } = useSelector(state => state.session);\n const token = localStorage.getItem(\"token\");\n\n const toggleFav = (starred) => {\n if (starred) {\n props.toggleFav(data.NAME, 'add');\n } else {\n props.toggleFav(data.NAME, 'delete');\n }\n }\n\n const checkItem = () => {\n props.checkItem(data.NAME);\n }\n\n const handleSuspend = () => {\n let suspendedStatus = data.SUSPENDED === 'yes' ? 'unsuspend' : 'suspend' === 'yes' ? 'unsuspend' : 'suspend';\n props.handleModal(data.suspend_conf, `/api/v1/${suspendedStatus}/db/index.php?database=${data.NAME}`);\n }\n\n const handleDelete = () => {\n props.handleModal(data.delete_conf, `/api/v1/delete/db/index.php?database=${data.NAME}`);\n }\n\n return (\n <ListItem\n id={data.NAME}\n date={data.DATE}\n toggleFav={toggleFav}\n checkItem={checkItem}\n starred={data.STARRED}\n focused={data.FOCUSED}\n checked={data.isChecked}\n suspended={data.SUSPENDED === 'yes'}>\n\n <Container className=\"r-col w-85\">\n <div className=\"name\">{data.DATABASE}</div>\n <br />\n <div className=\"stats\">\n <Container className=\"c-1\">\n <div className=\"disk\">\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 token = localStorage.getItem(\"token\");\n const { controlPanelFocusedElement } = useSelector(state => state.controlPanelContent);\n const { focusedElement } = useSelector(state => state.mainNavigation);\n const dispatch = useDispatch();\n const [backupDetailsData, setBackupDetailsData] = useState([]);\n const [modal, setModal] = useState({\n text: '',\n visible: false,\n });\n const [state, setState] = useState({\n loading: false,\n backupDetails: [],\n toggledAll: false,\n selection: [],\n totalAmount: ''\n });\n\n useEffect(() => {\n dispatch(removeControlPanelContentFocusedElement());\n fetchData();\n\n return () => dispatch(removeControlPanelContentFocusedElement());\n }, []);\n\n useEffect(() => {\n window.addEventListener(\"keydown\", handleContentSelection);\n window.addEventListener(\"keydown\", handleFocusedElementShortcuts);\n\n return () => {\n window.removeEventListener(\"keydown\", handleContentSelection);\n window.removeEventListener(\"keydown\", handleFocusedElementShortcuts);\n };\n }, [controlPanelFocusedElement, focusedElement, backupDetailsData]);\n\n const handleContentSelection = event => {\n if (event.keyCode === 65) {\n handleRestore(`?backup=${props.backup}`);\n return;\n }\n\n if (event.keyCode === 38 || event.keyCode === 40) {\n if (focusedElement) {\n dispatch(MainNavigation.removeFocusedElement());\n }\n }\n\n if (event.keyCode === 38) {\n event.preventDefault();\n handleArrowUp();\n } else if (event.keyCode === 40) {\n event.preventDefault();\n handleArrowDown();\n }\n }\n\n const initFocusedElement = backupDetails => {\n backupDetails[0]['FOCUSED'] = backupDetails[0]['NAME'];\n setBackupDetailsData(backupDetails);\n dispatch(addControlPanelContentFocusedElement(backupDetails[0]['NAME']));\n }\n\n const handleArrowDown = () => {\n let backupDetails = [...backupDetailsData];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(backupDetails);\n return;\n }\n\n let nextFocusedElement = backupDetails[controlPanelFocusedElement + 1];\n\n if (nextFocusedElement) {\n backupDetails[controlPanelFocusedElement]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setBackupDetailsData(backupDetails);\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleArrowUp = () => {\n let backupDetails = [...backupDetailsData];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(backupDetails);\n return;\n }\n\n let nextFocusedElement = backupDetails[controlPanelFocusedElement - 1];\n\n if (nextFocusedElement) {\n backupDetails[controlPanelFocusedElement]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setBackupDetailsData(backupDetails);\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleFocusedElementShortcuts = event => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus');\n\n if (controlPanelFocusedElement > 0 || controlPanelFocusedElement !== '' && !isSearchInputFocused) {\n switch (event.keyCode) {\n case 82: return handleRestore();\n default: break;\n }\n }\n }\n\n const handleRestore = params => {\n const paramsUri = params ? params : backupDetailsData[controlPanelFocusedElement].restoreLinkParams;\n\n restoreBackupSetting(paramsUri)\n .then(response => displayModal(response.data.message))\n .catch(err => console.error(err));\n }\n\n const fetchData = () => {\n setState({ ...state, loading: true });\n\n getBackupDetails(props.backup)\n .then(result => {\n reformatData(result.data.data[props.backup]);\n setState({\n ...state,\n totalAmount: result.data.totalAmount,\n selection: [],\n toggledAll: false,\n loading: false\n });\n })\n .catch(err => console.error(err));\n }\n\n const reformatData = data => {\n let reformattedData = ['WEB', 'DNS', 'MAIL', 'DB', 'UDIR', 'CRON'].reduce((acc, cat) => {\n data[cat].split(',').map(item => {\n acc.push({\n type: cat,\n name: item,\n restoreLinkParams: `?backup=${props.backup}&type=${cat.toLowerCase()}&object=${item}`\n });\n });\n\n return acc;\n }, []);\n\n setBackupDetailsData(reformattedData);\n }\n\n const listBackups = () => {\n const backupDetails = [...backupDetailsData];\n const result = [];\n\n backupDetails.forEach((backupDetail, index) => {\n backupDetail.NAME = index;\n backupDetail.FOCUSED = controlPanelFocusedElement === index;\n result.push(backupDetail);\n });\n\n return result.map((item, index) => {\n return <RestoreSetting data={item} key={index} checkItemFunc={name => checkItem(name)} restoreSetting={handleRestore} />;\n });\n }\n\n const checkItem = name => {\n const { selection } = state;\n let duplicate = [...selection];\n let backupDetailsDuplicate = [...backupDetailsData];\n let checkedItem = duplicate.indexOf(name);\n\n let incomingItem = backupDetailsDuplicate.findIndex(backupDetail => backupDetail.NAME === name);\n backupDetailsDuplicate[incomingItem].isChecked = !backupDetailsDuplicate[incomingItem].isChecked;\n\n if (checkedItem !== -1) {\n duplicate.splice(backupDetailsDuplicate[name]['name'], 1);\n } else {\n duplicate.push(backupDetailsDuplicate[name]['name']);\n }\n\n setState({ ...state, selection: duplicate });\n setBackupDetailsData(backupDetailsDuplicate);\n }\n\n const toggleAll = toggled => {\n const backupDetailsDuplicate = [...backupDetailsData];\n\n if (toggled) {\n let backupDetailNames = [];\n let backupDetails = backupDetailsDuplicate.map(backupDetail => {\n backupDetailNames.push(backupDetail.name);\n backupDetail.isChecked = true;\n return backupDetail;\n });\n\n setState({ ...state, selection: backupDetailNames, toggledAll: toggled });\n setBackupDetailsData(backupDetails);\n } else {\n let backupDetails = backupDetailsDuplicate.map(backupDetail => {\n backupDetail.isChecked = false;\n return backupDetail;\n });\n\n setState({ ...state, selection: [], toggledAll: toggled });\n setBackupDetailsData(backupDetails);\n }\n }\n\n const bulk = action => {\n const { selection } = state;\n\n if (selection.length && action) {\n setState({ ...state, loading: true });\n bulkRestore(action, selection, props.backup)\n .then(result => {\n if (result.status === 200) {\n displayModal(result.data.message);\n toggleAll(false);\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const displayModal = text => {\n setState({ ...state, loading: false });\n setModal({ ...modal, visible: true, text });\n }\n\n const modalCancelHandler = () => {\n setModal({ ...modal, visible: false, text: '' });\n }\n\n return (\n <div className=\"mail-accounts backups-restore-settings\">\n <Helmet>\n <title>{`Vesta - ${i18n.BACKUP}`}</title>\n </Helmet>\n <Toolbar mobile={false} >\n <LeftButton name={i18n['Restore All']} list=\"backup-details\" onClick={() => handleRestore(`?backup=${props.backup}`)} showLeftMenu={true} />\n <div className=\"r-menu\">\n <div className=\"input-group input-group-sm\">\n <Checkbox toggleAll={toggleAll} toggled={state.toggledAll} />\n <Select list='backupDetailList' bulkAction={bulk} />\n <SearchInput handleSearchTerm={term => props.changeSearchTerm(term)} />\n </div>\n </div>\n </Toolbar>\n {state.loading\n ? <Spinner />\n : (\n <>\n <div className=\"mail-accounts-wrapper\">\n <div className=\"subtitle\">\n <span>{`${i18n['Listing']} ${props.backup}`}</span>\n </div>\n {listBackups()}\n </div>\n <div className=\"footer-actions-wrapper\">\n <div className=\"total\">{state.totalAmount}</div>\n <div className=\"back\">\n <Link to=\"/list/backup/\">{i18n['Back']}</Link>\n </div>\n </div>\n </>\n )\n }\n\n <Modal\n onSave={modalCancelHandler}\n showCancelButton={false}\n show={modal.visible}\n text={modal.text} />\n </div>\n );\n}","import React, { } from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport ListItem from '../ControlPanel/ListItem/ListItem';\nimport Container from '../ControlPanel/Container/Container';\nimport { faFileDownload } from '@fortawesome/free-solid-svg-icons'\nimport './Backup.scss';\nimport { Link } from 'react-router-dom';\nimport { useSelector } from 'react-redux';\n\nconst Backup = props => {\n const { data } = props;\n const { i18n } = useSelector(state => state.session);\n const token = localStorage.getItem(\"token\");\n\n const toggleFav = (starred) => {\n if (starred) {\n props.toggleFav(props.data.NAME, 'add');\n } else {\n props.toggleFav(props.data.NAME, 'delete');\n }\n }\n\n const checkItem = () => {\n props.checkItem(props.data.NAME);\n }\n\n const handleDelete = () => {\n props.handleModal(data.delete_conf, `/api/v1/delete/backup/?backup=${data.NAME}`);\n }\n\n return (\n <ListItem\n id={data.NAME}\n date={data.DATE}\n toggleFav={toggleFav}\n checkItem={checkItem}\n focused={data.FOCUSED}\n starred={data.STARRED}\n checked={data.isChecked}>\n\n <Container className=\"r-col w-85\">\n <div className=\"name\">{data.NAME}</div>\n <div className=\"stats\">\n <Container className=\"c-1\">\n <div>{i18n['Backup Size']}: <span><span className=\"stat\">{data.SIZE}</span>{i18n.mb}</span></div>\n </Container>\n <Container className=\"c-2\">\n <div>{i18n.Type}: <span className=\"stat\">{data.TYPE}</span></div>\n </Container>\n <Container className=\"c-3\">\n <div>{i18n['Run Time']}: <span className=\"stat\">{data.RUNTIME} minute</span></div>\n </Container>\n </div>\n </Container>\n <div className=\"actions\">\n\n {data.UPDATED === 'no' && <div><a href={`/update/vesta/?pkg=${data.NAME}`}>{i18n.update} <FontAwesomeIcon icon=\"wrench\" /></a></div>}\n\n <div>\n <a className=\"link-download\" href={`/api/v1/download/backup/?backup=${data.NAME}&token=${token}`}>\n {i18n.download}\n {data.FOCUSED ? <span className=\"shortcut-button\">D</span> : <FontAwesomeIcon icon={faFileDownload} />}\n </a>\n </div>\n\n <div>\n <Link className=\"link-download\" to={`/list/backup?backup=${data.NAME}`}>\n {i18n['configure restore settings']}\n {data.FOCUSED ? <span className=\"shortcut-button html-unicode\">&#8617;</span> : <FontAwesomeIcon icon=\"list\" />}\n </Link>\n </div>\n\n <div>\n <button className=\"link-delete\" onClick={() => handleDelete()}>\n {i18n.Delete}\n {data.FOCUSED ? <span className=\"shortcut-button del\">Del</span> : <FontAwesomeIcon icon=\"times\" />}\n </button>\n </div>\n\n </div>\n </ListItem>\n );\n}\n\nexport default Backup;","import React, { useState, useEffect } from 'react';\nimport { addControlPanelContentFocusedElement, removeControlPanelContentFocusedElement } from '../../actions/ControlPanelContent/controlPanelContentActions';\nimport { addActiveElement, removeFocusedElement } from '../../actions/MainNavigation/mainNavigationActions';\nimport { bulkAction, getBackupList, handleAction, scheduleBackup } from '../../ControlPanelService/Backup';\nimport * as MainNavigation from '../../actions/MainNavigation/mainNavigationActions';\nimport SearchInput from '../../components/MainNav/Toolbar/SearchInput/SearchInput';\nimport { addFavorite, deleteFavorite } from '../../ControlPanelService/Favorites';\nimport Checkbox from '../../components/MainNav/Toolbar/Checkbox/Checkbox';\nimport Select from '../../components/MainNav/Toolbar/Select/Select';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Toolbar from '../../components/MainNav/Toolbar/Toolbar';\nimport Modal from '../../components/ControlPanel/Modal/Modal';\nimport Spinner from '../../components/Spinner/Spinner';\nimport { useSelector, useDispatch } from 'react-redux';\nimport Backup from '../../components/Backup/Backup';\nimport { Helmet } from 'react-helmet';\nimport { Link } from 'react-router-dom';\nimport './Backups.scss';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\n\nconst Backups = props => {\n const { i18n } = useSelector(state => state.session);\n const { controlPanelFocusedElement } = useSelector(state => state.controlPanelContent);\n const { focusedElement } = useSelector(state => state.mainNavigation);\n const dispatch = useDispatch();\n const [loading, setLoading] = useState(false);\n const [modal, setModal] = useState({\n text: '',\n visible: false,\n actionUrl: ''\n });\n const [state, setState] = useState({\n backups: [],\n backupFav: [],\n toggledAll: false,\n selection: [],\n totalAmount: ''\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/backup/'));\n dispatch(removeFocusedElement());\n dispatch(removeControlPanelContentFocusedElement());\n fetchData().then(() => setLoading(false));\n\n return () => {\n dispatch(removeControlPanelContentFocusedElement());\n }\n }, []);\n\n useEffect(() => {\n window.addEventListener(\"keydown\", handleContentSelection);\n window.addEventListener(\"keydown\", handleFocusedElementShortcuts);\n\n return () => {\n window.removeEventListener(\"keydown\", handleContentSelection);\n window.removeEventListener(\"keydown\", handleFocusedElementShortcuts);\n };\n }, [controlPanelFocusedElement, focusedElement, state.backups]);\n\n const handleContentSelection = event => {\n if (event.keyCode === 38 || event.keyCode === 40) {\n if (focusedElement) {\n dispatch(MainNavigation.removeFocusedElement());\n }\n }\n\n if (event.keyCode === 38) {\n event.preventDefault();\n handleArrowUp();\n } else if (event.keyCode === 40) {\n event.preventDefault();\n handleArrowDown();\n }\n }\n\n const initFocusedElement = backups => {\n backups[0]['FOCUSED'] = backups[0]['NAME'];\n setState({ ...state, backups });\n dispatch(addControlPanelContentFocusedElement(backups[0]['NAME']));\n }\n\n const handleArrowDown = () => {\n let backups = [...state.backups];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(backups);\n return;\n }\n\n let focusedElementPosition = backups.findIndex(backup => backup.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== backups.length - 1) {\n let nextFocusedElement = backups[focusedElementPosition + 1];\n backups[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, backups });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleArrowUp = () => {\n let backups = [...state.backups];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(backups);\n return;\n }\n\n let focusedElementPosition = backups.findIndex(backup => backup.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== 0) {\n let nextFocusedElement = backups[focusedElementPosition - 1];\n backups[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, backups });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleFocusedElementShortcuts = event => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus');\n\n if (controlPanelFocusedElement && !isSearchInputFocused) {\n switch (event.keyCode) {\n case 8: return handleDelete();\n case 13: return configureRestoreSettings();\n case 68: return download();\n default: break;\n }\n }\n }\n\n const configureRestoreSettings = () => {\n props.history.push(`/list/backup?backup=${controlPanelFocusedElement}`);\n }\n\n const download = () => {\n window.open(`/api/v1/download/backup?backup=${controlPanelFocusedElement}`);\n }\n\n const handleDelete = () => {\n const { backups } = state;\n let currentBackupData = backups.filter(backup => backup.NAME === controlPanelFocusedElement)[0];\n\n displayModal(currentBackupData.delete_conf, `/api/v1/delete/cron/?job=${controlPanelFocusedElement}`);\n }\n\n const fetchData = () => {\n setLoading(true);\n return new Promise((resolve, reject) => {\n getBackupList()\n .then(result => {\n setState({\n ...state,\n backups: reformatData(result.data.data),\n backupFav: result.data.backup_fav,\n totalAmount: result.data.totalAmount,\n selection: [],\n toggledAll: false\n });\n resolve();\n })\n .catch(err => console.error(err));\n });\n }\n\n const reformatData = data => {\n let backups = [];\n\n for (let i in data) {\n data[i]['NAME'] = i;\n data[i]['isChecked'] = false;\n data[i]['FOCUSED'] = controlPanelFocusedElement === i;\n backups.push(data[i]);\n }\n\n return backups;\n }\n\n const backups = () => {\n const { backups } = state;\n const result = [];\n const backupFav = { ...state.backupFav };\n\n backups.forEach(backup => {\n backup.FOCUSED = controlPanelFocusedElement === backup.NAME;\n\n if (backupFav[backup.NAME]) {\n backup.STARRED = backupFav[backup.NAME];\n } else {\n backup.STARRED = 0;\n }\n\n result.push(backup);\n });\n\n return result.map((item, index) => {\n return <Backup data={item} key={index} toggleFav={toggleFav} checkItem={checkItem} handleModal={displayModal} />;\n });\n }\n\n const checkItem = name => {\n const { selection, backups } = state;\n let duplicate = [...selection];\n let backupDuplicate = [...backups];\n let checkedItem = duplicate.indexOf(name);\n\n let incomingItem = backupDuplicate.findIndex(backup => backup.NAME === name);\n backupDuplicate[incomingItem].isChecked = !backupDuplicate[incomingItem].isChecked;\n\n if (checkedItem !== -1) {\n duplicate.splice(checkedItem, 1);\n } else {\n duplicate.push(name);\n }\n\n setState({ ...state, backups: backupDuplicate, selection: duplicate });\n }\n\n const toggleFav = (value, type) => {\n const { backupFav } = state;\n let backupFavDuplicate = backupFav;\n\n if (type === 'add') {\n backupFavDuplicate[value] = 1;\n\n addFavorite(value, 'backup')\n .then(() => {\n setState({ ...state, backupFav: backupFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n } else {\n backupFavDuplicate[value] = undefined;\n\n deleteFavorite(value, 'backup')\n .then(() => {\n setState({ ...state, backupFav: backupFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n }\n }\n\n const toggleAll = toggled => {\n const backupsDuplicate = [...state.backups];\n\n if (toggled) {\n let backupNames = [];\n\n let backups = backupsDuplicate.map(backup => {\n backupNames.push(backup.NAME);\n backup.isChecked = true;\n return backup;\n });\n\n setState({ ...state, backups, selection: backupNames, toggledAll: toggled });\n } else {\n let backups = backupsDuplicate.map(backup => {\n backup.isChecked = false;\n return backup;\n });\n setState({ ...state, backups, selection: [], toggledAll: toggled });\n }\n }\n\n const bulk = action => {\n const { selection } = state;\n\n if (selection.length && action) {\n setLoading(true);\n bulkAction(action, selection)\n .then(result => {\n if (result.status === 200) {\n toggleAll(false);\n fetchData().then(() => refreshMenuCounters());\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const displayModal = (text, url) => {\n setLoading(false);\n setModal({\n ...modal,\n visible: true,\n text: text,\n actionUrl: url\n });\n }\n\n const modalConfirmHandler = () => {\n if (!modal.actionUrl) {\n return modalCancelHandler();\n }\n\n modalCancelHandler();\n setLoading(true);\n handleAction(modal.actionUrl)\n .then(res => {\n if (res.data.error) {\n setLoading(false);\n return displayModal(res.data.error, '');\n }\n fetchData().then(() => refreshMenuCounters())\n })\n .catch(err => { setLoading(false); console.error(err); });\n }\n\n const refreshMenuCounters = () => {\n dispatch(refreshCounters()).then(() => setLoading(false));\n }\n\n const modalCancelHandler = () => {\n setModal({\n ...modal,\n visible: false,\n text: '',\n actionUrl: ''\n });\n }\n\n const scheduleBackupButton = () => {\n setLoading(true);\n scheduleBackup()\n .then(result => {\n if (result.data.error) {\n displayModal(result.data.error, '');\n } else {\n displayModal(result.data.ok, '');\n }\n })\n .catch(err => console.error(err));\n }\n\n return (\n <div className=\"backups\">\n <Helmet>\n <title>{`Vesta - ${i18n.BACKUP}`}</title>\n </Helmet>\n <Toolbar mobile={false} >\n <div className=\"l-menu\">\n <button onClick={scheduleBackupButton}>\n <FontAwesomeIcon icon=\"plus\" />\n <span className=\"add\">{i18n[\"Create Backup\"]}</span>\n </button>\n </div>\n <div className=\"r-menu\">\n <div className=\"input-group input-group-sm\">\n <Link to='/list/backup/exclusions' className=\"button-extra\" type=\"submit\">{i18n['backup exclusions']}</Link>\n <Checkbox toggleAll={toggleAll} toggled={state.toggledAll} />\n <Select list='backupList' bulkAction={bulk} />\n <SearchInput handleSearchTerm={term => props.changeSearchTerm(term)} />\n </div>\n </div>\n </Toolbar>\n <div className=\"backups-wrapper\">\n {loading\n ? <Spinner />\n : (<>\n {backups()}\n <div className=\"total\">{state.totalAmount}</div>\n </>)}\n </div>\n <Modal\n onSave={modalConfirmHandler}\n onCancel={modalCancelHandler}\n show={modal.visible}\n text={modal.text} />\n </div>\n );\n}\n\nexport default Backups;\n","import React, { useEffect, useState } from 'react';\nimport BackupRestoreSettings from '../../components/Backup/RestoreSettings/BackupRestoreSettings';\nimport { useHistory } from 'react-router-dom';\nimport Backups from '../Backups/Backups';\nimport QueryString from 'qs';\nimport { Helmet } from 'react-helmet';\nimport { useSelector } from 'react-redux';\n\nexport default function BackupWrapper(props) {\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const parsedQueryString = QueryString.parse(history.location.search, { ignoreQueryPrefix: true });\n const [isBackupSettings, setIsBackupSettings] = useState(false);\n\n useEffect(() => {\n if (parsedQueryString.backup) {\n setIsBackupSettings(true);\n } else {\n setIsBackupSettings(false);\n }\n }, [history.location]);\n\n return (\n <>\n <Helmet>\n <title>{`Vesta - ${i18n.DNS}`}</title>\n </Helmet>\n {\n isBackupSettings\n ? <BackupRestoreSettings backup={parsedQueryString.backup} />\n : <Backups {...props} changeSearchTerm={props.changeSearchTerm} />\n }\n </>\n );\n}","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"src/actions/MainNavigation/mainNavigationActions\";\nimport AddItemLayout from 'src/components/ControlPanel/AddItemLayout/AddItemLayout';\nimport { getBanIps, addBanIp } from 'src/ControlPanelService/Firewalls';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from 'src/components/Spinner/Spinner';\nimport Toolbar from '../../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { Helmet } from 'react-helmet';\nimport HtmlParser from 'react-html-parser';\n\nconst AddBanIP = () => {\n const { i18n } = useSelector(state => state.session);\n const userLanguage = localStorage.getItem(\"language\");\n const history = useHistory();\n const dispatch = useDispatch();\n const [state, setState] = useState({\n banIps: [],\n errorMessage: '',\n okMessage: '',\n loading: false\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/firewall/'));\n dispatch(removeFocusedElement());\n\n setState({ ...state, loading: true });\n\n getBanIps()\n .then(result => {\n setState({ ...state, ip: result.data.ip, chain: result.data.chain, loading: false });\n });\n }, []);\n\n const submitFormHandler = event => {\n event.preventDefault();\n let newUser = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n newUser[name] = value;\n }\n\n if (Object.keys(newUser).length !== 0 && newUser.constructor === Object) {\n setState({ ...state, loading: true });\n addBanIp(newUser)\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n if (error_msg) {\n setState({ ...state, errorMessage: error_msg, okMessage: '', loading: false });\n } else if (ok_msg) {\n setState({ ...state, errorMessage: '', okMessage: ok_msg, loading: false });\n } else {\n setState({ ...state, loading: false });\n }\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const renderChainOptions = () => {\n return ['SSH', 'WEB', 'FTP', 'DNS', 'MAIL', 'DB', 'VESTA'].map((chain, index) => (\n <option key={index} selected={userLanguage === chain} value={chain}>{chain}</option>\n ));\n }\n\n return (\n <div className=\"edit-template add-user\">\n <Helmet>\n <title>{`Vesta - ${i18n.FIREWALL}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Adding IP Address to Banlist']}</div>\n <div className=\"error\"><span className=\"error-message\">{state.errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {state.errorMessage}</span></div>\n <div className=\"success\">\n <span className=\"ok-message\">{state.okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(state.okMessage)}</span> </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"add-user\">\n <input type=\"hidden\" name=\"ok\" value=\"add\" />\n\n <div class=\"form-group\">\n <label htmlFor=\"chain\">{i18n.Banlist}</label>\n <select class=\"form-control\" id=\"chain\" name=\"v_chain\">\n {renderChainOptions()}\n </select>\n </div>\n\n <div className=\"form-group exp-date\">\n <label htmlFor=\"ip\">\n {i18n['IP address']}\n <span className=\"optional\">({i18n['CIDR format is supported']})</span>\n </label>\n <input\n type=\"text\"\n className=\"form-control\"\n id=\"ip\"\n required\n name=\"v_ip\" />\n </div>\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Add}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/firewall/banlist')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div>\n );\n}\n\nexport default AddBanIP;\n","import React from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport ListItem from '../ControlPanel/ListItem/ListItem';\nimport Container from '../ControlPanel/Container/Container';\nimport './CronJob.scss';\nimport { Link } from 'react-router-dom';\nimport { useSelector } from 'react-redux';\n\nconst CronJob = props => {\n const { data } = props;\n const { i18n } = useSelector(state => state.session);\n const token = localStorage.getItem(\"token\");\n\n const toggleFav = (starred) => {\n if (starred) {\n props.toggleFav(props.data.NAME, 'add');\n } else {\n props.toggleFav(props.data.NAME, 'delete');\n }\n }\n\n const checkItem = () => {\n props.checkItem(props.data.NAME);\n }\n\n const handleSuspend = () => {\n let suspendedStatus = data.SUSPENDED === 'yes' ? 'unsuspend' : 'suspend' === 'yes' ? 'unsuspend' : 'suspend';\n props.handleModal(data.suspend_conf, `/api/v1/${suspendedStatus}/cron/index.php?job=${data.NAME}`);\n }\n\n const handleDelete = () => {\n props.handleModal(data.delete_conf, `/api/v1/delete/cron/index.php?job=${data.NAME}`);\n }\n\n return (\n <ListItem\n id={data.NAME}\n date={data.DATE}\n checkItem={checkItem}\n toggleFav={toggleFav}\n focused={data.FOCUSED}\n starred={data.STARRED}\n checked={data.isChecked}\n suspended={data.SUSPENDED === 'yes'}>\n\n <Container className=\"cron-jobs-list r-col w-85\">\n <div className=\"name\">{data.CMD}</div>\n <div className=\"stats\">\n <Container className=\"cron-col\">\n <div>{i18n.Min} <span>{data.MIN}</span></div>\n </Container>\n <Container className=\"cron-col\">\n <div>{i18n.Hour} <span>{data.HOUR}</span></div>\n </Container>\n <Container className=\"cron-col\">\n <div>{i18n.Day} <span>{data.DAY}</span></div>\n </Container>\n <Container className=\"cron-col\">\n <div>{i18n.Month} <span>{data.MONTH}</span></div>\n </Container>\n <Container className=\"cron-col\">\n <div>{i18n['Day of week']} <span>{data.WDAY}</span></div>\n </Container>\n </div>\n </Container>\n <div className=\"actions\">\n\n <div>\n <Link className=\"link-edit\" to={`/edit/cron/?job=${data.NAME}`}>\n {i18n.edit}\n {data.FOCUSED ? <span className=\"shortcut-button html-unicode\">&#8617;</span> : <FontAwesomeIcon icon=\"pen\" />}\n </Link>\n </div>\n\n <div>\n <button\n className=\"link-gray\"\n onClick={() => handleSuspend()}>\n {i18n[data.suspend_action]}\n {data.FOCUSED ? <span className=\"shortcut-button\">S</span> : <FontAwesomeIcon icon={data.SUSPENDED === 'yes' ? 'unlock' : 'lock'} />}\n </button>\n </div>\n\n <div>\n <button className=\"link-delete\" onClick={() => handleDelete()}>\n {i18n.Delete}\n {data.FOCUSED ? <span className=\"shortcut-button del\">Del</span> : <FontAwesomeIcon icon=\"times\" />}\n </button>\n </div>\n\n </div>\n </ListItem>\n );\n}\n\nexport default CronJob;","import React, { useState, useEffect } from 'react';\nimport { addControlPanelContentFocusedElement, removeControlPanelContentFocusedElement } from '../../actions/ControlPanelContent/controlPanelContentActions';\nimport { addActiveElement, removeFocusedElement } from '../../actions/MainNavigation/mainNavigationActions';\nimport DropdownFilter from '../../components/MainNav/Toolbar/DropdownFilter/DropdownFilter';\nimport { bulkAction, getCronList, handleAction } from '../../ControlPanelService/Cron';\nimport * as MainNavigation from '../../actions/MainNavigation/mainNavigationActions';\nimport SearchInput from '../../components/MainNav/Toolbar/SearchInput/SearchInput';\nimport { addFavorite, deleteFavorite } from '../../ControlPanelService/Favorites';\nimport LeftButton from '../../components/MainNav/Toolbar/LeftButton/LeftButton';\nimport Checkbox from '../../components/MainNav/Toolbar/Checkbox/Checkbox';\nimport Select from '../../components/MainNav/Toolbar/Select/Select';\nimport Toolbar from '../../components/MainNav/Toolbar/Toolbar';\nimport Modal from '../../components/ControlPanel/Modal/Modal';\nimport CronJob from '../../components/CronJob/CronJob';\nimport Spinner from '../../components/Spinner/Spinner';\nimport { useSelector, useDispatch } from 'react-redux';\nimport './CronJobs.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\n\nconst CronJobs = props => {\n const { i18n } = useSelector(state => state.session);\n const { controlPanelFocusedElement } = useSelector(state => state.controlPanelContent);\n const { focusedElement } = useSelector(state => state.mainNavigation);\n const dispatch = useDispatch();\n const [loading, setLoading] = useState(false);\n const [modal, setModal] = useState({\n text: '',\n visible: false,\n actionUrl: '',\n });\n const [state, setState] = useState({\n cronJobs: [],\n cronFav: [],\n toggledAll: false,\n cronReports: '',\n sorting: i18n.Date,\n order: \"descending\",\n selection: [],\n totalAmount: ''\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/cron/'));\n dispatch(removeFocusedElement());\n dispatch(removeControlPanelContentFocusedElement());\n fetchData().then(() => setLoading(false));\n\n return () => {\n dispatch(removeControlPanelContentFocusedElement());\n }\n }, []);\n\n useEffect(() => {\n window.addEventListener(\"keydown\", handleContentSelection);\n window.addEventListener(\"keydown\", handleFocusedElementShortcuts);\n\n return () => {\n window.removeEventListener(\"keydown\", handleContentSelection);\n window.removeEventListener(\"keydown\", handleFocusedElementShortcuts);\n };\n }, [controlPanelFocusedElement, focusedElement, state.cronJobs]);\n\n const handleContentSelection = event => {\n if (event.keyCode === 38 || event.keyCode === 40) {\n if (focusedElement) {\n dispatch(MainNavigation.removeFocusedElement());\n }\n }\n\n if (event.keyCode === 38) {\n event.preventDefault();\n handleArrowUp();\n } else if (event.keyCode === 40) {\n event.preventDefault();\n handleArrowDown();\n }\n }\n\n const initFocusedElement = cronJobs => {\n cronJobs[0]['FOCUSED'] = cronJobs[0]['NAME'];\n setState({ ...state, cronJobs });\n dispatch(addControlPanelContentFocusedElement(cronJobs[0]['NAME']));\n }\n\n const handleArrowDown = () => {\n let cronJobs = [...state.cronJobs];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(cronJobs);\n return;\n }\n\n let focusedElementPosition = cronJobs.findIndex(cronJob => cronJob.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== cronJobs.length - 1) {\n let nextFocusedElement = cronJobs[focusedElementPosition + 1];\n cronJobs[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, cronJobs });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleArrowUp = () => {\n let cronJobs = [...state.cronJobs];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(cronJobs);\n return;\n }\n\n let focusedElementPosition = cronJobs.findIndex(cronJob => cronJob.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== 0) {\n let nextFocusedElement = cronJobs[focusedElementPosition - 1];\n cronJobs[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, cronJobs });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleFocusedElementShortcuts = event => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus');\n\n if (controlPanelFocusedElement && !isSearchInputFocused) {\n switch (event.keyCode) {\n case 8: return handleDelete();\n case 13: return handleEdit();\n case 83: return handleSuspend();\n default: break;\n }\n }\n }\n\n const handleEdit = () => {\n props.history.push(`/edit/cron?job=${controlPanelFocusedElement}`);\n }\n\n const handleSuspend = () => {\n const { cronJobs } = state;\n let currentCronJobData = cronJobs.filter(cronJob => cronJob.NAME === controlPanelFocusedElement)[0];\n let suspendedStatus = currentCronJobData.SUSPENDED === 'yes' ? 'unsuspend' : 'suspend';\n\n displayModal(currentCronJobData.suspend_conf, `/api/v1/${suspendedStatus}/cron/index.php?job=${controlPanelFocusedElement}`);\n }\n\n const handleDelete = () => {\n const { cronJobs } = state;\n let currentCronJobData = cronJobs.filter(cronJob => cronJob.NAME === controlPanelFocusedElement)[0];\n\n displayModal(currentCronJobData.delete_conf, `/api/v1/delete/cron/index.php?job=${controlPanelFocusedElement}`);\n }\n\n const fetchData = () => {\n setLoading(true);\n return new Promise((resolve, reject) => {\n getCronList()\n .then(result => {\n setState({\n ...state,\n cronJobs: reformatData(result.data.data),\n cronReports: result.data.cron_reports,\n cronFav: result.data.cron_fav,\n selection: [],\n toggledAll: false,\n totalAmount: result.data.totalAmount,\n });\n resolve();\n })\n .catch(err => console.error(err));\n });\n }\n\n const reformatData = data => {\n let cronJobs = [];\n\n for (let i in data) {\n data[i]['NAME'] = i;\n data[i]['isChecked'] = false;\n data[i]['FOCUSED'] = controlPanelFocusedElement === i;\n cronJobs.push(data[i]);\n }\n\n return cronJobs;\n }\n\n const changeSorting = (sorting, order) => {\n setState({\n ...state,\n sorting,\n order\n });\n }\n\n const cronJobs = () => {\n const { cronJobs } = state;\n const result = [];\n const cronFav = { ...state.cronFav };\n\n cronJobs.forEach(cronJob => {\n cronJob.FOCUSED = controlPanelFocusedElement === cronJob.NAME;\n\n if (cronFav[cronJob.NAME]) {\n cronJob.STARRED = cronFav[cronJob.NAME];\n } else {\n cronJob.STARRED = 0;\n }\n\n result.push(cronJob);\n });\n\n let sortedResult = sortArray(result);\n\n return sortedResult.map((item, index) => {\n return <CronJob data={item} key={index} toggleFav={toggleFav} checkItem={checkItem} handleModal={displayModal} />;\n });\n }\n\n const checkItem = name => {\n const { selection, cronJobs } = state;\n let duplicate = [...selection];\n let cronDuplicate = cronJobs;\n let checkedItem = duplicate.indexOf(name);\n\n let incomingItem = cronDuplicate.findIndex(cronJob => cronJob.NAME === name);\n cronDuplicate[incomingItem].isChecked = !cronDuplicate[incomingItem].isChecked;\n\n if (checkedItem !== -1) {\n duplicate.splice(checkedItem, 1);\n } else {\n duplicate.push(name);\n }\n\n setState({ ...state, cronJobs: cronDuplicate, selection: duplicate });\n }\n\n const sortArray = array => {\n const { order, sorting } = state;\n let sortingColumn = sortBy(sorting);\n\n if (order === \"descending\") {\n return array.sort((a, b) => (a[sortingColumn] < b[sortingColumn]) ? 1 : ((b[sortingColumn] < a[sortingColumn]) ? -1 : 0));\n } else {\n return array.sort((a, b) => (a[sortingColumn] > b[sortingColumn]) ? 1 : ((b[sortingColumn] > a[sortingColumn]) ? -1 : 0));\n }\n }\n\n const sortBy = sorting => {\n const { Date, Command, Starred } = i18n;\n\n switch (sorting) {\n case Date: return 'DATE';\n case Command: return 'CMD';\n case Starred: return 'STARRED';\n default: break;\n }\n }\n\n const toggleFav = (value, type) => {\n const { cronFav } = state;\n let cronFavDuplicate = cronFav;\n\n if (type === 'add') {\n cronFavDuplicate[value] = 1;\n\n addFavorite(value, 'cron')\n .then(() => {\n setState({ ...state, cronFav: cronFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n } else {\n cronFavDuplicate[value] = undefined;\n\n deleteFavorite(value, 'cron')\n .then(() => {\n setState({ ...state, cronFav: cronFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n }\n }\n\n const toggleAll = toggled => {\n const cronJobsDuplicate = [...state.cronJobs];\n\n if (toggled) {\n let cronJobNames = [];\n\n let cronJobs = cronJobsDuplicate.map(cronJob => {\n cronJobNames.push(cronJob.NAME);\n cronJob.isChecked = true;\n return cronJob;\n });\n\n setState({ ...state, cronJobs, selection: cronJobNames, toggledAll: toggled });\n } else {\n let cronJobs = cronJobsDuplicate.map(cronJob => {\n cronJob.isChecked = false;\n return cronJob;\n });\n setState({ ...state, cronJobs, selection: [], toggledAll: toggled });\n }\n }\n\n const bulk = action => {\n const { selection } = state;\n const notifications = state.cronReports === 'yes' ? 'delete-cron-reports' : 'add-cron-reports';\n\n if (action === notifications) {\n return handleCronNotifications();\n }\n\n if (selection.length && action) {\n setLoading(true);\n bulkAction(action, selection)\n .then(result => {\n if (result.status === 200) {\n toggleAll(false);\n fetchData().then(() => refreshMenuCounters());\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const displayModal = (text, url) => {\n setModal({\n ...modal,\n visible: !state.modalVisible,\n text,\n actionUrl: url\n });\n }\n\n const modalConfirmHandler = () => {\n if (!modal.actionUrl) {\n return modalCancelHandler();\n }\n\n modalCancelHandler();\n setLoading(true);\n handleAction(modal.actionUrl)\n .then(res => {\n if (res.data.error) {\n setLoading(false);\n return displayModal(res.data.error, '');\n }\n fetchData().then(() => refreshMenuCounters())\n })\n .catch(err => { setLoading(false); console.error(err); });\n }\n\n const refreshMenuCounters = () => {\n dispatch(refreshCounters()).then(() => setLoading(false));\n }\n\n const modalCancelHandler = () => {\n setModal({\n ...modal,\n visible: false,\n text: '',\n actionUrl: ''\n });\n }\n\n const handleCronNotifications = () => {\n const token = localStorage.getItem(\"token\");\n const url = `/api/v1/${state.cronReports === 'yes' ? 'delete' : 'add'}/cron/reports/?token=${token}`;\n\n handleAction(url)\n .then(res => {\n displayModal(res.data.message, '');\n fetchData().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\n const printNameServers = servers => {\n let serversArray = servers.split(',');\n\n return serversArray.map(\n (server, index) => <div key={index}>{server}</div>\n );\n }\n\n const toggleFav = (starred) => {\n if (starred) {\n props.toggleFav(data.NAME, 'add');\n } else {\n props.toggleFav(data.NAME, 'delete');\n }\n }\n\n const checkItem = () => {\n props.checkItem(data.NAME);\n }\n\n const handleDelete = () => {\n props.handleModal(data.delete_conf, `/api/v1/delete/package/index.php?package=${data.NAME}`);\n }\n\n return (\n <ListItem\n id={data.NAME}\n date={data.DATE}\n toggleFav={toggleFav}\n checkItem={checkItem}\n starred={data.STARRED}\n focused={data.FOCUSED}\n checked={data.isChecked}>\n\n <Container className=\"r-col w-85\">\n <div className=\"name\">{data.NAME}</div>\n <div>{data.FNAME} {data.LNAME}</div>\n <div className=\"stats\">\n <Container className=\"c-1 w-30\">\n <div>{i18n['Web Template']}: <span><span className=\"stat\">{data.WEB_TEMPLATE}</span></span></div>\n <div>{i18n['Proxy Template']}: <span><span className=\"stat\">{data.PROXY_TEMPLATE}</span></span></div>\n <div>{i18n['DNS Template']}: <span><span className=\"stat\">{data.DNS_TEMPLATE}</span></span></div>\n <div>{i18n['SSH Access']}: <span><span className=\"stat\">{data.SHELL}</span></span></div>\n <div>{i18n['Web Domains']}: <span><span className=\"stat\">{data.WEB_DOMAINS}</span></span></div>\n <div>{i18n['Web Aliases']}: <span><span className=\"stat\">{data.WEB_ALIASES}</span></span></div>\n </Container>\n <Container className=\"c-2 w-35\">\n <div>{i18n['DNS domains']}: <span><span className=\"stat\">{data.DNS_DOMAINS}</span></span></div>\n <div>{i18n['DNS records']}: <span><span className=\"stat\">{data.DNS_RECORDS}</span></span></div>\n <div>{i18n['Mail Domains']}: <span><span className=\"stat\">{data.MAIL_DOMAINS}</span></span></div>\n <div>{i18n['Mail Accounts']}: <span><span className=\"stat\">{data.MAIL_ACCOUNTS}</span></span></div>\n <div>{i18n.Databases}: <span><span className=\"stat\">{data.DATABASES}</span></span></div>\n <div>{i18n['Cron Jobs']}: <span><span className=\"stat\">{data.CRON_JOBS}</span></span></div>\n </Container>\n <Container className=\"c-3 w-35\">\n <div><span>{i18n.Backups}:</span> <span><span className=\"stat\">{data.BACKUPS}</span></span></div>\n <div><span>{i18n.Bandwidth}:</span> <span><span><span className=\"stat\">{data.BANDWIDTH}</span> {i18n.mb}</span></span></div>\n <div><span>{i18n.Disk}:</span> <span><span><span className=\"stat\">{data.DISK_QUOTA}</span> {i18n.mb}</span></span></div>\n <div className=\"ns\"><span>{i18n['Name Servers']}:</span> <span><span className=\"stat\">{printNameServers(data.NS)}</span></span></div>\n </Container>\n </div>\n </Container>\n <div className=\"actions\">\n <div>\n <Link className=\"link-edit\" to={`/edit/package/?package=${data.NAME}`}>\n {i18n.edit}\n {data.FOCUSED ? <span className=\"shortcut-button html-unicode\">&#8617;</span> : <FontAwesomeIcon icon=\"pen\" />}\n </Link>\n </div>\n\n <div>\n <button className=\"link-delete\" onClick={() => handleDelete()}>\n {i18n.Delete}\n {data.FOCUSED ? <span className=\"shortcut-button del\">Del</span> : <FontAwesomeIcon icon=\"times\" />}\n </button>\n </div>\n </div>\n </ListItem>\n );\n}\n\nexport default Package;","import React, { useEffect, useState } from 'react';\nimport { addControlPanelContentFocusedElement, removeControlPanelContentFocusedElement } from '../../actions/ControlPanelContent/controlPanelContentActions';\nimport { addActiveElement, removeFocusedElement } from '../../actions/MainNavigation/mainNavigationActions';\nimport { bulkAction, getPackageList, handleAction } from '../../ControlPanelService/Package';\nimport DropdownFilter from '../../components/MainNav/Toolbar/DropdownFilter/DropdownFilter';\nimport * as MainNavigation from '../../actions/MainNavigation/mainNavigationActions';\nimport SearchInput from '../../components/MainNav/Toolbar/SearchInput/SearchInput';\nimport { addFavorite, deleteFavorite } from '../../ControlPanelService/Favorites';\nimport LeftButton from '../../components/MainNav/Toolbar/LeftButton/LeftButton';\nimport Checkbox from '../../components/MainNav/Toolbar/Checkbox/Checkbox';\nimport Select from '../../components/MainNav/Toolbar/Select/Select';\nimport Toolbar from '../../components/MainNav/Toolbar/Toolbar';\nimport Modal from '../../components/ControlPanel/Modal/Modal';\nimport Package from '../../components/Package/Package';\nimport Spinner from '../../components/Spinner/Spinner';\nimport { useDispatch, useSelector } from 'react-redux';\nimport './Packages.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\n\nconst Packages = props => {\n const { i18n } = useSelector(state => state.session);\n const { controlPanelFocusedElement } = useSelector(state => state.controlPanelContent);\n const { focusedElement } = useSelector(state => state.mainNavigation);\n const dispatch = useDispatch();\n const [loading, setLoading] = useState(false);\n const [modal, setModal] = useState({\n text: '',\n visible: false,\n actionUrl: ''\n });\n const [state, setState] = useState({\n packages: [],\n packagesFav: [],\n toggledAll: false,\n sorting: i18n.Date,\n order: \"descending\",\n selection: [],\n totalAmount: ''\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/package/'));\n dispatch(removeFocusedElement());\n dispatch(removeControlPanelContentFocusedElement());\n fetchData().then(() => setLoading(false));\n\n return () => {\n dispatch(removeControlPanelContentFocusedElement());\n }\n }, []);\n\n useEffect(() => {\n window.addEventListener(\"keydown\", handleContentSelection);\n window.addEventListener(\"keydown\", handleFocusedElementShortcuts);\n\n return () => {\n window.removeEventListener(\"keydown\", handleContentSelection);\n window.removeEventListener(\"keydown\", handleFocusedElementShortcuts);\n };\n }, [controlPanelFocusedElement, focusedElement, state.packages]);\n\n const handleContentSelection = event => {\n if (event.keyCode === 38 || event.keyCode === 40) {\n if (focusedElement) {\n dispatch(MainNavigation.removeFocusedElement());\n }\n }\n\n if (event.keyCode === 38) {\n event.preventDefault();\n handleArrowUp();\n } else if (event.keyCode === 40) {\n event.preventDefault();\n handleArrowDown();\n }\n }\n\n const initFocusedElement = packages => {\n packages[0]['FOCUSED'] = packages[0]['NAME'];\n setState({ ...state, packages });\n dispatch(addControlPanelContentFocusedElement(packages[0]['NAME']));\n }\n\n const handleArrowDown = () => {\n let packages = [...state.packages];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(packages);\n return;\n }\n\n let focusedElementPosition = packages.findIndex(pack => pack.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== packages.length - 1) {\n let nextFocusedElement = packages[focusedElementPosition + 1];\n packages[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, packages });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleArrowUp = () => {\n let packages = [...state.packages];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(packages);\n return;\n }\n\n let focusedElementPosition = packages.findIndex(pack => pack.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== 0) {\n let nextFocusedElement = packages[focusedElementPosition - 1];\n packages[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, packages });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleFocusedElementShortcuts = event => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus');\n\n if (controlPanelFocusedElement && !isSearchInputFocused) {\n switch (event.keyCode) {\n case 8: return handleDelete();\n case 13: return handleEdit();\n default: break;\n }\n }\n }\n\n const handleEdit = () => {\n props.history.push(`/edit/package/?package=${controlPanelFocusedElement}`);\n }\n\n const handleDelete = () => {\n const { packages } = state;\n let currentPackageData = packages.filter(pack => pack.NAME === controlPanelFocusedElement)[0];\n\n displayModal(currentPackageData.delete_conf, `/api/v1/delete/package/index.php?package=${controlPanelFocusedElement}`);\n }\n\n const fetchData = () => {\n setLoading(true);\n return new Promise((resolve, reject) => {\n getPackageList()\n .then(result => {\n setState({\n ...state,\n packages: reformatData(result.data.data),\n packagesFav: result.data.packagesFav,\n totalAmount: result.data.totalAmount,\n selection: [],\n toggledAll: false\n });\n resolve();\n })\n .catch(err => console.error(err));\n });\n }\n\n const reformatData = data => {\n let packages = [];\n\n for (let i in data) {\n data[i]['NAME'] = i;\n data[i]['FOCUSED'] = controlPanelFocusedElement === i;\n packages.push(data[i]);\n }\n\n return packages;\n }\n\n const changeSorting = (sorting, order) => {\n setState({\n ...state,\n sorting,\n order\n });\n }\n\n const packages = () => {\n const { packages } = state;\n const packagesFav = { ...state.packagesFav };\n const result = [];\n\n packages.forEach(pack => {\n pack.FOCUSED = controlPanelFocusedElement === pack.NAME;\n\n if (packagesFav[pack.NAME]) {\n pack.STARRED = packagesFav[pack.NAME];\n } else {\n pack.STARRED = 0;\n }\n\n result.push(pack);\n });\n\n let sortedResult = sortArray(result);\n\n return sortedResult.map((item, index) => {\n return <Package data={item} key={index} toggleFav={toggleFav} checkItem={checkItem} handleModal={displayModal} />;\n });\n }\n\n const checkItem = name => {\n const { selection, packages } = state;\n let duplicate = [...selection];\n let packagesDuplicate = packages;\n let checkedItem = duplicate.indexOf(name);\n\n let incomingItem = packagesDuplicate.findIndex(pack => pack.NAME === name);\n packagesDuplicate[incomingItem].isChecked = !packagesDuplicate[incomingItem].isChecked;\n\n if (checkedItem !== -1) {\n duplicate.splice(checkedItem, 1);\n } else {\n duplicate.push(name);\n }\n\n setState({ ...state, packages: packagesDuplicate, selection: duplicate });\n }\n\n const sortArray = array => {\n const { order, sorting } = state;\n let sortingColumn = sortBy(sorting);\n\n if (order === \"descending\") {\n return array.sort((a, b) => (a[sortingColumn] < b[sortingColumn]) ? 1 : ((b[sortingColumn] < a[sortingColumn]) ? -1 : 0));\n } else {\n return array.sort((a, b) => (a[sortingColumn] > b[sortingColumn]) ? 1 : ((b[sortingColumn] > a[sortingColumn]) ? -1 : 0));\n }\n }\n\n const sortBy = sorting => {\n const { Date, Starred } = i18n;\n\n switch (sorting) {\n case Date: return 'DATE';\n case i18n['Package Name']: return 'NAME';\n case Starred: return 'STARRED';\n default: break;\n }\n }\n\n const toggleFav = (value, type) => {\n const { packagesFav } = state;\n let packagesFavDuplicate = packagesFav;\n\n if (type === 'add') {\n packagesFavDuplicate[value] = 1;\n\n addFavorite(value, 'package')\n .then(() => {\n setState({ ...state, packagesFav: packagesFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n } else {\n packagesFavDuplicate[value] = undefined;\n\n deleteFavorite(value, 'package')\n .then(() => {\n setState({ ...state, packagesFav: packagesFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n }\n }\n\n const toggleAll = toggled => {\n const packagesDuplicate = [...state.packages];\n\n if (toggled) {\n let packageNames = [];\n\n let packages = packagesDuplicate.map(pack => {\n packageNames.push(pack.NAME);\n pack.isChecked = true;\n return pack;\n });\n\n setState({ ...state, packages, selection: packageNames, toggledAll: toggled });\n } else {\n let packages = packagesDuplicate.map(pack => {\n pack.isChecked = false;\n return pack;\n });\n\n setState({ ...state, packages, selection: [], toggledAll: toggled });\n }\n }\n\n const bulk = action => {\n const { selection } = state;\n\n if (selection.length && action) {\n setLoading(true);\n bulkAction(action, selection)\n .then(result => {\n if (result.status === 200) {\n toggleAll(false);\n fetchData().then(() => refreshMenuCounters());\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const displayModal = (text, actionUrl) => {\n setModal({ ...modal, visible: !modal.visible, text, actionUrl })\n }\n\n const modalConfirmHandler = () => {\n if (!modal.actionUrl) {\n return modalCancelHandler();\n }\n\n modalCancelHandler();\n setLoading(true);\n handleAction(modal.actionUrl)\n .then(res => {\n if (res.data.error) {\n setLoading(false);\n return displayModal(res.data.error, '');\n }\n fetchData().then(() => refreshMenuCounters())\n })\n .catch(err => { setLoading(false); console.error(err); });\n }\n\n const refreshMenuCounters = () => {\n dispatch(refreshCounters()).then(() => setLoading(false));\n }\n\n const modalCancelHandler = () => {\n setModal({ ...modal, visible: false, text: '', actionUrl: '' })\n }\n\n return (\n <div className=\"packages\">\n <Helmet>\n <title>{`Vesta - ${i18n.PACKAGE}`}</title>\n </Helmet>\n <Toolbar mobile={false} >\n <LeftButton name={i18n['Add Package']} href=\"/add/package/\" showLeftMenu={true} />\n <div className=\"r-menu\">\n <div className=\"input-group input-group-sm\">\n <Checkbox toggleAll={toggleAll} toggled={state.toggledAll} />\n <Select list='packagesList' bulkAction={bulk} />\n <DropdownFilter changeSorting={changeSorting} sorting={state.sorting} order={state.order} list=\"packagesList\" />\n <SearchInput handleSearchTerm={term => props.changeSearchTerm(term)} />\n </div>\n </div>\n </Toolbar>\n <div className=\"packages-wrapper\">\n {\n loading\n ? <Spinner />\n : (<>\n {packages()}\n <div className=\"total\">{state.totalAmount}</div>\n </>)\n }\n </div>\n <Modal\n onSave={modalConfirmHandler}\n onCancel={modalCancelHandler}\n show={modal.visible}\n text={modal.text} />\n </div>\n );\n}\n\nexport default Packages;\n","import axios from \"axios\";\n\nconst webApiUri = '/api/v1/languages.php';\nconst BASE_URL = window.location.origin;\n\nexport const getLanguages = () => {\n return axios.get(BASE_URL + webApiUri);\n}\n\nexport const languagesMock = [\n \"ar\",\n \"az\",\n \"bg\",\n \"bs\",\n \"cn\",\n \"cz\",\n \"da\",\n \"de\",\n \"el\",\n \"en\",\n \"es\",\n \"fa\",\n \"fi\",\n \"fr\",\n \"hu\",\n \"id\",\n \"it\",\n \"ja\",\n \"ka\",\n \"ko\",\n \"nl\",\n \"no\",\n \"pl\",\n \"pt-BR\",\n \"pt\",\n \"ro\",\n \"ru\",\n \"se\",\n \"sr\",\n \"th\",\n \"tr\",\n \"tw\",\n \"ua\",\n \"ur\",\n \"vi\"\n];","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport Password from '../../../components/ControlPanel/AddItemLayout/Form/Password/Password';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { getLanguages } from '../../../ControlPanelService/Languages';\nimport { getPackageList } from '../../../ControlPanelService/Package';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { addUser } from '../../../ControlPanelService/Users';\nimport Spinner from '../../../components/Spinner/Spinner';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './AddUser.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nconst AddUser = props => {\n const { i18n } = useSelector(state => state.session);\n const { session } = useSelector(state => state.userSession);\n const history = useHistory();\n const dispatch = useDispatch();\n const [state, setState] = useState({\n vEmail: '',\n vNotify: '',\n languages: [],\n packages: [],\n errorMessage: '',\n okMessage: '',\n loading: false\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/user/'));\n dispatch(removeFocusedElement());\n\n setState({ ...state, loading: true });\n\n Promise.all([getAllPackages(), getAllLanguages()])\n .then(result => {\n const [packages, languages] = result;\n let packageNames = getPackageNames(packages.data.data);\n\n setState({ ...state, packages: packageNames, languages: languages.data, loading: false });\n });\n }, []);\n\n const getAllPackages = () => {\n return getPackageList().catch(err => console.error(err));\n }\n\n const getAllLanguages = () => {\n return getLanguages().catch(err => console.error(err));\n }\n\n const getPackageNames = packages => {\n let result = [];\n\n for (let i in packages) {\n result.push(i);\n }\n\n return result;\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let newUser = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n newUser[name] = value;\n }\n\n if (Object.keys(newUser).length !== 0 && newUser.constructor === Object) {\n setState({ ...state, loading: true });\n addUser(newUser)\n .then(result => {\n const { error_msg: errorMessage, ok_msg: okMessage } = result.data;\n\n if (errorMessage) {\n setState({ ...state, errorMessage, okMessage, loading: false });\n } else {\n dispatch(refreshCounters()).then(() => {\n setState({ ...state, okMessage, errorMessage: '', loading: false });\n });\n }\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err);\n });\n }\n }\n\n const renderPackageOptions = () => {\n return state.packages.map((pack, index) => (\n <option key={index} value={pack}>{pack}</option>\n ));\n }\n\n const renderLanguageOptions = () => {\n return state.languages.map((language, index) => (\n <option key={index} selected={session.LANGUAGE === language} value={language}>{language}</option>\n ));\n }\n\n const onChangeEmail = value => {\n setState({ ...state, vEmail: value });\n }\n\n const onBlurEmail = () => {\n if (!state.vNotify) {\n setState({ ...state, vNotify: state.vEmail });\n }\n }\n\n const onChangeSecondEmail = value => {\n setState({ ...state, vNotify: value });\n }\n\n const repeatEmailHandler = checked => {\n if (checked) {\n if (state.vEmail) {\n setState({ ...state, vNotify: state.vEmail });\n }\n } else {\n setState({ ...state, vNotify: '' });\n }\n }\n\n return (\n <div className=\"edit-template add-user\">\n <Helmet>\n <title>{`Vesta - ${i18n.USER}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Adding User']}</div>\n <div className=\"error\"><span className=\"error-message\">{state.errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {state.errorMessage}</span></div>\n <div className=\"success\">\n <span className=\"ok-message\">{state.okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(state.okMessage)}</span> </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"add-user\">\n <div className=\"form-group\">\n <label htmlFor=\"username\">{i18n.Username}</label>\n <input type=\"text\" className=\"form-control\" id=\"username\" name=\"v_username\" />\n </div>\n\n <Password name='v_password' />\n\n <div className=\"form-group\">\n <label htmlFor=\"email\">\n {i18n.Email} /\n <div>\n <input\n type=\"checkbox\"\n id=\"send-credentials\"\n onChange={event => repeatEmailHandler(event.target.checked)} />\n <label htmlFor=\"send-credentials\">{i18n['Send login credentials to email address']}</label>\n </div>\n </label>\n <input\n type=\"email\"\n name=\"v_email\"\n className=\"form-control\"\n id=\"email\"\n value={state.vEmail}\n onChange={event => onChangeEmail(event.target.value)}\n onBlur={() => onBlurEmail()} />\n </div>\n\n <div class=\"form-group\">\n <label htmlFor=\"package\">{i18n.Package}</label>\n <select class=\"form-control\" id=\"package\" name=\"v_package\">\n {renderPackageOptions()}\n </select>\n </div>\n\n <div class=\"form-group\">\n <label htmlFor=\"language\">{i18n.Language}</label>\n <select class=\"form-control\" id=\"language\" name=\"v_language\">\n {renderLanguageOptions()}\n </select>\n </div>\n\n <div className=\"form-group\">\n <label htmlFor=\"firstName\">{i18n['First Name']}</label>\n <input type=\"text\" className=\"form-control\" id=\"firstName\" name=\"v_fname\" />\n </div>\n\n <div className=\"form-group\">\n <label htmlFor=\"lastName\">{i18n['Last Name']}</label>\n <input type=\"text\" className=\"form-control\" id=\"lastName\" name=\"v_lname\" />\n </div>\n\n <div className=\"form-group\">\n <label htmlFor=\"sendLoginCredentialsToEmailAddress\">{i18n['Send login credentials to email address']}</label>\n <input\n type=\"email\"\n className=\"form-control\"\n id=\"sendLoginCredentialsToEmailAddress\"\n value={state.vNotify}\n onChange={e => onChangeSecondEmail(e.target.value)}\n name=\"v_notify\" />\n </div>\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Add}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/user/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div>\n );\n}\n\nexport default AddUser;","import axios from \"axios\";\nimport { getAuthToken } from \"src/utils/token\";\n\nconst deleteAutoUpdateUri = '/api/v1/delete/cron/autoupdate/';\nconst addAutoUpdateUri = '/api/v1/add/cron/autoupdate/';\nconst webApiUri = '/api/v1/list/updates/index.php';\nconst BASE_URL = window.location.origin;\n\nexport const getUpdatesList = () => {\n return axios.get(BASE_URL + webApiUri);\n}\n\nexport const bulkAction = (action, updates) => {\n const formData = new FormData();\n formData.append(\"action\", action);\n formData.append(\"token\", getAuthToken());\n\n updates.forEach(update => {\n formData.append(\"pkg[]\", update);\n });\n\n return axios.post(BASE_URL + '/api/v1/bulk/vesta/', formData);\n};\n\nexport const handleAction = uri => {\n return axios.get(BASE_URL + uri, {\n params: {\n token: getAuthToken()\n }\n });\n}\n\nexport const enableAutoUpdate = () => {\n return axios.get(`${BASE_URL}${addAutoUpdateUri}`, {\n params: {\n token: getAuthToken()\n }\n });\n};\n\nexport const disableAutoUpdate = () => {\n return axios.get(`${BASE_URL}${deleteAutoUpdateUri}`, {\n params: {\n token: getAuthToken()\n }\n });\n};","import React, { } from 'react';\nimport { useSelector } from 'react-redux';\nimport Container from '../ControlPanel/Container/Container';\nimport ListItem from '../ControlPanel/ListItem/ListItem';\nimport './Update.scss';\n\nconst Update = props => {\n const { data } = props;\n const { i18n } = useSelector(state => state.session);\n\n const isUpdated = status => {\n if (status === 'no') {\n return 'OUTDATED';\n }\n\n return 'UPDATED';\n }\n\n const isOutdated = status => {\n return status === \"no\";\n }\n\n const checkItem = () => {\n props.checkItem(props.data.NAME);\n }\n\n return (\n <ListItem\n date={false}\n id={data.NAME}\n checkItem={checkItem}\n focused={data.FOCUSED}\n checked={data.isChecked}\n outdated={isOutdated(data.UPDATED)}\n leftNameText={isUpdated(data.UPDATED)}>\n\n <Container className=\"r-col w-85\">\n <div className=\"name\">{data.NAME}</div>\n <div className=\"stats\">\n <Container className=\"c-1\">\n <div className=\"descr\"><span className=\"stat\">{data.DESCR}</span></div>\n </Container>\n <Container className=\"c-2\">\n <div>{i18n.Version}: <span><span className=\"stat\">{data.VERSION}</span> {`(${data.ARCH})`}</span></div>\n </Container>\n <Container className=\"c-3\">\n <div>{i18n.Release}: <span className=\"stat\">{data.RELEASE}</span></div>\n </Container>\n </div>\n </Container>\n\n </ListItem>\n );\n}\n\nexport default Update;","import React, { useEffect, useState } from 'react';\nimport { addControlPanelContentFocusedElement, removeControlPanelContentFocusedElement } from '../../actions/ControlPanelContent/controlPanelContentActions';\nimport { addActiveElement, removeFocusedElement } from '../../actions/MainNavigation/mainNavigationActions';\nimport { bulkAction, getUpdatesList, enableAutoUpdate, disableAutoUpdate } from '../../ControlPanelService/Updates';\nimport * as MainNavigation from '../../actions/MainNavigation/mainNavigationActions';\nimport SearchInput from '../../components/MainNav/Toolbar/SearchInput/SearchInput';\nimport LeftButton from '../../components/MainNav/Toolbar/LeftButton/LeftButton';\nimport Modal from 'src/components/ControlPanel/Modal/Modal';\nimport Checkbox from '../../components/MainNav/Toolbar/Checkbox/Checkbox';\nimport Select from '../../components/MainNav/Toolbar/Select/Select';\nimport Toolbar from '../../components/MainNav/Toolbar/Toolbar';\nimport { useDispatch, useSelector } from 'react-redux';\nimport Spinner from '../../components/Spinner/Spinner';\nimport Update from '../../components/Update/Update';\nimport './Updates.scss';\nimport { Helmet } from 'react-helmet';\n\nconst Updates = props => {\n const { i18n } = useSelector(state => state.session);\n const { controlPanelFocusedElement } = useSelector(state => state.controlPanelContent);\n const { focusedElement } = useSelector(state => state.mainNavigation);\n const dispatch = useDispatch();\n const [state, setState] = useState({\n updates: [],\n selection: [],\n autoUpdate: '',\n token: '',\n loading: false,\n toggledAll: false\n });\n const [modal, setModal] = useState({\n text: '',\n visible: false,\n actionUrl: ''\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/updates/'));\n dispatch(removeFocusedElement());\n dispatch(removeControlPanelContentFocusedElement());\n fetchData();\n\n return () => {\n dispatch(removeControlPanelContentFocusedElement());\n }\n }, []);\n\n useEffect(() => {\n window.addEventListener(\"keydown\", handleContentSelection);\n\n return () => {\n window.removeEventListener(\"keydown\", handleContentSelection);\n };\n }, [controlPanelFocusedElement, focusedElement, state.updates]);\n\n const handleContentSelection = event => {\n if (event.keyCode === 38 || event.keyCode === 40) {\n if (focusedElement) {\n dispatch(MainNavigation.removeFocusedElement());\n }\n }\n\n if (event.keyCode === 38) {\n event.preventDefault();\n handleArrowUp();\n } else if (event.keyCode === 40) {\n event.preventDefault();\n handleArrowDown();\n }\n }\n\n const initFocusedElement = updates => {\n updates[0]['FOCUSED'] = updates[0]['NAME'];\n setState({ ...state, updates });\n dispatch(addControlPanelContentFocusedElement(updates[0]['NAME']));\n }\n\n const handleArrowDown = () => {\n let updates = [...state.updates];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(updates);\n return;\n }\n\n let focusedElementPosition = updates.findIndex(update => update.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== updates.length - 1) {\n let nextFocusedElement = updates[focusedElementPosition + 1];\n updates[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, updates });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleArrowUp = () => {\n let updates = [...state.updates];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(updates);\n return;\n }\n\n let focusedElementPosition = updates.findIndex(update => update.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== 0) {\n let nextFocusedElement = updates[focusedElementPosition - 1];\n updates[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, updates });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const fetchData = () => {\n setState({ ...state, loading: true });\n\n getUpdatesList()\n .then(result => {\n setState({\n ...state,\n selection: [],\n updates: reformatData(result.data.data),\n autoUpdate: result.data.autoUpdate,\n loading: false\n });\n })\n .catch(err => console.error(err));\n }\n\n const reformatData = data => {\n let updates = [];\n\n for (let i in data) {\n data[i]['NAME'] = i;\n data[i]['FOCUSED'] = controlPanelFocusedElement === i;\n updates.push(data[i]);\n }\n\n return updates;\n }\n\n const updates = () => {\n let updates = [...state.updates];\n\n updates.forEach(update => {\n update.FOCUSED = controlPanelFocusedElement === update.NAME;\n });\n\n return updates.map((item, index) => {\n return <Update data={item} key={index} checkItem={checkItem} />;\n });\n }\n\n const checkItem = name => {\n let duplicate = [...state.selection];\n let updatesDuplicate = [...state.updates];\n let checkedItem = duplicate.indexOf(name);\n\n let incomingItem = updatesDuplicate.findIndex(update => update.NAME === name);\n updatesDuplicate[incomingItem].isChecked = !updatesDuplicate[incomingItem].isChecked;\n\n if (checkedItem !== -1) {\n duplicate.splice(checkedItem, 1);\n } else {\n duplicate.push(name);\n }\n\n setState({ ...state, updates: updatesDuplicate, selection: duplicate });\n }\n\n const toggleAll = toggled => {\n const updatesDuplicate = [...state.updates];\n\n if (toggled) {\n let updateNames = [];\n\n let updates = updatesDuplicate.map(update => {\n updateNames.push(update.NAME);\n update.isChecked = true;\n return update;\n });\n\n setState({ ...state, updates, selection: updateNames, toggledAll: toggled });\n } else {\n let updates = updatesDuplicate.map(update => {\n update.isChecked = false;\n return update;\n });\n\n setState({ ...state, updates, selection: [], toggledAll: toggled });\n }\n }\n\n const bulk = action => {\n const { selection } = state;\n\n if (selection.length && action !== 'apply to selected') {\n bulkAction(action, selection)\n .then(res => {\n toggleAll(false);\n if (res.status === 200) {\n if (res.data.error) {\n setState({ ...state, loading: false });\n return displayModal(res.data.error, '');\n }\n\n displayModal(res.data.message, '');\n fetchData();\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const handleAutoUpdate = () => {\n if (state.autoUpdate === 'Enabled') {\n disableAutoUpdate()\n .then(res => {\n if (res.data.error) {\n setState({ ...state, loading: false });\n return displayModal(res.data.error, '');\n }\n\n displayModal(res.data.message, '');\n fetchData();\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err);\n });\n } else {\n enableAutoUpdate()\n .then(res => {\n if (res.data.error) {\n setState({ ...state, loading: false });\n return displayModal(res.data.error, '');\n }\n\n displayModal(res.data.message, '');\n fetchData();\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err);\n });\n }\n }\n\n const displayModal = (text, url) => {\n setState({ ...state, loading: true });\n setModal({\n ...modal,\n visible: true,\n text: text,\n actionUrl: url\n });\n }\n\n const modalCancelHandler = () => {\n setModal({\n ...modal,\n visible: false,\n text: '',\n actionUrl: ''\n });\n }\n\n const printAutoUpdateButtonName = () => {\n if (state.autoUpdate === 'Enabled') {\n return i18n['disable autoupdate'];\n } else {\n return i18n['enable autoupdate'];\n }\n }\n\n return (\n <div className=\"statistics-list updates\">\n <Helmet>\n <title>{`Vesta - ${i18n.UPDATES}`}</title>\n </Helmet>\n <Toolbar mobile={false} className=\"justify-right\">\n <LeftButton name=\"Add Cron Job\" showLeftMenu={false} />\n <div className=\"r-menu\">\n <div className=\"input-group input-group-sm\">\n <button onClick={handleAutoUpdate} className=\"button-extra\">{printAutoUpdateButtonName()}</button>\n <Checkbox toggleAll={toggleAll} />\n <Select list='updatesList' bulkAction={bulk} />\n <SearchInput handleSearchTerm={term => props.changeSearchTerm(term)} />\n </div>\n </div>\n </Toolbar>\n {state.loading ? <Spinner /> : updates()}\n <Modal\n onSave={modalCancelHandler}\n onCancel={modalCancelHandler}\n show={modal.visible}\n text={modal.text} />\n </div>\n );\n}\n\nexport default Updates;","import React from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Container from '../ControlPanel/Container/Container';\nimport ListItem from '../ControlPanel/ListItem/ListItem';\nimport './ServerSys.scss';\nimport { Link } from 'react-router-dom';\nimport { useSelector } from 'react-redux';\n\nconst Server = props => {\n const { data } = props;\n const { i18n } = useSelector(state => state.session);\n\n const checkItem = () => {\n props.checkItem(props.data.HOSTNAME);\n }\n\n return (\n <ListItem\n id={data.NAME}\n focused={data.FOCUSED}\n sysInfo={data.HOSTNAME}\n checked={data.isChecked}\n checkItem={checkItem}>\n\n <Container className=\"r-col w-85\">\n <div className=\"name\">{data.HOSTNAME}</div>\n <div className=\"stats\">\n <Container className=\"c-1\">\n <div className=\"descr\"><span><span className=\"stat\">{data.OS} {data.VERSION}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {`(${data.ARCH})`}</span></div>\n </Container>\n <Container className=\"c-2\">\n <div>{i18n['Load Average']}: <span><span className=\"stat\">{data.LOADAVERAGE}</span></span></div>\n </Container>\n <Container className=\"c-3\">\n <div><span>{i18n.Uptime}: <span className=\"stat\">{data.UPTIME}</span></span></div>\n </Container>\n </div>\n </Container>\n <div className=\"actions\">\n\n <div>\n <Link className=\"link-list\" to={`/edit/server/`}>\n {i18n.configure}\n {data.FOCUSED ? <span className=\"shortcut-button html-unicode\">&#8617;</span> : <FontAwesomeIcon icon=\"cogs\" />}\n </Link>\n </div>\n\n <div>\n <button className=\"link-download restart\" onClick={() => props.handleAction(`/api/v1/restart/system/?hostname=${data.NAME}`)}>\n {i18n.restart}\n {\n data.FOCUSED\n ? <span className=\"shortcut-button\">R</span>\n : <svg width=\"1em\" height=\"1em\" viewBox=\"0 0 16 16\" class=\"bi bi-arrow-repeat\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" d=\"M2.854 7.146a.5.5 0 0 0-.708 0l-2 2a.5.5 0 1 0 .708.708L2.5 8.207l1.646 1.647a.5.5 0 0 0 .708-.708l-2-2zm13-1a.5.5 0 0 0-.708 0L13.5 7.793l-1.646-1.647a.5.5 0 0 0-.708.708l2 2a.5.5 0 0 0 .708 0l2-2a.5.5 0 0 0 0-.708z\" />\n <path fill-rule=\"evenodd\" d=\"M8 3a4.995 4.995 0 0 0-4.192 2.273.5.5 0 0 1-.837-.546A6 6 0 0 1 14 8a.5.5 0 0 1-1.001 0 5 5 0 0 0-5-5zM2.5 7.5A.5.5 0 0 1 3 8a5 5 0 0 0 9.192 2.727.5.5 0 1 1 .837.546A6 6 0 0 1 2 8a.5.5 0 0 1 .501-.5z\" />\n </svg>\n }\n </button>\n </div>\n </div>\n </ListItem>\n );\n}\n\nexport default Server;","import React from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Container from '../ControlPanel/Container/Container';\nimport ListItem from '../ControlPanel/ListItem/ListItem';\nimport './Server.scss';\nimport { Link } from 'react-router-dom';\nimport { useSelector } from 'react-redux';\n\nconst Server = props => {\n const { data } = props;\n const { i18n } = useSelector(state => state.session);\n\n const checkItem = () => {\n props.checkItem(data.NAME);\n }\n\n return (\n <ListItem\n id={data.NAME}\n focused={data.FOCUSED}\n checked={data.isChecked}\n 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/cpu\" className=\"button-extra\">{i18n['show: CPU / MEM / NET / DISK']}</Link>\n <Checkbox toggleAll={toggleAll} toggled={state.toggledAll} />\n <Select list='serverList' bulkAction={bulk} />\n <SearchInput handleSearchTerm={term => props.changeSearchTerm(term)} />\n </div>\n </div>\n </Toolbar>\n {loading ? <Spinner /> : (\n <div className=\"servers-wrapper\">\n {servers()}\n </div>\n )}\n\n <Modal\n onSave={modalConfirmHandler}\n onCancel={modalCancelHandler}\n showCancelButton={false}\n show={modal.visible}\n text={modal.text} />\n </div>\n );\n}\n\nexport default Servers;\n","import React, { useEffect } from 'react';\nimport { addActiveElement } from '../../../actions/MainNavigation/mainNavigationActions';\nimport { useSelector, useDispatch } from \"react-redux\";\nimport { Link } from \"react-router-dom\";\n\nimport './Menu.scss';\n\nconst className = height => {\n if (height === 35) {\n return \"menu-stat shadow\";\n } else {\n return \"menu-stat\";\n }\n}\n\nconst style = ({ menuHeight, mobile }) => {\n if (mobile) {\n return;\n }\n\n if (document.documentElement.clientWidth > 900) {\n return menuHeight\n } else {\n return 45;\n }\n}\n\nconst Menu = props => {\n const { activeElement, focusedElement } = useSelector(state => state.mainNavigation);\n const { i18n, panel, userName } = useSelector(state => state.session);\n const { session } = useSelector(state => state.userSession);\n const { user } = useSelector(state => state.menuCounters);\n const dispatch = useDispatch();\n\n useEffect(() => {\n if (user.LANGUAGE) {\n localStorage.setItem(\"language\", user.LANGUAGE);\n }\n }, [user]);\n\n const handleState = (tab, event) => {\n if (`${window.location.pathname}${window.location.search}` === tab) {\n return event.preventDefault();\n }\n\n dispatch(addActiveElement(tab));\n }\n\n const statClassName = activeName => {\n return `stat ${activeName === activeElement && 'l-active'} ${activeName === focusedElement && 'focus'}`;\n }\n\n 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><span className=\"value\">{user.U_DISK} <span className=\"unit\">{panel[session.look]['U_DISK_MEASURE']}</span></span></span>\n </div>\n <div>\n <span>{i18n.Bandwidth}:</span>\n <span><span className=\"value\">{user.U_BANDWIDTH} <span className=\"unit\">{panel[session.look]['U_BANDWIDTH_MEASURE']}</span></span></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) {\n fetchData();\n }\n }, [notifications]);\n\n const fetchData = () => {\n setLoading(true);\n getAppNotifications()\n .then(res => {\n const result = [];\n\n for (let notification in res.data.result) {\n result.push(res.data.result[notification]);\n }\n\n dispatch(addNotifications(result));\n setLoading(false);\n })\n .catch(err => {\n console.error(err);\n setLoading(false);\n });\n }\n\n const removeNotification = id => {\n deleteNotification(id)\n .then(() => {\n fetchData();\n })\n .catch(err => console.error(err));\n }\n\n const renderOptions = () => {\n if (notifications && notifications.length) {\n return notifications.map(item => {\n return (\n <>\n <div className=\"dropdown-item\">\n <span className=\"title\"><b>{item.TOPIC}</b></span>\n <span className=\"delete-notification\" onClick={() => removeNotification(item.ID)}></span>\n </div>\n <div>{HtmlParser(item.NOTICE)}</div>\n <div className=\"dropdown-divider\"></div>\n </>\n );\n });\n } else {\n return (\n <div className=\"dropdown-item\" style={{ cursor: 'default', marginBottom: '10' }}>\n <span className=\"title\">{i18n['no notifications']}</span>\n </div>\n );\n }\n }\n\n return (\n <div className=\"btn-group\">\n <button type=\"button\" className=\"btn btn-danger dropdown-toggle\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\n <div className=\"bell\">\n {\n notifications && notifications.length\n ? <BellUnread />\n : <Bell />\n }\n </div>\n </button>\n <div className=\"dropdown-menu\">\n {loading ? 'Loading' : renderOptions()}\n </div>\n </div>\n );\n};\n\nexport default Notifications;","import { ADD_NOTIFICATIONS, REMOVE_NOTIFICATIONS } from './notificationTypes';\n\nexport const addNotifications = value => {\n return {\n type: ADD_NOTIFICATIONS,\n value\n };\n};\n\nexport const removeNotifications = () => {\n return {\n type: REMOVE_NOTIFICATIONS,\n value: []\n };\n};\n","import React, { useState } from 'react';\nimport { addActiveElement } from '../../../actions/MainNavigation/mainNavigationActions';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { logout } from 'src/actions/Session/sessionActions';\nimport Notifications from './Notifications/Notifications';\nimport { useSelector, useDispatch } from \"react-redux\";\nimport Spinner from 'src/components/Spinner/Spinner';\nimport { Link } from \"react-router-dom\";\nimport './Panel.scss';\n\nconst Panel = props => {\n const { i18n, userName, panel } = useSelector(state => state.session);\n const { session } = useSelector(state => state.userSession);\n const { activeElement, focusedElement } = useSelector(state => state.mainNavigation);\n const dispatch = useDispatch();\n const [loading, setLoading] = useState(false);\n const [state, setState] = useState({\n smallNavigationClass: 'small-navigation hidden'\n });\n\n const toggleNavigation = event => {\n props.showTopNav();\n\n if (state.smallNavigationClass === 'small-navigation hidden') {\n setState({ ...state, smallNavigationClass: 'small-navigation show' });\n } else {\n setState({ ...state, smallNavigationClass: 'small-navigation hidden' });\n }\n }\n\n const className = (activeName, extraClass = '') => {\n let className = 'top-link';\n\n if (activeName === activeElement) {\n className += ' active';\n }\n\n if (activeName === focusedElement) {\n className += ' focus';\n }\n\n return className + ` ${extraClass}`;\n }\n\n const handleState = (tab, event) => {\n if (`${window.location.pathname}${window.location.search}` === tab) {\n return event.preventDefault();\n }\n\n dispatch(addActiveElement(tab));\n }\n\n const signOut = () => {\n setLoading(true);\n\n dispatch(logout())\n .then(() => {\n setLoading(false);\n },\n error => {\n setLoading(false);\n console.error(error);\n });\n }\n\n return (\n <div className=\"panel-wrapper\">\n {loading && <Spinner />}\n\n <div className={`top-panel ${session.look ? 'long-profile' : ''}`}>\n <div className=\"container left-menu\">\n <div className=\"logo\">\n <Link to=\"/list/user/\" onClick={() => dispatch(addActiveElement('/list/user/'))}>\n <div>\n <img src=\"/images/white_logo.png\" alt=\"Logo\" />\n </div>\n </Link>\n </div>\n {userName === 'admin' && (<>\n <div className={className(\"/list/package/\")}>\n <Link to=\"/list/package/\" onClick={event => handleState(\"/list/package/\", event)} onKeyPress={event => event.preventDefault()}>{i18n.Packages}</Link>\n </div>\n <div className={className(\"/list/ip/\")}>\n <Link to=\"/list/ip/\" onClick={event => handleState(\"/list/ip/\", event)} onKeyPress={event => event.preventDefault()}>{i18n.IP}</Link>\n </div>\n <div className={className(\"/list/rrd/\")}>\n <Link to=\"/list/rrd/\" onClick={event => handleState(\"/list/rrd/\", event)} onKeyPress={event => event.preventDefault()}>{i18n.Graphs}</Link>\n </div>\n </>)}\n <div className={className(\"/list/stats/\")}>\n <Link to=\"/list/stats/\" onClick={event => handleState(\"/list/stats/\", event)} onKeyPress={event => event.preventDefault()}>{i18n.Statistics}</Link>\n </div>\n <div className={className(\"/list/log/\")}>\n <Link to=\"/list/log/\" onClick={event => handleState(\"/list/log/\", event)} onKeyPress={event => event.preventDefault()}>{i18n.Log}</Link>\n </div>\n {userName === 'admin' && (<>\n <div className={className(\"/list/updates/\")}>\n <Link to=\"/list/updates/\" onClick={event => handleState(\"/list/updates/\", event)} onKeyPress={event => event.preventDefault()}>{i18n.Updates}</Link>\n </div>\n {session.FIREWALL_SYSTEM && <div className={className(\"/list/firewall/\")}>\n <Link to=\"/list/firewall/\" onClick={event => handleState(\"/list/firewall/\", event)} onKeyPress={event => event.preventDefault()}>{i18n.Firewall}</Link>\n </div>}\n </>)}\n {session.FILEMANAGER_KEY && <div className={className(\"/list/directory/\")}>\n <Link to=\"/list/directory/\">{i18n['File Manager']}</Link>\n </div>}\n {session.SOFTACULOUS === \"yes\" && <div className={className(\"/softaculous/\")}><Link to=\"/softaculous/\" target=\"_blank\">{i18n.Apps ?? 'Apps'}</Link>\n </div>}\n {userName === 'admin' && (\n <div className={className(\"/list/server/\")}>\n <Link to=\"/list/server/\" onClick={event => handleState(\"/list/server/\", event)} onKeyPress={event => event.preventDefault()}>{i18n.Server}</Link>\n </div>\n )}\n </div>\n <div className=\"container profile-menu\">\n {panel[userName]['NOTIFICATIONS'] === 'yes' && <Notifications />}\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 <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 {panel[userName]['NOTIFICATIONS'] === 'yes' && <Notifications />}\n <div><Link to={`/edit/user?user=${userName}`}>{userName}</Link></div>\n <div><button onClick={signOut}>{i18n['Log out']}</button></div>\n </div>\n </div>\n </div>\n );\n}\n\nexport default Panel;\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 <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;","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.replaceAll(',', ', ')}</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';\n\nconst Web = props => {\n const { i18n } = useSelector(state => state.session);\n const { controlPanelFocusedElement } = useSelector(state => state.controlPanelContent);\n const { focusedElement } = useSelector(state => state.mainNavigation);\n const dispatch = useDispatch();\n const [loading, setLoading] = useState(false);\n const [modal, setModal] = useState({\n text: '',\n visible: false,\n actionUrl: ''\n });\n const [state, setState] = useState({\n webDomains: [],\n webFav: [],\n toggledAll: false,\n sorting: i18n.Date,\n order: \"descending\",\n selection: [],\n totalAmount: ''\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/web/'));\n dispatch(removeFocusedElement());\n dispatch(removeControlPanelContentFocusedElement());\n fetchData().then(() => setLoading(false));\n\n return () => {\n dispatch(removeControlPanelContentFocusedElement());\n }\n }, []);\n\n useEffect(() => {\n window.addEventListener(\"keydown\", handleContentSelection);\n window.addEventListener(\"keydown\", handleFocusedElementShortcuts);\n\n return () => {\n window.removeEventListener(\"keydown\", handleContentSelection);\n window.removeEventListener(\"keydown\", handleFocusedElementShortcuts);\n };\n }, [controlPanelFocusedElement, focusedElement, state.webDomains]);\n\n const handleContentSelection = event => {\n if (event.keyCode === 38 || event.keyCode === 40) {\n if (focusedElement) {\n dispatch(MainNavigation.removeFocusedElement());\n }\n }\n\n if (event.keyCode === 38) {\n event.preventDefault();\n handleArrowUp();\n } else if (event.keyCode === 40) {\n event.preventDefault();\n handleArrowDown();\n }\n }\n\n const initFocusedElement = webDomains => {\n webDomains[0]['FOCUSED'] = webDomains[0]['NAME'];\n setState({ ...state, webDomains });\n dispatch(addControlPanelContentFocusedElement(webDomains[0]['NAME']));\n }\n\n const handleArrowDown = () => {\n let webDomains = [...state.webDomains];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(webDomains);\n return;\n }\n\n let focusedElementPosition = webDomains.findIndex(webDomain => webDomain.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== webDomains.length - 1) {\n let nextFocusedElement = webDomains[focusedElementPosition + 1];\n webDomains[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, webDomains });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleArrowUp = () => {\n let webDomains = [...state.webDomains];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(webDomains);\n return;\n }\n\n let focusedElementPosition = webDomains.findIndex(webDomain => webDomain.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== 0) {\n let nextFocusedElement = webDomains[focusedElementPosition - 1];\n webDomains[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, webDomains });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleFocusedElementShortcuts = event => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus');\n\n if (controlPanelFocusedElement && !isSearchInputFocused) {\n switch (event.keyCode) {\n case 76: return handleLogs();\n case 83: return handleSuspend();\n case 8: return handleDelete();\n case 13: return handleEdit();\n default: break;\n }\n }\n }\n\n const handleLogs = () => {\n props.history.push(`/list/web-log?domain=${controlPanelFocusedElement}&type=access`);\n }\n\n const handleEdit = () => {\n props.history.push(`/edit/web?domain=${controlPanelFocusedElement}`);\n }\n\n const handleSuspend = () => {\n const { webDomains } = state;\n let currentWebDomainData = webDomains.filter(webDomain => webDomain.NAME === controlPanelFocusedElement)[0];\n let suspendedStatus = currentWebDomainData.SUSPENDED === 'yes' ? 'unsuspend' : 'suspend';\n\n displayModal(currentWebDomainData.spnd_confirmation, `/api/v1/${suspendedStatus}/web/index.php?domain=${controlPanelFocusedElement}`);\n }\n\n const handleDelete = () => {\n const { webDomains } = state;\n let currentWebDomainData = webDomains.filter(webDomain => webDomain.NAME === controlPanelFocusedElement)[0];\n\n displayModal(currentWebDomainData.delete_confirmation, `/api/v1/web/index.php?domain=${controlPanelFocusedElement}`);\n }\n\n const fetchData = () => {\n setLoading(true);\n return new Promise((resolve, reject) => {\n getWebList()\n .then(result => {\n setState({\n ...state,\n webDomains: reformatData(result.data.data),\n webFav: result.data.webFav,\n totalAmount: result.data.totalAmount,\n toggledAll: false,\n selection: []\n });\n resolve();\n })\n .catch(err => console.error(err));\n });\n }\n\n const changeSorting = (sorting, order) => {\n setState({\n ...state,\n sorting,\n order\n });\n }\n\n const reformatData = data => {\n let webDomains = [];\n\n for (let i in data) {\n data[i]['NAME'] = i;\n data[i]['FOCUSED'] = controlPanelFocusedElement === i;\n webDomains.push(data[i]);\n }\n\n return webDomains;\n }\n\n const webDomains = () => {\n const webFav = { ...state.webFav };\n let webDomains = [...state.webDomains];\n\n webDomains.forEach(webDomain => {\n webDomain.FOCUSED = controlPanelFocusedElement === webDomain.NAME;\n\n if (webFav[webDomain.NAME]) {\n webDomain.STARRED = webFav[webDomain.NAME];\n } else {\n webDomain.STARRED = 0;\n }\n });\n\n let sortedResult = sortArray(webDomains);\n\n return sortedResult.map((item, index) => {\n return <WebDomain data={item} key={index} toggleFav={toggleFav} checkItem={checkItem} handleModal={displayModal} />;\n });\n }\n\n const checkItem = name => {\n let duplicate = [...state.selection];\n let webDomainsDuplicate = state.webDomains;\n let checkedItem = duplicate.indexOf(name);\n\n let incomingItem = webDomainsDuplicate.findIndex(webDomain => webDomain.NAME === name);\n webDomainsDuplicate[incomingItem].isChecked = !webDomainsDuplicate[incomingItem].isChecked;\n\n if (checkedItem !== -1) {\n duplicate.splice(checkedItem, 1);\n } else {\n duplicate.push(name);\n }\n\n setState({ ...state, webDomains: webDomainsDuplicate, selection: duplicate });\n }\n\n const sortArray = array => {\n let sortingColumn = sortBy(state.sorting);\n\n if (state.order === \"descending\") {\n return array.sort((a, b) => (a[sortingColumn] < b[sortingColumn]) ? 1 : ((b[sortingColumn] < a[sortingColumn]) ? -1 : 0));\n } else {\n return array.sort((a, b) => (a[sortingColumn] > b[sortingColumn]) ? 1 : ((b[sortingColumn] > a[sortingColumn]) ? -1 : 0));\n }\n }\n\n const sortBy = sorting => {\n const { Date: date, Domain, Disk, Bandwidth, Starred } = i18n;\n\n switch (sorting) {\n case date: return 'DATE';\n case Domain: return 'ALIAS';\n case i18n['IP Addresses']: return 'IP';\n case Disk: return 'U_DISK';\n case Bandwidth: return 'U_BANDWIDTH';\n case Starred: return 'STARRED';\n default: break;\n }\n }\n\n const toggleFav = (value, type) => {\n let webFavDuplicate = state.webFav;\n\n if (type === 'add') {\n webFavDuplicate[value] = 1;\n\n addFavorite(value, 'web')\n .then(() => {\n setState({ ...state, webFav: webFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n } else {\n webFavDuplicate[value] = undefined;\n\n deleteFavorite(value, 'web')\n .then(() => {\n setState({ ...state, webFav: webFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n }\n }\n\n const toggleAll = toggled => {\n const webDomainsDuplicate = [...state.webDomains];\n\n if (toggled) {\n let webDomainNames = [];\n\n let webDomains = webDomainsDuplicate.map(webDomain => {\n webDomainNames.push(webDomain.NAME);\n webDomain.isChecked = true;\n return webDomain;\n });\n\n setState({ ...state, webDomains, selection: webDomainNames, toggledAll: toggled });\n } else {\n let webDomains = webDomainsDuplicate.map(webDomain => {\n webDomain.isChecked = false;\n return webDomain;\n });\n\n setState({ ...state, webDomains, selection: [], toggledAll: toggled });\n }\n }\n\n const bulk = action => {\n if (state.selection.length && action) {\n setLoading(true);\n bulkAction(action, state.selection)\n .then(result => {\n toggleAll(false);\n fetchData().then(() => refreshMenuCounters());\n })\n .catch(err => console.error(err));\n }\n }\n\n const displayModal = (text, url) => {\n setModal({\n ...modal,\n visible: true,\n text,\n actionUrl: url\n });\n }\n\n const modalConfirmHandler = () => {\n if (!modal.actionUrl) {\n return modalCancelHandler();\n }\n\n modalCancelHandler();\n setLoading(true);\n handleAction(modal.actionUrl)\n .then(res => {\n if (res.data.error) {\n setLoading(false);\n return displayModal(res.data.error, '');\n }\n fetchData().then(() => refreshMenuCounters())\n })\n .catch(err => { setLoading(false); console.error(err); });\n }\n\n const refreshMenuCounters = () => {\n dispatch(refreshCounters()).then(() => setLoading(false));\n }\n\n const modalCancelHandler = () => {\n setModal({\n ...modal,\n visible: false,\n text: '',\n actionUrl: ''\n });\n }\n\n return (\n <div className=\"web\">\n <Helmet>\n <title>{`Vesta - ${i18n.WEB}`}</title>\n </Helmet>\n <Toolbar mobile={false} >\n <LeftButton name={i18n['Add Web Domain']} href=\"/add/web/\" showLeftMenu={true} />\n <div className=\"r-menu\">\n <div className=\"input-group input-group-sm\">\n <Checkbox toggleAll={toggleAll} toggled={state.toggledAll} />\n <Select list='webList' bulkAction={bulk} />\n <DropdownFilter changeSorting={changeSorting} sorting={state.sorting} order={state.order} list=\"webList\" />\n <SearchInput handleSearchTerm={term => props.changeSearchTerm(term)} />\n </div>\n </div>\n </Toolbar>\n <div className=\"web-domains-wrapper\">\n {loading\n ? <Spinner />\n : (\n <>\n {webDomains()}\n <div className=\"total\">{state.totalAmount}</div>\n </>\n )\n }\n </div>\n <Modal\n onSave={modalConfirmHandler}\n onCancel={modalCancelHandler}\n show={modal.visible}\n text={modal.text} />\n </div>\n );\n}\n\nexport default Web;","import axios from \"axios\";\nimport { getAuthToken } from \"src/utils/token\";\n\nconst BASE_URL = window.location.origin;\nconst webApiUri = '/api/v1/search/';\n\nexport const getSearchResultsList = term => {\n return axios.get(BASE_URL + webApiUri + '?q=' + term);\n}\n\nexport const handleAction = uri => {\n return axios.get(BASE_URL + uri, {\n params: {\n token: getAuthToken()\n }\n });\n}\n","import React from 'react';\nimport { loginAs, logout } from 'src/actions/Session/sessionActions';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Container from '../ControlPanel/Container/Container';\nimport ListItem from '../ControlPanel/ListItem/ListItem';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { Link, useHistory } from 'react-router-dom';\nimport './SearchItem.scss';\n\nconst SearchItem = ({ data, handleModal }) => {\n const { i18n, userName } = useSelector(state => state.session);\n const dispatch = useDispatch();\n const history = useHistory()\n\n const signInAs = user => {\n dispatch(loginAs(user)).then(() => history.push('/'));\n }\n\n const signOut = () => {\n dispatch(logout()).then(() => history.push('/'));\n }\n\n const handleDelete = () => {\n handleModal(data.delete_confirmation, `/api/v1/${data.TYPE === 'user' ? `/api/v1/delete/user/index.php?user=${data.USER}` : data.delete_link}`);\n }\n\n const handleSuspend = () => {\n handleModal(data.spnd_confirmation, `/api/v1/${data.TYPE === 'user' ? `${data.spnd_action}/user/index.php?user=${data.USER}` : data.spnd_link}`);\n }\n\n const printLoginActionButton = () => {\n if (data.TYPE !== 'user') return;\n\n if (userName === data.USER) {\n return (\n <div>\n <button onClick={signOut}>{i18n['Log out']}\n {data.FOCUSED ? <span className=\"shortcut-button\">L</span> : <FontAwesomeIcon icon=\"user-lock\" />}\n </button>\n </div>\n );\n } else {\n return (\n <div>\n <button onClick={() => signInAs(data.USER)}>{i18n['login as']} {data.USER}\n {data.FOCUSED ? <span className=\"shortcut-button\">L</span> : <FontAwesomeIcon icon=\"user-lock\" />}\n </button>\n </div>\n );\n }\n }\n\n return (\n <ListItem date={data.DATE} suspended={data.SUSPENDED === 'yes'}>\n <Container className=\"search-list r-col w-85\">\n <div className=\"name\">{data.RESULT}</div>\n <div className=\"stats\">\n <Container className=\"c-1\">\n <div className=\"object\">{data.TYPE === 'user' ? i18n['USER'] : i18n[data.object]}</div>\n </Container>\n <Container className=\"c-2\">\n <div className=\"owner\">{i18n.Owner}: <span>{data.USER}</span></div>\n </Container>\n <Container className=\"c-3\">\n <div className=\"status\">{i18n.Status}: <span>{data.status}</span></div>\n </Container>\n </div>\n </Container>\n <div className=\"actions\">\n {printLoginActionButton()}\n <div><Link className=\"link-edit\" to={data.edit_link}>{i18n.edit} <FontAwesomeIcon icon=\"pen\" /></Link></div>\n <div>\n <button\n className=\"link-gray\"\n onClick={handleSuspend}>\n {data.spnd_action}\n <FontAwesomeIcon icon={data.SUSPENDED === 'yes' ? 'unlock' : 'lock'} />\n </button>\n </div>\n <div>\n <button\n className=\"link-delete\"\n onClick={handleDelete}>\n {i18n.Delete}\n <FontAwesomeIcon icon=\"times\" />\n </button>\n </div>\n </div>\n </ListItem>\n );\n}\n\nexport default SearchItem;\n","import React, { Component, useEffect, useState } from 'react';\nimport DropdownFilter from '../../components/MainNav/Toolbar/DropdownFilter/DropdownFilter';\nimport { getSearchResultsList, handleAction } from '../../ControlPanelService/Search';\nimport SearchInput from '../../components/MainNav/Toolbar/SearchInput/SearchInput';\nimport SearchItem from '../../components/Searchitem/SearchItem';\nimport Toolbar from '../../components/MainNav/Toolbar/Toolbar';\nimport Modal from '../../components/ControlPanel/Modal/Modal';\nimport Spinner from '../../components/Spinner/Spinner';\nimport './Search.scss';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { useHistory } from 'react-router-dom';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\n\nconst Search = props => {\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [loading, setLoading] = useState(false);\n const [state, setState] = useState({\n searchResults: [],\n totalAmount: '',\n sorting: i18n.Date,\n order: \"descending\",\n total: 0\n });\n const [modal, setModal] = useState({\n visible: false,\n text: '',\n actionUrl: ''\n });\n\n useEffect(() => {\n const { search } = history.location;\n\n if (search) {\n let searchTerm = search.split('=')[1];\n\n if (searchTerm !== '') {\n fetchData(searchTerm).then(() => setLoading(false));\n } else {\n return history.push({ pathname: '/list/user/', search: '' });\n }\n } else if (props.searchTerm !== '') {\n fetchData(props.searchTerm).then(() => setLoading(false));\n } else {\n return history.push({ pathname: '/list/user/', search: '' });\n }\n }, []);\n\n const fetchData = searchTerm => {\n setLoading(true);\n return new Promise((resolve, reject) => {\n getSearchResultsList(searchTerm)\n .then(result => {\n setState({\n ...state,\n searchResults: result.data.data,\n totalAmount: result.data.total\n });\n resolve();\n })\n .catch(err => console.error(err));\n });\n }\n\n const searchResults = () => {\n const { searchResults } = state;\n const result = [];\n\n for (let i in searchResults) {\n result.push(searchResults[i]);\n }\n\n let sortedResult = sortArray(result);\n\n return sortedResult.map((item, index) => {\n return <SearchItem data={item} key={index} handleModal={displayModal} />;\n });\n }\n\n const changeSorting = (sorting, order) => {\n setState({\n ...state,\n sorting,\n order\n });\n }\n\n const sortArray = array => {\n const { order, sorting } = state;\n let sortBy = sortByHandler(sorting);\n\n if (order === \"descending\") {\n return array.sort((a, b) => (a[sortBy] < b[sortBy]) ? 1 : ((b[sortBy] < a[sortBy]) ? -1 : 0));\n } else {\n return array.sort((a, b) => (a[sortBy] > b[sortBy]) ? 1 : ((b[sortBy] > a[sortBy]) ? -1 : 0));\n }\n }\n\n const sortByHandler = sorting => {\n const { Date, Name, Starred } = i18n;\n\n switch (sorting) {\n case Date: return 'DATE';\n case Name: return 'RESULT';\n default: break;\n }\n }\n\n const displayModal = (text, url) => {\n setModal({\n ...modal,\n visible: !modal.visible,\n text,\n actionUrl: url\n });\n }\n\n const modalConfirmHandler = () => {\n if (!modal.actionUrl) {\n return modalCancelHandler();\n }\n\n modalCancelHandler();\n setLoading(true);\n handleAction(modal.actionUrl)\n .then(res => {\n if (res.data.error) {\n setLoading(false);\n return displayModal(res.data.error, '');\n }\n fetchData().then(() => refreshMenuCounters())\n })\n .catch(err => { setLoading(false); console.error(err); });\n }\n\n const refreshMenuCounters = () => {\n dispatch(refreshCounters()).then(() => setLoading(false));\n }\n\n const modalCancelHandler = () => {\n setModal({\n ...modal,\n visible: false,\n text: '',\n actionUrl: ''\n });\n }\n\n return (\n <div className=\"logs-list\">\n <Toolbar mobile={false}>\n <div className=\"search-toolbar-name\">{i18n['Search Results']}</div>\n <div className=\"search-toolbar-right\">\n <DropdownFilter changeSorting={changeSorting} sorting={state.sorting} order={state.order} list=\"searchList\" />\n <SearchInput handleSearchTerm={term => props.changeSearchTerm(term)} />\n </div>\n </Toolbar>\n <div className=\"statistics-wrapper\">\n {loading\n ? <Spinner />\n : (<>\n {searchResults()}\n <div className=\"total\">{state.totalAmount}</div>\n </>)}\n </div>\n <Modal\n onSave={modalConfirmHandler}\n onCancel={modalCancelHandler}\n show={modal.visible}\n text={modal.text} />\n </div>\n );\n}\n\nexport default Search;\n","import axios from \"axios\";\n\nconst BASE_URL = window.location.origin;\nconst webApiUri = '/api/v1/list/log/index.php';\n\nexport const getLogsList = () => {\n return axios.get(BASE_URL + webApiUri);\n}","import React from 'react';\nimport Container from '../ControlPanel/Container/Container';\nimport './Log.scss';\n\nconst Log = props => {\n const { data } = props;\n\n const printDate = date => {\n let newDate = new Date(date);\n let day = newDate.getDate();\n let month = newDate.getMonth();\n let year = newDate.getFullYear();\n let months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n\n return <div className=\"date\">{day} &nbsp; {months[month]} &nbsp; {year}</div>;\n }\n\n return (\n <div className={data.FOCUSED ? 'statistic-item focused' : 'statistic-item'} id={data.NAME}>\n <Container className=\"l-col w-15\">\n {printDate(data.DATE)}\n {data.TIME}\n </Container>\n <Container className=\"r-col w-85\">\n <div className=\"name\">{data.CMD}</div>\n </Container>\n </div>\n );\n}\n\nexport default Log;","import React, { useEffect, useState } from 'react';\nimport { addControlPanelContentFocusedElement, removeControlPanelContentFocusedElement } from '../../actions/ControlPanelContent/controlPanelContentActions';\nimport { addActiveElement, removeFocusedElement } from '../../actions/MainNavigation/mainNavigationActions';\nimport * as MainNavigation from '../../actions/MainNavigation/mainNavigationActions';\nimport SearchInput from '../../components/MainNav/Toolbar/SearchInput/SearchInput';\nimport LeftButton from '../../components/MainNav/Toolbar/LeftButton/LeftButton';\nimport Toolbar from '../../components/MainNav/Toolbar/Toolbar';\nimport { getLogsList } from '../../ControlPanelService/Logs';\nimport Spinner from '../../components/Spinner/Spinner';\nimport { useDispatch, useSelector } from 'react-redux';\nimport Log from '../../components/Log/Log';\nimport './Logs.scss';\nimport { Helmet } from 'react-helmet';\n\nconst Logs = props => {\n const { i18n } = useSelector(state => state.session);\n const { controlPanelFocusedElement } = useSelector(state => state.controlPanelContent);\n const { focusedElement } = useSelector(state => state.mainNavigation);\n const dispatch = useDispatch();\n const [state, setState] = useState({\n logs: [],\n totalAmount: '',\n loading: false,\n total: 0\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/log/'));\n dispatch(removeFocusedElement());\n dispatch(removeControlPanelContentFocusedElement());\n fetchData();\n\n return () => {\n dispatch(removeControlPanelContentFocusedElement());\n }\n }, []);\n\n useEffect(() => {\n window.addEventListener(\"keydown\", handleContentSelection);\n\n return () => {\n window.removeEventListener(\"keydown\", handleContentSelection);\n };\n }, [controlPanelFocusedElement, focusedElement, state.logs]);\n\n const handleContentSelection = event => {\n if (event.keyCode === 38 || event.keyCode === 40) {\n if (focusedElement) {\n dispatch(MainNavigation.removeFocusedElement());\n }\n }\n\n if (event.keyCode === 38) {\n event.preventDefault();\n handleArrowUp();\n } else if (event.keyCode === 40) {\n event.preventDefault();\n handleArrowDown();\n }\n }\n\n const initFocusedElement = logs => {\n logs[0]['FOCUSED'] = logs[0]['NAME'];\n setState({ ...state, logs });\n dispatch(addControlPanelContentFocusedElement(logs[0]['NAME']));\n }\n\n const handleArrowDown = () => {\n let logs = [...state.logs];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(logs);\n return;\n }\n\n let focusedElementPosition = logs.findIndex(log => log.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== logs.length - 1) {\n let nextFocusedElement = logs[focusedElementPosition + 1];\n logs[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, logs });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleArrowUp = () => {\n let logs = [...state.logs];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(logs);\n return;\n }\n\n let focusedElementPosition = logs.findIndex(log => log.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== 0) {\n let nextFocusedElement = logs[focusedElementPosition - 1];\n logs[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, logs });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const fetchData = () => {\n setState({ ...state, loading: true });\n\n getLogsList()\n .then(result => {\n setState({\n logs: reformatData(result.data.data),\n totalAmount: result.data.totalAmount,\n loading: false\n });\n })\n .catch(err => console.error(err));\n }\n\n const reformatData = data => {\n let logs = [];\n\n for (let i in data) {\n data[i]['NAME'] = i;\n data[i]['FOCUSED'] = controlPanelFocusedElement === i;\n logs.push(data[i]);\n }\n\n return logs;\n }\n\n const logs = () => {\n let logs = [...state.logs];\n\n logs.forEach(log => {\n log.FOCUSED = controlPanelFocusedElement === log.NAME;\n });\n\n return logs.map((item, index) => {\n return <Log data={item} key={index} />;\n });\n }\n\n return (\n <div className=\"logs-list\">\n <Helmet>\n <title>{`Vesta - ${i18n.LOG}`}</title>\n </Helmet>\n <Toolbar mobile={false} className=\"justify-right\">\n <LeftButton name=\"Add Cron Job\" showLeftMenu={false} />\n <div className=\"r-menu\">\n <div className=\"input-group input-group-sm\">\n <SearchInput handleSearchTerm={term => props.changeSearchTerm(term)} />\n </div>\n </div>\n </Toolbar>\n <div className=\"logs-wrapper\">\n {state.loading ? <Spinner /> : logs()}\n </div>\n <div className=\"total\">{state.totalAmount}</div>\n </div>\n );\n}\n\nexport default Logs;","import React, { useEffect, useState } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { addActiveElement, removeFocusedElement } from \"../../actions/MainNavigation/mainNavigationActions\";\nimport EditInternetProtocol from '../../components/InternetProtocol/Edit/EditInternetProtocol';\nimport AddInternetProtocol from '../../components/InternetProtocol/Add/AddInternetProtocol';\nimport EditServerNginx from 'src/components/Server/Edit/Nginx/EditServerNginx';\nimport Postgresql from 'src/components/Server/Edit/Postgresql/Postgresql';\nimport EditBackupExclusions from 'src/components/Backup/Exclusion/Edit';\nimport { Route, Switch, Redirect, useHistory } from \"react-router-dom\";\nimport InternetProtocols from '../InternetProtocols/InternetProtocols';\nimport AddWebDomain from '../../components/WebDomain/Add/AddWebDomain';\nimport EditDatabase from '../../components/Database/Edit/EditDatabase';\nimport EditFirewall from '../../components/Firewall/Edit/EditFirewall';\nimport Hotkeys from '../../components/ControlPanel/Hotkeys/Hotkeys';\nimport AddDatabase from '../../components/Database/Add/AddDatabase';\nimport AddFirewall from '../../components/Firewall/Add/AddFirewall';\nimport EditCronJob from '../../components/CronJob/Edit/EditCronJob';\nimport EditPackage from '../../components/Package/Edit/EditPackage';\nimport EditHttpd from 'src/components/Server/Edit/Httpd/EditHttpd';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport AddCronJob from '../../components/CronJob/Add/AddCronJob';\nimport AddPackage from '../../components/Package/Add/AddPackage';\nimport EditServer from '../../components/Server/Edit/EditServer';\nimport Dovecot from 'src/components/Server/Edit/Dovecot/Dovecot';\nimport EditMailWrapper from '../EditMailWrapper/EditMailWrapper';\nimport Service from 'src/components/Server/Edit/Service/Service';\nimport AddMailWrapper from '../AddMailWrapper/AddMailWrapper';\nimport EditDNSWrapper from '../EditDNSWrapper/EditDNSWrapper';\nimport EditWeb from '../../components/WebDomain/Edit/EditWeb';\nimport EditPhp from 'src/components/Server/Edit/PHP/EditPhp';\nimport Databases from '../../containers/Databases/Databases';\nimport Firewalls from '../../containers/Firewalls/Firewalls';\nimport EditUser from '../../components/User/Edit/EditUser';\nimport Bind9 from 'src/components/Server/Edit/Bind9/Bind9';\nimport Mysql from 'src/components/Server/Edit/Mysql/Mysql';\nimport AddDNSWrapper from '../AddDNSWrapper/AddDNSWrapper';\nimport BackupWrapper from '../BackupWrapper/BackupWrapper';\nimport AddBanIP from 'src/components/Firewall/Add/Banlist';\nimport CronJobs from '../../containers/CronJobs/CronJobs';\nimport Packages from '../../containers/Packages/Packages';\nimport { services } from 'src/ControlPanelService/Server';\nimport AddUser from '../../components/User/Add/AddUser';\nimport Updates from '../../containers/Updates/Updates';\nimport Servers from '../../containers/Servers/Servers';\nimport MainNav from '../../components/MainNav/MainNav';\nimport BackupExclusions from '../Backups/Exclusions';\nimport MailWrapper from '../MailWrapper/MailWrapper';\nimport Spinner from 'src/components/Spinner/Spinner';\nimport DNSWrapper from '../DNSWrapper/DNSWrapper';\nimport Statistics from '../Statistics/Statistics';\nimport Users from '../../containers/Users/Users';\nimport RRDs from '../../containers/RRDs/RRDs';\nimport BanList from '../Firewalls/Banlist';\nimport Web from '../../containers/Web/Web';\nimport Search from '../Search/Search';\nimport Logs from '../Logs/Logs';\n\nimport './ControlPanelContent.scss';\n\nconst ControlPanelContent = props => {\n const { userName } = useSelector(state => state.session);\n const history = useHistory();\n const [searchTerm, setSearchTerm] = useState('');\n const [hotkeysList, setHotkeysList] = useState(null);\n const [loading, setLoading] = useState(true);\n const dispatch = useDispatch();\n\n useEffect(() => {\n if (!userName) {\n return history.push('/login');\n } else {\n setLoading(false);\n }\n }, [userName]);\n\n useEffect(() => {\n dispatch(removeFocusedElement());\n window.addEventListener(\"keyup\", switchPanelTab);\n window.addEventListener(\"keyup\", addNewObject);\n\n return () => {\n window.removeEventListener(\"keyup\", switchPanelTab);\n window.removeEventListener(\"keyup\", addNewObject);\n }\n }, []);\n\n const switchPanelTab = event => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus');\n\n if (isSearchInputFocused) {\n return;\n }\n\n switch (event.keyCode) {\n case 49: return history.push('/list/user/');\n case 50: return history.push('/list/web/');\n case 51: return history.push('/list/dns/');\n case 52: return history.push('/list/mail/');\n case 53: return history.push('/list/db/');\n case 54: return history.push('/list/cron/');\n case 55: return history.push('/list/backup/');\n default: break;\n }\n }\n\n const addNewObject = event => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus');\n\n if (isSearchInputFocused) {\n return;\n }\n\n if (event.keyCode === 65) {\n switch (history.location.pathname) {\n case '/list/web/': return history.push('/add/web/');\n case '/list/dns/': return history.push('/add/dns/');\n case '/list/mail/': return history.push('/add/mail/');\n case '/list/db/': return history.push('/add/db/');\n case '/list/cron/': return history.push('/add/cron/');\n case '/list/backup/exclusions': return history.push('/edit/backup/exclusions/');\n case '/list/package/': return history.push('/add/package/');\n case '/list/ip/': return history.push('/add/ip/');\n case '/list/firewall/': return history.push('/add/firewall/');\n default: break;\n }\n }\n }\n\n const handleSearchTerm = searchTerm => {\n setSearchTerm(searchTerm);\n history.push({\n pathname: '/search/',\n search: `?q=${searchTerm}`\n });\n }\n\n const scrollToTop = () => {\n window.scrollTo({ top: 0, behavior: 'smooth' });\n }\n\n return (\n <div>\n <MainNav />\n <div className=\"content\">\n {\n loading\n ? <Spinner />\n : (\n <Switch>\n <Redirect from=\"/\" exact to=\"/list/user/\" />\n <Route path=\"/list/package\" component={props => <Packages {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/add/package\" component={() => <AddPackage />} />\n <Route path=\"/edit/package\" component={() => <EditPackage />} />\n <Route path=\"/list/ip\" component={props => <InternetProtocols {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/add/ip\" component={() => <AddInternetProtocol />} />\n <Route path=\"/edit/ip\" component={() => <EditInternetProtocol />} />\n <Route path=\"/list/rrd\" component={props => <RRDs {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/list/stats\" component={props => <Statistics {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/list/log\" component={props => <Logs {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/list/updates\" component={props => <Updates {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/list/firewall\" exact component={props => <Firewalls {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/list/firewall/banlist\" exact component={props => <BanList {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/add/firewall/banlist\" component={AddBanIP} />\n <Route path=\"/add/firewall\" component={() => <AddFirewall />} />\n <Route path=\"/edit/firewall\" component={() => <EditFirewall />} />\n <Route path=\"/list/server/\" exact component={props => <Servers {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/edit/server/\" exact component={() => <EditServer />} />\n <Route path=\"/edit/server/nginx\" exact component={() => <EditServerNginx />} />\n <Route path=\"/edit/server/php\" exact component={() => <EditPhp serviceName=\"php\" />} />\n <Route path=\"/edit/server/php-fpm\" exact component={() => <EditPhp serviceName=\"php-fpm\" />} />\n <Route path=\"/edit/server/php5-fpm\" exact component={() => <EditPhp serviceName=\"php5-fpm\" />} />\n <Route path=\"/edit/server/httpd\" exact component={() => <EditHttpd />} />\n <Route path=\"/edit/server/dovecot\" exact component={() => <Dovecot />} />\n <Route path=\"/edit/server/bind9\" exact component={() => <Bind9 />} />\n <Route path=\"/edit/server/postgresql\" exact component={() => <Postgresql />} />\n <Route path=\"/edit/server/mysql\" exact component={() => <Mysql serviceName=\"mysql\" />} />\n <Route path=\"/edit/server/mariadb\" exact component={() => <Mysql serviceName=\"mariadb\" />} />\n <Route path=\"/edit/server/mysqld\" exact component={() => <Mysql serviceName=\"mysqld\" />} />\n\n {\n !!services.length && services.map((service, index) => {\n if (service === 'iptables') {\n return <Redirect key={index} from=\"/edit/server/iptables\" exact to=\"/list/firewall\" />\n } else {\n return <Route key={index} path={`/edit/server/${service}`} exact component={() => <Service serviceName={service} />} />\n }\n })\n }\n\n <Route path=\"/list/user\" component={props => <Users changeSearchTerm={handleSearchTerm} {...props} />} />\n <Route path=\"/add/user\" component={() => <AddUser />} />\n <Route path=\"/edit/user\" component={() => <EditUser />} />\n <Route path=\"/list/web\" component={props => <Web {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/add/web\" component={() => <AddWebDomain />} />\n <Route path=\"/edit/web\" component={() => <EditWeb />} />\n <Route path=\"/list/dns\" component={props => <DNSWrapper {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/add/dns\" component={() => <AddDNSWrapper />} />\n <Route path=\"/edit/dns\" component={() => <EditDNSWrapper />} />\n <Route path=\"/list/mail\" component={props => <MailWrapper {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/add/mail\" component={() => <AddMailWrapper />} />\n <Route path=\"/edit/mail\" component={() => <EditMailWrapper />} />\n <Route path=\"/list/db\" component={props => <Databases {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/add/db\" component={() => <AddDatabase />} />\n <Route path=\"/edit/db\" component={() => <EditDatabase />} />\n <Route path=\"/list/cron\" component={props => <CronJobs {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/add/cron\" component={() => <AddCronJob />} />\n <Route path=\"/edit/cron\" component={() => <EditCronJob />} />\n <Route exact path=\"/list/backup\" component={props => <BackupWrapper {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route exact path=\"/list/backup/exclusions\" component={props => <BackupExclusions {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route exact path=\"/edit/backup/exclusions\" component={EditBackupExclusions} />\n <Route path=\"/search/\" component={props => <Search {...props} changeSearchTerm={handleSearchTerm} searchTerm={searchTerm} />} />\n </Switch>\n )}\n </div>\n <div className=\"fixed-buttons\">\n <div className=\"hotkey-button\">\n <button onClick={() => hotkeysList.classList.toggle('hide')}>\n <FontAwesomeIcon icon=\"ellipsis-h\" />\n </button>\n </div>\n <div className=\"scroll-to-top\">\n <button onClick={() => scrollToTop()}>\n <FontAwesomeIcon icon=\"long-arrow-alt-up\" />\n </button>\n </div>\n </div>\n <Hotkeys reference={(inp) => setHotkeysList(inp)} toggleHotkeys={() => hotkeysList.classList.toggle('hide')} />\n </div>\n );\n}\n\nexport default ControlPanelContent;\n","import React, { useState } from 'react';\nimport { addActiveElement } from 'src/actions/MainNavigation/mainNavigationActions';\nimport { logout } from 'src/actions/Session/sessionActions';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { Link, useHistory } from 'react-router-dom';\nimport Spinner from '../Spinner/Spinner';\n\nimport './TopPanel.scss';\n\nconst TopPanel = ({ menuItems = [], extraMenuItems = [] }) => {\n const mainNavigation = useSelector(state => state.mainNavigation);\n const [loading, setLoading] = useState(false);\n const { i18n, userName } = useSelector(state => state.session);\n const dispatch = useDispatch();\n const history = useHistory();\n\n const className = cls => {\n let className = 'nav-link';\n\n if (mainNavigation.activeElement === cls) {\n return className += ' active';\n }\n\n return className;\n }\n\n const renderMenuItems = () => {\n if (!menuItems.length) return;\n\n return menuItems.map(({ route, name }) => (\n <div className={className(route)} key={name}>\n <button onClick={event => handleState(event, route)}>{name}</button>\n </div>\n ));\n }\n\n const renderExtraMenuItems = () => {\n if (!extraMenuItems.length) return;\n\n return extraMenuItems.map(({ link, text, type }, index) => (\n <div className=\"nav-link\" key={index}>\n {\n type === 'download'\n ? <a href={`/api/v1${link}`} target=\"_blank\" rel=\"noopener noreferrer\">{text}</a>\n : <Link to={link} target=\"_blank\">{text}</Link>\n }\n </div>\n ));\n }\n\n const handleState = (event, route) => {\n event.preventDefault();\n history.push(route);\n dispatch(addActiveElement(route));\n }\n\n const signOut = () => {\n setLoading(true);\n\n dispatch(logout())\n .then(() => {\n history.push('/login/');\n setLoading(false);\n },\n error => {\n setLoading(false);\n console.error(error);\n });\n }\n\n return (\n <div className=\"panel-wrapper\">\n {loading && <Spinner />}\n\n <div className=\"top-panel\">\n <div className=\"container left-menu\">\n <div className=\"logo\">\n <Link to=\"/list/user/\">\n <div className=\"logo-img\">\n <img src=\"/images/white_logo.png\" alt=\"Logo\" />\n </div>\n </Link>\n </div>\n\n {renderMenuItems()}\n\n {renderExtraMenuItems()}\n </div>\n\n <div className=\"container profile-menu\">\n <div><Link to={`/edit/user?user=${userName}`}>{userName}</Link></div>\n <div><button className=\"log-out\" onClick={signOut}>{i18n['Log out']}</button></div>\n </div>\n </div>\n </div>\n );\n}\n\nexport default TopPanel;\n","import axios from \"axios\";\n\nconst BASE_URL = window.location.origin;\n\nexport const getWebLogs = uri => {\n return axios.get(BASE_URL + '/api/v1' +uri);\n}","import React, { useEffect, useState } from 'react';\n\nimport { addActiveElement } from 'src/actions/MainNavigation/mainNavigationActions';\nimport TopPanel from 'src/components/TopPanel/TopPanel';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\nimport QueryString from 'qs';\n\nimport './WebLogs.scss';\nimport { getWebLogs } from 'src/ControlPanelService/WebLogs';\nimport Spinner from 'src/components/Spinner/Spinner';\nimport { Helmet } from 'react-helmet';\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>{state.prefix}</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 { useParams, useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport { getServiceLogs } from 'src/ControlPanelService/Server';\nimport Spinner from 'src/components/Spinner/Spinner';\nimport { Helmet } from 'react-helmet';\nimport ReactHtmlParser from 'react-html-parser';\n\nimport './styles.scss';\n\nconst ServiceInfo = () => {\n const { i18n, userName } = useSelector(state => state.session);\n const dispatch = useDispatch();\n const { activeElement } = useSelector(state => state.mainNavigation);\n const history = useHistory();\n const { service } = useParams();\n const [state, setState] = useState({\n data: \"\",\n loading: false\n });\n\n useEffect(() => {\n if (!userName) {\n history.push('/login/');\n }\n }, [userName]);\n\n useEffect(() => {\n fetchData();\n dispatch(addActiveElement(`/list/server/${service}`));\n }, [activeElement]);\n\n const fetchData = () => {\n setState({ ...state, loading: true });\n\n getServiceLogs(service)\n .then(result => {\n setState({ ...state, data: result.data.service_log, loading: false });\n })\n .catch(error => {\n console.error(error);\n setState({ ...state, loading: false });\n });\n }\n\n const menuItems = [\n {\n route: '/list/server/cpu',\n name: i18n['CPU']\n },\n {\n route: '/list/server/mem',\n name: i18n['MEMORY']\n },\n {\n route: '/list/server/disk',\n name: i18n['DISK']\n },\n {\n route: '/list/server/net',\n name: i18n['NETWORK']\n },\n {\n route: '/list/server/web',\n name: i18n['WEB']\n },\n {\n route: '/list/server/dns',\n name: i18n['DNS']\n },\n {\n route: '/list/server/mail',\n name: i18n['MAIL']\n },\n {\n route: '/list/server/db',\n name: i18n['DB']\n }\n ];\n\n return (\n <div className=\"service-info\">\n <Helmet>\n <title>{`Vesta - ${i18n.SERVER}`}</title>\n </Helmet>\n <TopPanel menuItems={menuItems} />\n <div className=\"content\">\n {\n state.loading\n ? <Spinner />\n : (<pre>\n {state.data.length && state.data.map(line => (<>{ReactHtmlParser(line)}<br /></>))}\n </pre>)\n }\n </div>\n </div>\n );\n}\n\nexport default ServiceInfo;\n","import React, { useEffect, useState } from 'react';\n\nimport TextInput from 'src/components/ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport Password from 'src/components/ControlPanel/AddItemLayout/Form/Password/Password';\nimport LoginLayout from 'src/components/ControlPanel/LoginLayout/LoginLayout';\nimport { resetPassword } from 'src/ControlPanelService/ResetPassword';\nimport { Link, useHistory, useLocation } from 'react-router-dom';\nimport { reset } from 'src/actions/Session/sessionActions';\nimport { useDispatch, useSelector } from 'react-redux';\nimport Spinner from 'src/components/Spinner/Spinner';\nimport ReactHtmlParser from 'react-html-parser';\nimport { Helmet } from 'react-helmet';\nimport QueryString from 'qs';\n\nexport default function ForgotPassword() {\n const { i18n } = useSelector(state => state.session);\n const dispatch = useDispatch();\n const history = useHistory();\n const [loading, setLoading] = useState(false);\n const [state, setState] = useState({\n action: '',\n user: '',\n code: '',\n });\n const session = useSelector(state => state.session);\n const location = useLocation();\n const [errorMessage, setErrorMessage] = useState('');\n\n useEffect(() => {\n const parsedQueryString = QueryString.parse(location.search, { ignoreQueryPrefix: true });\n\n setState({\n ...state,\n action: parsedQueryString.action || '',\n user: parsedQueryString.user || '',\n code: parsedQueryString.code || ''\n });\n }, []);\n\n useEffect(() => {\n if (session.error) {\n setErrorMessage(session.error);\n return;\n }\n\n if (session.token && session.userName) {\n history.push('/list/user/');\n }\n }, [session]);\n\n const submitHandler = event => {\n event.preventDefault();\n\n if (!state.code && !state.user) return;\n\n if (!state.action && state.user) {\n completeStep1();\n return;\n }\n\n if (state.action === 'code' && state.user && state.code) {\n completeStep2();\n return;\n }\n\n setLoading(true);\n const data = { user: state.user, code: state.code };\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n data[name] = value;\n }\n\n dispatch(reset(data))\n .then(res => {\n if (res.error) {\n setErrorMessage(res.error);\n } else {\n history.push('/login');\n setErrorMessage('');\n }\n\n setLoading(false);\n });\n }\n\n const changeInputHandler = event => {\n const { value, name } = event.target;\n\n setState({ ...state, [name]: value });\n }\n\n const completeStep1 = () => {\n if (!state.user) return;\n setLoading(true);\n\n resetPassword(state.user)\n .then(res => {\n setErrorMessage(res.data.error || '');\n setState({ ...state, action: 'code' });\n setLoading(false);\n })\n .catch(error => {\n console.error(error);\n setLoading(false);\n });\n }\n\n const completeStep2 = () => {\n setState({ ...state, action: 'confirm' });\n }\n\n return (\n <div className=\"login-page\">\n <Helmet>\n <title>{`Vesta - ${i18n['RESET PASSWORD']}`}</title>\n </Helmet>\n {loading && <Spinner />}\n <div className=\"login-form-wrapper\">\n <LoginLayout>\n <form onSubmit={submitHandler}>\n <div className=\"c1\">\n <Link to=\"/\">\n <img src=\"/images/logo.png\" alt=\"Logo\" />\n </Link>\n </div>\n <div className=\"c2\">\n {\n !state.action && (\n <>\n <TextInput\n onChange={changeInputHandler}\n title={i18n['Username']}\n value={state.user}\n name=\"user\"\n id=\"user\" />\n\n <div className=\"buttons-wrapper\">\n <button className=\"add\" type=\"button\" onClick={completeStep1}>{i18n.Submit}</button>\n <button className=\"back\" type=\"button\" onClick={() => history.push('/login')}>{i18n.Back}</button>\n </div>\n </>\n )\n }\n\n {\n state.action === 'code' && (\n <>\n <span>{ReactHtmlParser(i18n['RESET_CODE_SENT'])}</span><br />\n\n <TextInput\n onChange={changeInputHandler}\n title={i18n['Reset Code']}\n value={state.code}\n name=\"code\"\n id=\"code\" />\n\n <div className=\"buttons-wrapper\">\n <button className=\"add\" type=\"button\" onClick={completeStep2}>{i18n.Confirm}</button>\n <button className=\"back\" type=\"button\" onClick={() => setState({ ...state, action: '', code: '', user: '' })}>{i18n.Back}</button>\n </div>\n </>\n )\n }\n\n {\n state.action === 'confirm' && (\n <>\n <Password name='password' title={i18n['New Password']} showGenerationButton={false} tabIndex={1} />\n\n <Password name='password_confirm' title={i18n['Confirm Password']} showGenerationButton={false} tabIndex={2} />\n\n <div className=\"buttons-wrapper\">\n <button className=\"add\" type=\"submit\" style={{ height: '31px' }}>{i18n.Reset}</button>\n <button className=\"back\" type=\"button\" onClick={() => setState({ ...state, action: 'code', code: '', user: state.user })}>{i18n.Back}</button>\n </div>\n </>\n )\n }\n\n <div className=\"error-message\">{errorMessage}</div>\n </div>\n </form>\n\n <span>\n <a href=\"http://vestacp.com/\">vestacp.com</a>\n </span>\n </LoginLayout>\n </div>\n </div>\n );\n}\n","import React, { useEffect, useState } from 'react';\nimport FileManager from '../FileManager/FileManager';\nimport { Route, Switch, useHistory, Redirect } from \"react-router\";\nimport Preview from '../../components/Preview/Preview';\nimport { library } from '@fortawesome/fontawesome-svg-core';\nimport * as Icon from '@fortawesome/free-solid-svg-icons';\nimport 'bootstrap/dist/css/bootstrap.css';\nimport 'bootstrap/dist/js/bootstrap.min';\nimport './App.scss';\nimport ControlPanelContent from '../ControlPanelContent/ControlPanelContent';\nimport WebLogs from '../WebLogs/WebLogs';\nimport LoginForm from 'src/components/Login/LoginForm';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { checkAuthHandler } from 'src/actions/Session/sessionActions';\nimport ServiceInfo from 'src/containers/ServiceInfo';\nimport ForgotPassword from 'src/components/ForgotPassword';\nimport Spinner from 'src/components/Spinner/Spinner';\n\nlibrary.add(\n Icon.faBook,\n Icon.faDownload,\n Icon.faFile,\n Icon.faFileAlt,\n Icon.faFolderOpen,\n Icon.faImage,\n Icon.faEllipsisH,\n Icon.faFolder,\n Icon.faItalic,\n Icon.faUser,\n Icon.faCopy,\n Icon.faPaste,\n Icon.faTrash,\n Icon.faBoxOpen,\n Icon.faArrowDown,\n Icon.faArrowUp,\n Icon.faBell,\n Icon.faPlus,\n Icon.faAngleRight,\n Icon.faStar,\n Icon.faUserLock,\n Icon.faPen,\n Icon.faLock,\n Icon.faTimes,\n Icon.faSearch,\n Icon.faCog,\n Icon.faList,\n Icon.faWrench,\n Icon.faFileDownload,\n Icon.faPause,\n Icon.faPlay,\n Icon.faCogs,\n Icon.faStop,\n Icon.faUnlock,\n Icon.faLongArrowAltUp,\n Icon.faEye,\n Icon.faEyeSlash,\n Icon.faLongArrowAltRight,\n Icon.faCaretDown,\n Icon.faCaretUp,\n Icon.faInfinity,\n Icon.faPlay\n);\n\nconst App = () => {\n const history = useHistory();\n const dispatch = useDispatch();\n const session = useSelector(state => state.session);\n const [loading, setLoading] = useState(true);\n\n useEffect(() => {\n if (!Object.entries(session.i18n).length) {\n dispatch(checkAuthHandler())\n .then(token => {\n setLoading(false);\n }, (error) => {\n console.error(error);\n return history.push('/login');\n });\n }\n }, [dispatch, history, session]);\n\n const AuthenticatedRoute = ({ authenticated, ...rest }) => {\n return (\n <Route {...rest} render={props =>\n authenticated\n ? <rest.component {...props} />\n : <Redirect to=\"/login\" />} />\n );\n }\n\n return (\n <div className=\"App\">\n {\n loading\n ? <Spinner />\n : (\n <Switch>\n <Route path=\"/login\" exact component={LoginForm} />\n <Route path=\"/reset\" exact component={ForgotPassword} />\n <Route\n path=\"/list/directory/\"\n exact\n component={FileManager} />\n <Route\n path=\"/list/directory/preview/\"\n exact\n component={Preview} />\n <AuthenticatedRoute\n path=\"/list/server/:service\"\n authenticated={session.userName}\n component={ServiceInfo} />\n <AuthenticatedRoute\n path=\"/list/web-log/\"\n exact\n authenticated={session.userName}\n component={WebLogs} />\n <AuthenticatedRoute\n path=\"/\"\n authenticated={session.userName}\n loading={loading}\n component={ControlPanelContent} />\n </Switch>\n )\n }\n </div>\n );\n}\n\nexport default App;\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read http://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.1/8 is considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\nexport function register(config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit http://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl, config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See http://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl, config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl)\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister();\n });\n }\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux'\nimport configureStore from './store';\nimport './index.css';\nimport App from './containers/App/App';\nimport * as serviceWorker from './containers/App/serviceWorker';\nimport { BrowserRouter as Router } from 'react-router-dom';\n\nReactDOM.render(\n <Provider store={configureStore()}>\n <Router>\n <App />\n </Router>\n </Provider>,\n document.getElementById('root')\n);\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: http://bit.ly/CRA-PWA\nserviceWorker.unregister();\n","import { composeWithDevTools } from 'redux-devtools-extension';\nimport { createStore, applyMiddleware } from 'redux';\nimport rootReducer from './reducers/rootReducer';\nimport thunk from 'redux-thunk';\n\nexport default function configureStore() {\n return createStore(\n rootReducer,\n composeWithDevTools(applyMiddleware(thunk))\n );\n}"],"sourceRoot":""}