oxidized-web 0.13.1 → 0.15.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/.github/PULL_REQUEST_TEMPLATE.md +12 -0
- data/.github/dependabot.yml +25 -0
- data/.github/workflows/codeql.yml +76 -0
- data/.github/workflows/ruby.yml +41 -0
- data/.github/workflows/stale.yml +20 -0
- data/.gitignore +3 -0
- data/.rubocop.yml +38 -3
- data/.rubocop_todo.yml +27 -211
- data/CHANGELOG.md +46 -0
- data/README.md +8 -5
- data/Rakefile +49 -5
- data/docs/development.md +182 -0
- data/lib/oxidized/web/public/css/oxidized.css +59 -0
- data/lib/oxidized/web/public/scripts/oxidized.js +1 -48
- data/lib/oxidized/web/public/weblibs/bootstrap-icons.css +2078 -0
- data/lib/oxidized/web/public/weblibs/bootstrap.bundle.js +6314 -0
- data/lib/oxidized/web/public/weblibs/bootstrap.bundle.js.map +1 -0
- data/lib/oxidized/web/public/weblibs/bootstrap.css +12057 -0
- data/lib/oxidized/web/public/weblibs/bootstrap.css.map +1 -0
- data/lib/oxidized/web/public/weblibs/bootstrap.js +4494 -0
- data/lib/oxidized/web/public/weblibs/bootstrap.js.map +1 -0
- data/lib/oxidized/web/public/weblibs/buttons.bootstrap5.css +395 -0
- data/lib/oxidized/web/public/weblibs/buttons.bootstrap5.js +114 -0
- data/lib/oxidized/web/public/weblibs/buttons.colVis.js +256 -0
- data/lib/oxidized/web/public/weblibs/dataTables.bootstrap5.css +517 -0
- data/lib/oxidized/web/public/weblibs/dataTables.bootstrap5.js +122 -0
- data/lib/oxidized/web/public/weblibs/dataTables.buttons.js +2936 -0
- data/lib/oxidized/web/public/weblibs/dataTables.js +13843 -0
- data/lib/oxidized/web/public/weblibs/fonts/bootstrap-icons.woff +0 -0
- data/lib/oxidized/web/public/weblibs/fonts/bootstrap-icons.woff2 +0 -0
- data/lib/oxidized/web/public/weblibs/jquery.js +10716 -0
- data/lib/oxidized/web/version.rb +7 -0
- data/lib/oxidized/web/views/conf_search.haml +14 -13
- data/lib/oxidized/web/views/diffs.haml +5 -5
- data/lib/oxidized/web/views/footer.haml +5 -4
- data/lib/oxidized/web/views/head.haml +21 -7
- data/lib/oxidized/web/views/layout.haml +25 -34
- data/lib/oxidized/web/views/node.haml +10 -8
- data/lib/oxidized/web/views/nodes.haml +45 -35
- data/lib/oxidized/web/views/stats.haml +32 -24
- data/lib/oxidized/web/views/version.haml +8 -6
- data/lib/oxidized/web/views/versions.haml +23 -24
- data/lib/oxidized/web/webapp.rb +117 -113
- data/lib/oxidized/web.rb +10 -7
- data/oxidized-web.gemspec +32 -18
- data/package-lock.json +104 -0
- data/package.json +21 -0
- data/spec/node_spec.rb +99 -0
- data/spec/node_version_spec.rb +102 -0
- data/spec/nodes_spec.rb +57 -0
- data/spec/root_spec.rb +18 -0
- data/spec/spec_helper.rb +11 -0
- data/spec/webapp_spec.rb +28 -0
- metadata +183 -74
- data/lib/oxidized/web/mig.rb +0 -150
- data/lib/oxidized/web/public/css/bootstrap.min.css +0 -5
- data/lib/oxidized/web/public/css/buttons.bootstrap.min.css +0 -1
- data/lib/oxidized/web/public/css/dataTables.bootstrap.css +0 -299
- data/lib/oxidized/web/public/css/dataTables.colVis.css +0 -171
- data/lib/oxidized/web/public/css/oxidized_custom.css +0 -19
- data/lib/oxidized/web/public/fonts/glyphicons-halflings-regular.eot +0 -0
- data/lib/oxidized/web/public/fonts/glyphicons-halflings-regular.svg +0 -229
- data/lib/oxidized/web/public/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/lib/oxidized/web/public/fonts/glyphicons-halflings-regular.woff +0 -0
- data/lib/oxidized/web/public/images/diff_15x17.png +0 -0
- data/lib/oxidized/web/public/images/sort_asc.png +0 -0
- data/lib/oxidized/web/public/images/sort_asc_disabled.png +0 -0
- data/lib/oxidized/web/public/images/sort_both.png +0 -0
- data/lib/oxidized/web/public/images/sort_desc.png +0 -0
- data/lib/oxidized/web/public/images/sort_desc_disabled.png +0 -0
- data/lib/oxidized/web/public/images/versioning_18px.png +0 -0
- data/lib/oxidized/web/public/scripts/bootstrap.min.js +0 -6
- data/lib/oxidized/web/public/scripts/dataTables.bootstrap.js +0 -186
- data/lib/oxidized/web/public/scripts/dataTables.colVis.js +0 -1123
- data/lib/oxidized/web/public/scripts/jquery-2.1.1.min.js +0 -4
- data/lib/oxidized/web/public/scripts/jquery.dataTables.min.js +0 -157
- data/lib/oxidized/web/public/scripts/jquery.min.js +0 -6
- data/lib/oxidized/web/public/scripts/script-migration.js +0 -15
- data/lib/oxidized/web/views/migration.haml +0 -46
- data/lib/oxidized/web/views/sass/oxidized.sass +0 -113
@@ -1,17 +1,19 @@
|
|
1
|
-
.row
|
2
|
-
.col-
|
1
|
+
.row
|
2
|
+
.col-8
|
3
3
|
%h4
|
4
4
|
%a{href: url_for('/nodes')} nodes
|
5
5
|
\/ Nodes that contain
|
6
|
-
%
|
7
|
-
|
6
|
+
%b
|
7
|
+
&= "#{@to_research}"
|
8
|
+
.col-4
|
9
|
+
%form.float-end#oxButtons
|
10
|
+
%button.btn.btn-primary{type: 'button', onclick: 'history.go();'}
|
11
|
+
%i.bi.bi-arrow-clockwise
|
12
|
+
Refresh
|
13
|
+
|
8
14
|
.row
|
9
|
-
.pull-right
|
10
|
-
%form
|
11
|
-
%button.ColVis_Button{type: 'button', onclick: 'history.go();'}
|
12
|
-
%span.glyphicon.glyphicon-repeat Refresh
|
13
15
|
.table-responsive
|
14
|
-
%table.table.table-
|
16
|
+
%table.table.table-sm.table-striped.table-hover#versionsTable
|
15
17
|
%thead
|
16
18
|
%tr
|
17
19
|
%th Name
|
@@ -24,14 +26,13 @@
|
|
24
26
|
%td
|
25
27
|
%a{title: 'configuration',
|
26
28
|
href: url_for("/node/fetch/#{x[:full_name]}")}
|
27
|
-
%
|
29
|
+
%i.bi.bi-cloud-download
|
28
30
|
|
29
31
|
:javascript
|
30
32
|
$(function() {
|
31
33
|
$('#versionsTable').dataTable({
|
32
|
-
|
33
|
-
|
34
|
-
"order": [[0, "desc"]]
|
34
|
+
autoWidth: false,
|
35
|
+
"order": [[0, "asc"]]
|
35
36
|
});
|
36
37
|
});
|
37
38
|
|
@@ -1,13 +1,13 @@
|
|
1
1
|
.row
|
2
|
-
.col-
|
2
|
+
.col-4
|
3
3
|
%h4
|
4
4
|
- if @info[:group] != ''
|
5
5
|
- node_full = "#{@info[:group]}/#{@info[:node]}"
|
6
6
|
- else
|
7
7
|
- node_full = "#{@info[:node]}"
|
8
8
|
%a{href: url_for("/node/version?node_full=#{node_full}")} versions
|
9
|
-
\/ Diff version #{@info[:num]} - #{@info[:num2]} for
|
10
|
-
%
|
9
|
+
\/ Diff version #{@info[:num]} - #{@info[:num2]} for node
|
10
|
+
%b #{@info[:node]}
|
11
11
|
.row
|
12
12
|
.col-sm-12
|
13
13
|
- date_version = Time.parse @info[:date]
|
@@ -25,7 +25,7 @@
|
|
25
25
|
- params = "#{params}&date=#{@info[:date]}&num=#{@info[:num]}"
|
26
26
|
%form{action: url_for("/node/version/diffs?#{params}"), method: 'post', role: 'form'}
|
27
27
|
.form-group
|
28
|
-
%select.form-
|
28
|
+
%select.form-select#oid2{name: 'oid2'}
|
29
29
|
- diff2 = {}
|
30
30
|
- num = @oids_dates.count + 1
|
31
31
|
- next_id = false
|
@@ -37,7 +37,7 @@
|
|
37
37
|
- elsif (x[:oid].to_s == @info[:oid]) && !(@info[:oid2])
|
38
38
|
- next_id = true
|
39
39
|
|
40
|
-
%button.btn.btn-
|
40
|
+
%button.btn.btn-primary{type: 'submit'} Get Diffs!
|
41
41
|
|
42
42
|
.row
|
43
43
|
.col-sm-12
|
@@ -1,4 +1,5 @@
|
|
1
|
-
%footer
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
%footer.bg-body-tertiary.border-top.border-secondary-subtle.mt-4.py-2
|
2
|
+
.container-fluid
|
3
|
+
.row
|
4
|
+
.col
|
5
|
+
Oxidized-web v.#{Oxidized::API::WEB_VERSION}, Oxidized v.#{Oxidized::VERSION}
|
@@ -4,12 +4,26 @@
|
|
4
4
|
%meta{name: 'viewport', content: 'width=device-width, initial-scale=1'}
|
5
5
|
%meta{name: 'google', content: 'notranslate'}
|
6
6
|
%title oxidized
|
7
|
-
%link{rel: 'stylesheet', href: url_for('/css/bootstrap.min.css')}
|
8
|
-
%link{rel: 'stylesheet', href: url_for('/css/oxidized.css')}
|
9
|
-
%link{rel: 'stylesheet', href: url_for('/css/oxidized_custom.css')}
|
10
7
|
%link{rel: 'shortcut icon', href: url_for('/images/favicon.ico')}
|
11
|
-
%link{rel: 'stylesheet', href: url_for('/css/dataTables.colVis.css')}
|
12
|
-
%link{rel: 'stylesheet', href: url_for('/css/dataTables.bootstrap.css')}
|
13
|
-
%link{rel: 'stylesheet', href: url_for('/css/buttons.bootstrap.min.css')}
|
14
|
-
%script{src: url_for('/scripts/jquery-2.1.1.min.js')}
|
15
8
|
|
9
|
+
-# Bootstrap
|
10
|
+
%link{rel: 'stylesheet', href: url_for('/weblibs/bootstrap.css')}
|
11
|
+
%link{rel: 'stylesheet', href: url_for('/weblibs/bootstrap-icons.css')}
|
12
|
+
-# Datatables
|
13
|
+
%link{rel: 'stylesheet', href: url_for('/weblibs/dataTables.bootstrap5.css')}
|
14
|
+
%link{rel: 'stylesheet', href: url_for('/weblibs/buttons.bootstrap5.css')}
|
15
|
+
-# Custom Oxidized css
|
16
|
+
%link{rel: 'stylesheet', href: url_for('/css/oxidized.css')}
|
17
|
+
|
18
|
+
-# JQuery
|
19
|
+
%script{src: url_for('/weblibs/jquery.js')}
|
20
|
+
-# Bootstrap 5
|
21
|
+
%script{src: url_for('/weblibs/bootstrap.bundle.js')}
|
22
|
+
-# dataTables with bootstrap and buttons (colomn visibility)
|
23
|
+
%script{src: url_for('/weblibs/dataTables.js')}
|
24
|
+
%script{src: url_for('/weblibs/dataTables.bootstrap5.js')}
|
25
|
+
%script{src: url_for('/weblibs/dataTables.buttons.js')}
|
26
|
+
%script{src: url_for('/weblibs/buttons.bootstrap5.js')}
|
27
|
+
%script{src: url_for('/weblibs/buttons.colVis.js')}
|
28
|
+
-# Oxidized customisation
|
29
|
+
%script{src: url_for('/scripts/oxidized.js')}
|
@@ -2,44 +2,35 @@
|
|
2
2
|
%html{lang: 'en'}
|
3
3
|
!=haml :head
|
4
4
|
%body
|
5
|
-
%nav.navbar.navbar-
|
5
|
+
%nav.navbar.navbar-expand-lg.bg-body-tertiary.border-bottom.border-secondary-subtle.mb-4
|
6
6
|
.container-fluid
|
7
|
-
.navbar-
|
8
|
-
%
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
%
|
17
|
-
%img{src: url_for('/images/oxidizing_40px.png')} Oxidized
|
18
|
-
|
7
|
+
%a.navbar-brand{href: url_for('/')}
|
8
|
+
%img{src: url_for('/images/oxidizing_40px.png')}
|
9
|
+
Oxidized
|
10
|
+
%button.navbar-toggler{type: 'button',
|
11
|
+
:'data-bs-toggle' => 'collapse',
|
12
|
+
:'data-bs-target' => '#ox-nav',
|
13
|
+
:'aria-expanded' => 'false',
|
14
|
+
:'aria-label' => 'Toggle navigation',
|
15
|
+
:'aria-controls' => '#ox-nav'}
|
16
|
+
%span.navbar-toggler-icon
|
19
17
|
.collapse.navbar-collapse#ox-nav
|
20
|
-
%ul.nav.
|
21
|
-
%li
|
22
|
-
%a.
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
%button.btn.btn-primary.btn-sm{type: 'submit'}
|
35
|
-
%span.glyphicon.glyphicon-search
|
18
|
+
%ul.navbar-nav.me-auto.mb-1
|
19
|
+
%li.nav-item
|
20
|
+
%a.nav-link{class: request.path_info == '/nodes/stats' ? 'active' : '',
|
21
|
+
:'aria-current' => request.path_info == '/nodes/stats' ? 'page' : 'false',
|
22
|
+
href: url_for('/nodes/stats')} Stats
|
23
|
+
%form.d-flex{role: 'search',
|
24
|
+
action: url_for('/nodes/conf_search'),
|
25
|
+
method: 'post'}
|
26
|
+
%input.form-control.me-2{type: 'text',
|
27
|
+
name: 'search_in_conf_textbox',
|
28
|
+
placeholder: 'Search in Configs',
|
29
|
+
:'aria-label' => 'Search in Configs'}
|
30
|
+
%button.btn.btn-primary{type: 'submit'}
|
31
|
+
%i.bi.bi-search
|
36
32
|
|
37
33
|
.container-fluid
|
38
34
|
=yield
|
39
35
|
!=haml :footer
|
40
|
-
%script{src: url_for('/scripts/bootstrap.min.js')}
|
41
|
-
%script{src: url_for('/scripts/jquery.dataTables.min.js')}
|
42
|
-
%script{src: url_for('/scripts/dataTables.bootstrap.js')}
|
43
|
-
%script{src: url_for('/scripts/dataTables.colVis.js')}
|
44
|
-
%script{src: url_for('/scripts/oxidized.js')}
|
45
36
|
|
@@ -5,14 +5,16 @@
|
|
5
5
|
%span /
|
6
6
|
=@data[:name]
|
7
7
|
|
8
|
-
%a{title: 'configuration',
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
8
|
+
%a.link-dark.link-underline-opacity-0{title: 'configuration',
|
9
|
+
href: url_for("/node/fetch/#{@data[:full_name]}")}
|
10
|
+
%i.bi.bi-cloud-download
|
11
|
+
%a.link-dark.link-underline-opacity-0{title: 'versions',
|
12
|
+
href: url_for("/node/version?node_full=#{@data[:full_name]}")}
|
13
|
+
%i.bi.bi-stack
|
14
|
+
%a.link-dark.link-underline-opacity-0{title: 'update',
|
15
|
+
href: url_for("/node/next/#{@data[:full_name]}")}
|
16
|
+
%i.bi.bi-repeat
|
15
17
|
- out = '';PP.pp(@data,out)
|
16
|
-
%pre
|
18
|
+
%pre.bg-body-tertiary.border.border-secondary-subtle.rounded
|
17
19
|
= preserve "#{out}"
|
18
20
|
|
@@ -1,19 +1,20 @@
|
|
1
|
-
.row
|
2
|
-
.col-
|
1
|
+
.row
|
2
|
+
.col-4
|
3
3
|
%h4 nodes /
|
4
|
+
.col-8
|
5
|
+
%form.float-end#oxButtons
|
6
|
+
%button.btn.btn-primary{type: 'button', onclick: 'history.go();'}
|
7
|
+
%i.bi.bi-arrow-clockwise
|
8
|
+
Refresh
|
9
|
+
%button.btn.btn-primary#reload{type: 'button'}
|
10
|
+
%i.bi.bi-repeat
|
11
|
+
Update node list
|
4
12
|
|
5
13
|
.hidden.alert#flashMessage
|
6
14
|
|
7
15
|
.row
|
8
|
-
.pull-right
|
9
|
-
%form
|
10
|
-
%button.ColVis_Button#reload{type: 'button'}
|
11
|
-
%span.glyphicon.glyphicon-refresh Reload
|
12
|
-
%button.ColVis_Button{type: 'button', onclick: 'history.go();'}
|
13
|
-
%span.glyphicon.glyphicon-repeat Refresh
|
14
|
-
|
15
16
|
.table-responsive
|
16
|
-
%table.table.table-
|
17
|
+
%table.table.table-sm.table-striped.table-hover#nodesTable
|
17
18
|
%thead
|
18
19
|
%tr
|
19
20
|
%th Name
|
@@ -26,10 +27,8 @@
|
|
26
27
|
%th Actions
|
27
28
|
|
28
29
|
%tbody
|
29
|
-
- trclass = %w(even odd)
|
30
30
|
- @data.sort_by{|e|e[:name]}.each do |node|
|
31
|
-
|
32
|
-
%tr{class: "#{klass} ox-status-#{node[:status]}"}
|
31
|
+
%tr
|
33
32
|
%td
|
34
33
|
%a{href: url_for("/node/show/#{node[:name]}")} #{node[:name]}
|
35
34
|
%td= node[:ip]
|
@@ -43,34 +42,45 @@
|
|
43
42
|
%td.time= node[:time]
|
44
43
|
%td.time= node[:mtime]
|
45
44
|
%td
|
46
|
-
%a{title: '
|
47
|
-
|
48
|
-
%
|
45
|
+
%a.link-dark.link-underline-opacity-0{title: 'Configuration',
|
46
|
+
href: url_for("/node/fetch/#{node[:full_name]}")}
|
47
|
+
%i.bi.bi-cloud-download
|
49
48
|
|
50
|
-
%a{title: '
|
51
|
-
|
52
|
-
%
|
49
|
+
%a.link-dark.link-underline-opacity-0{title: 'Versions',
|
50
|
+
href: url_for("/node/version?node_full=#{node[:full_name]}")}
|
51
|
+
%i.bi.bi-stack
|
53
52
|
|
54
|
-
%a{title: '
|
55
|
-
|
53
|
+
%a.link-dark.link-underline-opacity-0{title: 'Update configuration',
|
54
|
+
href: url_for("/node/next/#{node[:full_name]}")}
|
55
|
+
%i.bi.bi-repeat
|
56
56
|
|
57
57
|
:javascript
|
58
58
|
$(function() {
|
59
|
-
$('#nodesTable').
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
59
|
+
var table = $('#nodesTable').DataTable({
|
60
|
+
columnDefs: [
|
61
|
+
{
|
62
|
+
/* Hide IP address by default */
|
63
|
+
target: 1,
|
64
|
+
visible: false,
|
65
|
+
},
|
66
|
+
{
|
67
|
+
/* do not permit to hide Name and Actions */
|
68
|
+
targets: [0,7],
|
69
|
+
className: 'noVis'
|
70
|
+
},
|
71
|
+
],
|
72
|
+
buttons:
|
73
|
+
[{
|
74
|
+
extend: 'colvis',
|
75
|
+
columns: ':not(.noVis)',
|
76
|
+
className: 'btn-primary',
|
77
|
+
}],
|
78
|
+
autoWidth: false,
|
79
|
+
lengthMenu: [20, 50, 250, 500, { label: 'All', value: -1 }]
|
73
80
|
});
|
81
|
+
|
82
|
+
table.buttons(0,0).container().prependTo($('#oxButtons'));
|
83
|
+
table.buttons(0,0).nodes().removeClass('btn-secondary');
|
74
84
|
});
|
75
85
|
|
76
86
|
|
@@ -1,18 +1,17 @@
|
|
1
|
-
.row
|
2
|
-
.col-
|
1
|
+
.row
|
2
|
+
.col-4
|
3
3
|
%h4
|
4
4
|
%a{href: url_for('/nodes')} nodes
|
5
5
|
\/ stats
|
6
|
+
.col-8
|
7
|
+
%form.float-end#oxButtons
|
8
|
+
%button.btn.btn-primary{type: 'button', onclick: 'history.go();'}
|
9
|
+
%i.bi.bi-arrow-clockwise
|
10
|
+
Refresh
|
6
11
|
|
7
12
|
.row
|
8
|
-
.pull-right
|
9
|
-
%button.ColVis_Button{type: 'button', onclick: 'history.go();'}
|
10
|
-
%span.glyphicon.glyphicon-repeat Refresh
|
11
|
-
|
12
13
|
.table-responsive
|
13
|
-
%table.table.table-
|
14
|
-
%caption
|
15
|
-
%span Node Statistics
|
14
|
+
%table.table.table-sm.table-striped.table-hover#statsTable
|
16
15
|
|
17
16
|
%thead
|
18
17
|
%tr
|
@@ -76,26 +75,35 @@
|
|
76
75
|
%td #{'%.2f' % avg_time}
|
77
76
|
%td
|
78
77
|
%div{title: status, class: status}
|
78
|
+
%span{style: 'visibility: hidden'}#{status}
|
79
79
|
%td.time= last_success
|
80
80
|
%td.time= last_failure
|
81
81
|
|
82
82
|
:javascript
|
83
83
|
$(function() {
|
84
|
-
$('#statsTable').
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
targets: 1
|
91
|
-
}, {
|
92
|
-
render: function ( data, type, row) {
|
93
|
-
return type === 'display' ? data + 's' : data
|
84
|
+
var table = $('#statsTable').DataTable({
|
85
|
+
columnDefs: [
|
86
|
+
{
|
87
|
+
/* Hide IP address by default */
|
88
|
+
target: 1,
|
89
|
+
visible: false,
|
94
90
|
},
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
91
|
+
{
|
92
|
+
/* do not permit to hide Name and Last Status */
|
93
|
+
targets: [0,5],
|
94
|
+
className: 'noVis'
|
95
|
+
},
|
96
|
+
],
|
97
|
+
buttons:
|
98
|
+
[{
|
99
|
+
extend: 'colvis',
|
100
|
+
columns: ':not(.noVis)',
|
101
|
+
className: 'btn-primary',
|
102
|
+
}],
|
103
|
+
autoWidth: false,
|
104
|
+
lengthMenu: [20, 50, 250, 500, { label: 'All', value: -1 }],
|
100
105
|
});
|
106
|
+
|
107
|
+
table.buttons(0,0).container().prependTo($('#oxButtons'));
|
108
|
+
table.buttons(0,0).nodes().removeClass('btn-secondary');
|
101
109
|
});
|
@@ -1,13 +1,16 @@
|
|
1
1
|
.row
|
2
|
-
.col-
|
2
|
+
.col-8
|
3
3
|
%h4
|
4
4
|
- if @info[:group] != ''
|
5
5
|
- params = "node_full=#{@info[:group] + '/' + @info[:node]}"
|
6
6
|
- else
|
7
7
|
- params = "node_full=#{@info[:node]}"
|
8
8
|
%a{href: url_for("/node/version?#{params}")} versions
|
9
|
-
\/ version #{@info[:num]} for
|
10
|
-
%
|
9
|
+
\/ version #{@info[:num]} for node
|
10
|
+
%b #{@info[:node]}
|
11
|
+
.col-4
|
12
|
+
.float-end
|
13
|
+
%a.btn.btn-primary{:href => "#{request.path}?#{request.query_string}&format=text"} raw
|
11
14
|
.row
|
12
15
|
.col-sm-12
|
13
16
|
- date_version = Time.parse @info[:date]
|
@@ -16,7 +19,6 @@
|
|
16
19
|
|
17
20
|
.row
|
18
21
|
.col-sm-12
|
19
|
-
.
|
22
|
+
%pre.bg-body-tertiary.border.border-secondary-subtle.rounded
|
20
23
|
- @data.each_line do |line|
|
21
|
-
|
22
|
-
!= escape_once("#{line}")
|
24
|
+
!= escape_once("#{line}")
|
@@ -1,23 +1,22 @@
|
|
1
|
-
.row
|
2
|
-
.col-
|
1
|
+
.row
|
2
|
+
.col-4
|
3
3
|
%h4
|
4
4
|
%a{href: url_for('/nodes')} nodes
|
5
|
-
\/ Versions for
|
6
|
-
%
|
7
|
-
|
5
|
+
\/ Versions for node
|
6
|
+
%b #{@node}
|
7
|
+
.col-8
|
8
|
+
%form.float-end#oxButtons
|
9
|
+
%button.btn.btn-primary{type: 'button', onclick: 'history.go();'}
|
10
|
+
%i.bi.bi-arrow-clockwise
|
11
|
+
Refresh
|
8
12
|
.row
|
9
|
-
.pull-right
|
10
|
-
%form
|
11
|
-
%button.ColVis_Button{type: 'button', onclick: 'history.go();'}
|
12
|
-
%span.glyphicon.glyphicon-repeat Refresh
|
13
13
|
.table-responsive
|
14
|
-
%table.table.table-
|
14
|
+
%table.table.table-sm.table-striped.table-hover#versionsTable
|
15
15
|
%thead
|
16
16
|
%tr
|
17
17
|
%th Version
|
18
|
-
%th
|
19
|
-
%th
|
20
|
-
%th Message
|
18
|
+
%th Date
|
19
|
+
%th Elapsed time
|
21
20
|
%th Actions
|
22
21
|
|
23
22
|
%tbody
|
@@ -25,28 +24,28 @@
|
|
25
24
|
- @data.each do |x|
|
26
25
|
%tr
|
27
26
|
%td #{nb -= 1}
|
27
|
+
%td #{x[:date]}
|
28
28
|
%td #{time_from_now x[:date]}
|
29
|
-
%td #{x[:author][:name]}
|
30
|
-
%td #{x[:message]}
|
31
29
|
%td
|
32
30
|
- params = "node=#{@node}&group=#{@group}&oid=#{x[:oid]}"
|
33
31
|
- params = "#{params}&date=#{x[:date]}&num=#{nb}"
|
34
|
-
%a{title: 'configuration',
|
32
|
+
%a.link-dark.link-underline-opacity-0{title: 'configuration',
|
35
33
|
href: url_for("/node/version/view?#{params}")}
|
36
|
-
%
|
34
|
+
%i.bi.bi-cloud-download
|
37
35
|
|
38
|
-
%a{title: 'diff', href: url_for("/node/version/diffs?#{params}")}
|
39
|
-
%
|
36
|
+
%a.link-dark.link-underline-opacity-0{title: 'diff', href: url_for("/node/version/diffs?#{params}")}
|
37
|
+
%i.bi.bi-file-earmark-diff
|
40
38
|
|
41
39
|
:javascript
|
42
40
|
$(function() {
|
43
41
|
$('#versionsTable').dataTable({
|
44
|
-
dom: 'C<"clear">lfrtip',
|
45
42
|
"order": [[0, "desc"]],
|
46
43
|
bAutoWidth: false,
|
47
|
-
columnDefs: [
|
48
|
-
|
49
|
-
|
50
|
-
|
44
|
+
columnDefs: [
|
45
|
+
{
|
46
|
+
targets: _all,
|
47
|
+
className: 'text-start'
|
48
|
+
}
|
49
|
+
]
|
51
50
|
});
|
52
51
|
});
|