File tree Expand file tree Collapse file tree 3 files changed +35
-2
lines changed
java/com/parallax/server/blocklyprop/jsp Expand file tree Collapse file tree 3 files changed +35
-2
lines changed Original file line number Diff line number Diff line change @@ -41,5 +41,18 @@ public static boolean isOauthEnabled(String oauthProvider) {
4141 return configuration .getBoolean ("oauth." + oauthProvider + ".enabled" , true );
4242 }
4343 }
44+
45+ // Use experimental menu items in test environment
46+ public static boolean isExperimentalMenu (Boolean state ) {
47+ try {
48+ if (configuration .getBoolean ("experimental.menu" ) == true ) {
49+ return true ;
50+ }
51+ } catch (java .util .NoSuchElementException ex ) {
52+ return false ;
53+ }
54+
55+ return false ;
56+ }
4457
4558}
Original file line number Diff line number Diff line change 2222 <function-class >com.parallax.server.blocklyprop.jsp.Properties</function-class >
2323 <function-signature >boolean isOauthEnabled(java.lang.String)</function-signature >
2424 </function >
25- </taglib >
25+
26+ <!-- Return flag to indicate if experimental menus are enabled -->
27+ <function >
28+ <name >experimentalmenu</name >
29+ <function-class >com.parallax.server.blocklyprop.jsp.Properties</function-class >
30+ <function-signature >boolean isExperimentalMenu(java.lang.Boolean)</function-signature >
31+ </function >
32+ </taglib >
Original file line number Diff line number Diff line change 11<%@page contentType =" text/html" pageEncoding =" UTF-8" %>
22<%@ include file =" /WEB-INF/includes/include.jsp" %>
33
4+ <!-- Support for experimental blocks in Demo builds -->
5+ <!-- See developer notes to use this feature -->
6+ <c:set var =" experimental" scope =" page" value =" ${ properties: experimentalmenu(false ) } " />
7+
48<html >
59 <head >
610 <meta charset =" utf-8" >
606610 </value >
607611 </block >
608612 </category >
609-
613+ <c:choose >
614+ <c:when test =" ${ experimental == true } " >
610615 <category name =" WX Module" >
611616 <category name =" Simple" >
612617 <block type =" wx_init" ></block >
674679 <block type =" wx_ip" ></block >
675680 </category >
676681 </category >
682+ </c:when >
683+ </c:choose >
677684
678685 <category name =" <fmt:message key=" category.communicate.xbee " />" >
679686 <block type =" xbee_setup" ></block >
949956 <category name =" <fmt:message key=" category.sensor-input.ping " />" >
950957 <block type =" sensor_ping" ></block >
951958 </category >
959+
960+ <c:choose >
961+ <c:when test =" ${ experimental == true } " >
952962 <category name =" <fmt:message key=" category.sensor-input.fingerprint " />" >
953963 <block type =" fp_scanner_init" ></block >
954964 <block type =" fp_scanner_add" >
960970 </block >
961971 <block type =" fp_scanner_scan" ></block >
962972 </category >
973+ </c:when >
974+ </c:choose >
975+
963976 <category name =" <fmt:message key=" category.sensor-input.hmc5883l " />" >
964977 <block type =" HMC5883L_init" ></block >
965978 <block type =" HMC5883L_read" ></block >
You can’t perform that action at this time.
0 commit comments