view.html.php 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <?php
  2. /**
  3. * The detail view file of host module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
  6. * @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  7. * @author Ke Zhao<zhaoke@easycorp.ltd>
  8. * @package host
  9. * @link https://www.zentao.net
  10. */
  11. namespace zin;
  12. detailHeader
  13. (
  14. isAjaxRequest('modal') ? to::prefix() : '',
  15. to::title(
  16. entityLabel(
  17. set(array('entityID' => $host->id, 'level' => 1, 'text' => $host->name, 'className' => 'clip', 'title' => $host->name))
  18. )
  19. )
  20. );
  21. $actions = $this->loadModel('common')->buildOperateMenu($host);
  22. detailBody
  23. (
  24. sectionList
  25. (
  26. h::table
  27. (
  28. setClass('table table-fixed canvas host-view-table'),
  29. h::tr
  30. (
  31. isset($host->CD) ? h::th($lang->host->CD) : null,
  32. isset($host->CD) ? h::td($lang->host->CDlist[$host->CD]) : null,
  33. h::th($lang->host->name),
  34. h::td($host->name)
  35. ),
  36. h::tr
  37. (
  38. h::th($lang->host->group),
  39. h::td(zget($optionMenu, $host->group)),
  40. h::th($lang->host->serverRoom),
  41. h::td(zget($rooms, $host->serverRoom, ""))
  42. ),
  43. zget($host, 'CD') == 'spug' ? h::tr
  44. (
  45. h::th($lang->host->admin),
  46. h::td(zget($host, 'admin'))
  47. ) : null,
  48. zget($host, 'CD') == 'spug' ? h::tr
  49. (
  50. h::th($lang->host->password),
  51. h::td($lang->host->defaultPWD),
  52. h::th($lang->host->sshPort),
  53. h::td($host->sshPort)
  54. ) : null,
  55. h::tr(h::th($lang->host->cpuNumber), h::td($host->cpuNumber ? $host->cpuNumber : '')),
  56. h::tr
  57. (
  58. h::th($lang->host->memory),
  59. h::td($host->memory ? $host->memory . ' GB' : ''),
  60. h::th($lang->host->diskSize),
  61. h::td($host->diskSize ? $host->diskSize . ' GB' : '')
  62. ),
  63. h::tr
  64. (
  65. h::th($lang->host->intranet),
  66. h::td($host->intranet, set::title($host->intranet)),
  67. h::th($lang->host->extranet),
  68. h::td($host->extranet, set::title($host->extranet))
  69. ),
  70. h::tr
  71. (
  72. zget($host, 'CD') != 'spug' ? h::th($lang->host->osName) : null,
  73. zget($host, 'CD') != 'spug' ? h::td($host->osName) : null,
  74. h::th($lang->host->osVersion),
  75. zget($host, 'CD') == 'spug' ? h::td($host->osVersion) : null,
  76. zget($host, 'CD') != 'spug' && !empty($host->osName) ? h::td(zget($lang->host->{$host->osName.'List'}, $host->osVersion)) : null
  77. ),
  78. zget($host, 'CD') != 'spug' ? h::tr
  79. (
  80. h::th($lang->host->status),
  81. h::td($lang->host->statusList[$host->status]),
  82. h::th(),
  83. h::td()
  84. ) : null
  85. )
  86. ),
  87. history
  88. (
  89. set::commentUrl(createLink('action', 'comment', array('objectType' => 'host', 'objectID' => $host->id)))
  90. ),
  91. floatToolbar
  92. (
  93. set::object($host),
  94. isAjaxRequest('modal') ? null : to::prefix(backBtn(set::icon('back'), set::className('ghost text-white'), $lang->goback)),
  95. set::suffix($actions['suffixActions'])
  96. )
  97. );