> 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.
