Skip to content

Commit 3f1634f

Browse files
committed
Merge pull request #100 from yrezgui/master
Change double to single quotes for Retrieve and Rank nodes
2 parents 001821b + fce1070 commit 3f1634f

2 files changed

Lines changed: 139 additions & 140 deletions

File tree

services/retrieve_and_rank/v1.html

Lines changed: 95 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,11 @@
2828

2929
<script type="text/javascript">
3030
(function() {
31-
console.log("hello");
3231
RED.nodes.registerType('watson-retrieve-rank-credentials',{
3332
category: 'config',
34-
defaults: {
35-
username:{value: ""},
36-
password:{value: ""}
33+
defaults: {
34+
username:{value: ''},
35+
password:{value: ''}
3736
},
3837
label: function() {
3938
return 'Retrieve and Rank Credentials';
@@ -89,21 +88,21 @@
8988
RED.nodes.registerType('watson-retrieve-rank-create-cluster', {
9089
category: 'IBM Watson',
9190
defaults: {
92-
name: {value: ""},
93-
servicecreds: {value: "", type: 'watson-retrieve-rank-credentials', required: false},
94-
clustername: {value: ""},
95-
clustersize: {value: "free"}
91+
name: {value: ''},
92+
servicecreds: {value: '', type: 'watson-retrieve-rank-credentials', required: false},
93+
clustername: {value: ''},
94+
clustersize: {value: 'free'}
9695
},
97-
color: "rgb(85, 150, 230)",
96+
color: 'rgb(85, 150, 230)',
9897
inputs: 1,
9998
outputs: 1,
100-
icon: "RetrieveRank.png",
101-
paletteLabel: "retrieve and rank create cluster",
99+
icon: 'RetrieveRank.png',
100+
paletteLabel: 'retrieve and rank create cluster',
102101
label: function() {
103-
return this.name || "retrieve and rank create cluster";
102+
return this.name || 'retrieve and rank create cluster';
104103
},
105104
labelStyle: function() {
106-
return this.name ? "node_label_italic" : "";
105+
return this.name ? 'node_label_italic' : '';
107106
},
108107
oneditprepare: function() {
109108
$.getJSON('watson-retrieve-and-rank/vcap/').done(function (service) {
@@ -164,25 +163,25 @@
164163
RED.nodes.registerType('watson-retrieve-rank-cluster-settings', {
165164
category: 'IBM Watson',
166165
defaults: {
167-
name: {value: ""},
168-
mode: {value: "list"},
169-
servicecreds: {value: "", type: 'watson-retrieve-rank-credentials', required: false},
170-
clusterid: {value: ""}
166+
name: {value: ''},
167+
mode: {value: 'list'},
168+
servicecreds: {value: '', type: 'watson-retrieve-rank-credentials', required: false},
169+
clusterid: {value: ''}
171170
},
172171
credentials: {
173-
username: {type:"text"},
174-
password: {type:"password"}
172+
username: {type:'text'},
173+
password: {type:'password'}
175174
},
176-
color: "rgb(85, 150, 230)",
175+
color: 'rgb(85, 150, 230)',
177176
inputs: 1,
178177
outputs: 1,
179-
icon: "RetrieveRank.png",
180-
paletteLabel: "retrieve and rank cluster settings",
178+
icon: 'RetrieveRank.png',
179+
paletteLabel: 'retrieve and rank cluster settings',
181180
label: function() {
182-
return this.name || "retrieve and rank cluster settings";
181+
return this.name || 'retrieve and rank cluster settings';
183182
},
184183
labelStyle: function() {
185-
return this.name ? "node_label_italic" : "";
184+
return this.name ? 'node_label_italic' : '';
186185
},
187186
oneditprepare: function() {
188187
$('#node-input-mode').change(function () {
@@ -191,7 +190,7 @@
191190
$('.form-row.mode.clusterid').hide();
192191
} else {
193192
$('.form-row.mode.clusterid').show();
194-
}
193+
}
195194
});
196195
$.getJSON('watson-retrieve-and-rank/vcap/').done(function (service) {
197196
$('.servicecreds').toggle(!service);
@@ -243,21 +242,21 @@
243242
RED.nodes.registerType('watson-retrieve-rank-upload-solr-configuration', {
244243
category: 'IBM Watson',
245244
defaults: {
246-
name: {value: ""},
247-
servicecreds: {value: "", type: 'watson-retrieve-rank-credentials', required: false},
248-
clusterid: {value: "", required: true},
249-
configname: {value: "", required: true}
245+
name: {value: ''},
246+
servicecreds: {value: '', type: 'watson-retrieve-rank-credentials', required: false},
247+
clusterid: {value: '', required: true},
248+
configname: {value: '', required: true}
250249
},
251-
color: "rgb(85, 150, 230)",
250+
color: 'rgb(85, 150, 230)',
252251
inputs: 1,
253252
outputs: 1,
254-
icon: "RetrieveRank.png",
255-
paletteLabel: "retrieve and rank upload solr configuration",
253+
icon: 'RetrieveRank.png',
254+
paletteLabel: 'retrieve and rank upload solr configuration',
256255
label: function() {
257-
return this.name || "retrieve and rank upload solr configuration";
256+
return this.name || 'retrieve and rank upload solr configuration';
258257
},
259258
labelStyle: function() {
260-
return this.name ? "node_label_italic" : "";
259+
return this.name ? 'node_label_italic' : '';
261260
},
262261
oneditprepare: function() {
263262
$.getJSON('watson-retrieve-and-rank/vcap/').done(function (service) {
@@ -322,23 +321,23 @@
322321
RED.nodes.registerType('watson-retrieve-rank-solr-configuration-settings', {
323322
category: 'IBM Watson',
324323
defaults: {
325-
name: {value: ""},
326-
servicecreds: {value: "", type: 'watson-retrieve-rank-credentials', required: false},
327-
clusterid: {value: "", required: true},
328-
mode: {value: "list"},
329-
configname: {value: ""}
330-
324+
name: {value: ''},
325+
servicecreds: {value: '', type: 'watson-retrieve-rank-credentials', required: false},
326+
clusterid: {value: '', required: true},
327+
mode: {value: 'list'},
328+
configname: {value: ''}
329+
331330
},
332-
color: "rgb(85, 150, 230)",
331+
color: 'rgb(85, 150, 230)',
333332
inputs: 1,
334333
outputs: 1,
335-
icon: "RetrieveRank.png",
336-
paletteLabel: "retrieve and rank solr configuration settings",
334+
icon: 'RetrieveRank.png',
335+
paletteLabel: 'retrieve and rank solr configuration settings',
337336
label: function() {
338-
return this.name || "retrieve and rank solr configuration settings";
337+
return this.name || 'retrieve and rank solr configuration settings';
339338
},
340339
labelStyle: function() {
341-
return this.name ? "node_label_italic" : "";
340+
return this.name ? 'node_label_italic' : '';
342341
},
343342
oneditprepare: function() {
344343
$('#node-input-mode').change(function () {
@@ -347,7 +346,7 @@
347346
$('.form-row.mode.configname').hide();
348347
} else {
349348
$('.form-row.mode.configname').show();
350-
}
349+
}
351350
});
352351
$.getJSON('watson-retrieve-and-rank/vcap/').done(function (service) {
353352
$('.servicecreds').toggle(!service);
@@ -398,7 +397,7 @@
398397
<label for="node-input-configname"><i class="fa fa-tag"></i> Configuration Name</label>
399398
<input type="text" id="node-input-configname" placeholder="Configuration Name">
400399
</div>
401-
400+
402401
</script>
403402

404403
<script type="text/x-red" data-help-name="watson-retrieve-rank-solr-collection">
@@ -419,24 +418,24 @@
419418
RED.nodes.registerType('watson-retrieve-rank-solr-collection', {
420419
category: 'IBM Watson',
421420
defaults: {
422-
name: {value: ""},
423-
servicecreds: {value: "", type: 'watson-retrieve-rank-credentials', required: false},
424-
clusterid: {value: "", required: true},
425-
collectionname: {value: "", required: true},
426-
mode: {value: "create"},
427-
configname: {value: ""}
428-
429-
},
430-
color: "rgb(85, 150, 230)",
421+
name: {value: ''},
422+
servicecreds: {value: '', type: 'watson-retrieve-rank-credentials', required: false},
423+
clusterid: {value: '', required: true},
424+
collectionname: {value: '', required: true},
425+
mode: {value: 'create'},
426+
configname: {value: ''}
427+
428+
},
429+
color: 'rgb(85, 150, 230)',
431430
inputs: 1,
432431
outputs: 1,
433-
icon: "RetrieveRank.png",
434-
paletteLabel: "retrieve and rank solr collection",
432+
icon: 'RetrieveRank.png',
433+
paletteLabel: 'retrieve and rank solr collection',
435434
label: function() {
436-
return this.name || "retrieve and rank solr collection";
435+
return this.name || 'retrieve and rank solr collection';
437436
},
438437
labelStyle: function() {
439-
return this.name ? "node_label_italic" : "";
438+
return this.name ? 'node_label_italic' : '';
440439
},
441440
oneditprepare: function() {
442441
$('#node-input-mode').change(function () {
@@ -445,7 +444,7 @@
445444
$('.form-row.mode.configname').show();
446445
} else {
447446
$('.form-row.mode.configname').hide();
448-
}
447+
}
449448
});
450449
$.getJSON('watson-retrieve-and-rank/vcap/').done(function (service) {
451450
$('.servicecreds').toggle(!service);
@@ -483,9 +482,9 @@
483482
<script type="text/x-red" data-help-name="watson-retrieve-rank-create-ranker">
484483
<p>The IBM Watson™ Retrieve and Rank service combines two information retrieval components in a single service: the power of Apache Solr and a sophisticated machine learning capability. This combination provides users with more relevant results by automatically reranking them by using these machine learning algorithms.</p>
485484
<p>The create ranker node allows a ranker to be trained from <code>.csv</code> training data. The training data should be passed in as a <b>Buffer</b> on <code>msg.payload</code>. </p>
486-
485+
487486
<p>Once triggered, the ranker will then begin training. Once the ranker is available, the status underneath the node will change to <b>“Ranker Available”</b>.</p>
488-
487+
489488
<p>The ranker id is returned on <code>msg.payload</code>.</p>
490489
<p>For more information about the Retrieve and Rank service, read the <a href="https://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/retrieve-rank.html">documentation</a>.</p>
491490
</script>
@@ -495,20 +494,20 @@
495494
RED.nodes.registerType('watson-retrieve-rank-create-ranker', {
496495
category: 'IBM Watson',
497496
defaults: {
498-
name: {value: ""},
499-
servicecreds: {value: "", type: 'watson-retrieve-rank-credentials', required: false},
500-
rankername: {value: ""}
497+
name: {value: ''},
498+
servicecreds: {value: '', type: 'watson-retrieve-rank-credentials', required: false},
499+
rankername: {value: ''}
501500
},
502-
color: "rgb(85, 150, 230)",
501+
color: 'rgb(85, 150, 230)',
503502
inputs: 1,
504503
outputs: 1,
505-
icon: "RetrieveRank.png",
506-
paletteLabel: "retrieve and rank create ranker",
504+
icon: 'RetrieveRank.png',
505+
paletteLabel: 'retrieve and rank create ranker',
507506
label: function() {
508-
return this.name || "retrieve and rank create ranker";
507+
return this.name || 'retrieve and rank create ranker';
509508
},
510509
labelStyle: function() {
511-
return this.name ? "node_label_italic" : "";
510+
return this.name ? 'node_label_italic' : '';
512511
},
513512
oneditprepare: function() {
514513
$.getJSON('watson-retrieve-and-rank/vcap/').done(function (service) {
@@ -555,13 +554,13 @@
555554
<script type="text/x-red" data-help-name="watson-retrieve-rank-ranker-settings">
556555
<p>The IBM Watson™ Retrieve and Rank service combines two information retrieval components in a single service: the power of Apache Solr and a sophisticated machine learning capability. This combination provides users with more relevant results by automatically reranking them by using these machine learning algorithms.</p>
557556
<p>The ranker settings node provides information regarding the status of rankers within a service. The following queries are available:</p>
558-
557+
559558
<ul>
560559
<li><b>List Rankers</b> Retrieves the list of rankers for the service instance.</li>
561560
<li><b>Ranker Information</b> Returns status and other information about a ranker. The <code>ranker_id</code> is specified in the node configuration panel.</li>
562561
<li><b>Delete Ranker</b> Deletes a ranker. The <code>ranker_id</code> is specified in the node configuration panel.</li>
563562
</ul>
564-
563+
565564
<p>The result is returned on <code>msg.payload</code>.</p>
566565
<p>For more information about the Retrieve and Rank service, read the <a href="https://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/retrieve-rank.html">documentation</a>.</p>
567566
</script>
@@ -571,21 +570,21 @@
571570
RED.nodes.registerType('watson-retrieve-rank-ranker-settings', {
572571
category: 'IBM Watson',
573572
defaults: {
574-
name: {value: ""},
575-
servicecreds: {value: "", type: 'watson-retrieve-rank-credentials', required: false},
576-
mode: {value: "list"},
577-
rankerid: {value: ""}
573+
name: {value: ''},
574+
servicecreds: {value: '', type: 'watson-retrieve-rank-credentials', required: false},
575+
mode: {value: 'list'},
576+
rankerid: {value: ''}
578577
},
579-
color: "rgb(85, 150, 230)",
578+
color: 'rgb(85, 150, 230)',
580579
inputs: 1,
581580
outputs: 1,
582-
icon: "RetrieveRank.png",
583-
paletteLabel: "retrieve and rank ranker settings",
581+
icon: 'RetrieveRank.png',
582+
paletteLabel: 'retrieve and rank ranker settings',
584583
label: function() {
585-
return this.name || "retrieve and rank ranker settings";
584+
return this.name || 'retrieve and rank ranker settings';
586585
},
587586
labelStyle: function() {
588-
return this.name ? "node_label_italic" : "";
587+
return this.name ? 'node_label_italic' : '';
589588
},
590589
oneditprepare: function() {
591590
$('#node-input-mode').change(function () {
@@ -594,7 +593,7 @@
594593
$('.form-row.mode.rankerid').hide();
595594
} else {
596595
$('.form-row.mode.rankerid').show();
597-
}
596+
}
598597
});
599598
$.getJSON('watson-retrieve-and-rank/vcap/').done(function (service) {
600599
$('.servicecreds').toggle(!service);
@@ -647,7 +646,7 @@
647646
<script type="text/x-red" data-help-name="watson-retrieve-rank-search-and-rank">
648647
<p>The IBM Watson™ Retrieve and Rank service combines two information retrieval components in a single service: the power of Apache Solr and a sophisticated machine learning capability. This combination provides users with more relevant results by automatically reranking them by using these machine learning algorithms.</p>
649648
<p>The search and rank node returns reranked results for your query, where the query matches the <a href="https://cwiki.apache.org/confluence/display/solr/The+Standard+Query+Parser">Solr Standard Query Parser</a>. In the node configuration, you must specify:</p>
650-
649+
651650
<ul>
652651
<li><b>Cluster ID</b></li>
653652
<li><b>Collection Name</b></li>
@@ -663,23 +662,23 @@
663662
RED.nodes.registerType('watson-retrieve-rank-search-and-rank', {
664663
category: 'IBM Watson',
665664
defaults: {
666-
name: {value: ""},
667-
servicecreds: {value: "", type: 'watson-retrieve-rank-credentials', required: false},
668-
clusterid: {value: "", required: true},
669-
collectionname: {value: "", required: true},
670-
searchmode: {value: "search-and-rank"},
671-
rankerid: {value: ""}
665+
name: {value: ''},
666+
servicecreds: {value: '', type: 'watson-retrieve-rank-credentials', required: false},
667+
clusterid: {value: '', required: true},
668+
collectionname: {value: '', required: true},
669+
searchmode: {value: 'search-and-rank'},
670+
rankerid: {value: ''}
672671
},
673-
color: "rgb(85, 150, 230)",
672+
color: 'rgb(85, 150, 230)',
674673
inputs: 1,
675674
outputs: 1,
676-
icon: "RetrieveRank.png",
677-
paletteLabel: "retrieve and rank search and rank",
675+
icon: 'RetrieveRank.png',
676+
paletteLabel: 'retrieve and rank search and rank',
678677
label: function() {
679-
return this.name || "retrieve and rank search and rank";
678+
return this.name || 'retrieve and rank search and rank';
680679
},
681680
labelStyle: function() {
682-
return this.name ? "node_label_italic" : "";
681+
return this.name ? 'node_label_italic' : '';
683682
},
684683
oneditprepare: function() {
685684
$.getJSON('watson-retrieve-and-rank/vcap/').done(function (service) {
@@ -704,4 +703,4 @@
704703
}
705704
});
706705
})();
707-
</script>
706+
</script>

0 commit comments

Comments
 (0)