WIP: upgrade button

This commit is contained in:
olevole
2023-04-04 01:02:15 +03:00
parent fb139b95cb
commit 64ba523645
7 changed files with 69 additions and 6 deletions

View File

@@ -158,6 +158,8 @@ class ClonOS {
} }
echo json_encode($new_array); echo json_encode($new_array);
return; return;
}else{
echo json_encode(array('error'=>true,'error_message'=>'PHP Method is not exists: '.$this->mode));
} }
$included_result_array=''; $included_result_array='';
@@ -2160,6 +2162,16 @@ class ClonOS {
return array('error'=>'true','errorMessage'=>'something wrong...'); return array('error'=>'true','errorMessage'=>'something wrong...');
} }
} }
function ccmd_settingsUpdateCheck()
{
return array('error'=>true,'error_message'=>'Ещё не реализовано...');
}
function postCurl($url,$vars=false) function postCurl($url,$vars=false)
{ {

View File

@@ -1009,7 +1009,7 @@ td.error {
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 {
user-select:auto; user-select:auto;

View File

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

View File

@@ -232,6 +232,10 @@ var clonos={
this.getFreeCname(); // Берём с сервера свободное имя kubernetes this.getFreeCname(); // Берём с сервера свободное имя kubernetes
//this.trids=this.getTrIdsForCheck('jailslist'); //this.trids=this.getTrIdsForCheck('jailslist');
} }
if(id='settings-update')
{
this.settingsUpdateCheck();
}
this.dialogShow1(id); this.dialogShow1(id);
} }
}, },
@@ -872,6 +876,14 @@ var clonos={
$('dialog#k8s-new input[name="cname"]').val(data.freejname); $('dialog#k8s-new input[name="cname"]').val(data.freejname);
//$('dialog#jail-settings input[name="host_hostname"]').val(data.freecname+'.my.domain'); //$('dialog#jail-settings input[name="host_hostname"]').val(data.freecname+'.my.domain');
}, },
settingsUpdateCheck:function()
{
this.loadData('settingsUpdateCheck',$.proxy(this.onSettingsUpdateCheck,this));
},
onSettingsUpdateCheck:function(data)
{
},
onUsersAdd:function(data) onUsersAdd:function(data)
{ {

View File

@@ -2,7 +2,7 @@
/* hardcode API ip. Change it later */ /* hardcode API ip. Change it later */
//$api_ip='https://bitclouds.convectix.com:1443'; //$api_ip='https://bitclouds.convectix.com:1443';
$api_ip = 'http://144.76.225.238'; $api_ip = 'http://127.0.0.1:65531';
function getSslPage($url) { function getSslPage($url) {
$ch = curl_init(); $ch = curl_init();

View File

@@ -1,4 +1,21 @@
<h1>ClonOS Settings</h1>
<?php <?php
$clonos->useDialogs(['users-new']);
?>
echo (new Forms('cbsd-settings'))->generate(); <h1>User management</h1>
<p><span class="top-button icon-plus id:users-new">Add users</span></p>
<table class="tsimple" id="userslist" width="100%">
<thead>
<tr>
<th class="txtleft">Login</th>
<th class="txtleft">First Name</th>
<th class="txtleft">Last Name</th>
<th class="txtleft">Registration</th>
<th class="txtleft">Last login</th>
<th class="txtcenter">Active</th>
<th class="txtcenter wd-100">Action</th>
</tr>
</thead>
<tbody></tbody>
</table>

View File

@@ -1,4 +1,17 @@
<h1>Настройки ClonOS</h1>
<?php <?php
$clonos->useDialogs(['settings-update']);
?>
echo (new Forms('cbsd-settings'))->generate(); <h1>Настройки</h1>
<p><span class="top-button icon-plus id:settings-update">Проверить обновления</span></p>
<table class="tsimple" id="update_files" width="100%">
<thead>
<tr>
<th class="txtleft">Компонент</th>
<th class="txtleft">Версия</th>
</tr>
</thead>
<tbody></tbody>
</table>