Skip to content

Commit

Permalink
Merge pull request #469 from chughts/082
Browse files Browse the repository at this point in the history
082
  • Loading branch information
chughts committed Jan 19, 2020
2 parents 4b21478 + 1137d52 commit 2310149
Show file tree
Hide file tree
Showing 15 changed files with 877 additions and 796 deletions.
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,18 @@ Node-RED Watson Nodes for IBM Cloud

<a href="https://cla-assistant.io/watson-developer-cloud/node-red-node-watson"><img src="https://cla-assistant.io/readme/badge/watson-developer-cloud/node-red-node-watson" alt="CLA assistant" /></a>

### New in version 0.8.2
- Node-RED & IBM-Watson & Use of promises on API invocation & IAM URL construct migration & Removal of default endpoint of
- Document Translator node
- Discovery node
- Discovery Document Loader node
- Discovery Query Builder node
- Assistant V1 Workspace Manager node
- List Expansion list, and List Training data modes added to Discovery node
- Fix to Create Classifier mode in NLC node

### New in version 0.8.1
- Node-RED & IBM-Watson & Use of promises on API invokation & IAM URL construct migration & Removal of default endpoint of
- Node-RED & IBM-Watson & Use of promises on API invocation & IAM URL construct migration & Removal of default endpoint of
- Speech to Text node
- Speech to Text Corpus Builder node
- Natural Language Understanding node
Expand All @@ -33,7 +43,7 @@ During the migration there will be a dependancy on both modules.
- Bump dependancy on node to >=10.0.0
- Bump dependancy on cfenv, request, file-type
- Bump dependancy on ibm-cloud-sdk-core to 0.3.7 (need to stay on 0.x, for STT Streaming to work)
- Node-RED & IBM-Watson & Use of promises on API invokation & IAM URL construct migration & Removal of default endpoint of
- Node-RED & IBM-Watson & Use of promises on API invocation & IAM URL construct migration & Removal of default endpoint of
- Tone Analyzer node.
- Personality Insights node.
- Visual Recognition V3 node
Expand All @@ -46,7 +56,7 @@ During the migration there will be a dependancy on both modules.
- Update language lists for STT, TTS, Language Translator and Document Translator Nodes

### Watson Nodes for Node-RED
A collection of nodes to interact with the IBM Watson services in [IBM Cloud](http://bluemix.net).
A collection of nodes to interact with the IBM Watson services in [IBM Cloud](http://cloud.ibm.com).

# Nodes

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-red-node-watson",
"version": "0.8.1",
"version": "0.8.2",
"description": "A collection of Node-RED nodes for IBM Watson services",
"dependencies": {
"async": "^1.5.2",
Expand All @@ -24,7 +24,7 @@
"license": "Apache-2.0",
"keywords": [
"node-red",
"bluemix",
"ibm-cloud",
"watson"
],
"contributors": [
Expand Down
24 changes: 5 additions & 19 deletions services/assistant/v1-workspace-manager.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,12 @@
</div>

<div class="form-row credentials">
<label>&nbsp;</label>
<input type="checkbox" id="node-input-cwm-default-endpoint" style="display: inline-block; width: auto; vertical-align: top;">
<label for="node-input-cwm-default-endpoint" style="width: 70%;"> Use Default Service Endpoint</label>
</div>
<div class="form-row">
<label for="node-input-cwm-service-endpoint"><i class="fa fa-tag"></i> Service Endpoint</label>
<input type="text" id="node-input-cwm-service-endpoint" placeholder="https://gateway.watsonplatform.net/assistant/api">
</div>

<div class="form-row">
<label for="node-input-cwm-custom-mode"><i class="fa fa-book"></i> Detect: </label>
<label for="node-input-cwm-custom-mode"><i class="fa fa-book"></i> Mode: </label>
<select type="text" id="node-input-cwm-custom-mode" style="display: inline-block; width: 70%;">
<option value="listWorkspaces">List Workspaces</option>
<option value="getWorkspace">Get Workspace Details</option>
Expand Down Expand Up @@ -341,7 +336,7 @@
defining the content of the updates
should be passed in
as <code>msg.payload</code>. Fields to be updated need a
<code>new_</code> prefix as part of their key.
<code>new_</code> prefix as part of their key.
</p>
</li>
<li>Delete Dialog Node
Expand Down Expand Up @@ -438,7 +433,6 @@
// moved in if there is a clash with other nodes.
var cv1wm = new CV1WM();
cv1wm.mode_selected = null;
cv1wm.endpoint_required = false;

cv1wm.showSelectedFields = function(fields) {
for (i = 0; i < fields.length; i++) {
Expand All @@ -463,8 +457,7 @@
+ ', #node-input-cwm-entity'
+ ', #node-input-cwm-entity-value'
+ ', #node-input-cwm-dialog-node'
+ ', #node-input-cwm-export-content'
+ ', #node-input-cwm-service-endpoint');
+ ', #node-input-cwm-export-content');

cv1wm.hideSelectedFields(fields);
}
Expand Down Expand Up @@ -546,9 +539,7 @@
case 'createWorkspace':
break;
}
if (cv1wm.endpoint_required) {
fields.push('#node-input-cwm-service-endpoint');
}

cv1wm.showSelectedFields(fields);
}

Expand All @@ -558,10 +549,6 @@
cv1wm.mode_selected = $('#node-input-cwm-custom-mode').val();
cv1wm.processSelectedMethod(cv1wm.mode_selected);
});
$('#node-input-cwm-default-endpoint').change(function () {
cv1wm.endpoint_required = ! $('#node-input-cwm-default-endpoint').prop('checked');
cv1wm.processSelectedMethod(cv1wm.mode_selected);
});
}

// This is the on edit prepare function, which will be invoked everytime the dialog
Expand Down Expand Up @@ -600,8 +587,7 @@
'cwm-entity-value': {value:""},
'cwm-dialog-node': {value:""},
'cwm-export-content': {value:false},
'cwm-default-endpoint' :{value: true},
'cwm-service-endpoint' :{value: 'https://gateway.watsonplatform.net/assistant/api'}
'cwm-service-endpoint' :{value: ''}
},
credentials: {
username: {type:'text'},
Expand Down
Loading

0 comments on commit 2310149

Please sign in to comment.