Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
E
esi-table-data
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esi-data-scrapping
esi-table-data
Commits
dc034835
Commit
dc034835
authored
Jun 22, 2017
by
Vasyl Bodnaruk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add functional for get log
parent
ea07676a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
service.py
esi/scraper/service.py
+1
-1
job_list.html
esi/templates/job_list.html
+2
-2
No files found.
esi/scraper/service.py
View file @
dc034835
...
...
@@ -62,7 +62,7 @@ class Service:
def
get_log
(
self
,
job
):
job
=
Job
.
objects
.
get
(
pk
=
job
)
url
=
'http://127.0.0.1:6800/logs/exa/
mhn/{}.log'
.
format
(
job
.
job_uuid
)
url
=
'http://127.0.0.1:6800/logs/exa/
{}/{}.log'
.
format
(
job
.
spider
.
sp_name
,
job
.
job_uuid
)
response
=
urlopen
(
url
)
return
response
.
read
()
...
...
esi/templates/job_list.html
View file @
dc034835
...
...
@@ -130,7 +130,7 @@
<td
data-col=
"spider"
>
{{ i.spider }}
</td>
<td
data-col=
"created-date"
>
{{ i.create_time|date:"d.m.Y" }} {{ i.create_time|time:"H:i" }}
</td>
<td
data-col=
"start-date"
>
{{ i.start_time|date:"d.m.Y" }} {{ i.start_time|time:"H:i"}}
</td>
<td
data-col=
"finished-date"
>
{{ i.
finish_time|date:"d.m.Y" }} {{ i.finish
_time|time:"H:i" }}
</td>
<td
data-col=
"finished-date"
>
{{ i.
end_time|date:"d.m.Y" }} {{ i.end
_time|time:"H:i" }}
</td>
<td
data-col=
"status"
class=
"text-success"
>
{{ i.status }}
</td>
<td
data-col=
"log"
>
<button
data-action=
"log"
class=
"btn btn-sm btn-secondary"
data-text=
"Get log"
>
Get log
</button>
...
...
@@ -175,7 +175,7 @@
<td
data-col=
"spider"
>
{{ i.spider }}
</td>
<td
data-col=
"created-date"
>
{{ i.create_time|date:"d.m.Y" }} {{ i.create_time|time:"H:i" }}
</td>
<td
data-col=
"start-date"
>
{{ i.start_time|date:"d.m.Y" }} {{ i.start_time|time:"H:i"}}
</td>
<td
data-col=
"finished-date"
>
{{ i.
finish_time|date:"d.m.Y" }} {{ i.finish
_time|time:"H:i" }}
</td>
<td
data-col=
"finished-date"
>
{{ i.
end_time|date:"d.m.Y" }} {{ i.end
_time|time:"H:i" }}
</td>
<td
data-col=
"status"
class=
"text-success"
>
{{ i.status }}
</td>
<td
data-col=
"log"
>
<button
data-action=
"log"
class=
"btn btn-sm btn-secondary"
data-loading-text=
"Creating log..."
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment