1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

B OpenNebula/one#5426: Fix advanced search (#1305)

This commit is contained in:
Sergio Betanzos 2021-06-16 17:29:15 +02:00 committed by GitHub
parent 108ec40014
commit 0057bb3bd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 1 deletions

View File

@ -116,6 +116,7 @@ define(function(require) {
this.totalApps = 0;
this.conf.searchDropdownHTML = SearchDropdown({tableId: this.dataTableId});
this.conf.searchByType = true;
this.searchColumn = SEARCH_COLUMN;
TabDataTable.call(this);

View File

@ -139,7 +139,8 @@ define(function(require) {
that.searchInputHTML = TemplateSearchInputHTML({
"dataTableSearchId": this.dataTableId + "Search",
"searchDropdownHTML": this.conf.searchDropdownHTML
"searchDropdownHTML": this.conf.searchDropdownHTML,
"searchByType": this.conf.searchByType
});
return that;

View File

@ -16,6 +16,7 @@
{{#if searchDropdownHTML}}
<div id="{{dataTableSearchId}}-wrapper" class="input-group" style="display:flex;">
{{#if searchByType}}
<select search-field="TYPE" id="{{dataTableSearchId}}-selectTYPE" class="type-selector">
<option value="">{{tr "All"}}</option>
<option value="VMTEMPLATE">{{tr "VM Templates"}}</option>
@ -23,6 +24,7 @@
<option value="SERVICE_TEMPLATE">{{tr "Service Templates"}}</option>
</select>
&nbsp;
{{/if}}
<input class="input-group-field" id="{{dataTableSearchId}}" name="{{dataTableSearchId}}" autocomplete="off" type="search" placeholder="{{tr "Search"}}" />
<div class="input-group-button">
<i class="fas fa-filter search-button" data-toggle="{{dataTableSearchId}}-dropdown"></i>