Skip to content

Commit

Permalink
some polish
Browse files Browse the repository at this point in the history
  • Loading branch information
epugh committed Nov 18, 2023
1 parent 0004c66 commit b54272f
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<div class="col-xs-4">
<img ng-if="ctrl.searchEndpoint.searchEngine" ng-src="images/{{ ctrl.searchEndpoint.searchEngine }}-icon.png" width="32px" />
{{ ctrl.searchEndpoint.searchEngine }}
&nbsp;{{ ctrl.searchEndpoint.searchEngine | searchEngineName }}
</div>

<div class="col-xs-4">
Expand Down
8 changes: 7 additions & 1 deletion app/assets/javascripts/controllers/wizardModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,13 @@ angular.module('QuepidApp')

searchEndpointSvc.list()
.then(function() {
$scope.searchEndpoints = searchEndpointSvc.searchEndpoints;
$scope.searchEndpoints = searchEndpointSvc.searchEndpoints;
$scope.hasStaticEndpoints = false;
angular.forEach($scope.searchEndpoints, function(searchEndpoint) {
if (searchEndpoint.searchEngine === 'static'){
$scope.hasStaticEndpoints = true;
}
});
});

$scope.listSearchEndpoints = function() {
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/filters/chooseScoreClass.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ angular.module('QuepidApp')
}
};
}
]);
]);
10 changes: 8 additions & 2 deletions app/assets/javascripts/filters/searchEngineName.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,17 @@ angular.module('QuepidApp')
solr: 'Solr',
es: 'Elasticsearch',
os: 'OpenSearch',
vectara: 'Vectara'
vectara: 'Vectara',
static: 'Static File'
};

return function (input) {
return searchEngineName[input];
if (searchEngineName[input]){
return searchEngineName[input];
}
else {
return input;
}
};
}
]);
2 changes: 1 addition & 1 deletion app/assets/templates/views/devQueryParams.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ <h4 class="pull-left">Query Sandbox:</h4>
<div class="settings-tab" ng-show="qp.curTab == 'curator'">
<div class="rerunnable-settings-tab">
<p ng-if="settings.searchEngine == 'static'">
With a Static search endpoint there are tuning knobs to play with ;-(.
With a Static search endpoint there are no tuning knobs to play with ;-(.
</p>
<div ng-if="settings.searchEngine !== 'static'">
<p ng-show="settings.selectedTry.curatorVars.length == 0">
Expand Down
6 changes: 5 additions & 1 deletion app/assets/templates/views/wizardModal.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,15 @@ <h2>What Search Endpoint do you want to connect to?</h2>
id="searchEndpoint"
ng-if="listSearchEndpoints().length > 0"
ng-model="pendingWizardSettings.searchEndpointId"
ng-options="searchEndpoint.id as searchEndpoint.name for searchEndpoint in listSearchEndpoints()"
ng-options="searchEndpoint.id as searchEndpoint.name for searchEndpoint in listSearchEndpoints() | filter: {searchEngine: '!static'}"
ng-change="changeSearchEndpoint()"
>
</select>

<small title="Manually validates Quepid can get retrieve search results from your URL before continuing" class="pull-right"><button type="button" class="btn btn-link btn-sm" ng-click="validate(true)" ng-disabled="pendingWizardSettings.searchEndpointId == null || showTLSChangeWarning">ping it</button></small>
<p class="help-block tip" ng-if="hasStaticEndpoints">
FYI: your existing Static File endpoints are NOT sharable across cases.
</p>
</div>
<div ng-if="urlValid" class="alert alert-success">Quepid can search this! Hit 'Continue' to keep working through setup.</div>
<div class="row" style="margin-top: 50px;">
Expand Down

0 comments on commit b54272f

Please sign in to comment.