#monotoring_detail

This commit is contained in:
xieshen 2020-11-11 15:44:36 +08:00
parent c3c716d679
commit e1f7545ae7
2 changed files with 3 additions and 3 deletions

View File

@ -4,7 +4,7 @@ from dashboard import views
urlpatterns = [
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('task/histories/',views.task_histories),
path('task/histories/detail/<str:pk>/',views.task_histories_detail),

View File

@ -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:
cursor.execute("select * from detections where id = '%s'" % (pk))
cursor.execute("select * from detections where name = '%s'" % (name))
row = cursor.fetchall()
res = []
for r in row: