redhat_access 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +24 -0
- data/LICENSE.txt +620 -0
- data/README.rdoc +7 -0
- data/Rakefile +131 -0
- data/app/assets/javascripts/insights/app.module.js +64 -0
- data/app/assets/javascripts/insights/application.js +18 -0
- data/app/assets/javascripts/insights/configuration.controller.js +66 -0
- data/app/assets/javascripts/insights/configuration.service.js +28 -0
- data/app/assets/javascripts/insights/views/configuration.html +85 -0
- data/app/assets/javascripts/insights/views/error.html +13 -0
- data/app/assets/javascripts/insights/views/help.html +16 -0
- data/app/assets/javascripts/redhat_access/analytics_dashboard.js +2 -0
- data/app/assets/javascripts/redhat_access/application.js +15 -0
- data/app/assets/javascripts/redhat_access/redhat_access.module.js +126 -0
- data/app/assets/stylesheets/insights/application.css +14 -0
- data/app/assets/stylesheets/insights/insights.css +21 -0
- data/app/assets/stylesheets/redhat_access/application.css +14 -0
- data/app/assets/stylesheets/redhat_access/telemetry_configuration.css +4 -0
- data/app/controllers/redhat_access/analytics_dashboard_controller.rb +12 -0
- data/app/controllers/redhat_access/api/api_controller.rb +24 -0
- data/app/controllers/redhat_access/api/attachments_controller.rb +40 -0
- data/app/controllers/redhat_access/api/logs_controller.rb +49 -0
- data/app/controllers/redhat_access/api/machine_telemetry_api_controller.rb +112 -0
- data/app/controllers/redhat_access/api/strata_proxy_controller.rb +81 -0
- data/app/controllers/redhat_access/api/telemetry_api_controller.rb +179 -0
- data/app/controllers/redhat_access/application_controller.rb +2 -0
- data/app/controllers/redhat_access/cases_controller.rb +14 -0
- data/app/controllers/redhat_access/configuration_controller.rb +21 -0
- data/app/controllers/redhat_access/log_viewer_controller.rb +9 -0
- data/app/controllers/redhat_access/redhat_access_controller.rb +8 -0
- data/app/controllers/redhat_access/search_controller.rb +9 -0
- data/app/controllers/redhat_access/strata_credentials_controller.rb +48 -0
- data/app/controllers/redhat_access/telemetry_configurations_controller.rb +38 -0
- data/app/controllers/redhat_access/telemetry_controller.rb +6 -0
- data/app/helpers/redhat_access/analytics_dashboard_helper.rb +13 -0
- data/app/helpers/redhat_access/application_helper.rb +4 -0
- data/app/helpers/redhat_access/attachments_helper.rb +4 -0
- data/app/helpers/redhat_access/cases_helper.rb +4 -0
- data/app/helpers/redhat_access/log_viewer_helper.rb +4 -0
- data/app/helpers/redhat_access/logs_helper.rb +4 -0
- data/app/helpers/redhat_access/redhat_access_helper.rb +4 -0
- data/app/helpers/redhat_access/search_helper.rb +4 -0
- data/app/helpers/redhat_access/telemetry_configuration_helper.rb +4 -0
- data/app/models/redhat_access/concerns/organization_extensions.rb +10 -0
- data/app/models/redhat_access/telemetry_configuration.rb +11 -0
- data/app/models/redhat_access/telemetry_proxy_credentials.rb +10 -0
- data/app/services/redhat_access/authentication/client_authentication.rb +80 -0
- data/app/services/redhat_access/telemetry/look_ups.rb +233 -0
- data/app/services/redhat_access/telemetry/portal_client.rb +39 -0
- data/app/views/redhat_access/analytics_dashboard/configuration.html.erb +85 -0
- data/app/views/redhat_access/analytics_dashboard/error.html.erb +13 -0
- data/app/views/redhat_access/analytics_dashboard/help.html.erb +16 -0
- data/app/views/redhat_access/analytics_dashboard/index.html.erb +69 -0
- data/app/views/redhat_access/analytics_dashboard/welcome.html.erb +8 -0
- data/app/views/redhat_access/redhat_access/index.html.erb +34 -0
- data/ca/rh_cert-api_chain.pem +74 -0
- data/config/config.yml.example +15 -0
- data/config/environments/development.rb +5 -0
- data/config/initializers/load_config.rb +5 -0
- data/config/mount_engine.rb +3 -0
- data/config/routes.rb +36 -0
- data/db/migrate/20141204161152_create_redhat_access_telemetry_proxy_credentials.rb +11 -0
- data/db/migrate/20150319153744_create_redhat_access_telemetry_configurations.rb +13 -0
- data/db/migrate/20160425175501_add_email_to_telemetry_configurations.rb +5 -0
- data/db/seeds.d/200-update-insights-roles.rb +11 -0
- data/lib/redhat_access/configuration.rb +8 -0
- data/lib/redhat_access/engine.rb +225 -0
- data/lib/redhat_access/sos_reports/generator.rb +58 -0
- data/lib/redhat_access/strata/client.rb +39 -0
- data/lib/redhat_access/version.rb +3 -0
- data/lib/redhat_access.rb +5 -0
- data/lib/tasks/redhat_access_tasks.rake +41 -0
- data/locale/Makefile +62 -0
- data/locale/de/LC_MESSAGES/redhat_access.mo +0 -0
- data/locale/de/redhat_access.po +589 -0
- data/locale/es/LC_MESSAGES/redhat_access.mo +0 -0
- data/locale/es/redhat_access.po +589 -0
- data/locale/fr/LC_MESSAGES/redhat_access.mo +0 -0
- data/locale/fr/redhat_access.po +593 -0
- data/locale/gemspec.rb +2 -0
- data/locale/it/LC_MESSAGES/redhat_access.mo +0 -0
- data/locale/it/redhat_access.po +589 -0
- data/locale/ja/LC_MESSAGES/redhat_access.mo +0 -0
- data/locale/ja/redhat_access.po +569 -0
- data/locale/ko/LC_MESSAGES/redhat_access.mo +0 -0
- data/locale/ko/redhat_access.po +570 -0
- data/locale/pt/LC_MESSAGES/redhat_access.mo +0 -0
- data/locale/pt/redhat_access.po +588 -0
- data/locale/redhat_access.pot +34 -0
- data/locale/ru/LC_MESSAGES/redhat_access.mo +0 -0
- data/locale/ru/redhat_access.po +580 -0
- data/locale/zh/LC_MESSAGES/redhat_access.mo +0 -0
- data/locale/zh/redhat_access.po +561 -0
- data/redhat_access.gemspec +30 -0
- data/script/rails +8 -0
- data/script/sos_reports/foreman_sosreport.pam +9 -0
- data/script/sos_reports/foreman_sosreport_console.apps +3 -0
- data/script/sos_reports/foreman_sosreport_wrapper.py +65 -0
- data/test/dummy/README.rdoc +261 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +15 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/config/application.rb +59 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +67 -0
- data/test/dummy/config/environments/test.rb +37 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +15 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +4 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +25 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/fixtures/redhat_access/telemetry_configurations.yml +11 -0
- data/test/fixtures/redhat_access/telemetry_proxy_credentials.yml +11 -0
- data/test/functional/redhat_access/analytics_dashboard_controller_test.rb +11 -0
- data/test/functional/redhat_access/attachments_controller_test.rb +11 -0
- data/test/functional/redhat_access/cases_controller_test.rb +16 -0
- data/test/functional/redhat_access/configuration_controller_test.rb +11 -0
- data/test/functional/redhat_access/log_viewer_controller_test.rb +11 -0
- data/test/functional/redhat_access/logs_controller_test.rb +9 -0
- data/test/functional/redhat_access/redhat_access_controller_test.rb +11 -0
- data/test/functional/redhat_access/search_controller_test.rb +11 -0
- data/test/functional/redhat_access/telemetry_configuration_controller_test.rb +26 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/models/redhat_access/telemetry_proxy_credentials_test.rb +9 -0
- data/test/redhat_access_test.rb +7 -0
- data/test/sos-report-test.rb +32 -0
- data/test/test_helper.rb +15 -0
- data/test/unit/helpers/redhat_access/analytics_dashboard_helper_test.rb +6 -0
- data/test/unit/helpers/redhat_access/attachments_helper_test.rb +6 -0
- data/test/unit/helpers/redhat_access/cases_helper_test.rb +6 -0
- data/test/unit/helpers/redhat_access/log_viewer_helper_test.rb +6 -0
- data/test/unit/helpers/redhat_access/logs_helper_test.rb +6 -0
- data/test/unit/helpers/redhat_access/redhat_access_helper_test.rb +6 -0
- data/test/unit/helpers/redhat_access/search_helper_test.rb +6 -0
- data/test/unit/helpers/redhat_access/telemetry_configuration_helper_test.rb +6 -0
- data/test/unit/redhat_access/telemetry_configuration_test.rb +9 -0
- data/vendor/assets/fonts/fonts/FontAwesome.otf +0 -0
- data/vendor/assets/fonts/fonts/fontawesome-webfont.eot +0 -0
- data/vendor/assets/fonts/fonts/fontawesome-webfont.svg +655 -0
- data/vendor/assets/fonts/fonts/fontawesome-webfont.ttf +0 -0
- data/vendor/assets/fonts/fonts/fontawesome-webfont.woff +0 -0
- data/vendor/assets/fonts/fonts/icomoon.eot +0 -0
- data/vendor/assets/fonts/fonts/icomoon.svg +22 -0
- data/vendor/assets/fonts/fonts/icomoon.ttf +0 -0
- data/vendor/assets/fonts/fonts/icomoon.woff +0 -0
- data/vendor/assets/fonts/fonts/overpass_bold-web.eot +0 -0
- data/vendor/assets/fonts/fonts/overpass_bold-web.svg +454 -0
- data/vendor/assets/fonts/fonts/overpass_bold-web.ttf +0 -0
- data/vendor/assets/fonts/fonts/overpass_bold-web.woff +0 -0
- data/vendor/assets/fonts/fonts/overpass_light-webfont.eot +0 -0
- data/vendor/assets/fonts/fonts/overpass_light-webfont.svg +2105 -0
- data/vendor/assets/fonts/fonts/overpass_light-webfont.ttf +0 -0
- data/vendor/assets/fonts/fonts/overpass_light-webfont.woff +0 -0
- data/vendor/assets/fonts/fonts/overpass_regular-web.eot +0 -0
- data/vendor/assets/fonts/fonts/overpass_regular-web.svg +454 -0
- data/vendor/assets/fonts/fonts/overpass_regular-web.ttf +0 -0
- data/vendor/assets/fonts/fonts/overpass_regular-web.woff +0 -0
- data/vendor/assets/fonts/fonts/portalicons.eot +0 -0
- data/vendor/assets/fonts/fonts/portalicons.svg +145 -0
- data/vendor/assets/fonts/fonts/portalicons.ttf +0 -0
- data/vendor/assets/fonts/fonts/portalicons.woff +0 -0
- data/vendor/assets/images/images/Icon_RH_Document_Blueprint_RGB_Button.png +0 -0
- data/vendor/assets/images/images/Icon_RH_Misc_Lifestyle_RGB_Button.png +0 -0
- data/vendor/assets/images/images/Icon_RH_Software_Data_CMYK_Button.png +0 -0
- data/vendor/assets/images/images/Icon_RH_Software_Transfer-Upload_CMYK_Button.png +0 -0
- data/vendor/assets/images/images/bg1.jpg +0 -0
- data/vendor/assets/images/images/bg_body.jpg +0 -0
- data/vendor/assets/images/images/bg_chart-shadow.png +0 -0
- data/vendor/assets/images/images/bg_dount-hole-na.png +0 -0
- data/vendor/assets/images/images/bg_glow.jpg +0 -0
- data/vendor/assets/images/images/bg_pattern.png +0 -0
- data/vendor/assets/images/images/i_chart.png +0 -0
- data/vendor/assets/images/images/img-insights-connection-sat.png +0 -0
- data/vendor/assets/images/images/img-insights-connection.png +0 -0
- data/vendor/assets/images/images/img-sat5-step2-admin.png +0 -0
- data/vendor/assets/images/images/img-sat5-step3-completed.png +0 -0
- data/vendor/assets/images/images/img-sat5-step3-pending.png +0 -0
- data/vendor/assets/images/images/img-sat5-step3-setup.png +0 -0
- data/vendor/assets/images/images/img-sat5-step5-overview.png +0 -0
- data/vendor/assets/images/images/img-sat5-step5-reports.png +0 -0
- data/vendor/assets/images/images/img-sat5-step5-systems.png +0 -0
- data/vendor/assets/images/images/img-sat6-step2.jpg +0 -0
- data/vendor/assets/images/images/img-sat6-step3.jpg +0 -0
- data/vendor/assets/images/images/img-sat6-step3.png +0 -0
- data/vendor/assets/images/images/img-sat6-step4.jpg +0 -0
- data/vendor/assets/images/images/img-sat6-step5a.jpg +0 -0
- data/vendor/assets/images/images/img-sat6-step5b.jpg +0 -0
- data/vendor/assets/images/images/img-sat6-step5c.jpg +0 -0
- data/vendor/assets/images/images/img-sat6-step5d.jpg +0 -0
- data/vendor/assets/images/images/keynote-snap.jpg +0 -0
- data/vendor/assets/images/images/keynote-snap.png +0 -0
- data/vendor/assets/images/images/splash-gettingstarted.jpg +0 -0
- data/vendor/assets/images/images/splash-learnmore.jpg +0 -0
- data/vendor/assets/images/images/splash-security.jpg +0 -0
- data/vendor/assets/javascripts/angular/angular.js +20131 -0
- data/vendor/assets/javascripts/redhat_access/redhat_access_angular_ui-deps.js +14103 -0
- data/vendor/assets/javascripts/redhat_access/redhat_access_angular_ui.js +7854 -0
- data/vendor/assets/javascripts/telemetry/insights.js +39 -0
- data/vendor/assets/stylesheets/redhat_access/redhat_access_angular_ui-deps.css +11 -0
- data/vendor/assets/stylesheets/redhat_access/redhat_access_angular_ui.css +1 -0
- data/vendor/assets/stylesheets/telemetry/sat6.css +18 -0
- 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,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,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,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
|
+
|
data/test/test_helper.rb
ADDED
@@ -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
|
Binary file
|
Binary file
|