mirror of
https://github.com/serghey-rodin/vesta.git
synced 2024-12-25 21:41:13 -08:00
1 line
1.2 MiB
1 line
1.2 MiB
{"version":3,"sources":["reducers/MainNavigation/mainNavigationReducer.js","actions/MainNavigation/mainNavigationTypes.js","reducers/ControlPanelContent/controlPanelContentReducer.js","actions/ControlPanelContent/controlPanelContentTypes.js","reducers/Notification/notificationReducer.js","actions/Notification/notificationTypes.js","reducers/MenuCounters/menuCounterReducer.js","actions/MenuCounters/menuCounterTypes.js","reducers/UserSession/userSessionReducer.js","actions/UserSession/userSessionTypes.js","reducers/Session/sessionReducer.js","actions/Session/sessionTypes.js","reducers/Panel/panel.js","actions/Panel/panelTypes.js","reducers/rootReducer.js","components/Spinner/Spinner.jsx","components/Path/Dropdown/Dropdown.jsx","components/Path/Path.jsx","components/Lists/Row/Row.jsx","components/Lists/DirectoryList/DirectoryList.jsx","components/ProgressBar/ProgressBar.jsx","components/Hotkeys/Hotkeys.jsx","components/Modal/AddFile.jsx","components/Modal/AddDirectory.jsx","components/Modal/Rename.jsx","components/Modal/Delete.jsx","components/Modal/NothingSelected.jsx","components/Modal/Permissions.jsx","components/Modal/Move.jsx","components/Modal/Archive.jsx","components/Modal/Extract.jsx","components/Modal/Copy.jsx","components/Modal/Replace.jsx","components/Modal/Modal.jsx","components/Menu/Menu.jsx","FileManagerHelper.js","containers/FileManager/FileManager.js","components/Preview/Editor/Editor.jsx","components/Preview/Photo/Photo.jsx","components/Preview/Video/Video.jsx","components/Preview/Preview.jsx","actions/MainNavigation/mainNavigationActions.js","utils/token.js","ControlPanelService/Ip.js","components/ControlPanel/AddItemLayout/Form/SelectInput/SelectInput.jsx","components/ControlPanel/AddItemLayout/Form/TextInput/TextInput.jsx","components/ControlPanel/AddItemLayout/Form/Checkbox/Checkbox.jsx","components/ControlPanel/Container/Container.jsx","components/ControlPanel/AddItemLayout/AddItemLayout.jsx","components/MainNav/Toolbar/Toolbar.jsx","services/session.js","actions/MenuCounters/menuCounterActions.js","components/InternetProtocol/Edit/EditInternetProtocol.jsx","components/InternetProtocol/Add/AddInternetProtocol.jsx","components/ControlPanel/AddItemLayout/Form/TextArea/TextArea.jsx","ControlPanelService/Server.js","components/Server/Edit/Nginx/EditServerNginx.jsx","components/Server/Edit/Postgresql/Postgresql.jsx","ControlPanelService/Backup.js","components/Backup/Exclusion/Edit/index.jsx","actions/ControlPanelContent/controlPanelContentActions.js","components/MainNav/Toolbar/DropdownFilter/DropdownFilter.jsx","components/MainNav/Toolbar/SearchInput/SearchInput.jsx","ControlPanelService/Favorites.js","components/ControlPanel/ListItem/ListItem.jsx","components/InternetProtocol/InternetProtocol.jsx","components/MainNav/Toolbar/LeftButton/LeftButton.jsx","components/MainNav/Toolbar/Checkbox/Checkbox.jsx","components/MainNav/Toolbar/Select/Select.jsx","ControlPanelService/Select.js","components/ControlPanel/Modal/Modal.jsx","containers/InternetProtocols/InternetProtocols.jsx","ControlPanelService/Web.js","components/ControlPanel/AddItemLayout/Form/Password/Password.jsx","components/WebDomain/Add/AdditionalFtpForEditing/AdditionalFtpForEditing.jsx","components/WebDomain/Add/AdditionalFtpWrapper/AdditionalFtpWrapper.jsx","components/WebDomain/Add/SslSupport/SslSupport.jsx","components/WebDomain/Add/AdvancedOptions/AdvancedOptions.jsx","containers/GenerateCSR/index.jsx","components/WebDomain/Add/AddWebDomain.jsx","components/ControlPanel/AddItemLayout/Form/TextInputWithTextOnTheRight/TextInputWithTextOnTheRight.jsx","ControlPanelService/Db.js","components/Database/Edit/EditDatabase.jsx","ControlPanelService/Firewalls.js","components/Firewall/Edit/EditFirewall.jsx","components/ControlPanel/Hotkeys/Hotkeys.jsx","components/Database/Add/AddDatabase.jsx","components/Firewall/Add/AddFirewall.jsx","ControlPanelService/Cron.js","ControlPanelService/GeneratorOptions.js","components/CronJob/Generator/RunCommandSelect/RunCommandSelect.jsx","components/CronJob/Generator/OtherSelects/SecondTabSelects.jsx","components/CronJob/Generator/OtherSelects/ThirdTabSelects.jsx","components/CronJob/Generator/OtherSelects/FourthTabSelects.jsx","components/CronJob/Generator/OtherSelects/FifthTabSelects.jsx","components/CronJob/Generator/OtherSelects/SelectsWrapper.jsx","components/CronJob/Generator/Generator.jsx","components/CronJob/Edit/EditCronJob.jsx","components/ControlPanel/AddItemLayout/Form/TextInputWithExtraButton/TextInputWithExtraButton.jsx","components/ControlPanel/AddItemLayout/Form/NameServers/NameServers.jsx","ControlPanelService/Package.js","components/Package/Edit/EditPackage.jsx","components/Server/Edit/Httpd/EditHttpd.jsx","components/CronJob/Add/AddCronJob.jsx","components/Package/Add/AddPackage.jsx","components/Server/Edit/EditServerWebOption.jsx","components/Server/Edit/EditServerDnsOption.jsx","components/Server/Edit/EditVestaPlugins.jsx","components/Server/Edit/EditVestaSslOption.jsx","components/Server/Edit/EditDatabaseOption.jsx","components/Server/Edit/EditBackupOption.jsx","components/Server/Edit/EditMailOption.jsx","ControlPanelService/ResetPassword.js","actions/Session/sessionActions.js","components/Server/Edit/EditServer.jsx","components/Server/Edit/Dovecot/Dovecot.jsx","ControlPanelService/Mail.js","components/MailAccount/MailInfoBlock/MailInfoBlock.jsx","components/MailAccount/Edit/EditMailAccount.jsx","components/Mail/Edit/EditMail.jsx","containers/EditMailWrapper/EditMailWrapper.jsx","components/Server/Edit/Service/Service.jsx","components/MailAccount/Add/AddMailAccount.jsx","components/Mail/Add/AddMail.jsx","containers/AddMailWrapper/AddMailWrapper.jsx","ControlPanelService/Dns.js","components/DomainNameSystem/Edit/EditDomainNameSystem.jsx","components/DNSRecord/Edit/EditDNSRecord.jsx","containers/EditDNSWrapper/EditDNSWrapper.jsx","components/WebDomain/Edit/SslSupport/SslSupport.jsx","components/WebDomain/Edit/EditWeb.jsx","components/Server/Edit/PHP/EditPhp.jsx","components/Database/Database.jsx","containers/Databases/Databases.jsx","components/Firewall/Firewall.jsx","containers/Firewalls/Firewalls.jsx","ControlPanelService/Users.js","components/User/Edit/EditUser.jsx","components/Server/Edit/Bind9/Bind9.jsx","components/Server/Edit/Mysql/Mysql.jsx","ControlPanelService/UserNS.js","components/DomainNameSystem/Add/AdvancedOptions/AdvancedOptions.jsx","components/DomainNameSystem/Add/AddDomainNameSystem.jsx","components/DNSRecord/Add/AddDNSRecord.jsx","containers/AddDNSWrapper/AddDNSWrapper.jsx","components/Backup/RestoreSetting/RestoreSetting.jsx","components/Backup/RestoreSettings/BackupRestoreSettings.jsx","components/Backup/Backup.jsx","containers/Backups/Backups.jsx","containers/BackupWrapper/BackupWrapper.jsx","components/Firewall/Add/Banlist/index.jsx","components/CronJob/CronJob.jsx","containers/CronJobs/CronJobs.jsx","components/Package/Package.jsx","containers/Packages/Packages.jsx","ControlPanelService/Languages.js","components/User/Add/AddUser.jsx","ControlPanelService/Updates.js","components/Update/Update.jsx","containers/Updates/Updates.jsx","components/Server/ServerSys.jsx","components/Server/Server.jsx","containers/Servers/Servers.jsx","components/MainNav/Stat-menu/Menu.jsx","components/MainNav/Mobile/MobileTopNav.jsx","ControlPanelService/Notifications.js","components/MainNav/Panel/Notifications/Bell.jsx","components/MainNav/Panel/Notifications/BellUnread.jsx","components/MainNav/Panel/Notifications/Notifications.jsx","actions/Notification/notificationActions.js","components/MainNav/Panel/Panel.jsx","components/MainNav/MainNav.jsx","components/Backup/Exclusion/index.jsx","containers/Backups/Exclusions/index.jsx","components/MailAccount/MailAccount.jsx","containers/MailAccounts/MailAccounts.jsx","components/Mail/Mail.jsx","containers/Mails/Mails.jsx","containers/MailWrapper/MailWrapper.jsx","components/DNSRecord/DNSRecord.jsx","containers/DNSRecords/DNSRecords.jsx","components/DomainNameSystem/DomainNameSystem.jsx","containers/DomainNameSystems/DomainNameSystems.jsx","containers/DNSWrapper/DNSWrapper.jsx","ControlPanelService/Statistics.js","components/Statistic/Statistic.jsx","containers/Statistics/Statistics.jsx","components/User/User.jsx","containers/Users/Users.jsx","ControlPanelService/RRD.js","components/RRD/Timer/Timer.jsx","components/RRD/RRD.jsx","containers/RRDs/RRDs.jsx","components/Firewall/Ban/index.jsx","containers/Firewalls/Banlist/index.jsx","components/WebDomain/WebDomain.jsx","containers/Web/Web.jsx","ControlPanelService/Search.js","components/Searchitem/SearchItem.jsx","containers/Search/Search.jsx","ControlPanelService/Logs.js","components/Log/Log.jsx","containers/Logs/Logs.jsx","containers/ControlPanelContent/ControlPanelContent.jsx","components/TopPanel/TopPanel.jsx","ControlPanelService/WebLogs.js","containers/WebLogs/WebLogs.jsx","components/ControlPanel/LoginLayout/LoginLayout.jsx","components/Login/LoginForm.jsx","containers/ServiceInfo/index.jsx","components/ForgotPassword/index.jsx","containers/App/App.js","containers/App/serviceWorker.js","index.js","store.js"],"names":["INITIAL_STATE","focusedElement","activeElement","adminMenuTabs","userMenuTabs","reducer","state","action","type","value","controlPanelFocusedElement","notifications","notificationReducer","user","menuCounterReducer","session","userSessionReducer","token","error","i18n","userName","sessionReducer","panel","panelReducer","combineReducers","mainNavigation","mainNavigationReducer","controlPanelContent","controlPanelContentReducer","menuCounters","userSession","Spinner","className","role","aria-valuenow","aria-valuemin","aria-valuemax","style","width","Dropdown","props","sorting","useSelector","changeSorting","field","order","isActive","sort","size","date","name","class","data-toggle","aria-haspopup","aria-expanded","onClick","Path","path","openDirectory","history","useHistory","useEffect","push","openDirectoryHandler","index","pathArray","split","undefined","newPath","splice","join","HOME","splitPath","map","item","key","clickablePath","Row","componentDidMount","document","addEventListener","openOnEnter","componentWillUnmount","removeEventListener","e","activeRow","data","isActiveList","modalVisible","cursor","download","keyCode","isArchive","isFile","changePath","openItem","match","pathname","search","selectRow","permissions","selectMultiple","selectOnClick","ctrlKey","selected","length","sizeFormatter","bytes","decimals","dm","i","Math","floor","log","parseFloat","pow","toFixed","dateFormatter","fDate","Date","getDay","getDate","getMonth","timeFormatter","time","year","dayjs","currentYear","glyph","icon","faJs","faHtml5","faPhp","faSass","faCss3","this","owner","id","Component","connect","withRouter","DirectoryList","UNSAFE_componentWillMount","localStorage","getItem","list","setState","sortingType","orderType","handleLiSelection","moveBackOnButton","cacheSorting","setItem","moveBack","isHomeDirectory","rootDir","toggleActiveList","changePathAfterToggle","cacheActiveWindowAndPaths","passData","isSelected","itemsSelected","indexOf","listing","getDataBySortingType","shiftKey","addToSelection","resetData","passDataToParent","firstItem","addToPath","openCertainDirectory","sortByType","a","b","localeCompare","sortBySize","sortByDate","sortByName","sortData","forEach","filter","rows","listingItems","result","duplicate","passSelection","loading","ProgressBar","overflow","progress","Hotkeys","window","toggleShortcutsLit","reference","event","isSearchInputFocused","querySelector","toggleHotkeys","ref","Shortcuts","AddFile","useState","setValue","hasError","setHasError","onChange","target","close","Cancel","save","Create","AddDirectory","Rename","fName","autoFocus","defaultValue","Delete","items","NothingSelected","notAvailable","defaultPermissions","read","write","execute","group","others","Permissions","decodeSingleNumber","string","number","parseInt","inArray","onChangeForm","checkbox","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","onChangeValue","modal","getElementById","file","content","Menu","inputFile","useRef","handleUserKeyDown","useCallback","hotKeys","newFile","openModal","newDirectory","deleteFile","selection","rename","console","move","archive","extract","copy","itemType","stopPropagation","preventDefault","current","click","matchArchive","to","src","alt","aria-label","multiple","upload","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","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","code","hotKey","checkFileType","res","showToast","catch","err","text","success","options","mode","pop","getModeFromFileName","lineNumbers","Save","Close","newCode","Photo","activeSlide","photoGallery","imgClass","formatPath","carouselIndicators","imageClasses","data-target","data-slide-to","carouselPhotos","setPhotoGallery","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","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","handleClick","handleSearchTerm","focusInput","focus","addFavorite","unitId","section","deleteFavorite","ListItem","starred","hasOwnProperty","Boolean","toggleItem","checkItem","outdated","suspended","stopped","focused","sysInfo","printDate","leftNameText","toggleFav","InternetProtocol","NAME","FOCUSED","isChecked","DATE","STARRED","NAT","NETMASK","INTERFACE","Domains","U_WEB_DOMAINS","Status","STATUS","OWNER","Users","U_SYS_USERS","edit","handleModal","delete_conf","LeftButton","showLeftMenu","renderIcon","toggleAll","toggled","Select","cronReports","listValues","select","rebuild","suspend","unsuspend","delete","backupList","updatesList","update","serverList","stop","start","backupDetailList","restore","banList","statisticsList","renderOptions","bulkAction","show","onSave","onCancel","showSaveButton","showCancelButton","tabindex","aria-labelledby","display","Confirmation","data-dismiss","OK","InternetProtocols","setLoading","visible","actionUrl","setModal","internetProtocols","ipFav","toggledAll","totalAmount","handleContentSelection","handleFocusedElementShortcuts","handleArrowUp","handleArrowDown","initFocusedElement","focusedElementPosition","findIndex","pack","nextFocusedElement","scrollIntoView","behavior","block","handleDelete","handleEdit","currentInternetProtocolData","displayModal","reformatData","internetProtocolsDuplicate","checkedItem","incomingItem","sortArray","sortingColumn","sortBy","ipFavDuplicate","ipNames","internetProtocol","refreshMenuCounters","modalCancelHandler","term","changeSearchTerm","generateCSRUri","getCsrInitialData","domain","Password","showGenerationButton","hidePassword","generatedPassword","passwordInputHandler","chars","randomNumber","random","substr","generatePassword","Generate","AdditionalFtpForEditing","onDeleteAdditionalFtp","prefixI18N","prePath","username","v_ftp_user","v_ftp_path","deleted","is_new","v_ftp_password","FTP","v_ftp_email","renderForm","AdditionalFtpWrapper","ftps","unCheckAdditionalFtpBox","ftpUserPrePath","additionalFtp","onDeleteFtp","updatedAdditionalFtps","ftp","additionalFtpArrayLength","additionalFtpsDuplicate","addAdditionalFtp","SslSupport","letsEncrypt","setLetsEncrypt","setModalVisible","sslKey","AdvancedOptions","sslSupport","statisticsAuthCheckbox","statisticsAuth","updatedDomain","aliases","transform","sslCertificate","bool","renderSslSupport","webStats","stat","GenerateSSL","generatedData","newCsr","generateCSR","crt","csr","prePopulateInputs","email","country","locality","org","AddWebDomain","dnsSupport","mailSupport","proxySupport","showAdvancedOptions","ssl_crt","ssl_key","proxy_ext","getInternetProtocolNames","ips","stats","prefix","ftp_pre_path","checkboxHandler","input","newWebDomain","addWeb","WEB","required","Aliases","PROXY_SYSTEM","renderAdvancedOptions","TextInputWithTextOnTheRight","dbCharsets","EditDatabase","databaseUserInputValue","database","getDatabaseInfo","dbuser","updatedDatabase","updateDatabase","DB","password","host","addBanIpsUri","EditFirewall","rule","getFirewallInfo","updateFirewall","FIREWALL","protocol","port","comment","AddDatabase","memo","dbTypes","dbHosts","maxCharLength","databaseInputValue","newDatabase","addDatabase","Type","dbType","dbHost","Charset","dbCharset","AddFirewall","actions","protocols","newFirewall","addFirewall","generatorOptions","minutesRunCommandsOptions","every","hoursRunCommandsOptions","daysRunCommandsOptions","hoursOptions","hourlyMinutesOptions","dailyMinutesOptions","weeklyRunCommandOptions","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday","monthlyRunCommandOptions","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","dateOptions","RunCommandSelect","activeTab","selectName","SecondTabSelects","Minute","ThirdTabSelects","Hour","FourthTabSelects","FifthTabSelects","OtherSelects","renderSelects","Generator","formElement","activeClassName","tab","formatLink","job","Minutes","Hourly","Daily","Weekly","Monthly","generatedCronJob","iterableFormElement","EditMail","h_min","h_hour","h_day","h_wday","h_month","getCronJobInfo","min","hour","wday","updatedJob","updateCronJob","changeInput","updatedGeneratedCronJob","CRON","cmd","TextInputWithExtraButton","previousValue","NameServers","nameServersAmount","usersNS","initNameServersAmount","userNS","onDeleteNameServer","nameServersDuplicate","nameServer","nameServersLength","addNameServer","getPackageList","EditPackage","queryParams","package","pkg","toggleUnlimited","inputName","inputNameToUpdate","PACKAGE","updatedPackage","updatePackage","web_system","web_templates","web_template","web_backend","backend_templates","backend_template","proxy_system","proxy_templates","proxy_template","dns_system","dns_templates","dns_template","shells","shell","web_domains","web_aliases","dns_domains","dns_records","mail_domains","mail_accounts","databases","cron_jobs","backups","disk_quota","bandwidth","nameservers","EditHttpd","AddCronJob","newCronJob","addCronJob","Day","Month","AddPackage","webTemplates","webSystem","backendTemplates","backendSystem","proxySystem","proxyTemplates","dnsTemplates","dnsSystem","sshTemplates","webDomains","webAliases","dnsDomains","dnsRecords","mailDomains","mailAccounts","cronJobs","quota","ssh_access","newPackage","addPackage","EditServerWebOption","webBackend","webBackendPool","EditServerDnsOption","dnsCluster","cluster","EditVestaPluginsOption","lead","sftpValue","setSftpValue","fm_lead","fmValue","setFmValue","softaculousValue","setSoftaculousValue","version","firewall_system","sftp_license_key","licence_key","http_host","renderSftp","fm_license_key","fm_licence_key_option","rel","renderFm","softaculous_lead","fontWeight","renderSoftaculous","EditVestaSslOption","domainsVisible","setDomainsVisible","sslDomains","setSslDomains","ssl_domains","vesta_certificate","sys_ssl_crt","sys_ssl_key","sys_ssl_subject","sys_ssl_aliases","sys_ssl_not_before","sys_ssl_not_after","sys_ssl_signature","sys_ssl_pub_key","sys_ssl_issuer","EditDatabaseOption","DB_PMA_URL","DB_PGA_URL","mysql","mysql_hosts","printPhpMyAdminHosts","pgsql","pgsql_hosts","EditBackupOption","remoteBackup","setRemoteBackup","backup","backup_gzip","backup_dir","backup_type","backup_host","backup_username","backup_password","backup_bpath","EditMailOption","MAIL_URL","mailCertificateSystem","setMailCertificateSystem","mail_certificate","mail_system","antivirus_system","antispam_system","resetPassword","confirmPassword","login","signIn","loginAs","loginas","signInAs","logout","logout_response","removeItem","EditServer","webOption","dnsOption","mailOption","backupOption","sslOption","pluginsOption","dbOption","updatedServer","toLowerCase","toggleOption","hostname","timezones","timezone","languages","language","web_backend_pool","v_dns_cluster","dns_cluster","EditVestaPlugins","Dovecot","config1","config_path1","config2","config_path2","config3","config_path3","config4","config_path4","config5","config_path5","config6","config_path6","config7","config_path7","config8","config_path8","getMailList","MailInfoBlock","webMail","hostName","selectedOption","setSelectedOption","imapHostName","smtpHostName","imapEncryption","smtpEncryption","imapPort","smtpPort","mailInfoBlockSelectOptions","getCredentials","EditMailAccount","autoreplyChecked","setAutoreplyChecked","quotaValue","newMailDomain","account","editMailAccount","autoreply","MAIL","fwd","fwd_only","autoreply_message","send_email","webmail","getMailInfo","updateMail","antispam","antivirus","dkim","catchall","EditMailWrapper","isMailAccount","setIsMailAccount","Service","serviceName","AddMailAccount","addMailAccount","v_aliases","forward","AddMail","antiSpamChecked","antiVirusChecked","dkimChecked","addMail","AddMailWrapper","setDomain","updateDNS","recordId","record_id","EditDomainNameSystem","getDNSInfo","DNS","templates","template","exp","soa","ttl","EditDNSRecord","selectOptions","getDNSRecordInfo","updatedRecord","rec","val","priority","EditDNSWrapper","isDnsRecord","setIsDnsRecord","sslCertificateAuthority","sslSubject","sslAliases","sslNotBefore","sslNotAfter","sslSignature","sslPubKey","sslIssuer","EditWeb","webStat","statAuth","getDomainInfo","v_stats","ssl","letsencrypt","proxy","ftp_user","stats_user","updateWebDomain","onChangeAdditionalFtp","object","formatData","WEB_BACKEND","ssl_subject","ssl_aliases","ssl_not_before","ssl_not_after","ssl_signature","ssl_pub_key","ssl_issuer","ssl_ca","sslHome","ssl_home","ftp_users","ftp_user_prepath","EditPhp","max_execution_time","max_input_time","memory_limit","error_reporting","display_errors","post_max_size","upload_max_filesize","SUSPENDED","DATABASE","U_DISK","mb","U_DISK_PERCENT","DBUSER","CHARSET","HOST","TYPE","suspendedStatus","suspend_conf","handleSuspend","suspend_action","Databases","dbFav","dbAdmin","dbAdminLink","db_myadmin_link","db_pgadmin_link","currentDatabaseData","db_admin","db_admin_link","dbDuplicate","dbFavDuplicate","databasesDuplicate","dbNames","domainNameSystems","domainNameSystem","Firewall","ACTION","PROTOCOL","COMMENT","PORT","Firewalls","firewalls","firewallFav","firewallExtension","firewall","currentFirewallData","firewallsDuplicate","firewallFavDuplicate","firewallNames","bulkFirewallAction","EditUser","updatedUser","updateUser","USER","convertObjectOfObjectsToArrayOfObjects","packages","fname","lname","Bind9","Mysql","max_connections","max_user_connections","wait_timeout","interactive_timeout","max_allowed_packet","add","format","AddDomainNameSystem","addDomainNameSystem","AddDNSRecord","newDnsRecord","addDomainNameSystemRecord","AddDNSWrapper","RestoreSetting","checkItemFunc","restoreSetting","textTransform","displayBackupDetailName","restoreLinkParams","BackupRestoreSettings","backupDetailsData","setBackupDetailsData","backupDetails","handleRestore","restoreBackupSetting","reformattedData","cat","backupDetailsDuplicate","backupDetail","backupDetailNames","udir","bulkRestore","listBackups","Backup","SIZE","RUNTIME","UPDATED","faFileDownload","Backups","backupFav","configureRestoreSettings","currentBackupData","backup_fav","backupDuplicate","backupFavDuplicate","backupsDuplicate","backupNames","ok","BackupWrapper","isBackupSettings","setIsBackupSettings","AddBanIP","userLanguage","banIps","getBanIps","chain","newUser","addBanIp","Banlist","CronJob","CMD","Min","MIN","HOUR","DAY","MONTH","WDAY","CronJobs","cronFav","cronJob","currentCronJobData","cron_reports","cron_fav","cronDuplicate","cronFavDuplicate","cronJobsDuplicate","cronJobNames","handleCronNotifications","Package","FNAME","LNAME","WEB_TEMPLATE","PROXY_TEMPLATE","DNS_TEMPLATE","SHELL","WEB_DOMAINS","WEB_ALIASES","DNS_DOMAINS","DNS_RECORDS","MAIL_DOMAINS","MAIL_ACCOUNTS","DATABASES","CRON_JOBS","BACKUPS","BANDWIDTH","DISK_QUOTA","NS","Packages","packagesFav","currentPackageData","packagesDuplicate","packagesFavDuplicate","packageNames","AddUser","vEmail","vNotify","getAllPackages","getAllLanguages","getPackageNames","addUser","Email","Language","LANGUAGE","Update","isUpdated","DESCR","Version","VERSION","ARCH","Release","RELEASE","Updates","updates","autoUpdate","updatesDuplicate","updateNames","UPDATES","Server","HOSTNAME","OS","LOADAVERAGE","Uptime","UPTIME","configure","height","viewBox","fill","xmlns","fill-rule","d","STATE","SYSTEM","CPU","Memory","MEM","RTIME","action_url","Servers","servers","handleConfigure","handleRestart","handleStop","onHandleAction","sys","serversDuplicate","serverNames","menuHeight","handleState","statClassName","activeName","onKeyPress","look","U_USERS","spnd","SUSPENDED_USERS","domains","U_WEB_ALIASES","SUSPENDED_WEB","U_DNS_DOMAINS","records","U_DNS_RECORDS","SUSPENDED_DNS","U_MAIL_DOMAINS","accounts","U_MAIL_ACCOUNTS","SUSPENDED_MAIL","U_DATABASES","SUSPENDED_DB","jobs","U_CRON_JOBS","SUSPENDED_CRON","U_BACKUPS","MobileTopNav","extraClass","Graphs","Statistics","Log","FIREWALL_SYSTEM","FILEMANAGER_KEY","SOFTACULOUS","Apps","Bell","data-name","BellUnread","Notifications","ajax","notification","removeNotification","deleteNotification","TOPIC","ID","NOTICE","marginBottom","Panel","smallNavigationClass","toggleNavigation","showTopNav","signOut","renderNotifications","renderSmallNavigation","MainNav","tabs","controlFocusedTabWithCallback","currentActiveTabPositionInArray","newFocusedMenuTab","handleLeftArrowKey","handleRightArrowKey","handleTopNav","hideMenu","indexInArray","visibleNav","innerWidth","Exclusion","Array","isArray","ITEMS","renderExclusionItems","BackupExclusions","exclusions","exclusion","MailAccount","QUOTA","FWD","AUTOREPLY","MailAccounts","mailAccountsFav","mailAccount","currentMailData","mailAccountsDuplicate","mailAccountsFavDuplicate","mailAccountNames","bulkMailAccountAction","Mail","printStat","ANTIVIRUS","DKIM","ANTISPAM","CATCHALL","list_accounts_button","Mails","mails","mailFav","handleLogs","handleAddRecord","mailsDuplicate","mailFavDuplicate","mailNames","MailWrapper","mailDomain","setMailDomain","DnsRecord","dnsRecord","RECORD","PRIORITY","VALUE","DnsRecords","dnsRecordFav","dnsRecordsFav","dnsDuplicate","dns","dnsRecFavDuplicate","dnsRecordsDuplicate","dnsRecordNames","record","DomainNameSystem","RECORDS","SOA","TTL","Serial","SERIAL","Template","TPL","EXP","RECORDS_I18N","DomainNameSystems","dnsFav","currentDomainNameSystemData","Number","domainNameSystemsDuplicate","first","second","dnsFavDuplicate","domainNameSystemsNames","bulkDomainAction","DNSWrapper","isDnsRecords","setIsDnsRecords","Statistic","printName","U_BANDWIDTH","U_BANDWIDTH_PERCENT","Web","U_DISK_WEB","U_DISK_MAIL","U_DISK_DIRS","U_WEB_SSL","IP_OWNED","statistics","statistic","getStatisticsList","STATS","logOut","logInAs","U_BANDWIDTH_MEASURE","U_DISK_MEASURE","U_DISK_WEB_MEASURE","U_DISK_MAIL_MEASURE","U_DATABASES_MEASURE","U_DISK_DIRS_MEASURE","CONTACT","spnd_conf","spnd_action","userFav","addNewObject","handleLogin","currentUserData","logOutHandler","logInAsHandler","userDuplicate","userFavDuplicate","usersDuplicate","userNames","selectedUsers","generateImagePath","period","rrd","Timer","setIsActive","interval","setInterval","countDown","clearInterval","RRD","RRDs","setData","periodI18N","rrds","periodClass","changePeriod","Yearly","dataDuplicate","Ban","TIME","CHAIN","delete_confirmation","BanLists","banIp","currentBanIpData","delete_url","total_amount","banIpsDuplicate","banIpNames","WebDomain","ALIAS","U_BANDWIDTH_SIZE","U_DISK_SIZE","SSL","LETSENCRYPT","WEB_STATS","PROXY_SUPPORT","PROXY","BACKEND_SUPPORT","renderBackedSupport","BACKEND","spnd_confirmation","webFav","webDomain","currentWebDomainData","webDomainsDuplicate","webFavDuplicate","webDomainNames","SearchItem","RESULT","printLoginActionButton","edit_link","spnd_link","delete_link","Search","searchResults","sortByHandler","Logs","logs","LOG","ControlPanelContent","setHotkeysList","switchPanelTab","from","exact","component","scrollTo","top","TopPanel","menuItems","extraMenuItems","cls","route","renderMenuItems","link","renderExtraMenuItems","WebLogs","goBack","getWebLogs","LoginLayout","LoginForm","formValues","setFormValues","changeInputHandler","LOGIN","tabIndex","ServiceInfo","srv","service_log","ReactHtmlParser","ForgotPassword","useLocation","completeStep1","completeStep2","password_confirm","reset","Submit","Confirm","Reset","library","Icon","App","AuthenticatedRoute","authenticated","render","ReactDOM","store","createStore","rootReducer","composeWithDevTools","applyMiddleware","thunk","navigator","serviceWorker","ready","registration","unregister"],"mappings":"06EAEMA,EAAgB,CACpBC,eAAgB,GAChBC,cAAe,GACfC,cAAe,CACb,cACA,aACA,aACA,cACA,YACA,cACA,gBACA,iBACA,YACA,aACA,eACA,aACA,iBACA,kBACA,mBACA,gBACA,iBAEFC,aAAc,CACZ,cACA,aACA,aACA,cACA,YACA,cACA,gBACA,eACA,aACA,mBACA,kBA8BWC,EA1BC,WAAoC,IAAnCC,EAAkC,uDAA1BN,EAAeO,EAAW,uCACjD,OAAQA,EAAOC,MACb,ICzC+B,sBD8C/B,IC7CkC,yBD8ChC,OAAO,2BACFF,GADL,IACYL,eAAgBM,EAAOE,QAGrC,ICjD8B,qBDsD9B,ICrDiC,wBDsD/B,OAAO,2BACFH,GADL,IACYJ,cAAeK,EAAOE,QAGpC,QAAS,OAAOH,IE3DdN,EAAgB,CACpBU,2BAA4B,IAmBfL,EAhBC,WAAoC,IAAnCC,EAAkC,uDAA1BN,EAAeO,EAAW,uCACjD,OAAQA,EAAOC,MACb,ICRsC,6BDSpC,OAAO,2BACFF,GADL,IACYI,2BAA4BH,EAAOE,QAGjD,ICZyC,gCDavC,OAAO,2BACFH,GADL,IACYI,2BAA4B,KAG1C,QAAS,OAAOJ,IEhBdN,EAAgB,CACpBW,cAAe,IAqBFC,EAlBa,WAAoC,IAAnCN,EAAkC,uDAA1BN,EAAeO,EAAW,uCAC7D,OAAQA,EAAOC,MACb,ICR6B,oBDc7B,ICbgC,uBDc9B,OAAO,2BACFF,GAD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vB,OACE,yBAAK9Q,UAAU,OAEX2J,EACI,kBAAC,EAAD,MAEA,kBAAC,IAAD,KACE,kBAAC,IAAD,CAAOlI,KAAK,SAASimD,OAAK,EAACC,UAAWe,KACtC,kBAAC,IAAD,CAAOjnD,KAAK,SAASimD,OAAK,EAACC,UAAWyB,KACtC,kBAAC,IAAD,CACE3nD,KAAK,mBACLimD,OAAK,EACLC,UAAW30C,KACb,kBAAC,IAAD,CACEvR,KAAK,2BACLimD,OAAK,EACLC,UAAWjtC,KACb,kBAACsvC,EAAD,CACEvoD,KAAK,wBACLwoD,cAAelrD,EAAQK,SACvBuoD,UAAWqB,KACb,kBAACgB,EAAD,CACEvoD,KAAK,iBACLimD,OAAK,EACLuC,cAAelrD,EAAQK,SACvBuoD,UAAWW,KACb,kBAAC0B,EAAD,CACEvoD,KAAK,IACLwoD,cAAelrD,EAAQK,SACvBuK,QAASA,EACTg+C,UAAWL,QC5GPhiC,QACW,cAA7Btb,OAAO+H,SAAS6wB,UAEe,UAA7B54B,OAAO+H,SAAS6wB,UAEhB54B,OAAO+H,SAAS6wB,SAAS5+B,MACvB,2DCTNmmD,IAASD,OACP,kBAAC,IAAD,CAAUE,MCJHC,sBACLC,EACAC,8BAAoBC,0BAAgBC,QDGpC,kBAAC,KAAD,KACE,kBAAC,GAAD,QAGJ1nD,SAASqM,eAAe,SDkHpB,kBAAmBs7C,WACrBA,UAAUC,cAAcC,MAAMl4C,MAAK,SAAAm4C,GACjCA,EAAaC,mB","file":"static/js/main.a9be926e.chunk.js","sourcesContent":["import { ADD_FOCUSED_ELEMENT, ADD_ACTIVE_ELEMENT, REMOVE_ACTIVE_ELEMENT, REMOVE_FOCUSED_ELEMENT } from '../../actions/MainNavigation/mainNavigationTypes';\n\nconst INITIAL_STATE = {\n focusedElement: '',\n activeElement: '',\n adminMenuTabs: [\n '/list/user/',\n '/list/web/',\n '/list/dns/',\n '/list/mail/',\n '/list/db/',\n '/list/cron/',\n '/list/backup/',\n '/list/package/',\n '/list/ip/',\n '/list/rrd/',\n '/list/stats/',\n '/list/log/',\n '/list/updates/',\n '/list/firewall/',\n '/list/directory/',\n '/softaculous/',\n '/list/server/'\n ],\n userMenuTabs: [\n '/list/user/',\n '/list/web/',\n '/list/dns/',\n '/list/mail/',\n '/list/db/',\n '/list/cron/',\n '/list/backup/',\n '/list/stats/',\n '/list/log/',\n '/list/directory/',\n '/softaculous/',\n ]\n};\n\nconst reducer = (state = INITIAL_STATE, action) => {\n switch (action.type) {\n case ADD_FOCUSED_ELEMENT:\n return {\n ...state, focusedElement: action.value,\n };\n\n case REMOVE_FOCUSED_ELEMENT:\n return {\n ...state, focusedElement: action.value,\n };\n\n case ADD_ACTIVE_ELEMENT:\n return {\n ...state, activeElement: action.value,\n };\n\n case REMOVE_ACTIVE_ELEMENT:\n return {\n ...state, activeElement: action.value,\n };\n\n default: return state;\n }\n};\n\nexport default reducer;","export const ADD_FOCUSED_ELEMENT = 'ADD_FOCUSED_ELEMENT';\nexport const REMOVE_FOCUSED_ELEMENT = 'REMOVE_FOCUSED_ELEMENT';\nexport const ADD_ACTIVE_ELEMENT = 'ADD_ACTIVE_ELEMENT';\nexport const REMOVE_ACTIVE_ELEMENT = 'REMOVE_ACTIVE_ELEMENT';","import { ADD_CPANEL_FOCUSED_ELEMENT, REMOVE_CPANEL_FOCUSED_ELEMENT } from '../../actions/ControlPanelContent/controlPanelContentTypes';\n\nconst INITIAL_STATE = {\n controlPanelFocusedElement: ''\n};\n\nconst reducer = (state = INITIAL_STATE, action) => {\n switch (action.type) {\n case ADD_CPANEL_FOCUSED_ELEMENT:\n return {\n ...state, controlPanelFocusedElement: action.value,\n };\n\n case REMOVE_CPANEL_FOCUSED_ELEMENT:\n return {\n ...state, controlPanelFocusedElement: '',\n };\n\n default: return state;\n }\n};\n\nexport default reducer;","export const ADD_CPANEL_FOCUSED_ELEMENT = 'ADD_CPANEL_FOCUSED_ELEMENT';\nexport const REMOVE_CPANEL_FOCUSED_ELEMENT = 'REMOVE_CPANEL_FOCUSED_ELEMENT';","import { ADD_NOTIFICATIONS, REMOVE_NOTIFICATIONS } from 'src/actions/Notification/notificationTypes';\n\nconst INITIAL_STATE = {\n notifications: []\n};\n\nconst notificationReducer = (state = INITIAL_STATE, action) => {\n switch (action.type) {\n case ADD_NOTIFICATIONS:\n return {\n ...state,\n notifications: action.value,\n };\n\n case REMOVE_NOTIFICATIONS:\n return {\n ...state,\n notifications: action.value,\n };\n\n default: return state;\n }\n};\n\nexport default notificationReducer;\n","export const ADD_NOTIFICATIONS = 'ADD_NOTIFICATIONS';\nexport const REMOVE_NOTIFICATIONS = 'REMOVE_NOTIFICATIONS';\n","import { REFRESH_COUNTERS } from 'src/actions/MenuCounters/menuCounterTypes';\n\nconst INITIAL_STATE = {\n user: {},\n};\n\nconst menuCounterReducer = (state = INITIAL_STATE, action) => {\n switch (action.type) {\n case REFRESH_COUNTERS:\n return {\n ...state,\n user: action.value.user,\n };\n\n default: return state;\n }\n};\n\nexport default menuCounterReducer;\n","export const REFRESH_COUNTERS = 'REFRESH_COUNTERS';","import { SET_USER_SESSION } from 'src/actions/UserSession/userSessionTypes';\n\nconst INITIAL_STATE = {\n session: {}\n};\n\nconst userSessionReducer = (state = INITIAL_STATE, action) => {\n switch (action.type) {\n case SET_USER_SESSION:\n return {\n ...state,\n session: action.value,\n };\n\n default: return state;\n }\n};\n\nexport default userSessionReducer;\n","export const SET_USER_SESSION = 'SET_USER_SESSION';","import { LOGGED_OUT_AS, LOGIN, LOGOUT, CHECK_AUTH } from '../../actions/Session/sessionTypes';\n\nconst INITIAL_STATE = {\n token: '',\n error: '',\n i18n: {},\n userName: ''\n};\n\nconst sessionReducer = (state = INITIAL_STATE, action) => {\n switch (action.type) {\n case LOGIN:\n return {\n ...state,\n token: action.value.token,\n userName: action.value.userName,\n i18n: action.value.i18n || {},\n error: action.value.error\n };\n\n case LOGOUT:\n return {\n ...state,\n token: action.value.token,\n userName: action.value.userName,\n i18n: action.value.i18n || {},\n error: action.value.error\n };\n\n case LOGGED_OUT_AS:\n return {\n ...state,\n token: action.value.token,\n userName: action.value.userName,\n i18n: action.value.i18n || {},\n error: action.value.error\n };\n\n case CHECK_AUTH: return {\n ...state,\n token: action.value.token,\n userName: action.value.userName,\n i18n: action.value.i18n || {},\n error: action.value.error\n };\n\n default: return state;\n }\n};\n\nexport default sessionReducer;\n","export const LOGIN = 'LOGIN';\nexport const LOGOUT = 'LOGOUT';\nexport const LOGIN_AS = 'LOGIN_AS';\nexport const CHECK_AUTH = 'CHECK_AUTH';\nexport const LOGGED_OUT_AS = 'LOGGED_OUT_AS';\nexport const RESET_PASSWORD = 'RESET_PASSWORD';","import { REFRESH_PANEL } from '../../actions/Panel/panelTypes';\n\nconst INITIAL_STATE = {\n panel: {}\n};\n\nconst panelReducer = (state = INITIAL_STATE, action) => {\n switch (action.type) {\n case REFRESH_PANEL:\n return {\n ...state,\n panel: action.value.panel\n };\n\n default: return state;\n }\n};\n\nexport default panelReducer;\n","export const REFRESH_PANEL = 'REFRESH_PANEL';\n","import { combineReducers } from 'redux';\nimport mainNavigationReducer from './MainNavigation/mainNavigationReducer';\nimport controlPanelContentReducer from './ControlPanelContent/controlPanelContentReducer';\nimport notificationReducer from './Notification/notificationReducer';\nimport menuCounterReducer from './MenuCounters/menuCounterReducer';\nimport userSessionReducer from './UserSession/userSessionReducer';\nimport sessionReducer from './Session/sessionReducer';\nimport panelReducer from './Panel/panel';\n\nexport default combineReducers({\n mainNavigation: mainNavigationReducer,\n controlPanelContent: controlPanelContentReducer,\n notifications: notificationReducer,\n menuCounters: menuCounterReducer,\n userSession: userSessionReducer,\n session: sessionReducer,\n panel: panelReducer,\n});","import React from 'react';\nimport './Spinner.scss';\n\nconst Spinner = () => {\n return (\n <div className=\"spinner-wrapper\">\n <div className=\"progress\">\n <div className=\"progress-bar progress-bar-striped progress-bar-animated\" role=\"progressbar\" aria-valuenow=\"100\" aria-valuemin=\"0\" aria-valuemax=\"100\" style={{ width: \"100%\" }}></div>\n </div>\n </div>\n );\n}\n\nexport default Spinner;","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport './Dropdown.scss';\n\nconst Dropdown = (props) => {\n const { i18n } = useSelector(state => state.session);\n\n const changeSorting = (field, order, props) => {\n if (!props.isActive) {\n return;\n } else {\n props.changeSorting(field, order);\n }\n }\n\n const sort = (sorting) => {\n if (sorting === \"Type\") {\n return i18n.type;\n } else if (sorting === \"Size\") {\n return i18n.size;\n } else if (sorting === \"Date\") {\n return i18n.date;\n } else if (sorting === \"Name\") {\n return i18n.name;\n }\n }\n\n const button = (sorting, order) => {\n if (order === \"descending\") {\n return (\n <button type=\"button\" className=\"btn btn-secondary\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\n {sort(sorting)}\n <span className=\"arrow-down\">↓</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>↑</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\">↓</span></span>\n <span className={props.sorting === \"Type\" && props.order === \"ascending\" ? \"dropdown-item active\" : \"dropdown-item\"} onClick={() => changeSorting(\"Type\", \"ascending\", props)}><span>↑</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\">↓</span></span>\n <span className={props.sorting === \"Size\" && props.order === \"ascending\" ? \"dropdown-item active\" : \"dropdown-item\"} onClick={() => changeSorting(\"Size\", \"ascending\", props)}><span>↑</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\">↓</span></span>\n <span className={props.sorting === \"Date\" && props.order === \"ascending\" ? \"dropdown-item active\" : \"dropdown-item\"} onClick={() => changeSorting(\"Date\", \"ascending\", props)}><span>↑</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\">↓</span></span>\n <span className={props.sorting === \"Name\" && props.order === \"ascending\" ? \"dropdown-item active\" : \"dropdown-item\"} onClick={() => changeSorting(\"Name\", \"ascending\", props)}><span>↑</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)}> / {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';\nimport dayjs from 'dayjs'\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 timeFormatter = (date = new Date(), time) => {\n const year = dayjs(date).year()\n const currentYear = dayjs().year()\n if (year === currentYear) return time\n return year\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\">{this.timeFormatter(date, 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 constructor(props) {\n super(props);\n this.state = {\n orderType: \"descending\",\n sortingType: \"Type\",\n itemsSelected: [],\n listingItems: [],\n cursor: 0\n };\n }\n\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 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 { isActive, modalVisible, changePath, path } = this.props;\n const { cursor } = this.state;\n const { listing } = this.getDataBySortingType()\n\n if (!isActive || modalVisible) {\n return;\n }\n\n if (e.keyCode === 40) {\n if (cursor === listing.length - 1) {\n return;\n }\n\n if (e.shiftKey) { \n let name = 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 = listing[cursor - 1].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 { passData: passDataToParent } = this.props;\n const { firstItem, listing } = this.getDataBySortingType()\n if (this.state.cursor === 0) {\n const { name, permissions, type } = firstItem;\n passDataToParent(this.state.cursor, name, permissions, type);\n } else {\n const { name, permissions, type } = listing[this.state.cursor - 1];\n passDataToParent(this.state.cursor, name, permissions, type);\n }\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\": return this.sortBySize(a, b);\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 getDataBySortingType = () => {\n let firstItem, listing = [];\n this.props.data.listing.forEach(item => {\n if (item.name === '' && item.type === 'd') {\n firstItem = item\n } else {\n listing.push(item)\n }\n })\n if (this.state.sortingType !== 'Type') {\n listing = [\n ...listing.filter(item => item.type === 'd').sort((a, b) => this.sortByName(a, b)),\n ...listing.filter(item => item.type === 'f').sort((a, b) => this.sortData(a, b))\n ]\n } else {\n listing = listing.sort((a, b) => this.sortData(a, b))\n }\n return { firstItem, listing }\n }\n\n rows = () => {\n const { isActive, modalVisible, path, download } = this.props;\n const { cursor } = this.state;\n const { listing, firstItem } = this.getDataBySortingType()\n\n if (listing.length || firstItem) {\n return (\n <>\n <Row\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={0 === cursor}\n isActiveList={isActive}\n cursor={0}\n data={firstItem}\n path={path} />\n {\n listing.map((item, key) => (\n <Row\n key={key + 1}\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 + 1 === cursor}\n isActiveList={isActive}\n download={download}\n cursor={key + 1}\n data={item}\n path={path} />\n ))\n }\n </>\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 File']}</span>\n </li>\n <li>\n <span className=\"name\">F6</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\">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\">↑</span>\n <span className=\"description\">{i18n['Move Cursor Up']}</span>\n </li>\n <li>\n <span className=\"name\">↓</span>\n <span className=\"description\">{i18n['Move Cursor Down']}</span>\n </li>\n <li>\n <span className=\"name\">←</span>\n <span className=\"description\">{i18n['Switch to Left Tab']}</span>\n </li>\n <li>\n <span className=\"name\">→</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\">F3</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, { useState } from 'react';\nimport { useSelector } from 'react-redux';\n\nconst AddFile = (props) => {\n const [value, setValue] = useState(null)\n const { i18n } = useSelector(state => state.session);\n const [hasError, setHasError] = useState(value !== null && !value.length)\n\n const onChange = (e) => {\n setValue(e.target.value)\n }\n\n const save = () => {\n if (!value) {\n setHasError(true)\n return;\n }\n props.save()\n }\n\n const cancel = () => {\n props.close()\n }\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\" onChange={onChange} ref={props.reference}></input>\n {hasError && <small className='error'>{i18n['File name cannot be empty']}</small>}\n </div>\n <div className=\"modal-footer\">\n <button type=\"button\" className=\"btn btn-danger mr-auto\" onClick={cancel}>{i18n.Cancel}</button>\n <button type=\"button\" className=\"btn btn-primary\" onClick={save}>{i18n.Create}</button>\n </div>\n </div>\n );\n}\n\nexport default AddFile;","import React, { useState } from 'react';\nimport { useSelector } from 'react-redux';\n\n\nconst AddDirectory = (props) => {\n const [value, setValue] = useState(null)\n const { i18n } = useSelector(state => state.session);\n const [hasError, setHasError] = useState(value !== null && !value.length)\n\n const onChange = (e) => {\n setValue(e.target.value)\n }\n\n const save = () => {\n if (!value) {\n setHasError(true)\n return;\n }\n props.save()\n }\n\n const cancel = () => {\n props.close()\n }\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\" onChange={onChange} ref={props.reference}></input>\n {hasError && <small className='error'>{i18n['Directory name cannot be empty']}</small>}\n </div>\n <div className=\"modal-footer\">\n <button type=\"button\" className=\"btn btn-danger mr-auto\" onClick={cancel}>{i18n.Cancel}</button>\n <button type=\"button\" className=\"btn btn-primary\" onClick={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\">"{props.fName}"</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\">"{props.fName}"</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\">"{fName}"</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\">"{props.fName}"</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\">"{props.fName}"</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\">"{props.fName}"</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\">"{props.fName}"</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\">"{item.name}" </span>\n )}\n </div> :\n <div><h3>This file already exists</h3>\n <span className=\"quot\">"{props.files[0].name}"</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, { useEffect } 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 Replace from './Replace';\nimport './Modal.scss';\n\nconst Modal = (props) => {\n useEffect(() => {\n window.addEventListener(\"click\", closeOutside);\n document.addEventListener(\"keydown\", hotkeys);\n\n return () => {\n window.removeEventListener(\"click\", closeOutside);\n document.removeEventListener(\"keydown\", hotkeys);\n }\n }, [])\n\n const hotkeys = (e) => {\n if (e.keyCode === 27) {\n closeModal();\n } else if (e.keyCode === 13) {\n saveAndClose();\n }\n }\n\n const saveAndClose = () => {\n props.onClick();\n props.onClose();\n }\n\n const changePermissions = (permissions) => {\n props.onChangePermissions(permissions);\n }\n\n const replace = (file) => {\n props.onClick(file);\n props.onClose();\n }\n\n const onChange = (e) => {\n props.onChangeValue(e.target.value);\n }\n\n const closeModal = () => {\n props.onClose();\n }\n\n const closeOutside = (e) => {\n let modal = document.getElementById(\"modal\");\n if (e.target === modal) {\n props.onClose();\n }\n }\n\n const content = () => {\n const { type, reference, fName, permissions, items, path, files, notAvailable } = props;\n switch (type) {\n case 'Copy': return <Copy close={closeModal} save={saveAndClose} reference={reference} onChange={onChange} name={type} fName={fName} items={items} path={path} />;\n case 'Move': return <Move close={closeModal} save={saveAndClose} reference={reference} onChange={onChange} name={type} fName={fName} items={items} path={path} />;\n case 'Permissions': return <Permissions close={closeModal} save={saveAndClose} changePermissions={changePermissions} fName={fName} permissions={permissions} />;\n case 'Extract': return <Extract close={closeModal} save={saveAndClose} reference={reference} onChange={onChange} name={type} fName={fName} path={path} />;\n case 'Archive': return <Archive close={closeModal} save={saveAndClose} reference={reference} onChange={onChange} items={items} name={type} fName={fName} path={path} />;\n case 'Rename': return <Rename close={closeModal} save={saveAndClose} reference={reference} onChange={onChange} name={type} fName={fName} />;\n case 'Add directory': return <AddDirectory close={closeModal} save={saveAndClose} reference={reference} />;\n case 'Delete': return <Delete close={closeModal} save={saveAndClose} fName={fName} items={items} />;\n case 'Add file': return <AddFile close={closeModal} save={saveAndClose} reference={reference} />;\n case 'Replace': return <Replace close={closeModal} replace={(files) => replace(files)} files={files} />\n case 'Nothing selected': return <NothingSelected close={closeModal} notAvailable={notAvailable} />;\n default:\n break;\n }\n }\n\n return (\n <div>\n <div className=\"modal\" id=\"modal\">\n {content()}\n </div>\n </div>\n );\n}\n\nexport default Modal;","import React, { useCallback, useEffect, useRef } 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 = useRef()\n\n const handleUserKeyDown = useCallback((event) => hotKeys(event), [props])\n\n useEffect(() => {\n document.addEventListener('keydown', handleUserKeyDown)\n return () => document.removeEventListener('keydown', handleUserKeyDown)\n }, [handleUserKeyDown])\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 console.log(props)\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 e.stopPropagation()\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus')\n if (props.modalVisible || isSearchInputFocused) return\n if (e.shiftKey && e.keyCode === 118) {\n e.preventDefault()\n rename()\n return\n }\n\n switch (e.keyCode) {\n // u\n case 85:\n e.preventDefault();\n return inputFile.current.click()\n // n\n case 78:\n e.preventDefault()\n return newFile()\n // F6\n case 118:\n e.preventDefault()\n return newDirectory()\n // d\n case 68:\n e.preventDefault()\n return download()\n // F2\n case 113:\n e.preventDefault()\n return rename()\n // m\n case 77:\n e.preventDefault()\n return move()\n // F4\n case 115:\n e.preventDefault()\n return copy()\n // a\n case 65:\n e.preventDefault()\n return archive()\n // F8\n case 119:\n e.preventDefault()\n return deleteFile()\n // Del\n case 46:\n e.preventDefault()\n return deleteFile()\n // F3\n case 114:\n e.preventDefault()\n return permissions()\n default:\n 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()}>\n {i18n.UPLOAD}\n </button>\n <button type=\"button\" className=\"btn btn-light big\" onClick={newFile}>\n {i18n['NEW FILE']}\n </button>\n <button type=\"button\" className=\"btn btn-light small\" onClick={newFile} title={i18n['NEW FILE']}>\n <FontAwesomeIcon icon=\"file\" className=\"icon file\" />\n </button>\n <button type=\"button\" className=\"btn btn-light big\" onClick={newDirectory}>\n {i18n['NEW DIR']}\n </button>\n <button type=\"button\" className=\"btn btn-light small\" onClick={newDirectory} title={i18n['NEW DIR']}>\n <FontAwesomeIcon icon=\"folder\" className=\"icon folder-close\" />\n </button>\n <button type=\"button\" className=\"btn btn-light big\" onClick={download}>\n {i18n.DOWNLOAD}\n </button>\n <button type=\"button\" className=\"btn btn-light small\" onClick={download} title={i18n.DOWNLOAD}>\n <FontAwesomeIcon icon=\"download\" className=\"icon download\" />\n </button>\n <button type=\"button\" className=\"btn btn-light big\" onClick={rename}>\n {i18n.RENAME}\n </button>\n <button type=\"button\" className=\"btn btn-light small\" onClick={rename} title={i18n.RENAME}>\n <FontAwesomeIcon icon=\"italic\" className=\"icon italic\" />\n </button>\n <button type=\"button\" className=\"btn btn-light big\" onClick={permissions}>\n {i18n.RIGHTS}\n </button>\n <button type=\"button\" className=\"btn btn-light small\" onClick={permissions} title={i18n.RIGHTS}>\n <FontAwesomeIcon icon=\"user\" className=\"icon user\" />\n </button>\n <button type=\"button\" className=\"btn btn-light big\" onClick={copy}>\n {i18n.COPY}\n </button>\n <button type=\"button\" className=\"btn btn-light small\" onClick={copy} title={i18n.COPY}>\n <FontAwesomeIcon icon=\"copy\" className=\"icon copy\" />\n </button>\n <button type=\"button\" className=\"btn btn-light big\" onClick={move}>\n {i18n.MOVE}\n </button>\n <button type=\"button\" className=\"btn btn-light small\" onClick={move} title={i18n.MOVE}>\n <FontAwesomeIcon icon=\"paste\" className=\"icon paste\" />\n </button>\n {matchArchive ? null : (\n <button type=\"button\" className=\"btn btn-light big\" onClick={archive}>\n {i18n.ARCHIVE}\n </button>\n )}\n {matchArchive ? null : (\n <button type=\"button\" className=\"btn btn-light small\" onClick={archive} title={i18n.ARCHIVE}>\n <FontAwesomeIcon icon=\"book\" className=\"icon book\" />\n </button>\n )}\n {matchArchive ? (\n <button type=\"button\" className=\"btn btn-light big\" onClick={extract}>\n {i18n.EXTRACT}\n </button>\n ) : null}\n {matchArchive ? (\n <button type=\"button\" className=\"btn btn-light small\" onClick={extract} title={i18n.EXTRACT}>\n <FontAwesomeIcon icon=\"box-open\" className=\"icon open\" />\n </button>\n ) : null}\n <button type=\"button\" className=\"btn btn-light big delete\" onClick={deleteFile}>\n {i18n.DELETE}\n </button>\n <button type=\"button\" className=\"btn btn-light small\" onClick={deleteFile} title={i18n.DELETE}>\n <FontAwesomeIcon icon=\"trash\" className=\"icon trash\" />\n </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}>×</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}>×</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 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} {months[month]} {year}</div>;\n }\n }\n\n return (\n <div className=\"edit-item\">\n <Container className=\"l-col w-14\">\n {renderDate()}\n <div className=\"time\">\n {time}\n </div>\n <div className=\"status uppercase\">\n {status}\n </div>\n </Container>\n {children}\n </div>\n );\n}\n\nexport default AddItemLayout;","import React, { useEffect, useState } from 'react';\nimport './Toolbar.scss';\n\nconst Toolbar = props => {\n const [toolbarHeight, setToolbarHeight] = useState(185);\n\n useEffect(() => {\n window.addEventListener(\"resize\", handleToolbar);\n document.addEventListener(\"scroll\", changeToolbarHeight);\n\n return () => {\n window.removeEventListener(\"resize\", handleToolbar);\n document.removeEventListener(\"scroll\", changeToolbarHeight);\n }\n }, []);\n\n const handleToolbar = () => {\n if (document.documentElement.clientWidth < 900) {\n setToolbarHeight(95);\n } else {\n setToolbarHeight(185);\n }\n }\n\n const changeToolbarHeight = () => {\n if (document.documentElement.clientWidth > 900) {\n let scrollTop = window.scrollY;\n let newToolbarHeight = Math.max(95, 185 - scrollTop);\n setToolbarHeight(newToolbarHeight);\n }\n }\n\n const className = () => {\n const { className } = props;\n\n if (className === \"justify-right\") {\n return toolbarHeight === 95 ? \"toolbar t-shadow \" + className : \"toolbar \" + className;\n }\n\n return toolbarHeight === 95 ? \"toolbar t-shadow\" : \"toolbar\";\n }\n\n const style = () => {\n if (props.mobile) {\n return;\n }\n\n if (document.documentElement.clientWidth > 900) {\n return { marginTop: toolbarHeight };\n } else {\n return { marginTop: 33 };\n }\n }\n\n return (\n <div className={className()} style={style()} id=\"v-toolbar\">\n {props.children}\n </div>\n );\n}\n\nexport default Toolbar;","import axios from 'axios';\nimport { getAuthToken } from 'src/utils/token';\n\nconst BASE_URL = window.location.origin;\n\nexport const signIn = (data) => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n formDataObject.append(\"token\", getAuthToken());\n\n return axios.post(`${BASE_URL}/api/v1/login/index.php`, formDataObject);\n};\n\nexport const checkAuth = () => {\n let uri = '/api/v1/login/index.php';\n const token = getAuthToken();\n\n if (token) uri += `?token=${token}`;\n\n return axios.get(`${BASE_URL}${uri}`);\n};\n\nexport const signInAs = (username) => {\n return axios.get(`${BASE_URL}/api/v1/login/index.php`, {\n params: {\n loginas: username,\n token: getAuthToken()\n }\n });\n};\n\nexport const signOut = () => {\n return axios.get(`${BASE_URL}/api/v1/logout/index.php`);\n};\n\nexport const getMainData = () => {\n let uri = `${BASE_URL}/api/v1/login/session.php`;\n\n return axios.get(uri);\n};\n\nexport const checkAuthToken = token => {\n let uri = `${BASE_URL}/api/v1/login/session.php`;\n\n if (token) uri += `?token=${token}`;\n\n return axios.get(uri);\n};\n","import { REFRESH_COUNTERS } from './menuCounterTypes';\nimport { checkAuth } from 'src/services/session';\nimport { setAuthToken } from 'src/utils/token';\nimport { REFRESH_PANEL } from '../Panel/panelTypes';\n\nexport const refreshCounters = () => (dispatch, getState) => {\n return new Promise((resolve, reject) => {\n checkAuth()\n .then(res => {\n const { data, token, panel } = res.data;\n\n if (token) setAuthToken(token);\n\n dispatch({\n type: REFRESH_COUNTERS,\n value: {\n user: data\n }\n });\n\n dispatch({\n type: REFRESH_PANEL,\n value: {\n panel\n }\n });\n\n resolve(token);\n })\n .catch(err => {\n reject();\n console.error(err);\n });\n });\n}\n","import React, { useEffect, useState } from 'react';\n\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport { getInternetProtocolInfo, updateInternetProtocol } from '../../../ControlPanelService/Ip';\nimport SelectInput from '../../ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport TextInput from '../../ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport Checkbox from '../../ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from '../../../components/Spinner/Spinner';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\nimport QS from 'qs';\n\nimport './EditInternetProtocol.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nconst EditInternetProtocol = () => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n loading: false,\n dedicated: false\n });\n\n useEffect(() => {\n let queryParams = QS.parse(history.location.search, { ignoreQueryPrefix: true });\n const { ip } = queryParams;\n\n dispatch(addActiveElement('/list/ip/'));\n dispatch(removeFocusedElement());\n\n if (ip) {\n setState({ ...state, loading: true });\n fetchData(ip);\n }\n }, []);\n\n const fetchData = ip => {\n getInternetProtocolInfo(ip)\n .then(response => {\n setState({\n ...state,\n data: response.data,\n dedicated: !response.data.dedicated,\n loading: false\n });\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err)\n });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedIP = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedIP[name] = value;\n }\n\n updatedIP['token'] = token;\n updatedIP['save'] = 'save';\n updatedIP['v_ip'] = state.data.ip;\n\n if (Object.keys(updatedIP).length !== 0 && updatedIP.constructor === Object) {\n setState({ ...state, loading: true });\n\n updateInternetProtocol(updatedIP, state.data.ip)\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n if (error_msg) {\n setErrorMessage(error_msg);\n setOkMessage('');\n } else {\n dispatch(refreshCounters()).then(() => {\n setErrorMessage('');\n setOkMessage(ok_msg);\n });\n }\n }\n })\n .then(() => fetchData(state.data.ip))\n .catch(err => console.error(err));\n }\n }\n\n const onChangeDedicated = value => {\n setState({ ...state, dedicated: value });\n }\n\n return (\n <div className=\"edit-template edit-ip\">\n <Helmet>\n <title>{`Vesta - ${i18n.IP}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Editing IP Address']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}\n </span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout date={state.data.date} time={state.data.time} status={state.data.status}>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"edit-ip\">\n <TextInput id=\"type\" name=\"v_ip\" title={i18n['IP address']} value={state.data.ip} disabled />\n\n <TextInput id=\"type\" name=\"v_netmask\" title={i18n['Netmask']} value={state.data.netmask} disabled />\n\n <TextInput id=\"type\" name=\"v_interface\" title={i18n['Interface']} value={state.data.interface} disabled />\n\n <Checkbox onChange={onChangeDedicated} name=\"v_shared\" id=\"shared\" title={i18n['Shared']} defaultChecked={state.dedicated} />\n\n {\n !state.dedicated && (\n <div className=\"dedicated-form-group\">\n <SelectInput\n options={state.data.users}\n selected={state.data.owner}\n title={i18n['Assigned user']}\n name=\"v_owner\"\n id=\"owner\" />\n </div>\n )\n }\n\n <TextInput id=\"type\" name=\"v_name\" title={i18n['Assigned domain']} value={state.data.name} optionalTitle={i18n['optional']} />\n\n <TextInput id=\"type\" name=\"v_nat\" title={i18n['NAT IP association']} value={state.data.nat} optionalTitle={i18n['optional']} />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/ip/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div>\n );\n}\n\nexport default EditInternetProtocol;","import React, { useEffect, useState } from 'react';\n\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport { addInternetProtocol, getAdditionalInfo } from '../../../ControlPanelService/Ip';\nimport SelectInput from '../../ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport TextInput from '../../ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport Checkbox from '../../ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport Spinner from '../../Spinner/Spinner';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './AddInternetProtocol.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nconst AddInternetProtocol = props => {\n const token = localStorage.getItem(\"token\");\n const { i18n, userName } = useSelector(state => state.session);\n const dispatch = useDispatch();\n const history = useHistory();\n const [state, setState] = useState({\n loading: false,\n dedicated: true,\n okMessage: '',\n errorMessage: '',\n interfaces: [],\n users: []\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/ip/'));\n dispatch(removeFocusedElement());\n\n setState({ ...state, loading: true });\n\n fetchData();\n }, []);\n\n const submitFormHandler = event => {\n event.preventDefault();\n let newIp = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n newIp[name] = value;\n }\n\n if (Object.keys(newIp).length !== 0 && newIp.constructor === Object) {\n setState({ ...state, loading: true });\n addInternetProtocol(newIp)\n .then(result => {\n if (result.status === 200) {\n const { error_msg: errorMessage, ok_msg: okMessage } = result.data;\n\n if (errorMessage) {\n setState({ ...state, errorMessage, okMessage, loading: false });\n } else {\n dispatch(refreshCounters()).then(() => {\n setState({ ...state, okMessage, errorMessage: '', loading: false });\n });\n }\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const fetchData = () => {\n getAdditionalInfo()\n .then(result => {\n setState({ ...state, interfaces: result.data.interfaces, users: result.data.users, loading: false });\n })\n .catch(err => console.error(err));\n }\n\n const onChangeDedicated = value => {\n setState({ ...state, dedicated: value });\n }\n\n return (\n <div className=\"edit-template add-ip\">\n <Helmet>\n <title>{`Vesta - ${i18n.IP}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Adding Package']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {state.errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n {state.errorMessage}</span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {state.okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n <span>{HtmlParser(state.okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> : (\n <form onSubmit={event => submitFormHandler(event)}>\n <input type=\"hidden\" name=\"ok\" value=\"add\" />\n <input type=\"hidden\" name=\"v_owner\" value={userName} />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <TextInput name=\"v_ip\" id=\"ipAddress\" title={i18n['IP address']} />\n\n <TextInput name=\"v_netmask\" id=\"netmask\" title={i18n['Netmask']} />\n\n <SelectInput\n options={state.interfaces}\n name=\"v_interface\"\n id=\"interfaces\"\n title={i18n['Interface']} />\n\n <Checkbox onChange={onChangeDedicated} name=\"v_shared\" id=\"shared\" title={i18n['Shared']} defaultChecked={state.dedicated} />\n\n {\n !state.dedicated\n ? (\n <div className=\"assigned-user\">\n <SelectInput\n options={state.users}\n name=\"v_owner\"\n id=\"users\"\n title={i18n['Assigned user']} />\n </div>\n )\n : null\n }\n\n <TextInput name=\"v_name\" id=\"name\" title={i18n['Assigned domain']} optionalTitle={i18n['optional']} />\n\n <TextInput name=\"v_nat\" id=\"nat\" title={i18n['NAT IP association']} optionalTitle={i18n['optional']} />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Add}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/ip/')}>{i18n.Back}</button>\n </div>\n </form>\n )}\n </AddItemLayout>\n </div>\n );\n}\n\nexport default AddInternetProtocol;","import React from 'react';\n\nconst TextArea = ({ id, name, defaultValue = '', title, optionalTitle = '', rows = '3', disabled = false, ...rest }) => {\n return (\n <div className=\"form-group\">\n <label className=\"label-wrapper\" htmlFor={id}>\n {title}\n <span>{optionalTitle}</span>\n </label>\n <textarea\n className=\"form-control\"\n id={id}\n rows={rows}\n name={name}\n readOnly={disabled}\n defaultValue={defaultValue}\n {...rest}\n >\n </textarea>\n </div>\n );\n}\n\nexport default TextArea;\n","import axios from \"axios\";\nimport { getAuthToken } from \"src/utils/token\";\n\nconst BASE_URL = window.location.origin;\nconst webApiUri = '/api/v1/list/server/index.php';\nconst serverAdditionalInfoUri = '/api/v1/edit/server/index.php';\n\nexport const getServersList = () => {\n return axios.get(BASE_URL + webApiUri);\n}\n\nexport const bulkAction = (action, services) => {\n const formData = new FormData();\n formData.append(\"action\", action);\n formData.append(\"token\", getAuthToken());\n\n services.forEach(service => {\n formData.append(\"service[]\", service);\n });\n\n return axios.post(BASE_URL + '/api/v1/bulk/service/', formData);\n};\n\nexport const handleAction = uri => {\n return axios.get(BASE_URL + uri, {\n params: {\n token: getAuthToken()\n }\n });\n}\n\nexport const getServerAdditionalInfo = () => {\n return axios.get(BASE_URL + serverAdditionalInfoUri, {\n params: {\n token: getAuthToken()\n }\n });\n}\n\nexport const updateService = (data, uri = '') => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + `/api/v1/edit/server/${uri}/index.php`, formDataObject, {\n params: {\n token: getAuthToken()\n }\n });\n}\n\nexport const getServiceInfo = service => {\n return axios.get(`${BASE_URL}/api/v1/edit/server/${service}/index.php`);\n}\n\nexport const getServiceLogs = service => {\n return axios.get(`${BASE_URL}${webApiUri}?${service}`);\n}\n\nexport const services = [\n 'apache2',\n 'clamd',\n 'cron',\n 'crond',\n 'exim',\n 'exim4',\n 'fail2ban',\n 'iptables',\n 'mariadb',\n 'mysqld',\n 'named',\n 'php-fpm',\n 'php5-fpm',\n 'proftpd',\n 'spamassassin',\n 'spamd',\n 'vsftpd',\n];","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"../../../../actions/MainNavigation/mainNavigationActions\";\nimport TextInput from '../../../ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport Checkbox from '../../../ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport TextArea from '../../../ControlPanel/AddItemLayout/Form/TextArea/TextArea';\nimport AddItemLayout from '../../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { getServiceInfo, updateService } from 'src/ControlPanelService/Server';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from '../../../../components/Spinner/Spinner';\nimport Toolbar from '../../../MainNav/Toolbar/Toolbar';\nimport { Link, useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './EditServerNginx.scss';\nimport { Helmet } from 'react-helmet';\nimport HtmlParser from 'react-html-parser';\n\nconst EditServerNginx = props => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [restart, setRestart] = useState(true);\n const [state, setState] = useState({\n data: {},\n loading: false,\n basicOptions: true,\n advancedOptions: false\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/server/'));\n dispatch(removeFocusedElement());\n\n setState({ ...state, loading: true });\n fetchData();\n }, []);\n\n const fetchData = () => {\n getServiceInfo('nginx')\n .then(response => {\n setState({\n ...state,\n data: response.data,\n loading: false\n });\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err)\n });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedService = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedService[name] = value;\n }\n\n if (Object.keys(updatedService).length !== 0 && updatedService.constructor === Object) {\n setState({ ...state, loading: true });\n\n updatedService['v_config'] = state.data.config;\n updatedService['v_restart'] = restart ? 'yes' : 'no';\n\n updateService(updatedService, '/nginx')\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n if (error_msg) {\n setErrorMessage(error_msg);\n setOkMessage('');\n } else {\n setErrorMessage('');\n setOkMessage(ok_msg);\n }\n }\n })\n .then(() => fetchData())\n .catch(err => console.error(err));\n }\n }\n\n const toggleOptions = () => {\n setState({\n ...state,\n advancedOptions: !state.advancedOptions,\n basicOptions: !state.basicOptions\n });\n }\n\n const onUpdateConfig = ({ id, value }) => {\n if (!value) return;\n\n var regexp = new RegExp(`(${id})(.+)(${state.data[id]})`, 'gm');\n const updatedConfig = state.data.config.replace(regexp, `$1$2${value}`);\n setState({ ...state, data: { ...state.data, config: updatedConfig, [id]: value } });\n }\n\n return (\n <div className=\"edit-template edit-nginx\">\n <Helmet>\n <title>{`Vesta - ${i18n.SERVER}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Configuring Server']} / {state.data.service_name}</div>\n <div className=\"link\"><Link to=\"/edit/server/php\">{i18n['Configure']} php.ini</Link></div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}\n </span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"edit-mail\">\n <input type=\"hidden\" name=\"save\" value=\"save\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n {\n !state.basicOptions && (\n <button type=\"button\" onClick={() => toggleOptions()}>\n {i18n['Basic options']}\n {state.basicOptions ? <FontAwesomeIcon icon=\"caret-up\" /> : <FontAwesomeIcon icon=\"caret-down\" />}\n </button>\n )\n }\n\n {\n state.basicOptions && (\n <>\n <TextInput\n id=\"worker_processes\"\n title=\"worker_processes\"\n name=\"v_worker_processes\"\n onChange={event => onUpdateConfig(event.target)}\n value={state.data.worker_processes} />\n\n <TextInput\n id=\"worker_connections\"\n title=\"worker_connections\"\n name=\"v_worker_connections\"\n onChange={event => onUpdateConfig(event.target)}\n value={state.data.worker_connections} />\n\n <TextInput\n id=\"client_max_body_size\"\n title=\"client_max_body_size\"\n name=\"v_client_max_body_size\"\n onChange={event => onUpdateConfig(event.target)}\n value={state.data.client_max_body_size} />\n\n <TextInput\n id=\"send_timeout\"\n title=\"send_timeout\"\n name=\"v_send_timeout\"\n onChange={event => onUpdateConfig(event.target)}\n value={state.data.send_timeout} />\n\n <TextInput\n id=\"proxy_connect_timeout\"\n title=\"proxy_connect_timeout\"\n name=\"v_proxy_connect_timeout\"\n onChange={event => onUpdateConfig(event.target)}\n value={state.data.proxy_connect_timeout} />\n\n <TextInput\n id=\"proxy_send_timeout\"\n title=\"proxy_send_timeout\"\n name=\"v_proxy_send_timeout\"\n onChange={event => onUpdateConfig(event.target)}\n value={state.data.proxy_send_timeout} />\n\n <TextInput\n id=\"proxy_read_timeout\"\n title=\"proxy_read_timeout\"\n name=\"v_proxy_read_timeout\"\n onChange={event => onUpdateConfig(event.target)}\n value={state.data.proxy_read_timeout} />\n\n <TextInput\n id=\"gzip\"\n title=\"gzip\"\n name=\"v_gzip\"\n onChange={event => onUpdateConfig(event.target)}\n value={state.data.gzip} />\n\n <TextInput\n id=\"gzip_comp_level\"\n title=\"gzip_comp_level\"\n name=\"v_gzip_comp_level\"\n onChange={event => onUpdateConfig(event.target)}\n value={state.data.gzip_comp_level} />\n\n <TextInput\n id=\"charset\"\n title=\"charset\"\n name=\"v_charset\"\n onChange={event => onUpdateConfig(event.target)}\n value={state.data.charset} />\n </>\n )\n }\n\n {\n !state.advancedOptions && (\n <button type=\"button\" onClick={() => toggleOptions()}>\n {i18n['Advanced options']}\n {state.advancedOptions ? <FontAwesomeIcon icon=\"caret-up\" /> : <FontAwesomeIcon icon=\"caret-down\" />}\n </button>\n )\n }\n\n <br />\n <br />\n\n {\n state.advancedOptions && (\n <>\n <TextArea\n defaultValue={state.data.config}\n title={state.data.config_path}\n onChange={e => setState({ ...state, data: { ...state.data, config: e.target.value } })}\n name=\"v_config\"\n id=\"v_config\"\n rows=\"25\" />\n\n <br />\n\n <Checkbox\n title={i18n['restart']}\n defaultChecked={true}\n onChange={checked => setRestart(checked)}\n name=\"v_restart\"\n id=\"restart\" />\n </>\n )\n }\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/server/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div>\n );\n}\n\nexport default EditServerNginx;","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"../../../../actions/MainNavigation/mainNavigationActions\";\nimport Checkbox from '../../../ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport TextArea from '../../../ControlPanel/AddItemLayout/Form/TextArea/TextArea';\nimport { getServiceInfo, updateService } from 'src/ControlPanelService/Server';\nimport AddItemLayout from '../../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from '../../../../components/Spinner/Spinner';\nimport Toolbar from '../../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './Postgresql.scss';\nimport { Helmet } from 'react-helmet';\nimport HtmlParser from 'react-html-parser';\n\nconst Postgresql = () => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n loading: false\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/server/'));\n dispatch(removeFocusedElement());\n\n setState({ ...state, loading: true });\n fetchData();\n }, []);\n\n const fetchData = () => {\n getServiceInfo('postgresql')\n .then(response => {\n if (!response.data.config) {\n history.push('/list/server');\n }\n\n setState({ ...state, data: response.data, loading: false });\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err);\n });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedService = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedService[name] = value;\n }\n\n if (Object.keys(updatedService).length !== 0 && updatedService.constructor === Object) {\n setState({ ...state, loading: true });\n\n updateService(updatedService, '/postgresql')\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n setErrorMessage(error_msg || '');\n setOkMessage(ok_msg || '');\n }\n })\n .then(() => fetchData())\n .catch(err => console.error(err));\n }\n }\n\n return (\n <div className=\"edit-template edit-pgsql\">\n <Helmet>\n <title>{`Vesta - ${i18n.SERVER}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">\n {i18n['Configuring Server']} / {state.data.service_name}\n </div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}\n </span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"edit-pgsql\">\n <input type=\"hidden\" name=\"save\" value=\"save\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <TextArea\n defaultValue={state.data.options}\n title={state.data.options_path}\n name=\"v_options\"\n id=\"v_options\"\n rows=\"10\" />\n\n <br />\n\n <TextArea\n defaultValue={state.data.config}\n title={state.data.config_path}\n name=\"v_config\"\n id=\"v_config\"\n rows=\"10\" />\n\n <br />\n\n <Checkbox\n title={i18n['restart']}\n defaultChecked={true}\n name=\"v_restart\"\n id=\"restart\" />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/server/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div >\n );\n}\n\nexport default Postgresql;","import axios from \"axios\";\nimport { getAuthToken } from \"src/utils/token\";\n\nconst BASE_URL = window.location.origin;\nconst webApiUri = '/api/v1/list/backup/index.php';\nconst scheduleBackupUri = '/api/v1/schedule/backup/';\nconst backupDetailsUri = '/api/v1/list/backup/index.php';\nconst backupExclusionsUri = '/api/v1/list/backup/exclusions/index.php';\nconst backupExclusionsInfoUri = '/api/v1/edit/backup/exclusions/index.php';\nconst backupRestoreSettingUri = '/api/v1/schedule/restore/index.php';\nconst bulkRestoreUri = '/api/v1/bulk/restore/index.php';\n\nexport const getBackupList = () => {\n return axios.get(BASE_URL + webApiUri);\n}\n\nexport const bulkAction = (action, backups) => {\n const formData = new FormData();\n formData.append(\"action\", action);\n formData.append(\"token\", getAuthToken());\n\n backups.forEach(backup => {\n formData.append(\"backup[]\", backup);\n });\n\n return axios.post(BASE_URL + '/api/v1/bulk/backup/', formData);\n};\n\nexport const handleAction = uri => {\n return axios.get(BASE_URL + uri, {\n params: {\n token: getAuthToken()\n }\n });\n}\n\nexport const scheduleBackup = () => {\n return axios.get(BASE_URL + scheduleBackupUri);\n}\n\nexport const getBackupDetails = backup => {\n return axios.get(BASE_URL + `${backupDetailsUri}?backup=${backup}`);\n}\n\nexport const restoreBackupSetting = params => {\n return axios.get(BASE_URL + `${backupRestoreSettingUri}${params}`);\n}\n\nexport const bulkRestore = (action, selection, backup) => {\n const formData = new FormData();\n formData.append(\"token\", getAuthToken());\n formData.append(\"action\", action);\n formData.append(\"backup\", backup);\n\n selection.forEach(udir => {\n formData.append(\"udir[]\", udir);\n });\n\n return axios.post(BASE_URL + `${bulkRestoreUri}`, formData);\n}\n\nexport const getBackupExclusions = () => {\n return axios.get(BASE_URL + `${backupExclusionsUri}`);\n}\n\nexport const getBackupExclusionsInfo = () => {\n return axios.get(BASE_URL + `${backupExclusionsInfoUri}`);\n}\n\nexport const updateBackupExclusions = data => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + backupExclusionsInfoUri, formDataObject, {\n params: {\n token: getAuthToken()\n }\n });\n}\n","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"src/actions/MainNavigation/mainNavigationActions\";\nimport { updateBackupExclusions, getBackupExclusionsInfo } from 'src/ControlPanelService/Backup';\nimport TextArea from 'src/components/ControlPanel/AddItemLayout/Form/TextArea/TextArea';\nimport AddItemLayout from 'src/components/ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Toolbar from 'src/components/MainNav/Toolbar/Toolbar';\nimport Spinner from 'src/components/Spinner/Spinner';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { Helmet } from 'react-helmet';\n\nimport './style.scss';\nimport HtmlParser from 'react-html-parser';\n\nconst EditBackupExclusions = () => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n loading: false\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/backup/'));\n dispatch(removeFocusedElement());\n\n setState({ ...state, loading: true });\n fetchData();\n }, []);\n\n const fetchData = () => {\n getBackupExclusionsInfo()\n .then(response => {\n setState({\n ...state,\n data: response.data,\n loading: false\n });\n })\n .catch(err => console.error(err));\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedExclusions = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedExclusions[name] = value;\n }\n\n updatedExclusions['token'] = token;\n updatedExclusions['save'] = 'save';\n\n if (Object.keys(updatedExclusions).length !== 0 && updatedExclusions.constructor === Object) {\n setState({ ...state, loading: true });\n\n updateBackupExclusions(updatedExclusions)\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n setErrorMessage(error_msg || '');\n setOkMessage(ok_msg || '');\n }\n })\n .then(() => fetchData())\n .catch(err => console.error(err));\n }\n }\n\n return (\n <div className=\"edit-template edit-backup-exclusions\">\n <Helmet>\n <title>{`Vesta - ${i18n.BACKUP}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Editing Backup Exclusions']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}\n </span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"edit-backup-exclusions\">\n <TextArea\n title={i18n['Web Domains']}\n defaultValue={state.data.web}\n name=\"v_web\"\n id=\"v_web\" />\n\n <TextArea\n title={i18n['Mail Domains']}\n defaultValue={state.data.mail}\n name=\"v_mail\"\n id=\"v_mail\" />\n\n <TextArea\n title={i18n['Databases']}\n defaultValue={state.data.db}\n name=\"v_db\"\n id=\"v_db\" />\n\n <TextArea\n title={i18n['User Directories']}\n defaultValue={state.data.userdir}\n name=\"v_userdir\"\n id=\"v_userdir\" />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/backup/exclusions')}>{i18n.Back}</button>\n </div>\n </form>\n }\n </AddItemLayout>\n </div>\n );\n}\n\nexport default EditBackupExclusions;\n","import { ADD_CPANEL_FOCUSED_ELEMENT, REMOVE_CPANEL_FOCUSED_ELEMENT } from './controlPanelContentTypes';\n\nexport const addControlPanelContentFocusedElement = value => {\n return {\n type: ADD_CPANEL_FOCUSED_ELEMENT,\n value\n };\n};\n\nexport const removeControlPanelContentFocusedElement = () => {\n return {\n type: REMOVE_CPANEL_FOCUSED_ELEMENT,\n value: ''\n };\n};","import React, { useState } from 'react';\nimport { useSelector } from 'react-redux';\nimport './DropdownFilter.scss';\n\nconst DropdownFilter = props => {\n const { i18n } = useSelector(state => state.session);\n\n const state = {\n usersList: [i18n.Date, i18n.Username, i18n.Disk, i18n.Bandwidth, i18n.Starred],\n webList: [i18n.Date, i18n.Domain, i18n['IP Addresses'], i18n.Disk, i18n.Bandwidth, i18n.Starred],\n dnsList: [i18n.Date, i18n.Expire, i18n.Domain, i18n['IP Addresses'], i18n.Records, i18n.Starred],\n mailList: [i18n.Date, i18n.Domain, i18n.Accounts, i18n.Disk, i18n.Starred],\n mailAccountList: [i18n.Date, i18n.Accounts, i18n.Disk, i18n.Starred],\n dbList: [i18n.Date, i18n.Database, i18n.Disk, i18n.User, i18n.Host, i18n.Starred],\n cronList: [i18n.Date, i18n.Command, i18n.Starred],\n packagesList: [i18n.Date, i18n['Package Name'], i18n.Starred],\n internetProtocolsList: [i18n.Date, i18n.IP, i18n.Netmask, i18n.Interface, i18n.Domain, i18n.Owner, i18n.Starred],\n firewallList: [i18n.Action, i18n.Protocol, i18n.Port, i18n['IP Addresses'], i18n.Comment, i18n.Starred],\n searchList: [i18n.Date, i18n.Name, i18n.Starred]\n };\n\n const changeSorting = (type, order) => {\n props.changeSorting(type, order);\n }\n\n const filterClassName = (sorting, order) => {\n if (props.sorting === sorting && props.order === order) {\n return \"dropdown-item active\";\n }\n\n return \"dropdown-item\";\n }\n\n const renderFilters = () => {\n const { list } = props;\n let activeListFilter = state[list];\n\n return activeListFilter.map((item, index) => {\n return (\n <li key={index}>\n <span className={filterClassName(item, \"descending\")} onClick={() => changeSorting(item, \"descending\")}>{item}<span className=\"arrow-down\">↓</span></span>\n <span className={filterClassName(item, \"ascending\")} onClick={() => changeSorting(item, \"ascending\")}><span>↑</span></span>\n </li>\n );\n });\n }\n\n const button = () => {\n if (props.order === \"descending\") {\n return <span className=\"arrow-down\">↓</span>;\n } else {\n return <span>↑</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} {months[month - 1]} {year}</div>;\n }\n }\n\n const toggleItem = () => {\n props.checkItem();\n }\n\n const starItem = () => {\n setState({ ...state, starred: !state.starred });\n props.toggleFav(!state.starred);\n }\n\n const className = () => {\n const { starred } = state;\n const { checked, outdated, suspended, stopped, focused, sysInfo } = props;\n let className = 'list-item';\n\n if (checked) {\n className += ' toggled';\n }\n\n if (starred) {\n className += ' starred';\n }\n\n if (outdated) {\n className += ' outdated';\n }\n\n if (suspended || stopped) {\n className += ' suspended';\n }\n\n if (focused) {\n className += ' focused';\n }\n\n if (sysInfo) {\n className += ' sys-info';\n }\n\n return className;\n }\n\n return (\n <div className={className()} id={props.id}>\n <Container className=\"l-col w-14\">\n {printDate(props.date)}\n <div className=\"text-status\">\n <div className=\"checkbox\"><input type=\"checkbox\" onChange={toggleItem} checked={props.checked} /></div>\n {props.leftNameText}\n </div>\n <div className=\"star\">\n <div className=\"checkbox\"><input type=\"checkbox\" onChange={toggleItem} checked={props.checked} /></div>\n <div onClick={starItem}><FontAwesomeIcon icon=\"star\" /></div>\n </div>\n {props.suspended && <div className='suspended'>{i18n.suspended}</div>}\n {props.stopped && <div className='stopped'>{i18n.stopped}</div>}\n </Container>\n {props.children}\n </div>\n );\n}\n\nexport default ListItem;\n","import React from 'react';\nimport ListItem from '../ControlPanel/ListItem/ListItem';\nimport Container from '../ControlPanel/Container/Container';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { Link } from 'react-router-dom';\nimport { useSelector } from 'react-redux';\nimport './InternetProtocol.scss';\n\nconst InternetProtocol = props => {\n const { data } = props;\n const { i18n } = useSelector(state => state.session);\n\n const toggleFav = (starred) => {\n if (starred) {\n props.toggleFav(data.NAME, 'add');\n } else {\n props.toggleFav(data.NAME, 'delete');\n }\n }\n\n const checkItem = () => {\n props.checkItem(data.NAME);\n }\n\n const handleDelete = () => {\n props.handleModal(data.delete_conf, `/api/v1/delete/ip/?ip=${data.NAME}`);\n }\n\n return (\n <ListItem\n id={data.NAME}\n focused={data.FOCUSED}\n checked={data.isChecked}\n date={data.DATE}\n starred={data.STARRED}\n toggleFav={toggleFav}\n checkItem={checkItem}>\n\n <Container className=\"r-col w-85\">\n <div className=\"name\">{data.NAT ? <>{data.NAT} <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> {data.NAME}</> : data.NAME}</div>\n <br />\n <div className=\"stats\">\n <Container className=\"c-1 w-35\">\n <div className=\"ip\"><span className=\"stat\">{data.NETMASK}</span></div>\n <div className=\"soa\"><span className=\"stat\">{data.INTERFACE}</span></div>\n </Container>\n <Container className=\"c-2 w-30\">\n <div>{i18n.Domains}: <span className=\"stat\">{data.U_WEB_DOMAINS}</span></div>\n <div>{i18n.Status}: <span className=\"stat\">{data.STATUS}</span></div>\n </Container>\n <Container className=\"c-3 w-35\">\n <div>{i18n.Owner}: <span className=\"stat\">{data.OWNER}</span></div>\n <div>{i18n.Users}: <span className=\"stat\">{data.U_SYS_USERS.replace(/,/g, ', ')}</span></div>\n </Container>\n </div>\n </Container>\n <div className=\"actions\">\n <div>\n <Link className=\"link-edit\" to={`/edit/ip/?ip=${data.NAME}`}>\n {i18n.edit}\n {data.FOCUSED ? <span className=\"shortcut-button html-unicode\">↩</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\">×</span>\n </button>\n </div>\n <div className=\"modal-body\">\n {text}\n </div>\n <div className=\"modal-footer\">\n {showCancelButton ? <button onClick={() => onCancel()} type=\"button\" className=\"btn btn-secondary\" data-dismiss=\"modal\">{i18n.Cancel}</button> : ''}\n {showSaveButton ? <button onClick={() => onSave()} type=\"button\" className=\"btn btn-primary\">{i18n.OK}</button> : ''}\n </div>\n </div>\n </div>\n </div>\n </div>\n )\n};\n\nexport default Modal;\n","import React, { useEffect, useState } from 'react';\nimport { addControlPanelContentFocusedElement, removeControlPanelContentFocusedElement } from '../../actions/ControlPanelContent/controlPanelContentActions';\nimport { addActiveElement, removeFocusedElement } from '../../actions/MainNavigation/mainNavigationActions';\nimport DropdownFilter from '../../components/MainNav/Toolbar/DropdownFilter/DropdownFilter';\nimport * as MainNavigation from '../../actions/MainNavigation/mainNavigationActions';\nimport { bulkAction, getIpList, handleAction } from '../../ControlPanelService/Ip';\nimport SearchInput from '../../components/MainNav/Toolbar/SearchInput/SearchInput';\nimport { addFavorite, deleteFavorite } from '../../ControlPanelService/Favorites';\nimport InternetProtocol from '../../components/InternetProtocol/InternetProtocol';\nimport LeftButton from '../../components/MainNav/Toolbar/LeftButton/LeftButton';\nimport Checkbox from '../../components/MainNav/Toolbar/Checkbox/Checkbox';\nimport Select from '../../components/MainNav/Toolbar/Select/Select';\nimport Toolbar from '../../components/MainNav/Toolbar/Toolbar';\nimport Modal from '../../components/ControlPanel/Modal/Modal';\nimport Spinner from '../../components/Spinner/Spinner';\nimport { useDispatch, useSelector } from 'react-redux';\nimport './InternetProtocols.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\n\nconst InternetProtocols = props => {\n const { i18n } = useSelector(state => state.session);\n const { controlPanelFocusedElement } = useSelector(state => state.controlPanelContent);\n const { focusedElement } = useSelector(state => state.mainNavigation);\n const dispatch = useDispatch();\n const [loading, setLoading] = useState(false);\n const [modal, setModal] = useState({\n text: '',\n visible: false,\n actionUrl: ''\n });\n const [state, setState] = useState({\n internetProtocols: [],\n ipFav: [],\n toggledAll: false,\n sorting: i18n.Date,\n order: \"descending\",\n selection: [],\n totalAmount: ''\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/ip/'));\n dispatch(removeFocusedElement());\n dispatch(removeControlPanelContentFocusedElement());\n fetchData().then(() => setLoading(false));\n\n return () => {\n dispatch(removeControlPanelContentFocusedElement());\n }\n }, []);\n\n useEffect(() => {\n window.addEventListener(\"keydown\", handleContentSelection);\n window.addEventListener(\"keydown\", handleFocusedElementShortcuts);\n\n return () => {\n window.removeEventListener(\"keydown\", handleContentSelection);\n window.removeEventListener(\"keydown\", handleFocusedElementShortcuts);\n };\n }, [controlPanelFocusedElement, focusedElement, state.internetProtocols]);\n\n const handleContentSelection = event => {\n if (event.keyCode === 38 || event.keyCode === 40) {\n if (focusedElement) {\n dispatch(MainNavigation.removeFocusedElement());\n }\n }\n\n if (event.keyCode === 38) {\n event.preventDefault();\n handleArrowUp();\n } else if (event.keyCode === 40) {\n event.preventDefault();\n handleArrowDown();\n }\n }\n\n const initFocusedElement = internetProtocols => {\n internetProtocols[0]['FOCUSED'] = internetProtocols[0]['NAME'];\n setState({ ...state, internetProtocols });\n dispatch(addControlPanelContentFocusedElement(internetProtocols[0]['NAME']));\n }\n\n const handleArrowDown = () => {\n let internetProtocols = [...state.internetProtocols];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(internetProtocols);\n return;\n }\n\n let focusedElementPosition = internetProtocols.findIndex(pack => pack.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== internetProtocols.length - 1) {\n let nextFocusedElement = internetProtocols[focusedElementPosition + 1];\n internetProtocols[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, internetProtocols });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleArrowUp = () => {\n let internetProtocols = [...state.internetProtocols];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(internetProtocols);\n return;\n }\n\n let focusedElementPosition = internetProtocols.findIndex(pack => pack.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== 0) {\n let nextFocusedElement = internetProtocols[focusedElementPosition - 1];\n internetProtocols[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, internetProtocols });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleFocusedElementShortcuts = event => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus');\n\n if (controlPanelFocusedElement && !isSearchInputFocused) {\n switch (event.keyCode) {\n case 8: return handleDelete();\n case 13: return handleEdit();\n default: break;\n }\n }\n }\n\n const handleEdit = () => {\n props.history.push(`/edit/ip/?ip=${controlPanelFocusedElement}`);\n }\n\n const handleDelete = () => {\n const { internetProtocols } = state;\n let currentInternetProtocolData = internetProtocols.filter(pack => pack.NAME === controlPanelFocusedElement)[0];\n\n displayModal(currentInternetProtocolData.delete_conf, `/api/v1/delete/ip/?ip=${controlPanelFocusedElement}`);\n }\n\n const fetchData = () => {\n setLoading(true);\n return new Promise((resolve, reject) => {\n getIpList()\n .then(result => {\n setState({\n ...state,\n internetProtocols: reformatData(result.data.data),\n ipFav: result.data.ipFav,\n selection: [],\n totalAmount: result.data.totalAmount,\n toggledAll: false\n });\n resolve();\n })\n .catch(err => console.error(err));\n });\n }\n\n const reformatData = data => {\n let internetProtocols = [];\n\n for (let i in data) {\n data[i]['NAME'] = i;\n data[i]['FOCUSED'] = controlPanelFocusedElement === i;\n internetProtocols.push(data[i]);\n }\n\n return internetProtocols;\n }\n\n const changeSorting = (sorting, order) => {\n setState({\n ...state,\n sorting,\n order\n });\n }\n\n const internetProtocols = () => {\n const { internetProtocols } = state;\n const ipFav = { ...state.ipFav };\n const result = [];\n\n internetProtocols.forEach(internetProtocol => {\n internetProtocol.FOCUSED = controlPanelFocusedElement === internetProtocol.NAME;\n\n if (ipFav[internetProtocol.NAME]) {\n internetProtocol.STARRED = ipFav[internetProtocol.NAME];\n } else {\n internetProtocol.STARRED = 0;\n }\n\n result.push(internetProtocol);\n });\n\n let sortedResult = sortArray(result);\n\n return sortedResult.map((item, index) => {\n return <InternetProtocol data={item} key={index} toggleFav={toggleFav} checkItem={checkItem} handleModal={displayModal} />;\n });\n }\n\n const checkItem = name => {\n const { selection, internetProtocols } = state;\n let duplicate = [...selection];\n let internetProtocolsDuplicate = internetProtocols;\n let checkedItem = duplicate.indexOf(name);\n\n let incomingItem = internetProtocolsDuplicate.findIndex(ip => ip.NAME === name);\n internetProtocolsDuplicate[incomingItem].isChecked = !internetProtocolsDuplicate[incomingItem].isChecked;\n\n if (checkedItem !== -1) {\n duplicate.splice(checkedItem, 1);\n } else {\n duplicate.push(name);\n }\n\n setState({ ...state, internetProtocols: internetProtocolsDuplicate, selection: duplicate });\n }\n\n const sortArray = array => {\n const { order, sorting } = state;\n let sortingColumn = sortBy(sorting);\n\n if (order === \"descending\") {\n return array.sort((a, b) => (a[sortingColumn] < b[sortingColumn]) ? 1 : ((b[sortingColumn] < a[sortingColumn]) ? -1 : 0));\n } else {\n return array.sort((a, b) => (a[sortingColumn] > b[sortingColumn]) ? 1 : ((b[sortingColumn] > a[sortingColumn]) ? -1 : 0));\n }\n }\n\n const sortBy = sorting => {\n const { Date, IP, Domains, Netmask, Interface, Owner, Starred } = i18n;\n\n switch (sorting) {\n case Date: return 'DATE';\n case IP: return 'IP';\n case Netmask: return 'NETMASK';\n case Interface: return 'INTERFACE';\n case Domains: return 'U_WEB_DOMAINS';\n case Owner: return 'OWNER';\n case Starred: return 'STARRED';\n default: break;\n }\n }\n\n const toggleFav = (value, type) => {\n const { ipFav } = state;\n let ipFavDuplicate = ipFav;\n\n if (type === 'add') {\n ipFavDuplicate[value] = 1;\n\n addFavorite(value, 'ip')\n .then(() => {\n setState({ ...state, ipFav: ipFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n } else {\n ipFavDuplicate[value] = undefined;\n\n deleteFavorite(value, 'ip')\n .then(() => {\n setState({ ...state, ipFav: ipFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n }\n }\n\n const toggleAll = toggled => {\n let internetProtocolsDuplicate = [...state.internetProtocols];\n\n if (toggled) {\n let ipNames = [];\n\n let internetProtocols = internetProtocolsDuplicate.map(internetProtocol => {\n ipNames.push(internetProtocol.NAME);\n internetProtocol.isChecked = true;\n return internetProtocol;\n });\n\n setState({ ...state, internetProtocols, selection: ipNames, toggledAll: toggled });\n } else {\n let internetProtocols = internetProtocolsDuplicate.map(internetProtocol => {\n internetProtocol.isChecked = false;\n return internetProtocol;\n });\n\n setState({ ...state, internetProtocols, selection: [], toggledAll: toggled });\n }\n }\n\n const bulk = action => {\n const { selection } = state;\n\n if (selection.length && action) {\n setLoading(true);\n bulkAction(action, selection)\n .then(result => {\n if (result.status === 200) {\n toggleAll(false);\n fetchData().then(() => refreshMenuCounters());\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const displayModal = (text, actionUrl) => {\n setModal({ ...modal, visible: true, text, actionUrl });\n }\n\n const modalConfirmHandler = () => {\n if (!modal.actionUrl) {\n return modalCancelHandler();\n }\n\n modalCancelHandler();\n setLoading(true);\n handleAction(modal.actionUrl)\n .then(res => {\n if (res.data.error) {\n setLoading(false);\n return displayModal(res.data.error, '');\n }\n fetchData().then(() => refreshMenuCounters())\n })\n .catch(err => { setLoading(false); console.error(err); });\n }\n\n const refreshMenuCounters = () => {\n dispatch(refreshCounters()).then(() => setLoading(false));\n }\n\n const modalCancelHandler = () => {\n setModal({ ...modal, visible: false, text: '', actionUrl: '' });\n }\n\n return (\n <div className=\"internetProtocols\">\n <Helmet>\n <title>{`Vesta - ${i18n.IP}`}</title>\n </Helmet>\n <Toolbar mobile={false} >\n <LeftButton name={i18n['Add IP']} href=\"/add/ip/\" showLeftMenu={true} />\n <div className=\"r-menu\">\n <div className=\"input-group input-group-sm\">\n <Checkbox toggleAll={toggleAll} toggled={state.toggledAll} />\n <Select list='internetProtocolsList' bulkAction={bulk} />\n <DropdownFilter changeSorting={changeSorting} sorting={state.sorting} order={state.order} list=\"internetProtocolsList\" />\n <SearchInput handleSearchTerm={term => props.changeSearchTerm(term)} />\n </div>\n </div>\n </Toolbar>\n <div className=\"ip-wrapper\">\n {loading\n ? <Spinner />\n : (<>\n {internetProtocols()}\n <div className=\"total\">{state.totalAmount}</div>\n </>)}\n </div>\n <Modal\n onSave={modalConfirmHandler}\n onCancel={modalCancelHandler}\n show={modal.visible}\n text={modal.text} />\n </div>\n );\n}\n\nexport default InternetProtocols;\n","import axios from \"axios\";\nimport { getAuthToken } from \"src/utils/token\";\n\nconst BASE_URL = window.location.origin;\nconst addWebUri = '/api/v1/add/web/index.php';\nconst webApiUri = '/api/v1/list/web/index.php';\nconst webStatsUri = '/api/v1/web-stats.php';\nconst domainInfoUri = '/api/v1/edit/web/index.php';\nconst generateCSRUri = '/api/v1/generate/ssl/index.php';\nconst updateDomainUri = '/api/v1/edit/web/index.php';\n\nexport const getWebList = () => {\n return axios.get(BASE_URL + webApiUri);\n}\n\nexport const bulkAction = (action, webDomains) => {\n const formData = new FormData();\n formData.append(\"action\", action);\n formData.append(\"token\", getAuthToken());\n\n webDomains.forEach(webDomain => {\n formData.append(\"domain[]\", webDomain);\n });\n\n return axios.post(BASE_URL + '/api/v1/bulk/web/', formData);\n};\n\nexport const handleAction = uri => {\n return axios.get(BASE_URL + uri, {\n params: {\n token: getAuthToken()\n }\n });\n}\n\nexport const addWeb = data => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + addWebUri, formDataObject);\n}\n\nexport const getWebDomainInfo = domain => {\n return axios.get(BASE_URL + addWebUri, {\n params: {\n token: getAuthToken()\n }\n });\n}\n\nexport const getWebStats = () => {\n return axios.get(BASE_URL + webStatsUri);\n}\n\nexport const getDomainInfo = domain => {\n return axios.get(BASE_URL + domainInfoUri, {\n params: {\n domain,\n token: getAuthToken()\n }\n });\n}\n\nexport const updateWebDomain = (data, domain) => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + updateDomainUri, formDataObject, {\n params: {\n domain,\n token: getAuthToken()\n }\n });\n}\n\nexport const getCsrInitialData = domain => {\n if (domain) {\n return axios.get(BASE_URL + generateCSRUri, {\n params: {\n domain\n }\n });\n } else {\n return axios.get(BASE_URL + generateCSRUri);\n }\n}\n\nexport const generateCSR = (data) => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + generateCSRUri, formDataObject, {\n params: {\n token: getAuthToken()\n }\n });\n}\n","import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport React, { useEffect, useState } from 'react';\nimport { useSelector } from 'react-redux';\n\nconst Password = ({ defaultValue, onChange = () => { }, id, name, title, showGenerationButton = true, ...props }) => {\n const { i18n } = useSelector(state => state.session);\n const [state, setState] = useState({\n hidePassword: false,\n generatedPassword: ''\n });\n\n useEffect(() => {\n if (defaultValue && !state.generatedPassword) {\n setState({ ...state, generatedPassword: defaultValue });\n }\n }, [defaultValue]);\n\n const hidePasswordHandler = () => {\n setState({ ...state, hidePassword: !state.hidePassword });\n }\n\n const generatePassword = () => {\n let chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz';\n let stringLength = 10;\n let result = '';\n\n for (var i = 0; i < stringLength; i++) {\n let randomNumber = Math.floor(Math.random() * chars.length);\n result += chars.substr(randomNumber, 1);\n }\n\n setState({ ...state, generatedPassword: result });\n onChange(result);\n }\n\n const passwordInputHandler = value => {\n setState({ ...state, generatedPassword: value });\n onChange(value);\n }\n\n return (\n <div className=\"form-group\">\n <label htmlFor=\"password\">\n {title ? title : i18n.Password}\n {\n showGenerationButton && (\n <> / <button type=\"button\" className=\"generate-password\" onClick={() => generatePassword()}>\n {i18n.Generate}\n </button></>\n )\n }\n </label>\n <div className=\"password-wrapper\">\n <input\n type={state.hidePassword ? 'password' : 'text'}\n className=\"form-control\"\n id={`password_${id}`}\n name={name}\n value={state.generatedPassword}\n onChange={event => passwordInputHandler(event.target.value)}\n {...props} />\n <button type=\"button\" onClick={() => hidePasswordHandler()}>\n {state.hidePassword ?\n <span className=\"eye-slash\"><FontAwesomeIcon icon=\"eye-slash\" /></span> :\n <span className=\"eye\"><FontAwesomeIcon icon=\"eye\" /></span>}\n </button>\n </div>\n </div>\n );\n}\n\nexport default Password;\n","import React, { useState } from 'react';\nimport { useSelector } from 'react-redux';\n\nimport Password from '../../../../components/ControlPanel/AddItemLayout/Form/Password/Password';\n\nimport './AdditionalFtpForEditing.scss';\n\nconst AdditionalFtpForEditing = ({ domain, data = {}, onDeleteAdditionalFtp, prefixI18N, prePath, checked, ...props }) => {\n const { i18n, userName } = useSelector(state => state.session);\n const [state, setState] = useState({\n username: data.v_ftp_user || '',\n path: data.v_ftp_path || '',\n });\n\n const renderForm = () => {\n if (data.deleted) {\n if (data.is_new === 0) {\n return (<>\n <input type=\"hidden\" name={`v_ftp_user[${data.id}][delete]`} value=\"1\" />\n <input type=\"hidden\" name={`v_ftp_user[${data.id}][is_new]`} value={data.is_new} />\n <input type=\"hidden\" name={`v_ftp_user[${data.id}][v_ftp_user]`} value={data.v_ftp_user} />\n <input type=\"hidden\" name={`v_ftp_user[${data.id}][v_ftp_password]`} value={data.v_ftp_password} />\n <input type=\"hidden\" name={`v_ftp_user[${data.id}][v_ftp_path]`} value={data.v_ftp_path} />\n <input type=\"hidden\" name={`v_ftp_user[${data.id}][v_ftp_pre_path]`} value={prePath} />\n </>);\n }\n } else {\n if (!checked) {\n return <></>;\n }\n\n return (\n <div className=\"additional-ftp\">\n <div className=\"title\">\n <input type=\"hidden\" name={`v_ftp_user[${data.id}][v_ftp_user]`} value={data.v_ftp_user} />\n <input type=\"hidden\" name={`v_ftp_user[${data.id}][delete]`} value=\"0\" />\n <input type=\"hidden\" name={`v_ftp_user[${data.id}][is_new]`} value={data.is_new} />\n\n <span className=\"data.indexed-name\">{i18n.FTP} #{data.id + 1}</span>\n <span>\n \n <button\n type=\"button\"\n onClick={() => onDeleteAdditionalFtp(data.id)}>\n ({i18n.Delete ?? 'Delete'})\n </button>\n </span>\n </div>\n\n <div className=\"form-transform\">\n <div className=\"form-group username\">\n <label htmlFor={`ftp_user_${data.id}`}>{i18n.Username}</label>\n <span className=\"prefix-note\">{prefixI18N}</span>\n <div className=\"input-wrapper\">\n <input\n defaultValue={state.username}\n onChange={event => setState({ ...state, username: event.target.value })}\n type=\"text\"\n disabled={data.v_ftp_user}\n className=\"form-control\"\n id={`ftp_user_${data.id}`}\n name={`v_ftp_user[${data.id}][v_ftp_user]`} />\n <span>{data.v_ftp_user ? data.v_ftp_user : `${userName}_${state.username}`}</span>\n </div>\n </div>\n\n <Password name={`v_ftp_user[${data.id}][v_ftp_password]`} id={data.id} />\n\n <div className=\"form-group\">\n <input type=\"hidden\" name=\"v_ftp_pre_path\" value={prePath} />\n <input type=\"hidden\" name={`v_ftp_user[${data.id}][v_ftp_path_prev]`} value={data.v_ftp_path} />\n\n <label htmlFor={`path${data.id}`}>{i18n.Path}</label>\n <input\n type=\"text\"\n value={state.path}\n onChange={event => setState({ ...state, path: event.target.value.indexOf('/') !== 0 ? `/${event.target.value}` : event.target.value })}\n className=\"form-control\"\n id={`path${data.id}`}\n name={`v_ftp_user[${data.id}][v_ftp_path]`} />\n <span className=\"path-note\">{prePath}{state.path}</span>\n </div>\n\n {\n data.is_new === 1 && (\n <div className=\"form-group\">\n <label htmlFor={`sendLoginCredentialsToEmailAddress_${data.id}`}>{i18n['Send login credentials to email address']}</label>\n <input\n type=\"email\"\n className=\"form-control\"\n id={`sendLoginCredentialsToEmailAddress_${data.id}`}\n defaultValue={data.v_ftp_email}\n name={`v_ftp_user[${data.id}][v_ftp_email]`} />\n </div>\n )\n }\n\n </div>\n </div >);\n }\n\n return <></>;\n }\n\n return renderForm();\n}\n\nexport default AdditionalFtpForEditing;\n","import React, { useEffect, useState } from 'react';\nimport { useSelector } from 'react-redux';\nimport AdditionalFtpForEditing from '../AdditionalFtpForEditing/AdditionalFtpForEditing';\nimport './AdditionalFtpWrapper.scss';\n\nconst AdditionalFtpWrapper = ({ checked, ftps, unCheckAdditionalFtpBox, prefixI18N, ftpUserPrePath, domain, ...props }) => {\n const { i18n } = useSelector(state => state.session);\n const [state, setState] = useState({\n additionalFtp: []\n });\n\n useEffect(() => {\n if (ftps) {\n const data = ftps.map((item, index) => {\n item['deleted'] = !checked;\n item['id'] = index;\n return item;\n });\n\n setState({ ...state, additionalFtp: data });\n }\n }, [checked, ftps]);\n\n const renderAdditionalFtps = () => {\n return state.additionalFtp.map(ftp => {\n return <AdditionalFtpForEditing\n key={ftp.id}\n prefixI18N={prefixI18N}\n data={ftp}\n checked={checked}\n prePath={ftpUserPrePath}\n domain={domain}\n onDeleteAdditionalFtp={id => onDeleteFtp(id)} />;\n });\n }\n\n const onDeleteFtp = index => {\n let updatedAdditionalFtps = [];\n\n state.additionalFtp.forEach(item => {\n if (item.id === index) {\n item.deleted = true;\n }\n\n updatedAdditionalFtps.push(item);\n });\n\n if (!updatedAdditionalFtps.length) {\n unCheckAdditionalFtpBox();\n }\n\n setState({ ...state, additionalFtp: updatedAdditionalFtps });\n }\n\n const addAdditionalFtp = () => {\n let additionalFtpArrayLength = state.additionalFtp.length;\n let additionalFtpsDuplicate = [...state.additionalFtp];\n\n additionalFtpsDuplicate.push({ id: additionalFtpArrayLength, deleted: false, is_new: 1 });\n\n setState({ ...state, additionalFtp: additionalFtpsDuplicate });\n }\n\n return (\n <div>\n {renderAdditionalFtps()}\n\n {checked && (\n <button type=\"button\" onClick={() => addAdditionalFtp()}>\n {i18n['Add one more FTP Account'] ?? 'Add'}\n </button>)}\n </div>\n );\n}\n\nexport default AdditionalFtpWrapper;\n","import React, { useState } from 'react';\nimport { useSelector } from 'react-redux';\nimport TextArea from 'src/components/ControlPanel/AddItemLayout/Form/TextArea/TextArea';\n\nimport './SslSupport.scss';\n\nconst SslSupport = props => {\n const { i18n } = useSelector(state => state.session);\n const [letsEncrypt, setLetsEncrypt] = useState(false);\n\n return (\n <div className=\"ssl-support\">\n <div className=\"form-group\">\n <div className=\"checkbox-wrapper\">\n <input\n type=\"checkbox\"\n name=\"v_letsencrypt\"\n id=\"lets-encrypt\"\n checked={letsEncrypt}\n onChange={() => setLetsEncrypt(!letsEncrypt)} />\n <label htmlFor=\"lets-encrypt\">{i18n['Lets Encrypt Support']}</label>\n </div>\n <span className=\"lets-encrypt-span\">{letsEncrypt ? i18n['Your certificate will be automatically issued in 5 minutes'] : null}</span>\n </div>\n\n <input type=\"hidden\" value=\"same\" name=\"v_ssl_home\" />\n\n <TextArea\n id=\"ssl-certificate\"\n name=\"v_ssl_crt\"\n title={i18n['SSL Certificate']}\n disabled={letsEncrypt}\n optionalTitle={<>/ <button type=\"button\" onClick={() => props.setModalVisible(true)} className=\"generate-csr\">{i18n['Generate CSR']}</button></>} />\n\n <div class=\"form-group\">\n <label htmlFor=\"aliases\">{i18n['SSL Key']}</label>\n <textarea class=\"form-control\" id=\"ssl_key\" rows=\"3\" name=\"v_ssl_key\" defaultValue={props.sslKey} disabled={letsEncrypt}></textarea>\n </div>\n\n <div class=\"form-group\">\n <label htmlFor=\"aliases\">{i18n['SSL Certificate Authority / Intermediate']}</label>\n <textarea class=\"form-control\" id=\"ssl_ca\" rows=\"3\" name=\"v_ssl_ca\" disabled={letsEncrypt}></textarea>\n </div>\n </div>\n );\n}\n\nexport default SslSupport;\n","import React, { useEffect, useState } from 'react';\nimport { useSelector } from 'react-redux';\nimport Password from '../../../../components/ControlPanel/AddItemLayout/Form/Password/Password';\nimport AdditionalFtpWrapper from '../AdditionalFtpWrapper/AdditionalFtpWrapper';\nimport Checkbox from 'src/components/ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport SslSupport from '../SslSupport/SslSupport';\n\nimport './AdvancedOptions.scss';\n\nconst AdvancedOptions = ({ prefixI18N, prePath, ...props }) => {\n const { i18n } = useSelector(state => state.session);\n const [state, setState] = useState({\n sslSupport: false,\n additionalFtp: false,\n statisticsAuthCheckbox: false,\n statisticsAuth: false,\n });\n\n useEffect(() => {\n let updatedDomain = `www.${props.domain}`;\n setState({ ...state, aliases: updatedDomain });\n }, [props.domain]);\n\n const renderSslSupport = () => {\n if (state.sslSupport) {\n return <SslSupport sslCertificate={props.sslCertificate} sslKey={props.sslKey} setModalVisible={bool => props.setModalVisible(bool)} />;\n }\n }\n\n const renderWebStats = () => {\n return props.webStats.map(stat => <option value={stat}>{stat}</option>);\n }\n\n const onChangeWebStatsSelect = value => {\n if (value !== 'none') {\n setState({ ...state, statisticsAuth: true });\n } else {\n setState({ ...state, statisticsAuth: false, statisticsAuthCheckbox: false });\n }\n }\n\n return (\n <div style={{ transform: 'translateX(3rem)' }}>\n <div className=\"form-group\">\n <div className=\"checkbox-wrapper\">\n <input\n type=\"checkbox\"\n name=\"v_ssl\"\n id=\"ssl-support\"\n checked={state.sslSupport}\n onChange={() => setState({ ...state, sslSupport: !state.sslSupport })} />\n <label htmlFor=\"ssl-support\">{i18n['SSL Support']}</label>\n </div>\n </div>\n\n {renderSslSupport()}\n\n <div class=\"form-group\">\n <label htmlFor=\"web-stats\">{i18n['Web Statistics']}</label>\n <select class=\"form-control\" id=\"web-stats\" name=\"v_stats\" onChange={event => onChangeWebStatsSelect(event.target.value)}>\n {renderWebStats()}\n </select>\n </div>\n\n <div className={`form-group statistics-authorization ${state.statisticsAuth ? 'show' : 'hide'}`}>\n <div className=\"checkbox-wrapper\">\n <input\n type=\"checkbox\"\n name=\"v_stats_auth\"\n id=\"stats-auth\"\n checked={state.statisticsAuthCheckbox}\n onChange={() => setState({ ...state, statisticsAuthCheckbox: !state.statisticsAuthCheckbox })} />\n <label htmlFor=\"stats-auth\">{i18n['Statistics Authorization']}</label>\n </div>\n </div>\n\n <div className={state.statisticsAuthCheckbox ? 'show web-stats-wrapper' : 'hide'}>\n <div className=\"form-group\">\n <label htmlFor=\"stats-user\">{i18n.Username}</label>\n <input type=\"text\" className=\"form-control\" id=\"stats-user\" name=\"v_stats_user\" />\n </div>\n\n <Password name='v_stats_password' />\n </div>\n\n <Checkbox\n onChange={checked => setState({ ...state, additionalFtp: checked })}\n name=\"v_ftp\"\n id=\"add-ftp\"\n checked={state.additionalFtp}\n title={i18n['Additional FTP Account']} />\n\n <AdditionalFtpWrapper\n checked={state.additionalFtp}\n prefixI18N={prefixI18N}\n ftps={[{ id: 1, deleted: false, is_new: 1 }]}\n ftpUserPrePath={prePath}\n unCheckAdditionalFtpBox={() => setState({ ...state, additionalFtp: false })} />\n </div>\n );\n}\n\nexport default AdvancedOptions;\n","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"src/actions/MainNavigation/mainNavigationActions\";\nimport TextInput from 'src/components/ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport AddItemLayout from 'src/components/ControlPanel/AddItemLayout/AddItemLayout';\nimport TextArea from 'src/components/ControlPanel/AddItemLayout/Form/TextArea/TextArea';\nimport { generateCSR, getCsrInitialData } from 'src/ControlPanelService/Web';\nimport { useDispatch, useSelector } from 'react-redux';\nimport Spinner from 'src/components/Spinner/Spinner';\nimport { useHistory } from 'react-router-dom';\nimport HtmlParser from 'react-html-parser';\n\nconst GenerateSSL = props => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n generatedData: {},\n loading: false,\n domain: ''\n });\n\n useEffect(() => {\n const { domain } = props;\n\n dispatch(addActiveElement('/list/web/'));\n dispatch(removeFocusedElement());\n\n if (domain) {\n fetchData(domain);\n } else {\n fetchData();\n }\n }, []);\n\n const fetchData = (domain = '') => {\n getCsrInitialData(domain)\n .then(response => {\n setState({\n ...state,\n domain,\n generatedData: {},\n data: response.data,\n loading: false\n });\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err);\n });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let newCsr = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n newCsr[name] = value;\n }\n\n newCsr['generate'] = 'generate';\n\n if (Object.keys(newCsr).length !== 0 && newCsr.constructor === Object) {\n setState({ ...state, loading: true });\n\n generateCSR(newCsr)\n .then(result => {\n if (result.status === 200) {\n const { error_msg: errorMessage, ok_msg: okMessage, crt, key, csr } = result.data;\n\n if (errorMessage) {\n setErrorMessage(errorMessage);\n setOkMessage('');\n setState({ ...state, generatedData: {}, loading: false });\n } else {\n setErrorMessage('');\n setOkMessage(okMessage);\n\n setState({ ...state, generatedData: { crt, key, csr }, loading: false });\n }\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n return (\n <div className=\"edit-template edit-user\">\n <AddItemLayout date={state.data.date} time={state.data.time} status={state.data.status}>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"add-user\">\n <input type=\"hidden\" name=\"token\" value={token} />\n\n {\n Object.entries(state.generatedData).length\n ? (<>\n <TextArea\n id=\"csr\"\n name=\"v_csr\"\n title={i18n['SSL CSR']}\n defaultValue={state.generatedData.csr} />\n\n <TextArea\n id=\"crt\"\n name=\"v_crt\"\n title={i18n['SSL Certificate']}\n defaultValue={state.generatedData.crt} />\n\n <TextArea\n id=\"v_key\"\n name=\"key\"\n title={i18n['SSL Key']}\n defaultValue={state.generatedData.key} />\n\n <div className=\"buttons-wrapper\">\n <button type=\"button\" className=\"add\" onClick={() => props.prePopulateInputs(state.generatedData)}>{i18n.Add}</button>\n <button type=\"button\" className=\"back\" onClick={props.closeModal}>{i18n.Back}</button>\n </div>\n </>)\n : (<>\n <TextInput id=\"domain\" name=\"v_domain\" title={i18n['Domain']} value={state.data.domain} />\n\n <TextInput id=\"email\" name=\"v_email\" title={i18n['Email']} value={state.data.email} />\n\n <TextInput id=\"country\" name=\"v_country\" title={i18n['Country']} optionalTitle={`(${i18n['2 letter code']})`} value={state.data.country} />\n\n <TextInput id=\"state\" name=\"v_state\" title={i18n['State / Province']} value={state.data.state} />\n\n <TextInput id=\"locality\" name=\"v_locality\" title={i18n['City / Locality']} value={state.data.locality} />\n\n <TextInput id=\"org\" name=\"v_org\" title={i18n['Organization']} value={state.data.org} />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Generate}</button>\n <button type=\"button\" className=\"back\" onClick={props.closeModal}>{i18n.Back}</button>\n </div>\n </>)\n }\n\n <div className=\"error\"><span className=\"error-message\">{errorMessage}</span></div>\n <div className=\"success\">\n <span className=\"ok-message\"><span>{HtmlParser(okMessage)}</span> </span>\n </div>\n </form>\n }\n </AddItemLayout>\n </div >\n );\n}\n\nexport default GenerateSSL;\n","import React, { useEffect, useState } from 'react';\n\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { addWeb, getWebDomainInfo } from '../../../ControlPanelService/Web';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport AdvancedOptions from './AdvancedOptions/AdvancedOptions';\nimport Checkbox from 'src/components/ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport TextArea from 'src/components/ControlPanel/AddItemLayout/Form/TextArea/TextArea';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport Spinner from '../../Spinner/Spinner';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './AddWebDomain.scss';\nimport GenerateSSL from 'src/containers/GenerateCSR';\nimport 'src/components/Modal/Modal.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nconst AddWebDomain = props => {\n const { i18n, userName } = useSelector(state => state.session);\n const { panel } = useSelector(state => state.panel);\n const { session } = useSelector(state => state.userSession);\n const dispatch = useDispatch();\n const token = localStorage.getItem(\"token\");\n const [modalVisible, setModalVisible] = useState(false);\n const history = useHistory();\n const [state, setState] = useState({\n loading: false,\n dnsSupport: true,\n mailSupport: true,\n proxySupport: true,\n showAdvancedOptions: false,\n okMessage: '',\n ssl_crt: '',\n ssl_key: '',\n domain: '',\n errorMessage: '',\n webStats: [],\n prefixI18N: '',\n prePath: '',\n aliases: '',\n proxy_ext: '',\n internetProtocols: []\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/web/'));\n dispatch(removeFocusedElement());\n\n setState({ ...state, loading: true });\n getWebDomainInfo()\n .then(res => {\n setState({\n ...state,\n internetProtocols: getInternetProtocolNames(res.data.ips),\n webStats: res.data.stats,\n prefixI18N: res.data.prefix,\n proxy_ext: res.data.proxy_ext,\n prePath: res.data.ftp_pre_path,\n loading: false\n });\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err);\n })\n }, []);\n\n const getInternetProtocolNames = internetProtocols => {\n let result = [];\n\n for (let i in internetProtocols) {\n result.push(i);\n }\n\n return result;\n }\n\n const renderInternetProtocolsOptions = () => {\n return state.internetProtocols.map(ip => <option value={ip}>{ip}</option>);\n }\n\n const showAdvancedOption = () => {\n setState({ ...state, showAdvancedOptions: !state.showAdvancedOptions });\n }\n\n const renderAdvancedOptions = () => {\n if (state.showAdvancedOptions) {\n return <AdvancedOptions\n prefixI18N={state.prefixI18N}\n setModalVisible={bool => setModalVisible(bool)}\n sslCertificate={state.ssl_crt}\n sslKey={state.ssl_key}\n domain={state.domain}\n webStats={state.webStats}\n prePath={state.prePath} />;\n }\n }\n\n const onBlurChangeAliases = value => {\n setState({ ...state, aliases: `www.${value}`});\n }\n\n const checkboxHandler = (input, checked) => {\n setState({ ...state, [input]: checked });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let newWebDomain = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n newWebDomain[name] = value;\n }\n\n if (Object.keys(newWebDomain).length !== 0 && newWebDomain.constructor === Object) {\n setState({ loading: true });\n addWeb(newWebDomain)\n .then(result => {\n if (result.status === 200) {\n const { error_msg: errorMessage, ok_msg: okMessage } = result.data;\n\n if (errorMessage) {\n setState({ ...state, errorMessage, okMessage, loading: false });\n } else {\n dispatch(refreshCounters()).then(() => {\n setState({ ...state, okMessage, errorMessage: '', loading: false });\n });\n }\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n return (\n <div className=\"edit-template add-web\">\n <Helmet>\n <title>{`Vesta - ${i18n.WEB}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Adding Domain']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {state.errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n {state.errorMessage}</span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {state.okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n <span>{HtmlParser(state.okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> : (\n <form onSubmit={event => submitFormHandler(event)}>\n <input type=\"hidden\" name=\"ok\" value=\"add\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <div className=\"form-group\">\n <label htmlFor=\"domain\">{i18n.Domain}</label>\n <input\n type=\"text\"\n className=\"form-control\"\n id=\"domain\"\n required\n name=\"v_domain\"\n onBlur={event => onBlurChangeAliases(event.target.value)} />\n </div>\n\n <div class=\"form-group\">\n <label htmlFor=\"package\">{i18n['IP Address']}</label>\n <select class=\"form-control\" id=\"ip\" name=\"v_ip\">\n {renderInternetProtocolsOptions()}\n </select>\n </div>\n\n <div class=\"form-group\">\n <label htmlFor=\"aliases\">{i18n.Aliases}</label>\n <textarea\n class=\"form-control\"\n id=\"aliases\"\n rows=\"3\"\n name=\"v_aliases\"\n defaultValue={state.aliases}\n ></textarea>\n </div>\n\n {\n panel[userName]['DNS_DOMAINS'] !== '0' && (\n <Checkbox\n onChange={checked => checkboxHandler('dnsSupport', checked)}\n name=\"v_dns\"\n id=\"dns-support\"\n title={i18n['DNS Support'] ?? 'DNS Support'}\n defaultChecked={state.dnsSupport} />\n )\n }\n\n {\n panel[userName]['MAIL_DOMAINS'] !== '0' && (\n <Checkbox\n onChange={checked => checkboxHandler('mailSupport', checked)}\n name=\"v_mail\"\n id=\"mail-support\"\n title={i18n['Mail Support'] ?? 'Mail Support'}\n defaultChecked={state.mailSupport} />\n )\n }\n\n {\n session.PROXY_SYSTEM && (\n <>\n <Checkbox\n onChange={checked => checkboxHandler('proxySupport', checked)}\n name=\"v_proxy\"\n id=\"proxy\"\n title={i18n['Proxy Support'] ?? 'Proxy Support'}\n defaultChecked={state.proxySupport} />\n\n {\n state.proxySupport && (<div style={{ transform: 'translateX(3rem)' }}>\n <TextArea\n id=\"proxy-extensions\"\n name=\"v_proxy_ext\"\n title={i18n['Proxy Extensions']}\n defaultValue={state.proxy_ext} />\n </div>)\n }\n </>\n )\n }\n\n <div className=\"form-group advanced-options-button\">\n <button type=\"button\" onClick={() => showAdvancedOption()}>\n {i18n['Advanced options']}\n {state.showAdvancedOptions ? <FontAwesomeIcon icon=\"caret-down\" /> : <FontAwesomeIcon icon=\"caret-up\" />}\n </button>\n </div>\n\n {renderAdvancedOptions()}\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Add}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/web/')}>{i18n.Back}</button>\n </div>\n </form>\n )}\n </AddItemLayout>\n <div className={`modal fade ${modalVisible ? 'show' : ''}`} id=\"c-panel-modal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"exampleModalLabel\" aria-hidden=\"true\" style={{ display: modalVisible ? 'block' : 'none' }}>\n <div className=\"modal-dialog\" role=\"document\">\n <div className=\"modal-content\">\n <div className=\"modal-header\">\n <h5>{i18n['Generating CSR']}</h5>\n <button type=\"button\" onClick={() => setModalVisible(false)} className=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n <span aria-hidden=\"true\">×</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 'utf8mb4',\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}\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\">←</span>\n <span className=\"description\">{i18n['Move backward through top menu']}</span>\n </li>\n <li>\n <span className=\"name\">→</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\">↑</span>\n <span className=\"description\">{i18n['Move up through elements list']}</span>\n </li>\n <li>\n <span className=\"name\">↓</span>\n <span className=\"description\">{i18n['Move down through elements list']}</span>\n </li>\n </ul>\n </div>\n </div>\n );\n}\n\nexport default Hotkeys;","import React, { memo, useEffect, useState } from 'react';\n\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport { dbCharsets, addDatabase, getDbOptionalInfo } from '../../../ControlPanelService/Db';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport Password from '../../ControlPanel/AddItemLayout/Form/Password/Password';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport Spinner from '../../Spinner/Spinner';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\nimport './AddDatabase.scss'\n\nconst AddDatabase = memo(props => {\n const { i18n } = useSelector(state => state.session);\n const token = localStorage.getItem(\"token\");\n const dispatch = useDispatch();\n const history = useHistory();\n const [state, setState] = useState({\n loading: false,\n okMessage: '',\n errorMessage: '',\n dbTypes: [],\n dbHosts: [],\n dbCharsets: [],\n user: '',\n maxCharLength: '',\n databaseInputValue: '',\n databaseUserInputValue: '',\n prefixI18N: ''\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/db/'));\n dispatch(removeFocusedElement());\n\n setState({ ...state, loading: true });\n\n getDbOptionalInfo()\n .then(result => {\n if (result.status === 200) {\n setState({\n ...state,\n dbCharsets,\n user: result.data.user,\n dbTypes: result.data.dbTypes,\n prefixI18N: result.data.prefixI18N,\n maxCharLength: result.data.maxCharLength,\n dbHosts: result.data.dbHosts,\n loading: false\n });\n }\n })\n .catch(err => console.err(err));\n }, []);\n\n const renderDatabaseTypesOptions = () => {\n return state.dbTypes.map((dbType, index) => <option key={index} value={dbType}>{dbType}</option>)\n }\n\n const renderDatabaseHostsOptions = () => {\n return state.dbHosts.map((dbHost, index) => <option key={index} value={dbHost}>{dbHost}</option>)\n }\n\n const renderDatabaseCharsetOptions = () => {\n return state.dbCharsets.map((dbCharset, index) =>\n <option\n key={index}\n value={dbCharset}\n selected={dbCharset === 'utf8'}>\n {dbCharset}\n </option>\n );\n }\n\n const databaseUserInputHandler = value => {\n setState({ ...state, databaseUserInputValue: value });\n }\n\n const databaseInputHandler = value => {\n setState({ ...state, databaseInputValue: value });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let newDatabase = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n newDatabase[name] = value;\n }\n\n newDatabase['v_database'] = state.databaseInputValue;\n newDatabase['v_dbuser'] = state.databaseUserInputValue;\n\n if (Object.keys(newDatabase).length !== 0 && newDatabase.constructor === Object) {\n setState({ ...state, loading: true });\n addDatabase(newDatabase)\n .then(result => {\n if (result.status === 200) {\n const { error_msg: errorMessage, ok_msg: okMessage } = result.data;\n\n if (errorMessage) {\n setState({ ...state, errorMessage, okMessage: '', loading: false });\n } else {\n dispatch(refreshCounters()).then(() => {\n setState({ ...state, okMessage, errorMessage: '', loading: false });\n });\n }\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n return (\n <div className=\"edit-template add-db\">\n <Helmet>\n <title>{`Vesta - ${i18n.DB}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Adding database']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {state.errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n {state.errorMessage}</span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {state.okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n <span>{HtmlParser(state.okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> : (\n <form onSubmit={event => submitFormHandler(event)}>\n <input type=\"hidden\" name=\"ok\" value=\"add\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <span className=\"prefix\">{HtmlParser(state.prefixI18N)}</span>\n\n <div className=\"form-group database\">\n <label htmlFor=\"database\">{i18n.Database}</label>\n <div className=\"input-wrapper\">\n <input\n type=\"text\"\n className=\"form-control\"\n id=\"database\"\n onChange={event => databaseInputHandler(event.target.value)}\n value={state.databaseInputValue}\n name=\"v_database\" />\n <span className=\"italic\">{`${state.user}_${state.databaseInputValue}`}</span>\n </div>\n </div>\n\n <div className=\"form-group\">\n <div className=\"label-wrapper\">\n <label htmlFor=\"user\">{i18n.User}</label>\n <span className=\"italic\">({state.maxCharLength})</span>\n </div>\n <div className=\"input-wrapper\">\n <input\n type=\"text\"\n className=\"form-control\"\n id=\"user\"\n value={state.databaseUserInputValue}\n onChange={event => databaseUserInputHandler(event.target.value)}\n name=\"v_dbuser\" />\n <span className=\"italic\">{`${state.user}_${state.databaseUserInputValue}`}</span>\n </div>\n </div>\n\n <Password name={'v_password'} />\n\n <div class=\"form-group\">\n <label htmlFor=\"dbTypes\">{i18n.Type}</label>\n <select class=\"form-control\" id=\"dbTypes\" name=\"v_type\">\n {renderDatabaseTypesOptions()}\n </select>\n </div>\n\n <div class=\"form-group\">\n <label htmlFor=\"dbHosts\">{i18n.Host}</label>\n <select class=\"form-control\" id=\"dbHosts\" name=\"v_host\">\n {renderDatabaseHostsOptions()}\n </select>\n </div>\n\n <div class=\"form-group\">\n <label htmlFor=\"dbCharset\">{i18n.Charset}</label>\n <select class=\"form-control\" id=\"dbCharset\" name=\"v_charset\">\n {renderDatabaseCharsetOptions()}\n </select>\n </div>\n\n <div className=\"form-group\">\n <label htmlFor=\"sendLoginCredentialsToEmailAddress\">{i18n['Send login credentials to email address']}</label>\n <input\n type=\"email\"\n className=\"form-control\"\n id=\"sendLoginCredentialsToEmailAddress\"\n name=\"v_db_email\" />\n </div>\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Add}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/db/')}>{i18n.Back}</button>\n </div>\n </form>\n )}\n </AddItemLayout>\n </div>\n );\n});\n\nexport default AddDatabase;\n","import React, { useEffect, useState } from 'react';\n\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport SelectInput from '../../ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport TextInput from '../../ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { addFirewall } from '../../../ControlPanelService/Firewalls';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './AddFirewall.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nconst AddFirewall = props => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const dispatch = useDispatch();\n const history = useHistory();\n const [state, setState] = useState({\n loading: false,\n actions: [\n 'DROP',\n 'ACCEPT'\n ],\n protocols: [\n 'TCP',\n 'UDP',\n 'ICMP'\n ],\n okMessage: '',\n errorMessage: ''\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/firewall/'));\n dispatch(removeFocusedElement());\n }, []);\n\n const submitFormHandler = event => {\n event.preventDefault();\n let newFirewall = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n newFirewall[name] = value;\n }\n\n if (Object.keys(newFirewall).length !== 0 && newFirewall.constructor === Object) {\n setState({ ...state, loading: true });\n addFirewall(newFirewall)\n .then(result => {\n if (result.status === 200) {\n const { error_msg: errorMessage, ok_msg: okMessage } = result.data;\n\n if (errorMessage) {\n setState({ ...state, errorMessage, okMessage, loading: false });\n } else {\n dispatch(refreshCounters()).then(() => {\n setState({ ...state, okMessage, errorMessage: '', loading: false });\n });\n }\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n return (\n <div className=\"edit-template add-firewall\">\n <Helmet>\n <title>{`Vesta - ${i18n.FIREWALL}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Adding Firewall Rule']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {state.errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n {state.errorMessage}</span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {state.okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n <span>{HtmlParser(state.okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n <form onSubmit={event => submitFormHandler(event)}>\n <input type=\"hidden\" name=\"ok\" value=\"add\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <SelectInput\n options={state.actions}\n name=\"v_action\"\n id=\"action\"\n title={i18n['Action']} />\n\n <SelectInput\n options={state.protocols}\n name=\"v_protocol\"\n id=\"protocol\"\n title={i18n['Protocol']} />\n\n <TextInput\n name=\"v_port\"\n id=\"port\"\n title={i18n['Port']}\n optionalTitle={i18n['ranges are acceptable']} />\n\n <TextInput\n name=\"v_ip\"\n id=\"ip\"\n title={i18n['IP address']}\n optionalTitle={i18n['CIDR format is supported']} />\n\n <TextInput\n name=\"v_comment\"\n id=\"comment\"\n title={i18n['Comment']}\n optionalTitle={i18n['optional']} />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Add}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/firewall/')}>{i18n.Back}</button>\n </div>\n </form>\n </AddItemLayout>\n </div>\n );\n}\n\nexport default AddFirewall;","import axios from \"axios\";\nimport { getAuthToken } from \"src/utils/token\";\n\nconst BASE_URL = window.location.origin;\nconst webApiUri = '/api/v1/list/cron/index.php';\nconst cronAddApiUri = '/api/v1/add/cron/index.php';\nconst jobInfoUri = '/api/v1/edit/cron/index.php';\nconst updateCronJobUri = '/api/v1/edit/cron/index.php';\n\nexport const getCronList = () => {\n return axios.get(BASE_URL + webApiUri);\n}\n\nexport const bulkAction = (action, domainNameSystems) => {\n const formData = new FormData();\n formData.append(\"action\", action);\n formData.append(\"token\", getAuthToken());\n\n domainNameSystems.forEach(domainNameSystem => {\n formData.append(\"job[]\", domainNameSystem);\n });\n\n return axios.post(BASE_URL + '/api/v1/bulk/cron/', formData);\n};\n\nexport const handleAction = uri => {\n return axios.get(BASE_URL + uri, {\n params: {\n token: getAuthToken()\n }\n });\n}\n\nexport const addCronJob = data => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + cronAddApiUri, formDataObject);\n}\n\nexport const getCronJobInfo = job => {\n return axios.get(BASE_URL + jobInfoUri, {\n params: {\n job,\n token: getAuthToken()\n }\n });\n}\n\nexport const updateCronJob = (data, job) => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + updateCronJobUri, formDataObject, {\n params: {\n job,\n token: getAuthToken()\n }\n });\n}","export const generatorOptions = i18n => {\n return {\n minutesRunCommandsOptions: [\n { name: i18n['every minute'] ?? 'every minute', value: '*' },\n { name: i18n['every two minutes'] ?? 'every two minutes', value: '*/2' },\n { name: `${i18n.every || 'every'} 5`, value: '*/5' },\n { name: `${i18n.every || 'every'} 10`, value: '*/10' },\n { name: `${i18n.every || 'every'} 15`, value: '*/15' },\n { name: `${i18n.every || 'every'} 30`, value: '*/30' }\n ],\n hoursRunCommandsOptions: [\n { name: i18n['every hour'] ?? 'every hour', value: '*' },\n { name: i18n['every two hours'] ?? 'every two hours', value: '*/2' },\n { name: `${i18n.every || 'every'} 6`, value: '*/6' },\n { name: `${i18n.every || 'every'} 12`, value: '*/12' }\n ],\n daysRunCommandsOptions: [\n { name: i18n['every day'] ?? 'every day', value: '*' },\n { name: i18n['every odd day'] ?? 'every odd day', value: '1-31/2' },\n { name: i18n['every even day'] ?? 'every even day', value: '*/2' },\n { name: `${i18n.every || 'every'} 3`, value: '*/3' },\n { name: `${i18n.every || 'every'} 5`, value: '*/5' },\n { name: `${i18n.every || 'every'} 10`, value: '*/10' },\n { name: `${i18n.every || 'every'} 15`, value: '*/15' }\n ],\n hoursOptions: [\n { name: '00', value: '0' },\n { name: '01', value: '1' },\n { name: '02', value: '2' },\n { name: '03', value: '3' },\n { name: '04', value: '4' },\n { name: '05', value: '5' },\n { name: '06', value: '6' },\n { name: '07', value: '7' },\n { name: '08', value: '8' },\n { name: '09', value: '9' },\n { name: '10', value: '10' },\n { name: '11', value: '11' },\n { name: '12', value: '12' },\n { name: '13', value: '13' },\n { name: '14', value: '14' },\n { name: '15', value: '15' },\n { name: '16', value: '16' },\n { name: '17', value: '17' },\n { name: '18', value: '18' },\n { name: '19', value: '19' },\n { name: '20', value: '20' },\n { name: '21', value: '21' },\n { name: '22', value: '22' },\n { name: '23', value: '23' }\n ],\n hourlyMinutesOptions: [\n { name: '00', value: '0' },\n { name: '15', value: '15' },\n { name: '30', value: '30' },\n { name: '45', value: '45' }\n ],\n dailyMinutesOptions: [\n { name: '00', value: '0' },\n { name: '01', value: '1' },\n { name: '02', value: '2' },\n { name: '05', value: '5' },\n { name: '10', value: '10' },\n { name: '15', value: '15' },\n { name: '20', value: '20' },\n { name: '25', value: '25' },\n { name: '30', value: '30' },\n { name: '35', value: '35' },\n { name: '40', value: '40' },\n { name: '45', value: '45' },\n { name: '50', value: '50' },\n { name: '55', value: '55' }\n ],\n weeklyRunCommandOptions: [\n { name: i18n['every day'] ?? 'every day', value: '*' },\n { name: i18n['weekdays (5 days)'] ?? 'weekdays (5 days)', value: '1,2,3,4,5' },\n { name: i18n['weekend (2 days)'] ?? 'weekend (2 days)', value: '0,6' },\n { name: i18n.Monday ?? 'Monday', value: '1' },\n { name: i18n.Tuesday ?? 'Tuesday', value: '2' },\n { name: i18n.Wednesday ?? 'Wednesday', value: '3' },\n { name: i18n.Thursday ?? 'Thursday', value: '4' },\n { name: i18n.Friday ?? 'Friday', value: '5' },\n { name: i18n.Saturday ?? 'Saturday', value: '6' },\n { name: i18n.Sunday ?? 'Sunday', value: '0' }\n ],\n monthlyRunCommandOptions: [\n { name: i18n['every month'] ?? 'every month', value: '*' },\n { name: i18n['every odd month'] ?? 'every odd month', value: '1-11/2' },\n { name: i18n['every even month'] ?? 'every even month', value: '*/2' },\n { name: `${i18n.every || 'every'} 3`, value: '*/3' },\n { name: `${i18n.every || 'every'} 6`, value: '*/6' },\n { name: i18n.Jan ?? 'Jan', value: '1' },\n { name: i18n.Feb ?? 'Feb', value: '2' },\n { name: i18n.Mar ?? 'Mar', value: '3' },\n { name: i18n.Apr ?? 'Apr', value: '4' },\n { name: i18n.May ?? 'May', value: '5' },\n { name: i18n.Jun ?? 'Jun', value: '6' },\n { name: i18n.Jul ?? 'Jul', value: '7' },\n { name: i18n.Aug ?? 'Aug', value: '8' },\n { name: i18n.Sep ?? 'Sep', value: '9' },\n { name: i18n.Oct ?? 'Oct', value: '10' },\n { name: i18n.Nov ?? 'Nov', value: '11' },\n { name: i18n.Dec ?? 'Dec', value: '12' }\n ],\n dateOptions: [\n { name: '1', value: '1' },\n { name: '2', value: '2' },\n { name: '3', value: '3' },\n { name: '4', value: '4' },\n { name: '5', value: '5' },\n { name: '6', value: '6' },\n { name: '7', value: '7' },\n { name: '8', value: '8' },\n { name: '9', value: '9' },\n { name: '10', value: '10' },\n { name: '11', value: '11' },\n { name: '12', value: '12' },\n { name: '13', value: '13' },\n { name: '14', value: '14' },\n { name: '15', value: '15' },\n { name: '16', value: '16' },\n { name: '17', value: '17' },\n { name: '18', value: '18' },\n { name: '19', value: '19' },\n { name: '20', value: '20' },\n { name: '21', value: '21' },\n { name: '22', value: '22' },\n { name: '23', value: '23' },\n { name: '24', value: '24' },\n { name: '25', value: '25' },\n { name: '26', value: '26' },\n { name: '27', value: '27' },\n { name: '28', value: '28' },\n { name: '29', value: '29' },\n { name: '30', value: '30' },\n { name: '31', value: '31' }\n ]\n }\n}\n","import React, { useEffect, useState } from 'react';\nimport { useSelector } from 'react-redux';\nimport { generatorOptions } from '../../../../ControlPanelService/GeneratorOptions';\n\nconst RunCommandSelect = props => {\n const { i18n } = useSelector(state => state.session);\n\n const [state, setState] = useState({\n activeTab: ''\n });\n\n useEffect(() => {\n setState({ ...state, activeTab: props.activeTab });\n }, [props]);\n\n const renderOptions = () => {\n const { daysRunCommandsOptions, hoursRunCommandsOptions, minutesRunCommandsOptions, monthlyRunCommandOptions, weeklyRunCommandOptions } = generatorOptions(i18n);\n\n switch (state.activeTab) {\n case '1': return minutesRunCommandsOptions.map(option => <option value={option.value}>{option.name}</option>);\n case '2': return hoursRunCommandsOptions.map(option => <option value={option.value}>{option.name}</option>);\n case '3': return daysRunCommandsOptions.map(option => <option value={option.value}>{option.name}</option>);\n case '4': return weeklyRunCommandOptions.map(option => <option value={option.value}>{option.name}</option>);\n case '5': return monthlyRunCommandOptions.map(option => <option value={option.value}>{option.name}</option>);\n default: break;\n }\n }\n\n const selectName = () => {\n switch (state.activeTab) {\n case '1': return 'h_min';\n case '2': return 'h_hour';\n case '3': return 'h_day';\n case '4': return 'h_wday';\n case '5': return 'h_month';\n default: break;\n }\n }\n\n return (\n <div class=\"form-group run-command\">\n <label htmlFor=\"run-command\">{i18n['Run Command']}:</label>\n <select className=\"form-control\" name={selectName()}>\n {renderOptions()}\n </select>\n </div >\n );\n}\n\nexport default RunCommandSelect;","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport { generatorOptions } from '../../../../ControlPanelService/GeneratorOptions';\n\nexport default function SecondTabSelects() {\n const { i18n } = useSelector(state => state.session);\n const { hourlyMinutesOptions } = generatorOptions(i18n);\n\n const renderOptions = () => {\n return hourlyMinutesOptions.map((option, index) => <option key={index} value={option.value}>{option.name}</option>);\n }\n\n return (\n <div className='second-tab-selects'>\n <input type=\"hidden\" name=\"h_day\" value=\"*\" />\n <input type=\"hidden\" name=\"h_month\" value=\"*\" />\n <input type=\"hidden\" name=\"h_wday\" value=\"*\" />\n\n <div className=\"form-group minute\">\n <label htmlFor=\"run-command\">{i18n.Minute ?? 'Minute'}:</label>\n <select className=\"form-control\" name=\"h_min\">\n {renderOptions()}\n </select>\n </div>\n </div>\n );\n}","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport { generatorOptions } from '../../../../ControlPanelService/GeneratorOptions';\n\nexport default function ThirdTabSelects() {\n const { i18n } = useSelector(state => state.session);\n const { dailyMinutesOptions, hoursOptions } = generatorOptions(i18n);\n\n const renderHours = () => {\n return hoursOptions.map((option, index) => <option key={index} value={option.value}>{option.name}</option>);\n }\n\n const renderOptions = () => {\n return dailyMinutesOptions.map((option, index) => <option key={index} value={option.value}>{option.name}</option>);\n }\n\n return (\n <div className='third-tab-selects'>\n <input type=\"hidden\" name=\"h_month\" value=\"*\" />\n <input type=\"hidden\" name=\"h_wday\" value=\"*\" />\n\n <div className=\"form-group hour\">\n <label htmlFor=\"run-command\">{i18n.Hour ?? 'Hour'}:</label>\n <select className=\"form-control\" name=\"h_hour\">\n {renderHours()}\n </select>\n </div>\n\n <div className=\"form-group minute\">\n <label htmlFor=\"run-command\">{i18n.Minute ?? 'Minute'}:</label>\n <select className=\"form-control\" name=\"h_min\">\n {renderOptions()}\n </select>\n </div>\n </div>\n );\n}","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport { generatorOptions } from '../../../../ControlPanelService/GeneratorOptions';\n\nexport default function FourthTabSelects() {\n const { i18n } = useSelector(state => state.session);\n const { dailyMinutesOptions, hoursOptions } = generatorOptions(i18n);\n\n const renderHours = () => {\n return hoursOptions.map((option, index) => <option key={index} value={option.value}>{option.name}</option>);\n }\n\n const renderMinutes = () => {\n return dailyMinutesOptions.map((option, index) => <option key={index} value={option.value}>{option.name}</option>);\n }\n\n return (\n <div className='fourth-tab-selects'>\n <input type=\"hidden\" name=\"h_month\" value=\"*\" />\n <input type=\"hidden\" name=\"h_day\" value=\"*\" />\n\n <div className=\"form-group hour\">\n <label htmlFor=\"run-command\">{i18n.Hour ?? 'Hour'}:</label>\n <select className=\"form-control\" name=\"h_hour\">\n {renderHours()}\n </select>\n </div>\n\n <div className=\"form-group minute\">\n <label htmlFor=\"run-command\">{i18n.Minute ?? 'Minute'}:</label>\n <select className=\"form-control\" name=\"h_min\">\n {renderMinutes()}\n </select>\n </div>\n </div>\n );\n}","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport { generatorOptions } from '../../../../ControlPanelService/GeneratorOptions';\n\nexport default function FifthTabSelects() {\n const { i18n } = useSelector(state => state.session);\n const { dailyMinutesOptions, hoursOptions, dateOptions } = generatorOptions(i18n);\n\n const renderDate = () => {\n return dateOptions.map((option, index) => <option key={index} value={option.value}>{option.name}</option>);\n }\n\n const renderHours = () => {\n return hoursOptions.map((option, index) => <option key={index} value={option.value}>{option.name}</option>);\n }\n\n const renderMinutes = () => {\n return dailyMinutesOptions.map((option, index) => <option key={index} value={option.value}>{option.name}</option>);\n }\n\n return (\n <div className='fifth-tab-selects'>\n <input type=\"hidden\" name=\"h_wday\" value=\"*\" />\n\n <div className=\"form-group date\">\n <label htmlFor=\"run-command\">{i18n.Date ?? 'Date'}:</label>\n <select className=\"form-control\" name=\"h_day\">\n {renderDate()}\n </select>\n </div>\n\n <div className=\"form-group hour\">\n <label htmlFor=\"run-command\">{i18n.Hour ?? 'Hour'}:</label>\n <select className=\"form-control\" name=\"h_hour\">\n {renderHours()}\n </select>\n </div>\n\n <div className=\"form-group minute\">\n <label htmlFor=\"run-command\">{i18n.Minute ?? 'Minute'}:</label>\n <select className=\"form-control\" name=\"h_min\">\n {renderMinutes()}\n </select>\n </div>\n </div>\n );\n}","import React, { useEffect, useState } from 'react';\n\nimport SecondTabSelects from './SecondTabSelects';\nimport ThirdTabSelects from './ThirdTabSelects';\nimport FourthTabSelects from './FourthTabSelects';\nimport FifthTabSelects from './FifthTabSelects';\n\nimport './SelectsWrapper.scss';\n\nconst OtherSelects = props => {\n const [state, setState] = useState({\n activeTab: ''\n });\n\n useEffect(() => {\n setState({ ...state, activeTab: props.activeTab });\n }, [props.activeTab]);\n\n const renderSelects = () => {\n switch (state.activeTab) {\n case '1': return (\n <div>\n <input type=\"hidden\" name=\"h_hour\" value=\"*\" />\n <input type=\"hidden\" name=\"h_day\" value=\"*\" />\n <input type=\"hidden\" name=\"h_month\" value=\"*\" />\n <input type=\"hidden\" name=\"h_wday\" value=\"*\" />\n </div>\n )\n case '2': return <SecondTabSelects />;\n case '3': return <ThirdTabSelects />;\n case '4': return <FourthTabSelects />;\n case '5': return <FifthTabSelects />;\n default: break;\n }\n }\n\n return (\n <div className={`tab-${state.activeTab}`}>\n {renderSelects()}\n </div>\n );\n}\n\nexport default OtherSelects;\n","import React, { useEffect, useRef, useState } from 'react';\n\nimport RunCommandSelect from './RunCommandSelect/RunCommandSelect';\nimport SelectsWrapper from './OtherSelects/SelectsWrapper';\nimport { Link, useHistory } from 'react-router-dom';\nimport QS from 'qs';\n\nimport './Generator.scss';\nimport { useSelector } from 'react-redux';\n\nconst Generator = props => {\n const formElement = useRef(null);\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const [state, setState] = useState({\n activeTab: '1'\n });\n\n useEffect(() => {\n let parsedQuery = QS.parse(history.location.search, { ignoreQueryPrefix: true });\n let activeTab = parsedQuery.activeTab || '1';\n\n setState({ ...state, activeTab });\n }, [history.location.search]);\n\n const activeClassName = tab => {\n return state.activeTab === tab ? 'active' : '';\n }\n\n const emulateFormSubmit = () => {\n let generatedCronJob = {};\n\n for (let i = 0; i <= 4; i++) {\n let iterableFormElement = formElement.current[i];\n\n generatedCronJob[iterableFormElement.name] = iterableFormElement.value;\n }\n\n props.generatedCronJob(generatedCronJob);\n }\n\n const formatLink = tab => {\n const { job, mode } = props;\n\n return `/${mode}/cron/?${!!job ? `job=${job}&` : ''}activeTab=${tab}`;\n }\n\n return (\n <div className=\"cron-job-generator\">\n <div className=\"header\">\n <Link to={formatLink('1')} className={activeClassName('1')}>{i18n.Minutes}</Link>\n <Link to={formatLink('2')} className={activeClassName('2')}>{i18n.Hourly}</Link>\n <Link to={formatLink('3')} className={activeClassName('3')}>{i18n.Daily}</Link>\n <Link to={formatLink('4')} className={activeClassName('4')}>{i18n.Weekly}</Link>\n <Link to={formatLink('5')} className={activeClassName('5')}>{i18n.Monthly}</Link>\n </div>\n\n <div className=\"body\">\n\n <form ref={formElement}>\n <RunCommandSelect activeTab={state.activeTab} />\n\n <SelectsWrapper activeTab={state.activeTab} />\n\n <div className=\"form-actions\">\n <button type=\"button\" onClick={emulateFormSubmit}>{i18n.Generate}</button>\n </div>\n </form>\n\n </div>\n </div>\n );\n}\n\nexport default Generator;","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport TextInput from '../../ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport { getCronJobInfo, updateCronJob } from '../../../ControlPanelService/Cron';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from '../../../components/Spinner/Spinner';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport Generator from '../Generator/Generator';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\nimport QS from 'qs';\n\nimport './EditCronJob.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nconst EditMail = props => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n loading: false,\n generatedCronJob: {\n h_min: '*',\n h_hour: '*',\n h_day: '*',\n h_wday: '*',\n h_month: '*'\n }\n });\n\n useEffect(() => {\n let queryParams = QS.parse(history.location.search, { ignoreQueryPrefix: true });\n const { job } = queryParams;\n\n dispatch(addActiveElement('/list/cron/'));\n dispatch(removeFocusedElement());\n\n if (job) {\n setState({ ...state, loading: true });\n fetchData(job)\n }\n }, []);\n\n const fetchData = job => {\n getCronJobInfo(job)\n .then(response => {\n setState({\n ...state,\n generatedCronJob: {\n ...state.generatedCronJob,\n h_min: response.data.min,\n h_hour: response.data.hour,\n h_day: response.data.day,\n h_wday: response.data.wday,\n h_month: response.data.month\n },\n data: response.data,\n loading: false\n });\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err);\n });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedJob = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedJob[name] = value;\n }\n\n if (Object.keys(updatedJob).length !== 0 && updatedJob.constructor === Object) {\n setState({ ...state, loading: true });\n\n updateCronJob(updatedJob, state.data.job)\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n if (error_msg) {\n setOkMessage('');\n setErrorMessage(error_msg);\n } else {\n dispatch(refreshCounters()).then(() => {\n setOkMessage(ok_msg);\n setErrorMessage('');\n });\n }\n }\n })\n .then(() => fetchData(state.data.job))\n .catch(err => console.error(err));\n }\n }\n\n const saveGeneratedCronJob = generatedCronJob => {\n setState({\n ...state,\n generatedCronJob\n });\n }\n\n const changeInput = input => {\n let updatedGeneratedCronJob = {\n ...state.generatedCronJob,\n [input.id]: input.value\n };\n\n setState({\n ...state,\n generatedCronJob: updatedGeneratedCronJob\n });\n }\n\n return (\n <div className=\"edit-template edit-cron\">\n <Helmet>\n <title>{`Vesta - ${i18n.CRON}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Editing Cron Job']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}\n </span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout date={state.data.date} time={state.data.time} status={state.data.status}>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"edit-cron\">\n <input type=\"hidden\" name=\"save\" value=\"save\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <TextInput id=\"command\" name=\"v_cmd\" title={i18n['Command']} value={state.data.cmd} />\n\n <div className=\"cron-form-body\">\n\n <div className=\"body-col-1\">\n <TextInput\n value={state.generatedCronJob.h_min}\n onChange={changeInput}\n title={i18n['Minute']}\n name=\"v_min\"\n id=\"h_min\" />\n\n <TextInput\n value={state.generatedCronJob.h_hour}\n onChange={changeInput}\n title={i18n['Hour']}\n name=\"v_hour\"\n id=\"h_hour\" />\n\n <TextInput\n value={state.generatedCronJob.h_day}\n onChange={changeInput}\n title={i18n['Day']}\n name=\"v_day\"\n id=\"h_day\" />\n\n <TextInput\n value={state.generatedCronJob.h_month}\n onChange={changeInput}\n title={i18n['Month']}\n name=\"v_month\"\n id=\"h_month\" />\n\n <TextInput\n value={state.generatedCronJob.h_wday}\n title={i18n['Day of week']}\n onChange={changeInput}\n name=\"v_wday\"\n id=\"h_wday\" />\n </div>\n\n <div className=\"body-col-2\">\n <Generator mode=\"edit\" job={state.data.job} generatedCronJob={saveGeneratedCronJob} />\n </div>\n\n </div>\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/cron/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div>\n );\n}\n\nexport default EditMail;","import React, { useEffect, useState } from 'react';\n\nconst TextInputWithExtraButton = props => {\n const [state, setState] = useState({\n value: '',\n previousValue: ''\n });\n\n useEffect(() => {\n setState({ ...state, value: props.value });\n }, [props.value]);\n\n useEffect(() => {\n setState({ ...state, value: props.value, previousValue: props.value });\n }, []);\n\n const changeValue = event => {\n let inputValue = event.target.value;\n\n setState({ ...state, value: inputValue, previousValue: inputValue });\n }\n\n return (\n <div class=\"form-group\">\n <label className=\"label-wrapper\" htmlFor={props.id}>\n {props.title}\n <span className=\"lowercase\">{props.optionalTitle ? `(${props.optionalTitle})` : ''}</span>\n </label>\n <div className=\"input-wrapper\">\n <input\n type=\"text\"\n name={props.name}\n id={props.id}\n className=\"form-control\"\n onChange={changeValue}\n value={state.value}\n readOnly={state.value === 'unlimited'} />\n {props.children}\n </div>\n </div>\n );\n}\n\nexport default TextInputWithExtraButton;","import React, { useEffect, useState } from 'react';\nimport { useSelector } from 'react-redux';\n\nconst NameServers = props => {\n const { i18n } = useSelector(state => state.session);\n const [state, setState] = useState({\n nameServersAmount: [],\n usersNS: []\n });\n\n useEffect(() => {\n if (props.usersNS) {\n let initNameServersAmount = props.usersNS.map((userNS, index) => index + 1);\n setState({ ...state, usersNS: props.usersNS, nameServersAmount: initNameServersAmount });\n }\n }, [props.usersNS]);\n\n const renderNameServerInputs = () => {\n return state.nameServersAmount.map((nameServer, index) => {\n if (nameServer < 9) {\n return (\n <div className=\"name-server-input-wrapper\" key={index}>\n <input\n type=\"text\"\n className=\"form-control\"\n id={`v_ns${index + 1}`}\n defaultValue={state.usersNS[index] || ''}\n name={`v_ns${index + 1}`} />\n <button\n type=\"button\"\n className={index < 2 ? 'hide' : 'show delete'}\n onClick={() => onDeleteNameServer(index)}>\n {i18n.delete ?? 'Delete'}\n </button>\n </div>\n );\n }\n });\n }\n\n const addNameServerClassName = () => {\n return state.nameServersAmount.length === 8 ? 'hide' : 'show optional';\n }\n\n const addNameServer = () => {\n let nameServersLength = state.nameServersAmount.length;\n let nameServersDuplicate = [...state.nameServersAmount];\n\n nameServersDuplicate.push(nameServersLength + 1);\n\n setState({ ...state, nameServersAmount: nameServersDuplicate });\n }\n\n const onDeleteNameServer = index => {\n let nameServersDuplicate = [...state.nameServersAmount];\n\n nameServersDuplicate.splice(index - 1, 1);\n\n setState({ ...state, nameServersAmount: nameServersDuplicate });\n }\n\n return (\n <>\n <div className=\"form-group name-servers\">\n <label htmlFor=\"v_ns1\">{i18n['Name servers'] ?? 'Name servers'}</label>\n {renderNameServerInputs()}\n </div>\n\n <button\n type=\"button\"\n className={addNameServerClassName()}\n onClick={() => addNameServer()}>\n {i18n['Add one more Name Server'] ?? 'Add one more Name Server'}\n </button>\n </>\n );\n}\n\nexport default NameServers;","import axios from \"axios\";\nimport { getAuthToken } from \"src/utils/token\";\n\nconst BASE_URL = window.location.origin;\nconst webApiUri = '/api/v1/list/package/index.php';\nconst additionalPackageInfoUri = '/api/v1/add/package/index.php';\nconst addPackageUri = '/api/v1/add/package/index.php';\nconst packageInfoUri = '/api/v1/edit/package/index.php';\nconst updatePackageUri = '/api/v1/edit/package/index.php';\n\nexport const getPackageList = () => {\n return axios.get(BASE_URL + webApiUri);\n}\n\nexport const bulkAction = (action, backups) => {\n const formData = new FormData();\n formData.append(\"action\", action);\n formData.append(\"token\", getAuthToken());\n\n backups.forEach(backup => {\n formData.append(\"package[]\", backup);\n });\n\n return axios.post(BASE_URL + '/api/v1/bulk/package/', formData);\n};\n\nexport const handleAction = uri => {\n return axios.get(BASE_URL + uri, {\n params: {\n token: getAuthToken()\n }\n });\n}\n\nexport const addPackage = data => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + addPackageUri, formDataObject);\n}\n\nexport const getAdditionalPackageInfo = () => {\n return axios.get(BASE_URL + additionalPackageInfoUri);\n}\n\nexport const getPackageInfo = item => {\n return axios.get(BASE_URL + packageInfoUri, {\n params: {\n package: item,\n token: getAuthToken()\n }\n });\n}\n\nexport const updatePackage = (data, item) => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + updatePackageUri, formDataObject, {\n params: {\n package: item\n }\n });\n}\n","import React, { useEffect, useState } from 'react';\n\nimport TextInputWithExtraButton from '../../ControlPanel/AddItemLayout/Form/TextInputWithExtraButton/TextInputWithExtraButton';\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport SelectInput from '../../ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport NameServers from '../../ControlPanel/AddItemLayout/Form/NameServers/NameServers';\nimport { getPackageInfo, updatePackage } from '../../../ControlPanelService/Package';\nimport TextInput from '../../ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from '../../../components/Spinner/Spinner';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\nimport QS from 'qs';\n\nimport './EditPackage.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nconst EditPackage = props => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n loading: false\n });\n\n useEffect(() => {\n let queryParams = QS.parse(history.location.search, { ignoreQueryPrefix: true });\n\n dispatch(addActiveElement('/list/package/'));\n dispatch(removeFocusedElement());\n\n if (queryParams.package) {\n setState({ ...state, loading: true });\n fetchData(queryParams.package);\n }\n }, []);\n\n const fetchData = pkg => {\n getPackageInfo(pkg)\n .then(response => {\n setState({\n ...state,\n data: response.data,\n loading: false\n });\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err);\n });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedPackage = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedPackage[name] = value;\n }\n\n updatedPackage['token'] = token;\n updatedPackage['save'] = 'save';\n updatedPackage['v_package'] = state.data.package;\n\n if (Object.keys(updatedPackage).length !== 0 && updatedPackage.constructor === Object) {\n setState({ ...state, loading: true });\n\n updatePackage(updatedPackage, state.data.package)\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n if (error_msg) {\n setErrorMessage(error_msg);\n setOkMessage('');\n } else {\n dispatch(refreshCounters()).then(() => {\n setErrorMessage('');\n setOkMessage(ok_msg);\n });\n }\n }\n })\n .then(() => fetchData(state.data.package))\n .catch(err => console.error(err));\n }\n }\n\n const toggleUnlimited = inputName => {\n let inputNameToUpdate = state.data[inputName];\n let defaultValue;\n\n if (inputName === 'quota' || inputName === 'bandwidth') {\n defaultValue = '1000';\n } else {\n defaultValue = '1';\n }\n\n setState({\n ...state,\n data: {\n ...state.data,\n [inputName]: inputNameToUpdate !== 'unlimited' ? 'unlimited' : defaultValue\n }\n });\n }\n\n return (\n <div className=\"edit-template edit-package\">\n <Helmet>\n <title>{`Vesta - ${i18n.PACKAGE}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Editing Package']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}\n </span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout date={state.data.date} time={state.data.time} status={state.data.status}>\n {state.loading ? <Spinner /> :\n <form onSubmit={submitFormHandler} id=\"edit-package\">\n <TextInput\n id=\"domain\"\n name=\"v_domain\"\n title={i18n['Package Name']}\n value={state.data.package}\n disabled />\n\n <SelectInput\n optionalTitle={state.data.web_system}\n options={state.data.web_templates}\n selected={state.data.web_template}\n title={i18n['Web Template']}\n name=\"v_web_template\"\n id=\"web-templates\" />\n\n {\n state.data.web_backend && (\n <SelectInput\n optionalTitle={state.data.web_backend}\n options={state.data.backend_templates}\n selected={state.data.backend_template}\n title={i18n['Backend Template']}\n name=\"v_backend_template\"\n id=\"backend-templates\" />\n )\n }\n\n {\n state.data.proxy_system && (\n <SelectInput\n optionalTitle={state.data.proxy_system}\n options={state.data.proxy_templates}\n selected={state.data.proxy_template}\n title={i18n['Proxy Template']}\n name=\"v_proxy_template\"\n id=\"proxy-templates\" />\n )\n }\n\n {\n state.data.dns_system && (\n <SelectInput\n optionalTitle={state.data.dns_system}\n options={state.data.dns_templates}\n selected={state.data.dns_template}\n title={i18n['DNS Template']}\n name=\"v_dns_template\"\n id=\"dns-templates\" />\n )\n }\n\n <SelectInput\n options={state.data.shells}\n selected={state.data.shell}\n title={i18n['SSH Access']}\n name=\"v_shell\"\n id=\"ssh-access\" />\n\n <TextInputWithExtraButton\n title={i18n['Web Domains']}\n id=\"webDomains\"\n name=\"v_web_domains\"\n value={state.data.web_domains}>\n <button type=\"button\" onClick={() => toggleUnlimited('web_domains')}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextInputWithExtraButton\n title={i18n['Web Aliases']}\n optionalTitle={i18n['per domain']}\n id=\"webAliases\"\n name=\"v_web_aliases\"\n value={state.data.web_aliases}>\n <button type=\"button\" onClick={() => toggleUnlimited('web_aliases')}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextInputWithExtraButton\n title={i18n['DNS Domains']}\n id=\"dnsDomains\"\n name=\"v_dns_domains\"\n value={state.data.dns_domains}>\n <button type=\"button\" onClick={() => toggleUnlimited('dns_domains')}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextInputWithExtraButton\n title={i18n['DNS records']}\n optionalTitle={i18n['per domain']}\n id=\"dnsRecords\"\n name=\"v_dns_records\"\n value={state.data.dns_records}>\n <button type=\"button\" onClick={() => toggleUnlimited('dns_records')}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextInputWithExtraButton\n title={i18n['Mail Domains']}\n id=\"mailDomains\"\n name=\"v_mail_domains\"\n value={state.data.mail_domains}>\n <button type=\"button\" onClick={() => toggleUnlimited('mail_domains')}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextInputWithExtraButton\n title={i18n['Mail Accounts']}\n optionalTitle={i18n['per domain']}\n id=\"mailAccounts\"\n name=\"v_mail_accounts\"\n value={state.data.mail_accounts}>\n <button type=\"button\" onClick={() => toggleUnlimited('mail_accounts')}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextInputWithExtraButton\n title={i18n['Databases']}\n id=\"databases\"\n name=\"v_databases\"\n value={state.data.databases}>\n <button type=\"button\" onClick={() => toggleUnlimited('databases')}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextInputWithExtraButton\n title={i18n['Cron Jobs']}\n id=\"cronJobs\"\n name=\"v_cron_jobs\"\n value={state.data.cron_jobs}>\n <button type=\"button\" onClick={() => toggleUnlimited('cron_jobs')}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextInput name=\"v_backups\" id=\"backups\" value={state.data.backups} title={i18n['Backups']} />\n\n <TextInputWithExtraButton\n title={i18n['Quota']}\n optionalTitle={i18n['in megabytes']}\n id=\"quota\"\n name=\"v_disk_quota\"\n value={state.data.disk_quota}>\n <button type=\"button\" onClick={() => toggleUnlimited('disk_quota')}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextInputWithExtraButton\n title={i18n['Bandwidth']}\n optionalTitle={i18n['in megabytes']}\n id=\"bandwidth\"\n name=\"v_bandwidth\"\n value={state.data.bandwidth}>\n <button type=\"button\" onClick={() => toggleUnlimited('bandwidth')}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <NameServers usersNS={state.data.nameservers} />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/package/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div>\n );\n}\n\nexport default EditPackage;","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"../../../../actions/MainNavigation/mainNavigationActions\";\nimport Checkbox from '../../../ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport TextArea from '../../../ControlPanel/AddItemLayout/Form/TextArea/TextArea';\nimport AddItemLayout from '../../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { getServiceInfo, updateService } from 'src/ControlPanelService/Server';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from '../../../../components/Spinner/Spinner';\nimport Toolbar from '../../../MainNav/Toolbar/Toolbar';\nimport { Link, useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './EditHttpd.scss';\nimport { Helmet } from 'react-helmet';\nimport HtmlParser from 'react-html-parser';\n\nconst EditHttpd = props => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n loading: false,\n errorMessage: '',\n okMessage: ''\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/server/'));\n dispatch(removeFocusedElement());\n\n setState({ ...state, loading: true });\n fetchData();\n }, []);\n\n const fetchData = () => {\n getServiceInfo('httpd')\n .then(response => {\n setState({\n ...state,\n data: response.data,\n loading: false\n });\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err);\n });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedService = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedService[name] = value;\n }\n\n if (Object.keys(updatedService).length !== 0 && updatedService.constructor === Object) {\n setState({ ...state, loading: true });\n\n updateService(updatedService, '/httpd')\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n if (error_msg) {\n setErrorMessage(error_msg);\n setOkMessage('');\n } else {\n setErrorMessage('');\n setOkMessage(ok_msg);\n }\n }\n })\n .then(() => fetchData())\n .catch(err => console.error(err));\n }\n }\n\n return (\n <div className=\"edit-template edit-httpd\">\n <Helmet>\n <title>{`Vesta - ${i18n.SERVER}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\"><Link to={`/edit/server/${state.data.service_name}`}>{i18n['Configuring Server']} / {state.data.service_name}</Link></div>\n <div className=\"link\"><Link to=\"/edit/server/php\">{i18n['Configure']} php.ini</Link></div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}\n </span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"edit-httpd\">\n <input type=\"hidden\" name=\"save\" value=\"save\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <TextArea\n defaultValue={state.data.config}\n title={state.data.config_path}\n name=\"v_config\"\n id=\"v_config\"\n rows=\"25\" />\n\n <br />\n\n <Checkbox\n title={i18n['restart']}\n defaultChecked={true}\n name=\"v_restart\"\n id=\"restart\" />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/server/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div>\n );\n}\n\nexport default EditHttpd;","import React, { useEffect, useState } from 'react';\n\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { addCronJob } from '../../../ControlPanelService/Cron';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport Generator from '../Generator/Generator';\nimport { useHistory } from 'react-router-dom';\nimport Spinner from '../../Spinner/Spinner';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './AddCronJob.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nconst AddCronJob = props => {\n const { i18n } = useSelector(state => state.session);\n const token = localStorage.getItem(\"token\");\n const history = useHistory();\n const dispatch = useDispatch();\n const [state, setState] = useState({\n loading: false,\n okMessage: '',\n errorMessage: '',\n generatedCronJob: {\n h_min: '*',\n h_hour: '*',\n h_day: '*',\n h_wday: '*',\n h_month: '*'\n }\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/cron/'));\n dispatch(removeFocusedElement());\n }, []);\n\n const submitFormHandler = event => {\n event.preventDefault();\n let newCronJob = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n newCronJob[name] = value;\n }\n\n if (Object.keys(newCronJob).length !== 0 && newCronJob.constructor === Object) {\n setState({ ...state, loading: true });\n addCronJob(newCronJob)\n .then(result => {\n if (result.status === 200) {\n const { error_msg: errorMessage, ok_msg: okMessage } = result.data;\n\n if (errorMessage) {\n setState({ ...state, errorMessage, okMessage, loading: false });\n } else {\n dispatch(refreshCounters()).then(() => {\n setState({ ...state, okMessage, errorMessage: '', loading: false });\n });\n }\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const saveGeneratedCronJob = generatedCronJob => {\n setState({\n ...state,\n generatedCronJob\n });\n }\n\n const changeInput = input => {\n let updatedGeneratedCronJob = {\n ...state.generatedCronJob,\n [input.id]: input.value\n };\n\n setState({\n ...state,\n generatedCronJob: updatedGeneratedCronJob\n });\n }\n\n return (\n <div className=\"edit-template add-cron\">\n <Helmet>\n <title>{`Vesta - ${i18n.CRON}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Adding Cron Job']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {state.errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n {state.errorMessage}</span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {state.okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n <span>{HtmlParser(state.okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> : (\n <form onSubmit={event => submitFormHandler(event)}>\n <input type=\"hidden\" name=\"ok\" value=\"add\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <div className=\"form-group command\">\n <label htmlFor=\"command\">{i18n.Command ?? 'Command'}</label>\n <input\n type=\"text\"\n className=\"form-control\"\n id=\"command\"\n name=\"v_cmd\" />\n </div>\n\n <div className=\"cron-form-body\">\n\n <div className=\"body-col-1\">\n <div className=\"form-group\">\n <label htmlFor=\"h_min\">{i18n.Minute ?? 'Minute'}</label>\n <input\n type=\"text\"\n className=\"form-control\"\n id=\"h_min\"\n onChange={event => changeInput(event.target)}\n value={state.generatedCronJob.h_min}\n name=\"v_min\" />\n </div>\n\n <div className=\"form-group\">\n <label htmlFor=\"h_hour\">{i18n.Hour ?? 'Hour'}</label>\n <input\n type=\"text\"\n className=\"form-control\"\n id=\"h_hour\"\n onChange={event => changeInput(event.target)}\n value={state.generatedCronJob.h_hour}\n name=\"v_hour\" />\n </div>\n\n <div className=\"form-group\">\n <label htmlFor=\"h_day\">{i18n.Day ?? 'Day'}</label>\n <input\n type=\"text\"\n className=\"form-control\"\n id=\"h_day\"\n onChange={event => changeInput(event.target)}\n value={state.generatedCronJob.h_day}\n name=\"v_day\" />\n </div>\n\n <div className=\"form-group\">\n <label htmlFor=\"h_month\">{i18n.Month ?? 'Month'}</label>\n <input\n type=\"text\"\n className=\"form-control\"\n id=\"h_month\"\n onChange={event => changeInput(event.target)}\n value={state.generatedCronJob.h_month}\n name=\"v_month\" />\n </div>\n\n <div className=\"form-group\">\n <label htmlFor=\"h_wday\">{i18n['Day of week'] ?? 'Days of week'}</label>\n <input\n type=\"text\"\n className=\"form-control\"\n id=\"h_wday\"\n onChange={event => changeInput(event.target)}\n value={state.generatedCronJob.h_wday}\n name=\"v_wday\" />\n </div>\n </div>\n\n <div className=\"body-col-2\">\n <Generator mode=\"add\" generatedCronJob={saveGeneratedCronJob} />\n </div>\n\n </div>\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Add ?? 'Add'}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/cron/')}>{i18n.Back ?? 'Back'}</button>\n </div>\n </form>\n )}\n </AddItemLayout>\n </div>\n );\n}\n\nexport default AddCronJob;","import React, { useEffect, useState } from 'react';\n\nimport TextInputWithExtraButton from '../../ControlPanel/AddItemLayout/Form/TextInputWithExtraButton/TextInputWithExtraButton';\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport { getAdditionalPackageInfo, addPackage } from '../../../ControlPanelService/Package';\nimport NameServers from '../../ControlPanel/AddItemLayout/Form/NameServers/NameServers';\nimport SelectInput from '../../ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport TextInput from '../../ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport Spinner from '../../Spinner/Spinner';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './AddPackage.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nconst AddPackage = props => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const dispatch = useDispatch();\n const history = useHistory();\n const [state, setState] = useState({\n loading: false,\n okMessage: '',\n errorMessage: '',\n webTemplates: [],\n webSystem: '',\n backendTemplates: [],\n backendSystem: '',\n proxySystem: '',\n proxyTemplates: [],\n dnsTemplates: [],\n dnsSystem: '',\n sshTemplates: [],\n usersNS: [],\n webDomains: '1',\n webAliases: '1',\n dnsDomains: '1',\n dnsRecords: '1',\n mailDomains: '1',\n mailAccounts: '1',\n databases: '1',\n cronJobs: '1',\n quota: '1000',\n bandwidth: '1000',\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/package/'));\n dispatch(removeFocusedElement());\n\n setState({ ...state, loading: true });\n\n fetchData();\n }, []);\n\n const fetchData = () => {\n getAdditionalPackageInfo()\n .then(result => {\n setState({\n ...state,\n webTemplates: result.data.web_templates,\n webSystem: result.data.web_system,\n backendTemplates: result.data.backend_templates,\n backendSystem: result.data.web_backend,\n dnsTemplates: result.data.dns_templates,\n dnsSystem: result.data.dns_system,\n proxySystem: result.data.proxy_system,\n proxyTemplates: result.data.proxy_templates,\n sshTemplates: result.data.ssh_access,\n loading: false\n });\n })\n .catch(err => console.err(err));\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let newPackage = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n newPackage[name] = value;\n }\n\n newPackage['token'] = token;\n newPackage['ok'] = 'Add';\n\n if (Object.keys(newPackage).length !== 0 && newPackage.constructor === Object) {\n setState({ ...state, loading: true });\n addPackage(newPackage)\n .then(result => {\n if (result.status === 200) {\n const { error_msg: errorMessage, ok_msg: okMessage } = result.data;\n\n if (errorMessage) {\n setState({ ...state, errorMessage, okMessage, loading: false });\n } else {\n dispatch(refreshCounters()).then(() => {\n setState({ ...state, okMessage, errorMessage: '', loading: false });\n });\n }\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const toggleUnlimited = inputName => {\n let inputNameToUpdate = state[inputName];\n let defaultValue;\n\n if (inputName === 'quota' || inputName === 'bandwidth') {\n defaultValue = '1000';\n } else {\n defaultValue = '1';\n }\n\n if (inputNameToUpdate !== 'unlimited') {\n setState({ ...state, [inputName]: 'unlimited' });\n } else {\n setState({ ...state, [inputName]: defaultValue });\n }\n }\n\n return (\n <div className=\"edit-template add-package\">\n <Helmet>\n <title>{`Vesta - ${i18n.PACKAGE}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Adding Package']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {state.errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n {state.errorMessage}</span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {state.okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n <span>{HtmlParser(state.okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> : (\n <form onSubmit={event => submitFormHandler(event)}>\n <TextInput name=\"v_package\" id=\"packageName\" title={i18n['Package Name']} />\n\n <SelectInput\n options={state.webTemplates}\n name=\"v_web_template\"\n id=\"webTemplates\"\n title={i18n['Web Template']}\n optionalTitle={state.webSystem} />\n\n <SelectInput\n options={state.backendTemplates}\n name=\"v_backend_template\"\n id=\"backendTemplates\"\n title={i18n['Backend Template']}\n optionalTitle={state.backendSystem} />\n\n <SelectInput\n options={state.proxyTemplates}\n name=\"v_proxy_template\"\n id=\"proxyTemplates\"\n title={i18n['Proxy Template']}\n optionalTitle={state.proxySystem} />\n\n <SelectInput\n options={state.dnsTemplates}\n name=\"v_dns_template\"\n id=\"dnsTemplates\"\n title={i18n['DNS Template']}\n optionalTitle={state.dnsSystem} />\n\n <SelectInput\n options={state.sshTemplates}\n name=\"v_shell\"\n id=\"shells\"\n title={i18n['SSH Access']} />\n\n <TextInputWithExtraButton title={i18n['Web Domains']} id=\"webDomains\" name=\"v_web_domains\" value={state.webDomains}>\n <button type=\"button\" onClick={() => toggleUnlimited('webDomains')}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextInputWithExtraButton title={i18n['Web Aliases']} optionalTitle={i18n['per domain']} id=\"webAliases\" name=\"v_web_aliases\" value={state.webAliases}>\n <button type=\"button\" onClick={() => toggleUnlimited('webAliases')}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextInputWithExtraButton title={i18n['DNS Domains']} id=\"dnsDomains\" name=\"v_dns_domains\" value={state.dnsDomains}>\n <button type=\"button\" onClick={() => toggleUnlimited('dnsDomains')}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextInputWithExtraButton title={i18n['DNS records']} optionalTitle={i18n['per domain']} id=\"dnsRecords\" name=\"v_dns_records\" value={state.dnsRecords}>\n <button type=\"button\" onClick={() => toggleUnlimited('dnsRecords')}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextInputWithExtraButton title={i18n['Mail Domains']} id=\"mailDomains\" name=\"v_mail_domains\" value={state.mailDomains}>\n <button type=\"button\" onClick={() => toggleUnlimited('mailDomains')}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextInputWithExtraButton title={i18n['Mail Accounts']} optionalTitle={i18n['per domain']} id=\"mailAccounts\" name=\"v_mail_accounts\" value={state.mailAccounts}>\n <button type=\"button\" onClick={() => toggleUnlimited('mailAccounts')}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextInputWithExtraButton title={i18n['Databases']} id=\"databases\" name=\"v_databases\" value={state.databases}>\n <button type=\"button\" onClick={() => toggleUnlimited('databases')}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextInputWithExtraButton title={i18n['Cron Jobs']} id=\"cronJobs\" name=\"v_cron_jobs\" value={state.cronJobs}>\n <button type=\"button\" onClick={() => toggleUnlimited('cronJobs')}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextInput name=\"v_backups\" id=\"backups\" value=\"1\" title={i18n['Backups']} />\n\n <TextInputWithExtraButton title={i18n['Quota']} optionalTitle={i18n['in megabytes']} id=\"quota\" name=\"v_disk_quota\" value={state.quota}>\n <button type=\"button\" onClick={() => toggleUnlimited('quota')}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextInputWithExtraButton title={i18n['Bandwidth']} optionalTitle={i18n['in megabytes']} id=\"bandwidth\" name=\"v_bandwidth\" value={state.bandwidth}>\n <button type=\"button\" onClick={() => toggleUnlimited('bandwidth')}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <NameServers usersNS={['ns1.example.ltd', 'ns2.example.ltd']} />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Add}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/package/')}>{i18n.Back}</button>\n </div>\n </form>\n )}\n </AddItemLayout>\n </div>\n );\n}\n\nexport default AddPackage;","import React from 'react';\n\nimport TextInput from 'src/components/ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport { Link } from 'react-router-dom';\nimport { useSelector } from 'react-redux';\n\nconst EditServerWebOption = ({ proxySystem, webSystem, webBackend, webBackendPool, visible = false }) => {\n const { i18n } = useSelector(state => state.session);\n\n return (\n <div className=\"server-web-option\" style={{ display: `${visible ? 'block' : 'none'}` }}>\n\n {\n proxySystem && (\n <TextInput\n optionalTitle={<Link to={`/edit/server/${proxySystem}`}>{i18n['configure']}</Link>}\n title={i18n['Proxy Server'] + ' / '}\n name=\"v_proxy_system\"\n value={proxySystem}\n id=\"proxy_system\"\n disabled />\n )\n }\n\n {\n webSystem && (\n <TextInput\n optionalTitle={<Link to={`/edit/server/${webSystem}`}>{i18n['configure']}</Link>}\n title={i18n['Web Server'] + ' / '}\n name=\"v_web_system\"\n value={webSystem}\n id=\"web_system\"\n disabled />\n )\n }\n\n {\n webBackend && (\n <TextInput\n title={i18n['Backend Server']}\n name=\"v_web_backend\"\n value={webBackend}\n id=\"web_backend\"\n disabled />\n )\n }\n\n {\n webBackendPool && (\n <TextInput\n optionalTitle={<Link to={`/edit/server/${webBackendPool}`}>{i18n['configure']}</Link>}\n title={i18n['Backend Pool Mode']}\n name=\"v_web_backend_pool\"\n value={webBackendPool}\n id=\"web_backend_pool\"\n disabled\n />\n )\n }\n\n </div>\n );\n}\n\nexport default EditServerWebOption;","import React from 'react';\n\nimport SelectInput from 'src/components/ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport TextInput from 'src/components/ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport { Link } from 'react-router-dom';\nimport { useSelector } from 'react-redux';\n\nconst EditServerDnsOption = ({ dnsSystem, selected, dnsCluster, visible }) => {\n const { i18n } = useSelector(state => state.session);\n\n const printHosts = () => {\n return Object.keys(dnsCluster).map((cluster, index) => (\n <TextInput\n title={`${i18n['DNS Server']} #${index + 1}`}\n name=\"v_dns_remote_host\"\n id=\"dns-remote-host\"\n value={cluster}\n disabled />\n ));\n }\n\n return (\n <div className=\"server-dns-option\" style={{ display: `${visible ? 'block' : 'none'}` }}>\n <TextInput\n optionalTitle={<Link to={`/edit/server/${dnsSystem}`}>{i18n['configure']}</Link>}\n title={i18n['DNS Server'] + ' / '}\n name=\"v_dns_system\"\n value={dnsSystem}\n id=\"dns_system\"\n disabled />\n\n <SelectInput\n title={i18n['DNS Cluster']}\n selected={selected}\n options={[i18n['no'], i18n['yes']]}\n name=\"v_dns_cluster\"\n id=\"dns-cluster\"\n disabled />\n\n {\n selected === 'yes' && (\n <div className=\"hosts-wrapper\">\n {printHosts()}\n </div>\n )\n }\n </div>\n );\n}\n\nexport default EditServerDnsOption;","import React, { useState } from 'react';\n\nimport SelectInput from 'src/components/ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport TextInput from 'src/components/ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport { useSelector } from 'react-redux';\n\nconst EditVestaPluginsOption = ({ data, visible }) => {\n const { i18n } = useSelector(state => state.session);\n const { session } = useSelector(state => state.userSession);\n const [sftpValue, setSftpValue] = useState(data.lead || session['SFTPJAIL_KEY'] ? 'yes' : 'no');\n const [fmValue, setFmValue] = useState(data.fm_lead || session['FILEMANAGER_KEY'] ? 'yes' : 'no');\n const [softaculousValue, setSoftaculousValue] = useState(session['SOFTACULOUS'] === 'yes' ? 'yes' : 'no');\n\n const renderSoftaculous = () => {\n if (softaculousValue === 'yes') {\n if (session['SOFTACULOUS'] === 'yes') {\n return (<div className=\"soft-module\">\n <div>\n <span style={{ fontWeight: 'bolder' }}>{i18n['* plugin installation will run in background']}</span>\n <span>\n Softaculous is a great Auto Installer having 426 great scripts, 1115 PHP Classes\n and we are still adding more. Softaculous is ideal for Web Hosting companies and\n it could give a significant boost to your sales. These scripts cover most of the\n uses a customer could ever have. We have covered a wide array of Categories so that\n everyone could find the required script one would need to power their Web Site.\n </span>\n </div>\n\n <div className=\"buy-license\">\n <a href=\"https://www.softaculous.com/softaculous/\" target=\"_blank\" rel=\"noopener noreferrer\">\n {i18n['Get Premium License'] ?? 'Get Premium License'}\n </a>\n </div>\n </div>);\n }\n }\n }\n\n const renderSftp = () => {\n if (sftpValue === 'yes') {\n if (!data.sftp_license_key && session['SFTPJAIL_KEY']) {\n return (<div className=\"sftp-module\">\n <div>{i18n['Restrict users so that they cannot use SSH and access only their home directory.']}</div>\n <div className=\"license-description\">\n <span>{i18n['Licence Key']}:</span>\n <TextInput\n title={i18n['License Key']}\n value={data.licence_key}\n name=\"v_sftp_licence\"\n id=\"sftp_licence\" />\n </div>\n </div>)\n } else {\n return (<div className=\"sftp-module\">\n <>\n <span>{i18n['Restrict users so that they cannot use SSH and access only their home directory.']}</span>\n <span>{i18n['This is a commercial module, you would need to purchace license key to enable it.']}</span>\n </>\n <div className=\"license-description\">\n <span>{i18n['Enter License Key']}:</span>\n <TextInput\n title={i18n['Version']}\n name=\"v_sftp_licence\"\n id=\"sftp_licence\" />\n </div>\n\n <div className=\"buy-license\">\n <a href={`https://vestacp.com/checkout/2co.php?product_id=6&referer=${data.http_host}`}>\n {i18n['Buy Licence']} 3$ {i18n['month']}\n </a>\n <a href={`https://vestacp.com/checkout/2co.php?product_id=9&referer=${data.http_host}`}>\n {i18n['Buy Lifetime License']} 18$\n </a>\n </div>\n\n <span>2Checkout.com Inc. (Ohio, USA) is a payment facilitator for goods and services provided by vestacp.com.</span>\n </div>)\n }\n }\n }\n\n const renderFm = () => {\n if (fmValue === 'yes') {\n if (!data.fm_license_key && session['FILEMANAGER_KEY']) {\n return (<div className=\"fm-module\">\n <div>{i18n['Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.']}</div>\n <div className=\"license-description\">\n <span>{i18n['Licence Key']}:</span>\n <TextInput\n title={i18n['Licence Key']}\n value={data.fm_licence_key_option}\n name=\"v_filemanager_licence\"\n id=\"filemanager_licence\" />\n </div>\n </div>);\n } else {\n return (<div className=\"fm-module\">\n <>\n <span>{i18n['Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.']}</span>\n <span>{i18n['This is a commercial module, you would need to purchace license key to enable it.']}</span>\n </>\n <div className=\"license-description\">\n <span>{i18n['Enter License Key']}:</span>\n <TextInput\n title={i18n['Version']}\n value=\"\"\n name=\"v_filemanager_licence\"\n id=\"sftp_licence\" />\n </div>\n\n <div className=\"buy-license\">\n <a href={`https://vestacp.com/checkout/2co.php?product_id=7&referer=${data.http_host}`} target=\"_blank\" rel=\"noopener noreferrer\">\n {i18n['Buy Licence']} 3$ {i18n['month']}\n </a>\n <a href={`https://vestacp.com/checkout/2co.php?product_id=8&referer=${data.http_host}`} target=\"_blank\" rel=\"noopener noreferrer\">\n {i18n['Buy Lifetime License']} 28$\n </a>\n </div>\n\n <span>2Checkout.com Inc. (Ohio, USA) is a payment facilitator for goods and services provided by vestacp.com.</span>\n </div>)\n }\n }\n }\n\n return (\n <div className=\"server-plugins-option\" style={{ display: `${visible ? 'block' : 'none'}` }}>\n <TextInput\n title={i18n['Version']}\n value={data.version}\n name=\"v_version\"\n id=\"version\"\n disabled />\n\n <div className=\"form-group select-group\">\n <label className=\"label-wrapper\" htmlFor=\"quota\">\n {i18n['FileSystem Disk Quota']}\n </label>\n <select className=\"form-control\" id=\"quota\" name=\"v_quota\">\n <option value=\"no\">{i18n['no']}</option>\n <option value=\"yes\" selected={data.disk_quota === 'yes'}>{i18n['yes']}</option>\n </select>\n </div>\n\n <br />\n\n <div className=\"form-group select-group\">\n <label className=\"label-wrapper\" htmlFor=\"firewall\">\n {i18n['Firewall']}\n </label>\n <select className=\"form-control\" id=\"firewall\" name=\"v_firewall\">\n <option value=\"no\">{i18n['no']}</option>\n <option value=\"yes\" selected={data.firewall_system === 'iptables'}>{i18n['yes']}</option>\n </select>\n </div>\n\n <SelectInput\n title={i18n['Reseller Role']}\n options={[i18n['no']]}\n name=\"v_reseller\"\n id=\"reseller\"\n disabled />\n\n <SelectInput\n title={i18n['Backup Migration Manager']}\n options={[i18n['no']]}\n name=\"v_backup_manager\"\n id=\"backup_manager\"\n disabled />\n\n <div className=\"form-group select-group\">\n <label className=\"label-wrapper\" htmlFor=\"sftp\">\n {i18n['SFTP Chroot']}\n </label>\n <select className=\"form-control\" id=\"sftp\" name=\"v_sftp\" onChange={event => setSftpValue(event.target.value)}>\n {\n session['SFTPJAIL_KEY']\n ? <option value=\"cancel\">{i18n['Disable and Cancel Licence']}</option>\n : <option value=\"no\">{i18n['no']}</option>\n }\n\n <option value=\"yes\" selected={data.lead || session['SFTPJAIL_KEY']}>{i18n['yes']}</option>\n </select>\n </div>\n\n {renderSftp()}\n\n <br />\n\n <div className=\"form-group select-group\">\n <label className=\"label-wrapper\" htmlFor=\"filemanager\">\n {i18n['File Manager']}\n </label>\n <select className=\"form-control\" id=\"filemanager\" name=\"v_filemanager\" onChange={event => setFmValue(event.target.value)}>\n {\n session['FILEMANAGER_KEY']\n ? <option value=\"cancel\">{i18n['Disable and Cancel Licence']}</option>\n : <option value=\"no\">{i18n['no']}</option>\n }\n\n <option value=\"yes\" selected={data.fm_lead || session['FILEMANAGER_KEY']}>{i18n['yes']}</option>\n </select>\n </div>\n\n {renderFm()}\n\n <br />\n\n <div className=\"form-group select-group\">\n <label className=\"label-wrapper\" htmlFor=\"softaculous\">\n {i18n['Softaculous'] ?? 'Softaculous'}\n </label>\n <select className=\"form-control\" id=\"softaculous\" name=\"v_softaculous\" onChange={event => setSoftaculousValue(event.target.value)}>\n <option value=\"no\">{i18n['no']}</option>\n <option value=\"yes\" selected={data.softaculous_lead || session['SOFTACULOUS'] === 'yes'}>{i18n['yes']}</option>\n </select>\n </div>\n\n {renderSoftaculous()}\n </div>\n );\n}\n\nexport default EditVestaPluginsOption;\n","import React, { useEffect, useState } from 'react';\n\nimport SelectInput from 'src/components/ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport TextArea from 'src/components/ControlPanel/AddItemLayout/Form/TextArea/TextArea';\nimport Checkbox from 'src/components/ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport { Link } from 'react-router-dom';\nimport { useSelector } from 'react-redux';\n\nconst EditVestaSslOption = ({ data, visible }) => {\n const { i18n } = useSelector(state => state.session);\n const [domainsVisible, setDomainsVisible] = useState(false);\n const [sslDomains, setSslDomains] = useState([]);\n\n useEffect(() => {\n const { ssl_domains } = data;\n\n if (ssl_domains) {\n setSslDomains(['', ...ssl_domains]);\n } else {\n setSslDomains(['']);\n }\n\n }, []);\n\n return (\n <div className=\"server-ssl-option\" style={{ display: `${visible ? 'block' : 'none'}` }}>\n <Checkbox\n onChange={checked => setDomainsVisible(checked)}\n title={i18n['Use Web Domain SSL Certificate']}\n defaultChecked={data.vesta_certificate}\n name=\"v_web_ssl_domain_checkbox\"\n id=\"web_ssl_domain_checkbox\"\n checked={domainsVisible}\n />\n\n {\n domainsVisible && (\n <div className=\"domain-group\">\n <SelectInput\n selected={data.vesta_certificate}\n name=\"v_web_ssl_domain\"\n title={i18n['Domain']}\n options={sslDomains}\n id=\"web_ssl_domain\" />\n </div>\n )\n }\n\n <TextArea\n title={i18n['SSL Certificate']}\n defaultValue={data.sys_ssl_crt}\n name=\"v_sys_ssl_crt\"\n id=\"sys_ssl_crt\" />\n\n <TextArea\n defaultValue={data.sys_ssl_key}\n id=\"sys_ssl_key\"\n name=\"v_sys_ssl_key\"\n title={i18n['SSL Key']} />\n\n <div className=\"additional-info\">\n {\n data.sys_ssl_subject && (\n <div>\n <span>{i18n['SUBJECT']}:</span>\n <span>{data.sys_ssl_subject}</span>\n </div>\n )\n }\n\n {\n data.sys_ssl_aliases && (\n <div>\n <span>{i18n['ALIASES']}:</span>\n <span>{data.sys_ssl_aliases}</span>\n </div>\n )\n }\n\n {\n data.sys_ssl_not_before && (\n <div>\n <span>{i18n['NOT_BEFORE']}:</span>\n <span>{data.sys_ssl_not_before}</span>\n </div>\n )\n }\n\n {\n data.sys_ssl_not_after && (\n <div>\n <span>{i18n['NOT_AFTER']}:</span>\n <span>{data.sys_ssl_not_after}</span>\n </div>\n )\n }\n\n {\n data.sys_ssl_signature && (\n <div>\n <span>{i18n['SIGNATURE']}:</span>\n <span>{data.sys_ssl_signature}</span>\n </div>\n )\n }\n\n {\n data.sys_ssl_pub_key && (\n <div>\n <span>{i18n['PUB_KEY']}:</span>\n <span>{data.sys_ssl_pub_key}</span>\n </div>\n )\n }\n\n {\n data.sys_ssl_issuer && (\n <div>\n <span>{i18n['ISSUER']}:</span>\n <span>{data.sys_ssl_issuer}</span>\n </div>\n )\n }\n </div>\n </div>\n );\n}\n\nexport default EditVestaSslOption;","import React from 'react';\n\nimport SelectInput from 'src/components/ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport TextInput from 'src/components/ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport { Link } from 'react-router-dom';\nimport { useSelector } from 'react-redux';\n\nconst EditDatabaseOption = ({ data, visible }) => {\n const { DB_PMA_URL, DB_PGA_URL } = useSelector(state => state.userSession.session);\n const { i18n } = useSelector(state => state.session);\n\n const printPhpMyAdminHosts = () => {\n if (data.mysql_hosts.length) {\n return data.mysql_hosts.map((host, index) => (\n <div className=\"hosts\">\n <TextInput\n title={`${i18n['Host']} #${index + 1}`}\n value={host['HOST']}\n name=\"v_mysql_host\"\n id=\"mysql_host\"\n disabled />\n\n <TextInput\n title={i18n['Password']}\n name=\"v_mysql_password\"\n id=\"mysql_password\" />\n\n <TextInput\n title={i18n['Maximum Number Of Databases']}\n value={host['MAX_DB']}\n name=\"v_mysql_max\"\n id=\"mysql_max\"\n disabled />\n\n <TextInput\n title={i18n['Current Number Of Databases']}\n value={host['U_DB_BASES']}\n name=\"v_mysql_max\"\n id=\"current-databases\"\n disabled />\n </div>\n ));\n }\n }\n\n const printPgSqlHosts = () => {\n return data.pgsql_hosts.map((host, index) => (\n <div className=\"hosts\">\n <TextInput\n title={`${i18n['Host']} #${index + 1}`}\n value={host['HOST']}\n name=\"v_pgsql_host\"\n id=\"pgsql_host\"\n disabled />\n\n <TextInput\n title={i18n['Maximum Number Of Databases']}\n value={host['MAX_DB']}\n name=\"v_psql_max\"\n id=\"psql_max\"\n disabled />\n\n <TextInput\n title={i18n['Current Number Of Databases']}\n value={host['U_DB_BASES']}\n name=\"v_pgsql_max\"\n id=\"pgsql_current\"\n disabled />\n </div>\n ));\n }\n\n return (\n <div className=\"server-mail-option\" style={{ display: `${visible ? 'block' : 'none'}` }}>\n <SelectInput\n optionalTitle={<Link to=\"/edit/server/mysql\">{i18n['configure']}</Link>}\n title={i18n['MySQL Support'] + ' / '}\n selected={data.mysql}\n options={[i18n['no'], i18n['yes']]}\n name=\"v_mysql\"\n id=\"mysql\"\n disabled />\n\n {\n data.mysql === 'yes' && (\n <>\n <TextInput\n title={i18n['phpMyAdmin URL']}\n value={DB_PMA_URL}\n name=\"v_mysql_url\"\n id=\"mysql_url\" />\n\n {printPhpMyAdminHosts()}\n </>\n )\n }\n\n <SelectInput\n optionalTitle={<Link to=\"/edit/server/postgresql\">{i18n['configure']}</Link>}\n title={i18n['PostgreSQL Support'] + ' / '}\n selected={data.pgsql}\n options={[i18n['no'], i18n['yes']]}\n name=\"v_pgsql\"\n id=\"pgsql\"\n disabled />\n\n {\n data.pgsql === 'yes' && (\n <>\n <TextInput\n title={i18n['phpPgAdmin URL']}\n value={DB_PGA_URL}\n name=\"v_pgsql_url\"\n id=\"pgsql_url\" />\n\n {printPgSqlHosts()}\n </>\n )\n }\n </div>\n );\n}\n\nexport default EditDatabaseOption;","import React, { useState } from 'react';\n\nimport SelectInput from 'src/components/ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport TextInput from 'src/components/ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { useSelector } from 'react-redux';\n\nconst EditBackupOption = ({ data, visible }) => {\n const { i18n } = useSelector(state => state.session);\n const [remoteBackup, setRemoteBackup] = useState(false);\n\n return (\n <div className=\"server-dns-option\" style={{ display: `${visible ? 'block' : 'none'}` }}>\n <SelectInput\n options={['no', 'yes']}\n title={i18n['Local backup']}\n selected={data.backup}\n name=\"v_backup\"\n id=\"backup\" />\n\n <SelectInput\n options={['1', '2', '3', '4', '5', '6', '7', '8', '9']}\n title={i18n['Compression level']}\n selected={data.backup_gzip}\n name=\"v_backup_gzip\"\n id=\"backup-gzip\" />\n\n <TextInput\n title={i18n['Directory']}\n value={data.backup_dir}\n name=\"v_backup_dir\"\n id=\"v-backup-dir\" />\n\n <button type=\"button\" onClick={() => setRemoteBackup(!remoteBackup)}>\n {i18n['Remote backup']}\n {remoteBackup ? <FontAwesomeIcon icon=\"caret-up\" /> : <FontAwesomeIcon icon=\"caret-down\" />}\n </button>\n\n {\n remoteBackup && (\n <div style={{ transform: 'translateX(3rem)' }}>\n <br />\n\n <SelectInput\n selected={data.backup_type}\n options={data.protocols}\n title={i18n['Protocol']}\n name=\"v_backup_type\"\n id=\"backup_type\" />\n\n <TextInput\n title={i18n['Host']}\n value={data.backup_host}\n name=\"v_backup_host\"\n id=\"backup_host\" />\n\n <TextInput\n title={i18n['Username']}\n value={data.backup_username}\n name=\"v_backup_username\"\n id=\"backup_username\" />\n\n <TextInput\n title={i18n['Password']}\n value={data.backup_password}\n name=\"v_backup_password\"\n id=\"backup_password\" />\n\n <TextInput\n title={i18n['Directory']}\n value={data.backup_bpath}\n name=\"v_backup_bpath\"\n id=\"backup_bpath\" />\n </div>\n )\n }\n </div>\n );\n}\n\nexport default EditBackupOption;","import React, { useEffect, useState } from 'react';\n\nimport SelectInput from 'src/components/ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport TextInput from 'src/components/ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport Checkbox from 'src/components/ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport { Link } from 'react-router-dom';\nimport { useSelector } from 'react-redux';\n\nconst EditMailOption = ({ data, visible }) => {\n const { MAIL_URL } = useSelector(state => state.userSession.session);\n const { i18n } = useSelector(state => state.session);\n const [mailCertificateSystem, setMailCertificateSystem] = useState(false);\n\n useEffect(() => {\n if (data.mail_certificate) {\n setMailCertificateSystem(true);\n }\n }, []);\n\n const getMailCertificateOptions = () => {\n let result = ['', ...data.ssl_domains];\n return result;\n }\n\n return (\n <div className=\"server-mail-option\" style={{ display: `${visible ? 'block' : 'none'}` }}>\n <TextInput\n optionalTitle={<Link to={`/edit/server/${data.mail_system}`}>{i18n['configure']}</Link>}\n title={i18n['MAIL Server'] + ' / '}\n name=\"v_mail_system\"\n value={data.mail_system}\n id=\"mail_system\"\n disabled />\n\n {\n data.antivirus_system && (\n <TextInput\n optionalTitle={<Link to={`/edit/server/${data.antivirus_system}`}>{i18n['configure']}</Link>}\n title={i18n['Antivirus'] + ' / '}\n name=\"v_antivirus_system\"\n value={data.antivirus_system}\n id=\"antivirus_system\"\n disabled />\n )\n }\n\n {\n data.antispam_system && (\n <TextInput\n optionalTitle={<Link to={`/edit/server/${data.antispam_system}`}>{i18n['configure']}</Link>}\n title={i18n['DNS Server'] + ' / '}\n name=\"v_antispam_system\"\n value={data.antispam_system}\n id=\"antispam_system\"\n disabled />\n )\n }\n\n <TextInput\n title={i18n['Webmail URL']}\n name=\"v_mail_url\"\n value={MAIL_URL}\n id=\"mail-url\" />\n\n <br /><br />\n\n <Checkbox\n onChange={checked => setMailCertificateSystem(checked)}\n title={i18n['Use Web Domain SSL Certificate']}\n name=\"v_mail_ssl_domain_checkbox\"\n id=\"mail-ssl-domain-checkbox\"\n checked={!!data.mail_certificate} />\n\n {\n mailCertificateSystem && (\n <div className=\"mail-cert-info\">\n <SelectInput\n options={getMailCertificateOptions()}\n selected={data.mail_certificate}\n name=\"v_mail_ssl_domain\"\n title={i18n['Domain']}\n id=\"mail-ssl-domain\" />\n\n <div className=\"additional-info\">\n {\n data.sys_ssl_subject && (\n <div>\n <span>{i18n['SUBJECT']}:</span>\n <span>{data.sys_ssl_subject}</span>\n </div>\n )\n }\n\n {\n data.sys_ssl_aliases && (\n <div>\n <span>{i18n['ALIASES']}:</span>\n <span>{data.sys_ssl_aliases}</span>\n </div>\n )\n }\n\n {\n data.sys_ssl_not_before && (\n <div>\n <span>{i18n['NOT_BEFORE']}:</span>\n <span>{data.sys_ssl_not_before}</span>\n </div>\n )\n }\n\n {\n data.sys_ssl_not_after && (\n <div>\n <span>{i18n['NOT_AFTER']}:</span>\n <span>{data.sys_ssl_not_after}</span>\n </div>\n )\n }\n\n {\n data.sys_ssl_signature && (\n <div>\n <span>{i18n['SIGNATURE']}:</span>\n <span>{data.sys_ssl_signature}</span>\n </div>\n )\n }\n\n {\n data.sys_ssl_pub_key && (\n <div>\n <span>{i18n['PUB_KEY']}:</span>\n <span>{data.sys_ssl_pub_key}</span>\n </div>\n )\n }\n\n {\n data.sys_ssl_issuer && (\n <div>\n <span>{i18n['ISSUER']}:</span>\n <span>{data.sys_ssl_issuer}</span>\n </div>\n )\n }\n </div>\n </div>\n )\n }\n </div>\n );\n}\n\nexport default EditMailOption;","import axios from \"axios\";\n\nconst BASE_URL = window.location.origin;\nconst resetPasswordUri = '/api/v1/reset/index.php';\n\nexport const resetPassword = (user = '', code = '', password = '', confirmPassword = '') => {\n const formData = new FormData();\n\n if (password) {\n formData.append('password', password);\n }\n\n if (confirmPassword) {\n formData.append('password_confirm', confirmPassword);\n }\n\n if (user) {\n formData.append('user', user);\n }\n\n if (code) {\n formData.append('code', code);\n }\n\n return axios.post(BASE_URL + resetPasswordUri, formData);\n};\n","import { LOGIN, LOGOUT, LOGGED_OUT_AS, CHECK_AUTH, RESET_PASSWORD } from './sessionTypes';\nimport { checkAuth, signIn, signInAs, signOut } from 'src/services/session';\nimport { resetPassword } from 'src/ControlPanelService/ResetPassword';\nimport { resetAuthToken, setAuthToken } from 'src/utils/token';\nimport { REFRESH_COUNTERS } from '../MenuCounters/menuCounterTypes';\nimport { SET_USER_SESSION } from '../UserSession/userSessionTypes';\nimport { REFRESH_PANEL } from '../Panel/panelTypes';\n\nconst LOGOUT_RESPONSE = 'logged_out';\nconst LOGOUT_AS_RESPONSE = 'logged_out_as';\n\nexport const login = (user, password) => dispatch => {\n return new Promise((resolve, reject) => {\n signIn({ user, password }).then((response) => {\n const { error, session, token, panel, data, user, i18n } = response.data;\n\n if (token) setAuthToken(token);\n\n dispatch({\n type: LOGIN,\n value: {\n token: token || '',\n i18n: i18n || {},\n userName: user,\n error\n },\n });\n dispatch({\n type: REFRESH_PANEL,\n value: {\n panel\n }\n });\n dispatch({\n type: REFRESH_COUNTERS,\n value: {\n user: data,\n }\n });\n dispatch({\n type: SET_USER_SESSION,\n value: session\n });\n resolve(token);\n }, (error) => {\n reject(error);\n });\n });\n}\n\nexport const reset = ({ user = '', code = '', password = '', password_confirm = '' }) => dispatch => {\n return new Promise((resolve, reject) => {\n resetPassword(user, code, password, password_confirm).then((response) => {\n const { error, session, token, panel, user } = response.data;\n\n dispatch({\n type: RESET_PASSWORD,\n value: {\n token,\n userName: user,\n error\n },\n });\n dispatch({\n type: REFRESH_PANEL,\n value: {\n panel\n }\n });\n dispatch({\n type: REFRESH_COUNTERS,\n value: {\n user: {},\n }\n });\n dispatch({\n type: SET_USER_SESSION,\n value: session\n });\n resolve(token);\n }, (error) => {\n reject(error);\n });\n });\n}\n\nexport const loginAs = username => dispatch => {\n return new Promise((resolve, reject) => {\n signInAs(username).then((response) => {\n const { error, token, session, panel, data, user, i18n } = response.data;\n if (token) setAuthToken(token);\n\n dispatch({\n type: LOGIN,\n value: {\n userName: user,\n i18n,\n token,\n error\n }\n });\n dispatch({\n type: REFRESH_PANEL,\n value: {\n panel\n }\n });\n dispatch({\n type: REFRESH_COUNTERS,\n value: {\n user: data,\n }\n });\n dispatch({\n type: SET_USER_SESSION,\n value: session\n });\n\n resolve(token);\n }, (error) => {\n console.error(error);\n reject();\n });\n });\n}\n\nexport const logout = () => (dispatch, getState) => {\n return new Promise((resolve, reject) => {\n signOut().then((response) => {\n const { logout_response, error, userName, user, i18n, session, panel } = response.data;\n\n if (logout_response === LOGOUT_RESPONSE) {\n resetAuthToken();\n\n dispatch({\n type: LOGOUT,\n value: {\n userName: '',\n token: '',\n session: {},\n i18n: [],\n error,\n },\n });\n dispatch({\n type: REFRESH_PANEL,\n value: {\n panel: {}\n }\n });\n dispatch({\n type: REFRESH_COUNTERS,\n value: {\n user: {},\n }\n });\n dispatch({\n type: SET_USER_SESSION,\n value: {}\n });\n\n resolve();\n } else if (logout_response === LOGOUT_AS_RESPONSE) {\n dispatch({\n type: LOGGED_OUT_AS,\n value: {\n userName,\n token: '',\n i18n,\n error,\n },\n });\n dispatch({\n type: REFRESH_PANEL,\n value: {\n panel\n }\n });\n dispatch({\n type: REFRESH_COUNTERS,\n value: {\n user,\n }\n });\n dispatch({\n type: SET_USER_SESSION,\n value: session\n });\n\n resolve();\n } else {\n resolve(`Error while signing out: ${logout_response}`);\n }\n }, (error) => {\n console.error(error);\n reject();\n });\n });\n}\n\nexport const checkAuthHandler = () => (dispatch, getState) => {\n return new Promise((resolve, reject) => {\n checkAuth()\n .then(res => {\n const { user, data, session, panel, error, i18n, token } = res.data;\n\n if (token) setAuthToken(token);\n\n dispatch({\n type: CHECK_AUTH,\n value: {\n userName: user,\n i18n,\n token,\n error\n }\n });\n dispatch({\n type: REFRESH_PANEL,\n value: {\n panel\n }\n });\n dispatch({\n type: REFRESH_COUNTERS,\n value: {\n user: data,\n }\n });\n dispatch({\n type: SET_USER_SESSION,\n value: session\n });\n\n resolve(token);\n })\n .catch(err => {\n reject();\n console.error(err);\n });\n });\n}\n\nexport const refreshUserSession = () => (dispatch, getState) => {\n return new Promise((resolve, reject) => {\n checkAuth()\n .then(res => {\n const { session, token } = res.data;\n\n if (token) setAuthToken(token);\n dispatch({\n type: SET_USER_SESSION,\n value: session\n });\n\n resolve(token);\n })\n .catch(err => {\n reject();\n console.error(err);\n });\n });\n}\n\nexport const removeToken = () => {\n return {\n type: LOGOUT,\n value: {\n token: '',\n error: ''\n }\n }\n}\n","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport { getServerAdditionalInfo, updateService } from '../../../ControlPanelService/Server';\nimport SelectInput from '../../ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport TextInput from '../../ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from '../../../components/Spinner/Spinner';\nimport EditServerWebOption from './EditServerWebOption';\nimport EditServerDnsOption from './EditServerDnsOption';\nimport EditVestaPluginsOption from './EditVestaPlugins';\nimport EditVestaSslOption from './EditVestaSslOption';\nimport EditDatabaseOption from './EditDatabaseOption';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport EditBackupOption from './EditBackupOption';\nimport EditMailOption from './EditMailOption';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './EditServer.scss';\nimport { Helmet } from 'react-helmet';\nimport HtmlParser from 'react-html-parser';\nimport { refreshUserSession } from 'src/actions/Session/sessionActions';\n\nconst EditServer = props => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const { session } = useSelector(state => state.userSession);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n loading: false,\n webOption: false,\n dnsOption: false,\n mailOption: false,\n backupOption: false,\n sslOption: false,\n pluginsOption: false,\n dbOption: false\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/server/'));\n dispatch(removeFocusedElement());\n\n setState({ ...state, loading: true });\n fetchData();\n }, []);\n\n const fetchData = () => {\n getServerAdditionalInfo()\n .then(response => {\n setState({\n ...state,\n data: response.data,\n loading: false\n });\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err);\n });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedServer = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedServer[name] = value;\n }\n\n if (updatedServer['v_backup_type']) {\n updatedServer['v_backup_type'] = updatedServer['v_backup_type'].toLowerCase();\n }\n\n updatedServer['save'] = 'save';\n updatedServer['token'] = token;\n\n if (updatedServer['v_softaculous'] === 'no' && !session['SOFTACULOUS']) {\n delete updatedServer['v_softaculous'];\n }\n\n if (Object.keys(updatedServer).length !== 0 && updatedServer.constructor === Object) {\n setState({ ...state, loading: true });\n\n updateService(updatedServer)\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n if (error_msg) {\n setErrorMessage(error_msg);\n setOkMessage('');\n } else {\n setErrorMessage('');\n setOkMessage(ok_msg);\n }\n }\n })\n .then(() => dispatch(refreshUserSession()).then(() => fetchData()))\n .catch(err => console.error(err));\n }\n }\n\n const toggleOption = option => {\n setState({\n ...state,\n [option]: !state[option]\n });\n }\n\n return (\n <div className=\"edit-template edit-server\">\n <Helmet>\n <title>{`Vesta - ${i18n.SERVER}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Configuring Server']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}\n </span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"edit-server\">\n <TextInput\n value={state.data.hostname}\n title={i18n['Hostname']}\n name=\"v_hostname\"\n id=\"hostname\" />\n\n {\n state.data.timezones && (\n <div className=\"form-group select-group\">\n <label className=\"label-wrapper\" htmlFor=\"timezone\">\n {i18n['Time Zone']}\n </label>\n <select className=\"form-control\" id=\"timezone\" name=\"v_timezone\">\n {\n Object.keys(state.data.timezones).map(key => {\n const value = state.data.timezones[key];\n\n return <option key={key} value={key} selected={state.data.timezone === key}>{value}</option>;\n })\n }\n </select>\n </div>\n )\n }\n\n <SelectInput\n options={state.data.languages}\n selected={state.data.language}\n title={i18n['Default Language']}\n name=\"v_language\"\n id=\"language\" />\n\n <div className=\"modules\">\n <button type=\"button\" onClick={() => toggleOption('webOption')}>\n {i18n['WEB']}\n {state.webOption ? <FontAwesomeIcon icon=\"caret-up\" /> : <FontAwesomeIcon icon=\"caret-down\" />}\n </button>\n\n <EditServerWebOption\n webBackendPool={state.data.web_backend_pool}\n proxySystem={state.data.proxy_system}\n webBackend={state.data.web_backend}\n webSystem={state.data.web_system}\n visible={state.webOption} />\n\n <button type=\"button\" onClick={() => toggleOption('dnsOption')}>\n {i18n['DNS']}\n {state.dnsOption ? <FontAwesomeIcon icon=\"caret-up\" /> : <FontAwesomeIcon icon=\"caret-down\" />}\n </button>\n\n <EditServerDnsOption\n selected={state.data.v_dns_cluster}\n dnsCluster={state.data.dns_cluster}\n dnsSystem={state.data.dns_system}\n visible={state.dnsOption} />\n\n <button type=\"button\" onClick={() => toggleOption('mailOption')}>\n {i18n['MAIL']}\n {state.mailOption ? <FontAwesomeIcon icon=\"caret-up\" /> : <FontAwesomeIcon icon=\"caret-down\" />}\n </button>\n\n <EditMailOption data={state.data} visible={state.mailOption} />\n\n <button type=\"button\" onClick={() => toggleOption('dbOption')}>\n {i18n['DB']}\n {state.dbOption ? <FontAwesomeIcon icon=\"caret-up\" /> : <FontAwesomeIcon icon=\"caret-down\" />}\n </button>\n\n <EditDatabaseOption data={state.data} visible={state.dbOption} />\n\n <button type=\"button\" onClick={() => toggleOption('backupOption')}>\n {i18n['BACKUP']}\n {state.backupOption ? <FontAwesomeIcon icon=\"caret-up\" /> : <FontAwesomeIcon icon=\"caret-down\" />}\n </button>\n\n <EditBackupOption data={state.data} visible={state.backupOption} />\n\n <button type=\"button\" onClick={() => toggleOption('sslOption')}>\n {i18n['Vesta SSL']}\n {state.sslOption ? <FontAwesomeIcon icon=\"caret-up\" /> : <FontAwesomeIcon icon=\"caret-down\" />}\n </button>\n\n <EditVestaSslOption data={state.data} visible={state.sslOption} />\n\n <button type=\"button\" onClick={() => toggleOption('pluginsOption')}>\n {i18n['Vesta Control Panel Plugins']}\n {state.pluginsOption ? <FontAwesomeIcon icon=\"caret-up\" /> : <FontAwesomeIcon icon=\"caret-down\" />}\n </button>\n\n <EditVestaPluginsOption data={state.data} visible={state.pluginsOption} />\n </div>\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/server/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div>\n );\n}\n\nexport default EditServer;\n","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"../../../../actions/MainNavigation/mainNavigationActions\";\nimport Checkbox from '../../../ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport TextArea from '../../../ControlPanel/AddItemLayout/Form/TextArea/TextArea';\nimport { getServiceInfo, updateService } from 'src/ControlPanelService/Server';\nimport AddItemLayout from '../../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from '../../../../components/Spinner/Spinner';\nimport Toolbar from '../../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './Dovecot.scss';\nimport { Helmet } from 'react-helmet';\nimport HtmlParser from 'react-html-parser';\n\nconst Dovecot = () => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n loading: false\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/server/'));\n dispatch(removeFocusedElement());\n\n setState({ ...state, loading: true });\n fetchData();\n }, []);\n\n const fetchData = () => {\n getServiceInfo('dovecot')\n .then(response => {\n if (!response.data.config) {\n history.push('/list/server');\n }\n\n setState({\n ...state,\n data: response.data,\n loading: false\n });\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err);\n });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedService = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedService[name] = value;\n }\n\n if (Object.keys(updatedService).length !== 0 && updatedService.constructor === Object) {\n setState({ ...state, loading: true });\n\n updateService(updatedService, '/dovecot')\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n setErrorMessage(error_msg || '');\n setOkMessage(ok_msg || '');\n }\n })\n .then(() => fetchData())\n .catch(err => console.error(err));\n }\n }\n\n return (\n <div className=\"edit-template edit-dovecot\">\n <Helmet>\n <title>{`Vesta - ${i18n.SERVER}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">\n {i18n['Configuring Server']} / {state.data.service_name}\n </div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}\n </span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"edit-dovecot\">\n <input type=\"hidden\" name=\"save\" value=\"save\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <TextArea\n defaultValue={state.data.config}\n title={state.data.config_path}\n name=\"v_config\"\n id=\"v_config\"\n rows=\"10\" />\n\n <br />\n\n <TextArea\n defaultValue={state.data.config1}\n title={state.data.config_path1}\n name=\"v_config1\"\n id=\"v_config1\"\n rows=\"10\" />\n\n <br />\n\n <TextArea\n defaultValue={state.data.config2}\n title={state.data.config_path2}\n name=\"v_config2\"\n id=\"v_config2\"\n rows=\"10\" />\n\n <br />\n\n <TextArea\n defaultValue={state.data.config3}\n title={state.data.config_path3}\n name=\"v_config3\"\n id=\"v_config3\"\n rows=\"10\" />\n\n <br />\n\n <TextArea\n defaultValue={state.data.config4}\n title={state.data.config_path4}\n name=\"v_config4\"\n id=\"v_config4\"\n rows=\"10\" />\n\n <br />\n\n <TextArea\n defaultValue={state.data.config5}\n title={state.data.config_path5}\n name=\"v_config5\"\n id=\"v_config5\"\n rows=\"10\" />\n\n <br />\n\n <TextArea\n defaultValue={state.data.config6}\n title={state.data.config_path6}\n name=\"v_config6\"\n id=\"v_config6\"\n rows=\"10\" />\n\n <br />\n\n <TextArea\n defaultValue={state.data.config7}\n title={state.data.config_path7}\n name=\"v_config7\"\n id=\"v_config7\"\n rows=\"10\" />\n\n <br />\n\n <TextArea\n defaultValue={state.data.config8}\n title={state.data.config_path8}\n name=\"v_config8\"\n id=\"v_config8\"\n rows=\"10\" />\n\n <br />\n\n <Checkbox\n title={i18n['restart']}\n defaultChecked={true}\n name=\"v_restart\"\n id=\"restart\" />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/server/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div >\n );\n}\n\nexport default Dovecot;","import axios from \"axios\";\nimport { getAuthToken } from \"src/utils/token\";\n\nconst BASE_URL = window.location.origin;\nconst webApiUri = '/api/v1/list/mail/index.php';\nconst addMailApiUri = '/api/v1/add/mail/index.php';\nconst mailInfoUri = '/api/v1/edit/mail/index.php';\nconst updateMailUri = '/api/v1/edit/mail/index.php';\n\nexport const getMailList = () => {\n return axios.get(BASE_URL + webApiUri);\n}\n\nexport const getMailAccountList = domain => {\n return axios.get(`${BASE_URL}${webApiUri}?domain=${domain}`)\n}\n\nexport const getMailAccountInfo = (domain, account) => {\n return axios.get(`${BASE_URL}${mailInfoUri}?domain=${domain}&account=${account}`)\n}\n\nexport const bulkAction = (action, domainNameSystems) => {\n const formData = new FormData();\n formData.append(\"action\", action);\n formData.append(\"token\", getAuthToken());\n\n domainNameSystems.forEach(domainNameSystem => {\n formData.append(\"domain[]\", domainNameSystem);\n });\n\n return axios.post(BASE_URL + '/api/v1/bulk/mail/', formData);\n};\n\nexport const bulkMailAccountAction = (action, domain, accounts = []) => {\n const formData = new FormData();\n formData.append(\"action\", action);\n formData.append(\"token\", getAuthToken());\n formData.append(\"domain\", domain);\n\n accounts.forEach(account => {\n formData.append(\"account[]\", account);\n });\n\n return axios.post(BASE_URL + '/api/v1/bulk/mail/', formData);\n};\n\nexport const handleAction = uri => {\n return axios.get(BASE_URL + uri, {\n params: {\n token: getAuthToken()\n }\n });\n}\n\nexport const addMail = data => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + addMailApiUri, formDataObject);\n}\n\nexport const addMailAccount = (data, domain) => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(`${BASE_URL}${addMailApiUri}?domain=${domain}`, formDataObject);\n}\n\nexport const editMailAccount = (data, domain, account) => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(`${BASE_URL}${updateMailUri}?domain=${domain}&account=${account}`, formDataObject);\n}\n\nexport const getMailInfo = domain => {\n return axios.get(BASE_URL + mailInfoUri, {\n params: {\n domain,\n token: getAuthToken()\n }\n });\n}\n\nexport const updateMail = (data, domain) => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + updateMailUri, formDataObject, {\n params: {\n domain,\n token: getAuthToken()\n }\n });\n}\n\nexport const mailInfoBlockSelectOptions = i18n => [\n {\n value: i18n['Use server hostname'],\n type: 'hostname',\n },\n {\n value: i18n['Use domain hostname'],\n type: 'domain',\n },\n {\n value: i18n['Use STARTTLS'],\n type: 'starttls',\n },\n {\n value: i18n['Use SSL / TLS'],\n type: 'ssl',\n },\n {\n value: i18n['No encryption'],\n type: 'no_encryption',\n }\n];","import React, { useEffect, useState } from 'react';\nimport { useSelector } from 'react-redux';\nimport { Link } from 'react-router-dom';\nimport { mailInfoBlockSelectOptions } from 'src/ControlPanelService/Mail';\n\nimport './MailInfoBlock.scss';\n\nexport default function MailInfoBlock({ webMail, hostName, domain, userName = '', password }) {\n const { i18n } = useSelector(state => state.session);\n const [selectedOption, setSelectedOption] = useState('');\n const [state, setState] = useState({\n imapHostName: hostName,\n smtpHostName: hostName,\n imapEncryption: i18n['STARTTLS'],\n smtpEncryption: i18n['STARTTLS'],\n imapPort: '143',\n smtpPort: '587',\n });\n\n useEffect(() => {\n if (selectedOption === 'hostname') {\n setState({ ...state, imapHostName: hostName, smtpHostName: hostName });\n } else if (selectedOption === \"domain\") {\n setState({ ...state, imapHostName: domain, smtpHostName: domain });\n } else if (selectedOption === \"starttls\") {\n setState({ ...state, imapPort: '143', imapEncryption: 'STARTTLS', smtpPort: '587', smtpEncryption: 'STARTTLS' });\n } else if (selectedOption === \"ssl\") {\n setState({ ...state, imapPort: '993', imapEncryption: 'SSL / TLS', smtpPort: '465', smtpEncryption: 'SSL / TLS' });\n } else if (selectedOption === \"no_encryption\") {\n setState({\n ...state,\n imapHostName: domain,\n smtpHostName: domain,\n imapPort: '143',\n smtpPort: '25',\n imapEncryption: i18n['No encryption'],\n smtpEncryption: i18n['No encryption']\n });\n }\n }, [selectedOption]);\n\n const renderSelectOptions = () => {\n const options = mailInfoBlockSelectOptions(i18n);\n return options.map(option =>\n <option key={option.type} value={option.type}>{option.value}</option>\n );\n }\n\n const getCredentials = () => {\n let result = '';\n\n result += `${i18n['Username']}:${userName}@${domain}\\n`;\n result += `${i18n['Password']}:${password}\\n`;\n result += `${i18n['IMAP hostname']}:${state.imapHostName}\\n`;\n result += `${i18n['IMAP port']}:${state.imapPort}\\n`;\n result += `${i18n['IMAP security']}:${state.imapEncryption}\\n`;\n result += `${i18n['IMAP auth method']}:${i18n['Normal password']}\\n`;\n result += `${i18n['SMTP hostname']}:${state.smtpHostName}\\n`;\n result += `${i18n['SMTP port']}:${state.smtpPort}\\n`;\n result += `${i18n['SMTP security']}:${state.smtpEncryption}\\n`;\n result += `${i18n['SMTP auth method']}:${i18n['Normal password']}\\n`;\n result += `${i18n['Webmail URL']}:${`http://${window.location.hostname}${webMail}`}\\n`;\n\n return result;\n }\n\n return (\n <div className=\"mail-info-block\">\n <div class=\"form-group select-group\">\n <select class=\"form-control\" onChange={event => setSelectedOption(event.target.value)}>\n {renderSelectOptions()}\n </select>\n\n <div className=\"details\">\n <div>\n <span>{i18n['Username']}:</span>\n <span>{`${userName}@${domain}`}</span>\n </div>\n\n <div>\n <span>{i18n['Password']}:</span>\n <span>{password || '******'}</span>\n </div>\n\n <div>\n <span>{i18n['IMAP hostname']}:</span>\n <span>{state.imapHostName}</span>\n </div>\n\n <div>\n <span>{i18n['IMAP port']}:</span>\n <span>{state.imapPort}</span>\n </div>\n\n <div>\n <span>{i18n['IMAP security']}:</span>\n <span>{state.imapEncryption}</span>\n </div>\n\n <div>\n <span>{i18n['IMAP auth method']}:</span>\n <span>{i18n['Normal password']}</span>\n </div>\n\n <div>\n <span>{i18n['SMTP hostname']}:</span>\n <span>{state.smtpHostName}</span>\n </div>\n\n <div>\n <span>{i18n['SMTP port']}:</span>\n <span>{state.smtpPort}</span>\n </div>\n\n <div>\n <span>{i18n['SMTP security']}:</span>\n <span>{state.smtpEncryption}</span>\n </div>\n\n <div>\n <span>{i18n['SMTP auth method']}:</span>\n <span>{i18n['Normal password']}</span>\n </div>\n\n <div>\n <span>{i18n['Webmail URL']}:</span>\n <span><Link to={{ pathname: `http://${window.location.hostname}${webMail}` }} target=\"_blank\">{webMail}</Link></span>\n </div>\n\n <input type=\"hidden\" name=\"v_credentials\" value={getCredentials()} />\n </div>\n </div>\n </div>\n );\n}","import React, { useEffect, useState } from 'react';\n\nimport TextInputWithExtraButton from 'src/components/ControlPanel/AddItemLayout/Form/TextInputWithExtraButton/TextInputWithExtraButton';\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport TextInput from 'src/components/ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport Password from 'src/components/ControlPanel/AddItemLayout/Form/Password/Password';\nimport TextArea from 'src/components/ControlPanel/AddItemLayout/Form/TextArea/TextArea';\nimport Checkbox from 'src/components/ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport { editMailAccount, getMailAccountInfo } from '../../../ControlPanelService/Mail';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport MailInfoBlock from '../MailInfoBlock/MailInfoBlock';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport Spinner from '../../Spinner/Spinner';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nexport default function EditMailAccount(props) {\n const [autoreplyChecked, setAutoreplyChecked] = useState(false);\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const dispatch = useDispatch();\n const history = useHistory();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n quotaValue: '',\n loading: false,\n password: ''\n });\n\n useEffect(() => {\n dispatch(addActiveElement(`/list/mail/`));\n dispatch(removeFocusedElement());\n setState({ ...state, loading: true });\n\n fetchData();\n }, []);\n\n const submitFormHandler = event => {\n event.preventDefault();\n let newMailDomain = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n newMailDomain[name] = value;\n }\n\n newMailDomain['v_domain'] = props.domain;\n newMailDomain['v_account'] = props.account;\n newMailDomain['Password'] = newMailDomain['v_password'];\n\n if (Object.keys(newMailDomain).length !== 0 && newMailDomain.constructor === Object) {\n setState({ ...state, loading: true });\n editMailAccount(newMailDomain, props.domain, props.account)\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n if (error_msg) {\n setErrorMessage(error_msg);\n setOkMessage('');\n setState({ ...state, loading: false });\n } else {\n dispatch(refreshCounters()).then(() => {\n setErrorMessage('');\n setOkMessage(ok_msg);\n setState({ ...state, loading: false });\n });\n }\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const fetchData = () => {\n setState({ ...state, loading: true });\n\n getMailAccountInfo(props.domain, props.account)\n .then(response => {\n setState({\n ...state,\n data: response.data,\n loading: false\n });\n\n setAutoreplyChecked(response.data.autoreply === 'yes');\n })\n .catch(err => console.error(err));\n }\n\n const toggleQuota = () => {\n const value = state.data.quota === 'unlimited' ? '1000' : 'unlimited';\n setState({ ...state, data: { ...state.data, quota: value } });\n }\n\n const goBack = () => {\n history.push(`/list/mail/?domain=${props.domain}`);\n }\n\n return (\n <div className=\"edit-template add-mail-account\">\n <Helmet>\n <title>{`Vesta - ${i18n.MAIL}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Editing Mail Account']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n {errorMessage}</span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> : (\n <form onSubmit={event => submitFormHandler(event)}>\n <input type=\"hidden\" name=\"save\" value=\"save\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <div className=\"r-1\">\n <div className=\"c-1\">\n <TextInput\n title={i18n['Domain']}\n value={props.domain}\n name=\"v_domain\"\n id=\"domain\"\n disabled />\n\n <Password name=\"v_password\" onChange={password => setState({ ...state, password })} />\n\n <TextInputWithExtraButton title={i18n['Quota']} optionalTitle={i18n['in megabytes']} id=\"quota\" name=\"v_quota\" value={state.data.quota}>\n <button type=\"button\" onClick={toggleQuota}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextArea\n optionalTitle={`${i18n['use local-part']}`}\n defaultValue={state.data.aliases}\n title={i18n['Aliases']}\n name=\"v_aliases\"\n id=\"aliases\" />\n\n <TextArea\n optionalTitle={`${i18n['one or more email addresses']}`}\n defaultValue={state.data.fwd}\n title={i18n['Forward to']}\n name=\"v_fwd\"\n id=\"fwd\" />\n\n <Checkbox\n title={i18n['Do not store forwarded mail']}\n defaultChecked={state.data.fwd_only === 'yes'}\n name=\"v_fwd_only\"\n id=\"fwd_only\" />\n\n <Checkbox\n title={i18n['Autoreply']}\n checked={autoreplyChecked}\n onChange={checked => setAutoreplyChecked(checked)}\n name=\"v_autoreply\"\n id=\"autoreply\" />\n\n {\n autoreplyChecked && (\n <div style={{ transform: 'translateX(3rem)' }}>\n <TextArea\n defaultValue={state.data.autoreply_message}\n title={i18n['Message']}\n name=\"v_autoreply_message\"\n id=\"autoreply_message\" />\n </div>\n )\n }\n\n <TextInput\n title={i18n['Send login credentials to email address']}\n value={state.data.send_email}\n name=\"v_credentials\"\n id=\"credentials\" />\n </div>\n\n <div className=\"c-2\">\n <MailInfoBlock\n webMail={state.data.webmail}\n hostName={state.data.hostname}\n userName={props.account}\n password={state.password}\n domain={props.domain} />\n </div>\n </div>\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={goBack}>{i18n.Back}</button>\n </div>\n </form>\n )}\n </AddItemLayout>\n </div>\n );\n}","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport TextInput from '../../ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport Checkbox from '../../ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport { getMailInfo, updateMail } from '../../../ControlPanelService/Mail';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from '../../../components/Spinner/Spinner';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\nimport QS from 'qs';\n\nimport './EditMail.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nconst EditMail = props => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n loading: false\n });\n\n useEffect(() => {\n let queryParams = QS.parse(history.location.search, { ignoreQueryPrefix: true });\n const { domain } = queryParams;\n\n dispatch(addActiveElement('/list/mail/'));\n dispatch(removeFocusedElement());\n\n if (domain) {\n setState({ ...state, loading: true });\n fetchData(domain);\n }\n }, []);\n\n const fetchData = domain => {\n getMailInfo(domain)\n .then(response => {\n setState({\n ...state,\n data: response.data,\n loading: false\n });\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err);\n });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedDomain = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedDomain[name] = value;\n }\n\n updatedDomain['v_domain'] = state.data.domain;\n\n if (Object.keys(updatedDomain).length !== 0 && updatedDomain.constructor === Object) {\n setState({ ...state, loading: true });\n\n updateMail(updatedDomain, state.data.domain)\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n if (error_msg) {\n setErrorMessage(error_msg);\n setOkMessage('');\n } else {\n dispatch(refreshCounters()).then(() => {\n setErrorMessage('');\n setOkMessage(ok_msg);\n });\n }\n }\n })\n .then(() => fetchData(state.data.domain))\n .catch(err => console.error(err));\n }\n }\n\n return (\n <div className=\"edit-template edit-mail\">\n <Helmet>\n <title>{`Vesta - ${i18n.MAIL}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Editing Mail Domain']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}\n </span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout date={state.data.date} time={state.data.time} status={state.data.status}>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"edit-mail\">\n <input type=\"hidden\" name=\"save\" value=\"save\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <TextInput id=\"domain\" name=\"v_domain\" title={i18n['Domain']} value={state.data.domain} disabled />\n\n <Checkbox\n name=\"v_antispam\"\n id=\"antispam\"\n title={i18n['AntiSpam Support']}\n defaultChecked={state.data.antispam === 'yes'} />\n\n <Checkbox\n name=\"v_antivirus\"\n id=\"antivirus\"\n title={i18n['AntiVirus Support']}\n defaultChecked={state.data.antivirus === 'yes'} />\n\n <Checkbox\n name=\"v_dkim\"\n id=\"dkim\"\n title={i18n['DKIM Support']}\n defaultChecked={state.data.dkim === 'yes'} />\n\n <TextInput id=\"catchall\" name=\"v_catchall\" title={i18n['Catchall email']} value={state.data.catchall} />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/mail/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div>\n );\n}\n\nexport default EditMail;","import React, { useEffect, useState } from 'react';\nimport EditMailAccount from 'src/components/MailAccount/Edit/EditMailAccount';\nimport EditMail from 'src/components/Mail/Edit/EditMail';\nimport { useHistory } from 'react-router-dom';\nimport QueryString from 'qs';\nimport { Helmet } from 'react-helmet';\nimport { useSelector } from 'react-redux';\n\nexport default function EditMailWrapper() {\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const parsedQueryString = QueryString.parse(history.location.search, { ignoreQueryPrefix: true });\n const [isMailAccount, setIsMailAccount] = useState(false);\n\n useEffect(() => {\n if (parsedQueryString.domain && parsedQueryString.account) {\n setIsMailAccount(true);\n } else {\n setIsMailAccount(false);\n }\n }, [history.location]);\n\n return (\n <>\n <Helmet>\n <title>{`Vesta - ${i18n.MAIL}`}</title>\n </Helmet>\n {\n isMailAccount\n ? <EditMailAccount domain={parsedQueryString.domain} account={parsedQueryString.account} />\n : <EditMail />\n }\n </>\n );\n}","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"../../../../actions/MainNavigation/mainNavigationActions\";\nimport Checkbox from '../../../ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport TextArea from '../../../ControlPanel/AddItemLayout/Form/TextArea/TextArea';\nimport AddItemLayout from '../../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { getServiceInfo, updateService } from 'src/ControlPanelService/Server';\nimport Spinner from '../../../../components/Spinner/Spinner';\nimport Toolbar from '../../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './Service.scss';\nimport { Helmet } from 'react-helmet';\nimport HtmlParser from 'react-html-parser';\n\nconst Service = ({ serviceName = '' }) => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n loading: false\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/server/'));\n dispatch(removeFocusedElement());\n\n if (!serviceName) {\n history.push('/list/server');\n }\n\n setState({ ...state, loading: true });\n fetchData(serviceName);\n }, []);\n\n const fetchData = serviceName => {\n getServiceInfo(serviceName)\n .then(response => {\n const { config } = response.data;\n\n if (!config || config.includes(\"file doesn't exist\")) {\n history.push('/list/server');\n }\n\n setState({ ...state, data: response.data, loading: false });\n })\n .catch(err => console.error(err));\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedService = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedService[name] = value;\n }\n\n if (Object.keys(updatedService).length !== 0 && updatedService.constructor === Object) {\n setState({ ...state, loading: true });\n\n updateService(updatedService, serviceName)\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n setErrorMessage(error_msg || '');\n setOkMessage(ok_msg || '');\n }\n })\n .then(() => fetchData(serviceName))\n .catch(err => console.error(err));\n }\n }\n\n return (\n <div className=\"edit-template edit-service\">\n <Helmet>\n <title>{`Vesta - ${i18n.SERVER}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">\n {i18n['Configuring Server']} / {state.data.service_name}\n </div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}\n </span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"edit-service\">\n <input type=\"hidden\" name=\"save\" value=\"save\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <TextArea\n defaultValue={state.data.config}\n title={state.data.config_path}\n name=\"v_config\"\n id=\"v_config\"\n rows=\"18\" />\n\n <br />\n\n <Checkbox\n title={i18n['restart']}\n defaultChecked={true}\n name=\"v_restart\"\n id=\"restart\" />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/server/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div >\n );\n}\n\nexport default Service;","import React, { useEffect, useState } from 'react';\n\nimport TextInputWithExtraButton from 'src/components/ControlPanel/AddItemLayout/Form/TextInputWithExtraButton/TextInputWithExtraButton';\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport TextInput from 'src/components/ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport Password from 'src/components/ControlPanel/AddItemLayout/Form/Password/Password';\nimport TextArea from 'src/components/ControlPanel/AddItemLayout/Form/TextArea/TextArea';\nimport Checkbox from 'src/components/ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { addMailAccount, getMailList } from '../../../ControlPanelService/Mail';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport MailInfoBlock from '../MailInfoBlock/MailInfoBlock';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport Spinner from '../../Spinner/Spinner';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './AddMailAccount.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nexport default function AddMailAccount(props) {\n const { i18n } = useSelector(state => state.session);\n const dispatch = useDispatch();\n const token = localStorage.getItem(\"token\");\n const history = useHistory();\n const [state, setState] = useState({\n data: {},\n advancedOptions: false,\n autoreplyChecked: false,\n quotaValue: '',\n loading: false,\n password: '',\n userName: '',\n okMessage: '',\n errorMessage: '',\n });\n\n useEffect(() => {\n dispatch(addActiveElement(`/list/mail/`));\n dispatch(removeFocusedElement());\n\n fetchData();\n }, []);\n\n const submitFormHandler = event => {\n event.preventDefault();\n let newMailDomain = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) { \n newMailDomain[name] = value;\n }\n\n newMailDomain['ok_acc'] = 'add';\n newMailDomain['token'] = token;\n newMailDomain['v_domain'] = props.domain;\n newMailDomain['v_password'] = state.password;\n\n if (!newMailDomain['v_quota']) newMailDomain['v_quota'] = '';\n if (!newMailDomain['v_aliases']) newMailDomain['v_aliases'] = '';\n if (!newMailDomain['v_fwd']) newMailDomain['v_fwd'] = '';\n\n if (Object.keys(newMailDomain).length !== 0 && newMailDomain.constructor === Object) {\n setState({ ...state, loading: true });\n addMailAccount(newMailDomain, props.domain)\n .then(result => {\n if (result.status === 200) {\n const { error_msg: errorMessage, ok_msg: okMessage } = result.data;\n\n if (errorMessage) {\n setState({ ...state, errorMessage, okMessage, loading: false });\n } else {\n dispatch(refreshCounters()).then(() => {\n setState({ ...state, okMessage, errorMessage: '', loading: false });\n });\n }\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const fetchData = () => {\n setState({ ...state, loading: true });\n\n getMailList()\n .then(response => {\n setState({\n ...state,\n data: response.data,\n errorMessage: response.data['error_msg'],\n okMessage: response.data['ok_msg'],\n loading: false\n });\n })\n .catch(err => console.error(err));\n }\n\n const toggleOptions = () => {\n setState({ ...state, advancedOptions: !state.advancedOptions });\n }\n\n const toggleQuotaValue = () => {\n if (state.quotaValue !== 'unlimited') {\n setState({ ...state, quotaValue: 'unlimited' });\n } else {\n setState({ ...state, quotaValue: '' });\n }\n }\n\n return (\n <div className=\"edit-template add-mail-account\">\n <Helmet>\n <title>{`Vesta - ${i18n.MAIL}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Adding Mail Account']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {state.errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n {state.errorMessage}</span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {state.okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n <span>{HtmlParser(state.okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> : (\n <form onSubmit={event => submitFormHandler(event)}>\n <div className=\"r-1\">\n <div className=\"c-1\">\n <TextInput\n title={i18n['Domain']}\n value={props.domain}\n name=\"v_domain\"\n id=\"domain\"\n disabled />\n\n <TextInput\n title={i18n['Account']}\n onChange={e => setState({ ...state, userName: e.target.value })}\n name=\"v_account\"\n id=\"account\" />\n\n <Password name=\"v_password\" onChange={password => setState({ ...state, password })} />\n </div>\n\n <div className=\"c-2\">\n <MailInfoBlock\n webMail={state.data.webmail}\n hostName={state.data.hostname}\n userName={state.userName}\n password={state.password}\n domain={props.domain} />\n </div>\n </div>\n\n <div className=\"r-2\">\n <button type=\"button\" onClick={toggleOptions}>\n {i18n['Advanced options']}\n {state.advancedOptions ? <FontAwesomeIcon icon=\"caret-up\" /> : <FontAwesomeIcon icon=\"caret-down\" />}\n </button>\n\n {\n state.advancedOptions && (\n <>\n <TextInputWithExtraButton title={i18n['Quota']} optionalTitle={i18n['in megabytes']} id=\"quota\" name=\"v_quota\" value={state.quotaValue}>\n <button type=\"button\" onClick={toggleQuotaValue}>\n <FontAwesomeIcon icon=\"infinity\" />\n </button>\n </TextInputWithExtraButton>\n\n <TextArea\n optionalTitle={`${i18n['use local-part']}`}\n defaultValue={state.data.v_aliases}\n title={i18n['Aliases']}\n name=\"v_aliases\"\n id=\"aliases\" />\n\n <TextArea\n optionalTitle={`${i18n['one or more email addresses']}`}\n defaultValue={state.data.forward}\n title={i18n['Forward to']}\n name=\"v_fwd\"\n id=\"fwd\" />\n\n <Checkbox\n title={i18n['Do not store forwarded mail']}\n name=\"v_fwd_only\"\n id=\"fwd_only\" />\n </>\n )\n }\n\n <TextInput\n title={i18n['Send login credentials to email address']}\n name=\"v_send_email\"\n id=\"send_email\" />\n </div>\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Add}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push(`/list/mail/?domain=${props.domain}`)}>{i18n.Back}</button>\n </div>\n </form>\n )}\n </AddItemLayout>\n </div>\n );\n}","import React, { useEffect, useState } from 'react';\n\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { addMail } from '../../../ControlPanelService/Mail';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport Spinner from '../../Spinner/Spinner';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './AddMail.scss'\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nconst AddMail = props => {\n const { i18n } = useSelector(state => state.session);\n const dispatch = useDispatch();\n const token = localStorage.getItem(\"token\");\n const history = useHistory();\n const [state, setState] = useState({\n loading: false,\n antiSpamChecked: true,\n antiVirusChecked: true,\n dkimChecked: true,\n okMessage: '',\n errorMessage: '',\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/mail/'));\n dispatch(removeFocusedElement());\n }, []);\n\n const submitFormHandler = event => {\n event.preventDefault();\n let newMailDomain = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n newMailDomain[name] = value;\n }\n\n if (Object.keys(newMailDomain).length !== 0 && newMailDomain.constructor === Object) {\n setState({ ...state, loading: true });\n addMail(newMailDomain)\n .then(result => {\n if (result.status === 200) {\n const { error_msg: errorMessage, ok_msg: okMessage } = result.data;\n\n if (errorMessage) {\n setState({ ...state, errorMessage, okMessage, loading: false });\n } else {\n dispatch(refreshCounters()).then(() => {\n setState({ ...state, okMessage, errorMessage: '', loading: false });\n });\n }\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n return (\n <div className=\"edit-template add-web\">\n <Helmet>\n <title>{`Vesta - ${i18n.MAIL}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Adding Mail Domain']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {state.errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n {state.errorMessage}</span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {state.okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n <span>{HtmlParser(state.okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> : (\n <form onSubmit={event => submitFormHandler(event)}>\n <input type=\"hidden\" name=\"ok\" value=\"add\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <div className=\"form-group\">\n <label htmlFor=\"domain\">{i18n.Domain}</label>\n <input type=\"text\" className=\"form-control\" id=\"domain\" name=\"v_domain\" />\n </div>\n\n <div className=\"form-group\">\n <div className=\"checkbox-wrapper\">\n <input\n type=\"checkbox\"\n name=\"v_antispam\"\n id=\"antispam-support\"\n onChange={event => setState({ ...state, antiSpamChecked: event.target.checked })}\n checked={state.antiSpamChecked} />\n <label htmlFor=\"antispam-support\">{i18n['AntiSpam Support']}</label>\n </div>\n </div>\n\n <div className=\"form-group\">\n <div className=\"checkbox-wrapper\">\n <input\n type=\"checkbox\"\n name=\"v_antivirus\"\n id=\"antivirus-support\"\n onChange={event => setState({ ...state, antiVirusChecked: event.target.checked })}\n checked={state.antiVirusChecked} />\n <label htmlFor=\"antivirus-support\">{i18n['AntiVirus Support']}</label>\n </div>\n </div>\n\n <div className=\"form-group\">\n <div className=\"checkbox-wrapper\">\n <input\n type=\"checkbox\"\n name=\"v_dkim\"\n id=\"dkim-support\"\n onChange={event => setState({ ...state, dkimChecked: event.target.checked })}\n checked={state.dkimChecked} />\n <label htmlFor=\"dkim-support\">{i18n['DKIM Support']}</label>\n </div>\n </div>\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Add}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/mail/')}>{i18n.Back}</button>\n </div>\n </form>\n )}\n </AddItemLayout>\n </div>\n );\n}\n\nexport default AddMail;","import React, { useEffect, useState } from 'react';\nimport AddMailAccount from 'src/components/MailAccount/Add/AddMailAccount';\nimport AddMail from 'src/components/Mail/Add/AddMail';\nimport { useHistory } from 'react-router-dom';\nimport QueryString from 'qs';\nimport { Helmet } from 'react-helmet';\nimport { useSelector } from 'react-redux';\n\nexport default function AddMailWrapper() {\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const [domain, setDomain] = useState(false);\n\n useEffect(() => {\n const parsedQueryString = QueryString.parse(history.location.search, { ignoreQueryPrefix: true });\n\n if (parsedQueryString.domain) {\n setDomain(parsedQueryString.domain);\n } else {\n setDomain('');\n }\n }, [history.location]);\n\n return (\n <>\n <Helmet>\n <title>{`Vesta - ${i18n.MAIL}`}</title>\n </Helmet>\n {\n domain\n ? <AddMailAccount domain={domain} />\n : <AddMail />\n }\n </>\n );\n}","import axios from \"axios\";\nimport { getAuthToken } from \"src/utils/token\";\n\nconst updateDNSUri = '/api/v1/edit/dns/index.php';\nconst addDnsApiUri = '/api/v1/add/dns/index.php';\nconst dNSInfoUri = '/api/v1/edit/dns/index.php';\nconst BASE_URL = window.location.origin;\nconst dnsApiUri = '/api/v1/list/dns/index.php';\n\nexport const getDnsList = () => {\n return axios.get(BASE_URL + dnsApiUri);\n}\n\nexport const getDNSRecordsList = domain => {\n return axios.get(`${BASE_URL}${dnsApiUri}?domain=${domain}`);\n}\n\nexport const getDNSRecordInfo = (domain, recordId) => {\n return axios.get(`${BASE_URL}${updateDNSUri}?domain=${domain}&record_id=${recordId}`);\n}\n\nexport const bulkDomainAction = (action, domains) => {\n const formData = new FormData();\n formData.append(\"action\", action);\n formData.append(\"token\", getAuthToken());\n\n domains.forEach(record => {\n formData.append(\"domain[]\", record);\n });\n\n return axios.post(BASE_URL + '/api/v1/bulk/dns/', formData);\n};\n\nexport const bulkAction = (action, records, domain) => {\n const formData = new FormData();\n formData.append(\"action\", action);\n formData.append(\"token\", getAuthToken());\n formData.append(\"domain\", domain);\n\n records.forEach(record => {\n formData.append(\"record[]\", record);\n });\n\n return axios.post(BASE_URL + '/api/v1/bulk/dns/', formData);\n};\n\nexport const handleAction = uri => {\n return axios.get(BASE_URL + uri, {\n params: {\n token: getAuthToken()\n }\n });\n}\n\nexport const addDomainNameSystem = data => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + addDnsApiUri, formDataObject);\n}\n\nexport const addDomainNameSystemRecord = data => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + addDnsApiUri, formDataObject);\n}\n\nexport const getDNSInfo = domain => {\n return axios.get(BASE_URL + dNSInfoUri, {\n params: {\n domain,\n token: getAuthToken()\n }\n });\n}\n\nexport const updateDNS = (data, domain, recordId) => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + updateDNSUri, formDataObject, {\n params: {\n domain,\n record_id: recordId,\n token: getAuthToken()\n }\n });\n}","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport SelectInput from '../../ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport TextInput from '../../ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { getDNSInfo, updateDNS } from '../../../ControlPanelService/Dns';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from '../../../components/Spinner/Spinner';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\nimport QS from 'qs';\n\nimport './EditDomainNameSystem.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nconst EditDomainNameSystem = props => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n loading: false\n });\n\n useEffect(() => {\n let queryParams = QS.parse(history.location.search, { ignoreQueryPrefix: true });\n const { domain } = queryParams;\n\n dispatch(addActiveElement('/list/dns/'));\n dispatch(removeFocusedElement());\n\n if (domain) {\n setState({ ...state, loading: true });\n fetchData(domain);\n }\n }, []);\n\n const fetchData = domain => {\n getDNSInfo(domain)\n .then(response => {\n setState({\n ...state,\n data: response.data,\n loading: false\n });\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err)\n });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedDomain = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedDomain[name] = value;\n }\n\n updatedDomain['v_domain'] = state.data.domain;\n\n if (Object.keys(updatedDomain).length !== 0 && updatedDomain.constructor === Object) {\n setState({ ...state, loading: true });\n\n updateDNS(updatedDomain, state.data.domain)\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n if (error_msg) {\n setErrorMessage(error_msg);\n setOkMessage('');\n } else {\n dispatch(refreshCounters()).then(() => {\n setErrorMessage('');\n setOkMessage(ok_msg);\n });\n }\n }\n })\n .then(() => fetchData(state.data.domain))\n .catch(err => console.error(err));\n }\n }\n\n return (\n <div className=\"edit-template edit-dns\">\n <Helmet>\n <title>{`Vesta - ${i18n.DNS}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Editing DNS Domain']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}\n </span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout date={state.data.date} time={state.data.time} status={state.data.status}>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"edit-dns\">\n <input type=\"hidden\" name=\"save\" value=\"save\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <TextInput id=\"domain\" name=\"v_domain\" title={i18n['Domain']} value={state.data.domain} disabled />\n\n <TextInput id=\"ip\" name=\"v_ip\" title={i18n['IP Address']} value={state.data.ip} />\n\n <SelectInput\n optionalTitle={state.data.dns_system}\n options={state.data.templates}\n selected={state.data.template}\n title={i18n['Template']}\n name=\"v_template\"\n id=\"templates\" />\n\n <TextInput\n optionalTitle={state.data['YYYY-MM-DD']}\n title={i18n['Expiration Date']}\n value={state.data.exp}\n name=\"v_exp\"\n id=\"exp\" />\n\n <TextInput id=\"soa\" name=\"v_soa\" title=\"SOA\" value={state.data.soa} />\n\n <TextInput id=\"ttl\" name=\"v_ttl\" title=\"TTL\" value={state.data.ttl} />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/dns/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div>\n );\n}\n\nexport default EditDomainNameSystem;","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport SelectInput from 'src/components/ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport TextInput from '../../ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { updateDNS, getDNSRecordInfo } from 'src/ControlPanelService/Dns';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from '../../../components/Spinner/Spinner';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\nimport QS from 'qs';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nexport default function EditDNSRecord(props) {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const dispatch = useDispatch();\n const history = useHistory();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n selectOptions: [\n 'A',\n 'AAAA',\n 'NS',\n 'CNAME',\n 'MX',\n 'TXT',\n 'SRV',\n 'DNSKEY',\n 'KEY',\n 'IPSECKEY',\n 'PTR',\n 'SPF',\n 'TLSA',\n 'CAA'\n ],\n loading: false\n });\n\n useEffect(() => {\n const { domain, record_id } = props;\n\n dispatch(addActiveElement('/list/dns/'));\n dispatch(removeFocusedElement());\n\n if (domain && record_id) {\n setState({ ...state, loading: true });\n fetchData(domain, record_id);\n }\n }, []);\n\n const fetchData = (domain, record_id) => {\n getDNSRecordInfo(domain, record_id)\n .then(response => {\n setState({\n ...state,\n data: response.data,\n loading: false\n });\n })\n .catch(err => console.error(err));\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedRecord = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedRecord[name] = value;\n }\n\n updatedRecord['v_domain'] = state.data.domain;\n updatedRecord['v_record_id'] = props.record_id;\n updatedRecord['v_type'] = state.data.type;\n\n if (Object.keys(updatedRecord).length !== 0 && updatedRecord.constructor === Object) {\n setState({ ...state, loading: true });\n\n updateDNS(updatedRecord, props.domain, props.record_id)\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n if (error_msg) {\n setOkMessage('');\n setErrorMessage(error_msg);\n } else {\n dispatch(refreshCounters()).then(() => {\n setOkMessage(ok_msg);\n setErrorMessage('');\n });\n }\n }\n })\n .then(() => fetchData(props.domain, props.record_id))\n .catch(err => console.error(err));\n }\n }\n\n return (\n <div className=\"edit-template edit-dns-rec\">\n <Helmet>\n <title>{`Vesta - ${i18n.DNS}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Editing DNS Record']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}\n </span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout date={state.data.date} time={state.data.time} status={state.data.status}>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"edit-dns-rec\">\n <input type=\"hidden\" name=\"save\" value=\"save\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <TextInput\n title={i18n['Domain']}\n value={props.domain}\n name=\"v_domain\"\n id=\"domain\"\n disabled />\n\n <TextInput\n value={state.data.rec}\n title={i18n['Record']}\n name=\"v_record_id\"\n id=\"domain\"\n disabled />\n\n <SelectInput\n options={state.selectOptions}\n selected={state.data.type}\n title={i18n['Type']}\n name=\"v_type\"\n id=\"type\"\n disabled />\n\n <TextInput\n title={i18n['IP or Value']}\n value={state.data.val}\n name=\"v_val\"\n id=\"val\" />\n\n <TextInput\n optionalTitle={`(${i18n['optional']})`}\n value={state.data.priority}\n title={i18n['Priority']}\n name=\"v_priority\"\n id=\"priority\" />\n\n <TextInput\n optionalTitle={`(${i18n['internal']})`}\n title={i18n['Record Number']}\n value={state.data.record_id}\n name=\"v_priority\"\n id=\"priority\" />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push(`/list/dns?domain=${props.domain}`)}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div>\n );\n}","import React, { useEffect, useState } from 'react';\nimport EditDomainNameSystem from 'src/components/DomainNameSystem/Edit/EditDomainNameSystem';\nimport EditDNSRecord from 'src/components/DNSRecord/Edit/EditDNSRecord';\nimport { useHistory } from 'react-router-dom';\nimport QueryString from 'qs';\nimport { Helmet } from 'react-helmet';\nimport { useSelector } from 'react-redux';\n\nexport default function EditDNSWrapper() {\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const parsedQueryString = QueryString.parse(history.location.search, { ignoreQueryPrefix: true });\n const [isDnsRecord, setIsDnsRecord] = useState(false);\n\n useEffect(() => {\n if (parsedQueryString.domain && parsedQueryString.record_id) {\n setIsDnsRecord(true);\n } else {\n setIsDnsRecord(false);\n }\n }, [history.location]);\n\n return (\n <>\n <Helmet>\n <title>{`Vesta - ${i18n.DNS}`}</title>\n </Helmet>\n {\n isDnsRecord\n ? <EditDNSRecord domain={parsedQueryString.domain} record_id={parsedQueryString.record_id} />\n : <EditDomainNameSystem />\n }\n </>\n );\n}","import React, { useEffect, useState } from 'react';\nimport { useSelector } from 'react-redux';\nimport Checkbox from '../../../ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport TextArea from '../../../ControlPanel/AddItemLayout/Form/TextArea/TextArea';\n\nimport './SslSupport.scss';\n\nconst SslSupport = props => {\n const { i18n } = useSelector(state => state.session);\n const [letsEncrypt, setLetsEncrypt] = useState(props.letsEncrypt);\n\n useEffect(() => {\n setLetsEncrypt(props.letsEncrypt);\n }, []);\n\n const onChangeLetsEncrypt = checked => {\n setLetsEncrypt(checked);\n }\n\n return (\n <div className=\"ssl-support\">\n <>\n <Checkbox\n onChange={onChangeLetsEncrypt}\n name=\"v_letsencrypt\"\n id=\"lets-encrypt\"\n title={i18n['Lets Encrypt Support']}\n defaultChecked={letsEncrypt} />\n\n {!props.letsEncrypt && <span className=\"lets-encrypt-span\">{letsEncrypt ? i18n['Your certificate will be automatically issued in 5 minutes'] : null}</span>}\n </>\n\n <input type=\"hidden\" value=\"same\" name=\"v_ssl_home\" />\n\n <TextArea\n id=\"ssl-certificate\"\n name=\"v_ssl_crt\"\n title={i18n['SSL Certificate']}\n defaultValue={props.sslCertificate}\n disabled={letsEncrypt}\n optionalTitle={<>/ <button type=\"button\" onClick={() => props.setModalVisible(true)} className=\"generate-csr\">{i18n['Generate CSR']}</button></>} />\n\n <TextArea\n id=\"ssl-key\"\n name=\"v_ssl_key\"\n disabled={letsEncrypt}\n defaultValue={props.sslKey}\n title={i18n['SSL Key']} />\n\n <TextArea\n id=\"ssl-ca\"\n name=\"v_ssl_ca\"\n disabled={letsEncrypt}\n defaultValue={props.sslCertificateAuthority}\n title={i18n['SSL Certificate Authority / Intermediate']}\n optionalTitle={`( ${i18n['optional']} )`} />\n\n <div className=\"additional-info\">\n {\n props.sslSubject.length > 0\n && (\n <div>\n <span>{i18n['SUBJECT']}:</span>\n <span>{props.sslSubject}</span>\n </div>\n )\n }\n\n {\n props.sslAliases.length > 0\n && (\n <div>\n <span>{i18n['ALIASES']}:</span>\n <span>{props.sslAliases}</span>\n </div>\n )\n }\n\n {\n props.sslNotBefore.length > 0\n && (\n <div>\n <span>{i18n['NOT_BEFORE']}:</span>\n <span>{props.sslNotBefore}</span>\n </div>\n )\n }\n\n {\n props.sslNotAfter.length > 0\n && (\n <div>\n <span>{i18n['NOT_AFTER']}:</span>\n <span>{props.sslNotAfter}</span>\n </div>\n )\n }\n\n {\n props.sslSignature.length > 0\n && (\n <div>\n <span>{i18n['SIGNATURE']}:</span>\n <span>{props.sslSignature}</span>\n </div>\n )\n }\n\n {\n props.sslPubKey.length > 0\n && (\n <div>\n <span>{i18n['PUB_KEY']}:</span>\n <span>{props.sslPubKey}</span>\n </div>\n )\n }\n\n {\n props.sslIssuer.length > 0\n && (\n <div>\n <span>{i18n['ISSUER']}:</span>\n <span>{props.sslIssuer}</span>\n </div>\n )\n }\n </div>\n\n <br />\n <br />\n </div>\n );\n}\n\nexport default SslSupport;\n","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport { updateWebDomain, getDomainInfo } from '../../../ControlPanelService/Web';\nimport Password from '../../../components/ControlPanel/AddItemLayout/Form/Password/Password';\nimport SelectInput from '../../ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport AdditionalFtpWrapper from '../Add/AdditionalFtpWrapper/AdditionalFtpWrapper';\nimport TextInput from '../../ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport Checkbox from '../../ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from '../../../components/Spinner/Spinner';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport SslSupport from './SslSupport/SslSupport';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\nimport GenerateSSL from 'src/containers/GenerateCSR';\nimport 'src/components/Modal/Modal.scss';\nimport QS from 'qs';\n\nimport './EditWeb.scss';\nimport TextArea from '../../ControlPanel/AddItemLayout/Form/TextArea/TextArea';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nconst EditWeb = props => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const { session } = useSelector(state => state.userSession);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [modalVisible, setModalVisible] = useState(false);\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n domain: '',\n webStat: '',\n sslSupport: false,\n letsEncrypt: false,\n additionalFtp: false,\n proxySupport: false,\n statAuth: false,\n loading: false\n });\n\n useEffect(() => {\n let queryParams = QS.parse(history.location.search, { ignoreQueryPrefix: true });\n const { domain } = queryParams;\n\n dispatch(addActiveElement('/list/web/'));\n dispatch(removeFocusedElement());\n\n if (domain) {\n setState({ ...state, loading: true });\n fetchData(domain);\n }\n }, []);\n\n const fetchData = domain => {\n getDomainInfo(domain)\n .then(response => {\n setState({\n ...state,\n domain,\n webStat: response.data.v_stats ? response.data.v_stats : 'none',\n sslSupport: response.data.ssl === 'yes',\n letsEncrypt: response.data.letsencrypt === 'yes',\n proxySupport: !!response.data.proxy,\n data: response.data,\n additionalFtp: !!response.data.ftp_user,\n statAuth: response.data.stats_user,\n loading: false\n });\n })\n .catch(err => console.error(err));\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedDomain = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedDomain[name] = value;\n }\n\n updatedDomain['v_domain'] = state.domain;\n\n if (updatedDomain['v_ssl'] === 'on') {\n updatedDomain['v_ssl'] = 'yes';\n } else {\n delete updatedDomain['v_ssl'];\n }\n\n if (updatedDomain['v_letsencrypt'] === 'on') {\n updatedDomain['v_letsencrypt'] = 'yes';\n } else {\n delete updatedDomain['v_letsencrypt'];\n }\n\n if (!updatedDomain['v_ssl_ca']) {\n delete updatedDomain['v_ssl_ca'];\n }\n\n if (!updatedDomain['v_ssl_crt']) {\n delete updatedDomain['v_ssl_crt'];\n }\n\n if (!updatedDomain['v_ssl_key']) {\n delete updatedDomain['v_ssl_key'];\n }\n\n if (Object.keys(updatedDomain).length !== 0 && updatedDomain.constructor === Object) {\n setState({ ...state, loading: true });\n\n updateWebDomain(updatedDomain, state.domain)\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n if (error_msg) {\n setErrorMessage(error_msg);\n setOkMessage('');\n setState({ ...state, loading: false });\n } else {\n dispatch(refreshCounters()).then(() => {\n setErrorMessage('');\n setOkMessage(ok_msg);\n fetchData(state.domain);\n });\n }\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const formatData = object => {\n let result = [];\n\n for (let i in object) {\n result.push(i);\n }\n\n return result;\n }\n\n const onChangeSslSupport = checked => {\n setState({ ...state, sslSupport: checked });\n }\n\n const onChangeProxySupport = checked => {\n setState({ ...state, proxySupport: checked });\n }\n\n const onChangeWebStats = webStat => {\n setState({ ...state, webStat });\n }\n\n const onChangeStatisticsAuth = statAuth => {\n setState({ ...state, statAuth });\n }\n\n const onChangeAdditionalFtp = additionalFtp => {\n setState({ ...state, additionalFtp });\n }\n\n return (\n <div className=\"edit-template edit-web\">\n <Helmet>\n <title>{`Vesta - ${i18n.WEB}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Editing Domain']}</div>\n <div className=\"error\"><span className=\"error-message\">{errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}</span></div>\n <div className=\"success\">\n <span className=\"ok-message\">{okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span> </span>\n </div>\n </Toolbar>\n <AddItemLayout date={state.data.date} time={state.data.time} status={state.data.status}>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"add-web\">\n <input type=\"hidden\" name=\"save\" value=\"save\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <TextInput id=\"domain\" name=\"v_domain\" title={i18n['Domain']} value={state.domain} disabled />\n\n <SelectInput\n options={formatData(state.data.ips)}\n selected={state.data.ip}\n name=\"v_ip\"\n id=\"ip\"\n title={i18n['IP Address']} />\n\n <TextArea\n id=\"proxy-aliases\"\n name=\"v_aliases\"\n title={i18n['Aliases']}\n defaultValue={state.data.aliases} />\n\n <SelectInput\n options={state.data.templates}\n selected={state.data.template}\n name=\"v_template\"\n id=\"web-template\"\n optionalTitle={state.data.web_system}\n title={i18n['Web Template']} />\n\n {\n session.WEB_BACKEND && (\n <SelectInput\n options={state.data.backend_templates}\n selected={state.data.backend_template || 'default'}\n name=\"v_backend_template\"\n id=\"backend-template\"\n optionalTitle={state.data.web_backend}\n title={i18n['Backend Template']} />\n )\n }\n\n {\n state.data.proxy_system && (\n <>\n <Checkbox\n onChange={onChangeProxySupport}\n name=\"v_proxy\"\n id=\"proxy\"\n title={i18n['Proxy Support'] ?? 'Proxy Support'}\n defaultChecked={state.proxySupport} />\n\n {\n state.proxySupport && (<div style={{ transform: 'translateX(3rem)' }}>\n <SelectInput\n options={state.data.proxy_templates}\n selected={state.data.proxy_template || 'default'}\n optionalTitle={state.data.proxy_system}\n name=\"v_proxy_template\"\n id=\"proxy_template\"\n title={i18n['Proxy Template']} />\n\n <TextArea\n id=\"proxy-extensions\"\n name=\"v_proxy_ext\"\n title={i18n['Proxy Extensions']}\n defaultValue={state.data.proxy_ext} />\n </div>)\n }\n </>\n )\n }\n\n <Checkbox\n onChange={onChangeSslSupport}\n name=\"v_ssl\"\n id=\"ssl-support\"\n title={i18n['SSL Support'] ?? 'SSL Support'}\n defaultChecked={state.sslSupport} />\n\n {\n state.sslSupport && (\n <SslSupport\n sslSubject={state.data.ssl_subject}\n sslAliases={state.data.ssl_aliases}\n sslNotBefore={state.data.ssl_not_before}\n sslNotAfter={state.data.ssl_not_after}\n sslSignature={state.data.ssl_signature}\n sslPubKey={state.data.ssl_pub_key}\n sslIssuer={state.data.ssl_issuer}\n sslCertificate={state.data.ssl_crt}\n sslKey={state.data.ssl_key}\n setModalVisible={bool => setModalVisible(bool)}\n sslCertificateAuthority={state.data.ssl_ca}\n domain={state.domain}\n sslHome={state.data.ssl_home}\n letsEncrypt={state.letsEncrypt}\n />\n )\n }\n\n <SelectInput\n options={state.data.stats}\n selected={state.webStat}\n title={i18n['Web Statistics']}\n onChange={onChangeWebStats}\n name=\"v_stats\"\n id=\"stats\" />\n\n {\n state.webStat !== 'none' && (\n <div className=\"web-stat-additional\">\n <Checkbox\n onChange={onChangeStatisticsAuth}\n name=\"v_stats_auth\"\n id=\"stat-auth\"\n defaultChecked={state.data.stats_user}\n title={i18n['Statistics Authorization']} />\n\n {\n state.statAuth && (\n <>\n <TextInput id=\"domain\" name=\"v_stats_user\" title={i18n['Username']} value={state.data.stats_user} />\n\n <Password name='v_stats_password' />\n </>\n )\n }\n </div>\n )\n }\n\n <Checkbox\n onChange={onChangeAdditionalFtp}\n name=\"v_ftp\"\n id=\"add-ftp\"\n checked={state.additionalFtp}\n title={i18n['Additional FTP Account']} />\n\n <AdditionalFtpWrapper\n checked={state.additionalFtp}\n prefixI18N={state.data.prefixI18N}\n ftps={state.data.ftp_users}\n ftpUserPrePath={state.data.ftp_user_prepath}\n unCheckAdditionalFtpBox={() => onChangeAdditionalFtp(false)} />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/web/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n\n <div className={`modal fade ${modalVisible ? 'show' : ''}`} id=\"c-panel-modal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"exampleModalLabel\" aria-hidden=\"true\" style={{ display: modalVisible ? 'block' : 'none' }}>\n <div className=\"modal-dialog\" role=\"document\">\n <div className=\"modal-content\">\n <div className=\"modal-header\">\n <h5>{i18n['Generating CSR']}</h5>\n <button type=\"button\" onClick={() => setModalVisible(false)} className=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n <span aria-hidden=\"true\">×</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\">↩</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\">↩</span> : <FontAwesomeIcon icon=\"pen\" />}\n </Link>\n </div>\n\n <div>\n <button\n className=\"link-gray\"\n onClick={() => handleSuspend()}>\n {i18n[data.suspend_action]}\n {data.FOCUSED ? <span className=\"shortcut-button\">S</span> : <FontAwesomeIcon icon={data.SUSPENDED === 'yes' ? 'unlock' : 'lock'} />}\n </button>\n </div>\n\n <div>\n <button className=\"link-delete\" onClick={() => handleDelete()}>\n {i18n.Delete}\n {data.FOCUSED ? <span className=\"shortcut-button del\">Del</span> : <FontAwesomeIcon icon=\"times\" />}\n </button>\n </div>\n </div>\n </ListItem>\n );\n}\n\nexport default Firewall;\n","import React, { useEffect, useState } from 'react';\nimport { addControlPanelContentFocusedElement, removeControlPanelContentFocusedElement } from '../../actions/ControlPanelContent/controlPanelContentActions';\nimport { addActiveElement, removeFocusedElement } from '../../actions/MainNavigation/mainNavigationActions';\nimport { bulkFirewallAction, getFirewallList, handleAction } from '../../ControlPanelService/Firewalls';\nimport DropdownFilter from '../../components/MainNav/Toolbar/DropdownFilter/DropdownFilter';\nimport * as MainNavigation from '../../actions/MainNavigation/mainNavigationActions';\nimport SearchInput from '../../components/MainNav/Toolbar/SearchInput/SearchInput';\nimport { addFavorite, deleteFavorite } from '../../ControlPanelService/Favorites';\nimport LeftButton from '../../components/MainNav/Toolbar/LeftButton/LeftButton';\nimport Checkbox from '../../components/MainNav/Toolbar/Checkbox/Checkbox';\nimport Select from '../../components/MainNav/Toolbar/Select/Select';\nimport Toolbar from '../../components/MainNav/Toolbar/Toolbar';\nimport Modal from '../../components/ControlPanel/Modal/Modal';\nimport Firewall from '../../components/Firewall/Firewall';\nimport Spinner from '../../components/Spinner/Spinner';\nimport { useDispatch, useSelector } from 'react-redux';\nimport './Firewalls.scss';\nimport { Helmet } from 'react-helmet';\nimport { Link } from 'react-router-dom';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\n\nconst Firewalls = props => {\n const { i18n } = useSelector(state => state.session);\n const { controlPanelFocusedElement } = useSelector(state => state.controlPanelContent);\n const { focusedElement } = useSelector(state => state.mainNavigation);\n const dispatch = useDispatch();\n const [loading, setLoading] = useState(false);\n const [modal, setModal] = useState({\n text: '',\n visible: false,\n actionUrl: ''\n });\n const [state, setState] = useState({\n firewalls: [],\n firewallFav: [],\n selection: [],\n firewallExtension: '',\n toggledAll: false,\n sorting: i18n.Action,\n order: \"descending\",\n totalAmount: ''\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/firewall/'));\n dispatch(removeFocusedElement());\n dispatch(removeControlPanelContentFocusedElement());\n fetchData().then(() => setLoading(false));\n\n return () => {\n dispatch(removeControlPanelContentFocusedElement());\n }\n }, []);\n\n useEffect(() => {\n window.addEventListener(\"keydown\", handleContentSelection);\n window.addEventListener(\"keydown\", handleFocusedElementShortcuts);\n\n return () => {\n window.removeEventListener(\"keydown\", handleContentSelection);\n window.removeEventListener(\"keydown\", handleFocusedElementShortcuts);\n };\n }, [controlPanelFocusedElement, focusedElement, state.firewalls]);\n\n const handleContentSelection = event => {\n if (event.keyCode === 38 || event.keyCode === 40) {\n if (focusedElement) {\n dispatch(MainNavigation.removeFocusedElement());\n }\n }\n\n if (event.keyCode === 38) {\n event.preventDefault();\n handleArrowUp();\n } else if (event.keyCode === 40) {\n event.preventDefault();\n handleArrowDown();\n }\n }\n\n const initFocusedElement = firewalls => {\n firewalls[0]['FOCUSED'] = firewalls[0]['NAME'];\n setState({ ...state, firewalls });\n dispatch(addControlPanelContentFocusedElement(firewalls[0]['NAME']));\n }\n\n const handleArrowDown = () => {\n let firewalls = [...state.firewalls];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(firewalls);\n return;\n }\n\n let focusedElementPosition = firewalls.findIndex(firewall => firewall.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== firewalls.length - 1) {\n let nextFocusedElement = firewalls[focusedElementPosition + 1];\n firewalls[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, firewalls });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleArrowUp = () => {\n let firewalls = [...state.firewalls];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(firewalls);\n return;\n }\n\n let focusedElementPosition = firewalls.findIndex(firewall => firewall.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== 0) {\n let nextFocusedElement = firewalls[focusedElementPosition - 1];\n firewalls[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, firewalls });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleFocusedElementShortcuts = event => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus');\n\n if (controlPanelFocusedElement && !isSearchInputFocused) {\n switch (event.keyCode) {\n case 8: return handleDelete();\n case 13: return handleEdit();\n case 83: return handleSuspend();\n default: break;\n }\n }\n }\n\n const handleEdit = () => {\n props.history.push(`/edit/firewall?rule=${controlPanelFocusedElement}`);\n }\n\n const handleSuspend = () => {\n const { firewalls } = state;\n let currentFirewallData = firewalls.filter(firewall => firewall.NAME === controlPanelFocusedElement)[0];\n let suspendedStatus = currentFirewallData.SUSPENDED === 'yes' ? 'unsuspend' : 'suspend';\n\n displayModal(currentFirewallData.suspend_conf, `/api/v1/${suspendedStatus}/firewall/index.php?rule=${controlPanelFocusedElement}`);\n }\n\n const handleDelete = () => {\n const { firewalls } = state;\n let currentFirewallData = firewalls.filter(firewall => firewall.NAME === controlPanelFocusedElement)[0];\n\n displayModal(currentFirewallData.delete_conf, `/api/v1/delete/firewall/index.php?rule=${controlPanelFocusedElement}`);\n }\n\n const fetchData = () => {\n setLoading(true);\n return new Promise((resolve, reject) => {\n getFirewallList()\n .then(result => {\n setState({\n ...state,\n firewalls: reformatData(result.data.data),\n firewallFav: result.data.firewallFav,\n selection: [],\n firewallExtension: result.data.firewallExtension,\n totalAmount: result.data.totalAmount,\n toggledAll: false\n });\n resolve();\n })\n .catch(err => console.error(err));\n });\n }\n\n const reformatData = data => {\n let firewalls = [];\n\n for (let i in data) {\n data[i]['NAME'] = i;\n data[i]['FOCUSED'] = controlPanelFocusedElement === i;\n firewalls.push(data[i]);\n }\n\n return firewalls;\n }\n\n const changeSorting = (sorting, order) => {\n setState({\n ...state,\n sorting,\n order\n });\n }\n\n const firewalls = () => {\n const firewallFav = { ...state.firewallFav };\n let firewalls = [...state.firewalls];\n\n firewalls.forEach(firewall => {\n firewall.FOCUSED = controlPanelFocusedElement === firewall.NAME;\n\n if (firewallFav[firewall.NAME]) {\n firewall.STARRED = firewallFav[firewall.NAME];\n } else {\n firewall.STARRED = 0;\n }\n });\n\n let sortedResult = sortArray(firewalls);\n\n return sortedResult.map((item, index) => {\n return <Firewall data={item} key={index} toggleFav={toggleFav} checkItem={checkItem} handleModal={displayModal} />;\n });\n }\n\n const checkItem = name => {\n const { selection, firewalls } = state;\n let duplicate = [...selection];\n let firewallsDuplicate = firewalls;\n let checkedItem = duplicate.indexOf(name);\n\n let incomingItem = firewallsDuplicate.findIndex(db => db.NAME === name);\n firewallsDuplicate[incomingItem].isChecked = !firewallsDuplicate[incomingItem].isChecked;\n\n if (checkedItem !== -1) {\n duplicate.splice(checkedItem, 1);\n } else {\n duplicate.push(name);\n }\n\n setState({ ...state, firewalls: firewallsDuplicate, selection: duplicate });\n }\n\n const sortArray = array => {\n const { order, sorting } = state;\n let sortingColumn = sortBy(sorting);\n\n if (order === \"descending\") {\n return array.sort((a, b) => (a[sortingColumn] < b[sortingColumn]) ? 1 : ((b[sortingColumn] < a[sortingColumn]) ? -1 : 0));\n } else {\n return array.sort((a, b) => (a[sortingColumn] > b[sortingColumn]) ? 1 : ((b[sortingColumn] > a[sortingColumn]) ? -1 : 0));\n }\n }\n\n const sortBy = sorting => {\n const { Action, Protocol, Port, Comment, Starred } = i18n;\n\n switch (sorting) {\n case Action: return 'ACTION';\n case Protocol: return 'PROTOCOL';\n case Port: return 'PORT';\n case i18n['IP address']: return 'IP';\n case Comment: return 'COMMENT';\n case Starred: return 'STARRED';\n default: break;\n }\n }\n\n const toggleFav = (value, type) => {\n const { firewallFav } = state;\n let firewallFavDuplicate = firewallFav;\n\n if (type === 'add') {\n firewallFavDuplicate[value] = 1;\n\n addFavorite(value, 'firewall')\n .then(() => {\n setState({ ...state, firewallFav: firewallFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n } else {\n firewallFavDuplicate[value] = undefined;\n\n deleteFavorite(value, 'firewall')\n .then(() => {\n setState({ ...state, firewallFav: firewallFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n }\n }\n\n const toggleAll = toggled => {\n if (toggled) {\n let firewallNames = [];\n\n let firewalls = state.firewalls.map(firewall => {\n firewallNames.push(firewall.NAME);\n firewall.isChecked = true;\n return firewall;\n });\n\n setState({ ...state, firewalls, selection: firewallNames, toggledAll: toggled });\n } else {\n let firewalls = state.firewalls.map(firewall => {\n firewall.isChecked = false;\n return firewall;\n });\n\n setState({ ...state, firewalls, selection: [], toggledAll: toggled });\n }\n }\n\n const bulk = action => {\n const { selection } = state;\n\n if (selection.length && action) {\n setLoading(true);\n bulkFirewallAction(action, selection)\n .then(result => {\n if (result.status === 200) {\n toggleAll(false);\n fetchData().then(() => refreshMenuCounters());\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const displayModal = (text, actionUrl) => {\n setModal({ ...modal, visible: !modal.visible, text, actionUrl });\n }\n\n const modalConfirmHandler = () => {\n if (!modal.actionUrl) {\n return modalCancelHandler();\n }\n\n modalCancelHandler();\n setLoading(true);\n handleAction(modal.actionUrl)\n .then(res => {\n if (res.data.error) {\n setLoading(false);\n return displayModal(res.data.error, '');\n }\n fetchData().then(() => refreshMenuCounters())\n })\n .catch(err => { setLoading(false); console.error(err); });\n }\n\n const refreshMenuCounters = () => {\n dispatch(refreshCounters()).then(() => setLoading(false));\n }\n\n const modalCancelHandler = () => {\n setModal({ ...modal, visible: !modal.visible, text: '', actionUrl: '' });\n }\n\n return (\n <div className=\"firewalls\">\n <Helmet>\n <title>{`Vesta - ${i18n.FIREWALL}`}</title>\n </Helmet>\n <Toolbar mobile={false} >\n <LeftButton href=\"/add/firewall/\" name={i18n['Add Rule']} showLeftMenu={true} />\n <div className=\"r-menu\">\n <div className=\"input-group input-group-sm\">\n <Link to='/list/firewall/banlist/' className=\"button-extra\" type=\"submit\">{i18n['list fail2ban']}</Link>\n <Checkbox toggleAll={toggleAll} toggled={state.toggledAll} />\n <Select list='firewallList' bulkAction={bulk} />\n <DropdownFilter changeSorting={changeSorting} sorting={state.sorting} order={state.order} list=\"firewallList\" />\n <SearchInput handleSearchTerm={term => props.changeSearchTerm(term)} />\n </div>\n </div>\n </Toolbar>\n <div className=\"firewalls-wrapper\">\n {loading\n ? <Spinner />\n : (<>\n {firewalls()}\n <div className=\"total\">{state.totalAmount}</div>\n </>)}\n </div>\n <Modal\n onSave={modalConfirmHandler}\n onCancel={modalCancelHandler}\n show={modal.visible}\n text={modal.text} />\n </div>\n );\n}\n\nexport default Firewalls;\n","import axios from 'axios';\nimport { getAuthToken } from 'src/utils/token';\n\nconst BASE_URL = window.location.origin;\nconst usersUri = '/api/v1/list/user/index.php';\nconst addUsersUri = '/api/v1/add/user/index.php';\nconst userInfoUri = '/api/v1/edit/user/index.php';\nconst updateUserUri = '/api/v1/edit/user/index.php';\n\nexport const getUsersList = () => {\n return axios.get(BASE_URL + usersUri, {\n params: {\n token: getAuthToken()\n }\n });\n}\n\nexport const bulkAction = (action, selectedUsers) => {\n const formData = new FormData();\n formData.append(\"token\", getAuthToken());\n formData.append(\"action\", action);\n\n selectedUsers.forEach(user => {\n formData.append(\"user[]\", user);\n });\n\n return axios.post(BASE_URL + '/api/v1/bulk/user/', formData);\n};\n\nexport const handleAction = uri => {\n return axios.get(BASE_URL + uri, {\n params: {\n token: getAuthToken()\n }\n });\n}\n\nexport const addUser = data => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n formDataObject.append(\"token\", getAuthToken());\n formDataObject.append(\"ok\", \"Add\");\n\n return axios.post(BASE_URL + addUsersUri, formDataObject);\n}\n\nexport const getUserInfo = username => {\n return axios.get(BASE_URL + userInfoUri, {\n params: {\n user: username,\n token: getAuthToken()\n }\n });\n}\n\nexport const updateUser = (data, user) => {\n let formDataObject = new FormData();\n\n for (let key in data) {\n formDataObject.append(key, data[key]);\n }\n\n return axios.post(BASE_URL + updateUserUri, formDataObject, {\n params: {\n user,\n token: getAuthToken()\n }\n });\n}\n","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport Password from '../../../components/ControlPanel/AddItemLayout/Form/Password/Password';\nimport SelectInput from '../../ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport NameServers from '../../ControlPanel/AddItemLayout/Form/NameServers/NameServers';\nimport TextInput from '../../ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport { updateUser, getUserInfo } from '../../../ControlPanelService/Users';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from '../../../components/Spinner/Spinner';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { Helmet } from 'react-helmet';\nimport HtmlParser from 'react-html-parser';\nimport QS from 'qs';\nimport './EditUser.scss';\n\nconst EditUser = props => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n loading: false,\n username: ''\n });\n\n useEffect(() => {\n let queryParams = QS.parse(history.location.search, { ignoreQueryPrefix: true });\n const { user } = queryParams;\n\n dispatch(addActiveElement('/list/user/'));\n dispatch(removeFocusedElement());\n\n if (user) {\n setState({ ...state, loading: true });\n fetchData(user);\n }\n }, []);\n\n const fetchData = user => {\n getUserInfo(user)\n .then(response => {\n setState({\n ...state,\n username: user,\n data: response.data,\n loading: false\n });\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err);\n });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedUser = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedUser[name] = value;\n }\n\n updatedUser['v_username'] = state.username;\n\n if (Object.keys(updatedUser).length !== 0 && updatedUser.constructor === Object) {\n setState({ ...state, loading: true });\n\n updateUser(updatedUser, state.username)\n .then(result => {\n if (result.status === 200) {\n const { error_msg: errorMessage, ok_msg: okMessage } = result.data;\n\n if (errorMessage) {\n setErrorMessage(errorMessage);\n setOkMessage('');\n } else {\n setErrorMessage('');\n setOkMessage(okMessage);\n }\n }\n })\n .then(() => fetchData(state.username))\n .catch(err => console.error(err));\n }\n }\n\n const convertObjectOfObjectsToArrayOfObjects = object => {\n let result = [];\n\n for (let i in object) {\n result.push(i);\n }\n\n return result;\n }\n\n return (\n <div className=\"edit-template edit-user\">\n <Helmet>\n <title>{`Vesta - ${i18n.USER}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Editing User']}</div>\n <div className=\"error\"><span className=\"error-message\">{errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}</span></div>\n <div className=\"success\">\n <span className=\"ok-message\">{okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span> </span>\n </div>\n </Toolbar>\n <AddItemLayout date={state.data.date} time={state.data.time} status={state.data.status}>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"add-user\">\n <input type=\"hidden\" name=\"save\" value=\"save\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <TextInput id=\"username\" name=\"v_user\" title={i18n['Username']} value={state.username} disabled />\n\n <Password name='v_password' />\n\n <TextInput id=\"email\" name=\"v_email\" title={i18n['Email']} value={state.data.email} />\n\n <SelectInput\n options={convertObjectOfObjectsToArrayOfObjects(state.data.packages)}\n selected={state.data.package}\n name=\"v_package\"\n id=\"packages\"\n title={i18n['Package']} />\n\n <SelectInput\n options={state.data.languages}\n selected={state.data.language}\n name=\"v_language\"\n id=\"languages\"\n title={i18n['Language']} />\n\n <TextInput id=\"first-name\" name=\"v_fname\" title={i18n['First Name']} value={state.data.fname} />\n\n <TextInput id=\"last-name\" name=\"v_lname\" title={i18n['Last Name']} value={state.data.lname} />\n\n <SelectInput\n options={state.data.shells}\n selected={state.data.shell}\n name=\"v_shell\"\n id=\"shell\"\n title={i18n['SSH Access']} />\n\n <NameServers usersNS={state.data.nameservers} />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/user/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div>\n );\n}\n\nexport default EditUser;","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"../../../../actions/MainNavigation/mainNavigationActions\";\nimport Checkbox from '../../../ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport TextArea from '../../../ControlPanel/AddItemLayout/Form/TextArea/TextArea';\nimport AddItemLayout from '../../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { getServiceInfo, updateService } from 'src/ControlPanelService/Server';\nimport Spinner from '../../../../components/Spinner/Spinner';\nimport Toolbar from '../../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './Bind9.scss';\nimport { Helmet } from 'react-helmet';\nimport HtmlParser from 'react-html-parser';\n\nconst Bind9 = () => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [state, setState] = useState({\n data: {},\n loading: false\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/server/'));\n dispatch(removeFocusedElement());\n\n setState({ ...state, loading: true });\n fetchData();\n }, []);\n\n const fetchData = () => {\n getServiceInfo('bind9')\n .then(response => {\n if (response.data.config.includes('Error')) {\n history.push('/list/server');\n }\n\n setState({ ...state, data: response.data, loading: false });\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err);\n });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedService = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedService[name] = value;\n }\n\n if (Object.keys(updatedService).length !== 0 && updatedService.constructor === Object) {\n setState({ ...state, loading: true });\n\n updateService(updatedService, '/bind9')\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n setErrorMessage(error_msg || '');\n setOkMessage(ok_msg || '');\n }\n })\n .then(() => fetchData())\n .catch(err => console.error(err));\n }\n }\n\n return (\n <div className=\"edit-template edit-bind9\">\n <Helmet>\n <title>{`Vesta - ${i18n.SERVER}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">\n {i18n['Configuring Server']} / {state.data.service_name}\n </div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}\n </span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"edit-bind9\">\n <input type=\"hidden\" name=\"save\" value=\"save\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <TextArea\n defaultValue={state.data.options}\n title={state.data.options_path}\n name=\"v_options\"\n id=\"v_options\"\n rows=\"10\" />\n\n <br />\n\n <TextArea\n defaultValue={state.data.config}\n title={state.data.config_path}\n name=\"v_config\"\n id=\"v_config\"\n rows=\"10\" />\n\n <br />\n\n <Checkbox\n title={i18n['restart']}\n defaultChecked={true}\n name=\"v_restart\"\n id=\"restart\" />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/server/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div >\n );\n}\n\nexport default Bind9;","import React, { useEffect, useState } from 'react';\nimport { addActiveElement, removeFocusedElement } from \"../../../../actions/MainNavigation/mainNavigationActions\";\nimport TextInput from '../../../ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport Checkbox from '../../../ControlPanel/AddItemLayout/Form/Checkbox/Checkbox';\nimport TextArea from '../../../ControlPanel/AddItemLayout/Form/TextArea/TextArea';\nimport { getServiceInfo, updateService } from 'src/ControlPanelService/Server';\nimport AddItemLayout from '../../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Spinner from '../../../../components/Spinner/Spinner';\nimport Toolbar from '../../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './Mysql.scss';\nimport { Helmet } from 'react-helmet';\nimport HtmlParser from 'react-html-parser';\n\nconst Mysql = ({ serviceName = '' }) => {\n const token = localStorage.getItem(\"token\");\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [errorMessage, setErrorMessage] = useState('');\n const [okMessage, setOkMessage] = useState('');\n const [restart, setRestart] = useState(true);\n const [state, setState] = useState({\n data: {},\n loading: false,\n basicOptions: true,\n advancedOptions: false\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/server/'));\n dispatch(removeFocusedElement());\n\n if (!serviceName) {\n history.push('/list/server');\n }\n\n setState({ ...state, loading: true });\n fetchData();\n }, []);\n\n const fetchData = () => {\n getServiceInfo('mysql')\n .then(response => {\n if (response.data.config.includes('Error')) {\n history.push('/list/server');\n }\n\n setState({ ...state, data: response.data, loading: false });\n })\n .catch(err => {\n setState({ ...state, loading: false });\n console.error(err);\n });\n }\n\n const submitFormHandler = event => {\n event.preventDefault();\n let updatedService = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n updatedService[name] = value;\n }\n\n if (Object.keys(updatedService).length !== 0 && updatedService.constructor === Object) {\n setState({ ...state, loading: true });\n\n updatedService['v_config'] = state.data.config;\n updatedService['v_restart'] = restart ? 'yes' : 'no';\n\n updateService(updatedService, `/${serviceName}`)\n .then(result => {\n if (result.status === 200) {\n const { error_msg, ok_msg } = result.data;\n\n setErrorMessage(error_msg || '');\n setOkMessage(ok_msg || '');\n }\n })\n .then(() => fetchData())\n .catch(err => console.error(err));\n }\n }\n\n const toggleOptions = () => {\n setState({\n ...state,\n advancedOptions: !state.advancedOptions,\n basicOptions: !state.basicOptions\n });\n }\n\n const onUpdateConfig = ({ id, value }) => {\n if (!value) return;\n\n var regexp = new RegExp(`(${id})(.+)(${state.data[id]})`, 'gm');\n const updatedConfig = state.data.config.replace(regexp, `$1$2${value}`);\n setState({ ...state, data: { ...state.data, config: updatedConfig, [id]: value } });\n }\n\n return (\n <div className=\"edit-template edit-mysql\">\n <Helmet>\n <title>{`Vesta - ${i18n.SERVER}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Configuring Server']} / {state.data.service_name}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} {errorMessage}\n </span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''} <span>{HtmlParser(okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> :\n <form onSubmit={event => submitFormHandler(event)} id=\"edit-mysql\">\n <input type=\"hidden\" name=\"save\" value=\"save\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n {\n !state.basicOptions && (\n <button type=\"button\" onClick={() => toggleOptions()}>\n {i18n['Basic options']}\n {state.basicOptions ? <FontAwesomeIcon icon=\"caret-up\" /> : <FontAwesomeIcon icon=\"caret-down\" />}\n </button>\n )\n }\n\n {\n state.basicOptions && (\n <>\n <TextInput\n id=\"max_connections\"\n title=\"max_connections\"\n name=\"v_max_connections\"\n onChange={event => onUpdateConfig(event.target)}\n value={state.data.max_connections} />\n\n <TextInput\n id=\"max_user_connections\"\n title=\"v_max_user_connections\"\n name=\"v_max_user_connections\"\n onChange={event => onUpdateConfig(event.target)}\n value={state.data.max_user_connections} />\n\n <TextInput\n id=\"wait_timeout\"\n title=\"v_wait_timeout\"\n name=\"v_wait_timeout\"\n onChange={event => onUpdateConfig(event.target)}\n value={state.data.wait_timeout} />\n\n <TextInput\n id=\"interactive_timeout\"\n title=\"v_interactive_timeout\"\n name=\"v_interactive_timeout\"\n onChange={event => onUpdateConfig(event.target)}\n value={state.data.interactive_timeout} />\n\n <TextInput\n id=\"display_errors\"\n title=\"v_display_errors\"\n name=\"v_display_errors\"\n onChange={event => onUpdateConfig(event.target)}\n value={state.data.max_allowed_packet} />\n </>\n )\n }\n\n {\n !state.advancedOptions && (\n <button type=\"button\" onClick={() => toggleOptions()}>\n {i18n['Advanced options']}\n {state.advancedOptions ? <FontAwesomeIcon icon=\"caret-up\" /> : <FontAwesomeIcon icon=\"caret-down\" />}\n </button>\n )\n }\n\n <br />\n <br />\n\n {\n state.advancedOptions && (\n <>\n <TextArea\n defaultValue={state.data.config}\n title={state.data.config_path}\n onChange={e => setState({ ...state, data: { ...state.data, config: e.target.value } })}\n name=\"v_config\"\n id=\"v_config\"\n rows=\"25\" />\n\n <br />\n\n <Checkbox\n title={i18n['restart']}\n defaultChecked={true}\n onChange={checked => setRestart(checked)}\n name=\"v_restart\"\n id=\"restart\" />\n </>\n )\n }\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Save}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/server/')}>{i18n.Back}</button>\n </div>\n\n </form>\n }\n </AddItemLayout>\n </div>\n );\n}\n\nexport default Mysql;","import axios from \"axios\";\n\nconst BASE_URL = window.location.origin;\nconst userNSApiUri = '/api/v1/list-user-ns.php';\n\nexport const getUserNS = () => {\n return axios.get(BASE_URL + userNSApiUri);\n}","import React, { useEffect, useState } from 'react';\nimport dayjs from 'dayjs';\n\nimport './AdvancedOptions.scss';\nimport { useSelector } from 'react-redux';\n\nconst AdvancedOptions = props => {\n const { i18n } = useSelector(state => state.session);\n const [state, setState] = useState({\n nameServersAmount: [],\n userNS: props.userNS\n });\n\n useEffect(() => {\n if (props.userNS.length) {\n let initNameServersAmount = props.userNS.map((userNS, index) => index + 1);\n setState({ ...state, nameServersAmount: initNameServersAmount });\n }\n }, []);\n\n const renderNameServerInputs = () => {\n return state.nameServersAmount.map((nameServer, index) => {\n return (\n <div className=\"name-server-input-wrapper\" key={index}>\n <input\n type=\"text\"\n className=\"form-control\"\n id={`v_ns${nameServer}`}\n defaultValue={state.userNS[index] || ''}\n name={`v_ns${nameServer}`} />\n <button\n type=\"button\"\n className={nameServer < 3 ? 'hide' : 'show delete'}\n onClick={() => onDeleteNameServer(nameServer)}>\n {i18n.delete ?? 'Delete'}\n </button>\n </div>\n );\n });\n }\n\n const onDeleteNameServer = index => {\n let nameServersDuplicate = [...state.nameServersAmount];\n\n nameServersDuplicate.splice(index - 1, 1);\n\n setState({ ...state, nameServersAmount: nameServersDuplicate });\n }\n\n const addNameServer = () => {\n let nameServersLength = state.nameServersAmount.length;\n let nameServersDuplicate = [...state.nameServersAmount];\n\n nameServersDuplicate.push(nameServersLength + 1);\n\n setState({ ...state, nameServersAmount: nameServersDuplicate });\n }\n\n const addNameServerClassName = () => {\n return state.nameServersAmount.length === 8 ? 'hide' : 'show optional';\n }\n\n const getCurrentDatePlusYear = () => {\n let currentDatePlusYear = dayjs().add(1, 'year').format('YYYY-MM-DD');\n return currentDatePlusYear;\n }\n\n return (\n <div>\n <div className=\"form-group exp-date\">\n <label htmlFor=\"exp_date\">\n {i18n['Expiration Date'] ?? 'Expiration Date'}\n <span className=\"optional\">({i18n['YYYY-MM-DD'] ?? 'YYYY-MM-DD'})</span>\n </label>\n <input\n type=\"text\"\n className=\"form-control\"\n id=\"exp_date\"\n required\n defaultValue={getCurrentDatePlusYear()}\n name=\"v_exp\" />\n </div>\n\n <div className=\"form-group\">\n <label htmlFor=\"name_servers\">TTL</label>\n <input\n type=\"text\"\n className=\"form-control\"\n id=\"name_servers\"\n required\n defaultValue=\"14400\"\n name=\"v_ttl\" />\n </div>\n\n <div className=\"form-group name-servers\">\n <label htmlFor=\"v_ns1\">{i18n['Name servers'] ?? 'Name servers'}</label>\n {renderNameServerInputs()}\n </div>\n\n <button\n type=\"button\"\n className={addNameServerClassName()}\n onClick={() => addNameServer()}>\n {i18n['Add one more Name Server'] ?? 'Add one more Name Server'}\n </button>\n </div>\n );\n}\n\nexport default AdvancedOptions;","import React, { useEffect, useState } from 'react';\n\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { getUserNS } from '../../../ControlPanelService/UserNS';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport Spinner from '../../Spinner/Spinner';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './AddDomainNameSystem.scss';\nimport AdvancedOptions from './AdvancedOptions/AdvancedOptions';\nimport { addDomainNameSystem } from '../../../ControlPanelService/Dns';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nconst AddDomainNameSystem = props => {\n const { i18n } = useSelector(state => state.session);\n const dispatch = useDispatch();\n const token = localStorage.getItem(\"token\");\n const history = useHistory();\n const [state, setState] = useState({\n loading: false,\n showAdvancedOptions: false,\n okMessage: '',\n domain: '',\n errorMessage: '',\n userNS: []\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/dns/'));\n dispatch(removeFocusedElement());\n\n setState({ ...state, loading: true });\n getUserNS()\n .then(result => {\n if (result.data.length) {\n setState({ ...state, userNS: result.data, loading: false });\n }\n })\n .catch(err => console.error(err));\n }, []);\n\n const submitFormHandler = event => {\n event.preventDefault();\n let domainNameSystem = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n domainNameSystem[name] = value;\n }\n\n if (Object.keys(domainNameSystem).length !== 0 && domainNameSystem.constructor === Object) {\n setState({ ...state, loading: true });\n addDomainNameSystem(domainNameSystem)\n .then(result => {\n if (result.status === 200) {\n const { error_msg: errorMessage, ok_msg: okMessage } = result.data;\n\n if (errorMessage) {\n setState({ ...state, errorMessage, okMessage, loading: false });\n } else {\n dispatch(refreshCounters()).then(() => {\n setState({ ...state, okMessage, errorMessage: '', loading: false });\n });\n }\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const renderAdvancedOptions = () => {\n if (state.showAdvancedOptions) {\n return <AdvancedOptions prefixI18N={state.prefixI18N} userNS={state.userNS} domain={state.domain} webStats={state.webStats} />;\n }\n }\n\n const showAdvancedOption = () => {\n setState({ ...state, showAdvancedOptions: !state.showAdvancedOptions });\n }\n\n return (\n <div className=\"edit-template add-dns\">\n <Helmet>\n <title>{`Vesta - ${i18n.DNS}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Adding DNS Domain'] ?? 'Adding DNS Domain'}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {state.errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n {state.errorMessage}</span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {state.okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n <span>{HtmlParser(state.okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n\n <AddItemLayout>\n {state.loading ? <Spinner /> : (\n <form onSubmit={event => submitFormHandler(event)}>\n <input type=\"hidden\" name=\"ok\" value=\"add\" />\n <input type=\"hidden\" name=\"token\" value={token} />\n\n <div className=\"form-group\">\n <label htmlFor=\"domain\">{i18n.Domain ?? 'Domain'}</label>\n <input\n type=\"text\"\n className=\"form-control\"\n id=\"domain\"\n required\n name=\"v_domain\" />\n </div>\n\n <div className=\"form-group\">\n <label htmlFor=\"ip_address\">{i18n['IP address'] ?? 'IP address'}</label>\n <input\n type=\"text\"\n className=\"form-control\"\n id=\"ip_address\"\n required\n name=\"v_ip\" />\n </div>\n\n <div className=\"form-group advanced-options-button\">\n <button type=\"button\" onClick={() => showAdvancedOption()}>\n {i18n['Advanced options'] ?? 'Advanced options'}\n {state.showAdvancedOptions ? <FontAwesomeIcon icon=\"caret-down\" /> : <FontAwesomeIcon icon=\"caret-up\" />}\n </button>\n </div>\n\n {renderAdvancedOptions()}\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Add ?? 'Add'}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/dns/')}>{i18n.Back ?? 'Back'}</button>\n </div>\n </form>\n )}\n </AddItemLayout>\n </div>\n );\n}\n\nexport default AddDomainNameSystem;","import React, { useEffect, useState } from 'react';\n\nimport { addActiveElement, removeFocusedElement } from \"../../../actions/MainNavigation/mainNavigationActions\";\nimport SelectInput from 'src/components/ControlPanel/AddItemLayout/Form/SelectInput/SelectInput';\nimport TextInput from 'src/components/ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport AddItemLayout from '../../ControlPanel/AddItemLayout/AddItemLayout';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { addDomainNameSystemRecord } from '../../../ControlPanelService/Dns';\nimport Toolbar from '../../MainNav/Toolbar/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport Spinner from '../../Spinner/Spinner';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport './AddDNSRecord.scss'\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport HtmlParser from 'react-html-parser';\n\nexport default function AddDNSRecord(props) {\n const { i18n } = useSelector(state => state.session);\n const dispatch = useDispatch();\n const token = localStorage.getItem(\"token\");\n const history = useHistory();\n const [state, setState] = useState({\n data: {},\n selectOptions: [\n 'A',\n 'AAAA',\n 'NS',\n 'CNAME',\n 'MX',\n 'TXT',\n 'SRV',\n 'DNSKEY',\n 'KEY',\n 'IPSECKEY',\n 'PTR',\n 'SPF',\n 'TLSA',\n 'CAA'\n ],\n loading: false,\n okMessage: '',\n errorMessage: '',\n });\n\n useEffect(() => {\n dispatch(addActiveElement(`/list/dns/`));\n dispatch(removeFocusedElement());\n }, []);\n\n const submitFormHandler = event => {\n event.preventDefault();\n let newDnsRecord = {};\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n newDnsRecord[name] = value;\n }\n\n newDnsRecord['ok_rec'] = 'add';\n newDnsRecord['token'] = token;\n newDnsRecord['v_domain'] = props.domain;\n\n if (Object.keys(newDnsRecord).length !== 0 && newDnsRecord.constructor === Object) {\n setState({ ...state, loading: true });\n addDomainNameSystemRecord(newDnsRecord)\n .then(result => {\n if (result.status === 200) {\n const { error_msg: errorMessage, ok_msg: okMessage } = result.data;\n\n if (errorMessage) {\n setState({ ...state, errorMessage, okMessage, loading: false });\n } else {\n dispatch(refreshCounters()).then(() => {\n setState({ ...state, okMessage, errorMessage: '', loading: false });\n });\n }\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n return (\n <div className=\"edit-template add-dns-record\">\n <Helmet>\n <title>{`Vesta - ${i18n.DNS}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <div></div>\n <div className=\"search-toolbar-name\">{i18n['Adding DNS Record']}</div>\n <div className=\"error\">\n <span className=\"error-message\">\n {state.errorMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n {state.errorMessage}</span>\n </div>\n <div className=\"success\">\n <span className=\"ok-message\">\n {state.okMessage ? <FontAwesomeIcon icon=\"long-arrow-alt-right\" /> : ''}\n <span>{HtmlParser(state.okMessage)}</span>\n </span>\n </div>\n </Toolbar>\n <AddItemLayout>\n {state.loading ? <Spinner /> : (\n <form onSubmit={event => submitFormHandler(event)}>\n <TextInput\n title={i18n['Domain']}\n value={props.domain}\n name=\"v_domain\"\n id=\"domain\"\n disabled />\n\n <TextInput\n title={i18n['Record']}\n name=\"v_rec\"\n id=\"domain\" />\n\n <SelectInput\n options={state.selectOptions}\n title={i18n['Type']}\n name=\"v_type\"\n id=\"type\" />\n\n <TextInput\n title={i18n['IP or Value']}\n name=\"v_val\"\n id=\"val\" />\n\n <TextInput\n optionalTitle={`(${i18n['optional']})`}\n title={i18n['Priority']}\n name=\"v_priority\"\n id=\"priority\" />\n\n <div className=\"buttons-wrapper\">\n <button type=\"submit\" className=\"add\">{i18n.Add}</button>\n <button type=\"button\" className=\"back\" onClick={() => history.push(`/list/dns/?domain=${props.domain}`)}>{i18n.Back}</button>\n </div>\n </form>\n )}\n </AddItemLayout>\n </div>\n );\n}","import React, { useEffect, useState } from 'react';\nimport AddDomainNameSystem from 'src/components/DomainNameSystem/Add/AddDomainNameSystem';\nimport AddDNSRecord from 'src/components/DNSRecord/Add/AddDNSRecord';\nimport { useHistory } from 'react-router-dom';\nimport QueryString from 'qs';\nimport { Helmet } from 'react-helmet';\nimport { useSelector } from 'react-redux';\n\nexport default function AddDNSWrapper() {\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const parsedQueryString = QueryString.parse(history.location.search, { ignoreQueryPrefix: true });\n const [isDnsRecord, setIsDnsRecord] = useState(false);\n\n useEffect(() => {\n if (parsedQueryString.domain) {\n setIsDnsRecord(true);\n } else {\n setIsDnsRecord(false);\n }\n }, [history.location]);\n\n return (\n <>\n <Helmet>\n <title>{`Vesta - ${i18n.DNS}`}</title>\n </Helmet>\n {\n isDnsRecord\n ? <AddDNSRecord domain={parsedQueryString.domain} />\n : <AddDomainNameSystem />\n }\n </>\n );\n}","import React from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Container from '../../ControlPanel/Container/Container';\nimport ListItem from '../../ControlPanel/ListItem/ListItem';\nimport { Link } from 'react-router-dom';\n\nimport './RestoreSetting.scss';\nimport { useSelector } from 'react-redux';\n\nexport default function RestoreSetting({ data, checkItemFunc = () => { }, restoreSetting = () => { } }) {\n const { i18n } = useSelector(state => state.session);\n\n const displayBackupDetailName = type => {\n switch (type) {\n case 'WEB': return `WEB ${i18n['domain']}`;\n case 'MAIL': return `MAIL ${i18n['domain']}`;\n case 'DNS': return `DNS ${i18n['domain']}`;\n case 'CRON': return i18n['cron'];\n case 'UDIR': return i18n['user dir'];\n default: return i18n['domain'];\n }\n }\n\n const checkItem = () => {\n checkItemFunc(data.NAME);\n }\n\n return (\n <ListItem\n date={false}\n id={data.NAME}\n focused={data.FOCUSED}\n checked={data.isChecked}\n checkItem={checkItem}>\n\n <Container className=\"r-col w-85\">\n <div className=\"stats\">\n <Container className=\"c-1\">\n <div style={{ textTransform: 'uppercase' }}>{displayBackupDetailName(data.type)}</div>\n </Container>\n <Container className=\"c-2\">\n <b>{data.name}</b>\n </Container>\n <Container className=\"c-3\"></Container>\n <Container className=\"c-4\"></Container>\n <Container className=\"c-5\"></Container>\n </div>\n </Container>\n <div className=\"actions\">\n <div>\n <button className=\"link-restore\" onClick={() => restoreSetting(data.restoreLinkParams)}>\n {i18n['restore']}\n {data.FOCUSED ? <span className=\"shortcut-button\">R</span> : <FontAwesomeIcon icon=\"play\" />}\n </button>\n </div>\n </div>\n </ListItem>\n );\n}","import React, { useState, useEffect } from 'react';\nimport { addControlPanelContentFocusedElement, removeControlPanelContentFocusedElement } from 'src/actions/ControlPanelContent/controlPanelContentActions';\nimport * as MainNavigation from 'src/actions/MainNavigation/mainNavigationActions';\nimport SearchInput from 'src/components/MainNav/Toolbar/SearchInput/SearchInput';\nimport LeftButton from 'src/components/MainNav/Toolbar/LeftButton/LeftButton';\nimport { getBackupDetails, restoreBackupSetting, bulkRestore } from 'src/ControlPanelService/Backup';\nimport Checkbox from 'src/components/MainNav/Toolbar/Checkbox/Checkbox';\nimport Select from 'src/components/MainNav/Toolbar/Select/Select';\nimport Toolbar from 'src/components/MainNav/Toolbar/Toolbar';\nimport RestoreSetting from '../RestoreSetting/RestoreSetting';\nimport Modal from 'src/components/ControlPanel/Modal/Modal';\nimport { useSelector, useDispatch } from 'react-redux';\nimport Spinner from 'src/components/Spinner/Spinner';\nimport { Link } from 'react-router-dom';\nimport { Helmet } from 'react-helmet';\n\nimport './BackupRestoreSettings.scss';\n\nexport default function BackupRestoreSettings(props) {\n const { i18n } = useSelector(state => state.session);\n const { controlPanelFocusedElement } = useSelector(state => state.controlPanelContent);\n const { focusedElement } = useSelector(state => state.mainNavigation);\n const dispatch = useDispatch();\n const [backupDetailsData, setBackupDetailsData] = useState([]);\n const [modal, setModal] = useState({\n text: '',\n visible: false,\n });\n const [state, setState] = useState({\n loading: false,\n backupDetails: [],\n toggledAll: false,\n selection: [],\n totalAmount: ''\n });\n\n useEffect(() => {\n dispatch(removeControlPanelContentFocusedElement());\n fetchData();\n\n return () => dispatch(removeControlPanelContentFocusedElement());\n }, []);\n\n useEffect(() => {\n window.addEventListener(\"keydown\", handleContentSelection);\n window.addEventListener(\"keydown\", handleFocusedElementShortcuts);\n\n return () => {\n window.removeEventListener(\"keydown\", handleContentSelection);\n window.removeEventListener(\"keydown\", handleFocusedElementShortcuts);\n };\n }, [controlPanelFocusedElement, focusedElement, backupDetailsData]);\n\n const handleContentSelection = event => {\n if (event.keyCode === 65) {\n handleRestore(`?backup=${props.backup}`);\n return;\n }\n\n if (event.keyCode === 38 || event.keyCode === 40) {\n if (focusedElement) {\n dispatch(MainNavigation.removeFocusedElement());\n }\n }\n\n if (event.keyCode === 38) {\n event.preventDefault();\n handleArrowUp();\n } else if (event.keyCode === 40) {\n event.preventDefault();\n handleArrowDown();\n }\n }\n\n const initFocusedElement = backupDetails => {\n backupDetails[0]['FOCUSED'] = backupDetails[0]['NAME'];\n setBackupDetailsData(backupDetails);\n dispatch(addControlPanelContentFocusedElement(backupDetails[0]['NAME']));\n }\n\n const handleArrowDown = () => {\n let backupDetails = [...backupDetailsData];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(backupDetails);\n return;\n }\n\n let nextFocusedElement = backupDetails[controlPanelFocusedElement + 1];\n\n if (nextFocusedElement) {\n backupDetails[controlPanelFocusedElement]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setBackupDetailsData(backupDetails);\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleArrowUp = () => {\n let backupDetails = [...backupDetailsData];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(backupDetails);\n return;\n }\n\n let nextFocusedElement = backupDetails[controlPanelFocusedElement - 1];\n\n if (nextFocusedElement) {\n backupDetails[controlPanelFocusedElement]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setBackupDetailsData(backupDetails);\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleFocusedElementShortcuts = event => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus');\n\n if (controlPanelFocusedElement > 0 || controlPanelFocusedElement !== '' && !isSearchInputFocused) {\n switch (event.keyCode) {\n case 82: return handleRestore();\n default: break;\n }\n }\n }\n\n const handleRestore = params => {\n const paramsUri = params ? params : backupDetailsData[controlPanelFocusedElement].restoreLinkParams;\n\n restoreBackupSetting(paramsUri)\n .then(response => displayModal(response.data.message))\n .catch(err => console.error(err));\n }\n\n const fetchData = () => {\n setState({ ...state, loading: true });\n\n getBackupDetails(props.backup)\n .then(result => {\n reformatData(result.data.data[props.backup]);\n setState({\n ...state,\n totalAmount: result.data.totalAmount,\n selection: [],\n toggledAll: false,\n loading: false\n });\n })\n .catch(err => console.error(err));\n }\n\n const reformatData = data => {\n let reformattedData = ['WEB', 'DNS', 'MAIL', 'DB', 'UDIR', 'CRON'].reduce((acc, cat) => {\n data[cat].split(',').map(item => {\n acc.push({\n type: cat,\n name: item,\n restoreLinkParams: `?backup=${props.backup}&type=${cat.toLowerCase()}&object=${item}`\n });\n });\n\n return acc;\n }, []);\n\n setBackupDetailsData(reformattedData);\n }\n\n const listBackups = () => {\n const backupDetails = [...backupDetailsData];\n const result = [];\n\n backupDetails.forEach((backupDetail, index) => {\n backupDetail.NAME = index;\n backupDetail.FOCUSED = controlPanelFocusedElement === index;\n result.push(backupDetail);\n });\n\n return result.map((item, index) => {\n return <RestoreSetting data={item} key={index} checkItemFunc={name => checkItem(name)} restoreSetting={handleRestore} />;\n });\n }\n\n const checkItem = name => {\n const { selection } = state;\n let duplicate = [...selection];\n let backupDetailsDuplicate = [...backupDetailsData];\n let checkedItem = duplicate.indexOf(name);\n\n let incomingItem = backupDetailsDuplicate.findIndex(backupDetail => backupDetail.NAME === name);\n backupDetailsDuplicate[incomingItem].isChecked = !backupDetailsDuplicate[incomingItem].isChecked;\n\n if (checkedItem !== -1) {\n duplicate.splice(backupDetailsDuplicate[name]['name'], 1);\n } else {\n duplicate.push(backupDetailsDuplicate[name]['name']);\n }\n\n setState({ ...state, selection: duplicate });\n setBackupDetailsData(backupDetailsDuplicate);\n }\n\n const toggleAll = toggled => {\n const backupDetailsDuplicate = [...backupDetailsData];\n\n if (toggled) {\n let backupDetailNames = [];\n let backupDetails = backupDetailsDuplicate.map(backupDetail => {\n backupDetailNames.push(backupDetail.name);\n backupDetail.isChecked = true;\n return backupDetail;\n });\n\n setState({ ...state, selection: backupDetailNames, toggledAll: toggled });\n setBackupDetailsData(backupDetails);\n } else {\n let backupDetails = backupDetailsDuplicate.map(backupDetail => {\n backupDetail.isChecked = false;\n return backupDetail;\n });\n\n setState({ ...state, selection: [], toggledAll: toggled });\n setBackupDetailsData(backupDetails);\n }\n }\n\n const bulk = action => {\n const { selection } = state;\n\n if (selection.length && action) {\n setState({ ...state, loading: true });\n bulkRestore(action, selection, props.backup)\n .then(result => {\n if (result.status === 200) {\n displayModal(result.data.message);\n toggleAll(false);\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const displayModal = text => {\n setState({ ...state, loading: false });\n setModal({ ...modal, visible: true, text });\n }\n\n const modalCancelHandler = () => {\n setModal({ ...modal, visible: false, text: '' });\n }\n\n return (\n <div className=\"mail-accounts backups-restore-settings\">\n <Helmet>\n <title>{`Vesta - ${i18n.BACKUP}`}</title>\n </Helmet>\n <Toolbar mobile={false} >\n <LeftButton name={i18n['Restore All']} list=\"backup-details\" onClick={() => handleRestore(`?backup=${props.backup}`)} showLeftMenu={true} />\n <div className=\"r-menu\">\n <div className=\"input-group input-group-sm\">\n <Checkbox toggleAll={toggleAll} toggled={state.toggledAll} />\n <Select list='backupDetailList' bulkAction={bulk} />\n <SearchInput handleSearchTerm={term => props.changeSearchTerm(term)} />\n </div>\n </div>\n </Toolbar>\n {state.loading\n ? <Spinner />\n : (\n <>\n <div className=\"mail-accounts-wrapper\">\n <div className=\"subtitle\">\n <span>{`${i18n['Listing']} ${props.backup}`}</span>\n </div>\n {listBackups()}\n </div>\n <div className=\"footer-actions-wrapper\">\n <div className=\"total\">{state.totalAmount}</div>\n <div className=\"back\">\n <Link to=\"/list/backup/\">{i18n['Back']}</Link>\n </div>\n </div>\n </>\n )\n }\n\n <Modal\n onSave={modalCancelHandler}\n showCancelButton={false}\n show={modal.visible}\n text={modal.text} />\n </div>\n );\n}","import React, { } from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport ListItem from '../ControlPanel/ListItem/ListItem';\nimport Container from '../ControlPanel/Container/Container';\nimport { faFileDownload } from '@fortawesome/free-solid-svg-icons'\nimport './Backup.scss';\nimport { Link } from 'react-router-dom';\nimport { useSelector } from 'react-redux';\n\nconst Backup = props => {\n const { data } = props;\n const { i18n } = useSelector(state => state.session);\n const token = localStorage.getItem(\"token\");\n\n const toggleFav = (starred) => {\n if (starred) {\n props.toggleFav(props.data.NAME, 'add');\n } else {\n props.toggleFav(props.data.NAME, 'delete');\n }\n }\n\n const checkItem = () => {\n props.checkItem(props.data.NAME);\n }\n\n const handleDelete = () => {\n props.handleModal(data.delete_conf, `/api/v1/delete/backup/?backup=${data.NAME}`);\n }\n\n return (\n <ListItem\n id={data.NAME}\n date={data.DATE}\n toggleFav={toggleFav}\n checkItem={checkItem}\n focused={data.FOCUSED}\n starred={data.STARRED}\n checked={data.isChecked}>\n\n <Container className=\"r-col w-85\">\n <div className=\"name\">{data.NAME}</div>\n <div className=\"stats\">\n <Container className=\"c-1\">\n <div>{i18n['Backup Size']}: <span><span className=\"stat\">{data.SIZE}</span>{i18n.mb}</span></div>\n </Container>\n <Container className=\"c-2\">\n <div>{i18n.Type}: <span className=\"stat\">{data.TYPE}</span></div>\n </Container>\n <Container className=\"c-3\">\n <div>{i18n['Run Time']}: <span className=\"stat\">{data.RUNTIME} minute</span></div>\n </Container>\n </div>\n </Container>\n <div className=\"actions\">\n\n {data.UPDATED === 'no' && <div><a href={`/update/vesta/?pkg=${data.NAME}`}>{i18n.update} <FontAwesomeIcon icon=\"wrench\" /></a></div>}\n\n <div>\n <a className=\"link-download\" href={`/api/v1/download/backup/?backup=${data.NAME}&token=${token}`}>\n {i18n.download}\n {data.FOCUSED ? <span className=\"shortcut-button\">D</span> : <FontAwesomeIcon icon={faFileDownload} />}\n </a>\n </div>\n\n <div>\n <Link className=\"link-download\" to={`/list/backup?backup=${data.NAME}`}>\n {i18n['configure restore settings']}\n {data.FOCUSED ? <span className=\"shortcut-button html-unicode\">↩</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\">↩</span> : <FontAwesomeIcon icon=\"pen\" />}\n </Link>\n </div>\n\n <div>\n <button\n className=\"link-gray\"\n onClick={() => handleSuspend()}>\n {i18n[data.suspend_action]}\n {data.FOCUSED ? <span className=\"shortcut-button\">S</span> : <FontAwesomeIcon icon={data.SUSPENDED === 'yes' ? 'unlock' : 'lock'} />}\n </button>\n </div>\n\n <div>\n <button className=\"link-delete\" onClick={() => handleDelete()}>\n {i18n.Delete}\n {data.FOCUSED ? <span className=\"shortcut-button del\">Del</span> : <FontAwesomeIcon icon=\"times\" />}\n </button>\n </div>\n\n </div>\n </ListItem>\n );\n}\n\nexport default CronJob;","import React, { useState, useEffect } from 'react';\nimport { addControlPanelContentFocusedElement, removeControlPanelContentFocusedElement } from '../../actions/ControlPanelContent/controlPanelContentActions';\nimport { addActiveElement, removeFocusedElement } from '../../actions/MainNavigation/mainNavigationActions';\nimport DropdownFilter from '../../components/MainNav/Toolbar/DropdownFilter/DropdownFilter';\nimport { bulkAction, getCronList, handleAction } from '../../ControlPanelService/Cron';\nimport * as MainNavigation from '../../actions/MainNavigation/mainNavigationActions';\nimport SearchInput from '../../components/MainNav/Toolbar/SearchInput/SearchInput';\nimport { addFavorite, deleteFavorite } from '../../ControlPanelService/Favorites';\nimport LeftButton from '../../components/MainNav/Toolbar/LeftButton/LeftButton';\nimport Checkbox from '../../components/MainNav/Toolbar/Checkbox/Checkbox';\nimport Select from '../../components/MainNav/Toolbar/Select/Select';\nimport Toolbar from '../../components/MainNav/Toolbar/Toolbar';\nimport Modal from '../../components/ControlPanel/Modal/Modal';\nimport CronJob from '../../components/CronJob/CronJob';\nimport Spinner from '../../components/Spinner/Spinner';\nimport { useSelector, useDispatch } from 'react-redux';\nimport './CronJobs.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\n\nconst CronJobs = props => {\n const { i18n } = useSelector(state => state.session);\n const { controlPanelFocusedElement } = useSelector(state => state.controlPanelContent);\n const { focusedElement } = useSelector(state => state.mainNavigation);\n const dispatch = useDispatch();\n const [loading, setLoading] = useState(false);\n const [modal, setModal] = useState({\n text: '',\n visible: false,\n actionUrl: '',\n });\n const [state, setState] = useState({\n cronJobs: [],\n cronFav: [],\n toggledAll: false,\n cronReports: '',\n sorting: i18n.Date,\n order: \"descending\",\n selection: [],\n totalAmount: ''\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/cron/'));\n dispatch(removeFocusedElement());\n dispatch(removeControlPanelContentFocusedElement());\n fetchData().then(() => setLoading(false));\n\n return () => {\n dispatch(removeControlPanelContentFocusedElement());\n }\n }, []);\n\n useEffect(() => {\n window.addEventListener(\"keydown\", handleContentSelection);\n window.addEventListener(\"keydown\", handleFocusedElementShortcuts);\n\n return () => {\n window.removeEventListener(\"keydown\", handleContentSelection);\n window.removeEventListener(\"keydown\", handleFocusedElementShortcuts);\n };\n }, [controlPanelFocusedElement, focusedElement, state.cronJobs]);\n\n const handleContentSelection = event => {\n if (event.keyCode === 38 || event.keyCode === 40) {\n if (focusedElement) {\n dispatch(MainNavigation.removeFocusedElement());\n }\n }\n\n if (event.keyCode === 38) {\n event.preventDefault();\n handleArrowUp();\n } else if (event.keyCode === 40) {\n event.preventDefault();\n handleArrowDown();\n }\n }\n\n const initFocusedElement = cronJobs => {\n cronJobs[0]['FOCUSED'] = cronJobs[0]['NAME'];\n setState({ ...state, cronJobs });\n dispatch(addControlPanelContentFocusedElement(cronJobs[0]['NAME']));\n }\n\n const handleArrowDown = () => {\n let cronJobs = [...state.cronJobs];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(cronJobs);\n return;\n }\n\n let focusedElementPosition = cronJobs.findIndex(cronJob => cronJob.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== cronJobs.length - 1) {\n let nextFocusedElement = cronJobs[focusedElementPosition + 1];\n cronJobs[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, cronJobs });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleArrowUp = () => {\n let cronJobs = [...state.cronJobs];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(cronJobs);\n return;\n }\n\n let focusedElementPosition = cronJobs.findIndex(cronJob => cronJob.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== 0) {\n let nextFocusedElement = cronJobs[focusedElementPosition - 1];\n cronJobs[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, cronJobs });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleFocusedElementShortcuts = event => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus');\n\n if (controlPanelFocusedElement && !isSearchInputFocused) {\n switch (event.keyCode) {\n case 8: return handleDelete();\n case 13: return handleEdit();\n case 83: return handleSuspend();\n default: break;\n }\n }\n }\n\n const handleEdit = () => {\n props.history.push(`/edit/cron?job=${controlPanelFocusedElement}`);\n }\n\n const handleSuspend = () => {\n const { cronJobs } = state;\n let currentCronJobData = cronJobs.filter(cronJob => cronJob.NAME === controlPanelFocusedElement)[0];\n let suspendedStatus = currentCronJobData.SUSPENDED === 'yes' ? 'unsuspend' : 'suspend';\n\n displayModal(currentCronJobData.suspend_conf, `/api/v1/${suspendedStatus}/cron/index.php?job=${controlPanelFocusedElement}`);\n }\n\n const handleDelete = () => {\n const { cronJobs } = state;\n let currentCronJobData = cronJobs.filter(cronJob => cronJob.NAME === controlPanelFocusedElement)[0];\n\n displayModal(currentCronJobData.delete_conf, `/api/v1/delete/cron/index.php?job=${controlPanelFocusedElement}`);\n }\n\n const fetchData = () => {\n setLoading(true);\n return new Promise((resolve, reject) => {\n getCronList()\n .then(result => {\n setState({\n ...state,\n cronJobs: reformatData(result.data.data),\n cronReports: result.data.cron_reports,\n cronFav: result.data.cron_fav,\n selection: [],\n toggledAll: false,\n totalAmount: result.data.totalAmount,\n });\n resolve();\n })\n .catch(err => console.error(err));\n });\n }\n\n const reformatData = data => {\n let cronJobs = [];\n\n for (let i in data) {\n data[i]['NAME'] = i;\n data[i]['isChecked'] = false;\n data[i]['FOCUSED'] = controlPanelFocusedElement === i;\n cronJobs.push(data[i]);\n }\n\n return cronJobs;\n }\n\n const changeSorting = (sorting, order) => {\n setState({\n ...state,\n sorting,\n order\n });\n }\n\n const cronJobs = () => {\n const { cronJobs } = state;\n const result = [];\n const cronFav = { ...state.cronFav };\n\n cronJobs.forEach(cronJob => {\n cronJob.FOCUSED = controlPanelFocusedElement === cronJob.NAME;\n\n if (cronFav[cronJob.NAME]) {\n cronJob.STARRED = cronFav[cronJob.NAME];\n } else {\n cronJob.STARRED = 0;\n }\n\n result.push(cronJob);\n });\n\n let sortedResult = sortArray(result);\n\n return sortedResult.map((item, index) => {\n return <CronJob data={item} key={index} toggleFav={toggleFav} checkItem={checkItem} handleModal={displayModal} />;\n });\n }\n\n const checkItem = name => {\n const { selection, cronJobs } = state;\n let duplicate = [...selection];\n let cronDuplicate = cronJobs;\n let checkedItem = duplicate.indexOf(name);\n\n let incomingItem = cronDuplicate.findIndex(cronJob => cronJob.NAME === name);\n cronDuplicate[incomingItem].isChecked = !cronDuplicate[incomingItem].isChecked;\n\n if (checkedItem !== -1) {\n duplicate.splice(checkedItem, 1);\n } else {\n duplicate.push(name);\n }\n\n setState({ ...state, cronJobs: cronDuplicate, selection: duplicate });\n }\n\n const sortArray = array => {\n const { order, sorting } = state;\n let sortingColumn = sortBy(sorting);\n\n if (order === \"descending\") {\n return array.sort((a, b) => (a[sortingColumn] < b[sortingColumn]) ? 1 : ((b[sortingColumn] < a[sortingColumn]) ? -1 : 0));\n } else {\n return array.sort((a, b) => (a[sortingColumn] > b[sortingColumn]) ? 1 : ((b[sortingColumn] > a[sortingColumn]) ? -1 : 0));\n }\n }\n\n const sortBy = sorting => {\n const { Date, Command, Starred } = i18n;\n\n switch (sorting) {\n case Date: return 'DATE';\n case Command: return 'CMD';\n case Starred: return 'STARRED';\n default: break;\n }\n }\n\n const toggleFav = (value, type) => {\n const { cronFav } = state;\n let cronFavDuplicate = cronFav;\n\n if (type === 'add') {\n cronFavDuplicate[value] = 1;\n\n addFavorite(value, 'cron')\n .then(() => {\n setState({ ...state, cronFav: cronFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n } else {\n cronFavDuplicate[value] = undefined;\n\n deleteFavorite(value, 'cron')\n .then(() => {\n setState({ ...state, cronFav: cronFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n }\n }\n\n const toggleAll = toggled => {\n const cronJobsDuplicate = [...state.cronJobs];\n\n if (toggled) {\n let cronJobNames = [];\n\n let cronJobs = cronJobsDuplicate.map(cronJob => {\n cronJobNames.push(cronJob.NAME);\n cronJob.isChecked = true;\n return cronJob;\n });\n\n setState({ ...state, cronJobs, selection: cronJobNames, toggledAll: toggled });\n } else {\n let cronJobs = cronJobsDuplicate.map(cronJob => {\n cronJob.isChecked = false;\n return cronJob;\n });\n setState({ ...state, cronJobs, selection: [], toggledAll: toggled });\n }\n }\n\n const bulk = action => {\n const { selection } = state;\n const notifications = state.cronReports === 'yes' ? 'delete-cron-reports' : 'add-cron-reports';\n\n if (action === notifications) {\n return handleCronNotifications();\n }\n\n if (selection.length && action) {\n setLoading(true);\n bulkAction(action, selection)\n .then(result => {\n if (result.status === 200) {\n toggleAll(false);\n fetchData().then(() => refreshMenuCounters());\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const displayModal = (text, url) => {\n setModal({\n ...modal,\n visible: !state.modalVisible,\n text,\n actionUrl: url\n });\n }\n\n const modalConfirmHandler = () => {\n if (!modal.actionUrl) {\n return modalCancelHandler();\n }\n\n modalCancelHandler();\n setLoading(true);\n handleAction(modal.actionUrl)\n .then(res => {\n if (res.data.error) {\n setLoading(false);\n return displayModal(res.data.error, '');\n }\n fetchData().then(() => refreshMenuCounters())\n })\n .catch(err => { setLoading(false); console.error(err); });\n }\n\n const refreshMenuCounters = () => {\n dispatch(refreshCounters()).then(() => setLoading(false));\n }\n\n const modalCancelHandler = () => {\n setModal({\n ...modal,\n visible: false,\n text: '',\n actionUrl: ''\n });\n }\n\n const handleCronNotifications = () => {\n const token = localStorage.getItem(\"token\");\n const url = `/api/v1/${state.cronReports === 'yes' ? 'delete' : 'add'}/cron/reports/?token=${token}`;\n\n handleAction(url)\n .then(res => {\n displayModal(res.data.message, '');\n fetchData().then(() => setLoading(false));\n })\n .catch(err => console.error(err));\n }\n\n return (\n <div className=\"cronJobs\">\n <Helmet>\n <title>{`Vesta - ${i18n.CRON}`}</title>\n </Helmet>\n <Toolbar mobile={false} >\n <LeftButton name={i18n['Add Cron Job']} href=\"/add/cron\" showLeftMenu={true} />\n <div className=\"r-menu\">\n <div className=\"input-group input-group-sm\">\n <button onClick={handleCronNotifications} className=\"button-extra\" type=\"submit\">\n {state.cronReports === 'yes' ? i18n['turn off notifications'] : i18n['turn on notifications']}\n </button>\n <Checkbox toggleAll={toggleAll} toggled={state.toggledAll} />\n <Select list='cronList' bulkAction={bulk} cronReports={state.cronReports === 'yes'} />\n <DropdownFilter changeSorting={changeSorting} sorting={state.sorting} order={state.order} list=\"cronList\" />\n <SearchInput handleSearchTerm={term => props.changeSearchTerm(term)} />\n </div>\n </div>\n </Toolbar>\n <div className=\"cron-wrapper\">\n {loading\n ? <Spinner />\n : (<>\n {cronJobs()}\n <div className=\"total\">{state.totalAmount}</div>\n </>)}\n </div>\n <Modal\n showCancelButton={modal.actionUrl}\n onCancel={modalCancelHandler}\n onSave={modalConfirmHandler}\n show={modal.visible}\n text={modal.text} />\n </div>\n );\n}\n\nexport default CronJobs;\n","import React, { } from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Container from '../ControlPanel/Container/Container';\nimport ListItem from '../ControlPanel/ListItem/ListItem';\nimport './Package.scss';\nimport { Link } from 'react-router-dom';\nimport { useSelector } from 'react-redux';\n\nconst Package = props => {\n const { data } = props;\n const { i18n } = useSelector(state => state.session);\n const { session } = useSelector(state => state.userSession);\n\n const printNameServers = servers => {\n let serversArray = servers.split(',');\n\n return serversArray.map(\n (server, index) => <div key={index}>{server}</div>\n );\n }\n\n const toggleFav = (starred) => {\n if (starred) {\n props.toggleFav(data.NAME, 'add');\n } else {\n props.toggleFav(data.NAME, 'delete');\n }\n }\n\n const checkItem = () => {\n props.checkItem(data.NAME);\n }\n\n const handleDelete = () => {\n props.handleModal(data.delete_conf, `/api/v1/delete/package/index.php?package=${data.NAME}`);\n }\n\n return (\n <ListItem\n id={data.NAME}\n date={data.DATE}\n toggleFav={toggleFav}\n checkItem={checkItem}\n starred={data.STARRED}\n focused={data.FOCUSED}\n checked={data.isChecked}>\n\n <Container className=\"r-col w-85\">\n <div className=\"name\">{data.NAME}</div>\n <div>{data.FNAME} {data.LNAME}</div>\n <div className=\"stats\">\n <Container className=\"c-1 w-30\">\n <div>{i18n['Web Template']}: <span><span className=\"stat\">{data.WEB_TEMPLATE}</span></span></div>\n {session.PROXY_SYSTEM && <div>{i18n['Proxy Template']}: <span><span className=\"stat\">{data.PROXY_TEMPLATE}</span></span></div>}\n <div>{i18n['DNS Template']}: <span><span className=\"stat\">{data.DNS_TEMPLATE}</span></span></div>\n <div>{i18n['SSH Access']}: <span><span className=\"stat\">{data.SHELL}</span></span></div>\n <div>{i18n['Web Domains']}: <span><span className=\"stat\">{data.WEB_DOMAINS}</span></span></div>\n <div>{i18n['Web Aliases']}: <span><span className=\"stat\">{data.WEB_ALIASES}</span></span></div>\n </Container>\n <Container className=\"c-2 w-35\">\n <div>{i18n['DNS domains']}: <span><span className=\"stat\">{data.DNS_DOMAINS}</span></span></div>\n <div>{i18n['DNS records']}: <span><span className=\"stat\">{data.DNS_RECORDS}</span></span></div>\n <div>{i18n['Mail Domains']}: <span><span className=\"stat\">{data.MAIL_DOMAINS}</span></span></div>\n <div>{i18n['Mail Accounts']}: <span><span className=\"stat\">{data.MAIL_ACCOUNTS}</span></span></div>\n <div>{i18n.Databases}: <span><span className=\"stat\">{data.DATABASES}</span></span></div>\n <div>{i18n['Cron Jobs']}: <span><span className=\"stat\">{data.CRON_JOBS}</span></span></div>\n </Container>\n <Container className=\"c-3 w-35\">\n <div><span>{i18n.Backups}:</span> <span><span className=\"stat\">{data.BACKUPS}</span></span></div>\n <div><span>{i18n.Bandwidth}:</span> <span><span><span className=\"stat\">{data.BANDWIDTH}</span> {i18n.mb}</span></span></div>\n <div><span>{i18n.Disk}:</span> <span><span><span className=\"stat\">{data.DISK_QUOTA}</span> {i18n.mb}</span></span></div>\n <div className=\"ns\"><span>{i18n['Name Servers']}:</span> <span><span className=\"stat\">{printNameServers(data.NS)}</span></span></div>\n </Container>\n </div>\n </Container>\n <div className=\"actions\">\n <div>\n <Link className=\"link-edit\" to={`/edit/package/?package=${data.NAME}`}>\n {i18n.edit}\n {data.FOCUSED ? <span className=\"shortcut-button html-unicode\">↩</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> {`(${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\">↩</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\">↩</span> : <FontAwesomeIcon icon=\"cogs\" />}\n </Link>\n </div>\n\n <div>\n <button className=\"link-delete\" onClick={() => props.handleAction('/api/v1' + data.action_url)}>\n {data.STATE === 'running' ? i18n.stop : i18n.start}\n {data.FOCUSED ? <span className=\"shortcut-button\">S</span> : <FontAwesomeIcon icon={data.STATE === 'running' ? \"stop\" : \"play\"} />}\n </button>\n </div>\n\n <div>\n <button className=\"link-download restart\" onClick={() => props.handleAction(`/api/v1/restart/service/?srv=${data.NAME}`)}>\n {i18n.restart}\n {\n data.FOCUSED\n ? <span className=\"shortcut-button\">R</span>\n : <svg width=\"1em\" height=\"1em\" viewBox=\"0 0 16 16\" class=\"bi bi-arrow-repeat\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" d=\"M2.854 7.146a.5.5 0 0 0-.708 0l-2 2a.5.5 0 1 0 .708.708L2.5 8.207l1.646 1.647a.5.5 0 0 0 .708-.708l-2-2zm13-1a.5.5 0 0 0-.708 0L13.5 7.793l-1.646-1.647a.5.5 0 0 0-.708.708l2 2a.5.5 0 0 0 .708 0l2-2a.5.5 0 0 0 0-.708z\" />\n <path fill-rule=\"evenodd\" d=\"M8 3a4.995 4.995 0 0 0-4.192 2.273.5.5 0 0 1-.837-.546A6 6 0 0 1 14 8a.5.5 0 0 1-1.001 0 5 5 0 0 0-5-5zM2.5 7.5A.5.5 0 0 1 3 8a5 5 0 0 0 9.192 2.727.5.5 0 1 1 .837.546A6 6 0 0 1 2 8a.5.5 0 0 1 .501-.5z\" />\n </svg>\n }\n </button>\n </div>\n\n </div>\n </ListItem>\n );\n}\n\nexport default Server;\n","import React, { useEffect, useState } from 'react';\nimport { addControlPanelContentFocusedElement, removeControlPanelContentFocusedElement } from '../../actions/ControlPanelContent/controlPanelContentActions';\nimport { addActiveElement, removeFocusedElement } from '../../actions/MainNavigation/mainNavigationActions';\nimport { bulkAction, getServersList, handleAction } from '../../ControlPanelService/Server';\nimport SearchInput from '../../components/MainNav/Toolbar/SearchInput/SearchInput';\nimport LeftButton from '../../components/MainNav/Toolbar/LeftButton/LeftButton';\nimport Checkbox from '../../components/MainNav/Toolbar/Checkbox/Checkbox';\nimport Select from '../../components/MainNav/Toolbar/Select/Select';\nimport Toolbar from '../../components/MainNav/Toolbar/Toolbar';\nimport Modal from '../../components/ControlPanel/Modal/Modal';\nimport ServerSys from '../../components/Server/ServerSys';\nimport Spinner from '../../components/Spinner/Spinner';\nimport { useDispatch, useSelector } from 'react-redux';\nimport Server from '../../components/Server/Server';\nimport { Link } from 'react-router-dom';\nimport { Helmet } from 'react-helmet';\nimport './Servers.scss';\n\nconst Servers = props => {\n const { i18n } = useSelector(state => state.session);\n const { controlPanelFocusedElement } = useSelector(state => state.controlPanelContent);\n const { focusedElement } = useSelector(state => state.mainNavigation);\n const dispatch = useDispatch();\n const [loading, setLoading] = useState(false);\n const [modal, setModal] = useState({\n text: '',\n visible: false,\n actionUrl: '',\n });\n const [state, setState] = useState({\n servers: [],\n selection: [],\n toggledAll: false,\n sorting: i18n.Action,\n order: \"descending\",\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/server/'));\n dispatch(removeFocusedElement());\n dispatch(removeControlPanelContentFocusedElement());\n fetchData().then(() => setLoading(false));\n\n return () => {\n dispatch(removeControlPanelContentFocusedElement());\n }\n }, []);\n\n useEffect(() => {\n window.addEventListener(\"keydown\", handleContentSelection);\n window.addEventListener(\"keydown\", handleFocusedElementShortcuts);\n\n return () => {\n window.removeEventListener(\"keydown\", handleContentSelection);\n window.removeEventListener(\"keydown\", handleFocusedElementShortcuts);\n };\n }, [controlPanelFocusedElement, focusedElement, state.servers]);\n\n const handleContentSelection = event => {\n if (event.keyCode === 38 || event.keyCode === 40) {\n if (focusedElement) {\n dispatch(removeFocusedElement());\n }\n }\n\n if (event.keyCode === 38) {\n event.preventDefault();\n handleArrowUp();\n } else if (event.keyCode === 40) {\n event.preventDefault();\n handleArrowDown();\n }\n }\n\n const initFocusedElement = servers => {\n servers[0]['FOCUSED'] = servers[0]['NAME'];\n setState({ ...state, servers });\n dispatch(addControlPanelContentFocusedElement(servers[0]));\n }\n\n const handleArrowDown = () => {\n let servers = [...state.servers];\n\n if (focusedElement) {\n removeFocusedElement();\n }\n\n if (controlPanelFocusedElement.NAME === '' || controlPanelFocusedElement === '') {\n initFocusedElement(servers);\n return;\n }\n\n let focusedElementPosition = servers.findIndex(server => server.NAME === controlPanelFocusedElement.NAME);\n\n if (focusedElementPosition !== servers.length - 1) {\n let nextFocusedElement = servers[focusedElementPosition + 1];\n servers[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, servers });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement));\n }\n }\n\n const handleArrowUp = () => {\n let servers = [...state.servers];\n\n if (focusedElement) {\n removeFocusedElement();\n }\n\n if (controlPanelFocusedElement.NAME === '' || controlPanelFocusedElement === '') {\n initFocusedElement(servers);\n return;\n }\n\n let focusedElementPosition = servers.findIndex(server => server.NAME === controlPanelFocusedElement.NAME);\n\n if (focusedElementPosition !== 0) {\n let nextFocusedElement = servers[focusedElementPosition - 1];\n servers[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, servers });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement));\n }\n }\n\n const handleFocusedElementShortcuts = event => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus');\n\n if (controlPanelFocusedElement.NAME && !isSearchInputFocused) {\n switch (event.keyCode) {\n case 13: return handleConfigure();\n case 82: return handleRestart();\n case 83: return handleStop();\n default: break;\n }\n }\n }\n\n const handleConfigure = () => {\n if (controlPanelFocusedElement.NAME !== state.servers[0].NAME) {\n props.history.push(`/edit/server/${controlPanelFocusedElement.NAME}`);\n } else {\n props.history.push('/edit/server/');\n }\n }\n\n const handleStop = () => {\n onHandleAction('/api/v1' + controlPanelFocusedElement.action_url);\n }\n\n const handleRestart = () => {\n onHandleAction(`/api/v1/restart/service/?srv=${controlPanelFocusedElement.NAME}`);\n }\n\n const fetchData = () => {\n setLoading(true);\n return new Promise((resolve, reject) => {\n getServersList()\n .then(result => {\n setState({\n ...state,\n selection: [],\n toggledAll: false,\n servers: reformatData(result.data.data, result.data.sys)\n });\n resolve();\n })\n .catch(err => console.error(err));\n });\n }\n\n const reformatData = (servers, sysInfo) => {\n let result = [];\n\n for (let i in servers) {\n servers[i]['NAME'] = i;\n servers[i]['FOCUSED'] = controlPanelFocusedElement.NAME === i;\n\n result.push(servers[i]);\n }\n\n result.splice(0, 0, Object.values(sysInfo)[0]);\n result[0]['NAME'] = result[0]['HOSTNAME'];\n\n return result;\n }\n\n const servers = () => {\n const result = [];\n\n state.servers.forEach(server => {\n server.FOCUSED = controlPanelFocusedElement.NAME === server.NAME;\n result.push(server);\n });\n\n return result.map((item, index) => {\n if (item.HOSTNAME) {\n return <ServerSys data={item} key={index} checkItem={checkItem} handleAction={onHandleAction} />\n } else {\n return <Server data={item} key={index} checkItem={checkItem} handleAction={onHandleAction} />\n }\n });\n }\n\n const onHandleAction = uri => {\n dispatch(removeControlPanelContentFocusedElement());\n if (uri) {\n setLoading(true);\n handleAction(uri)\n .then(res => {\n if (res.data.error) {\n displayModal(res.data.error);\n }\n\n fetchData().then(() => setLoading(false));\n })\n .catch(err => {\n setLoading(false);\n console.error(err)\n });\n }\n }\n\n const toggleAll = toggled => {\n let serversDuplicate = [...state.servers];\n\n if (toggled) {\n let serverNames = [];\n\n let servers = serversDuplicate.map(server => {\n serverNames.push(server.NAME);\n server.isChecked = true;\n return server;\n });\n\n setState({ ...state, servers, selection: serverNames, toggledAll: toggled });\n } else {\n let servers = serversDuplicate.map(server => {\n server.isChecked = false;\n return server;\n });\n\n setState({ ...state, servers, selection: [], toggledAll: toggled });\n }\n }\n\n const bulk = action => {\n const { selection } = state;\n\n if (selection.length && action) {\n setState({ ...state, loading: true });\n bulkAction(action, selection)\n .then(res => {\n if (res.data.error) {\n displayModal(res.data.error);\n }\n\n toggleAll(false);\n fetchData().then(() => setLoading(false));\n })\n .catch(err => console.error(err));\n }\n }\n\n const checkItem = name => {\n const { selection } = state;\n let duplicate = [...selection];\n let serversDuplicate = [...state.servers];\n let checkedItem = duplicate.indexOf(name);\n\n let incomingItem = serversDuplicate.findIndex(server => server.NAME === name);\n serversDuplicate[incomingItem].isChecked = !serversDuplicate[incomingItem].isChecked;\n\n if (checkedItem !== -1) {\n duplicate.splice(checkedItem, 1);\n } else {\n duplicate.push(name);\n }\n\n setState({ ...state, servers: serversDuplicate, selection: duplicate });\n }\n\n const displayModal = text => {\n setModal({ ...modal, visible: true, text });\n }\n\n const modalConfirmHandler = () => {\n if (!modal.actionUrl) {\n return modalCancelHandler();\n }\n\n modalCancelHandler();\n setLoading(true);\n handleAction(modal.actionUrl)\n .then(res => {\n if (res.data.error) {\n setLoading(false);\n return displayModal(res.data.error, '');\n }\n\n fetchData().then(() => setLoading(false));\n })\n .catch(err => { setLoading(false); console.error(err); });\n }\n\n const modalCancelHandler = () => {\n setModal({ ...modal, visible: false, text: '' });\n }\n\n return (\n <div className=\"servers-list\">\n <Helmet>\n <title>{`Vesta - ${i18n.SERVER}`}</title>\n </Helmet>\n <Toolbar mobile={false}>\n <LeftButton href=\"/edit/server/\" list=\"server\" name={i18n.configure} showLeftMenu={true} />\n <div className=\"r-menu\">\n <div className=\"input-group input-group-sm\">\n <Link to=\"/list/server/service/?srv=cpu\" className=\"button-extra\">{i18n['show: CPU / MEM / NET / DISK']}</Link>\n <Checkbox toggleAll={toggleAll} toggled={state.toggledAll} />\n <Select list='serverList' bulkAction={bulk} />\n <SearchInput handleSearchTerm={term => props.changeSearchTerm(term)} />\n </div>\n </div>\n </Toolbar>\n {loading ? <Spinner /> : (\n <div className=\"servers-wrapper\">\n {servers()}\n </div>\n )}\n\n <Modal\n onSave={modalConfirmHandler}\n onCancel={modalCancelHandler}\n showCancelButton={false}\n show={modal.visible}\n text={modal.text} />\n </div>\n );\n}\n\nexport default Servers;\n","import React, { useEffect } from 'react';\nimport { addActiveElement } from '../../../actions/MainNavigation/mainNavigationActions';\nimport { useSelector, useDispatch } from \"react-redux\";\nimport { Link } from \"react-router-dom\";\n\nimport './Menu.scss';\nimport Spinner from 'src/components/Spinner/Spinner';\n\nconst className = height => {\n if (height === 35) {\n return \"menu-stat shadow\";\n } else {\n return \"menu-stat\";\n }\n}\n\nconst style = ({ menuHeight, mobile }) => {\n if (mobile) {\n return;\n }\n\n if (document.documentElement.clientWidth > 900) {\n return menuHeight\n } else {\n return 45;\n }\n}\n\nconst Menu = props => {\n const { activeElement, focusedElement } = useSelector(state => state.mainNavigation);\n const { i18n, userName } = useSelector(state => state.session);\n const { panel } = useSelector(state => state.panel);\n const { session } = useSelector(state => state.userSession);\n const { user } = useSelector(state => state.menuCounters);\n const dispatch = useDispatch();\n\n useEffect(() => {\n if (user.LANGUAGE) {\n localStorage.setItem(\"language\", user.LANGUAGE);\n }\n }, [user]);\n\n const handleState = (tab, event) => {\n if (`${window.location.pathname}${window.location.search}` === tab) {\n return event.preventDefault();\n }\n\n dispatch(addActiveElement(tab));\n }\n\n const statClassName = activeName => {\n return `stat ${activeName === activeElement && 'l-active'} ${activeName === focusedElement && 'focus'}`;\n }\n\n if (!panel[userName]) return <Spinner />;\n\n return (\n <div className=\"menu-wrapper\">\n <div className={className(props.menuHeight)} style={{ height: style(props) }}>\n <div className={statClassName(\"/list/user/\")}>\n <Link to=\"/list/user/\" onClick={event => handleState(\"/list/user/\", event)} onKeyPress={event => event.preventDefault()}>\n <h3>{i18n.USER}</h3>\n <div className=\"stats\">\n {\n session.look && panel[session.look]\n ? (<>\n <div>\n <span>{i18n.Disk}:</span>\n <span>\n <span className=\"value\">\n {panel[session.look]['U_DISK']}\n <span className=\"unit\">{panel[session.look]['U_DISK_MEASURE']}</span>\n </span>\n </span>\n </div>\n <div>\n <span>{i18n.Bandwidth}:</span>\n <span>\n <span className=\"value\">\n {panel[session.look]['U_BANDWIDTH']}\n <span className=\"unit\">{panel[session.look]['U_BANDWIDTH_MEASURE']}</span>\n </span>\n </span>\n </div>\n </>)\n : (<>\n <div><span>{i18n.users}:</span> <span>{user.U_USERS}</span></div>\n <div><span>{i18n.spnd}:</span> <span>{user.SUSPENDED_USERS}</span></div>\n </>)\n }\n </div>\n </Link>\n </div>\n {\n panel[userName]['WEB_DOMAINS'] !== '0' && (<div className={statClassName(\"/list/web/\")}>\n <Link to=\"/list/web/\" onClick={event => handleState(\"/list/web/\", event)} onKeyPress={event => event.preventDefault()}>\n <h3>{i18n.WEB}</h3>\n <div className=\"stats\">\n <div><span>{i18n.domains}:</span> <span>{user.U_WEB_DOMAINS}</span></div>\n <div><span>{i18n.aliases}:</span> <span>{user.U_WEB_ALIASES}</span></div>\n <div><span>{i18n.spnd}:</span> <span>{user.SUSPENDED_WEB}</span></div>\n </div>\n </Link>\n </div>)\n }\n\n {\n panel[userName]['DNS_DOMAINS'] !== '0' && (<div className={statClassName(\"/list/dns/\")}>\n <Link to=\"/list/dns/\" onClick={event => handleState(\"/list/dns/\", event)} onKeyPress={event => event.preventDefault()}>\n <h3>{i18n.DNS}</h3>\n <div className=\"stats\">\n <div><span>{i18n.domains}:</span> <span>{user.U_DNS_DOMAINS}</span></div>\n <div><span>{i18n.records}:</span> <span>{user.U_DNS_RECORDS}</span></div>\n <div><span>{i18n.spnd}:</span> <span>{user.SUSPENDED_DNS}</span></div>\n </div>\n </Link>\n </div>)\n }\n\n {\n panel[userName]['MAIL_DOMAINS'] !== '0' && (<div className={statClassName(\"/list/mail/\")}>\n <Link to=\"/list/mail/\" onClick={event => handleState(\"/list/mail/\", event)} onKeyPress={event => event.preventDefault()}>\n <h3>{i18n.MAIL}</h3>\n <div className=\"stats\">\n <div><span>{i18n.domains}:</span> <span>{user.U_MAIL_DOMAINS}</span></div>\n <div><span>{i18n.accounts}:</span> <span>{user.U_MAIL_ACCOUNTS}</span></div>\n <div><span>{i18n.spnd}:</span> <span>{user.SUSPENDED_MAIL}</span></div>\n </div>\n </Link>\n </div>)\n }\n\n {\n panel[userName]['DATABASES'] !== '0' && (<div className={statClassName(\"/list/db/\")}>\n <Link to=\"/list/db/\" onClick={event => handleState(\"/list/db/\", event)} onKeyPress={event => event.preventDefault()}>\n <h3>{i18n.DB}</h3>\n <div className=\"stats\">\n <div><span>{i18n.databases}:</span> <span>{user.U_DATABASES}</span></div>\n <div><span>{i18n.spnd}:</span> <span>{user.SUSPENDED_DB}</span></div>\n </div>\n </Link>\n </div>)\n }\n\n {\n panel[userName]['CRON_JOBS'] !== '0' && (<div className={statClassName(\"/list/cron/\")}>\n <Link to=\"/list/cron/\" onClick={event => handleState(\"/list/cron/\", event)} onKeyPress={event => event.preventDefault()}>\n <h3>{i18n.CRON}</h3>\n <div className=\"stats\">\n <div><span>{i18n.jobs}:</span> <span>{user.U_CRON_JOBS}</span></div>\n <div><span>{i18n.spnd}:</span> <span>{user.SUSPENDED_CRON}</span></div>\n </div>\n </Link>\n </div>)\n }\n\n {\n panel[userName]['BACKUPS'] !== '0' && (<div className={statClassName(\"/list/backup/\") + ' last'}>\n <Link to=\"/list/backup/\" onClick={event => handleState(\"/list/backup/\", event)} onKeyPress={event => event.preventDefault()}>\n <h3>{i18n.BACKUP}</h3>\n <div className=\"stats\">\n <div><span>{i18n.backups}:</span> <span>{user.U_BACKUPS}</span></div>\n </div>\n </Link>\n </div>)\n }\n </div>\n </div>\n );\n}\n\nexport default Menu;\n","import React from 'react';\nimport Menu from '../../MainNav/Stat-menu/Menu';\nimport { addActiveElement } from '../../../actions/MainNavigation/mainNavigationActions';\nimport { useSelector, useDispatch } from \"react-redux\";\nimport { Link } from \"react-router-dom\";\nimport './MobileTopNav.scss';\n\nconst MobileTopNav = props => {\n const { i18n, userName } = useSelector(state => state.session);\n const { session } = useSelector(state => state.userSession);\n const { activeElement, focusedElement } = useSelector(state => state.mainNavigation);\n const dispatch = useDispatch();\n\n const className = (activeName, extraClass = '') => {\n let className = 'top-link';\n\n if (activeName === activeElement) {\n className += ' active';\n }\n\n if (activeName === focusedElement) {\n className += ' focus';\n }\n\n return className + ` ${extraClass}`;\n }\n\n const handleState = (tab, event) => {\n if (`${window.location.pathname}${window.location.search}` === tab) {\n return event.preventDefault();\n }\n\n dispatch(addActiveElement(tab));\n }\n\n return (\n <div className={props.class}>\n <div className=\"mobile-menu\">\n {userName === 'admin' && (<>\n <div className={className(\"/list/package/\")}>\n <Link to=\"/list/package/\" onClick={event => handleState(\"/list/package/\", event)} onKeyPress={event => event.preventDefault()}>{i18n.Packages}</Link>\n </div>\n <div className={className(\"/list/ip/\")}>\n <Link to=\"/list/ip/\" onClick={event => handleState(\"/list/ip/\", event)} onKeyPress={event => event.preventDefault()}>{i18n.IP}</Link>\n </div>\n <div className={className(\"/list/rrd/\")}>\n <Link to=\"/list/rrd/\" onClick={event => handleState(\"/list/rrd/\", event)} onKeyPress={event => event.preventDefault()}>{i18n.Graphs}</Link>\n </div>\n </>)}\n <div className={className(\"/list/stats/\")}>\n <Link to=\"/list/stats/\" onClick={event => handleState(\"/list/stats/\", event)} onKeyPress={event => event.preventDefault()}>{i18n.Statistics}</Link>\n </div>\n <div className={className(\"/list/log/\")}>\n <Link to=\"/list/log/\" onClick={event => handleState(\"/list/log/\", event)} onKeyPress={event => event.preventDefault()}>{i18n.Log}</Link>\n </div>\n {userName === 'admin' && (<>\n <div className={className(\"/list/updates/\")}>\n <Link to=\"/list/updates/\" onClick={event => handleState(\"/list/updates/\", event)} onKeyPress={event => event.preventDefault()}>{i18n.Updates}</Link>\n </div>\n {session.FIREWALL_SYSTEM && <div className={className(\"/list/firewall/\")}>\n <Link to=\"/list/firewall/\" onClick={event => handleState(\"/list/firewall/\", event)} onKeyPress={event => event.preventDefault()}>{i18n.Firewall}</Link>\n </div>}\n </>)}\n {session.FILEMANAGER_KEY && <div className={className(\"/list/directory/\")}>\n <Link to=\"/list/directory/\">{i18n['File Manager']}</Link>\n </div>}\n {session.SOFTACULOUS === \"yes\" && <div className={className(\"/softaculous/\")}><Link to=\"/softaculous/\" target=\"_blank\">{i18n.Apps ?? 'Apps'}</Link>\n </div>}\n {userName === 'admin' && (\n <div className={className(\"/list/server/\")}>\n <Link to=\"/list/server/\" onClick={event => handleState(\"/list/server/\", event)} onKeyPress={event => event.preventDefault()}>{i18n.Server}</Link>\n </div>\n )}\n </div>\n <div className=\"mobile-stat-menu\">\n <Menu mobile={true} />\n </div>\n </div>\n );\n}\n\nexport default MobileTopNav;\n","import axios from \"axios\";\nimport { getAuthToken } from \"src/utils/token\";\nlet BASE_URL = window.location.origin;\nlet getNotificationsUri = '/api/v1/list/notifications/index.php';\nlet deleteNotificationsUri = '/api/v1/delete/notification/index.php';\n\nexport const getAppNotifications = () => {\n return axios.get(BASE_URL + getNotificationsUri, {\n params: {\n ajax: 1,\n token: getAuthToken()\n }\n });\n}\n\nexport const deleteNotification = id => {\n return axios.get(BASE_URL + deleteNotificationsUri, {\n params: {\n 'delete': 1,\n 'notification_id': id,\n token: getAuthToken()\n }\n });\n}","import React from 'react';\n\nexport default function Bell(props) {\n return (\n <svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" id=\"_24x24_On_Light_Notification\" data-name=\"24x24/On Light/Notification\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect id=\"view-box\" width=\"24\" height=\"24\" fill=\"none\" />\n <path id=\"Shape\" d=\"M6,17v-.5H2.25A2.253,2.253,0,0,1,0,14.25v-.382a2.542,2.542,0,0,1,1.415-2.289A1.248,1.248,0,0,0,2.1,10.572l.446-4.91a6.225,6.225,0,0,1,12.4,0l.446,4.91a1.26,1.26,0,0,0,.686,1.005,2.547,2.547,0,0,1,1.418,2.29v.382a2.252,2.252,0,0,1-2.25,2.25H11.5V17A2.75,2.75,0,0,1,6,17Zm1.5,0A1.25,1.25,0,0,0,10,17v-.5H7.5ZM4.045,5.8,3.6,10.708A2.738,2.738,0,0,1,2.089,12.92a1.055,1.055,0,0,0-.589.949v.382A.751.751,0,0,0,2.25,15h13A.751.751,0,0,0,16,14.25v-.382a1.054,1.054,0,0,0-.586-.948A2.739,2.739,0,0,1,13.9,10.708L13.456,5.8a4.725,4.725,0,0,0-9.411,0Z\" transform=\"translate(3.25 2.25)\" fill=\"#f8b014\" />\n </svg>);\n}\n","import React from 'react';\n\nexport default function BellUnread(props) {\n return (<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" id=\"_24x24_On_Light_Notification-Alert\" data-name=\"24x24/On Light/Notification-Alert\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect id=\"view-box\" width=\"24\" height=\"24\" fill=\"none\" />\n <path id=\"Shape\" d=\"M6,17v-.5H2.25A2.253,2.253,0,0,1,0,14.25v-.382a2.542,2.542,0,0,1,1.415-2.289A1.247,1.247,0,0,0,2.1,10.572l.446-4.91A6.227,6.227,0,0,1,10.618.286a5.477,5.477,0,0,0-.635,1.374A4.794,4.794,0,0,0,8.75,1.5,4.7,4.7,0,0,0,4.045,5.8L3.6,10.708A2.739,2.739,0,0,1,2.089,12.92a1.055,1.055,0,0,0-.589.949v.382A.751.751,0,0,0,2.25,15h13A.751.751,0,0,0,16,14.25v-.382a1.053,1.053,0,0,0-.586-.948A2.739,2.739,0,0,1,13.9,10.708l-.2-2.18a5.473,5.473,0,0,0,1.526.221l.166,1.822a1.26,1.26,0,0,0,.686,1.005,2.547,2.547,0,0,1,1.418,2.29v.382a2.252,2.252,0,0,1-2.25,2.25H11.5V17A2.75,2.75,0,0,1,6,17Zm1.5,0A1.25,1.25,0,0,0,10,17v-.5H7.5ZM15.047,6.744A3.486,3.486,0,0,1,13.5,6.28L13.456,5.8a4.7,4.7,0,0,0-1.648-3.185,3.5,3.5,0,0,1,.61-1.417A6.221,6.221,0,0,1,14.95,5.662l.1,1.081v0Z\" transform=\"translate(3.25 2.25)\" fill=\"#f8b014\" />\n <path id=\"Shape-2\" data-name=\"Shape\" d=\"M3.5,7A3.5,3.5,0,1,1,7,3.5,3.5,3.5,0,0,1,3.5,7Z\" transform=\"translate(15 2)\" fill=\"#f8b014\" />\n </svg>);\n}\n","import React, { useState, useEffect } from 'react';\nimport { getAppNotifications, deleteNotification } from 'src/ControlPanelService/Notifications';\nimport { addNotifications } from 'src/actions/Notification/notificationActions';\nimport Bell from './Bell';\nimport BellUnread from './BellUnread';\nimport { useDispatch, useSelector } from 'react-redux';\nimport './Notifications.scss';\nimport HtmlParser from 'react-html-parser';\n\nconst Notifications = () => {\n const { i18n } = useSelector(state => state.session);\n const { notifications } = useSelector(state => state.notifications);\n const dispatch = useDispatch();\n const [loading, setLoading] = useState(false);\n\n useEffect(() => {\n if (!notifications.length) {\n fetchData();\n }\n }, [notifications]);\n\n const fetchData = () => {\n setLoading(true);\n getAppNotifications()\n .then(res => {\n const result = [];\n\n for (let notification in res.data.result) {\n result.push(res.data.result[notification]);\n }\n\n dispatch(addNotifications(result));\n setLoading(false);\n })\n .catch(err => {\n console.error(err);\n setLoading(false);\n });\n }\n\n const removeNotification = id => {\n deleteNotification(id)\n .then(() => {\n fetchData();\n })\n .catch(err => console.error(err));\n }\n\n const renderOptions = () => {\n if (notifications.length) {\n return notifications.map(item => {\n return (\n <>\n <div className=\"dropdown-item\">\n <span className=\"title\"><b>{item.TOPIC}</b></span>\n <span className=\"delete-notification\" onClick={() => removeNotification(item.ID)}></span>\n </div>\n <div>{HtmlParser(item.NOTICE)}</div>\n <div className=\"dropdown-divider\"></div>\n </>\n );\n });\n } else {\n return (\n <div className=\"dropdown-item\" style={{ cursor: 'default', marginBottom: '10' }}>\n <span className=\"title\">{i18n['no notifications']}</span>\n </div>\n );\n }\n }\n\n return (\n <div className=\"btn-group\">\n <button type=\"button\" className=\"btn btn-danger dropdown-toggle\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\n <div className=\"bell\">\n {\n notifications.length\n ? <BellUnread />\n : <Bell />\n }\n </div>\n </button>\n <div className=\"dropdown-menu\">\n {loading ? 'Loading' : renderOptions()}\n </div>\n </div>\n );\n};\n\nexport default Notifications;\n","import { ADD_NOTIFICATIONS, REMOVE_NOTIFICATIONS } from './notificationTypes';\n\nexport const addNotifications = value => {\n return {\n type: ADD_NOTIFICATIONS,\n value\n };\n};\n\nexport const removeNotifications = () => {\n return {\n type: REMOVE_NOTIFICATIONS,\n value: []\n };\n};\n","import React, { useState } from 'react';\nimport { addActiveElement } from '../../../actions/MainNavigation/mainNavigationActions';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { logout } from 'src/actions/Session/sessionActions';\nimport Notifications from './Notifications/Notifications';\nimport { useSelector, useDispatch } from \"react-redux\";\nimport Spinner from 'src/components/Spinner/Spinner';\nimport { Link } from \"react-router-dom\";\nimport './Panel.scss';\n\nconst Panel = props => {\n const { i18n, userName } = useSelector(state => state.session);\n const { panel } = useSelector(state => state.panel);\n const { session } = useSelector(state => state.userSession);\n const { activeElement, focusedElement } = useSelector(state => state.mainNavigation);\n const dispatch = useDispatch();\n const [loading, setLoading] = useState(false);\n const [state, setState] = useState({\n smallNavigationClass: 'small-navigation hidden'\n });\n\n const toggleNavigation = event => {\n props.showTopNav();\n\n if (state.smallNavigationClass === 'small-navigation hidden') {\n setState({ ...state, smallNavigationClass: 'small-navigation show' });\n } else {\n setState({ ...state, smallNavigationClass: 'small-navigation hidden' });\n }\n }\n\n const className = (activeName, extraClass = '') => {\n let className = 'top-link';\n\n if (activeName === activeElement) {\n className += ' active';\n }\n\n if (activeName === focusedElement) {\n className += ' focus';\n }\n\n return className + ` ${extraClass}`;\n }\n\n const handleState = (tab, event) => {\n if (`${window.location.pathname}${window.location.search}` === tab) {\n return event.preventDefault();\n }\n\n dispatch(addActiveElement(tab));\n }\n\n const signOut = () => {\n setLoading(true);\n\n dispatch(logout())\n .then(() => {\n setLoading(false);\n },\n error => {\n setLoading(false);\n console.error(error);\n });\n }\n\n const renderNotifications = () => {\n if (panel[userName]) {\n if (panel[userName]['NOTIFICATIONS'] === 'yes') {\n return <Notifications />;\n }\n }\n }\n\n const renderSmallNavigation = () => {\n if (document.documentElement.clientWidth < 900) {\n return (<div className=\"top-panel small-device\">\n <div className=\"container left-menu\">\n <div className=\"logo\">\n <Link to=\"/list/user/\" onClick={() => dispatch(addActiveElement('/list/user/'))}>\n <div>\n <img src=\"/images/white_logo.png\" alt=\"Logo\" />\n </div>\n </Link>\n </div>\n </div>\n <div className=\"container hamburger\" onClick={toggleNavigation}>\n <span className=\"bar\"></span>\n <span className=\"bar\"></span>\n <span className=\"bar\"></span>\n </div>\n <div className=\"container profile-menu\">\n {renderNotifications()}\n <div><Link to={`/edit/user?user=${userName}`}>{userName}</Link></div>\n <div><button onClick={signOut}>{i18n['Log out']}</button></div>\n </div>\n </div>);\n }\n }\n\n return (\n <div className=\"panel-wrapper\">\n {loading && <Spinner />}\n\n <div className={`top-panel ${session.look ? 'long-profile' : ''}`}>\n <div className=\"container left-menu\">\n <div className=\"logo\">\n <Link to=\"/list/user/\" onClick={() => dispatch(addActiveElement('/list/user/'))}>\n <div>\n <img src=\"/images/white_logo.png\" alt=\"Logo\" />\n </div>\n </Link>\n </div>\n {userName === 'admin' && (<>\n <div className={className(\"/list/package/\")}>\n <Link to=\"/list/package/\" onClick={event => handleState(\"/list/package/\", event)} onKeyPress={event => event.preventDefault()}>{i18n.Packages}</Link>\n </div>\n <div className={className(\"/list/ip/\")}>\n <Link to=\"/list/ip/\" onClick={event => handleState(\"/list/ip/\", event)} onKeyPress={event => event.preventDefault()}>{i18n.IP}</Link>\n </div>\n <div className={className(\"/list/rrd/\")}>\n <Link to=\"/list/rrd/\" onClick={event => handleState(\"/list/rrd/\", event)} onKeyPress={event => event.preventDefault()}>{i18n.Graphs}</Link>\n </div>\n </>)}\n <div className={className(\"/list/stats/\")}>\n <Link to=\"/list/stats/\" onClick={event => handleState(\"/list/stats/\", event)} onKeyPress={event => event.preventDefault()}>{i18n.Statistics}</Link>\n </div>\n <div className={className(\"/list/log/\")}>\n <Link to=\"/list/log/\" onClick={event => handleState(\"/list/log/\", event)} onKeyPress={event => event.preventDefault()}>{i18n.Log}</Link>\n </div>\n {userName === 'admin' && (<>\n <div className={className(\"/list/updates/\")}>\n <Link to=\"/list/updates/\" onClick={event => handleState(\"/list/updates/\", event)} onKeyPress={event => event.preventDefault()}>{i18n.Updates}</Link>\n </div>\n {session.FIREWALL_SYSTEM && <div className={className(\"/list/firewall/\")}>\n <Link to=\"/list/firewall/\" onClick={event => handleState(\"/list/firewall/\", event)} onKeyPress={event => event.preventDefault()}>{i18n.Firewall}</Link>\n </div>}\n </>)}\n {session.FILEMANAGER_KEY && <div className={className(\"/list/directory/\")}>\n <Link to=\"/list/directory/\">{i18n['File Manager']}</Link>\n </div>}\n {session.SOFTACULOUS === \"yes\" && <div className={className(\"/softaculous/\")}><Link to=\"/softaculous/\" target=\"_blank\">{i18n.Apps ?? 'Apps'}</Link>\n </div>}\n {userName === 'admin' && (\n <div className={className(\"/list/server/\")}>\n <Link to=\"/list/server/\" onClick={event => handleState(\"/list/server/\", event)} onKeyPress={event => event.preventDefault()}>{i18n.Server}</Link>\n </div>\n )}\n </div>\n <div className=\"container profile-menu\">\n {renderNotifications()}\n <div className=\"edit-user\">\n <Link to={`/edit/user?user=${userName}`}>\n {session.look\n ? <div className=\"long-username\">\n <span>{session.user}</span>\n <FontAwesomeIcon icon=\"long-arrow-alt-right\" />\n <span>{session.look}</span>\n </div>\n : userName\n }\n </Link>\n </div>\n <div className=\"logout-button\"><button onClick={signOut}>{i18n['Log out']}</button></div>\n </div>\n </div>\n\n {renderSmallNavigation()}\n </div>\n );\n}\n\nexport default Panel;\n","import React, { useState, useEffect, useCallback } from 'react';\nimport { addFocusedElement, addActiveElement, removeActiveElement, removeFocusedElement } from \"../../actions/MainNavigation/mainNavigationActions\";\nimport * as ControlPanelContentActions from \"../../actions/ControlPanelContent/controlPanelContentActions\";\nimport { useSelector, useDispatch } from \"react-redux\";\nimport MobileTopNav from '../MainNav/Mobile/MobileTopNav';\nimport Menu from '../MainNav/Stat-menu/Menu';\nimport Panel from '../MainNav/Panel/Panel';\nimport './MainNav.scss';\nimport { useHistory } from 'react-router';\nimport Spinner from '../Spinner/Spinner';\n\nconst MainNav = () => {\n const history = useHistory();\n const [loading, setLoading] = useState(true);\n const [state, setState] = useState({\n menuHeight: 135,\n tabs: [],\n showTopNav: false\n });\n\n const { userName } = useSelector(state => state.session);\n const { session } = useSelector(state => state.userSession);\n const { user } = useSelector(state => state.menuCounters);\n const { activeElement, focusedElement, adminMenuTabs, userMenuTabs } = useSelector(state => state.mainNavigation);\n const { controlPanelFocusedElement } = useSelector(state => state.controlPanelContent);\n const dispatch = useDispatch();\n\n useEffect(() => {\n if (!userName || !Object.entries(user).length || !Object.entries(session).length) {\n return history.push('/login');\n }\n\n if (session.look) {\n const commonUserRoutes = ['package', 'ip', 'rrd', 'updates', 'firewall', 'server'];\n const splitPath = history.location.pathname.split('/')[2];\n\n if (history.location.pathname === '/add/user/') return history.push('/');\n\n if (commonUserRoutes.includes(splitPath)) {\n return history.push('/');\n }\n }\n\n const tabs = session.look ? userMenuTabs : adminMenuTabs;\n setState({ ...state, tabs });\n\n setLoading(false);\n }, [userName, user, history, session]);\n\n const controlFocusedTabWithCallback = useCallback(event => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus') || document.querySelector('textarea:focus');\n let currentActiveTabPositionInArray;\n\n if (isSearchInputFocused) {\n return;\n }\n\n if (event.keyCode === 37 || event.keyCode === 39) {\n if (controlPanelFocusedElement) {\n dispatch(ControlPanelContentActions.removeControlPanelContentFocusedElement());\n }\n\n if (!focusedElement) {\n dispatch(addFocusedElement(activeElement));\n currentActiveTabPositionInArray = state.tabs.indexOf(activeElement);\n } else {\n currentActiveTabPositionInArray = state.tabs.indexOf(focusedElement);\n }\n }\n\n if (currentActiveTabPositionInArray === -1) {\n return;\n }\n\n if (event.keyCode === 37) {\n let newFocusedMenuTab = handleLeftArrowKey(state.tabs, currentActiveTabPositionInArray);\n dispatch(addFocusedElement(newFocusedMenuTab));\n } else if (event.keyCode === 39) {\n let newFocusedMenuTab = handleRightArrowKey(state.tabs, currentActiveTabPositionInArray);\n dispatch(addFocusedElement(newFocusedMenuTab));\n } else if (event.keyCode === 13) {\n if (!controlPanelFocusedElement && focusedElement && (focusedElement !== activeElement)) {\n history.push({ pathname: focusedElement });\n dispatch(addActiveElement(focusedElement));\n dispatch(removeFocusedElement());\n }\n }\n }, [activeElement, focusedElement, controlPanelFocusedElement]);\n\n useEffect(() => {\n window.addEventListener(\"resize\", handleTopNav);\n window.addEventListener(\"keyup\", controlFocusedTabWithCallback);\n window.addEventListener(\"scroll\", hideMenu);\n\n return () => {\n window.removeEventListener(\"resize\", handleTopNav);\n window.removeEventListener(\"keyup\", controlFocusedTabWithCallback);\n window.removeEventListener(\"scroll\", hideMenu);\n };\n }, [controlFocusedTabWithCallback]);\n\n useEffect(() => {\n dispatch(removeFocusedElement());\n }, [activeElement]);\n\n useEffect(() => {\n dispatch(addActiveElement(history.location.pathname));\n }, []);\n\n const handleLeftArrowKey = (array, indexInArray) => {\n if (indexInArray === 0) {\n return array[array.length - 1];\n } else {\n return array[indexInArray - 1];\n }\n }\n\n const handleRightArrowKey = (array, indexInArray) => {\n if (indexInArray === (array.length - 1)) {\n return array[0];\n } else {\n return array[indexInArray + 1];\n }\n }\n\n const handleTopNav = () => {\n if (document.documentElement.clientWidth < 900) {\n setState({\n ...state,\n menuHeight: 45\n });\n } else {\n setState({\n ...state,\n menuHeight: 135\n });\n }\n }\n\n const hideMenu = () => {\n if (document.documentElement.clientWidth > 900) {\n let scrollTop = window.scrollY;\n let menuHeight = Math.max(45, 135 - scrollTop);\n setState({ ...state, menuHeight });\n }\n }\n\n const showTopNav = () => {\n let showTopNav = !state.showTopNav;\n setState({ ...state, showTopNav });\n }\n\n const topNavClassName = () => {\n if (state.showTopNav) {\n return \"nav-wrapper show-nav\";\n } else {\n return \"nav-wrapper hide-nav\";\n }\n }\n\n const topNavMobile = () => {\n if (state.showTopNav) {\n return \"mobile-top-nav-wrapper show\";\n } else {\n return \"mobile-top-nav-wrapper hide\";\n }\n }\n\n const topNavigation = () => {\n if (window.innerWidth > 900) {\n return (\n <div className={topNavClassName()}>\n <Menu menuHeight={state.menuHeight} mobile={false} />\n </div>\n );\n } else {\n return <MobileTopNav class={topNavMobile()} />;\n }\n }\n\n return (\n <div className=\"main-nav\">\n {\n loading\n ? <Spinner />\n : (<>\n <Panel showTopNav={showTopNav} visibleNav={state.showTopNav} />\n {topNavigation()}\n </>)\n }\n </div>\n );\n}\n\nexport default MainNav;","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport Container from '../../ControlPanel/Container/Container';\n\nimport './style.scss';\n\nconst Exclusion = ({ data, focused }) => {\n const { i18n } = useSelector(state => state.session);\n\n const renderExclusionItems = () => {\n if (!Array.isArray(data.ITEMS)) {\n for (let item in data.ITEMS) {\n return <><b>{item}</b> {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> {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> {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\">↩</span> : <FontAwesomeIcon icon=\"pen\" />}\n </Link>\n </div>\n\n <div>\n <button\n className=\"link-gray\"\n onClick={() => handleSuspend()}>\n {i18n[data.suspend_action]}\n {data.FOCUSED ? <span className=\"shortcut-button\">S</span> : <FontAwesomeIcon icon={data.SUSPENDED === 'yes' ? 'unlock' : 'lock'} />}\n </button>\n </div>\n\n <div>\n <button className=\"link-delete\" onClick={() => handleDelete()}>\n {i18n.Delete}\n {data.FOCUSED ? <span className=\"shortcut-button del\">Del</span> : <FontAwesomeIcon icon=\"times\" />}\n </button>\n </div>\n </div>\n </ListItem>\n );\n}","import React, { useState, useEffect } from 'react';\nimport { addControlPanelContentFocusedElement, removeControlPanelContentFocusedElement } from '../../actions/ControlPanelContent/controlPanelContentActions';\nimport { bulkMailAccountAction, getMailAccountList, handleAction } from '../../ControlPanelService/Mail';\nimport DropdownFilter from '../../components/MainNav/Toolbar/DropdownFilter/DropdownFilter';\nimport * as MainNavigation from '../../actions/MainNavigation/mainNavigationActions';\nimport SearchInput from '../../components/MainNav/Toolbar/SearchInput/SearchInput';\nimport { addFavorite, deleteFavorite } from '../../ControlPanelService/Favorites';\nimport LeftButton from '../../components/MainNav/Toolbar/LeftButton/LeftButton';\nimport Checkbox from '../../components/MainNav/Toolbar/Checkbox/Checkbox';\nimport Select from '../../components/MainNav/Toolbar/Select/Select';\nimport MailAccount from 'src/components/MailAccount/MailAccount';\nimport Toolbar from '../../components/MainNav/Toolbar/Toolbar';\nimport Modal from '../../components/ControlPanel/Modal/Modal';\nimport { useSelector, useDispatch } from 'react-redux';\nimport Spinner from '../../components/Spinner/Spinner';\nimport { Link } from 'react-router-dom';\n\nimport './MailAccounts.scss';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\n\nexport default function MailAccounts(props) {\n const { i18n } = useSelector(state => state.session);\n const { controlPanelFocusedElement } = useSelector(state => state.controlPanelContent);\n const { focusedElement } = useSelector(state => state.mainNavigation);\n const dispatch = useDispatch();\n const [loading, setLoading] = useState(false);\n const [modal, setModal] = useState({\n text: '',\n visible: false,\n actionUrl: '',\n });\n const [state, setState] = useState({\n mailAccounts: [],\n mailAccountsFav: [],\n domain: props.domain,\n toggledAll: false,\n sorting: i18n.Date,\n order: \"descending\",\n selection: [],\n totalAmount: ''\n });\n\n useEffect(() => {\n dispatch(removeControlPanelContentFocusedElement());\n fetchData().then(() => setLoading(false));\n\n return () => {\n dispatch(removeControlPanelContentFocusedElement());\n }\n }, []);\n\n useEffect(() => {\n window.addEventListener(\"keydown\", handleContentSelection);\n window.addEventListener(\"keydown\", handleFocusedElementShortcuts);\n\n return () => {\n window.removeEventListener(\"keydown\", handleContentSelection);\n window.removeEventListener(\"keydown\", handleFocusedElementShortcuts);\n };\n }, [controlPanelFocusedElement, focusedElement, state.mailAccounts]);\n\n const handleContentSelection = event => {\n if (event.keyCode === 38 || event.keyCode === 40) {\n if (focusedElement) {\n dispatch(MainNavigation.removeFocusedElement());\n }\n }\n\n if (event.keyCode === 38) {\n event.preventDefault();\n handleArrowUp();\n } else if (event.keyCode === 40) {\n event.preventDefault();\n handleArrowDown();\n }\n }\n\n const initFocusedElement = mailAccounts => {\n mailAccounts[0]['FOCUSED'] = mailAccounts[0]['NAME'];\n setState({ ...state, mailAccounts });\n dispatch(addControlPanelContentFocusedElement(mailAccounts[0]['NAME']));\n }\n\n const handleArrowDown = () => {\n let mailAccounts = [...state.mailAccounts];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(mailAccounts);\n return;\n }\n\n let focusedElementPosition = mailAccounts.findIndex(mailAccount => mailAccount.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== mailAccounts.length - 1) {\n let nextFocusedElement = mailAccounts[focusedElementPosition + 1];\n mailAccounts[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, mailAccounts });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleArrowUp = () => {\n let mailAccounts = [...state.mailAccounts];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(mailAccounts);\n return;\n }\n\n let focusedElementPosition = mailAccounts.findIndex(mailAccount => mailAccount.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== 0) {\n let nextFocusedElement = mailAccounts[focusedElementPosition - 1];\n mailAccounts[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, mailAccounts });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleFocusedElementShortcuts = event => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus');\n\n if (controlPanelFocusedElement && !isSearchInputFocused) {\n switch (event.keyCode) {\n case 8: return handleDelete();\n case 13: return handleEdit();\n case 83: return handleSuspend();\n default: break;\n }\n }\n }\n\n const handleEdit = () => {\n props.history.push(`/edit/mail?domain=${props.domain}&account=${controlPanelFocusedElement}`);\n }\n\n const handleSuspend = () => {\n const { mailAccounts } = state;\n let currentMailData = mailAccounts.filter(mail => mail.NAME === controlPanelFocusedElement)[0];\n let suspendedStatus = currentMailData.SUSPENDED === 'yes' ? 'unsuspend' : 'suspend';\n\n displayModal(currentMailData.suspend_conf, `/api/v1/${suspendedStatus}/mail/index.php?domain=${props.domain}&account=${controlPanelFocusedElement}`);\n }\n\n const handleDelete = () => {\n const { mailAccounts } = state;\n let currentMailData = mailAccounts.filter(mail => mail.NAME === controlPanelFocusedElement)[0];\n\n displayModal(currentMailData.delete_conf, `/api/v1/delete/mail/index.php?domain=${props.domain}&account=${controlPanelFocusedElement}`);\n }\n\n const fetchData = () => {\n setLoading(true);\n return new Promise((resolve, reject) => {\n getMailAccountList(props.domain)\n .then(result => {\n setState({\n ...state,\n mailAccounts: reformatData(result.data.data),\n webMail: result.data.webmail,\n selection: [],\n toggledAll: false,\n mailAccountsFav: result.data.mailAccountsFav,\n totalAmount: result.data.totalAmount\n });\n resolve();\n })\n .catch(err => console.error(err));\n });\n }\n\n const reformatData = data => {\n let mailAccounts = [];\n\n for (let i in data) {\n data[i]['NAME'] = i;\n data[i]['FOCUSED'] = controlPanelFocusedElement === i;\n mailAccounts.push(data[i]);\n }\n\n return mailAccounts;\n }\n\n const changeSorting = (sorting, order) => {\n setState({\n ...state,\n sorting,\n order\n });\n }\n\n const mailAccounts = () => {\n const { mailAccounts } = state;\n const mailAccountsFav = { ...state.mailAccountsFav };\n const result = [];\n\n mailAccounts.forEach(mailAccount => {\n mailAccount.FOCUSED = controlPanelFocusedElement === mailAccount.NAME;\n\n if (mailAccountsFav[mailAccount.NAME]) {\n mailAccount.STARRED = mailAccountsFav[mailAccount.NAME];\n } else {\n mailAccount.STARRED = 0;\n }\n\n result.push(mailAccount);\n });\n let sortedResult = sortArray(result);\n\n return sortedResult.map((item, index) => {\n return <MailAccount data={item} key={index} domain={state.domain} toggleFav={toggleFav} checkItem={checkItem} handleModal={displayModal} />;\n });\n }\n\n const checkItem = name => {\n const { selection, mailAccounts } = state;\n let duplicate = [...selection];\n let mailAccountsDuplicate = mailAccounts;\n let checkedItem = duplicate.indexOf(name);\n\n let incomingItem = mailAccountsDuplicate.findIndex(mailAccount => mailAccount.NAME === name);\n mailAccountsDuplicate[incomingItem].isChecked = !mailAccountsDuplicate[incomingItem].isChecked;\n\n if (checkedItem !== -1) {\n duplicate.splice(checkedItem, 1);\n } else {\n duplicate.push(name);\n }\n\n setState({ ...state, mailAccounts: mailAccountsDuplicate, selection: duplicate });\n }\n\n const sortArray = array => {\n const { order, sorting } = state;\n let sortingColumn = sortBy(sorting);\n\n if (order === \"descending\") {\n return array.sort((a, b) => (a[sortingColumn] < b[sortingColumn]) ? 1 : ((b[sortingColumn] < a[sortingColumn]) ? -1 : 0));\n } else {\n return array.sort((a, b) => (a[sortingColumn] > b[sortingColumn]) ? 1 : ((b[sortingColumn] > a[sortingColumn]) ? -1 : 0));\n }\n }\n\n const sortBy = sorting => {\n const { Date: date, Accounts, Disk, Starred } = i18n;\n\n switch (sorting) {\n case date: return 'DATE';\n case Accounts: return 'ACCOUNTS';\n case Disk: return 'U_DISK';\n case Starred: return 'STARRED';\n default: break;\n }\n }\n\n const toggleFav = (value, type) => {\n const { mailAccountsFav } = state;\n let mailAccountsFavDuplicate = mailAccountsFav;\n\n if (type === 'add') {\n mailAccountsFavDuplicate[value] = 1;\n\n addFavorite(value, 'mail_acc')\n .then(() => {\n setState({ ...state, mailAccountsFav: mailAccountsFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n } else {\n mailAccountsFavDuplicate[value] = undefined;\n\n deleteFavorite(value, 'mail_acc')\n .then(() => {\n setState({ ...state, mailAccountsFav: mailAccountsFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n }\n }\n\n const toggleAll = toggled => {\n const mailAccountsDuplicate = [...state.mailAccounts];\n\n if (toggled) {\n let mailAccountNames = [];\n\n let mailAccounts = mailAccountsDuplicate.map(mailAccount => {\n mailAccountNames.push(mailAccount.NAME);\n mailAccount.isChecked = true;\n return mailAccount;\n });\n\n setState({ ...state, mailAccounts, selection: mailAccountNames, toggledAll: toggled });\n } else {\n let mailAccounts = mailAccountsDuplicate.map(mailAccount => {\n mailAccount.isChecked = false;\n return mailAccount;\n });\n\n setState({ ...state, mailAccounts, selection: [], toggledAll: toggled });\n }\n }\n\n const bulk = action => {\n const { selection } = state;\n if (selection.length && action) {\n setLoading(true);\n bulkMailAccountAction(action, props.domain, selection)\n .then(result => {\n if (result.status === 200) {\n toggleAll(false);\n fetchData().then(() => refreshMenuCounters());\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const displayModal = (text, url) => {\n setModal({\n ...modal,\n visible: true,\n text: text,\n actionUrl: url\n });\n }\n\n const modalConfirmHandler = () => {\n if (!modal.actionUrl) {\n return modalCancelHandler();\n }\n\n modalCancelHandler();\n setLoading(true);\n handleAction(modal.actionUrl)\n .then(res => {\n if (res.data.error) {\n setLoading(false);\n return displayModal(res.data.error, '');\n }\n fetchData().then(() => refreshMenuCounters())\n })\n .catch(err => { setLoading(false); console.error(err); });\n }\n\n const refreshMenuCounters = () => {\n dispatch(refreshCounters()).then(() => setLoading(false));\n }\n\n const modalCancelHandler = () => {\n setModal({\n ...modal,\n visible: false,\n text: '',\n actionUrl: ''\n });\n }\n\n return (\n <div className=\"mail-accounts\">\n <Helmet>\n <title>{`Vesta - ${i18n.MAIL}`}</title>\n </Helmet>\n <Toolbar mobile={false} >\n <LeftButton name={i18n['Add Mail Account']} href={`/add/mail/?domain=${props.domain}`} showLeftMenu={true} />\n <div className=\"r-menu\">\n <div className=\"input-group input-group-sm\">\n {state.webMail && <a href={state.webMail} className=\"button-extra\" type=\"submit\">{i18n['open webmail']}</a>}\n <Checkbox toggleAll={toggleAll} toggled={state.toggledAll} />\n <Select list='mailList' bulkAction={bulk} />\n <DropdownFilter changeSorting={changeSorting} sorting={state.sorting} order={state.order} list=\"mailAccountList\" />\n <SearchInput handleSearchTerm={term => props.changeSearchTerm(term)} />\n </div>\n </div>\n </Toolbar>\n {loading\n ? <Spinner />\n : (\n <>\n <div className=\"mail-accounts-wrapper\">\n <div className=\"subtitle\">\n <span>{`${i18n['Listing']} ${state.domain}`}</span>\n </div>\n {mailAccounts()}\n </div>\n <div className=\"footer-actions-wrapper\">\n <div className=\"total\">{state.totalAmount}</div>\n <div className=\"back\">\n <Link to=\"/list/mail/\">{i18n['Back']}</Link>\n </div>\n </div>\n </>\n )\n }\n <Modal\n onSave={modalConfirmHandler}\n onCancel={modalCancelHandler}\n show={modal.visible}\n text={modal.text} />\n </div>\n );\n}","import React, { Component } from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Container from '../ControlPanel/Container/Container';\nimport ListItem from '../ControlPanel/ListItem/ListItem';\nimport { Link } from 'react-router-dom';\nimport './Mail.scss';\nimport { useSelector } from 'react-redux';\n\nconst Mail = props => {\n const { data } = props;\n const { i18n } = useSelector(state => state.session);\n const token = localStorage.getItem(\"token\");\n const printStat = (stat, text) => {\n if (text === 'no') {\n return <div className=\"crossed\">{stat}</div>;\n }\n\n return <div>{stat}: <span className=\"stat\">{text}</span></div>;\n }\n\n const toggleFav = (starred) => {\n if (starred) {\n props.toggleFav(props.data.NAME, 'add');\n } else {\n props.toggleFav(props.data.NAME, 'delete');\n }\n }\n\n const checkItem = () => {\n props.checkItem(props.data.NAME);\n }\n\n const handleSuspend = () => {\n let suspendedStatus = data.SUSPENDED === 'yes' ? 'unsuspend' : 'suspend' === 'yes' ? 'unsuspend' : 'suspend';\n props.handleModal(data.suspend_conf, `/api/v1/${suspendedStatus}/mail/index.php?domain=${data.NAME}`);\n }\n\n const handleDelete = () => {\n props.handleModal(data.delete_conf, `/api/v1/delete/mail/index.php?domain=${data.NAME}`);\n }\n\n return (\n <ListItem\n id={data.NAME}\n focused={data.FOCUSED}\n checked={data.isChecked}\n date={data.DATE}\n starred={data.STARRED}\n toggleFav={toggleFav}\n checkItem={checkItem}\n suspended={data.SUSPENDED === 'yes'}>\n\n <Container className=\"r-col w-85\">\n <div className=\"name\">{data.NAME}</div>\n <div className=\"stats\">\n <Container className=\"c-1\">\n <div className=\"bandwidth\">\n {i18n.Disk}\n <span><span className=\"stat\">{data.U_DISK}</span>{i18n.mb}</span>\n <div className=\"percent\" style={{ width: `${data.U_DISK_PERCENT}%` || '0%' }}></div>\n </div>\n </Container>\n <Container className=\"c-2\">\n {printStat(i18n['AntiVirus Support'], data.ANTIVIRUS)}\n {printStat(i18n['DKIM Support'], data.DKIM)}\n </Container>\n <Container className=\"c-3\">\n {printStat(i18n['AntiSpam Support'], data.ANTISPAM)}\n <div>{i18n['Catchall email']}: <span className=\"stat catchall-mail\">{data.CATCHALL}</span></div>\n </Container>\n </div>\n </Container>\n <div className=\"actions\">\n <div>\n <Link className=\"link-gray\" to={`/list/mail/?domain=${data.NAME}`}>\n {data.list_accounts_button}\n {data.FOCUSED ? <span className=\"shortcut-button\">L</span> : <FontAwesomeIcon icon=\"list\" />}\n </Link>\n </div>\n\n <div>\n <Link className=\"link-edit\" to={`/add/mail/?domain=${data.NAME}`}>\n {i18n['add account']}\n {data.FOCUSED ? <span className=\"shortcut-button\">N</span> : <FontAwesomeIcon icon=\"plus\" />}\n </Link>\n </div>\n\n <div>\n <Link className=\"link-edit\" to={`/edit/mail/?domain=${data.NAME}`}>\n {i18n.edit}\n {data.FOCUSED ? <span className=\"shortcut-button html-unicode\">↩</span> : <FontAwesomeIcon icon=\"pen\" />}\n </Link>\n </div>\n\n <div>\n <button\n className=\"link-gray\"\n onClick={() => handleSuspend()}>\n {i18n[data.suspend_action]}\n {data.FOCUSED ? <span className=\"shortcut-button\">S</span> : <FontAwesomeIcon icon={data.SUSPENDED === 'yes' ? 'unlock' : 'lock'} />}\n </button>\n </div>\n\n <div>\n <button className=\"link-delete\" onClick={() => handleDelete()}>\n {i18n.Delete}\n {data.FOCUSED ? <span className=\"shortcut-button del\">Del</span> : <FontAwesomeIcon icon=\"times\" />}\n </button>\n </div>\n </div>\n </ListItem>\n );\n}\n\nexport default Mail;","import React, { useState, useEffect } from 'react';\nimport { addControlPanelContentFocusedElement, removeControlPanelContentFocusedElement } from '../../actions/ControlPanelContent/controlPanelContentActions';\nimport { addActiveElement, removeFocusedElement } from '../../actions/MainNavigation/mainNavigationActions';\nimport DropdownFilter from '../../components/MainNav/Toolbar/DropdownFilter/DropdownFilter';\nimport { bulkAction, getMailList, handleAction } from '../../ControlPanelService/Mail';\nimport * as MainNavigation from '../../actions/MainNavigation/mainNavigationActions';\nimport SearchInput from '../../components/MainNav/Toolbar/SearchInput/SearchInput';\nimport { addFavorite, deleteFavorite } from '../../ControlPanelService/Favorites';\nimport LeftButton from '../../components/MainNav/Toolbar/LeftButton/LeftButton';\nimport Checkbox from '../../components/MainNav/Toolbar/Checkbox/Checkbox';\nimport Select from '../../components/MainNav/Toolbar/Select/Select';\nimport Toolbar from '../../components/MainNav/Toolbar/Toolbar';\nimport Modal from '../../components/ControlPanel/Modal/Modal';\nimport Spinner from '../../components/Spinner/Spinner';\nimport Mail from '../../components/Mail/Mail';\nimport './Mails.scss';\n\nimport { useSelector, useDispatch } from 'react-redux';\nimport { Helmet } from 'react-helmet';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport { Link } from 'react-router-dom';\n\nconst Mails = props => {\n const { i18n } = useSelector(state => state.session);\n const { controlPanelFocusedElement } = useSelector(state => state.controlPanelContent);\n const { focusedElement } = useSelector(state => state.mainNavigation);\n const dispatch = useDispatch();\n const [loading, setLoading] = useState(false);\n const [modal, setModal] = useState({\n text: '',\n visible: false,\n actionUrl: '',\n });\n const [state, setState] = useState({\n mails: [],\n mailFav: [],\n toggledAll: false,\n webmail: '',\n sorting: i18n.Date,\n order: \"descending\",\n selection: [],\n totalAmount: ''\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/mail/'));\n dispatch(removeFocusedElement());\n dispatch(removeControlPanelContentFocusedElement());\n fetchData().then(() => setLoading(false));\n\n return () => {\n dispatch(removeControlPanelContentFocusedElement());\n }\n }, []);\n\n useEffect(() => {\n window.addEventListener(\"keydown\", handleContentSelection);\n window.addEventListener(\"keydown\", handleFocusedElementShortcuts);\n\n return () => {\n window.removeEventListener(\"keydown\", handleContentSelection);\n window.removeEventListener(\"keydown\", handleFocusedElementShortcuts);\n };\n }, [controlPanelFocusedElement, focusedElement, state.mails]);\n\n const handleContentSelection = event => {\n if (event.keyCode === 38 || event.keyCode === 40) {\n if (focusedElement) {\n dispatch(MainNavigation.removeFocusedElement());\n }\n }\n\n if (event.keyCode === 38) {\n event.preventDefault();\n handleArrowUp();\n } else if (event.keyCode === 40) {\n event.preventDefault();\n handleArrowDown();\n }\n }\n\n const initFocusedElement = mails => {\n mails[0]['FOCUSED'] = mails[0]['NAME'];\n setState({ ...state, mails });\n dispatch(addControlPanelContentFocusedElement(mails[0]['NAME']));\n }\n\n const handleArrowDown = () => {\n let mails = [...state.mails];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(mails);\n return;\n }\n\n let focusedElementPosition = mails.findIndex(mail => mail.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== mails.length - 1) {\n let nextFocusedElement = mails[focusedElementPosition + 1];\n mails[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, mails });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleArrowUp = () => {\n let mails = [...state.mails];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(mails);\n return;\n }\n\n let focusedElementPosition = mails.findIndex(mail => mail.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== 0) {\n let nextFocusedElement = mails[focusedElementPosition - 1];\n mails[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, mails });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleFocusedElementShortcuts = event => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus');\n\n if (controlPanelFocusedElement && !isSearchInputFocused) {\n switch (event.keyCode) {\n case 8: return handleDelete();\n case 13: return handleEdit();\n case 76: return handleLogs();\n case 78: return handleAddRecord();\n case 83: return handleSuspend();\n default: break;\n }\n }\n }\n\n const handleAddRecord = () => {\n props.history.push(`/add/mail/?domain=${controlPanelFocusedElement}`);\n }\n\n const handleLogs = () => {\n props.history.push(`/list/mail?domain=${controlPanelFocusedElement}&type=access`);\n }\n\n const handleEdit = () => {\n props.history.push(`/edit/mail?domain=${controlPanelFocusedElement}`);\n }\n\n const handleSuspend = () => {\n const { mails } = state;\n let currentMailData = mails.filter(mail => mail.NAME === controlPanelFocusedElement)[0];\n let suspendedStatus = currentMailData.SUSPENDED === 'yes' ? 'unsuspend' : 'suspend';\n\n displayModal(currentMailData.suspend_conf, `/api/v1/${suspendedStatus}/mail/index.php?domain=${controlPanelFocusedElement}`);\n }\n\n const handleDelete = () => {\n const { mails } = state;\n let currentMailData = mails.filter(mail => mail.NAME === controlPanelFocusedElement)[0];\n\n displayModal(currentMailData.delete_conf, `/api/v1/delete/mail/index.php?domain=${controlPanelFocusedElement}`);\n }\n\n const fetchData = () => {\n setLoading(true);\n return new Promise((resolve, reject) => {\n getMailList()\n .then(result => {\n setState({\n ...state,\n mails: reformatData(result.data.data),\n webmail: result.data.webmail,\n mailFav: result.data.mailFav,\n selection: [],\n toggledAll: false,\n totalAmount: result.data.totalAmount\n });\n resolve();\n })\n .catch(err => console.error(err));\n });\n }\n\n const reformatData = data => {\n let mails = [];\n\n for (let i in data) {\n data[i]['NAME'] = i;\n data[i]['FOCUSED'] = controlPanelFocusedElement === i;\n mails.push(data[i]);\n }\n\n return mails;\n }\n\n const changeSorting = (sorting, order) => {\n setState({\n ...state,\n sorting,\n order\n });\n }\n\n const mails = () => {\n const { mails } = state;\n const mailFav = { ...state.mailFav };\n const result = [];\n\n mails.forEach(mail => {\n mail.FOCUSED = controlPanelFocusedElement === mail.NAME;\n\n if (mailFav[mail.NAME]) {\n mail.STARRED = mailFav[mail.NAME];\n } else {\n mail.STARRED = 0;\n }\n\n result.push(mail);\n });\n let sortedResult = sortArray(result);\n\n return sortedResult.map((item, index) => {\n return <Mail data={item} key={index} toggleFav={toggleFav} checkItem={checkItem} handleModal={displayModal} />;\n });\n }\n\n const checkItem = name => {\n const { selection, mails } = state;\n let duplicate = [...selection];\n let mailsDuplicate = mails;\n let checkedItem = duplicate.indexOf(name);\n\n let incomingItem = mailsDuplicate.findIndex(mail => mail.NAME === name);\n mailsDuplicate[incomingItem].isChecked = !mailsDuplicate[incomingItem].isChecked;\n\n if (checkedItem !== -1) {\n duplicate.splice(checkedItem, 1);\n } else {\n duplicate.push(name);\n }\n\n setState({ ...state, mails: mailsDuplicate, selection: duplicate });\n }\n\n const sortArray = array => {\n const { order, sorting } = state;\n let sortingColumn = sortBy(sorting);\n\n if (order === \"descending\") {\n return array.sort((a, b) => (a[sortingColumn] < b[sortingColumn]) ? 1 : ((b[sortingColumn] < a[sortingColumn]) ? -1 : 0));\n } else {\n return array.sort((a, b) => (a[sortingColumn] > b[sortingColumn]) ? 1 : ((b[sortingColumn] > a[sortingColumn]) ? -1 : 0));\n }\n }\n\n const sortBy = sorting => {\n const { Date, Domains, Accounts, Disk, Starred } = i18n;\n\n switch (sorting) {\n case Date: return 'DATE';\n case Domains: return 'domain_account';\n case Accounts: return 'ACCOUNTS';\n case Disk: return 'U_DISK';\n case Starred: return 'STARRED';\n default: break;\n }\n }\n\n const toggleFav = (value, type) => {\n const { mailFav } = state;\n let mailFavDuplicate = mailFav;\n\n if (type === 'add') {\n mailFavDuplicate[value] = 1;\n\n addFavorite(value, 'mail')\n .then(() => {\n setState({ ...state, mailFav: mailFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n } else {\n mailFavDuplicate[value] = undefined;\n\n deleteFavorite(value, 'mail')\n .then(() => {\n setState({ ...state, mailFav: mailFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n }\n }\n\n const toggleAll = toggled => {\n const mailsDuplicate = [...state.mails];\n\n if (toggled) {\n let mailNames = [];\n\n let mails = mailsDuplicate.map(mail => {\n mailNames.push(mail.NAME);\n mail.isChecked = true;\n return mail;\n });\n\n setState({ ...state, mails, selection: mailNames, toggledAll: toggled });\n } else {\n let mails = mailsDuplicate.map(mail => {\n mail.isChecked = false;\n return mail;\n });\n\n setState({ ...state, mails, selection: [], toggledAll: toggled });\n }\n }\n\n const bulk = action => {\n const { selection } = state;\n\n if (selection.length && action) {\n setLoading(true);\n bulkAction(action, selection)\n .then(result => {\n if (result.status === 200) {\n toggleAll(false);\n fetchData().then(() => refreshMenuCounters());\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const displayModal = (text, url) => {\n setModal({\n ...modal,\n visible: true,\n text: text,\n actionUrl: url\n });\n }\n\n const modalConfirmHandler = () => {\n if (!modal.actionUrl) {\n return modalCancelHandler();\n }\n\n modalCancelHandler();\n setLoading(true);\n handleAction(modal.actionUrl)\n .then(res => {\n if (res.data.error) {\n setLoading(false);\n return displayModal(res.data.error, '');\n }\n fetchData().then(() => refreshMenuCounters())\n })\n .catch(err => { setLoading(false); console.error(err); });\n }\n\n const refreshMenuCounters = () => {\n dispatch(refreshCounters()).then(() => setLoading(false));\n }\n\n const modalCancelHandler = () => {\n setModal({\n ...modal,\n visible: false,\n text: '',\n actionUrl: ''\n });\n }\n\n return (\n <div className=\"mails\">\n <Helmet>\n <title>{`Vesta - ${i18n.MAIL}`}</title>\n </Helmet>\n <Toolbar mobile={false} >\n <LeftButton name=\"Add Mail Domain\" href=\"/add/mail\" showLeftMenu={true} />\n <div className=\"r-menu\">\n <div className=\"input-group input-group-sm\">\n {state.webmail && <Link\n to={{ pathname: `http://${window.location.hostname}${state.webmail}` }}\n target=\"_blank\"\n className=\"button-extra\"\n type=\"submit\">\n {i18n['open webmail']}\n </Link>}\n <Checkbox toggleAll={toggleAll} toggled={state.toggledAll} />\n <Select list='mailList' bulkAction={bulk} />\n <DropdownFilter changeSorting={changeSorting} sorting={state.sorting} order={state.order} list=\"mailList\" />\n <SearchInput handleSearchTerm={term => props.changeSearchTerm(term)} />\n </div>\n </div>\n </Toolbar>\n <div className=\"mails-wrapper\">\n {loading\n ? <Spinner />\n : (<>\n {mails()}\n <div className=\"total\">{state.totalAmount}</div>\n </>)}\n </div>\n <Modal\n onSave={modalConfirmHandler}\n onCancel={modalCancelHandler}\n show={modal.visible}\n text={modal.text} />\n </div>\n );\n}\n\nexport default Mails;\n","import React, { useEffect, useState } from 'react';\nimport MailAccounts from '../MailAccounts/MailAccounts';\nimport { useHistory } from 'react-router-dom';\nimport Mails from '../Mails/Mails';\nimport QueryString from 'qs';\nimport { Helmet } from 'react-helmet';\nimport { useSelector } from 'react-redux';\n\nexport default function MailWrapper(props) {\n const { i18n } = useSelector(state => state.session);\n const [mailDomain, setMailDomain] = useState('');\n const history = useHistory();\n\n useEffect(() => {\n const parsedQueryString = QueryString.parse(history.location.search, { ignoreQueryPrefix: true });\n\n if (parsedQueryString.domain) {\n setMailDomain(parsedQueryString.domain);\n } else {\n setMailDomain('');\n }\n }, [history.location]);\n\n return (\n <>\n <Helmet>\n <title>{`Vesta - ${i18n.MAIL}`}</title>\n </Helmet>\n {\n mailDomain\n ? <MailAccounts {...props} domain={mailDomain} changeSearchTerm={props.changeSearchTerm} />\n : <Mails {...props} changeSearchTerm={props.changeSearchTerm} />\n }\n </>\n );\n}","import React from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Container from '../ControlPanel/Container/Container';\nimport ListItem from '../ControlPanel/ListItem/ListItem';\nimport { Link } from 'react-router-dom';\nimport { useSelector } from 'react-redux';\n\nexport default function DnsRecord({ data, domain, handleModal, ...props }) {\n const { i18n } = useSelector(state => state.session);\n\n const toggleFav = (starred) => {\n if (starred) {\n props.toggleFav(data.NAME, 'add');\n } else {\n props.toggleFav(data.NAME, 'delete');\n }\n }\n\n const checkItem = () => {\n props.checkItem(data.NAME);\n }\n\n const handleDelete = () => {\n handleModal(data.delete_conf, `/api/v1/delete/dns/?domain=${domain}&record_id=${data.ID}`);\n }\n\n const handleSuspend = () => {\n handleModal(data.suspend_conf, `/api/v1/${data.suspend_action}/dns/?domain=${domain}&record_id=${data.ID}`);\n }\n\n return (\n <ListItem\n id={data.NAME}\n date={data.DATE}\n toggleFav={toggleFav}\n checkItem={checkItem}\n starred={data.STARRED}\n focused={data.FOCUSED}\n checked={data.isChecked}\n suspended={data.SUSPENDED === 'yes'}>\n\n <Container className=\"r-col w-85\">\n <div className=\"name\">{data.dnsRecord}</div>\n <br />\n <div className=\"stats\">\n <Container className=\"c-1\">\n <span className=\"stat\">{`${data.RECORD.substring(0, 12)}${data.RECORD.length > 12 ? '...' : ''}`}</span>\n </Container>\n <Container className=\"c-2\">\n <span className=\"stat\">{data.TYPE}</span>\n </Container>\n <Container className=\"c-3\">\n <span className=\"stat\">{data.PRIORITY}</span>\n </Container>\n <Container className=\"c-4 long-value\">\n <span className=\"stat\">{data.VALUE}</span>\n </Container>\n </div>\n </Container>\n <div className=\"actions\">\n <div>\n <Link className=\"link-edit\" to={`/edit/dns/?domain=${domain}&record_id=${data.ID}`}>\n {i18n.edit}\n {data.FOCUSED ? <span className=\"shortcut-button html-unicode\">↩</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\">↩</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} {months[month]} {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]} {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\">↩</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} {months[month]} {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> {data.TIME}</div>\n </Container>\n <Container className=\"c-2 w-30\">\n <div></div>\n </Container>\n <Container className=\"c-2 w-30\">\n <div><b>{data.CHAIN}</b></div>\n </Container>\n <Container className=\"c-2 w-30\">\n <div><b>{data.NAME}</b></div>\n </Container>\n </div>\n </Container>\n <div className=\"actions\">\n <div>\n <button className=\"link-delete\" onClick={() => handleDelete()}>\n {i18n.Delete}\n {data.FOCUSED ? <span className=\"shortcut-button del\">Del</span> : <FontAwesomeIcon icon=\"times\" />}\n </button>\n </div>\n </div>\n </ListItem>\n );\n}\n\nexport default Ban;","import React, { useEffect, useState } from 'react';\nimport { addControlPanelContentFocusedElement, removeControlPanelContentFocusedElement } from 'src/actions/ControlPanelContent/controlPanelContentActions';\nimport { addActiveElement, removeFocusedElement } from 'src/actions/MainNavigation/mainNavigationActions';\nimport { bulkAction, getBanList, handleAction } from 'src/ControlPanelService/Firewalls';\nimport * as MainNavigation from 'src/actions/MainNavigation/mainNavigationActions';\nimport SearchInput from 'src/components/MainNav/Toolbar/SearchInput/SearchInput';\nimport LeftButton from 'src/components/MainNav/Toolbar/LeftButton/LeftButton';\nimport Checkbox from 'src/components/MainNav/Toolbar/Checkbox/Checkbox';\nimport Select from 'src/components/MainNav/Toolbar/Select/Select';\nimport Toolbar from 'src/components/MainNav/Toolbar/Toolbar';\nimport Modal from 'src/components/ControlPanel/Modal/Modal';\nimport { useDispatch, useSelector } from 'react-redux';\nimport Spinner from 'src/components/Spinner/Spinner';\nimport Ban from 'src/components/Firewall/Ban';\nimport { Helmet } from 'react-helmet';\nimport { useHistory } from 'react-router';\n\nimport './styles.scss';\n\nconst BanLists = props => {\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const { controlPanelFocusedElement } = useSelector(state => state.controlPanelContent);\n const { focusedElement } = useSelector(state => state.mainNavigation);\n const dispatch = useDispatch();\n const [loading, setLoading] = useState(false);\n const [modal, setModal] = useState({\n text: '',\n visible: false,\n actionUrl: ''\n });\n const [state, setState] = useState({\n banIps: [],\n selection: [],\n toggledAll: false,\n sorting: i18n.Action,\n order: \"descending\",\n totalAmount: ''\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/firewall/'));\n dispatch(removeFocusedElement());\n dispatch(removeControlPanelContentFocusedElement());\n fetchData().then(() => setLoading(false));\n\n return () => {\n dispatch(removeControlPanelContentFocusedElement());\n }\n }, []);\n\n useEffect(() => {\n window.addEventListener(\"keydown\", handleContentSelection);\n window.addEventListener(\"keydown\", handleFocusedElementShortcuts);\n\n return () => {\n window.removeEventListener(\"keydown\", handleContentSelection);\n window.removeEventListener(\"keydown\", handleFocusedElementShortcuts);\n };\n }, [controlPanelFocusedElement, focusedElement, state.banIps]);\n\n const handleContentSelection = event => {\n if (event.keyCode === 38 || event.keyCode === 40) {\n if (focusedElement) {\n dispatch(MainNavigation.removeFocusedElement());\n }\n }\n\n if (event.keyCode === 38) {\n event.preventDefault();\n handleArrowUp();\n } else if (event.keyCode === 40) {\n event.preventDefault();\n handleArrowDown();\n }\n }\n\n const initFocusedElement = banIps => {\n banIps[0]['FOCUSED'] = banIps[0]['NAME'];\n setState({ ...state, banIps });\n dispatch(addControlPanelContentFocusedElement(banIps[0]['NAME']));\n }\n\n const handleArrowDown = () => {\n let banIps = [...state.banIps];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement.NAME === '') {\n initFocusedElement(banIps);\n return;\n }\n\n let focusedElementPosition = banIps.findIndex(banIp => banIp.NAME === controlPanelFocusedElement.NAME);\n\n if (focusedElementPosition !== banIps.length - 1) {\n let nextFocusedElement = banIps[focusedElementPosition + 1];\n banIps[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, banIps });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleArrowUp = () => {\n let banIps = [...state.banIps];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement.NAME === '') {\n initFocusedElement(banIps);\n return;\n }\n\n let focusedElementPosition = banIps.findIndex(banIp => banIp.NAME === controlPanelFocusedElement.NAME);\n\n if (focusedElementPosition !== 0) {\n let nextFocusedElement = banIps[focusedElementPosition - 1];\n banIps[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, banIps });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleFocusedElementShortcuts = event => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus');\n\n if (controlPanelFocusedElement && !isSearchInputFocused) {\n switch (event.keyCode) {\n case 8: return handleDelete();\n default: break;\n }\n }\n }\n\n const handleDelete = () => {\n const { banIps } = state;\n let currentBanIpData = banIps.filter(banIp => banIp.NAME === controlPanelFocusedElement.NAME)[0];\n\n displayModal(currentBanIpData.delete_conf, controlPanelFocusedElement.delete_url);\n }\n\n const fetchData = () => {\n setLoading(true);\n return new Promise((resolve, reject) => {\n getBanList()\n .then(result => {\n setState({\n ...state,\n banIps: reformatData(result.data.data),\n totalAmount: result.data.total_amount,\n toggledAll: false,\n selection: []\n });\n resolve();\n })\n .catch(err => console.error(err));\n });\n }\n\n const reformatData = data => {\n let banIps = [];\n\n for (let i in data) {\n data[i]['NAME'] = i;\n data[i]['FOCUSED'] = controlPanelFocusedElement.NAME === i;\n banIps.push(data[i]);\n }\n\n return banIps;\n }\n\n const banIps = () => {\n let banIps = [...state.banIps];\n\n banIps.forEach(banIp => {\n banIp.FOCUSED = controlPanelFocusedElement.NAME === banIp.NAME;\n });\n\n return banIps.map((item, index) => {\n return <Ban data={item} key={index} checkItem={checkItem} handleModal={displayModal} />;\n });\n }\n\n const checkItem = name => {\n const { selection, banIps } = state;\n let duplicate = [...selection];\n let banIpsDuplicate = banIps;\n let checkedItem = duplicate.indexOf(name);\n\n let incomingItem = banIpsDuplicate.findIndex(banIp => banIp.NAME === name);\n banIpsDuplicate[incomingItem].isChecked = !banIpsDuplicate[incomingItem].isChecked;\n\n if (checkedItem !== -1) {\n duplicate.splice(checkedItem, 1);\n } else {\n duplicate.push(name);\n }\n\n setState({ ...state, banIps: banIpsDuplicate, selection: duplicate });\n }\n\n const toggleAll = toggled => {\n if (toggled) {\n let banIpNames = [];\n\n let banIps = state.banIps.map(banIp => {\n banIpNames.push(banIp.NAME);\n banIp.isChecked = true;\n return banIp;\n });\n\n setState({ ...state, banIps, selection: banIpNames, toggledAll: toggled });\n } else {\n let banIps = state.banIps.map(banIp => {\n banIp.isChecked = false;\n return banIp;\n });\n\n setState({ ...state, banIps, selection: [], toggledAll: toggled });\n }\n }\n\n const bulk = action => {\n const { selection } = state;\n\n if (selection.length && action) {\n bulkAction(action, selection, state.banIps)\n .then(result => {\n if (result.status === 200) {\n toggleAll(false);\n fetchData().then(() => setLoading(false));\n }\n })\n .catch(err => console.error(err));\n }\n }\n\n const displayModal = (text, actionUrl) => {\n setModal({ ...modal, visible: !modal.visible, text, actionUrl });\n }\n\n const modalConfirmHandler = () => {\n if (!modal.actionUrl) {\n return modalCancelHandler();\n }\n\n modalCancelHandler();\n setLoading(true);\n handleAction(modal.actionUrl)\n .then(res => {\n if (res.data.error) {\n setLoading(false);\n return displayModal(res.data.error, '');\n }\n fetchData().then(() => setLoading(false));\n })\n .catch(err => { setLoading(false); console.error(err); });\n }\n\n const modalCancelHandler = () => {\n setModal({ ...modal, visible: !modal.visible, text: '', actionUrl: '' });\n }\n\n return (\n <div className=\"firewalls\">\n <Helmet>\n <title>{`Vesta - ${i18n.FIREWALL}`}</title>\n </Helmet>\n <Toolbar mobile={false} >\n <LeftButton href=\"/add/firewall/banlist\" name={i18n['Ban IP Address']} showLeftMenu={true} />\n <div className=\"r-menu\">\n <div className=\"input-group input-group-sm\">\n <Checkbox toggleAll={toggleAll} toggled={state.toggledAll} />\n <Select list='banList' bulkAction={bulk} />\n <SearchInput handleSearchTerm={term => props.changeSearchTerm(term)} />\n </div>\n </div>\n </Toolbar>\n {loading\n ? <Spinner />\n : (<>\n <div className=\"banlist-wrapper\">\n {banIps()}\n <div className=\"buttons-wrapper\">\n <div className=\"total\">{state.totalAmount}</div>\n <button type=\"button\" className=\"back\" onClick={() => history.push('/list/firewall/')}>{i18n.Back}</button>\n </div>\n </div>\n </>)\n }\n <Modal\n onSave={modalConfirmHandler}\n onCancel={modalCancelHandler}\n show={modal.visible}\n text={modal.text} />\n </div>\n );\n}\n\nexport default BanLists;\n","import React from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Container from '../ControlPanel/Container/Container';\nimport ListItem from '../ControlPanel/ListItem/ListItem';\nimport { Link } from 'react-router-dom';\nimport './WebDomain.scss';\nimport { useSelector } from 'react-redux';\n\nexport default function WebDomain(props) {\n const { data } = props;\n const { i18n } = useSelector(state => state.session);\n\n const printStat = (stat, text) => {\n if (text === 'no' || text === '') {\n return <div className=\"crossed\">{stat}</div>;\n }\n\n return <div>{stat}: <span className=\"stat\">{text}</span></div>;\n }\n\n const toggleFav = (starred) => {\n if (starred) {\n props.toggleFav(data.NAME, 'add');\n } else {\n props.toggleFav(data.NAME, 'delete');\n }\n }\n\n const checkItem = () => {\n props.checkItem(data.NAME);\n }\n\n const renderProxySupport = () => {\n if (!data.PROXY_SYSTEM) return;\n\n if (data.PROXY_SUPPORT === 'no') {\n printStat(i18n['Proxy Support'], '');\n } else {\n printStat(i18n['Proxy Support'], data.PROXY_SUPPORT);\n }\n }\n\n const renderBackedSupport = () => {\n if (!data.WEB_BACKEND) return;\n\n if (data.BACKEND_SUPPORT === 'no') {\n printStat(i18n['Backend Support'] ?? 'Backend Support', '');\n } else {\n printStat(i18n['Backend Support'] ?? 'Backend Support', data.BACKEND_SUPPORT);\n }\n }\n\n const handleSuspend = () => {\n let suspendedStatus = data.SUSPENDED === 'yes' ? 'unsuspend' : 'suspend';\n props.handleModal(data.spnd_confirmation, `/api/v1/${suspendedStatus}/web/index.php?domain=${data.NAME}`);\n }\n\n const handleDelete = () => {\n props.handleModal(data.delete_confirmation, `/api/v1/delete/web/index.php?domain=${data.NAME}`);\n }\n\n return (\n <ListItem\n id={data.NAME}\n checked={data.isChecked}\n starred={data.STARRED}\n date={data.DATE}\n toggleFav={toggleFav}\n checkItem={checkItem}\n suspended={data.SUSPENDED === 'yes'}\n focused={data.FOCUSED} >\n <Container className=\"r-col w-85\">\n <div className=\"name\">\n <div>{data.NAME}</div>\n <div><span className=\"dns-name-span\">{data.ALIAS.replace(/,/g, ', ')}</span></div>\n </div>\n <div>{data.IP}</div>\n <div className=\"stats\">\n <Container className=\"c-1 w-25\">\n <div className=\"bandwidth\">\n {i18n.Bandwidth}\n <span><span className=\"stat\">{data.U_BANDWIDTH_SIZE}</span>{data.U_BANDWIDTH_MEASURE}</span>\n <div className=\"percent\" style={{ width: `${data.U_BANDWIDTH_PERCENT}%` || '0%' }}></div>\n </div>\n <div className=\"disk\">\n {i18n.Disk}: <span><span className=\"stat\">{data.U_DISK_SIZE}</span>{data.U_DISK_MEASURE}</span>\n <div className=\"percent\" style={{ width: `${data.U_DISK_PERCENT}%` || '0%' }}></div>\n </div>\n </Container>\n <Container className=\"c-2 w-45\">\n <div>{i18n['Web Template']}: <span className=\"stat\">{data.TPL}</span></div>\n {data.SSL === 'no'\n ? printStat(i18n['SSL Support'], '')\n : printStat(i18n['SSL Support'], data.LETSENCRYPT === 'yes' ? i18n['Lets Encrypt'] : i18n[data.SSL])}\n {printStat(i18n['Web Statistics'], data.WEB_STATS)}\n </Container>\n <Container className=\"c-3 w-35\">\n {renderProxySupport()}\n {data.PROXY_SYSTEM && printStat(i18n['Proxy Template'] ?? 'Proxy Template', data.PROXY)}\n {renderBackedSupport()}\n {data.WEB_BACKEND && printStat(i18n['Backend Template'] ?? 'Backend Template', data.BACKEND)}\n {printStat(i18n['Additional FTP Account'], data.FTP)}\n </Container>\n </div>\n </Container>\n <div className=\"actions\">\n <div>\n <Link className=\"link-edit\" to={`/edit/web?domain=${data.NAME}`}>\n {i18n.edit}\n {data.FOCUSED ? <span className=\"shortcut-button html-unicode\">↩</span> : <FontAwesomeIcon icon=\"pen\" />}\n </Link>\n </div>\n <div>\n <Link className=\"link-gray\" to={`/list/web-log?domain=${data.NAME}&type=access`}>\n {i18n['view logs']}\n {data.FOCUSED ? <span className=\"shortcut-button\">L</span> : <FontAwesomeIcon icon=\"list\" />}\n </Link>\n </div>\n {\n data.STATS && (\n <div>\n <a className=\"link-gray\" href={`http://${data.NAME}/vstats/`} target=\"_blank\" rel=\"noopener noreferrer\">\n {i18n['open webstats']}\n {data.FOCUSED ? <span className=\"shortcut-button\">L</span> : <FontAwesomeIcon icon=\"list\" />}\n </a>\n </div>\n )\n }\n <div>\n <button\n className=\"link-gray\"\n onClick={handleSuspend}>\n {i18n[data.spnd_action]}\n {data.FOCUSED ? <span className=\"shortcut-button\">S</span> : <FontAwesomeIcon icon={data.SUSPENDED === 'yes' ? 'unlock' : 'lock'} />}\n </button>\n </div>\n <div>\n <button className=\"link-delete\" onClick={handleDelete}>\n {i18n.Delete}\n {data.FOCUSED ? <span className=\"shortcut-button del\">Del</span> : <FontAwesomeIcon icon=\"times\" />}\n </button>\n </div>\n </div>\n </ListItem>\n );\n}\n","import React, { useState, useEffect } from 'react';\nimport { addControlPanelContentFocusedElement, removeControlPanelContentFocusedElement } from '../../actions/ControlPanelContent/controlPanelContentActions';\nimport { addActiveElement, removeFocusedElement } from '../../actions/MainNavigation/mainNavigationActions';\nimport DropdownFilter from '../../components/MainNav/Toolbar/DropdownFilter/DropdownFilter';\nimport { bulkAction, getWebList, handleAction } from '../../ControlPanelService/Web';\nimport * as MainNavigation from '../../actions/MainNavigation/mainNavigationActions';\nimport SearchInput from '../../components/MainNav/Toolbar/SearchInput/SearchInput';\nimport { addFavorite, deleteFavorite } from '../../ControlPanelService/Favorites';\nimport LeftButton from '../../components/MainNav/Toolbar/LeftButton/LeftButton';\nimport Checkbox from '../../components/MainNav/Toolbar/Checkbox/Checkbox';\nimport Select from '../../components/MainNav/Toolbar/Select/Select';\nimport Toolbar from '../../components/MainNav/Toolbar/Toolbar';\nimport WebDomain from '../../components/WebDomain/WebDomain';\nimport Spinner from '../../components/Spinner/Spinner';\nimport Modal from '../../components/ControlPanel/Modal/Modal';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { Helmet } from 'react-helmet';\nimport './Web.scss';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\nimport { useHistory } from 'react-router-dom';\n\nconst Web = props => {\n const { i18n } = useSelector(state => state.session);\n const { controlPanelFocusedElement } = useSelector(state => state.controlPanelContent);\n const { focusedElement } = useSelector(state => state.mainNavigation);\n const { panel } = useSelector(state => state.panel);\n const { userName } = useSelector(state => state.session);\n const dispatch = useDispatch();\n const history = useHistory();\n const [loading, setLoading] = useState(false);\n const [modal, setModal] = useState({\n text: '',\n visible: false,\n actionUrl: ''\n });\n const [state, setState] = useState({\n webDomains: [],\n webFav: [],\n toggledAll: false,\n sorting: i18n.Date,\n order: \"descending\",\n selection: [],\n totalAmount: ''\n });\n\n useEffect(() => {\n if (panel[userName]['WEB_DOMAINS'] === '0') {\n return history.push('/');\n }\n\n dispatch(addActiveElement('/list/web/'));\n dispatch(removeFocusedElement());\n dispatch(removeControlPanelContentFocusedElement());\n fetchData().then(() => setLoading(false));\n\n return () => {\n dispatch(removeControlPanelContentFocusedElement());\n }\n }, []);\n\n useEffect(() => {\n window.addEventListener(\"keydown\", handleContentSelection);\n window.addEventListener(\"keydown\", handleFocusedElementShortcuts);\n\n return () => {\n window.removeEventListener(\"keydown\", handleContentSelection);\n window.removeEventListener(\"keydown\", handleFocusedElementShortcuts);\n };\n }, [controlPanelFocusedElement, focusedElement, state.webDomains]);\n\n const handleContentSelection = event => {\n if (event.keyCode === 38 || event.keyCode === 40) {\n if (focusedElement) {\n dispatch(MainNavigation.removeFocusedElement());\n }\n }\n\n if (event.keyCode === 38) {\n event.preventDefault();\n handleArrowUp();\n } else if (event.keyCode === 40) {\n event.preventDefault();\n handleArrowDown();\n }\n }\n\n const initFocusedElement = webDomains => {\n webDomains[0]['FOCUSED'] = webDomains[0]['NAME'];\n setState({ ...state, webDomains });\n dispatch(addControlPanelContentFocusedElement(webDomains[0]['NAME']));\n }\n\n const handleArrowDown = () => {\n let webDomains = [...state.webDomains];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(webDomains);\n return;\n }\n\n let focusedElementPosition = webDomains.findIndex(webDomain => webDomain.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== webDomains.length - 1) {\n let nextFocusedElement = webDomains[focusedElementPosition + 1];\n webDomains[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, webDomains });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleArrowUp = () => {\n let webDomains = [...state.webDomains];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(webDomains);\n return;\n }\n\n let focusedElementPosition = webDomains.findIndex(webDomain => webDomain.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== 0) {\n let nextFocusedElement = webDomains[focusedElementPosition - 1];\n webDomains[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, webDomains });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleFocusedElementShortcuts = event => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus');\n\n if (controlPanelFocusedElement && !isSearchInputFocused) {\n switch (event.keyCode) {\n case 76: return handleLogs();\n case 83: return handleSuspend();\n case 8: return handleDelete();\n case 13: return handleEdit();\n default: break;\n }\n }\n }\n\n const handleLogs = () => {\n props.history.push(`/list/web-log?domain=${controlPanelFocusedElement}&type=access`);\n }\n\n const handleEdit = () => {\n props.history.push(`/edit/web?domain=${controlPanelFocusedElement}`);\n }\n\n const handleSuspend = () => {\n const { webDomains } = state;\n let currentWebDomainData = webDomains.filter(webDomain => webDomain.NAME === controlPanelFocusedElement)[0];\n let suspendedStatus = currentWebDomainData.SUSPENDED === 'yes' ? 'unsuspend' : 'suspend';\n\n displayModal(currentWebDomainData.spnd_confirmation, `/api/v1/${suspendedStatus}/web/index.php?domain=${controlPanelFocusedElement}`);\n }\n\n const handleDelete = () => {\n const { webDomains } = state;\n let currentWebDomainData = webDomains.filter(webDomain => webDomain.NAME === controlPanelFocusedElement)[0];\n\n displayModal(currentWebDomainData.delete_confirmation, `/api/v1/web/index.php?domain=${controlPanelFocusedElement}`);\n }\n\n const fetchData = () => {\n setLoading(true);\n return new Promise((resolve, reject) => {\n getWebList()\n .then(result => {\n setState({\n ...state,\n webDomains: reformatData(result.data.data),\n webFav: result.data.webFav,\n totalAmount: result.data.totalAmount,\n toggledAll: false,\n selection: []\n });\n resolve();\n })\n .catch(err => console.error(err));\n });\n }\n\n const changeSorting = (sorting, order) => {\n setState({\n ...state,\n sorting,\n order\n });\n }\n\n const reformatData = data => {\n let webDomains = [];\n\n for (let i in data) {\n data[i]['NAME'] = i;\n data[i]['FOCUSED'] = controlPanelFocusedElement === i;\n webDomains.push(data[i]);\n }\n\n return webDomains;\n }\n\n const webDomains = () => {\n const webFav = { ...state.webFav };\n let webDomains = [...state.webDomains];\n\n webDomains.forEach(webDomain => {\n webDomain.FOCUSED = controlPanelFocusedElement === webDomain.NAME;\n\n if (webFav[webDomain.NAME]) {\n webDomain.STARRED = webFav[webDomain.NAME];\n } else {\n webDomain.STARRED = 0;\n }\n });\n\n let sortedResult = sortArray(webDomains);\n\n return sortedResult.map((item, index) => {\n return <WebDomain data={item} key={index} toggleFav={toggleFav} checkItem={checkItem} handleModal={displayModal} />;\n });\n }\n\n const checkItem = name => {\n let duplicate = [...state.selection];\n let webDomainsDuplicate = state.webDomains;\n let checkedItem = duplicate.indexOf(name);\n\n let incomingItem = webDomainsDuplicate.findIndex(webDomain => webDomain.NAME === name);\n webDomainsDuplicate[incomingItem].isChecked = !webDomainsDuplicate[incomingItem].isChecked;\n\n if (checkedItem !== -1) {\n duplicate.splice(checkedItem, 1);\n } else {\n duplicate.push(name);\n }\n\n setState({ ...state, webDomains: webDomainsDuplicate, selection: duplicate });\n }\n\n const sortArray = array => {\n let sortingColumn = sortBy(state.sorting);\n\n if (state.order === \"descending\") {\n return array.sort((a, b) => (a[sortingColumn] < b[sortingColumn]) ? 1 : ((b[sortingColumn] < a[sortingColumn]) ? -1 : 0));\n } else {\n return array.sort((a, b) => (a[sortingColumn] > b[sortingColumn]) ? 1 : ((b[sortingColumn] > a[sortingColumn]) ? -1 : 0));\n }\n }\n\n const sortBy = sorting => {\n const { Date: date, Domain, Disk, Bandwidth, Starred } = i18n;\n\n switch (sorting) {\n case date: return 'DATE';\n case Domain: return 'ALIAS';\n case i18n['IP Addresses']: return 'IP';\n case Disk: return 'U_DISK';\n case Bandwidth: return 'U_BANDWIDTH';\n case Starred: return 'STARRED';\n default: break;\n }\n }\n\n const toggleFav = (value, type) => {\n let webFavDuplicate = state.webFav;\n\n if (type === 'add') {\n webFavDuplicate[value] = 1;\n\n addFavorite(value, 'web')\n .then(() => {\n setState({ ...state, webFav: webFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n } else {\n webFavDuplicate[value] = undefined;\n\n deleteFavorite(value, 'web')\n .then(() => {\n setState({ ...state, webFav: webFavDuplicate });\n })\n .catch(err => {\n console.error(err);\n });\n }\n }\n\n const toggleAll = toggled => {\n const webDomainsDuplicate = [...state.webDomains];\n\n if (toggled) {\n let webDomainNames = [];\n\n let webDomains = webDomainsDuplicate.map(webDomain => {\n webDomainNames.push(webDomain.NAME);\n webDomain.isChecked = true;\n return webDomain;\n });\n\n setState({ ...state, webDomains, selection: webDomainNames, toggledAll: toggled });\n } else {\n let webDomains = webDomainsDuplicate.map(webDomain => {\n webDomain.isChecked = false;\n return webDomain;\n });\n\n setState({ ...state, webDomains, selection: [], toggledAll: toggled });\n }\n }\n\n const bulk = action => {\n if (state.selection.length && action) {\n setLoading(true);\n bulkAction(action, state.selection)\n .then(result => {\n toggleAll(false);\n fetchData().then(() => refreshMenuCounters());\n })\n .catch(err => console.error(err));\n }\n }\n\n const displayModal = (text, url) => {\n setModal({\n ...modal,\n visible: true,\n text,\n actionUrl: url\n });\n }\n\n const modalConfirmHandler = () => {\n if (!modal.actionUrl) {\n return modalCancelHandler();\n }\n\n modalCancelHandler();\n setLoading(true);\n handleAction(modal.actionUrl)\n .then(res => {\n if (res.data.error) {\n setLoading(false);\n return displayModal(res.data.error, '');\n }\n fetchData().then(() => refreshMenuCounters())\n })\n .catch(err => { setLoading(false); console.error(err); });\n }\n\n const refreshMenuCounters = () => {\n dispatch(refreshCounters()).then(() => setLoading(false));\n }\n\n const modalCancelHandler = () => {\n setModal({\n ...modal,\n visible: false,\n text: '',\n actionUrl: ''\n });\n }\n\n return (\n <div className=\"web\">\n <Helmet>\n <title>{`Vesta - ${i18n.WEB}`}</title>\n </Helmet>\n <Toolbar mobile={false} >\n <LeftButton name={i18n['Add Web Domain']} href=\"/add/web/\" showLeftMenu={true} />\n <div className=\"r-menu\">\n <div className=\"input-group input-group-sm\">\n <Checkbox toggleAll={toggleAll} toggled={state.toggledAll} />\n <Select list='webList' bulkAction={bulk} />\n <DropdownFilter changeSorting={changeSorting} sorting={state.sorting} order={state.order} list=\"webList\" />\n <SearchInput handleSearchTerm={term => props.changeSearchTerm(term)} />\n </div>\n </div>\n </Toolbar>\n <div className=\"web-domains-wrapper\">\n {loading\n ? <Spinner />\n : (\n <>\n {webDomains()}\n <div className=\"total\">{state.totalAmount}</div>\n </>\n )\n }\n </div>\n <Modal\n onSave={modalConfirmHandler}\n onCancel={modalCancelHandler}\n show={modal.visible}\n text={modal.text} />\n </div>\n );\n}\n\nexport default Web;","import axios from \"axios\";\nimport { getAuthToken } from \"src/utils/token\";\n\nconst BASE_URL = window.location.origin;\nconst webApiUri = '/api/v1/search/';\n\nexport const getSearchResultsList = term => {\n return axios.get(BASE_URL + webApiUri + '?q=' + term);\n}\n\nexport const handleAction = uri => {\n return axios.get(BASE_URL + uri, {\n params: {\n token: getAuthToken()\n }\n });\n}\n","import React from 'react';\nimport { loginAs, logout } from 'src/actions/Session/sessionActions';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Container from '../ControlPanel/Container/Container';\nimport ListItem from '../ControlPanel/ListItem/ListItem';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { Link, useHistory } from 'react-router-dom';\nimport './SearchItem.scss';\n\nconst SearchItem = ({ data, handleModal }) => {\n const { i18n, userName } = useSelector(state => state.session);\n const dispatch = useDispatch();\n const history = useHistory()\n\n const signInAs = user => {\n dispatch(loginAs(user)).then(() => history.push('/'));\n }\n\n const signOut = () => {\n dispatch(logout()).then(() => history.push('/'));\n }\n\n const handleDelete = () => {\n handleModal(data.delete_confirmation, `/api/v1/${data.TYPE === 'user' ? `/api/v1/delete/user/index.php?user=${data.USER}` : data.delete_link}`);\n }\n\n const handleSuspend = () => {\n handleModal(data.spnd_confirmation, `/api/v1/${data.TYPE === 'user' ? `${data.spnd_action}/user/index.php?user=${data.USER}` : data.spnd_link}`);\n }\n\n const printLoginActionButton = () => {\n if (data.TYPE !== 'user') return;\n\n if (userName === data.USER) {\n return (\n <div>\n <button onClick={signOut}>{i18n['Log out']}\n {data.FOCUSED ? <span className=\"shortcut-button\">L</span> : <FontAwesomeIcon icon=\"user-lock\" />}\n </button>\n </div>\n );\n } else {\n return (\n <div>\n <button onClick={() => signInAs(data.USER)}>{i18n['login as']} {data.USER}\n {data.FOCUSED ? <span className=\"shortcut-button\">L</span> : <FontAwesomeIcon icon=\"user-lock\" />}\n </button>\n </div>\n );\n }\n }\n\n return (\n <ListItem date={data.DATE} suspended={data.SUSPENDED === 'yes'}>\n <Container className=\"search-list r-col w-85\">\n <div className=\"name\">{data.RESULT}</div>\n <div className=\"stats\">\n <Container className=\"c-1\">\n <div className=\"object\">{data.TYPE === 'user' ? i18n['USER'] : i18n[data.object]}</div>\n </Container>\n <Container className=\"c-2\">\n <div className=\"owner\">{i18n.Owner}: <span>{data.USER}</span></div>\n </Container>\n <Container className=\"c-3\">\n <div className=\"status\">{i18n.Status}: <span>{data.status}</span></div>\n </Container>\n </div>\n </Container>\n <div className=\"actions\">\n {printLoginActionButton()}\n <div><Link className=\"link-edit\" to={data.edit_link}>{i18n.edit} <FontAwesomeIcon icon=\"pen\" /></Link></div>\n <div>\n <button\n className=\"link-gray\"\n onClick={handleSuspend}>\n {data.spnd_action}\n <FontAwesomeIcon icon={data.SUSPENDED === 'yes' ? 'unlock' : 'lock'} />\n </button>\n </div>\n <div>\n <button\n className=\"link-delete\"\n onClick={handleDelete}>\n {i18n.Delete}\n <FontAwesomeIcon icon=\"times\" />\n </button>\n </div>\n </div>\n </ListItem>\n );\n}\n\nexport default SearchItem;\n","import React, { Component, useEffect, useState } from 'react';\nimport DropdownFilter from '../../components/MainNav/Toolbar/DropdownFilter/DropdownFilter';\nimport { getSearchResultsList, handleAction } from '../../ControlPanelService/Search';\nimport SearchInput from '../../components/MainNav/Toolbar/SearchInput/SearchInput';\nimport SearchItem from '../../components/Searchitem/SearchItem';\nimport Toolbar from '../../components/MainNav/Toolbar/Toolbar';\nimport Modal from '../../components/ControlPanel/Modal/Modal';\nimport Spinner from '../../components/Spinner/Spinner';\nimport './Search.scss';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { useHistory } from 'react-router-dom';\nimport { refreshCounters } from 'src/actions/MenuCounters/menuCounterActions';\n\nconst Search = props => {\n const { i18n } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const [loading, setLoading] = useState(false);\n const [state, setState] = useState({\n searchResults: [],\n totalAmount: '',\n sorting: i18n.Date,\n order: \"descending\",\n total: 0\n });\n const [modal, setModal] = useState({\n visible: false,\n text: '',\n actionUrl: ''\n });\n\n useEffect(() => {\n const { search } = history.location;\n\n if (search) {\n let searchTerm = search.split('=')[1];\n\n if (searchTerm !== '') {\n fetchData(searchTerm).then(() => setLoading(false));\n } else {\n return history.push({ pathname: '/list/user/', search: '' });\n }\n } else if (props.searchTerm !== '') {\n fetchData(props.searchTerm).then(() => setLoading(false));\n } else {\n return history.push({ pathname: '/list/user/', search: '' });\n }\n }, []);\n\n const fetchData = searchTerm => {\n setLoading(true);\n return new Promise((resolve, reject) => {\n getSearchResultsList(searchTerm)\n .then(result => {\n setState({\n ...state,\n searchResults: result.data.data,\n totalAmount: result.data.total\n });\n resolve();\n })\n .catch(err => console.error(err));\n });\n }\n\n const searchResults = () => {\n const { searchResults } = state;\n const result = [];\n\n for (let i in searchResults) {\n result.push(searchResults[i]);\n }\n\n let sortedResult = sortArray(result);\n\n return sortedResult.map((item, index) => {\n return <SearchItem data={item} key={index} handleModal={displayModal} />;\n });\n }\n\n const changeSorting = (sorting, order) => {\n setState({\n ...state,\n sorting,\n order\n });\n }\n\n const sortArray = array => {\n const { order, sorting } = state;\n let sortBy = sortByHandler(sorting);\n\n if (order === \"descending\") {\n return array.sort((a, b) => (a[sortBy] < b[sortBy]) ? 1 : ((b[sortBy] < a[sortBy]) ? -1 : 0));\n } else {\n return array.sort((a, b) => (a[sortBy] > b[sortBy]) ? 1 : ((b[sortBy] > a[sortBy]) ? -1 : 0));\n }\n }\n\n const sortByHandler = sorting => {\n const { Date, Name, Starred } = i18n;\n\n switch (sorting) {\n case Date: return 'DATE';\n case Name: return 'RESULT';\n default: break;\n }\n }\n\n const displayModal = (text, url) => {\n setModal({\n ...modal,\n visible: !modal.visible,\n text,\n actionUrl: url\n });\n }\n\n const modalConfirmHandler = () => {\n if (!modal.actionUrl) {\n return modalCancelHandler();\n }\n\n modalCancelHandler();\n setLoading(true);\n handleAction(modal.actionUrl)\n .then(res => {\n if (res.data.error) {\n setLoading(false);\n return displayModal(res.data.error, '');\n }\n fetchData().then(() => refreshMenuCounters())\n })\n .catch(err => { setLoading(false); console.error(err); });\n }\n\n const refreshMenuCounters = () => {\n dispatch(refreshCounters()).then(() => setLoading(false));\n }\n\n const modalCancelHandler = () => {\n setModal({\n ...modal,\n visible: false,\n text: '',\n actionUrl: ''\n });\n }\n\n return (\n <div className=\"logs-list\">\n <Toolbar mobile={false}>\n <div className=\"search-toolbar-name\">{i18n['Search Results']}</div>\n <div className=\"search-toolbar-right\">\n <DropdownFilter changeSorting={changeSorting} sorting={state.sorting} order={state.order} list=\"searchList\" />\n <SearchInput handleSearchTerm={term => props.changeSearchTerm(term)} />\n </div>\n </Toolbar>\n <div className=\"statistics-wrapper\">\n {loading\n ? <Spinner />\n : (<>\n {searchResults()}\n <div className=\"total\">{state.totalAmount}</div>\n </>)}\n </div>\n <Modal\n onSave={modalConfirmHandler}\n onCancel={modalCancelHandler}\n show={modal.visible}\n text={modal.text} />\n </div>\n );\n}\n\nexport default Search;\n","import axios from \"axios\";\n\nconst BASE_URL = window.location.origin;\nconst webApiUri = '/api/v1/list/log/index.php';\n\nexport const getLogsList = () => {\n return axios.get(BASE_URL + webApiUri);\n}","import React from 'react';\nimport Container from '../ControlPanel/Container/Container';\nimport './Log.scss';\n\nconst Log = props => {\n const { data } = props;\n\n const printDate = date => {\n let newDate = new Date(date);\n let day = newDate.getDate();\n let month = newDate.getMonth();\n let year = newDate.getFullYear();\n let months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n\n return <div className=\"date\">{day} {months[month]} {year}</div>;\n }\n\n return (\n <div className={data.FOCUSED ? 'statistic-item focused' : 'statistic-item'} id={data.NAME}>\n <Container className=\"l-col w-15\">\n {printDate(data.DATE)}\n {data.TIME}\n </Container>\n <Container className=\"r-col w-85\">\n <div className=\"name\">{data.CMD}</div>\n </Container>\n </div>\n );\n}\n\nexport default Log;","import React, { useEffect, useState } from 'react';\nimport { addControlPanelContentFocusedElement, removeControlPanelContentFocusedElement } from '../../actions/ControlPanelContent/controlPanelContentActions';\nimport { addActiveElement, removeFocusedElement } from '../../actions/MainNavigation/mainNavigationActions';\nimport * as MainNavigation from '../../actions/MainNavigation/mainNavigationActions';\nimport SearchInput from '../../components/MainNav/Toolbar/SearchInput/SearchInput';\nimport LeftButton from '../../components/MainNav/Toolbar/LeftButton/LeftButton';\nimport Toolbar from '../../components/MainNav/Toolbar/Toolbar';\nimport { getLogsList } from '../../ControlPanelService/Logs';\nimport Spinner from '../../components/Spinner/Spinner';\nimport { useDispatch, useSelector } from 'react-redux';\nimport Log from '../../components/Log/Log';\nimport './Logs.scss';\nimport { Helmet } from 'react-helmet';\n\nconst Logs = props => {\n const { i18n } = useSelector(state => state.session);\n const { controlPanelFocusedElement } = useSelector(state => state.controlPanelContent);\n const { focusedElement } = useSelector(state => state.mainNavigation);\n const dispatch = useDispatch();\n const [state, setState] = useState({\n logs: [],\n totalAmount: '',\n loading: false,\n total: 0\n });\n\n useEffect(() => {\n dispatch(addActiveElement('/list/log/'));\n dispatch(removeFocusedElement());\n dispatch(removeControlPanelContentFocusedElement());\n fetchData();\n\n return () => {\n dispatch(removeControlPanelContentFocusedElement());\n }\n }, []);\n\n useEffect(() => {\n window.addEventListener(\"keydown\", handleContentSelection);\n\n return () => {\n window.removeEventListener(\"keydown\", handleContentSelection);\n };\n }, [controlPanelFocusedElement, focusedElement, state.logs]);\n\n const handleContentSelection = event => {\n if (event.keyCode === 38 || event.keyCode === 40) {\n if (focusedElement) {\n dispatch(MainNavigation.removeFocusedElement());\n }\n }\n\n if (event.keyCode === 38) {\n event.preventDefault();\n handleArrowUp();\n } else if (event.keyCode === 40) {\n event.preventDefault();\n handleArrowDown();\n }\n }\n\n const initFocusedElement = logs => {\n logs[0]['FOCUSED'] = logs[0]['NAME'];\n setState({ ...state, logs });\n dispatch(addControlPanelContentFocusedElement(logs[0]['NAME']));\n }\n\n const handleArrowDown = () => {\n let logs = [...state.logs];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(logs);\n return;\n }\n\n let focusedElementPosition = logs.findIndex(log => log.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== logs.length - 1) {\n let nextFocusedElement = logs[focusedElementPosition + 1];\n logs[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, logs });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const handleArrowUp = () => {\n let logs = [...state.logs];\n\n if (focusedElement) {\n MainNavigation.removeFocusedElement();\n }\n\n if (controlPanelFocusedElement === '') {\n initFocusedElement(logs);\n return;\n }\n\n let focusedElementPosition = logs.findIndex(log => log.NAME === controlPanelFocusedElement);\n\n if (focusedElementPosition !== 0) {\n let nextFocusedElement = logs[focusedElementPosition - 1];\n logs[focusedElementPosition]['FOCUSED'] = '';\n nextFocusedElement['FOCUSED'] = nextFocusedElement['NAME'];\n document.getElementById(nextFocusedElement['NAME']).scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n setState({ ...state, logs });\n dispatch(addControlPanelContentFocusedElement(nextFocusedElement['NAME']));\n }\n }\n\n const fetchData = () => {\n setState({ ...state, loading: true });\n\n getLogsList()\n .then(result => {\n setState({\n logs: reformatData(result.data.data),\n totalAmount: result.data.totalAmount,\n loading: false\n });\n })\n .catch(err => console.error(err));\n }\n\n const reformatData = data => {\n let logs = [];\n\n for (let i in data) {\n data[i]['NAME'] = i;\n data[i]['FOCUSED'] = controlPanelFocusedElement === i;\n logs.push(data[i]);\n }\n\n return logs;\n }\n\n const logs = () => {\n let logs = [...state.logs];\n\n logs.forEach(log => {\n log.FOCUSED = controlPanelFocusedElement === log.NAME;\n });\n\n return logs.map((item, index) => {\n return <Log data={item} key={index} />;\n });\n }\n\n return (\n <div className=\"logs-list\">\n <Helmet>\n <title>{`Vesta - ${i18n.LOG}`}</title>\n </Helmet>\n <Toolbar mobile={false} className=\"justify-right\">\n <LeftButton name=\"Add Cron Job\" showLeftMenu={false} />\n <div className=\"r-menu\">\n <div className=\"input-group input-group-sm\">\n <SearchInput handleSearchTerm={term => props.changeSearchTerm(term)} />\n </div>\n </div>\n </Toolbar>\n <div className=\"logs-wrapper\">\n {state.loading ? <Spinner /> : logs()}\n </div>\n <div className=\"total\">{state.totalAmount}</div>\n </div>\n );\n}\n\nexport default Logs;","import React, { useEffect, useState } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { addActiveElement, removeFocusedElement } from \"../../actions/MainNavigation/mainNavigationActions\";\nimport EditInternetProtocol from '../../components/InternetProtocol/Edit/EditInternetProtocol';\nimport AddInternetProtocol from '../../components/InternetProtocol/Add/AddInternetProtocol';\nimport EditServerNginx from 'src/components/Server/Edit/Nginx/EditServerNginx';\nimport Postgresql from 'src/components/Server/Edit/Postgresql/Postgresql';\nimport EditBackupExclusions from 'src/components/Backup/Exclusion/Edit';\nimport { Route, Switch, Redirect, useHistory } from \"react-router-dom\";\nimport InternetProtocols from '../InternetProtocols/InternetProtocols';\nimport AddWebDomain from '../../components/WebDomain/Add/AddWebDomain';\nimport EditDatabase from '../../components/Database/Edit/EditDatabase';\nimport EditFirewall from '../../components/Firewall/Edit/EditFirewall';\nimport Hotkeys from '../../components/ControlPanel/Hotkeys/Hotkeys';\nimport AddDatabase from '../../components/Database/Add/AddDatabase';\nimport AddFirewall from '../../components/Firewall/Add/AddFirewall';\nimport EditCronJob from '../../components/CronJob/Edit/EditCronJob';\nimport EditPackage from '../../components/Package/Edit/EditPackage';\nimport EditHttpd from 'src/components/Server/Edit/Httpd/EditHttpd';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport AddCronJob from '../../components/CronJob/Add/AddCronJob';\nimport AddPackage from '../../components/Package/Add/AddPackage';\nimport EditServer from '../../components/Server/Edit/EditServer';\nimport Dovecot from 'src/components/Server/Edit/Dovecot/Dovecot';\nimport EditMailWrapper from '../EditMailWrapper/EditMailWrapper';\nimport Service from 'src/components/Server/Edit/Service/Service';\nimport AddMailWrapper from '../AddMailWrapper/AddMailWrapper';\nimport EditDNSWrapper from '../EditDNSWrapper/EditDNSWrapper';\nimport EditWeb from '../../components/WebDomain/Edit/EditWeb';\nimport EditPhp from 'src/components/Server/Edit/PHP/EditPhp';\nimport Databases from '../../containers/Databases/Databases';\nimport Firewalls from '../../containers/Firewalls/Firewalls';\nimport EditUser from '../../components/User/Edit/EditUser';\nimport Bind9 from 'src/components/Server/Edit/Bind9/Bind9';\nimport Mysql from 'src/components/Server/Edit/Mysql/Mysql';\nimport AddDNSWrapper from '../AddDNSWrapper/AddDNSWrapper';\nimport BackupWrapper from '../BackupWrapper/BackupWrapper';\nimport AddBanIP from 'src/components/Firewall/Add/Banlist';\nimport CronJobs from '../../containers/CronJobs/CronJobs';\nimport Packages from '../../containers/Packages/Packages';\nimport { services } from 'src/ControlPanelService/Server';\nimport AddUser from '../../components/User/Add/AddUser';\nimport Updates from '../../containers/Updates/Updates';\nimport Servers from '../../containers/Servers/Servers';\nimport MainNav from '../../components/MainNav/MainNav';\nimport BackupExclusions from '../Backups/Exclusions';\nimport MailWrapper from '../MailWrapper/MailWrapper';\nimport Spinner from 'src/components/Spinner/Spinner';\nimport DNSWrapper from '../DNSWrapper/DNSWrapper';\nimport Statistics from '../Statistics/Statistics';\nimport Users from '../../containers/Users/Users';\nimport RRDs from '../../containers/RRDs/RRDs';\nimport BanList from '../Firewalls/Banlist';\nimport Web from '../../containers/Web/Web';\nimport Search from '../Search/Search';\nimport Logs from '../Logs/Logs';\n\nimport './ControlPanelContent.scss';\n\nconst ControlPanelContent = props => {\n const { userName } = useSelector(state => state.session);\n const history = useHistory();\n const [searchTerm, setSearchTerm] = useState('');\n const [hotkeysList, setHotkeysList] = useState(null);\n const [loading, setLoading] = useState(true);\n const dispatch = useDispatch();\n\n useEffect(() => {\n if (!userName) {\n return history.push('/login');\n } else {\n setLoading(false);\n }\n }, [userName]);\n\n useEffect(() => {\n dispatch(removeFocusedElement());\n window.addEventListener(\"keyup\", switchPanelTab);\n window.addEventListener(\"keyup\", addNewObject);\n\n return () => {\n window.removeEventListener(\"keyup\", switchPanelTab);\n window.removeEventListener(\"keyup\", addNewObject);\n }\n }, []);\n\n const switchPanelTab = event => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus');\n\n if (isSearchInputFocused) {\n return;\n }\n\n switch (event.keyCode) {\n case 49: return history.push('/list/user/');\n case 50: return history.push('/list/web/');\n case 51: return history.push('/list/dns/');\n case 52: return history.push('/list/mail/');\n case 53: return history.push('/list/db/');\n case 54: return history.push('/list/cron/');\n case 55: return history.push('/list/backup/');\n default: break;\n }\n }\n\n const addNewObject = event => {\n let isSearchInputFocused = document.querySelector('input:focus') || document.querySelector('textarea:focus');\n\n if (isSearchInputFocused) {\n return;\n }\n\n if (event.keyCode === 65) {\n switch (history.location.pathname) {\n case '/list/web/': return history.push('/add/web/');\n case '/list/dns/': return history.push('/add/dns/');\n case '/list/mail/': return history.push('/add/mail/');\n case '/list/db/': return history.push('/add/db/');\n case '/list/cron/': return history.push('/add/cron/');\n case '/list/backup/exclusions': return history.push('/edit/backup/exclusions/');\n case '/list/package/': return history.push('/add/package/');\n case '/list/ip/': return history.push('/add/ip/');\n case '/list/firewall/': return history.push('/add/firewall/');\n default: break;\n }\n }\n }\n\n const handleSearchTerm = searchTerm => {\n setSearchTerm(searchTerm);\n history.push({\n pathname: '/search/',\n search: `?q=${searchTerm}`\n });\n }\n\n const scrollToTop = () => {\n window.scrollTo({ top: 0, behavior: 'smooth' });\n }\n\n return (\n <div>\n <MainNav />\n <div className=\"content\">\n {\n loading\n ? <Spinner />\n : (\n <Switch>\n <Redirect from=\"/\" exact to=\"/list/user/\" />\n <Route path=\"/list/package\" component={props => <Packages {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/add/package\" component={() => <AddPackage />} />\n <Route path=\"/edit/package\" component={() => <EditPackage />} />\n <Route path=\"/list/ip\" component={props => <InternetProtocols {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/add/ip\" component={() => <AddInternetProtocol />} />\n <Route path=\"/edit/ip\" component={() => <EditInternetProtocol />} />\n <Route path=\"/list/rrd\" component={props => <RRDs {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/list/stats\" component={props => <Statistics {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/list/log\" component={props => <Logs {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/list/updates\" component={props => <Updates {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/list/firewall\" exact component={props => <Firewalls {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/list/firewall/banlist\" exact component={props => <BanList {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/add/firewall/banlist\" component={AddBanIP} />\n <Route path=\"/add/firewall\" component={() => <AddFirewall />} />\n <Route path=\"/edit/firewall\" component={() => <EditFirewall />} />\n <Route path=\"/list/server/\" exact component={props => <Servers {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/edit/server/\" exact component={() => <EditServer />} />\n <Route path=\"/edit/server/nginx\" exact component={() => <EditServerNginx />} />\n <Route path=\"/edit/server/php\" exact component={() => <EditPhp serviceName=\"php\" />} />\n <Route path=\"/edit/server/php-fpm\" exact component={() => <EditPhp serviceName=\"php-fpm\" />} />\n <Route path=\"/edit/server/php5-fpm\" exact component={() => <EditPhp serviceName=\"php5-fpm\" />} />\n <Route path=\"/edit/server/httpd\" exact component={() => <EditHttpd />} />\n <Route path=\"/edit/server/dovecot\" exact component={() => <Dovecot />} />\n <Route path=\"/edit/server/bind9\" exact component={() => <Bind9 />} />\n <Route path=\"/edit/server/postgresql\" exact component={() => <Postgresql />} />\n <Route path=\"/edit/server/mysql\" exact component={() => <Mysql serviceName=\"mysql\" />} />\n <Route path=\"/edit/server/mariadb\" exact component={() => <Mysql serviceName=\"mariadb\" />} />\n <Route path=\"/edit/server/mysqld\" exact component={() => <Mysql serviceName=\"mysqld\" />} />\n\n {\n !!services.length && services.map((service, index) => {\n if (service === 'iptables') {\n return <Redirect key={index} from=\"/edit/server/iptables\" exact to=\"/list/firewall\" />\n } else {\n return <Route key={index} path={`/edit/server/${service}`} exact component={() => <Service serviceName={service} />} />\n }\n })\n }\n\n <Route path=\"/list/user\" component={props => <Users changeSearchTerm={handleSearchTerm} {...props} />} />\n <Route path=\"/add/user\" component={() => <AddUser />} />\n <Route path=\"/edit/user\" component={() => <EditUser />} />\n <Route path=\"/list/web\" component={props => <Web {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/add/web\" component={() => <AddWebDomain />} />\n <Route path=\"/edit/web\" component={() => <EditWeb />} />\n <Route path=\"/list/dns\" component={props => <DNSWrapper {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/add/dns\" component={() => <AddDNSWrapper />} />\n <Route path=\"/edit/dns\" component={() => <EditDNSWrapper />} />\n <Route path=\"/list/mail\" component={props => <MailWrapper {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/add/mail\" component={() => <AddMailWrapper />} />\n <Route path=\"/edit/mail\" component={() => <EditMailWrapper />} />\n <Route path=\"/list/db\" component={props => <Databases {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/add/db\" component={() => <AddDatabase />} />\n <Route path=\"/edit/db\" component={() => <EditDatabase />} />\n <Route path=\"/list/cron\" component={props => <CronJobs {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route path=\"/add/cron\" component={() => <AddCronJob />} />\n <Route path=\"/edit/cron\" component={() => <EditCronJob />} />\n <Route exact path=\"/list/backup\" component={props => <BackupWrapper {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route exact path=\"/list/backup/exclusions\" component={props => <BackupExclusions {...props} changeSearchTerm={handleSearchTerm} />} />\n <Route exact path=\"/edit/backup/exclusions\" component={EditBackupExclusions} />\n <Route path=\"/search/\" component={props => <Search {...props} changeSearchTerm={handleSearchTerm} searchTerm={searchTerm} />} />\n </Switch>\n )}\n </div>\n <div className=\"fixed-buttons\">\n <div className=\"hotkey-button\">\n <button onClick={() => hotkeysList.classList.toggle('hide')}>\n <FontAwesomeIcon icon=\"ellipsis-h\" />\n </button>\n </div>\n <div className=\"scroll-to-top\">\n <button onClick={() => scrollToTop()}>\n <FontAwesomeIcon icon=\"long-arrow-alt-up\" />\n </button>\n </div>\n </div>\n <Hotkeys reference={(inp) => setHotkeysList(inp)} toggleHotkeys={() => hotkeysList.classList.toggle('hide')} />\n </div>\n );\n}\n\nexport default ControlPanelContent;\n","import React, { useState } from 'react';\nimport { addActiveElement } from 'src/actions/MainNavigation/mainNavigationActions';\nimport { logout } from 'src/actions/Session/sessionActions';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { Link, useHistory } from 'react-router-dom';\nimport Spinner from '../Spinner/Spinner';\nimport PerfectScrollbar from 'react-perfect-scrollbar';\n\nimport './TopPanel.scss';\n\nconst TopPanel = ({ menuItems = [], extraMenuItems = [] }) => {\n const mainNavigation = useSelector(state => state.mainNavigation);\n const [loading, setLoading] = useState(false);\n const { i18n, userName } = useSelector(state => state.session);\n const dispatch = useDispatch();\n const history = useHistory();\n\n const className = cls => {\n let className = 'nav-link';\n\n if (mainNavigation.activeElement === cls) {\n return className += ' active';\n }\n\n return className;\n }\n\n const renderMenuItems = () => {\n if (!menuItems.length) return;\n\n return menuItems.map(({ route, name }) => (\n <div className={className(route)} key={name}>\n <button onClick={event => handleState(event, route)}>{name}</button>\n </div>\n ));\n }\n\n const renderExtraMenuItems = () => {\n if (!extraMenuItems.length) return;\n\n return extraMenuItems.map(({ link, text, type }, index) => (\n <div className=\"nav-link\" key={index}>\n {\n type === 'download'\n ? <a href={`/api/v1${link}`} target=\"_blank\" rel=\"noopener noreferrer\">{text}</a>\n : <Link to={link} target=\"_blank\">{text}</Link>\n }\n </div>\n ));\n }\n\n const handleState = (event, route) => {\n event.preventDefault();\n history.push(route);\n dispatch(addActiveElement(route));\n }\n\n const signOut = () => {\n setLoading(true);\n\n dispatch(logout())\n .then(() => {\n history.push('/login/');\n setLoading(false);\n },\n error => {\n setLoading(false);\n console.error(error);\n });\n }\n\n return (\n <div className=\"panel-wrapper\">\n {loading && <Spinner />}\n\n <div className=\"top-panel\">\n <div className=\"container left-menu\">\n <div className=\"logo\">\n <Link to=\"/list/user/\">\n <div className=\"logo-img\">\n <img src=\"/images/white_logo.png\" alt=\"Logo\" />\n </div>\n </Link>\n </div>\n\n <PerfectScrollbar>\n {renderMenuItems()}\n {renderExtraMenuItems()}\n </PerfectScrollbar>\n </div>\n\n <div className=\"container profile-menu\">\n <div><Link to={`/edit/user?user=${userName}`}>{userName}</Link></div>\n <div><button className=\"log-out\" onClick={signOut}>{i18n['Log out']}</button></div>\n </div>\n </div>\n </div>\n );\n}\n\nexport default TopPanel;\n","import axios from \"axios\";\n\nconst BASE_URL = window.location.origin;\n\nexport const getWebLogs = uri => {\n return axios.get(BASE_URL + '/api/v1' +uri);\n}","import React, { useEffect, useState } from 'react';\n\nimport { addActiveElement } from 'src/actions/MainNavigation/mainNavigationActions';\nimport TopPanel from 'src/components/TopPanel/TopPanel';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\nimport QueryString from 'qs';\n\nimport './WebLogs.scss';\nimport { getWebLogs } from 'src/ControlPanelService/WebLogs';\nimport Spinner from 'src/components/Spinner/Spinner';\nimport { Helmet } from 'react-helmet';\nimport HtmlParser from 'react-html-parser';\n\nexport default function WebLogs() {\n const { i18n, userName } = useSelector(state => state.session);\n const history = useHistory();\n const dispatch = useDispatch();\n const mainNavigation = useSelector(state => state.mainNavigation);\n const [domain, setDomain] = useState();\n const [state, setState] = useState({\n data: \"\",\n prefix: \"\",\n loading: false\n });\n\n useEffect(() => {\n if (!userName) {\n history.push('/login/');\n }\n }, []);\n\n useEffect(() => {\n let parsedQueryString = QueryString.parse(history.location.search, { ignoreQueryPrefix: true });\n const { domain, type } = parsedQueryString;\n\n if (!parsedQueryString && !domain && !type) {\n return history.goBack();\n }\n\n setDomain(domain);\n let uri = `/list/web-log/?domain=${domain}&type=${type}`;\n fetchData(uri);\n\n dispatch(addActiveElement(`/list/web-log/?domain=${domain}&type=${type}`));\n }, [mainNavigation.activeElement]);\n\n const fetchData = uri => {\n setState({\n ...state,\n loading: true\n });\n\n getWebLogs(uri)\n .then(result => {\n if (result.data) {\n setState({ ...state, data: result.data.data, prefix: result.data.prefix, loading: false });\n }\n })\n .catch(error => {\n console.error(error);\n setState({ ...state, loading: false });\n });\n }\n\n const menuItems = [\n {\n route: `/list/web-log/?domain=${domain}&type=access`,\n name: i18n['AccessLog']\n },\n {\n route: `/list/web-log/?domain=${domain}&type=error`,\n name: i18n['ErrorLog']\n }\n ];\n\n const extraMenuItems = [\n {\n link: `/download/web-log/?domain=${domain ?? ''}&type=access`,\n type: 'download',\n text: i18n['Download AccessLog']\n },\n {\n link: `/download/web-log/?domain=${domain ?? ''}&type=error`,\n type: 'download',\n text: i18n['Download ErrorLog'],\n }\n ];\n\n return (\n <div className=\"web-logs\">\n <Helmet>\n <title>{`Vesta - ${i18n.WEB}`}</title>\n </Helmet>\n <TopPanel menuItems={menuItems} extraMenuItems={extraMenuItems} />\n <div className=\"content\">\n <h6><b>{state.prefix}</b></h6>\n <br />\n {\n state.loading\n ? <Spinner />\n : (\n <pre>\n {HtmlParser(state.data)}\n </pre>\n )\n }\n </div>\n </div>\n );\n}\n","import React from 'react';\n\nimport '../AddItemLayout/AddItemLayout.scss';\nimport './LoginLayout.scss';\n\nconst LoginLayout = ({ children }) => {\n return (\n <div className=\"login-layout\">\n {children}\n </div>\n );\n}\n\nexport default LoginLayout;","import React, { useEffect, useState } from 'react';\n\nimport { Link, useHistory } from 'react-router-dom';\nimport Spinner from '../Spinner/Spinner';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { login } from '../../actions/Session/sessionActions';\nimport LoginLayout from '../ControlPanel/LoginLayout/LoginLayout';\nimport TextInput from '../ControlPanel/AddItemLayout/Form/TextInput/TextInput';\n\nimport './Login.scss';\nimport { Helmet } from 'react-helmet';\n\nexport default function LoginForm() {\n const { i18n } = useSelector(state => state.session);\n const dispatch = useDispatch();\n const history = useHistory();\n const [loading, setLoading] = useState(false);\n const [formValues, setFormValues] = useState({\n user: '',\n password: ''\n });\n const session = useSelector(state => state.session);\n const [errorMessage, setErrorMessage] = useState('');\n\n useEffect(() => {\n if (session.error) {\n setErrorMessage(session.error);\n return;\n }\n\n if (session.token && session.userName) {\n history.push('/list/user/');\n }\n }, [session]);\n\n const submitHandler = event => {\n event.preventDefault();\n const { user, password } = formValues;\n\n setLoading(true);\n\n dispatch(login(user, password))\n .then((res) => {\n setLoading(false);\n });\n }\n\n const changeInputHandler = event => {\n const { value, name } = event.target;\n\n setFormValues({\n ...formValues,\n [name]: value\n });\n }\n\n return (\n <div className=\"login-page\">\n <Helmet>\n <title>{`Vesta - ${i18n.LOGIN ?? 'LOGIN'}`}</title>\n </Helmet>\n {loading && <Spinner />}\n <div className=\"login-form-wrapper\">\n <LoginLayout>\n <form onSubmit={submitHandler}>\n <div className=\"c1\">\n <Link to=\"/\">\n <img src=\"/images/logo.png\" alt=\"Logo\" />\n </Link>\n </div>\n <div className=\"c2\">\n <TextInput\n onChange={changeInputHandler}\n title={i18n['Username'] ?? 'Username'}\n value={formValues.user}\n name=\"user\"\n id=\"user\" />\n\n <TextInput\n onChange={changeInputHandler}\n title={i18n['Password'] ?? 'Password'}\n value={formValues.password}\n optionalTitle={(\n <Link className=\"forgot-password\" tabIndex=\"-1\" to=\"/reset\">\n {i18n['forgot password'] ?? 'forgot password'}\n </Link>\n )}\n name=\"password\"\n type=\"password\"\n id=\"password\" />\n\n <button type=\"submit\" disabled={loading} className={loading ? 'disabled' : ''}>\n {i18n['Log in'] ?? 'Log in'}\n </button>\n\n <div className=\"error-message\">{errorMessage}</div>\n </div>\n </form>\n\n <span>\n <a href=\"http://vestacp.com/\">vestacp.com</a>\n </span>\n </LoginLayout>\n </div>\n </div>\n );\n}\n","import React, { useEffect, useState } from 'react';\n\nimport { addActiveElement } from 'src/actions/MainNavigation/mainNavigationActions';\nimport TopPanel from 'src/components/TopPanel/TopPanel';\nimport { useHistory } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport { getServiceLogs } from 'src/ControlPanelService/Server';\nimport Spinner from 'src/components/Spinner/Spinner';\nimport { Helmet } from 'react-helmet';\nimport ReactHtmlParser from 'react-html-parser';\n\nimport './styles.scss';\nimport QueryString from 'qs';\n\nconst ServiceInfo = () => {\n const { i18n, userName } = useSelector(state => state.session);\n const dispatch = useDispatch();\n const history = useHistory();\n const [state, setState] = useState({\n data: \"\",\n loading: false\n });\n\n useEffect(() => {\n if (!userName) {\n history.push('/login/');\n }\n }, [userName]);\n\n useEffect(() => {\n let queryParams = QueryString.parse(history.location.search, { ignoreQueryPrefix: true });\n\n if (!queryParams.srv) {\n fetchData('cpu');\n dispatch(addActiveElement('/list/server/service/?srv=cpu'));\n return;\n }\n\n if (!menuItems.find(item => item.service === queryParams.srv)) {\n dispatch(addActiveElement('/list/server/service/?srv=cpu'));\n history.push('/list/server/service/?srv=cpu');\n return;\n }\n\n fetchData(queryParams.srv);\n dispatch(addActiveElement(`/list/server/service/?srv=${queryParams.srv}`));\n }, [history.location.search]);\n\n const fetchData = serviceName => {\n setState({ ...state, loading: true });\n\n getServiceLogs(serviceName)\n .then(result => {\n setState({ ...state, data: result.data.service_log, loading: false });\n })\n .catch(error => {\n console.error(error);\n setState({ ...state, loading: false });\n });\n }\n\n const menuItems = [\n {\n route: '/list/server/service/?srv=cpu',\n service: 'cpu',\n name: i18n['CPU']\n },\n {\n route: '/list/server/service/?srv=mem',\n service: 'mem',\n name: i18n['MEMORY']\n },\n {\n route: '/list/server/service/?srv=disk',\n service: 'disk',\n name: i18n['DISK']\n },\n {\n route: '/list/server/service/?srv=net',\n service: 'net',\n name: i18n['NETWORK']\n },\n {\n route: '/list/server/service/?srv=web',\n service: 'web',\n name: i18n['WEB']\n },\n {\n route: '/list/server/service/?srv=dns',\n service: 'dns',\n name: i18n['DNS']\n },\n {\n route: '/list/server/service/?srv=mail',\n service: 'mail',\n name: i18n['MAIL']\n },\n {\n route: '/list/server/service/?srv=db',\n service: 'db',\n name: i18n['DB']\n }\n ];\n\n return (\n <div className=\"service-info\">\n <Helmet>\n <title>{`Vesta - ${i18n.SERVER}`}</title>\n </Helmet>\n <TopPanel menuItems={menuItems} />\n <div className=\"content\">\n {\n state.loading\n ? <Spinner />\n : (<pre>\n {state.data && ReactHtmlParser(state.data)}\n </pre>)\n }\n </div>\n </div>\n );\n}\n\nexport default ServiceInfo;\n","import React, { useEffect, useState } from 'react';\n\nimport TextInput from 'src/components/ControlPanel/AddItemLayout/Form/TextInput/TextInput';\nimport Password from 'src/components/ControlPanel/AddItemLayout/Form/Password/Password';\nimport LoginLayout from 'src/components/ControlPanel/LoginLayout/LoginLayout';\nimport { resetPassword } from 'src/ControlPanelService/ResetPassword';\nimport { Link, useHistory, useLocation } from 'react-router-dom';\nimport { reset } from 'src/actions/Session/sessionActions';\nimport { useDispatch, useSelector } from 'react-redux';\nimport Spinner from 'src/components/Spinner/Spinner';\nimport ReactHtmlParser from 'react-html-parser';\nimport { Helmet } from 'react-helmet';\nimport QueryString from 'qs';\n\nexport default function ForgotPassword() {\n const { i18n } = useSelector(state => state.session);\n const dispatch = useDispatch();\n const history = useHistory();\n const [loading, setLoading] = useState(false);\n const [state, setState] = useState({\n action: '',\n user: '',\n code: '',\n });\n const session = useSelector(state => state.session);\n const location = useLocation();\n const [errorMessage, setErrorMessage] = useState('');\n\n useEffect(() => {\n const parsedQueryString = QueryString.parse(location.search, { ignoreQueryPrefix: true });\n\n setState({\n ...state,\n action: parsedQueryString.action || '',\n user: parsedQueryString.user || '',\n code: parsedQueryString.code || ''\n });\n }, []);\n\n useEffect(() => {\n if (session.error) {\n setErrorMessage(session.error);\n return;\n }\n\n if (session.token && session.userName) {\n history.push('/list/user/');\n }\n }, [session]);\n\n const submitHandler = event => {\n event.preventDefault();\n\n if (!state.code && !state.user) return;\n\n if (!state.action && state.user) {\n completeStep1();\n return;\n }\n\n if (state.action === 'code' && state.user && state.code) {\n completeStep2();\n return;\n }\n\n setLoading(true);\n const data = { user: state.user, code: state.code };\n\n for (var [name, value] of (new FormData(event.target)).entries()) {\n data[name] = value;\n }\n\n dispatch(reset(data))\n .then(res => {\n if (res.error) {\n setErrorMessage(res.error);\n } else {\n history.push('/login');\n setErrorMessage('');\n }\n\n setLoading(false);\n });\n }\n\n const changeInputHandler = event => {\n const { value, name } = event.target;\n\n setState({ ...state, [name]: value });\n }\n\n const completeStep1 = () => {\n if (!state.user) return;\n setLoading(true);\n\n resetPassword(state.user)\n .then(res => {\n setErrorMessage(res.data.error || '');\n setState({ ...state, action: 'code' });\n setLoading(false);\n })\n .catch(error => {\n console.error(error);\n setLoading(false);\n });\n }\n\n const completeStep2 = () => {\n setState({ ...state, action: 'confirm' });\n }\n\n return (\n <div className=\"login-page\">\n <Helmet>\n <title>{`Vesta - ${i18n['RESET PASSWORD']}`}</title>\n </Helmet>\n {loading && <Spinner />}\n <div className=\"login-form-wrapper\">\n <LoginLayout>\n <form onSubmit={submitHandler}>\n <div className=\"c1\">\n <Link to=\"/\">\n <img src=\"/images/logo.png\" alt=\"Logo\" />\n </Link>\n </div>\n <div className=\"c2\">\n {\n !state.action && (\n <>\n <TextInput\n onChange={changeInputHandler}\n title={i18n['Username']}\n value={state.user}\n name=\"user\"\n id=\"user\" />\n\n <div className=\"buttons-wrapper\">\n <button className=\"add\" type=\"button\" onClick={completeStep1}>{i18n.Submit}</button>\n <button className=\"back\" type=\"button\" onClick={() => history.push('/login')}>{i18n.Back}</button>\n </div>\n </>\n )\n }\n\n {\n state.action === 'code' && (\n <>\n <span>{ReactHtmlParser(i18n['RESET_CODE_SENT'])}</span><br />\n\n <TextInput\n onChange={changeInputHandler}\n title={i18n['Reset Code']}\n value={state.code}\n name=\"code\"\n id=\"code\" />\n\n <div className=\"buttons-wrapper\">\n <button className=\"add\" type=\"button\" onClick={completeStep2}>{i18n.Confirm}</button>\n <button className=\"back\" type=\"button\" onClick={() => setState({ ...state, action: '', code: '', user: '' })}>{i18n.Back}</button>\n </div>\n </>\n )\n }\n\n {\n state.action === 'confirm' && (\n <>\n <Password name='password' title={i18n['New Password']} showGenerationButton={false} tabIndex={1} />\n\n <Password name='password_confirm' title={i18n['Confirm Password']} showGenerationButton={false} tabIndex={2} />\n\n <div className=\"buttons-wrapper\">\n <button className=\"add\" type=\"submit\" style={{ height: '31px' }}>{i18n.Reset}</button>\n <button className=\"back\" type=\"button\" onClick={() => setState({ ...state, action: 'code', code: '', user: state.user })}>{i18n.Back}</button>\n </div>\n </>\n )\n }\n\n <div className=\"error-message\">{errorMessage}</div>\n </div>\n </form>\n\n <span>\n <a href=\"http://vestacp.com/\">vestacp.com</a>\n </span>\n </LoginLayout>\n </div>\n </div>\n );\n}\n","import React, { useEffect, useState } from 'react';\nimport FileManager from '../FileManager/FileManager';\nimport { Route, Switch, useHistory, Redirect } from \"react-router\";\nimport Preview from '../../components/Preview/Preview';\nimport { library } from '@fortawesome/fontawesome-svg-core';\nimport * as Icon from '@fortawesome/free-solid-svg-icons';\nimport 'bootstrap/dist/css/bootstrap.css';\nimport 'bootstrap/dist/js/bootstrap.min';\nimport './App.scss';\nimport ControlPanelContent from '../ControlPanelContent/ControlPanelContent';\nimport WebLogs from '../WebLogs/WebLogs';\nimport LoginForm from 'src/components/Login/LoginForm';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { checkAuthHandler } from 'src/actions/Session/sessionActions';\nimport ServiceInfo from 'src/containers/ServiceInfo';\nimport ForgotPassword from 'src/components/ForgotPassword';\nimport Spinner from 'src/components/Spinner/Spinner';\n\nlibrary.add(\n Icon.faBook,\n Icon.faDownload,\n Icon.faFile,\n Icon.faFileAlt,\n Icon.faFolderOpen,\n Icon.faImage,\n Icon.faEllipsisH,\n Icon.faFolder,\n Icon.faItalic,\n Icon.faUser,\n Icon.faCopy,\n Icon.faPaste,\n Icon.faTrash,\n Icon.faBoxOpen,\n Icon.faArrowDown,\n Icon.faArrowUp,\n Icon.faBell,\n Icon.faPlus,\n Icon.faAngleRight,\n Icon.faStar,\n Icon.faUserLock,\n Icon.faPen,\n Icon.faLock,\n Icon.faTimes,\n Icon.faSearch,\n Icon.faCog,\n Icon.faList,\n Icon.faWrench,\n Icon.faFileDownload,\n Icon.faPause,\n Icon.faPlay,\n Icon.faCogs,\n Icon.faStop,\n Icon.faUnlock,\n Icon.faLongArrowAltUp,\n Icon.faEye,\n Icon.faEyeSlash,\n Icon.faLongArrowAltRight,\n Icon.faCaretDown,\n Icon.faCaretUp,\n Icon.faInfinity,\n Icon.faPlay\n);\n\nconst App = () => {\n const history = useHistory();\n const dispatch = useDispatch();\n const session = useSelector(state => state.session);\n const [loading, setLoading] = useState(true);\n\n useEffect(() => {\n if (!Object.entries(session.i18n).length) {\n dispatch(checkAuthHandler())\n .then(token => {\n setLoading(false);\n }, (error) => {\n console.error(error);\n return history.push('/login');\n });\n }\n }, [dispatch, history, session]);\n\n const AuthenticatedRoute = ({ authenticated, ...rest }) => {\n return (\n <Route {...rest} render={props =>\n authenticated\n ? <rest.component {...props} />\n : <Redirect to=\"/login\" />} />\n );\n }\n\n return (\n <div className=\"App\">\n {\n loading\n ? <Spinner />\n : (\n <Switch>\n <Route path=\"/login\" exact component={LoginForm} />\n <Route path=\"/reset\" exact component={ForgotPassword} />\n <Route\n path=\"/list/directory/\"\n exact\n component={FileManager} />\n <Route\n path=\"/list/directory/preview/\"\n exact\n component={Preview} />\n <AuthenticatedRoute\n path=\"/list/server/service/\"\n authenticated={session.userName}\n component={ServiceInfo} />\n <AuthenticatedRoute\n path=\"/list/web-log/\"\n exact\n authenticated={session.userName}\n component={WebLogs} />\n <AuthenticatedRoute\n path=\"/\"\n authenticated={session.userName}\n loading={loading}\n component={ControlPanelContent} />\n </Switch>\n )\n }\n </div>\n );\n}\n\nexport default App;\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read http://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.1/8 is considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\nexport function register(config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit http://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl, config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See http://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl, config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl)\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister();\n });\n }\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux'\nimport configureStore from './store';\nimport './index.css';\nimport App from './containers/App/App';\nimport * as serviceWorker from './containers/App/serviceWorker';\nimport { BrowserRouter as Router } from 'react-router-dom';\n\nReactDOM.render(\n <Provider store={configureStore()}>\n <Router>\n <App />\n </Router>\n </Provider>,\n document.getElementById('root')\n);\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: http://bit.ly/CRA-PWA\nserviceWorker.unregister();\n","import { composeWithDevTools } from 'redux-devtools-extension';\nimport { createStore, applyMiddleware } from 'redux';\nimport rootReducer from './reducers/rootReducer';\nimport thunk from 'redux-thunk';\n\nexport default function configureStore() {\n return createStore(\n rootReducer,\n composeWithDevTools(applyMiddleware(thunk))\n );\n}"],"sourceRoot":""} |