oxidized-web 0.13.1 → 0.14.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.

Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/.github/PULL_REQUEST_TEMPLATE.md +12 -0
  3. data/.github/dependabot.yml +25 -0
  4. data/.github/workflows/codeql.yml +76 -0
  5. data/.github/workflows/ruby.yml +42 -0
  6. data/.github/workflows/stale.yml +18 -0
  7. data/.gitignore +3 -0
  8. data/.rubocop.yml +38 -3
  9. data/.rubocop_todo.yml +28 -207
  10. data/CHANGELOG.md +28 -0
  11. data/README.md +8 -5
  12. data/Rakefile +48 -5
  13. data/docs/development.md +170 -0
  14. data/lib/oxidized/web/mig.rb +37 -47
  15. data/lib/oxidized/web/public/css/oxidized.css +59 -0
  16. data/lib/oxidized/web/public/scripts/oxidized.js +1 -12
  17. data/lib/oxidized/web/public/weblibs/bootstrap-icons.css +2078 -0
  18. data/lib/oxidized/web/public/weblibs/bootstrap.bundle.js +6314 -0
  19. data/lib/oxidized/web/public/weblibs/bootstrap.bundle.js.map +1 -0
  20. data/lib/oxidized/web/public/weblibs/bootstrap.css +12057 -0
  21. data/lib/oxidized/web/public/weblibs/bootstrap.css.map +1 -0
  22. data/lib/oxidized/web/public/weblibs/bootstrap.js +4494 -0
  23. data/lib/oxidized/web/public/weblibs/bootstrap.js.map +1 -0
  24. data/lib/oxidized/web/public/weblibs/buttons.bootstrap5.css +398 -0
  25. data/lib/oxidized/web/public/weblibs/buttons.bootstrap5.js +117 -0
  26. data/lib/oxidized/web/public/weblibs/buttons.colVis.js +256 -0
  27. data/lib/oxidized/web/public/weblibs/dataTables.bootstrap5.css +487 -0
  28. data/lib/oxidized/web/public/weblibs/dataTables.bootstrap5.js +147 -0
  29. data/lib/oxidized/web/public/weblibs/dataTables.buttons.js +2820 -0
  30. data/lib/oxidized/web/public/weblibs/dataTables.js +13171 -0
  31. data/lib/oxidized/web/public/weblibs/fonts/bootstrap-icons.woff +0 -0
  32. data/lib/oxidized/web/public/weblibs/fonts/bootstrap-icons.woff2 +0 -0
  33. data/lib/oxidized/web/public/weblibs/jquery.js +10716 -0
  34. data/lib/oxidized/web/version.rb +7 -0
  35. data/lib/oxidized/web/views/conf_search.haml +14 -13
  36. data/lib/oxidized/web/views/diffs.haml +5 -5
  37. data/lib/oxidized/web/views/footer.haml +5 -4
  38. data/lib/oxidized/web/views/head.haml +21 -7
  39. data/lib/oxidized/web/views/layout.haml +29 -34
  40. data/lib/oxidized/web/views/migration.haml +7 -0
  41. data/lib/oxidized/web/views/node.haml +10 -8
  42. data/lib/oxidized/web/views/nodes.haml +45 -35
  43. data/lib/oxidized/web/views/stats.haml +32 -24
  44. data/lib/oxidized/web/views/version.haml +8 -6
  45. data/lib/oxidized/web/views/versions.haml +23 -24
  46. data/lib/oxidized/web/webapp.rb +106 -87
  47. data/lib/oxidized/web.rb +10 -7
  48. data/oxidized-web.gemspec +27 -14
  49. data/package-lock.json +104 -0
  50. data/package.json +21 -0
  51. data/spec/node_spec.rb +143 -0
  52. data/spec/root_spec.rb +18 -0
  53. data/spec/spec_helper.rb +8 -0
  54. data/spec/webapp_spec.rb +28 -0
  55. metadata +187 -73
  56. data/lib/oxidized/web/public/css/bootstrap.min.css +0 -5
  57. data/lib/oxidized/web/public/css/buttons.bootstrap.min.css +0 -1
  58. data/lib/oxidized/web/public/css/dataTables.bootstrap.css +0 -299
  59. data/lib/oxidized/web/public/css/dataTables.colVis.css +0 -171
  60. data/lib/oxidized/web/public/css/oxidized_custom.css +0 -19
  61. data/lib/oxidized/web/public/fonts/glyphicons-halflings-regular.eot +0 -0
  62. data/lib/oxidized/web/public/fonts/glyphicons-halflings-regular.svg +0 -229
  63. data/lib/oxidized/web/public/fonts/glyphicons-halflings-regular.ttf +0 -0
  64. data/lib/oxidized/web/public/fonts/glyphicons-halflings-regular.woff +0 -0
  65. data/lib/oxidized/web/public/images/diff_15x17.png +0 -0
  66. data/lib/oxidized/web/public/images/sort_asc.png +0 -0
  67. data/lib/oxidized/web/public/images/sort_asc_disabled.png +0 -0
  68. data/lib/oxidized/web/public/images/sort_both.png +0 -0
  69. data/lib/oxidized/web/public/images/sort_desc.png +0 -0
  70. data/lib/oxidized/web/public/images/sort_desc_disabled.png +0 -0
  71. data/lib/oxidized/web/public/images/versioning_18px.png +0 -0
  72. data/lib/oxidized/web/public/scripts/bootstrap.min.js +0 -6
  73. data/lib/oxidized/web/public/scripts/dataTables.bootstrap.js +0 -186
  74. data/lib/oxidized/web/public/scripts/dataTables.colVis.js +0 -1123
  75. data/lib/oxidized/web/public/scripts/jquery-2.1.1.min.js +0 -4
  76. data/lib/oxidized/web/public/scripts/jquery.dataTables.min.js +0 -157
  77. data/lib/oxidized/web/public/scripts/jquery.min.js +0 -6
  78. data/lib/oxidized/web/views/sass/oxidized.sass +0 -113
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Oxidized
4
+ module API
5
+ WEB_VERSION = '0.14.0'
6
+ end
7
+ end
@@ -1,17 +1,19 @@
1
- .row.tbl-header
2
- .col-xs-12
1
+ .row
2
+ .col-8
3
3
  %h4
4
4
  %a{href: url_for('/nodes')} nodes
5
5
  \/ Nodes that contain
6
- %span "#{@to_research}"
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-condensed.table-striped.table-hover#versionsTable
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
- %span.glyphicon.glyphicon-cloud-download
29
+ %i.bi.bi-cloud-download
28
30
 
29
31
  :javascript
30
32
  $(function() {
31
33
  $('#versionsTable').dataTable({
32
- dom: 'C<"clear">lfrtip',
33
- bAutoWidth: false,
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-sm-12
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 Node
10
- %span.node_title #{@info[:node]}
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-control#oid2{name: 'oid2'}
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-default{type: 'submit'} Get Diffs!
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
- %hr
3
- %span
4
- %p Oxidized v.#{Oxidized::VERSION}
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,39 @@
2
2
  %html{lang: 'en'}
3
3
  !=haml :head
4
4
  %body
5
- %nav.navbar.navbar-default.navbar-static-top{role: 'navigation'}
5
+ %nav.navbar.navbar-expand-lg.bg-body-tertiary.border-bottom.border-secondary-subtle.mb-4
6
6
  .container-fluid
7
- .navbar-header
8
- %button.navbar-toggle.collapsed{type: 'button',
9
- :'data-toggle' => 'collapse',
10
- :'data-target' => '#ox-nav',
11
- :'aria-expanded' => 'false'}
12
- %span.sr-only Toggle Navigation
13
- %span.icon-bar
14
- %span.icon-bar
15
- %span.icon-bar
16
- %a.navbar-brand{href: url_for('/')}
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.navbar-nav
21
- %li{class: request.path_info == '/nodes/stats' ? 'active' : ''}
22
- %a.navbar-link{href: url_for('/nodes/stats')} Stats
23
-
24
- %li{class: request.path_info == '/migration' ? 'active' : ''}
25
- %a.navbar-link{href: url_for('/migration')} Migration
26
-
27
- %form.navbar-form.navbar-right{role: 'search',
28
- action: url_for('/nodes/conf_search'),
29
- method: 'post'}
30
- .form-group#to_search_in_config{name: 'to_search_in_config'}
31
- %input.form-control.input-sm{type: 'text',
32
- name: 'search_in_conf_textbox',
33
- placeholder: 'Search in Configs'}
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
+ %li.nav-item
24
+ %a.nav-link{class: request.path_info == '/migration' ? 'active' : '',
25
+ :'aria-current' => request.path_info == '/migration' ? 'page' : 'false',
26
+ href: url_for('/migration')} Migration
27
+ %form.d-flex{role: 'search',
28
+ action: url_for('/nodes/conf_search'),
29
+ method: 'post'}
30
+ %input.form-control.me-2{type: 'text',
31
+ name: 'search_in_conf_textbox',
32
+ placeholder: 'Search in Configs',
33
+ :'aria-label' => 'Search in Configs'}
34
+ %button.btn.btn-primary{type: 'submit'}
35
+ %i.bi.bi-search
36
36
 
37
37
  .container-fluid
38
38
  =yield
39
39
  !=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
40
 
@@ -1,3 +1,10 @@
1
+ .alert.alert-warning
2
+ The RANCID migration tool is deprecated and will be removed in a future
3
+ release. If you still need it
4
+ %b and
5
+ are willing to maintain it, open an issue at
6
+ %a{href: 'https://github.com/ytti/oxidized-web/issues'}oxidized-web issues (github)
7
+
1
8
  %h2
2
9
  RANCID to Oxidized
3
10
  %small router.db and Group Migration
@@ -5,14 +5,16 @@
5
5
  %span /
6
6
  =@data[:name]
7
7
  &nbsp;
8
- %a{title: 'configuration', href: url_for("/node/fetch/#{@data[:full_name]}")}
9
- %span.glyphicon.glyphicon-cloud-download{style: 'color: #000; font-size: 14px;'}
10
- %a{title: 'versions',
11
- href: url_for("/node/version?node_full=#{@data[:full_name]}")}
12
- %img{src: url_for('/images/versioning_18px.png')}
13
- %a{title: 'update', href: url_for("/node/next/#{@data[:full_name]}")}
14
- %span.glyphicon.glyphicon-repeat{style: 'color: #000; font-size: 14px;'}
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.tbl-header
2
- .col-xs-12.col-md-2
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-striped.table-hover.table-condensed#nodesTable
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
- - klass = trclass.rotate!.first
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: 'configuration',
47
- href: url_for("/node/fetch/#{node[:full_name]}")}
48
- %span.glyphicon.glyphicon-cloud-download
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
  &nbsp;&nbsp;
50
- %a{title: 'versions',
51
- href: url_for("/node/version?node_full=#{node[:full_name]}")}
52
- %img{src: url_for('/images/versioning_18px.png')}
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
  &nbsp;&nbsp;
54
- %a{title: 'update', href: url_for("/node/next/#{node[:full_name]}")}
55
- %span.glyphicon.glyphicon-repeat
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').dataTable({
60
- dom: 'C<"clear">lfrtip',
61
- bAutoWidth: false,
62
- "lengthMenu": [[50, 250, 500, -1], [50, 250, 500, "All"]],
63
- columnDefs: [{
64
- visible: false,
65
- targets: 1
66
- }, {
67
- type: "string",
68
- targets: 3
69
- }],
70
- colVis: {
71
- exclude: [0, 7]
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.tbl-header
2
- .col-xs-12
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-condensed.table-striped.table-hover#statsTable
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').dataTable({
85
- dom: 'C<"clear">lfrtip',
86
- "lengthMenu": [[50, 250, 500, -1], [50, 250, 500, "All"]],
87
- bAutoWidth: false,
88
- columnDefs: [{
89
- visible: false,
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
- targets: 4
96
- }],
97
- colVis: {
98
- exclude: [0, 5]
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-sm-12
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 Node
10
- %span.node_title #{@info[:node]}
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
- .diffs
22
+ %pre.bg-body-tertiary.border.border-secondary-subtle.rounded
20
23
  - @data.each_line do |line|
21
- %div><
22
- != escape_once("#{line}")
24
+ != escape_once("#{line}")
@@ -1,23 +1,22 @@
1
- .row.tbl-header
2
- .col-xs-12
1
+ .row
2
+ .col-4
3
3
  %h4
4
4
  %a{href: url_for('/nodes')} nodes
5
- \/ Versions for Node
6
- %span.node_title #{@node}
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-condensed.table-striped.table-hover#versionsTable
14
+ %table.table.table-sm.table-striped.table-hover#versionsTable
15
15
  %thead
16
16
  %tr
17
17
  %th Version
18
- %th Dates
19
- %th Author
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
- %span.glyphicon.glyphicon-cloud-download
34
+ %i.bi.bi-cloud-download
37
35
  &nbsp;&nbsp;
38
- %a{title: 'diff', href: url_for("/node/version/diffs?#{params}")}
39
- %img{src: url_for('/images/diff_15x17.png')}
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
- visible: false,
49
- targets: [2, 3]
50
- }]
44
+ columnDefs: [
45
+ {
46
+ targets: _all,
47
+ className: 'text-start'
48
+ }
49
+ ]
51
50
  });
52
51
  });