|
38 | 38 | </div> |
39 | 39 |
|
40 | 40 | <div class="form-row credentials"> |
41 | | - <label> </label> |
42 | | - <input type="checkbox" id="node-input-default-endpoint" style="display: inline-block; width: auto; vertical-align: top;"> |
43 | | - <label for="node-input-default-endpoint" style="width: 70%;"> Use Default Service Endpoint</label> |
44 | | - </div> |
45 | | - <div class="form-row"> |
46 | 41 | <label for="node-input-service-endpoint"><i class="fa fa-tag"></i> Service Endpoint</label> |
47 | 42 | <input type="text" id="node-input-service-endpoint" placeholder="https://gateway.watsonplatform.net/discovery/api"> |
48 | 43 | </div> |
|
66 | 61 | <option value="createConfiguration">Create new configuration</option> |
67 | 62 | <option value="listConfigurations">List existing configurations</option> |
68 | 63 | <option value="getConfigurationDetails">Retrieve configuration details</option> |
| 64 | + <option value="deleteConfiguration">Delete configuration</option> |
69 | 65 | </select> |
70 | 66 | </div> |
71 | 67 |
|
|
74 | 70 | <input type="text" id="node-input-environmentname" placeholder=""> |
75 | 71 | </div> |
76 | 72 | <div class="form-row"> |
77 | | - <label for="node-input-environment_id"><i class="fa fa-tag"></i> Environment ID</label> |
78 | | - <input type="text" id="node-input-environment_id" placeholder=""> |
| 73 | + <label for="node-input-environmentId"><i class="fa fa-tag"></i> Environment ID</label> |
| 74 | + <input type="text" id="node-input-environmentId" placeholder=""> |
79 | 75 | </div> |
80 | 76 | <div class="form-row"> |
81 | 77 | <label for="node-input-collection_name"><i class="fa fa-tag"></i> Collection Name</label> |
82 | 78 | <input type="text" id="node-input-collection_name" placeholder=""> |
83 | 79 | </div> |
84 | 80 | <div class="form-row"> |
85 | | - <label for="node-input-collection_id"><i class="fa fa-tag"></i> Collection ID</label> |
86 | | - <input type="text" id="node-input-collection_id" placeholder=""> |
| 81 | + <label for="node-input-collectionId"><i class="fa fa-tag"></i> Collection ID</label> |
| 82 | + <input type="text" id="node-input-collectionId" placeholder=""> |
87 | 83 | </div> |
88 | 84 | <div class="form-row"> |
89 | 85 | <label for="node-input-configurationname"><i class="fa fa-tag"></i> Configuration Name</label> |
90 | 86 | <input type="text" id="node-input-configurationname" placeholder=""> |
91 | 87 | </div> |
92 | 88 | <div class="form-row"> |
93 | | - <label for="node-input-configuration_id"><i class="fa fa-tag"></i> Configuration ID</label> |
94 | | - <input type="text" id="node-input-configuration_id" placeholder=""> |
| 89 | + <label for="node-input-configurationId"><i class="fa fa-tag"></i> Configuration ID</label> |
| 90 | + <input type="text" id="node-input-configurationId" placeholder=""> |
95 | 91 | </div> |
96 | 92 |
|
97 | 93 | <div class="form-row"> |
|
208 | 204 | <p>For this method the node needs an Environment ID as input. |
209 | 205 | </p> |
210 | 206 | <p>The environment being requested can be overridden by specifying the search id |
211 | | - in <code>msg.discoveryparams.environment_id</code> |
| 207 | + in <code>msg.discoveryparams.environmentId</code> |
212 | 208 | </p> |
213 | 209 | <p>Node output : </p> |
214 | 210 | <ul> |
|
221 | 217 | Description, Configuration ID and Language Code as input. |
222 | 218 | </p> |
223 | 219 | <p>The fields can be overridden by specifying |
224 | | - in <code>msg.discoveryparams.environment_id</code> |
| 220 | + in <code>msg.discoveryparams.environmentId</code> |
225 | 221 | , <code>msg.discoveryparams.collection_name</code> |
226 | 222 | , <code>msg.discoveryparams.description</code> |
227 | | - , <code>msg.discoveryparams.configuration_id</code> |
| 223 | + , <code>msg.discoveryparams.configurationId</code> |
228 | 224 | and <code>msg.discoveryparams.language_code</code> |
229 | 225 | </p> |
230 | 226 |
|
|
239 | 235 | <p><b>List Existing Collections</b><p> |
240 | 236 | <p>For this method the node needs an Environment ID as input.</p> |
241 | 237 | <p>The Environment ID for the collection list being requested can be overridden by specifying the search id |
242 | | - in <code>msg.discoveryparams.environment_id</code> |
| 238 | + in <code>msg.discoveryparams.environmentId</code> |
243 | 239 | </p> |
244 | 240 | <p>Node output : </p> |
245 | 241 | <ul> |
|
254 | 250 | </p> |
255 | 251 | <p>The collection being requested can be overridden by specifying the |
256 | 252 | search ids in |
257 | | - <code>msg.discoveryparams.environment_id</code> |
258 | | - and <code>msg.discoveryparams.collection_id</code> |
| 253 | + <code>msg.discoveryparams.environmentId</code> |
| 254 | + and <code>msg.discoveryparams.collectionId</code> |
259 | 255 | </p> |
260 | 256 | <p>Node output : </p> |
261 | 257 | <ul> |
|
270 | 266 | configuration with the given name.</p> |
271 | 267 | <p>The Environment ID for the configuration list being requested can be |
272 | 268 | overridden by specifying the environment id in |
273 | | - <code>msg.discoveryparams.environment_id</code> |
| 269 | + <code>msg.discoveryparams.environmentId</code> |
274 | 270 | The configuration name can be overridden by specifying the name inspect |
275 | 271 | <code>msg.discoveryparams.configuration_name</code> |
276 | 272 | </p> |
|
288 | 284 | <p>The Environment and Configuration IDs for the configuration being |
289 | 285 | requested can be |
290 | 286 | overridden by specifying the environment id in |
291 | | - <code>msg.discoveryparams.environment_id</code> |
| 287 | + <code>msg.discoveryparams.environmentId</code> |
292 | 288 | and the configuration id in |
293 | | - <code>msg.discoveryparams.configuration_id</code> |
| 289 | + <code>msg.discoveryparams.configurationId</code> |
294 | 290 | </p> |
295 | 291 | <p>Node output : </p> |
296 | 292 | <ul> |
|
299 | 295 | </ul> |
300 | 296 | </li> |
301 | 297 | <br/> |
| 298 | + <li> |
| 299 | + <p><b>Delete Configuration</b><p> |
| 300 | + <p>For this method node needs an Environment ID and Configuration ID as input.</p> |
| 301 | + <p>The Environment and Configuration IDs for the configuration being |
| 302 | + deleted can be |
| 303 | + overridden by specifying the environment id in |
| 304 | + <code>msg.discoveryparams.environmentId</code> |
| 305 | + and the configuration id in |
| 306 | + <code>msg.discoveryparams.configurationId</code> |
| 307 | + </p> |
| 308 | + <p>Node output : </p> |
| 309 | + <ul> |
| 310 | + <li><code>msg.configuration</code> : Details the |
| 311 | + deleted configuration.</li> |
| 312 | + </ul> |
| 313 | + </li> |
| 314 | + <br/> |
302 | 315 | <li> |
303 | 316 | <p><b>Search in Collection</b><p> |
304 | 317 | <p>For this method the node needs an Environment ID and Collection ID as input. |
305 | 318 | </p> |
306 | 319 | <p>The collection being requested can be overridden by specifying the |
307 | 320 | search ids in |
308 | | - <code>msg.discoveryparams.environment_id</code> |
309 | | - and <code>msg.discoveryparams.collection_id</code> |
| 321 | + <code>msg.discoveryparams.environmentId</code> |
| 322 | + and <code>msg.discoveryparams.collectionId</code> |
310 | 323 | </p> |
311 | 324 | <p>Optionally you can specify the number of documents to retrieve, a |
312 | 325 | query to find the most relevant search results, whether to |
|
351 | 364 | //disV1.abc = 'abc'; |
352 | 365 | disV1.hideAll = function() { |
353 | 366 | $('#node-input-environmentname').parent().hide(); |
354 | | - $('#node-input-environment_id').parent().hide(); |
| 367 | + $('#node-input-environmentId').parent().hide(); |
355 | 368 | $('#node-input-collection_name').parent().hide(); |
356 | | - $('#node-input-collection_id').parent().hide(); |
| 369 | + $('#node-input-collectionId').parent().hide(); |
357 | 370 | $('#node-input-configurationname').parent().hide(); |
358 | | - $('#node-input-configuration_id').parent().hide(); |
| 371 | + $('#node-input-configurationId').parent().hide(); |
359 | 372 | $('#node-input-language_code').parent().hide(); |
360 | 373 | $('#node-input-count').parent().hide(); |
361 | 374 | $('#node-input-passages').parent().hide(); |
|
387 | 400 | fields.push('#node-input-environmentname'); |
388 | 401 | break; |
389 | 402 | case 'createCollection': |
390 | | - fields.push('#node-input-environment_id' |
391 | | - + ', #node-input-configuration_id' |
| 403 | + fields.push('#node-input-environmentId' |
| 404 | + + ', #node-input-configurationId' |
392 | 405 | + ', #node-input-language_code' |
393 | 406 | + ', #node-input-collection_name' |
394 | 407 | + ', #node-input-description'); |
395 | 408 | break; |
396 | | - case 'createConfiguration': |
| 409 | + case 'listConfigurations': |
397 | 410 | case 'getEnvironmentDetails': |
398 | 411 | case 'listCollections': |
399 | 412 | case 'deleteEnvironment': |
400 | | - fields.push('#node-input-environment_id'); |
| 413 | + fields.push('#node-input-environmentId'); |
401 | 414 | break; |
402 | 415 | case 'getCollectionDetails': |
403 | 416 | case 'deleteCollection': |
404 | | - fields.push('#node-input-environment_id' |
405 | | - + ', #node-input-collection_id'); |
| 417 | + fields.push('#node-input-environmentId' |
| 418 | + + ', #node-input-collectionId'); |
406 | 419 | break; |
407 | | - case 'listConfigurations': |
408 | | - fields.push('#node-input-environment_id' |
| 420 | + case 'createConfiguration': |
| 421 | + fields.push('#node-input-environmentId' |
409 | 422 | + ', #node-input-configurationname'); |
410 | 423 | break; |
411 | 424 | case 'getConfigurationDetails': |
412 | | - fields.push('#node-input-environment_id' |
413 | | - + ', #node-input-configuration_id'); |
| 425 | + case 'deleteConfiguration': |
| 426 | + fields.push('#node-input-environmentId' |
| 427 | + + ', #node-input-configurationId'); |
414 | 428 | break; |
415 | 429 | case 'query': |
416 | | - case 'queryNotices': |
417 | | - fields.push('#node-input-environment_id' |
418 | | - + ', #node-input-collection_id' |
| 430 | + case 'queryNotices': |
| 431 | + fields.push('#node-input-environmentId' |
| 432 | + + ', #node-input-collectionId' |
419 | 433 | + ', #node-input-count' |
420 | 434 | + ', #node-input-passages' |
421 | 435 | + ', #node-input-nlp_query' |
|
433 | 447 | var method = $('#node-input-discovery-method').val(); |
434 | 448 | disV1.processSelectedMethod(method); |
435 | 449 | }); |
436 | | - |
437 | | - $('input#node-input-default-endpoint').change(function () { |
438 | | - var checked = $('input#node-input-default-endpoint').prop('checked') |
439 | | - if (checked) { |
440 | | - $('#node-input-service-endpoint').parent().hide(); |
441 | | - } else { |
442 | | - $('#node-input-service-endpoint').parent().show(); |
443 | | - } |
444 | | - }); |
445 | 450 | } |
446 | 451 |
|
447 | 452 | disV1.checkForPrepare = function () { |
|
469 | 474 | defaults: { |
470 | 475 | name: {value: ''}, |
471 | 476 | environmentname: {value: ''}, |
472 | | - environment_id: {value: ''}, |
473 | | - collection_id: {value: ''}, |
| 477 | + environmentId: {value: ''}, |
| 478 | + collectionId: {value: ''}, |
474 | 479 | configurationname: {value: ''}, |
475 | | - configuration_id: {value: ''}, |
| 480 | + configurationId: {value: ''}, |
476 | 481 | language_code: {value: 'en'}, |
477 | 482 | collection_name: {value: ''}, |
478 | 483 | count: {value: '1'}, |
|
485 | 490 | description: {value: ''}, |
486 | 491 | size: {value: 'LT'}, |
487 | 492 | 'discovery-method': {value:'query'}, |
488 | | - 'default-endpoint' :{value: true}, |
489 | | - 'service-endpoint' :{value: 'https://gateway.watsonplatform.net/discovery/api'} |
| 493 | + 'service-endpoint' :{value: ''} |
490 | 494 | }, |
491 | 495 | credentials: { |
492 | 496 | username: {type:'text'}, |
|
0 commit comments