zuora_connect 2.0.5zz → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,79 +1,80 @@
1
- <html>
2
- <head>
3
- <title>Select Task ID</title>
4
- <meta name="viewport" content="width=device-width,initial-scale=1">
5
- <style>
6
- body {
7
- background-color: #EFEFEF;
8
- color: #2E2F30;
9
- text-align: center;
10
- font-family: arial, sans-serif;
11
- margin: 0;
12
- }
1
+ <html><head>
2
+ <title>Select Task ID</title>
3
+ <meta name="viewport" content="width=device-width,initial-scale=1">
4
+ <style>
5
+ body {
6
+ background-color: #EFEFEF;
7
+ color: #2E2F30;
8
+ text-align: center;
9
+ font-family: arial, sans-serif;
10
+ margin: 0;
11
+ }
13
12
 
14
- div.dialog {
15
- width: 95%;
16
- max-width: 33em;
17
- margin: 4em auto 0;
18
- }
13
+ div.dialog {
14
+ width: 95%;
15
+ max-width: 33em;
16
+ margin: 4em auto 0;
17
+ }
19
18
 
20
- div.dialog > div {
21
- margin: 0 0 1em;
22
- border: 1px solid #CCC;
23
- border-right-color: #999;
24
- border-left-color: #999;
25
- border-bottom-color: #BBB;
26
- border-top: #3D4B5A solid 4px;
27
- border-top-left-radius: 9px;
28
- border-top-right-radius: 9px;
29
- border-bottom-left-radius: 9px;
30
- border-bottom-right-radius: 9px;
31
- background-color: white;
32
- padding: 7px 12% 0;
33
- box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
34
- }
19
+ div.dialog > div {
20
+ margin: 0 0 1em;
21
+ border: 1px solid #CCC;
22
+ border-right-color: #999;
23
+ border-left-color: #999;
24
+ border-bottom-color: #BBB;
25
+ border-top: #3D4B5A solid 4px;
26
+ border-top-left-radius: 9px;
27
+ border-top-right-radius: 9px;
28
+ border-bottom-left-radius: 9px;
29
+ border-bottom-right-radius: 9px;
30
+ background-color: white;
31
+ padding: 7px 12% 0;
32
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
33
+ }
35
34
 
36
- h1 {
37
- font-size: 100%;
38
- color: #3D4B5A;
39
- line-height: 1.5em;
40
- }
35
+ h1 {
36
+ font-size: 100%;
37
+ color: #3D4B5A;
38
+ line-height: 1.5em;
39
+ }
41
40
 
42
-
43
- div.launch_button {
44
- margin: 1em 0 1em;
45
- margin-right: auto;
46
- margin-left: auto;
47
- padding: 1em;
48
- width: 300px;
49
- font-size: 12pt;
50
- font-weight: bold;
51
- background-color: #F7F7F7;
52
- border: 1px solid #CCC;
53
- border-right-color: #999;
54
- border-left-color: #999;
55
- border-bottom-color: #999;
56
- border-top-left-radius: 4px;
57
- border-top-right-radius: 4px;
58
- border-bottom-left-radius: 4px;
59
- border-bottom-right-radius: 4px;
60
- border-top-color: #999;
61
- color: #666;
62
- box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
63
- }
64
- </style>
65
- </head>
66
- <body style='background: white;'>
67
- <div class="dialog">
68
- <div>
69
- <h1>Please select the instance you would like to launch.</h1>
70
- <% names.each do |id, name| %>
71
- <div class="launch_button" >
72
- <% label = name.present? ? "#{id} - #{name}" : id %>
73
- <%= link_to label, root_path(app_instance_id: id) %>
74
- </div>
75
- <% end %>
76
- </div>
41
+
42
+ div.launch_button {
43
+ margin: 1em 0 1em;
44
+ margin-right: auto;
45
+ margin-left: auto;
46
+ padding: 1em;
47
+ width: 300px;
48
+ font-size: 12pt;
49
+ font-weight: bold;
50
+ background-color: #F7F7F7;
51
+ border: 1px solid #CCC;
52
+ border-right-color: #999;
53
+ border-left-color: #999;
54
+ border-bottom-color: #999;
55
+ border-top-left-radius: 4px;
56
+ border-top-right-radius: 4px;
57
+ border-bottom-left-radius: 4px;
58
+ border-bottom-right-radius: 4px;
59
+ border-top-color: #999;
60
+ color: #666;
61
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
62
+ }
63
+ </style>
64
+ </head>
65
+
66
+ <body style='background: white;'>
67
+ <div class="dialog">
68
+ <div>
69
+ <h1>Please select the instance you would like to launch.</h1>
70
+ <% names.each do |id, name| %>
71
+ <div class="launch_button" >
72
+ <% label = name.present? ? "#{id} - #{name}" : id %>
73
+ <%= link_to label, root_path(app_instance_id: id) %>
74
+ </div>
75
+ <% end %>
77
76
  </div>
78
- </body>
79
- </html>
77
+ </div>
78
+
79
+
80
+ </body></html>
@@ -0,0 +1,80 @@
1
+ <html><head>
2
+ <title>Select Task ID</title>
3
+ <meta name="viewport" content="width=device-width,initial-scale=1">
4
+ <style>
5
+ body {
6
+ background-color: #EFEFEF;
7
+ color: #2E2F30;
8
+ text-align: center;
9
+ font-family: arial, sans-serif;
10
+ margin: 0;
11
+ }
12
+
13
+ div.dialog {
14
+ width: 95%;
15
+ max-width: 33em;
16
+ margin: 4em auto 0;
17
+ }
18
+
19
+ div.dialog > div {
20
+ margin: 0 0 1em;
21
+ border: 1px solid #CCC;
22
+ border-right-color: #999;
23
+ border-left-color: #999;
24
+ border-bottom-color: #BBB;
25
+ border-top: #3D4B5A solid 4px;
26
+ border-top-left-radius: 9px;
27
+ border-top-right-radius: 9px;
28
+ border-bottom-left-radius: 9px;
29
+ border-bottom-right-radius: 9px;
30
+ background-color: white;
31
+ padding: 7px 12% 0;
32
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
33
+ }
34
+
35
+ h1 {
36
+ font-size: 100%;
37
+ color: #3D4B5A;
38
+ line-height: 1.5em;
39
+ }
40
+
41
+
42
+ div.launch_button {
43
+ margin: 1em 0 1em;
44
+ margin-right: auto;
45
+ margin-left: auto;
46
+ padding: 1em;
47
+ width: 300px;
48
+ font-size: 12pt;
49
+ font-weight: bold;
50
+ background-color: #F7F7F7;
51
+ border: 1px solid #CCC;
52
+ border-right-color: #999;
53
+ border-left-color: #999;
54
+ border-bottom-color: #999;
55
+ border-top-left-radius: 4px;
56
+ border-top-right-radius: 4px;
57
+ border-bottom-left-radius: 4px;
58
+ border-bottom-right-radius: 4px;
59
+ border-top-color: #999;
60
+ color: #666;
61
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
62
+ }
63
+ </style>
64
+ </head>
65
+
66
+ <body style='background: white;'>
67
+ <div class="dialog">
68
+ <div>
69
+ <h1>You currently don't have access to the deployed workflow instance.</h1>
70
+ <p style='text-align:left'>Please contact one of the below system administrators and have them give you access.</p>
71
+ <ul style='text-align:left'>
72
+ <% admins.each do |admin| %>
73
+ <li><%= admin.username %></li>
74
+ <% end %>
75
+ </ul>
76
+ </div>
77
+ </div>
78
+
79
+
80
+ </body></html>
@@ -0,0 +1,63 @@
1
+ <html><head>
2
+ <title>We're sorry, but something went wrong (500)</title>
3
+ <meta name="viewport" content="width=device-width,initial-scale=1">
4
+ <style>
5
+ body {
6
+ background-color: #EFEFEF;
7
+ color: #2E2F30;
8
+ text-align: center;
9
+ font-family: arial, sans-serif;
10
+ margin: 0;
11
+ }
12
+
13
+ div.dialog {
14
+ width: 95%;
15
+ max-width: 33em;
16
+ margin: 4em auto 0;
17
+ }
18
+
19
+ div.dialog > div {
20
+ border: 1px solid #CCC;
21
+ border-right-color: #999;
22
+ border-left-color: #999;
23
+ border-bottom-color: #BBB;
24
+ border-top: #B00100 solid 4px;
25
+ border-top-left-radius: 9px;
26
+ border-top-right-radius: 9px;
27
+ background-color: white;
28
+ padding: 7px 12% 0;
29
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
30
+ }
31
+
32
+ h1 {
33
+ font-size: 100%;
34
+ color: #730E15;
35
+ line-height: 1.5em;
36
+ }
37
+
38
+ div.dialog > p {
39
+ margin: 0 0 1em;
40
+ padding: 1em;
41
+ background-color: #F7F7F7;
42
+ border: 1px solid #CCC;
43
+ border-right-color: #999;
44
+ border-left-color: #999;
45
+ border-bottom-color: #999;
46
+ border-bottom-left-radius: 4px;
47
+ border-bottom-right-radius: 4px;
48
+ border-top-color: #DADADA;
49
+ color: #666;
50
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
51
+ }
52
+ </style>
53
+ </head>
54
+
55
+ <body>
56
+ <!-- This file lives in public/500.html -->
57
+ <div class="dialog">
58
+ <div>
59
+ <h1>Session is invalid</h1>
60
+ </div>
61
+ <p>Please try relaunching the application from connect.zuora.com</p>
62
+ </div>
63
+ </body></html>
data/config/routes.rb CHANGED
@@ -1,6 +1,8 @@
1
1
  ZuoraConnect::Engine.routes.draw do
2
2
  get '/health' => 'static#health'
3
3
  get '/internal/data' => 'static#metrics'
4
+ get '/invalid_session' => 'static#session_error', :as => :invalid_session
5
+ get '/invalid_instance' => "static#invalid_app_instance_error", :as => :invalid_instance
4
6
  post '/initialize_app' => 'static#initialize_app'
5
7
 
6
8
  namespace :api do
@@ -7,7 +7,7 @@ module Resque
7
7
  module Plugins
8
8
  module CustomLogger
9
9
  def before_perform(*args)
10
- Rails.logger.with_fields = { trace_id: SecureRandom.uuid, name: "RailsWorker"} if Rails.logger.class.to_s == 'Ougai::Logger' && ZuoraConnect.configuration.json_logging
10
+ Rails.logger.with_fields = { trace_id: SecureRandom.uuid, name: "RailsWorker"} if Rails.logger.class.to_s == 'Ougai::Logger'
11
11
  case args.class.to_s
12
12
  when "Array"
13
13
  if args.first.class == Hash
@@ -3,11 +3,11 @@ module ZuoraConnect
3
3
 
4
4
  attr_accessor :default_locale, :default_time_zone, :url, :mode, :delayed_job,:private_key, :additional_apartment_models
5
5
 
6
- attr_accessor :enable_metrics, :telegraf_endpoint, :telegraf_debug, :custom_prometheus_update_block, :silencer_resque_finish, :blpop_queue
6
+ attr_accessor :enable_metrics, :telegraf_endpoint, :telegraf_debug, :custom_prometheus_update_block, :silencer_resque_finish, :blpop_queue, :app_access_permissions
7
7
 
8
8
  attr_accessor :oauth_client_id, :oauth_client_secret, :oauth_client_redirect_uri
9
9
 
10
- attr_accessor :dev_mode_logins, :dev_mode_options, :dev_mode_mode, :dev_mode_appinstance, :dev_mode_user, :dev_mode_pass, :dev_mode_admin, :dev_mode_secret_access_key,:dev_mode_access_key_id,:aws_region, :s3_bucket_name, :s3_folder_name, :json_logging
10
+ attr_accessor :dev_mode_logins, :dev_mode_options, :dev_mode_mode, :dev_mode_appinstance, :dev_mode_user, :dev_mode_pass, :dev_mode_admin, :dev_mode_secret_access_key,:dev_mode_access_key_id,:aws_region, :s3_bucket_name, :s3_folder_name
11
11
 
12
12
  def initialize
13
13
  @default_locale = :en
@@ -19,6 +19,7 @@ module ZuoraConnect
19
19
  @additional_apartment_models = []
20
20
  @silencer_resque_finish = true
21
21
  @blpop_queue = false
22
+ @app_access_permissions = false
22
23
 
23
24
  # Setting the app name for telegraf write
24
25
  @enable_metrics = false
@@ -42,7 +43,6 @@ module ZuoraConnect
42
43
  @aws_region = "us-west-2"
43
44
  @s3_bucket_name = "rbm-apps"
44
45
  @s3_folder_name = Rails.application.class.parent_name
45
- @json_logging = Rails.env.to_s == 'development' ? false : true
46
46
  end
47
47
 
48
48
  def private_key