maestrano-connector-rails 2.3.1 → 2.3.2
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 +4 -4
- data/app/controllers/maestrano/account/groups_controller.rb +1 -1
- data/db/migrate/20170315032224_add_metadata_to_id_map.rb +1 -1
- data/lib/generators/connector/install_generator.rb +1 -1
- data/lib/generators/connector/templates/home.js +4 -5
- data/lib/generators/connector/templates/home_controller.rb +6 -6
- data/lib/generators/connector/templates/home_controller_spec.rb +1 -1
- data/lib/generators/connector/templates/home_index.haml +7 -3
- data/lib/maestrano/connector/rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe03ff785065c1f8cadca66eb2e2b82ed5fc84f5323c4869b48336d12972c85b
|
4
|
+
data.tar.gz: b498996b210d55d76a64ddee0e3172b98ec59a2414865c6cc78b29cecd926057
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4bcd12d815b164b47bcea4882499ddecfacb4ed5eb86aa140ef89aa086f98df44dd250b5cc9f32f87ac05974038c026aef2917c1294178ff75141ede6c76d1b
|
7
|
+
data.tar.gz: 7118fddc3d02a5681232eeec359c16f2c500aac7456a621577d8443420d1785cd19a87c954bff5d011aa3a78ea864cd66af2b55d50a6851f830192ddf4c51ea7
|
@@ -10,7 +10,7 @@ class Maestrano::Account::GroupsController < Maestrano::Rails::WebHookController
|
|
10
10
|
|
11
11
|
unless organization
|
12
12
|
Maestrano::Connector::Rails::ConnectorLogger.log('info', nil, 'Organization not found')
|
13
|
-
return render json: {success: true}, status:
|
13
|
+
return render json: {success: true}, status: :no_content
|
14
14
|
end
|
15
15
|
|
16
16
|
Maestrano::Connector::Rails::ConnectorLogger.log('info', organization, 'delete organization')
|
@@ -19,6 +19,10 @@ function closeModal(sender)
|
|
19
19
|
$('#myModal').modal('hide');
|
20
20
|
}
|
21
21
|
|
22
|
+
$(function () {
|
23
|
+
$('[data-toggle="tooltip"]').tooltip()
|
24
|
+
})
|
25
|
+
|
22
26
|
$(document).ready(function(){
|
23
27
|
$("#myModal").on('hidden.bs.modal', function (e) {
|
24
28
|
if (!checkHistorical) {
|
@@ -28,8 +32,3 @@ $(document).ready(function(){
|
|
28
32
|
checkHistorical = false
|
29
33
|
});
|
30
34
|
});
|
31
|
-
|
32
|
-
|
33
|
-
$(function () {
|
34
|
-
$('[data-toggle="tooltip"]').tooltip()
|
35
|
-
})
|
@@ -5,10 +5,10 @@ class HomeController < ApplicationController
|
|
5
5
|
|
6
6
|
# Update list of entities to synchronize
|
7
7
|
current_organization.synchronized_entities.keys.each do |entity|
|
8
|
-
next unless params[entity.to_s]
|
9
8
|
current_organization.synchronized_entities[entity][:can_push_to_connec] = params[entity.to_s]["to_connec"] == "1"
|
10
9
|
current_organization.synchronized_entities[entity][:can_push_to_external] = params[entity.to_s]["to_external"] == "1"
|
11
10
|
end
|
11
|
+
|
12
12
|
full_sync = params['historical-data'].present? && !current_organization.historical_data
|
13
13
|
opts = {full_sync: full_sync}
|
14
14
|
current_organization.sync_enabled = current_organization.synchronized_entities.values.any? { |settings| settings.values.any? { |v| v } }
|
@@ -31,13 +31,13 @@ class HomeController < ApplicationController
|
|
31
31
|
|
32
32
|
# Implement the redirection to the external application
|
33
33
|
def redirect_to_external
|
34
|
-
redirect_to 'https://
|
34
|
+
redirect_to 'https://your_application.com'
|
35
35
|
end
|
36
36
|
|
37
37
|
private
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
39
|
+
def start_synchronization(opts)
|
40
|
+
Maestrano::Connector::Rails::SynchronizationJob.perform_later(current_organization.id, opts)
|
41
|
+
flash[:info] = 'Congrats, you\'re all set up! Your data are now being synced' if current_organization.sync_enabled_changed?
|
42
|
+
end
|
43
43
|
end
|
@@ -114,6 +114,6 @@ describe HomeController, type: :controller do
|
|
114
114
|
allow_any_instance_of(Maestrano::Connector::Rails::SessionHelper).to receive(:current_organization).and_return(organization)
|
115
115
|
end
|
116
116
|
|
117
|
-
it {expect(subject).to redirect_to('https://
|
117
|
+
it {expect(subject).to redirect_to('https://your_application.com')}
|
118
118
|
end
|
119
119
|
end
|
@@ -64,9 +64,9 @@
|
|
64
64
|
- current_organization.displayable_synchronized_entities.each do |k, v|
|
65
65
|
.row.sync-entity
|
66
66
|
.col-md-1.link-step-action
|
67
|
-
#{check_box("#{k}", "to_connec", {checked: (v[:can_push_to_connec] || v[:can_push_to_external])})}
|
67
|
+
#{check_box("#{k}", "to_connec", {checked: (v[:can_push_to_connec] || v[:can_push_to_external]) && !current_organization.pull_disabled, onclick: "return !#{k}_to_external.checked;", disabled: current_organization.pull_disabled})}
|
68
68
|
.col-md-1.link-step-action
|
69
|
-
#{check_box("#{k}", "to_external", {checked: v[:can_push_to_external],
|
69
|
+
#{check_box("#{k}", "to_external", {checked: v[:can_push_to_external] && !current_organization.push_disabled, onchange: "#{k}_to_connec.checked = #{!current_organization.pull_disabled};", disabled: current_organization.push_disabled})}
|
70
70
|
%label.col-md-7{:for => "#{k}", style: 'padding-top: 5px;'}
|
71
71
|
.col-md-6
|
72
72
|
#{v[:external_name]}
|
@@ -79,7 +79,7 @@
|
|
79
79
|
|
80
80
|
.spacer2
|
81
81
|
.row
|
82
|
-
%h
|
82
|
+
%h Choose whether to synchronize your historical data:
|
83
83
|
.spacer1
|
84
84
|
.row
|
85
85
|
.col-md-4.col-md-offset-1
|
@@ -127,3 +127,7 @@
|
|
127
127
|
.row
|
128
128
|
.col-md-4.col-md-offset-4.text-center
|
129
129
|
= link_to 'Go to ApplicationName', home_redirect_to_external_path, class: 'btn btn-lg btn-primary'
|
130
|
+
-else
|
131
|
+
.row
|
132
|
+
.col-md-4.col-md-offset-4.center
|
133
|
+
= link_to 'Link your Maestrano account', Maestrano::Connector::Rails::Engine.routes.url_helpers.default_maestrano_auth_saml_index_path(tenant: :default), class: 'btn btn-warning'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: maestrano-connector-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maestrano
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|