foreman_pipeline 0.0.11 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/Rakefile +2 -1
  4. data/app/assets/javascripts/foreman_pipeline/jenkins-instances/details/jenkins-instance-details-info.controller.js +23 -2
  5. data/app/assets/javascripts/foreman_pipeline/jenkins-instances/details/jenkins-instance-details.controller.js +1 -23
  6. data/app/assets/javascripts/foreman_pipeline/jenkins-instances/details/views/jenkins-instance-details-info.html +31 -0
  7. data/app/assets/javascripts/foreman_pipeline/jenkins-instances/details/views/jenkins-instance-details-users.html +17 -14
  8. data/app/assets/javascripts/foreman_pipeline/jenkins-instances/details/views/jenkins-instance-details.html +3 -10
  9. data/app/assets/javascripts/foreman_pipeline/jenkins-instances/jenkins-instances.module.js +4 -1
  10. data/app/assets/javascripts/foreman_pipeline/jenkins-instances/new/new-jenkins-instance.controller.js +4 -7
  11. data/app/assets/javascripts/foreman_pipeline/jenkins-instances/new/views/new-jenkins-instance-form.html +18 -3
  12. data/app/assets/javascripts/foreman_pipeline/jenkins-users/new/new-jenkins-user.controller.js +5 -5
  13. data/app/assets/javascripts/foreman_pipeline/jobs/details/job-details-content-views.controller.js +3 -3
  14. data/app/assets/javascripts/foreman_pipeline/jobs/details/job-details-hostgroups.controller.js +3 -5
  15. data/app/assets/javascripts/foreman_pipeline/jobs/details/job-details-jenkins-projects.controller.js +2 -2
  16. data/app/assets/javascripts/foreman_pipeline/jobs/details/project-discovery/job-projects-discovery.controller.js +10 -1
  17. data/app/assets/javascripts/foreman_pipeline/jobs/details/project-discovery/views/job-projects-discovery.html +20 -12
  18. data/app/assets/javascripts/foreman_pipeline/jobs/details/views/job-details-content-views.html +12 -8
  19. data/app/assets/javascripts/foreman_pipeline/jobs/details/views/job-details-environments.html +10 -6
  20. data/app/assets/javascripts/foreman_pipeline/jobs/details/views/job-details-hostgroups.html +6 -2
  21. data/app/assets/javascripts/foreman_pipeline/jobs/details/views/job-details-jenkins-projects.html +7 -6
  22. data/app/assets/javascripts/foreman_pipeline/jobs/details/views/job-details-jenkins.html +15 -11
  23. data/app/assets/javascripts/foreman_pipeline/jobs/details/views/job-details-resources.html +16 -12
  24. data/app/assets/javascripts/foreman_pipeline/jobs/details/views/job-details-to-environments.html +11 -7
  25. data/app/assets/javascripts/foreman_pipeline/jobs/jobs.module.js +4 -1
  26. data/app/assets/stylesheets/foreman_pipeline/foreman_pipeline.css +4 -0
  27. data/app/controllers/foreman_pipeline/api/jenkins_instances_controller.rb +10 -3
  28. data/app/controllers/foreman_pipeline/api/jenkins_projects_controller.rb +1 -1
  29. data/app/controllers/foreman_pipeline/api/jenkins_users_controller.rb +1 -1
  30. data/app/controllers/foreman_pipeline/api/jobs_controller.rb +44 -48
  31. data/app/lib/actions/foreman_pipeline/jenkins/build.rb +9 -3
  32. data/app/lib/actions/foreman_pipeline/jenkins/build_project.rb +2 -0
  33. data/app/lib/actions/foreman_pipeline/jenkins/bulk_build.rb +4 -0
  34. data/app/lib/actions/foreman_pipeline/jenkins/list.rb +4 -0
  35. data/app/lib/actions/foreman_pipeline/jenkins_instance/create_jenkins_instance_keys.rb +1 -1
  36. data/app/lib/actions/foreman_pipeline/job/create_host.rb +2 -2
  37. data/app/lib/actions/foreman_pipeline/job/cv_promote_job_hook.rb +1 -3
  38. data/app/lib/actions/foreman_pipeline/job/cv_publish_job_hook.rb +1 -3
  39. data/app/lib/actions/foreman_pipeline/job/job_hook.rb +4 -3
  40. data/app/lib/actions/foreman_pipeline/job/repo_sync_job_hook.rb +4 -17
  41. data/app/lib/actions/foreman_pipeline/job/run_job_manually.rb +2 -11
  42. data/app/lib/actions/foreman_pipeline/job/wait_until_provisioned.rb +4 -1
  43. data/app/lib/actions/foreman_pipeline/mixins/uri_extension.rb +1 -1
  44. data/app/models/foreman_pipeline/jenkins_instance.rb +8 -6
  45. data/app/models/foreman_pipeline/jenkins_project.rb +2 -4
  46. data/app/models/foreman_pipeline/jenkins_project_param.rb +0 -1
  47. data/app/models/foreman_pipeline/jenkins_user.rb +0 -2
  48. data/app/models/foreman_pipeline/job.rb +24 -8
  49. data/app/models/foreman_pipeline/job_to_environment.rb +0 -2
  50. data/app/services/foreman_pipeline/job_filter.rb +34 -0
  51. data/app/views/foreman/unattended/snippets/_jenkins_instance_pubkey.erb +3 -3
  52. data/app/views/foreman_pipeline/api/jenkins_instances/show.json.rabl +1 -1
  53. data/config/routes.rb +2 -7
  54. data/db/migrate/20150209160604_add_jenkins_home_to_jenkins_instance_table.rb +1 -1
  55. data/db/migrate/20150213095447_add_cert_path_to_jenkins_instances.rb +1 -1
  56. data/db/migrate/20150223142315_change_jenkins_instance_cert_path_column.rb +1 -1
  57. data/db/migrate/20150224090100_create_jenkins_projects_table.rb +4 -4
  58. data/db/migrate/20160404102405_update_projects_table.rb +9 -0
  59. data/db/migrate/20160404133012_drop_job_jenkins_project.rb +30 -0
  60. data/db/migrate/20160629085119_add_timeout_to_jenkins_instance.rb +9 -0
  61. data/db/seeds.d/location.rb +9 -0
  62. data/db/seeds.d/snippets.rb +11 -0
  63. data/lib/foreman_pipeline/engine.rb +1 -2
  64. data/lib/foreman_pipeline/plugin.rb +1 -1
  65. data/lib/foreman_pipeline/roles.rb +3 -3
  66. data/lib/foreman_pipeline/skip_tests.rb +22 -6
  67. data/lib/foreman_pipeline/tasks/{foreman_pipeline_test.rake → test.rake} +3 -2
  68. data/lib/foreman_pipeline/version.rb +1 -1
  69. data/test/fixtures/jenkins_instances.yml +8 -0
  70. data/test/fixtures/jenkins_projects.yml +9 -0
  71. data/test/fixtures/jenkins_users.yml +4 -0
  72. data/test/fixtures/jobs.yml +47 -0
  73. data/test/fixtures/pipeline_compute_attributes.yml +20 -0
  74. data/test/fixtures/pipeline_compute_profiles.yml +5 -0
  75. data/test/fixtures/pipeline_hostgroups.yml +25 -0
  76. data/test/fixtures_support.rb +17 -0
  77. data/test/{foreman_pipeline_plugin_test_helper.rb → foreman_pipeline_test_helper.rb} +17 -8
  78. data/test/functional/foreman_pipeline/api/jenkins_users_controller_test.rb +47 -0
  79. data/test/functional/foreman_pipeline/api/jobs_controller_test.rb +186 -0
  80. data/test/{unit → models}/jenkins_instance_test.rb +1 -1
  81. data/test/{unit → models}/job_test.rb +111 -55
  82. data/test/services/job_filter_test.rb +59 -0
  83. metadata +37 -16
  84. data/app/models/foreman_pipeline/job_jenkins_project.rb +0 -27
  85. data/lib/foreman_pipeline/tasks/foreman_pipeline_seed.rake +0 -28
  86. data/test/factories/hostgroup_factory.rb +0 -5
  87. data/test/unit/sanity_test.rb +0 -12
@@ -2,7 +2,7 @@
2
2
 
3
3
  <div class="details details-full">
4
4
  <div bst-alerts success-messages="successMessages" error-messages="errorMessages"></div>
5
-
5
+
6
6
  <div class="row">
7
7
  <div class="col-sm-5">
8
8
  <a href="" ui-sref="jobs.details.jenkins-projects.list({jobId: job.id})">
@@ -19,9 +19,9 @@
19
19
 
20
20
  <div class="details-header row">
21
21
  <form ng-submit="discover()" role="form" class="col-sm-6" ng-show="permitted('edit_jobs', job)">
22
- <div class="input-group" >
23
-
24
- <input type="text"
22
+ <div class="input-group" >
23
+
24
+ <input type="text"
25
25
  class="form-control input-lg"
26
26
  placeholder="{{ 'Search by name...' | translate }}"
27
27
  ng-model="discovery.pattern"
@@ -31,10 +31,14 @@
31
31
  <button translate
32
32
  class="btn btn-primary btn-lg"
33
33
  ng-disabled="discovery.pending || discovery.pattern === '' ">
34
- <i class="fa fa-search" ng-show="!discovery.pending"></i>
35
- <i class="fa fa-spinner fa-spin" ng-show="discovery.pending"></i>
34
+ <span ng-show="!discovery.pending">
35
+ <i class="fa fa-search"></i>
36
+ </span>
37
+ <span ng-show="discovery.pending">
38
+ <i class="fa fa-spinner fa-spin"></i>
39
+ </span>
36
40
  Search
37
- </button>
41
+ </button>
38
42
  </span>
39
43
  </div>
40
44
  </form>
@@ -59,11 +63,15 @@
59
63
  ng-disabled="projectsTable.numSelected === 0 || discovery.pending || projectsTable.working"
60
64
  ng-show="isState('jobs.details.jenkins-projects.discovery') && permitted('edit_jobs', job)"
61
65
  ng-click="addProjects(job)">
62
- <i class="fa fa-plus" ng-hide="projectsTable.working"></i>
63
- <i class="fa fa-spinner fa-spin" ng-show="projectsTable.working"></i>
66
+ <span ng-hide="projectsTable.working">
67
+ <i class="fa fa-plus"></i>
68
+ </span>
69
+ <span ng-show="projectsTable.working">
70
+ <i class="fa fa-spinner fa-spin"></i>
71
+ </span>
64
72
  <span translate>Add Projects</span>
65
- </button>
66
- </div>
73
+ </button>
74
+ </div>
67
75
  </div>
68
76
  </div>
69
77
 
@@ -78,7 +86,7 @@
78
86
  </thead>
79
87
 
80
88
  <tbody>
81
- <tr bst-table-row
89
+ <tr bst-table-row
82
90
  row-select="project"
83
91
  ng-repeat="project in projectsTable.rows | filter:projectsTable.filterTerm">
84
92
  <td bst-table-cell>{{ project.name }}</td>
@@ -15,10 +15,10 @@
15
15
 
16
16
  <section ng-show="cvTable.rows.length > 0">
17
17
  <div class="details-header row">
18
-
18
+
19
19
  <div class="col-sm-3">
20
20
  <input type="text"
21
- class="form-control"
21
+ class="form-control"
22
22
  placeholder="{{ 'Filter' | translate }}"
23
23
  ng-model="cvFilter" />
24
24
  </div>
@@ -27,10 +27,14 @@
27
27
 
28
28
  <button class="btn btn-default"
29
29
  ng-hide="denied('edit_jobs')"
30
- ng-disabled="!cvTable.chosenRow || cvTable.working"
30
+ ng-disabled="!cvTable.chosenRow || cvTable.working"
31
31
  ng-click="setContentView()">
32
- <i class="fa fa-pencil" ng-hide="cvTable.working"></i>
33
- <i class="fa fa-spinner fa-spin" ng-show="cvTable.working"></i>
32
+ <span ng-hide="cvTable.working">
33
+ <i class="fa fa-pencil" ></i>
34
+ </span>
35
+ <span ng-show="cvTable.working">
36
+ <i class="fa fa-spinner fa-spin"></i>
37
+ </span>
34
38
  {{ 'Set Content View' | translate }}
35
39
  </button>
36
40
 
@@ -38,7 +42,7 @@
38
42
  </div>
39
43
 
40
44
  <div bst-table="cvTable" class="nutupane">
41
- <div bst-container-scroll bst-infinite-scroll="cvTable.nextPage()">
45
+ <div bst-container-scroll bst-infinite-scroll="cvTable.nextPage()">
42
46
 
43
47
  <table ng-class="{'table-mask': cvTable.working}" class="table table-full table-striped">
44
48
  <thead>
@@ -51,7 +55,7 @@
51
55
 
52
56
  <tbody>
53
57
  <tr bst-table-row ng-repeat="contentView in cvTable.rows | filter:cvFilter" row-choice="contentView">
54
-
58
+
55
59
  <td bst-table-cell>
56
60
  <a ui-sref="content-views.details.info({ contentViewId: contentView.id })">
57
61
  {{ contentView.name }}
@@ -71,7 +75,7 @@
71
75
  <div ng-show="cvTable.rows.length === 0">
72
76
  <div class="loading-mask loading-mask-panel" ng-show="cvTable.working">
73
77
  <i class="fa fa-spinner fa-spin"></i>
74
- {{ "Loading..." | translate }}
78
+ {{ "Loading..." | translate }}
75
79
  </div>
76
80
 
77
81
  <p class="alert alert-info"
@@ -12,11 +12,11 @@
12
12
  </div>
13
13
 
14
14
  <section class="nutupane-sub-section">
15
- <div bst-alerts success-messages="successMessages" error-messages="errorMessages"></div>
15
+ <div bst-alerts success-messages="successMessages" error-messages="errorMessages"></div>
16
16
 
17
17
  <div class="loading-mask loading-mask-panel" ng-show="loading">
18
18
  <i class="fa fa-spinner fa-spin"></i>
19
- {{ "Loading..." | translate }}
19
+ {{ "Loading..." | translate }}
20
20
  </div>
21
21
 
22
22
 
@@ -33,13 +33,17 @@
33
33
  ng-hide="denied('edit_jobs')"
34
34
  ng-disabled="!chosenEnvironment || working"
35
35
  ng-click="setEnvironment()">
36
- <i class="fa fa-pencil" ng-hide="working"></i>
37
- <i class="fa fa-spinner fa-spin" ng-show="working"></i>
36
+ <span ng-hide="working">
37
+ <i class="fa fa-pencil"></i>
38
+ </span>
39
+ <span ng-show="working">
40
+ <i class="fa fa-spinner fa-spin"></i>
41
+ </span>
38
42
  <span translate>Set Environment</span>
39
43
  </button>
40
44
  </section>
41
-
42
-
45
+
46
+
43
47
  <div ng-show="environments.length === 0 && !loading" >
44
48
  <p class="alert alert-info"
45
49
  ng-hide="loading"
@@ -40,8 +40,12 @@
40
40
  ng-hide="edit_jobs"
41
41
  ng-disabled="!hostgroupsTable.chosenRow || hostgroupsTable.working"
42
42
  ng-click="setHostgroup()">
43
- <i class="fa fa-pencil" ng-hide="hostgroupsTable.working"></i>
44
- <i class="fa fa-spinner fa-spin" ng-show="hostgroupsTable.working"></i>
43
+ <span ng-hide="hostgroupsTable.working">
44
+ <i class="fa fa-pencil"></i>
45
+ </span>
46
+ <span ng-show="hostgroupsTable.working">
47
+ <i class="fa fa-spinner fa-spin"></i>
48
+ </span>
45
49
  {{ 'Set Hostgroup' | translate }}
46
50
  </button>
47
51
  </div>
@@ -23,8 +23,12 @@
23
23
  ng-disabled="projectsTable.numSelected === 0 || projectsTable.working"
24
24
  ng-show="isState('jobs.details.jenkins-projects.list') && permitted('edit_jobs', job) && projectsTable.rows.length > 0"
25
25
  ng-click="removeProjects()">
26
- <i class="fa fa-minus" ng-hide="projectsTable.working"></i>
27
- <i class="fa fa-spinner fa-spin" ng-show="projectsTable.working"></i>
26
+ <span ng-hide="projectsTable.working">
27
+ <i class="fa fa-minus"></i>
28
+ </span>
29
+ <span ng-show="projectsTable.working">
30
+ <i class="fa fa-spinner fa-spin"></i>
31
+ </span>
28
32
  <span translate>Remove Projects</span>
29
33
  </button>
30
34
 
@@ -43,7 +47,6 @@
43
47
 
44
48
  <table bst-table="projectsTable"
45
49
  class="table table-striped"
46
- ng-show="projectsTable.rows.length > 0 && !projectsTable.working"
47
50
  ng-class="{'table-mask': projectsTable.working}">
48
51
  <thead>
49
52
  <tr bst-table-head row-select="jenkinsProject">
@@ -51,7 +54,7 @@
51
54
  </tr>
52
55
  </thead>
53
56
 
54
- <tbody>
57
+ <tbody ng-show="projectsTable.rows.length > 0 && !projectsTable.working">
55
58
  <tr bst-table-row ng-repeat="jenkinsProject in projectsTable.rows | filter:jenkinsFilter" row-select="jenkinsProject">
56
59
  <td bst-table-cell>
57
60
  <a href="" ui-sref="jobs.details.jenkins-projects.parameters({ projectId: jenkinsProject.id })">
@@ -60,8 +63,6 @@
60
63
  </td>
61
64
  </tr>
62
65
  </tbody>
63
-
64
66
  </table>
65
67
 
66
68
  </section>
67
-
@@ -6,32 +6,36 @@
6
6
  <h4>
7
7
  <span translate>Current Jenkins Instance: </span>
8
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>
9
+ <span class="no-capitalize" ng-show="job.jenkins_instance.name" ng-bind="job.jenkins_instance.name"></span>
10
10
  </a>
11
- <span ng-show="!job.jenkins_instance.name" translate>none</span>
11
+ <span class="no-capitalize" ng-show="!job.jenkins_instance.name" translate>none</span>
12
12
  </h4>
13
13
 
14
- <br/>
14
+ <br/>
15
15
 
16
16
  <section>
17
17
  <div class="details-header row">
18
-
18
+
19
19
  <div class="col-sm-3" ng-show="jenkinsTable.rows.length > 0">
20
20
  <input type="text"
21
- class="form-control"
21
+ class="form-control"
22
22
  placeholder="{{ 'Filter' | translate }}"
23
23
  ng-model="jenkinsFilter" />
24
24
  </div>
25
25
 
26
26
  <div class="fr select-action">
27
-
27
+
28
28
  <span ng-show="jenkinsTable.rows.length > 0">
29
29
  <button class="btn btn-default"
30
30
  ng-hide="denied('edit_jobs')"
31
- ng-disabled="!jenkinsTable.chosenRow || jenkinsTable.working"
31
+ ng-disabled="!jenkinsTable.chosenRow || jenkinsTable.working"
32
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>
33
+ <span ng-hide="jenkinsTable.working">
34
+ <i class="fa fa-pencil" ></i>
35
+ </span>
36
+ <span ng-show="jenkinsTable.working">
37
+ <i class="fa fa-spinner fa-spin"></i>
38
+ </span>
35
39
  {{ 'Set Jenkins Instance' | translate }}
36
40
  </button>
37
41
  </span>
@@ -56,7 +60,7 @@
56
60
 
57
61
  <tbody>
58
62
  <tr bst-table-row ng-repeat="jenkinsInstance in jenkinsTable.rows | filter:jenkinsFilter" row-choice="jenkinsInstance">
59
-
63
+
60
64
  <td bst-table-cell>
61
65
  <a ui-sref="jenkins-instances.details.info({ jenkinsInstanceId: jenkinsInstance.id })">
62
66
  {{ jenkinsInstance.name }}
@@ -76,7 +80,7 @@
76
80
  <div ng-show="jenkinsTable.rows.length === 0">
77
81
  <div class="loading-mask loading-mask-panel" ng-show="jenkinsTable.working">
78
82
  <i class="fa fa-spinner fa-spin"></i>
79
- {{ "Loading..." | translate }}
83
+ {{ "Loading..." | translate }}
80
84
  </div>
81
85
 
82
86
  <p class="alert alert-info"
@@ -10,9 +10,9 @@
10
10
  <h4>
11
11
  <span translate>Current Compute Resource: </span>
12
12
  <a ng-click="transitionToResource(job.resource)" ng-show="job.compute_resource.name">
13
- <span ng-bind="job.compute_resource.name"></span>
13
+ <span class="no-capitalize" ng-bind="job.compute_resource.name"></span>
14
14
  </a>
15
- <span ng-show="!job.compute_resource.name" translate>none</span>
15
+ <span class="no-capitalize" ng-show="!job.compute_resource.name" translate>none</span>
16
16
  </h4>
17
17
 
18
18
  <br/>
@@ -25,8 +25,8 @@
25
25
 
26
26
  <p class="alert alert-info"
27
27
  ng-hide="table.working"
28
- translate> No Compute Resources to show.
29
- </p>
28
+ translate> No Compute Resources to show.
29
+ </p>
30
30
  </div>
31
31
 
32
32
  <section ng-show="table.rows.length > 0">
@@ -43,17 +43,21 @@
43
43
  ng-hide="edit_jobs"
44
44
  ng-disabled="!table.chosenRow || table.working"
45
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>
46
+ <span ng-hide="table.working">
47
+ <i class="fa fa-pencil"></i>
48
+ </span>
49
+ <span ng-show="table.working">
50
+ <i class="fa fa-spinner fa-spin"></i>
51
+ </span>
48
52
  {{ 'Set Compute Resource' | translate }}
49
- </button>
53
+ </button>
50
54
  </div>
51
55
  </div>
52
56
 
53
57
  <div bst-table="table" class="nutupane">
54
58
  <div bst-container-scroll bst-infinite-scroll="table.nextPage()">
55
-
56
- <table
59
+
60
+ <table
57
61
  ng-class="{'table-mask': table.working}"
58
62
  class="table table-striped table-full">
59
63
 
@@ -67,7 +71,7 @@
67
71
 
68
72
  <tbody>
69
73
  <tr bst-table-row ng-repeat="resource in table.rows | filter:resourceFilter" row-choice="resource">
70
-
74
+
71
75
  <td bst-table-cell>
72
76
  <a ng-click="transitionToResource(resource)">
73
77
  {{ resource.name }}
@@ -76,9 +80,9 @@
76
80
  <td bst-table-cell>{{ resource.provider }}</td>
77
81
  <td bst-table-cell>{{ resource.url }}</td>
78
82
  </tr>
79
-
83
+
80
84
  </tbody>
81
-
85
+
82
86
  </table>
83
87
  </div>
84
88
  </div>
@@ -9,13 +9,13 @@
9
9
  </div>
10
10
  </div>
11
11
  <h4 translate>Lifecycle Environment selection: select target environment</h4>
12
- <section class="nutupane-sub-section">
13
-
12
+ <section class="nutupane-sub-section">
13
+
14
14
  <div bst-alerts success-messages="successMessages" error-messages="errorMessages"></div>
15
15
 
16
16
  <div class="loading-mask loading-mask-panel" ng-show="loading">
17
17
  <i class="fa fa-spinner fa-spin"></i>
18
- {{ "Loading..." | translate }}
18
+ {{ "Loading..." | translate }}
19
19
  </div>
20
20
 
21
21
 
@@ -31,13 +31,17 @@
31
31
  ng-hide="denied('edit_jobs')"
32
32
  ng-disabled="working"
33
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>
34
+ <span ng-hide="working">
35
+ <i class="fa fa-pencil"></i>
36
+ </span>
37
+ <span ng-show="working">
38
+ <i class="fa fa-spinner fa-spin"></i>
39
+ </span>
36
40
  <span translate>Set To Environments</span>
37
41
  </button>
38
42
  </section>
39
-
40
-
43
+
44
+
41
45
  <div ng-show="availableEnvironments.length === 0" >
42
46
  <p class="alert alert-info"
43
47
  ng-hide="loading"
@@ -3,7 +3,10 @@ angular.module('ForemanPipeline.jobs', [
3
3
  'Bastion.components',
4
4
  'ui.router',
5
5
  'Bastion',
6
- ]);
6
+ ])
7
+ .run(["FencedPages", function (FencedPages) {
8
+ FencedPages.addPages("jobs");
9
+ }]);
7
10
 
8
11
  angular.module('ForemanPipeline.jobs').config(['$stateProvider', function ($stateProvider) {
9
12
  $stateProvider.state('jobs', {
@@ -11,3 +11,7 @@
11
11
  *= require_self
12
12
  *= require_tree .
13
13
  */
14
+
15
+ .details > h4 span.no-capitalize {
16
+ text-transform: none;
17
+ }
@@ -24,7 +24,10 @@ module ForemanPipeline
24
24
  param :organization_id, :number, :desc => N_("organization identifier"), :required => true
25
25
  param :name, String, :desc => N_("Name of the jenkins instance")
26
26
  def index
27
- respond_for_index(:collection => scoped_search(index_relation.uniq, params[:sort_by], params[:sort_order]))
27
+ respond_for_index(:collection => scoped_search(index_relation.uniq,
28
+ params[:sort_by],
29
+ params[:sort_order],
30
+ :includes => jenkins_instance_includes))
28
31
  end
29
32
 
30
33
  def index_relation
@@ -109,13 +112,17 @@ module ForemanPipeline
109
112
  protected
110
113
 
111
114
  def find_jenkins_instance
112
- @jenkins_instance = JenkinsInstance.find_by_id(params[:id])
115
+ @jenkins_instance = JenkinsInstance.includes(jenkins_instance_includes).find_by_id(params[:id])
113
116
  fail ::Katello::HttpErrors::NotFound, "Could not find Jenkins Instance with id: #{params[:id]}" if @jenkins_instance.nil?
114
117
  @jenkins_instance
115
118
  end
116
119
 
120
+ def jenkins_instance_includes
121
+ [:jenkins_user]
122
+ end
123
+
117
124
  def jenkins_instance_params
118
- params.require(:jenkins_instance).permit(:name, :url, :jenkins_home, :cert_path)
125
+ params.require(:jenkins_instance).permit(:name, :url, :jenkins_home, :cert_path, :timeout)
119
126
  end
120
127
  end
121
128
  end
@@ -16,7 +16,7 @@ module ForemanPipeline
16
16
  private
17
17
 
18
18
  def find_jenkins_project
19
- @jenkins_project = JenkinsProject.find_by_id(params[:id])
19
+ @jenkins_project = JenkinsProject.includes([:jenkins_project_params]).find_by_id(params[:id])
20
20
  fail ::Katello::HttpErrors::NotFound, "Could not find Jenkins Project with id: #{params[:id]}" if @jenkins_project.nil?
21
21
  @jenkins_project
22
22
  end