machinery-tool 1.16.4 → 1.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. checksums.yaml +4 -4
  2. data/.git_revision +1 -1
  3. data/NEWS +10 -0
  4. data/filters/default_filters.json +21 -20
  5. data/html/assets/machinery-base.js +4 -0
  6. data/html/index.html.haml +1 -1
  7. data/html/partials/changed_managed_files.html.haml +2 -2
  8. data/html/partials/compare/changed_managed_file_list.html.haml +2 -2
  9. data/html/partials/compare/changed_managed_files.html.haml +3 -3
  10. data/html/partials/compare/config_file_list.html.haml +2 -2
  11. data/html/partials/compare/config_files.html.haml +3 -3
  12. data/html/partials/compare/packages.html.haml +21 -4
  13. data/html/partials/compare/repositories.html.haml +10 -7
  14. data/html/partials/compare/repository_list_apt.html.haml +15 -0
  15. data/html/partials/compare/repository_list_yum.html.haml +35 -0
  16. data/html/partials/compare/{repository_list.html.haml → repository_list_zypp.html.haml} +0 -0
  17. data/html/partials/compare/service_list.html.haml +1 -1
  18. data/html/partials/compare/services.html.haml +3 -3
  19. data/html/partials/compare/unmanaged_file_list.html.haml +2 -2
  20. data/html/partials/compare/unmanaged_files.html.haml +1 -1
  21. data/html/partials/config_files.html.haml +39 -41
  22. data/html/partials/repositories.html.haml +1 -23
  23. data/html/partials/repositories_apt.html.haml +15 -0
  24. data/html/partials/repositories_yum.html.haml +30 -0
  25. data/html/partials/repositories_zypp.html.haml +24 -0
  26. data/html/partials/services.html.haml +2 -2
  27. data/html/partials/unmanaged_files.html.haml +2 -2
  28. data/inspect_helpers/dpkg_unmanaged_files.sh +47 -0
  29. data/inspect_helpers/yum_repositories.py +3 -5
  30. data/lib/analyze_config_file_diffs_task.rb +11 -1
  31. data/lib/array.rb +97 -35
  32. data/lib/autoyast.rb +13 -2
  33. data/lib/cli.rb +10 -2
  34. data/lib/config.rb +4 -4
  35. data/lib/dpkg_database.rb +68 -0
  36. data/lib/element_filter.rb +2 -0
  37. data/lib/file_diff.rb +2 -2
  38. data/lib/file_scope.rb +10 -49
  39. data/lib/file_validator.rb +10 -4
  40. data/lib/filter.rb +6 -6
  41. data/lib/filter_option_parser.rb +1 -1
  42. data/lib/kiwi_config.rb +13 -10
  43. data/lib/machinery.rb +2 -0
  44. data/lib/machinery_helper.rb +1 -1
  45. data/lib/managed_files_database.rb +200 -0
  46. data/lib/object.rb +5 -3
  47. data/lib/remote_system.rb +43 -10
  48. data/lib/renderer.rb +3 -4
  49. data/lib/rpm_database.rb +7 -183
  50. data/lib/scope_file_access_archive.rb +3 -3
  51. data/lib/scope_file_access_flat.rb +1 -1
  52. data/lib/server.rb +7 -2
  53. data/lib/system.rb +50 -22
  54. data/lib/system_description.rb +3 -3
  55. data/lib/version.rb +1 -1
  56. data/lib/workload_mapper.rb +2 -2
  57. data/machinery-helper/machinery_helper.go +252 -178
  58. data/machinery-helper/machinery_helper_test.go +121 -121
  59. data/machinery-helper/mountpoints.go +28 -28
  60. data/machinery-helper/tar.go +105 -104
  61. data/machinery-helper/version.go +1 -1
  62. data/man/generated/machinery.1.gz +0 -0
  63. data/man/generated/machinery.1.html +19 -8
  64. data/plugins/changed_managed_files/changed_managed_files_inspector.rb +3 -3
  65. data/plugins/changed_managed_files/changed_managed_files_model.rb +3 -1
  66. data/plugins/changed_managed_files/changed_managed_files_renderer.rb +2 -2
  67. data/plugins/changed_managed_files/schema/system-description-changed-managed-files.schema-v6.json +168 -0
  68. data/plugins/config_files/config_files_inspector.rb +4 -4
  69. data/plugins/config_files/config_files_model.rb +3 -1
  70. data/plugins/config_files/config_files_renderer.rb +2 -2
  71. data/plugins/config_files/schema/system-description-config-files.schema-v6.json +160 -0
  72. data/plugins/environment/schema/system-description-environment.schema-v6.json +17 -0
  73. data/plugins/groups/schema/system-description-groups.schema-v6.json +49 -0
  74. data/plugins/os/schema/system-description-os.schema-v6.json +21 -0
  75. data/plugins/packages/packages_inspector.rb +76 -6
  76. data/plugins/packages/packages_model.rb +31 -12
  77. data/plugins/packages/packages_renderer.rb +5 -2
  78. data/plugins/packages/schema/system-description-packages.schema-v6.json +115 -0
  79. data/plugins/patterns/patterns_inspector.rb +26 -2
  80. data/plugins/patterns/schema/system-description-patterns.schema-v6.json +58 -0
  81. data/plugins/repositories/repositories_inspector.rb +41 -14
  82. data/plugins/repositories/repositories_model.rb +55 -12
  83. data/plugins/repositories/repositories_renderer.rb +23 -7
  84. data/plugins/repositories/schema/system-description-repositories.schema-v6.json +165 -0
  85. data/plugins/services/schema/system-description-services.schema-v6.json +93 -0
  86. data/plugins/services/services_inspector.rb +88 -22
  87. data/plugins/services/services_model.rb +9 -15
  88. data/plugins/services/services_renderer.rb +2 -2
  89. data/plugins/unmanaged_files/schema/system-description-unmanaged-files.schema-v6.json +162 -0
  90. data/plugins/unmanaged_files/unmanaged_files_inspector.rb +80 -30
  91. data/plugins/unmanaged_files/unmanaged_files_model.rb +22 -18
  92. data/plugins/unmanaged_files/unmanaged_files_renderer.rb +3 -3
  93. data/plugins/users/schema/system-description-users.schema-v6.json +86 -0
  94. data/schema/migrations/migrate5to6.rb +101 -0
  95. data/schema/system-description-global.schema-v6.json +43 -0
  96. metadata +24 -4
  97. data/html/assets/landing_page/landing_page.js +0 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 61f95235d9694179e1978bb89447ee9cda2edf8c
4
- data.tar.gz: 41f8b0796dbd7a589e4064913e0bd3aedd90c508
3
+ metadata.gz: 7d95072db7db89bc9881b0f130e31fc14a4cef78
4
+ data.tar.gz: 01accc4637d1dc9cbad915914eeca4a7ae4ccfa3
5
5
  SHA512:
6
- metadata.gz: 73e002b842608df16b0b6eecbde9d8471e94006b48ec1986179a7660e32c9b670d36573806f355fe01d0187dc0d975e31ac36ee44ad2bca18c7ea71488230d20
7
- data.tar.gz: cf4b647db694d47f6338b66c66819064f89be90e85c663dc0aa3f6731a7ff5958f52f26ea37fc30066a7ac2e6dc7d87d2e4a18d2b17a3d9332a4914970ae5b91
6
+ metadata.gz: 03b5e6b547a2dec55e3f72559db01c0cb3971c902ee622470d89f45d79f1984bdf4eb888f5210829cf848b695e41d93b8a80f3ef7efac68af91344f3c9764b63
7
+ data.tar.gz: 8cf84db6d3ba91a18c35ebbf6938caf2df4ae463b05af5420937e17ef4aa960f78b90ef457046c337317b677093936c7a35363db1a6cb08dca689c01000fa092
data/.git_revision CHANGED
@@ -1 +1 @@
1
- 493384074f90a69256c6fa174a1e1e05ae5ce219
1
+ 8bfc2e6ccf6d9ff87a018bd15002a20182fd6709
data/NEWS CHANGED
@@ -1,6 +1,16 @@
1
1
  # Machinery Release Notes
2
2
 
3
3
 
4
+ ## Version 1.17.0 - Mon Jan 25 16:49:58 CET 2016 - thardeck@suse.de
5
+
6
+ * Fix reset button in HTML view (gh#SUSE/machinery#1899)
7
+ * Align config-files scope in HTML view (gh#SUSE/machinery#1814)
8
+ * Allow closing file dialog (in WebUI) by pressing ESC
9
+ * Support inspection of Ubuntu 14.04 systems
10
+ * New `--ssh-identity-file` option to specify a SSH private key when inspecting
11
+ a remote system
12
+ * New `--ssh-port` option to specify an SSH port when inspecting a remote system
13
+
4
14
  ## Version 1.16.4 - Thu Jan 14 18:35:47 CET 2016 - thardeck@suse.de
5
15
 
6
16
  * The unmanaged-files scope filter will not include "/boot" by default anymore.
@@ -1,24 +1,25 @@
1
1
  {
2
2
  "inspect": [
3
- "/unmanaged_files/files/name=/etc/passwd",
4
- "/unmanaged_files/files/name=/etc/shadow",
5
- "/unmanaged_files/files/name=/etc/group",
6
- "/unmanaged_files/files/name=/tmp",
7
- "/unmanaged_files/files/name=/var/tmp",
8
- "/unmanaged_files/files/name=/lost+found",
9
- "/unmanaged_files/files/name=/var/run",
10
- "/unmanaged_files/files/name=/var/lock",
11
- "/unmanaged_files/files/name=/var/lib/rpm",
12
- "/unmanaged_files/files/name=/.snapshots",
13
- "/unmanaged_files/files/name=/proc",
14
- "/unmanaged_files/files/name=/etc/init.d/boot.d",
15
- "/unmanaged_files/files/name=/etc/init.d/rc0.d",
16
- "/unmanaged_files/files/name=/etc/init.d/rc1.d",
17
- "/unmanaged_files/files/name=/etc/init.d/rc2.d",
18
- "/unmanaged_files/files/name=/etc/init.d/rc3.d",
19
- "/unmanaged_files/files/name=/etc/init.d/rc4.d",
20
- "/unmanaged_files/files/name=/etc/init.d/rc5.d",
21
- "/unmanaged_files/files/name=/etc/init.d/rc6.d",
22
- "/unmanaged_files/files/name=/etc/init.d/rcS.d"
3
+ "/unmanaged_files/name=/etc/passwd",
4
+ "/unmanaged_files/name=/etc/shadow",
5
+ "/unmanaged_files/name=/etc/group",
6
+ "/unmanaged_files/name=/tmp",
7
+ "/unmanaged_files/name=/var/tmp",
8
+ "/unmanaged_files/name=/lost+found",
9
+ "/unmanaged_files/name=/var/run",
10
+ "/unmanaged_files/name=/var/lock",
11
+ "/unmanaged_files/name=/var/lib/rpm",
12
+ "/unmanaged_files/name=/.snapshots",
13
+ "/unmanaged_files/name=/proc",
14
+ "/unmanaged_files/name=/etc/init.d/boot.d",
15
+ "/unmanaged_files/name=/etc/init.d/rc0.d",
16
+ "/unmanaged_files/name=/etc/init.d/rc1.d",
17
+ "/unmanaged_files/name=/etc/init.d/rc2.d",
18
+ "/unmanaged_files/name=/etc/init.d/rc3.d",
19
+ "/unmanaged_files/name=/etc/init.d/rc4.d",
20
+ "/unmanaged_files/name=/etc/init.d/rc5.d",
21
+ "/unmanaged_files/name=/etc/init.d/rc6.d",
22
+ "/unmanaged_files/name=/etc/init.d/rcS.d",
23
+ "/unmanaged_files/name=/var/lib/dpkg"
23
24
  ]
24
25
  }
@@ -22,4 +22,8 @@ $(document).ready(function () {
22
22
  $(".dismiss").click(function(){
23
23
  $(this).closest(".scope").hide();
24
24
  });
25
+
26
+ $(".btn-reset").click(function(){
27
+ $("#filter").val("").change();
28
+ });
25
29
  })
data/html/index.html.haml CHANGED
@@ -19,7 +19,7 @@
19
19
  %body{ "data-description" => @description.name }
20
20
  - scopes = ["os", "packages", "patterns", "repositories", "users", "groups",
21
21
  "services", "config_files", "changed_managed_files", "unmanaged_files"]
22
- #file-modal.modal.fade
22
+ .modal.fade#file-modal{ "tabindex" => "-1" }
23
23
  .modal-dialog.modal-lg
24
24
  .modal-content
25
25
  .modal-header
@@ -2,7 +2,7 @@
2
2
  %div
3
3
  %a.scope_anchor{ id: "changed_managed_files" }
4
4
  .scope#changed_managed_files_container{ "data-scope" => "changed_managed_files" }
5
- - count = changed_managed_files.files.length
5
+ - count = changed_managed_files.length
6
6
  = render_partial "scope_header",
7
7
  :scope => "changed_managed_files",
8
8
  :title => "Changed Managed Files",
@@ -24,7 +24,7 @@
24
24
  %th.small User
25
25
  %th.small Group
26
26
  %tbody
27
- - changed_managed_files.files.each do |file|
27
+ - changed_managed_files.each do |file|
28
28
  %tr
29
29
  %td
30
30
  - if file.on_disk?
@@ -1,6 +1,6 @@
1
1
  %p
2
2
  <strong>Files extracted:</strong> #{list.extracted ? "yes" : "no"}
3
- - if list.files
3
+ - unless list.elements.empty?
4
4
  %table.table.table-striped.table-hover.table-condensed.files-table
5
5
  %thead
6
6
  %tr
@@ -12,7 +12,7 @@
12
12
  %th.small User
13
13
  %th.small Group
14
14
  %tbody
15
- - list.files.each do |file|
15
+ - list.each do |file|
16
16
  %tr
17
17
  %td= file.name
18
18
  %td= file.package_name
@@ -20,12 +20,12 @@
20
20
  .col-md-12
21
21
  .row
22
22
  .col-xs-6.table_container
23
- - if safe_length(@diff["changed_managed_files"].only_in1, :files) > 0
23
+ - if @diff["changed_managed_files"].only_in1
24
24
  = only_in_a
25
25
  = render_partial "compare/changed_managed_file_list",
26
26
  list: @diff["changed_managed_files"].only_in1
27
27
  .col-xs-6.table_container
28
- - if safe_length(@diff["changed_managed_files"].only_in2, :files) > 0
28
+ - if @diff["changed_managed_files"].only_in2
29
29
  = only_in_b
30
30
  = render_partial "compare/changed_managed_file_list",
31
31
  list: @diff["changed_managed_files"].only_in2
@@ -36,7 +36,7 @@
36
36
  = changed
37
37
  = render_partial "compare/changes", changes: changed_elements("changed_managed_files",
38
38
  key: "name")
39
- - if safe_length(@diff["changed_managed_files"].common, :files) > 0
39
+ - if @diff["changed_managed_files"].common
40
40
  %a.both_anchor{ id: "changed_managed_files_both" }
41
41
  .row
42
42
  .col-xs-12
@@ -1,6 +1,6 @@
1
1
  %p
2
2
  <strong>Files extracted:</strong> #{list.extracted ? "yes" : "no"}
3
- - if list.files
3
+ - unless list.elements.empty?
4
4
  %table.table.table-striped.table-hover.table-condensed.files-table
5
5
  %thead
6
6
  %tr
@@ -12,7 +12,7 @@
12
12
  %th.small User
13
13
  %th.small Group
14
14
  %tbody
15
- - list.files.each do |file|
15
+ - list.each do |file|
16
16
  %tr
17
17
  %td= file.name
18
18
  %td= file.package_name
@@ -20,11 +20,11 @@
20
20
  .col-md-12
21
21
  .row
22
22
  .col-xs-6.table_container
23
- - if safe_length(@diff["config_files"].only_in1, :files) > 0
23
+ - if @diff["config_files"].only_in1
24
24
  = only_in_a
25
25
  = render_partial "compare/config_file_list", list: @diff["config_files"].only_in1
26
26
  .col-xs-6.table_container
27
- - if safe_length(@diff["config_files"].only_in2, :files) > 0
27
+ - if @diff["config_files"].only_in2
28
28
  = only_in_b
29
29
  = render_partial "compare/config_file_list", list: @diff["config_files"].only_in2
30
30
  - if @diff["config_files"].changed
@@ -34,7 +34,7 @@
34
34
  = changed
35
35
  = render_partial "compare/changes", changes: changed_elements("config_files",
36
36
  key: "name")
37
- - if safe_length(@diff["config_files"].common, :files) > 0
37
+ - if @diff["config_files"].common
38
38
  %a.both_anchor{ id: "config_files_both" }
39
39
  .row
40
40
  .col-xs-12
@@ -12,10 +12,27 @@
12
12
  .col-xs-11
13
13
  %h2
14
14
  Packages
15
- = render_partial "compare/summary",
16
- scope: "packages",
17
- singular: "package",
18
- plural: "packages"
15
+ .scope-summary
16
+ - if @diff["packages"].only_in1 && @diff["packages"].only_in1.length > 0
17
+ %span.summary-part
18
+ #{@description_a.name}:
19
+ #{pluralize_scope(@diff["packages"].only_in1, "package", "packages")}
20
+ (#{@diff["packages"].only_in1.package_system})
21
+ - if @diff["packages"].only_in2 && @diff["packages"].only_in2.length > 0
22
+ %span.summary-part
23
+ #{@description_b.name}:
24
+ #{pluralize_scope(@diff["packages"].only_in2, "package", "packages")}
25
+ (#{@diff["packages"].only_in2.package_system})
26
+ - if @diff["packages"].changed && @diff["packages"].changed.length > 0
27
+ %span.summary-part
28
+ %a.show-changed-elements{ href: "#packages_changed" }
29
+ changed
30
+ = ": #{pluralize_scope(@diff["packages"].changed, "package", "packages")}"
31
+ - if @diff["packages"].common && @diff["packages"].common.length > 0
32
+ %span.summary-part
33
+ %a.show-common-elements{ href: "#packages_both" }<
34
+ both
35
+ = ": #{pluralize_scope(@diff["packages"].common, "package", "packages")}"
19
36
  .row.scope_content.collapse.in
20
37
  .col-md-12
21
38
  .row
@@ -22,20 +22,21 @@
22
22
  .col-md-6.table_container
23
23
  - if @diff["repositories"].only_in1
24
24
  = only_in_a
25
- = render_partial "compare/repository_list", list: @diff["repositories"].only_in1
25
+ - repo_system = @diff["repositories"].only_in1.repository_system
26
+ = render_partial "compare/repository_list_#{repo_system}",
27
+ list: @diff["repositories"].only_in1
26
28
  .col-md-6.table_container
27
29
  - if @diff["repositories"].only_in2
28
30
  = only_in_b
29
- = render_partial "compare/repository_list", list: @diff["repositories"].only_in2
31
+ - repo_system = @diff["repositories"].only_in2.repository_system
32
+ = render_partial "compare/repository_list_#{repo_system}",
33
+ list: @diff["repositories"].only_in2
30
34
  - if @diff["repositories"].changed
31
35
  %a.both_anchor{ id: "repositories_changed" }
32
36
  .row
33
37
  .col-md-12.table_container
34
38
  = changed
35
- = render_partial "compare/changes", changes: changed_elements("repositories",
36
- attributes: ["name", "url", "type", "enabled", "autorefresh", "gpgcheck",
37
- "priority"],
38
- key: "alias")
39
+ = render_partial "compare/changes", changes: repository_changes
39
40
  - if @diff["repositories"].common
40
41
  %a.both_anchor{ id: "repositories_both" }
41
42
  .row
@@ -47,4 +48,6 @@
47
48
  .row.scope_common_content.collapse
48
49
  .col-md-12.table_container
49
50
  = in_both
50
- = render_partial "compare/repository_list", list: @diff["repositories"].common
51
+ - repo_system = @diff["repositories"].common.repository_system
52
+ = render_partial "compare/repository_list_#{repo_system}",
53
+ list: @diff["repositories"].common
@@ -0,0 +1,15 @@
1
+ %table.table.table-striped.table-hover.table-condensed
2
+ %thead
3
+ %tr
4
+ %th.small Type
5
+ %th URL
6
+ %th Distribution
7
+ %th Components
8
+ %tbody
9
+ - list.each do |repo|
10
+ %tr
11
+ %td= repo.type
12
+ %td
13
+ %a{ href: repo.url }= repo.url
14
+ %td= repo.distribution
15
+ %td= repo.components.join(", ")
@@ -0,0 +1,35 @@
1
+ %table.table.table-striped.table-hover.table-condensed
2
+ %thead
3
+ %tr
4
+ %th Name
5
+ %th Alias
6
+ %th URL
7
+ %th Mirrorlist
8
+ %th.small Type
9
+ %th.small Enabled
10
+ %th.small.visible-lg GPG Check
11
+ %th.small.visible-lg GPG Keys
12
+ %th.tiny.hidden-lg
13
+ %tbody
14
+ - list.each do |repo|
15
+ %tr
16
+ %td= repo.name
17
+ %td= repo.alias
18
+ %td
19
+ - repo.url.each do |url|
20
+ %a{ href: url }= url
21
+ %br
22
+ %td
23
+ - unless repo.mirrorlist.empty?
24
+ %a{ href: repo.mirrorlist }= repo.mirrorlist
25
+ %td= repo.type
26
+ %td= repo.enabled
27
+ %td.visible-lg= repo.gpgcheck
28
+ %td.visble-lg
29
+ - repo.gpgkey.each do |url|
30
+ %a{ href: url }= url
31
+ %br
32
+ %td.hidden-lg{ title: "Name: #{repo.name}\nAlias: #{repo.alias}\nUrl: #{repo.url}\n" |
33
+ "Type: #{repo.type}\nEnabled: #{repo.enabled}\n" |
34
+ "GPG Check: #{repo.gpgcheck}" } |
35
+ | ...
@@ -4,7 +4,7 @@
4
4
  %th Name
5
5
  %th.medium State
6
6
  %tbody
7
- - list.services.each do |service|
7
+ - list.each do |service|
8
8
  %tr
9
9
  %td= service.name
10
10
  %td{ class: "#{list.init_system}_#{service.state}" }
@@ -37,11 +37,11 @@
37
37
  .col-md-12
38
38
  .row
39
39
  .col-md-6.table_container
40
- - if safe_length(@diff["services"].only_in1, :services) > 0
40
+ - if @diff["services"].only_in1
41
41
  = only_in_a
42
42
  = render_partial "compare/service_list", list: @diff["services"].only_in1
43
43
  .col-md-6.table_container
44
- - if safe_length(@diff["services"].only_in2, :services) > 0
44
+ - if @diff["services"].only_in2
45
45
  = only_in_b
46
46
  = render_partial "compare/service_list", list: @diff["services"].only_in2
47
47
  - if @diff["services"].changed
@@ -50,7 +50,7 @@
50
50
  .col-md-12.table_container
51
51
  = changed
52
52
  = render_partial "compare/changes", changes: changed_elements("services", key: "name")
53
- - if safe_length(@diff["services"].common, :services) > 0
53
+ - if @diff["services"].common
54
54
  %a.both_anchor{ id: "services_both" }
55
55
  .row
56
56
  .col-md-12
@@ -1,14 +1,14 @@
1
1
  - if !list.extracted.nil?
2
2
  %p
3
3
  <strong>Files extracted:</strong> #{list.extracted ? "yes" : "no"}
4
- - if list.files
4
+ - unless list.elements.empty?
5
5
  %table.table.table-striped.table-hover.table-condensed.files-table
6
6
  %thead
7
7
  %tr
8
8
  %th Name
9
9
  %th.small Type
10
10
  %tbody
11
- - list.files.each do |file|
11
+ - list.each do |file|
12
12
  %tr
13
13
  %td= file.name
14
14
  %td= file.type
@@ -51,7 +51,7 @@
51
51
  = changed
52
52
  = render_partial "compare/changes", changes: changed_elements("unmanaged_files",
53
53
  key: "name")
54
- - if safe_length(@diff["unmanaged_files"].common, :files) > 0
54
+ - if @diff["unmanaged_files"].common
55
55
  %a.both_anchor{ id: "unmanaged_files_both" }
56
56
  .row
57
57
  .col-md-12
@@ -2,7 +2,7 @@
2
2
  %div
3
3
  %a.scope_anchor{ id: "config_files" }
4
4
  .scope#config_files_container{ "data-scope" => "config_files" }
5
- - count = config_files.files.length
5
+ - count = config_files.length
6
6
  = render_partial "scope_header",
7
7
  :scope => "config_files",
8
8
  :title => "Config Files",
@@ -13,51 +13,49 @@
13
13
  - if count == 0
14
14
  There are no config files.
15
15
  - if count > 0
16
- - config_files.files.each do |file|
16
+ - config_files.each do |file|
17
17
  - if file.diff
18
18
  .diff{ style: "display: none", "data-config-file-diff" => file.diff.file }
19
19
  %span.diff-summary
20
20
  #{file.diff.additions} additions & #{file.diff.deletions} deletions
21
21
  %table.diff
22
22
  - file.diff.lines.each do |line|
23
- %tr{ class: line.type }
24
- %td.active.linenumber= line.original_line_number
25
- %td.linenumber= line.new_line_number
23
+ %tr{ class: line[:type] }
24
+ %td.active.linenumber= line[:original_line_number]
25
+ %td.linenumber= line[:new_line_number]
26
26
  %td
27
- = line.content
28
- .col-md-1
29
- .col-md-11
30
- %table.table.table-striped.table-hover.table-condensed.files-table.filterable
31
- %thead
27
+ = line[:content]
28
+ %table.table.table-striped.table-hover.table-condensed.files-table.filterable
29
+ %thead
30
+ %tr
31
+ %th Name
32
+ %th.medium Package Name
33
+ %th.medium Package Version
34
+ %th.medium Changes
35
+ %th.small Mode
36
+ %th.small User
37
+ %th.small Group
38
+ %tbody
39
+ - config_files.each do |file|
32
40
  %tr
33
- %th Name
34
- %th.medium Package Name
35
- %th.medium Package Version
36
- %th.medium Changes
37
- %th.small Mode
38
- %th.small User
39
- %th.small Group
40
- %tbody
41
- - config_files.files.each do |file|
42
- %tr
43
- %td
44
- %span
45
- - if file.on_disk?
46
- %a.file-download{ href: "#" }
47
- = file.name
48
- - else
49
- %span
50
- = file.name
51
- - if file.diff
52
- %a.diff-toggle{ "data-config-file" => file.name,
53
- "data-toggle" => "popover" }
54
- Show diff
55
- %td= file.package_name
56
- %td= file.package_version
57
- %td
58
- = file.changes.join(",")
59
- - if file.error_message
60
- %span{ title: file.error_message } (details)
61
- %td= file.mode
62
- %td= file.user
63
- %td= file.group
41
+ %td
42
+ %span
43
+ - if file.on_disk?
44
+ %a.file-download{ href: "#" }
45
+ = file.name
46
+ - else
47
+ %span
48
+ = file.name
49
+ - if file.diff
50
+ %a.diff-toggle{ "data-config-file" => file.name,
51
+ "data-toggle" => "popover" }
52
+ Show diff
53
+ %td= file.package_name
54
+ %td= file.package_version
55
+ %td
56
+ = file.changes.join(",")
57
+ - if file.error_message
58
+ %span{ title: file.error_message } (details)
59
+ %td= file.mode
60
+ %td= file.user
61
+ %td= file.group