oxidized-web 0.5.2 → 0.6.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.

@@ -1,5 +1,13 @@
1
1
  %head
2
+ %meta{charset: 'utf-8'}
3
+ %meta{'meta-equiv': 'X-UA-Compatible', content: 'IE=edge'}
4
+ %meta{name: 'viewport', content: 'width=device-width, initial-scale=1'}
2
5
  %title oxidized
3
- %link{:rel=>'stylesheet', :href=>url_for('/css/bootstrap.min.css')}
4
- %link{:rel=>'stylesheet', :href=>url_for('/css/oxidized.css')}
5
- %link{:rel=>'shortcut icon', :href=>url_for('/images/favicon.ico')}
6
+ %link{rel: 'stylesheet', href: url_for('/css/bootstrap.min.css')}
7
+ %link{rel: 'stylesheet', href: url_for('/css/oxidized.css')}
8
+ %link{rel: 'shortcut icon', href: url_for('/images/favicon.ico')}
9
+ %link{rel: 'stylesheet', href: url_for('/css/dataTables.colVis.css')}
10
+ %link{rel: 'stylesheet', href: url_for('/css/dataTables.bootstrap.css')}
11
+ %link{rel: 'stylesheet', href: url_for('/css/buttons.bootstrap.min.css')}
12
+ %script{src: url_for('/scripts/jquery-2.1.1.min.js')}
13
+
@@ -1,11 +1,44 @@
1
- %html
1
+ !!! 5
2
+ %html{lang: 'en'}
2
3
  !=haml :head
3
4
  %body
4
- %header{:class=>'navbar navbar-static-top ox-nav', :role=>'navigation'}
5
- %div{:class=>'container'}
6
- %div{:class=>'navbar-header'}
7
- %div{:class=>'collapse navbar-collapse'}
8
- %a{:class=>'navbar-brand', :href=>url_for('/')}
9
- %img{:src=>url_for('/images/oxidizing_40px.png')} Oxidized
10
- %div{:class=>'container'}
5
+ %nav.navbar.navbar-default.navbar-static-top{role: 'navigation'}
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
+
19
+ .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: '/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
36
+
37
+ .container-fluid
11
38
  =yield
39
+ %script{src: url_for('/scripts/bootstrap.min.js')}
40
+ %script{src: url_for('/scripts/jquery.dataTables.min.js')}
41
+ %script{src: url_for('/scripts/dataTables.bootstrap.js')}
42
+ %script{src: url_for('/scripts/dataTables.colVis.js')}
43
+ %script{src: url_for('/scripts/oxidized.js')}
44
+
@@ -1,41 +1,46 @@
1
- !=haml :head
2
- %script{:src=>url_for('/scripts/script-migration.js')}
3
- %body
4
-
5
- %span{:id=>"migration_span"}
6
- Here you can migrate from your Rancid to Oxidized.
7
- %br
8
- To do it, just execute te following actions :
9
- %br
10
- %br
11
- %form(method="post" enctype="multipart/form-data")
12
- %label{:for=>"path_new_file"} Set the path for your future equipement file in .db format
13
- %br
14
- %input{:type=>"text", :name=>"path_new_file", :value=>"Path/to_file/here.db"}
15
- %br
16
- %br
17
- %label{:for=>"cloginrc"} Select your .cloginrc file, must be readeable
18
- %input{:type=>"file", :name=>"cloginrc"}
19
- %br
20
- %label{:for=>"files"} Select all your router.db fies of rancid, and add their group (Click "Add file" if you have multiple files)
21
- %table{:id=>"files", :name=>"files"}
22
- %th{:id=>"file"} Group
23
- %th{:id=>"file"} File
24
- %tbody
25
- %tr
26
- %td{:id=>"file"}
27
- %input{:type=>"text", :name=>"group1", :value=>"default"}
28
- %td{:id=>"file"}
29
- %input{:type=>"file", :name=>"file1", :required=>""}
30
- %br
31
- %input(type='button' value ='Add file' onclick="add_file_upload();")
32
- %br
33
- %br
34
- %label{:for=>"upload_button"}Then Click "Migrate" to do your migration
35
- %br
36
- %input(type='submit' value='Migrate !' id="upload_button")
37
- /
38
- used to know the numbers of files router.db
39
- %input(type='hidden' value='1' id='number' name='number')
40
-
41
-
1
+ %h2
2
+ RANCID to Oxidized
3
+ %small router.db and Group Migration
4
+ %form.form-horizontal{method: 'post', enctype: 'multipart/form-data',
5
+ role: 'form'}
6
+ .form-group
7
+ %label.col-sm-3{for: 'path_new_file'}
8
+ Oxidized router.db Path
9
+ .col-sm-3
10
+ %input.form-control{type: 'text', name: 'path_new_file',
11
+ placeholder: 'Path/to_file/here.db'}
12
+ .form-group
13
+ %label.col-sm-3{for: 'clogrinc'} .cloginrc File
14
+ .col-sm-3
15
+ .input-group
16
+ %input.form-control{type: 'text'}
17
+ %span.input-group-btn
18
+ %span.btn.btn-default.btn-file
19
+ %input{type: 'file', name: 'cloginrc'}
20
+ Browse
21
+
22
+ .form-group
23
+ .col-sm-12
24
+ .row
25
+ %label.col-sm-3.label-control RANCID router.db File
26
+ %label.col-sm-3.label-control Device Group
27
+ .col-sm-12#rancid_routerdbs
28
+ .row#rancidDb1
29
+ .col-sm-3
30
+ .input-group
31
+ %input.form-control{type: 'text'}
32
+ %span.input-group-btn
33
+ %span.btn.btn-default.btn-file
34
+ %input#file1{type: 'file', name: 'file1', required: ''}
35
+ Browse
36
+ .col-sm-3
37
+ %input.form-control#group1{type: 'text', name: 'group1',
38
+ value: 'default'}
39
+ .row
40
+ .col-sm-3
41
+ %button.btn.btn-default#add{type: 'button'} Add More
42
+
43
+ .form-group
44
+ .col-sm-12
45
+ %button.btn.btn-primary#upload_button{type: 'submit'} Migrate!
46
+
@@ -1,16 +1,18 @@
1
- !=haml :head
2
- %body
3
- %h4
4
- %a{:href=>url_for('/nodes')} nodes
5
- %span /
6
- =@data[:name]
7
-  
8
- %a{:title => "configuration", :href => url_for("/node/fetch/#{@data[:full_name]}") }
9
- %span{:class=>'glyphicon glyphicon-cloud-download', :style => "color: #000; font-size: 14px;"}
10
- %a{:title => "versions", :href => url_for("/node/version?node_full=#{@data[:full_name]}") }
11
- %img{:src=>url_for('/images/versioning_18px.png')}
12
- %a{:title => "update", :href => url_for("/node/next/#{@data[:full_name]}") }
13
- %span{:class=>'glyphicon glyphicon-repeat', :style => "color: #000; font-size: 14px;"}
14
- -out='';PP.pp(@data,out)
15
- %pre
16
- = preserve "#{out}"
1
+ .row
2
+ .col-sm-12
3
+ %h4
4
+ %a{href: url_for('/nodes')} nodes
5
+ %span /
6
+ =@data[:name]
7
+  
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;'}
15
+ - out = '';PP.pp(@data,out)
16
+ %pre
17
+ = preserve "#{out}"
18
+
@@ -1,70 +1,67 @@
1
- %script{:src=>url_for('/scripts/jquery-2.1.1.min.js')}
2
- %script{:src=>url_for('/scripts/jquery.dataTables.min.js')}
3
- %script{:src=>url_for('/scripts/dataTables.bootstrap.js')}
4
- %script{:src=>url_for('/scripts/dataTables.colVis.js')}
5
- %link{:rel=>'stylesheet', :href=>url_for('/css/dataTables.bootstrap.css')}
6
- %link{:rel=>'stylesheet', :href=>url_for('/css/dataTables.colVis.css')}
1
+ .row.tbl-header
2
+ .col-xs-12.col-md-2
3
+ %h4 nodes /
4
+
5
+ .row
6
+ .pull-right
7
+ %form
8
+ %button.ColVis_Button{type: 'button', onclick: 'history.go();'}
9
+ %span.glyphicon.glyphicon-repeat Refresh
10
+
11
+ .table-responsive
12
+ %table.table.table-striped.table-hover.table-condensed#nodesTable
13
+ %thead
14
+ %tr
15
+ %th Name
16
+ %th IP
17
+ %th Model
18
+ %th Group
19
+ %th Last Status
20
+ %th Last Update
21
+ %th Actions
22
+
23
+ %tbody
24
+ - trclass = %w(even odd)
25
+ - @data.sort_by{|e|e[:name]}.each do |node|
26
+ - klass = trclass.rotate!.first
27
+ %tr{class: "#{klass} ox-status-#{node[:status]}"}
28
+ %td
29
+ %a{href: url_for("/node/show/#{node[:name]}")} #{node[:name]}
30
+ %td= node[:ip]
31
+ %td= node[:model]
32
+ %td= node[:group]
33
+ %td
34
+ %div{title: node[:status], class: node[:status]}
35
+ %span{style: 'visibility: hidden'}#{node[:status]}
36
+ %td.time= node[:time]
37
+ %td
38
+ %a{title: 'configuration',
39
+ href: url_for("/node/fetch/#{node[:full_name]}")}
40
+ %span.glyphicon.glyphicon-cloud-download
41
+   
42
+ %a{title: 'versions',
43
+ href: url_for("/node/version?node_full=#{node[:full_name]}")}
44
+ %img{src: url_for('/images/versioning_18px.png')}
45
+   
46
+ %a{title: 'update', href: url_for("/node/next/#{node[:full_name]}")}
47
+ %span.glyphicon.glyphicon-repeat
48
+
7
49
  :javascript
8
50
  $(function() {
9
51
  $('#nodesTable').dataTable({
10
52
  dom: 'C<"clear">lfrtip',
11
53
  "lengthMenu": [[50, 250, 500, -1], [50, 250, 500, "All"]],
12
- columnDefs: [
13
- { visible: false, targets: 1 },
14
- {type: "string", targets: 3}
15
- ],
54
+ columnDefs: [{
55
+ visible: false,
56
+ targets: 1
57
+ }, {
58
+ type: "string",
59
+ targets: 3
60
+ }],
16
61
  colVis: {
17
- exclude: [ 0, 5 ]
18
- }
62
+ exclude: [0, 5]
63
+ }
19
64
  });
20
65
  });
21
- %div{:class=>'row tbl-header'}
22
- %div{:class=>'col-xs-12 col-md-2'}
23
- %h4 nodes /
24
- %button{:onclick => "location.href='/migration'" }
25
- %span migration
26
- %form{ :action => "/nodes/conf_search", :method => "post"}
27
- %div{:name => "to_search_in_config", :id => "to_search_in_config"}
28
- %input{:type => "submit", :value => "Search in confs"}
29
- %input{:type => "text", :name => "search_in_conf_textbox"}
30
-
31
-
32
- %div{:class=>'row'}
33
- %div{:class=>'refresh-div'}
34
- %form
35
- %button{:class => "ColVis_Button", :type => "button", :onclick => "history.go();"}
36
- %span{:class=>"glyphicon glyphicon-repeat"}
37
- Refresh
38
- %table{:id=>'nodesTable', :class=>'table table-responsive tablesorter'}
39
- %thead
40
- %tr
41
- %th Name
42
- %th IP
43
- %th Model
44
- %th Group
45
- %th Last Status
46
- %th Last Update
47
- %th Actions
48
66
 
49
- %tbody
50
- -trclass = %w(even odd)
51
- -@data.sort_by{|e|e[:name]}.each do |node|
52
- -klass = trclass.rotate!.first
53
- %tr{:class=>"#{klass} ox-status-#{node[:status]}"}
54
- %td
55
- %a{:href => url_for("/node/show/#{node[:name]}") } #{node[:name]}
56
- %td= node[:ip]
57
- %td= node[:model]
58
- %td= node[:group]
59
- %td
60
- %div{:title=>node[:status], :class=>node[:status]}
61
- %td= node[:time]
62
- %td
63
- %a{:title => "configuration", :href => url_for("/node/fetch/#{node[:full_name]}") }
64
- %span{:class=>'glyphicon glyphicon-cloud-download'}
65
- &nbsp;&nbsp;
66
- %a{:title => "versions", :href => url_for("/node/version?node_full=#{node[:full_name]}") }
67
- %img{:src=>url_for('/images/versioning_18px.png')}
68
- &nbsp;&nbsp;
69
- %a{:title => "update", :href => url_for("/node/next/#{node[:full_name]}") }
70
- %span{:class=>'glyphicon glyphicon-repeat'}
67
+
@@ -1,4 +1,4 @@
1
- body table
1
+ body
2
2
  font-size: 14px
3
3
 
4
4
  .ox-nav
@@ -17,33 +17,9 @@ body table
17
17
  .table a, .table a:visited
18
18
  color: #000
19
19
 
20
- .tbl-header
21
- margin: 20px -20px
22
-
23
-
24
- .tablesorter-headerAsc .tablesorter-header-inner
25
- display: inline-block
26
- border-bottom: 1px dotted #333
27
-
28
- .tablesorter-headerDesc .tablesorter-header-inner
29
- display: inline-block
30
- border-bottom: 1px solid #333
31
-
32
20
  tr.ox-status-no_connection
33
21
  background-color: #fcf8e3
34
22
 
35
- input#search
36
- border-color: 0 !important
37
- border: none !important
38
- box-shadow: 0 !important
39
- border-bottom: 1px dotted #000 !important
40
- -webkit-box-shadow: none !important
41
- border-radius: 0 !important
42
- width: 150px
43
-
44
- input#search .focused
45
- border-bottom: 1px dotted #FFA600 !important
46
-
47
23
  .added
48
24
  background-color: #DBFFDB
49
25
 
@@ -52,28 +28,28 @@ input#search .focused
52
28
 
53
29
  .diff-index
54
30
  background-color: #FFFF99
55
-
31
+
56
32
  .diff-empty
57
- background-color: #F0F0F0
58
-
33
+ background-color: #F0F0F0
34
+
59
35
  .diffs
60
36
  background-color: FAFAFA
61
37
  border: 2px solid #ccc
62
38
  border-radius: 5px
63
39
  padding: 3px
64
-
40
+ font-family: Consolas, "Lucida Console", monospace
41
+ white-space: pre
42
+
65
43
  .diffs_old
66
44
  @extend .diffs
67
45
  float: left
68
46
  width: 49%
69
- white-space: nowrap
70
47
  overflow: auto
71
48
 
72
49
  .diffs_new
73
50
  @extend .diffs
74
51
  margin-left: 51%
75
52
  width: 49%
76
- white-space: nowrap
77
53
  overflow: auto
78
54
 
79
55
  .node_title
@@ -88,11 +64,6 @@ input#search .focused
88
64
  margin-left: 51%
89
65
  font-weight: bold
90
66
 
91
- .refresh-div
92
- float: right
93
- padding-left: 5px
94
-
95
-
96
67
  .status
97
68
  float: right
98
69
  width: 15px
@@ -101,10 +72,11 @@ input#search .focused
101
72
  margin-right: 70%
102
73
  margin-bottom: 0px
103
74
  border-radius: 2px
75
+
104
76
  .success
105
77
  @extend .status
106
78
  background-color: #64FE2E
107
-
79
+
108
80
  .no_connection
109
81
  @extend .status
110
82
  background-color: #FF0000
@@ -113,24 +85,28 @@ input#search .focused
113
85
  background-color: #58ACFA
114
86
 
115
87
  a:hover
116
- text-decoration: none
88
+ text-decoration: none
89
+
90
+ .btn-file
91
+ position: relative
92
+ overflow: hidden
93
+
94
+ .btn-file > input[type=file]
95
+ position: absolute
96
+ top: 0
97
+ right: 0
98
+ min-width: 100%
99
+ min-height: 100%
100
+ font-size: 100px
101
+ text-align: right
102
+ filter: alpha(opacity=0)
103
+ opacity: 0
104
+ outline: none
105
+ background: white
106
+ cursor: inherit
107
+ display: block
108
+
109
+ @-moz-document url-prefix()
110
+ fieldset
111
+ display: table-cell
117
112
 
118
- #migration_span
119
- font-size: 20px
120
- font-weight: bold
121
-
122
- table#files
123
- width: 70%
124
- border: 1px solid
125
-
126
- th#file
127
- width: 50%
128
- height: 30px
129
- text-align: center
130
-
131
- td#file
132
- @extend th#file
133
- padding: 15px
134
-
135
- div#to_search_in_config
136
- padding-top: 5px