clean code
This commit is contained in:
@@ -39,6 +39,10 @@ abstract class BaseController extends Controller
|
||||
protected $helpers = [];
|
||||
private $cache_tag='NONE';
|
||||
//private $cache_server='10.0.0.32';
|
||||
public $current_env=0;
|
||||
public $primary_image_sever='';
|
||||
public $server_tag='';
|
||||
public $wrenchboard=null;
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
@@ -51,6 +55,10 @@ abstract class BaseController extends Controller
|
||||
|
||||
// E.g.: $this->session = \Config\Services::session();
|
||||
$this->cache_tag = $this->getSiteConfigurations("system.cache_tag");
|
||||
$this->wrenchboard = new \App\Models\BackendModel();
|
||||
$this->current_env = $this->getSiteConfigurations("system.live");
|
||||
$this->primary_image_sever = $this->getSiteConfigurations("system.primary_image_sever");
|
||||
$this->server_tag = $this->getSiteConfigurations("system.server_tag");
|
||||
//$this->cache_server = $this->getSiteConfigurations("system.cache_host");
|
||||
|
||||
// $redis = [
|
||||
@@ -446,4 +454,16 @@ abstract class BaseController extends Controller
|
||||
array("ty"=>"Completed Jobs", "id"=>"COMPLETED_JOBS", "tag"=>"hist_type_completed_jobs"),
|
||||
];
|
||||
}
|
||||
public function summaryReturnData($in,$out){
|
||||
$final_out = ( new \App\Models\ResultFormatter() )->processOutJson($in, $out);
|
||||
$final_out["environment"] = $this->current_env + 0;
|
||||
$final_out["session_image_server"] = $this->primary_image_sever;
|
||||
$final_out["server_tag"] = $this->server_tag;
|
||||
$final_out["language"] = "en";
|
||||
$final_out["ip_loc"] = $this->getIpData();
|
||||
$final_out["current_version"] = 20240306;
|
||||
$final_out["family_types"] = $this->familyTypes();
|
||||
$final_out["history_types"] = $this->historyTypes();
|
||||
return json_encode( $final_out );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user