machinery-tool 1.20.0 → 1.21.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/.git_revision +1 -1
  3. data/NEWS +12 -0
  4. data/html/assets/bootstrap-modal.js +338 -0
  5. data/html/assets/compare/machinery.js +15 -0
  6. data/html/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
  7. data/html/assets/fonts/glyphicons-halflings-regular.woff +0 -0
  8. data/html/assets/machinery-base.css +5 -2
  9. data/html/assets/machinery-base.js +16 -1
  10. data/html/assets/machinery.css +41 -0
  11. data/html/assets/show/machinery.js +18 -0
  12. data/html/comparison.html.haml +25 -26
  13. data/html/homepage.html.haml +24 -0
  14. data/html/index.html.haml +35 -30
  15. data/html/partials/{landing_page/alert.html.haml → alert.html.haml} +0 -0
  16. data/html/partials/compare/changed_config_files.html.haml +1 -1
  17. data/html/partials/compare/changed_managed_files.html.haml +1 -1
  18. data/html/partials/compare/groups.html.haml +1 -1
  19. data/html/partials/compare/os.html.haml +1 -1
  20. data/html/partials/compare/packages.html.haml +1 -1
  21. data/html/partials/compare/pattern_list.html.haml +3 -0
  22. data/html/partials/compare/patterns.html.haml +1 -2
  23. data/html/partials/compare/repositories.html.haml +1 -1
  24. data/html/partials/compare/services.html.haml +1 -1
  25. data/html/partials/compare/unmanaged_file_list.html.haml +12 -4
  26. data/html/partials/compare/unmanaged_files.html.haml +1 -1
  27. data/html/partials/compare/users.html.haml +1 -1
  28. data/html/partials/description_selector.html.haml +57 -0
  29. data/html/partials/nav_bar.html.haml +34 -0
  30. data/html/partials/patterns.html.haml +4 -1
  31. data/html/partials/unmanaged_files.html.haml +11 -3
  32. data/lib/config_task.rb +8 -2
  33. data/lib/exceptions.rb +0 -1
  34. data/lib/server.rb +19 -2
  35. data/lib/system_description.rb +1 -1
  36. data/lib/version.rb +1 -1
  37. data/lib/zypper.rb +1 -1
  38. data/machinery-helper/machinery_helper.go +12 -4
  39. data/machinery-helper/machinery_helper_test.go +5 -1
  40. data/machinery-helper/version.go +1 -1
  41. data/man/generated/machinery.1.gz +0 -0
  42. data/manual/site/sitemap.xml +23 -23
  43. data/plugins/changed_config_files/schema/system-description-changed-config-files.schema-v10.json +160 -0
  44. data/plugins/changed_managed_files/schema/system-description-changed-managed-files.schema-v10.json +160 -0
  45. data/plugins/environment/schema/system-description-environment.schema-v10.json +17 -0
  46. data/plugins/groups/schema/system-description-groups.schema-v10.json +49 -0
  47. data/plugins/os/schema/system-description-os.schema-v10.json +21 -0
  48. data/plugins/packages/schema/system-description-packages.schema-v10.json +115 -0
  49. data/plugins/patterns/patterns_inspector.rb +2 -0
  50. data/plugins/patterns/patterns_model.rb +1 -0
  51. data/plugins/patterns/patterns_renderer.rb +4 -1
  52. data/plugins/patterns/schema/system-description-patterns.schema-v10.json +69 -0
  53. data/plugins/repositories/schema/system-description-repositories.schema-v10.json +165 -0
  54. data/plugins/services/schema/system-description-services.schema-v10.json +93 -0
  55. data/plugins/services/services_inspector.rb +40 -9
  56. data/plugins/unmanaged_files/schema/system-description-unmanaged-files.schema-v10.json +153 -0
  57. data/plugins/unmanaged_files/unmanaged_files_model.rb +8 -0
  58. data/plugins/unmanaged_files/unmanaged_files_renderer.rb +8 -2
  59. data/plugins/users/schema/system-description-users.schema-v10.json +86 -0
  60. data/schema/migrations/migrate9to10.rb +55 -0
  61. data/schema/system-description-global.schema-v10.json +43 -0
  62. metadata +23 -5
  63. data/html/landing_page.html.haml +0 -62
@@ -7,6 +7,10 @@ $(document).ready(function () {
7
7
  $("#filter").val("").change()
8
8
  });
9
9
 
10
+ $(".description-filterable").searcher({
11
+ inputSelector: "#descriptions-filter"
12
+ });
13
+
10
14
  // Align content below floating menu
11
15
  var header_height = $("#nav-bar").height() + 20;
12
16
  $("#content_container, #angular-content").css("margin-top", header_height);
@@ -178,3 +182,17 @@ $(document).ready(function () {
178
182
  });
179
183
  highlightCurrentScope();
180
184
  });
185
+
186
+ $(document).on("click", ".open-description-selector", function () {
187
+ if ($(this).hasClass("show")) {
188
+ $(".description-selector-action").text("show its details.");
189
+ $("a.show-description").show();
190
+ $("a.compare-description").hide();
191
+ }else{
192
+ descriptionName = $(".description-name:first").val();
193
+ $(".description-selector-action").text("compare with description \"" + descriptionName + "\".");
194
+ $("a.show-description").hide();
195
+ $("a.compare-description").show();
196
+ }
197
+ });
198
+
@@ -44,37 +44,36 @@
44
44
  %button.btn.btn-primary{"type" => "button", "data-dismiss" => "modal"}
45
45
  Close
46
46
 
47
+ = render_partial "description_selector"
48
+
47
49
  .container-fluid
48
50
  #nav-bar
49
- .row
50
- .col-xs-1
51
- .col-xs-10
52
- %h1
53
- Comparing '#{@description_a.name}' with '#{@description_b.name}'
54
- .row
55
- .col-xs-1
56
- %a#expand-all{:href => "#", :style => "display: none"}
51
+ = render_partial "nav_bar"
52
+
53
+ .row.toolbar
54
+ %small.col-xs-1
55
+ %a#expand-all{ :href => "#", :style => "display: none" }
57
56
  Expand all
58
- %a#collapse-all{:href => "#"}
57
+ %a#collapse-all{ :href => "#" }
59
58
  Collapse all
60
- .row
61
- .col-xs-1
62
- .col-xs-10
63
- %small.pull-right
64
- created by
65
- %a{:href => "http://machinery-project.org", :target => "_blank"}
66
- Machinery
67
- %br
68
- %a{ :href => "/site/docs/", :target => "_blank" }
69
- Machinery documentation
70
59
 
71
- %span.scope-navigation
72
- Scopes:
73
- - scopes.each do |scope|
74
- %a.btn.btn-default.btn-sm{ :href => "##{scope}", :title => scope_title(scope),
75
- "data-toggle"=>"popover", "data-content" => scope_help(scope),
76
- :class => nav_class(scope), "ng-show" => "diff.#{scope}" }
77
- %span= scope_initials(scope)
60
+ .col-xs-11.nav-buttons
61
+ .col-xs-10
62
+ %span.scope-navigation
63
+ Scopes:
64
+ - scopes.each do |scope|
65
+ %a.btn.btn-default.btn-sm{ :href => "##{scope}", :title => scope_title(scope),
66
+ "data-toggle"=>"popover", "data-content" => scope_help(scope),
67
+ :class => nav_class(scope), "ng-show" => "diff.#{scope}" }
68
+ %span= scope_initials(scope)
69
+ .col-xs-2
70
+ %small.pull-right
71
+ created by
72
+ %a{ :href => "http://machinery-project.org", :target => "_blank" }
73
+ Machinery
74
+ %br
75
+ %a{ :href => "/site/docs/", :target => "_blank" }
76
+ Machinery documentation
78
77
 
79
78
  #content_container
80
79
  %div
@@ -0,0 +1,24 @@
1
+ !!!
2
+ %html
3
+ %head
4
+ %title
5
+ Machinery System Descriptions
6
+ %meta{ :charset => 'utf-8' }
7
+ %link{ :href => "assets/machinery-base.css", :rel => "stylesheet", :type => "text/css" }
8
+ %link{ :href => "assets/machinery.css", :rel => "stylesheet", :type => "text/css" }
9
+ %script{ :src => "assets/jquery-2.1.1.min.js" }
10
+ %script{ :src => "assets/jquery.searcher.min.js" }
11
+ %script{ :src => "assets/machinery-base.js" }
12
+ %script{ :src => "assets/show/machinery.js" }
13
+ %script{ :src => "assets/bootstrap-tooltip.js" }
14
+ %script{ :src => "assets/bootstrap-popover.js" }
15
+ %script{ :src => "assets/bootstrap-modal.js" }
16
+
17
+ %body
18
+ .container-fluid
19
+ #content_container
20
+ = render_partial "description_selector"
21
+
22
+ .container-fluid
23
+ #nav-bar
24
+ = render_partial "nav_bar"
data/html/index.html.haml CHANGED
@@ -9,12 +9,12 @@
9
9
  %script{ :src => "assets/jquery-2.1.1.min.js" }
10
10
  %script{ :src => "assets/transition.js" }
11
11
  %script{ :src => "assets/collapse.js" }
12
- %script{ :src => "assets/modal.js" }
13
12
  %script{ :src => "assets/jquery.searcher.min.js" }
14
13
  %script{ :src => "assets/machinery-base.js" }
15
14
  %script{ :src => "assets/show/machinery.js" }
16
15
  %script{ :src => "assets/bootstrap-tooltip.js" }
17
16
  %script{ :src => "assets/bootstrap-popover.js" }
17
+ %script{ :src => "assets/bootstrap-modal.js" }
18
18
 
19
19
  %body{ "data-description" => @description.name }
20
20
  - scopes = ["os", "packages", "patterns", "repositories", "users", "groups",
@@ -42,43 +42,48 @@
42
42
  .body
43
43
  %textarea.content
44
44
 
45
+ = render_partial "description_selector"
46
+
45
47
  .container-fluid
46
48
  #nav-bar
47
- .row
48
- .col-xs-1
49
- .col-xs-10
50
- %h1
51
- System '#{@description.name}'
52
-
53
- %a.inspection_details{ :href => "#", "data-toggle" => "popover" } (inspection details)
54
- .row
55
- .col-xs-1
49
+ = render_partial "nav_bar"
50
+ .row.toolbar
51
+ %small.col-xs-1
56
52
  %a#expand-all{ :href => "#", :style => "display: none" }
57
53
  Expand all
58
54
  %a#collapse-all{ :href => "#" }
59
55
  Collapse all
60
- .col-xs-10.nav-buttons
61
- %small.pull-right
62
- created by
63
- %a{ :href => "http://machinery-project.org", :target => "_blank" }
64
- Machinery
65
- %br
66
- %a{ :href => "/site/docs/", :target => "_blank" }
67
- Machinery documentation
68
- .filter-input.col-md-4
69
- %input.col-md-8#filter{ :placeholder => "Type To Filter" }
70
- %a.btn.btn-default.btn-reset{ :href => "#", :title => "Reset Filter" }
71
- %span Reset
72
56
 
73
- %span.scope-navigation
74
- %span.nav-bar-title
75
- Scopes:
57
+ .col-xs-11.nav-buttons
58
+ .col-xs-3
59
+ .filter-input
60
+ .input-group
61
+ %input.form-control.col-md-8#filter{ :placeholder => "Type To Filter" }
62
+ .input-group-btn
63
+ %a.btn.btn-default.reset-filter{ :href => "#", :title => "Reset Filter" }
64
+ %span Reset
65
+
66
+ .col-xs-5
67
+ %span.scope-navigation
68
+ %span.nav-bar-title
69
+ Scopes:
76
70
 
77
- - scopes.each do |scope|
78
- %a.btn.btn-default.btn-sm{ :href => "##{scope}", :title => scope_title(scope),
79
- "data-toggle"=>"popover", "data-content" => scope_help(scope),
80
- :class => nav_class(scope) }
81
- %span= scope_initials(scope)
71
+ - scopes.each do |scope|
72
+ %a.btn.btn-default.btn-sm{ :href => "##{scope}", :title => scope_title(scope),
73
+ "data-toggle"=>"popover", "data-content" => scope_help(scope),
74
+ :class => nav_class(scope) }
75
+ %span= scope_initials(scope)
76
+ .col-xs-2
77
+ %a.btn.btn-default.inspection_details{ :href => "#", "data-toggle" => "popover" }
78
+ inspection details
79
+ .col-xs-2
80
+ %small.pull-right
81
+ created by
82
+ %a{ :href => "http://machinery-project.org", :target => "_blank" }
83
+ Machinery
84
+ %br
85
+ %a{ :href => "/site/docs/", :target => "_blank" }
86
+ Machinery documentation
82
87
 
83
88
  #content_container
84
89
 
@@ -23,7 +23,7 @@
23
23
  - if @diff["changed_config_files"].only_in1
24
24
  = only_in_a
25
25
  = render_partial "compare/changed_config_files_list", list: @diff["changed_config_files"].only_in1
26
- .col-xs-6.table_container
26
+ .col-xs-6.table_container{ class: offset_class(@diff["changed_config_files"].only_in1) }
27
27
  - if @diff["changed_config_files"].only_in2
28
28
  = only_in_b
29
29
  = render_partial "compare/changed_config_files_list", list: @diff["changed_config_files"].only_in2
@@ -24,7 +24,7 @@
24
24
  = only_in_a
25
25
  = render_partial "compare/changed_managed_file_list",
26
26
  list: @diff["changed_managed_files"].only_in1
27
- .col-xs-6.table_container
27
+ .col-xs-6.table_container{ class: offset_class(@diff["changed_managed_files"].only_in1) }
28
28
  - if @diff["changed_managed_files"].only_in2
29
29
  = only_in_b
30
30
  = render_partial "compare/changed_managed_file_list",
@@ -20,7 +20,7 @@
20
20
  - if @diff["groups"].only_in1
21
21
  = only_in_a
22
22
  = render_partial "compare/group_list", list: @diff["groups"].only_in1
23
- .col-md-6.table_container
23
+ .col-md-6.table_container{ class: offset_class(@diff["groups"].only_in1) }
24
24
  - if @diff["groups"].only_in2
25
25
  = only_in_b
26
26
  = render_partial "compare/group_list", list: @diff["groups"].only_in2
@@ -19,7 +19,7 @@
19
19
  - if @diff["os"].only_in1
20
20
  = only_in_a
21
21
  = render_partial "compare/os_table", os: @diff["os"].only_in1
22
- .col-md-6.table_container
22
+ .col-md-6.table_container{ class: offset_class(@diff["os"].only_in1) }
23
23
  - if @diff["os"].only_in2
24
24
  = only_in_b
25
25
  = render_partial "compare/os_table", os: @diff["os"].only_in2
@@ -40,7 +40,7 @@
40
40
  - if @diff["packages"].only_in1
41
41
  = only_in_a
42
42
  = render_partial "compare/package_list", list: @diff["packages"].only_in1
43
- .col-md-6.table_container
43
+ .col-md-6.table_container{ class: offset_class(@diff["packages"].only_in1) }
44
44
  - if @diff["packages"].only_in2
45
45
  = only_in_b
46
46
  = render_partial "compare/package_list", list: @diff["packages"].only_in2
@@ -1,3 +1,6 @@
1
+ %p
2
+ %strong Pattern Manager:
3
+ = list.patterns_system
1
4
  %table.table.table-striped.table-hover.table-condensed
2
5
  %thead
3
6
  %tr
@@ -23,7 +23,7 @@
23
23
  - if @diff["patterns"].only_in1
24
24
  = only_in_a
25
25
  = render_partial "compare/pattern_list", list: @diff["patterns"].only_in1
26
- .col-md-6.table_container
26
+ .col-md-6.table_container{ class: offset_class(@diff["patterns"].only_in1) }
27
27
  - if @diff["patterns"].only_in2
28
28
  = only_in_b
29
29
  = render_partial "compare/pattern_list", list: @diff["patterns"].only_in2
@@ -48,4 +48,3 @@
48
48
  .col-md-12.table_container
49
49
  = in_both
50
50
  = render_partial "compare/pattern_list", list: @diff["patterns"].common
51
-
@@ -25,7 +25,7 @@
25
25
  - repo_system = @diff["repositories"].only_in1.repository_system
26
26
  = render_partial "compare/repository_list_#{repo_system}",
27
27
  list: @diff["repositories"].only_in1
28
- .col-md-6.table_container
28
+ .col-md-6.table_container{ class: offset_class(@diff["repositories"].only_in1) }
29
29
  - if @diff["repositories"].only_in2
30
30
  = only_in_b
31
31
  - repo_system = @diff["repositories"].only_in2.repository_system
@@ -40,7 +40,7 @@
40
40
  - if @diff["services"].only_in1
41
41
  = only_in_a
42
42
  = render_partial "compare/service_list", list: @diff["services"].only_in1
43
- .col-md-6.table_container
43
+ .col-md-6.table_container{ class: offset_class(@diff["services"].only_in1) }
44
44
  - if @diff["services"].only_in2
45
45
  = only_in_b
46
46
  = render_partial "compare/service_list", list: @diff["services"].only_in2
@@ -7,20 +7,28 @@
7
7
  %tr
8
8
  %th Name
9
9
  %th.small Type
10
- - if list.has_metadata
10
+ - if list.contains_metadata?
11
11
  %th.medium Mode
12
12
  %th.medium User
13
13
  %th.medium Group
14
14
  %th.medium Size
15
- %th.medium Files in dir.
15
+ - if list.has_subdir_counts?
16
+ %th.medium Subdir.
17
+ %th.medium Files in dir.
18
+ - else
19
+ %th.medium File Objects
16
20
  %tbody
17
21
  - list.each do |file|
18
22
  %tr
19
23
  %td= file.name
20
24
  %td= file.type
21
- - if list.has_metadata
25
+ - if list.contains_metadata?
22
26
  %td= file.mode
23
27
  %td= file.user
24
28
  %td= file.group
25
29
  %td= number_to_human_size(file.size)
26
- %td= file.files
30
+ - if list.has_subdir_counts?
31
+ %td= file.dirs
32
+ %td= file.files
33
+ - else
34
+ %td= file.file_objects
@@ -39,7 +39,7 @@
39
39
  = only_in_a
40
40
  = render_partial "compare/unmanaged_file_list",
41
41
  list: @diff["unmanaged_files"].only_in1
42
- .col-md-6.table_container
42
+ .col-md-6.table_container{ class: offset_class(@diff["unmanaged_files"].only_in1) }
43
43
  - if @diff["unmanaged_files"].only_in2
44
44
  = only_in_b
45
45
  = render_partial "compare/unmanaged_file_list",
@@ -23,7 +23,7 @@
23
23
  - if @diff["users"].only_in1
24
24
  = only_in_a
25
25
  = render_partial "compare/user_list", list: @diff["users"].only_in1
26
- .col-md-6.table_container
26
+ .col-md-6.table_container{ class: offset_class(@diff["users"].only_in1) }
27
27
  - if @diff["users"].only_in2
28
28
  = only_in_b
29
29
  = render_partial "compare/user_list", list: @diff["users"].only_in2
@@ -0,0 +1,57 @@
1
+ .modal.fade#description-selector{ "aria-labelledby" => "description-selector-label",
2
+ :role => "dialog", :tabindex => "-1" }
3
+ .modal-dialog.large{ :role => "document" }
4
+ .modal-content
5
+ .modal-header
6
+ %button.close{ "aria-label" => "Close", "data-dismiss" => "modal", :type => "button" }
7
+ %span{ "aria-hidden" => "true" } ×
8
+ %h4.modal-title#description-selector-label
9
+ Select a description from the list below to
10
+ %span.description-selector-action
11
+ show its details.
12
+ .modal-body
13
+ = render_partial "alert"
14
+ .row
15
+ .filter-input.col-md-3
16
+ .input-group
17
+ %input.col-md-8.form-control#descriptions-filter{ :placeholder => "Type to filter" }
18
+ .input-group-btn
19
+ %a.btn.btn-default.reset-descriptions-filter{ :href => "#",
20
+ :title => "Reset Filter" }
21
+ %span Reset
22
+
23
+ - if @all_descriptions.empty?
24
+ %p.col-md-5.col-md-offset-1
25
+ %strong
26
+ No system descriptions available on your machine.
27
+ - else
28
+ %table.table.table-striped.table-condensed.description-filterable
29
+ %thead
30
+ %tr
31
+ %th Name
32
+ %th Host
33
+ %th Scopes
34
+ %th Last update
35
+ %tbody
36
+ - @all_descriptions.each do |key, value|
37
+ %tr
38
+ %td
39
+ - case
40
+ - when @description
41
+ %a.show-description{ :href => "/#{key}" }
42
+ #{key}
43
+ %a.compare-description{ :href => "/compare/#{@description.name}/#{key}" }
44
+ #{key}
45
+ - when @description_a && @description_b
46
+ %a.show-description{ :href => "/compare/#{key}/#{@description_b.name}" }
47
+ #{key}
48
+ %a.compare-description{ :href => "/compare/#{@description_a.name}/#{key}" }
49
+ #{key}
50
+ - else
51
+ %a.show-description{ :href => "/#{key}" }
52
+ #{key}
53
+ %td= value["host"].join(", ")
54
+ %td= value["scopes"].join(", ")
55
+ %td= value["date"]
56
+ .modal-footer
57
+ %button.btn.btn-default{ "data-dismiss" => "modal", :type => "button" } Close
@@ -0,0 +1,34 @@
1
+ - if @description
2
+ - show_description_name = @description.name
3
+ - compare_description_name = ""
4
+ - compare_description_class = "missing"
5
+ - close_comparison_attrs = { href: "#", disabled: "disabled" }
6
+ - elsif @description_a && @description_b
7
+ - show_description_name = @description_a.name
8
+ - compare_description_name = @description_b.name
9
+ - compare_description_class = ""
10
+ - close_comparison_attrs = { href: "/#{@description_a.name}" }
11
+ - else
12
+ - show_description_name = ""
13
+ - compare_description_name = ""
14
+ - compare_description_class = ""
15
+ - close_comparison_attrs = { href: "#", disabled: "disabled" }
16
+ .row
17
+ .col-xs-4.col-xs-offset-1
18
+ .input-group.input-group-lg
19
+ %input.description-name{ :type => "text",
20
+ :placeholder => "No description selected", :value => show_description_name }
21
+ .input-group-btn
22
+ %button.btn.btn-default.open-description-selector.show{ "data-target" => "#description-selector",
23
+ "data-toggle" => "modal", :type => "button" }
24
+ %span.glyphicon.glyphicon-option-horizontal
25
+ .col-xs-4.col-xs-offset-1
26
+ .input-group.input-group-lg
27
+ %input.description-name{ :type => "text",
28
+ :placeholder => "No description selected for comparison", :class => compare_description_class, :value => compare_description_name }
29
+ .input-group-btn
30
+ %button.btn.btn-default.open-description-selector.compare{ "data-target" => "#description-selector",
31
+ "data-toggle" => "modal", :type => "button" }
32
+ %span.glyphicon.glyphicon-option-horizontal
33
+ %a.btn.btn-default.close-comparison{ close_comparison_attrs }
34
+ %span.glyphicon.glyphicon-remove