diff --git a/embark/dashboard/views.py b/embark/dashboard/views.py index 41eae02d..287155bc 100644 --- a/embark/dashboard/views.py +++ b/embark/dashboard/views.py @@ -16,7 +16,7 @@ from uploader.boundedexecutor import BoundedExecutor from uploader.forms import LabelForm -from uploader.models import FirmwareAnalysis +from uploader.models import FirmwareAnalysis, Label from dashboard.models import Result from dashboard.forms import LabelSelectForm, StopAnalysisForm from porter.views import make_zip @@ -294,7 +294,9 @@ def rm_label(request, analysis_id, label_name): logger.info("User %s tryied to rm label %s", request.user.username, label_name) # get analysis obj analysis = FirmwareAnalysis.objects.get(id=analysis_id) - analysis.label.remove(label_name) + # get lobel obj + label_obj = Label.objects.get(label_name=label_name) + analysis.label.remove(label_obj) analysis.save() messages.info(request, 'removing successful of ' + str(label_name)) return redirect('..') diff --git a/embark/static/content/css/reportDashboard.css b/embark/static/content/css/reportDashboard.css index 44551b0c..aa8633a3 100644 --- a/embark/static/content/css/reportDashboard.css +++ b/embark/static/content/css/reportDashboard.css @@ -55,4 +55,12 @@ table.dataTable td, table.dataTable th { .buttonRowElem { margin: 2px; -} \ No newline at end of file +} + +.hidden { + display: none; +} + +.label:hover form button, .label:focus form button { + display: block; +} diff --git a/embark/templates/dashboard/reportDashboard.html b/embark/templates/dashboard/reportDashboard.html index 33c18c8b..996ca366 100644 --- a/embark/templates/dashboard/reportDashboard.html +++ b/embark/templates/dashboard/reportDashboard.html @@ -60,14 +60,13 @@ {% if firmware.label.all is not None %} {% for label in firmware.label.all %}