translate: rework

This commit is contained in:
olevole
2024-12-06 02:04:00 +03:00
parent e4c2ee15ae
commit 32929b977f
51 changed files with 1846 additions and 136 deletions

View File

@@ -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;
}
}

View File

@@ -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/*;
}

View File

@@ -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'],"<br>";
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'],"<br>";
}
}

View File

@@ -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; }

View File

@@ -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('#<translate([^>]*)>(.*)</translate>#',$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 '<pre>'.$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='<translate id="'.$dbres['lastID'].'">'.$text."</translate>";
$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='#<translate id="'.$item['en_id'].'"[^>]*>(.*)</translate>#';
$txt=preg_replace($pat,$item['text'],$txt);
}
$txt=preg_replace('#(<translate([^>]*)>|</translate>)#','',$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...'];
}
/*
<translate([^>]*)>(.*)</translate>
*/
}
public function get_translated_filename()
{
return $this->translated_file;
}
}

View File

@@ -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<li><a href="/sqlite/".+</li>\n#','',$this->html);
}
return;
}
//var_dump($this->_public_pages_path);exit;
if(getenv('APPLICATION_ENV') != 'development'){
unset($menu_config['sqlite']);
}
$this->html='<ul class="menu">'.PHP_EOL;
$this->html=' <ul class="menu">'.PHP_EOL;
//$qstr=trim($_SERVER['REQUEST_URI'],'/');
$qstr='';
@@ -49,6 +76,7 @@ class Menu
foreach($menu_config as $link=>$val){
$mname=$lang->translate($val['name']);
$mtitle=$lang->translate($val['title']);
$titles[$link]=$mtitle;
$sel='';
if($qstr==$link){
$sel=' class="sel"';
@@ -58,7 +86,7 @@ class Menu
$icon='empty';
if(isset($val['icon']) && !empty($val['icon'])) $icon=$val['icon'];
$span='<span class="'.$icon.'"></span>';
$this->html.=' <li><a href="/'.$link.'/" title="'.$mtitle.'"'.$sel.'>'.$span.'<span class="mtxt">'.$mname.'</span></a>';
$this->html.=' <li><a href="/'.$link.'/" title="'.$mtitle.'"'.$sel.'>'.$span.'<span class="mtxt">'.$mname.'</span></a>';
if(!empty($val['submenu'])){
$this->html.= PHP_EOL.' <ul class="submenu">'.PHP_EOL;
foreach($val['submenu'] as $k=>$s){
@@ -74,18 +102,29 @@ class Menu
}
$this->html.= ' <li><a href="/'.$slink.'/" title="'.$stitle.'"'.$ssel.'>'.$sname.'</a></li>'.PHP_EOL;
}
$this->html.= ' </ul>'.PHP_EOL.' ';
$this->html.= ' </ul>'.PHP_EOL.' ';
}
$this->html.= '</li>'.PHP_EOL;
}
$this->html.='</ul>';
$this->html.=' </ul>'."\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.=' <script type="text/javascript">'.PHP_EOL;
$this->html.="\t\tvar page_titles=".json_encode($titles)."\n";
$this->html.=' </script>'.PHP_EOL;
file_put_contents($translate_file,$this->html);
}
}

View File

@@ -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;

View File

@@ -0,0 +1,75 @@
<script type="text/javascript">
err_messages.add({
'jname':'<translate>Can not be empty. Name must begin with a letter / a-z / and not have any special symbols: -,.=%</translate>',
'hostname':'<translate>This field can not be empty</translate>',
'ip':'<translate>Write correct ip address, e.g: 10.0.0.2</translate>',
'rootpass':'<translate>Password can not be less than 3 symbols</translate>',
'rootpass1':'<translate>Please retype password correctly</translate>',
});
</script>
<dialog id="jail-settings" class="window-box new">
<h1>
<span class="new"><translate>Create jail</translate></span>
<span class="edit"><translate>Edit jail</translate></span>
</h1>
<h2><translate>Jail Settings</translate></h2>
<form class="win" method="post" id="jailSettings" onsubmit="return false;">
<div class="window-content">
<p>
<span class="field-name"><translate>Jail name</translate>:</span>
<input type="text" name="jname" value="" pattern="[^0-9]{1}[a-zA-Z0-9]{2,}" required="required" class="edit-disable" />
</p>
<p>
<span class="field-name"><translate>Hostname</translate> (FQDN):</span>
<input type="text" name="host_hostname" value="" required="required" />
<!--
<small class="astart-warn"> <translate>available on the jail is not running</translate></small>
-->
</p>
<p>
<span class="field-name"><translate>IP address</translate>:</span>
<input type="text" name="ip4_addr" value="DHCP" pattern="^DHCP$|^DHCP[vV]6$|^(?:[0-9]{1,3}\.){3}[0-9]{1,3}(\/[\d]{1,3})?$" required="required" />
</p>
<p class="new">
<span class="field-name"><translate>Root password</translate>:</span>
<input type="password" name="user_pw_root" value="" placeholder="3-20 symbols" pattern=".{3,20}" maxlength="20"></input>
</p>
<p class="new">
<span class="field-name"><translate>Root password (again)</translate>:</span>
<input type="password" name="user_pw_root_1" value="" placeholder="3-20 symbols" pattern=".{3,20}" maxlength="20"></input>
</p>
<p>
<span class="field-name"><translate>Net Interface</translate>:</span>
<input type="radio" name="interface" value="auto" id="rint0" checked="checked" class="inline"><label for="rint0">auto</label></radio>
<input type="radio" name="interface" value="lo0" id="rint2" class="inline"><label for="rint2">lo0</label></radio>
</p>
<p>
<span class="field-name"><translate>Parameters</translate>:</span>
<input type="checkbox" name="baserw" id="bwritable-id" /><label for="bwritable-id"> <translate>Base writable</translate>?</label>
<br />
<input type="checkbox" name="mount_ports" id="mount-id" /><label for="mount-id"> <translate>Mount</translate> /usr/ports?</label>
<br />
<input type="checkbox" name="astart" id="astart-id" /><label for="astart-id"> <translate>Autostart jail at system startup</translate></label>
<br />
<input type="checkbox" name="vnet" id="vnet-id" /><label for="vnet-id"> <translate>Virtual network stack (VIMAGE)</translate></label>
</p>
<p class="new">
<span class="field-name"><translate>Enabled services</translate>:</span>
<input type="checkbox" name="serv-ftpd" value="ftpd" id="esrv0" class="inline"><label for="esrv0">ftpd</label></checkbox>
<input type="checkbox" name="serv-sshd" value="sshd" id="esrv1" class="inline"><label for="esrv1">sshd</label></checkbox>
</p>
</div>
</form>
<div class="buttons">
<input type="button" value="<translate>Create</translate>" class="new button ok-but" />
<input type="button" value="<translate>Save</translate>" class="edit button ok-but" />
<input type="button" value="<translate>Cancel</translate>" class="button red cancel-but" />
</div>
</dialog>
<?php
/*
сложное правило для пароля: цифры, буквы маленькие и заглавные, плюс спецсимволы
^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[^\w\s]).{8,20}$
*/

View File

@@ -0,0 +1,75 @@
<script type="text/javascript">
err_messages.add({
'jname':'<translate id="19">Can not be empty. Name must begin with a letter / a-z / and not have any special symbols: -,.=%</translate>',
'hostname':'<translate id="20">This field can not be empty</translate>',
'ip':'<translate id="21">Write correct ip address, e.g: 10.0.0.2</translate>',
'rootpass':'<translate id="22">Password can not be less than 3 symbols</translate>',
'rootpass1':'<translate id="23">Please retype password correctly</translate>',
});
</script>
<dialog id="jail-settings" class="window-box new">
<h1>
<span class="new"><translate id="24">Create jail</translate></span>
<span class="edit"><translate id="25">Edit jail</translate></span>
</h1>
<h2><translate id="26">Jail Settings</translate></h2>
<form class="win" method="post" id="jailSettings" onsubmit="return false;">
<div class="window-content">
<p>
<span class="field-name"><translate id="27">Jail name</translate>:</span>
<input type="text" name="jname" value="" pattern="[^0-9]{1}[a-zA-Z0-9]{2,}" required="required" class="edit-disable" />
</p>
<p>
<span class="field-name"><translate id="28">Hostname</translate> (FQDN):</span>
<input type="text" name="host_hostname" value="" required="required" />
<!--
<small class="astart-warn"> <translate id="29">available on the jail is not running</translate></small>
-->
</p>
<p>
<span class="field-name"><translate id="30">IP address</translate>:</span>
<input type="text" name="ip4_addr" value="DHCP" pattern="^DHCP$|^DHCP[vV]6$|^(?:[0-9]{1,3}\.){3}[0-9]{1,3}(\/[\d]{1,3})?$" required="required" />
</p>
<p class="new">
<span class="field-name"><translate id="31">Root password</translate>:</span>
<input type="password" name="user_pw_root" value="" placeholder="3-20 symbols" pattern=".{3,20}" maxlength="20"></input>
</p>
<p class="new">
<span class="field-name"><translate id="32">Root password (again)</translate>:</span>
<input type="password" name="user_pw_root_1" value="" placeholder="3-20 symbols" pattern=".{3,20}" maxlength="20"></input>
</p>
<p>
<span class="field-name"><translate id="33">Net Interface</translate>:</span>
<input type="radio" name="interface" value="auto" id="rint0" checked="checked" class="inline"><label for="rint0">auto</label></radio>
<input type="radio" name="interface" value="lo0" id="rint2" class="inline"><label for="rint2">lo0</label></radio>
</p>
<p>
<span class="field-name"><translate id="34">Parameters</translate>:</span>
<input type="checkbox" name="baserw" id="bwritable-id" /><label for="bwritable-id"> <translate id="35">Base writable</translate>?</label>
<br />
<input type="checkbox" name="mount_ports" id="mount-id" /><label for="mount-id"> <translate id="36">Mount</translate> /usr/ports?</label>
<br />
<input type="checkbox" name="astart" id="astart-id" /><label for="astart-id"> <translate id="37">Autostart jail at system startup</translate></label>
<br />
<input type="checkbox" name="vnet" id="vnet-id" /><label for="vnet-id"> <translate id="38">Virtual network stack (VIMAGE)</translate></label>
</p>
<p class="new">
<span class="field-name"><translate id="39">Enabled services</translate>:</span>
<input type="checkbox" name="serv-ftpd" value="ftpd" id="esrv0" class="inline"><label for="esrv0">ftpd</label></checkbox>
<input type="checkbox" name="serv-sshd" value="sshd" id="esrv1" class="inline"><label for="esrv1">sshd</label></checkbox>
</p>
</div>
</form>
<div class="buttons">
<input type="button" value="<translate id="40">Create</translate>" class="new button ok-but" />
<input type="button" value="<translate id="41">Save</translate>" class="edit button ok-but" />
<input type="button" value="<translate>Cancel</translate>" class="button red cancel-but" />
</div>
</dialog>
<?php
/*
сложное правило для пароля: цифры, буквы маленькие и заглавные, плюс спецсимволы
^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[^\w\s]).{8,20}$
*/

View File

@@ -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.

View File

@@ -0,0 +1,23 @@
<script type="text/javascript">
err_messages.add({
'vm_name':'<?php echo $this->translate("Can not be empty. Name must begin with a letter / a-z / and not have any special symbols: -,.=%");?>',
});
</script>
<dialog id="bhyve-clone" class="window-box new">
<h1>
<span class="new"><?php echo $this->translate('Clone Virtual Machine');?></span>
</h1>
<h2><?php echo $this->translate('Cloned Virtual Machine Settings');?></h2>
<form class="win" method="post" id="bhyveCloneSettings" onsubmit="return false;">
<div class="window-content">
<p>
<span class="field-name"><?php echo $this->translate('Virtual Machine name');?>:</span>
<input type="text" name="vm_name" value="" pattern="[^0-9]{1}[a-zA-Z0-9]{1,}" required="required" class="edit-disable" />
</p>
</div>
</form>
<div class="buttons">
<input type="button" value="<?php echo $this->translate('Clone');?>" class="new button ok-but" />
<input type="button" value="<?php echo $this->translate('Cancel');?>" class="button red cancel-but" />
</div>
</dialog>

View File

@@ -0,0 +1,102 @@
<script type="text/javascript">
err_messages.add({
'vm_name':'<?php echo $this->translate("Can not be empty. Name must begin with a letter / a-z / and not have any special symbols: -,.=%");?>',
'vm_size':'You need type «g» char after numbers',
'vm_ram':'You need type «g» char after numbers',
});
<?php
//print_r($this->config->os_types);exit;
?>
</script>
<dialog id="bhyve-new" class="window-box">
<h1>
<span class="new"><?php echo $this->translate('Create Virtual Machine');?></span>
<span class="edit"><?php echo $this->translate('Edit Virtual Machine');?></span>
</h1>
<h2><?php echo $this->translate('Virtual Machine Settings');?></h2>
<form class="win" method="post" id="bhyveSettings" onsubmit="return false;">
<div class="window-content">
<p class="new">
<span class="field-name"><?php echo $this->translate('VM OS profile');?>:</span>
<select name="vm_os_profile" onchange="clonos.onChangeOsProfile(this,event);">
<?php echo $this->config->os_types_create(); ?>
</select>
</p>
<p>
<span class="field-name"><?php echo $this->translate('Virtual Machine name');?>:</span>
<input type="text" name="vm_name" value="" pattern="[^0-9]{1}[a-zA-Z0-9]{1,}" required="required" class="edit-disable" />
</p>
<p class="new">
<span class="field-name"><?php echo $this->translate('VM template (cpu, ram, hdd)');?>:</span>
<select name="vm_packages" onchange="clonos.onChangePkgTemplate(this,event);">
<?php $vm_res=$this->config->vm_packages_list(); echo $vm_res['html']; ?>
</select>
<script type="text/javascript">clonos.vm_packages_new_min_id=<?php echo $vm_res['min_id']; ?>;</script>
</p>
<p>
<span class="field-name"><?php echo $this->translate('VM CPUs');?>:</span>
<span class="range">
<input type="range" name="vm_cpus" class="vHorizon" min="1" max="16" value="1" style="margin:6px 0;" id="rngCpus" oninput="rngCpusShow.value=rngCpus.value" />
<input type="text" disabled="disabled" id="rngCpusShow" value="1" name="vm_cpus_show" />
<!-- input type="text" name="vm_cpus" value="" pattern="[0-9]+" placeholder="1" required="required" / -->
</span>
</p>
<p>
<span class="field-name"><?php echo $this->translate('VM RAM');?>:</span>
<!-- <input type="text" name="vm_ram" value="" pattern="^[0-9]+\s*(g|gb|mb|m|t|tb)$" placeholder="1g" required="required" /> -->
<span class="range">
<input type="range" name="vm_ram" class="vHorizon" min="1" max="64" value="1" style="margin:6px 0;" id="rngRam" oninput="rngRamShow.value=rngRam.value+'g'" />
<input type="text" disabled="disabled" id="rngRamShow" value="1" name="vm_ram_show" />
</span>
</p>
<p class="new">
<span class="field-name"><?php echo $this->translate('VM Image size');?>:</span>
<!-- <input type="text" name="vm_size" value="" pattern="^[0-9]+(g|gb|t|tb)$" placeholder="10g" required="required" class="edit-disable" /> -->
<span class="range">
<input type="range" name="vm_imgsize" class="vHorizon" min="20" max="866" value="20" style="margin:6px 0;" id="rngImgsize" oninput="rngImgsizeShow.value=rngImgsize.value+'g'" />
<input type="text" disabled="disabled" id="rngImgsizeShow" value="1" name="vm_imgsize_show" />
</span>
</p>
<p>
<span class="field-name"><?php echo $this->translate('Attached boot ISO image');?>:</span>
<select name="vm_iso_image">
<option value="-2"></option>
<option value="-1" selected>Profile default ISO</option>
<?php echo $this->media_iso_list_html(); ?>
</select>
</p>
<p>
<span class="field-name"><?php echo $this->translate('VNC IP address');?>:</span>
<input type="radio" name="bhyve_vnc_tcp_bind" value="127.0.0.1" id="vncip0" checked="checked" class="inline"><label for="vncip0">127.0.0.1</label></radio>
<input type="radio" name="bhyve_vnc_tcp_bind" value="0.0.0.0" id="vncip1" class="inline"><label for="vncip1">0.0.0.0</label></radio>
</p>
<p>
<span class="field-name"><?php echo $this->translate('VNC PORT');?>:</span>
<input type="text" name="vm_vnc_port" value="" placeholder="0" maxlength="5" />
</p>
<p>
<span class="field-name"><?php echo $this->translate('VNC Password');?>:</span>
<input type="password" name="vm_vnc_password" value="" placeholder="3-20 symbols" pattern=".{3,20}" maxlength="20"></input> <small>— <?php echo $this->translate('use to log in VNC console');?></small>
</p>
<!-- <p>
<span class="field-name"><?php echo $this->translate('CD-ROM ISO');?>:</span>
<select name="cd-rom">
<option value="profile">profile</option>
</select>
</p>
--> <p>
<span class="field-name"><?php echo $this->translate('Net Interface');?>:</span>
<!-- <input type="radio" name="interface" value="auto" id="rint0" checked="checked" class="inline"><label for="rint0">auto</label></radio> -->
<select name="interface">
<option value="auto">auto</option>
<?php echo $this->get_interfaces_html(); ?>
</select>
</p>
</div>
</form>
<div class="buttons">
<input type="button" value="<?php echo $this->translate('Create');?>" class="new button ok-but" />
<input type="button" value="<?php echo $this->translate('Save');?>" class="edit button ok-but" />
<input type="button" value="<?php echo $this->translate('Cancel');?>" class="button red cancel-but" />
</div>
</dialog>

View File

@@ -0,0 +1,84 @@
<dialog id="bhyve-obtain" class="window-box">
<h1><?php echo $this->translate('Create Virtual Machine from Library');?></h1>
<h2><?php echo $this->translate('Virtual Machine Settings');?></h2>
<form class="win" method="post" id="bhyveObtSettings" onsubmit="return false;">
<div class="window-content">
<p>
<span class="field-name"><?php echo $this->translate('VM OS profile');?>:</span>
<select name="vm_os_profile" onchange="clonos.onChangeOsProfile(this,event);">
<?php echo $this->config->os_types_create('obtain'); ?>
</select>
</p>
<p>
<span class="field-name"><?php echo $this->translate('Virtual Machine name');?>:</span>
<input type="text" name="vm_name" value="" pattern="[^0-9]{1}[a-zA-Z0-9]{1,}" required="required" />
</p>
<p>
<span class="field-name"><?php echo $this->translate('VM template (cpu, ram, hdd)');?>:</span>
<select name="vm_packages" onchange="clonos.onChangePkgTemplate(this,event);">
<?php $vm_res=$this->config->vm_packages_list(); echo $vm_res['html']; ?>
</select>
<script type="text/javascript">clonos.vm_packages_obtain_min_id=<?php echo $vm_res['min_id']; ?>;</script>
</p>
<p>
<span class="field-name"><?php echo $this->translate('VM CPUs');?>:</span>
<span class="range">
<input type="range" name="vm_cpus" class="vHorizon" min="1" max="16" value="1" style="margin:6px 0;" id="rngCpus1" oninput="rngCpusShow1.value=rngCpus1.value" />
<input type="text" disabled="disabled" id="rngCpusShow1" value="1" name="vm_cpus_show" />
</span>
</p>
<p>
<span class="field-name"><?php echo $this->translate('VM RAM');?>:</span>
<!-- <input type="text" name="vm_ram" value="" pattern="^[0-9]+(g|gb|mb|m)$" placeholder="1g" required="required" /> -->
<span class="range">
<input type="range" name="vm_ram" class="vHorizon" min="1" max="64" value="1" style="margin:6px 0;" id="rngRam1" oninput="rngRamShow1.value=rngRam1.value+'g'" />
<input type="text" disabled="disabled" id="rngRamShow1" value="1" name="vm_ram_show" />
</span>
</p>
<p>
<span class="field-name"><?php echo $this->translate('VM Image size');?>:</span>
<!-- <input type="text" name="vm_size" value="" pattern="^[0-9]+(g|gb|mb|m|t|tb)$" placeholder="10g" required="required" /> -->
<span class="range">
<input type="range" name="vm_size" class="vHorizon" min="20" max="866" value="20" style="margin:6px 0;" id="rngImgsize1" oninput="rngImgsizeShow1.value=rngImgsize1.value+'g'" />
<input type="text" disabled="disabled" id="rngImgsizeShow1" value="1" name="vm_imgsize_show" />
</span>
</p>
<p>
<span class="field-name"><?php echo $this->translate('IP address');?>:</span>
<input type="text" name="ip4_addr" value="DHCP" pattern="^DHCP$|^DHCP[vV]6$|^(?:[0-9]{1,3}\.){3}[0-9]{1,3}(\/[\d]{1,3})?$" required="required" />
</p>
<p>
<span class="field-name"><?php echo $this->translate('Gateway');?>:</span>
<input type="text" name="gateway" value="10.0.0.1" pattern="^(?:[0-9]{1,3}\.){3}[0-9]{1,3}(\/[\d]{1,3})?$" required="required" />
</p>
<p>
<span class="field-name"><?php echo $this->translate('Mask');?>:</span>
<input type="text" name="mask" value="255.255.255.0" pattern="^(?:[0-9]{1,3}\.){3}[0-9]{1,3}(\/[\d]{1,3})?$" required="required" />
</p>
<p>
<span class="field-name"><?php echo $this->translate('VM Password');?>:</span>
<input type="password" name="vm_password" value="cbsd" placeholder="3-20 symbols" pattern=".{3,20}" maxlength="20"></input> <small>— <?php echo $this->translate('default is');?>: «cbsd»</small>
</p>
<p>
<span class="field-name"><?php echo $this->translate('USER Password');?>:</span>
<input type="password" name="user_password" value="" placeholder="3-20 symbols" pattern=".{3,20}" maxlength="20"></input> <small>— <?php echo $this->translate('напиши осознанный текст');?></small>
</p>
<p>
<span class="field-name"><?php echo $this->translate('Authkey');?>:</span>
<select name="vm_authkey">
<?php echo $this->config->authkeys_list(); ?>
</select>
</p>
<p>
<span class="field-name"><?php echo $this->translate('VNC Password');?>:</span>
<input type="password" name="vnc_password" value="cbsd" placeholder="3-20 symbols" pattern=".{3,20}" maxlength="20"></input> <small>— <?php echo $this->translate('use to log in VNC. Default is');?>: cbsd</small>
</p>
</div>
</form>
<div class="buttons">
<input type="button" value="<?php echo $this->translate('Create');?>" class="button ok-but" />
<input type="button" value="<?php echo $this->translate('Cancel');?>" class="button red cancel-but" />
</div>
</dialog>
<?php

View File

@@ -0,0 +1,26 @@
<script type="text/javascript">
err_messages.add({
'jname':'<?php echo $this->translate("Can not be empty. Name must begin with a letter / a-z / and not have any special symbols: -,.=%");?>',
});
</script>
<dialog id="bhyve-rename" class="window-box new">
<h1>
<span class="new"><?php echo $this->translate('Rename virtual machine');?></span>
</h1>
<h2><?php echo $this->translate('Renamed Virtual Machine Settings');?></h2>
<form class="win" method="post" id="bhyveRenameSettings" onsubmit="return false;">
<div class="window-content">
<p class="warning" style="width:400px;">
<?php echo $this->translate('@rename_warning@'); ?>
</p>
<p>
<span class="field-name"><?php echo $this->translate('VM name');?>:</span>
<input type="text" name="jname" value="" pattern="[^0-9]{1}[a-zA-Z0-9]{2,}" required="required" class="edit-disable" />
</p>
</div>
</form>
<div class="buttons">
<input type="button" value="<?php echo $this->translate('Rename');?>" class="new button ok-but" />
<input type="button" value="<?php echo $this->translate('Cancel');?>" class="button red cancel-but" />
</div>
</dialog>

View File

@@ -0,0 +1,36 @@
<script type="text/javascript">
err_messages.add({
'jname':'<?php echo $this->translate("Can not be empty. Name must begin with a letter / a-z / and not have any special symbols: -,.=%");?>',
'host_hostname':'<?php echo $this->translate("This field can not be empty");?>',
'ip':'<?php echo $this->translate("Write correct ip address, e.g: 10.0.0.2");?>',
});
</script>
<dialog id="jail-clone" class="window-box new">
<h1>
<span class="new"><?php echo $this->translate('Clone jail');?></span>
</h1>
<h2><?php echo $this->translate('Cloned Jail Settings');?></h2>
<form class="win" method="post" id="jailCloneSettings" onsubmit="return false;">
<div class="window-content">
<p class="warning" style="width:400px;">
<?php echo $this->translate('@clone_warning@'); ?>
</p>
<p>
<span class="field-name"><?php echo $this->translate('Jail name');?>:</span>
<input type="text" name="jname" value="" pattern="[^0-9]{1}[a-zA-Z0-9]{2,}" required="required" class="edit-disable" />
</p>
<p>
<span class="field-name"><?php echo $this->translate('Hostname');?> (FQDN):</span>
<input type="text" name="host_hostname" value="" required="required" />
</p>
<p>
<span class="field-name"><?php echo $this->translate('IP address');?>:</span>
<input type="text" name="ip4_addr" value="DHCP" pattern="^DHCP$|^DHCP[vV]6$|^(?:[0-9]{1,3}\.){3}[0-9]{1,3}(\/[\d]{1,3})?$" required="required" />
</p>
</div>
</form>
<div class="buttons">
<input type="button" value="<?php echo $this->translate('Clone');?>" class="new button ok-but" />
<input type="button" value="<?php echo $this->translate('Cancel');?>" class="button red cancel-but" />
</div>
</dialog>

View File

@@ -0,0 +1,35 @@
<script type="text/javascript">
err_messages.add({
'jname':'<?php echo $this->translate("Can not be empty. Name must begin with a letter / a-z / and not have any special symbols: -,.=%");?>',
});
</script>
<dialog id="jail-import" class="window-box new">
<h1>
<span class="new"><?php echo $this->translate('Import jail');?></span>
<span class="edit"><?php echo $this->translate('Edit jail');?></span>
</h1>
<h2><?php echo $this->translate('Jail Import');?></h2>
<form class="win" method="post" id="jailImport" onsubmit="return false;">
<div class="window-content">
<p>
<!-- D&D Markup -->
<div id="drag-and-drop-zone" class="uploader">
<div>Drag &amp; Drop Files Here</div>
<div class="or">-or-</div>
<div class="browser">
<label>
<span>Click to open the file Browser</span>
<input type="file" name="jimp_files[]" multiple="multiple" title='Click to add Files'>
</label>
</div>
</div>
<div class="uploader-progress"></div>
<!-- /D&D Markup -->
</p>
</div>
</form>
<div class="buttons">
<input type="button" value="<?php echo $this->translate('Cancel');?>" class="button red cancel-but" />
</div>
</dialog>
<script type="text/javascript">clonos.fileUploadPrepare();</script>

View File

@@ -0,0 +1,36 @@
<script type="text/javascript">
err_messages.add({
'jname':'<?php echo $this->translate("Can not be empty. Name must begin with a letter / a-z / and not have any special symbols: -,.=%");?>',
'hostname':'<?php echo $this->translate("This field can not be empty");?>',
'ip':'<?php echo $this->translate("Write correct ip address, e.g: 10.0.0.2");?>',
});
</script>
<dialog id="jail-rename" class="window-box new">
<h1>
<span class="new"><?php echo $this->translate('Rename jail');?></span>
</h1>
<h2><?php echo $this->translate('Renamed Jail Settings');?></h2>
<form class="win" method="post" id="jailRenameSettings" onsubmit="return false;">
<div class="window-content">
<p class="warning" style="width:400px;">
<?php echo $this->translate('@rename_warning@'); ?>
</p>
<p>
<span class="field-name"><?php echo $this->translate('Jail name');?>:</span>
<input type="text" name="jname" value="" pattern="[^0-9]{1}[a-zA-Z0-9]{2,}" required="required" class="edit-disable" />
</p>
<p>
<span class="field-name"><?php echo $this->translate('Hostname');?> (FQDN):</span>
<input type="text" name="host_hostname" value="" required="required" />
</p>
<p>
<span class="field-name"><?php echo $this->translate('IP address');?>:</span>
<input type="text" name="ip4_addr" value="DHCP" pattern="^DHCP$|^DHCP[vV]6$|^(?:[0-9]{1,3}\.){3}[0-9]{1,3}(\/[\d]{1,3})?$" required="required" />
</p>
</div>
</form>
<div class="buttons">
<input type="button" value="<?php echo $this->translate('Rename');?>" class="new button ok-but" />
<input type="button" value="<?php echo $this->translate('Cancel');?>" class="button red cancel-but" />
</div>
</dialog>

View File

@@ -0,0 +1,10 @@
<div id="config-menu" style="display:none;">
<span class="icon-cog menu-cog"></span>
<ul>
<li class="icon-edit" id="jddm-rename"> <?php echo $this->translate('rename');?></li>
<li class="icon-pencil" id="jddm-edit"> <?php echo $this->translate('edit');?></li>
<li class="icon-docs" id="jddm-clone"> <?php echo $this->translate('clone');?></li>
<li class="icon-gift" id="jddm-export"> <?php echo $this->translate('export');?></li>
<li class="icon-cubes" id="jddm-helpers"> <?php echo $this->translate('helpers');?></li>
</ul>
</div>

View File

@@ -0,0 +1,75 @@
<script type="text/javascript">
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',
});
</script>
<dialog id="jail-settings" class="window-box new">
<h1>
<span class="new">Create jail</span>
<span class="edit">Edit jail</span>
</h1>
<h2>Jail Settings</h2>
<form class="win" method="post" id="jailSettings" onsubmit="return false;">
<div class="window-content">
<p>
<span class="field-name">Jail name:</span>
<input type="text" name="jname" value="" pattern="[^0-9]{1}[a-zA-Z0-9]{2,}" required="required" class="edit-disable" />
</p>
<p>
<span class="field-name">Hostname (FQDN):</span>
<input type="text" name="host_hostname" value="" required="required" />
<!--
<small class="astart-warn"> available on the jail is not running</small>
-->
</p>
<p>
<span class="field-name">IP address:</span>
<input type="text" name="ip4_addr" value="DHCP" pattern="^DHCP$|^DHCP[vV]6$|^(?:[0-9]{1,3}\.){3}[0-9]{1,3}(\/[\d]{1,3})?$" required="required" />
</p>
<p class="new">
<span class="field-name">Root password:</span>
<input type="password" name="user_pw_root" value="" placeholder="3-20 symbols" pattern=".{3,20}" maxlength="20"></input>
</p>
<p class="new">
<span class="field-name">Root password (again):</span>
<input type="password" name="user_pw_root_1" value="" placeholder="3-20 symbols" pattern=".{3,20}" maxlength="20"></input>
</p>
<p>
<span class="field-name">Net Interface:</span>
<input type="radio" name="interface" value="auto" id="rint0" checked="checked" class="inline"><label for="rint0">auto</label></radio>
<input type="radio" name="interface" value="lo0" id="rint2" class="inline"><label for="rint2">lo0</label></radio>
</p>
<p>
<span class="field-name">Parameters:</span>
<input type="checkbox" name="baserw" id="bwritable-id" /><label for="bwritable-id"> Base writable?</label>
<br />
<input type="checkbox" name="mount_ports" id="mount-id" /><label for="mount-id"> Mount /usr/ports?</label>
<br />
<input type="checkbox" name="astart" id="astart-id" /><label for="astart-id"> Autostart jail at system startup</label>
<br />
<input type="checkbox" name="vnet" id="vnet-id" /><label for="vnet-id"> Virtual network stack (VIMAGE)</label>
</p>
<p class="new">
<span class="field-name">Enabled services:</span>
<input type="checkbox" name="serv-ftpd" value="ftpd" id="esrv0" class="inline"><label for="esrv0">ftpd</label></checkbox>
<input type="checkbox" name="serv-sshd" value="sshd" id="esrv1" class="inline"><label for="esrv1">sshd</label></checkbox>
</p>
</div>
</form>
<div class="buttons">
<input type="button" value="Create" class="new button ok-but" />
<input type="button" value="Save" class="edit button ok-but" />
<input type="button" value="Cancel" class="button red cancel-but" />
</div>
</dialog>
<?php
/*
сложное правило для пароля: цифры, буквы маленькие и заглавные, плюс спецсимволы
^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[^\w\s]).{8,20}$
*/

View File

@@ -0,0 +1,9 @@
<dialog id="tasklog" class="window-box tasklog">
<h1><?php echo $this->translate('Task log');?></h1>
<div class="window-content">
Task log here&hellip;
</div>
<div class="buttons">
<input type="button" value="<?php echo $this->translate('Close');?>" class="button red cancel-but" />
</div>
</dialog>

View File

@@ -0,0 +1,19 @@
<dialog id="vnc">
<div class="panel" style="text-align:right;">
<span onclick="clonos.dialogFullscreen(this);" style="font-size:130%;cursor:pointer;"
<span class="dialog-fullscreen"></span>
</span>
<span onclick="clonos.dialogClose();" style="font-size:150%;font-weight:bold;cursor:pointer;">
<span class="dialog-close"></span>
</span>
</div>
<div class="vnc-wait">
<div class="outer">
<div class="inner">
<span class="icon-spin5 animate-spin"></span><?php echo $this->translate('Please, wait for initialize Virtual Machine');?>
<br /><small style="display: block;font-size: small;margin-top: 20px;"><?php echo $this->translate('You can click here, or wait');?>: <span id="vnc-countdown"><?php echo $this->translate('some time');?></span></small>
</div>
</div>
</div>
<iframe src="about:blank" id="vnc-iframe" border="0" width="1026" height="802"></iframe>
</dialog>

View File

@@ -0,0 +1,9 @@
<dialog id="vnc">
<div class="panel" style="text-align:right;">
<span onclick="clonos.dialogClose();" style="font-size:150%;font-weight:bold;cursor:pointer;">
<span class="dialog-fullscreen"></span>
<span class="dialog-close"></span>
</span>
</div>
<iframe src="about:blank" id="vnc-iframe" border="0" width="800" height="600"></iframe> <!-- 760 436 -->
</dialog>

View File

@@ -0,0 +1,23 @@
<script type="text/javascript">
err_messages.add({
'vm_name':'<?php echo $this->translate("Can not be empty. Name must begin with a letter / a-z / and not have any special symbols: -,.=%");?>',
});
</script>
<dialog id="bhyve-clone" class="window-box new">
<h1>
<span class="new"><?php echo $this->translate('Clone Virtual Machine');?></span>
</h1>
<h2><?php echo $this->translate('Cloned Virtual Machine Settings');?></h2>
<form class="win" method="post" id="bhyveCloneSettings" onsubmit="return false;">
<div class="window-content">
<p>
<span class="field-name"><?php echo $this->translate('Virtual Machine name');?>:</span>
<input type="text" name="vm_name" value="" pattern="[^0-9]{1}[a-zA-Z0-9]{1,}" required="required" class="edit-disable" />
</p>
</div>
</form>
<div class="buttons">
<input type="button" value="<?php echo $this->translate('Clone');?>" class="new button ok-but" />
<input type="button" value="<?php echo $this->translate('Cancel');?>" class="button red cancel-but" />
</div>
</dialog>

View File

@@ -0,0 +1,102 @@
<script type="text/javascript">
err_messages.add({
'vm_name':'<?php echo $this->translate("Can not be empty. Name must begin with a letter / a-z / and not have any special symbols: -,.=%");?>',
'vm_size':'You need type «g» char after numbers',
'vm_ram':'You need type «g» char after numbers',
});
<?php
//print_r($this->config->os_types);exit;
?>
</script>
<dialog id="bhyve-new" class="window-box">
<h1>
<span class="new"><?php echo $this->translate('Create Virtual Machine');?></span>
<span class="edit"><?php echo $this->translate('Edit Virtual Machine');?></span>
</h1>
<h2><?php echo $this->translate('Virtual Machine Settings');?></h2>
<form class="win" method="post" id="bhyveSettings" onsubmit="return false;">
<div class="window-content">
<p class="new">
<span class="field-name"><?php echo $this->translate('VM OS profile');?>:</span>
<select name="vm_os_profile" onchange="clonos.onChangeOsProfile(this,event);">
<?php echo $this->config->os_types_create(); ?>
</select>
</p>
<p>
<span class="field-name"><?php echo $this->translate('Virtual Machine name');?>:</span>
<input type="text" name="vm_name" value="" pattern="[^0-9]{1}[a-zA-Z0-9]{1,}" required="required" class="edit-disable" />
</p>
<p class="new">
<span class="field-name"><?php echo $this->translate('VM template (cpu, ram, hdd)');?>:</span>
<select name="vm_packages" onchange="clonos.onChangePkgTemplate(this,event);">
<?php $vm_res=$this->config->vm_packages_list(); echo $vm_res['html']; ?>
</select>
<script type="text/javascript">clonos.vm_packages_new_min_id=<?php echo $vm_res['min_id']; ?>;</script>
</p>
<p>
<span class="field-name"><?php echo $this->translate('VM CPUs');?>:</span>
<span class="range">
<input type="range" name="vm_cpus" class="vHorizon" min="1" max="16" value="1" style="margin:6px 0;" id="rngCpus" oninput="rngCpusShow.value=rngCpus.value" />
<input type="text" disabled="disabled" id="rngCpusShow" value="1" name="vm_cpus_show" />
<!-- input type="text" name="vm_cpus" value="" pattern="[0-9]+" placeholder="1" required="required" / -->
</span>
</p>
<p>
<span class="field-name"><?php echo $this->translate('VM RAM');?>:</span>
<!-- <input type="text" name="vm_ram" value="" pattern="^[0-9]+\s*(g|gb|mb|m|t|tb)$" placeholder="1g" required="required" /> -->
<span class="range">
<input type="range" name="vm_ram" class="vHorizon" min="1" max="64" value="1" style="margin:6px 0;" id="rngRam" oninput="rngRamShow.value=rngRam.value+'g'" />
<input type="text" disabled="disabled" id="rngRamShow" value="1" name="vm_ram_show" />
</span>
</p>
<p class="new">
<span class="field-name"><?php echo $this->translate('VM Image size');?>:</span>
<!-- <input type="text" name="vm_size" value="" pattern="^[0-9]+(g|gb|t|tb)$" placeholder="10g" required="required" class="edit-disable" /> -->
<span class="range">
<input type="range" name="vm_imgsize" class="vHorizon" min="20" max="866" value="20" style="margin:6px 0;" id="rngImgsize" oninput="rngImgsizeShow.value=rngImgsize.value+'g'" />
<input type="text" disabled="disabled" id="rngImgsizeShow" value="1" name="vm_imgsize_show" />
</span>
</p>
<p>
<span class="field-name"><?php echo $this->translate('Attached boot ISO image');?>:</span>
<select name="vm_iso_image">
<option value="-2"></option>
<option value="-1" selected>Profile default ISO</option>
<?php echo $this->media_iso_list_html(); ?>
</select>
</p>
<p>
<span class="field-name"><?php echo $this->translate('VNC IP address');?>:</span>
<input type="radio" name="bhyve_vnc_tcp_bind" value="127.0.0.1" id="vncip0" checked="checked" class="inline"><label for="vncip0">127.0.0.1</label></radio>
<input type="radio" name="bhyve_vnc_tcp_bind" value="0.0.0.0" id="vncip1" class="inline"><label for="vncip1">0.0.0.0</label></radio>
</p>
<p>
<span class="field-name"><?php echo $this->translate('VNC PORT');?>:</span>
<input type="text" name="vm_vnc_port" value="" placeholder="0" maxlength="5" />
</p>
<p>
<span class="field-name"><?php echo $this->translate('VNC Password');?>:</span>
<input type="password" name="vm_vnc_password" value="" placeholder="3-20 symbols" pattern=".{3,20}" maxlength="20"></input> <small>— <?php echo $this->translate('use to log in VNC console');?></small>
</p>
<!-- <p>
<span class="field-name"><?php echo $this->translate('CD-ROM ISO');?>:</span>
<select name="cd-rom">
<option value="profile">profile</option>
</select>
</p>
--> <p>
<span class="field-name"><?php echo $this->translate('Net Interface');?>:</span>
<!-- <input type="radio" name="interface" value="auto" id="rint0" checked="checked" class="inline"><label for="rint0">auto</label></radio> -->
<select name="interface">
<option value="auto">auto</option>
<?php echo $this->get_interfaces_html(); ?>
</select>
</p>
</div>
</form>
<div class="buttons">
<input type="button" value="<?php echo $this->translate('Create');?>" class="new button ok-but" />
<input type="button" value="<?php echo $this->translate('Save');?>" class="edit button ok-but" />
<input type="button" value="<?php echo $this->translate('Cancel');?>" class="button red cancel-but" />
</div>
</dialog>

View File

@@ -0,0 +1,84 @@
<dialog id="bhyve-obtain" class="window-box">
<h1><?php echo $this->translate('Create Virtual Machine from Library');?></h1>
<h2><?php echo $this->translate('Virtual Machine Settings');?></h2>
<form class="win" method="post" id="bhyveObtSettings" onsubmit="return false;">
<div class="window-content">
<p>
<span class="field-name"><?php echo $this->translate('VM OS profile');?>:</span>
<select name="vm_os_profile" onchange="clonos.onChangeOsProfile(this,event);">
<?php echo $this->config->os_types_create('obtain'); ?>
</select>
</p>
<p>
<span class="field-name"><?php echo $this->translate('Virtual Machine name');?>:</span>
<input type="text" name="vm_name" value="" pattern="[^0-9]{1}[a-zA-Z0-9]{1,}" required="required" />
</p>
<p>
<span class="field-name"><?php echo $this->translate('VM template (cpu, ram, hdd)');?>:</span>
<select name="vm_packages" onchange="clonos.onChangePkgTemplate(this,event);">
<?php $vm_res=$this->config->vm_packages_list(); echo $vm_res['html']; ?>
</select>
<script type="text/javascript">clonos.vm_packages_obtain_min_id=<?php echo $vm_res['min_id']; ?>;</script>
</p>
<p>
<span class="field-name"><?php echo $this->translate('VM CPUs');?>:</span>
<span class="range">
<input type="range" name="vm_cpus" class="vHorizon" min="1" max="16" value="1" style="margin:6px 0;" id="rngCpus1" oninput="rngCpusShow1.value=rngCpus1.value" />
<input type="text" disabled="disabled" id="rngCpusShow1" value="1" name="vm_cpus_show" />
</span>
</p>
<p>
<span class="field-name"><?php echo $this->translate('VM RAM');?>:</span>
<!-- <input type="text" name="vm_ram" value="" pattern="^[0-9]+(g|gb|mb|m)$" placeholder="1g" required="required" /> -->
<span class="range">
<input type="range" name="vm_ram" class="vHorizon" min="1" max="64" value="1" style="margin:6px 0;" id="rngRam1" oninput="rngRamShow1.value=rngRam1.value+'g'" />
<input type="text" disabled="disabled" id="rngRamShow1" value="1" name="vm_ram_show" />
</span>
</p>
<p>
<span class="field-name"><?php echo $this->translate('VM Image size');?>:</span>
<!-- <input type="text" name="vm_size" value="" pattern="^[0-9]+(g|gb|mb|m|t|tb)$" placeholder="10g" required="required" /> -->
<span class="range">
<input type="range" name="vm_size" class="vHorizon" min="20" max="866" value="20" style="margin:6px 0;" id="rngImgsize1" oninput="rngImgsizeShow1.value=rngImgsize1.value+'g'" />
<input type="text" disabled="disabled" id="rngImgsizeShow1" value="1" name="vm_imgsize_show" />
</span>
</p>
<p>
<span class="field-name"><?php echo $this->translate('IP address');?>:</span>
<input type="text" name="ip4_addr" value="DHCP" pattern="^DHCP$|^DHCP[vV]6$|^(?:[0-9]{1,3}\.){3}[0-9]{1,3}(\/[\d]{1,3})?$" required="required" />
</p>
<p>
<span class="field-name"><?php echo $this->translate('Gateway');?>:</span>
<input type="text" name="gateway" value="10.0.0.1" pattern="^(?:[0-9]{1,3}\.){3}[0-9]{1,3}(\/[\d]{1,3})?$" required="required" />
</p>
<p>
<span class="field-name"><?php echo $this->translate('Mask');?>:</span>
<input type="text" name="mask" value="255.255.255.0" pattern="^(?:[0-9]{1,3}\.){3}[0-9]{1,3}(\/[\d]{1,3})?$" required="required" />
</p>
<p>
<span class="field-name"><?php echo $this->translate('VM Password');?>:</span>
<input type="password" name="vm_password" value="cbsd" placeholder="3-20 symbols" pattern=".{3,20}" maxlength="20"></input> <small>— <?php echo $this->translate('default is');?>: «cbsd»</small>
</p>
<p>
<span class="field-name"><?php echo $this->translate('USER Password');?>:</span>
<input type="password" name="user_password" value="" placeholder="3-20 symbols" pattern=".{3,20}" maxlength="20"></input> <small>— <?php echo $this->translate('напиши осознанный текст');?></small>
</p>
<p>
<span class="field-name"><?php echo $this->translate('Authkey');?>:</span>
<select name="vm_authkey">
<?php echo $this->config->authkeys_list(); ?>
</select>
</p>
<p>
<span class="field-name"><?php echo $this->translate('VNC Password');?>:</span>
<input type="password" name="vnc_password" value="cbsd" placeholder="3-20 symbols" pattern=".{3,20}" maxlength="20"></input> <small>— <?php echo $this->translate('use to log in VNC. Default is');?>: cbsd</small>
</p>
</div>
</form>
<div class="buttons">
<input type="button" value="<?php echo $this->translate('Create');?>" class="button ok-but" />
<input type="button" value="<?php echo $this->translate('Cancel');?>" class="button red cancel-but" />
</div>
</dialog>
<?php

View File

@@ -0,0 +1,26 @@
<script type="text/javascript">
err_messages.add({
'jname':'<?php echo $this->translate("Can not be empty. Name must begin with a letter / a-z / and not have any special symbols: -,.=%");?>',
});
</script>
<dialog id="bhyve-rename" class="window-box new">
<h1>
<span class="new"><?php echo $this->translate('Rename virtual machine');?></span>
</h1>
<h2><?php echo $this->translate('Renamed Virtual Machine Settings');?></h2>
<form class="win" method="post" id="bhyveRenameSettings" onsubmit="return false;">
<div class="window-content">
<p class="warning" style="width:400px;">
<?php echo $this->translate('@rename_warning@'); ?>
</p>
<p>
<span class="field-name"><?php echo $this->translate('VM name');?>:</span>
<input type="text" name="jname" value="" pattern="[^0-9]{1}[a-zA-Z0-9]{2,}" required="required" class="edit-disable" />
</p>
</div>
</form>
<div class="buttons">
<input type="button" value="<?php echo $this->translate('Rename');?>" class="new button ok-but" />
<input type="button" value="<?php echo $this->translate('Cancel');?>" class="button red cancel-but" />
</div>
</dialog>

View File

@@ -0,0 +1,36 @@
<script type="text/javascript">
err_messages.add({
'jname':'<?php echo $this->translate("Can not be empty. Name must begin with a letter / a-z / and not have any special symbols: -,.=%");?>',
'host_hostname':'<?php echo $this->translate("This field can not be empty");?>',
'ip':'<?php echo $this->translate("Write correct ip address, e.g: 10.0.0.2");?>',
});
</script>
<dialog id="jail-clone" class="window-box new">
<h1>
<span class="new"><?php echo $this->translate('Clone jail');?></span>
</h1>
<h2><?php echo $this->translate('Cloned Jail Settings');?></h2>
<form class="win" method="post" id="jailCloneSettings" onsubmit="return false;">
<div class="window-content">
<p class="warning" style="width:400px;">
<?php echo $this->translate('@clone_warning@'); ?>
</p>
<p>
<span class="field-name"><?php echo $this->translate('Jail name');?>:</span>
<input type="text" name="jname" value="" pattern="[^0-9]{1}[a-zA-Z0-9]{2,}" required="required" class="edit-disable" />
</p>
<p>
<span class="field-name"><?php echo $this->translate('Hostname');?> (FQDN):</span>
<input type="text" name="host_hostname" value="" required="required" />
</p>
<p>
<span class="field-name"><?php echo $this->translate('IP address');?>:</span>
<input type="text" name="ip4_addr" value="DHCP" pattern="^DHCP$|^DHCP[vV]6$|^(?:[0-9]{1,3}\.){3}[0-9]{1,3}(\/[\d]{1,3})?$" required="required" />
</p>
</div>
</form>
<div class="buttons">
<input type="button" value="<?php echo $this->translate('Clone');?>" class="new button ok-but" />
<input type="button" value="<?php echo $this->translate('Cancel');?>" class="button red cancel-but" />
</div>
</dialog>

View File

@@ -0,0 +1,35 @@
<script type="text/javascript">
err_messages.add({
'jname':'<?php echo $this->translate("Can not be empty. Name must begin with a letter / a-z / and not have any special symbols: -,.=%");?>',
});
</script>
<dialog id="jail-import" class="window-box new">
<h1>
<span class="new"><?php echo $this->translate('Import jail');?></span>
<span class="edit"><?php echo $this->translate('Edit jail');?></span>
</h1>
<h2><?php echo $this->translate('Jail Import');?></h2>
<form class="win" method="post" id="jailImport" onsubmit="return false;">
<div class="window-content">
<p>
<!-- D&D Markup -->
<div id="drag-and-drop-zone" class="uploader">
<div>Drag &amp; Drop Files Here</div>
<div class="or">-or-</div>
<div class="browser">
<label>
<span>Click to open the file Browser</span>
<input type="file" name="jimp_files[]" multiple="multiple" title='Click to add Files'>
</label>
</div>
</div>
<div class="uploader-progress"></div>
<!-- /D&D Markup -->
</p>
</div>
</form>
<div class="buttons">
<input type="button" value="<?php echo $this->translate('Cancel');?>" class="button red cancel-but" />
</div>
</dialog>
<script type="text/javascript">clonos.fileUploadPrepare();</script>

View File

@@ -0,0 +1,36 @@
<script type="text/javascript">
err_messages.add({
'jname':'<?php echo $this->translate("Can not be empty. Name must begin with a letter / a-z / and not have any special symbols: -,.=%");?>',
'hostname':'<?php echo $this->translate("This field can not be empty");?>',
'ip':'<?php echo $this->translate("Write correct ip address, e.g: 10.0.0.2");?>',
});
</script>
<dialog id="jail-rename" class="window-box new">
<h1>
<span class="new"><?php echo $this->translate('Rename jail');?></span>
</h1>
<h2><?php echo $this->translate('Renamed Jail Settings');?></h2>
<form class="win" method="post" id="jailRenameSettings" onsubmit="return false;">
<div class="window-content">
<p class="warning" style="width:400px;">
<?php echo $this->translate('@rename_warning@'); ?>
</p>
<p>
<span class="field-name"><?php echo $this->translate('Jail name');?>:</span>
<input type="text" name="jname" value="" pattern="[^0-9]{1}[a-zA-Z0-9]{2,}" required="required" class="edit-disable" />
</p>
<p>
<span class="field-name"><?php echo $this->translate('Hostname');?> (FQDN):</span>
<input type="text" name="host_hostname" value="" required="required" />
</p>
<p>
<span class="field-name"><?php echo $this->translate('IP address');?>:</span>
<input type="text" name="ip4_addr" value="DHCP" pattern="^DHCP$|^DHCP[vV]6$|^(?:[0-9]{1,3}\.){3}[0-9]{1,3}(\/[\d]{1,3})?$" required="required" />
</p>
</div>
</form>
<div class="buttons">
<input type="button" value="<?php echo $this->translate('Rename');?>" class="new button ok-but" />
<input type="button" value="<?php echo $this->translate('Cancel');?>" class="button red cancel-but" />
</div>
</dialog>

View File

@@ -0,0 +1,10 @@
<div id="config-menu" style="display:none;">
<span class="icon-cog menu-cog"></span>
<ul>
<li class="icon-edit" id="jddm-rename"> <?php echo $this->translate('rename');?></li>
<li class="icon-pencil" id="jddm-edit"> <?php echo $this->translate('edit');?></li>
<li class="icon-docs" id="jddm-clone"> <?php echo $this->translate('clone');?></li>
<li class="icon-gift" id="jddm-export"> <?php echo $this->translate('export');?></li>
<li class="icon-cubes" id="jddm-helpers"> <?php echo $this->translate('helpers');?></li>
</ul>
</div>

View File

@@ -0,0 +1,75 @@
<script type="text/javascript">
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',
});
</script>
<dialog id="jail-settings" class="window-box new">
<h1>
<span class="new">Create jail</span>
<span class="edit">Edit jail</span>
</h1>
<h2>Jail Settings</h2>
<form class="win" method="post" id="jailSettings" onsubmit="return false;">
<div class="window-content">
<p>
<span class="field-name">Имя контейнера:</span>
<input type="text" name="jname" value="" pattern="[^0-9]{1}[a-zA-Z0-9]{2,}" required="required" class="edit-disable" />
</p>
<p>
<span class="field-name">Hostname (FQDN):</span>
<input type="text" name="host_hostname" value="" required="required" />
<!--
<small class="astart-warn"> available on the jail is not running</small>
-->
</p>
<p>
<span class="field-name">IP address:</span>
<input type="text" name="ip4_addr" value="DHCP" pattern="^DHCP$|^DHCP[vV]6$|^(?:[0-9]{1,3}\.){3}[0-9]{1,3}(\/[\d]{1,3})?$" required="required" />
</p>
<p class="new">
<span class="field-name">Root password:</span>
<input type="password" name="user_pw_root" value="" placeholder="3-20 symbols" pattern=".{3,20}" maxlength="20"></input>
</p>
<p class="new">
<span class="field-name">Root password (again):</span>
<input type="password" name="user_pw_root_1" value="" placeholder="3-20 symbols" pattern=".{3,20}" maxlength="20"></input>
</p>
<p>
<span class="field-name">Net Interface:</span>
<input type="radio" name="interface" value="auto" id="rint0" checked="checked" class="inline"><label for="rint0">auto</label></radio>
<input type="radio" name="interface" value="lo0" id="rint2" class="inline"><label for="rint2">lo0</label></radio>
</p>
<p>
<span class="field-name">Parameters:</span>
<input type="checkbox" name="baserw" id="bwritable-id" /><label for="bwritable-id"> Base writable?</label>
<br />
<input type="checkbox" name="mount_ports" id="mount-id" /><label for="mount-id"> Mount /usr/ports?</label>
<br />
<input type="checkbox" name="astart" id="astart-id" /><label for="astart-id"> Autostart jail at system startup</label>
<br />
<input type="checkbox" name="vnet" id="vnet-id" /><label for="vnet-id"> Virtual network stack (VIMAGE)</label>
</p>
<p class="new">
<span class="field-name">Enabled services:</span>
<input type="checkbox" name="serv-ftpd" value="ftpd" id="esrv0" class="inline"><label for="esrv0">ftpd</label></checkbox>
<input type="checkbox" name="serv-sshd" value="sshd" id="esrv1" class="inline"><label for="esrv1">sshd</label></checkbox>
</p>
</div>
</form>
<div class="buttons">
<input type="button" value="Create" class="new button ok-but" />
<input type="button" value="Save" class="edit button ok-but" />
<input type="button" value="Cancel" class="button red cancel-but" />
</div>
</dialog>
<?php
/*
сложное правило для пароля: цифры, буквы маленькие и заглавные, плюс спецсимволы
^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[^\w\s]).{8,20}$
*/

View File

@@ -0,0 +1,9 @@
<dialog id="tasklog" class="window-box tasklog">
<h1><?php echo $this->translate('Task log');?></h1>
<div class="window-content">
Task log here&hellip;
</div>
<div class="buttons">
<input type="button" value="<?php echo $this->translate('Close');?>" class="button red cancel-but" />
</div>
</dialog>

View File

@@ -0,0 +1,19 @@
<dialog id="vnc">
<div class="panel" style="text-align:right;">
<span onclick="clonos.dialogFullscreen(this);" style="font-size:130%;cursor:pointer;"
<span class="dialog-fullscreen"></span>
</span>
<span onclick="clonos.dialogClose();" style="font-size:150%;font-weight:bold;cursor:pointer;">
<span class="dialog-close"></span>
</span>
</div>
<div class="vnc-wait">
<div class="outer">
<div class="inner">
<span class="icon-spin5 animate-spin"></span><?php echo $this->translate('Please, wait for initialize Virtual Machine');?>
<br /><small style="display: block;font-size: small;margin-top: 20px;"><?php echo $this->translate('You can click here, or wait');?>: <span id="vnc-countdown"><?php echo $this->translate('some time');?></span></small>
</div>
</div>
</div>
<iframe src="about:blank" id="vnc-iframe" border="0" width="1026" height="802"></iframe>
</dialog>

View File

@@ -0,0 +1,9 @@
<dialog id="vnc">
<div class="panel" style="text-align:right;">
<span onclick="clonos.dialogClose();" style="font-size:150%;font-weight:bold;cursor:pointer;">
<span class="dialog-fullscreen"></span>
<span class="dialog-close"></span>
</span>
</div>
<iframe src="about:blank" id="vnc-iframe" border="0" width="800" height="600"></iframe> <!-- 760 436 -->
</dialog>

View File

@@ -1,60 +1,60 @@
<script type="text/javascript">
err_messages.add({
'jname':'<?php echo $this->translate("Can not be empty. Name must begin with a letter / a-z / and not have any special symbols: -,.=%");?>',
'hostname':'<?php echo $this->translate("This field can not be empty");?>',
'ip':'<?php echo $this->translate("Write correct ip address, e.g: 10.0.0.2");?>',
'rootpass':'<?php echo $this->translate("Password can not be less than 3 symbols");?>',
'rootpass1':'<?php echo $this->translate("Please retype password correctly");?>',
'jname':'<translate id="19">Can not be empty. Name must begin with a letter / a-z / and not have any special symbols: -,.=%</translate>',
'hostname':'<translate id="20">This field can not be empty</translate>',
'ip':'<translate id="21">Write correct ip address, e.g: 10.0.0.2</translate>',
'rootpass':'<translate id="22">Password can not be less than 3 symbols</translate>',
'rootpass1':'<translate id="23">Please retype password correctly</translate>',
});
</script>
<dialog id="jail-settings" class="window-box new">
<h1>
<span class="new"><?php echo $this->translate('Create jail');?></span>
<span class="edit"><?php echo $this->translate('Edit jail');?></span>
<span class="new"><translate id="24">Create jail</translate></span>
<span class="edit"><translate id="25">Edit jail</translate></span>
</h1>
<h2><?php echo $this->translate('Jail Settings');?></h2>
<h2><translate id="26">Jail Settings</translate></h2>
<form class="win" method="post" id="jailSettings" onsubmit="return false;">
<div class="window-content">
<p>
<span class="field-name"><?php echo $this->translate('Jail name');?>:</span>
<span class="field-name"><translate id="27">Jail name</translate>:</span>
<input type="text" name="jname" value="" pattern="[^0-9]{1}[a-zA-Z0-9]{2,}" required="required" class="edit-disable" />
</p>
<p>
<span class="field-name"><?php echo $this->translate('Hostname');?> (FQDN):</span>
<span class="field-name"><translate id="28">Hostname</translate> (FQDN):</span>
<input type="text" name="host_hostname" value="" required="required" />
<!--
<small class="astart-warn">— <?php echo $this->translate('available on the jail is not running');?></small>
<small class="astart-warn"> <translate id="29">available on the jail is not running</translate></small>
-->
</p>
<p>
<span class="field-name"><?php echo $this->translate('IP address');?>:</span>
<span class="field-name"><translate id="30">IP address</translate>:</span>
<input type="text" name="ip4_addr" value="DHCP" pattern="^DHCP$|^DHCP[vV]6$|^(?:[0-9]{1,3}\.){3}[0-9]{1,3}(\/[\d]{1,3})?$" required="required" />
</p>
<p class="new">
<span class="field-name"><?php echo $this->translate('Root password');?>:</span>
<span class="field-name"><translate id="31">Root password</translate>:</span>
<input type="password" name="user_pw_root" value="" placeholder="3-20 symbols" pattern=".{3,20}" maxlength="20"></input>
</p>
<p class="new">
<span class="field-name"><?php echo $this->translate('Root password (again)');?>:</span>
<span class="field-name"><translate id="32">Root password (again)</translate>:</span>
<input type="password" name="user_pw_root_1" value="" placeholder="3-20 symbols" pattern=".{3,20}" maxlength="20"></input>
</p>
<p>
<span class="field-name"><?php echo $this->translate('Net Interface');?>:</span>
<span class="field-name"><translate id="33">Net Interface</translate>:</span>
<input type="radio" name="interface" value="auto" id="rint0" checked="checked" class="inline"><label for="rint0">auto</label></radio>
<input type="radio" name="interface" value="lo0" id="rint2" class="inline"><label for="rint2">lo0</label></radio>
</p>
<p>
<span class="field-name"><?php echo $this->translate('Parameters');?>:</span>
<input type="checkbox" name="baserw" id="bwritable-id" /><label for="bwritable-id"> <?php echo $this->translate('Base writable');?>?</label>
<span class="field-name"><translate id="34">Parameters</translate>:</span>
<input type="checkbox" name="baserw" id="bwritable-id" /><label for="bwritable-id"> <translate id="35">Base writable</translate>?</label>
<br />
<input type="checkbox" name="mount_ports" id="mount-id" /><label for="mount-id"> <?php echo $this->translate('Mount');?> /usr/ports?</label>
<input type="checkbox" name="mount_ports" id="mount-id" /><label for="mount-id"> <translate id="36">Mount</translate> /usr/ports?</label>
<br />
<input type="checkbox" name="astart" id="astart-id" /><label for="astart-id"> <?php echo $this->translate('Autostart jail at system startup');?></label>
<input type="checkbox" name="astart" id="astart-id" /><label for="astart-id"> <translate id="37">Autostart jail at system startup</translate></label>
<br />
<input type="checkbox" name="vnet" id="vnet-id" /><label for="vnet-id"> <?php echo $this->translate('Virtual network stack (VIMAGE)');?></label>
<input type="checkbox" name="vnet" id="vnet-id" /><label for="vnet-id"> <translate id="38">Virtual network stack (VIMAGE)</translate></label>
</p>
<p class="new">
<span class="field-name"><?php echo $this->translate('Enabled services');?>:</span>
<span class="field-name"><translate id="39">Enabled services</translate>:</span>
<input type="checkbox" name="serv-ftpd" value="ftpd" id="esrv0" class="inline"><label for="esrv0">ftpd</label></checkbox>
<input type="checkbox" name="serv-sshd" value="sshd" id="esrv1" class="inline"><label for="esrv1">sshd</label></checkbox>
</p>
@@ -62,9 +62,9 @@ err_messages.add({
</div>
</form>
<div class="buttons">
<input type="button" value="<?php echo $this->translate('Create');?>" class="new button ok-but" />
<input type="button" value="<?php echo $this->translate('Save');?>" class="edit button ok-but" />
<input type="button" value="<?php echo $this->translate('Cancel');?>" class="button red cancel-but" />
<input type="button" value="<translate id="40">Create</translate>" class="new button ok-but" />
<input type="button" value="<translate id="41">Save</translate>" class="edit button ok-but" />
<input type="button" value="<translate id="42">Cancel</translate>" class="button red cancel-but" />
</div>
</dialog>
<?php

View File

@@ -12,7 +12,7 @@ require_once($_real_path.'/php/menu.php');
$chunks=Utils::gen_uri_chunks($uri);
$clonos=new ClonOS($_real_path, $chunks);
$locale = new Localization($_real_path.'/public/'); # /usr/home/web/cp/clonos/public/
$menu=new Menu($locale, $chunks);
$menu=new Menu($locale, $chunks, $_real_path.'/public/pages/');
if(isset($_GET['upload'])){
include('upload.php');
@@ -48,6 +48,40 @@ if(!$user_info['error']){
}else{
$user_info['username']='guest';
}
/*
<!--place(...)-->
menu->title
---
if(isset($user_info_txt)) echo $user_info_txt
---
<!--place(body)-->
if(file_exists($file_name)){
include($file_name);
} else {
echo '<h1>'.$locale->translate('Not implemented yet').'!</h1>';
}
<!--place(dialogs)-->
$clonos->placeDialogs();
---
<!--place(config::language)-- >
foreach(Config::$languages as $lng=>$lngname){
$sel = ($lang==$lng) ? ' selected="selected"' : '';
echo ' <option value="'.$lng.'"'.$sel.'>'.$lngname.'</option>'.PHP_EOL;
}
---
<!--place(username)-->
<?php echo $user_info['username']; ?>
---
<!--place(login-area-hide)-->
<?php if(!$user_info['error']) echo ' hide'; ?>
--
<!--place(dialog:system-login)-->
<?php echo $clonos->placeDialogByName('system-login'); ?>
*/
#include($_real_path.'/public/pages/index.php'); exit;
?>
<!DOCTYPE html>
<head>
@@ -89,7 +123,7 @@ if(!$user_info['error']){
</script>
<body class="gadget1 login <?php echo $uri;?>">
<main>
<main<?php if($user_info['error']) echo ' class="blur"';?>>
<div class="main"><div id="content">
<div id="ctop">
<?php

View File

@@ -52,6 +52,13 @@ var clonos={
*/
//this.route(res);
}
$('ul.menu a').removeClass('sel');
var p=window.location.pathname.split('/');
$('ul.menu a[href="/'+p[1]+'/"]').addClass('sel');
if(isset(page_titles))
{
$('div.header #title').html(page_titles[p[1]]);
}
},
route:function(args)
{
@@ -2268,6 +2275,7 @@ var clonos={
loginGo:function()
{
$('.login-wait').show();
$('main').addClass('blur');
this.loadData('login',$.proxy(this.onLogin,this),
[{'name':'login','value':$('#loginData input[name="login"]').val()},
{'name':'password','value':$('#loginData input[name="password"]').val()}]
@@ -2289,6 +2297,7 @@ var clonos={
{
$('.login-area').fadeOut(200);
$('#user-login').html(data.username);
$('main').removeClass('blur');
this.dataReload();
}
}
@@ -2329,6 +2338,7 @@ var clonos={
$('#user-login').html('guest');
this.loginFadeIn();
$('main').addClass('blur');
this.dataReload();
},
clearPageInfo:function()

View File

@@ -0,0 +1,19 @@
<ul class="menu">
<li><a href="/overview/" title="Summary Overview"><span class="icon-chart-bar"></span><span class="mtxt">Overview</span></a></li>
<li><a href="/jailscontainers/" title="Jail containers control panel"><span class="icon-server"></span><span class="mtxt">Jail containers</span></a></li>
<li><a href="/instance_jail/" title="Helpers and wizard for containers"><span class="icon-cubes"></span><span class="mtxt">Template for jail</span></a></li>
<li><a href="/bhyvevms/" title="Virtual machine control panel"><span class="icon-th-list"></span><span class="mtxt">Bhyve VMs</span></a></li>
<li><a href="/vm_packages/" title="Manage VM Packages group"><span class="icon-cubes"></span><span class="mtxt">VM Packages</span></a></li>
<li><a href="/k8s/" title="Manage K8S clusters"><span class="icon-cubes"></span><span class="mtxt">K8S clusters</span></a></li>
<li><a href="/vpnet/" title="Manage for virtual private networks"><span class="icon-plug"></span><span class="mtxt">Virtual Private Network</span></a></li>
<li><a href="/authkey/" title="Manage for SSH auth key"><span class="icon-key"></span><span class="mtxt">Authkeys</span></a></li>
<li><a href="/media/" title="Virtual Media Manager"><span class="icon-inbox"></span><span class="mtxt">Storage Media</span></a></li>
<li><a href="/imported/" title="Imported images"><span class="icon-upload"></span><span class="mtxt">Imported images</span></a></li>
<li><a href="/bases/" title="FreeBSD bases manager"><span class="icon-database"></span><span class="mtxt">FreeBSD Bases</span></a></li>
<li><a href="/sources/" title="FreeBSD sources manager"><span class="icon-edit"></span><span class="mtxt">FreeBSD Sources</span></a></li>
<li><a href="/tasklog/" title="System task log"><span class="icon-list-alt"></span><span class="mtxt">TaskLog</span></a></li>
<li><a href="/sqlite/" title="SQLite admin interface"><span class="icon-wpforms"></span><span class="mtxt">SQLite admin</span></a></li>
</ul>
<script type="text/javascript">
var page_titles={"overview":"Summary Overview","jailscontainers":"Jail containers control panel","instance_jail":"Helpers and wizard for containers","bhyvevms":"Virtual machine control panel","vm_packages":"Manage VM Packages group","k8s":"Manage K8S clusters","vpnet":"Manage for virtual private networks","authkey":"Manage for SSH auth key","media":"Virtual Media Manager","imported":"Imported images","bases":"FreeBSD bases manager","sources":"FreeBSD sources manager","tasklog":"System task log","sqlite":"SQLite admin interface","settings":"CBSD Settings","users":"CBSD Users"}
</script>

View File

@@ -0,0 +1,19 @@
<ul class="menu">
<li><a href="/overview/" title="Resumen General" class="sel"><span class="icon-chart-bar"></span><span class="mtxt">Resumen</span></a></li>
<li><a href="/jailscontainers/" title="Panel de control de Jaulas"><span class="icon-server"></span><span class="mtxt">Jaulas contenedores</span></a></li>
<li><a href="/instance_jail/" title="Asistentes para contenedores"><span class="icon-cubes"></span><span class="mtxt">Plantilla de jaula</span></a></li>
<li><a href="/bhyvevms/" title="Panel de control de Máquinas Virtuales"><span class="icon-th-list"></span><span class="mtxt">Bhyve VMs</span></a></li>
<li><a href="/vm_packages/" title="Manage VM Packages group"><span class="icon-cubes"></span><span class="mtxt">Paquetes VM</span></a></li>
<li><a href="/k8s/" title="Manage K8S clusters"><span class="icon-cubes"></span><span class="mtxt">K8S clusters</span></a></li>
<li><a href="/vpnet/" title="Manage for virtual private networks"><span class="icon-plug"></span><span class="mtxt">Red Privada Virtual</span></a></li>
<li><a href="/authkey/" title="Manage for SSH auth key"><span class="icon-key"></span><span class="mtxt">Claves de autenticación</span></a></li>
<li><a href="/media/" title="Gestor de Medios Virtuales"><span class="icon-inbox"></span><span class="mtxt">Medios de Almacenamiento</span></a></li>
<li><a href="/imported/" title="Imported images"><span class="icon-upload"></span><span class="mtxt">Imported images</span></a></li>
<li><a href="/bases/" title="Gestor de bases FreeBSD"><span class="icon-database"></span><span class="mtxt">Bases FreeBSD</span></a></li>
<li><a href="/sources/" title="Gestor de fuentes FreeBSD"><span class="icon-edit"></span><span class="mtxt">Fuentes FreeBSD</span></a></li>
<li><a href="/tasklog/" title="Registro de Tareas del Sistema"><span class="icon-list-alt"></span><span class="mtxt">Registro de Tareas</span></a></li>
<li><a href="/sqlite/" title="SQLite admin interface"><span class="icon-wpforms"></span><span class="mtxt">SQLite admin</span></a></li>
</ul>
<script type="text/javascript">
var page_titles={"overview":"Resumen General","jailscontainers":"Panel de control de Jaulas","instance_jail":"Asistentes para contenedores","bhyvevms":"Panel de control de M\u00e1quinas Virtuales","vm_packages":"Manage VM Packages group","k8s":"Manage K8S clusters","vpnet":"Manage for virtual private networks","authkey":"Manage for SSH auth key","media":"Gestor de Medios Virtuales","imported":"Imported images","bases":"Gestor de bases FreeBSD","sources":"Gestor de fuentes FreeBSD","tasklog":"Registro de Tareas del Sistema","sqlite":"SQLite admin interface","settings":"CBSD Settings","users":"CBSD Users"}
</script>

View File

@@ -0,0 +1,19 @@
<ul class="menu">
<li><a href="/overview/" title="Общая информация" class="sel"><span class="icon-chart-bar"></span><span class="mtxt">Общая информация</span></a></li>
<li><a href="/jailscontainers/" title="Панель управления контейнерами"><span class="icon-server"></span><span class="mtxt">Контейнеры</span></a></li>
<li><a href="/instance_jail/" title="Хелперы и шаблоны для контейнеров"><span class="icon-cubes"></span><span class="mtxt">Шаблоны окружений</span></a></li>
<li><a href="/bhyvevms/" title="Панель управления нодами"><span class="icon-th-list"></span><span class="mtxt">Виртуальные машины</span></a></li>
<li><a href="/vm_packages/" title="Manage VM Packages group"><span class="icon-cubes"></span><span class="mtxt">Шаблоны виртуальных машин</span></a></li>
<li><a href="/k8s/" title="Управление K8S кластерами"><span class="icon-cubes"></span><span class="mtxt">Кластеры K8S</span></a></li>
<li><a href="/vpnet/" title="Панель управления подсетями"><span class="icon-plug"></span><span class="mtxt">Виртуальные сети</span></a></li>
<li><a href="/authkey/" title="Панель управления авторизационными ключами"><span class="icon-key"></span><span class="mtxt">Ключи авторизации</span></a></li>
<li><a href="/media/" title="Менеджер виртуальных носителей"><span class="icon-inbox"></span><span class="mtxt">Виртуальные носители</span></a></li>
<li><a href="/imported/" title="Импортированные образы"><span class="icon-upload"></span><span class="mtxt">Импортированные образы</span></a></li>
<li><a href="/bases/" title="Управление базами FreeBSD"><span class="icon-database"></span><span class="mtxt">Базы FreeBSD</span></a></li>
<li><a href="/sources/" title="Управление исходными кодами FreeBSD"><span class="icon-edit"></span><span class="mtxt">FreeBSD исходники</span></a></li>
<li><a href="/tasklog/" title="Просмотр журнала системных задач"><span class="icon-list-alt"></span><span class="mtxt">Логи задач</span></a></li>
<li><a href="/sqlite/" title="SQLite admin interface"><span class="icon-wpforms"></span><span class="mtxt">SQLite admin</span></a></li>
</ul>
<script type="text/javascript">
var page_titles={"overview":"\u041e\u0431\u0449\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f","jailscontainers":"\u041f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c\u0438","instance_jail":"\u0425\u0435\u043b\u043f\u0435\u0440\u044b \u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432","bhyvevms":"\u041f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0434\u0430\u043c\u0438","vm_packages":"Manage VM Packages group","k8s":"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 K8S \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430\u043c\u0438","vpnet":"\u041f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u0441\u0435\u0442\u044f\u043c\u0438","authkey":"\u041f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u043c\u0438 \u043a\u043b\u044e\u0447\u0430\u043c\u0438","media":"\u041c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043d\u043e\u0441\u0438\u0442\u0435\u043b\u0435\u0439","imported":"\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043e\u0431\u0440\u0430\u0437\u044b","bases":"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0431\u0430\u0437\u0430\u043c\u0438 FreeBSD","sources":"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c\u0438 \u043a\u043e\u0434\u0430\u043c\u0438 FreeBSD","tasklog":"\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0436\u0443\u0440\u043d\u0430\u043b\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447","sqlite":"SQLite admin interface","settings":"CBSD Settings","users":"CBSD Users"}
</script>

138
public/pages/index.php Normal file
View File

@@ -0,0 +1,138 @@
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>ClonOS <?php echo $menu->title; ?></title>
<link href="/images/favicon.ico?" rel="shortcut icon" type="image/x-icon" />
<script src="/js/jquery.js" type="text/javascript"></script>
<script src="/js/clonos.js" type="text/javascript"></script>
<script src="/js/dmuploader.js" type="text/javascript"></script>
<script src="/js/smoothie.js" type="text/javascript"></script>
<script src="/js/noty/packaged/jquery.noty.packaged.min.js" type="text/javascript"></script>
<link type="text/css" href="/css/reset.css" rel="stylesheet" />
<link type="text/css" href="/css/styles.css" rel="stylesheet" />
<link type="text/css" href="/font/clonos.css" rel="stylesheet" />
<link type="text/css" href="/font/animation.css" rel="stylesheet" />
<script src="/lang/<?php echo $lang; ?>.js" type="text/javascript"></script>
<style type="text/css">html{background-color:#aaa;} .hide{display:none;}</style>
<meta name="keywords" content="" />
<meta name="description" content="" />
<script type="text/javascript">
_first_start=true;
err_messages={add:function(arr){for(n in arr){err_messages[n]=arr[n];}}};
<?php if(isset($user_info_txt)) echo $user_info_txt; ?>
</script>
</head>
<script type="text/javascript">
try{
var theme=localStorage.getItem('Theme') || 'light';
var cs=['light','dark'];
for(c=0,cl=cs.length;c<cl;c++)
{
var css=cs[c];
var disabled=(theme==css)?'':' disabled="disabled"';
var hcss=$('<link rel="stylesheet" href="/css/themes/'+css+'.css" id="'+css+'" class="alternate"'+disabled+'>');
$('head').append(hcss);
$('#'+css).get(0).disabled=(theme!=css);
}
}catch(e){}
</script>
<body class="gadget1 login <?php echo $uri;?>">
<main>
<div class="main"><div id="content">
<div id="ctop">
<?php
if(file_exists($file_name)){
include($file_name);
} else {
echo '<h1><translate>Not implemented yet</translate>!</h1>';
}
$clonos->placeDialogs();
?>
</div>
<div id="cdown"><span class="split-close"></span>
<div id="cinfo">
<div class="left">
<dl id="summaryInfo">
<dt>Имя клетки:</dt>
<dd>Jail1</dd>
</dl>
</div>
<div class="right">
<h2><translate>CPU usage</translate>, %:</h2>
<div class="graph v-black g--summary-cpu l-cpu"></div>
<br />
<h2><translate>Memory usage</translate>, %:</h2>
<div class="graph v-black g--summary-mem l-mem"></div>
<br />
<h2><translate>I/O storage</translate>, iops:</h2>
<div class="graph v-black g--summary-iops l-read,write pr-no te-iops"></div>
<br />
<h2><translate>I/O storage</translate>, bit per seconds:</h2>
<div class="graph v-black g--summary-bps l-read,write pr-no te-bps"></div>
</div>
</div>
</div>
</div></div>
</main>
<div class="menu">
<div id="menu">
<div class="closer"></div>
<?php
echo $menu->html;
?>
<div id="console"></div>
</div>
</div>
<header>
<div class="top-right">
<span class="txt">
<a href="https://www.patreon.com/clonos" target="_blank"><translate>DONATE</translate></a>
<span class="space"></span>
<translate>VERSION</translate>: <?php file_get_contents($clonos->realpath.'version'); ?>
<span class="space"></span>
<translate>THEMES</translate>:
</span>
<span class="ch_theme">
<span class="light"></span><span class="dark"></span>
</span>
</div>
<div class="header">
<span id="title"><?php echo $menu->title; ?></span>
<ul>
<li class="mhome"><a href="/">Home</a></li>
<?php // if($clonos->environment=='development') { ?>
<li><a href="/settings/"><translate>Settings</translate></a></li>
<?php // } ?>
<li><a href="/users/"><translate>Users</translate></a></li>
<li><a target="_blank" href="/shell/">&gt;&gt;<translate>Console</translate></a></li>
<!--
<li><a href="/profile/"><translate>Profile</translate></a></li>
<li><a href="/support/"><translate>Support</translate></a></li>
-->
<li><a name="">
<select id="lng-sel">
<?php
foreach(Config::$languages as $lng=>$lngname){
$sel = ($lang==$lng) ? ' selected="selected"' : '';
echo ' <option value="'.$lng.'"'.$sel.'>'.$lngname.'</option>'.PHP_EOL;
}
?>
</select>
</a></li>
<li><a onclick="clonos.logout();" class="link" id="user-login"><?php echo $user_info['username']; ?></a></li>
</ul>
</div>
</header>
<div class="login-area<?php if(!$user_info['error']) echo ' hide'; ?>"><?php echo $clonos->placeDialogByName('system-login'); ?>
<div class="ccopy">ClonOS — is a powerfull system for&hellip;</div>
<div class="ccopy">Cloud computing, Lightweight containerization, Virtualization, etc&hellip;</div>
</div>
<div class="spinner"></div>
<div class="online icon-online" id="net-stat" onclick="ws_debug();"></div>
</body>
</html>

View File

@@ -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.

View File

@@ -14,22 +14,22 @@ $clonos->useDialogs([
]);
?>
<h1>{translate:[Jail containers:]}</h1>
<h1><translate>Jail containers:</translate></h1>
<p><span class="top-button icon-plus id:jail-settings">{translate:[Create jail]}</span>
<span class="top-button icon-upload id:jail-import">{translate:[Import]}</span></p>
<p><span class="top-button icon-plus id:jail-settings"><translate>Create jail</translate></span>
<span class="top-button icon-upload id:jail-import"><translate>Import</translate></span></p>
<table class="tsimple" id="jailslist" width="100%">
<thead>
<tr>
<th class="elastic">{translate:[Node name]}</th>
<th class="txtleft">{translate:[Jail]}</th>
<th class="wdt-120">{translate:[Usage]}</th>
<th class="txtleft">{translate:[IP address]}</th>
<th class="txtcenter wdt-120">{translate:[Status]}</th>
<th colspan="4" class="txtcenter wdt-100">{translate:[Action]}</th>
<th class="wdt-30">{translate:[VNC]}</th>
<th class="txtcenter wdt-50" title="VNC port">{translate:[Port]}</th>
<th class="elastic"><translate>Node name</translate></th>
<th class="txtleft"><translate>Jail</translate></th>
<th class="wdt-120"><translate>Usage</translate></th>
<th class="txtleft"><translate>IP address</translate></th>
<th class="txtcenter wdt-120"><translate>Status</translate></th>
<th colspan="4" class="txtcenter wdt-100"><translate>Action</translate></th>
<th class="wdt-30"><translate>VNC</translate></th>
<th class="txtcenter wdt-50" title="VNC port"><translate>Port</translate></th>
</tr>
</thead>
<tbody></tbody>

View File

@@ -1,4 +0,0 @@
This files is cache of translated pages, do not translate it!
translate template:
{translate:[Last One]}

View File

@@ -0,0 +1,144 @@
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>ClonOS — <!--place(menu->title)--></title>
<link href="/images/favicon.ico?" rel="shortcut icon" type="image/x-icon" />
<script src="/js/jquery.js" type="text/javascript"></script>
<script src="/js/clonos.js" type="text/javascript"></script>
<script src="/js/dmuploader.js" type="text/javascript"></script>
<script src="/js/smoothie.js" type="text/javascript"></script>
<script src="/js/noty/packaged/jquery.noty.packaged.min.js" type="text/javascript"></script>
<link type="text/css" href="/css/reset.css" rel="stylesheet" />
<link type="text/css" href="/css/styles.css" rel="stylesheet" />
<link type="text/css" href="/font/clonos.css" rel="stylesheet" />
<link type="text/css" href="/font/animation.css" rel="stylesheet" />
<script src="/lang/<?php echo $lang; ?>.js" type="text/javascript"></script>
<style type="text/css">html{background-color:#aaa;} .hide{display:none;}</style>
<meta name="keywords" content="" />
<meta name="description" content="" />
<script type="text/javascript">
_first_start=true;
err_messages={add:function(arr){for(n in arr){err_messages[n]=arr[n];}}};
<!--place(user_info_txt)--?>
</script>
</head>
<script type="text/javascript">
try{
var theme=localStorage.getItem('Theme') || 'light';
var cs=['light','dark'];
for(c=0,cl=cs.length;c<cl;c++)
{
var css=cs[c];
var disabled=(theme==css)?'':' disabled="disabled"';
var hcss=$('<link rel="stylesheet" href="/css/themes/'+css+'.css" id="'+css+'" class="alternate"'+disabled+'>');
$('head').append(hcss);
$('#'+css).get(0).disabled=(theme!=css);
}
}catch(e){}
</script>
<body class="gadget1 login <?php echo $uri;?>">
<main>
<div class="main"><div id="content">
<div id="ctop">
<!--place(body)-- >
<!--
<-?php
if(file_exists($file_name)){
include($file_name);
} else {
echo '<h1>'.$locale->translate('Not implemented yet').'!</h1>';
}
<!--place(dialogs)-- >
$clonos->placeDialogs();
?->
-->
</div>
<div id="cdown"><span class="split-close"></span>
<div id="cinfo">
<div class="left">
<dl id="summaryInfo">
<dt>Имя клетки:</dt>
<dd>Jail1</dd>
</dl>
</div>
<div class="right">
<h2><translate>CPU usage</translate>, %:</h2>
<div class="graph v-black g--summary-cpu l-cpu"></div>
<br />
<h2><translate>Memory usage</translate>, %:</h2>
<div class="graph v-black g--summary-mem l-mem"></div>
<br />
<h2><translate>I/O storage</translate>, iops:</h2>
<div class="graph v-black g--summary-iops l-read,write pr-no te-iops"></div>
<br />
<h2><translate>I/O storage</translate>, bit per seconds:</h2>
<div class="graph v-black g--summary-bps l-read,write pr-no te-bps"></div>
</div>
</div>
</div>
</div></div>
</main>
<div class="menu">
<div id="menu">
<div class="closer"></div>
<?php
echo $menu->html;
?>
<div id="console"></div>
</div>
</div>
<header>
<div class="top-right">
<span class="txt">
<a href="https://www.patreon.com/clonos" target="_blank"><translate>DONATE</translate></a>
<span class="space"></span>
<translate>VERSION</translate>: ',file_get_contents($clonos->realpath.'version'); ?>
<span class="space"></span>
<translate>THEMES</translate>:
</span>
<span class="ch_theme">
<span class="light"></span><span class="dark"></span>
</span>
</div>
<div class="header">
<span id="title"><?php echo $menu->title; ?></span>
<ul>
<li class="mhome"><a href="/">Home</a></li>
<?php // if($clonos->environment=='development') { ?>
<li><a href="/settings/"><translate>Settings</translate></a></li>
<?php // } ?>
<li><a href="/users/"><translate>Users</translate></a></li>
<li><a target="_blank" href="/shell/">&gt;&gt;<translate>Console</translate></a></li>
<!--
<li><a href="/profile/"><translate>Profile</translate></a></li>
<li><a href="/support/"><translate>Support</translate></a></li>
-->
<li><a name="">
<select id="lng-sel">
<!--place(config::language)-->
<?php
foreach(Config::$languages as $lng=>$lngname){
$sel = ($lang==$lng) ? ' selected="selected"' : '';
echo ' <option value="'.$lng.'"'.$sel.'>'.$lngname.'</option>'.PHP_EOL;
}
?>
</select>
</a></li>
<li><a onclick="clonos.logout();" class="link" id="user-login"><!--place(username)--></a></li>
</ul>
</div>
</header>
<div class="login-area<!--place(login-area-hide)-->"><!--place(dialog:system-login)-->
<div class="ccopy">ClonOS — is a powerfull system for&hellip;</div>
<div class="ccopy">Cloud computing, Lightweight containerization, Virtualization, etc&hellip;</div>
</div>
<div class="spinner"></div>
<div class="online icon-online" id="net-stat" onclick="ws_debug();"></div>
</body>
</html>

View File

@@ -0,0 +1,46 @@
<div class="row2col">
<div class="column">
<h1><translate>Summary statistics for cloud:</translate></h1>
<table class="tfill" style="width:98%;">
<thead>
<tr>
<td width="200"><translate>Param</translate></td><td width="200"><translate>Values<translate></td>
</tr>
</thead>
<tbody>
<tr><td><translate>Num of nodes:</translate></td><td id="num-nodes"></td></tr>
<tr><td><translate>Online nodes:</translate></td><td id="online-nodes"></td></tr>
<tr><td><translate>Offline nodes:</translate></td><td id="offline-nodes"></td></tr>
<tr><td><translate>Num of jails:</translate></td><td id="num-jails"></td></tr>
<tr><td><translate>Num of cores:</translate></td><td id="num-cores"></td></tr>
<tr><td><translate>Average freq. Mhz:</translate></td><td id="average"></td></tr>
<tr><td><translate>Summary RAM:</translate></td><td id="sum-ram"></td></tr>
<tr><td><translate>Summary storage size:</translate></td><td id="sum-storage"></td></tr>
</tbody>
<tbody class="error" style="display:none;">
<tr><td colspan="2" class="error_message"><translate>Unable to fetch net info!</translate></td></tr>
</tbody>
</table>
</div>
<div class="column">
<h1><translate>Current node CPU usage:</translate></h1>
<div class="graph g-local-pcpu v-black l-cpu" style="height:100px;width:100%"></div>
<h1><translate>Current node RAM usage:</translate></h1>
<div class="graph g-local-pmem v-black l-mem" style="height:100px;width:100%"></div>
</div>
</div>
<p><translate>It is an open source and free product which powered by other project (major importance list):</translate></p>
<ul>
<li><a href="https://github.com/cbsd/cbsd" target="_blank">CBSD Project</a> <translate>FreeBSD OS virtual environment management framework</translate></li>
<li><a href="https://www.freebsd.org/" target="_blank">FreeBSD Project</a> <translate>FreeBSD is a free and open source Unix-like operating system descended from Research Unix created in <a href="https://en.wikipedia.org/wiki/Berkeley_Software_Distribution">University of California, Berkeley, U.S.</translate></li>
<li><a href="https://puppet.com/" target="_blank">Puppet</a> <translate>Puppet is an open-source configuration management tool.</translate></li>
<li><translate>and many other..</translate></li>
</ul>
<!--
CHAT:
<input type="text" id="wsinp" />
<input type="button" onclick="clonos.wssend($('#wsinp').val());$('#wsinp').val('');" value="Send" />
-->

View File

@@ -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.

View File

@@ -0,0 +1,46 @@
<div class="row2col">
<div class="column">
<h1>Общая статистика облака:</h1>
<table class="tfill" style="width:98%;">
<thead>
<tr>
<td width="200">Параметр</td><td width="200">Values</td>
</tr>
</thead>
<tbody>
<tr><td>Количество нод:</td><td id="num-nodes"></td></tr>
<tr><td>Online nodes:</td><td id="online-nodes"></td></tr>
<tr><td>Offline nodes:</td><td id="offline-nodes"></td></tr>
<tr><td>Num of jails:</td><td id="num-jails"></td></tr>
<tr><td>Num of cores:</td><td id="num-cores"></td></tr>
<tr><td>Average freq. Mhz:</td><td id="average"></td></tr>
<tr><td>Summary RAM:</td><td id="sum-ram"></td></tr>
<tr><td>Summary storage size:</td><td id="sum-storage"></td></tr>
</tbody>
<tbody class="error" style="display:none;">
<tr><td colspan="2" class="error_message">Unable to fetch net info!</td></tr>
</tbody>
</table>
</div>
<div class="column">
<h1>Current node CPU usage:</h1>
<div class="graph g-local-pcpu v-black l-cpu" style="height:100px;width:100%"></div>
<h1>Current node RAM usage:</h1>
<div class="graph g-local-pmem v-black l-mem" style="height:100px;width:100%"></div>
</div>
</div>
<p>It is an open source and free product which powered by other project (major importance list):</p>
<ul>
<li><a href="https://github.com/cbsd/cbsd" target="_blank">CBSD Project</a> FreeBSD OS virtual environment management framework</li>
<li><a href="https://www.freebsd.org/" target="_blank">FreeBSD Project</a> FreeBSD is a free and open source Unix-like operating system descended from Research Unix created in <a href="https://en.wikipedia.org/wiki/Berkeley_Software_Distribution">University of California, Berkeley, U.S.</li>
<li><a href="https://puppet.com/" target="_blank">Puppet</a> Puppet is an open-source configuration management tool.</li>
<li>and many other..</li>
</ul>
<!--
CHAT:
<input type="text" id="wsinp" />
<input type="button" onclick="clonos.wssend($('#wsinp').val());$('#wsinp').val('');" value="Send" />
-->

View File

@@ -1,42 +1,42 @@
<div class="row2col">
<div class="column">
<h1><translate>Summary statistics for cloud:</translate></h1>
<h1><translate id="1">Summary statistics for cloud:</translate></h1>
<table class="tfill" style="width:98%;">
<thead>
<tr>
<td width="200"><translate>Param</translate></td><td width="200"><translate>Values<translate></td>
<td width="200"><translate id="2">Param</translate></td><td width="200"><translate>Values<translate></td>
</tr>
</thead>
<tbody>
<tr><td><translate>Num of nodes:</translate></td><td id="num-nodes"></td></tr>
<tr><td><translate>Online nodes:</translate></td><td id="online-nodes"></td></tr>
<tr><td><translate>Offline nodes:</translate></td><td id="offline-nodes"></td></tr>
<tr><td><translate>Num of jails:</translate></td><td id="num-jails"></td></tr>
<tr><td><translate>Num of cores:</translate></td><td id="num-cores"></td></tr>
<tr><td><translate>Average freq. Mhz:</translate></td><td id="average"></td></tr>
<tr><td><translate>Summary RAM:</translate></td><td id="sum-ram"></td></tr>
<tr><td><translate>Summary storage size:</translate></td><td id="sum-storage"></td></tr>
<tr><td><translate id="3">Num of nodes:</translate></td><td id="num-nodes"></td></tr>
<tr><td><translate id="4">Online nodes:</translate></td><td id="online-nodes"></td></tr>
<tr><td><translate id="5">Offline nodes:</translate></td><td id="offline-nodes"></td></tr>
<tr><td><translate id="6">Num of jails:</translate></td><td id="num-jails"></td></tr>
<tr><td><translate id="7">Num of cores:</translate></td><td id="num-cores"></td></tr>
<tr><td><translate id="8">Average freq. Mhz:</translate></td><td id="average"></td></tr>
<tr><td><translate id="9">Summary RAM:</translate></td><td id="sum-ram"></td></tr>
<tr><td><translate id="10">Summary storage size:</translate></td><td id="sum-storage"></td></tr>
</tbody>
<tbody class="error" style="display:none;">
<tr><td colspan="2" class="error_message"><translate>Unable to fetch net info!</translate></td></tr>
<tr><td colspan="2" class="error_message"><translate id="11">Unable to fetch net info!</translate></td></tr>
</tbody>
</table>
</div>
<div class="column">
<h1><translate>Current node CPU usage:</translate></h1>
<h1><translate id="12">Current node CPU usage:</translate></h1>
<div class="graph g-local-pcpu v-black l-cpu" style="height:100px;width:100%"></div>
<h1><translate>Current node RAM usage:</translate></h1>
<h1><translate id="13">Current node RAM usage:</translate></h1>
<div class="graph g-local-pmem v-black l-mem" style="height:100px;width:100%"></div>
</div>
</div>
<p><translate>It is an open source and free product which powered by other project (major importance list):</translate></p>
<p><translate id="14">It is an open source and free product which powered by other project (major importance list):</translate></p>
<ul>
<li><a href="https://github.com/cbsd/cbsd" target="_blank">CBSD Project</a> <translate>FreeBSD OS virtual environment management framework</translate></li>
<li><a href="https://www.freebsd.org/" target="_blank">FreeBSD Project</a> <translate>FreeBSD is a free and open source Unix-like operating system descended from Research Unix created in <a href="https://en.wikipedia.org/wiki/Berkeley_Software_Distribution">University of California, Berkeley, U.S.</translate></li>
<li><a href="https://puppet.com/" target="_blank">Puppet</a> <translate>Puppet is an open-source configuration management tool.</translate></li>
<li><translate>and many other..</translate></li>
<li><a href="https://github.com/cbsd/cbsd" target="_blank">CBSD Project</a> <translate id="15">FreeBSD OS virtual environment management framework</translate></li>
<li><a href="https://www.freebsd.org/" target="_blank">FreeBSD Project</a> <translate id="16">FreeBSD is a free and open source Unix-like operating system descended from Research Unix created in <a href="https://en.wikipedia.org/wiki/Berkeley_Software_Distribution">University of California, Berkeley, U.S.</translate></li>
<li><a href="https://puppet.com/" target="_blank">Puppet</a> <translate id="17">Puppet is an open-source configuration management tool.</translate></li>
<li><translate id="18">and many other..</translate></li>
</ul>
<!--

View File

@@ -1 +0,0 @@
This files is cache of translated pages, do not translate it!

View File

@@ -0,0 +1 @@
RU