automation.html.php 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <?php
  2. /**
  3. * The automation view file of testcase 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 Tingting Dai <daitingting@easycorp.ltd>
  7. * @package testcase
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. to::header
  12. (
  13. span
  14. (
  15. $lang->testcase->automation,
  16. setClass('text-lg font-bold')
  17. ),
  18. icon
  19. (
  20. 'help',
  21. set::title($lang->zanode->automationTips),
  22. setClass('text-gray')
  23. )
  24. );
  25. formPanel
  26. (
  27. $productID ? formHidden('product', $productID) : formGroup
  28. (
  29. set::label($lang->testcase->product),
  30. set::required(true),
  31. picker
  32. (
  33. set::name('product'),
  34. set::items($products),
  35. on::change('#product', 'loadProduct')
  36. )
  37. ),
  38. formGroup
  39. (
  40. set::label($lang->zanode->common),
  41. set::required(true),
  42. inputGroup
  43. (
  44. picker
  45. (
  46. setID('node'),
  47. set::name('node'),
  48. set::items($nodeList),
  49. set::value(isset($automation->node) ? $automation->node : '')
  50. ),
  51. div
  52. (
  53. setClass('input-group-btn'),
  54. a
  55. (
  56. setClass('btn'),
  57. $lang->zanode->create,
  58. set::href(createLink('zanode', 'create')),
  59. set::target('_blank')
  60. )
  61. )
  62. )
  63. ),
  64. formGroup
  65. (
  66. set::label($lang->zanode->scriptPath),
  67. set::required(true),
  68. set::name('scriptPath'),
  69. set::value(isset($automation->scriptPath) ? $automation->scriptPath : ''),
  70. set::placeholder($lang->zanode->scriptTips)
  71. ),
  72. formGroup
  73. (
  74. set::label($lang->zanode->shell),
  75. textarea
  76. (
  77. set::name('shell'),
  78. set::value(isset($automation->shell) ? $automation->shell : ''),
  79. set::rows(6),
  80. set::placeholder($lang->zanode->shellTips)
  81. )
  82. ),
  83. formHidden('id', isset($automation->id) ? $automation->id : 0),
  84. set::actions(array('submit')),
  85. set::submitBtnText($lang->save)
  86. );