zuora_connect 2.0.5a → 2.0.5b

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: daee0106cd93ca1eca1bfa9a6b1a469b43c77c86a036af8044c23686f65ab5d5
4
- data.tar.gz: ce11751c99ea5023ccd64eed8f8aaa4ae796b2a1347c0e6b3e321b62008d51ec
3
+ metadata.gz: e2bc23b038baaffac09304c6d5bffea0fbed5833b0ccfa5cd5852998c828a50d
4
+ data.tar.gz: 55ee2a57d3a580016e13a718248f66a4e1c6bb9c019913ba85d0ec6caf84d399
5
5
  SHA512:
6
- metadata.gz: 5bab8cd6389935c844276c90787acde6ac8cef9cf9c85d4a6ee9ad1ea2fd9755e3140d3d53f4b6843cfc0f94d2516fe994faf64e547195607b2e2836a51d46bf
7
- data.tar.gz: a992917b603be6db6e6af1f3a429b9197b89cc4be7cc17cf68a6e95bc42d88d736bffb017407fc83e2fd98a255ffabcaf206a892f8fe9d13575b1b8c001ff0ef
6
+ metadata.gz: f8fcdd96913762cee3ed9589e3ba35dad04a27fa2a861ae999ddd32e3832d48f95c0a6774c5fd58e136581928d6642f42c537a1f11898f26a384c59718fe6988
7
+ data.tar.gz: 1f0c6595c8748c87d79dfdf52a2ce5008f00b4022f6c7a4cf45f1ceab0215c72da76d2c36b118dc0bd81912a59c429af0109abfd511bf54727e674ef83bb3735
@@ -1,25 +1,11 @@
1
1
  module ZuoraConnect
2
2
  class StaticController < ApplicationController
3
- before_action :authenticate_connect_app_request, :except => [:metrics, :health, :session_error, :invalid_app_instance_error, :initialize_app]
4
- before_action :clear_connect_app_session, :only => [:metrics, :health, :session_error, :invalid_app_instance_error, :initialize_app]
5
- after_action :persist_connect_app_session, :except => [:metrics, :health, :session_error, :invalid_app_instance_error, :initialize_app]
3
+ before_action :authenticate_connect_app_request, :except => [:metrics, :health, :initialize_app]
4
+ before_action :clear_connect_app_session, :only => [:metrics, :health, :initialize_app]
5
+ after_action :persist_connect_app_session, :except => [:metrics, :health, :initialize_app]
6
6
 
7
7
  skip_before_action :verify_authenticity_token, :only => [:initialize_app]
8
8
 
9
- def session_error
10
- respond_to do |format|
11
- format.html
12
- format.json { render json: { message: "Session Error", status: 500 }, status: 500 }
13
- end
14
- end
15
-
16
- def invalid_app_instance_error
17
- respond_to do |format|
18
- format.html
19
- format.json {render json: { message: "Invalid App Instance", status: 500 }, status: 500 }
20
- end
21
- end
22
-
23
9
  def metrics
24
10
  type = params[:type].present? ? params[:type] : "versions"
25
11
  render json: ZuoraConnect::AppInstance.get_metrics(type).to_json, status: 200
@@ -0,0 +1,77 @@
1
+ <html>
2
+ <head>
3
+ <title>Handled Error</title>
4
+ <meta name="viewport" content="width=device-width,initial-scale=1">
5
+ <style>
6
+ body {
7
+ background-color: white;
8
+ color: #2E2F30;
9
+ text-align: center;
10
+ font-family: arial, sans-serif;
11
+ margin: 0;
12
+ }
13
+
14
+ div.dialog {
15
+ width: 95%;
16
+ max-width: 33em;
17
+ margin: 4em auto 0;
18
+ }
19
+
20
+ div.dialog > div {
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
+ background-color: white;
29
+ padding: 7px 12% 0;
30
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
31
+ }
32
+
33
+ h1 {
34
+ font-size: 100%;
35
+ color: #3D4B5A;
36
+ line-height: 1.5em;
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
+ <% if defined?(exception) %>
57
+ <div class="dialog" style='max-width: 74em;'>
58
+ <div><h1><%= exception.class %> - '<%= exception.message %>'</h1></div>
59
+ <p style='text-align: left;'>
60
+ <% exception.backtrace.each do |line| %>
61
+ <%= line %><br>
62
+ <% end %>
63
+ </p>
64
+ </div>
65
+ <% elsif defined?(message) && defined?(title) %>
66
+ <div class="dialog">
67
+ <div><h1><%= title %></h1></div>
68
+ <p><%= message %></p>
69
+ </div>
70
+ <% else %>
71
+ <div class="dialog">
72
+ <div><h1>The launch url was invalid</h1></div>
73
+ <p>Please try relaunching this application</p>
74
+ </div>
75
+ <% end %>
76
+ </body>
77
+ </html>
@@ -0,0 +1,76 @@
1
+ <html>
2
+ <head>
3
+ <title>We're sorry, but something went wrong</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
+ }
13
+
14
+ div.dialog {
15
+ width: 95%;
16
+ max-width: 33em;
17
+ margin: 4em auto 0;
18
+ }
19
+
20
+ div.dialog > div {
21
+ border: 1px solid #CCC;
22
+ border-right-color: #999;
23
+ border-left-color: #999;
24
+ border-bottom-color: #BBB;
25
+ border-top: #B00100 solid 4px;
26
+ border-top-left-radius: 9px;
27
+ border-top-right-radius: 9px;
28
+ background-color: white;
29
+ padding: 7px 12% 0;
30
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
31
+ }
32
+
33
+ h1 {
34
+ font-size: 100%;
35
+ color: #730E15;
36
+ line-height: 1.5em;
37
+ }
38
+
39
+ div.dialog > p {
40
+ margin: 0 0 1em;
41
+ padding: 1em;
42
+ background-color: #F7F7F7;
43
+ border: 1px solid #CCC;
44
+ border-right-color: #999;
45
+ border-left-color: #999;
46
+ border-bottom-color: #999;
47
+ border-bottom-left-radius: 4px;
48
+ border-bottom-right-radius: 4px;
49
+ border-top-color: #DADADA;
50
+ color: #666;
51
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
52
+ }
53
+ </style>
54
+ </head>
55
+
56
+ <body>
57
+ <!-- This file lives in public/500.html -->
58
+ <% if defined?(exception) %>
59
+ <div class="dialog" style='max-width: 74em;'>
60
+ <div><h1><%= exception.class %> - '<%= exception.message %>'</h1></div>
61
+ <p style='text-align: left;'>
62
+ <% exception.backtrace.each do |line| %>
63
+ <%= line %><br>
64
+ <% end %>
65
+ </p>
66
+ </div>
67
+ <% else %>
68
+ <div class="dialog">
69
+ <div>
70
+ <h1>The launch url was invalid</h1>
71
+ </div>
72
+ <p>Please try relaunching this application</p>
73
+ </div>
74
+ <% end %>
75
+ </body>
76
+ </html>
@@ -1,80 +1,79 @@
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
- }
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
+ }
12
13
 
13
- div.dialog {
14
- width: 95%;
15
- max-width: 33em;
16
- margin: 4em auto 0;
17
- }
14
+ div.dialog {
15
+ width: 95%;
16
+ max-width: 33em;
17
+ margin: 4em auto 0;
18
+ }
18
19
 
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
- }
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
+ }
34
35
 
35
- h1 {
36
- font-size: 100%;
37
- color: #3D4B5A;
38
- line-height: 1.5em;
39
- }
36
+ h1 {
37
+ font-size: 100%;
38
+ color: #3D4B5A;
39
+ line-height: 1.5em;
40
+ }
40
41
 
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 %>
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>
76
77
  </div>
77
- </div>
78
-
79
-
80
- </body></html>
78
+ </body>
79
+ </html>
data/config/routes.rb CHANGED
@@ -1,8 +1,6 @@
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
6
4
  post '/initialize_app' => 'static#initialize_app'
7
5
 
8
6
  namespace :api do
@@ -42,16 +42,26 @@ module ZuoraConnect
42
42
  else
43
43
  @appinstance = appinstances.first
44
44
  end
45
-
46
- else #if request.headers.fetch("Authorization", "").include?("Basic ")
45
+
46
+ elsif params['test'].blank?
47
47
  authenticate_or_request_with_http_basic do |username, password|
48
48
  @appinstance = ZuoraConnect::AppInstance.where(:token => password).first
49
49
  @appinstance ||= ZuoraConnect::AppInstance.where(:api_token => password).first
50
50
  ZuoraConnect.logger.debug("[#{@appinstance.id}] API REQUEST - Basic Auth") if @appinstance.present?
51
51
  check_instance
52
52
  end
53
- # else
54
- # check_instance
53
+ else
54
+ response.set_header('WWW-Authenticate', "Basic realm=\"Application\"")
55
+ case params['test']
56
+ when "1"
57
+ render json: {"status": 401, "message": "Access Denied"}, status: :unauthorized
58
+ when "2"
59
+ render html: "HTTP Basic: Access denied.\n", status: :unauthorized
60
+
61
+ when "3"
62
+ render plain: "Access Denied", status: :unauthorized
63
+ end
64
+ #check_instance
55
65
  end
56
66
 
57
67
  if @appinstance.present?
@@ -73,7 +83,11 @@ module ZuoraConnect
73
83
  elsif cookies['ZSession'].present?
74
84
  zuora_client = ZuoraAPI::Basic.new(url: "https://#{zuora_host}", session: cookies['ZSession'])
75
85
  else
76
- raise ZuoraConnect::Exceptions::Error.new("Neither the ZSession cookie nor the Zuora-Auth-Token are present in payload.")
86
+ render "zuora_connect/static/error_handled", :locals => {
87
+ :title => "Missing Authorization Token",
88
+ :message => "Zuora 'Zuora-Auth-Token' header and 'ZSession' cookie not present."
89
+ }
90
+ return
77
91
  end
78
92
  zuora_entity_id = request.headers['ZuoraCurrentEntity']
79
93
  zuora_instance_id = params[:sidebar_launch].to_bool ? nil : (params[:app_instance_id] || session["appInstance"])
@@ -86,16 +100,20 @@ module ZuoraConnect
86
100
  session["ZuoraCurrentEntity"] = identity['entityId']
87
101
 
88
102
  begin
89
- client_describe, response = new_zuora_client.rest_call(url: zuora_client.rest_endpoint("genesis/user/info").gsub('v1/', ''))
103
+ client_describe, response = zuora_client.rest_call(url: zuora_client.rest_endpoint("genesis/user/info").gsub('v1/', ''), session_type: zuora_client.class == ZuoraAPI::Oauth ? :bearer : :basic, headers: zuora_client.class == ZuoraAPI::Oauth ? {} : {'Authorization' => "ZSession-a3N2w #{zuora_client.get_session(prefix: false, auth_type: :basic)}"})
90
104
  session["ZuoraCurrentUserInfo"] = client_describe
91
105
  rescue => ex
92
106
  ZuoraConnect.logger.error(ex)
93
107
  end
94
108
 
95
109
  raise ZuoraConnect::Exceptions::Error.new("Header entity id, '#{zuora_entity_id}' does not match identity call entity id, '#{identity['entityId']}'.") if zuora_entity_id != identity['entityId']
110
+
111
+ rescue ZuoraAPI::Exceptions::ZuoraAPIAuthenticationTypeError => ex
112
+ redirect_to "https://#{zuora_host}/apps/newlogin.do?retURL=#{CGI.escape(request.fullpath)}"
113
+ return
96
114
  rescue => ex
97
115
  ZuoraConnect.logger.error(ex)
98
- render "zuora_connect/static/invalid_launch_request", :locals => {:exception => ex}
116
+ render "zuora_connect/static/error_unhandled", :locals => {:exception => ex}
99
117
  return
100
118
  end
101
119
  end
@@ -116,7 +134,7 @@ module ZuoraConnect
116
134
  appinstances = ZuoraConnect::AppInstance.where(:id => task_ids).pluck(:id, :name)
117
135
  rescue => ex
118
136
  ZuoraConnect.logger.error(ex)
119
- render "zuora_connect/static/invalid_launch_request", :locals => {:exception => ex}
137
+ render "zuora_connect/static/error_unhandled", :locals => {:exception => ex}
120
138
  return
121
139
  end
122
140
  else
@@ -127,7 +145,7 @@ module ZuoraConnect
127
145
  zuora_user_id = cookies['Zuora-User-Id'] || session["ZuoraCurrentIdentity"]['userId']
128
146
 
129
147
  #One deployed instance
130
- if appinstances.size == 10
148
+ if appinstances.size == 1
131
149
  ZuoraConnect.logger.debug("Instance is #{appinstances.to_h.keys.first}")
132
150
  @appinstance = ZuoraConnect::AppInstance.find(appinstances.to_h.keys.first)
133
151
 
@@ -154,10 +172,13 @@ module ZuoraConnect
154
172
  else
155
173
  begin
156
174
  #Ensure user can access oauth creation API
157
- if session["ZuoraCurrentIdentity"]['platformRole'] != 'ADMIN' || true
175
+ if session["ZuoraCurrentIdentity"]['platformRole'] != 'ADMIN'
158
176
  Thread.current[:appinstance] = nil
159
177
  session["appInstance"] = nil
160
- render "zuora_connect/static/cant_deploy"
178
+ render "zuora_connect/static/error_handled", :locals => {
179
+ :title => "Application can only complete its initial setup via platform administrator",
180
+ :message => "Please contact admin of tenant and have them click on link again to launch application."
181
+ }
161
182
  return
162
183
  end
163
184
 
@@ -193,28 +214,27 @@ module ZuoraConnect
193
214
  "name": client_describe["tenantName"],
194
215
  "mode": "Collections",
195
216
  "status": "Running",
196
- "target_login": {
197
- "tenant_type": "Zuora",
198
- "username": session["ZuoraCurrentIdentity"]["username"],
199
- "url": new_zuora_client.url,
200
- "status": "Active",
201
- "oauth_client_id": oauth_response['clientId'],
202
- "oauth_secret": oauth_response['clientSecret'],
203
- "authentication_type": "OAUTH",
204
- "entities": client_describe["accessibleEntities"].map {|e| e.merge({'displayName' => client_describe["tenantName"]})} #needs work
217
+ ZuoraConnect::AppInstance::LOGIN_TENANT_DESTINATION => {
218
+ "tenant_type": "Zuora",
219
+ "username": session["ZuoraCurrentIdentity"]["username"],
220
+ "url": new_zuora_client.url,
221
+ "status": "Active",
222
+ "oauth_client_id": oauth_response['clientId'],
223
+ "oauth_secret": oauth_response['clientSecret'],
224
+ "authentication_type": "OAUTH",
225
+ "entities": client_describe["accessibleEntities"].map {|e| e.merge({'displayName' => client_describe["tenantName"]})} #needs work
205
226
  },
206
227
  "tenant_ids": client_describe["accessibleEntities"].map{|e| e['entityId'] }.push(client_describe["tenantId"]).uniq,
207
228
  }
208
229
 
209
230
  @appinstance = ZuoraConnect::AppInstance.new(:id => next_id, :zuora_logins => task_data.to_json, :oauth_expires_at => Time.now + 1000.years)
210
231
  @appinstance.save(:validate => false)
211
- # @appinstance = ZuoraConnect::AppInstance.find(appinstance.id)
212
- # @appinstance.apartment_switch(method = nil, migrate = true)
232
+ @appinstance.apartment_switch
213
233
 
214
234
  session["appInstance"] = @appinstance.id
215
235
  rescue => ex
216
236
  ZuoraConnect.logger.error(ex)
217
- render "zuora_connect/static/invalid_launch_request", :locals => {:exception => ex}
237
+ render "zuora_connect/static/error_unhandled", :locals => {:exception => ex}
218
238
  return
219
239
  end
220
240
  end
@@ -224,12 +244,24 @@ module ZuoraConnect
224
244
  if session["appInstance"].present?
225
245
  @appinstance = ZuoraConnect::AppInstance.where(:id => session["appInstance"]).first
226
246
  else
227
- raise ZuoraConnect::Exceptions::SessionInvalid.new("Session Blank -- Relaunch Application")
247
+ render "zuora_connect/static/error_handled", :locals => {
248
+ :title => "Application state could not be verified",
249
+ :message => "Please relaunch application."
250
+ }
251
+ return
228
252
  end
229
253
  end
230
254
  else
231
255
  setup_instance_via_dev_mode
232
256
  end
257
+
258
+ if !defined?(@appinstance)
259
+ render "zuora_connect/static/error_handled", :locals => {
260
+ :title => "Application state could not be found.",
261
+ :message => "Please relaunch application."
262
+ }
263
+ return
264
+ end
233
265
  #Call .data_lookup with the current session to retrieve session. In some cases session may be stored/cache in redis
234
266
  #so data lookup provides a model method that can be overriden per app.
235
267
  if params[:controller] != 'zuora_connect/api/v1/app_instance' && params[:action] != 'drop'
@@ -237,6 +269,7 @@ module ZuoraConnect
237
269
  @appinstance.new_session(:session => @appinstance.data_lookup(:session => session))
238
270
  end
239
271
  end
272
+
240
273
  if session["#{@appinstance.id}::user::email"].present?
241
274
  ElasticAPM.set_user(session["#{@appinstance.id}::user::email"]) if defined?(ElasticAPM) && ElasticAPM.running?
242
275
  PaperTrail.whodunnit = session["#{@appinstance.id}::user::email"] if defined?(PaperTrail)
@@ -1,3 +1,3 @@
1
1
  module ZuoraConnect
2
- VERSION = "2.0.5a"
2
+ VERSION = "2.0.5b"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zuora_connect
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.5a
4
+ version: 2.0.5b
5
5
  platform: ruby
6
6
  authors:
7
7
  - Connect Team
@@ -308,11 +308,9 @@ files:
308
308
  - app/models/zuora_connect/zuora_user.rb
309
309
  - app/views/layouts/zuora_connect/application.html.erb
310
310
  - app/views/sql/refresh_aggregate_table.txt
311
- - app/views/zuora_connect/static/cant_deploy.html.erb
312
- - app/views/zuora_connect/static/invalid_app_instance_error.html.erb
313
- - app/views/zuora_connect/static/invalid_launch_request.html.erb
311
+ - app/views/zuora_connect/static/error_handled.html.erb
312
+ - app/views/zuora_connect/static/error_unhandled.erb
314
313
  - app/views/zuora_connect/static/launch.html.erb
315
- - app/views/zuora_connect/static/session_error.html.erb
316
314
  - config/initializers/apartment.rb
317
315
  - config/initializers/aws.rb
318
316
  - config/initializers/object_method_hooks.rb
@@ -1,75 +0,0 @@
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>Application can only complete its initial setup via platform administrator.</h1>
70
- <p style='text-align:left'>Please contact admin of tenant and have them click on link again to launch application.</p>
71
- </div>
72
- </div>
73
-
74
-
75
- </body></html>
@@ -1,65 +0,0 @@
1
- <html><head>
2
- <title>We're sorry, but something went wrong</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>We're sorry, but this request could not be verified.</h1>
60
- </div>
61
- <p>Please try relaunching this application at connect.zuora.com</p>
62
- </div>
63
-
64
-
65
- </body></html>
@@ -1,81 +0,0 @@
1
- <html><head>
2
- <title>We're sorry, but something went wrong</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
- div#main{
53
- background: white;
54
- }
55
- </style>
56
- </head>
57
-
58
- <body >
59
- <div style='background: white;'>
60
- <!-- This file lives in public/500.html -->
61
- <% if defined?(exception) %>
62
- <div class="dialog" style='max-width: 74em;'>
63
- <div>
64
- <h1><%= exception.class %> - '<%= exception.message %>'</h1>
65
- </div>
66
- <p style='text-align: left;'>
67
- <% exception.backtrace.each do |line| %>
68
- <%= line %><br>
69
- <% end %>
70
- </p>
71
- </div>
72
- <% else %>
73
- <div class="dialog">
74
- <div>
75
- <h1>The launch url was invalid.</h1>
76
- </div>
77
- <p>Please try relaunching this application</p>
78
- </div>
79
- <% end %>
80
- </div>
81
- </body></html>
@@ -1,63 +0,0 @@
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>