dtable.php 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <?php
  2. global $lang, $app;
  3. $app->loadLang('job');
  4. $app->loadLang('compile');
  5. $config->job->dtable = new stdclass();
  6. $config->job->dtable->fieldList['id']['title'] = 'ID';
  7. $config->job->dtable->fieldList['id']['name'] = 'id';
  8. $config->job->dtable->fieldList['id']['fixed'] = 'left';
  9. $config->job->dtable->fieldList['id']['type'] = 'id';
  10. $config->job->dtable->fieldList['id']['sortType'] = 'text';
  11. $config->job->dtable->fieldList['id']['checkbox'] = false;
  12. $config->job->dtable->fieldList['name']['title'] = $lang->job->name;
  13. $config->job->dtable->fieldList['name']['name'] = 'name';
  14. $config->job->dtable->fieldList['name']['fixed'] = 'left';
  15. $config->job->dtable->fieldList['name']['type'] = 'desc';
  16. $config->job->dtable->fieldList['name']['sortType'] = true;
  17. $config->job->dtable->fieldList['name']['minWidth'] = '350';
  18. $config->job->dtable->fieldList['name']['hint'] = true;
  19. $config->job->dtable->fieldList['name']['show'] = true;
  20. $config->job->dtable->fieldList['name']['required'] = true;
  21. $config->job->dtable->fieldList['name']['checkbox'] = false;
  22. $config->job->dtable->fieldList['name']['link'] = array('module' => 'job', 'method' => 'view', 'params' => 'jobID={id}');
  23. $config->job->dtable->fieldList['name']['data-toggle'] = 'modal';
  24. $config->job->dtable->fieldList['lastStatus']['title'] = $lang->job->lastStatus;
  25. $config->job->dtable->fieldList['lastStatus']['name'] = 'lastStatus';
  26. $config->job->dtable->fieldList['lastStatus']['sortType'] = true;
  27. $config->job->dtable->fieldList['lastStatus']['width'] = '110';
  28. $config->job->dtable->fieldList['lastStatus']['hint'] = true;
  29. $config->job->dtable->fieldList['lastStatus']['map'] = $lang->compile->statusList;
  30. $config->job->dtable->fieldList['lastStatus']['show'] = true;
  31. $config->job->dtable->fieldList['buildSpec']['title'] = $lang->job->buildSpec;
  32. $config->job->dtable->fieldList['buildSpec']['name'] = 'buildSpec';
  33. $config->job->dtable->fieldList['buildSpec']['type'] = 'text';
  34. $config->job->dtable->fieldList['buildSpec']['sortType'] = false;
  35. $config->job->dtable->fieldList['buildSpec']['minWidth'] = '120';
  36. $config->job->dtable->fieldList['buildSpec']['hint'] = true;
  37. $config->job->dtable->fieldList['buildSpec']['show'] = true;
  38. $config->job->dtable->fieldList['productName']['title'] = $lang->job->product;
  39. $config->job->dtable->fieldList['productName']['type'] = 'text';
  40. $config->job->dtable->fieldList['productName']['sortType'] = false;
  41. $config->job->dtable->fieldList['productName']['minWidth'] = '120';
  42. $config->job->dtable->fieldList['productName']['hint'] = true;
  43. $config->job->dtable->fieldList['productName']['show'] = true;
  44. $config->job->dtable->fieldList['repoName']['title'] = $lang->job->repo;
  45. $config->job->dtable->fieldList['repoName']['sortType'] = true;
  46. $config->job->dtable->fieldList['repoName']['width'] = '100';
  47. $config->job->dtable->fieldList['repoName']['hint'] = true;
  48. $config->job->dtable->fieldList['repoName']['show'] = true;
  49. $config->job->dtable->fieldList['engine']['title'] = $lang->job->engine;
  50. $config->job->dtable->fieldList['engine']['name'] = 'engine';
  51. $config->job->dtable->fieldList['engine']['sortType'] = true;
  52. $config->job->dtable->fieldList['engine']['width'] = '80';
  53. $config->job->dtable->fieldList['engine']['hint'] = true;
  54. $config->job->dtable->fieldList['engine']['show'] = true;
  55. $config->job->dtable->fieldList['frame']['title'] = $lang->job->frame;
  56. $config->job->dtable->fieldList['frame']['name'] = 'frame';
  57. $config->job->dtable->fieldList['frame']['sortType'] = true;
  58. $config->job->dtable->fieldList['frame']['width'] = '100';
  59. $config->job->dtable->fieldList['frame']['hint'] = true;
  60. $config->job->dtable->fieldList['frame']['show'] = true;
  61. $config->job->dtable->fieldList['triggerType']['title'] = $lang->job->triggerType;
  62. $config->job->dtable->fieldList['triggerType']['name'] = 'triggerType';
  63. $config->job->dtable->fieldList['triggerType']['sortType'] = false;
  64. $config->job->dtable->fieldList['triggerType']['width'] = '100';
  65. $config->job->dtable->fieldList['triggerType']['hint'] = true;
  66. $config->job->dtable->fieldList['triggerType']['show'] = true;
  67. $config->job->dtable->fieldList['lastExec']['title'] = $lang->job->lastExec;
  68. $config->job->dtable->fieldList['lastExec']['name'] = 'lastExec';
  69. $config->job->dtable->fieldList['lastExec']['type'] = 'datetime';
  70. $config->job->dtable->fieldList['lastExec']['sortType'] = true;
  71. $config->job->dtable->fieldList['lastExec']['hint'] = true;
  72. $config->job->dtable->fieldList['lastExec']['show'] = true;
  73. $config->job->dtable->fieldList['lastExec']['formatDate'] = 'YYYY-MM-dd hh:mm';
  74. $config->job->actionList = array();
  75. $config->job->actionList['compile']['icon'] = 'file-log';
  76. $config->job->actionList['compile']['text'] = $lang->compile->browse;
  77. $config->job->actionList['compile']['hint'] = $lang->compile->browse;
  78. $config->job->actionList['compile']['url'] = array('module' => 'compile', 'method' => 'browse', 'params' => "repoID={repo}&jobID={id}");
  79. $config->job->actionList['trigger']['icon'] = 'trigger';
  80. $config->job->actionList['trigger']['text'] = $lang->job->trigger;
  81. $config->job->actionList['trigger']['hint'] = $lang->job->trigger;
  82. $config->job->actionList['trigger']['url'] = helper::createLink('job', 'trigger',"jobID={id}");
  83. $config->job->actionList['edit']['icon'] = 'edit';
  84. $config->job->actionList['edit']['text'] = $lang->job->edit;
  85. $config->job->actionList['edit']['hint'] = $lang->job->edit;
  86. $config->job->actionList['edit']['url'] = helper::createLink('job', 'edit',"jobID={id}");
  87. $config->job->actionList['exec']['icon'] = 'play';
  88. $config->job->actionList['exec']['text'] = $lang->job->exec;
  89. $config->job->actionList['exec']['hint'] = $lang->job->exec;
  90. $config->job->actionList['exec']['className'] = 'ajax-submit';
  91. $config->job->actionList['exec']['url'] = helper::createLink('job', 'exec',"jobID={id}");
  92. $config->job->actionList['delete']['icon'] = 'trash';
  93. $config->job->actionList['delete']['text'] = $lang->job->delete;
  94. $config->job->actionList['delete']['hint'] = $lang->job->delete;
  95. $config->job->actionList['delete']['ajaxSubmit'] = true;
  96. $config->job->actionList['delete']['url'] = helper::createLink('job', 'delete',"jobID={id}");
  97. $config->job->dtable->fieldList['actions']['name'] = 'actions';
  98. $config->job->dtable->fieldList['actions']['title'] = $lang->actions;
  99. $config->job->dtable->fieldList['actions']['width'] = 150;
  100. $config->job->dtable->fieldList['actions']['type'] = 'actions';
  101. $config->job->dtable->fieldList['actions']['menu'] = array('compile', 'trigger', 'edit', 'exec', 'delete');
  102. $config->job->dtable->fieldList['actions']['list'] = $config->job->actionList;