-
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #191 from BenediktMKuehne/nudev
Labeling and search update
- Loading branch information
Showing
10 changed files
with
480 additions
and
336 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,11 @@ www/ | |
safe/ | ||
.embark_db_backup | ||
|
||
# temp dirs/files | ||
.tmp/ | ||
**/.tmp/ | ||
**/*.tmp | ||
|
||
# other stuff | ||
*.zip | ||
*.bin | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
import logging | ||
from django import forms | ||
|
||
from uploader.models import FirmwareAnalysis | ||
from uploader.models import FirmwareAnalysis, Label | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
class StopAnalysisForm(forms.Form): | ||
analysis = forms.ModelChoiceField(queryset=FirmwareAnalysis.objects, empty_label='Select Analysis to stop') | ||
|
||
|
||
class LabelSelectForm(forms.Form): | ||
label = forms.ModelChoiceField(queryset=Label.objects.all(), empty_label='Select Label to add') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// jshint unused:false | ||
function search(input) { | ||
"use strict"; | ||
var value = input.toLowerCase(); | ||
if (value.startsWith("label=")){ | ||
value = value.slice(6); | ||
$("#report-table tr").filter(function() { | ||
$(this).toggle($(this).find(".label").text().toLowerCase().indexOf(value) > -1); | ||
}); | ||
} else{ | ||
$("#report-table tr").filter(function() { | ||
$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1); | ||
}); | ||
} | ||
} | ||
|
||
function onclick_label(value) { | ||
"use strict"; | ||
var search_bar = $('#search'); | ||
if (search_bar.val().startsWith("label=")){ | ||
search_bar.val(search_bar.val() + value.slice(6)); | ||
} else { | ||
search_bar.val(search_bar.val() + value); | ||
} | ||
search(value); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{% load django_bootstrap5 %} | ||
|
||
<form action="{% url 'embark-dashboard-create-label' %}" method="post" id="form"> | ||
{% csrf_token %} | ||
<div class="innerBlock"> | ||
{% load filters %} | ||
{% bootstrap_form label_form layout='grid' %} | ||
{% bootstrap_button "Create" button_type="submit" button_class="btn-primary" %} | ||
</div> | ||
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters