Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ytti/oxidized-web
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.14.0
Choose a base ref
...
head repository: ytti/oxidized-web
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
11 changes: 2 additions & 9 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
@@ -19,7 +19,8 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.1', '3.2', '3.3']
ruby-version: ['3.1', '3.2', '3.3', '3.4', 'ruby-head']
continue-on-error: ${{ matrix.ruby-version == 'ruby-head' }}

steps:
- uses: actions/checkout@v4
@@ -30,13 +31,5 @@ jobs:
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: rubocop
uses: reviewdog/action-rubocop@v2
with:
rubocop_version: gemfile
rubocop_extensions: rubocop-minitest:gemfile rubocop-rake:gemfile rubocop-rails:gemfile
reporter: github-pr-review
- name: Run tests
run: bundle exec rake
- uses: codecov/codecov-action@v4
if: ${{ always() }}
6 changes: 4 additions & 2 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -13,6 +13,8 @@ jobs:
steps:
- uses: actions/stale@v9
with:
stale-issue-message: 'This issue is stale because it has been open 90 days with no activity.'
stale-pr-message: 'This PR is stale because it has been open 90 days with no activity.'
operations-per-run: 500
days-before-issue-stale: 90
days-before-close: 30
days-before-stale: 90
days-before-close: -1
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
inherit_from: .rubocop_todo.yml
require:
plugins:
- rubocop-rails
- rubocop-rake
- rubocop-minitest
17 changes: 6 additions & 11 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,27 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2024-06-28 07:42:20 UTC using RuboCop version 1.64.1.
# on 2025-02-20 10:05:16 UTC using RuboCop version 1.72.2.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 5
# Offense count: 2
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
Metrics/AbcSize:
Max: 52
Max: 31

# Offense count: 1
# Configuration parameters: CountBlocks.
Metrics/BlockNesting:
Max: 4

# Offense count: 2
# Configuration parameters: AllowedMethods, AllowedPatterns.
Metrics/CyclomaticComplexity:
Max: 9

# Offense count: 9
# Offense count: 5
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
Metrics/MethodLength:
Max: 33
Max: 28

# Offense count: 2
# Offense count: 1
# Configuration parameters: AllowedMethods, AllowedPatterns.
Metrics/PerceivedComplexity:
Max: 11
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,29 @@
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
## [0.15.1 – 2025-02-20]
This minor release fixes javascript errors.

### Fixed
- Fix javascript not working (@robertcheramy)

## [0.15.0 – 2025-02-17]
This release fixes a security issue on the RANCID migration page.
A non-authenticated user could gain control over the Linux user running
oxidized-web. The RANCID migration page was already deprecated in version
0.14.0, so it has been completely removed in this new version.
Thank you to Jon O'Reilly and Jamie Riden from NetSPI for discovering and
reporting this security issue!

### Changed
- Update datatables.net to 2.2.2 and datatables.net-buttons to 3.2.2 (@robertcheramy)
- remove the RANCID migration page (@robertchreamy)
- dependency on oxidized 0.31 (@robertchreamy)
- Update datatables.net to 2.2.1 and datatables.net-buttons to 3.2.1 (@robertcheramy)

### Fixed
- #302: group name containing a '/' produced a Sinatra error (@robertcheramy)


## [0.14.0 - 2024-06-28]

1 change: 1 addition & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -26,6 +26,7 @@ task :test do
Rake::TestTask.new do |t|
t.libs << 'spec'
t.test_files = FileList['spec/**/*_spec.rb']
t.ruby_opts = ['-W:deprecated']
t.warning = true
t.verbose = true
end
23 changes: 19 additions & 4 deletions docs/development.md
Original file line number Diff line number Diff line change
@@ -23,7 +23,9 @@ scripts, you have to stop an restart `bundle exec oxidized`.

## Paralell development between oxidized and oxidized-web
You may need to make some changes in oxidized **and** oxidized-web. For this,
git clone oxidized and oxidized-web in a common root directory, add the direct
git clone oxidized and oxidized-web in a common root directory.

Then you can link your oxidized-web with the oxidized, add the direct
dependency to ../oxidized-web in oxidized and run oxidized from the oxidized
repo:

@@ -45,6 +47,19 @@ If your changes to oxidized **AND** oxidzed-web are dependent from another, make
sure you document this in the respectives CHANGELOG.md, so that everyone is
informed at the next release.

Note: you can also add the dependency to oxidized in oxidized-web, in the same
fashion:
```shell
git clone git@github.com:ytti/oxidized-web.git
git clone git@github.com:ytti/oxidized.git
cd oxidized-web
bundle config set --local path 'vendor/bundle'
echo "gem 'oxidized', path: '../oxidized'" >> Gemfile
bundle install
bundle exec oxidized
```


# Update the weblibs
The weblibs are beeing downloaded and maintained by `npm`.

@@ -113,6 +128,9 @@ Run Oxidized-web from git against the latest git of Oxidized (see above).

Do not integrate late PRs into master if they do not fix issues for the release. The must wait for the next release.

When testing the web application, open the javascript console in the browser to
see any errors.

## Version numbering
Oxidized-web versions are nummered like 0.major.minor
- major is incremented when releasing new features. minor is then set to 0
@@ -148,9 +166,6 @@ Push the gem with ‘rake push’

You need an account at rubygems which is allowed to push oxidized

## Release in docker.io
The OCI-Containter is automatically build and pushed to docker.io by github

## Update CHANGELOG.md for next release
Add
```
140 changes: 0 additions & 140 deletions lib/oxidized/web/mig.rb

This file was deleted.

37 changes: 0 additions & 37 deletions lib/oxidized/web/public/scripts/oxidized.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,3 @@
// Add a line for a new file to upload
var add_file_upload = function() {
var rancidDbDiv = $("div[id^='rancidDb']:last");
var num = parseInt(rancidDbDiv.prop("id").match(/\d+/g)) + 1;
rancidDbDiv.clone(true)
.prop("id", "rancidDb" + num)
.insertAfter(rancidDbDiv);
$("input[id^='file']:last")
.prop("id", "file" + num)
.prop("name", "file" + num)
.parents('.input-group')
.find(':text')
.val('');
$("input[id^='group']:last")
.prop("id", "group" + num)
.prop("name", "group" + num);
};

var onFileSelected = function() {
$(document).on('change', '.btn-file :file', function() {
var input = $(this),
numFiles = input.get(0).files ? input.get(0).files.length : 1,
label = input.val().replace(/\\/g, '/').replace(/.*\//, '');
input.trigger('fileSelect', [numFiles, label]);
});
};

var convertTime = function() {
/* Convert UTC times to local browser times
* Requires that the times on the server are UTC
@@ -49,17 +22,7 @@ var convertTime = function() {
};

$(function() {
onFileSelected();
convertTime();
// Add a row to the migration form
$("#add").click(function() {
add_file_upload();
});

// Updates textbox with filename on fileSelect event
$('.btn-file :file').on('fileSelect', function(e, numFiles, label) {
$(this).parents('.input-group').find(':text').val(label);
});

// Reloads the nodes from a source by calling the /reload.json URI
$('#reload').click(function() {
15 changes: 0 additions & 15 deletions lib/oxidized/web/public/scripts/script-migration.js

This file was deleted.

Loading