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