On 09/22/2010 04:39 PM, Jacob Helwig wrote:
> On Wed, 22 Sep 2010 16:36:32 -0700, Igal Koshevoy wrote:
>> Date: Wed, 22 Sep 2010 16:36:32 -0700
>> From: Igal Koshevoy <[email protected]>
>> To: [email protected]
>> Subject: [Puppet-dev] [PATCH/puppet-dashboard 1/1] (#4811) Fix raw URLs,
>>  which
>>  break when web app is mounted in a subpath.
>> X-Mailer: git-send-email 1.7.2.3
>> Message-Id: <[email protected]>
>>
>>> Published to 
>>> http://github.com/igal/puppet-dashboard/commits/bug/v1.0.4rc1/4811-fix_raw_links
>> By default, the app runs without a subpath, so that the homepage is at "/"
>> and nodes are at "/nodes". However, some users need to mount the app under
>> a subpath so that, for example, the homepage is at "/dashboard/" and the
>> nodes are at "/dashboard/nodes".
>>
>> For this to work, the application must use relative or generated URLs
>> whenever it's referring to itself.
>>
>> Signed-off-by: Igal Koshevoy <[email protected]>
>> ---
>>  app/views/node_groups/_form.html.haml |    4 ++--
>>  app/views/nodes/_form.html.haml       |    4 ++--
>>  2 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/app/views/node_groups/_form.html.haml 
>> b/app/views/node_groups/_form.html.haml
>> index 68e1175..f7add8e 100644
>> --- a/app/views/node_groups/_form.html.haml
>> +++ b/app/views/node_groups/_form.html.haml
>> @@ -33,6 +33,6 @@
>>      = label_tag 'Groups'
>>      = text_field_tag 'node_group[node_group_ids][]', '', :id => 
>> 'node_group_ids'
>>  
>> -  - class_data = {:class => '#node_class_ids', :data_source => 
>> '/node_classes.json', :objects => form.object.node_classes}
>> -  - group_data = {:class => '#node_group_ids', :data_source => 
>> '/node_groups.json',  :objects => form.object.node_groups}
>> +  - class_data = {:class => '#node_class_ids', :data_source => 
>> node_classes_path(:format => :json), :objects => form.object.node_classes}
>> +  - group_data = {:class => '#node_group_ids', :data_source => 
>> node_groups_path(:format => :json),  :objects => form.object.node_groups}
>>    %script#tokenizer{:type => "text/javascript"}= 
>> tokenize_input_class(class_data, group_data)
>> diff --git a/app/views/nodes/_form.html.haml 
>> b/app/views/nodes/_form.html.haml
>> index 8194708..dbdf371 100644
>> --- a/app/views/nodes/_form.html.haml
>> +++ b/app/views/nodes/_form.html.haml
>> @@ -34,6 +34,6 @@
>>      = label_tag 'Groups'
>>      = text_field_tag 'node[node_group_ids][]', '', :id => 'node_group_ids'
>>  
>> -  - class_data = {:class => '#node_class_ids', :data_source => 
>> '/node_classes.json', :objects => form.object.node_classes}
>> -  - group_data = {:class => '#node_group_ids', :data_source => 
>> '/node_groups.json',  :objects => form.object.node_groups}
>> +  - class_data = {:class => '#node_class_ids', :data_source => 
>> node_classes_path(:format => :json), :objects => form.object.node_classes}
>> +  - group_data = {:class => '#node_group_ids', :data_source => 
>> node_groups_path(:format => :json),  :objects => form.object.node_groups}
>>    %script#tokenizer{:type => "text/javascript"}= 
>> tokenize_input_class(class_data, group_data)
>> -- 
>> 1.7.2.3
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Puppet Developers" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to 
>> [email protected].
>> For more options, visit this group at 
>> http://groups.google.com/group/puppet-dev?hl=en.
>>
> +1, reviewed, and tested.
Thanks!

> Though the "> Published to ..." really should go below the "---", so it
> doesn't become part of the commit message, if the patch is pulled down
> from the mailing list. ;-)
Thanks for the critique, I'll do that next time.

-igal

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to