foreman_pipeline 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (211) hide show
  1. checksums.yaml +15 -0
  2. data/LICENSE +674 -0
  3. data/README.md +36 -0
  4. data/Rakefile +40 -0
  5. data/app/assets/javascripts/foreman_pipeline/foreman_pipeline-bootstrap.js +8 -0
  6. data/app/assets/javascripts/foreman_pipeline/foreman_pipeline.js +20 -0
  7. data/app/assets/javascripts/foreman_pipeline/jenkins-instances/details/jenkins-instance-details-info.controller.js +46 -0
  8. data/app/assets/javascripts/foreman_pipeline/jenkins-instances/details/jenkins-instance-details-users.controller.js +72 -0
  9. data/app/assets/javascripts/foreman_pipeline/jenkins-instances/details/jenkins-instance-details.controller.js +40 -0
  10. data/app/assets/javascripts/foreman_pipeline/jenkins-instances/details/views/jenkins-instance-details-info.html +36 -0
  11. data/app/assets/javascripts/foreman_pipeline/jenkins-instances/details/views/jenkins-instance-details-users.html +107 -0
  12. data/app/assets/javascripts/foreman_pipeline/jenkins-instances/details/views/jenkins-instance-details.html +53 -0
  13. data/app/assets/javascripts/foreman_pipeline/jenkins-instances/jenkins-instances.controller.js +34 -0
  14. data/app/assets/javascripts/foreman_pipeline/jenkins-instances/jenkins-instances.factory.js +14 -0
  15. data/app/assets/javascripts/foreman_pipeline/jenkins-instances/jenkins-instances.module.js +93 -0
  16. data/app/assets/javascripts/foreman_pipeline/jenkins-instances/new/new-jenkins-instance.controller.js +40 -0
  17. data/app/assets/javascripts/foreman_pipeline/jenkins-instances/new/views/new-jenkins-instance-form.html +50 -0
  18. data/app/assets/javascripts/foreman_pipeline/jenkins-instances/new/views/new-jenkins-instance.html +16 -0
  19. data/app/assets/javascripts/foreman_pipeline/jenkins-instances/views/jenkins-instances-table-collapsed.html +20 -0
  20. data/app/assets/javascripts/foreman_pipeline/jenkins-instances/views/jenkins-instances-table-full.html +30 -0
  21. data/app/assets/javascripts/foreman_pipeline/jenkins-instances/views/jenkins-instances.html +17 -0
  22. data/app/assets/javascripts/foreman_pipeline/jenkins-project-params/jenkins-project-params.factory.js +11 -0
  23. data/app/assets/javascripts/foreman_pipeline/jenkins-project-params/jenkins-project-params.module.js +6 -0
  24. data/app/assets/javascripts/foreman_pipeline/jenkins-projects/jenkins-projects.factory.js +9 -0
  25. data/app/assets/javascripts/foreman_pipeline/jenkins-projects/jenkins-projects.module.js +10 -0
  26. data/app/assets/javascripts/foreman_pipeline/jenkins-requests/jenkins-requests.factory.js +11 -0
  27. data/app/assets/javascripts/foreman_pipeline/jenkins-requests/jenkins-requests.module.js +10 -0
  28. data/app/assets/javascripts/foreman_pipeline/jenkins-users/details/jenkins-user-info.controller.js +39 -0
  29. data/app/assets/javascripts/foreman_pipeline/jenkins-users/details/views/jenkins-user-info.html +37 -0
  30. data/app/assets/javascripts/foreman_pipeline/jenkins-users/jenkins-users.factory.js +10 -0
  31. data/app/assets/javascripts/foreman_pipeline/jenkins-users/jenkins-users.module.js +6 -0
  32. data/app/assets/javascripts/foreman_pipeline/jenkins-users/new/new-jenkins-user.controller.js +45 -0
  33. data/app/assets/javascripts/foreman_pipeline/jenkins-users/new/views/new-jenkins-user.html +32 -0
  34. data/app/assets/javascripts/foreman_pipeline/jobs/details/job-details-add-paths.controller.js +63 -0
  35. data/app/assets/javascripts/foreman_pipeline/jobs/details/job-details-content-views.controller.js +55 -0
  36. data/app/assets/javascripts/foreman_pipeline/jobs/details/job-details-environments.controller.js +56 -0
  37. data/app/assets/javascripts/foreman_pipeline/jobs/details/job-details-hostgroups.controller.js +59 -0
  38. data/app/assets/javascripts/foreman_pipeline/jobs/details/job-details-info.controller.js +69 -0
  39. data/app/assets/javascripts/foreman_pipeline/jobs/details/job-details-jenkins-projects.controller.js +49 -0
  40. data/app/assets/javascripts/foreman_pipeline/jobs/details/job-details-jenkins.controller.js +56 -0
  41. data/app/assets/javascripts/foreman_pipeline/jobs/details/job-details-resources.controller.js +60 -0
  42. data/app/assets/javascripts/foreman_pipeline/jobs/details/job-details-to-environments.controller.js +157 -0
  43. data/app/assets/javascripts/foreman_pipeline/jobs/details/job-details.controller.js +34 -0
  44. data/app/assets/javascripts/foreman_pipeline/jobs/details/project-discovery/job-projects-discovery.controller.js +96 -0
  45. data/app/assets/javascripts/foreman_pipeline/jobs/details/project-discovery/job-projects-parameters.controller.js +54 -0
  46. data/app/assets/javascripts/foreman_pipeline/jobs/details/project-discovery/views/job-jenkins-projects.html +1 -0
  47. data/app/assets/javascripts/foreman_pipeline/jobs/details/project-discovery/views/job-projects-discovery.html +91 -0
  48. data/app/assets/javascripts/foreman_pipeline/jobs/details/project-discovery/views/job-projects-parameters.html +77 -0
  49. data/app/assets/javascripts/foreman_pipeline/jobs/details/views/job-details-content-views.html +83 -0
  50. data/app/assets/javascripts/foreman_pipeline/jobs/details/views/job-details-environments.html +50 -0
  51. data/app/assets/javascripts/foreman_pipeline/jobs/details/views/job-details-hostgroups.html +81 -0
  52. data/app/assets/javascripts/foreman_pipeline/jobs/details/views/job-details-info.html +117 -0
  53. data/app/assets/javascripts/foreman_pipeline/jobs/details/views/job-details-jenkins-projects.html +75 -0
  54. data/app/assets/javascripts/foreman_pipeline/jobs/details/views/job-details-jenkins.html +88 -0
  55. data/app/assets/javascripts/foreman_pipeline/jobs/details/views/job-details-paths-list.html +72 -0
  56. data/app/assets/javascripts/foreman_pipeline/jobs/details/views/job-details-resources.html +86 -0
  57. data/app/assets/javascripts/foreman_pipeline/jobs/details/views/job-details-to-environments.html +51 -0
  58. data/app/assets/javascripts/foreman_pipeline/jobs/details/views/job-details.html +80 -0
  59. data/app/assets/javascripts/foreman_pipeline/jobs/jobs.controller.js +40 -0
  60. data/app/assets/javascripts/foreman_pipeline/jobs/jobs.factory.js +54 -0
  61. data/app/assets/javascripts/foreman_pipeline/jobs/jobs.module.js +142 -0
  62. data/app/assets/javascripts/foreman_pipeline/jobs/new/new-job.controller.js +31 -0
  63. data/app/assets/javascripts/foreman_pipeline/jobs/new/views/new-job-form.html +47 -0
  64. data/app/assets/javascripts/foreman_pipeline/jobs/new/views/new-job.html +17 -0
  65. data/app/assets/javascripts/foreman_pipeline/jobs/views/jobs-table-collapsed.html +20 -0
  66. data/app/assets/javascripts/foreman_pipeline/jobs/views/jobs-table-full.html +66 -0
  67. data/app/assets/javascripts/foreman_pipeline/jobs/views/jobs.html +19 -0
  68. data/app/assets/javascripts/foreman_pipeline/jobs/views/pln-path-selector.html +10 -0
  69. data/app/assets/stylesheets/foreman_pipeline/foreman_pipeline.css +13 -0
  70. data/app/controllers/foreman_pipeline/api/jenkins_instances_controller.rb +124 -0
  71. data/app/controllers/foreman_pipeline/api/jenkins_project_params_controller.rb +34 -0
  72. data/app/controllers/foreman_pipeline/api/jenkins_projects_controller.rb +29 -0
  73. data/app/controllers/foreman_pipeline/api/jenkins_requests_controller.rb +28 -0
  74. data/app/controllers/foreman_pipeline/api/jenkins_users_controller.rb +89 -0
  75. data/app/controllers/foreman_pipeline/api/jobs_controller.rb +271 -0
  76. data/app/controllers/foreman_pipeline/application_controller.rb +4 -0
  77. data/app/helpers/foreman_pipeline/application_helper.rb +4 -0
  78. data/app/lib/actions/foreman_pipeline/jenkins/abstract_jenkins_action.rb +20 -0
  79. data/app/lib/actions/foreman_pipeline/jenkins/build.rb +35 -0
  80. data/app/lib/actions/foreman_pipeline/jenkins/build_project.rb +31 -0
  81. data/app/lib/actions/foreman_pipeline/jenkins/bulk_build.rb +23 -0
  82. data/app/lib/actions/foreman_pipeline/jenkins/get_build_details.rb +11 -0
  83. data/app/lib/actions/foreman_pipeline/jenkins/get_build_params.rb +11 -0
  84. data/app/lib/actions/foreman_pipeline/jenkins/get_version.rb +17 -0
  85. data/app/lib/actions/foreman_pipeline/jenkins/list.rb +15 -0
  86. data/app/lib/actions/foreman_pipeline/jenkins/wait_and_poll.rb +33 -0
  87. data/app/lib/actions/foreman_pipeline/jenkins/wait_for_build.rb +42 -0
  88. data/app/lib/actions/foreman_pipeline/jenkins/wait_host_ready.rb +36 -0
  89. data/app/lib/actions/foreman_pipeline/jenkins_instance/abstract_jenkins_instance_action.rb +17 -0
  90. data/app/lib/actions/foreman_pipeline/jenkins_instance/create_jenkins_instance_keys.rb +45 -0
  91. data/app/lib/actions/foreman_pipeline/job/create_activation_key.rb +20 -0
  92. data/app/lib/actions/foreman_pipeline/job/create_host.rb +88 -0
  93. data/app/lib/actions/foreman_pipeline/job/cv_promote_job_hook.rb +22 -0
  94. data/app/lib/actions/foreman_pipeline/job/cv_publish_job_hook.rb +22 -0
  95. data/app/lib/actions/foreman_pipeline/job/deploy_new_host.rb +25 -0
  96. data/app/lib/actions/foreman_pipeline/job/find_packages_to_install.rb +16 -0
  97. data/app/lib/actions/foreman_pipeline/job/job_hook.rb +24 -0
  98. data/app/lib/actions/foreman_pipeline/job/multiple_promotions.rb +18 -0
  99. data/app/lib/actions/foreman_pipeline/job/promote.rb +38 -0
  100. data/app/lib/actions/foreman_pipeline/job/redeploy.rb +45 -0
  101. data/app/lib/actions/foreman_pipeline/job/repo_sync_job_hook.rb +33 -0
  102. data/app/lib/actions/foreman_pipeline/job/run_job_manually.rb +25 -0
  103. data/app/lib/actions/foreman_pipeline/job/suspend_until_provisioned.rb +13 -0
  104. data/app/lib/actions/foreman_pipeline/mixins/ssh_extension.rb +41 -0
  105. data/app/lib/actions/foreman_pipeline/mixins/uri_extension.rb +14 -0
  106. data/app/lib/foreman_pipeline/api/rendering.rb +18 -0
  107. data/app/models/foreman_pipeline/authorization/base_model.rb +31 -0
  108. data/app/models/foreman_pipeline/authorization/jenkins_instance.rb +8 -0
  109. data/app/models/foreman_pipeline/authorization/jenkins_project.rb +8 -0
  110. data/app/models/foreman_pipeline/authorization/jenkins_project_param.rb +8 -0
  111. data/app/models/foreman_pipeline/authorization/jenkins_user.rb +7 -0
  112. data/app/models/foreman_pipeline/authorization/job.rb +7 -0
  113. data/app/models/foreman_pipeline/concerns/compute_resource_extension.rb +11 -0
  114. data/app/models/foreman_pipeline/concerns/content_view_extension.rb +12 -0
  115. data/app/models/foreman_pipeline/concerns/content_view_repository_extension.rb +12 -0
  116. data/app/models/foreman_pipeline/concerns/hostgroup_extension.rb +12 -0
  117. data/app/models/foreman_pipeline/concerns/kt_environment_extension.rb +18 -0
  118. data/app/models/foreman_pipeline/concerns/repository_extension.rb +12 -0
  119. data/app/models/foreman_pipeline/glue/elastic_search/base_model.rb +21 -0
  120. data/app/models/foreman_pipeline/glue/elastic_search/jenkins_instance.rb +11 -0
  121. data/app/models/foreman_pipeline/glue/elastic_search/jenkins_project.rb +11 -0
  122. data/app/models/foreman_pipeline/glue/elastic_search/jenkins_user.rb +11 -0
  123. data/app/models/foreman_pipeline/glue/elastic_search/job.rb +11 -0
  124. data/app/models/foreman_pipeline/jenkins_instance.rb +51 -0
  125. data/app/models/foreman_pipeline/jenkins_project.rb +18 -0
  126. data/app/models/foreman_pipeline/jenkins_project_param.rb +21 -0
  127. data/app/models/foreman_pipeline/jenkins_user.rb +15 -0
  128. data/app/models/foreman_pipeline/job.rb +72 -0
  129. data/app/models/foreman_pipeline/job_jenkins_project.rb +25 -0
  130. data/app/models/foreman_pipeline/job_to_environment.rb +19 -0
  131. data/app/views/foreman/unattended/snippets/_jenkins_instance_pubkey.erb +10 -0
  132. data/app/views/foreman_pipeline/api/common/async.json.rabl +3 -0
  133. data/app/views/foreman_pipeline/api/common/index.json.rabl +7 -0
  134. data/app/views/foreman_pipeline/api/compute_resources/index.json.rabl +3 -0
  135. data/app/views/foreman_pipeline/api/compute_resources/show.json.rabl +5 -0
  136. data/app/views/foreman_pipeline/api/content_views/index.json.rabl +3 -0
  137. data/app/views/foreman_pipeline/api/content_views/show.json.rabl +5 -0
  138. data/app/views/foreman_pipeline/api/environments/show.json.rabl +11 -0
  139. data/app/views/foreman_pipeline/api/hostgroups/index.json.rabl +3 -0
  140. data/app/views/foreman_pipeline/api/hostgroups/show.json.rabl +5 -0
  141. data/app/views/foreman_pipeline/api/jenkins_instances/index.json.rabl +3 -0
  142. data/app/views/foreman_pipeline/api/jenkins_instances/show.json.rabl +7 -0
  143. data/app/views/foreman_pipeline/api/jenkins_project_params/index.json.rabl +3 -0
  144. data/app/views/foreman_pipeline/api/jenkins_project_params/show.json.rabl +3 -0
  145. data/app/views/foreman_pipeline/api/jenkins_projects/index.json.rabl +3 -0
  146. data/app/views/foreman_pipeline/api/jenkins_projects/show.json.rabl +7 -0
  147. data/app/views/foreman_pipeline/api/jenkins_users/index.json.rabl +2 -0
  148. data/app/views/foreman_pipeline/api/jenkins_users/show.json.rabl +3 -0
  149. data/app/views/foreman_pipeline/api/jobs/available_paths.json.rabl +9 -0
  150. data/app/views/foreman_pipeline/api/jobs/index.json.rabl +3 -0
  151. data/app/views/foreman_pipeline/api/jobs/show.json.rabl +32 -0
  152. data/config/mount_engine.rb +3 -0
  153. data/config/routes.rb +53 -0
  154. data/db/migrate/20141003121914_create_job_table.rb +13 -0
  155. data/db/migrate/20141003145152_add_organization_to_jobs_table.rb +9 -0
  156. data/db/migrate/20141014125836_make_content_view_and_hostgroup_optional_for_job.rb +11 -0
  157. data/db/migrate/20141029121444_create_test_table.rb +11 -0
  158. data/db/migrate/20141029125423_add_organization_to_test_table.rb +9 -0
  159. data/db/migrate/20141030154210_create_jobs_tests_table.rb +12 -0
  160. data/db/migrate/20141120130350_add_resource_to_job.rb +9 -0
  161. data/db/migrate/20150121134503_create_jenkins_instances_table.rb +13 -0
  162. data/db/migrate/20150121134748_add_jenkins_instances_to_job_table.rb +9 -0
  163. data/db/migrate/20150122155819_add_kt_environment_to_jobs_table.rb +9 -0
  164. data/db/migrate/20150127101153_add_trigger_options_to_jobs_table.rb +13 -0
  165. data/db/migrate/20150202180711_add_content_column_to_tests_table.rb +9 -0
  166. data/db/migrate/20150209145400_add_pubkey_to_jenkins_instance_table.rb +9 -0
  167. data/db/migrate/20150209160604_add_jenkins_home_to_jenkins_instance_table.rb +9 -0
  168. data/db/migrate/20150212115234_add_uniqueness_to_jenkins_instance_url.rb +9 -0
  169. data/db/migrate/20150212125901_add_uniqueness_to_test_name.rb +9 -0
  170. data/db/migrate/20150213095447_add_cert_path_to_jenkins_instances.rb +9 -0
  171. data/db/migrate/20150216170951_add_build_step_to_tests_table.rb +9 -0
  172. data/db/migrate/20150223142315_change_jenkins_instance_cert_path_column.rb +9 -0
  173. data/db/migrate/20150224090100_create_jenkins_projects_table.rb +19 -0
  174. data/db/migrate/20150226182211_add_org_to_jenkins_project.rb +9 -0
  175. data/db/migrate/20150301134121_create_jenkins_project_params_table.rb +16 -0
  176. data/db/migrate/20150303134951_change_jenkins_project_param_value_column.rb +9 -0
  177. data/db/migrate/20150304123529_change_jenkins_project_params_table.rb +9 -0
  178. data/db/migrate/20150305122212_drop_tests_table.rb +5 -0
  179. data/db/migrate/20150312153833_create_jenkins_users.rb +15 -0
  180. data/db/migrate/20150313093244_add_jenkins_user_to_jobs.rb +9 -0
  181. data/db/migrate/20150313115956_change_jenkins_user_owner.rb +9 -0
  182. data/db/migrate/20150318141859_rename_tables.rb +19 -0
  183. data/db/migrate/20150323153355_remove_owner_from_jenkins_user.rb +9 -0
  184. data/db/migrate/20150323165954_add_jenkins_user_to_instance.rb +9 -0
  185. data/db/migrate/20150323175436_remove_jenkins_user_from_job.rb +9 -0
  186. data/db/migrate/20150324082437_remove_jenkins_instance_from_user.rb +9 -0
  187. data/db/migrate/20150324093416_add_promote_to_jobs.rb +9 -0
  188. data/db/migrate/20150324124034_create_job_path.rb +13 -0
  189. data/db/migrate/20150408143011_remove_cv_promote_from_job.rb +9 -0
  190. data/db/migrate/20150408145022_rename_job_path.rb +11 -0
  191. data/db/migrate/20150923073033_drop_orphaned_table.rb +8 -0
  192. data/lib/foreman_pipeline.rb +5 -0
  193. data/lib/foreman_pipeline/engine.rb +67 -0
  194. data/lib/foreman_pipeline/permissions.rb +3 -0
  195. data/lib/foreman_pipeline/permissions/jenkins_instance_permissions.rb +25 -0
  196. data/lib/foreman_pipeline/permissions/jenkins_project_params_permissions.rb +9 -0
  197. data/lib/foreman_pipeline/permissions/jenkins_projects_permissions.rb +9 -0
  198. data/lib/foreman_pipeline/permissions/jenkins_request_permissions.rb +9 -0
  199. data/lib/foreman_pipeline/permissions/jenkins_user_permissions.rb +24 -0
  200. data/lib/foreman_pipeline/permissions/job_permissions.rb +27 -0
  201. data/lib/foreman_pipeline/plugin.rb +17 -0
  202. data/lib/foreman_pipeline/roles.rb +13 -0
  203. data/lib/foreman_pipeline/tasks/foreman_pipeline_seed.rake +18 -0
  204. data/lib/foreman_pipeline/tasks/foreman_pipeline_test.rake +34 -0
  205. data/lib/foreman_pipeline/version.rb +3 -0
  206. data/test/factories/hostgroup_factory.rb +6 -0
  207. data/test/factories/jenkins_instance_related_factory.rb +20 -0
  208. data/test/foreman_pipeline_plugin_test_helper.rb +28 -0
  209. data/test/unit/job_test.rb +26 -0
  210. data/test/unit/sanity_test.rb +12 -0
  211. metadata +327 -0
@@ -0,0 +1,75 @@
1
+ <span page-title ng-model="job">{{ 'Job: ' | translate }} {{ job.name }}</span>
2
+
3
+ <section class="details details-full">
4
+ <div bst-alerts success-messages="successMessages" error-messages="errorMessages"></div>
5
+
6
+ <h4>
7
+ <span translate>Current Jenkins Projects: </span>
8
+ </h4>
9
+
10
+ <input type="text"
11
+ class="form-control filter-input"
12
+ placeholder="{{ 'Filter' | translate }}"
13
+ ng-model="jenkinsFilter"/>
14
+
15
+
16
+ <span class="pull-right">
17
+ <button class="btn btn-default"
18
+ ng-disabled="projectsTable.numSelected === 0 || projectsTable.working"
19
+ ng-show="isState('jobs.details.jenkins-projects.list') && permitted('edit_jobs', job) && projectsTable.rows.length > 0"
20
+ ng-click="removeProjects()">
21
+ <i class="fa fa-minus" ng-hide="projectsTable.working"></i>
22
+ <i class="fa fa-spinner fa-spin" ng-show="projectsTable.working"></i>
23
+ <span translate>Remove Projects</span>
24
+ </button>
25
+
26
+ <button class="btn btn-default"
27
+ ng-show="isState('jobs.details.jenkins-projects.list')
28
+ && permitted('edit_jobs', job)
29
+ && job.jenkins_instance !== null
30
+ && job.jenkins_user !== null"
31
+ ui-sref="jobs.details.jenkins-projects.discovery({jobId: job.id})"
32
+ translate>
33
+ <i class="fa fa-eye"></i>
34
+ Find more...
35
+ </button>
36
+ </span>
37
+
38
+
39
+
40
+
41
+ <table bst-table="projectsTable"
42
+ class="table table-striped"
43
+ ng-show="projectsTable.rows.length > 0 && !projectsTable.working"
44
+ ng-class="{'table-mask': projectsTable.working}">
45
+ <thead>
46
+ <tr bst-table-head row-select="jenkinsProject">
47
+ <th bst-table-column="name" translate>Name</th>
48
+ </tr>
49
+ </thead>
50
+
51
+ <tbody>
52
+ <tr bst-table-row ng-repeat="jenkinsProject in projectsTable.rows | filter:jenkinsFilter" row-select="jenkinsProject">
53
+ <td bst-table-cell>
54
+ <a href="" ui-sref="jobs.details.jenkins-projects.parameters({ projectId: jenkinsProject.id })">
55
+ {{ jenkinsProject.name }}
56
+ </a>
57
+ </td>
58
+ </tr>
59
+ </tbody>
60
+
61
+ </table>
62
+
63
+ </section>
64
+
65
+ <div ng-show="projectsTable.rows.length === 0">
66
+ <div class="loading-mask loading-mask-panel" ng-show="projectsTable.working">
67
+ <i class="fa fa-spinner fa-spin"></i>
68
+ {{ "Loading..." | translate }}
69
+ </div>
70
+
71
+ <p class="alert alert-info"
72
+ ng-hide="projectsTable.working"
73
+ translate> No Jenkins Projects to show.
74
+ </p>
75
+ </div>
@@ -0,0 +1,88 @@
1
+ <span page-title ng-model="job">{{ 'Job: ' | translate }} {{ job.name }}</span>
2
+
3
+ <div class="details details-full">
4
+ <div bst-alerts success-messages="successMessages" error-messages="errorMessages"></div>
5
+
6
+ <h4>
7
+ <span translate>Current Jenkins Instance: </span>
8
+ <a ui-sref="jenkins-instances.details.info({ jenkinsInstanceId: job.jenkins_instance.id })">
9
+ <span ng-show="job.jenkins_instance.name" ng-bind="job.jenkins_instance.name"></span>
10
+ </a>
11
+ <span ng-show="!job.jenkins_instance.name" translate>none</span>
12
+ </h4>
13
+
14
+ <br/>
15
+
16
+ <section>
17
+ <div class="details-header row">
18
+
19
+ <div class="col-sm-3" ng-show="jenkinsTable.rows.length > 0">
20
+ <input type="text"
21
+ class="form-control"
22
+ placeholder="{{ 'Filter' | translate }}"
23
+ ng-model="jenkinsFilter" />
24
+ </div>
25
+
26
+ <div class="fr select-action">
27
+
28
+ <span ng-show="jenkinsTable.rows.length > 0">
29
+ <button class="btn btn-default"
30
+ ng-hide="denied('edit_jobs')"
31
+ ng-disabled="!jenkinsTable.chosenRow || jenkinsTable.working"
32
+ ng-click="setJenkins()">
33
+ <i class="fa fa-pencil" ng-hide="jenkinsTable.working"></i>
34
+ <i class="fa fa-spinner fa-spin" ng-show="jenkinsTable.working"></i>
35
+ {{ 'Set Jenkins Instance' | translate }}
36
+ </button>
37
+ </span>
38
+
39
+ </div>
40
+ </div>
41
+
42
+ <div bst-table="jenkinsTable" class="nutupane" ng-show="jenkinsTable.rows.length > 0">
43
+ <div bst-container-scroll bst-infinite-scroll="jenkinsTable.nextPage()">
44
+
45
+ <table
46
+ ng-class="{'table-mask': jenkinsTable.working}"
47
+ class="table table-full table-striped">
48
+
49
+ <thead>
50
+ <tr bst-table-head row-choice="jenkinsInstance">
51
+ <th bst-table-column="name" translate>Name</th>
52
+ <th bst-table-column="url" translate>URL</th>
53
+ <th bst-table-column="user" translate>User</th>
54
+ </tr>
55
+ </thead>
56
+
57
+ <tbody>
58
+ <tr bst-table-row ng-repeat="jenkinsInstance in jenkinsTable.rows | filter:jenkinsFilter" row-choice="jenkinsInstance">
59
+
60
+ <td bst-table-cell>
61
+ <a ui-sref="jenkins-instances.details.info({ jenkinsInstanceId: jenkinsInstance.id })">
62
+ {{ jenkinsInstance.name }}
63
+ </a>
64
+ </td>
65
+
66
+ <td bst-table-cell>{{ jenkinsInstance.url }}</td>
67
+ <td bst-table-cell>{{ jenkinsInstance.jenkins_user.name }}</td>
68
+ </tr>
69
+ </tbody>
70
+
71
+ </table>
72
+ </div>
73
+ </div>
74
+ </section>
75
+
76
+ <div ng-show="jenkinsTable.rows.length === 0">
77
+ <div class="loading-mask loading-mask-panel" ng-show="jenkinsTable.working">
78
+ <i class="fa fa-spinner fa-spin"></i>
79
+ {{ "Loading..." | translate }}
80
+ </div>
81
+
82
+ <p class="alert alert-info"
83
+ ng-hide="jenkinsTable.working"
84
+ translate> No Jenkins Instances to show.
85
+ </p>
86
+ </div>
87
+
88
+ </div>
@@ -0,0 +1,72 @@
1
+ <span page-title ng-model="job">{{ 'Job: ' | translate }}{{ job.name }}</span>
2
+
3
+ <section class="nutupane-sub-section">
4
+ <div bst-alerts success-messages="successMessages" error-messages="errorMessages"></div>
5
+
6
+ <div ng-show="pathsTable.rows.length === 0">
7
+ <div class="loading-mask loading-mask-panel" ng-show="pathsTable.working">
8
+ <i class="fa fa-spinner fa-spin"></i>
9
+ {{ "Loading..." | translate }}
10
+ </div>
11
+
12
+ <p class="alert alert-info"
13
+ ng-hide="pathsTable.working"
14
+ translate> No Environment Paths to show.
15
+ </p>
16
+ </div>
17
+
18
+ <section ng-show="pathsTable.rows.length > 0">
19
+ <div class="row">
20
+ <div class="fr select-action">
21
+ <button ng-if="isState('jobs.details.to-environment.paths.add')"
22
+ class="btn btn-default"
23
+ ng-hide="denied('edit_jobs')"
24
+ ng-disabled="pathsTable.working || pathsTable.numSelected === 0"
25
+ ng-click="addPaths()">
26
+ <i class="fa fa-plus" ng-hide="pathsTable.working"></i>
27
+ <i class="fa fa-spinner fa-spin" ng-show="pathsTable.working"></i>
28
+ {{ 'Add Paths' | translate }}
29
+ </button>
30
+
31
+ <button ng-if="isState('jobs.details.to-environment.paths.list')"
32
+ class="btn btn-default"
33
+ ng-hide="denied('edit_jobs')"
34
+ ng-disabled="pathsTable.working || pathsTable.numSelected === 0"
35
+ ng-click="removePaths()">
36
+ <i class="fa fa-minus" ng-hide="pathsTable.working"></i>
37
+ <i class="fa fa-spinner fa-spin" ng-show="pathsTable.working"></i>
38
+ {{ 'Remove Paths' | translate }}
39
+ </button>
40
+
41
+ </div>
42
+ </div>
43
+
44
+ <div bst-table="pathsTable" class="nutupane" ng-show="pathsTable.rows.length > 0">
45
+ <div bst-container-scroll bst-infinite-scroll="pathsTable.nextPage()">
46
+
47
+ <table ng-class="{'table-mask': pathsTable.working}"
48
+ class="table table-full table-striped">
49
+
50
+ <thead>
51
+ <tr bst-table-head row-select="path">
52
+ <th bst-table-column="Environments" translate>Environments</th>
53
+ </tr>
54
+ </thead>
55
+
56
+ <tbody>
57
+ <tr bst-table-row ng-repeat="path in pathsTable.rows | filter:userFilter" row-select="path">
58
+
59
+ <td bst-table-cell>
60
+ <span ng-repeat="environment in path">
61
+ {{ environment.name + ", " }}
62
+ </span>
63
+ </td>
64
+
65
+
66
+ </tr>
67
+ </tbody>
68
+
69
+ </table>
70
+ </div>
71
+ </div>
72
+ </section>
@@ -0,0 +1,86 @@
1
+ <span page-title ng-model="job">{{ 'Job: ' | translate }} {{ job.name }}</span>
2
+
3
+ <p class="alert alert-info" ng-show="!job.hostgroup" translate>
4
+ You need to set Hostgroup for Resources to become available, you can set Hostgroup using the 'Hostgroups' tab.
5
+ </p>
6
+
7
+ <div class="details details-full" ng-show="job.hostgroup">
8
+ <div bst-alerts success-messages="successMessages" error-messages="errorMessages"></div>
9
+
10
+ <h4>
11
+ <span translate>Current Compute Resource: </span>
12
+ <a ng-click="transitionToResource(job.resource)" ng-show="job.compute_resource.name">
13
+ <span ng-bind="job.compute_resource.name"></span>
14
+ </a>
15
+ <span ng-show="!job.compute_resource.name" translate>none</span>
16
+ </h4>
17
+
18
+ <br/>
19
+
20
+ <div ng-show="table.rows.length === 0">
21
+ <div class="loading-mask loading-mask-panel" ng-show="table.working">
22
+ <i class="fa fa-spinner fa-spin"></i>
23
+ {{ "Loading..." | translate }}
24
+ </div>
25
+
26
+ <p class="alert alert-info"
27
+ ng-hide="table.working"
28
+ translate> No Compute Resources to show.
29
+ </p>
30
+ </div>
31
+
32
+ <section ng-show="table.rows.length > 0">
33
+ <div class="details-header row">
34
+ <div class="col-sm-3">
35
+ <input type="text"
36
+ class="form-control"
37
+ placeholder="{{ 'Filter' | translate }}"
38
+ ng-model="resourceFilter" />
39
+ </div>
40
+
41
+ <div class="fr select-action">
42
+ <button class="btn btn-default"
43
+ ng-hide="edit_jobs"
44
+ ng-disabled="!table.chosenRow || table.working"
45
+ ng-click="setResource()">
46
+ <i class="fa fa-pencil" ng-hide="table.working"></i>
47
+ <i class="fa fa-spinner fa-spin" ng-show="table.working"></i>
48
+ {{ 'Set Compute Resource' | translate }}
49
+ </button>
50
+ </div>
51
+ </div>
52
+
53
+ <div bst-table="table" class="nutupane">
54
+ <div bst-container-scroll bst-infinite-scroll="table.nextPage()">
55
+
56
+ <table
57
+ ng-class="{'table-mask': table.working}"
58
+ class="table table-striped table-full">
59
+
60
+ <thead>
61
+ <tr bst-table-head row-choice="resource">
62
+ <th bst-table-column="name" translate>Name</th>
63
+ <th bst-table-column="provider" translate>Provider</th>
64
+ <th bst-table-column="url" translate>Url</th>
65
+ </tr>
66
+ </thead>
67
+
68
+ <tbody>
69
+ <tr bst-table-row ng-repeat="resource in table.rows | filter:resourceFilter" row-choice="resource">
70
+
71
+ <td bst-table-cell>
72
+ <a ng-click="transitionToResource(resource)">
73
+ {{ resource.name }}
74
+ </a>
75
+ </td>
76
+ <td bst-table-cell>{{ resource.provider }}</td>
77
+ <td bst-table-cell>{{ resource.url }}</td>
78
+ </tr>
79
+
80
+ </tbody>
81
+
82
+ </table>
83
+ </div>
84
+ </div>
85
+ </section>
86
+ </div>
@@ -0,0 +1,51 @@
1
+ <span page-title ng-model="job">{{ 'Job: ' | translate }}{{ job.name }}</span>
2
+
3
+ <div class="row">
4
+ <div class="col-sm-5">
5
+ <a href="" ui-sref="jobs.details.environments.from-environment({jobId: job.id})">
6
+ <i class="fa fa-angle-double-left"></i>
7
+ {{ "Back" | translate }}
8
+ </a>
9
+ </div>
10
+ </div>
11
+ <h4 translate>Lifecycle Environment selection: select target environment</h4>
12
+ <section class="nutupane-sub-section">
13
+
14
+ <div bst-alerts success-messages="successMessages" error-messages="errorMessages"></div>
15
+
16
+ <div class="loading-mask loading-mask-panel" ng-show="loading">
17
+ <i class="fa fa-spinner fa-spin"></i>
18
+ {{ "Loading..." | translate }}
19
+ </div>
20
+
21
+
22
+ <section ng-hide="loading || availableEnvironments.length === 0">
23
+ <span pln-path-selector disabled="denied('edit_jobs', job)">
24
+ </span>
25
+
26
+ <span basic></span>
27
+
28
+ <br/>
29
+
30
+ <button class="btn btn-default"
31
+ ng-hide="denied('edit_jobs')"
32
+ ng-disabled="working"
33
+ ng-click="setToEnvironments()">
34
+ <i class="fa fa-pencil" ng-hide="working"></i>
35
+ <i class="fa fa-spinner fa-spin" ng-show="working"></i>
36
+ <span translate>Set To Environments</span>
37
+ </button>
38
+ </section>
39
+
40
+
41
+ <div ng-show="availableEnvironments.length === 0" >
42
+ <p class="alert alert-info"
43
+ ng-hide="loading"
44
+ translate> No Lifecycle Environments to show.
45
+ </p>
46
+ </div>
47
+
48
+ </section>
49
+
50
+
51
+
@@ -0,0 +1,80 @@
1
+ <span page-title ng-model="job">{{ 'Job: ' | translate }} {{ job.name }}</span>
2
+
3
+ <div class="loading-mask loading-mask-panel" ng-show="panel.loading">
4
+ <i class="fa fa-spinner fa-spin"></i>
5
+ {{ "Loading..." | translate}}
6
+ </div>
7
+
8
+ <section class="nutupane-details" ng-cloak bst-container-scroll>
9
+ <header class="details-header">
10
+
11
+ <h2 class="fl" translate>Job {{ job.name }} </h2>
12
+
13
+ <div class="fr">
14
+ <div bst-modal="deleteJob(job)">
15
+ <div data-block="modal-header" translate>Remove Job "{{ job.name }}"?</div>
16
+ <div data-block="modal-body" translate>Are you sure you want to remove Job "{{ job.name }}"?</div>
17
+ </div>
18
+
19
+ <button class="btn btn-default" ng-click="openModal()" ng-hide="denied('destroy_job', job)">
20
+ <i class="fa fa-trash-o"></i>
21
+ {{ "Delete Job" | translate }}
22
+ </button>
23
+
24
+ <button class="btn btn-default" ui-sref="jobs.index">
25
+ <i class="fa fa-remove"></i>
26
+ {{ "Close" | translate }}
27
+ </button>
28
+ </div>
29
+
30
+ </header>
31
+
32
+ <nav>
33
+ <ul class="nav nav-tabs">
34
+
35
+ <li ng-class="{active: stateIncludes('jobs.details.info')}">
36
+ <a ui-sref="jobs.details.info({jobId: job.id})">
37
+ <span translate>Details</span>
38
+ </a>
39
+ </li>
40
+
41
+ <li ng-class="{ active : stateIncludes('jobs.details.content-views')}">
42
+ <a ui-sref="jobs.details.content-views({jobId: job.id})">
43
+ <span translate>Content Views</span>
44
+ </a>
45
+ </li>
46
+
47
+ <li ng-class="{ active : stateIncludes('jobs.details.hostgroups')}">
48
+ <a ui-sref="jobs.details.hostgroups({jobId: job.id})">
49
+ <span translate>Hostgroups</span>
50
+ </a>
51
+ </li>
52
+
53
+ <li ng-class="{active: stateIncludes('jobs.details.resources')}">
54
+ <a ui-sref="jobs.details.resources">
55
+ <span translate>Compute Resources</span>
56
+ </a>
57
+ </li>
58
+
59
+ <li ng-class="{active: stateIncludes('jobs.details.jenkins-instances')}">
60
+ <a ui-sref="jobs.details.jenkins-instances({jobId: job.id})">
61
+ <span translate>Jenkins Instances</span>
62
+ </a>
63
+ </li>
64
+
65
+ <li ng-class="{active: stateIncludes('jobs.details.environments')}">
66
+ <a ui-sref="jobs.details.environments.from-environment">
67
+ <span translate>Environment</span>
68
+ </a>
69
+ </li>
70
+
71
+ <li ng-class="{active: stateIncludes('jobs.details.jenkins-projects')}">
72
+ <a ui-sref="jobs.details.jenkins-projects.list({jobId: job.id})">
73
+ <span translate>Jenkins Projects</span>
74
+ </a>
75
+ </li>
76
+ </ul>
77
+ </nav>
78
+
79
+ <section class="nutupane-sub-section" ui-view></section>
80
+ </section>