File tree Expand file tree Collapse file tree 9 files changed +103
-8
lines changed
log_viewer_demo/static/images Expand file tree Collapse file tree 9 files changed +103
-8
lines changed Original file line number Diff line number Diff line change @@ -4,12 +4,12 @@ Django Log Viewer
44
55|pypi version | |license | |build status |
66
7- ``Django Log Viewer `` allows you to read log files in the admin page.
7+ ``Django Log Viewer `` allows you to read log files in the admin page by using `` DataTables `` .
88This project was modified from: https://bitbucket.org/inkalabsinc/django-log-viewer
99
1010-----------------
1111
12- .. image :: https://i.imgur.com/sGRlW9b .png
12+ .. image :: https://i.imgur.com/2BFzilV .png
1313
1414
1515Quick start
Original file line number Diff line number Diff line change 1+ # SOME DESCRIPTIVE TITLE.
2+ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3+ # This file is distributed under the same license as the PACKAGE package.
4+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5+ #
6+ #, fuzzy
7+ msgid ""
8+ msgstr ""
9+ "Project-Id-Version : PACKAGE VERSION\n "
10+ "Report-Msgid-Bugs-To : \n "
11+ "POT-Creation-Date : 2019-07-09 19:54+0700\n "
12+ "PO-Revision-Date : YEAR-MO-DA HO:MI+ZONE\n "
13+ "Last-Translator : FULL NAME <EMAIL@ADDRESS>\n "
14+ "
Language-Team :
LANGUAGE <[email protected] >\n "
15+ "Language : \n "
16+ "MIME-Version : 1.0\n "
17+ "Content-Type : text/plain; charset=UTF-8\n "
18+ "Content-Transfer-Encoding : 8bit\n "
19+ "Plural-Forms : nplurals=2; plural=(n != 1);\n "
20+
21+ #: templates/log_viewer/logfile_viewer.html:6
22+ msgid "Home"
23+ msgstr ""
24+
25+ #: templates/log_viewer/logfile_viewer.html:8
26+ msgid "Log Viewer"
27+ msgstr ""
28+
29+ #: templates/log_viewer/logfile_viewer.html:36
30+ msgid "Log Files"
31+ msgstr ""
32+
33+ #: templates/log_viewer/logfile_viewer.html:45
34+ msgid "No."
35+ msgstr ""
36+
37+ #: templates/log_viewer/logfile_viewer.html:46
38+ msgid "Log entries"
39+ msgstr ""
40+
41+ #: templates/log_viewer/logfile_viewer.html:50
42+ msgid "No entries!"
43+ msgstr ""
Original file line number Diff line number Diff line change 1+ # SOME DESCRIPTIVE TITLE.
2+ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3+ # This file is distributed under the same license as the PACKAGE package.
4+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5+ #
6+ #, fuzzy
7+ msgid ""
8+ msgstr ""
9+ "Project-Id-Version : PACKAGE VERSION\n "
10+ "Report-Msgid-Bugs-To : \n "
11+ "POT-Creation-Date : 2019-07-09 19:54+0700\n "
12+ "PO-Revision-Date : YEAR-MO-DA HO:MI+ZONE\n "
13+ "Last-Translator : FULL NAME <EMAIL@ADDRESS>\n "
14+ "
Language-Team :
LANGUAGE <[email protected] >\n "
15+ "Language : \n "
16+ "MIME-Version : 1.0\n "
17+ "Content-Type : text/plain; charset=UTF-8\n "
18+ "Content-Transfer-Encoding : 8bit\n "
19+ "Plural-Forms : nplurals=1; plural=0;\n "
20+
21+ #: templates/log_viewer/logfile_viewer.html:6
22+ msgid "Home"
23+ msgstr "Beranda"
24+
25+ #: templates/log_viewer/logfile_viewer.html:8
26+ msgid "Log Viewer"
27+ msgstr "Penampil Log"
28+
29+ #: templates/log_viewer/logfile_viewer.html:36
30+ msgid "Log Files"
31+ msgstr "File log"
32+
33+ #: templates/log_viewer/logfile_viewer.html:45
34+ msgid "No."
35+ msgstr "No."
36+
37+ #: templates/log_viewer/logfile_viewer.html:46
38+ msgid "Log entries"
39+ msgstr "Entri log"
40+
41+ #: templates/log_viewer/logfile_viewer.html:50
42+ msgid "No entries!"
43+ msgstr "Tidak ada entri!"
44+
45+ #~ msgid "No anything to show !"
46+ #~ msgstr "Tidak ada sesuatu untuk ditampilkan !"
Original file line number Diff line number Diff line change @@ -41,8 +41,14 @@ <h2>{% trans 'Log Files' %}</h2>
4141 < div class ="results ">
4242 < table id ="log-entries " class ="display " style ="width:100% ">
4343 < thead >
44- < tr > < th scope ="col "> {% trans 'Log entries' %}</ th > </ tr >
44+ < tr >
45+ < th scope ="col "> {% trans 'No.' %}</ th >
46+ < th scope ="col "> {% trans 'Log entries' %}</ th >
47+ </ tr >
4548 </ thead >
49+ < tbody >
50+ < tr > < td colspan ="2 "> {% trans 'No entries!' %}</ td > </ tr >
51+ </ tbody >
4652 </ table >
4753 </ div >
4854 </ form >
@@ -54,6 +60,7 @@ <h2>{% trans 'Log Files' %}</h2>
5460 function loadDataTableTrigger ( table_name , url_json ) {
5561 $ ( table_name ) . DataTable ( {
5662 pageLength : '{{ page_length }}' ,
63+ columns : [ { data : 0 } , { data : 1 } ] ,
5764 ajax : function ( data , callback , settings ) {
5865 $ . ajax ( {
5966 type : 'get' ,
@@ -62,8 +69,8 @@ <h2>{% trans 'Log Files' %}</h2>
6269 const new_logs = [ ] ;
6370 var next_page = response . next_page || 1 ;
6471
65- response . logs . forEach ( function ( text ) {
66- new_logs . push ( [ text ] )
72+ response . logs . forEach ( function ( text , numb , logs ) {
73+ new_logs . push ( [ numb , text ] )
6774 } ) ;
6875
6976 callback ( {
Original file line number Diff line number Diff line change 2525 TEMPLATES = [{
2626 'BACKEND' : 'django.template.backends.django.DjangoTemplates' ,
2727 'DIRS' : [
28- os .path .join (BASE_DIR , 'django-markdown-editor/martor/templates' ),
29- os .path .join (BASE_DIR , 'django-markdown-editor/martor/tests/templates' ),
28+ os .path .join (BASE_DIR , 'django-log-viewer/log_viewer/templates' ),
3029 ],
3130 'APP_DIRS' : True ,
3231 'OPTIONS' : {
Original file line number Diff line number Diff line change 33
44from setuptools import (setup , find_packages )
55
6- __version__ = '1.0.3 '
6+ __version__ = '1.0.4 '
77
88setup (
99 name = 'django-log-viewer' ,
You can’t perform that action at this time.
0 commit comments