-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make it possible to preview scheduled requests in the UI
- Loading branch information
1 parent
3b05258
commit a5d34e7
Showing
7 changed files
with
144 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<div class="row"> | ||
<div id="status"></div> | ||
<div class="leftcolumn"> | ||
<div class="card"> | ||
<h2>Spiders</h2> | ||
<table> | ||
<tr> | ||
<th>Spider name</td> | ||
<th>State</td> | ||
<th>Items scraped</td> | ||
<th>Scheduled Requests</td> | ||
<th>Command</td> | ||
</tr> | ||
<%= for spider <- data do %> | ||
<tr> | ||
<td><%= spider.name %></td> | ||
<td><%= spider.state %></td> | ||
<td> <%= spider.scraped %> </td> | ||
<td><a href="/spiders/<%= spider.name %>/requests" ><%= spider.scheduled %></td> | ||
<%= if spider.state == :idle do %> | ||
<td> <input type = "button" onclick = "schedule('<%= spider.name %>')" value = "Schedule"> </td> | ||
<% else %> | ||
<td> <input type = "button" onclick = "stop('<%= spider.name %>')" value = "Stop"> </td> | ||
<% end %> | ||
|
||
</tr> | ||
<% end %> | ||
</table> | ||
</div> | ||
</div> | ||
<div class="rightcolumn"> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<div class="row"> | ||
<div id="status"></div> | ||
<div class="leftcolumn"> | ||
<div class="card"> | ||
<h3> | ||
List of scheduled requests for: <%= spider_name %> | ||
<a href="/">Back</a> | ||
</h3> | ||
<table> | ||
<tr> | ||
<th>url</th> | ||
<th>headers</th> | ||
</tr> | ||
<%= for req <- requests do %> | ||
<tr> | ||
<td><%= req.url %></td> | ||
<td><%= req.headers %></td> | ||
</tr> | ||
<% end %> | ||
|
||
</table> | ||
</div> | ||
<div class="rightcolumn"> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters