killbill-kpm-ui 4.0.0 → 4.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1fc366b7b5c96f7e052a2982904acdc365190441a3558e7dd3f8fcb85c2977c2
4
- data.tar.gz: 006307a23c7b922d22bb8345c366c53d3952dd4d0d86df2189969dbfa16e236e
3
+ metadata.gz: b35ac4715be2450d712be969820d8a0ea0707b96b53318726c3dc1218c189a2d
4
+ data.tar.gz: 9afcb4db769506ca8059bf868b1292b814af5928bdbe1ea08b23f52ca12a1d6f
5
5
  SHA512:
6
- metadata.gz: 98d2c027a8c4edfe04de86b2b0b4d519b812ea2b8a3c5e7a30e55d5b310786ed0d22e40609a04ef46d9218a0c0ee81f15ae9b73dd93216c4241f7646b50b8208
7
- data.tar.gz: 887316e8cc4dc10c78fe12b6fd00a7ce419e3d148920e2036bc0fdaa17ee5256690ae27e323bccf5c58a046aea43d00c12e9159c0e2f70f8066bbad63c03a004
6
+ metadata.gz: b33c9958bd2084c240703b7c8e8dfe3738cb11f93bb47948c37e5ccf467584e7f59b7582224d3c6bf5a79e26f31fe7618b37a023e42bbdd6e2ed3b68771f93e2
7
+ data.tar.gz: 6e1f2a7bb95a4d2ffd8461b41c72ed0cf84cf3a6b9e0709e5f99eeab8236bacb54792992dbbaef11211955df15767ab9ff72112233797df1b4522f8cb913bb61
@@ -5,9 +5,17 @@ require 'kpm/client'
5
5
  module KPM
6
6
  class PluginsController < EngineController
7
7
  def index
8
- nodes_by_kb_version, @kb_version = killbill_version
8
+ nodes_by_kb_version, @kb_version, nodes_info = killbill_version
9
9
  @warning_message = ''
10
10
  @plugins = {}
11
+
12
+ @installed_plugin_keys = Set.new
13
+ (nodes_info || []).each do |node_info|
14
+ (node_info.plugins_info || []).each do |plugin_info|
15
+ @installed_plugin_keys.add(plugin_info.plugin_key) unless plugin_info.plugin_key.nil?
16
+ end
17
+ end
18
+
11
19
  if !nodes_by_kb_version.nil? && nodes_by_kb_version.size > 1
12
20
  @warning_message = different_versions_warning_message(nodes_by_kb_version)
13
21
  else
@@ -35,14 +43,14 @@ module KPM
35
43
 
36
44
  def killbill_version
37
45
  nodes_info = ::KillBillClient::Model::NodesInfo.nodes_info(options_for_klient)
38
- return nil if nodes_info.blank?
46
+ return [nil, nil, []] if nodes_info.blank?
39
47
 
40
48
  first_node_version = nodes_info.first.kb_version
41
49
  nodes_by_kb_version = {}
42
50
  nodes_info.each do |node|
43
51
  nodes_by_kb_version[node.kb_version] = "#{nodes_by_kb_version[node.kb_version] || ''} #{node.node_name}"
44
52
  end
45
- [nodes_by_kb_version, first_node_version.scan(/(\d+\.\d+)(\.\d)?/).flatten[0]]
53
+ [nodes_by_kb_version, first_node_version.scan(/(\d+\.\d+)(\.\d)?/).flatten[0], nodes_info]
46
54
  end
47
55
  end
48
56
  end
@@ -116,8 +116,6 @@
116
116
  $('#nodes-table-wrapper').css({ opacity: 0.5 });
117
117
  $('#install-in-progress').show();
118
118
  $('#install-in-progress').children().addClass('fa-spin');
119
- $('.plugin-link').addClass('loading');
120
- $('.official-plugin').addClass('loading');
121
119
  setTimeout(fakeOperationComplete, 6000);
122
120
  <% end %>
123
121
 
@@ -12,7 +12,13 @@
12
12
  <tr>
13
13
  <td><%= name %></td>
14
14
  <td><%= version %></td>
15
- <td><%= link_to 'Install', plugin_install_path(:plugin_key => name), :method => :post, :title => 'Install' %></td>
15
+ <td>
16
+ <% if @installed_plugin_keys.include?(name) %>
17
+ <span class="label label-success">Installed</span>
18
+ <% else %>
19
+ <%= link_to 'Install', plugin_install_path(:plugin_key => name), :method => :post, :title => 'Install' %>
20
+ <% end %>
21
+ </td>
16
22
  </tr>
17
23
  <% end %>
18
24
  </tbody>
data/lib/kpm/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module KPM
4
- VERSION = '4.0.0'
4
+ VERSION = '4.0.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: killbill-kpm-ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kill Bill core team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-11-12 00:00:00.000000000 Z
11
+ date: 2026-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: killbill-assets-ui