Skip to content

Commit 6b88467

Browse files
Merge pull request #911 from NASA-IMPACT/dev-enhanced-merged
Dev enhanced merged
2 parents 85377f7 + b17b65d commit 6b88467

File tree

6 files changed

+88
-30
lines changed

6 files changed

+88
-30
lines changed

sde_indexing_helper/static/css/collections_list.css

Lines changed: 49 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ body {
3232
color:black;
3333
}
3434

35-
.dtsp-name {
35+
.dtsp-name {
3636
margin-left:40px;
3737
}
3838

@@ -83,11 +83,11 @@ body {
8383
border-color: #fafafa;
8484
font-size: 0.6875rem;
8585
box-shadow: 0 2px 2px 0 rgba(153, 153, 153, 0.14), 0 3px 1px -2px rgba(153, 153, 153, 0.2), 0 1px 5px 0 rgba(153, 153, 153, 0.12); }
86-
86+
8787
.select-dropdown:hover {
8888
box-shadow: 0 14px 26px -12px rgba(250, 250, 250, 0.42), 0 4px 23px 0px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(250, 250, 250, 0.2);
8989
}
90-
90+
9191
.select-dropdown:focus,
9292
.select-dropdown.focus {
9393
box-shadow: none, 0 0 0 0.2rem rgba(76, 175, 80, 0.5);
@@ -104,7 +104,7 @@ body {
104104
max-width: 400px;
105105
width: 400px;
106106
}
107-
107+
108108
.url-cell {
109109
display:flex;
110110
align-items: center;
@@ -116,7 +116,7 @@ body {
116116
text-overflow: ellipsis;
117117
max-width: calc(100% - 30px);
118118
display: inline-block;
119-
width: 400px;
119+
width: 400px;
120120
padding-right: 10px;
121121
}
122122

@@ -140,7 +140,7 @@ text-align: left;
140140
color: rgba(255, 255, 255, 1);
141141
margin-bottom: 0 !important;
142142
}
143-
143+
144144
.tableHeader{
145145
background-color:#15232E !important;
146146
}
@@ -197,7 +197,7 @@ margin-bottom: 0 !important;
197197
.table tbody tr:nth-child(odd) {
198198
background-color: #050E19 !important;
199199
}
200-
200+
201201
.table tbody tr:nth-child(even) {
202202
background-color: #3F4A58 !important;
203203
}
@@ -209,7 +209,7 @@ margin-bottom: 0 !important;
209209
line-height: 36px;
210210
letter-spacing: -0.03em;
211211
}
212-
212+
213213
#hideShowColumnsModal {
214214
position: fixed;
215215
top: 0;
@@ -219,19 +219,19 @@ margin-bottom: 0 !important;
219219
width: 30vw;
220220
z-index: 2000;
221221
}
222-
222+
223223
#subTitle {
224224
font-size: 14px;
225225
font-weight: 400;
226226
line-height: 21px;
227227
letter-spacing: -0.02em;
228228
}
229-
229+
230230
.checkbox-wrapper {
231231
display: flex;
232232
align-items: baseline;
233233
}
234-
234+
235235
.checkbox-wrapper label {
236236
font-weight: 600;
237237
font-size: 16px;
@@ -240,7 +240,7 @@ margin-bottom: 0 !important;
240240
color: rgba(31, 41, 53, 1);
241241
padding-left: 10px;
242242
}
243-
243+
244244
.modalFooter {
245245
position: sticky;
246246
bottom: 0;
@@ -275,10 +275,41 @@ margin-bottom: 0 !important;
275275
}
276276

277277
.custom-pane-title {
278-
font-size: 16px;
279-
font-weight: 500;
280-
line-height: 24px;
281-
letter-spacing: -0.02em;
282-
color: rgba(255, 255, 255, 1);
283-
padding-left: 9px;
278+
font-size: 16px;
279+
font-weight: 500;
280+
line-height: 24px;
281+
letter-spacing: -0.02em;
282+
color: rgba(255, 255, 255, 1);
283+
padding-left: 9px;
284+
}
285+
286+
.search-container {
287+
display: flex;
288+
flex-direction: column;
289+
align-items: flex-end;
290+
margin-bottom: 20px;
291+
}
292+
293+
.search-container label {
294+
margin-right: 10px;
295+
font-weight: bold;
296+
font-size: 18px;
297+
margin-top: 5px;
298+
align-items: center;
299+
}
300+
301+
.search-container input {
302+
flex: 1;
303+
max-width: 400px;
304+
}
305+
306+
.search-container input {
307+
max-width: 400px;
308+
padding: 5px;
309+
border-radius: 8px;
310+
border: 1px solid #ccc;
311+
}
312+
313+
.search-container input:focus {
314+
font-style: italic;
284315
}
-333 Bytes
Binary file not shown.
1.83 KB
Loading

sde_indexing_helper/static/js/collection_list.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,29 @@ $(document).ready(function () {
405405
"Connector Type",
406406
];
407407

408+
// Event listener for the collection search input
409+
$('#collectionSearch').on('keyup', function () {
410+
// Get the search query
411+
let query = $(this).val().toLowerCase();
412+
413+
// Clear previous search
414+
table.search('').columns().search('');
415+
416+
// Filter the table based on the query in the collection name and config folder data attribute
417+
table.rows().every(function () {
418+
let row = $(this.node());
419+
let name = row.find('td').first().text().toLowerCase();
420+
let configFolder = row.data('config-folder').toLowerCase();
421+
let url = row.find('td').eq(1).text().toLowerCase();
422+
423+
if (name.includes(query) || configFolder.includes(query) || url.includes(query)) {
424+
row.show();
425+
} else {
426+
row.hide();
427+
}
428+
});
429+
});
430+
408431
$(".dtsp-searchPane").each(function (index) {
409432
if ($(this).hasClass("dtsp-hidden")) {
410433
return;

sde_indexing_helper/templates/sde_collections/collection_detail.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<br>
2727
<div class="row">
2828
<div class="col-md-6 titleCol">
29-
<h1 class="nameWrapper"><div class="collectionName" id="collectionName">{{ collection.name }}</div><img class="editTitle" src="../../static/images/Task.png"></img></h1>
29+
<h1 class="nameWrapper"><div class="collectionName" id="collectionName">{{ collection.name }}</div><img class="editTitle" src="{% static 'images/edit.png' %}" alt="Edit"></h1>
3030
</div>
3131
<div class="col-md-6 buttonsCol">
3232
<div>
@@ -78,7 +78,7 @@ <h1 class="nameWrapper"><div class="collectionName" id="collectionName">{{ colle
7878
</div>
7979
<div class="timeline" id="timeline">
8080
{% for stage in timeline_history %}
81-
<div class="timeline-stage
81+
<div class="timeline-stage
8282
{% if stage.workflow_status == collection.workflow_status %} btn highlight {{ collection.workflow_status_button_color }} {% endif %}">
8383
<div class="status-label">
8484
{% if stage.created_at %}
@@ -346,10 +346,10 @@ <h5 class="modal-title">Rename Collection</h5>
346346
</div>
347347
<div class="modal-footer">
348348
<form id="titleChangeModalForm">
349-
<input type="text" name="inputFieldName" id="inputFieldId" value="{{collection.name}}">
349+
<input type="text" name="inputFieldName" id="inputFieldId" value="{{collection.name}}">
350350
<div class="button-wrapper">
351-
<button type="submit" class="btn btn-secondary modal-button-1" id="cancelTitleRename">Cancel</button>
352-
<button type="submit" class="btn btn-primary modal-button-2" data-dismiss="modal" id="renameTitle">Rename</button>
351+
<button type="submit" class="btn btn-secondary modal-button-1" id="cancelTitleRename">Cancel</button>
352+
<button type="submit" class="btn btn-primary modal-button-2" data-dismiss="modal" id="renameTitle">Rename</button>
353353
</div>
354354
</form>
355355
</div>
@@ -374,8 +374,8 @@ <h5 class="modal-title">Are you sure?</h5>
374374
<div class="modal-footer">
375375
<form id="deleteURLModalForm">
376376
<div class="button-wrapper">
377-
<button type="submit" class="btn btn-secondary modal-button-1" id="cancelURLDeletion">No</button>
378-
<button type="submit" class="btn btn-primary modal-button-2" data-dismiss="modal" id="deleteURL">Yes</button>
377+
<button type="submit" class="btn btn-secondary modal-button-1" id="cancelURLDeletion">No</button>
378+
<button type="submit" class="btn btn-primary modal-button-2" data-dismiss="modal" id="deleteURL">Yes</button>
379379
</div>
380380
</form>
381381
</div>
@@ -399,8 +399,8 @@ <h5 class="modal-title">Are you sure?</h5>
399399
<div class="modal-footer">
400400
<form id="workflowStatusChangeModalForm">
401401
<div class="button-wrapper">
402-
<button type="submit" class="btn btn-secondary modal-button-1" id="cancelworkflowStatusChange">No</button>
403-
<button type="submit" class="btn btn-primary modal-button-2" data-dismiss="modal" id="changeWorkflowStatus">Yes</button>
402+
<button type="submit" class="btn btn-secondary modal-button-1" id="cancelworkflowStatusChange">No</button>
403+
<button type="submit" class="btn btn-primary modal-button-2" data-dismiss="modal" id="changeWorkflowStatus">Yes</button>
404404
</div>
405405
</form>
406406
</div>

sde_indexing_helper/templates/sde_collections/collection_list.html

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,14 @@ <h2 class="title">Welcome back!</h2>
4848
<td class="hideDisplay"></td>
4949
</tr>
5050
</thead>
51-
51+
5252
<tbody>
53+
<div class="search-container">
54+
<label for="collectionSearch">Universal Search</label>
55+
<input type="text" id="collectionSearch" placeholder="Type to search..." class="table_filter_row_input textBoxStyling">
56+
</div>
5357
{% for collection in collections %}
54-
<tr id={{ collection.id }}>
58+
<tr id="{{ collection.id }}" data-config-folder="{{ collection.config_folder }}">
5559
<td class="noBorder">
5660
<a class="nameStyling" href="{% url 'sde_collections:detail' collection.pk %}">{{ collection.name }} <i class="material-icons">chevron_right</i></a>
5761
</td>
@@ -73,7 +77,7 @@ <h2 class="title">Welcome back!</h2>
7377
data-match-pattern
7478
remove_protocol
7579
row
76-
url>
80+
url>
7781
<button class="btn {{ collection.workflow_status_button_color }} btn-sm dropdown-toggle"
7882
type="button"
7983
id="workflow-status-button-{{ collection.id }}"

0 commit comments

Comments
 (0)