|
From: <tob...@us...> - 2014-06-17 19:02:39
|
Revision: 8498
http://sourceforge.net/p/bigdata/code/8498
Author: tobycraig
Date: 2014-06-17 19:02:35 +0000 (Tue, 17 Jun 2014)
Log Message:
-----------
Added LBS toggle
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-06-17 18:51:24 UTC (rev 8497)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-war/src/html/index.html 2014-06-17 19:02:35 UTC (rev 8498)
@@ -65,6 +65,7 @@
<div class="advanced-features">
<input type="checkbox" id="update-analytic"> <label for="update-analytic">Analytic</label>
<input type="checkbox" id="update-monitor"> <label for="update-monitor">Monitor</label>
+ <input type="checkbox" id="use-lbs-update" class="use-lbs"> <label for="use-lbs-update">LBS</label>
</div>
<hr class="shadow">
<button id="update-update">Update</button>
@@ -98,6 +99,7 @@
<input type="checkbox" id="query-details"> <label for="query-explain">(Details)</label>
<input type="checkbox" name="analytic" value="true" id="query-analytic"> <label for="query-analytic">Analytic</label>
<input type="checkbox" name="RTO" value="true" id="query-rto"> <label for="query-rto">Runtime Query Optimizer</label>
+ <input type="checkbox" id="use-lbs-query" class="use-lbs"> <label for="use-lbs-query">LBS</label>
</div>
<hr class="shadow">
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-06-17 18:51:24 UTC (rev 8497)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-war/src/html/js/workbench.js 2014-06-17 19:02:35 UTC (rev 8498)
@@ -1,13 +1,7 @@
$(function() {
// global variables
-var DEFAULT_NAMESPACE, NAMESPACE, NAMESPACES_READY, NAMESPACE_SHORTCUTS, FILE_CONTENTS, QUERY_RESULTS;
-// LBS URLs do not currently work with non-HA and HA1 setups. Set this to true to use LBS URLs
-if(false) {
- var RW_URL_PREFIX = '/bigdata/LBS/leader/', RO_URL_PREFIX = '/bigdata/LBS/read/';
-} else {
- var RW_URL_PREFIX = '/bigdata/', RO_URL_PREFIX = '/bigdata/';
-}
+var RW_URL_PREFIX, RO_URL_PREFIX, DEFAULT_NAMESPACE, NAMESPACE, NAMESPACES_READY, NAMESPACE_SHORTCUTS, FILE_CONTENTS, QUERY_RESULTS;
var CODEMIRROR_DEFAULTS, EDITORS = {}, ERROR_LINE_MARKERS = {}, ERROR_CHARACTER_MARKERS = {};
var PAGE_SIZE = 50, TOTAL_PAGES, CURRENT_PAGE;
var NAMESPACE_PARAMS = {
@@ -27,6 +21,19 @@
// debug to access closure variables
$('html, textarea, select').bind('keydown', 'ctrl+d', function() { debugger; });
+function useLBS() {
+ if(this.checked) {
+ RW_URL_PREFIX = '/bigdata/LBS/leader/';
+ RO_URL_PREFIX = '/bigdata/LBS/read/';
+ } else {
+ RW_URL_PREFIX = '/bigdata/';
+ RO_URL_PREFIX = '/bigdata/';
+ }
+ $('.use-lbs').prop('checked', this.checked);
+}
+useLBS(true);
+$('.use-lbs').change(useLBS);
+
/* Modal functions */
function showModal(id) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|