-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6125fc1
commit e013ef8
Showing
10 changed files
with
95 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
logger: console | ||
logger: store | ||
logger_format: '<li class="%L">[%t] %m at %f:%l</li>' | ||
log: debug | ||
session: simple | ||
show_errors: 1 | ||
warnings: 0 | ||
|
||
|
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
logger: file | ||
logger: store | ||
logger_format: '<li class="%L">[%t] %m at %f:%l</li>' | ||
log: warning | ||
session: simple | ||
show_errors: 0 | ||
warnings: 1 | ||
|
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,23 @@ | ||
package Dancer::Logger::Store; | ||
|
||
use strict; | ||
use warnings; | ||
|
||
use base 'Dancer::Logger::Abstract'; | ||
our $sink = []; | ||
|
||
sub _log { | ||
my ($self, $level, $message) = @_; | ||
push @{$sink}, $self->format_message($level => $message); | ||
} | ||
|
||
sub fetch { | ||
return $sink; | ||
} | ||
|
||
sub clear { | ||
$sink = []; | ||
} | ||
|
||
1; | ||
|
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 @@ | ||
<p>This feature is not yet available.</p> |
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,15 @@ | ||
<form method="post" action="/log"> | ||
<fieldset> | ||
<input type="submit" name="clear" value="Clear Log" /> | ||
</fieldset> | ||
</form> | ||
|
||
<% if log.size > 0 %> | ||
<ul id="log"> | ||
<% for message in log %> | ||
<% message %> | ||
<% end %> | ||
</ul> | ||
<% else %> | ||
<p class="empty">Nothing new in the logs</p> | ||
<% end %> |
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 |
---|---|---|
@@ -1,25 +1,2 @@ | ||
<% if results and results.size > 0 %> | ||
<h2>Upload Results</h2> | ||
<ul> | ||
<% foreach entry in results %> | ||
<% if entry.error %> | ||
<li class="error"><% entry.filename %> - <% entry.error %></li> | ||
<% else %> | ||
<li>Added <a href="/songs/<% entry.song.id %>"><% entry.song.artist %> - <% entry.song.title %></a></li> | ||
<% end %> | ||
<% end %> | ||
</ul> | ||
<% end %> | ||
<p>This feature is not yet available.</p> | ||
|
||
<h2>Upload</h2> | ||
<p> | ||
Uploaded songs will be converted automatically the correct format. You may | ||
also upload an archive full of songs and all of them will be processed and | ||
added to the station. | ||
</p> | ||
<form method="post" action="/upload" enctype="multipart/form-data"> | ||
<fieldset> | ||
<p><input type="file" name="upload" id="upload" /></p> | ||
<input type="submit" value="Upload" /> | ||
</fieldset> | ||
</form> |