dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #32704
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16677: Files web api, using js and css extensions to make the content cacheable by proxy
------------------------------------------------------------
revno: 16677
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-09-09 19:57:34 -0400
message:
Files web api, using js and css extensions to make the content cacheable by proxy
modified:
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/FileController.java
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/cacheManifest.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm
dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/FileController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/FileController.java 2014-07-09 09:26:23 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/FileController.java 2014-09-09 23:57:34 +0000
@@ -66,7 +66,7 @@
// Custom script
// -------------------------------------------------------------------------
- @RequestMapping( value = "/script", method = RequestMethod.GET )
+ @RequestMapping( value = { "/script", "/script.js" }, method = RequestMethod.GET )
public void getCustomScript( HttpServletResponse response, Writer writer )
throws IOException
{
@@ -77,7 +77,7 @@
writer.write( content );
}
- @RequestMapping( value = "/script", method = RequestMethod.POST, consumes = "application/javascript" )
+ @RequestMapping( value = { "/script", "/script.js" }, method = RequestMethod.POST, consumes = "application/javascript" )
@PreAuthorize( "hasRole('ALL') or hasRole('F_INSERT_CUSTOM_JS_CSS')" )
public void postCustomScript( @RequestBody String content, HttpServletResponse response )
{
@@ -88,7 +88,7 @@
}
}
- @RequestMapping( value = "/script", method = RequestMethod.DELETE )
+ @RequestMapping( value = { "/script", "/script.js" }, method = RequestMethod.DELETE )
@PreAuthorize( "hasRole('ALL') or hasRole('F_INSERT_CUSTOM_JS_CSS')" )
public void removeCustomScript( HttpServletResponse response )
{
@@ -102,7 +102,7 @@
/**
* The style/external mapping enables style to be reached from login page / before authentication.
*/
- @RequestMapping( value = { "/style", "/style/external" }, method = RequestMethod.GET )
+ @RequestMapping( value = { "/style", "/style.js", "/style/external.js" }, method = RequestMethod.GET )
public void getCustomStyle( HttpServletResponse response, Writer writer )
throws IOException
{
@@ -113,7 +113,7 @@
writer.write( content );
}
- @RequestMapping( value = "/style", method = RequestMethod.POST, consumes = "text/css" )
+ @RequestMapping( value = { "/style", "/style.js" }, method = RequestMethod.POST, consumes = "text/css" )
@PreAuthorize( "hasRole('ALL') or hasRole('F_INSERT_CUSTOM_JS_CSS')" )
public void postCustomStyle( @RequestBody String content, HttpServletResponse response )
{
@@ -124,7 +124,7 @@
}
}
- @RequestMapping( value = "/style", method = RequestMethod.DELETE )
+ @RequestMapping( value = { "/style", "/style.js" }, method = RequestMethod.DELETE )
@PreAuthorize( "hasRole('ALL') or hasRole('F_INSERT_CUSTOM_JS_CSS')" )
public void removeCustomStyle( HttpServletResponse response )
{
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/cacheManifest.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/cacheManifest.vm 2014-07-23 14:53:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/cacheManifest.vm 2014-09-09 23:57:34 +0000
@@ -16,7 +16,7 @@
css/widgets.css?_rev=$!{buildRevision}
css/print.css?_rev=$!{buildRevision}
../dhis-web-dataentry/style/dhis-web-dataentry.css?_rev=$!{buildRevision}
-../api/files/style?_rev=$!{buildRevision}
+../api/files/style.css?_rev=$!{buildRevision}
../favicon.ico
javascripts/es5-shim.min.js?_rev=$!{buildRevision}
javascripts/es5-sham.min.js?_rev=$!{buildRevision}
@@ -47,7 +47,7 @@
javascripts/dhis2/dhis2.appcache.js?_rev=$!{buildRevision}
javascripts/jQuery/jquery.cookie.js?_rev=$!{buildRevision}
../main.js?_rev=$!{buildRevision}
-../api/files/script?_rev=$!{buildRevision}
+../api/files/script.js?_rev=$!{buildRevision}
ouwt/ouwt.js?_rev=$!{buildRevision}
fonts/LiberationSans-Regular-webfont.eot
fonts/LiberationSans-Regular-webfont.woff
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login.vm 2014-07-17 09:23:08 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login.vm 2014-09-09 23:57:34 +0000
@@ -9,7 +9,7 @@
<script type="text/javascript" src="login.js"></script>
<link type="text/css" rel="stylesheet" href="../css/widgets.css">
<link type="text/css" rel="stylesheet" href="../css/login.css">
- <link type="text/css" rel="stylesheet" href="../../api/files/style/external" />
+ <link type="text/css" rel="stylesheet" href="../../api/files/style/external.js" />
</head>
<body class="loginPage">
<h1 style="display:none">$!encoder.htmlEncode( ${applicationTitle} )</h1>
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm 2014-08-05 12:57:45 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm 2014-09-09 23:57:34 +0000
@@ -18,7 +18,7 @@
#foreach ( $style in $stylesheets )
<link type="text/css" rel="stylesheet" href="${style}?_rev=$!{buildRevision}">
#end
- <link type="text/css" rel="stylesheet" href="../api/files/style?_rev=$!{buildRevision}" />
+ <link type="text/css" rel="stylesheet" href="../api/files/style.css?_rev=$!{buildRevision}" />
<link rel="shortcut icon" href="../favicon.ico" />
<script type="text/javascript">
@@ -85,7 +85,7 @@
#foreach( $javascript in $javascripts )
<script type="text/javascript" src="${javascript}?_rev=$!{buildRevision}"></script>
#end
- <script type="text/javascript" src="../api/files/script?_rev=$!{buildRevision}"></script>
+ <script type="text/javascript" src="../api/files/script.js?_rev=$!{buildRevision}"></script>
<!-- Create global system calendar -->
<script>
#if( $keyCalendar == 'iso8601')
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml 2014-08-25 15:20:12 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml 2014-09-09 23:57:34 +0000
@@ -23,7 +23,7 @@
<sec:http pattern="/dhis-web-commons/css/**" security="none" />
<sec:http pattern="/dhis-web-commons/flags/**" security="none" />
<sec:http pattern="/dhis-web-commons/fonts/**" security="none" />
- <sec:http pattern="/api/files/style/external" security="none" />
+ <sec:http pattern="/api/files/style/external.js" security="none" />
<sec:http pattern="/external-static/**" security="none" />
<sec:http pattern="/favicon.ico" security="none" />