* Remove useless code.
This commit is contained in:
@@ -69,7 +69,6 @@ class instance extends control
|
||||
$this->view->instanceMetric = $instanceMetric;
|
||||
$this->view->currentResource = '';
|
||||
$this->view->customItems = array();
|
||||
$this->view->hasRestoreLog = false;
|
||||
$this->view->dbList = array();
|
||||
$this->view->domain = '';
|
||||
}
|
||||
@@ -124,7 +123,6 @@ class instance extends control
|
||||
$this->view->instanceMetric = $instanceMetric;
|
||||
$this->view->currentResource = $currentResource;
|
||||
$this->view->customItems = $customItems;
|
||||
$this->view->hasRestoreLog = $hasRestoreLog;
|
||||
$this->view->dbList = $dbList;
|
||||
$this->view->domain = $this->cne->getDomain($instance);
|
||||
}
|
||||
@@ -178,36 +176,6 @@ class instance extends control
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Upgrade to senior serial.
|
||||
*
|
||||
* @param int $instanceID
|
||||
* @param int $seniorAppID
|
||||
* @param string $confirm
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function toSenior(int $instanceID, int $seniorAppID, string $confirm = 'no')
|
||||
{
|
||||
$instance = $this->instance->getByID($instanceID);
|
||||
$cloudApp = $this->store->getAppInfo($seniorAppID, $instance->channel, false);
|
||||
if(empty($cloudApp)) return $this->send(array('result' => 'fail', 'message' => $this->lang->instance->errors->noAppInfo));
|
||||
|
||||
if($confirm == 'yes')
|
||||
{
|
||||
$success = $this->instance->upgradeToSenior($instance, $cloudApp);
|
||||
if($success) $this->send(array('result' => 'success', 'message' => '', 'locate' => $this->inLink('view', "id=$instance->id")));
|
||||
|
||||
$this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->instance->upgradeToSenior;
|
||||
$this->view->instance = $instance;
|
||||
$this->view->cloudApp = $cloudApp;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Upgrade instnace
|
||||
*
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
$(function(){
|
||||
$("#toSeniorForm input#readtrue").on('change', function()
|
||||
{
|
||||
if($('#toSeniorForm input#readtrue:checked').length > 0)
|
||||
{
|
||||
$('#toSeniorForm button[type=submit]').attr('disabled', false);
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#toSeniorForm button[type=submit]').attr('disabled', true);
|
||||
}
|
||||
});
|
||||
$("#toSeniorForm input#readtrue").change();
|
||||
});
|
||||
@@ -25,7 +25,6 @@ $lang->instance->enableLDAP = 'Enable LDAP';
|
||||
$lang->instance->linkLDAP = 'Integrated LDAP';
|
||||
$lang->instance->enableSMTP = 'Enable SMTP';
|
||||
$lang->instance->customSetting = 'Custom Configuration';
|
||||
$lang->instance->upgradeToSenior = 'Upgrade to Advanced Edition';
|
||||
$lang->instance->updateDomain = 'Update Domain Name';
|
||||
$lang->instance->updateLog = 'Update Log';
|
||||
$lang->instance->start = 'Start';
|
||||
@@ -191,7 +190,6 @@ $lang->instance->actionList['disableldap'] = 'LDAP disabled';
|
||||
$lang->instance->actionList['enablesmtp'] = 'enabled SMTP';
|
||||
$lang->instance->actionList['disablesmtp'] = 'SMTP disabled';
|
||||
$lang->instance->actionList['updatecustom'] = 'Modified custom configuration';
|
||||
$lang->instance->actionList['tosenior'] = 'Upgrade Service to Advanced Edition';
|
||||
$lang->instance->actionList['saveautobackupsettings'] = 'Modified automatic backup settings';
|
||||
$lang->instance->actionList['saveautorestoresettings'] = 'Modified automatic restore settings';
|
||||
$lang->instance->actionList['autobackup'] = 'The system has performed an automatic backup';
|
||||
@@ -307,7 +305,6 @@ $lang->instance->notices['notEnoughResource'] = 'Insufficient platform resource
|
||||
|
||||
$lang->instance->nameChangeTo = '%s is modified to %s.';
|
||||
$lang->instance->versionChangeTo = 'Upgrade %s to %s.';
|
||||
$lang->instance->toSeniorSerial = 'Upgrade from %s to %s.';
|
||||
$lang->instance->adjustMemorySize = 'It is recommended to adjust the memory to %s.';
|
||||
$lang->instance->enableAutoBackup = 'Enable automatic backup';
|
||||
$lang->instance->disableAutoBackup = 'Turn off automatic backup';
|
||||
@@ -323,8 +320,6 @@ $lang->instance->howToSelectDB = 'How to select';
|
||||
$lang->instance->appLifeTip = 'The application installed on the demo account has a 30 minute limit and will be automatically deleted after 30 minutes.';
|
||||
$lang->instance->serialDiff = 'View version differences';
|
||||
$lang->instance->descOfSwitchSerial = 'You are currently using<strong>%s</strong>. If you want to experience more advanced features, you can upgrade to %s.';
|
||||
$lang->instance->toSeniorAttention = 'Important reminder';
|
||||
$lang->instance->toSeniorTips = "<ul class = 'text dealer '><li>After upgrading to the original version, it is not possible to revert back to the original version.</li><li>The Enterprise and Ultimate versions are available for a free trial of 6 months after installation.</li><li>After upgrading from the Open Source version to the Enterprise or Ultimate versions, the trial period can support up to 3 users,Please check the number of open source users. Exceeding the limit will render it unusable</After the upgrade is successful, the service will automatically restart</To avoid data loss, please make sure to backup your data before upgrading</Li></ul>";
|
||||
|
||||
$lang->instance->errors = new stdclass;
|
||||
$lang->instance->errors->domainLength = 'The domain name length must be between 2 and 20 characters';
|
||||
@@ -343,5 +338,4 @@ $lang->instance->errors->failToAdjustMemory = 'Failed to adjust memory';
|
||||
$lang->instance->errors->switchLDAPFailed = 'Modifying LDAP settings failed';
|
||||
$lang->instance->errors->switchSMTPFailed = 'Modifying SMTP settings failed';
|
||||
$lang->instance->errors->updateCustomFailed = 'Modifying custom configuration failed';
|
||||
$lang->instance->errors->failToSenior = 'Upgrade to Advanced version failed';
|
||||
$lang->instance->errors->failedToUpdateDomain = 'Failed to update domain name';
|
||||
|
||||
@@ -25,7 +25,6 @@ $lang->instance->enableLDAP = 'Enable LDAP';
|
||||
$lang->instance->linkLDAP = 'Integrated LDAP';
|
||||
$lang->instance->enableSMTP = 'Enable SMTP';
|
||||
$lang->instance->customSetting = 'Custom Configuration';
|
||||
$lang->instance->upgradeToSenior = 'Upgrade to Advanced Edition';
|
||||
$lang->instance->updateDomain = 'Update Domain Name';
|
||||
$lang->instance->updateLog = 'Update Log';
|
||||
$lang->instance->start = 'Start';
|
||||
@@ -191,7 +190,6 @@ $lang->instance->actionList['disableldap'] = 'LDAP disabled';
|
||||
$lang->instance->actionList['enablesmtp'] = 'enabled SMTP';
|
||||
$lang->instance->actionList['disablesmtp'] = 'SMTP disabled';
|
||||
$lang->instance->actionList['updatecustom'] = 'Modified custom configuration';
|
||||
$lang->instance->actionList['tosenior'] = 'Upgrade Service to Advanced Edition';
|
||||
$lang->instance->actionList['saveautobackupsettings'] = 'Modified automatic backup settings';
|
||||
$lang->instance->actionList['saveautorestoresettings'] = 'Modified automatic restore settings';
|
||||
$lang->instance->actionList['autobackup'] = 'The system has performed an automatic backup';
|
||||
@@ -307,7 +305,6 @@ $lang->instance->notices['notEnoughResource'] = 'Insufficient platform resource
|
||||
|
||||
$lang->instance->nameChangeTo = '%s is modified to %s.';
|
||||
$lang->instance->versionChangeTo = 'Upgrade %s to %s.';
|
||||
$lang->instance->toSeniorSerial = 'Upgrade from %s to %s.';
|
||||
$lang->instance->adjustMemorySize = 'It is recommended to adjust the memory to %s.';
|
||||
$lang->instance->enableAutoBackup = 'Enable automatic backup';
|
||||
$lang->instance->disableAutoBackup = 'Turn off automatic backup';
|
||||
@@ -323,8 +320,6 @@ $lang->instance->howToSelectDB = 'How to select';
|
||||
$lang->instance->appLifeTip = 'The application installed on the demo account has a 30 minute limit and will be automatically deleted after 30 minutes.';
|
||||
$lang->instance->serialDiff = 'View version differences';
|
||||
$lang->instance->descOfSwitchSerial = 'You are currently using<strong>%s</strong>. If you want to experience more advanced features, you can upgrade to %s.';
|
||||
$lang->instance->toSeniorAttention = 'Important reminder';
|
||||
$lang->instance->toSeniorTips = "<ul class = 'text dealer '><li>After upgrading to the original version, it is not possible to revert back to the original version.</li><li>The Enterprise and Ultimate versions are available for a free trial of 6 months after installation.</li><li>After upgrading from the Open Source version to the Enterprise or Ultimate versions, the trial period can support up to 3 users,Please check the number of open source users. Exceeding the limit will render it unusable</After the upgrade is successful, the service will automatically restart</To avoid data loss, please make sure to backup your data before upgrading</Li></ul>";
|
||||
|
||||
$lang->instance->errors = new stdclass;
|
||||
$lang->instance->errors->domainLength = 'The domain name length must be between 2 and 20 characters';
|
||||
@@ -343,5 +338,4 @@ $lang->instance->errors->failToAdjustMemory = 'Failed to adjust memory';
|
||||
$lang->instance->errors->switchLDAPFailed = 'Modifying LDAP settings failed';
|
||||
$lang->instance->errors->switchSMTPFailed = 'Modifying SMTP settings failed';
|
||||
$lang->instance->errors->updateCustomFailed = 'Modifying custom configuration failed';
|
||||
$lang->instance->errors->failToSenior = 'Upgrade to Advanced version failed';
|
||||
$lang->instance->errors->failedToUpdateDomain = 'Failed to update domain name';
|
||||
|
||||
@@ -25,7 +25,6 @@ $lang->instance->enableLDAP = 'Enable LDAP';
|
||||
$lang->instance->linkLDAP = 'Integrated LDAP';
|
||||
$lang->instance->enableSMTP = 'Enable SMTP';
|
||||
$lang->instance->customSetting = 'Custom Configuration';
|
||||
$lang->instance->upgradeToSenior = 'Upgrade to Advanced Edition';
|
||||
$lang->instance->updateDomain = 'Update Domain Name';
|
||||
$lang->instance->updateLog = 'Update Log';
|
||||
$lang->instance->start = 'Start';
|
||||
@@ -191,7 +190,6 @@ $lang->instance->actionList['disableldap'] = 'LDAP disabled';
|
||||
$lang->instance->actionList['enablesmtp'] = 'enabled SMTP';
|
||||
$lang->instance->actionList['disablesmtp'] = 'SMTP disabled';
|
||||
$lang->instance->actionList['updatecustom'] = 'Modified custom configuration';
|
||||
$lang->instance->actionList['tosenior'] = 'Upgrade Service to Advanced Edition';
|
||||
$lang->instance->actionList['saveautobackupsettings'] = 'Modified automatic backup settings';
|
||||
$lang->instance->actionList['saveautorestoresettings'] = 'Modified automatic restore settings';
|
||||
$lang->instance->actionList['autobackup'] = 'The system has performed an automatic backup';
|
||||
@@ -307,7 +305,6 @@ $lang->instance->notices['notEnoughResource'] = 'Insufficient platform resource
|
||||
|
||||
$lang->instance->nameChangeTo = '%s is modified to %s.';
|
||||
$lang->instance->versionChangeTo = 'Upgrade %s to %s.';
|
||||
$lang->instance->toSeniorSerial = 'Upgrade from %s to %s.';
|
||||
$lang->instance->adjustMemorySize = 'It is recommended to adjust the memory to %s.';
|
||||
$lang->instance->enableAutoBackup = 'Enable automatic backup';
|
||||
$lang->instance->disableAutoBackup = 'Turn off automatic backup';
|
||||
@@ -323,8 +320,6 @@ $lang->instance->howToSelectDB = 'How to select';
|
||||
$lang->instance->appLifeTip = 'The application installed on the demo account has a 30 minute limit and will be automatically deleted after 30 minutes.';
|
||||
$lang->instance->serialDiff = 'View version differences';
|
||||
$lang->instance->descOfSwitchSerial = 'You are currently using<strong>%s</strong>. If you want to experience more advanced features, you can upgrade to %s.';
|
||||
$lang->instance->toSeniorAttention = 'Important reminder';
|
||||
$lang->instance->toSeniorTips = "<ul class = 'text dealer '><li>After upgrading to the original version, it is not possible to revert back to the original version.</li><li>The Enterprise and Ultimate versions are available for a free trial of 6 months after installation.</li><li>After upgrading from the Open Source version to the Enterprise or Ultimate versions, the trial period can support up to 3 users,Please check the number of open source users. Exceeding the limit will render it unusable</After the upgrade is successful, the service will automatically restart</To avoid data loss, please make sure to backup your data before upgrading</Li></ul>";
|
||||
|
||||
$lang->instance->errors = new stdclass;
|
||||
$lang->instance->errors->domainLength = 'The domain name length must be between 2 and 20 characters';
|
||||
@@ -343,5 +338,4 @@ $lang->instance->errors->failToAdjustMemory = 'Failed to adjust memory';
|
||||
$lang->instance->errors->switchLDAPFailed = 'Modifying LDAP settings failed';
|
||||
$lang->instance->errors->switchSMTPFailed = 'Modifying SMTP settings failed';
|
||||
$lang->instance->errors->updateCustomFailed = 'Modifying custom configuration failed';
|
||||
$lang->instance->errors->failToSenior = 'Upgrade to Advanced version failed';
|
||||
$lang->instance->errors->failedToUpdateDomain = 'Failed to update domain name';
|
||||
|
||||
@@ -25,7 +25,6 @@ $lang->instance->enableLDAP = '启用LDAP';
|
||||
$lang->instance->linkLDAP = '集成LDAP';
|
||||
$lang->instance->enableSMTP = '启用SMTP';
|
||||
$lang->instance->customSetting = '自定义配置';
|
||||
$lang->instance->upgradeToSenior = '升级到高级版';
|
||||
$lang->instance->updateDomain = '更新域名';
|
||||
$lang->instance->updateLog = '更新日志';
|
||||
$lang->instance->start = '启动';
|
||||
@@ -191,7 +190,6 @@ $lang->instance->actionList['disableldap'] = '禁用了LDAP';
|
||||
$lang->instance->actionList['enablesmtp'] = '启用了SMTP';
|
||||
$lang->instance->actionList['disablesmtp'] = '禁用了SMTP';
|
||||
$lang->instance->actionList['updatecustom'] = '修改了自定义配置';
|
||||
$lang->instance->actionList['tosenior'] = '升级服务到高级版';
|
||||
$lang->instance->actionList['saveautobackupsettings'] = '修改了自动备份设置';
|
||||
$lang->instance->actionList['saveautorestoresettings'] = '修改了自动还原设置';
|
||||
$lang->instance->actionList['autobackup'] = '系统执行了自动备份';
|
||||
@@ -307,7 +305,6 @@ $lang->instance->notices['notEnoughResource'] = '平台资源不足,要继续
|
||||
|
||||
$lang->instance->nameChangeTo = ' %s 修改为 %s 。';
|
||||
$lang->instance->versionChangeTo = ' %s 升级为 %s 。';
|
||||
$lang->instance->toSeniorSerial = '从 %s 升级到 %s 。';
|
||||
$lang->instance->adjustMemorySize = '建议调整内存到 %s 。';
|
||||
$lang->instance->enableAutoBackup = '开启自动备份';
|
||||
$lang->instance->disableAutoBackup = '关闭自动备份';
|
||||
@@ -323,8 +320,6 @@ $lang->instance->howToSelectDB = '如何选择?';
|
||||
$lang->instance->appLifeTip = 'demo账号安装的应用有30分钟限制,30分钟后自动删除。';
|
||||
$lang->instance->serialDiff = '查看版本区别';
|
||||
$lang->instance->descOfSwitchSerial = '您当前使用的是<strong>%s</strong>,想要体验更多高级功能,可升级至%s。';
|
||||
$lang->instance->toSeniorAttention = '重要提示';
|
||||
$lang->instance->toSeniorTips = "<ul class='text-danger'><li>版本升级后,无法回退到原版本。</li><li>企业版、旗舰版自安装后免费试用6个月。</li><li>开源版升级到企业版或旗舰版后,试用期最大支持3个用户,请检查开源版用户数量。超出限制将不可用。</li><li>升级成功后,服务将自动重启。</li><li>为避免造成数据丢失,请您在升级前务必做好数据备份。</li></ul>";
|
||||
|
||||
$lang->instance->errors = new stdclass;
|
||||
$lang->instance->errors->domainLength = '域名长度必须介于2-20字符之间';
|
||||
@@ -343,5 +338,4 @@ $lang->instance->errors->failToAdjustMemory = '调整内存失败';
|
||||
$lang->instance->errors->switchLDAPFailed = '修改LDAP设置失败';
|
||||
$lang->instance->errors->switchSMTPFailed = '修改SMTP设置失败';
|
||||
$lang->instance->errors->updateCustomFailed = '修改自定义配置失败';
|
||||
$lang->instance->errors->failToSenior = '升级到高级版失败';
|
||||
$lang->instance->errors->failedToUpdateDomain = '更新域名失败';
|
||||
|
||||
@@ -1107,53 +1107,6 @@ class InstanceModel extends model
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Upgrade to senior App.
|
||||
*
|
||||
* @param object $instance
|
||||
* @param object $seniorApp
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function upgradeToSenior($instance, $seniorApp)
|
||||
{
|
||||
$instance->chart = $seniorApp->chart;
|
||||
$instance->version = $seniorApp->version;
|
||||
|
||||
$settings = new stdclass;
|
||||
$settings->settings_map = new stdclass;
|
||||
$settings->settings_map->nameOverride = $this->parseK8Name($instance->k8name)->chart;
|
||||
|
||||
$settings->settings_map->global = new stdclass;
|
||||
$settings->settings_map->global->stopped = false;
|
||||
|
||||
if(!$this->cne->updateConfig($instance, $settings))
|
||||
{
|
||||
dao::$errors[] = $this->lang->instance->errors->failToSenior;
|
||||
return false;
|
||||
}
|
||||
|
||||
$seniorData = new stdclass;
|
||||
$seniorData->chart = $seniorApp->chart;
|
||||
$seniorData->version = $seniorApp->version;
|
||||
$seniorData->appVersion = $seniorApp->app_version;
|
||||
$seniorData->appID = $seniorApp->id;
|
||||
$seniorData->appName = $seniorApp->alias;
|
||||
$seniorData->name = $instance->name . "($seniorApp->alias)";
|
||||
|
||||
$this->dao->update(TABLE_INSTANCE)->data($seniorData)->where('id')->eq($instance->id)->exec();
|
||||
|
||||
$logExtra = new stdclass;
|
||||
$logExtra->result = 'success';
|
||||
$logExtra->data = new stdclass;
|
||||
$logExtra->data->oldAppName = $instance->appName;
|
||||
$logExtra->data->newAppName = $seniorApp->alias;
|
||||
|
||||
$this->action->create('instance', $instance->id, 'tosenior', '', json_encode($logExtra));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* Query and update instances status.
|
||||
*
|
||||
@@ -1576,15 +1529,6 @@ class InstanceModel extends model
|
||||
$newVersion = zget($extra->data, 'newVersion', '');
|
||||
$logText .= ', ' . sprintf($this->lang->instance->versionChangeTo, $oldVersion, $newVersion);
|
||||
break;
|
||||
case 'tosenior':
|
||||
$oldAppName = zget($extra->data, 'oldAppName', '');
|
||||
$newAppName = zget($extra->data, 'newAppName', '');
|
||||
$logText .= ', ' . sprintf($this->lang->instance->toSeniorSerial, $oldAppName, $newAppName);
|
||||
break;
|
||||
case 'saveautobackupsettings':
|
||||
$enableAutoBackup = zget($extra->data, 'autoBackup', 0);
|
||||
$logText .= ': ' . ($enableAutoBackup ? $this->lang->instance->enableAutoBackup : $this->lang->instance->disableAutoBackup);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
|
||||
|
||||
@@ -1,115 +0,0 @@
|
||||
<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>
|
||||
@@ -1,28 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* The upgrade to senior App view file of instance module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.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.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?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';?>
|
||||
Reference in New Issue
Block a user