From 645d419748a7c868522d73a45791662ae97857e5 Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Sun, 6 Feb 2022 11:36:25 +1100 Subject: [PATCH] moved JoblogSearch to internal/js/ as it does not need any jinja processing, added button and hotkey to show logs, and brief logs into dbox - it works, but needs prettying up --- internal/icons.svg | 4 ++++ internal/js/view_support.js | 19 +++++++++++++++++++ templates/viewer.html | 16 ++++++---------- 3 files changed, 29 insertions(+), 10 deletions(-) diff --git a/internal/icons.svg b/internal/icons.svg index 68482c5..b1a3e22 100644 --- a/internal/icons.svg +++ b/internal/icons.svg @@ -207,4 +207,8 @@ + + + + diff --git a/internal/js/view_support.js b/internal/js/view_support.js index ae97ab0..ceaf57e 100644 --- a/internal/js/view_support.js +++ b/internal/js/view_support.js @@ -275,3 +275,22 @@ function FaceDBox(key, item) $('#dbox-content').html(div) $('#dbox').modal('show') } + + +// func called to show logs relating to this filename from viewer +// pops results up in a dbox +function JoblogSearch() +{ + data="eid="+current + $.ajax({ type: 'POST', data: data, url: '/joblog_search', success: function(res) { + data = JSON.parse(res) + div='
' + for( i=0; i' + div+='
' + $('#dbox-title').html("Logs relating to this filename") + $('#dbox-content').html(div) + $('#dbox').modal('show') + } + }) +} diff --git a/templates/viewer.html b/templates/viewer.html index 9a0e397..442b806 100644 --- a/templates/viewer.html +++ b/templates/viewer.html @@ -75,16 +75,6 @@ return s } - function JoblogSearch() - { - data="eid="+current - $.ajax({ type: 'POST', data: data, url: '/joblog_search', success: function(res) { - data = JSON.parse(res) - console.log(data) - } - }) - } - function CallViewListRoute(dir) { data="eids="+$("#eids").val() @@ -250,6 +240,9 @@ +