zuora_connect 0
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 +7 -0
- data/MIT-LICENSE +20 -0
- data/Rakefile +38 -0
- data/app/assets/javascripts/hallway_wrapper/after.js +15 -0
- data/app/assets/javascripts/hallway_wrapper/before.js +2 -0
- data/app/assets/javascripts/zuora_connect/api/v1/app_instance.js +2 -0
- data/app/assets/javascripts/zuora_connect/application.js +13 -0
- data/app/assets/stylesheets/zuora_connect/api/v1/app_instance.css +4 -0
- data/app/assets/stylesheets/zuora_connect/application.css +15 -0
- data/app/controllers/zuora_connect/admin/tenant_controller.rb +11 -0
- data/app/controllers/zuora_connect/api/v1/app_instance_controller.rb +58 -0
- data/app/controllers/zuora_connect/application_controller.rb +8 -0
- data/app/controllers/zuora_connect/static_controller.rb +58 -0
- data/app/helpers/zuora_connect/api/v1/app_instance_helper.rb +4 -0
- data/app/helpers/zuora_connect/application_helper.rb +5 -0
- data/app/models/zuora_connect/app_instance.rb +5 -0
- data/app/models/zuora_connect/app_instance_base.rb +952 -0
- data/app/models/zuora_connect/login.rb +36 -0
- data/app/models/zuora_connect/telegraf.rb +93 -0
- data/app/views/layouts/zuora_connect/application.html.erb +14 -0
- data/app/views/sql/refresh_aggregate_table.txt +85 -0
- data/app/views/zuora_connect/static/invalid_app_instance_error.html.erb +65 -0
- data/app/views/zuora_connect/static/invalid_launch_request.html +65 -0
- data/app/views/zuora_connect/static/launch.html.erb +80 -0
- data/app/views/zuora_connect/static/session_error.html.erb +63 -0
- data/config/initializers/apartment.rb +95 -0
- data/config/initializers/aws.rb +2 -0
- data/config/initializers/elastic_apm.rb +25 -0
- data/config/initializers/object_method_hooks.rb +27 -0
- data/config/initializers/postgresql_adapter.rb +32 -0
- data/config/initializers/prometheus.rb +40 -0
- data/config/initializers/redis.rb +13 -0
- data/config/initializers/resque.rb +22 -0
- data/config/initializers/to_bool.rb +24 -0
- data/config/initializers/unicorn.rb +9 -0
- data/config/routes.rb +16 -0
- data/db/migrate/20100718151733_create_connect_app_instances.rb +9 -0
- data/db/migrate/20101024162319_add_tokens_to_app_instance.rb +6 -0
- data/db/migrate/20101024220705_add_token_to_app_instance.rb +5 -0
- data/db/migrate/20110131211919_add_sessions_table.rb +13 -0
- data/db/migrate/20110411200303_add_expiration_to_app_instance.rb +5 -0
- data/db/migrate/20110413191512_add_new_api_token.rb +5 -0
- data/db/migrate/20110503003602_add_catalog_data_to_app_instance.rb +6 -0
- data/db/migrate/20110503003603_add_catalog_mappings_to_app_instance.rb +5 -0
- data/db/migrate/20110503003604_catalog_default.rb +5 -0
- data/db/migrate/20180301052853_add_catalog_attempted_at.rb +5 -0
- data/db/migrate/20181206162339_add_fields_to_instance.rb +5 -0
- data/lib/metrics/influx/point_value.rb +79 -0
- data/lib/metrics/net.rb +218 -0
- data/lib/middleware/metrics_middleware.rb +134 -0
- data/lib/resque/additions.rb +53 -0
- data/lib/resque/dynamic_queues.rb +222 -0
- data/lib/resque/plugins/custom_logger.rb +46 -0
- data/lib/resque/self_lookup.rb +19 -0
- data/lib/resque/silence_done.rb +71 -0
- data/lib/tasks/zuora_connect_tasks.rake +24 -0
- data/lib/zuora_connect.rb +42 -0
- data/lib/zuora_connect/configuration.rb +53 -0
- data/lib/zuora_connect/controllers/helpers.rb +261 -0
- data/lib/zuora_connect/engine.rb +34 -0
- data/lib/zuora_connect/exceptions.rb +67 -0
- data/lib/zuora_connect/railtie.rb +63 -0
- data/lib/zuora_connect/version.rb +3 -0
- data/lib/zuora_connect/views/helpers.rb +9 -0
- data/test/controllers/zuora_connect/api/v1/app_instance_controller_test.rb +13 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -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/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/bin/setup +29 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +26 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +41 -0
- data/test/dummy/config/environments/production.rb +79 -0
- data/test/dummy/config/environments/test.rb +42 -0
- data/test/dummy/config/initializers/assets.rb +11 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +4 -0
- data/test/dummy/config/secrets.yml +22 -0
- data/test/dummy/public/404.html +67 -0
- data/test/dummy/public/422.html +67 -0
- data/test/dummy/public/500.html +66 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/fixtures/zuora_connect/app_instances.yml +11 -0
- data/test/integration/navigation_test.rb +8 -0
- data/test/lib/generators/zuora_connect/datatable_generator_test.rb +16 -0
- data/test/models/zuora_connect/app_instance_test.rb +9 -0
- data/test/test_helper.rb +21 -0
- data/test/zuora_connect_test.rb +7 -0
- metadata +443 -0
@@ -0,0 +1,36 @@
|
|
1
|
+
module ZuoraConnect
|
2
|
+
class Login
|
3
|
+
|
4
|
+
def initialize (fields)
|
5
|
+
@clients = {}
|
6
|
+
if fields["tenant_type"] == "Zuora"
|
7
|
+
login_fields = fields.map{|k,v| [k.to_sym, v]}.to_h
|
8
|
+
login_type = fields.dig("authentication_type").blank? ? 'Basic' : fields.dig("authentication_type").capitalize
|
9
|
+
|
10
|
+
@clients["Default"] = "::ZuoraAPI::#{login_type}".constantize.new(login_fields)
|
11
|
+
@default_entity = fields["entities"][0]["id"] if (fields.dig("entities") || []).size == 1
|
12
|
+
if fields["entities"] && fields["entities"].size > 0
|
13
|
+
fields["entities"].each do |entity|
|
14
|
+
params = {:entity_id => entity["id"]}.merge(login_fields)
|
15
|
+
@clients[entity["id"]] = "::ZuoraAPI::#{login_type}".constantize.new(params)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
self.attr_builder("available_entities", @clients.keys)
|
19
|
+
end
|
20
|
+
fields.each do |k,v|
|
21
|
+
self.attr_builder(k,v)
|
22
|
+
end
|
23
|
+
@default_entity ||= "Default"
|
24
|
+
end
|
25
|
+
|
26
|
+
def attr_builder(field,val)
|
27
|
+
singleton_class.class_eval { attr_accessor "#{field}" }
|
28
|
+
send("#{field}=", val)
|
29
|
+
end
|
30
|
+
|
31
|
+
def client(id = @default_entity)
|
32
|
+
return id.blank? ? @clients[@default_entity] : @clients[id]
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,93 @@
|
|
1
|
+
module ZuoraConnect
|
2
|
+
class Telegraf
|
3
|
+
attr_accessor :host
|
4
|
+
|
5
|
+
OUTBOUND_METRICS = true
|
6
|
+
OUTBOUND_METRICS_NAME = "request-outbound"
|
7
|
+
INBOUND_METRICS = true
|
8
|
+
INBOUND_METRICS_NAME = "request-inbound"
|
9
|
+
|
10
|
+
def initialize
|
11
|
+
self.connect
|
12
|
+
end
|
13
|
+
|
14
|
+
def connect
|
15
|
+
Rails.logger.debug(self.format_metric_log('Telegraf','Need new connection')) if ZuoraConnect.configuration.telegraf_debug
|
16
|
+
uri = URI.parse(ZuoraConnect.configuration.telegraf_endpoint)
|
17
|
+
self.host = UDPSocket.new.tap do |socket|
|
18
|
+
socket.connect uri.host, uri.port
|
19
|
+
end
|
20
|
+
rescue => ex
|
21
|
+
self.host = nil
|
22
|
+
Rails.logger.warn(self.format_metric_log('Telegraf', "Failed to connect: #{ex.class}"))
|
23
|
+
end
|
24
|
+
|
25
|
+
def write(direction: 'Unknown', tags: {}, values: {})
|
26
|
+
time = Benchmark.measure do |bench|
|
27
|
+
# To avoid writing metrics from rspec tests
|
28
|
+
if Rails.env.to_sym != :test
|
29
|
+
app_instance = Thread.current[:appinstance].present? ? Thread.current[:appinstance].id : 0
|
30
|
+
tags = { app_name: self.class.app_name, process_type: self.class.process_type, app_instance: app_instance, pod_name: self.class.pod_name}.merge(tags)
|
31
|
+
|
32
|
+
if direction == :inbound
|
33
|
+
if INBOUND_METRICS && !Thread.current[:inbound_metric].to_bool
|
34
|
+
self.write_udp(series: INBOUND_METRICS_NAME, tags: tags, values: values)
|
35
|
+
Thread.current[:inbound_metric] = true
|
36
|
+
else
|
37
|
+
return
|
38
|
+
end
|
39
|
+
elsif direction == :outbound
|
40
|
+
self.write_udp(series: OUTBOUND_METRICS_NAME, tags: tags, values: values) if OUTBOUND_METRICS
|
41
|
+
else
|
42
|
+
self.write_udp(series: direction, tags: tags, values: values)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
if ZuoraConnect.configuration.telegraf_debug
|
47
|
+
Rails.logger.debug(self.format_metric_log('Telegraf', tags.to_s))
|
48
|
+
Rails.logger.debug(self.format_metric_log('Telegraf', values.to_s))
|
49
|
+
Rails.logger.debug(self.format_metric_log('Telegraf', "Writing '#{direction.capitalize}': #{time.real.round(5)} ms"))
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
|
54
|
+
def write_udp(series: '', tags: {}, values: {})
|
55
|
+
return if !values.present?
|
56
|
+
self.host.write InfluxDB::PointValue.new({series: series, tags: tags, values: values}).dump
|
57
|
+
rescue => ex
|
58
|
+
self.connect
|
59
|
+
Rails.logger.warn(self.format_metric_log('Telegraf',"Failed to write udp: #{ex.class}"))
|
60
|
+
end
|
61
|
+
|
62
|
+
def format_metric_log(message, dump = nil)
|
63
|
+
message_color, dump_color = "1;91", "0;1"
|
64
|
+
log_entry = " \e[#{message_color}m#{message}\e[0m "
|
65
|
+
log_entry << "\e[#{dump_color}m%#{String === dump ? 's' : 'p'}\e[0m" % dump if dump
|
66
|
+
log_entry
|
67
|
+
end
|
68
|
+
|
69
|
+
def self.app_name
|
70
|
+
return ENV['DEIS_APP'].present? ? ENV['DEIS_APP'] : Rails.application.class.parent_name
|
71
|
+
end
|
72
|
+
|
73
|
+
def self.pod_name
|
74
|
+
return ENV['HOSTNAME'].present? ? ENV['HOSTNAME'] : Socket.gethostname
|
75
|
+
end
|
76
|
+
|
77
|
+
def self.full_process_name(process_name: nil, function: nil)
|
78
|
+
keys = [self.pod_name, process_name.present? ? process_name : self.process_type, Process.pid, function]
|
79
|
+
return keys.compact.join('][').prepend('[').concat(']')
|
80
|
+
end
|
81
|
+
|
82
|
+
# Returns the process type if any
|
83
|
+
def self.process_type(default: 'Unknown')
|
84
|
+
p_type = default
|
85
|
+
if ENV['HOSTNAME'] && ENV['DEIS_APP']
|
86
|
+
temp = ENV['HOSTNAME'].split(ENV['DEIS_APP'])[1]
|
87
|
+
temp = temp.split(/(-[0-9a-zA-Z]{5})$/)[0] # remove the 5 char hash
|
88
|
+
p_type = temp[1, temp.rindex("-")-1]
|
89
|
+
end
|
90
|
+
return p_type
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Connect</title>
|
5
|
+
<%= stylesheet_link_tag "zuora_connect/application", media: "all" %>
|
6
|
+
<%= javascript_include_tag "zuora_connect/application" %>
|
7
|
+
<%= csrf_meta_tags %>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
|
11
|
+
<%= yield %>
|
12
|
+
|
13
|
+
</body>
|
14
|
+
</html>
|
@@ -0,0 +1,85 @@
|
|
1
|
+
CREATE OR REPLACE FUNCTION "shared_extensions".refresh_aggregate_table(aggregate_table_name text, table_name text, filter text, mode text) RETURNS void AS $$
|
2
|
+
DECLARE
|
3
|
+
schema RECORD;
|
4
|
+
result RECORD;
|
5
|
+
sql TEXT := '';
|
6
|
+
i INTEGER;
|
7
|
+
created boolean := false;
|
8
|
+
fields_order character varying;
|
9
|
+
index_name varchar;
|
10
|
+
index_string varchar;
|
11
|
+
index_id varchar;
|
12
|
+
BEGIN
|
13
|
+
raise notice 'Starting aggregate of % to %', table_name, aggregate_table_name;
|
14
|
+
|
15
|
+
|
16
|
+
EXECUTE format('DROP TABLE IF EXISTS "public".%I', aggregate_table_name);
|
17
|
+
raise notice 'Filter %', filter;
|
18
|
+
|
19
|
+
FOR schema IN EXECUTE
|
20
|
+
format(
|
21
|
+
'SELECT schema_name FROM information_schema.schemata WHERE schema_name ~ ''^[0-9]+$'''
|
22
|
+
)
|
23
|
+
LOOP
|
24
|
+
IF NOT created THEN
|
25
|
+
-- Create the aggregate table if we haven't already
|
26
|
+
EXECUTE format(
|
27
|
+
'CREATE TABLE "public".%I (LIKE %I.%I)',
|
28
|
+
aggregate_table_name,
|
29
|
+
schema.schema_name, table_name
|
30
|
+
);
|
31
|
+
-- Add a special `schema_name` column, which we'll populate with the name of the schema
|
32
|
+
-- each row originated from
|
33
|
+
EXECUTE format(
|
34
|
+
'ALTER TABLE "public".%I ADD COLUMN schema_name text', aggregate_table_name
|
35
|
+
);
|
36
|
+
|
37
|
+
EXECUTE
|
38
|
+
format('CREATE INDEX ON "public".%I (schema_name)', aggregate_table_name);
|
39
|
+
EXECUTE
|
40
|
+
format('CREATE INDEX ON "public".%I (id)', aggregate_table_name);
|
41
|
+
|
42
|
+
-- Move indexes over if indexable
|
43
|
+
IF mode = 'Index' THEN
|
44
|
+
FOR index_string, index_name, index_id IN
|
45
|
+
SELECT pg_get_indexdef(idx.oid)||';', idx.relname, idx.oid
|
46
|
+
from pg_index ind
|
47
|
+
join pg_class idx on idx.oid = ind.indexrelid
|
48
|
+
join pg_class tbl on tbl.oid = ind.indrelid
|
49
|
+
left join pg_namespace ns on ns.oid = tbl.relnamespace where idx.relname != concat(table_name, '_pkey') and tbl.relname = table_name and ns.nspname = 'public'
|
50
|
+
LOOP
|
51
|
+
BEGIN
|
52
|
+
EXECUTE
|
53
|
+
format('DROP INDEX IF EXISTS "public"."%s"', concat(aggregate_table_name, '_', index_id));
|
54
|
+
|
55
|
+
EXECUTE
|
56
|
+
format(replace(replace(replace(index_string, index_name, concat(aggregate_table_name, '_', index_id)), concat(' ', table_name, ' '), concat( ' ', aggregate_table_name, ' ')), concat('public.', table_name), concat( 'public.', aggregate_table_name)));
|
57
|
+
|
58
|
+
RAISE NOTICE 'Creating Indexes %', replace(replace(replace(index_string, index_name, concat(aggregate_table_name, '_', index_id)), concat(' ', table_name, ' '), concat( ' ', aggregate_table_name, ' ')), concat('public.', table_name), concat( 'public.', aggregate_table_name)) ;
|
59
|
+
END;
|
60
|
+
END LOOP;
|
61
|
+
END IF;
|
62
|
+
|
63
|
+
created := true;
|
64
|
+
END IF;
|
65
|
+
|
66
|
+
-- Finally, we'll select everything from this schema's target table, plus the schema's name,
|
67
|
+
-- and insert them into our new aggregate table
|
68
|
+
EXECUTE format(
|
69
|
+
'SELECT string_agg(column_name, '','') from information_schema.columns where table_name = ''%s'' AND table_schema = ''%s''',
|
70
|
+
table_name, schema.schema_name
|
71
|
+
) into fields_order;
|
72
|
+
|
73
|
+
raise notice 'Importing Schema %', schema.schema_name;
|
74
|
+
|
75
|
+
EXECUTE format(
|
76
|
+
'INSERT INTO "public".%I (schema_name, %s) (SELECT ''%s'' AS schema_name, * FROM %I.%I %s )',
|
77
|
+
aggregate_table_name,
|
78
|
+
fields_order,
|
79
|
+
schema.schema_name,
|
80
|
+
schema.schema_name, table_name,
|
81
|
+
filter
|
82
|
+
);
|
83
|
+
END LOOP;
|
84
|
+
END
|
85
|
+
$$ LANGUAGE plpgsql;
|
@@ -0,0 +1,65 @@
|
|
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>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>
|
@@ -0,0 +1,65 @@
|
|
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>The launch url was invalid.</h1>
|
60
|
+
</div>
|
61
|
+
<p>Please try relaunching this application</p>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
|
65
|
+
</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
|
+
div.button {
|
42
|
+
margin: 1em 0 1em;
|
43
|
+
padding: 1em;
|
44
|
+
width: 300px;
|
45
|
+
font-size: 12pt;
|
46
|
+
font-weight: bold;
|
47
|
+
background-color: #F7F7F7;
|
48
|
+
border: 1px solid #CCC;
|
49
|
+
border-right-color: #999;
|
50
|
+
border-left-color: #999;
|
51
|
+
border-bottom-color: #999;
|
52
|
+
border-top-left-radius: 4px;
|
53
|
+
border-top-right-radius: 4px;
|
54
|
+
border-bottom-left-radius: 4px;
|
55
|
+
border-bottom-right-radius: 4px;
|
56
|
+
border-top-color: #999;
|
57
|
+
color: #666;
|
58
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
59
|
+
}
|
60
|
+
</style>
|
61
|
+
</head>
|
62
|
+
|
63
|
+
<body>
|
64
|
+
<div class="dialog">
|
65
|
+
<div>
|
66
|
+
<h1>Please select the instance you would like to launch.</h1>
|
67
|
+
<input type="hidden" id="name_hash" value="<%= @names.to_s %>" />
|
68
|
+
<input type="hidden" id="app_instance_list" value="<%= @app_instance_ids.to_s %>" />
|
69
|
+
|
70
|
+
<% @app_instance_ids.each do |id| %>
|
71
|
+
<div class="button">
|
72
|
+
<% label = @names[id].present? ? "#{id} - #{@names[id]}" : id %>
|
73
|
+
<%= link_to label, root_path(app_instance_ids: params[:app_instance_ids], app_instance_id: id) %>
|
74
|
+
</div>
|
75
|
+
<% end %>
|
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>
|