kaui 1.1.0 → 1.2.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 +4 -4
- data/app/controllers/kaui/admin_tenants_controller.rb +0 -1
- data/app/helpers/kaui/plugin_helper.rb +2 -2
- data/app/models/kaui/admin_tenant.rb +0 -4
- data/app/views/kaui/accounts/_form.html.erb +0 -1
- data/app/views/kaui/admin_tenants/_form_plugin_config.erb +10 -2
- data/lib/kaui/version.rb +1 -1
- data/test/functional/kaui/accounts_controller_test.rb +0 -1
- data/test/killbill_test_helper.rb +0 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1578ab0cd55f1c59f62e95db3ce5a9fdfe490843
|
4
|
+
data.tar.gz: 3b998533f0aa8bb70f4030bebf7a960568a8a7eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b9a8496dde5e2919ebf43526692193a2f0c77b0b5d0c876d5c6349c9f6d1bf0032df66d31ed6b754f3f770fd82d6e29975f65ef6cbae1356602847c00299fad
|
7
|
+
data.tar.gz: 51c5a965fdd3791f3ae08e26153ad3e2e0319aa825d775f1ecb70c4494b2f45e0598fe86b8f52aeb6780cb55655272d8cb30b3603440ef086a3074d3bd331bc8
|
@@ -85,7 +85,6 @@ class Kaui::AdminTenantsController < Kaui::EngineController
|
|
85
85
|
# hack:: replace paypal key with paypal_express, to set configuration and allow the ui to find the right configuration inputs
|
86
86
|
plugin_repository = plugin_repository.inject({}) { |p, (k,v)| p[k.to_s.sub(/\Apaypal/, 'paypal_express').to_sym] = v; p }
|
87
87
|
|
88
|
-
|
89
88
|
fetch_plugin_config = promise { Kaui::AdminTenant::get_oss_plugin_info(plugin_repository) }
|
90
89
|
fetch_tenant_plugin_config = promise { Kaui::AdminTenant::get_tenant_plugin_config(plugin_repository, options) }
|
91
90
|
|
@@ -49,7 +49,7 @@ module Kaui
|
|
49
49
|
next if plugin.version.nil?
|
50
50
|
# do not allow duplicate
|
51
51
|
next if installed_plugins.any? { |p| p[:plugin_name].eql?(plugin.plugin_name) }
|
52
|
-
plugin_key = Kaui::AdminTenant.rewrite_plugin_key(plugin.plugin_key)
|
52
|
+
plugin_key = Kaui::AdminTenant.rewrite_plugin_key(plugin.plugin_key) unless plugin.plugin_key.nil?
|
53
53
|
installed_plugins << {
|
54
54
|
plugin_key: plugin_key,
|
55
55
|
plugin_name: plugin.plugin_name,
|
@@ -71,4 +71,4 @@ module Kaui
|
|
71
71
|
return nil
|
72
72
|
end
|
73
73
|
end
|
74
|
-
end
|
74
|
+
end
|
@@ -38,8 +38,6 @@ class Kaui::AdminTenant < KillBillClient::Model::Tenant
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def get_oss_plugin_info(plugin_directory)
|
41
|
-
|
42
|
-
|
43
41
|
# Serialize the plugin state for the view:
|
44
42
|
# plugin_name#plugin_type:prop1,prop2,prop3;plugin_name#plugin_type:prop1,prop2,prop3;...
|
45
43
|
#
|
@@ -51,13 +49,11 @@ class Kaui::AdminTenant < KillBillClient::Model::Tenant
|
|
51
49
|
end
|
52
50
|
|
53
51
|
def get_tenant_plugin_config(plugin_directory, options)
|
54
|
-
|
55
52
|
require 'yaml'
|
56
53
|
|
57
54
|
raw_tenant_config = KillBillClient::Model::Tenant::search_tenant_config("PLUGIN_CONFIG_", options)
|
58
55
|
|
59
56
|
tenant_config = raw_tenant_config.inject({}) do |hsh, e|
|
60
|
-
|
61
57
|
# Strip prefix '/PLUGIN_CONFIG_'
|
62
58
|
killbill_key = e.key.gsub!(/PLUGIN_CONFIG_/, '')
|
63
59
|
|
@@ -77,7 +77,7 @@
|
|
77
77
|
{{#start_installed}}<optgroup label="Installed">{{/start_installed}}
|
78
78
|
{{#end_installed}}</optgroup>>{{/end_installed}}
|
79
79
|
<option value="{{plugin_name}}" data-plugin-type="{{plugin_type}}" >
|
80
|
-
{{
|
80
|
+
{{display_name}}
|
81
81
|
</option>
|
82
82
|
{{/plugin_repository}}
|
83
83
|
</script>
|
@@ -142,7 +142,7 @@
|
|
142
142
|
populate_plugin_name_options();
|
143
143
|
function populate_plugin_name_options(){
|
144
144
|
var plugin_repository = JSON.parse($("#plugin_repository").val());
|
145
|
-
for(var idx = 0, size = plugin_repository.length; idx < size; idx++) {
|
145
|
+
for (var idx = 0, size = plugin_repository.length; idx < size; idx++) {
|
146
146
|
if (idx == 0 && plugin_repository[idx].installed) {
|
147
147
|
plugin_repository[idx]['start_installed'] = true;
|
148
148
|
}
|
@@ -153,6 +153,14 @@
|
|
153
153
|
}
|
154
154
|
}
|
155
155
|
|
156
|
+
for (var idx = 0, size = plugin_repository.length; idx < size; idx++) {
|
157
|
+
if (plugin_repository[idx]['plugin_key']) {
|
158
|
+
plugin_repository[idx]['display_name'] = plugin_repository[idx]['plugin_key'];
|
159
|
+
} else {
|
160
|
+
plugin_repository[idx]['display_name'] = plugin_repository[idx]['plugin_name'];
|
161
|
+
}
|
162
|
+
}
|
163
|
+
|
156
164
|
var template = $("#plugin_name_options_template").html();
|
157
165
|
var options_html = Mustache.render( template , { plugin_repository: plugin_repository});
|
158
166
|
$("#select_plugin_name").html(options_html);
|
data/lib/kaui/version.rb
CHANGED
@@ -124,7 +124,6 @@ class Kaui::AccountsControllerTest < Kaui::FunctionalTestHelper
|
|
124
124
|
assert_equal '-06:00', assigns(:account).time_zone
|
125
125
|
assert_equal 'AR', assigns(:account).country
|
126
126
|
assert assigns(:account).is_migrated
|
127
|
-
assert !assigns(:account).is_notified_for_invoices
|
128
127
|
end
|
129
128
|
|
130
129
|
test 'should update account' do
|
@@ -98,7 +98,6 @@ module Kaui
|
|
98
98
|
account.state = 'Awesome'
|
99
99
|
account.country = 'LalaLand'
|
100
100
|
account.locale = 'fr_FR'
|
101
|
-
account.is_notified_for_invoices = false
|
102
101
|
account.parent_account_id = parent_account_id
|
103
102
|
account.is_payment_delegated_to_parent = !parent_account_id.nil?
|
104
103
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kaui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Killbill core team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-06-
|
11
|
+
date: 2018-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|