remove tera templates

This commit is contained in:
glyph 2022-03-24 09:11:26 +02:00
parent 50afb61955
commit 5fc0094146
35 changed files with 0 additions and 1360 deletions

View File

@ -1,16 +0,0 @@
<!doctype html>
<html lang="en"{% if theme %} data-theme="{{ theme }}"{% endif %}>
<head>
<meta charset="utf-8">
<title>PeachCloud</title>
<meta name="description" content="PeachCloud Network">
<meta name="author" content="glyph">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/css/peachcloud.css">
<style>@import url("/css/_variables.css");</style>
</head>
<body>
{% block nav %}{% endblock nav %}
</body>
</html>

View File

@ -1,9 +0,0 @@
{%- extends "nav" -%}
{%- block card %}
<div class="card center">
<div class="card-container capsule info-border">
<p>PeachCloud has encountered an internal error. This may indicate that one or several software components are misconfigured or malfunctioning. Please try to repeat your desired actions. If the problem persists, a system reset is recommended - either via the <a href="/shutdown">Shutdown menu</a> or the OLED menu on the physical device.</p>
<p>Click the back arrow in the top-left or the PeachCloud logo at the bottom of your screen to return Home.</p>
</div>
</div>
{%- endblock card -%}

View File

@ -1,11 +0,0 @@
{%- extends "nav" -%}
{%- block card %}
<div class="card center">
<div class="capsule-container">
<div class="capsule info-border">
<p>No PeachCloud resource exists for this URL. Please ensure that the URL in the address bar is correct.</p>
<p>Click the back arrow in the top-left or the PeachCloud logo at the bottom of your screen to return Home.</p>
</div>
</div>
</div>
{%- endblock card -%}

View File

@ -1,33 +0,0 @@
{%- extends "nav" -%}
{%- block card %}
<!-- GUIDE -->
<div class="card card-wide center">
<div class="capsule capsule-container border-info">
<!-- GETTING STARTED -->
<details>
<summary class="card-text link">Getting started</summary>
<p class="card-text" style="margin-top: 1rem; margin-bottom: 1rem;">The Scuttlebutt server (sbot) will be inactive when you first run PeachCloud. This is to allow configuration parameters to be set before it is activated for the first time. Navigate to the <a href="/settings/scuttlebutt/configure" class="link font-gray">Sbot Configuration</a> page to configure your system. The default configuration will be fine for most usecases.</p>
<p class="card-text" style="margin-top: 1rem; margin-bottom: 1rem;">Once the configuration is set, navigate to the <strong><a href="/settings/scuttlebutt" class="link font-gray">Scuttlebutt settings menu</a></strong> to start the sbot. If the server starts successfully, you will see a green smiley face on the home page. If the face is orange and sleeping, that means the sbot is still inactive (ie. the process is not running). If the face is red and dead, that means the sbot failed to start - indicated an error. For now, the best way to gain insight into the problem is to check the systemd log. Open a terminal and enter: <code>systemctl --user status go-sbot.service</code>. The log output may give some clues about the source of the error.</p>
</details>
<!-- BUG REPORTS -->
<details>
<summary class="card-text link">Submit a bug report</summary>
<p class="card-text" style="margin-top: 1rem; margin-bottom: 1rem;">Bug reports can be submitted by filing an issue on the peach-workspace git repo. Before filing a report, first check to see if an issue already exists for the bug you've encountered. If not, you're invited to submit a new report; the template will guide you through several questions.</p>
</details>
<!-- REQUEST SUPPORT -->
<details>
<summary class="card-text link">Share feedback & request support</summary>
<p class="card-text" style="margin-top: 1rem; margin-bottom: 1rem;">You're invited to share your thoughts and experiences of PeachCloud in the #peachcloud channel on Scuttlebutt. The channel is also a good place to ask for help.</p>
<p class="card-text" style="margin-top: 1rem; margin-bottom: 1rem;">Alternatively, we have a <strong><a href="https://matrix.to/#/#peachcloud:matrix.org" class="link font-gray">Matrix channel</a></strong> for discussion about PeachCloud and you can also reach out to @glyph <strong><a href="mailto:glyph@mycelial.technology" class="link font-gray">via email</a></strong>.</p>
</details>
<!-- CONTRIBUTE -->
<details>
<summary class="card-text link">Contribute to PeachCloud</summary>
<p class="card-text" style="margin-top: 1rem; margin-bottom: 1rem;">PeachCloud is free, open-source software and relies on donations and grants to fund develop. Donations can be made on our <strong><a href="https://opencollective.com/peachcloud" class="link font-gray">Open Collective</a></strong> page.</p>
<p class="card-text" style="margin-top: 1rem; margin-bottom: 1rem;">Programmers, designers, artists and writers are also welcome to contribute to the project. Please visit the <strong><a href="https://git.coopcloud.tech/PeachCloud/peach-workspace" class="link font-gray">main PeachCloud git repository</a></strong> to find out more details or contact the team via Scuttlebutt, Matrix or email.</p>
</details>
</div>
<!-- FLASH MESSAGE -->
{% include "snippets/flash_message" %}
</div>
{%- endblock card -%}

View File

@ -1,68 +0,0 @@
{%- extends "nav" -%}
{%- block card %}
<!-- RADIAL MENU -->
<div class="grid">
<!-- top-left -->
<!-- PEERS LINK AND ICON -->
<a class="top-left" href="/scuttlebutt/peers" title="Scuttlebutt Peers">
<div class="circle circle-small border-circle-small border-ssb">
<img class="icon-medium" src="/icons/users.svg">
</div>
</a>
<!-- top-middle -->
<!-- CURRENT USER LINK AND ICON -->
<a class="top-middle" href="/scuttlebutt/profile" title="Profile">
<div class="circle circle-small border-circle-small border-ssb">
<img class="icon-medium" src="/icons/user.svg">
</div>
</a>
<!-- top-right -->
<!-- MESSAGES LINK AND ICON -->
<a class="top-right" href="/scuttlebutt/private" title="Private Messages">
<div class="circle circle-small border-circle-small border-ssb">
<img class="icon-medium" src="/icons/envelope.svg">
</div>
</a>
<!-- middle -->
<a class="middle">
{% if sbot_status.state == "active" %}
<div class="circle circle-large circle-success">
<p style="font-size: 4rem; color: var(--near-black);">^_^</p>
</div>
{% elif sbot_status.state == "inactive" %}
<div class="circle circle-large circle-warning">
<p style="font-size: 4rem; color: var(--near-black);">z_z</p>
</div>
{% else %}
<div class="circle circle-large circle-error">
<p style="font-size: 4rem; color: var(--near-black);">x_x</p>
</div>
{% endif %}
</a>
<!-- bottom-left -->
<!-- SYSTEM STATUS LINK AND ICON -->
{%- if standalone_mode == true -%}
<a class="bottom-left" href="/status/scuttlebutt" title="Status">
{% else -%}
<a class="bottom-left" href="/status" title="Status">
{%- endif -%}
<div class="circle circle-small border-circle-small {% if sbot_status.state == "active" %}border-success{% elif sbot_status.state == "inactive" %}border-warning{% else %}border-danger{% endif %}">
<img class="icon-medium" src="/icons/heart-pulse.svg">
</div>
</a>
<!-- bottom-middle -->
<!-- PEACHCLOUD GUIDEBOOK LINK AND ICON -->
<a class="bottom-middle" href="/guide" title="Guide">
<div class="circle circle-small border-circle-small border-info">
<img class="icon-medium" src="/icons/book.svg">
</div>
</a>
<!-- bottom-right -->
<!-- SYSTEM SETTINGS LINK AND ICON -->
<a class="bottom-right" href="/settings" title="Settings">
<div class="circle circle-small border-circle-small border-settings">
<img class="icon-medium" src="/icons/cog.svg">
</div>
</a>
</div>
{%- endblock card %}

View File

@ -1,20 +0,0 @@
{%- extends "nav" -%}
{%- block card %}
<!-- LOGIN FORM -->
<div class="card center">
<form id="login_form" class="center" action="/login" method="post">
<div style="display: flex; flex-direction: column; margin-bottom: 1rem;">
<!-- input for password -->
<label for="password" class="center label-small font-gray" style="width: 80%;">PASSWORD</label>
<input id="password" name="password" class="center input" type="password" title="Password for given username"/>
<!-- login (form submission) button -->
<input id="loginUser" class="button button-primary center" title="Login" type="submit" value="Login">
<div class="center-text" style="margin-top: 1rem;">
<a href="/settings/admin/forgot_password" class="label-small link font-gray">Forgot Password?</a>
</div>
</div>
<!-- FLASH MESSAGE -->
{% include "snippets/flash_message" %}
</form>
</div>
{%- endblock card -%}

View File

@ -1,41 +0,0 @@
{%- extends "base" -%}
{%- block nav -%}
<!-- Top nav bar -->
<nav class="nav-bar">
<a class="nav-item" href="{% if back %}{{ back }}{% endif %}" title="Back">
<img class="icon-medium nav-icon-left icon-active" src="/icons/back.svg" alt="Back">
</a>
<h1 class="nav-title">{{ title }}</h1>
<a class="nav-item" id="logoutButton" href="/logout" title="Logout">
<img class="icon-medium nav-icon-right icon-active" src="/icons/enter.svg" alt="Enter">
</a>
</nav>
<!-- Main content container -->
<main>
{%- block card -%}{%- endblock card %}
</main>
<!-- Bottom nav bar -->
<nav class="nav-bar">
<a class="nav-item" href="https://scuttlebutt.nz/">
<img class="icon-medium nav-icon-left" title="Scuttlebutt Website" src="/icons/hermies_hex{% if theme and theme == "dark" %}_light{% endif %}.svg" alt="Secure Scuttlebutt">
</a>
<a class="nav-item" href="/">
<img class="icon nav-icon-left" src="/icons/peach-icon.png" alt="PeachCloud" title="Home">
</a>
{# only render a theme-switcher icon if the `theme` variable has been set #}
{% if theme and theme == "light" %}
<a class="nav-item" href="/theme?theme=dark">
<img class="icon-medium nav-icon-right icon-active" title="Toggle theme" src="/icons/moon.png" alt="Moon">
</a>
{% elif theme and theme == "dark" %}
<a class="nav-item" href="/theme?theme=light">
<img class="icon-medium nav-icon-right icon-active" title="Toggle theme" src="/icons/sun.png" alt="Sun">
</a>
{% else %}
{# render hidden element to maintain correctly alignment of other bottom nav icons #}
<a class="nav-item" style="visibility: hidden;" href="/theme?theme=light">
<img class="icon-medium nav-icon-right icon-active" title="Toggle theme" src="/icons/sun.png" alt="Sun">
</a>
{% endif %}
</nav>
{%- endblock nav -%}

View File

@ -1,15 +0,0 @@
{%- extends "nav" -%}
{%- block card %}
<!-- SHUTDOWN / REBOOT MENU -->
<div class="card center">
<div class="card-container">
<!-- BUTTONS -->
<div id="buttonDiv">
<a id="rebootBtn" class="button button-primary center" href="/power/reboot" title="Reboot Device">Reboot</a>
<a id="shutdownBtn" class="button button-warning center" href="/power/shutdown" title="Shutdown Device">Shutdown</a>
</div>
<!-- FLASH MESSAGE -->
{% include "snippets/flash_message" %}
</div>
</div>
{%- endblock card -%}

View File

@ -1,11 +0,0 @@
{%- extends "nav" -%}
{%- block card %}
<!-- SBOT INACTIVE -->
<div class="card center">
<div class="capsule capsule-container border-warning center-text">
<p class="card-text" style="font-size: var(--font-size-4);">Sbot Inactive</p>
<p class="card-text">{{ unavailable_msg }}</p>
<p class="card-text">Visit the <strong><a href="/settings/scuttlebutt" class="link">Scuttlebutt settings menu</a></strong> to start the Sbot and then try again.</p>
</div>
</div>
{%- endblock card -%}

View File

@ -1,20 +0,0 @@
{%- extends "nav" -%}
{%- block card %}
<!-- SCUTTLEBUTT INVITE FORM -->
<div class="card center">
<form id="invites" class="center" action="/scuttlebutt/invites" method="post">
<div class="center" style="width: 80%;">
<label for="inviteUses" class="label-small font-gray" title="Number of times the invite code can be reused">USES</label>
<input type="number" id="inviteUses" name="uses" min="1" max="150" size="3" value="1">
{% if invite_code %}
<p class="card-text" style="margin-top: 1rem; user-select: all;" title="Invite code">{{ invite_code }}</p>
{% endif %}
</div>
<!-- BUTTONS -->
<input id="createInvite" class="button button-primary center" style="margin-top: 1rem;" type="submit" title="Create a new invite code" value="Create">
<a id="cancel" class="button button-secondary center" href="/scuttlebutt/peers" title="Cancel">Cancel</a>
</form>
<!-- FLASH MESSAGE -->
{% include "snippets/flash_message" %}
</div>
{%- endblock card -%}

View File

@ -1,21 +0,0 @@
{%- extends "nav" -%}
{%- block card %}
<!-- SCUTTLEBUTT PEERS -->
<div class="card center">
{# only render the peer menu elements if the sbot is active #}
{%- if sbot_state == "active" %}
<div class="card-container">
<!-- BUTTONS -->
<div id="buttons">
<a id="search" class="button button-primary center" href="/scuttlebutt/search" title="Search for a peer">Search</a>
<a id="friends" class="button button-primary center" href="/scuttlebutt/friends" title="List friends">Friends</a>
<a id="follows" class="button button-primary center" href="/scuttlebutt/follows" title="List follows">Follows</a>
<a id="blocks" class="button button-primary center" href="/scuttlebutt/blocks" title="List blocks">Blocks</a>
<a id="invites" class="button button-primary center" href="/scuttlebutt/invites" title="Create invites">Invites</a>
</div>
</div>
{%- endif %}
<!-- FLASH MESSAGE -->
{% include "snippets/flash_message" %}
</div>
{%- endblock card -%}

View File

@ -1,30 +0,0 @@
{%- extends "nav" -%}
{%- block card %}
<div class="card center">
{%- if peers %}
<ul class="center list">
{%- for peer in peers %}
{# set a fall-back value for name in case the data is unavailable #}
{%- if not peer['name'] %}
{%- set name = "name unavailable" %}
{%- else %}
{%- set name = peer['name'] %}
{%- endif %}
<li>
<a class="list-item link" href="/scuttlebutt/profile?public_key={{ peer['id'] }}">
{%- if peer['blob_path'] and peer['blob_exists'] == "true" %}
<img id="peerImage" class="icon list-icon" src="/blob/{{ peer['blob_path'] }}" alt="{{ name }}'s profile image">
{%- else %}
<img id="peerImage" class="icon icon-active list-icon" src="/icons/user.svg" alt="Placeholder profile image">
{%- endif %}
<p id="peerName" class="font-normal list-text">{{ name }}</p>
<label class="label-small label-ellipsis list-label font-gray" for="peerName" title="{{ name }}'s Public Key">{{ peer['id'] }}</label>
</a>
</li>
{%- endfor %}
</ul>
{%- else %}
<p>No follows found</p>
{%- endif %}
</div>
{%- endblock card -%}

View File

@ -1,23 +0,0 @@
{%- extends "nav" -%}
{%- block card %}
<!-- SCUTTLEBUTT PRIVATE MESSAGE FORM -->
<div class="card card-wide center">
{# only render the private message elements if the sbot is active #}
{%- if sbot_status and sbot_status.state == "active" %}
<form id="sbotConfig" class="center" action="/scuttlebutt/private" method="post">
<div class="center" style="display: flex; flex-direction: column; margin-bottom: 1rem;" title="Public key (ID) of the peer being written to">
<label for="publicKey" class="label-small font-gray">PUBLIC KEY</label>
<input type="text" id="publicKey" name="recipient" placeholder="@xYz...=.ed25519" {% if recipient_id %}value="{{ recipient_id }}"{% else %}autofocus{% endif %}>
</div>
<!-- input for message contents -->
<textarea id="privatePost" class="center input message-input" name="text" title="Compose a private message" placeholder="Write a private message..."{% if recipient_id %} autofocus{% endif %}></textarea>
<!-- hidden input field to pass the public key of the local peer -->
<input type="hidden" id="localId" name="id" value="{{ id }}">
<!-- BUTTONS -->
<input id="publish" class="button button-primary center" type="submit" style="margin-top: 1rem;" title="Publish private message to peer" value="Publish">
</form>
{%- endif %}
<!-- FLASH MESSAGE -->
{% include "snippets/flash_message" %}
</div>
{%- endblock card -%}

View File

@ -1,75 +0,0 @@
{%- extends "nav" -%}
{%- block card %}
<!-- USER PROFILE -->
<div class="card card-wide center">
{# only render the profile info elements if the sbot is active #}
{%- if sbot_status and sbot_status.state == "active" %}
<!-- PROFILE INFO BOX -->
<div class="capsule capsule-profile border-ssb" title="Scuttlebutt account profile information">
{% if is_local_profile %}
<!-- edit profile button -->
<a class="nav-icon-right" href="/scuttlebutt/profile/update" title="Edit your profile">
<img id="editProfile" class="icon-small icon-active" src="/icons/pencil.svg" alt="Edit">
</a>
{% endif %}
<!-- PROFILE BIO -->
<!-- profile picture -->
{# only try to render profile pic if we have the blob #}
{%- if blob_path and blob_exists == true %}
<img id="profilePicture" class="icon-large" src="/blob/{{ blob_path }}" title="Profile picture" alt="Profile picture">
{% else %}
{# render a placeholder profile picture (icon) #}
<img id="profilePicture" class="icon icon-active" src="/icons/user.svg" title="Profile picture" alt="Profile picture">
{% endif %}
<!-- name, public key & description -->
<p id="profileName" class="card-text" title="Name">{{ name }}</p>
<label class="label-small label-ellipsis font-gray" style="user-select: all;" for="profileName" title="Public Key">{{ id }}</label>
<p id="profileDescription" style="margin-top: 1rem" class="card-text" title="Description">{{ description }}</p>
</div>
{% if is_local_profile %}
<!-- PUBLIC POST FORM -->
<form id="postForm" class="center" action="/scuttlebutt/publish" method="post">
<!-- input for message contents -->
<textarea id="publicPost" class="center input message-input" name="text" title="Compose Public Post" placeholder="Write a public post..."></textarea>
<input id="publishPost" class="button button-primary center" title="Publish" type="submit" value="Publish">
</form>
{% else %}
<!-- BUTTONS -->
<!-- TODO: each of these buttons needs to be a form with a public key -->
<div id="buttons" style="margin-top: 2rem;">
{% if following == false %}
<form id="followForm" class="center" action="/scuttlebutt/follow" method="post">
<input type="hidden" id="publicKey" name="public_key" value="{{ id }}">
<input id="followPeer" class="button button-primary center" type="submit" title="Follow Peer" value="Follow">
</form>
{% elif following == true %}
<form id="unfollowForm" class="center" action="/scuttlebutt/unfollow" method="post">
<input type="hidden" id="publicKey" name="public_key" value="{{ id }}">
<input id="unfollowPeer" class="button button-primary center" type="submit" title="Unfollow Peer" value="Unfollow">
</form>
{% else %}
<p>Unable to determine follow state</p>
{% endif %}
{% if blocking == false %}
<form id="blockForm" class="center" action="/scuttlebutt/block" method="post">
<input type="hidden" id="publicKey" name="public_key" value="{{ id }}">
<input id="blockPeer" class="button button-primary center" type="submit" title="Block Peer" value="Block">
</form>
{% elif blocking == true %}
<form id="unblockForm" class="center" action="/scuttlebutt/unblock" method="post">
<input type="hidden" id="publicKey" name="public_key" value="{{ id }}">
<input id="unblockPeer" class="button button-primary center" type="submit" title="Unblock Peer" value="Unblock">
</form>
{% else %}
<p>Unable to determine block state</p>
{% endif %}
<form class="center">
<a id="privateMessage" class="button button-primary center" href="/scuttlebutt/private?public_key={{ id }}" title="Private Message">Send Private Message</a>
</form>
</div>
{%- endif %}
{%- endif %}
<!-- FLASH MESSAGE -->
{% include "snippets/flash_message" %}
</div>
{%- endblock card -%}

View File

@ -1,16 +0,0 @@
{%- extends "nav" -%}
{%- block card %}
<!-- PEER SEARCH FORM -->
<div class="card center">
<form id="sbotConfig" class="center" action="/scuttlebutt/search" method="post">
<div class="center" style="display: flex; flex-direction: column; margin-bottom: 2rem;" title="Public key (ID) of a peer">
<label for="publicKey" class="label-small font-gray">PUBLIC KEY</label>
<input type="text" id="publicKey" name="public_key" placeholder="@xYz...=.ed25519" autofocus>
</div>
<!-- BUTTONS -->
<input id="search" class="button button-primary center" type="submit" title="Search for peer" value="Search">
<!-- FLASH MESSAGE -->
{% include "snippets/flash_message" %}
</form>
</div>
{%- endblock card -%}

View File

@ -1,27 +0,0 @@
{%- extends "nav" -%}
{%- block card %}
{# ASSIGN VARIABLES #}
{# ---------------- #}
<!-- SSB PROFILE UPDATE FORM -->
<div class="card card-wide center">
<form id="profileInfo" class="center" enctype="multipart/form-data" action="/scuttlebutt/profile/update" method="post">
<div style="display: flex; flex-direction: column">
<label for="name" class="label-small font-gray">NAME</label>
<input style="margin-bottom: 1rem;" type="text" id="name" name="new_name" placeholder="Choose a name for your profile..." value="{{ name }}">
<label for="description" class="label-small font-gray">DESCRIPTION</label>
<textarea id="description" class="message-input" style="margin-bottom: 1rem;" name="new_description" placeholder="Write a description for your profile...">{{ description }}</textarea>
<label for="image" class="label-small font-gray">IMAGE</label>
<input type="file" id="fileInput" class="font-normal" name="image">
</div>
<input type="hidden" name="id" value="{{ id }}">
<input type="hidden" name="current_name" value="{{ name }}">
<input type="hidden" name="current_description" value="{{ description }}">
<div id="buttonDiv" style="margin-top: 2rem;">
<input id="updateProfile" class="button button-primary center" title="Publish" type="submit" value="Publish">
<a class="button button-secondary center" href="/scuttlebutt/profile" title="Cancel">Cancel</a>
</div>
</form>
<!-- FLASH MESSAGE -->
{% include "snippets/flash_message" %}
</div>
{%- endblock card -%}

View File

@ -1,24 +0,0 @@
{%- extends "nav" -%}
{%- block card %}
<!-- CHANGE PASSWORD FORM -->
<div class="card center">
<form id="changePassword" class="center" action="/settings/admin/change_password" method="post">
<div style="display: flex; flex-direction: column; margin-bottom: 1rem;">
<!-- input for current password -->
<label for="currentPassword" class="center label-small font-gray" style="width: 80%;">CURRENT PASSWORD</label>
<input id="currentPassword" class="center input" name="current_password" type="password" title="Current password" autofocus>
<!-- input for new password -->
<label for="newPassword" class="center label-small font-gray" style="width: 80%;">NEW PASSWORD</label>
<input id="newPassword" class="center input" name="new_password1" type="password" title="New password">
<!-- input for duplicate new password -->
<label for="newPasswordDuplicate" class="center label-small font-gray" style="width: 80%;">RE-ENTER NEW PASSWORD</label>
<input id="newPasswordDuplicate" class="center input" name="new_password2" type="password" title="New password duplicate">
<!-- save (form submission) button -->
<input id="savePassword" class="button button-primary center" title="Add" type="submit" value="Save">
<a class="button button-secondary center" href="/settings/admin" title="Cancel">Cancel</a>
</div>
</form>
<!-- FLASH MESSAGE -->
{% include "snippets/flash_message" %}
</div>
{%- endblock card -%}

View File

@ -1,32 +0,0 @@
{%- extends "nav" -%}
{%- block card %}
<!-- CONFIGURE ADMIN PAGE -->
<div class="card center">
<div class="capsule capsule-profile center-text font-normal border-info" style="font-family: var(--sans-serif); font-size: var(--font-size-6); margin-bottom: 1.5rem;">Administrators are identified and added by their Scuttlebutt public keys. These accounts will be sent private messages on Scuttlebutt when a password reset is requested.</div>
{% if not ssb_admin_ids %}
<div class="card-text">
There are no currently configured admins.
</div>
{% else %}
{% for admin in ssb_admin_ids %}
<form class="center" action="/settings/admin/delete" method="post">
<div class="center" style="display: flex; justify-content: space-between;">
<input type="hidden" name="ssb_id" value="{{ admin }}"/>
<p class="label-small label-ellipsis font-gray" style="user-select: all;">{{ admin }}</p>
<input style="width: 30%;" type="submit" class="button button-warning" value="Delete" title="Delete SSB administrator"/>
</div>
</form>
{% endfor %}
{% endif %}
<form id="addAdmin" class="center" style="margin-top: 2rem;" action="/settings/admin/add" method="post">
<div class="center" style="display: flex; flex-direction: column; margin-bottom: 2rem;" title="Public key (ID) of a desired administrator">
<label for="publicKey" class="label-small font-gray">PUBLIC KEY</label>
<input type="text" id="publicKey" name="ssb_id" placeholder="@xYz...=.ed25519" autofocus>
</div>
<!-- BUTTONS -->
<input class="button button-primary center" type="submit" title="Add SSB administrator" value="Add Admin">
<!-- FLASH MESSAGE -->
{% include "snippets/flash_message" %}
</form>
</div>
{%- endblock card -%}

View File

@ -1,19 +0,0 @@
{%- extends "nav" -%}
{%- block card %}
<!-- PASSWORD RESET REQUEST CARD -->
<div class="card center">
<div class="capsule capsule-container border-info">
<p class="card-text">Click the 'Send Temporary Password' button to send a new temporary password which can be used to change your device password.</p>
<p class="card-text" style="margin-top: 1rem;">The temporary password will be sent in an SSB private message to the admin of this device.</p>
<p class="card-text" style="margin-top: 1rem;">Once you have the temporary password, click the 'Set New Password' button to reach the password reset page.</p>
</div>
<form id="sendPasswordReset" action="/settings/admin/send_password_reset" method="post">
<div id="buttonDiv">
<input class="button button-primary center" style="margin-top: 1rem;" type="submit" value="Send Temporary Password" title="Send temporary password to Scuttlebutt admin"/>
<a href="/settings/admin/reset_password" class="button button-primary center" title="Set a new password using the temporary password">Set New Password</a>
</div>
</form>
<!-- FLASH MESSAGE -->
{% include "snippets/flash_message" %}
</div>
{%- endblock card -%}

View File

@ -1,12 +0,0 @@
{%- extends "nav" -%}
{%- block card %}
<!-- ADMIN SETTINGS MENU -->
<div class="card center">
<!-- BUTTONS -->
<div id="settingsButtons">
<a id="configure" class="button button-primary center" href="/settings/admin/configure" title="Configure Admin">Configure Admin</a>
<a id="change" class="button button-primary center" href="/settings/admin/change_password" title="Change Password">Change Password</a>
<a id="reset" class="button button-primary center" href="/settings/admin/forgot_password" title="Reset Password">Reset Password</a>
</div>
</div>
{%- endblock card -%}

View File

@ -1,23 +0,0 @@
{%- extends "nav" -%}
{%- block card %}
<!-- RESET PASSWORD PAGE -->
<div class="card center">
<form id="changePassword" class="center" action="/settings/admin/reset_password" method="post">
<div style="display: flex; flex-direction: column; margin-bottom: 1rem;">
<!-- input for temporary password -->
<label class="center label-small font-gray" style="width: 80%;" for="temporary_password">TEMPORARY PASSWORD</label>
<input id="temporary_password" class="center input" name="temporary_password" type="password" title="temporary password" value="">
<!-- input for new password1 -->
<label class="center label-small font-gray" style="width: 80%;" for="new_password1">NEW PASSWORD</label>
<input id="new_password1" class="center input" name="new_password1" title="new_password1" type="password" value="">
<!-- input for new password2 -->
<label class="center label-small font-gray" style="width: 80%;" for="new_password2">RE-ENTER NEW PASSWORD</label>
<input id="new_password2" class="center input" name="new_password2" title="new_password2" type="password" value="">
<!-- save (form submission) button -->
<input id="changePasswordButton" class="button button-primary center" title="Add" type="submit" value="Save">
</div>
</form>
<!-- FLASH MESSAGE -->
{% include "snippets/flash_message" %}
</div>
{%- endblock card -%}

View File

@ -1,14 +0,0 @@
{%- extends "nav" -%}
{%- block card %}
<!-- SETTINGS MENU -->
<div class="card center">
<!-- BUTTONS -->
<div id="settingsButtons">
{% if standalone_mode == false %}
<a id="network" class="button button-primary center" href="/settings/network" title="Network Settings">Network</a>
{% endif %}
<a id="scuttlebutt" class="button button-primary center" href="/settings/scuttlebutt" title="Scuttlebutt Settings">Scuttlebutt</a>
<a id="admin" class="button button-primary center" href="/settings/admin" title="Administrator Settings">Administration</a>
</div>
</div>
{%- endblock card -%}

View File

@ -1,20 +0,0 @@
{%- extends "nav" -%}
{%- block card %}
<!-- NETWORK ADD CREDENTIALS FORM -->
<div class="card center">
<div class="card-container">
<form id="wifiCreds" action="/settings/network/wifi/add" method="post">
<!-- input for network ssid -->
<input id="ssid" name="ssid" class="center input" type="text" placeholder="SSID" title="Network name (SSID) for WiFi access point" value="{%- if selected -%}{{ selected }}{%- endif -%}" autofocus>
<!-- input for network password -->
<input id="pass" name="pass" class="center input" type="password" placeholder="Password" title="Password for WiFi access point">
<div id="buttonDiv">
<input id="addWifi" class="button button-primary center" title="Add" type="submit" value="Add">
<a class="button button-secondary center" href="/settings/network" title="Cancel">Cancel</a>
</div>
</form>
<!-- FLASH MESSAGE -->
{% include "snippets/flash_message" %}
</div>
</div>
{%- endblock card -%}

View File

@ -1,75 +0,0 @@
{%- extends "nav" -%}
{%- block card -%}
{%- if wlan_networks -%}
{%- for ssid, ap in wlan_networks -%}
{# select only the access point we are interested in #}
{%- if ssid == selected %}
<!-- NETWORK CARD -->
<div class="card center">
<!-- NETWORK INFO BOX -->
<div class="two-grid capsule{% if ssid == wlan_ssid %} success-border{% endif %}" title="PeachCloud network mode and status">
<!-- left column -->
<!-- NETWORK STATUS ICON -->
<div class="grid-column-1">
<img id="wifiIcon" class="center icon" src="/icons/wifi.svg" alt="WiFi icon">
<label class="center label-small font-gray" for="wifiIcon" title="Access Point Status">{% if ssid == wlan_ssid %}CONNECTED{% elif ap.state == "Available" %}AVAILABLE{% else %}NOT IN RANGE{% endif %}</label>
</div>
<!-- right column -->
<!-- NETWORK DETAILED INFO -->
<div class="grid-column-2">
<label class="label-small font-gray" for="netSsid" title="WiFi network SSID">SSID</label>
<p id="netSsid" class="card-text" title="SSID">{{ ssid }}</p>
<label class="label-small font-gray" for="netSec" title="Security protocol">SECURITY</label>
<p id="netSec" class="card-text" title="Security protocol in use by {{ ssid }}">{% if ap.detail %}{% if ap.detail.protocol != "" %}{{ ap.detail.protocol }}{% else %}None{% endif %}{% else %}Unknown{% endif %}</p>
<label class="label-small font-gray" for="netSig" title="Signal Strength">SIGNAL</label>
<p id="netSig" class="card-text" title="Signal strength of WiFi access point">{% if ap.signal %}{{ ap.signal }}%{% else %}Unknown{% endif %}</p>
</div>
</div>
<!-- BUTTONS -->
<div class="card-container" style="padding-top: 0;">
<div id="buttonDiv">
{%- if wlan_ssid == selected -%}
<form id="wifiDisconnect" action="/settings/network/wifi/disconnect" method="post">
<!-- hidden element: allows ssid to be sent in request -->
<input id="disconnectSsid" name="ssid" type="text" value="{{ ssid }}" style="display: none;">
<input id="disconnectWifi" class="button button-warning center" title="Disconnect from Network" type="submit" value="Disconnect">
</form>
{%- endif -%}
{%- if saved_aps -%}
{# Loop through the list of AP's with saved credentials #}
{%- for ap in saved_aps -%}
{# If the selected access point appears in the list, #}
{# display the Modify and Forget buttons. #}
{%- if ap.ssid == selected -%}
{# Set 'in_list' to true to allow correct Add button display #}
{% set_global in_list = true %}
{%- if wlan_ssid != selected and ap.state == "Available" -%}
<form id="wifiConnect" action="/settings/network/wifi/connect" method="post">
<!-- hidden element: allows ssid to be sent in request -->
<input id="connectSsid" name="ssid" type="text" value="{{ ap.ssid }}" style="display: none;">
<input id="connectWifi" class="button button-primary center" title="Connect to Network" type="submit" value="Connect">
</form>
{%- endif -%}
<a class="button button-primary center" href="/settings/network/wifi/modify?ssid={{ ssid }}">Modify</a>
<form id="wifiForget" action="/settings/network/wifi/forget" method="post">
<!-- hidden element: allows ssid to be sent in request -->
<input id="forgetSsid" name="ssid" type="text" value="{{ ap.ssid }}" style="display: none;">
<input id="forgetWifi" class="button button-warning center" title="Forget Network" type="submit" value="Forget">
</form>
{%- endif -%}
{%- endfor -%}
{%- endif -%}
{%- if in_list == false -%}
{# Display the Add button if AP creds not already in saved networks list #}
<a class="button button-primary center" href="/settings/network/wifi/add?ssid={{ ssid }}">Add</a>
{%- endif -%}
<a class="button button-secondary center" href="/settings/network/wifi" title="Cancel">Cancel</a>
</div>
<!-- FLASH MESSAGE -->
{% include "snippets/flash_message" %}
</div>
</div>
{%- endif -%}
{%- endfor -%}
{%- endif -%}
{%- endblock card -%}

View File

@ -1,60 +0,0 @@
{%- extends "nav" -%}
{%- block card %}
<!-- CONFIGURE DNS FORM -->
<div class="card center">
<div class="form-container">
{% if enable_dyndns %}
<!-- DYNDNS STATUS INDICATOR -->
<div id="dyndns-status-indicator" class="stack capsule{% if is_dyndns_online %} success-border{% else %} warning-border{% endif %}">
<div class="stack">
{% if is_dyndns_online %}
<label class="label-small font-near-black">Dynamic DNS is currently online.</label>
{% else %}
<label class="label-small font-near-black">Dynamic DNS is enabled but may be offline.</label>
{% endif %}
</div>
</div>
{% endif %}
<form id="configureDNS" action="/settings/network/dns" method="post">
<div class="input-wrapper">
<!-- input for externaldomain -->
<label id="external_domain" class="label-small input-label font-near-black">
<label class="label-small input-label font-gray" for="external_domain" style="padding-top: 0.25rem;">External Domain (optional)</label>
<input id="external_domain" class="form-input" style="margin-bottom: 0;"
name="external_domain" type="text" title="external domain" value="{{ external_domain }}"></label>
</div>
<div class="input-wrapper">
<div>
<!-- checkbox for dynds flag -->
<label class="label-small input-label font-gray"> Enable Dynamic DNS </label>
<input
style="margin-left: 0px;"
id="enable_dyndns" name="enable_dyndns" title="Activate dynds" type="checkbox" {% if enable_dyndns %}checked{% endif %}>
</div>
</div>
<div class="input-wrapper">
<!-- input for dynds -->
<label id="cut" class="label-small input-label font-near-black">
<label class="label-small input-label font-gray" for="cut" style="padding-top: 0.25rem;">Dynamic DNS Domain</label>
<input id="dyndns_domain" class="alert-input" name="dynamic_domain" placeholder="" type="text" title="dyndns_domain" value="{{ dyndns_subdomain }}">.dyn.peachcloud.org</label>
</div>
</div>
<div id="buttonDiv">
<input id="configureDNSButton" class="button button-primary center" title="Add" type="submit" value="Save">
</div>
</form>
<!-- FLASH MESSAGE -->
<!-- check for flash message and display accordingly -->
{% if flash_msg and flash_name == "success" %}
<!-- display success message -->
<div class="capsule center-text flash-message font-success">{{ flash_msg }}.</div>
{%- elif flash_msg and flash_name == "info" %}
<!-- display info message -->
<div class="capsule center-text flash-message font-info">{{ flash_msg }}.</div>
{%- elif flash_msg and flash_name == "error" %}
<!-- display error message -->
<div class="capsule center-text flash-message font-failure">{{ flash_msg }}.</div>
{%- endif -%}
</div>
</div>
{%- endblock card -%}

View File

@ -1,55 +0,0 @@
{%- extends "nav" -%}
{%- block card -%}
{# ASSIGN VARIABLES #}
{# ---------------- #}
{%- if data_total -%}
{% set data_usage_total = data_total.total / 1024 / 1024 | round -%}
{%- else -%}
{% set data_usage_total = "x" -%}
{% endif -%}
<!-- NETWORK DATA ALERTS VIEW -->
<form id="wifiAlerts" action="/settings/network/wifi/usage" class="card center" method="post">
<div class="stack capsule" style="margin-left: 2rem; margin-right: 2rem;">
<div class="flex-grid">
<label id="dataTotal" class="label-large" title="Data download total in MB">
{{ data_usage_total }}
</label>
<label class="label-small font-near-black">MB</label>
</div>
<label class="center-text label-small font-gray">USAGE TOTAL</label>
</div>
<div class="card-container container">
<div>
<img id="warnIcon" class="icon{% if threshold.warn_flag == false %} icon-inactive{% endif %}" alt="Warning" title="Warning threshold" src="/icons/alert.svg">
</div>
<div>
<!-- input for warning threshold -->
<label id="warn" class="label-small font-near-black"><input id="warnInput" class="alert-input" name="warn" placeholder="0" type="text" title="Warning threshold value" value="{{ threshold.warn }}">MB</label>
<label class="label-small font-gray" for="warn" style="padding-top: 0.25rem;">WARNING THRESHOLD</label>
</div>
<div>
<!-- checkbox for warning threshold flag -->
<input id="warnCheck" name="warn_flag" title="Activate warning" type="checkbox" {% if threshold.warn_flag %}checked{% endif %}>
</div>
<div>
<img id="cutIcon" class="icon{% if threshold.cut_flag == false %} icon-inactive{% endif %}" alt="Cutoff" title="Cutoff threshold" src="/icons/scissor.svg">
</div>
<div>
<!-- input for cutoff threshold -->
<label id="cut" class="label-small font-near-black"><input id="cutInput" class="alert-input" name="cut" placeholder="0" type="text" title="Critical threshold value" value="{{ threshold.cut }}">MB</label>
<label class="label-small font-gray" for="cut" style="padding-top: 0.25rem;">CUTOFF THRESHOLD</label>
</div>
<div>
<!-- checkbox for cutoff threshold flag -->
<input id="cutCheck" name="cut_flag" title="Activate cutoff" type="checkbox" {% if threshold.cut_flag %}checked{% endif %}>
</div>
</div>
<div id="buttonDiv" class="button-div">
<input id="updateAlerts" class="button button-primary center" title="Update" type="submit" value="Update">
<a id="resetTotal" class="button button-warning center" href="/settings/network/wifi/usage/reset" title="Reset stored usage total to zero">Reset</a>
<a class="button button-secondary center" href="/settings/network" title="Cancel">Cancel</a>
</div>
<!-- FLASH MESSAGE -->
{% include "snippets/flash_message" %}
</form>
{%- endblock card %}

View File

@ -1,38 +0,0 @@
{%- extends "nav" -%}
{%- block card %}
<div class="card center">
<div class="center list-container">
<ul class="list">
{%- if ap_state == "up" %}
<li class="list-item light-bg warning-border">Enable WiFi client mode to view saved and available networks.</li>
{%- elif wlan_networks %}
{%- for ssid, state in wlan_networks %}
<li>
{%- if ssid == wlan_ssid %}
<a class="list-item link primary-bg" href="/settings/network/wifi?ssid={{ wlan_ssid }}">
<img id="netStatus" class="icon icon-active icon-medium list-icon" src="/icons/wifi.svg" alt="WiFi online">
<p class="list-text">{{ wlan_ssid }}</p>
<label class="label-small list-label font-gray" for="netStatus" title="Status">Connected</label>
</a>
{%- elif state == "Available" %}
<a class="list-item link light-bg" href="/settings/network/wifi?ssid={{ ssid }}">
<img id="netStatus" class="icon icon-inactive icon-medium list-icon" src="/icons/wifi.svg" alt="WiFi offline">
<p class="list-text">{{ ssid }}</p>
<label class="label-small list-label font-gray" for="netStatus" title="Status">{{ state }}</label>
</a>
{%- else %}
<a class="list-item link" href="/settings/network/wifi?ssid={{ ssid }}">
<img id="netStatus" class="icon icon-inactive icon-medium list-icon" src="/icons/wifi.svg" alt="WiFi offline">
<p class="list-text">{{ ssid }}</p>
<label class="label-small list-label font-gray" for="netStatus" title="Status">{{ state }}</label>
</a>
{%- endif %}
</li>
{%- endfor %}
{% else -%}
<li class="list-item light-bg">No saved or available networks found.</li>
{% endif -%}
</ul>
</div>
</div>
{%- endblock card -%}

View File

@ -1,23 +0,0 @@
{%- extends "nav" -%}
{%- block card %}
<!-- NETWORK SETTINGS CARD -->
<div class="card center">
<!-- BUTTONS -->
<div id="buttons">
<a class="button button-primary center" href="/settings/network/wifi/add" title="Add WiFi Network">Add WiFi Network</a>
<a id="configureDNS" class="button button-primary center" href="/settings/network/dns" title="Configure DNS">Configure DNS</a>
<!-- if ap is up, show "Enable WiFi" button, else show "Deplay Access Point" -->
{%- if ap_state == "up" %}
<a id="connectWifi" class="button button-primary center" href="/settings/network/wifi/activate" title="Enable WiFi">Enable WiFi</a>
{%- else %}
<a id="deployAccessPoint" class="button button-primary center" href="/settings/network/ap/activate" title="Deploy Access Point">Deploy Access Point</a>
{%- endif -%}
<a id="listWifi" class="button button-primary center" href="/settings/network/wifi" title="List WiFi Networks">List WiFi Networks</a>
<a id="viewUsage" class="button button-primary center" href="/settings/network/wifi/usage" title="View Data Usage">View Data Usage</a>
<a id="viewStatus" class="button button-primary center" href="/status/network" title="View Network Status">View Network Status</a>
</div>
<!-- FLASH MESSAGE -->
{% include "snippets/flash_message" %}
</div>
{%- endblock card -%}

View File

@ -1,20 +0,0 @@
{%- extends "nav" -%}
{%- block card %}
<!-- NETWORK MODIFY AP PASSWORD FORM -->
<div class="card center">
<div class="card-container">
<form id="wifiModify" action="/settings/network/wifi/modify" method="post">
<!-- input for network ssid -->
<input id="ssid" name="ssid" class="center input" type="text" placeholder="SSID" title="Network name (SSID) for WiFi access point" value="{% if selected %}{{ selected }}{% endif %}" autofocus>
<!-- input for network password -->
<input id="pass" name="pass" class="center input" type="password" placeholder="Password" title="Password for WiFi access point">
<div id="buttonDiv">
<input id="savePassword" class="button button-primary center" title="Save" type="submit" value="Save">
<a class="button button-secondary center" href="/settings/network" title="Cancel">Cancel</a>
</div>
</form>
<!-- FLASH MESSAGE -->
{% include "snippets/flash_message" %}
</div>
</div>
{%- endblock card -%}

View File

@ -1,87 +0,0 @@
{%- extends "nav" -%}
{%- block card %}
{# ASSIGN VARIABLES #}
{# ---------------- #}
{%- if sbot_config.hops -%}
{% set hops = sbot_config.hops -%}
{%- else -%}
{% set hops = "X" -%}
{%- endif -%}
{%- if sbot_config.lis -%}
{%- set listen_addr = sbot_config.lis | split(pat=":") -%}
{%- else -%}
{%- set listen_addr = ["", ""] -%}
{%- endif -%}
<!-- SBOT CONFIGURATION FORM -->
<div class="card center">
<form id="sbotConfig" class="center" action="/settings/scuttlebutt/configure" method="post">
<div class="center" style="display: flex; flex-direction: column; margin-bottom: 2rem;" title="Number of hops to replicate">
<label for="hops" class="label-small font-gray">HOPS</label>
<div id="hops" style="display: flex; justify-content: space-evenly;">
<div>
<input type="radio" id="hops_0" name="hops" value="0"{% if hops == 0 %} checked{% endif %}>
<label class="font-normal" for="hops_0">0</label>
</div>
<div>
<input type="radio" id="hops_1" name="hops" value="1"{% if hops == 1 %} checked{% endif %}>
<label class="font-normal" for="hops_1">1</label>
</div>
<div>
<input type="radio" id="hops_2" name="hops" value="2"{% if hops == 2 %} checked{% endif %}>
<label class="font-normal" for="hops_2">2</label>
</div>
<div>
<input type="radio" id="hops_3" name="hops" value="3"{% if hops == 3 %} checked{% endif %}>
<label class="font-normal" for="hops_3">3</label>
</div>
<div>
<input type="radio" id="hops_4" name="hops" value="4"{% if hops == 4 %} checked{% endif %}>
<label class="font-normal" for="hops_4">4</label>
</div>
</div>
</div>
<div class="center" style="display: flex; justify-content: space-between;">
<div style="display: flex; flex-direction: column; width: 60%; margin-bottom: 2rem;" title="IP address on which the sbot runs">
<label for="ip" class="label-small font-gray">IP ADDRESS</label>
<input type="text" id="ip" name="lis_ip" value="{{ listen_addr.0 }}">
</div>
<div style="display: flex; flex-direction: column; width: 20%; margin-bottom: 2rem;" title="Port on which the sbot runs">
<label for="port" class="label-small font-gray">PORT</label>
<input type="text" id="port" name="lis_port" value="{{ listen_addr.1 }}">
</div>
</div>
<div class="center" style="display: flex; flex-direction: column; margin-bottom: 2rem;" title="Network key (aka 'caps key') to define the Scuttleverse in which the sbot operates in">
<label for="network_key" class="label-small font-gray">NETWORK KEY</label>
<input type="text" id="network_key" name="shscap" value="{{ sbot_config.shscap }}">
</div>
<div class="center" style="display: flex; flex-direction: column; margin-bottom: 2rem;" title="Directory in which the sbot database is saved">
<label for="database_dir" class="label-small font-gray">DATABASE DIRECTORY</label>
<input type="text" id="database_dir" name="repo" value="{{ sbot_config.repo }}">
</div>
<div class="center">
<input type="checkbox" id="lanBroadcast" style="margin-bottom: 1rem;" name="localadv"{% if sbot_config.localadv == true %} checked{% endif %}>
<label class="font-normal" for="lanBroadcast" title="Broadcast the IP and port of this sbot instance so that local peers can discovery it and attempt to connect">Enable LAN Broadcasting</label><br>
<input type="checkbox" id="lanDiscovery" style="margin-bottom: 1rem;" name="localdiscov"{% if sbot_config.localdiscov == true %} checked{% endif %}>
<label class="font-normal" for="lanDiscovery" title="Listen for the presence of local peers and attempt to connect if found">Enable LAN Discovery</label><br>
<input type="checkbox" id="startup" style="margin-bottom: 1rem;" name="startup"{% if run_on_startup == "enabled" %} checked{% endif %}>
<label class="font-normal" for="startup" title="Run the pub automatically on system startup">Run pub when computer starts</label><br>
<input type="checkbox" id="repair" name="repair"{% if sbot_config.repair == true %} checked{% endif %}>
<label class="font-normal" for="repair" title="Attempt to repair the filesystem when starting the pub">Attempt filesystem repair when pub starts</label>
</div>
<!-- hidden input elements for all other config variables -->
<input type="hidden" id="debugdir" name="debugdir" value="{{ sbot_config.debugdir }}">
<input type="hidden" id="hmac" name="hmac" value="{{ sbot_config.hmac }}">
<input type="hidden" id="wslis" name="wslis" value="{{ sbot_config.wslis }}">
<input type="hidden" id="debuglis" name="debuglis" value="{{ sbot_config.debuglis }}">
<input type="hidden" id="enable_ebt" name="enable_ebt" value="{{ sbot_config.enable_ebt }}">
<input type="hidden" id="promisc" name="promisc" value="{{ sbot_config.promisc }}">
<input type="hidden" id="nounixsock" name="nounixsock" value="{{ sbot_config.nounixsock }}">
<!-- BUTTONS -->
<input id="saveConfig" class="button button-primary center" style="margin-top: 2rem;" type="submit" title="Save configuration parameters to file" value="Save">
<input id="saveRestartConfig" class="button button-primary center" type="submit" title="Save configuration parameters to file and then (re)start the pub" value="Save & Restart" formaction="/settings/scuttlebutt/configure?restart=true">
<a id="restoreDefaults" class="button button-warning center" href="/settings/scuttlebutt/configure/default" title="Restore default configuration parameters and save them to file">Restore Defaults</a>
</form>
<!-- FLASH MESSAGE -->
{% include "snippets/flash_message" %}
</div>
{%- endblock card -%}

View File

@ -1,18 +0,0 @@
{%- extends "nav" -%}
{%- block card %}
<!-- SCUTTLEBUTT SETTINGS MENU -->
<div class="card center">
<!-- BUTTONS -->
<div id="settingsButtons">
<a id="configureSbot" class="button button-primary center" href="/settings/scuttlebutt/configure" title="Configure Sbot">Configure Sbot</a>
{% if sbot_status.state == "active" %}
<a id="stop" class="button button-primary center" href="/settings/scuttlebutt/stop" title="Stop Sbot">Stop Sbot</a>
<a id="restart" class="button button-primary center" href="/settings/scuttlebutt/restart" title="Restart Sbot">Restart Sbot</a>
{% else %}
<a id="start" class="button button-primary center" href="/settings/scuttlebutt/start" title="Start Sbot">Start Sbot</a>
{% endif %}
</div>
<!-- FLASH MESSAGE -->
{% include "snippets/flash_message" %}
</div>
{%- endblock card -%}

View File

@ -1,14 +0,0 @@
<!-- check for flash message and display accordingly -->
{% if flash_msg and flash_name == "success" %}
<!-- display success message -->
<div class="capsule center-text flash-message font-normal border-success">{{ flash_msg }}.</div>
{%- elif flash_msg and flash_name == "info" %}
<!-- display info message -->
<div class="capsule center-text flash-message font-normal border-info">{{ flash_msg }}.</div>
{%- elif flash_msg and flash_name == "warning" %}
<!-- display warning message -->
<div class="capsule center-text flash-message font-normal border-warning">{{ flash_msg }}.</div>
{%- elif flash_msg and flash_name == "error" %}
<!-- display error message -->
<div class="capsule center-text flash-message font-normal border-danger">{{ flash_msg }}.</div>
{%- endif -%}

View File

@ -1,137 +0,0 @@
{%- extends "nav" -%}
{%- block card -%}
{# ASSIGN VARIABLES #}
{# ---------------- #}
{%- if mem_stats -%}
{% set mem_usage_percent = mem_stats.used / mem_stats.total * 100 | round -%}
{% set mem_used = mem_stats.used / 1024 | round -%}
{% set mem_free = mem_stats.free / 1024 | round -%}
{% set mem_total = mem_stats.total / 1024 | round -%}
{% endif -%}
{% if cpu_stat_percent -%}
{% set cpu_usage_percent = cpu_stat_percent.nice + cpu_stat_percent.system + cpu_stat_percent.user | round -%}
{%- endif -%}
{%- if disk_stats -%}
{%- for disk in disk_stats -%}
{%- set_global disk_usage_percent = disk.used_percentage -%}
{# Calculate free disk space in megabytes #}
{%- set_global disk_free = disk.one_k_blocks_free / 1024 | round -%}
{%- endfor -%}
{%- endif -%}
<!-- DEVICE STATUS VIEW -->
<div class="card center">
<div class="card-container">
<div class="three-grid">
{# Display microservice status for network, oled & stats #}
<!-- PEACH-NETWORK STATUS STACK -->
<a class="link" href="/status/network">
<div class="stack capsule{% if network_ping == "ONLINE" %} success-border{% else %} warning-border{% endif %}">
<img id="networkIcon" class="icon{% if network_ping == "OFFLINE" %} icon-inactive{% endif %} icon-medium" alt="Network" title="Network microservice status" src="/icons/wifi.svg">
<div class="stack" style="padding-top: 0.5rem;">
<label class="label-small font-near-black">Networking</label>
<label class="label-small font-near-black">{{ network_ping }}</label>
</div>
</div>
</a>
<!-- PEACH-OLED STATUS STACK -->
<div class="stack capsule{% if oled_ping == "ONLINE" %} success-border{% else %} warning-border{% endif %}">
<img id="oledIcon" class="icon{% if oled_ping == "OFFLINE" %} icon-inactive{% endif %} icon-medium" alt="Display" title="OLED display microservice status" src="/icons/lcd.svg">
<div class="stack" style="padding-top: 0.5rem;">
<label class="label-small font-near-black">Display</label>
<label class="label-small font-near-black">{{ oled_ping }}</label>
</div>
</div>
<!-- PEACH-STATS STATUS STACK -->
<div class="stack capsule success-border">
<img id="statsIcon" class="icon icon-medium" alt="Stats" title="System statistics microservice status" src="/icons/chart.svg">
<div class="stack" style="padding-top: 0.5rem;">
<label class="label-small font-near-black">Statistics</label>
<label class="label-small font-near-black">AVAILABLE</label>
</div>
</div>
{# Display status for dynsdns, config & sbot #}
<!-- DYNDNS STATUS STACK -->
<div class="stack capsule{% if dyndns_is_online %} success-border{% else %} warning-border{% endif %}">
<img id="networkIcon" class="icon{% if dyndns_is_online != true %} icon-inactive{% endif %} icon-medium" alt="Dyndns" title="Dyndns status" src="/icons/dns.png">
<div class="stack" style="padding-top: 0.5rem;">
<label class="label-small font-near-black">Dyn DNS</label>
<label class="label-small font-near-black">{% if dyndns_is_online %} ONLINE {% else %} OFFLINE {% endif %} </label>
</div>
</div>
<!-- CONFIG STATUS STACK -->
<div class="stack capsule{% if config_is_valid %} success-border{% else %} warning-border{% endif %}">
<img id="networkIcon" class="icon{% if config_is_valid != true %} icon-inactive{% endif %} icon-medium" alt="Config" title="Config status" src="/icons/clipboard.png">
<div class="stack" style="padding-top: 0.5rem;">
<label class="label-small font-near-black">Config</label>
<label class="label-small font-near-black">{% if config_is_valid %} LOADED {% else %} INVALID {% endif %} </label>
</div>
</div>
<!-- SBOT STATUS STACK -->
<a class="link" href="/status/scuttlebutt">
<div class="stack capsule{% if sbot_is_online %} success-border{% else %} warning-border{% endif %}">
<img id="networkIcon" class="icon{% if sbot_is_online != true %} icon-inactive{% endif %} icon-medium" alt="Sbot" title="Sbot status" src="/icons/hermies.svg">
<div class="stack" style="padding-top: 0.5rem;">
<label class="label-small font-near-black">Sbot</label>
<label class="label-small font-near-black">{% if sbot_is_online %} ONLINE {% else %} OFFLINE {% endif %} </label>
</div>
</div>
</div>
</a>
<div class="card-container">
{# Display CPU usage meter #}
{%- if cpu_stat_percent -%}
<div class="flex-grid">
<span class="card-text">CPU</span>
<span class="label-small push-right">{{ cpu_usage_percent }}%</span>
</div>
<meter value="{{ cpu_usage_percent }}" min="0" max="100" title="CPU usage">
<div class="meter-gauge">
<span style="width: {{ cpu_usage_percent }}%;">CPU Usage</span>
</div>
</meter>
{%- else -%}
<p class="card-text">CPU usage data unavailable</p>
{% endif -%}
{# Display memory usage meter #}
{%- if mem_stats %}
<div class="flex-grid">
<span class="card-text">Memory</span>
<span class="label-small push-right">{{ mem_usage_percent }}% ({{ mem_free }} MB free)</span>
</div>
<meter value="{{ mem_used }}" min="0" max="{{ mem_total }}" title="Memory usage">
<div class="meter-gauge">
<span style="width: {{ mem_usage_percent }}%;">Memory Usage</span>
</div>
</meter>
{%- else -%}
<p class="card-text">Memory usage data unavailable</p>
{% endif -%}
{# Display disk usage meter #}
{%- if disk_stats %}
<div class="flex-grid">
<span class="card-text">Disk</span>
<span class="label-small push-right">{{ disk_usage_percent }}% ({% if disk_free > 1024 %}{{ disk_free / 1024 | round }} GB{% else %}{{ disk_free }} MB{% endif %} free)</span>
</div>
<meter value="{{ disk_usage_percent }}" min="0" max="100" title="Disk usage">
<div class="meter-gauge">
<span style="width: {{ disk_usage_percent }}%;">Disk Usage</span>
</div>
</meter>
{%- else -%}
<p class="card-text">Disk usage data unavailable</p>
{%- endif %}
{# Display system uptime in minutes #}
{%- if uptime and uptime < 60 %}
<p class="capsule center-text">Uptime: {{ uptime }} minutes</p>
{# Display system uptime in hours & minutes #}
{%- elif uptime and uptime > 60 -%}
<p class="capsule center-text">Uptime: {{ uptime / 60 | round(method="floor") }} hours, {{ uptime % 60 }} minutes</p>
{%- else -%}
<p class="card-text">Uptime data unavailable</p>
{%- endif %}
</div>
<!-- FLASH MESSAGE -->
{% include "snippets/flash_message" %}
</div>
</div>
{%- endblock card %}

View File

@ -1,158 +0,0 @@
{%- extends "nav" -%}
{%- block card %}
<!-- if ap is up, show ap card, else show wlan card -->
{%- if ap_state == "up" %}
<!-- NETWORK CARD -->
<div class="card center">
<!-- NETWORK INFO BOX -->
<div class="capsule capsule-container success-border">
<!-- NETWORK STATUS GRID -->
<div class="two-grid" title="PeachCloud network mode and status">
<!-- top-right config icon -->
<a class="link two-grid-top-right" href="/settings/network" title="Configure network settings">
<img id="configureNetworking" class="icon-small" src="/icons/cog.svg" alt="Configure">
</a>
<!-- left column -->
<!-- network mode icon with label -->
<div class="grid-column-1">
<img id="netModeIcon" class="center icon icon-active" src="/icons/router.svg" alt="WiFi router">
<label id="netModeLabel" for="netModeIcon" class="center label-small font-gray" title="Access Point Online">ONLINE</label>
</div>
<!-- right column -->
<!-- network mode, ssid & ip with labels -->
<div class="grid-column-2">
<label class="label-small font-gray" for="netMode" title="Network Mode">MODE</label>
<p id="netMode" class="card-text" title="Network Mode">Access Point</p>
<label class="label-small font-gray" for="netSsid" title="Access Point SSID">SSID</label>
<p id="netSsid" class="card-text" title="SSID">peach</p>
<label class="label-small font-gray" for="netIp" title="Access Point IP Address">IP</label>
<p id="netIp" class="card-text" title="IP">{{ ap_ip }}</p>
</div>
</div>
<!-- horizontal dividing line -->
<hr style="color: var(--light-gray);">
<!-- DEVICES AND TRAFFIC GRID -->
<div class="three-grid card-container">
<div class="stack">
<img id="devices" class="icon icon-medium" title="Connected devices" src="/icons/devices.svg" alt="Digital devices">
<div class="flex-grid" style="padding-top: 0.5rem;">
<label class="label-medium" for="devices" style="padding-right: 3px;" title="Number of connected devices"></label>
</div>
<label class="label-small font-gray">DEVICES</label>
</div>
<div class="stack">
<img id="dataDownload" class="icon icon-medium" title="Download" src="/icons/down-arrow.svg" alt="Download">
<div class="flex-grid" style="padding-top: 0.5rem;">
{%- if ap_traffic -%}
<label class="label-medium" for="dataDownload" style="padding-right: 3px;" title="Data download total in {{ ap_traffic.rx_unit }}">{{ ap_traffic.received }}</label>
<label class="label-small font-near-black">{{ ap_traffic.rx_unit }}</label>
{%- else -%}
<label class="label-medium" for="dataDownload" style="padding-right: 3px;" title="Data download total"></label>
<label class="label-small font-near-black"></label>
{%- endif -%}
</div>
<label class="label-small font-gray">DOWNLOAD</label>
</div>
<div class="stack">
<img id="dataUpload" class="icon icon-medium" title="Upload" src="/icons/up-arrow.svg" alt="Upload">
<div class="flex-grid" style="padding-top: 0.5rem;">
{%- if ap_traffic -%}
<label class="label-medium" for="dataUpload" style="padding-right: 3px;" title="Data upload total in {{ ap_traffic.tx_unit }}">{{ ap_traffic.transmitted }}</label>
<label class="label-small font-near-black">{{ ap_traffic.tx_unit }}</label>
{%- else -%}
<label class="label-medium" for="dataUpload" style="padding-right: 3px;" title="Data upload total"></label>
<label class="label-small font-near-black"></label>
{%- endif -%}
</div>
<label class="label-small font-gray">UPLOAD</label>
</div>
</div>
</div>
</div>
{%- else %}
<!-- NETWORK CARD -->
<div class="card center">
<!-- NETWORK INFO BOX -->
{%- if wlan_state == "up" %}
<div class="capsule capsule-container success-border">
<!-- NETWORK STATUS GRID -->
<div id="netInfoBox" class="two-grid" title="PeachCloud network mode and status">
<a class="link two-grid-top-right" href="/settings/network" title="Configure network settings">
<img id="configureNetworking" class="icon-small" src="/icons/cog.svg" alt="Configure">
</a>
<!-- NETWORK STATUS -->
<!-- left column -->
<!-- network mode icon with label -->
<div class="grid-column-1">
<img id="netModeIcon" class="center icon icon-active" src="/icons/wifi.svg" alt="WiFi online">
<label id="netModeLabel" for="netModeIcon" class="center label-small font-gray" title="WiFi Client Status">ONLINE</label>
{%- else %}
<div class="capsule capsule-container warning-border">
<div id="netInfoBox" class="two-grid" title="PeachCloud network mode and status">
<a class="link two-grid-top-right" href="/settings/network" title="Configure network settings">
<img id="configureNetworking" class="icon-small" src="/icons/cog.svg" alt="Configure">
</a>
<div class="grid-column-1">
<img id="netModeIcon" class="center icon icon-inactive" src="/icons/wifi.svg" alt="WiFi offline">
<label id="netModeLabel" for="netModeIcon" class="center label-small font-gray" title="WiFi Client Status">OFFLINE</label>
{%- endif %}
</div>
<div class="grid-column-2">
<!-- right column -->
<!-- network mode, ssid & ip with labels -->
<label class="label-small font-gray" for="netMode" title="Network Mode">MODE</label>
<p id="netMode" class="card-text" title="Network Mode">WiFi Client</p>
<label class="label-small font-gray" for="netSsid" title="WiFi SSID">SSID</label>
<p id="netSsid" class="card-text" title="SSID">{{ wlan_ssid }}</p>
<label class="label-small font-gray" for="netIp" title="WiFi Client IP Address">IP</label>
<p id="netIp" class="card-text" title="IP">{{ wlan_ip }}</p>
</div>
</div>
<!-- horizontal dividing line -->
<hr style="color: var(--light-gray);">
<!-- SIGNAL AND TRAFFIC GRID -->
<!-- row of icons representing network statistics -->
<div class="three-grid card-container">
<div class="stack">
<img id="netSignal" class="icon icon-medium" alt="Signal" title="WiFi Signal (%)" src="/icons/low-signal.svg">
<div class="flex-grid" style="padding-top: 0.5rem;">
<label class="label-medium" for="netSignal" style="padding-right: 3px;" title="Signal strength of WiFi connection (%)">{% if wlan_rssi %}{{ wlan_rssi }}{% else %}0{% endif %}%</label>
</div>
<label class="label-small font-gray">SIGNAL</label>
</div>
<div class="stack">
<img id="dataDownload" class="icon icon-medium" alt="Download" title="WiFi download total" src="/icons/down-arrow.svg">
<div class="flex-grid" style="padding-top: 0.5rem;">
{%- if wlan_traffic %}
<!-- display wlan traffic data -->
<label class="label-medium" for="dataDownload" style="padding-right: 3px;" title="Data download total in {{ wlan_traffic.rx_unit }}">{{ wlan_traffic.received }}</label>
<label class="label-small font-near-black">{{ wlan_traffic.rx_unit }}</label>
{%- else %}
<!-- no wlan traffic data to display -->
<label class="label-medium" for="dataDownload" style="padding-right: 3px;" title="Data download total">0</label>
<label class="label-small font-near-black">MB</label>
{%- endif %}
</div>
<label class="label-small font-gray">DOWNLOAD</label>
</div>
<div class="stack">
<img id="dataUpload" class="icon icon-medium" alt="Upload" title="WiFi upload total" src="/icons/up-arrow.svg">
<div class="flex-grid" style="padding-top: 0.5rem;">
{%- if wlan_traffic %}
<!-- display wlan traffic data -->
<label class="label-medium" for="dataUpload" style="padding-right: 3px;" title="Data upload total in {{ wlan_traffic.tx_unit }}">{{ wlan_traffic.transmitted }}</label>
<label class="label-small font-near-black">{{ wlan_traffic.tx_unit }}</label>
{%- else %}
<!-- no wlan traffic data to display -->
<label class="label-medium" for="dataUpload" style="padding-right: 3px;" title="Data upload total">0</label>
<label class="label-small font-near-black">MB</label>
{%- endif %}
</div>
<label class="label-small font-gray">UPLOAD</label>
</div>
</div>
</div>
</div>
{%- endif -%}
{%- endblock card -%}

View File

@ -1,95 +0,0 @@
{%- extends "nav" -%}
{%- block card %}
{# ASSIGN VARIABLES #}
{# ---------------- #}
{%- if sbot_status.memory -%}
{% set mem = sbot_status.memory / 1024 / 1024 | round | int -%}
{%- else -%}
{% set mem = "0" -%}
{%- endif -%}
{%- if sbot_status.blobstore -%}
{% set blobs = sbot_status.blobstore / 1024 / 1024 | round | int -%}
{%- else -%}
{% set blobs = "0" -%}
{%- endif -%}
<!-- SCUTTLEBUTT STATUS -->
<div class="card center">
<!-- SBOT INFO BOX -->
<div class="capsule capsule-container {% if sbot_status.state == "active" %}border-success{% elif sbot_status.state == "inactive" %}border-warning{% else %}border-danger{% endif %}">
<!-- SBOT STATUS GRID -->
<div class="two-grid" title="go-sbot process state">
<!-- top-right config icon -->
<a class="link two-grid-top-right" href="/settings/scuttlebutt" title="Configure Scuttlebutt settings">
<img id="configureNetworking" class="icon-small icon-active" src="/icons/cog.svg" alt="Configure">
</a>
<!-- left column -->
<!-- go-sbot state icon with label -->
<div class="grid-column-1">
<img id="sbotStateIcon" class="center icon {% if sbot_status.state == "active" %}icon-active{% else %}icon-inactive{% endif %}" src="/icons/hermies.svg" alt="Hermies">
<label id="sbotStateLabel" for="sbotStateIcon" class="center label-small font-gray" style="margin-top: 0.5rem;" title="Sbot state">{{ sbot_status.state | upper }}</label>
</div>
<!-- right column -->
<!-- go-sbot version and uptime / downtime with labels -->
<div class="grid-column-2">
<label class="label-small font-gray" for="sbotVersion" title="go-sbot version">VERSION</label>
<p id="sbotVersion" class="card-text" title="Version">1.1.0-alpha</p>
{% if sbot_status.state == "active" %}
<label class="label-small font-gray" for="sbotUptime" title="go-sbot uptime" style="margin-top: 0.5rem;">UPTIME</label>
<p id="sbotUptime" class="card-text" title="Uptime">{{ sbot_status.uptime }}</p>
{# render downtime element if downtime is `Some(time)` #}
{# downtime will be `None` if service is stopped and disabled #}
{%- elif sbot_status.downtime -%}
<label class="label-small font-gray" for="sbotDowntime" title="go-sbot downtime" style="margin-top: 0.5rem;">DOWNTIME</label>
<p id="sbotDowntime" class="card-text" title="Downtime">{{ sbot_status.downtime }}</p>
{%- endif -%}
<label class="label-small font-gray" for="sbotBootState" title="go-sbot boot state" style="margin-top: 0.5rem;">RUN ON STARTUP</label>
{% if sbot_status.boot_state == "enabled" %}
<p id="runOnStartup" class="card-text" title="Enabled">Enabled</p>
{% else %}
<p id="runOnStartup" class="card-text" title="Disabled">Disabled</p>
{%- endif -%}
</div>
</div>
<hr style="color: var(--light-gray);">
<div id="middleSection" style="margin-top: 1rem;">
<div id="sbotInfo" class="center" style="display: flex; justify-content: space-between; width: 90%;">
<div class="center" style="display: flex; align-items: last baseline;">
{% if sbot_status.state == "active" %}
<label class="card-text" style="margin-right: 5px;">{{ latest_seq }}</label>
<label class="label-small font-gray">MESSAGES IN LOCAL DATABASE</label>
{% else %}
<label class="label-small font-gray">DATABASE UNAVAILABLE</label>
{% endif %}
</div>
</div>
</div>
<hr style="color: var(--light-gray);">
<!-- THREE-ACROSS STACK -->
<div class="three-grid card-container" style="margin-top: 1rem;">
<div class="stack">
<img class="icon icon-active" title="Hops" src="/icons/orbits.png">
<div class="flex-grid" style="padding-top: 0.5rem;">
<label class="label-medium font-normal" style="padding-right: 3px;" title="Replication hops">{{ sbot_config.hops }}</label>
</div>
<label class="label-small font-gray">HOPS</label>
</div>
<div class="stack">
<img class="icon icon-active" title="Blobs" src="/icons/image-file.png">
<div class="flex-grid" style="padding-top: 0.5rem;">
<label class="label-medium font-normal" style="padding-right: 3px;" title="Blobstore size in MB">{{ blobs }}</label>
<label class="label-small font-normal">MB</label>
</div>
<label class="label-small font-gray">BLOBSTORE</label>
</div>
<div class="stack">
<img class="icon{% if sbot_status.memory %} icon-active{% else %} icon-inactive{% endif %}" title="Memory" src="/icons/ram.png">
<div class="flex-grid" style="padding-top: 0.5rem;">
<label class="label-medium{% if sbot_status.state == "inactive" %} font-gray{% else %} font-normal{% endif %}" style="padding-right: 3px;" title="Memory usage of the go-sbot process in MB">{{ mem }}</label>
<label class="label-small{% if sbot_status.state == "inactive" %} font-gray{% else %} font-normal{% endif %}">MB</label>
</div>
<label class="label-small font-gray">MEMORY</label>
</div>
</div>
</div>
</div>
{%- endblock card -%}