Merge branch 'master' of ssh://git.indexdata.com:222/home/git/private/mkws
authorWolfram Schneider <wosch@indexdata.dk>
Mon, 7 Jul 2014 12:10:23 +0000 (12:10 +0000)
committerWolfram Schneider <wosch@indexdata.dk>
Mon, 7 Jul 2014 12:10:23 +0000 (12:10 +0000)
examples/htdocs/mike.html
src/.gitignore [deleted file]
src/mkws-core.js
tools/apache2/mkws-live
tools/apache2/sp-mkws-live [new file with mode: 0644]

index 3761ae5..2ea8c21 100644 (file)
@@ -4,8 +4,9 @@
     <title>MKWS demo: Orex</title>
     <link rel="stylesheet" type="text/css" href="tools/htdocs/mkws.css" />
     <script type="text/javascript">
-      var mkws_config = { service_proxy_auth:
-       "//sp-mkws.indexdata.com/service-proxy/?command=auth&action=check,login&username=orex&password=orexmkc"
+      var mkws_config = {
+       pazpar2_url:        "//sp-mkws.indexdata.com/service-proxy/",
+       service_proxy_auth: "//sp-mkws.indexdata.com/service-proxy/?command=auth&action=check,login&username=orex&password=orexmkc"
       };
     </script>
     <script type="text/javascript" src="//code.jquery.com/jquery-1.10.0.min.js"></script>
diff --git a/src/.gitignore b/src/.gitignore
deleted file mode 100644 (file)
index bb36c2d..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-README.html
-README.odt
-README.pdf
-handlebars-v1.1.2.js
-jquery-1.10.0.min.js
-jquery.json-2.4.js
-mkws-complete.js
-mkws-complete.min.js
-mkws.js
-mkws.min.js
-pz2.js
-whitepaper.html
-whitepaper.odt
-whitepaper.pdf
index d56b1e7..1de1711 100644 (file)
@@ -436,12 +436,13 @@ mkws.pagerNext = function(tname) {
 
     request.get(null, function(data) {
       if (!$.isXMLDoc(data)) {
-        alert("service proxy auth response document is not valid XML document, give up!");
+        alert("Service Proxy authentication response is not a valid XML document");
         return;
       }
       var status = $(data).find("status");
       if (status.text() != "OK") {
-        alert("service proxy auth response status: " + status.text() + ", give up!");
+        var message = $(data).find("message");
+        alert("Service Proxy authentication response: " + status.text() + " (" + message.text() + ")");
         return;
       }
 
index 630170d..0630d14 100644 (file)
         PerlOutputFilterHandler MyApache2::SetACAO
     </Location>
 </VirtualHost>
-
-# Separate hostname for the MKWS instance of the Service Proxy.
-# This allows us to use a different SP configuration that handles
-# authentication differently.
-#
-# Once this is in universal use, we can get rid of the Service Proxy
-# stuff in the configuration for mkws.indexdata.com
-#
-<VirtualHost *:80>
-    ServerName sp-mkws.indexdata.com
-
-    ErrorLog /var/log/apache2/sp-mkws-error.log
-    CustomLog /var/log/apache2/sp-mkws-access.log combined
-
-    DocumentRoot /home/indexdata/mkws/tools/sp-htdocs
-
-    # No rewriting on this server: use the true URL.
-    # (The security value of rewrite is when the application site does it.)
-
-    Header set Access-Control-Allow-Credentials true
-
-    ProxyPass        /service-proxy/ http://sp-mkc.indexdata.com/service-proxy/
-    ProxyPassReverse /service-proxy/ http://sp-mkc.indexdata.com/service-proxy/
-    # Or use: sp-mkc-sansa.indexdata.com:8080 or sp-mkc-arya.indexdata.com:8080
-
-    PerlOptions +Parent
-    PerlSwitches -I/home/indexdata/mkws/tools/mod_perl
-    <Location /service-proxy>
-        PerlOutputFilterHandler MyApache2::SetACAO
-    </Location>
-</VirtualHost>
diff --git a/tools/apache2/sp-mkws-live b/tools/apache2/sp-mkws-live
new file mode 100644 (file)
index 0000000..bcd9e81
--- /dev/null
@@ -0,0 +1,34 @@
+# Separate hostname for the MKWS instance of the Service Proxy.
+# This allows us to use a different SP configuration that handles
+# authentication differently.
+#
+# Once this is in universal use, we can get rid of the Service Proxy
+# stuff in the configuration for mkws.indexdata.com
+#
+<VirtualHost *:80>
+    ServerName sp-mkws.indexdata.com
+
+    ErrorLog /var/log/apache2/sp-mkws-error.log
+    CustomLog /var/log/apache2/sp-mkws-access.log combined
+
+    DocumentRoot /home/indexdata/mkws/tools/sp-htdocs
+
+    # No rewriting on this server: use the true URL.
+    # (The security value of rewrite is when the application site does it.)
+
+    Header set Access-Control-Allow-Credentials true
+
+    ProxyPreserveHost On
+    # We could use any of the following:
+    #  sp-mkc.indexdata.com/service-proxy/ -- multiplexer
+    #  sp-mkc-sansa.indexdata.com:8080/service-proxy/ -- 1st back-end server
+    #  sp-mkc-arya.indexdata.com:8080/service-proxy/ -- 2nd back-end server
+    ProxyPass        /service-proxy/ http://sp-mkc-sansa.indexdata.com:8080/service-proxy/
+    ProxyPassReverse /service-proxy/ http://sp-mkc-sansa.indexdata.com:8080/service-proxy/
+
+    PerlOptions +Parent
+    PerlSwitches -I/home/indexdata/mkws/tools/mod_perl
+    <Location /service-proxy>
+        PerlOutputFilterHandler MyApache2::SetACAO
+    </Location>
+</VirtualHost>