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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 19148ad851542ec6f2b171ffcab79b0d06b81486
4
- data.tar.gz: ba8adee56e97a903430afd5afc57a2997191c721
3
+ metadata.gz: 87228d0f2d8ad38866a4ce59c3f10a54e2991ce6
4
+ data.tar.gz: 7f962d709d33e097a7fbc022be920951aa038351
5
5
  SHA512:
6
- metadata.gz: c40d861d81c6c2f1a3e35a83ea26cc8d0ed4fadd0c94e9cf3a83a3b38fe5b942be7e356a86c6e3368cb1457c4767a069056ead6fb42d10a2a9abd59a17992fc3
7
- data.tar.gz: 4c4e9ef61bac58ba3284368dbac84b81d43d50395a394bf523232b972c930e156a40c925478e364b087aa11f370648b643a5d3cd944c91a6c81d580a7a008227
6
+ metadata.gz: 49ab73f8072183dcb1275dc1902a50512c58f6e492799fb1893875bc28cae759a596029db17770985de808d471896efa3d13acbbc5c070e6b5e0fc487e267050
7
+ data.tar.gz: 5de36d69acd9c187e50d0d5707e3a12970937f31f94a4f83a3bb691a29237b5369e6d143fdf6d55f5845ac47afae05fc86c0b5a3dc56d4ae2e5aa658a6d05f5e
data/.git_revision CHANGED
@@ -1 +1 @@
1
- d0bee698f4e775076d7d4f619d68bb8e347444c5
1
+ cf6d038ddefdf0d539b132c206336e141c39b418
data/NEWS CHANGED
@@ -1,6 +1,18 @@
1
1
  # Machinery Release Notes
2
2
 
3
3
 
4
+ ## Version 1.21.0 - Tue Jun 21 16:28:31 CEST 2016 - thardeck@suse.de
5
+
6
+ * Add attribute in patterns scope to identify the patterns manager
7
+ * Improve navigation in HTML view to connect "list", "show" and "compare"
8
+ functionality
9
+ * Fix service inspector on systemd to include instanciated services
10
+ * Introduce format version 10 to allow distinction between files and directories
11
+ for meta data of unmanaged files.
12
+ This distinction is only available for newly inspected descriptions.
13
+ Additionally, an attribute in the patterns scope was added to identify the patterns manager.
14
+ https://github.com/SUSE/machinery/blob/master/docs/System-Description-Format.md#version-10
15
+
4
16
  ## Version 1.20.0 - Fri Apr 22 16:39:04 CEST 2016 - thardeck@suse.de
5
17
 
6
18
  * Added explanation for 'N/A' fields for each scope (gh#SUSE/machinery#1904)
@@ -0,0 +1,338 @@
1
+ /* ========================================================================
2
+ * Bootstrap: modal.js v3.3.6
3
+ * http://getbootstrap.com/javascript/#modals
4
+ * ========================================================================
5
+ * Copyright 2011-2015 Twitter, Inc.
6
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7
+ * ======================================================================== */
8
+
9
+
10
+ +function ($) {
11
+ 'use strict';
12
+
13
+ // MODAL CLASS DEFINITION
14
+ // ======================
15
+
16
+ var Modal = function (element, options) {
17
+ this.options = options
18
+ this.$body = $(document.body)
19
+ this.$element = $(element)
20
+ this.$dialog = this.$element.find('.modal-dialog')
21
+ this.$backdrop = null
22
+ this.isShown = null
23
+ this.originalBodyPad = null
24
+ this.scrollbarWidth = 0
25
+ this.ignoreBackdropClick = false
26
+
27
+ if (this.options.remote) {
28
+ this.$element
29
+ .find('.modal-content')
30
+ .load(this.options.remote, $.proxy(function () {
31
+ this.$element.trigger('loaded.bs.modal')
32
+ }, this))
33
+ }
34
+ }
35
+
36
+ Modal.VERSION = '3.3.6'
37
+
38
+ Modal.TRANSITION_DURATION = 300
39
+ Modal.BACKDROP_TRANSITION_DURATION = 150
40
+
41
+ Modal.DEFAULTS = {
42
+ backdrop: true,
43
+ keyboard: true,
44
+ show: true
45
+ }
46
+
47
+ Modal.prototype.toggle = function (_relatedTarget) {
48
+ return this.isShown ? this.hide() : this.show(_relatedTarget)
49
+ }
50
+
51
+ Modal.prototype.show = function (_relatedTarget) {
52
+ var that = this
53
+ var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
54
+
55
+ this.$element.trigger(e)
56
+
57
+ if (this.isShown || e.isDefaultPrevented()) return
58
+
59
+ this.isShown = true
60
+
61
+ this.checkScrollbar()
62
+ this.setScrollbar()
63
+ this.$body.addClass('modal-open')
64
+
65
+ this.escape()
66
+ this.resize()
67
+
68
+ this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
69
+
70
+ this.$dialog.on('mousedown.dismiss.bs.modal', function () {
71
+ that.$element.one('mouseup.dismiss.bs.modal', function (e) {
72
+ if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true
73
+ })
74
+ })
75
+
76
+ this.backdrop(function () {
77
+ var transition = $.support.transition && that.$element.hasClass('fade')
78
+
79
+ if (!that.$element.parent().length) {
80
+ that.$element.appendTo(that.$body) // don't move modals dom position
81
+ }
82
+
83
+ that.$element
84
+ .show()
85
+ .scrollTop(0)
86
+
87
+ that.adjustDialog()
88
+
89
+ if (transition) {
90
+ that.$element[0].offsetWidth // force reflow
91
+ }
92
+
93
+ that.$element.addClass('in')
94
+
95
+ that.enforceFocus()
96
+
97
+ var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
98
+
99
+ transition ?
100
+ that.$dialog // wait for modal to slide in
101
+ .one('bsTransitionEnd', function () {
102
+ that.$element.trigger('focus').trigger(e)
103
+ })
104
+ .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
105
+ that.$element.trigger('focus').trigger(e)
106
+ })
107
+ }
108
+
109
+ Modal.prototype.hide = function (e) {
110
+ if (e) e.preventDefault()
111
+
112
+ e = $.Event('hide.bs.modal')
113
+
114
+ this.$element.trigger(e)
115
+
116
+ if (!this.isShown || e.isDefaultPrevented()) return
117
+
118
+ this.isShown = false
119
+
120
+ this.escape()
121
+ this.resize()
122
+
123
+ $(document).off('focusin.bs.modal')
124
+
125
+ this.$element
126
+ .removeClass('in')
127
+ .off('click.dismiss.bs.modal')
128
+ .off('mouseup.dismiss.bs.modal')
129
+
130
+ this.$dialog.off('mousedown.dismiss.bs.modal')
131
+
132
+ $.support.transition && this.$element.hasClass('fade') ?
133
+ this.$element
134
+ .one('bsTransitionEnd', $.proxy(this.hideModal, this))
135
+ .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
136
+ this.hideModal()
137
+ }
138
+
139
+ Modal.prototype.enforceFocus = function () {
140
+ $(document)
141
+ .off('focusin.bs.modal') // guard against infinite focus loop
142
+ .on('focusin.bs.modal', $.proxy(function (e) {
143
+ if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
144
+ this.$element.trigger('focus')
145
+ }
146
+ }, this))
147
+ }
148
+
149
+ Modal.prototype.escape = function () {
150
+ if (this.isShown && this.options.keyboard) {
151
+ this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {
152
+ e.which == 27 && this.hide()
153
+ }, this))
154
+ } else if (!this.isShown) {
155
+ this.$element.off('keydown.dismiss.bs.modal')
156
+ }
157
+ }
158
+
159
+ Modal.prototype.resize = function () {
160
+ if (this.isShown) {
161
+ $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
162
+ } else {
163
+ $(window).off('resize.bs.modal')
164
+ }
165
+ }
166
+
167
+ Modal.prototype.hideModal = function () {
168
+ var that = this
169
+ this.$element.hide()
170
+ this.backdrop(function () {
171
+ that.$body.removeClass('modal-open')
172
+ that.resetAdjustments()
173
+ that.resetScrollbar()
174
+ that.$element.trigger('hidden.bs.modal')
175
+ })
176
+ }
177
+
178
+ Modal.prototype.removeBackdrop = function () {
179
+ this.$backdrop && this.$backdrop.remove()
180
+ this.$backdrop = null
181
+ }
182
+
183
+ Modal.prototype.backdrop = function (callback) {
184
+ var that = this
185
+ var animate = this.$element.hasClass('fade') ? 'fade' : ''
186
+
187
+ if (this.isShown && this.options.backdrop) {
188
+ var doAnimate = $.support.transition && animate
189
+
190
+ this.$backdrop = $(document.createElement('div'))
191
+ .addClass('modal-backdrop ' + animate)
192
+ .appendTo(this.$body)
193
+
194
+ this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
195
+ if (this.ignoreBackdropClick) {
196
+ this.ignoreBackdropClick = false
197
+ return
198
+ }
199
+ if (e.target !== e.currentTarget) return
200
+ this.options.backdrop == 'static'
201
+ ? this.$element[0].focus()
202
+ : this.hide()
203
+ }, this))
204
+
205
+ if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
206
+
207
+ this.$backdrop.addClass('in')
208
+
209
+ if (!callback) return
210
+
211
+ doAnimate ?
212
+ this.$backdrop
213
+ .one('bsTransitionEnd', callback)
214
+ .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
215
+ callback()
216
+
217
+ } else if (!this.isShown && this.$backdrop) {
218
+ this.$backdrop.removeClass('in')
219
+
220
+ var callbackRemove = function () {
221
+ that.removeBackdrop()
222
+ callback && callback()
223
+ }
224
+ $.support.transition && this.$element.hasClass('fade') ?
225
+ this.$backdrop
226
+ .one('bsTransitionEnd', callbackRemove)
227
+ .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
228
+ callbackRemove()
229
+
230
+ } else if (callback) {
231
+ callback()
232
+ }
233
+ }
234
+
235
+ // these following methods are used to handle overflowing modals
236
+
237
+ Modal.prototype.handleUpdate = function () {
238
+ this.adjustDialog()
239
+ }
240
+
241
+ Modal.prototype.adjustDialog = function () {
242
+ var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
243
+
244
+ this.$element.css({
245
+ paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
246
+ paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
247
+ })
248
+ }
249
+
250
+ Modal.prototype.resetAdjustments = function () {
251
+ this.$element.css({
252
+ paddingLeft: '',
253
+ paddingRight: ''
254
+ })
255
+ }
256
+
257
+ Modal.prototype.checkScrollbar = function () {
258
+ var fullWindowWidth = window.innerWidth
259
+ if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8
260
+ var documentElementRect = document.documentElement.getBoundingClientRect()
261
+ fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)
262
+ }
263
+ this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth
264
+ this.scrollbarWidth = this.measureScrollbar()
265
+ }
266
+
267
+ Modal.prototype.setScrollbar = function () {
268
+ var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
269
+ this.originalBodyPad = document.body.style.paddingRight || ''
270
+ if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
271
+ }
272
+
273
+ Modal.prototype.resetScrollbar = function () {
274
+ this.$body.css('padding-right', this.originalBodyPad)
275
+ }
276
+
277
+ Modal.prototype.measureScrollbar = function () { // thx walsh
278
+ var scrollDiv = document.createElement('div')
279
+ scrollDiv.className = 'modal-scrollbar-measure'
280
+ this.$body.append(scrollDiv)
281
+ var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
282
+ this.$body[0].removeChild(scrollDiv)
283
+ return scrollbarWidth
284
+ }
285
+
286
+
287
+ // MODAL PLUGIN DEFINITION
288
+ // =======================
289
+
290
+ function Plugin(option, _relatedTarget) {
291
+ return this.each(function () {
292
+ var $this = $(this)
293
+ var data = $this.data('bs.modal')
294
+ var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
295
+
296
+ if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
297
+ if (typeof option == 'string') data[option](_relatedTarget)
298
+ else if (options.show) data.show(_relatedTarget)
299
+ })
300
+ }
301
+
302
+ var old = $.fn.modal
303
+
304
+ $.fn.modal = Plugin
305
+ $.fn.modal.Constructor = Modal
306
+
307
+
308
+ // MODAL NO CONFLICT
309
+ // =================
310
+
311
+ $.fn.modal.noConflict = function () {
312
+ $.fn.modal = old
313
+ return this
314
+ }
315
+
316
+
317
+ // MODAL DATA-API
318
+ // ==============
319
+
320
+ $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
321
+ var $this = $(this)
322
+ var href = $this.attr('href')
323
+ var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7
324
+ var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
325
+
326
+ if ($this.is('a')) e.preventDefault()
327
+
328
+ $target.one('show.bs.modal', function (showEvent) {
329
+ if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
330
+ $target.one('hidden.bs.modal', function () {
331
+ $this.is(':visible') && $this.trigger('focus')
332
+ })
333
+ })
334
+ Plugin.call($target, option, this)
335
+ })
336
+
337
+ }(jQuery);
338
+
@@ -118,3 +118,18 @@ $(document).ready(function () {
118
118
  });
119
119
  highlightCurrentScope();
120
120
  });
121
+
122
+ $(document).on("click", ".open-description-selector", function () {
123
+ if ($(this).hasClass("show")) {
124
+ descriptionName = $(".description-name:last").val();
125
+ $(".description-selector-action").text("compare with description \"" + descriptionName + "\".");
126
+ $("a.show-description").show();
127
+ $("a.compare-description").hide();
128
+ }else{
129
+ descriptionName = $(".description-name:first").val();
130
+ $(".description-selector-action").text("compare with description \"" + descriptionName + "\".");
131
+ $("a.show-description").hide();
132
+ $("a.compare-description").show();
133
+ }
134
+ });
135
+
@@ -2377,8 +2377,8 @@ input[type="button"].btn-block {
2377
2377
  }
2378
2378
  @font-face {
2379
2379
  font-family: 'Glyphicons Halflings';
2380
- src: url('../app/fonts/glyphicons-halflings-regular.eot');
2381
- src: url('../app/fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../app/fonts/glyphicons-halflings-regular.woff') format('woff'), url('../app/fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../app/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
2380
+ src: url('../fonts/glyphicons-halflings-regular.eot');
2381
+ src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
2382
2382
  }
2383
2383
  .glyphicon {
2384
2384
  position: relative;
@@ -2991,6 +2991,9 @@ input[type="button"].btn-block {
2991
2991
  .glyphicon-tree-deciduous:before {
2992
2992
  content: "\e200";
2993
2993
  }
2994
+ .glyphicon-option-horizontal:before {
2995
+ content: "\e234";
2996
+ }
2994
2997
  .caret {
2995
2998
  display: inline-block;
2996
2999
  width: 0;
@@ -23,7 +23,22 @@ $(document).ready(function () {
23
23
  $(this).closest(".scope").hide();
24
24
  });
25
25
 
26
- $(".btn-reset").click(function(){
26
+ $(".reset-filter").click(function(){
27
27
  $("#filter").val("").change();
28
28
  });
29
+ $(".reset-descriptions-filter").click(function(){
30
+ $("#descriptions-filter").val("").change();
31
+ });
29
32
  })
33
+
34
+ $(window).load(function(){
35
+ if (window.location.pathname == "/") {
36
+ descriptionSelector = $('#description-selector')
37
+ descriptionSelector.modal({backdrop: 'static', keyboard: false});
38
+ descriptionSelector.find("button[data-dismiss='modal']").hide();
39
+ }
40
+ });
41
+
42
+ $(document).on("click", ".description-name", function () {
43
+ $(this).parent().find(".open-description-selector").trigger("click");
44
+ });
@@ -12,6 +12,7 @@ body {
12
12
  padding-left: 15px;
13
13
  border-bottom-style: solid;
14
14
  border-bottom-width: 1px;
15
+ padding-top: 20px;
15
16
  }
16
17
 
17
18
  #nav-bar a:hover {
@@ -256,3 +257,43 @@ h1 {
256
257
  min-width: 32px;
257
258
  min-height: 32px;
258
259
  }
260
+
261
+ .modal-dialog.large {
262
+ width: 90%; /* respsonsive width */
263
+ }
264
+
265
+ .description-name {
266
+ font-size: 2em ;
267
+ box-sizing: border-box ;
268
+ -webkit-box-sizing: border-box ;
269
+ -moz-box-sizing: border-box ;
270
+ outline: none ;
271
+ display: block ;
272
+ width: 100% ;
273
+ padding: 7px ;
274
+ border: none ;
275
+ background: transparent ;
276
+ border-radius: 0 ;
277
+ border-bottom: 1px solid #7f694f;
278
+ height: 45px;
279
+ }
280
+
281
+ .missing {
282
+ font-style: italic;
283
+ font-size: 1.2em !important;
284
+ }
285
+
286
+ .description-selector-action {
287
+ font-style: bold !important;
288
+ }
289
+
290
+ #filter {
291
+ height: 31px !important;
292
+ }
293
+
294
+ .reset-filter {
295
+ height: 31px !important;
296
+ }
297
+ .toolbar {
298
+ margin-top: 5px;
299
+ }