* Adjust solution install progress page.

This commit is contained in:
caoyanyi
2023-10-24 10:56:17 +08:00
parent feeefdc819
commit 9bc06c3846
6 changed files with 52 additions and 11 deletions
+2 -1
View File
@@ -19,7 +19,8 @@ class install extends control
*/
public function __construct()
{
if(!defined('IN_INSTALL')) helper::end();
if(!defined('IN_INSTALL') && !isonlybody()) helper::end();
parent::__construct();
$this->app->loadLang('user');
$this->app->loadLang('admin');
+6 -5
View File
@@ -45,7 +45,7 @@ $(function()
if(res.logs.hasOwnProperty(cloudApp.chart))
{
if(!shownLogs.hasOwnProperty(cloudApp.chart)) shownLogs[cloudApp.chart] = [];
var logs = res.logs[cloudApp.chart]
for(var j in logs)
{
@@ -67,7 +67,8 @@ $(function()
else
{
$('#retryInstallBtn').show();
$('#skipInstallBtn').show();
$('#skipInstallBtn').removeClass('btn-primary');
$('#skipInstallBtn').text(skipLang);
$('#cancelInstallBtn').hide();
$('.progress.loading').hide();
@@ -117,7 +118,8 @@ $(function()
if(!result) return;
$('#retryInstallBtn').hide();
$('#skipInstallBtn').hide();
$('#skipInstallBtn').text(backgroundLang);
$('#skipInstallBtn').addClass('btn-primary');
$('#cancelInstallBtn').show();
$('.error-message').text('');
$('.progress.loading').show();
@@ -142,7 +144,6 @@ $(function()
});
$('#retryInstallBtn').hide();
$('#skipInstallBtn').hide();
$('#cancelInstallBtn').show();
if('true' === startInstall)
@@ -154,4 +155,4 @@ $(function()
term.open(document.getElementById('terminal'));
});
var shownLogs = [];
var shownLogs = [];
+16 -4
View File
@@ -19,18 +19,29 @@
<?php js::set('installLabel', $lang->solution->install);?>
<?php js::set('configLabel', $lang->solution->config);?>
<?php js::set('startInstall', $install);?>
<?php js::set('skipLang', $lang->install->solution->skip);?>
<?php js::set('backgroundLang', $lang->solution->background);?>
<?php if(isonlybody()):?>
<style>
.solution-progress {margin-top: -20px;}
.m-install-progress .modal-dialog {margin-top: 0;}
</style>
<?php endif;?>
<div class='container'>
<div class='modal-dialog'>
<?php if(!isonlybody()):?>
<div class='modal-header'>
<h3><?php echo $lang->install->solution->progress;?></h3>
</div>
<?php endif;?>
<div class='modal-body'>
<div class='solution-progress'>
<div id='terminal'><h3><?php echo $lang->install->solution->log;?></h3></div>
<div class='text-center'>
<?php $components = json_decode($solution->components);?>
<?php $order =0;?>
<?php $order = 0;?>
<?php foreach($components as $category => $cloudApp):?>
<?php $active = (isset($cloudApp->status) && $cloudApp->status !='waiting') ? 'active' : '';?>
<?php if($order++ > 0):?>
@@ -47,14 +58,15 @@
<span class='progress-message'></span>
</div>
<div class='error-message text-red text-center'></div>
<?php if(!isonlybody()):?>
<div class='form-actions text-center'>
<?php echo html::a(inlink('step6'), $lang->install->solution->skip, '', "class='btn btn-install btn-wide' style='display: none;' id='skipInstallBtn'");?>
<?php echo html::a(inlink('step6'), $lang->solution->background, '', "class='btn btn-install btn-primary btn-wide' id='skipInstallBtn'");?>
<?php echo html::commonButton($lang->solution->retryInstall, "id='retryInstallBtn' class='hide'", 'btn btn-primary btn-wide');?>
<?php echo html::commonButton($lang->solution->cancelInstall, "id='cancelInstallBtn'", 'btn btn-primary btn-wide');?>
<?php echo html::commonButton($lang->solution->cancelInstall, "id='cancelInstallBtn'", 'btn btn-wide');?>
</div>
<?php endif;?>
</div>
</div>
</div>
</div>
<?php include $this->app->getModuleRoot() . '/common/view/footer.html.php';?>