progress.html.php 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <?php
  2. /**
  3. * The progress view file of install module of ZenTaoPMS.
  4. * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
  5. * @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  6. * @author Yanyi Cao <caoyanyi@easycorp.ltd>
  7. * @package install
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. if(!isInModal()) set::zui(true);
  12. $appList = array();
  13. $components = json_decode($solution->components);
  14. $order = 0;
  15. foreach($components as $category => $cloudApp)
  16. {
  17. $active = (isset($cloudApp->status) && $cloudApp->status !='waiting') ? 'active' : '';
  18. if($order > 0) $appList[] = span(setClass("progress-arrow app-{$cloudApp->id} {$active}"), '→');
  19. $order ++;
  20. $appList[] = div
  21. (
  22. setClass("step app-{$cloudApp->id} $active"),
  23. div(setClass("step-no {$active}"), $order),
  24. div
  25. (
  26. setClass('step-title'),
  27. span(setID("{$cloudApp->alias}-status")),
  28. $cloudApp->alias
  29. )
  30. );
  31. }
  32. jsVar('shownLogs', array());
  33. jsVar('startInstall', $startInstall);
  34. jsVar('solutionID ', $solution->id);
  35. jsVar('notices', $lang->solution->notices);
  36. jsVar('installLabel', $lang->solution->install);
  37. jsVar('configLabel', $lang->solution->config);
  38. jsVar('skipLang', $lang->install->solution->skip);
  39. jsVar('backgroundLang', $lang->solution->background);
  40. jsVar('isModal', helper::isAjaxRequest('modal'));
  41. $actions = array();
  42. if(!helper::isAjaxRequest('modal'))
  43. {
  44. $actions[] = array(
  45. 'text' => $lang->solution->background,
  46. 'url' => createLink('install', 'step6'),
  47. 'id' => 'skipInstallBtn',
  48. 'class' => 'btn primary',
  49. );
  50. }
  51. $actions[] = array(
  52. 'text' => $lang->solution->retryInstall,
  53. 'id' => 'retryInstallBtn',
  54. 'class' => 'btn primary hidden',
  55. 'onclick' => 'retryInstall(this)'
  56. );
  57. if(!helper::isAjaxRequest('modal'))
  58. {
  59. $actions[] = array(
  60. 'text' => $lang->solution->cancelInstall,
  61. 'id' => 'cancelInstallBtn',
  62. 'class' => 'btn',
  63. 'onclick' => 'cancelInstall(this)'
  64. );
  65. }
  66. div
  67. (
  68. setID('main'),
  69. setClass('flex justify-center'),
  70. div
  71. (
  72. setID('mainContent'),
  73. setClass('px-1 mt-2 w-full max-w-7xl'),
  74. h::importCss($app->getWebRoot() . 'js/xterm/xterm.css'),
  75. set('data-loading', $lang->solution->notices->uninstallingSolution),
  76. formPanel
  77. (
  78. setClass('bg-canvas m-auto mw-auto'),
  79. helper::isAjaxRequest('modal') ? null : set::title($lang->install->solution->progress),
  80. div
  81. (
  82. setID('terminal'),
  83. div(setClass('text-md font-bold pb-2'), $lang->install->solution->log)
  84. ),
  85. div
  86. (
  87. setClass('text-center app-list flex justify-center items-center'),
  88. $appList
  89. ),
  90. div(setClass('error-message text-warning text-center')),
  91. set::actions($actions)
  92. )
  93. )
  94. );
  95. if(!isInModal()) render('pagebase');