Merge pull request #1 from milesmcc/master

Merge 3
This commit is contained in:
Jason Carpenter 2020-04-25 21:16:12 -04:00 committed by GitHub
commit 0a3441428a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 26 additions and 7 deletions

View File

@ -34,7 +34,10 @@ _Note: These screenshots have been edited to hide sensitive data. The "real" Shy
![Shynet's homepage](images/homepage.png)
_Shynet's homepage, where you can see all of your services at a glance._
Not shown: service view, management view, session view, full service view. (You'll need to install Shynet to see those!)
![A service page](images/service.png)
_A real service page, where you can see higher-level details about a site._
Not shown: management view, session view, full service view. (You'll need to install Shynet for yourself to see those!)
## Features

BIN
images/service.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 KiB

View File

@ -1,4 +1,4 @@
{% load static rules %}
{% load static rules helpers %}
<!DOCTYPE html>
<html>
@ -93,6 +93,10 @@
{% include 'dashboard/includes/sidebar_portal.html' with label="Sign Up" url=url %}
{% endif %}
<hr class="sep h-8">
{% sidebar_footer %}
</div>
</aside>
<div class="md:w-10/12">

View File

@ -0,0 +1,5 @@
<div class="pl-2">
<p class="support text-gray-600">
<a href="https://github.com/milesmcc/shynet">Shynet {{version}}</a>
</p>
</div>

View File

@ -59,8 +59,8 @@
</p>
</div>
<div>
<p>Time Zone</p>
<p class="label">{{session.time_zone|default:"Unknown"}}</p>
<p>IP</p>
<p class="label" title="{{session.ip}}">{{session.ip|truncatechars:"16"}}</p>
</div>
</div>
</article>

View File

@ -3,6 +3,7 @@ from urllib.parse import urlparse
import flag
import pycountry
from django import template
from django.conf import settings
from django.utils import timezone
from django.utils.html import escape
from django.utils.safestring import SafeString
@ -80,6 +81,11 @@ def percent_change_display(start, end):
return SafeString(direction + pct_change)
@register.inclusion_tag("dashboard/includes/sidebar_footer.html")
def sidebar_footer():
return {
"version": settings.VERSION
}
@register.inclusion_tag("dashboard/includes/stat_comparison.html")
def compare(

View File

@ -1,7 +1,5 @@
"""
Django settings for shynet project.
Generated by 'django-admin startproject' using Django 2.2.5.
Django settings for Shynet.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
@ -15,6 +13,9 @@ import os
# Messages
from django.contrib.messages import constants as messages
# Increment on new releases
VERSION = "v0.2.1"
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))