Commit 2a599f8d authored by RemyD's avatar RemyD

3.0

parent 075a763a
......@@ -17,7 +17,7 @@
## Requirements
* ISPConfig 3.0.5 (All IspConfig 3.0 Branch, not valid for 3.1)
* ISPConfig 3.1.2 (or later)
* mysql database (it's also a requirement for ISPConfig, but this mod don't run under others databases)
* Vmware SDK (can be found here https://developercenter.vmware.com/web/sdk/60/vsphere-perl )
......@@ -27,7 +27,7 @@ You can create an account on our git server.
## License
Copyright (c) 2013, CSTI SA
Copyright (c) 2017, CSTI SA
All rights reserved.
You are free to ditribute this module, but all changes without our consent is prohibited.
......@@ -46,8 +46,8 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
RELEASE NOTES :
==============
Version 2.4.2 :
Latest supported version in production.
Version 3.0.0 :
Latest supported version in production, for ISPCONFIG 3.1.2.
Manage your VPS :
- Start
......@@ -89,3 +89,14 @@ Version 2.4.2 :
There is some improvements from previous versions. No upgraded are automated.
Keep this page in your favorites ;-)
IMPORTANT :
===========
This module is in stable state. For installation, you need to process with the table creation manualy.
Actually, ISPConfig do not allow the user to CREATE TABLE. (But this module implement this).
When running for the first time, you will have to create all the TABLES.
Recommanded way :
-----------------
Go the left menu, click on "Install and Update" link.
It will display the necessary SQL to be executed.
......@@ -7,7 +7,7 @@ $form["name"] = "Config";
$form["action"] = "config_edit.php";
$form["db_table"] = "hosted_Setup";
$form["db_table_idx"] = "id";
$form["db_history"] = "no";
$form["db_history"] = "yes";
$form["tab_default"] = "details";
$form["list_default"] = "config.php";
$form["auth"] = 'yes'; // yes / no
......
......@@ -7,7 +7,7 @@ $form["name"] = "hosted";
$form["action"] = "vps_details.php";
$form["db_table"] = "hosted";
$form["db_table_idx"] = "id";
$form["db_history"] = "no";
$form["db_history"] = "yes";
$form["tab_default"] = "hosted";
$form["list_default"] = "vps_list.php";
$form["auth"] = 'yes'; // yes / no
......
......@@ -6,7 +6,7 @@ $form["name"] = "hosted_setup";
$form["action"] = "config_edit.php";
$form["db_table"] = "hosted_setup";
$form["db_table_idx"] = "id";
$form["db_history"] = "no";
$form["db_history"] = "yes";
$form["tab_default"] = "details";
$form["list_default"] = "config.php";
$form["auth"] = 'yes'; // yes / no
......
......@@ -6,7 +6,7 @@ $form["name"] = "snapshots";
$form["action"] = "snapshots_details.php";
$form["db_table"] = "hosted_snapshots";
$form["db_table_idx"] = "id";
$form["db_history"] = "no";
$form["db_history"] = "yes";
$form["tab_default"] = "details";
$form["list_default"] = "snapshots_list.php";
$form["auth"] = 'yes'; // yes / no
......
......@@ -7,7 +7,7 @@ $form["name"] = "hosted";
$form["action"] = "vps_details.php";
$form["db_table"] = "hosted";
$form["db_table_idx"] = "id";
$form["db_history"] = "no";
$form["db_history"] = "yes";
$form["tab_default"] = "hosted";
$form["list_default"] = "vps_list.php";
$form["auth"] = 'yes'; // yes / no
......
......@@ -7,7 +7,7 @@
* Used for insert ONLY
*/
$_SESSION['$_SITE_SOURCE']='http://git.csti.ch/ispconfig-modules/hosted-vps';
$_SESSION['$_SITE_SOURCE']='http://git.csti.ch/ispconfig-modules/hosted-vps/tags';
global $media ;
$media='<img src="/hosted/medias/';
......@@ -49,7 +49,7 @@ class cstiConfig { /* CSTI Config Class, used for tracking version, Init and upd
# Table tracking and setup
private $_TableSetupData="(id, AppVersion, AppRevision, AppSubversion, AppDevVersion, CreateDate, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other,username,password,server,loglevel) VALUES (1, 1, 0, 0, now(), 0, 0, 'ruid', 'r', '', '','username','','',1);";
private $_TableSetupUpdate="INSERT INTO hosted_Setup (id, AppVersion, AppRevision, AppSubversion, AppDevVersion, CreateDate, sys_userid, sys_groupid,
sys_perm_user, sys_perm_group, sys_perm_other) VALUES (4,2,4,2, 0, now(), 0,0, 'ruid', 'r', '');";
sys_perm_user, sys_perm_group, sys_perm_other) VALUES (5,3,0,0, 0, now(), 0,0, 'ruid', 'r', '');";
function __construct(){
$this->_site_url=$_SESSION['$_SITE_SOURCE'];
......@@ -65,37 +65,24 @@ class cstiConfig { /* CSTI Config Class, used for tracking version, Init and upd
$headers = get_headers($this->_site_url);
return $headers;
}
public function getVersion(){
public function getVersion(){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $this->_site_url."/raw/master/README");
curl_setopt($ch, CURLOPT_URL, $this->_site_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, 'Get Latest Version:: IspConfig/Hosted');
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (compatible;Get Latest Version:: IspConfig/EXCHANGE)');
$reponse = curl_exec ($ch);
curl_close($ch);
$find ='RELEASE';
$notice = strstr($reponse, $find, true);
$pos =strlen($notice) +39;
$this->version=(substr($version,$pos,1));
$this->revision=(substr($version,$pos +2,1));
$this->subversion=(substr($version,$pos+4,1));
// textToHtml
$notice = str_replace("\n", "<br>", $notice);
$notice = str_replace("</div>", "</div><br>", $notice);
$notice = str_replace("##", "", $notice);
$notice = str_replace("#", "", $notice);
$notice = str_replace("License", "<h3>License</h3>", $notice);
$notice = str_replace("Requirements", "<h3>Requirements</h3>", $notice);
$notice = str_replace("Application details", "<h3>Application details</h3>", $notice);
$notice = str_replace("Contacts", "<h3>Contacts</h3>", $notice);
$notice = str_replace("Contribute","<h3>Contribute</h3>",$notice);
$notice = str_replace("Code repositery","<h3>Code repositery</h3>",$notice);
$notice = str_replace("ISPCONFIG Module hosted","<h2>ISPCONFIG Module hosted",$notice);
$notice = str_replace("[GIT Server](https://git.csti.ch)", '<a href="https://git.csti.ch" target=_blank>[GIT CSTI Server]</a>',$notice);
$notice = str_replace("[CSTI SA ](https://www.csti.ch)", '<a href="https://www.csti.ch" target=_blank>[CSTI SA]</a>',$notice);
$notice = str_replace("[Facebook Company Page](https://www.facebook.com/CSTI.SA.CH)", '<a href="https://www.facebook.com/CSTI.SA.CH" target=_blank> [Facebook Company Page]</a>', $notice);
$notice = str_replace("[LinkedIn Company Page](https://www.linkedin.com/company/csti-sa)", '<a href="https://www.linkedin.com/company/csti-sa" target=_blank> [LinkedIn Company Page]</a>', $notice);
$notice = str_replace("[Twitter Company Page](https://www.twitter.com/CSTI_SA)", '<a href="https://www.twitter.com/CSTI_SA" target=_blank> [Twitter Company Page]</a>', $notice);
return $notice;
$find ='<i class="fa fa-tag"></i>';
$notice = strstr($reponse, $find, true );
$pos =strlen($notice) +26;
$this->version=(substr($reponse,$pos,1));
$this->revision=(substr($reponse,$pos +2,1));
$this->subversion=(substr($reponse,$pos+4,1));
$this->devversion=(substr($reponse,$pos+6,1));
$notice=substr($reponse,$pos,10);
return "Online :$notice";
}
public function CheckHostedable($update){
......
......@@ -28,7 +28,15 @@ class soapclientd extends soapclient
unset($decode);
$proto ="https";
$wsdl =$proto.'://'.$this->server .'/sdk/vimService.wsdl';
$options= array ('location' => $proto.'://'.$this->server .'/sdk', 'trace' => 1);
$streamContext = stream_context_create(array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
)
));
$options= array ('location' => $proto.'://'.$this->server .'/sdk', 'trace' => 1, 'stream_context' => $streamContext);
unset($proto);
parent::__construct($wsdl, $options);
}
......@@ -495,4 +503,4 @@ class vmRequest {
// end vmRequest
}
?>
\ No newline at end of file
?>
......@@ -4,6 +4,7 @@
$module['template'] = 'module.tpl.htm';
$module['startpage'] = 'hosted/vps_list.php';
$module['tab_width'] = '';
$module['order'] = '4';
//**** Templates menu
......@@ -44,10 +45,10 @@ $module['nav'][] = array( 'title' => 'Admin',
$items2 = array() ;
$items2[] = array( 'title' => 'CSTI Dev Team ',
'target' => '_blank',
'link' => 'http://www.csti.ch');
'link' => 'http://www.csti.ch');
$items2[] = array( 'title' => 'Version',
'target' => 'content',
'link' => 'hosted/version.php');
'link' => 'hosted/version.php');
$module['nav'][] = array( 'title' => 'Dev Team',
'open' => 1,
'items' => $items2);
......
#!/usr/bin/perl -w
##########################################################
# HEADER SCRIPT
# Version 1.6.0
# Date 28.10.2016 14:38 CET
# Version 1.5.9
# Date 04.09.2015 17:15 CET
# CSTI / RD
# This a Perl Script, used as a Daemon (Debian / Unbuntu)
# Packages : apt-get install libfile-pid-perl libcrypt-cbc-perl libssl-dev
......@@ -18,7 +18,6 @@
# 1.5.7 -- Improve performance and clean up code
# 1.5.8 -- Improve performance and clean up code
# 1.5.9 -- Security Updates (encryption password)
# 1.6.0 -- Add mysql reconnect and Vmware
##########################################################
use strict;
use warnings;
......@@ -90,8 +89,8 @@ use POSIX qw(setsid);
chdir '/';
umask 0;
open STDIN, '/dev/null' or die "Can't read /dev/null: $!";
open STDOUT, '>>/dev/null' or die "Can't write to /dev/null: $!";
open STDERR, '>>/dev/null' or die "Can't write to /dev/null: $!";
#open STDOUT, '>>/dev/null' or die "Can't write to /dev/null: $!";
#open STDERR, '>>/dev/null' or die "Can't write to /dev/null: $!";
POSIX::setsid() or die "Can't start a new session.";
......@@ -215,13 +214,11 @@ sub startup {
$dbpass = &removeStr($dbpass);
$dbhost = &removeStr($dbhost);
logEntry "SQL.database.build.connection().Open",2;
$dbh= DBI->connect("DBI:$engine_db:database=$database;host=$dbhost;", $dbuser, $dbpass, {'RaiseError' => 0,'PrintError' => 1, 'mysql_auto_reconnect' => 1}) || logEntry " *** ERROR Unable to connect to DB!" , 1;
$dbh= DBI->connect("DBI:$engine_db:database=$database;host=$dbhost;", $dbuser, $dbpass, {'RaiseError' => 0,'PrintError' => 1}) || logEntry " *** ERROR Unable to connect to DB!" , 1;
if ( isDBConnected() ) {
logEntry "SQL.database.connection()->OK",2;
getAuth();
logEntry "VM.Vmware.InitConnection",2;
logEntry "Init.Start()",2;
initVm();
} else {
logEntry "SQL.database.connection()->Failed",2;
......@@ -242,43 +239,28 @@ sub isDBConnected{
return 0;
}
}
sub initVm {
# Connection to vCenter Server.
logEntry "Init.VM()->OK",2;
$ENV{'PERL_LWP_SSL_VERIFY_HOSTNAME'} = 0;
$ENV{'VI_USERNAME'} = $vCenterUser;
$ENV{'VI_PASSWORD'} = $vCenterPass;
$ENV{'VI_SERVER'} = $vCenterServer;
my $looptry = 1;
logEntry "Init.VM.Parse()",2;
Opts::parse();
logEntry "Init.VM.Validate()",2;
Opts::validate();
logEntry "Init.VM.Validate()->OK",2;
logEntry "VM.vsphere.connection().Open",2;
Util::connect() ;
if (isVMConnected()) {
logEntry "VM.vsphere.connection()->OK",2;
} else {
logEntry "VM.vsphere.connection()->Failed",2;
while ($looptry < 5) {
logEntry "VM.vsphere.connection().Retry($looptry)",2;
Util::connect() ;
if (isVMConnected()) {
logEntry "VM.vsphere.connection()->OK",2;
if (isVMConnected()){
logEntry "VM.vsphere.connection()->OK",2;
} else {
logEntry "VM.vsphere.connection()->Failed",2;
logEntry "VM.ERROR_VMWARE_CONNECTION",1;
if ($looptry == 5) {
$dieNow =0;
}
logEntry "VM.vsphere.connection()->Waiting",2;
sleep(90);
}
$looptry++;
logEntry "VM.vsphere.connection()->Failed",2;
logEntry "VM.ERROR_VMWARE_CONNECTION",1;
$dieNow =0;
}
}
}
sub isVMConnected{
my $sc = Vim::get_service_content() || return 0;
return 1;
......@@ -320,12 +302,9 @@ sub doWorks {
# push @snapshot_tasks, grep { $_->entity->type =~ m/VirtualMachine/ } @$tasks;
logEntry "VM.build.table->step1",5;
push @snapshot_tasks, @$tasks;
sleep(1);
logEntry "VM.build.table->step2" ,5;
$tasks = $TaskHistoryCollector->ReadNextTasks( maxCount => 500 );
sleep(1);
logEntry "VM.build.table->step3" ,5;
sleep(1);
}
foreach my $tk ( @snapshot_tasks ) {
$task_id = $tk->eventChainId ;
......@@ -514,7 +493,6 @@ sub print_tree {
$sth->finish();
$level+=1;
print_tree($vm, $ref, $node->childSnapshotList,$level);
sleep(1)
}
}
......
......@@ -17,19 +17,15 @@ $rev =($v->revision);
$sub = ($v->subversion);
if (CheckTable("hosted_Setup")== FALSE) {
echo "<p>Create SETUP table</p>";
$thisres = $v->CheckSetupTable(0);
foreach($thisres as $sql){
echo "<p> -- Create Setup Table:</p> $sql <br>";
//$app->db->query($sql);
$app->db->query($sql);
}
echo "<p>Init app Table</p>";
$thisres = $v->CheckSetupTable(1);
foreach($thisres as $sql){
echo "<p>-- Init Setup Table:</p> $sql <br>";
//$app->db->query($sql);
$app->db->query($sql);
}
// force Init
$_SESSION['MOD_HOSTED_VERSION']= 0;
......@@ -47,7 +43,6 @@ if (CheckTable("hosted_Setup")== FALSE) {
}
$thisver =$_SESSION['MOD_HOSTED_VERSION'].'.'.$_SESSION['MOD_HOSTED_REVISION'].'.'.$_SESSION['MOD_HOSTED_SUBVERSION'].'-'.$_SESSION['MOD_HOSTED_DEV_LEVEL'];
$message='<br><br><h3> Version:';
$bad='<font color="RED">You need to update to the latest version (';
$ok='<font color="GREEN">You use the latest version (Online:';
......@@ -74,38 +69,36 @@ if ($_SESSION['MOD_HOSTED_VERSION']==0) {
}
}
if ($_SESSION["MOD_HOSTED_VERSION"] != "0" ) {
echo $message.')</h3></FONT>';
}
echo $message.')</h3></FONT>';
//
if ($update==0) {
//need install
if (CheckTable("hosted")== FALSE) {
$thisArr = $v->CheckHostedable($update);
execSQL($thisArr, '<p><font color="GREEN">-- Installing and Updating hosted </font></p><br>');
execSQL($thisArr, '<p><font color="GREEN">Installing and Updating hosted </font></p><br>');
unset($thisArr);
}
if (CheckTable("hosted_events")== FALSE) {
$thisArr = $v->CheckEventsTable($update);
execSQL($thisArr, '<p><font color="GREEN">-- Installing and Updating Events Table </font></p><br>');
execSQL($thisArr, '<p><font color="GREEN">Installing and Updating Events Table </font></p><br>');
unset($thisArr);
}
if (CheckTable("hosted_log")== FALSE) {
$thisArr = $v->CheckLogTable($update);
execSQL($thisArr, '<p><font color="GREEN">-- Installing and Updating Log Table </font></p><br>');
execSQL($thisArr, '<p><font color="GREEN">Installing and Updating Log Table </font></p><br>');
unset($thisArr);
}
if (CheckTable("hosted_snapshots")== FALSE) {
$thisArr = $v->CheckSnapshotTable($update);
execSQL($thisArr, '<p><font color="GREEN">-- Installing and Updating Snapshots Table </font></p><br>');
execSQL($thisArr, '<p><font color="GREEN">Installing and Updating Snapshots Table </font></p><br>');
unset($thisArr);
}
$thisres = $v->CheckSetupTable(2);
execSQL($thisres,'<p><font color="GREEN">-- Updating General application </font></p><br>');
execSQL($thisres,'<p><font color="GREEN"> Updating General application </font></p><br>');
unset($thisres);
} else if (($update==1) || ($update==2)) {
......@@ -121,22 +114,22 @@ if ($update==0) {
//// Need Update /////////////////
//////////////////////////////////////
$thisArr = $v->CheckHostedable($update);
execSQL($thisArr, $mess.'-- hosted </font></p><br>');
execSQL($thisArr, $mess.' hosted </font></p><br>');
unset($thisArr);
$thisArr = $v->CheckEventsTable($update);
execSQL($thisArr, $mess.'-- Events </font></p><br>');
execSQL($thisArr, $mess.' Events </font></p><br>');
unset($thisArr);
$thisArr = $v->CheckLogTable($update);
execSQL($thisArr, $mess.'-- Log </font></p><br>');
execSQL($thisArr, $mess.' Log </font></p><br>');
unset($thisArr);
$thisArr = $v->CheckSnapshotTable($update);
execSQL($thisArr, $mess.'-- Snapshots </font></p><br>');
execSQL($thisArr, $mess.' Snapshots </font></p><br>');
unset($thisArr);
$thisres = $v->CheckSetupTable(2);
execSQL($thisres,'<p><font color="GREEN"> -- Updating General application </font></p><br>');
execSQL($thisres,'<p><font color="GREEN"> Updating General application </font></p><br>');
unset($thisres);
} else {
......@@ -149,9 +142,9 @@ function execSQL($thisArr,$mess){
$upsql="";
foreach ($thisArr as $upsql) {
if (strlen($upsql) >2) {
echo $mess;
echo $mess;
echo "<br>". "$upsql" . "<br>";
//$app->db->query($upsql);
$app->db->query($upsql);
}
}
}
......
......@@ -3,26 +3,24 @@
<div class="panel panel_list_Configuration">
<div class="pnl_listarea">
<fieldset><legend><tmpl_var name="list_head_txt"></legend>
<table class="list">
<thead>
<table class="table">
<thead class="dark form-group-sm">
<tr>
<th class="tbl_col_username" scope="col"><tmpl_var name="username_txt"></th>
<th class="tbl_col_server" scope="col"><tmpl_var name="server_txt"></th>
<th class="tbl_col_buttons" scope="col">&nbsp;</th>
</tr>
<tr>
<td class="tbl_col_username"><input type="text" name="search_username" value="{tmpl_var name='search_username'}" /></td>
<td class="tbl_col_server"><input type="text" name="search_server" value="{tmpl_var name='search_server'}" /></td>
<td class="tbl_col_buttons"><div class="buttons"><button type="button" class="icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onclick="submitForm('pageForm','hosted/config.php');"><span>{tmpl_var name="filter_txt"}</span></button></div></td>
<td class="tbl_col_username"><input class="form-control" type="text" name="search_username" value="{tmpl_var name='search_username'}" /></td>
<td class="tbl_col_server"><input class="form-control" type="text" name="search_server" value="{tmpl_var name='search_server'}" /></td>
<td class="tbl_col_buttons"><div class="buttons"><button type="button" class="btn btn-default formbutton-default formbutton-narrow" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" data-submit-form="pageForm" data-form-action="hosted/config.php"><span class="icon icon-filter"></span></button></div></td>
</tr>
</thead>
<tbody>
<tmpl_loop name="records">
<tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>">
<td class="tbl_col_username"><a href="#" onclick="loadContent('hosted/config_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="username"}</a></td>
<td class="tbl_col_server"><a href="#" onclick="loadContent('hosted/config_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="server"}</a></td>
<td class="tbl_col_username"><a href="#" data-load-content="hosted/config_edit.php?id={tmpl_var name='id'}">{tmpl_var name="username"}</a></td>
<td class="tbl_col_server"><a href="#" data-load-content="hosted/config_edit.php?id={tmpl_var name='id'}">{tmpl_var name="server"}</a></td>
<td class="tbl_col_buttons">
<div class="buttons icons16">
......@@ -42,7 +40,6 @@
</tr>
</tfoot>
</table>
</fieldset>
</div>
</div>
<h2><tmpl_var name="list_head_txt"></h2>
<p><tmpl_var name="list_desc_txt"></p>
<div class="panel panel_Config">
<div class="pnl_formsarea">
<fieldset class="inlineLabels"><legend>Config VMware</legend>
<div class="ctrlHolder">
<label for="username">{tmpl_var name='username_txt'}</label>
<input name="username" id="username" value="{tmpl_var name='username'}" size="30" maxlength="50" type="text" class="textInput" />
<div class="form-group">
<label class="col-sm-3" for="username">{tmpl_var name='username_txt'}</label>
<div class="col-sm-9"><input name="username" id="username" value="{tmpl_var name='username'}" size="30" maxlength="50" type="text" class="form-control" /></div>
</div>
<div class="ctrlHolder">
<label for="password">{tmpl_var name='password_txt'}</label>
<input name="password" id="password" value="{tmpl_var name='password'}" size="30" maxlength="50" class="textInput" type="password"/>
<div class="form-group">
<label class="col-sm-3" for="password">{tmpl_var name='password_txt'}</label>
<div class="col-sm-9"><input name="password" id="password" value="{tmpl_var name='password'}" size="30" maxlength="50" class="form-control" type="password"/></div>
</div>
<div class="ctrlHolder">
<label for="server">{tmpl_var name='server_txt'}</label>
<input name="server" id="server" value="{tmpl_var name='server'}" size="30" maxlength="55" type="text" class="textInput" />
<div class="form-group">
<label class="col-sm-3" for="server">{tmpl_var name='server_txt'}</label>
<div class="col-sm-9"><input name="server" id="server" value="{tmpl_var name='server'}" size="30" maxlength="55" type="text" class="form-control" /></div>
</div>
<div class="ctrlHolder">
<label for="loglevel">{tmpl_var name='loglevel_txt'}</label>
<select name="loglevel" id="loglevel" class="selectInput">
<div class="form-group">
<label class="col-sm-3" for="loglevel">{tmpl_var name='loglevel_txt'}</label>
<div class="col-sm-9"><select name="loglevel" id="loglevel" class="selectInput">
{tmpl_var name='loglevel'}
</select>
</select></div>
</div>
</fieldset>
<input type="hidden" name="id" value="{tmpl_var name='id'}">
<div class="buttonHolder buttons">
<button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','hosted/config_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button>
<button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('hosted/config.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
<div class="clear"><div class="right">
<button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="hosted/config_edit.php"><span>{tmpl_var name='btn_save_txt'}</span></button>
<button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="hosted/config.php"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
</div>
</div>
......
......@@ -5,10 +5,9 @@
<div class="pnl_listarea">
<fieldset><legend><tmpl_var name="list_head_txt"></legend>
<input type="hidden" id="vmid" name="vmid" value="{tmpl_var name='vmid'}" />
<table class="list">
<thead>
<table class="table">
<thead class="dark form-group-sm">
<tr>
<th class="tbl_col_vmname" scope="col"><tmpl_var name="vmname_txt"></th>
<th class="tbl_col_task_status" scope="col"><tmpl_var name="task_status_txt"></th>
......@@ -20,12 +19,12 @@
<tmpl_if name="is_admin">
<tr>
<td class="tbl_col_vmname"><input type="text" name="search_vmname" value="{tmpl_var name='search_vmname'}" /></td>
<td class="tbl_col_task_status"><select name="search_task_status" onChange="submitForm('pageForm','hosted/events_list.php');">{tmpl_var name='search_task_status'}</select></td>
<td class="tbl_col_task_description"><input type="text" name="search_task_description" value="{tmpl_var name='search_task_description'}" /></td>
<td class="tbl_col_start_time"><input type="text" name="search_start_time" value="{tmpl_var name='search_start_time'}" /></td>
<td class="tbl_col_end_date"><input type="text" name="search_end_date" value="{tmpl_var name='search_end_date'}" /></td>
<td class="tbl_col_buttons"><div class="buttons"><button type="button" class="icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onclick="submitForm('pageForm','hosted/events_list.php');"><span>{tmpl_var name="filter_txt"}</span></button></div></td>
<td class="tbl_col_vmname"><input class="form-control" type="text" name="search_vmname" value="{tmpl_var name='search_vmname'}" /></td>
<td class="tbl_col_task_status"><select class="form-control" name="search_task_status" data-submit-form="pageForm" data-form-action="hosted/events_list.php">{tmpl_var name='search_task_status'}</select></td>
<td class="tbl_col_task_description"><input class="form-control" type="text" name="search_task_description" value="{tmpl_var name='search_task_description'}" /></td>
<td class="tbl_col_start_time"><input class="form-control" type="text" name="search_start_time" value="{tmpl_var name='search_start_time'}" /></td>
<td class="tbl_col_end_date"><input class="form-control" type="text" name="search_end_date" value="{tmpl_var name='search_end_date'}" /></td>
<td class="tbl_col_buttons"><div class="buttons"><button type="button" class="btn btn-default formbutton-default formbutton-narrow" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" data-load-content="pageForm" dataform-action="hosted/events_list.php"><span class="icon icon-filter"></span></button></div></td>
</tr>
</tmpl_if>
</thead>
......@@ -56,7 +55,6 @@
</tr>
</tfoot>
</table>
</fieldset>
</div>
</div>
<h2><tmpl_var name="list_head_txt"></h2>
<p><tmpl_var name="list_desc_txt"></p>
<div class="panel panel_hosted">
<div class="pnl_formsarea">
<fieldset class="inlineLabels"><legend>hosted</legend>
<div class="ctrlHolder">
<label for="client_id">{tmpl_var name='client_id_txt'}</label>
<select name="client_id" id="client_id" class="selectInput">
<div class="form-group">
<label class="col-sm-3" for="client_id">{tmpl_var name='client_id_txt'}</label>
<div class="col-sm-9"><select name="client_id" id="client_id" class="form-control">
{tmpl_var name='client_id'}
</select>
</select></div>
</div>
<div class="ctrlHolder">
<label for="datacenter_server">{tmpl_var name='datacenter_server_txt'}</label>
<input name="datacenter_server" id="datacenter_server" value="{tmpl_var name='datacenter_server'}" size="30" maxlength="255" type="text" class="textInput" />
<div class="form-group">
<label class="col-sm-3" for="datacenter_server">{tmpl_var name='datacenter_server_txt'}</label>
<div class="col-sm-9"><input name="datacenter_server" id="datacenter_server" value="{tmpl_var name='datacenter_server'}" size="30" maxlength="255" type="text" class="form-control" /></div>
</div>
<div class="ctrlHolder">
<label for="vmname">{tmpl_var name='vmname_txt'}</label>
<input name="vmname" id="vmname" value="{tmpl_var name='vmname'}" size="30" maxlength="255" type="text" class="textInput" />
<div class="form-group">
<label class="col-sm-3" for="vmname">{tmpl_var name='vmname_txt'}</label>
<div class="col-sm-9"><input name="vmname" id="vmname" value="{tmpl_var name='vmname'}" size="30" maxlength="255" type="text" class="form-control" /></div>
</div>
<div class="ctrlHolder">
<label for="vmid">{tmpl_var name='vmid_txt'}</label>
<input name="vmid" id="vmid" value="{tmpl_var name='vmid'}" size="30" maxlength="255" type="text" class="textInput" />
<div class="form-group">
<label class="col-sm-3" for="vmid">{tmpl_var name='vmid_txt'}</label>
<div class="col-sm-9"><input name="vmid" id="vmid" value="{tmpl_var name='vmid'}" size="30" maxlength="255" type="text" class="form-control" /></div>
</div>
<div class="ctrlHolder">
<label for="status_pwr">{tmpl_var name='status_pwr_txt'}</label>
<input name="status_pwr" id="status_pwr" value="{tmpl_var name='status_pwr'}" size="30" maxlength="255" type="text" class="textInput" />
<div class="form-group">
<label class="col-sm-3" for="status_pwr">{tmpl_var name='status_pwr_txt'}</label>
<div class="col-sm-9"><input name="status_pwr" id="status_pwr" value="{tmpl_var name='status_pwr'}" size="30" maxlength="255" type="text" class="form-control" /></div>
</div>
<div class="ctrlHolder">
<label for="status_vmw">{tmpl_var name='status_vmw_txt'}</label>
<input name="status_vmw" id="status_vmw" value="{tmpl_var name='status_vmw'}" size="30" maxlength="255" type="text" class="textInput" />
<div class="form-group">
<label class="col-sm-3" for="status_vmw">{tmpl_var name='status_vmw_txt'}</label>
<div class="col-sm-9"><input name="status_vmw" id="status_vmw" value="{tmpl_var name='status_vmw'}" size="30" maxlength="255" type="text" class="form-control" /></div>
</div>
<div class="ctrlHolder">
<label for="vmtype">{tmpl_var name='vmtype_txt'}</label>
<input name="vmtype" id="vmtype" value="{tmpl_var name='vmtype'}" size="30" maxlength="255" type="text" class="textInput" />
<div class="form-group">
<label class="col-sm-3" for="vmtype">{tmpl_var name='vmtype_txt'}</label>
<div class="col-sm-9"><input name="vmtype" id="vmtype" value="{tmpl_var name='vmtype'}" size="30" maxlength="255" type="text" class="form-control" /></div>
</div>
<div class="ctrlHolder">
<label for="updateDate">{tmpl_var name='updateDate_txt'}</label>
<input name="updateDate" id="updateDate" value="{tmpl_var name='updateDate'}" size="30" maxlength="255" type="text" class="textInput" />
<div class="form-group">
<label class="col-sm-3" for="updateDate">{tmpl_var name='updateDate_txt'}</label>
<div class="col-sm-9"><input name="updateDate" id="updateDate" value="{tmpl_var name='updateDate'}" size="30" maxlength="255" type="text" class="form-control" /></div>
</div>
<div class="ctrlHolder">
<label for="vmbootTime">{tmpl_var name='vmbootTime_txt'}</label>
<input name="vmbootTime" id="vmbootTime" value="{tmpl_var name='vmbootTime'}" size="30" maxlength="255" type="text" class="textInput" />
<div class="form-group">
<label class="col-sm-3" for="vmbootTime">{tmpl_var name='vmbootTime_txt'}</label>
<div class="col-sm-9"><input name="vmbootTime" id="vmbootTime" value="{tmpl_var name='vmbootTime'}" size="30" maxlength="255" type="text" class="form-control" /></div>
</div>
<div class="ctrlHolder">
<label for="vm_mem_MB">{tmpl_var name='vm_mem_MB_txt'}</label>
<input name="vm_mem_MB" id="vm_mem_MB" value="{tmpl_var name='vm_mem_MB'}" size="30" maxlength="255" type="text" class="textInput" />
<div class="form-group">
<label class="col-sm-3" for="vm_mem_MB">{tmpl_var name='vm_mem_MB_txt'}</label>
<div class="col-sm-9"><input name="vm_mem_MB" id="vm_mem_MB" value="{tmpl_var name='vm_mem_MB'}" size="30" maxlength="255" type="text" class="form-control" /></div>
</div>
<div class="ctrlHolder">
<label for="vm_cpu">{tmpl_var name='vm_cpu_txt'}</label>
<input name="vm_cpu" id="vm_cpu" value="{tmpl_var name='vm_cpu'}" size="30" maxlength="255" type="text" class="textInput" />
<div class="form-group">
<label class="col-sm-3" for="vm_cpu">{tmpl_var name='vm_cpu_txt'}</label>
<div class="col-sm-9"><input name="vm_cpu" id="vm_cpu" value="{tmpl_var name='vm_cpu'}" size="30" maxlength="255" type="text" class="form-control" /></div>
</div>
<div class="ctrlHolder">
<label for="vm_config_date">{tmpl_var name='vm_config_date_txt'}</label>
<input name="vm_config_date" id="vm_config_date" value="{tmpl_var name='vm_config_date'}" size="30" maxlength="255" type="text" class="textInput" />
<div class="form-group">
<label class="col-sm-3" for="vm_config_date">{tmpl_var name='vm_config_date_txt'}</label>
<div class="col-sm-9"><input name="vm_config_date" id="vm_config_date" value="{tmpl_var name='vm_config_date'}" size="30" maxlength="255" type="text" class="form-control" /></div>
</div>
<div class="ctrlHolder">
<label for="vm_disk_capacity_GB">{tmpl_var name='vm_disk_capacity_GB_txt'}</label>
<input name="vm_disk_capacity_GB" id="vm_disk_capacity_GB" value="{tmpl_var name='vm_disk_capacity_GB'}" size="30" maxlength="255" type="text" class="textInput" />
<div class="form-group">
<label class="col-sm-3" for="vm_disk_capacity_GB">{tmpl_var name='vm_disk_capacity_GB_txt'}</label>
<div class="col-sm-9"><input name="vm_disk_capacity_GB" id="vm_disk_capacity_GB" value="{tmpl_var name='vm_disk_capacity_GB'}" size="30" maxlength="255" type="text" class="form-control" /></div>
</div>
<div class="ctrlHolder">
<label for="vm_OS">{tmpl_var name='vm_OS_txt'}</label>
<input name="vm_OS" id="vm_OS" value="{tmpl_var name='vm_OS'}" size="30" maxlength="255" type="text" class="textInput" />
<div class="form-group">
<label class="col-sm-3" for="vm_OS">{tmpl_var name='vm_OS_txt'}</label>
<div class="col-sm-9"><input name="vm_OS" id="vm_OS" value="{tmpl_var name='vm_OS'}" size="30" maxlength="255" type="text" class="form-control" /></div>
</div>
<div class="ctrlHolder">
<label for="vm_disk_freespace_GB">{tmpl_var name='vm_disk_freespace_GB_txt'}</label>
<input name="vm_disk_freespace_GB" id="vm_disk_freespace_GB" value="{tmpl_var name='vm_disk_freespace_GB'}" size="30" maxlength="255" type="text" class="textInput" />
<div class="form-group">
<label class="col-sm-3" for="vm_disk_freespace_GB">{tmpl_var name='vm_disk_freespace_GB_txt'}</label>
<div class="col-sm-9"><input name="vm_disk_freespace_GB" id="vm_disk_freespace_GB" value="{tmpl_var name='vm_disk_freespace_GB'}" size="30" maxlength="255" type="text" class="form-control" /></div>
</div>
<div class="ctrlHolder">
<label for="task_run">{tmpl_var name='task_run_txt'}</label>
<input name="task_run" id="task_run" value="{tmpl_var name='task_run'}" size="30" maxlength="255" type="text" class="textInput" />
<div class="form-group">
<label class="col-sm-3" for="task_run">{tmpl_var name='task_run_txt'}</label>
<div class="col-sm-9"><input name="task_run" id="task_run" value=