* devops setting
This commit is contained in:
@@ -0,0 +1,192 @@
|
||||
<div class='panel'>
|
||||
<?php $ips = (array) zget($domain,'load_balancer_ips', new stdclass);?>
|
||||
<?php if(!empty($ips)):?>
|
||||
<div class='panel-heading'>
|
||||
<div class='panel-title'><?php echo $lang->instance->visitIP;?></span></div>
|
||||
</div>
|
||||
<div class='panel-body'>
|
||||
<table class='table table-form cell'>
|
||||
<?php foreach($ips as $key => $value):?>
|
||||
<tr>
|
||||
<th><?php echo $key;?></th>
|
||||
<td><?php echo $value;?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</table>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<div class='panel-heading'>
|
||||
<div class='panel-title'><?php echo $lang->instance->mem;?></span></div>
|
||||
</div>
|
||||
<div class='panel-body'>
|
||||
<form id='memoryForm' class='cell not-watch load-indicator'>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td colspan="3">
|
||||
<span class='label label-info'><?php echo $lang->instance->currentMemory;?>:<?php echo helper::formatKB($currentResource->resources->memory / 1024);?></span>
|
||||
<span class='label label-warning'><?php $this->instance->printSuggestedMemory($instanceMetric->memory, $lang->instance->memOptions);?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->instance->adjustMem;?></th>
|
||||
<td class='w-100px'><?php echo html::select('memory_kb', $this->instance->filterMemOptions($currentResource), '', "class='form-control'");?></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td class='text-center'>
|
||||
<?php echo html::commonButton($lang->instance->saveSetting, "id='memBtn' instance-id='$instance->id'", 'btn btn-primary'); ?>
|
||||
</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php if(isset($cloudApp->features->ldap)):?>
|
||||
<div class='panel-heading'>
|
||||
<div class='panel-title'><?php echo $lang->system->ldapManagement;?></span></div>
|
||||
</div>
|
||||
<div class='panel-body'>
|
||||
<form id='LDAPForm' class='cell not-watch load-indicator'>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<?php $LDAPInstalled = $this->system->hasSystemLDAP();?>
|
||||
<?php $enableLDAP = $instance->ldapSnippetName ? 'true' : '' ;?>
|
||||
<td class='w-120px'><?php echo html::checkbox('enableLDAP', array('true' => $lang->instance->enableLDAP), $enableLDAP, ($LDAPInstalled ? '' : 'disabled'));?></td>
|
||||
<td colspan='2'>
|
||||
<?php if(!$LDAPInstalled):?>
|
||||
<?php echo $lang->instance->systemLDAPInactive;?>
|
||||
<?php echo html::a(helper::createLink('system', 'installLDAP'), $lang->instance->toSystemLDAP, '', "class='btn btn-default'");?>
|
||||
<?php endif?>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td class='w-100px text-center'>
|
||||
<?php echo html::commonButton($lang->instance->saveSetting, "id='ldapBtn' instance-id='$instance->id'" . ($LDAPInstalled ? '' : 'disabled'), 'btn btn-primary');?>
|
||||
</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php if(isset($cloudApp->features->mail)):?>
|
||||
<div class='panel-heading'>
|
||||
<div class='panel-title'><?php echo $lang->system->SMTP->common;?></span></div>
|
||||
</div>
|
||||
<div class='panel-body'>
|
||||
<form id='SMTPForm' class='cell not-watch load-indicator'>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<?php $SMTPInstalled = $this->system->isSMTPEnabled();?>
|
||||
<?php $enableSMTP = $instance->smtpSnippetName ? 'true' : '' ;?>
|
||||
<td class='w-120px'><?php echo html::checkbox('enableSMTP', array('true' => $lang->instance->enableSMTP), $enableSMTP, ($SMTPInstalled ? '' : 'disabled'));?></td>
|
||||
<td colspan='2'>
|
||||
<?php if(!$SMTPInstalled):?>
|
||||
<?php echo $lang->instance->systemSMTPInactive;?>
|
||||
<?php echo html::a(helper::createLink('system', 'installSMTP'), $lang->instance->toSystemSMTP, '', "class='btn btn-default'");?>
|
||||
<?php endif?>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td class='w-100px text-center'>
|
||||
<?php echo html::commonButton($lang->instance->saveSetting, "id='smtpBtn' instance-id='$instance->id'" . ($SMTPInstalled ? '' : 'disabled'), 'btn btn-primary');?>
|
||||
</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
|
||||
<?php if(!empty($currentResource->scalable) && $config->edition == 'biz'):?>
|
||||
<div class='panel-heading'>
|
||||
<div class='panel-title'><?php echo $lang->instance->scalable;?></span></div>
|
||||
</div>
|
||||
<div class='panel-body'>
|
||||
<form id='replicasForm' class='cell not-watch load-indicator'>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th><?php echo $lang->instance->componentFields['replicas'];?></th>
|
||||
<td class='w-80px center'>
|
||||
<span id="replicas-text"><?php echo $currentResource->replicas;?></span>
|
||||
<?php echo html::select('scalable', array(1=>1, 2=>2, 3=>3, 4=>4), intval($currentResource->replicas) ? : 1, " id='replicas-input' max='4' min='1' class='form-control scalable-input hide'");?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo html::commonButton($lang->instance->change, 'id="replicas-edit"', 'btn btn-primary ' . (in_array($instance->status, array('uninstalling', 'destroying', 'destroyed', 'unknown', 'abnormal')) ? 'disabled' : ''));?>
|
||||
<?php echo html::commonButton($lang->instance->saveSetting, "id='replicas-save' instance-id='$instance->id'", 'btn btn-primary hide');?>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
|
||||
<?php if(count($customItems)):?>
|
||||
<div class='panel-heading'>
|
||||
<div class='panel-title'><?php echo $lang->instance->customSetting;?></span></div>
|
||||
</div>
|
||||
<div class='panel-body'>
|
||||
<form id='customForm' class='cell not-watch load-indicator'>
|
||||
<table class='table table-form'>
|
||||
<?php foreach($customItems as $item):?>
|
||||
<tr>
|
||||
<th><?php echo $item->label;?></th>
|
||||
<td>
|
||||
<?php echo html::input($item->name, $item->default, "class='form-control' placeholder='{$item->label}'");?>
|
||||
</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td class='text-center'>
|
||||
<?php echo html::commonButton($lang->instance->saveSetting, "id='customBtn' instance-id='$instance->id'", 'btn btn-primary'); ?>
|
||||
</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php if(!empty($dbList)):?>
|
||||
<hr/>
|
||||
<div class='panel-heading'>
|
||||
<div class='panel-title'><?php echo $lang->instance->dbList;?></div>
|
||||
</div>
|
||||
<div class='panel-body'>
|
||||
<table class='table table-bordered text-center'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo $lang->instance->dbName;?></th>
|
||||
<th><?php echo $lang->instance->dbType;?></th>
|
||||
<th><?php echo $lang->instance->dbStatus;?></th>
|
||||
<th><?php echo $lang->instance->action;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($dbList as $db):?>
|
||||
<tr>
|
||||
<td><?php echo $db->db_name;?></td>
|
||||
<td><?php echo $db->db_type;?></td>
|
||||
<td><?php echo $db->ready ? $lang->instance->dbReady : $lang->instance->dbWaiting;?></td>
|
||||
<td><?php $this->instance->printDBAction($db, $instance);?></td>
|
||||
<tr>
|
||||
<?php endforeach;?>
|
||||
<tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
@@ -0,0 +1,80 @@
|
||||
<div class='panel'>
|
||||
<div class='panel-heading'>
|
||||
<span class='text-blue'><?php echo $lang->instance->backup->keepBackupBySystem;?></span>
|
||||
<div class='btn-toolbar pull-right'>
|
||||
<?php echo html::a(".", $lang->refresh, '', "class='btn'");?>
|
||||
<?php $autoBackupBtn = html::a(helper::createLink('instance', 'backupSettings', "id={$instance->id}", '', true), $lang->instance->backup->autoBackup, '', "class='iframe btn btn-primary' title='{$lang->instance->backup->autoBackup}' data-width='520' data-app='space'");?>
|
||||
<?php $autoRestoreBtn = html::a(helper::createLink('instance', 'restoreSettings', "id={$instance->id}", '', true), $lang->instance->restore->autoRestore, '', "class='iframe btn btn-primary' title='{$lang->instance->restore->autoRestore}' data-width='520' data-app='space'");?>
|
||||
<?php echo $this->config->instance->enableAutoRestore ? $autoRestoreBtn : $autoBackupBtn;?>
|
||||
<?php $this->instance->printBackupBtn($instance);?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(empty($backupList)):?>
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
<?php echo $lang->instance->errors->noBackup;?>
|
||||
<?php $this->instance->printBackupBtn($instance);?>
|
||||
</p>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<table class="table table-bordered text-center">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-150px'><?php echo $lang->instance->backup->date;?></th>
|
||||
<th class='w-150px'><?php echo $lang->instance->backup->operator;?></th>
|
||||
<th class='w-150px'><?php echo $lang->instance->backup->dbStatus;?></th>
|
||||
<th class='w-150px'><?php echo $lang->instance->backup->dbSize;?></th>
|
||||
<?php if($hasRestoreLog):?>
|
||||
<th class='w-150px'><?php echo $lang->instance->backup->restoreDate;?></th>
|
||||
<th class='w-150px'><?php echo $lang->instance->backup->dbStatus;?></th>
|
||||
<?php endif;?>
|
||||
<th class="w-150px actions">
|
||||
<?php echo $lang->instance->backup->action;?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($backupList as $backup):?>
|
||||
<tr>
|
||||
<td><span data-toggle='tooltip' data-placement='bottom' title='<?php echo date('Y-m-d H:i:s', $backup->create_time);?>'><?php echo date('Y-m-d', $backup->create_time);?></span></td>
|
||||
<td><?php echo zget($lang->instance->backup->operators, $backup->username, $backup->username);?></td>
|
||||
<td><?php echo zget($lang->instance->backup->statusList, strtolower($backup->status));?></td>
|
||||
<?php $backupSize = isset($backup->backup_details->db[0]) ? intval(zget($backup->backup_details->db[0], 'size', 0)) : 0;?>
|
||||
<?php $backupSize += isset($backup->backup_details->volume[0]) ? intval(zget($backup->backup_details->volume[0], 'doneBytes', 0)) : 0;?>
|
||||
<td><?php echo helper::formatKB($backupSize / 1024);?></td>
|
||||
<?php if($hasRestoreLog):?>
|
||||
<td>
|
||||
<span data-toggle='tooltip' data-placement='bottom' title='<?php echo $backup->latest_restore_time ? date('Y-m-d H:i:s', $backup->latest_restore_time) : '';?>'>
|
||||
<?php echo $backup->latest_restore_time ? date('Y-m-d', $backup->latest_restore_time) : '';?>
|
||||
</span>
|
||||
</td>
|
||||
<td><?php echo $backup->latest_restore_status ? zget($lang->instance->restore->statusList, $backup->latest_restore_status, '') : '';?></td>
|
||||
<?php endif;?>
|
||||
<td><?php $this->instance->printRestoreBtn($instance, $backup);?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="modal fade" id="confirmRestore" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog w-400px">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span></button>
|
||||
<h2 class="text-center"><?php echo $lang->instance->backup->restore;?></h2>
|
||||
<div class="text-center confirm-text">
|
||||
<p class='modal-message text-center'><?php echo $lang->instance->backup->backupBeforeRestore;?></p>
|
||||
<p class='modal-message text-center'>
|
||||
<?php echo $lang->instance->backup->latestBackupAt;?>:
|
||||
<?php echo date('Y-m-d H:i:s', $latestBackup->create_time);?>
|
||||
</p>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<?php echo html::commonButton($lang->instance->backup->common, "instance-id='{$instance->id}'", 'btn-backup btn btn-wide');?>
|
||||
<?php echo html::commonButton($lang->instance->backup->restore, "id='submitRestore'", 'btn btn-primary btn-wide');?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
/**
|
||||
* The auto backup view file of instance module of QuCheng.
|
||||
*
|
||||
* @copyright Copyright 2021-2022 北京渠成软件有限公司(BeiJing QurCheng Software Co,LTD, www.qucheng.cn)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @author Jianhua Wang <wangjianhua@easycorp.ltd>
|
||||
* @package instance
|
||||
* @version $Id$
|
||||
* @link https://www.qucheng.cn
|
||||
*/
|
||||
?>
|
||||
<?php include $this->app->getModuleRoot() . '/common/view/header.html.php';?>
|
||||
<?php include $this->app->getModuleRoot() . '/common/view/datepicker.html.php';?>
|
||||
<?php js::set('instanceNotices', $lang->instance->notices);?>
|
||||
<?php js::set('instanceID', $instance->id);?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->instance->backup->autoBackup;?></h2>
|
||||
</div>
|
||||
<div>
|
||||
<form id='backupSettingForm' method='post' class="cell not-watch load-indicator main-form">
|
||||
<h4><?php echo html::checkbox('autoBackup', array('true' => $lang->instance->backup->enableAutoBackup), $backupSettings->autoBackup ? 'true' : '');?></h4>
|
||||
<table class="table table-form backup-settings">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><?php echo $lang->instance->backup->backupTime;?></th>
|
||||
<td class='required'>
|
||||
<div class='input-group'>
|
||||
<div class='datepicker-wrapper datepicker-date'>
|
||||
<?php echo html::input('backupTime', $backupSettings->backupTime, "class='form-control form-time' data-picker-position='bottom-right' maxlength='20'");?>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='w-80px'><?php echo $lang->instance->backup->cycleDays;?></th>
|
||||
<td class='required w-250px'>
|
||||
<div class='input-group'><?php echo html::select('cycleDays', $lang->instance->backup->cycleList, $backupSettings->cycleDays, "class='form-control' maxlength='20'");?></div>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->instance->backup->keepDays;?></th>
|
||||
<td class='required'>
|
||||
<div class='input-group'><?php echo html::number('keepDays', $backupSettings->keepDays, "class='form-control' maxlength='2' min='1' max='30'");?></div>
|
||||
<span><?php echo $lang->instance->backup->keepDayRange;?></span>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="text-center form-actions"><?php echo html::commonButton($lang->save, "id='saveSetting'", 'btn btn-primary');?></div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php include $this->app->getModuleRoot() . '/common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,115 @@
|
||||
<div>
|
||||
<div class="panel">
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col col-4">
|
||||
<table class="table table-data">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><?php echo $lang->instance->status;?></th>
|
||||
<td class="instance-status" instance-id="<?php echo $instance->id;?>" data-status="<?php echo $instance->status;?>">
|
||||
<?php echo $this->instance->printStatus($instance, false);?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->instance->source;?></th>
|
||||
<td class="instance-source">
|
||||
<span><?php echo zget($lang->instance->sourceList, $instance->source, '');?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->instance->appTemplate;?></th>
|
||||
<td><?php echo html::a($this->createLink('store', 'appView', "id=$instance->appID"), $instance->appName);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->instance->installAt;?></th>
|
||||
<td><span><?php echo substr($instance->createdAt, 0, 16);?></span></td>
|
||||
</tr>
|
||||
<?php if($instance->status == 'running'):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->instance->runDuration;?></th>
|
||||
<td><?php echo common::printDuration($instance->runDuration);?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php if($defaultAccount):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->instance->defaultAccount;?></th>
|
||||
<td><?php echo $defaultAccount->username;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->instance->defaultPassword;?></th>
|
||||
<td><?php echo $defaultAccount->password;?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class='col col-8 usage-box'>
|
||||
<div class='col col-6'>
|
||||
<div class="c-title"><?php echo $lang->instance->cpuUsage;?></div>
|
||||
<?php $this->instance->printCpuUsage($instance, $instanceMetric->cpu, 'pie');?>
|
||||
</div>
|
||||
<div class='col col-6'>
|
||||
<div class="c-title"><?php echo $lang->instance->memUsage;?></div>
|
||||
<?php $this->instance->printMemUsage($instance, $instanceMetric->memory, 'pie');?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(empty($instance->solution) && array_key_exists(strtolower($instance->chart), $this->config->instance->seniorChartList)):?>
|
||||
<div id='seniorAppPanel' class="panel">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-title"><?php echo $lang->instance->upgradeToSenior;?></div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p id='senior-app-desc'>
|
||||
<?php $seniorAppHtml = '';?>
|
||||
<?php foreach($seniorAppList as $number => $seniorApp):?>
|
||||
<?php if($number > 0) $seniorAppHtml .= $lang->instance->or;?>
|
||||
<?php $seniorAppHtml .= html::a(helper::createLink('store', 'appview', "id=$seniorApp->id"), $seniorApp->alias, '_blank');?>
|
||||
<?php endforeach;?>
|
||||
<?php $currentAppUrl = html::a(helper::createLink('store', 'appview', "id=$instance->appID"), $instance->appName, '_blank');?>
|
||||
<?php printf($lang->instance->descOfSwitchSerial, $currentAppUrl, $seniorAppHtml);?>
|
||||
<?php echo html::a('https://www.zentao.net/page/enterprise.html', $lang->instance->serialDiff, '_blank', "id='serialDiff' class=''");?>
|
||||
</p>
|
||||
<div>
|
||||
<?php $disabled = $instance->status == 'stopped' ? '' : 'disabled';?>
|
||||
<?php foreach($seniorAppList as $seniorApp):?>
|
||||
<?php $toSeniorUrl = $this->inLink('toSenior', "id={$instance->id}&seniorAppID={$seniorApp->id}", '', true);?>
|
||||
<?php echo html::a($toSeniorUrl, $lang->instance->switchTo . $seniorApp->alias, '', $disabled . " class='iframe btn btn-primary' title='{$lang->instance->upgrade}' data-width='520' data-app='space'");?>
|
||||
<?php endforeach;?>
|
||||
<?php if($disabled == 'disabled'):?>
|
||||
<span class='text-info'><?php echo $lang->instance->stopInstanceTips;?></span>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<div class="panel instance-log">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-title"><?php echo $lang->instance->operationLog;?></div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<table class="table table-borderless">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="w-180px"><?php echo $lang->instance->log->date;?></th>
|
||||
<th><?php echo $lang->instance->log->message;?></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($logs as $log):?>
|
||||
<tr>
|
||||
<td><?php echo $log->date;?></td>
|
||||
<td><?php echo $this->instance->printLog($instance, $log);?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="table-footer"><?php $pager->show('right', 'pagerjs');?></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
/**
|
||||
* The custom install view file of instance module of QuCheng.
|
||||
*
|
||||
* @copyright Copyright 2021-2022 北京渠成软件有限公司(BeiJing QurCheng Software Co,LTD, www.qucheng.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @author Jianhua Wang <wangjianhua@easycorp.ltd>
|
||||
* @package instance
|
||||
* @version $Id$
|
||||
* @link https://www.qucheng.com
|
||||
*/
|
||||
?>
|
||||
<?php include $this->app->getModuleRoot() . '/common/view/header.html.php';?>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div class="btn-toolbar pull-left">
|
||||
<?php echo html::a($this->createLink('store', 'appView', "id={$appID}"), '<i class="icon icon-back icon-sm"></i> ' . $lang->goback, '', "class='btn btn-secondary'");?>
|
||||
</div>
|
||||
</div>
|
||||
<div id='mainContent' class='main-row'>
|
||||
<form class="cell load-indicator main-form form-ajax" method='post'>
|
||||
<h3><?php echo $lang->instance->customInstall;?></h3>
|
||||
<?php if(empty($components)):?>
|
||||
<div class="table-empty-tip">
|
||||
<p><?php echo html::a($this->createLink('store', 'appView', "id={$appID}"), $lang->instance->noComponent . '<i class="icon icon-back icon-sm"></i> ' . $lang->goback, '', "class='btn btn-info'");?></p>
|
||||
</div>
|
||||
<?php endif?>
|
||||
<ul class="nav nav-tabs">
|
||||
<?php foreach($components as $component):?>
|
||||
<li class="<?php echo$activeTab == $component->name ? 'active' : '';?>">
|
||||
<a data-tab href="#<?php echo $component->name;?>"><?php echo $component->name;?></a>
|
||||
</li>
|
||||
<?php endforeach?>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<?php foreach($components as $component):?>
|
||||
<div class="tab-pane <?php echo$activeTab == $component->name ? 'active' : '';?>" id="<?php echo $component->name;?>">
|
||||
<table class="table table-form">
|
||||
<tbody>
|
||||
<?php foreach($component->settings as $setting):?>
|
||||
<?php
|
||||
if($setting->type == 'choice')
|
||||
{
|
||||
$selectOptions = array_combine($setting->options, $setting->options);
|
||||
if(strpos($setting->field, 'resources_cpu') !== false) $selectOptions = $this->instance->getCpuOptions($setting->options);
|
||||
if(strpos($setting->field, 'resources_memory') !== false) $selectOptions = $this->instance->getMemOptions($setting->options);
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<th class='w-150px'><?php echo zget($this->lang->instance->componentFields, $setting->name, $setting->name);?></th>
|
||||
<td class='w-200px'>
|
||||
<div class='input-group'>
|
||||
<?php if($setting->type == 'choice') echo html::select($setting->field, $selectOptions, $setting->value, "class='form-control chosen'");?>
|
||||
<?php if($setting->type == 'int') echo html::number($setting->field, $setting->value, "class='form-control'", "require");?>
|
||||
</div>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
<?php if(!empty($components)):?>
|
||||
<div class="text-center form-actions"><?php echo html::submitButton($lang->instance->install);?></div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php include $this->app->getModuleRoot() . '/common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* The edit view file of instance module of QuCheng.
|
||||
*
|
||||
* @copyright Copyright 2021-2022 北京渠成软件有限公司(BeiJing QurCheng Software Co,LTD, www.qucheng.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @author Jianhua Wang <wangjianhua@easycorp.ltd>
|
||||
* @package instance
|
||||
* @version $Id$
|
||||
* @link https://www.qucheng.com
|
||||
*/
|
||||
?>
|
||||
<?php include $this->app->getModuleRoot() . '/common/view/header.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->instance->editName;?></h2>
|
||||
</div>
|
||||
<form method='post' target='hiddenwin' id='dataform'>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='w-100px'><?php echo $lang->instance->name;?></th>
|
||||
<td><?php echo html::input('name', $instance->name, "class='form-control' maxlength='50'");?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class='text-center form-actions'><?php echo html::submitButton() . html::backButton();?></div>
|
||||
</form>
|
||||
</div>
|
||||
<?php include $this->app->getModuleRoot() . '/common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,118 @@
|
||||
<?php
|
||||
/**
|
||||
* The install view file of instance module of QuCheng.
|
||||
*
|
||||
* @copyright Copyright 2021-2022 北京渠成软件有限公司(BeiJing QurCheng Software Co,LTD, www.qucheng.cn)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @author Jianhua Wang <wangjianhua@easycorp.ltd>
|
||||
* @package instance
|
||||
* @version $Id$
|
||||
* @link https://www.qucheng.cn
|
||||
*/
|
||||
?>
|
||||
<?php include $this->app->getModuleRoot() . '/common/view/header.html.php';?>
|
||||
<?php js::set('instanceNotices', $lang->instance->notices);?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->instance->installApp . $cloudApp->alias . $cloudApp->app_version;?></h2>
|
||||
</div>
|
||||
<form id='installForm' action='<?php echo helper::createLink("instance", "install", "id={$cloudApp->id}", '', '', false);?>' class="cell not-watch load-indicator main-form">
|
||||
<table class="table table-form">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class='w-80px'><?php echo $lang->instance->name;?></th>
|
||||
<td class='w-250px'>
|
||||
<div class='input-group'>
|
||||
<?php echo html::input('customName', $cloudApp->alias, "class='form-control' maxlength='20'");?>
|
||||
</div>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->instance->domain;?></th>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php echo html::input('customDomain', $thirdDomain, "class='form-control' maxlength='20'");?>
|
||||
<span class='input-group-addon'><?php echo $this->cne->sysDomain();?></span>
|
||||
</div>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class='advanced'><?php echo html::a("#advanced-settings", $lang->instance->advanceOption . "<i class='icon icon-chevron-double-down'></i>", '', "data-toggle='collapse'");?></div>
|
||||
<table class="collapse table table-form" id="advanced-settings">
|
||||
<tbody>
|
||||
<?php if(strtolower(getenv('ALLOW_SELECT_VERSION')) == 'true' || strtolower(getenv('ALLOW_SELECT_VERSION')) == '1'):?>
|
||||
<tr>
|
||||
<th class='w-80px'><?php echo $lang->instance->version;?></th>
|
||||
<td class='w-250px'>
|
||||
<div class='input-group'>
|
||||
<?php echo html::select('version', $versionList, '', "class='form-control'");?>
|
||||
</div>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php if(isset($cloudApp->features->ldap) && $this->loadModel('system')->hasSystemLDAP()):?>
|
||||
<tr>
|
||||
<th class='w-80px'></th>
|
||||
<td class='w-250px'>
|
||||
<div class='input-group'>
|
||||
<?php echo html::checkbox('ldapSnippet', array($this->system->ldapSnippetName() => $lang->instance->enableLDAP));?>
|
||||
</div>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php if(isset($cloudApp->features->mail) && $this->loadModel('system')->isSMTPEnabled()):?>
|
||||
<tr>
|
||||
<th class='w-80px'></th>
|
||||
<td class='w-250px'>
|
||||
<div class='input-group'>
|
||||
<?php echo html::checkbox('smtpSnippet', array($this->system->smtpSnippetName() => $lang->instance->enableSMTP));?>
|
||||
</div>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php if(isset($cloudApp->dependencies->mysql) and $mysqlList or isset($cloudApp->dependencies->postgresql) and $pgList):?>
|
||||
<tr>
|
||||
<th class='w-80px'><?php echo $lang->instance->dbType;?></th>
|
||||
<td class='w-250px'>
|
||||
<div class='input-group'>
|
||||
<?php echo html::radio('dbType', $lang->instance->dbTypes, 'sharedDB');?>
|
||||
</div>
|
||||
</td>
|
||||
<td><?php echo html::a('https://www.qucheng.com/book/Installation-manual/app-install-33.html',$lang->instance->howToSelectDB, '_blank');?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php if(isset($cloudApp->dependencies->mysql) and $mysqlList):?>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php echo html::select('dbService', $mysqlList, '', "class='form-control'");?>
|
||||
</div>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php elseif(isset($cloudApp->dependencies->postgresql) and $pgList):?>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php echo html::select('dbService', $pgList, '', "class='form-control'");?>
|
||||
</div>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="text-center form-actions"><?php echo html::submitButton($lang->instance->install);?></div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php include $this->app->getModuleRoot() . '/common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
/**
|
||||
* The custom install view file of instance module of QuCheng.
|
||||
*
|
||||
* @copyright Copyright 2021-2022 北京渠成软件有限公司(BeiJing QurCheng Software Co,LTD, www.qucheng.cn)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @author Jianhua Wang <wangjianhua@easycorp.ltd>
|
||||
* @package instance
|
||||
* @version $Id$
|
||||
* @link https://www.qucheng.cn
|
||||
*/
|
||||
?>
|
||||
<?php include $this->app->getModuleRoot() . '/common/view/header.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->instance->errors->notEnoughResource;?></h2>
|
||||
</div>
|
||||
<div><p style='padding-top: 15px;'><?php echo sprintf($lang->instance->errors->notEnoughMemory, $cloudApp->alias, $requiredMemory, $freeMemory, $gapMemory);?></p></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include $this->app->getModuleRoot() . '/common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
/**
|
||||
* The restore settings view file of instance module of QuCheng.
|
||||
*
|
||||
* @copyright Copyright 2021-2022 北京渠成软件有限公司(BeiJing QurCheng Software Co,LTD, www.qucheng.cn)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @author Jianhua Wang <wangjianhua@easycorp.ltd>
|
||||
* @package instance
|
||||
* @version $Id$
|
||||
* @link https://www.qucheng.cn
|
||||
*/
|
||||
?>
|
||||
<?php include $this->app->getModuleRoot() . '/common/view/header.html.php';?>
|
||||
<?php include $this->app->getModuleRoot() . '/common/view/datepicker.html.php';?>
|
||||
<?php js::set('instanceNotices', $lang->instance->notices);?>
|
||||
<?php js::set('instanceID', $instance->id);?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->instance->restore->autoRestore;?></h2>
|
||||
</div>
|
||||
<div>
|
||||
<form id='restoreSettingForm' method='post' class="cell not-watch load-indicator main-form">
|
||||
<h4>
|
||||
<?php echo html::checkbox('autoRestore', array('true' => $lang->instance->restore->enableAutoRestore), $restoreSettings->autoRestore ? 'true' : '');?>
|
||||
</h4>
|
||||
<table class="table table-form restore-settings">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><?php echo $lang->instance->restore->restoreTime;?></th>
|
||||
<td class='required'>
|
||||
<div class='input-group'>
|
||||
<div class='datepicker-wrapper datepicker-date'>
|
||||
<?php echo html::input('restoreTime', $restoreSettings->restoreTime, "class='form-control form-time' data-picker-position='bottom-right' maxlength='20'");?>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='w-80px'><?php echo $lang->instance->restore->cycleDays;?></th>
|
||||
<td class='required w-250px'>
|
||||
<div class='input-group'>
|
||||
<?php echo html::select('cycleDays', $lang->instance->restore->cycleList, $restoreSettings->cycleDays, "class='form-control' maxlength='20'");?>
|
||||
</div>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="text-center form-actions"><?php echo html::commonButton($lang->save, "id='saveSetting'", 'btn btn-primary');?></div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php include $this->app->getModuleRoot() . '/common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* The upgrade to senior App view file of instance module of QuCheng.
|
||||
*
|
||||
* @copyright Copyright 2021-2022 北京渠成软件有限公司(BeiJing QurCheng Software Co,LTD, www.qucheng.cn)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @author Jianhua Wang <wangjianhua@easycorp.ltd>
|
||||
* @package instance
|
||||
* @version $Id$
|
||||
* @link https://www.qucheng.cn
|
||||
*/
|
||||
?>
|
||||
<?php include $this->app->getModuleRoot() . '/common/view/header.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->instance->toSeniorAttention;?></h2>
|
||||
</div>
|
||||
<div>
|
||||
<form id='toSeniorForm' action="<?php echo $this->inLink('toSenior', "instanceID={$instance->id}&seniorAppID={$cloudApp->id}&confirm=yes");?>" class="cell not-watch load-indicator main-form form-ajax">
|
||||
<div><?php echo $lang->instance->toSeniorTips;?></div>
|
||||
<div>
|
||||
<?php echo html::checkbox('read', array('true'=>$lang->instance->hasRead));?>
|
||||
</div>
|
||||
<div class="text-center form-actions"><?php echo html::submitButton($lang->instance->upgrade, 'disabled');?></div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php include $this->app->getModuleRoot() . '/common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* The edit view file of instance module of QuCheng.
|
||||
*
|
||||
* @copyright Copyright 2021-2022 北京渠成软件有限公司(BeiJing QurCheng Software Co,LTD, www.qucheng.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @author Jianhua Wang <wangjianhua@easycorp.ltd>
|
||||
* @package instance
|
||||
* @version $Id$
|
||||
* @link https://www.qucheng.com
|
||||
*/
|
||||
?>
|
||||
<?php include $this->app->getModuleRoot() . '/common/view/header.html.php';?>
|
||||
<?php js::set('instanceNotices', $lang->instance->notices);?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo "{$lang->instance->upgrade} : {$instance->name}";?></h2>
|
||||
</div>
|
||||
<form method='post' action='<?php echo helper::createLink("instance", "upgrade", "id=$instance->id");?>' id='upgradeForm'>
|
||||
<?php if(empty($instance->latestVersion)):?>
|
||||
<p class='modal-message text-center'><?php echo $lang->instance->noHigherVersion;?></p>
|
||||
<?php else:?>
|
||||
<p class='modal-message text-center'><?php echo $lang->instance->notices['confirmUpgrade'];?></p>
|
||||
<?php echo html::hidden('confirm', 'yes');?>
|
||||
<div class='text-center'>
|
||||
<button type="button" class="btn btn-default btn-wide" data-dismiss="modal"><?php echo $lang->cancel;?></button>
|
||||
<?php echo html::submitButton($lang->instance->upgrade);?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</form>
|
||||
</div>
|
||||
<?php include $this->app->getModuleRoot() . '/common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
/**
|
||||
* The detail view file of instance module of QuCheng.
|
||||
*
|
||||
* @copyright Copyright 2021-2022 北京渠成软件有限公司(BeiJing QuCheng Software Co,LTD, www.qucheng.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @author Jianhua Wang <wangjianhua@easycorp.ltd>
|
||||
* @package instance
|
||||
* @version $Id$
|
||||
* @link https://www.qucheng.com
|
||||
*/
|
||||
?>
|
||||
<?php include $this->app->getModuleRoot() . '/common/view/header.html.php';?>
|
||||
<?php js::set('instanceNotices', $lang->instance->notices);?>
|
||||
<?php js::set('instanceIdList', array($instance->id));?>
|
||||
<?php js::set('demoAppLife', $config->demoAppLife);?>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div class='btn-toolbar pull-left instance-name'>
|
||||
<h3><?php echo $instance->name;?></h3>
|
||||
<span><?php echo $instance->appVersion;?></span>
|
||||
<?php echo html::a($this->createLink('instance', 'editname', "id=$instance->id", '', true), '<i class="icon-edit"></i>', '', "class='iframe' title='$lang->edit' data-width='600' data-app='space'");?>
|
||||
<?php if($instance->solution):?>
|
||||
<?php echo html::a(helper::createLink('solution', 'view', "id=$instance->solution"), $instance->solutionData->name, '', "class='label label-success label-outline solution-link'");?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<div class='btn-toolbar pull-right instance-panel'>
|
||||
<div class="">
|
||||
<?php $this->instance->printTextActions($instance);?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='mainContent' class='main-row'>
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="<?php echo $tab == 'baseinfo' ? 'active' : '';?>"><a href="<?php echo $this->createLink('instance', 'view', "id=$instance->id&page=&perPage=&pageSize=&tab=baseinfo");?>"><?php echo $lang->instance->baseInfo;?></a></li>
|
||||
<li class="<?php echo $tab == 'backup' ? 'active' : '';?>"><a href="<?php echo $this->createLink('instance', 'view', "id={$instance->id}&total=&perPage=&pageID=&tab=backup");?>"><?php echo $lang->instance->backupAndRestore;?></a></li>
|
||||
<li class="<?php echo $tab == 'advance' ? 'active' : '';?>"><a href="<?php echo $this->createLink('instance', 'view', "id={$instance->id}&total=&perPage=&pageID=&tab=advance");?>"><?php echo $lang->instance->advance;?></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane <?php echo $tab == 'baseinfo' ? 'active' : '';?>" id="baseInfo">
|
||||
<?php include 'baseinfo.html.php';?>
|
||||
</div>
|
||||
<div class="tab-pane <?php echo $tab == 'backup' ? 'active' : '';?>" id="backup">
|
||||
<?php if($tab == 'backup') include 'backup.html.php';?>
|
||||
</div>
|
||||
<div class="tab-pane <?php echo $tab == 'advance' ? 'active' : '';?>" id="advance">
|
||||
<?php if($tab == 'advance') include 'advance.html.php';?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include $this->app->getModuleRoot() . '/common/view/footer.html.php';?>
|
||||
Reference in New Issue
Block a user