redhat_access 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (218) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +24 -0
  3. data/LICENSE.txt +620 -0
  4. data/README.rdoc +7 -0
  5. data/Rakefile +131 -0
  6. data/app/assets/javascripts/insights/app.module.js +64 -0
  7. data/app/assets/javascripts/insights/application.js +18 -0
  8. data/app/assets/javascripts/insights/configuration.controller.js +66 -0
  9. data/app/assets/javascripts/insights/configuration.service.js +28 -0
  10. data/app/assets/javascripts/insights/views/configuration.html +85 -0
  11. data/app/assets/javascripts/insights/views/error.html +13 -0
  12. data/app/assets/javascripts/insights/views/help.html +16 -0
  13. data/app/assets/javascripts/redhat_access/analytics_dashboard.js +2 -0
  14. data/app/assets/javascripts/redhat_access/application.js +15 -0
  15. data/app/assets/javascripts/redhat_access/redhat_access.module.js +126 -0
  16. data/app/assets/stylesheets/insights/application.css +14 -0
  17. data/app/assets/stylesheets/insights/insights.css +21 -0
  18. data/app/assets/stylesheets/redhat_access/application.css +14 -0
  19. data/app/assets/stylesheets/redhat_access/telemetry_configuration.css +4 -0
  20. data/app/controllers/redhat_access/analytics_dashboard_controller.rb +12 -0
  21. data/app/controllers/redhat_access/api/api_controller.rb +24 -0
  22. data/app/controllers/redhat_access/api/attachments_controller.rb +40 -0
  23. data/app/controllers/redhat_access/api/logs_controller.rb +49 -0
  24. data/app/controllers/redhat_access/api/machine_telemetry_api_controller.rb +112 -0
  25. data/app/controllers/redhat_access/api/strata_proxy_controller.rb +81 -0
  26. data/app/controllers/redhat_access/api/telemetry_api_controller.rb +179 -0
  27. data/app/controllers/redhat_access/application_controller.rb +2 -0
  28. data/app/controllers/redhat_access/cases_controller.rb +14 -0
  29. data/app/controllers/redhat_access/configuration_controller.rb +21 -0
  30. data/app/controllers/redhat_access/log_viewer_controller.rb +9 -0
  31. data/app/controllers/redhat_access/redhat_access_controller.rb +8 -0
  32. data/app/controllers/redhat_access/search_controller.rb +9 -0
  33. data/app/controllers/redhat_access/strata_credentials_controller.rb +48 -0
  34. data/app/controllers/redhat_access/telemetry_configurations_controller.rb +38 -0
  35. data/app/controllers/redhat_access/telemetry_controller.rb +6 -0
  36. data/app/helpers/redhat_access/analytics_dashboard_helper.rb +13 -0
  37. data/app/helpers/redhat_access/application_helper.rb +4 -0
  38. data/app/helpers/redhat_access/attachments_helper.rb +4 -0
  39. data/app/helpers/redhat_access/cases_helper.rb +4 -0
  40. data/app/helpers/redhat_access/log_viewer_helper.rb +4 -0
  41. data/app/helpers/redhat_access/logs_helper.rb +4 -0
  42. data/app/helpers/redhat_access/redhat_access_helper.rb +4 -0
  43. data/app/helpers/redhat_access/search_helper.rb +4 -0
  44. data/app/helpers/redhat_access/telemetry_configuration_helper.rb +4 -0
  45. data/app/models/redhat_access/concerns/organization_extensions.rb +10 -0
  46. data/app/models/redhat_access/telemetry_configuration.rb +11 -0
  47. data/app/models/redhat_access/telemetry_proxy_credentials.rb +10 -0
  48. data/app/services/redhat_access/authentication/client_authentication.rb +80 -0
  49. data/app/services/redhat_access/telemetry/look_ups.rb +233 -0
  50. data/app/services/redhat_access/telemetry/portal_client.rb +39 -0
  51. data/app/views/redhat_access/analytics_dashboard/configuration.html.erb +85 -0
  52. data/app/views/redhat_access/analytics_dashboard/error.html.erb +13 -0
  53. data/app/views/redhat_access/analytics_dashboard/help.html.erb +16 -0
  54. data/app/views/redhat_access/analytics_dashboard/index.html.erb +69 -0
  55. data/app/views/redhat_access/analytics_dashboard/welcome.html.erb +8 -0
  56. data/app/views/redhat_access/redhat_access/index.html.erb +34 -0
  57. data/ca/rh_cert-api_chain.pem +74 -0
  58. data/config/config.yml.example +15 -0
  59. data/config/environments/development.rb +5 -0
  60. data/config/initializers/load_config.rb +5 -0
  61. data/config/mount_engine.rb +3 -0
  62. data/config/routes.rb +36 -0
  63. data/db/migrate/20141204161152_create_redhat_access_telemetry_proxy_credentials.rb +11 -0
  64. data/db/migrate/20150319153744_create_redhat_access_telemetry_configurations.rb +13 -0
  65. data/db/migrate/20160425175501_add_email_to_telemetry_configurations.rb +5 -0
  66. data/db/seeds.d/200-update-insights-roles.rb +11 -0
  67. data/lib/redhat_access/configuration.rb +8 -0
  68. data/lib/redhat_access/engine.rb +225 -0
  69. data/lib/redhat_access/sos_reports/generator.rb +58 -0
  70. data/lib/redhat_access/strata/client.rb +39 -0
  71. data/lib/redhat_access/version.rb +3 -0
  72. data/lib/redhat_access.rb +5 -0
  73. data/lib/tasks/redhat_access_tasks.rake +41 -0
  74. data/locale/Makefile +62 -0
  75. data/locale/de/LC_MESSAGES/redhat_access.mo +0 -0
  76. data/locale/de/redhat_access.po +589 -0
  77. data/locale/es/LC_MESSAGES/redhat_access.mo +0 -0
  78. data/locale/es/redhat_access.po +589 -0
  79. data/locale/fr/LC_MESSAGES/redhat_access.mo +0 -0
  80. data/locale/fr/redhat_access.po +593 -0
  81. data/locale/gemspec.rb +2 -0
  82. data/locale/it/LC_MESSAGES/redhat_access.mo +0 -0
  83. data/locale/it/redhat_access.po +589 -0
  84. data/locale/ja/LC_MESSAGES/redhat_access.mo +0 -0
  85. data/locale/ja/redhat_access.po +569 -0
  86. data/locale/ko/LC_MESSAGES/redhat_access.mo +0 -0
  87. data/locale/ko/redhat_access.po +570 -0
  88. data/locale/pt/LC_MESSAGES/redhat_access.mo +0 -0
  89. data/locale/pt/redhat_access.po +588 -0
  90. data/locale/redhat_access.pot +34 -0
  91. data/locale/ru/LC_MESSAGES/redhat_access.mo +0 -0
  92. data/locale/ru/redhat_access.po +580 -0
  93. data/locale/zh/LC_MESSAGES/redhat_access.mo +0 -0
  94. data/locale/zh/redhat_access.po +561 -0
  95. data/redhat_access.gemspec +30 -0
  96. data/script/rails +8 -0
  97. data/script/sos_reports/foreman_sosreport.pam +9 -0
  98. data/script/sos_reports/foreman_sosreport_console.apps +3 -0
  99. data/script/sos_reports/foreman_sosreport_wrapper.py +65 -0
  100. data/test/dummy/README.rdoc +261 -0
  101. data/test/dummy/Rakefile +7 -0
  102. data/test/dummy/app/assets/javascripts/application.js +15 -0
  103. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  104. data/test/dummy/app/controllers/application_controller.rb +3 -0
  105. data/test/dummy/app/helpers/application_helper.rb +2 -0
  106. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  107. data/test/dummy/config/application.rb +59 -0
  108. data/test/dummy/config/boot.rb +10 -0
  109. data/test/dummy/config/database.yml +25 -0
  110. data/test/dummy/config/environment.rb +5 -0
  111. data/test/dummy/config/environments/development.rb +37 -0
  112. data/test/dummy/config/environments/production.rb +67 -0
  113. data/test/dummy/config/environments/test.rb +37 -0
  114. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  115. data/test/dummy/config/initializers/inflections.rb +15 -0
  116. data/test/dummy/config/initializers/mime_types.rb +5 -0
  117. data/test/dummy/config/initializers/secret_token.rb +7 -0
  118. data/test/dummy/config/initializers/session_store.rb +8 -0
  119. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  120. data/test/dummy/config/locales/en.yml +5 -0
  121. data/test/dummy/config/routes.rb +4 -0
  122. data/test/dummy/config.ru +4 -0
  123. data/test/dummy/public/404.html +26 -0
  124. data/test/dummy/public/422.html +26 -0
  125. data/test/dummy/public/500.html +25 -0
  126. data/test/dummy/public/favicon.ico +0 -0
  127. data/test/dummy/script/rails +6 -0
  128. data/test/fixtures/redhat_access/telemetry_configurations.yml +11 -0
  129. data/test/fixtures/redhat_access/telemetry_proxy_credentials.yml +11 -0
  130. data/test/functional/redhat_access/analytics_dashboard_controller_test.rb +11 -0
  131. data/test/functional/redhat_access/attachments_controller_test.rb +11 -0
  132. data/test/functional/redhat_access/cases_controller_test.rb +16 -0
  133. data/test/functional/redhat_access/configuration_controller_test.rb +11 -0
  134. data/test/functional/redhat_access/log_viewer_controller_test.rb +11 -0
  135. data/test/functional/redhat_access/logs_controller_test.rb +9 -0
  136. data/test/functional/redhat_access/redhat_access_controller_test.rb +11 -0
  137. data/test/functional/redhat_access/search_controller_test.rb +11 -0
  138. data/test/functional/redhat_access/telemetry_configuration_controller_test.rb +26 -0
  139. data/test/integration/navigation_test.rb +10 -0
  140. data/test/models/redhat_access/telemetry_proxy_credentials_test.rb +9 -0
  141. data/test/redhat_access_test.rb +7 -0
  142. data/test/sos-report-test.rb +32 -0
  143. data/test/test_helper.rb +15 -0
  144. data/test/unit/helpers/redhat_access/analytics_dashboard_helper_test.rb +6 -0
  145. data/test/unit/helpers/redhat_access/attachments_helper_test.rb +6 -0
  146. data/test/unit/helpers/redhat_access/cases_helper_test.rb +6 -0
  147. data/test/unit/helpers/redhat_access/log_viewer_helper_test.rb +6 -0
  148. data/test/unit/helpers/redhat_access/logs_helper_test.rb +6 -0
  149. data/test/unit/helpers/redhat_access/redhat_access_helper_test.rb +6 -0
  150. data/test/unit/helpers/redhat_access/search_helper_test.rb +6 -0
  151. data/test/unit/helpers/redhat_access/telemetry_configuration_helper_test.rb +6 -0
  152. data/test/unit/redhat_access/telemetry_configuration_test.rb +9 -0
  153. data/vendor/assets/fonts/fonts/FontAwesome.otf +0 -0
  154. data/vendor/assets/fonts/fonts/fontawesome-webfont.eot +0 -0
  155. data/vendor/assets/fonts/fonts/fontawesome-webfont.svg +655 -0
  156. data/vendor/assets/fonts/fonts/fontawesome-webfont.ttf +0 -0
  157. data/vendor/assets/fonts/fonts/fontawesome-webfont.woff +0 -0
  158. data/vendor/assets/fonts/fonts/icomoon.eot +0 -0
  159. data/vendor/assets/fonts/fonts/icomoon.svg +22 -0
  160. data/vendor/assets/fonts/fonts/icomoon.ttf +0 -0
  161. data/vendor/assets/fonts/fonts/icomoon.woff +0 -0
  162. data/vendor/assets/fonts/fonts/overpass_bold-web.eot +0 -0
  163. data/vendor/assets/fonts/fonts/overpass_bold-web.svg +454 -0
  164. data/vendor/assets/fonts/fonts/overpass_bold-web.ttf +0 -0
  165. data/vendor/assets/fonts/fonts/overpass_bold-web.woff +0 -0
  166. data/vendor/assets/fonts/fonts/overpass_light-webfont.eot +0 -0
  167. data/vendor/assets/fonts/fonts/overpass_light-webfont.svg +2105 -0
  168. data/vendor/assets/fonts/fonts/overpass_light-webfont.ttf +0 -0
  169. data/vendor/assets/fonts/fonts/overpass_light-webfont.woff +0 -0
  170. data/vendor/assets/fonts/fonts/overpass_regular-web.eot +0 -0
  171. data/vendor/assets/fonts/fonts/overpass_regular-web.svg +454 -0
  172. data/vendor/assets/fonts/fonts/overpass_regular-web.ttf +0 -0
  173. data/vendor/assets/fonts/fonts/overpass_regular-web.woff +0 -0
  174. data/vendor/assets/fonts/fonts/portalicons.eot +0 -0
  175. data/vendor/assets/fonts/fonts/portalicons.svg +145 -0
  176. data/vendor/assets/fonts/fonts/portalicons.ttf +0 -0
  177. data/vendor/assets/fonts/fonts/portalicons.woff +0 -0
  178. data/vendor/assets/images/images/Icon_RH_Document_Blueprint_RGB_Button.png +0 -0
  179. data/vendor/assets/images/images/Icon_RH_Misc_Lifestyle_RGB_Button.png +0 -0
  180. data/vendor/assets/images/images/Icon_RH_Software_Data_CMYK_Button.png +0 -0
  181. data/vendor/assets/images/images/Icon_RH_Software_Transfer-Upload_CMYK_Button.png +0 -0
  182. data/vendor/assets/images/images/bg1.jpg +0 -0
  183. data/vendor/assets/images/images/bg_body.jpg +0 -0
  184. data/vendor/assets/images/images/bg_chart-shadow.png +0 -0
  185. data/vendor/assets/images/images/bg_dount-hole-na.png +0 -0
  186. data/vendor/assets/images/images/bg_glow.jpg +0 -0
  187. data/vendor/assets/images/images/bg_pattern.png +0 -0
  188. data/vendor/assets/images/images/i_chart.png +0 -0
  189. data/vendor/assets/images/images/img-insights-connection-sat.png +0 -0
  190. data/vendor/assets/images/images/img-insights-connection.png +0 -0
  191. data/vendor/assets/images/images/img-sat5-step2-admin.png +0 -0
  192. data/vendor/assets/images/images/img-sat5-step3-completed.png +0 -0
  193. data/vendor/assets/images/images/img-sat5-step3-pending.png +0 -0
  194. data/vendor/assets/images/images/img-sat5-step3-setup.png +0 -0
  195. data/vendor/assets/images/images/img-sat5-step5-overview.png +0 -0
  196. data/vendor/assets/images/images/img-sat5-step5-reports.png +0 -0
  197. data/vendor/assets/images/images/img-sat5-step5-systems.png +0 -0
  198. data/vendor/assets/images/images/img-sat6-step2.jpg +0 -0
  199. data/vendor/assets/images/images/img-sat6-step3.jpg +0 -0
  200. data/vendor/assets/images/images/img-sat6-step3.png +0 -0
  201. data/vendor/assets/images/images/img-sat6-step4.jpg +0 -0
  202. data/vendor/assets/images/images/img-sat6-step5a.jpg +0 -0
  203. data/vendor/assets/images/images/img-sat6-step5b.jpg +0 -0
  204. data/vendor/assets/images/images/img-sat6-step5c.jpg +0 -0
  205. data/vendor/assets/images/images/img-sat6-step5d.jpg +0 -0
  206. data/vendor/assets/images/images/keynote-snap.jpg +0 -0
  207. data/vendor/assets/images/images/keynote-snap.png +0 -0
  208. data/vendor/assets/images/images/splash-gettingstarted.jpg +0 -0
  209. data/vendor/assets/images/images/splash-learnmore.jpg +0 -0
  210. data/vendor/assets/images/images/splash-security.jpg +0 -0
  211. data/vendor/assets/javascripts/angular/angular.js +20131 -0
  212. data/vendor/assets/javascripts/redhat_access/redhat_access_angular_ui-deps.js +14103 -0
  213. data/vendor/assets/javascripts/redhat_access/redhat_access_angular_ui.js +7854 -0
  214. data/vendor/assets/javascripts/telemetry/insights.js +39 -0
  215. data/vendor/assets/stylesheets/redhat_access/redhat_access_angular_ui-deps.css +11 -0
  216. data/vendor/assets/stylesheets/redhat_access/redhat_access_angular_ui.css +1 -0
  217. data/vendor/assets/stylesheets/telemetry/sat6.css +18 -0
  218. metadata +341 -0
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/404.html -->
21
+ <div class="dialog">
22
+ <h1>The page you were looking for doesn't exist.</h1>
23
+ <p>You may have mistyped the address or the page may have moved.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/422.html -->
21
+ <div class="dialog">
22
+ <h1>The change you wanted was rejected.</h1>
23
+ <p>Maybe you tried to change something you didn't have access to.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,25 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/500.html -->
21
+ <div class="dialog">
22
+ <h1>We're sorry, but something went wrong.</h1>
23
+ </div>
24
+ </body>
25
+ </html>
File without changes
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'
@@ -0,0 +1,11 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
2
+
3
+ one:
4
+ portal_user: MyString
5
+ portal_password: MyString
6
+ enable_telemetry: false
7
+
8
+ two:
9
+ portal_user: MyString
10
+ portal_password: MyString
11
+ enable_telemetry: false
@@ -0,0 +1,11 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2
+
3
+ one:
4
+ username: MyString
5
+ password: MyString
6
+ strata_url: MyString
7
+
8
+ two:
9
+ username: MyString
10
+ password: MyString
11
+ strata_url: MyString
@@ -0,0 +1,11 @@
1
+ require 'test_helper'
2
+
3
+ module RedhatAccess
4
+ class AnalyticsDashboardControllerTest < ActionController::TestCase
5
+ test "should get index" do
6
+ get :index
7
+ assert_response :success
8
+ end
9
+
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ require 'test_helper'
2
+
3
+ module RedhatAccess
4
+ class AttachmentsControllerTest < ActionController::TestCase
5
+ test "should get index" do
6
+ get :index
7
+ assert_response :success
8
+ end
9
+
10
+ end
11
+ end
@@ -0,0 +1,16 @@
1
+ require 'test_helper'
2
+
3
+ module RedhatAccess
4
+ class CasesControllerTest < ActionController::TestCase
5
+ test "should get new" do
6
+ get :new
7
+ assert_response :success
8
+ end
9
+
10
+ test "should get list" do
11
+ get :list
12
+ assert_response :success
13
+ end
14
+
15
+ end
16
+ end
@@ -0,0 +1,11 @@
1
+ require 'test_helper'
2
+
3
+ module RedhatAccess
4
+ class ConfigurationControllerTest < ActionController::TestCase
5
+ test "should get index" do
6
+ get :index
7
+ assert_response :success
8
+ end
9
+
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ require 'test_helper'
2
+
3
+ module RedhatAccess
4
+ class LogViewerControllerTest < ActionController::TestCase
5
+ test "should get index" do
6
+ get :index
7
+ assert_response :success
8
+ end
9
+
10
+ end
11
+ end
@@ -0,0 +1,9 @@
1
+ require 'test_helper'
2
+
3
+ module RedhatAccess
4
+ class LogsControllerTest < ActionController::TestCase
5
+ # test "the truth" do
6
+ # assert true
7
+ # end
8
+ end
9
+ end
@@ -0,0 +1,11 @@
1
+ require 'test_helper'
2
+
3
+ module RedhatAccess
4
+ class RedhatAccessControllerTest < ActionController::TestCase
5
+ test "should get index" do
6
+ get :index
7
+ assert_response :success
8
+ end
9
+
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ require 'test_helper'
2
+
3
+ module RedhatAccess
4
+ class SearchControllerTest < ActionController::TestCase
5
+ test "should get index" do
6
+ get :index
7
+ assert_response :success
8
+ end
9
+
10
+ end
11
+ end
@@ -0,0 +1,26 @@
1
+ require 'test_helper'
2
+
3
+ module RedhatAccess
4
+ class TelemetryConfigurationControllerTest < ActionController::TestCase
5
+ test "should get index" do
6
+ get :index
7
+ assert_response :success
8
+ end
9
+
10
+ test "should get create" do
11
+ get :create
12
+ assert_response :success
13
+ end
14
+
15
+ test "should get update" do
16
+ get :update
17
+ assert_response :success
18
+ end
19
+
20
+ test "should get destroy" do
21
+ get :destroy
22
+ assert_response :success
23
+ end
24
+
25
+ end
26
+ end
@@ -0,0 +1,10 @@
1
+ require 'test_helper'
2
+
3
+ class NavigationTest < ActionDispatch::IntegrationTest
4
+ fixtures :all
5
+
6
+ # test "the truth" do
7
+ # assert true
8
+ # end
9
+ end
10
+
@@ -0,0 +1,9 @@
1
+ require 'test_helper'
2
+
3
+ module RedhatAccess
4
+ class TelemetryProxyCredentialsTest < ActiveSupport::TestCase
5
+ # test "the truth" do
6
+ # assert true
7
+ # end
8
+ end
9
+ end
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class RedhatAccessTest < ActiveSupport::TestCase
4
+ test "truth" do
5
+ assert_kind_of Module, RedhatAccess
6
+ end
7
+ end
@@ -0,0 +1,32 @@
1
+ require 'open3'
2
+ puts "starting"
3
+ command = "foreman-sosreport " +
4
+ "--batch " +
5
+ "-o rpm,libvirt,general,networking,hardware,process,yum,filesys,devicemapper" +
6
+ ",kernel,apache,memory "+
7
+ "-k general.all_logs=True " +
8
+ "-k apache.log=True " +
9
+ "-k rpm.rpmva=off"
10
+ puts "running command"+ command
11
+ #system command
12
+ puts "done runnng "
13
+
14
+ puts "run with opens3"
15
+
16
+ Open3.popen3(command) do |stdin, stdout, stderr, wait_thr|
17
+ pid = wait_thr.pid # pid of the started process.
18
+ #puts stdout.readlines
19
+ report_location = ''
20
+ if wait_thr.value == 0
21
+ stdout.readlines.each do |line|
22
+ if line.include? "tar.xz"
23
+ report_location = line
24
+ break
25
+ end
26
+ end
27
+ else
28
+ puts "sos report failed"
29
+ end
30
+ puts report_location
31
+ end
32
+
@@ -0,0 +1,15 @@
1
+ # Configure Rails Environment
2
+ ENV["RAILS_ENV"] = "test"
3
+
4
+ require File.expand_path("../dummy/config/environment.rb", __FILE__)
5
+ require "rails/test_help"
6
+
7
+ Rails.backtrace_cleaner.remove_silencers!
8
+
9
+ # Load support files
10
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
11
+
12
+ # Load fixtures from the engine
13
+ if ActiveSupport::TestCase.method_defined?(:fixture_path=)
14
+ ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
15
+ end
@@ -0,0 +1,6 @@
1
+ require 'test_helper'
2
+
3
+ module RedhatAccess
4
+ class AnalyticsDashboardHelperTest < ActionView::TestCase
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ require 'test_helper'
2
+
3
+ module RedhatAccess
4
+ class AttachmentsHelperTest < ActionView::TestCase
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ require 'test_helper'
2
+
3
+ module RedhatAccess
4
+ class CasesHelperTest < ActionView::TestCase
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ require 'test_helper'
2
+
3
+ module RedhatAccess
4
+ class LogViewerHelperTest < ActionView::TestCase
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ require 'test_helper'
2
+
3
+ module RedhatAccess
4
+ class LogsHelperTest < ActionView::TestCase
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ require 'test_helper'
2
+
3
+ module RedhatAccess
4
+ class RedhatAccessHelperTest < ActionView::TestCase
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ require 'test_helper'
2
+
3
+ module RedhatAccess
4
+ class SearchHelperTest < ActionView::TestCase
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ require 'test_helper'
2
+
3
+ module RedhatAccess
4
+ class TelemetryConfigurationHelperTest < ActionView::TestCase
5
+ end
6
+ end
@@ -0,0 +1,9 @@
1
+ require 'test_helper'
2
+
3
+ module RedhatAccess
4
+ class TelemetryConfigurationTest < ActiveSupport::TestCase
5
+ # test "the truth" do
6
+ # assert true
7
+ # end
8
+ end
9
+ end