oxidized-web icon indicating copy to clipboard operation
oxidized-web copied to clipboard

Diffs buggy when clicking on "get diffs!" button.

Open huvelyb opened this issue 6 years ago • 6 comments

When I using the oxidized webpage, and choose a router to see the diffs, in the first screen, the diff between the versions are displayed well. If I select other versions and click on the "Get diffs!" button I get empty panels, there are no diffs, but there must be difference between the versions.

I Attached 2 pictures that shows the bug. What can cause this? How I can look after and fix it?

Thanks, Jeefoo

![Uploading oxidized_20180314_15 oxidized_20180314_151809 oxidized_20180314_151847

1809.png…]()

huvelyb avatar Mar 14 '18 14:03 huvelyb

So according to: https://github.com/ytti/oxidized-web/blob/56044d37391e098fadd9627aa03086c63d577773/lib/oxidized/web/webapp.rb#L213-L218

If there is no diff between the versions, then it will display "no available". This would leave me to believe that version 5 and 7 are exactly the same.

In version 6 was something removed, then added back in version 7?

yzguy avatar Mar 15 '18 04:03 yzguy

There is difference between versions in the router description row. Another problem which can help you in examining, that if you select a diff, the deifference is shown correctly and if you refresh the page, the diffs are dissapearing. The same thing happens, when you select the same version and click on the get diffs button. So for the first run it shows, but not for second, third, etc... run.

There were no configuration change 2 months ago, there were no problem earlier, but now it's seems to be not working well. I didn't made any configuration changes, and I'm the one who has access to the system. A strange thing that some of the monitored routers have new configuration every hour, so now we have more than 400 versions stored by oxidized. If I select another router where not so many config versions stored, the diffs problem the same, so I think this is two different type of problems.

Cheers, Balazs

huvelyb avatar Mar 22 '18 09:03 huvelyb

I examined the URIs and get the two oids by hand, which shows no difference on the webside.

In the other hand I pulled the local git repo with command line, and I diffed these two oids and it show the differences the right way.

So maybe the problem is the URI path. (Maybe the problem in the GET paramter parsing?)

Cheers, Balazs

huvelyb avatar Apr 03 '18 08:04 huvelyb

I think I've found the problem:

If you use "accentuated letter" in the router name field, the bug is appearing, when choosing for example the version 3 and 4 and click "get diffs", it will show that no difference between the versions. If you use normal letters, the get diffs will start to work normally and showing the differences between versions.

According to this, maybe the urlencoding or variable posting/parsing may cause the issue.

Please take a look after the urlencoding and it if repaired throw me a message to update my oxidized-web gem.

Thank you!

huvelyb avatar Apr 05 '18 08:04 huvelyb

Can you give examples of what you mean here please?

laf avatar Apr 16 '18 13:04 laf

Yes, If you use "öüóíőúéáű" characters, the problem occurs. Please fix the issue, many thanks!

huvelyb avatar Apr 17 '18 14:04 huvelyb