Created
September 6, 2018 13:35
-
-
Save marzdgzmn/3b2668db8c05f1064e45cb17022c8984 to your computer and use it in GitHub Desktop.
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
class Formatter | |
def self.slim_template(mirrors, time) | |
sync_report_template = RiseMirrorApp::PROJECT_ROOT_DIR + 'templates/sync_report.slim' | |
#layout = Slim::Template.new { sync_report_template } | |
puts Slim::Template.new(sync_report_template).render(mirrors) | |
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
doctype html | |
html | |
head | |
title Sync Report | |
meta name='author' content='riseops' | |
body | |
- if mirrors.any? | |
table#mirrors | |
- for mirror in mirrors | |
tr | |
td.name = mirror.name | |
td.last_successful_sync = mirror.last_successful_sync | |
td.start_sync = mirror.start_sync | |
td.end_sync = mirror.end_sync | |
td.status = mirror.status | |
td.total_bandwidth = mirror.total_bandwidth | |
- else | |
p No mirror information found. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment