oxidized-web 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of oxidized-web might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/oxidized/web.rb +1 -1
- data/lib/oxidized/web/public/scripts/oxidized.js +3 -5
- data/lib/oxidized/web/views/diffs.haml +31 -12
- data/lib/oxidized/web/views/version.haml +3 -2
- data/lib/oxidized/web/webapp.rb +3 -2
- data/oxidized-web.gemspec +3 -2
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f535950760aee39a4e30a06d062f80675eb9752
|
4
|
+
data.tar.gz: c15e51396c6d3d0aa4b0485b7757cac040f0eaad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ee8abf9bbe65d8a7e1a473aa3bdd40b126e15f2ed0111005f776c77f49d74df4f6b66320dd82fdbbd3ed28aa820d58601d9a55e730c2bb5224a13b94bd048d4
|
7
|
+
data.tar.gz: 9d158c520bedbe442b7a4d79403f1346ebef8fb7cc76e0b3dff77ef67b7fb9de146d7a038eefec259367c49e66e9fb0d7ec11cc4a7f1b82a1b8cedb7005822ba
|
data/lib/oxidized/web.rb
CHANGED
@@ -71,10 +71,10 @@ $(function() {
|
|
71
71
|
$('.btn-file :file').on('fileSelect', function(e, numFiles, label) {
|
72
72
|
$(this).parents('.input-group').find(':text').val(label);
|
73
73
|
});
|
74
|
-
|
74
|
+
|
75
75
|
// Reloads the nodes from a source by calling the /reload.json URI
|
76
76
|
$('#reload').click(function() {
|
77
|
-
$.get('
|
77
|
+
$.get(window.location.pathname.replace(/nodes.*/g, '')+'reload.json')
|
78
78
|
.done(function(data) {
|
79
79
|
$('#flashMessage')
|
80
80
|
.removeClass('alert-danger')
|
@@ -94,9 +94,7 @@ $(function() {
|
|
94
94
|
});
|
95
95
|
|
96
96
|
// Update timestamp on next button click for DataTables
|
97
|
-
$('.paginate_button').on('click', function() {
|
97
|
+
$('.paginate_button').on('click', function() {
|
98
98
|
convertTime();
|
99
99
|
});
|
100
100
|
});
|
101
|
-
|
102
|
-
|
@@ -23,7 +23,7 @@
|
|
23
23
|
.col-sm-6
|
24
24
|
- params = "node=#{@info[:node]}&group=#{@info[:group]}&oid=#{@info[:oid]}"
|
25
25
|
- params = "#{params}&date=#{@info[:date]}&num=#{@info[:num]}"
|
26
|
-
%form{action: "/node/version/diffs?#{params}", method: 'post', role: 'form'}
|
26
|
+
%form{action: url_for("/node/version/diffs?#{params}"), method: 'post', role: 'form'}
|
27
27
|
.form-group
|
28
28
|
%select.form-control#oid2{name: 'oid2'}
|
29
29
|
- diff2 = {}
|
@@ -49,36 +49,55 @@
|
|
49
49
|
.diffs_old
|
50
50
|
- @diff[:old_diff].each do |line|
|
51
51
|
- if /^\+.*/.match(line)
|
52
|
-
.added>
|
52
|
+
.added>
|
53
|
+
:escaped
|
54
|
+
#{line}
|
53
55
|
|
54
56
|
- elsif /^\-.*/.match(line)
|
55
|
-
.deleted>
|
57
|
+
.deleted>
|
58
|
+
:escaped
|
59
|
+
#{line}
|
56
60
|
|
57
61
|
- elsif /^@@\s.*@@.*$/.match(line)
|
58
|
-
.diff-index>
|
62
|
+
.diff-index>
|
63
|
+
:escaped
|
64
|
+
#{line}
|
59
65
|
|
60
66
|
- elsif /^empty_line /.match(line)
|
61
67
|
- line.slice! "empty_line"
|
62
|
-
.diff-empty>
|
68
|
+
.diff-empty>
|
69
|
+
:escaped
|
70
|
+
#{line}
|
63
71
|
|
64
72
|
- else
|
65
|
-
%div>
|
73
|
+
%div>
|
74
|
+
:escaped
|
75
|
+
#{line}
|
66
76
|
|
67
77
|
.diffs_new
|
68
78
|
- @diff[:new_diff].each do |line|
|
69
79
|
- if /^\+.*/.match(line)
|
70
|
-
.added>
|
80
|
+
.added>
|
81
|
+
:escaped
|
82
|
+
#{line}
|
71
83
|
|
72
84
|
- elsif /^\-.*/.match(line)
|
73
|
-
.deleted>
|
85
|
+
.deleted>
|
86
|
+
:escaped
|
87
|
+
#{line}
|
74
88
|
|
75
89
|
- elsif /^@@\s.*@@.*$/.match(line)
|
76
|
-
.diff-index>
|
90
|
+
.diff-index>
|
91
|
+
:escaped
|
92
|
+
#{line}
|
77
93
|
|
78
94
|
- elsif /^empty_line /.match(line)
|
79
95
|
- line.slice! "empty_line"
|
80
|
-
.diff-empty>
|
96
|
+
.diff-empty>
|
97
|
+
:escaped
|
98
|
+
#{line}
|
81
99
|
|
82
100
|
- else
|
83
|
-
%div>
|
84
|
-
|
101
|
+
%div>
|
102
|
+
:escaped
|
103
|
+
#{line}
|
data/lib/oxidized/web/webapp.rb
CHANGED
@@ -5,6 +5,7 @@ require 'tilt/haml'
|
|
5
5
|
require 'sass'
|
6
6
|
require 'pp'
|
7
7
|
require 'oxidized/web/mig'
|
8
|
+
require 'htmlentities'
|
8
9
|
module Oxidized
|
9
10
|
module API
|
10
11
|
class WebApp < Sinatra::Base
|
@@ -174,7 +175,7 @@ module Oxidized
|
|
174
175
|
num: params[:num]
|
175
176
|
}
|
176
177
|
|
177
|
-
@data = nodes.get_version node, @info[:group], @info[:oid]
|
178
|
+
@data = HTMLEntities.new.encode(nodes.get_version node, @info[:group], @info[:oid])
|
178
179
|
out :version
|
179
180
|
end
|
180
181
|
|
@@ -284,7 +285,7 @@ module Oxidized
|
|
284
285
|
old_diff = []
|
285
286
|
new_diff = []
|
286
287
|
|
287
|
-
diff.each_line do |line|
|
288
|
+
HTMLEntities.new.encode(diff).each_line do |line|
|
288
289
|
if /^\+/.match(line)
|
289
290
|
new_diff.push(line)
|
290
291
|
elsif /^\-/.match(line)
|
data/oxidized-web.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'oxidized-web'
|
3
|
-
s.version = '0.
|
3
|
+
s.version = '0.9.0'
|
4
4
|
s.licenses = %w( Apache-2.0 )
|
5
5
|
s.platform = Gem::Platform::RUBY
|
6
6
|
s.authors = ['Saku Ytti', 'Samer Abdel-Hafez']
|
@@ -15,10 +15,11 @@ Gem::Specification.new do |s|
|
|
15
15
|
|
16
16
|
s.required_ruby_version = '>= 1.9.3'
|
17
17
|
s.add_runtime_dependency 'oxidized', '~> 0.19'
|
18
|
-
s.add_runtime_dependency 'puma', '~>
|
18
|
+
s.add_runtime_dependency 'puma', '~> 3'
|
19
19
|
s.add_runtime_dependency 'sinatra', '~> 1.4', '>= 1.4.6'
|
20
20
|
s.add_runtime_dependency 'sinatra-contrib', '~> 1.4', '>= 1.4.6'
|
21
21
|
s.add_runtime_dependency 'haml', '~> 4.0'
|
22
22
|
s.add_runtime_dependency 'sass', '~> 3.3'
|
23
23
|
s.add_runtime_dependency 'emk-sinatra-url-for', '~> 0.2'
|
24
|
+
s.add_runtime_dependency 'htmlentitites', '~> 4.3'
|
24
25
|
end
|
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.9.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: 2017-
|
12
|
+
date: 2017-05-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: oxidized
|
@@ -31,14 +31,14 @@ dependencies:
|
|
31
31
|
requirements:
|
32
32
|
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: '
|
34
|
+
version: '3'
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: '
|
41
|
+
version: '3'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: sinatra
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -121,6 +121,20 @@ dependencies:
|
|
121
121
|
- - "~>"
|
122
122
|
- !ruby/object:Gem::Version
|
123
123
|
version: '0.2'
|
124
|
+
- !ruby/object:Gem::Dependency
|
125
|
+
name: htmlentitites
|
126
|
+
requirement: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - "~>"
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '4.3'
|
131
|
+
type: :runtime
|
132
|
+
prerelease: false
|
133
|
+
version_requirements: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - "~>"
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '4.3'
|
124
138
|
description: puma+sinatra+haml webUI + REST API for oxidized
|
125
139
|
email:
|
126
140
|
- saku@ytti.fi
|