diff --git a/examples/cbsdweb.conf.sample b/examples/cbsdweb.conf.sample index 74f08dd6..e9c7f51e 100644 --- a/examples/cbsdweb.conf.sample +++ b/examples/cbsdweb.conf.sample @@ -7,50 +7,48 @@ server { server_name _; - root /usr/local/www/clonos/public; - set $php_root $document_root; + root /usr/local/www/clonos/public; + set $php_root $document_root; + client_max_body_size 0; - client_max_body_size 0; # upload ISO/VM + index index.php; - index index.php; - - access_log /var/log/nginx/cbsdweb.acc combined; - error_log /var/log/nginx/cbsdweb.err; + access_log /var/log/nginx/cbsdweb.acc combined; + error_log /var/log/nginx/cbsdweb.err; location ~* \.(jpg|jpeg|gif|png|swf|tiff|swf|flv|zip|rar|bz2|iso|xz|img|css|txt|html|js|xsl|eot|svg|ttf|woff|woff2)$ { - index index.php; - try_files $uri $uri/ =404; + index index.php; + try_files $uri $uri/ =404; } location /shell/ { - proxy_pass http://ttyd_back/; - proxy_read_timeout 90s; - proxy_connect_timeout 90s; - proxy_send_timeout 90s; - proxy_http_version 1.1; - proxy_set_header Host $http_host; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; + proxy_pass http://ttyd_back/; + proxy_read_timeout 90s; + proxy_connect_timeout 90s; + proxy_send_timeout 90s; + proxy_http_version 1.1; + proxy_set_header Host $http_host; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; } location ~ \.php$ { - root /usr/local/www/clonos/public; - include /usr/local/etc/nginx/fastcgi_params; + root /usr/local/www/clonos/public; + include /usr/local/etc/nginx/fastcgi_params; - allow all; - fastcgi_keep_conn on; - fastcgi_param SCRIPT_FILENAME $php_root$fastcgi_script_name; - fastcgi_pass unix:/tmp/php-fpm.sock; - fastcgi_param WORKDIR /usr/jails; - - fastcgi_param APPLICATION_ENV development; # comment to disable DEVELOPER mode: - fastcgi_read_timeout 1200; # keep in sync with PHP max_execution_time = 1200 + allow all; + fastcgi_keep_conn on; + fastcgi_param SCRIPT_FILENAME $php_root$fastcgi_script_name; + fastcgi_pass unix:/tmp/php-fpm.sock; + fastcgi_param WORKDIR /usr/jails; + # fastcgi_param APPLICATION_ENV development; + fastcgi_read_timeout 1200; # keep in sync with PHP max_execution_time = 1200 } location / { - index index.php; - try_files $uri/index.html /index.php$is_args$args; + index index.php; + try_files $uri/index.html /index.php$is_args$args; } } diff --git a/examples/nginx.conf.sample b/examples/nginx.conf.sample index 589b6eda..2b86cea2 100644 --- a/examples/nginx.conf.sample +++ b/examples/nginx.conf.sample @@ -1,20 +1,20 @@ user www; -load_module /usr/local/libexec/nginx/ngx_stream_module.so; +load_module /usr/local/libexec/nginx/ngx_stream_module.so; events { - use kqueue; + use kqueue; } http { - include /usr/local/etc/nginx/mime.types; - default_type application/octet-stream; + include /usr/local/etc/nginx/mime.types; + default_type application/octet-stream; - client_max_body_size 1m; - include /usr/local/etc/nginx/sites-enabled/*.conf; + client_max_body_size 1m; + include /usr/local/etc/nginx/sites-enabled/*.conf; } stream { - include /usr/local/etc/nginx/conf.stream.d/*.conf; - include /usr/local/etc/nginx/streams-enabled/*; + include /usr/local/etc/nginx/conf.stream.d/*.conf; + include /usr/local/etc/nginx/streams-enabled/*; } diff --git a/php/clonos.php b/php/clonos.php index 625f6de4..ff565ed4 100644 --- a/php/clonos.php +++ b/php/clonos.php @@ -109,7 +109,15 @@ class ClonOS { { $this->uri_chunks[0]='overview'; $this->realpath_page=$this->realpath_public.'pages/'.$this->uri_chunks[0].'/'; - $this->_translate->translate($this->realpath_page,'index.php'); + $trres=$this->_translate->translate('pages',$this->uri_chunks[0],'index.php'); + + $incfile=$this->_translate->get_translated_filename(); + if(file_exists($incfile)) + { + include($incfile); + } + if(isset($trres['message'])) echo $trres['message'],"
"; + echo 'incfile: ',$incfile;exit; //break 1; } @@ -1308,9 +1316,9 @@ class ClonOS { 'ver'=>'native', 'astart'=>0, 'interface'=>$form['interface'], - 'vm_size'=>$form['vm_size'], + 'vm_size'=>$form['vm_imgsize']*1024*1024*1024, 'vm_cpus'=>$form['vm_cpus'], - 'vm_ram'=>$form['vm_ram'], + 'vm_ram'=>$form['vm_ram']*1024*1024*1024, 'vm_os_type'=>$os_items['type'], 'vm_efi'=>'uefi', 'vm_os_profile'=>$os_items['profile'], @@ -1454,9 +1462,9 @@ class ClonOS { $this->_user_info['username'], $form['vm_name'], $os_profile, - $form['vm_size'], + $form['vm_size']*1024*1024*1024, $form['vm_cpus'], - $form['vm_ram'], + $form['vm_ram']*1024*1024*1024, $os_type, $form['mask'], $form['ip4_addr'], @@ -2063,11 +2071,22 @@ class ClonOS { if(empty($this->_dialogs)) return; echo PHP_EOL; foreach($this->_dialogs as $dialog_name){ + /* $file_name=$this->realpath_public.'dialogs/'.$dialog_name.'.php'; if(file_exists($file_name)){ include($file_name); echo PHP_EOL,PHP_EOL; } + */ + + $trres=$this->_translate->translate('dialogs','dialogs/',$dialog_name.'.php'); + + $incfile=$this->_translate->get_translated_filename(); + if(file_exists($incfile)) + { + include($incfile); + } + //if(isset($trres['message'])) echo $trres['message'],"
"; } } diff --git a/php/db.php b/php/db.php index 2d120b14..6003d279 100644 --- a/php/db.php +++ b/php/db.php @@ -150,6 +150,7 @@ class Db { } else { $res = $query->fetchAll(PDO::FETCH_ASSOC); } + return $res; } catch(PDOException $e) { return array('error' => true, 'info' => 'Catch exception: ' . $e->getMessage()); //$this->error @@ -213,7 +214,7 @@ class Db { } return array('rowCount'=>$rowCount); } - + function isConnected(){ return !is_null($this->_pdo); } function getWorkdir(){ return $this->_workdir; } function getFileName(){ return $this->_filename; } diff --git a/php/localization.php b/php/localization.php index 629aa75f..677750a8 100644 --- a/php/localization.php +++ b/php/localization.php @@ -4,9 +4,11 @@ class Localization { private $language='en'; private $translate_arr=array(); + private $realpath=''; function __construct($realpath_public) { + $this->realpath=$realpath_public; (isset($_COOKIE['lang'])) AND $this->language=$_COOKIE['lang']; (!array_key_exists($this->language, Config::$languages)) AND $this->language='en'; include($realpath_public.'/lang/'.$this->language.'.php'); @@ -17,6 +19,11 @@ class Localization { return $this->language; } + + public function get_path() + { + return $this->realpath; + } public function translate($phrase) { @@ -32,21 +39,63 @@ class Translate private $language=''; private $realpath=''; - function __construct($locale,$realpath) + private $translated_file=''; + /* + private $page_file_name=''; + private $dialog_file_name=''; + private $json_file_name=''; + */ + + function __construct($locale) { $this->locale=$locale; $this->language=$this->locale->get_lang(); - $this->realpath=$realpath; + $this->realpath=$locale->get_path(); } - public function translate($path,$file_name) + public function translate($path,$page,$file_name) { - $file=$path.$file_name; + $translate_cache='_translate.cache'; + switch($path) + { + case 'pages': + $full_path=$this->realpath.$path.DIRECTORY_SEPARATOR.$page.DIRECTORY_SEPARATOR; + $translate_cache_path=$full_path.$translate_cache.DIRECTORY_SEPARATOR; + $this->translated_file=$translate_cache_path.$this->language.'.index.php'; + break; + case 'dialogs': + $full_path=$this->realpath.$path.DIRECTORY_SEPARATOR; + $translate_cache_path=$full_path.$translate_cache.DIRECTORY_SEPARATOR; + $this->translated_file=$translate_cache_path.$this->language.'.'.$file_name; + break; + } + + if(!is_dir($translate_cache_path)) + { + mkdir($translate_cache_path); + $ttxt="This files is cache of translated pages, do not translate it!\n". + "If you are a translator, please read the documentation on the translation on the website.\n". + "Thank you."; + file_put_contents($translate_cache_path.'!dont.touch.files',$ttxt); + } + + $file=$full_path.$file_name; + + $mtime_orig=filemtime($file); + $mtime_translate=filemtime($this->translated_file); + # $mtime_db_update — дата последней модификации перевода в БД + + if($mtime_orig<$mtime_translate) + { + return ['message'=>'translate from cache']; + } + + # при сохранении в БД перевода на язык пользователя, нужно удалять файл кэша + # или во временный файл сохранять даты обновления разных языков, а уже там проверять дату + $db=new Db('clonos'); if(!$db->isConnected()) return array('error'=>true,'error_message'=>'db connection lost!'); - //$status=(new Db('base','cbsdtaskd'))->selectOne("SELECT status,logfile,errcode - // FROM taskd WHERE id=?", array([$task_id]); if(file_exists($file)) { @@ -55,6 +104,8 @@ class Translate preg_match_all('#]*)>(.*)#',$txt,$res,PREG_SET_ORDER); // var_dump($res);exit; + $ids_arr=[]; + foreach($res as $item) { $id=-1; @@ -67,12 +118,12 @@ class Translate if($attrs!='') { - //$txt=$item[2]; - //echo '
'.$txt;
+					// если у тэга есть ID, то проверяем текст и формируем шаблон
 					preg_match_all('#((id)="?([\d]+)"?|update)#',$attrs,$params,PREG_SET_ORDER);
-					if(is_array($params) && $this->language!='en')
+					if(is_array($params))	// && $this->language!='en'
 					{
-						// если у пользователя язык интерфейса не английский, то переводим
+						// ИЗМЕНИТЬ КОММЕНТАРИЙ! --- если у пользователя язык интерфейса не английский, то переводим
+						// обрабатываем оригинальный текст и создаём шаблоны разных языков
 						foreach($params as $p)
 						{
 							if(isset($p[2]) && $p[2]=='id')
@@ -83,23 +134,28 @@ class Translate
 									$dbres=$db->selectOne("select text from lang_en where id=?",[[$id,PDO::PARAM_INT]]);
 									if(!empty($dbres))
 									{
-										var_dump($dbres);exit;
-									}else{
-										echo 'no data';
+										if($text!=$dbres['text'])
+										{
+											// если оригинальный текст изменился, то обновляем его в базе
+											$dbres1=$db->update('update lang_en set text=? where id=?',[[$text,PDO::PARAM_STR],[$id,PDO::PARAM_INT]]);
+											if(isset($dbres1['rowCount']))
+											{
+												if($dbres1['rowCount']>0)
+												{
+													$is_changed=true;
+												}
+											}
+										}
 									}
-									
-									
-								}else{
+									$ids_arr[]=$id;
 								}
 							}
-							
+/*							
 							if($p[0]=='update' && $id>0)
 							{
 								echo "\tupdate id: ",$id,"\n";
 							}
-
-							
-			//echo "\tupdate: ",var_dump($update),"\n";
+*/
 						}
 						
 					}else{
@@ -139,24 +195,60 @@ UPDATE SQLITE_SEQUENCE SET seq = 0 WHERE name = 'lang_en'
 							$new_text=''.$text."";
 							$txt=str_replace($tag,$new_text,$txt);
 							$is_changed=true;
+							
+							$ids_arr[]=$dbres['lastID'];
 						}
 					}
 				}
 			}
 			
+			// бэкапим предыдущий файл и сохраняем видоизменённый
 			if($is_changed)
 			{
-				rename($path.$file_name,$path.'orig.'.$file_name);
-				file_put_contents($path.$file_name,$txt);
+				rename($full_path.$file_name,$full_path.'_back.'.time().'.'.$file_name);
+				file_put_contents($full_path.$file_name,$txt);
 			}
-			echo $txt;
-			exit;
-		}else{
 			
+			// переводим на другие языки
+			$ids_txt=join(',',$ids_arr);
+			$sql="select en_id,text from lang_other where lang=? and en_id in ({$ids_txt})";
+			$res=$db->select($sql,[[$this->language,PDO::PARAM_STR]]);
+//			$res=$db->select("select en_id,text from lang_other where lang=? and en_id in (?)",[[$this->language,PDO::PARAM_STR],[[$ids_arr]]]);
+			if($res['error'])
+			{
+				echo 'db error';
+				exit;
+			}
+			
+			foreach($res as $item)
+			{
+				$pat='#]*>(.*)#';
+				$txt=preg_replace($pat,$item['text'],$txt);
+			}
+			
+			$txt=preg_replace('#(]*)>|)#','',$txt);
+			
+			//$this->tanslated_file=$translate_cache_path.$this->language.'.index.php';
+			file_put_contents($this->translated_file,$txt);
+
+			//var_dump($res);
+			//echo $ids_txt;
+			
+			
+			
+			
+			return ['message'=>'translated to: '.$this->language];
+		}else{
+			return ['error'=>true,'message'=>'no file...'];
 		}
 
 		/*
 			]*)>(.*)
 		*/
 	}
+	
+	public function get_translated_filename()
+	{
+		return $this->translated_file;
+	}
 }
\ No newline at end of file
diff --git a/php/menu.php b/php/menu.php
index dee59960..793ca93f 100644
--- a/php/menu.php
+++ b/php/menu.php
@@ -27,19 +27,46 @@
 class Menu
 {
 	public $html=array();
-	public $title='Error';
+	public $title='';	//'Error';
 	public $first_key=array();
+	private $_public_pages_path='';
 
-	function __construct(Localization $lang, $uri_chunks)
+	function __construct(Localization $lang, $uri_chunks, $public_pages_path)
 	{
 		$menu_config = Config::$menu;
 		$this->first_key = array_key_first($menu_config);
+		$this->_public_pages_path=$public_pages_path;
+		$titles=[];
+		
+		$translate_path=$this->_public_pages_path.'_translate.cache/';
+		$translate_file=$translate_path.$lang->get_lang().'.menu.php';
+		#echo $translate_path."\n";
+		#echo getcwd()."\n";
+
+		if(!is_dir($translate_path))
+		{
+			mkdir($translate_path);
+		}
+		
+		if(file_exists($translate_file))
+		{
+			$this->html=file_get_contents($translate_file);
+			
+			if(getenv('APPLICATION_ENV') != 'development')
+			{
+				$this->html=preg_replace('#\t
  • \n#','',$this->html); + } + + return; + } + +//var_dump($this->_public_pages_path);exit; if(getenv('APPLICATION_ENV') != 'development'){ unset($menu_config['sqlite']); } - $this->html=''; + $this->html.=' '."\n"; + /* if($this->title=='Error'){ $other_titles = Config::$other_titles; if(isset($other_titles[$qstr])){ $this->title=$lang->translate($other_titles[$qstr]); } } + */ + $other_titles = Config::$other_titles; + $titles=array_merge($titles,$other_titles); + + $this->html.=' '.PHP_EOL; + + file_put_contents($translate_file,$this->html); + } } diff --git a/public/css/styles.css b/public/css/styles.css index bf83fc49..30de5bd1 100644 --- a/public/css/styles.css +++ b/public/css/styles.css @@ -76,6 +76,9 @@ main { box-shadow:7px 0px 10px 1px rgba(0,0,0,0.65); border-right:1px solid #222; } +main.blur { + filter: blur(5px); +} .closer { height:100%; position:absolute; diff --git a/public/dialogs/!orig.jail-settings.php b/public/dialogs/!orig.jail-settings.php new file mode 100644 index 00000000..19f94316 --- /dev/null +++ b/public/dialogs/!orig.jail-settings.php @@ -0,0 +1,75 @@ + + +

    + Create jail + Edit jail +

    +

    Jail Settings

    +
    +
    +

    + Jail name: + +

    +

    + Hostname (FQDN): + + +

    +

    + IP address: + +

    +

    + Root password: + +

    +

    + Root password (again): + +

    +

    + Net Interface: + + +

    +

    + Parameters: + +
    + +
    + +
    + +

    +

    + Enabled services: + + +

    + +
    +
    +
    + + + +
    +
    + +err_messages.add({ + 'jname':'Can not be empty. Name must begin with a letter / a-z / and not have any special symbols: -,.=%', + 'hostname':'This field can not be empty', + 'ip':'Write correct ip address, e.g: 10.0.0.2', + 'rootpass':'Password can not be less than 3 symbols', + 'rootpass1':'Please retype password correctly', +}); + + +

    + Create jail + Edit jail +

    +

    Jail Settings

    +
    +
    +

    + Jail name: + +

    +

    + Hostname (FQDN): + + +

    +

    + IP address: + +

    +

    + Root password: + +

    +

    + Root password (again): + +

    +

    + Net Interface: + + +

    +

    + Parameters: + +
    + +
    + +
    + +

    +

    + Enabled services: + + +

    + +
    +
    +
    + Create" class="new button ok-but" /> + Save" class="edit button ok-but" /> + +
    +
    + +err_messages.add({ + 'vm_name':'translate("Can not be empty. Name must begin with a letter / a-z / and not have any special symbols: -,.=%");?>', +}); + + +

    + translate('Clone Virtual Machine');?> +

    +

    translate('Cloned Virtual Machine Settings');?>

    +
    +
    +

    + translate('Virtual Machine name');?>: + +

    +
    +
    +
    + + +
    +
    diff --git a/public/dialogs/_translate.cache/en.bhyve-new.php b/public/dialogs/_translate.cache/en.bhyve-new.php new file mode 100644 index 00000000..ed77fc9b --- /dev/null +++ b/public/dialogs/_translate.cache/en.bhyve-new.php @@ -0,0 +1,102 @@ + + +

    + translate('Create Virtual Machine');?> + translate('Edit Virtual Machine');?> +

    +

    translate('Virtual Machine Settings');?>

    +
    +
    +

    + translate('VM OS profile');?>: + +

    +

    + translate('Virtual Machine name');?>: + +

    +

    + translate('VM template (cpu, ram, hdd)');?>: + + +

    +

    + translate('VM CPUs');?>: + + + + + +

    +

    + translate('VM RAM');?>: + + + + + +

    +

    + translate('VM Image size');?>: + + + + + +

    +

    + translate('Attached boot ISO image');?>: + +

    +

    + translate('VNC IP address');?>: + + +

    +

    + translate('VNC PORT');?>: + +

    +

    + translate('VNC Password');?>: + translate('use to log in VNC console');?> +

    +

    + translate('Net Interface');?>: + + +

    +
    +
    +
    + + + +
    +
    diff --git a/public/dialogs/_translate.cache/en.bhyve-obtain.php b/public/dialogs/_translate.cache/en.bhyve-obtain.php new file mode 100644 index 00000000..69ebb3ee --- /dev/null +++ b/public/dialogs/_translate.cache/en.bhyve-obtain.php @@ -0,0 +1,84 @@ + +

    translate('Create Virtual Machine from Library');?>

    +

    translate('Virtual Machine Settings');?>

    +
    +
    +

    + translate('VM OS profile');?>: + +

    +

    + translate('Virtual Machine name');?>: + +

    +

    + translate('VM template (cpu, ram, hdd)');?>: + + +

    +

    + translate('VM CPUs');?>: + + + + +

    +

    + translate('VM RAM');?>: + + + + + + +

    +

    + translate('VM Image size');?>: + + + + + +

    +

    + translate('IP address');?>: + +

    +

    + translate('Gateway');?>: + +

    +

    + translate('Mask');?>: + +

    +

    + translate('VM Password');?>: + translate('default is');?>: «cbsd» +

    +

    + translate('USER Password');?>: + translate('напиши осознанный текст');?> +

    +

    + translate('Authkey');?>: + +

    +

    + translate('VNC Password');?>: + translate('use to log in VNC. Default is');?>: cbsd +

    +
    +
    +
    + + +
    +
    + +err_messages.add({ + 'jname':'translate("Can not be empty. Name must begin with a letter / a-z / and not have any special symbols: -,.=%");?>', +}); + + +

    + translate('Rename virtual machine');?> +

    +

    translate('Renamed Virtual Machine Settings');?>

    +
    +
    +

    + translate('@rename_warning@'); ?> +

    +

    + translate('VM name');?>: + +

    +
    +
    +
    + + +
    +
    diff --git a/public/dialogs/_translate.cache/en.jail-clone.php b/public/dialogs/_translate.cache/en.jail-clone.php new file mode 100644 index 00000000..75e9b134 --- /dev/null +++ b/public/dialogs/_translate.cache/en.jail-clone.php @@ -0,0 +1,36 @@ + + +

    + translate('Clone jail');?> +

    +

    translate('Cloned Jail Settings');?>

    +
    +
    +

    + translate('@clone_warning@'); ?> +

    +

    + translate('Jail name');?>: + +

    +

    + translate('Hostname');?> (FQDN): + +

    +

    + translate('IP address');?>: + +

    +
    +
    +
    + + +
    +
    diff --git a/public/dialogs/_translate.cache/en.jail-import.php b/public/dialogs/_translate.cache/en.jail-import.php new file mode 100644 index 00000000..bfd98f4d --- /dev/null +++ b/public/dialogs/_translate.cache/en.jail-import.php @@ -0,0 +1,35 @@ + + +

    + translate('Import jail');?> + translate('Edit jail');?> +

    +

    translate('Jail Import');?>

    +
    +
    +

    + +

    +
    Drag & Drop Files Here
    +
    -or-
    +
    + +
    +
    +
    + +

    +
    +
    +
    + +
    +
    + \ No newline at end of file diff --git a/public/dialogs/_translate.cache/en.jail-rename.php b/public/dialogs/_translate.cache/en.jail-rename.php new file mode 100644 index 00000000..00ee4d4c --- /dev/null +++ b/public/dialogs/_translate.cache/en.jail-rename.php @@ -0,0 +1,36 @@ + + +

    + translate('Rename jail');?> +

    +

    translate('Renamed Jail Settings');?>

    +
    +
    +

    + translate('@rename_warning@'); ?> +

    +

    + translate('Jail name');?>: + +

    +

    + translate('Hostname');?> (FQDN): + +

    +

    + translate('IP address');?>: + +

    +
    +
    +
    + + +
    +
    diff --git a/public/dialogs/_translate.cache/en.jail-settings-config-menu.php b/public/dialogs/_translate.cache/en.jail-settings-config-menu.php new file mode 100644 index 00000000..f3892fdf --- /dev/null +++ b/public/dialogs/_translate.cache/en.jail-settings-config-menu.php @@ -0,0 +1,10 @@ + \ No newline at end of file diff --git a/public/dialogs/_translate.cache/en.jail-settings.php b/public/dialogs/_translate.cache/en.jail-settings.php new file mode 100644 index 00000000..e7e5e038 --- /dev/null +++ b/public/dialogs/_translate.cache/en.jail-settings.php @@ -0,0 +1,75 @@ + + +

    + Create jail + Edit jail +

    +

    Jail Settings

    +
    +
    +

    + Jail name: + +

    +

    + Hostname (FQDN): + + +

    +

    + IP address: + +

    +

    + Root password: + +

    +

    + Root password (again): + +

    +

    + Net Interface: + + +

    +

    + Parameters: + +
    + +
    + +
    + +

    +

    + Enabled services: + + +

    + +
    +
    +
    + + + +
    +
    + +

    translate('Task log');?>

    +
    + Task log here… +
    +
    + +
    + diff --git a/public/dialogs/_translate.cache/en.vnc-bhyve.php b/public/dialogs/_translate.cache/en.vnc-bhyve.php new file mode 100644 index 00000000..b7f45563 --- /dev/null +++ b/public/dialogs/_translate.cache/en.vnc-bhyve.php @@ -0,0 +1,19 @@ + +
    + + + + + +
    +
    +
    +
    + translate('Please, wait for initialize Virtual Machine');?> +
    translate('You can click here, or wait');?>: translate('some time');?> +
    +
    +
    + +
    \ No newline at end of file diff --git a/public/dialogs/_translate.cache/en.vnc.php b/public/dialogs/_translate.cache/en.vnc.php new file mode 100644 index 00000000..e761d8b9 --- /dev/null +++ b/public/dialogs/_translate.cache/en.vnc.php @@ -0,0 +1,9 @@ + +
    + + + + +
    + +
    \ No newline at end of file diff --git a/public/dialogs/_translate.cache/ru.bhyve-clone.php b/public/dialogs/_translate.cache/ru.bhyve-clone.php new file mode 100644 index 00000000..98b88e11 --- /dev/null +++ b/public/dialogs/_translate.cache/ru.bhyve-clone.php @@ -0,0 +1,23 @@ + + +

    + translate('Clone Virtual Machine');?> +

    +

    translate('Cloned Virtual Machine Settings');?>

    +
    +
    +

    + translate('Virtual Machine name');?>: + +

    +
    +
    +
    + + +
    +
    diff --git a/public/dialogs/_translate.cache/ru.bhyve-new.php b/public/dialogs/_translate.cache/ru.bhyve-new.php new file mode 100644 index 00000000..ed77fc9b --- /dev/null +++ b/public/dialogs/_translate.cache/ru.bhyve-new.php @@ -0,0 +1,102 @@ + + +

    + translate('Create Virtual Machine');?> + translate('Edit Virtual Machine');?> +

    +

    translate('Virtual Machine Settings');?>

    +
    +
    +

    + translate('VM OS profile');?>: + +

    +

    + translate('Virtual Machine name');?>: + +

    +

    + translate('VM template (cpu, ram, hdd)');?>: + + +

    +

    + translate('VM CPUs');?>: + + + + + +

    +

    + translate('VM RAM');?>: + + + + + +

    +

    + translate('VM Image size');?>: + + + + + +

    +

    + translate('Attached boot ISO image');?>: + +

    +

    + translate('VNC IP address');?>: + + +

    +

    + translate('VNC PORT');?>: + +

    +

    + translate('VNC Password');?>: + translate('use to log in VNC console');?> +

    +

    + translate('Net Interface');?>: + + +

    +
    +
    +
    + + + +
    +
    diff --git a/public/dialogs/_translate.cache/ru.bhyve-obtain.php b/public/dialogs/_translate.cache/ru.bhyve-obtain.php new file mode 100644 index 00000000..69ebb3ee --- /dev/null +++ b/public/dialogs/_translate.cache/ru.bhyve-obtain.php @@ -0,0 +1,84 @@ + +

    translate('Create Virtual Machine from Library');?>

    +

    translate('Virtual Machine Settings');?>

    +
    +
    +

    + translate('VM OS profile');?>: + +

    +

    + translate('Virtual Machine name');?>: + +

    +

    + translate('VM template (cpu, ram, hdd)');?>: + + +

    +

    + translate('VM CPUs');?>: + + + + +

    +

    + translate('VM RAM');?>: + + + + + + +

    +

    + translate('VM Image size');?>: + + + + + +

    +

    + translate('IP address');?>: + +

    +

    + translate('Gateway');?>: + +

    +

    + translate('Mask');?>: + +

    +

    + translate('VM Password');?>: + translate('default is');?>: «cbsd» +

    +

    + translate('USER Password');?>: + translate('напиши осознанный текст');?> +

    +

    + translate('Authkey');?>: + +

    +

    + translate('VNC Password');?>: + translate('use to log in VNC. Default is');?>: cbsd +

    +
    +
    +
    + + +
    +
    + +err_messages.add({ + 'jname':'translate("Can not be empty. Name must begin with a letter / a-z / and not have any special symbols: -,.=%");?>', +}); + + +

    + translate('Rename virtual machine');?> +

    +

    translate('Renamed Virtual Machine Settings');?>

    +
    +
    +

    + translate('@rename_warning@'); ?> +

    +

    + translate('VM name');?>: + +

    +
    +
    +
    + + +
    +
    diff --git a/public/dialogs/_translate.cache/ru.jail-clone.php b/public/dialogs/_translate.cache/ru.jail-clone.php new file mode 100644 index 00000000..75e9b134 --- /dev/null +++ b/public/dialogs/_translate.cache/ru.jail-clone.php @@ -0,0 +1,36 @@ + + +

    + translate('Clone jail');?> +

    +

    translate('Cloned Jail Settings');?>

    +
    +
    +

    + translate('@clone_warning@'); ?> +

    +

    + translate('Jail name');?>: + +

    +

    + translate('Hostname');?> (FQDN): + +

    +

    + translate('IP address');?>: + +

    +
    +
    +
    + + +
    +
    diff --git a/public/dialogs/_translate.cache/ru.jail-import.php b/public/dialogs/_translate.cache/ru.jail-import.php new file mode 100644 index 00000000..bfd98f4d --- /dev/null +++ b/public/dialogs/_translate.cache/ru.jail-import.php @@ -0,0 +1,35 @@ + + +

    + translate('Import jail');?> + translate('Edit jail');?> +

    +

    translate('Jail Import');?>

    +
    +
    +

    + +

    +
    Drag & Drop Files Here
    +
    -or-
    +
    + +
    +
    +
    + +

    +
    +
    +
    + +
    +
    + \ No newline at end of file diff --git a/public/dialogs/_translate.cache/ru.jail-rename.php b/public/dialogs/_translate.cache/ru.jail-rename.php new file mode 100644 index 00000000..00ee4d4c --- /dev/null +++ b/public/dialogs/_translate.cache/ru.jail-rename.php @@ -0,0 +1,36 @@ + + +

    + translate('Rename jail');?> +

    +

    translate('Renamed Jail Settings');?>

    +
    +
    +

    + translate('@rename_warning@'); ?> +

    +

    + translate('Jail name');?>: + +

    +

    + translate('Hostname');?> (FQDN): + +

    +

    + translate('IP address');?>: + +

    +
    +
    +
    + + +
    +
    diff --git a/public/dialogs/_translate.cache/ru.jail-settings-config-menu.php b/public/dialogs/_translate.cache/ru.jail-settings-config-menu.php new file mode 100644 index 00000000..f3892fdf --- /dev/null +++ b/public/dialogs/_translate.cache/ru.jail-settings-config-menu.php @@ -0,0 +1,10 @@ + \ No newline at end of file diff --git a/public/dialogs/_translate.cache/ru.jail-settings.php b/public/dialogs/_translate.cache/ru.jail-settings.php new file mode 100644 index 00000000..7b2a716e --- /dev/null +++ b/public/dialogs/_translate.cache/ru.jail-settings.php @@ -0,0 +1,75 @@ + + +

    + Create jail + Edit jail +

    +

    Jail Settings

    +
    +
    +

    + Имя контейнера: + +

    +

    + Hostname (FQDN): + + +

    +

    + IP address: + +

    +

    + Root password: + +

    +

    + Root password (again): + +

    +

    + Net Interface: + + +

    +

    + Parameters: + +
    + +
    + +
    + +

    +

    + Enabled services: + + +

    + +
    +
    +
    + + + +
    +
    + +

    translate('Task log');?>

    +
    + Task log here… +
    +
    + +
    + diff --git a/public/dialogs/_translate.cache/ru.vnc-bhyve.php b/public/dialogs/_translate.cache/ru.vnc-bhyve.php new file mode 100644 index 00000000..b7f45563 --- /dev/null +++ b/public/dialogs/_translate.cache/ru.vnc-bhyve.php @@ -0,0 +1,19 @@ + +
    + + + + + +
    +
    +
    +
    + translate('Please, wait for initialize Virtual Machine');?> +
    translate('You can click here, or wait');?>: translate('some time');?> +
    +
    +
    + +
    \ No newline at end of file diff --git a/public/dialogs/_translate.cache/ru.vnc.php b/public/dialogs/_translate.cache/ru.vnc.php new file mode 100644 index 00000000..e761d8b9 --- /dev/null +++ b/public/dialogs/_translate.cache/ru.vnc.php @@ -0,0 +1,9 @@ + +
    + + + + +
    + +
    \ No newline at end of file diff --git a/public/dialogs/jail-settings.php b/public/dialogs/jail-settings.php index 4be2d707..78a52890 100644 --- a/public/dialogs/jail-settings.php +++ b/public/dialogs/jail-settings.php @@ -1,60 +1,60 @@

    - translate('Create jail');?> - translate('Edit jail');?> + Create jail + Edit jail

    -

    translate('Jail Settings');?>

    +

    Jail Settings

    - translate('Jail name');?>: + Jail name:

    - translate('Hostname');?> (FQDN): + Hostname (FQDN):

    - translate('IP address');?>: + IP address:

    - translate('Root password');?>: + Root password:

    - translate('Root password (again)');?>: + Root password (again):

    - translate('Net Interface');?>: + Net Interface:

    - translate('Parameters');?>: - + Parameters: +
    - +
    - +
    - +

    - translate('Enabled services');?>: + Enabled services:

    @@ -62,9 +62,9 @@ err_messages.add({
    - - - + Create" class="new button ok-but" /> + Save" class="edit button ok-but" /> + Cancel" class="button red cancel-but" />
    +menu->title +--- +if(isset($user_info_txt)) echo $user_info_txt +--- + +if(file_exists($file_name)){ + include($file_name); +} else { + echo '

    '.$locale->translate('Not implemented yet').'!

    '; +} + +$clonos->placeDialogs(); +--- + + +--- + + +-- + +placeDialogByName('system-login'); ?> +*/ + + +#include($_real_path.'/public/pages/index.php'); exit; ?> @@ -89,7 +123,7 @@ if(!$user_info['error']){ -
    +>
    +
  • Overview
  • +
  • Jail containers
  • +
  • Template for jail
  • +
  • Bhyve VMs
  • +
  • VM Packages
  • +
  • K8S clusters
  • +
  • Virtual Private Network
  • +
  • Authkeys
  • +
  • Storage Media
  • +
  • Imported images
  • +
  • FreeBSD Bases
  • +
  • FreeBSD Sources
  • +
  • TaskLog
  • +
  • SQLite admin
  • + + diff --git a/public/pages/_translate.cache/es.menu.php b/public/pages/_translate.cache/es.menu.php new file mode 100644 index 00000000..abb3e27c --- /dev/null +++ b/public/pages/_translate.cache/es.menu.php @@ -0,0 +1,19 @@ + + diff --git a/public/pages/_translate.cache/ru.menu.php b/public/pages/_translate.cache/ru.menu.php new file mode 100644 index 00000000..1033de37 --- /dev/null +++ b/public/pages/_translate.cache/ru.menu.php @@ -0,0 +1,19 @@ + + diff --git a/public/pages/index.php b/public/pages/index.php new file mode 100644 index 00000000..d247809f --- /dev/null +++ b/public/pages/index.php @@ -0,0 +1,138 @@ + + + + ClonOS — <?php echo $menu->title; ?> + + + + + + + + + + + + + + + + + + + +
    +
    +
    +Not implemented yet!'; +} +$clonos->placeDialogs(); +?> +
    +
    +
    +
    +
    +
    Имя клетки:
    +
    Jail1
    +
    +
    +
    +

    CPU usage, %:

    +
    +
    +

    Memory usage, %:

    +
    +
    +

    I/O storage, iops:

    +
    +
    +

    I/O storage, bit per seconds:

    +
    +
    +
    +
    +
    +
    + + + +
    +
    + + DONATE + + VERSION: realpath.'version'); ?> + + THEMES: + + + + +
    + +
    + + + +
    +
    + + \ No newline at end of file diff --git a/public/pages/jailscontainers/_translate.cache/!dont.touch.files b/public/pages/jailscontainers/_translate.cache/!dont.touch.files new file mode 100644 index 00000000..e38372ac --- /dev/null +++ b/public/pages/jailscontainers/_translate.cache/!dont.touch.files @@ -0,0 +1,3 @@ +This files is cache of translated pages, do not translate it! +If you are a translator, please read the documentation on the translation on the website. +Thank you. \ No newline at end of file diff --git a/public/pages/jailscontainers/index.php b/public/pages/jailscontainers/index.php index 98fda3a0..b524211c 100644 --- a/public/pages/jailscontainers/index.php +++ b/public/pages/jailscontainers/index.php @@ -14,22 +14,22 @@ $clonos->useDialogs([ ]); ?> -

    {translate:[Jail containers:]}

    +

    Jail containers:

    -

    {translate:[Create jail]} -{translate:[Import]}

    +

    Create jail +Import

    - - - - - - - - + + + + + + + + diff --git a/public/pages/jailscontainers/translate.cache/!dont.touch.files b/public/pages/jailscontainers/translate.cache/!dont.touch.files deleted file mode 100644 index 594b39c2..00000000 --- a/public/pages/jailscontainers/translate.cache/!dont.touch.files +++ /dev/null @@ -1,4 +0,0 @@ -This files is cache of translated pages, do not translate it! - -translate template: - {translate:[Last One]} \ No newline at end of file diff --git a/public/pages/orig.index.html b/public/pages/orig.index.html new file mode 100644 index 00000000..cc164736 --- /dev/null +++ b/public/pages/orig.index.html @@ -0,0 +1,144 @@ + + + + ClonOS — <!--place(menu->title)--> + + + + + + + + + + + + + + + + + + + +
    +
    +
    + +
    +
    +
    +
    +
    +
    Имя клетки:
    +
    Jail1
    +
    +
    +
    +

    CPU usage, %:

    +
    +
    +

    Memory usage, %:

    +
    +
    +

    I/O storage, iops:

    +
    +
    +

    I/O storage, bit per seconds:

    +
    +
    +
    +
    +
    +
    + + + +
    +
    + + DONATE + + VERSION: ',file_get_contents($clonos->realpath.'version'); ?> + + THEMES: + + + + +
    + +
    + + + +
    +
    + + \ No newline at end of file diff --git a/public/pages/overview/1.orig.index.php b/public/pages/overview/1.orig.index.php new file mode 100644 index 00000000..92521112 --- /dev/null +++ b/public/pages/overview/1.orig.index.php @@ -0,0 +1,46 @@ +
    +
    +

    Summary statistics for cloud:

    +
    {translate:[Node name]}{translate:[Jail]}{translate:[Usage]}{translate:[IP address]}{translate:[Status]}{translate:[Action]}{translate:[VNC]}{translate:[Port]}Node nameJailUsageIP addressStatusActionVNCPort
    + + + + + + + + + + + + + + + + + + +
    ParamValues
    Num of nodes:
    Online nodes:
    Offline nodes:
    Num of jails:
    Num of cores:
    Average freq. Mhz:
    Summary RAM:
    Summary storage size:
    +
    +
    +

    Current node CPU usage:

    +
    + +

    Current node RAM usage:

    +
    +
    +
    + +

    It is an open source and free product which powered by other project (major importance list):

    + + + diff --git a/public/pages/overview/_translate.cache/!dont.touch.files b/public/pages/overview/_translate.cache/!dont.touch.files new file mode 100644 index 00000000..e38372ac --- /dev/null +++ b/public/pages/overview/_translate.cache/!dont.touch.files @@ -0,0 +1,3 @@ +This files is cache of translated pages, do not translate it! +If you are a translator, please read the documentation on the translation on the website. +Thank you. \ No newline at end of file diff --git a/public/pages/overview/_translate.cache/ru.index.php b/public/pages/overview/_translate.cache/ru.index.php new file mode 100644 index 00000000..ba6b4091 --- /dev/null +++ b/public/pages/overview/_translate.cache/ru.index.php @@ -0,0 +1,46 @@ +
    +
    +

    Общая статистика облака:

    + + + + + + + + + + + + + + + + + + + +
    ПараметрValues
    Количество нод:
    Online nodes:
    Offline nodes:
    Num of jails:
    Num of cores:
    Average freq. Mhz:
    Summary RAM:
    Summary storage size:
    +
    +
    +

    Current node CPU usage:

    +
    + +

    Current node RAM usage:

    +
    +
    +
    + +

    It is an open source and free product which powered by other project (major importance list):

    + + + diff --git a/public/pages/overview/orig.index.php b/public/pages/overview/orig.index.php index 92521112..5de841bf 100644 --- a/public/pages/overview/orig.index.php +++ b/public/pages/overview/orig.index.php @@ -1,42 +1,42 @@
    -

    Summary statistics for cloud:

    +

    Summary statistics for cloud:

    - + - - - - - - - - + + + + + + + + - +
    ParamValuesParamValues
    Num of nodes:
    Online nodes:
    Offline nodes:
    Num of jails:
    Num of cores:
    Average freq. Mhz:
    Summary RAM:
    Summary storage size:
    Num of nodes:
    Online nodes:
    Offline nodes:
    Num of jails:
    Num of cores:
    Average freq. Mhz:
    Summary RAM:
    Summary storage size:
    -

    Current node CPU usage:

    +

    Current node CPU usage:

    -

    Current node RAM usage:

    +

    Current node RAM usage:

    -

    It is an open source and free product which powered by other project (major importance list):

    +

    It is an open source and free product which powered by other project (major importance list):