+++ /dev/null
-{% extends "base.html" %}
-
-{% block title %}{{ _("Mirror-Server") }}{% end block %}
-
-{% block body %}
- <div class="post">
- <a name="latest"></a>
- <h3>{{ _("IPFire Mirrors") }}</h3>
-
- <table class="download-mirror-detail">
- <tr>
- <td>{{ _("Hostname") }}</td>
- <td><a href="{{ mirror.url }}">{{ mirror.hostname }}</a></td>
- </tr>
- <tr>
- <td>{{ _("Owner") }}</td>
- <td>{{ mirror.owner }}</td>
- </tr>
- <tr>
- <td>{{ _("Last update") }}</td>
- <td>{{ locale.format_date(mirror.last_update) }}</td>
- </tr>
- <tr>
- <td>{{ _("Number of files") }}</td>
- <td>{{ len(mirror.filelist) }}</td>
- </tr>
- </table>
-
- <br class="clear" />
-
- <p>
- <a href="all">{{ _("View list of all mirror servers.") }}</a>
- </p>
- </div>
-
-{% end block %}
+++ /dev/null
-{% extends "base.html" %}
-
-{% block title %}{{ _("Thanks for downloading IPFire") }}{% end block %}
-
-{% block container %}
- <section class="container content-section text-center">
- <div class="page-header">
- <h1>{{ _("Thanks for downloading IPFire") }}</h1>
- </div>
-
- <p class="lead">
- {{ _("Your download should begin in a few seconds. If not, click the link below.") }}
- </p>
-
- <p class="download-path"></p>
- </section>
-
- <section class="container content-section text-center">
- <div class="row">
- <div class="col-lg-4 col-md-4">
- <a class="link-normal" href="https://wiki.ipfire.org/en/installation/start">
- <span class="fa fa-4x fa-terminal"></span>
- <h3>{{ _("How to install IPFire") }}</h3>
- </a>
- </div>
-
- <div class="col-lg-4 col-md-4">
- <a class="link-normal" href="//www.ipfire.org/donate">
- <span class="fa fa-4x fa-heart text-danger"></span>
- <h3>{{ _("Donate") }}</h3>
- </a>
- </div>
-
- <div class="col-lg-4 col-md-4">
- <a class="link-normal" href="https://www.ipfire.org/get-support">
- <span class="fa fa-4x fa-question"></span>
- <h3>{{ _("Get Support") }}</h3>
- </a>
- </div>
- </div>
- </section>
-{% end %}
+++ /dev/null
-{% extends "base.html" %}
-
-{% block title %}{{ _("Download IPFire") }}{% end block %}
-
-{% block container %}
- <div class="container">
- <div class="row">
- <section id="download" class="features-content col-12">
- <h2 class="display-2 text-center">Download IP<strong>Fire</strong></h2>
-
- <div class="d-flex justify-content-center">
- {% module DownloadButton(release) %}
- </div>
-
- <h5 class="subheadline mt-5"><a href="//downloads.ipfire.org/release/{{ release.sname }}">{{ _("Other download options") }}</a></h5>
- </section>
- </div>
- </div>
-{% end block %}
+++ /dev/null
-{% extends "base.html" %}
-
-{% block title %}{{ _("Ancient Downloads") }}{% end block %}
-
-{% block body %}
- <div class="post">
- <h3>{{ _("Download IPFire") }}</h3>
- <p>
- {{ _("These are the ancient downloads of IPFire. They are just saved for historical reasons and should not be used in a productive environment.") }}
- </p>
-
- <p>
- <a href="/downloads">{{ _("Go back to latest stable downloads.") }}</a>
- </p>
-
- <br class="clear" />
- </div>
-
- {% for release in releases %}
- {% module ReleaseItemShort(release) %}
- {% end %}
-{% end block %}
+++ /dev/null
-{% extends "downloads-older.html" %}
-
-{% block title %}{{ _("Development Downloads") }}{% end block %}
-
-{% block information %}
- <h3>{{ _("Development Downloads") }}</h3>
-
- <p>
- The developers do create a snapshort version from the current
- development sources to get this distributed to a higher number
- of testers.<br />
- These versions are <strong>not</strong> intended to be used in a
- productive environment.
- </p>
-{% end block %}
+++ /dev/null
-{% extends "base.html" %}
-
-{% block title %}{{ _("Download Center") }}{% end block %}
-
-{% block body %}
-<div class="container">
- <section class="features-content col-12">
- <h2 class="display-2 text-center">{{ _("IPFire Download Center") }}</h2>
-
- <div class="row">
- <div class="col-md-12">
- <img class="pull-right" src="{{ static_url("images/box_ipfire.png") }}" alt="{{ _("CD-Box") }}">
-
- <p>
- {{ _("Welcome to the downloads section of the IPFire project.") }}
- {{ _("You will find all published releases of IPFire for download.") }}
- </p>
- </div>
- </div>
-
- <div class="row">
- <div class="col">
- <h4>{{ _("Available releases") }}</h4>
-
- <table class="table table-striped table-hover">
- <thead>
- <tr>
- <th>{{ _("Release") }}</th>
- <th>{{ _("Release type") }}</th>
- <th>{{ _("Release date") }}</th>
- </tr>
- </thead>
- <tbody>
- {% for release in releases %}
- <tr>
- <td>
- <a href="/release/{{ release.sname }}">{{ release.name }}</a>
- </td>
- <td>
- {% if release.stable %}
- <span class="label label-success">{{ _("Stable") }}</span>
- {% else %}
- <span class="label label-warning">{{ _("Development") }}</span>
- {% end %}
- </td>
- <td>{{ locale.format_date(release.date, shorter=True) }}</td>
- </tr>
- {% end %}
- </tbody>
- </table>
- </div>
- </div>
- </section>
-</div>
-
-{% end block %}
+++ /dev/null
-{% extends "base.html" %}
-
-{% block title %}Download {{ release.name }}{% end block %}
-
-{% block body %}
- {% module ReleaseItem(release, latest=latest) %}
-{% end block %}
+++ /dev/null
-{% extends "base.html" %}
-
-{% block title %}{{ _("Mirror-Server") }}{% end block %}
-
-{% block body %}
-<div class="container">
- <section class="features-content col-12">
- <h2 class="display-2 text-center">{{ _("IPFire Mirrors") }}</h2>
-
- <div class="row">
- <div class="col">
- <p>
- This page is an overview about our mirror servers.
- </p>
-
- <p>
- When a user downloads a file, one of the servers is arbitrarily
- choosen und the user gets reditected.
- </p>
-
- <ul>
- <li>
- <a href="https://wiki.ipfire.org/project/web"
- target="_blank">How do I contribute a mirror server?</a>
- </li>
- </ul>
- </div>
- </div>
-
- <div class="row">
- <div class="col">
- <table class="download-mirrors">
- <tr>
- <th>{{ _("Owner") }}</th>
- <th>{{ _("Hostname") }}</th>
- <th>{{ _("Location") }}</th>
- <th>{{ _("Last update") }}</th>
- <th> </th>
- </tr>
- {% for mirror in mirrors %}
- <tr class="{{ mirror.state.lower() }}">
- <td>{{ mirror.owner }}</td>
- <td><a href="{{ mirror.url }}" target="_blank">{{ mirror.hostname }}</a></td>
- <td>
- <img src="{{ static_url("images/flags/%s.png" % mirror.country_code) }}"
- align="absmiddle" alt="{{ mirror.country_code }}" />
- {{ mirror.location }}
- </td>
- <td>{{ locale.format_date(mirror.last_update) }}</td>
- <td><a href="{{ mirror.id }}">{{ _("details") }}</a></td>
- </tr>
- {% end %}
- </table>
- </div>
- </div>
- </section>
-</div>
-{% end block %}
+++ /dev/null
-{% extends "downloads-index.html" %}
-
-{% block title %}{{ _("Ancient downloads") }}{% end block %}
-
-{% block body %}
- {% block information %}
- <h3>{{ _("Ancient downloads") }}</h3>
- <p>
- {{ _("These are the ancient downloads of IPFire. They are just saved for historical reasons and should not be used in a productive environment.") }}
- </p>
-
- <p class="warning">
- {{ _("Beware that these releases could lack possible security-fixes and so it is recommended to use the <em>latest</em> version.") }}
- </p>
-
- <p>
- <a href="/">{{ _("Go back to latest stable downloads.") }}</a>
- </p>
-
- <br class="clear" />
- {% end block %}
-
- <table>
- <tr>
- <th>{{ _("Release") }}</th>
- <th>{{ _("Published on") }}</th>
- </tr>
- {% for release in releases %}
- <tr>
- <td><a href="/release/{{ release.id }}">{{ release.name }}</a></td>
- <td>{{ locale.format_date(release.date, shorter=True, relative=False) }}</td>
- </tr>
- {% end %}
- </table>
-{% end block %}
+++ /dev/null
-<div class="post">
- <h3>{{ item.name }}</h3>
- <p>
- {{ _("Here you will find the downloads for the version") }} {{ item.name }}:
- </p>
-
- <div align="right">
- {% if item.files %}
- {% for file in item.files %}
- <a class="{{ file.type }}" href="{{ file.url }}">{{ _(file.desc) }}</a><br />
- {% end %}
- {% else %}
- <p>{{ _("There are no downloads available for this release.") }}</p>
- {% end %}
- </div>
-
- <br class="clear" />
-</div>
+++ /dev/null
-<div class="page-header">
- <h2>
- {% if latest %}{{ _("Latest release") }}:{% end %}
- {{ release.name }}
- </h2>
-</div>
-
-{% if release.files %}
- {% if not release.stable %}
- <div class="alert alert-danger">
- <h4>{{ _("Caution!") }}</h4>
-
- This release is not a stable version of IPFire and
- intended for testing purposes only.
- Do not use this release in production and please
- report any bugs.
- </div>
- {% end %}
-
- <div class="ac">
- {% module DownloadButton(release) %}
- </div>
-
- {% for arch, files in downloads %}
- <h3>{{ arch }}</h3>
-
- <ul class="list-group">
- {% for file in files %}
- <li class="list-group-item">
- {% if file.size >= 1024 * 1024 %}
- <div class="pull-right">
- <code class="hidden-sm hidden-xs">{{ _("SHA1: %s") % file.sha1 }}</code>
- <span class="label label-default">{{ format_size(file.size) }}</span>
-
- <div class="btn-group">
- {% if file.magnet_link %}
- <a class="btn btn-default btn-xs" href="{{ file.magnet_link }}" title="{{ _("Magnet Link") }}">
- <span class="glyphicon glyphicon-magnet"></span>
- </a>
- {% end %}
-
- {% if file.torrent_url %}
- <a class="btn btn-default btn-xs" href="{{ file.torrent_url }}" title="{{ _("Torrent Download") }}">
- <span class="glyphicon glyphicon-download-alt"></span>
- </a>
- {% end %}
- </div>
- </div>
- {% end %}
-
- <a class="download-splash" href="{{ file.url }}">{{ _(file.desc) }}</a>
- </li>
- {% end %}
- </ul>
- {% end %}
-
- {% if release.news %}
- {% module NewsItem(release.news, show_heading=True, announcement=True) %}
- {% end %}
-{% else %}
- <div class="alert alert-warning">
- {{ _("There are no downloads available for this release.") }}
- </div>
-{% end %}
"NetBootMenuHeader" : ui_modules.NetBootMenuHeaderModule,
"NetBootMenuSeparator" : ui_modules.NetBootMenuSeparatorModule,
"ProgressBar" : ui_modules.ProgressBarModule,
- "ReleaseItem" : ui_modules.ReleaseItemModule,
"FireinfoDeviceTable" : ui_modules.FireinfoDeviceTableModule,
"FireinfoDeviceAndGroupsTable" : ui_modules.FireinfoDeviceAndGroupsTableModule,
"FireinfoGeoTable" : ui_modules.FireinfoGeoTableModule,
# downloads.ipfire.org
self.add_handlers(r"downloads?(\.dev)?\.ipfire\.org", [
- (r"/", DownloadsIndexHandler),
- (r"/latest", DownloadsLatestHandler),
- (r"/release/(\d)", DownloadsReleaseHandler),
- (r"/release/([\w\.\-]*)", DownloadsReleaseHandler),
- (r"/older", DownloadsOlderHandler),
- (r"/development", DownloadsDevelopmentHandler),
- (r"/mirrors", tornado.web.RedirectHandler, { "url" : "https://mirrors.ipfire.org/" }),
- (r"/source", tornado.web.RedirectHandler, { "url" : "https://source.ipfire.org/" }),
- (r"/download-splash", DownloadSplashHandler),
(r"/(iso|torrent)/(.*)", DownloadCompatHandler),
(r"/(.*)", DownloadFileHandler),
])
#!/usr/bin/python
-import logging
import random
import tornado.web
from handlers_base import *
-class DownloadsIndexHandler(BaseHandler):
- def get(self):
- releases = self.releases.get_all()
-
- self.render("downloads-index.html", releases=releases)
-
-
-class DownloadsReleaseHandler(BaseHandler):
- def get(self, release):
- release = self.releases.get_by_sname(release)
-
- if not release:
- release = self.releases.get_by_id(release)
-
- if not release:
- raise tornado.web.HTTPError(404)
-
- self.render("downloads-item.html", release=release, latest=False)
-
-
-class DownloadsLatestHandler(BaseHandler):
- def get(self):
- release = self.releases.get_latest()
- if not release:
- raise tornado.web.HTTPError(404)
-
- self.render("downloads-item.html", release=release, latest=True)
-
-
-class DownloadsOlderHandler(BaseHandler):
- def get(self):
- releases = self.releases.get_stable()
-
- # Drop the latest release
- if releases:
- releases = releases[1:]
-
- self.render("downloads-older.html", releases=releases)
-
-
-class DownloadsDevelopmentHandler(BaseHandler):
- def get(self):
- releases = self.releases.get_unstable()
-
- self.render("downloads-development.html", releases=releases)
-
-
-class DownloadAllHandler(BaseHandler):
- def get(self):
- self.render("downloads-all.html",
- releases=self.releases.get_stable())
-
-
-class DownloadDevelopmentHandler(BaseHandler):
- def get(self):
- self.render("downloads-development.html",
- releases=self.releases.get_unstable())
-
-
class DownloadFileHandler(BaseHandler):
def prepare(self):
self.set_header("Pragma", "no-cache")
return
raise tornado.web.HTTPError(404)
-
-
-class DownloadSplashHandler(BaseHandler):
- def get(self):
- self.render("download-splash.html")
return self.render_string("netboot/menu-separator.cfg")
-class ReleaseItemModule(UIModule):
- def render(self, release, latest=False):
- arches = ("x86_64", "i586", "arm")
-
- downloads = []
- for arch in arches:
- files = []
-
- for file in release.files:
- if not file.arch == arch:
- continue
-
- files.append(file)
-
- if files:
- downloads.append((arch, files))
-
- return self.render_string("modules/release-item.html",
- release=release, latest=latest, downloads=downloads)
-
-
-class DownloadButtonModule(UIModule):
- def render(self, release, text="Download now!"):
- best_image = None
-
- for file in release.files:
- if (release.sname < "ipfire-2.19-core100" or file.arch == "x86_64") \
- and file.type == "iso":
- best_image = file
- break
-
- # Show nothing when there was no image found.
- if not best_image:
- return ""
-
- return self.render_string("modules/download-button.html",
- release=release, image=best_image)
-
-
class ProgressBarModule(UIModule):
def render(self, value, colour=None):
value *= 100