chef-server-webui 0.10.0.beta.6 → 0.10.0.beta.7
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.
@@ -203,7 +203,7 @@ class Environments < Application
|
|
203
203
|
end
|
204
204
|
|
205
205
|
def process_params(name=params[:name])
|
206
|
-
{:name => name, :description => params[:description], :
|
206
|
+
{:name => name, :description => params[:description], :default_attributes => params[:default_attributes], :override_attributes => params[:override_attributes], :cookbook_version => search_params_for_cookbook_version_constraints}
|
207
207
|
end
|
208
208
|
|
209
209
|
def search_params_for_cookbook_version_constraints
|
@@ -121,10 +121,10 @@ class OpenidConsumer < Application
|
|
121
121
|
|
122
122
|
private
|
123
123
|
def is_authorized_openid_provider?(openid, authorized_providers)
|
124
|
-
Chef::Log.debug("
|
124
|
+
Chef::Log.debug("Checking for valid openid provider: openid: #{openid}, authorized providers: #{authorized_providers}")
|
125
125
|
if authorized_providers and openid
|
126
126
|
if authorized_providers.length > 0
|
127
|
-
authorized_providers.detect { |p| Chef::Log.debug("
|
127
|
+
authorized_providers.detect { |p| Chef::Log.debug("Openid: #{openid} (#{openid.class}), p: #{p} (#{p.class})"); openid.match(p) }
|
128
128
|
else
|
129
129
|
true
|
130
130
|
end
|
@@ -134,10 +134,10 @@ class OpenidConsumer < Application
|
|
134
134
|
end
|
135
135
|
|
136
136
|
def is_authorized_openid_identifier?(openid, authorized_identifiers)
|
137
|
-
Chef::Log.debug("
|
137
|
+
Chef::Log.debug("Checking for valid openid identifier: openid: #{openid}, authorized openids: #{authorized_identifiers}")
|
138
138
|
if authorized_identifiers and openid
|
139
139
|
if authorized_identifiers.length > 0
|
140
|
-
authorized_identifiers.detect { |p| Chef::Log.debug("
|
140
|
+
authorized_identifiers.detect { |p| Chef::Log.debug("Openid: #{openid} (#{openid.class}), p: #{p} (#{p.class})"); openid == p }
|
141
141
|
else
|
142
142
|
true
|
143
143
|
end
|
@@ -53,7 +53,7 @@
|
|
53
53
|
</td>
|
54
54
|
<td>
|
55
55
|
<input id="cookbook_version_0000"
|
56
|
-
class="text" name="cookbook_version_selector"
|
56
|
+
class="text" name="cookbook_version_selector"
|
57
57
|
onfocus="clearVersionBox(this, '0000')"
|
58
58
|
onblur="validateVersionBoxValue(this, '0000')"
|
59
59
|
value="0.0.0">
|
@@ -68,8 +68,8 @@
|
|
68
68
|
</div>
|
69
69
|
|
70
70
|
<div class="group form attrEditor">
|
71
|
-
<label class="label">Environment Attributes</label>
|
72
|
-
<%= partial 'layout/jsonedit', :json =>
|
71
|
+
<label class="label">Environment Default and Override Attributes</label>
|
72
|
+
<%= partial 'layout/jsonedit', :json => { :defaults => @environment.default_attributes, :overrides => @environment.override_attributes }.to_json%>
|
73
73
|
<span class="description">
|
74
74
|
A JSON hash for attributes of this environment. These attributes will be applied according to the attribute precedence rules.
|
75
75
|
</span>
|
@@ -26,6 +26,11 @@
|
|
26
26
|
%tr
|
27
27
|
%td= name
|
28
28
|
%td= versions
|
29
|
-
|
30
|
-
|
31
|
-
|
29
|
+
|
30
|
+
.left
|
31
|
+
%h3 Default Attributes
|
32
|
+
= build_tree('defattrs', @environment.default_attributes)
|
33
|
+
|
34
|
+
.left
|
35
|
+
%h3 Override Attributes
|
36
|
+
= build_tree('overattrs', @environment.override_attributes)
|
data/public/javascripts/chef.js
CHANGED
@@ -53,9 +53,7 @@ $(document).ready(function(){
|
|
53
53
|
});
|
54
54
|
|
55
55
|
$('form#edit_environment, form#create_environment').submit(function(event) {
|
56
|
-
|
57
|
-
form.append('<input type="hidden" id="attributes" name="attributes"/>');
|
58
|
-
$('input#attributes').attr('value', BCJTEP.save('json'))
|
56
|
+
buildHiddenFormFromJSONEditor($(this));
|
59
57
|
});
|
60
58
|
|
61
59
|
$('form#edit_node, form#create_node').submit(function(event) {
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: chef-server-webui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease: 7
|
5
|
-
version: 0.10.0.beta.
|
5
|
+
version: 0.10.0.beta.7
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Opscode
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-04-
|
13
|
+
date: 2011-04-06 00:00:00 -07:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|