Skip to content

Commit

Permalink
Use the new proxy controller
Browse files Browse the repository at this point in the history
This will allow all the menus to work from outside a firewall, even if
paddles is behind one and pulpito is not.
  • Loading branch information
zmc committed Apr 21, 2014
1 parent 1b21f98 commit d28d3b6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
10 changes: 3 additions & 7 deletions public/js/main.js
@@ -1,7 +1,3 @@
function set_paddles_address(address) {
window.paddles_address = address;
}

function set_filters(filters) {
window.filters = filters;
}
Expand Down Expand Up @@ -57,7 +53,7 @@ function unstack_filter(name) {


function set_machine_types() {
$.getJSON(window.paddles_address + '/runs/machine_type/', function(machine_types) {
$.getJSON('/_paddles/machine_types/', function(machine_types) {
populate_machine_type_menus(machine_types);
});
}
Expand Down Expand Up @@ -87,7 +83,7 @@ function populate_machine_type_menus(machine_types) {
}

function set_suites() {
$.getJSON(paddles_address + '/runs/suite/', function(suite_names) {
$.getJSON('/_paddles/suites/', function(suite_names) {
populate_suite_menus(suite_names);
});
}
Expand Down Expand Up @@ -197,7 +193,7 @@ $( document ).ready(function() {

$('#search-branches').typeahead({
name: 'branches',
prefetch: paddles_address + '/runs/branch/',
prefetch: '/_paddles/branches/',
ttl: 30000,
});

Expand Down
1 change: 0 additions & 1 deletion pulpito/app.py
Expand Up @@ -12,6 +12,5 @@ def setup_app(config):
return make_app(
app_conf.pop('root'),
logging=getattr(config, 'logging', {}),
extra_template_vars=dict(paddles_address=conf.paddles_address),
**app_conf
)
1 change: 0 additions & 1 deletion pulpito/templates/layout.html
Expand Up @@ -16,7 +16,6 @@
<script type="text/javascript" src="/js/typeahead.min.js"></script>
<script type="text/javascript" src="/js/main.js"></script>
<script type="text/javascript">
set_paddles_address("{{ paddles_address }}");
var filters = JSON.parse('{{ filters|tojson|safe if filters else {}|tojson }}');
set_filters(filters);
</script>
Expand Down

0 comments on commit d28d3b6

Please sign in to comment.