foreman_chef 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/images/Chef.png +0 -0
- data/app/assets/javascripts/foreman_chef/chef_proxy_environment_refresh.js +1 -1
- data/app/assets/javascripts/foreman_chef/chef_tab.js +55 -0
- data/app/assets/javascripts/jsoneditor.js +7854 -0
- data/app/assets/javascripts/jsoneditor.js.map +106 -0
- data/app/controllers/foreman_chef/concerns/hosts_controller_rescuer.rb +10 -0
- data/app/helpers/foreman_chef/chef_proxy_form.rb +20 -1
- data/app/lib/actions/foreman_chef/host/create.rb +9 -7
- data/app/lib/actions/foreman_chef/host/destroy.rb +4 -0
- data/app/lib/actions/foreman_chef/host/update.rb +38 -0
- data/app/lib/actions/foreman_chef/node/update.rb +43 -0
- data/app/lib/proxy_api/foreman_chef/chef_proxy.rb +9 -1
- data/app/models/foreman_chef/cached_run_list.rb +84 -0
- data/app/models/foreman_chef/concerns/host_action_subject.rb +5 -0
- data/app/models/foreman_chef/concerns/host_build.rb +12 -1
- data/app/models/foreman_chef/concerns/host_extensions.rb +69 -5
- data/app/models/foreman_chef/concerns/renderer.rb +1 -1
- data/app/models/foreman_chef/concerns/smart_proxy_extensions.rb +7 -0
- data/app/models/foreman_chef/fact_name.rb +3 -0
- data/app/models/foreman_chef/fact_parser.rb +2 -2
- data/app/overrides/add_chef_tab.rb +10 -0
- data/app/services/foreman_chef/object_does_not_exist_exception.rb +4 -0
- data/app/views/foreman/unattended/snippets/_chef_client_bootstrap.erb +11 -9
- data/app/views/foreman_chef/hosts/_chef_tab.html.erb +17 -0
- data/db/migrate/20160324151437_create_foreman_chef_cached_run_list.rb +8 -0
- data/lib/foreman_chef/engine.rb +5 -9
- data/lib/foreman_chef/version.rb +1 -1
- metadata +13 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6863a76993aff7c6f9b34002ca50c587d3f7fda5
|
4
|
+
data.tar.gz: da0e7a51878d742da190c81414e3831e101e39c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8bcb00006c80f6acd13306d20876ec99285cb8e63f40a0c1d85a421ae62d47d935104a2fef64ee418032d9f7b66cb3d73fa9c53fa185f63f26da38bd7a8c1448
|
7
|
+
data.tar.gz: 8d04635646c999d410cbe2fc431eb96eccdfa1425955838b8408d620df0c641f194ed9c35aced194823335996d0fbabe85e24e99eb2aa0d938f656747d1842fc
|
Binary file
|
@@ -0,0 +1,55 @@
|
|
1
|
+
$(document).on('ContentLoad', function () {
|
2
|
+
JSONEditor.defaults.themes.foreman = JSONEditor.defaults.themes.bootstrap2.extend({
|
3
|
+
getIndentedPanel: function () {
|
4
|
+
var el = document.createElement('div');
|
5
|
+
return el;
|
6
|
+
},
|
7
|
+
getSelectInput: function(options) {
|
8
|
+
var input = this._super(options);
|
9
|
+
input.style.maxWidth = '100%';
|
10
|
+
input.style.width = '80px';
|
11
|
+
return input;
|
12
|
+
}
|
13
|
+
});
|
14
|
+
JSONEditor.defaults.options.theme = 'foreman';
|
15
|
+
JSONEditor.defaults.options.iconlib = 'fontawesome4';
|
16
|
+
|
17
|
+
var runlist_schema = {
|
18
|
+
"type": "array",
|
19
|
+
"title": "Node run list",
|
20
|
+
"format": "table",
|
21
|
+
"items": {
|
22
|
+
"type": "object",
|
23
|
+
"properties": {
|
24
|
+
"type": {
|
25
|
+
"type": "string",
|
26
|
+
"enum": [
|
27
|
+
"role",
|
28
|
+
"recipe"
|
29
|
+
],
|
30
|
+
"default": "role"
|
31
|
+
},
|
32
|
+
"name": {
|
33
|
+
"type": "string"
|
34
|
+
}
|
35
|
+
}
|
36
|
+
},
|
37
|
+
"default": $("#runlist-editor").data('default')
|
38
|
+
};
|
39
|
+
|
40
|
+
// runlist-editor does not exist after host submit (AJAX) redirection to show page or partial
|
41
|
+
// host form refresh
|
42
|
+
if ($("#runlist-editor").length) {
|
43
|
+
var runlist_editor = new JSONEditor($("#runlist-editor")[0], {
|
44
|
+
schema: runlist_schema,
|
45
|
+
disable_properties: true,
|
46
|
+
disable_collapse: true,
|
47
|
+
no_additional_properties: true,
|
48
|
+
form_name_root: 'host[run_list]'
|
49
|
+
});
|
50
|
+
}
|
51
|
+
|
52
|
+
$('a.refresh_run_list').bind('click', function () {
|
53
|
+
runlist_editor.setValue($(".refresh_run_list").data('runList'))
|
54
|
+
});
|
55
|
+
});
|