mirror of
https://github.com/optim-enterprises-bv/control-pane.git
synced 2025-11-02 10:57:52 +00:00
Merge branch 'master' into Fix
This commit is contained in:
@@ -1564,7 +1564,7 @@ class ClonOS {
|
|||||||
$res=$db->selectOne('SELECT * FROM media WHERE idx=?', array([(int)$this->form['media_id'], PDO::PARAM_INT]));
|
$res=$db->selectOne('SELECT * FROM media WHERE idx=?', array([(int)$this->form['media_id'], PDO::PARAM_INT]));
|
||||||
if($res===false || empty($res)) return array('error'=>true,'res'=>print_r($res,true));
|
if($res===false || empty($res)) return array('error'=>true,'res'=>print_r($res,true));
|
||||||
|
|
||||||
//if($res['jname']=='-') // если медиа отвязана, то про<D180>
|
//if($res['jname']=='-') // еÑли медиа оÑвÑзана, Ñо пÑоÑ
|
||||||
|
|
||||||
$res=CBSD::run(
|
$res=CBSD::run(
|
||||||
'media mode=remove name="%s" path="%s" jname="%s" type="%s"', //.$res['name']
|
'media mode=remove name="%s" path="%s" jname="%s" type="%s"', //.$res['name']
|
||||||
@@ -1664,7 +1664,7 @@ class ClonOS {
|
|||||||
$stable_arr=array('release','stable');
|
$stable_arr=array('release','stable');
|
||||||
$stable_num=strlen(intval($ver))<strlen($ver)?0:1;
|
$stable_num=strlen(intval($ver))<strlen($ver)?0:1;
|
||||||
$stable=$stable_arr[$stable_num];
|
$stable=$stable_arr[$stable_num];
|
||||||
$bid=$ver.'-amd64-'.$stable_num; // !!! КОСТЫЛЬ
|
$bid=$ver.'-amd64-'.$stable_num; // !!! ÐÐСТЫÐЬ
|
||||||
|
|
||||||
$res=$this->fillRepoTr($id);
|
$res=$this->fillRepoTr($id);
|
||||||
$html=$res['html'];
|
$html=$res['html'];
|
||||||
@@ -1696,12 +1696,12 @@ class ClonOS {
|
|||||||
if($db->isConnected()){
|
if($db->isConnected()){
|
||||||
if($bsdsrc){
|
if($bsdsrc){
|
||||||
$res=$db->selectOne("SELECT idx,platform,ver FROM bsdsrc WHERE idx=?", array([(int)$id, PDO::PARAM_INT]));
|
$res=$db->selectOne("SELECT idx,platform,ver FROM bsdsrc WHERE idx=?", array([(int)$id, PDO::PARAM_INT]));
|
||||||
$res['name']='—';
|
$res['name']='â';
|
||||||
$res['arch']='—';
|
$res['arch']='â';
|
||||||
$res['targetarch']='—';
|
$res['targetarch']='â';
|
||||||
$res['stable']=strlen(intval($res['ver']))<strlen($res['ver'])?0:1;
|
$res['stable']=strlen(intval($res['ver']))<strlen($res['ver'])?0:1;
|
||||||
$res['elf']='—';
|
$res['elf']='â';
|
||||||
$res['date']='—';
|
$res['date']='â';
|
||||||
}else{
|
}else{
|
||||||
$res=$db->selectOne("SELECT idx,platform,name,arch,targetarch,ver,stable,elf,date FROM bsdbase WHERE ver=?", array([(int)$id, PDO::PARAM_INT]));
|
$res=$db->selectOne("SELECT idx,platform,name,arch,targetarch,ver,stable,elf,date FROM bsdbase WHERE ver=?", array([(int)$id, PDO::PARAM_INT]));
|
||||||
}
|
}
|
||||||
@@ -1753,7 +1753,7 @@ class ClonOS {
|
|||||||
$stable_num=strlen(intval($ver))<strlen($ver)?0:1; //'release':'stable';
|
$stable_num=strlen(intval($ver))<strlen($ver)?0:1; //'release':'stable';
|
||||||
$stable=$stable_arr[$stable_num];
|
$stable=$stable_arr[$stable_num];
|
||||||
|
|
||||||
$bid=$ver.'-amd64-'.$stable_num; // !!! КОСТЫЛЬ
|
$bid=$ver.'-amd64-'.$stable_num; // !!! ÐÐСТЫÐЬ
|
||||||
|
|
||||||
$vars=array(
|
$vars=array(
|
||||||
'nth-num'=>'nth0',
|
'nth-num'=>'nth0',
|
||||||
@@ -1761,12 +1761,12 @@ class ClonOS {
|
|||||||
'node'=>'local',
|
'node'=>'local',
|
||||||
'ver'=>$ver,
|
'ver'=>$ver,
|
||||||
'name'=>'base',
|
'name'=>'base',
|
||||||
'platform'=>'—',
|
'platform'=>'â',
|
||||||
'arch'=>'—',
|
'arch'=>'â',
|
||||||
'targetarch'=>'—',
|
'targetarch'=>'â',
|
||||||
'stable'=>$stable,
|
'stable'=>$stable,
|
||||||
'elf'=>'—',
|
'elf'=>'â',
|
||||||
'date'=>'—',
|
'date'=>'â',
|
||||||
'maintenance'=>' busy',
|
'maintenance'=>' busy',
|
||||||
'protitle'=>$this->translate('Delete'),
|
'protitle'=>$this->translate('Delete'),
|
||||||
);
|
);
|
||||||
@@ -2021,11 +2021,15 @@ class ClonOS {
|
|||||||
return $arr;
|
return $arr;
|
||||||
}
|
}
|
||||||
|
|
||||||
function ccmd_k8sCreate(){
|
function ccmd_k8sCreate()
|
||||||
|
{
|
||||||
$form=$this->form;
|
$form=$this->form;
|
||||||
$res=array();
|
$res=array();
|
||||||
$ass_arr=array(
|
$ass_arr=array(
|
||||||
'master_nodes'=>'init_masters',
|
'
|
||||||
|
|
||||||
|
|
||||||
|
_nodes'=>'init_masters',
|
||||||
'worker_nodes'=>'init_workers',
|
'worker_nodes'=>'init_workers',
|
||||||
'master_ram'=>'master_vm_ram',
|
'master_ram'=>'master_vm_ram',
|
||||||
'master_cpus'=>'master_vm_cpus',
|
'master_cpus'=>'master_vm_cpus',
|
||||||
@@ -2091,7 +2095,6 @@ class ClonOS {
|
|||||||
$txt_vars=json_encode($vars);
|
$txt_vars=json_encode($vars);
|
||||||
//$txt_vars=http_build_query($vars);
|
//$txt_vars=http_build_query($vars);
|
||||||
|
|
||||||
|
|
||||||
$ch = curl_init($url);
|
$ch = curl_init($url);
|
||||||
// curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
|
// curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
|
||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
@@ -2648,7 +2651,7 @@ class ClonOS {
|
|||||||
function ccmd_imageExport(){
|
function ccmd_imageExport(){
|
||||||
// cbsd jexport jname=XXX dstdir=<path_to_imported_dir>
|
// cbsd jexport jname=XXX dstdir=<path_to_imported_dir>
|
||||||
$jname=$this->form['id'];
|
$jname=$this->form['id'];
|
||||||
if(empty($jname)) $this->messageError('Jname is incorrect in export command! Is «'.$jname.'».');
|
if(empty($jname)) $this->messageError('Jname is incorrect in export command! Is «'.$jname.'».');
|
||||||
|
|
||||||
return CBSD::run(
|
return CBSD::run(
|
||||||
'task owner=%s mode=new {cbsd_loc} jexport gensize=1 jname=%s dstdir=%s',
|
'task owner=%s mode=new {cbsd_loc} jexport gensize=1 jname=%s dstdir=%s',
|
||||||
|
|||||||
Reference in New Issue
Block a user