shinyproxy icon indicating copy to clipboard operation
shinyproxy copied to clipboard

Adding bar search in apps menu

Open mos790 opened this issue 2 years ago • 3 comments

Hello,

Thanks a lot for this solution,

Is it possible to add a bar search (similar to power BI server) allowing users to search apps ?

Thanks,

mos790 avatar Apr 22 '23 11:04 mos790

Hi

We don't have out of the box support for searching for apps. You could implement this yourselves by adding some javascript to the shinyproxy templates. For example, you could use the API to search for a list of applications.

See https://shinyproxy.io/documentation/api/ and https://github.com/openanalytics/shinyproxy-config-examples/tree/master/04-custom-html-template for more information.

I'll keep this issue open as a feature for request for a built-in search function.

LEDfan avatar May 04 '23 14:05 LEDfan

Has anyone done this? would love to see an example of adding a search bar to the main shinyproxy screen

corey-dawson avatar Jun 29 '23 15:06 corey-dawson

Hi,

I don't know if i can help you in some way with my code, but I added this lines to index.html in order to show a search bar:


...
...
...

<div class="row">
		<div class="pull-right col-md-3">
			<input type="text" name="searchbox" id="searchbox" class="filterinput form-control"
				placeholder="&#xF002; Buscar módulo..."
				style="font-family: FontAwesome, Arial; font-style: normal">
		</div>
</div>

...
...
...

<script type="text/javascript" th:inline="javascript">

		$(document).ready(function () {
			$("#searchbox").on("keyup", function () {
				var value = $(this).val().toLowerCase();
				$('div[data-role="modulos_cards"]').filter(function () {
					$(this).toggle($(this).find('a.card-title, a.card-subtitle').text().toLowerCase().indexOf(value) > -1)

				});
			});
		});

</script>

...
...
...

I hope it can help you!

PauloJhonny avatar Jul 05 '23 22:07 PauloJhonny