mirror of
https://github.com/optim-enterprises-bv/control-pane.git
synced 2025-11-03 11:27:59 +00:00
wip
This commit is contained in:
@@ -5,6 +5,7 @@ class ClonOS
|
|||||||
{
|
{
|
||||||
public $server_name='';
|
public $server_name='';
|
||||||
public $workdir='';
|
public $workdir='';
|
||||||
|
public $realpath='';
|
||||||
public $realpath_php='';
|
public $realpath_php='';
|
||||||
public $realpath_public='';
|
public $realpath_public='';
|
||||||
public $realpath_page='';
|
public $realpath_page='';
|
||||||
@@ -89,6 +90,9 @@ class ClonOS
|
|||||||
$this->workdir=getenv('WORKDIR');
|
$this->workdir=getenv('WORKDIR');
|
||||||
# // /usr/jails
|
# // /usr/jails
|
||||||
|
|
||||||
|
$this->realpath=$_REALPATH.'/';
|
||||||
|
# /usr/home/web/cp/clonos/
|
||||||
|
|
||||||
$this->realpath_php=$_REALPATH.'/php/';
|
$this->realpath_php=$_REALPATH.'/php/';
|
||||||
# /usr/home/web/cp/clonos/php/
|
# /usr/home/web/cp/clonos/php/
|
||||||
|
|
||||||
|
|||||||
@@ -965,7 +965,7 @@ td.error {
|
|||||||
.tasklog {
|
.tasklog {
|
||||||
width:60%;
|
width:60%;
|
||||||
max-width:60%;
|
max-width:60%;
|
||||||
margin-left:-30% !important;
|
/*margin-left:-30% !important;*/
|
||||||
left:50%;
|
left:50%;
|
||||||
}
|
}
|
||||||
.tasklog .window-content {
|
.tasklog .window-content {
|
||||||
@@ -1614,3 +1614,14 @@ body.overview div.smoothie-chart-tooltip {
|
|||||||
width:260px;
|
width:260px;
|
||||||
padding-left:10px !important;
|
padding-left:10px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.copys {
|
||||||
|
position:absolute;
|
||||||
|
bottom:0;
|
||||||
|
left:22px;
|
||||||
|
background-color:rgba(255,255,255,0.7);
|
||||||
|
}
|
||||||
|
|
||||||
|
#jailslist td:nth-child(1), #jailslist td:nth-child(2) {
|
||||||
|
cursor:pointer;
|
||||||
|
}
|
||||||
@@ -149,6 +149,7 @@ if(isset($_languages))foreach($_languages as $lng=>$lngname)
|
|||||||
|
|
||||||
<div class="spinner"></div>
|
<div class="spinner"></div>
|
||||||
<div class="online icon-online" id="net-stat" onclick="ws_debug();"></div>
|
<div class="online icon-online" id="net-stat" onclick="ws_debug();"></div>
|
||||||
|
<div class="copys"> ver.: <?php echo file_get_contents($clonos->realpath.'version'); ?> </div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
<?php //print_r($clonos->userGetInfo()); ?>
|
<?php //print_r($clonos->userGetInfo()); ?>
|
||||||
|
|||||||
@@ -1700,8 +1700,11 @@ var clonos={
|
|||||||
var tblid=$(tbl).attr('id');
|
var tblid=$(tbl).attr('id');
|
||||||
|
|
||||||
if(tblid=='jailslist'){
|
if(tblid=='jailslist'){
|
||||||
var e=$(tr).parents('div.main');if(e){$(e).toggleClass('asplit');}
|
if(td==$(tr).children()[0] || td==$(tr).children()[1])
|
||||||
this.openedJailSummary=trid;
|
{
|
||||||
|
var e=$(tr).parents('div.main');if(e){$(e).toggleClass('asplit');}
|
||||||
|
this.openedJailSummary=trid;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var opt='jail';
|
var opt='jail';
|
||||||
@@ -3110,8 +3113,11 @@ if(tblid=='jailslist'){
|
|||||||
if(res!=null)
|
if(res!=null)
|
||||||
{
|
{
|
||||||
var name=res[1];
|
var name=res[1];
|
||||||
var g=new graph(name,width,height,gr,tooltip1,tooltip2);
|
if($.isEmptyObject(graphs.list[name]))
|
||||||
g.create();
|
{
|
||||||
|
var g=new graph(name,width,height,gr,tooltip1,tooltip2);
|
||||||
|
g.create();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -3128,6 +3134,8 @@ if(tblid=='jailslist'){
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* --- GRAPH START --- */
|
/* --- GRAPH START --- */
|
||||||
|
socket=null;
|
||||||
|
|
||||||
graphs={
|
graphs={
|
||||||
list:{},
|
list:{},
|
||||||
|
|
||||||
@@ -3144,12 +3152,12 @@ graphs={
|
|||||||
wsconnect:function()
|
wsconnect:function()
|
||||||
{
|
{
|
||||||
console.log('Поступила команда на подсоединение по ws');
|
console.log('Поступила команда на подсоединение по ws');
|
||||||
if(!this.socket || this.socket.readyState==this.socket.CLOSED)
|
if(!socket || socket.readyState==socket.CLOSED)
|
||||||
{
|
{
|
||||||
console.log('Соединяемся по сокету');
|
console.log('Соединяемся по сокету');
|
||||||
this.client_id=this.name;
|
this.client_id=this.name;
|
||||||
this.socket = new WebSocket("ws://"+_server_name+":8024/graph"+location.pathname+"client-"+Math.random());
|
socket = new WebSocket("ws://"+_server_name+":8024/graph"+location.pathname+"client-"+Math.random());
|
||||||
$(this.socket).on('open',$.proxy(this.wsopen,this))
|
$(socket).on('open',$.proxy(this.wsopen,this))
|
||||||
.on('close',$.proxy(this.wsclose,this))
|
.on('close',$.proxy(this.wsclose,this))
|
||||||
.on('error',$.proxy(this.wserror,this))
|
.on('error',$.proxy(this.wserror,this))
|
||||||
.on('message',$.proxy(this.wsmessage,this));
|
.on('message',$.proxy(this.wsmessage,this));
|
||||||
@@ -3166,11 +3174,11 @@ graphs={
|
|||||||
var msg='Соединение с сервером разорвано аварийно! Перезагрузите страницу!';
|
var msg='Соединение с сервером разорвано аварийно! Перезагрузите страницу!';
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.socket.readyState==this.socket.CLOSED)
|
if(socket.readyState==socket.CLOSED)
|
||||||
{
|
{
|
||||||
this.connected=false;
|
this.connected=false;
|
||||||
console.log('Соединение закрыто по неизвестной причине...');
|
console.log('Соединение закрыто по неизвестной причине...');
|
||||||
this.socket=null;
|
socket=null;
|
||||||
setTimeout($.proxy(this.wsconnect,this),5000);
|
setTimeout($.proxy(this.wsconnect,this),5000);
|
||||||
}
|
}
|
||||||
console.log('Произошло событие «close», нужно проверить что с соединением.');
|
console.log('Произошло событие «close», нужно проверить что с соединением.');
|
||||||
|
|||||||
Reference in New Issue
Block a user