oxidized-web 0.15.1 → 0.16.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.
Potentially problematic release.
This version of oxidized-web might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.rubocop_todo.yml +4 -4
- data/CHANGELOG.md +13 -1
- data/docs/development.md +4 -3
- data/lib/oxidized/web/public/weblibs/dataTables.js +1 -1
- data/lib/oxidized/web/version.rb +1 -1
- data/lib/oxidized/web/views/conf_search.haml +1 -1
- data/lib/oxidized/web/views/nodes.haml +11 -3
- data/lib/oxidized/web/views/stats.haml +9 -1
- data/lib/oxidized/web/views/versions.haml +5 -2
- data/lib/oxidized/web/webapp.rb +1 -4
- data/lib/oxidized/web.rb +17 -6
- data/oxidized-web.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 01c4432ff37c67ec0a06e7aaa39eecb03631f290fd95d1de12bc9237310aad61
|
4
|
+
data.tar.gz: 4f9a2860285850aaaf64d557807fec1e31d433a9f4ffaefaa68dd0ffb295bed8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '029095fa609376853c3e0b446ee48749f02a9b7578b50d928ee43ed5b9c3d9ba5bf747e12805a669bbfebfe0d3b08b8ee57b409f6de6c9a53f6059df9b77acbd'
|
7
|
+
data.tar.gz: 76dc6f389eb8170f290e33718fc11d9636539a8999f3c6a542965b4aa50f8bf5899446f18e828dc30246d9aa37b1f1f83d34cba133f94ee5a4656f26ae439713
|
data/.gitignore
CHANGED
data/.rubocop_todo.yml
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on 2025-
|
3
|
+
# on 2025-03-26 07:50:20 UTC using RuboCop version 1.74.0.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
-
# Offense count:
|
9
|
+
# Offense count: 3
|
10
10
|
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
|
11
11
|
Metrics/AbcSize:
|
12
12
|
Max: 31
|
13
13
|
|
14
|
-
# Offense count:
|
14
|
+
# Offense count: 2
|
15
15
|
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
16
16
|
Metrics/CyclomaticComplexity:
|
17
17
|
Max: 9
|
@@ -21,7 +21,7 @@ Metrics/CyclomaticComplexity:
|
|
21
21
|
Metrics/MethodLength:
|
22
22
|
Max: 28
|
23
23
|
|
24
|
-
# Offense count:
|
24
|
+
# Offense count: 2
|
25
25
|
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
26
26
|
Metrics/PerceivedComplexity:
|
27
27
|
Max: 11
|
data/CHANGELOG.md
CHANGED
@@ -3,8 +3,20 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
6
|
+
## [0.16.0 - 2025-03-25]
|
7
|
+
This release introduces the possibility for an extended configuration of
|
8
|
+
oxidized-web in the oxidized configuration file. Oxidized versions after 0.32.2
|
9
|
+
will only work with oxidized-web version 0.16.0 or later.
|
10
|
+
|
11
|
+
### Changed
|
12
|
+
- Allow connection to any virtual hosts + prepare extended configuration to specify which vhosts to accept. Fixes #298 (@robertcheramy)
|
13
|
+
|
14
|
+
### Fixed
|
15
|
+
- the table preferences (pagelength, column visibility, search) are stored in the local browser cache. Fixes #315 #314 #265 #211 (@robertcheramy)
|
16
|
+
- Update "refresh" and "Upldate node list" to more meaningfull texts (@robertcheramy)
|
17
|
+
|
6
18
|
## [0.15.1 – 2025-02-20]
|
7
|
-
This
|
19
|
+
This patch release fixes javascript errors.
|
8
20
|
|
9
21
|
### Fixed
|
10
22
|
- Fix javascript not working (@robertcheramy)
|
data/docs/development.md
CHANGED
@@ -132,9 +132,10 @@ When testing the web application, open the javascript console in the browser to
|
|
132
132
|
see any errors.
|
133
133
|
|
134
134
|
## Version numbering
|
135
|
-
Oxidized-web versions are nummered like
|
136
|
-
-
|
137
|
-
- minor is incremented when releasing
|
135
|
+
Oxidized-web versions are nummered like major.minor.patch
|
136
|
+
- currently, the major version is 0.
|
137
|
+
- minor is incremented when releasing new features.
|
138
|
+
- patch is incremented when releasing fixes only.
|
138
139
|
|
139
140
|
## Release
|
140
141
|
1. Checkout the master branch of oxidized-web. Make sure you are up to date with origin.
|
@@ -13802,7 +13802,7 @@
|
|
13802
13802
|
_fnDraw( settings );
|
13803
13803
|
} );
|
13804
13804
|
|
13805
|
-
//
|
13805
|
+
// targets value whenever anything changes the table's length
|
13806
13806
|
$(settings.nTable).on( 'length.dt.DT', function (e, s, len) {
|
13807
13807
|
if ( settings === s ) {
|
13808
13808
|
$('select', div).val( len );
|
data/lib/oxidized/web/version.rb
CHANGED
@@ -5,10 +5,13 @@
|
|
5
5
|
%form.float-end#oxButtons
|
6
6
|
%button.btn.btn-primary{type: 'button', onclick: 'history.go();'}
|
7
7
|
%i.bi.bi-arrow-clockwise
|
8
|
-
Refresh
|
8
|
+
Refresh page
|
9
|
+
%button.btn.btn-primary#resetSearch{type: 'button'}
|
10
|
+
%i.bi.bi-eraser-fill
|
11
|
+
Reset search
|
9
12
|
%button.btn.btn-primary#reload{type: 'button'}
|
10
13
|
%i.bi.bi-repeat
|
11
|
-
|
14
|
+
Reload node list from source backend
|
12
15
|
|
13
16
|
.hidden.alert#flashMessage
|
14
17
|
|
@@ -76,11 +79,16 @@
|
|
76
79
|
className: 'btn-primary',
|
77
80
|
}],
|
78
81
|
autoWidth: false,
|
79
|
-
lengthMenu: [20, 50, 250, 500, { label: 'All', value: -1 }]
|
82
|
+
lengthMenu: [20, 50, 250, 500, { label: 'All', value: -1 }],
|
83
|
+
stateSave: true,
|
80
84
|
});
|
81
85
|
|
82
86
|
table.buttons(0,0).container().prependTo($('#oxButtons'));
|
83
87
|
table.buttons(0,0).nodes().removeClass('btn-secondary');
|
88
|
+
|
89
|
+
$('#resetSearch').on('click', function() {
|
90
|
+
table.search('').draw();
|
91
|
+
});
|
84
92
|
});
|
85
93
|
|
86
94
|
|
@@ -7,7 +7,10 @@
|
|
7
7
|
%form.float-end#oxButtons
|
8
8
|
%button.btn.btn-primary{type: 'button', onclick: 'history.go();'}
|
9
9
|
%i.bi.bi-arrow-clockwise
|
10
|
-
Refresh
|
10
|
+
Refresh page
|
11
|
+
%button.btn.btn-primary#resetSearch{type: 'button'}
|
12
|
+
%i.bi.bi-eraser-fill
|
13
|
+
Reset search
|
11
14
|
|
12
15
|
.row
|
13
16
|
.table-responsive
|
@@ -102,8 +105,13 @@
|
|
102
105
|
}],
|
103
106
|
autoWidth: false,
|
104
107
|
lengthMenu: [20, 50, 250, 500, { label: 'All', value: -1 }],
|
108
|
+
stateSave: true,
|
105
109
|
});
|
106
110
|
|
107
111
|
table.buttons(0,0).container().prependTo($('#oxButtons'));
|
108
112
|
table.buttons(0,0).nodes().removeClass('btn-secondary');
|
113
|
+
|
114
|
+
$('#resetSearch').on('click', function() {
|
115
|
+
table.search('').draw();
|
116
|
+
});
|
109
117
|
});
|
@@ -8,7 +8,8 @@
|
|
8
8
|
%form.float-end#oxButtons
|
9
9
|
%button.btn.btn-primary{type: 'button', onclick: 'history.go();'}
|
10
10
|
%i.bi.bi-arrow-clockwise
|
11
|
-
Refresh
|
11
|
+
Refresh page
|
12
|
+
|
12
13
|
.row
|
13
14
|
.table-responsive
|
14
15
|
%table.table.table-sm.table-striped.table-hover#versionsTable
|
@@ -46,6 +47,8 @@
|
|
46
47
|
targets: '_all',
|
47
48
|
className: 'text-start'
|
48
49
|
}
|
49
|
-
]
|
50
|
+
],
|
51
|
+
stateSave: true,
|
52
|
+
searching: false
|
50
53
|
});
|
51
54
|
});
|
data/lib/oxidized/web/webapp.rb
CHANGED
@@ -2,10 +2,7 @@ require 'sinatra/base'
|
|
2
2
|
require 'sinatra/json'
|
3
3
|
require 'sinatra/url_for'
|
4
4
|
require 'tilt/haml'
|
5
|
-
# We need PP in node.haml, but rubocop can't see this
|
6
|
-
# rubocop:disable Lint/RedundantRequireStatement
|
7
5
|
require 'pp'
|
8
|
-
# rubocop:enable Lint/RedundantRequireStatement
|
9
6
|
require 'htmlentities'
|
10
7
|
require 'charlock_holmes'
|
11
8
|
module Oxidized
|
@@ -28,7 +25,7 @@ module Oxidized
|
|
28
25
|
# :filter can be "group" or "model"
|
29
26
|
# URL: /nodes/group/<GroupName>[.json]
|
30
27
|
# URL: /nodes/model/<ModelName>[.json]
|
31
|
-
# an optional .json
|
28
|
+
# an optional .json extension returns the data as JSON
|
32
29
|
#
|
33
30
|
# as GroupName can include /, we use splat to match its value
|
34
31
|
# and extract the optional ".json" with route_parse
|
data/lib/oxidized/web.rb
CHANGED
@@ -6,13 +6,23 @@ module Oxidized
|
|
6
6
|
require 'rack/handler/puma'
|
7
7
|
attr_reader :thread
|
8
8
|
|
9
|
-
def initialize(nodes,
|
9
|
+
def initialize(nodes, configuration)
|
10
10
|
require 'oxidized/web/webapp'
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
port =
|
15
|
-
|
11
|
+
if configuration.instance_of? Asetus::ConfigStruct
|
12
|
+
# New configuration syle: extensions.oxidized-web
|
13
|
+
addr = configuration.listen? || '127.0.0.1'
|
14
|
+
port = configuration.port? || 8888
|
15
|
+
uri = configuration.url_prefix? || ''
|
16
|
+
vhosts = configuration.vhosts? || []
|
17
|
+
else
|
18
|
+
# Old configuration stlyle: "rest: 127.0.0.1:8888/prefix"
|
19
|
+
listen, uri = configuration.split '/'
|
20
|
+
addr, _, port = listen.rpartition ':'
|
21
|
+
unless port
|
22
|
+
port = addr
|
23
|
+
addr = nil
|
24
|
+
end
|
25
|
+
vhosts = []
|
16
26
|
end
|
17
27
|
uri = "/#{uri}"
|
18
28
|
@opts = {
|
@@ -20,6 +30,7 @@ module Oxidized
|
|
20
30
|
Port: port
|
21
31
|
}
|
22
32
|
WebApp.set :nodes, nodes
|
33
|
+
WebApp.set :host_authorization, { permitted_hosts: vhosts }
|
23
34
|
@app = Rack::Builder.new do
|
24
35
|
map uri do
|
25
36
|
run WebApp
|
data/oxidized-web.gemspec
CHANGED
@@ -37,7 +37,7 @@ Gem::Specification.new do |s|
|
|
37
37
|
s.add_development_dependency 'rack-test', '~> 2.1'
|
38
38
|
s.add_development_dependency 'rails_best_practices', '~> 1.19'
|
39
39
|
s.add_development_dependency 'rake', '~> 13.0'
|
40
|
-
s.add_development_dependency 'rubocop', '~> 1.
|
40
|
+
s.add_development_dependency 'rubocop', '~> 1.74.0'
|
41
41
|
s.add_development_dependency 'rubocop-minitest', '~> 0.37.1'
|
42
42
|
s.add_development_dependency 'rubocop-rails', '~> 2.30.0'
|
43
43
|
s.add_development_dependency 'rubocop-rake', '~> 0.7.1'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oxidized-web
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.16.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Saku Ytti
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2025-
|
12
|
+
date: 2025-03-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: charlock_holmes
|
@@ -241,14 +241,14 @@ dependencies:
|
|
241
241
|
requirements:
|
242
242
|
- - "~>"
|
243
243
|
- !ruby/object:Gem::Version
|
244
|
-
version: 1.
|
244
|
+
version: 1.74.0
|
245
245
|
type: :development
|
246
246
|
prerelease: false
|
247
247
|
version_requirements: !ruby/object:Gem::Requirement
|
248
248
|
requirements:
|
249
249
|
- - "~>"
|
250
250
|
- !ruby/object:Gem::Version
|
251
|
-
version: 1.
|
251
|
+
version: 1.74.0
|
252
252
|
- !ruby/object:Gem::Dependency
|
253
253
|
name: rubocop-minitest
|
254
254
|
requirement: !ruby/object:Gem::Requirement
|