|
From: <tob...@us...> - 2014-05-03 01:14:51
|
Revision: 8170
http://sourceforge.net/p/bigdata/code/8170
Author: tobycraig
Date: 2014-05-03 01:14:48 +0000 (Sat, 03 May 2014)
Log Message:
-----------
Quick fix for status tab in HA mode. Ideally data would be sent as JSON rather than HTML.
Modified Paths:
--------------
branches/BIGDATA_RELEASE_1_3_0/bigdata-war/src/html/index.html
branches/BIGDATA_RELEASE_1_3_0/bigdata-war/src/html/js/workbench.js
Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-war/src/html/index.html
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-war/src/html/index.html 2014-05-02 22:50:59 UTC (rev 8169)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-war/src/html/index.html 2014-05-03 01:14:48 UTC (rev 8170)
@@ -172,10 +172,7 @@
<div class="tab" id="status-tab">
<div class="box">
- <p>Accepted query count: <span id="accepted-query-count"></span></p>
- <p>Running query count: <span id="running-query-count"></span></p>
- <p>Show <a href="#" id="show-queries">queries</a>, <a href="#" id="show-query-details">query details</a>.</p>
- <pre id="status-numbers"></pre>
+ <div id="status-text"></div>
<ul id="running-queries"></ul>
</div>
Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-war/src/html/js/workbench.js
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-war/src/html/js/workbench.js 2014-05-02 22:50:59 UTC (rev 8169)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-war/src/html/js/workbench.js 2014-05-03 01:14:48 UTC (rev 8170)
@@ -1063,12 +1063,9 @@
}
function getStatusNumbers(data) {
- var accepted = data.text().match(/Accepted query count=(\d+)/)[1];
- var running = data.text().match(/Running query count=(\d+)/)[1];
- var numbers = $(data).find('pre')[0].textContent;
- $('#accepted-query-count').html(accepted);
- $('#running-query-count').html(running);
- $('#status-numbers').html(numbers);
+ $('#status-text').html(data);
+ $('#status-text a').eq(1).click(function(e) { e.preventDefault(); showQueries(false); return false; });
+ $('#status-text a').eq(2).click(function(e) { e.preventDefault(); showQueries(true); return false; });
}
$('#show-queries').click(function(e) {
@@ -1100,6 +1097,10 @@
e = $(e);
// get numbers string, which includes cancel link
var form = e.next();
+ // HA mode has h1 before running queries
+ if(form[0].tagName != 'FORM') {
+ return;
+ }
var numbers = form.find('p')[0].textContent;
// remove cancel link
numbers = numbers.substring(0, numbers.lastIndexOf(','));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|