X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=experiments%2Fspclient%2Fmkws.js;h=3c8d76ebe86ed8ff320d568ff056cb1acba651b2;hb=01d95c59750f32341a720843030e3c44b264f8e1;hp=72531f3fcfd4acb0084d3e2d3bd7d909fab1d7b4;hpb=445d24d58c1655db48464773a4410b105af0c918;p=mkws-moved-to-github.git
diff --git a/experiments/spclient/mkws.js b/experiments/spclient/mkws.js
index 72531f3..3c8d76e 100644
--- a/experiments/spclient/mkws.js
+++ b/experiments/spclient/mkws.js
@@ -373,15 +373,17 @@ function renderDetails(data, marker)
$(document).ready(function() {
- $("#mkwsSwitch").html($("", { href: '#',
- onclick: "switchView(\'records\')",
- text: "Record Browser",
- }));
+ $("#mkwsSwitch").html($("", {
+ href: '#',
+ onclick: "switchView(\'records\')",
+ text: "Records",
+ }));
$("#mkwsSwitch").append($("", { text: " | " }));
- $("#mkwsSwitch").append($("", { href: '#',
- onclick: "switchView(\'targets\')",
- text: "Target Info",
- }));
+ $("#mkwsSwitch").append($("", {
+ href: '#',
+ onclick: "switchView(\'targets\')",
+ text: "Targets",
+ }));
// For some reason, doing this programmatically results in
// document.search.query being undefined, hence the raw HTML.
@@ -422,8 +424,22 @@ $(document).ready(function() {
$("#mkwsTargets").css("display", "none");
domReady();
+});
+$(document).ready(function() {
var jqxhr = jQuery.get("/service-proxy-auth")
- .fail(function() { alert("service proxy authentifiction failed"); });
-
+ .fail(function() {
+ alert("service proxy authentification failed, give up!");
+ })
+ .success(function(data) {
+ if (!jQuery.isXMLDoc(data)) {
+ alert("service proxy auth response document is not valid XML document, give up!");
+ return;
+ }
+ var status = $(data).find("status");
+ if (status.text() != "OK") {
+ alert("service proxy auth repsonse status: " + status.text() + ", give up!");
+ return;
+ }
+ });
});