summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorMonty Taylor <mordred@inaugust.com>2018-02-17 13:29:28 -0600
committerMonty Taylor <mordred@inaugust.com>2018-02-19 09:27:31 -0600
commit9010dc50f41145ebdf7f65dfc71fc35f0223c20d (patch)
tree05da9c47fff96baa10fb7b4a591f6433bbee96e4 /etc
parent477cd21c9733dfff99702d730e2daf658a98b1cd (diff)
downloadzuul-9010dc50f41145ebdf7f65dfc71fc35f0223c20d.tar.gz
Remove .json suffix from web routes
For the existing simple cases, like builds, jobs and status, having the json suffix is a perfectly reasonable thing. However, in the next patch it starts to get weird. When we add support for specific changes or specific jobs, we we grow URLs like: /openstack/status.json /openstack/status/change/537010,2.json Those read weird, because change/537010,2 is much more like an argument or specialiation of status. The thing that reads weird is the status call having .json but the change-specific call just being status/, not the trailing .json on the change url. Removing the json suffix gets us: /openstack/status /openstack/status/change/537010,2 which feels better as the status portion of the url remains consistent. This is done first in the stack so that as we add tests for new endpoints we can get them right the first time rather than having a big rename patch at the end (which is what this started as) Change-Id: I4baf33fdacaf46943fbd192743551bb27bd618de
Diffstat (limited to 'etc')
-rw-r--r--etc/status/public_html/jquery.zuul.js2
-rw-r--r--etc/status/public_html/zuul.app.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/etc/status/public_html/jquery.zuul.js b/etc/status/public_html/jquery.zuul.js
index 50dbed510..ac8a30281 100644
--- a/etc/status/public_html/jquery.zuul.js
+++ b/etc/status/public_html/jquery.zuul.js
@@ -49,7 +49,7 @@
options = $.extend({
'enabled': true,
'graphite_url': '',
- 'source': 'status.json',
+ 'source': 'status',
'msg_id': '#zuul_msg',
'pipelines_id': '#zuul_pipelines',
'queue_events_num': '#zuul_queue_events_num',
diff --git a/etc/status/public_html/zuul.app.js b/etc/status/public_html/zuul.app.js
index bf90a4db7..6e35eb344 100644
--- a/etc/status/public_html/zuul.app.js
+++ b/etc/status/public_html/zuul.app.js
@@ -55,7 +55,7 @@ function zuul_start($) {
var demo = location.search.match(/[?&]demo=([^?&]*)/),
source_url = location.search.match(/[?&]source_url=([^?&]*)/),
source = demo ? './status-' + (demo[1] || 'basic') + '.json-sample' :
- 'status.json';
+ 'status';
source = source_url ? source_url[1] : source;
var zuul = $.zuul({