Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Nodejs.html #168

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions CEP_8.x/Samples/CEP_HTML_Test_Extension-8.0/html/Nodejs.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,22 @@
var dbType = 'mongodb';
var mongodbCollection = "";

function isNodeJSEnabled() {
if (typeof(cep_node) ​!== 'undefined') {
function isNodeJSEnabled()
{
if (typeof(cep_node) !== 'undefined')
{
//if require and process is available, it should be mixed context
if ((typeof(require) ​!== 'undefined') && (typeof(process) ​!== 'undefined')) {
if ((typeof(require) !== 'undefined') && (typeof(process) !== 'undefined'))
{
$('#result').val("Node.js is enabled with mixed-context mode");
}
else
{
$('#result').val("Node.js is enabled");
}
else {
$('#result').val("Node.js is enabled");
}
}
else
{
$('#result').val("Node.js is disabled");
}
}
Expand Down Expand Up @@ -353,7 +358,7 @@
<option value="mysql">MySQL</option>
</select>
<button name="btnConnect" id="btnConnect"> Connect to DB </button>
<div class='serverInfoDiv'>
<div class="serverInfoDiv">
<table>
<tr>
<td><label for="servAddr">ServerAddress:</label></td>
Expand All @@ -374,7 +379,7 @@
</div>
<div>
<label id="userInputLabel"></label>
<select name="selectMongoAPI" id="selectMongoAPI" class='selectMongoAPI'>
<select name="selectMongoAPI" id="selectMongoAPI" class="selectMongoAPI">
<option value="insert">Insert an item:{"title" : "hello world"}</option>
<option value="find">Find an item whose value is {"title" : "hello world"} or {"title" : "hello world new"}</option>
<option value="update">Update value of item to {"title" : "hello world new"}</option>
Expand All @@ -394,4 +399,4 @@
</div>
</div>
</body>
</html>
</html>