#monotoring_detail
This commit is contained in:
parent
c3c716d679
commit
e1f7545ae7
|
@ -4,7 +4,7 @@ from dashboard import views
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path('monotoring/',views.monotoring),
|
path('monotoring/',views.monotoring),
|
||||||
path('monotoring/detail/<str:pk>/',views.monotoring_detail),
|
path('monotoring/detail/<str:name>/',views.monotoring_detail),
|
||||||
path('alarm/',views.alarm),
|
path('alarm/',views.alarm),
|
||||||
path('task/histories/',views.task_histories),
|
path('task/histories/',views.task_histories),
|
||||||
path('task/histories/detail/<str:pk>/',views.task_histories_detail),
|
path('task/histories/detail/<str:pk>/',views.task_histories_detail),
|
||||||
|
|
|
@ -180,9 +180,9 @@ def task_histories_detail(request, pk):
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|
||||||
def monotoring_detail(request, pk):
|
def monotoring_detail(request, name):
|
||||||
with connection.cursor() as cursor:
|
with connection.cursor() as cursor:
|
||||||
cursor.execute("select * from detections where id = '%s'" % (pk))
|
cursor.execute("select * from detections where name = '%s'" % (name))
|
||||||
row = cursor.fetchall()
|
row = cursor.fetchall()
|
||||||
res = []
|
res = []
|
||||||
for r in row:
|
for r in row:
|
||||||
|
|
Loading…
Reference in New Issue