Merge lp:~octplane/graphite/url_management into lp:~graphite-dev/graphite/main

Proposed by Pierre Baillet
Status: Work in progress
Proposed branch: lp:~octplane/graphite/url_management
Merge into: lp:~graphite-dev/graphite/main
Diff against target: 658 lines (+145/-93)
18 files modified
webapp/content/css/dashboard.css (+8/-8)
webapp/content/js/composer_widgets.js (+2/-2)
webapp/content/js/dashboard.js (+55/-12)
webapp/graphite/account/views.py (+6/-5)
webapp/graphite/browser/urls.py (+5/-5)
webapp/graphite/browser/views.py (+4/-1)
webapp/graphite/composer/urls.py (+1/-1)
webapp/graphite/composer/views.py (+2/-0)
webapp/graphite/dashboard/views.py (+3/-0)
webapp/graphite/graphlot/views.py (+2/-0)
webapp/graphite/templates/500.html (+1/-2)
webapp/graphite/templates/browser.html (+3/-3)
webapp/graphite/templates/browserHeader.html (+8/-8)
webapp/graphite/templates/composer.html (+10/-10)
webapp/graphite/templates/dashboard.html (+21/-22)
webapp/graphite/templates/event.html (+1/-1)
webapp/graphite/templates/login.html (+1/-1)
webapp/graphite/urls.py (+12/-12)
To merge this branch: bzr merge lp:~octplane/graphite/url_management
Reviewer Review Type Date Requested Status
chrismd Approve
Review via email: mp+82998@code.launchpad.net

Description of the change

. Support any title in graph names ( Fix for #784414 )
. Fix Auto select url when opening share window in dashboard ( Fix for #893159 )
. Add dashboard name to # in url when editing a dashboard. Load matching dashboard upon first load (fix for #893160)
. Display render url and graph name in at top of contextual menu

To post a comment you must log in.
lp:~octplane/graphite/url_management updated
608. By Pierre Baillet <email address hidden>

Handle SCRIPT URL ( #893618 ). Fist Pass.

609. By Pierre Baillet <email address hidden>

Oups.

610. By Pierre Baillet <email address hidden>

Added SLASH knowledge in graphlot urls

611. By Pierre Baillet <email address hidden>

Autocomplete is case sensitive to allow selection metrics with different case without breaking the cache.
(findmetric is case sensitive)

Fix the autocomplete in the graphlot interface.

Revision history for this message
chrismd (chrismd) wrote :

Hi Pierre, thanks for all these patches. I have merged in revs 603-607 and 610-611. I omitted the 608-609 revs because this is a very risky change that I'd like to make sure has been thoroughly tested before merging. I say that it is risky because it is a lot of little changes all over the place, even though they are relatively simple changes there is a big opportunity for introducing lots of bugs unless each affected code path is tested in both the root url context and in a non-root url context.

If you do give it thorough testing and would be willing to help fix reported bugs once its released I would be happy to merge it in. The only reason there is a higher hurdle for this change than other changes is because it's been attempted previously a couple times and has had to be rolled back twice because of bugs.

Thanks again for all the awesome contributions.

review: Approve
Revision history for this message
Pierre Baillet (octplane) wrote :

Hello Chris,

I'm mostly ok to support the non / configurable option for Graphite,
I'm using it this way in two differents environments right now and I
can say I use the patch I've submitted. Last week, I also added the
support for events and into the Graphlot interface. As the cli is
supposed to be deprecated, I haven't touched it (and also because I
ignore how to use it). And there are probably other parts of the web
application I'm unaware of. As I've started modifiying the Javascript,
I think I can fix most bug that would be reported to me for this
feature.

Re the philosophical issue of supporting - or not - of this
configuration option, I find it sad that Django does support
overriding the SCRIPT_URL only to reveal that Graphite does not adapt
itself to this setting. I have no stronger feelings about that but I
feel it would make graphite a bit more professional. :-)

For as long as I use graphite in my work environment, I will be able
to maintain it quite easily as it's part of my job.

--
Pierre Baillet <email address hidden>

On Mon, Dec 5, 2011 at 08:05, chrismd <email address hidden> wrote:
> Review: Approve
>
> Hi Pierre, thanks for all these patches. I have merged in revs 603-607 and 610-611. I omitted the 608-609 revs because this is a very risky change that I'd like to make sure has been thoroughly tested before merging. I say that it is risky because it is a lot of little changes all over the place, even though they are relatively simple changes there is a big opportunity for introducing lots of bugs unless each affected code path is tested in both the root url context and in a non-root url context.
>
> If you do give it thorough testing and would be willing to help fix reported bugs once its released I would be happy to merge it in. The only reason there is a higher hurdle for this change than other changes is because it's been attempted previously a couple times and has had to be rolled back twice because of bugs.
>
> Thanks again for all the awesome contributions.
> --
> https://code.launchpad.net/~octplane/graphite/url_management/+merge/82998
> You are the owner of lp:~octplane/graphite/url_management.

lp:~octplane/graphite/url_management updated
612. By Pierre Baillet <email address hidden>

Merge from main branch

613. By Pierre Baillet <email address hidden>

Merge head

Unmerged revisions

613. By Pierre Baillet <email address hidden>

Merge head

612. By Pierre Baillet <email address hidden>

Merge from main branch

611. By Pierre Baillet <email address hidden>

Autocomplete is case sensitive to allow selection metrics with different case without breaking the cache.
(findmetric is case sensitive)

Fix the autocomplete in the graphlot interface.

610. By Pierre Baillet <email address hidden>

Added SLASH knowledge in graphlot urls

609. By Pierre Baillet <email address hidden>

Oups.

608. By Pierre Baillet <email address hidden>

Handle SCRIPT URL ( #893618 ). Fist Pass.

607. By Pierre Baillet <email address hidden>

Merge

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'webapp/content/css/dashboard.css'
2--- webapp/content/css/dashboard.css 2011-07-26 05:16:59 +0000
3+++ webapp/content/css/dashboard.css 2011-12-05 13:09:25 +0000
4@@ -79,22 +79,22 @@
5
6 .x-layout-split-north .x-layout-mini {
7 height: 10px;
8- background-image: url(/content/img/mini-top2.gif);
9+ background-image: url(../img/mini-top2.gif);
10 }
11
12 .x-layout-split-south .x-layout-mini {
13 height: 10px !important;
14- background-image: url(/content/img/mini-bottom2.gif);
15+ background-image: url(../img/mini-bottom2.gif);
16 }
17
18 .x-layout-split-east .x-layout-mini {
19 width: 10px !important;
20- background-image: url(/content/img/mini-right2.gif);
21+ background-image: url(../img/mini-right2.gif);
22 }
23 /*
24 .x-layout-split-west .x-layout-mini {
25 width: 10px !important;
26- background-image: url(/content/img/mini-left2.gif);
27+ background-image: url(../img/mini-left2.gif);
28 }
29 */
30 .x-layout-cmini-north {
31@@ -103,22 +103,22 @@
32
33 .x-layout-cmini-north .x-layout-mini {
34 height: 10px !important;
35- background-image: url(/content/img/mini-bottom2.gif);
36+ background-image: url(../img/mini-bottom2.gif);
37 }
38
39 .x-layout-cmini-south .x-layout-mini {
40 height: 10px !important;
41- background-image: url(/content/img/mini-top2.gif);
42+ background-image: url(../img/mini-top2.gif);
43 }
44 /*
45 .x-layout-cmini-east .x-layout-mini {
46 width: 10px !important;
47- background-image: url(/content/img/mini-left2.gif);
48+ background-image: url(../img/mini-left2.gif);
49 }
50 */
51 .x-layout-cmini-west .x-layout-mini {
52 width: 10px !important;
53- background-image: url(/content/img/mini-right2.gif);
54+ background-image: url(../img/mini-right2.gif);
55 }
56
57 /* DnD classes */
58
59=== modified file 'webapp/content/js/composer_widgets.js'
60--- webapp/content/js/composer_widgets.js 2011-12-05 08:30:48 +0000
61+++ webapp/content/js/composer_widgets.js 2011-12-05 13:09:25 +0000
62@@ -841,7 +841,7 @@
63
64 addWlSelected: function (item, e) {
65 Ext.Ajax.request({
66- url: "/whitelist/add",
67+ url: "../whitelist/add",
68 method: "POST",
69 success: function () { Ext.Msg.alert("Result", "Successfully added metrics to whitelist."); },
70 failure: function () { Ext.Msg.alert("Result", "Failed to add metrics to whitelist."); },
71@@ -851,7 +851,7 @@
72
73 removeWlSelected: function (item, e) {
74 Ext.Ajax.request({
75- url: "/whitelist/remove",
76+ url: "../whitelist/remove",
77 method: "POST",
78 success: function () { Ext.Msg.alert("Result", "Successfully removed metrics from whitelist."); },
79 failure: function () { Ext.Msg.alert("Result", "Failed to remove metrics from whitelist."); },
80
81=== modified file 'webapp/content/js/dashboard.js'
82--- webapp/content/js/dashboard.js 2011-12-05 06:10:16 +0000
83+++ webapp/content/js/dashboard.js 2011-12-05 13:09:25 +0000
84@@ -19,7 +19,7 @@
85 var NOT_EDITABLE = ['from', 'until', 'width', 'height', 'target', 'uniq'];
86
87 var cookieProvider = new Ext.state.CookieProvider({
88- path: "/dashboard"
89+ path: "/"
90 });
91
92 var NAV_BAR_REGION = cookieProvider.get('navbar-region') || 'west';
93@@ -68,7 +68,7 @@
94 ]);
95
96 var contextFieldStore = new Ext.data.JsonStore({
97- url: '/metrics/find/',
98+ url: '../metrics/find/',
99 root: 'metrics',
100 idProperty: 'name',
101 fields: ContextFieldValueRecord,
102@@ -286,7 +286,7 @@
103 }),
104 store: new Ext.data.JsonStore({
105 method: 'GET',
106- url: '/metrics/find/',
107+ url: '../metrics/find/',
108 autoLoad: true,
109 baseParams: {
110 query: '',
111@@ -849,7 +849,7 @@
112 }
113
114 var loader = new Ext.tree.TreeLoader({
115- url: '/metrics/find/',
116+ url: '../metrics/find/',
117 requestMethod: 'GET',
118 listeners: {beforeload: setParams}
119 });
120@@ -923,7 +923,7 @@
121 var record = new GraphRecord({
122 target: graphTargetString,
123 params: myParams,
124- url: '/render?' + Ext.urlEncode(urlParams)
125+ url: '../render?' + Ext.urlEncode(urlParams)
126 });
127 graphStore.add([record]);
128 }
129@@ -939,7 +939,7 @@
130 if (params.title === undefined && params.target.length == 1) {
131 params.title = params.target[0];
132 }
133- this.set('url', '/render?' + Ext.urlEncode(params));
134+ this.set('url', '../render?' + Ext.urlEncode(params));
135 this.set('width', GraphSize.width);
136 this.set('height', GraphSize.height);
137 });
138@@ -1303,7 +1303,7 @@
139 function doShare() {
140 if (dashboardName == null) {
141 Ext.Ajax.request({
142- url: "/dashboard/create-temporary/",
143+ url: "../dashboard/create-temporary/",
144 method: 'POST',
145 params: {
146 state: Ext.encode( getState() )
147@@ -1478,6 +1478,49 @@
148 }
149 }
150 });
151+
152+ urlButton = new Ext.Button({
153+ icon: SHARE_ICON,
154+ text: (record.data.params.title || "Unamed Graph"),
155+ width: gridWidth,
156+ handler: function(thisButton) {
157+ menu.destroy();
158+ var win = new Ext.Window({
159+ title: "Graph URL",
160+ width: 600,
161+ height: 125,
162+ layout: 'border',
163+ modal: true,
164+ items: [
165+ {
166+ xtype: "label",
167+ region: 'north',
168+ style: "text-align: center;",
169+ text: "You can use this URL to graph directly this Graph"
170+ }, {
171+ xtype: 'textfield',
172+ region: 'center',
173+ value: record.data.url,
174+ editable: false,
175+ style: "text-align: center; font-size: large;",
176+ listeners: {
177+ focus: function (field) { field.selectText(); }
178+ }
179+ }
180+ ],
181+ buttonAlign: 'center',
182+ buttons: [
183+ {text: "Close", handler: function () { win.close(); } }
184+ ]
185+ });
186+ win.show();
187+
188+ }
189+
190+ });
191+
192+ menuItems.push(urlButton);
193+
194 menuItems.push(targetGrid);
195
196 /* Setup our menus */
197@@ -1685,7 +1728,7 @@
198 }
199
200 Ext.Ajax.request({
201- url: '/metrics/expand/',
202+ url: '../metrics/expand/',
203 params: {
204 groupByExpr: '1',
205 leavesOnly: '1',
206@@ -1891,7 +1934,7 @@
207
208 function sendSaveRequest(name) {
209 Ext.Ajax.request({
210- url: "/dashboard/save/" + name,
211+ url: "../dashboard/save/" + name,
212 method: 'POST',
213 params: {
214 state: Ext.encode( getState() )
215@@ -1908,7 +1951,7 @@
216
217 function sendLoadRequest(name) {
218 Ext.Ajax.request({
219- url: "/dashboard/load/" + name,
220+ url: "../dashboard/load/" + name,
221 success: function (response) {
222 var result = Ext.decode(response.responseText);
223 if (result.error) {
224@@ -1990,7 +2033,7 @@
225
226 function deleteDashboard(name) {
227 Ext.Ajax.request({
228- url: "/dashboard/delete/" + name,
229+ url: "../dashboard/delete/" + name,
230 success: function (response) {
231 var result = Ext.decode(response.responseText);
232 if (result.error) {
233@@ -2107,7 +2150,7 @@
234 var dashboardsList;
235 var queryField;
236 var dashboardsStore = new Ext.data.JsonStore({
237- url: "/dashboard/find/",
238+ url: "../dashboard/find/",
239 method: 'GET',
240 params: {query: "e"},
241 fields: ['name'],
242
243=== modified file 'webapp/graphite/account/views.py'
244--- webapp/graphite/account/views.py 2011-07-10 22:35:02 +0000
245+++ webapp/graphite/account/views.py 2011-12-05 13:09:25 +0000
246@@ -16,6 +16,7 @@
247 from django.http import HttpResponseRedirect
248 from django.contrib.auth import authenticate, login, logout
249 from graphite.util import getProfile
250+from django.core.urlresolvers import get_script_prefix
251 from graphite.logger import log
252 from graphite.account.models import Profile
253
254@@ -24,9 +25,9 @@
255 username = request.POST.get('username')
256 password = request.POST.get('password')
257 if request.method == 'GET':
258- nextPage = request.GET.get('nextPage','/')
259+ nextPage = request.GET.get('nextPage',get_script_prefix())
260 else:
261- nextPage = request.POST.get('nextPage','/')
262+ nextPage = request.POST.get('nextPage',get_script_prefix())
263 if username and password:
264 user = authenticate(username=username,password=password)
265 if user is None:
266@@ -37,10 +38,10 @@
267 login(request,user)
268 return HttpResponseRedirect(nextPage)
269 else:
270- return render_to_response("login.html",{'nextPage' : nextPage})
271+ return render_to_response("login.html",{'nextPage' : nextPage, 'slash': get_script_prefix()})
272
273 def logoutView(request):
274- nextPage = request.GET.get('nextPage','/')
275+ nextPage = request.GET.get('nextPage',get_script_prefix())
276 logout(request)
277 return HttpResponseRedirect(nextPage)
278
279@@ -55,5 +56,5 @@
280 if profile:
281 profile.advancedUI = request.POST.get('advancedUI','off') == 'on'
282 profile.save()
283- nextPage = request.POST.get('nextPage','/')
284+ nextPage = request.POST.get('nextPage',get_script_prefix())
285 return HttpResponseRedirect(nextPage)
286
287=== modified file 'webapp/graphite/browser/urls.py'
288--- webapp/graphite/browser/urls.py 2011-08-24 07:06:40 +0000
289+++ webapp/graphite/browser/urls.py 2011-12-05 13:09:25 +0000
290@@ -15,9 +15,9 @@
291 from django.conf.urls.defaults import *
292
293 urlpatterns = patterns('graphite.browser.views',
294- ('^header/?$', 'header'),
295- ('^search/?$', 'search'),
296- ('^mygraph/?$', 'myGraphLookup'),
297- ('^usergraph/?$', 'userGraphLookup'),
298- ('^$', 'browser'),
299+ ('header/?$', 'header'),
300+ (r'^search/?$', 'search'),
301+ (r'^mygraph/?$', 'myGraphLookup'),
302+ (r'^usergraph/?$', 'userGraphLookup'),
303+ (r'^$', 'browser'),
304 )
305
306=== modified file 'webapp/graphite/browser/views.py'
307--- webapp/graphite/browser/views.py 2011-12-05 06:12:33 +0000
308+++ webapp/graphite/browser/views.py 2011-12-05 13:09:25 +0000
309@@ -16,6 +16,7 @@
310 from django.shortcuts import render_to_response
311 from django.http import HttpResponse
312 from django.conf import settings
313+from django.core.urlresolvers import get_script_prefix
314 from graphite.account.models import Profile
315 from graphite.util import getProfile, getProfileByUsername, defaultUser, json
316 from graphite.logger import log
317@@ -33,6 +34,7 @@
318 context['user'] = request.user
319 context['profile'] = getProfile(request)
320 context['documentation_url'] = settings.DOCUMENTATION_URL
321+ context['slash'] = get_script_prefix()
322 return render_to_response("browserHeader.html", context)
323
324
325@@ -40,7 +42,8 @@
326 "View for the top-level frame of the browser UI"
327 context = {
328 'queryString' : request.GET.urlencode(),
329- 'target' : request.GET.get('target')
330+ 'target' : request.GET.get('target'),
331+ 'slash' : get_script_prefix()
332 }
333 if context['queryString']:
334 context['queryString'] = context['queryString'].replace('#','%23')
335
336=== modified file 'webapp/graphite/composer/urls.py'
337--- webapp/graphite/composer/urls.py 2009-09-11 19:54:50 +0000
338+++ webapp/graphite/composer/urls.py 2011-12-05 13:09:25 +0000
339@@ -17,5 +17,5 @@
340 urlpatterns = patterns('graphite.composer.views',
341 ('send_email','send_email'),
342 ('mygraph', 'mygraph'),
343- ('', 'composer'),
344+ ('^$', 'composer'),
345 )
346
347=== modified file 'webapp/graphite/composer/views.py'
348--- webapp/graphite/composer/views.py 2010-02-26 16:15:44 +0000
349+++ webapp/graphite/composer/views.py 2011-12-05 13:09:25 +0000
350@@ -26,6 +26,7 @@
351 from graphite.logger import log
352 from graphite.account.models import MyGraph
353
354+from django.core.urlresolvers import get_script_prefix
355 from django.shortcuts import render_to_response
356 from django.http import HttpResponse
357 from django.conf import settings
358@@ -42,6 +43,7 @@
359 'searchEnabled' : int( os.access(settings.INDEX_FILE, os.R_OK) ),
360 'debug' : settings.DEBUG,
361 'jsdebug' : settings.DEBUG,
362+ 'slash' : get_script_prefix()
363 }
364 return render_to_response("composer.html",context)
365
366
367=== modified file 'webapp/graphite/dashboard/views.py'
368--- webapp/graphite/dashboard/views.py 2011-08-13 08:20:38 +0000
369+++ webapp/graphite/dashboard/views.py 2011-12-05 13:09:25 +0000
370@@ -7,6 +7,8 @@
371 from django.conf import settings
372 from graphite.util import json
373 from graphite.dashboard.models import Dashboard
374+from django.core.urlresolvers import get_script_prefix
375+
376
377
378 fieldRegex = re.compile(r'<([^>]+)>')
379@@ -126,6 +128,7 @@
380 'initialError' : initialError,
381 'querystring' : json.dumps( dict( request.GET.items() ) ),
382 'dashboard_conf_missing' : dashboard_conf_missing,
383+ 'slash' : get_script_prefix()
384 }
385
386 if name is not None:
387
388=== modified file 'webapp/graphite/graphlot/views.py'
389--- webapp/graphite/graphlot/views.py 2011-12-05 06:43:23 +0000
390+++ webapp/graphite/graphlot/views.py 2011-12-05 13:09:25 +0000
391@@ -3,6 +3,8 @@
392 from django.shortcuts import render_to_response
393 from django.http import HttpResponse, Http404, HttpResponseBadRequest
394 from django.conf import settings
395+from django.core.urlresolvers import get_script_prefix
396+
397 import simplejson
398
399 from graphite.render.views import parseOptions
400
401=== modified file 'webapp/graphite/templates/500.html'
402--- webapp/graphite/templates/500.html 2011-09-03 20:57:58 +0000
403+++ webapp/graphite/templates/500.html 2011-12-05 13:09:25 +0000
404@@ -1,8 +1,7 @@
405 <body style="background-color: #666666; color: black;">
406 <center>
407 <h2 style='font-family: "Arial"'>
408-<p>Graphite encountered an unexpected error while handling your request.</p>
409-<p>Please contact your site administrator if the problem persists.</p>
410+<p>Not found</p>
411 </h2>
412 <br/>
413 <div style="width: 50%; text-align: center; font-family: monospace; background-color: black; font-weight: bold; color: #ff4422;">
414
415=== modified file 'webapp/graphite/templates/browser.html'
416--- webapp/graphite/templates/browser.html 2011-07-12 07:37:01 +0000
417+++ webapp/graphite/templates/browser.html 2011-12-05 13:09:25 +0000
418@@ -21,11 +21,11 @@
419
420
421 <frameset rows="80,*" frameborder="1" border="1">
422- <frame src="/browser/header/" name="Header" id='header' scrolling="no" noresize="true" />
423+ <frame src="{{slash}}browser/header/" name="Header" id='header' scrolling="no" noresize="true" />
424 {% if target %}
425- <frame src="/composer/?showTarget={{target}}&{{queryString}}" name="content" id="composerFrame"/>
426+ <frame src="{{slash}}composer/?showTarget={{target}}&{{queryString}}" name="content" id="composerFrame"/>
427 {% else %}
428- <frame src="/composer/?{{queryString}}" name="content" id="composerFrame"/>
429+ <frame src="{{slash}}composer/?{{queryString}}" name="content" id="composerFrame"/>
430 {% endif %}
431 </frameset>
432 </html>
433
434=== modified file 'webapp/graphite/templates/browserHeader.html'
435--- webapp/graphite/templates/browserHeader.html 2011-08-24 07:06:40 +0000
436+++ webapp/graphite/templates/browserHeader.html 2011-12-05 13:09:25 +0000
437@@ -68,7 +68,7 @@
438
439 <body bgcolor="white">
440
441-<img src="/content/img/graphite_short.png" alt="Graphite" style="border: 0px solid" align='top'/>
442+<img src="{{slash}}content/img/graphite_short.png" alt="Graphite" style="border: 0px solid" align='top'/>
443
444 <!-- Right side (only works in firefox for some reason) -->
445 <!--
446@@ -81,10 +81,10 @@
447
448 <tr><td style='font-size: smaller;'>
449 {% if user.is_authenticated %}
450- Logged in as {{ user.username }}, <a href="/account/logout/" target="_top">logout</a> &nbsp;
451- (<a href="/account/edit/" target="_top">edit profile</a>)
452+ Logged in as {{ user.username }}, <a href="{{slash}}account/logout/" target="_top">logout</a> &nbsp;
453+ (<a href="{{slash}}account/edit/" target="_top">edit profile</a>)
454 {% else %}
455- <a href="/account/login/" target="_top">Login</a>
456+ <a href="{{slash}}account/login/" target="_top">Login</a>
457 {% endif %}
458 </td></tr>
459
460@@ -95,10 +95,10 @@
461 </td></tr>
462
463 <tr><td style='font-size: smaller;'>
464- User Interface: <a href="/dashboard/" target="_top">Dashboard</a> |
465- <a href="/graphlot/" target="_top">flot (experimental)</a> |
466- <a href="/events/" target="_top">events (experimental)</a> |
467- <a href="/cli/" target="_top">Command-Line (deprecated)</a>
468+ User Interface: <a href="{{slash}}dashboard/" target="_top">Dashboard</a> |
469+ <a href="{{slash}}graphlot/" target="_top">flot (experimental)</a> |
470+ <a href="{{slash}}events/" target="_top">events (experimental)</a> |
471+ <a href="{{slash}}cli/" target="_top">Command-Line (deprecated)</a>
472 </td></tr>
473
474 </table>
475
476=== modified file 'webapp/graphite/templates/composer.html'
477--- webapp/graphite/templates/composer.html 2011-07-10 22:35:02 +0000
478+++ webapp/graphite/templates/composer.html 2011-12-05 13:09:25 +0000
479@@ -17,14 +17,14 @@
480 <html>
481 <head>
482 <title>Graphite Composer</title>
483- <link rel="stylesheet" type="text/css" href="/content/js/ext/resources/css/ext-all.css"/>
484+ <link rel="stylesheet" type="text/css" href="{{slash}}content/js/ext/resources/css/ext-all.css"/>
485
486 {% if jsdebug %}
487- <script type="text/javascript" src="/content/js/ext/adapter/ext/ext-base-debug.js"></script>
488- <script type="text/javascript" src="/content/js/ext/ext-all-debug.js"></script>
489+ <script type="text/javascript" src="{{slash}content/js/ext/adapter/ext/ext-base-debug.js"></script>
490+ <script type="text/javascript" src="{{slash}content/js/ext/ext-all-debug.js"></script>
491 {% else %}
492- <script type="text/javascript" src="/content/js/ext/adapter/ext/ext-base.js"></script>
493- <script type="text/javascript" src="/content/js/ext/ext-all.js"></script>
494+ <script type="text/javascript" src="{{slash}content/js/ext/adapter/ext/ext-base.js"></script>
495+ <script type="text/javascript" src="{{slash}content/js/ext/ext-all.js"></script>
496 {% endif %}
497
498 <script type="text/javascript">
499@@ -65,10 +65,10 @@
500 }
501 </script>
502
503- <script type="text/javascript" src="/content/js/browser.js"></script>
504- <script type="text/javascript" src="/content/js/composer_widgets.js"></script>
505- <script type="text/javascript" src="/content/js/composer.js"></script>
506- <script type="text/javascript" src="/content/js/completer.js"></script>
507+ <script type="text/javascript" src="{{slash}content/js/browser.js"></script>
508+ <script type="text/javascript" src="{{slash}content/js/composer_widgets.js"></script>
509+ <script type="text/javascript" src="{{slash}content/js/composer.js"></script>
510+ <script type="text/javascript" src="{{slash}content/js/completer.js"></script>
511
512 <style type="text/css">
513 /* Hack to fix this bug http://extjs.net/forum/showthread.php?s=a570aba1bf2fc67a2287684c5d91c662&t=74230 */
514@@ -85,7 +85,7 @@
515 </style>
516
517 <script type="text/javascript">
518- Ext.BLANK_IMAGE_URL = '/content/js/ext/resources/images/default/s.gif';
519+ Ext.BLANK_IMAGE_URL = '{{slash}}content/js/ext/resources/images/default/s.gif';
520
521 var Browser;
522 var Composer;
523
524=== modified file 'webapp/graphite/templates/dashboard.html'
525--- webapp/graphite/templates/dashboard.html 2011-07-26 05:16:59 +0000
526+++ webapp/graphite/templates/dashboard.html 2011-12-05 13:09:25 +0000
527@@ -1,10 +1,9 @@
528 {% autoescape off %}
529-
530 <html>
531 <head>
532 <title>Graphite Dashboard</title>
533- <link rel="stylesheet" type="text/css" href="/content/js/ext/resources/css/ext-all.css"/>
534- <link rel="stylesheet" type="text/css" href="/content/css/dashboard.css"/>
535+ <link rel="stylesheet" type="text/css" href="{{slash}}content/js/ext/resources/css/ext-all.css"/>
536+ <link rel="stylesheet" type="text/css" href="{{slash}}content/css/dashboard.css"/>
537
538 <script type="text/javascript">
539 var schemes = {{schemes_json|safe}};
540@@ -14,13 +13,13 @@
541 var FINDER_QUERY_DELAY = 100;
542 var NEW_DASHBOARD_REMOVE_GRAPHS = false;
543
544- var RESIZE_ICON = '/content/js/ext/examples/shared/icons/fam/cog_edit.png';
545- var REMOVE_ICON = '/content/js/ext/examples/shared/icons/fam/cross.gif';
546- var REFRESH_ICON = '/content/js/ext/examples/shared/icons/fam/table_refresh.png';
547- var SHARE_ICON = '/content/js/ext/examples/shared/icons/fam/application_go.png';
548- var CALENDAR_ICON = '/content/js/ext/resources/images/default/shared/calendar.gif';
549- var CLOCK_ICON = '/content/img/clock_16.png';
550- var HELP_ICON = '/content/js/ext/examples/shared/icons/fam/information.png';
551+ var RESIZE_ICON = '{{slash}}content/js/ext/examples/shared/icons/fam/cog_edit.png';
552+ var REMOVE_ICON = '{{slash}}content/js/ext/examples/shared/icons/fam/cross.gif';
553+ var REFRESH_ICON = '{{slash}}content/js/ext/examples/shared/icons/fam/table_refresh.png';
554+ var SHARE_ICON = '{{slash}}content/js/ext/examples/shared/icons/fam/application_go.png';
555+ var CALENDAR_ICON = '{{slash}}content/js/ext/resources/images/default/shared/calendar.gif';
556+ var CLOCK_ICON = '{{slash}}content/img/clock_16.png';
557+ var HELP_ICON = '{{slash}}content/js/ext/examples/shared/icons/fam/information.png';
558
559 {% if initialState %}
560 var initialState = {{initialState|safe}};
561@@ -40,24 +39,24 @@
562 </script>
563
564 <!-- Theme overrides -->
565- <link rel="stylesheet" type="text/css" href="/content/css/dashboard-{{theme}}.css"/>
566+ <link rel="stylesheet" type="text/css" href="{{slash}}content/css/dashboard-{{theme}}.css"/>
567
568 {% if jsdebug %}
569- <script type="text/javascript" src="/content/js/ext/adapter/ext/ext-base-debug.js"></script>
570- <script type="text/javascript" src="/content/js/ext/ext-all-debug.js"></script>
571- <script type="text/javascript" src="/content/js/ext/ux/DataViewTransition.js"></script>
572- <script type="text/javascript" src="/content/js/composer_widgets.js"></script>
573- <script type="text/javascript" src="/content/js/dashboard.js"></script>
574+ <script type="text/javascript" src="{{slash}}content/js/ext/adapter/ext/ext-base-debug.js"></script>
575+ <script type="text/javascript" src="{{slash}}content/js/ext/ext-all-debug.js"></script>
576+ <script type="text/javascript" src="{{slash}}content/js/ext/ux/DataViewTransition.js"></script>
577+ <script type="text/javascript" src="{{slash}}content/js/composer_widgets.js"></script>
578+ <script type="text/javascript" src="{{slash}}content/js/dashboard.js"></script>
579 {% else %}
580- <script type="text/javascript" src="/content/js/ext/adapter/ext/ext-base.js"></script>
581- <script type="text/javascript" src="/content/js/ext/ext-all.js"></script>
582- <script type="text/javascript" src="/content/js/ext/ux/DataViewTransition.js"></script>
583- <script type="text/javascript" src="/content/js/composer_widgets.js"></script>
584- <script type="text/javascript" src="/content/js/dashboard.js"></script>
585+ <script type="text/javascript" src="{{slash}}content/js/ext/adapter/ext/ext-base.js"></script>
586+ <script type="text/javascript" src="{{slash}}content/js/ext/ext-all.js"></script>
587+ <script type="text/javascript" src="{{slash}}content/js/ext/ux/DataViewTransition.js"></script>
588+ <script type="text/javascript" src="{{slash}}content/js/composer_widgets.js"></script>
589+ <script type="text/javascript" src="{{slash}}content/js/dashboard.js"></script>
590 {% endif %}
591
592 <script type="text/javascript">
593- Ext.BLANK_IMAGE_URL = '/content/js/ext/resources/images/default/s.gif';
594+ Ext.BLANK_IMAGE_URL = '{{slash}}content/js/ext/resources/images/default/s.gif';
595 Ext.QuickTips.init();
596 Ext.onReady(initDashboard);
597 </script>
598
599=== modified file 'webapp/graphite/templates/event.html'
600--- webapp/graphite/templates/event.html 2011-10-03 08:57:37 +0000
601+++ webapp/graphite/templates/event.html 2011-12-05 13:09:25 +0000
602@@ -1,7 +1,7 @@
603 <html>
604 <head>
605 <title>{{event.what}}</title>
606- <link rel="stylesheet" type="text/css" href="/content/css/table.css" />
607+ <link rel="stylesheet" type="text/css" href="../content/css/table.css" />
608 <style type="text/css">
609 body {
610 font-family: sans-serif;
611
612=== modified file 'webapp/graphite/templates/login.html'
613--- webapp/graphite/templates/login.html 2011-07-10 22:35:02 +0000
614+++ webapp/graphite/templates/login.html 2011-12-05 13:09:25 +0000
615@@ -28,7 +28,7 @@
616 </div>
617 {% endif %}
618
619-<form method='POST' action='/account/login/'>
620+<form method='POST' action='{{slash}}account/login/'>
621 {% if nextPage %}
622 <input type='hidden' name='nextPage' value='{{nextPage}}'/>
623 {% endif %}
624
625=== modified file 'webapp/graphite/urls.py'
626--- webapp/graphite/urls.py 2011-09-15 07:54:41 +0000
627+++ webapp/graphite/urls.py 2011-12-05 13:09:25 +0000
628@@ -25,19 +25,19 @@
629 admin_urls = include(admin.site.urls)
630
631 urlpatterns = patterns('',
632- ('^admin/', admin_urls),
633- ('^render/?', include('graphite.render.urls')),
634- ('^cli/?', include('graphite.cli.urls')),
635- ('^composer/?', include('graphite.composer.urls')),
636- ('^metrics/?', include('graphite.metrics.urls')),
637- ('^browser/?', include('graphite.browser.urls')),
638- ('^account/?', include('graphite.account.urls')),
639- ('^dashboard/?', include('graphite.dashboard.urls')),
640- ('^whitelist/?', include('graphite.whitelist.urls')),
641- ('^content/(?P<path>.*)$', 'django.views.static.serve', {'document_root' : settings.CONTENT_DIR}),
642+ ('content/(?P<path>.*)$', 'django.views.static.serve', {'document_root' : settings.CONTENT_DIR}),
643+ ('admin/', admin_urls),
644+ ('render/?', include('graphite.render.urls')),
645+ ('cli/?', include('graphite.cli.urls')),
646+ ('composer/?', include('graphite.composer.urls')),
647+ ('metrics/?', include('graphite.metrics.urls')),
648+ ('browser/?', include('graphite.browser.urls')),
649+ ('account/?', include('graphite.account.urls')),
650+ ('dashboard/?', include('graphite.dashboard.urls')),
651+ ('whitelist/?', include('graphite.whitelist.urls')),
652 ('graphlot/', include('graphite.graphlot.urls')),
653- ('^version/', include('graphite.version.urls')),
654- ('^events/', include('graphite.events.urls')),
655+ ('version/', include('graphite.version.urls')),
656+ ('events/', include('graphite.events.urls')),
657 ('', 'graphite.browser.views.browser'),
658 )
659

Subscribers

People subscribed via source and target branches