diff --git a/hc/accounts/admin.py b/hc/accounts/admin.py index 0e79f05f..d3f0a9b1 100644 --- a/hc/accounts/admin.py +++ b/hc/accounts/admin.py @@ -1,8 +1,8 @@ from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.contrib.auth.models import User -from django.core.urlresolvers import reverse from django.template.loader import render_to_string +from django.urls import reverse from hc.accounts.models import Profile from hc.api.models import Channel, Check @@ -12,7 +12,7 @@ class ProfileAdmin(admin.ModelAdmin): class Media: css = { - 'all': ('css/admin/profiles.css',) + 'all': ('css/admin/profiles.css',) } list_display = ("id", "users", "reports_allowed", "next_report_date", diff --git a/hc/accounts/management/commands/createprofiles.py b/hc/accounts/management/commands/createprofiles.py deleted file mode 100644 index 23dc795d..00000000 --- a/hc/accounts/management/commands/createprofiles.py +++ /dev/null @@ -1,13 +0,0 @@ -from django.core.management.base import BaseCommand -from django.contrib.auth.models import User -from hc.accounts.models import Profile - - -class Command(BaseCommand): - help = 'Make sure all users have profiles' - - def handle(self, *args, **options): - for user in User.objects.all(): - Profile.objects.get_or_create(user_id=user.id) - - print("Done.") diff --git a/hc/accounts/middleware.py b/hc/accounts/middleware.py index 589e5307..b562e98f 100644 --- a/hc/accounts/middleware.py +++ b/hc/accounts/middleware.py @@ -2,16 +2,24 @@ from hc.accounts.models import Profile class TeamAccessMiddleware(object): - def process_request(self, request): - if not request.user.is_authenticated(): - return + def __init__(self, get_response): + self.get_response = get_response - teams_q = Profile.objects.filter(member__user_id=request.user.id) - teams_q = teams_q.select_related("user") - request.teams = list(teams_q) + def __call__(self, request): + if request.user.is_authenticated: + teams_q = Profile.objects.filter(member__user_id=request.user.id) + teams_q = teams_q.select_related("user") + request.teams = list(teams_q) - profile = request.user.profile - if profile.current_team: - request.team = profile.current_team - else: - request.team = profile + try: + profile = request.user.profile + except Profile.DoesNotExist: + profile = Profile(user=request.user) + profile.save() + + if profile.current_team: + request.team = profile.current_team + else: + request.team = profile + + return self.get_response(request) diff --git a/hc/accounts/models.py b/hc/accounts/models.py index 68c1dbd5..63522dde 100644 --- a/hc/accounts/models.py +++ b/hc/accounts/models.py @@ -7,8 +7,8 @@ from django.conf import settings from django.contrib.auth.hashers import make_password from django.contrib.auth.models import User from django.core import signing -from django.core.urlresolvers import reverse from django.db import models +from django.urls import reverse from django.utils import timezone from hc.lib import emails diff --git a/hc/accounts/tests/test_team_access_middleware.py b/hc/accounts/tests/test_team_access_middleware.py new file mode 100644 index 00000000..231a002c --- /dev/null +++ b/hc/accounts/tests/test_team_access_middleware.py @@ -0,0 +1,17 @@ +from django.contrib.auth.models import User +from django.test import TestCase +from hc.accounts.models import Profile + + +class TeamAccessMiddlewareTestCase(TestCase): + + def test_it_handles_missing_profile(self): + user = User(username="ned", email="ned@example.org") + user.set_password("password") + user.save() + + self.client.login(username="ned@example.org", password="password") + r = self.client.get("/about/") + self.assertEqual(r.status_code, 200) + + self.assertEqual(Profile.objects.count(), 1) diff --git a/hc/accounts/views.py b/hc/accounts/views.py index fffe0393..8d67b218 100644 --- a/hc/accounts/views.py +++ b/hc/accounts/views.py @@ -101,7 +101,7 @@ def set_password_link_sent(request): def check_token(request, username, token): - if request.user.is_authenticated() and request.user.username == username: + if request.user.is_authenticated and request.user.username == username: # User is already logged in return redirect("hc-checks") @@ -210,6 +210,7 @@ def profile(request): badge_urls.append(get_badge_url(username, tag)) ctx = { + "page": "profile", "badge_urls": badge_urls, "profile": profile, "show_api_key": show_api_key diff --git a/hc/api/models.py b/hc/api/models.py index a7888362..a1cdd7d4 100644 --- a/hc/api/models.py +++ b/hc/api/models.py @@ -7,8 +7,8 @@ from datetime import timedelta as td from django.conf import settings from django.contrib.auth.models import User -from django.core.urlresolvers import reverse from django.db import models +from django.urls import reverse from django.utils import timezone from hc.api import transports from hc.lib import emails diff --git a/hc/front/tests/test_my_checks.py b/hc/front/tests/test_my_checks.py index e622c216..c759d1f5 100644 --- a/hc/front/tests/test_my_checks.py +++ b/hc/front/tests/test_my_checks.py @@ -26,7 +26,7 @@ class MyChecksTestCase(BaseTestCase): r = self.client.get("/checks/") # Desktop - self.assertContains(r, "glyphicon-ok-sign") + self.assertContains(r, "icon-up") # Mobile self.assertContains(r, "label-success") @@ -40,7 +40,7 @@ class MyChecksTestCase(BaseTestCase): r = self.client.get("/checks/") # Desktop - self.assertContains(r, "glyphicon-exclamation-sign") + self.assertContains(r, "icon-down") # Mobile self.assertContains(r, "label-danger") @@ -54,7 +54,7 @@ class MyChecksTestCase(BaseTestCase): r = self.client.get("/checks/") # Desktop - self.assertContains(r, "glyphicon-exclamation-sign grace") + self.assertContains(r, "icon-grace") # Mobile self.assertContains(r, "label-warning") diff --git a/hc/front/views.py b/hc/front/views.py index 555668d6..46015059 100644 --- a/hc/front/views.py +++ b/hc/front/views.py @@ -6,10 +6,10 @@ import requests from django.conf import settings from django.contrib import messages from django.contrib.auth.decorators import login_required -from django.core.urlresolvers import reverse from django.db.models import Count -from django.http import HttpResponseBadRequest, HttpResponseForbidden, Http404 +from django.http import Http404, HttpResponseBadRequest, HttpResponseForbidden from django.shortcuts import get_object_or_404, redirect, render +from django.urls import reverse from django.utils import timezone from django.utils.crypto import get_random_string from django.utils.six.moves.urllib.parse import urlencode @@ -75,7 +75,7 @@ def _welcome_check(request): def index(request): - if request.user.is_authenticated(): + if request.user.is_authenticated: return redirect("hc-checks") check = _welcome_check(request) @@ -390,7 +390,7 @@ def add_pd(request): def add_slack(request): - if not settings.SLACK_CLIENT_ID and not request.user.is_authenticated(): + if not settings.SLACK_CLIENT_ID and not request.user.is_authenticated: return redirect("hc-login") ctx = { diff --git a/hc/lib/badges.py b/hc/lib/badges.py index c735f952..e7ffec7f 100644 --- a/hc/lib/badges.py +++ b/hc/lib/badges.py @@ -1,7 +1,7 @@ from django.conf import settings from django.core.signing import base64_hmac from django.template.loader import render_to_string -from django.core.urlresolvers import reverse +from django.urls import reverse WIDTHS = {"a": 7, "b": 7, "c": 6, "d": 7, "e": 6, "f": 4, "g": 7, "h": 7, "i": 3, "j": 3, "k": 7, "l": 3, "m": 10, "n": 7, "o": 7, "p": 7, diff --git a/hc/payments/context_processors.py b/hc/payments/context_processors.py index d093d25e..fb917081 100644 --- a/hc/payments/context_processors.py +++ b/hc/payments/context_processors.py @@ -4,7 +4,7 @@ from django.conf import settings def payments(request): show_pricing = settings.USE_PAYMENTS - if show_pricing and request.user.is_authenticated(): + if show_pricing and request.user.is_authenticated: profile = request.user.profile if profile.current_team_id and profile.current_team_id != profile.id: show_pricing = False diff --git a/hc/payments/models.py b/hc/payments/models.py index 97ab1c4c..571521a4 100644 --- a/hc/payments/models.py +++ b/hc/payments/models.py @@ -40,7 +40,6 @@ class Subscription(models.Model): return self._pm def pm_is_credit_card(self): - print(self.payment_method_token, self._get_braintree_payment_method()) return isinstance(self._get_braintree_payment_method(), braintree.credit_card.CreditCard) diff --git a/hc/payments/views.py b/hc/payments/views.py index a981a004..79f09038 100644 --- a/hc/payments/views.py +++ b/hc/payments/views.py @@ -28,7 +28,7 @@ def get_client_token(request): def pricing(request): sub = None - if request.user.is_authenticated(): + if request.user.is_authenticated: # Don't use Subscription.objects.for_user method here, so a # subscription object is not created just by viewing a page. sub = Subscription.objects.filter(user_id=request.user.id).first() diff --git a/hc/settings.py b/hc/settings.py index 42fe78b6..adecc237 100644 --- a/hc/settings.py +++ b/hc/settings.py @@ -40,15 +40,14 @@ INSTALLED_APPS = ( 'hc.payments' ) -MIDDLEWARE_CLASSES = ( +MIDDLEWARE = ( + 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', - 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', - 'django.middleware.security.SecurityMiddleware', 'hc.accounts.middleware.TeamAccessMiddleware', ) diff --git a/requirements.txt b/requirements.txt index d764587e..c21bee1e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ django-appconf==1.0.1 django-ses-backend==0.1.1 -Django==1.9 -django_compressor==2.0 +Django==1.10 +django_compressor==2.1 djmail==0.11.0 futures==3.0.3 premailer==2.9.6 diff --git a/static/css/base.css b/static/css/base.css index 44234cb1..825e77f5 100644 --- a/static/css/base.css +++ b/static/css/base.css @@ -53,25 +53,14 @@ body { font-size: small; } -.glyphicon.up, .glyphicon.new, .glyphicon.paused, .glyphicon.grace, .glyphicon.down { - font-size: 22px; +.status { + font-size: 24px; } -.glyphicon.up { - color: #5cb85c; -} - -.glyphicon.new, .glyphicon.paused { - color: #AAA; -} - -.glyphicon.grace { - color: #f0ad4e; -} - -.glyphicon.down { - color: #d9534f; -} +.status.icon-up { color: #5cb85c; } +.status.icon-up.new, .status.icon-paused { color: #CCC; } +.status.icon-grace { color: #f0ad4e; } +.status.icon-down { color: #d9534f; } .hc-dialog { background: #FFF; diff --git a/static/css/bootstrap.css b/static/css/bootstrap.css index 84e8c93d..840d63be 100644 --- a/static/css/bootstrap.css +++ b/static/css/bootstrap.css @@ -252,809 +252,6 @@ th { border: 1px solid #ddd !important; } } -@font-face { - font-family: 'Glyphicons Halflings'; - src: url('../fonts/glyphicons-halflings-regular.eot'); - src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg'); -} -.glyphicon { - position: relative; - top: 1px; - display: inline-block; - font-family: 'Glyphicons Halflings'; - font-style: normal; - font-weight: normal; - line-height: 1; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} -.glyphicon-asterisk:before { - content: "\002a"; -} -.glyphicon-plus:before { - content: "\002b"; -} -.glyphicon-euro:before, -.glyphicon-eur:before { - content: "\20ac"; -} -.glyphicon-minus:before { - content: "\2212"; -} -.glyphicon-cloud:before { - content: "\2601"; -} -.glyphicon-envelope:before { - content: "\2709"; -} -.glyphicon-pencil:before { - content: "\270f"; -} -.glyphicon-glass:before { - content: "\e001"; -} -.glyphicon-music:before { - content: "\e002"; -} -.glyphicon-search:before { - content: "\e003"; -} -.glyphicon-heart:before { - content: "\e005"; -} -.glyphicon-star:before { - content: "\e006"; -} -.glyphicon-star-empty:before { - content: "\e007"; -} -.glyphicon-user:before { - content: "\e008"; -} -.glyphicon-film:before { - content: "\e009"; -} -.glyphicon-th-large:before { - content: "\e010"; -} -.glyphicon-th:before { - content: "\e011"; -} -.glyphicon-th-list:before { - content: "\e012"; -} -.glyphicon-ok:before { - content: "\e013"; -} -.glyphicon-remove:before { - content: "\e014"; -} -.glyphicon-zoom-in:before { - content: "\e015"; -} -.glyphicon-zoom-out:before { - content: "\e016"; -} -.glyphicon-off:before { - content: "\e017"; -} -.glyphicon-signal:before { - content: "\e018"; -} -.glyphicon-cog:before { - content: "\e019"; -} -.glyphicon-trash:before { - content: "\e020"; -} -.glyphicon-home:before { - content: "\e021"; -} -.glyphicon-file:before { - content: "\e022"; -} -.glyphicon-time:before { - content: "\e023"; -} -.glyphicon-road:before { - content: "\e024"; -} -.glyphicon-download-alt:before { - content: "\e025"; -} -.glyphicon-download:before { - content: "\e026"; -} -.glyphicon-upload:before { - content: "\e027"; -} -.glyphicon-inbox:before { - content: "\e028"; -} -.glyphicon-play-circle:before { - content: "\e029"; -} -.glyphicon-repeat:before { - content: "\e030"; -} -.glyphicon-refresh:before { - content: "\e031"; -} -.glyphicon-list-alt:before { - content: "\e032"; -} -.glyphicon-lock:before { - content: "\e033"; -} -.glyphicon-flag:before { - content: "\e034"; -} -.glyphicon-headphones:before { - content: "\e035"; -} -.glyphicon-volume-off:before { - content: "\e036"; -} -.glyphicon-volume-down:before { - content: "\e037"; -} -.glyphicon-volume-up:before { - content: "\e038"; -} -.glyphicon-qrcode:before { - content: "\e039"; -} -.glyphicon-barcode:before { - content: "\e040"; -} -.glyphicon-tag:before { - content: "\e041"; -} -.glyphicon-tags:before { - content: "\e042"; -} -.glyphicon-book:before { - content: "\e043"; -} -.glyphicon-bookmark:before { - content: "\e044"; -} -.glyphicon-print:before { - content: "\e045"; -} -.glyphicon-camera:before { - content: "\e046"; -} -.glyphicon-font:before { - content: "\e047"; -} -.glyphicon-bold:before { - content: "\e048"; -} -.glyphicon-italic:before { - content: "\e049"; -} -.glyphicon-text-height:before { - content: "\e050"; -} -.glyphicon-text-width:before { - content: "\e051"; -} -.glyphicon-align-left:before { - content: "\e052"; -} -.glyphicon-align-center:before { - content: "\e053"; -} -.glyphicon-align-right:before { - content: "\e054"; -} -.glyphicon-align-justify:before { - content: "\e055"; -} -.glyphicon-list:before { - content: "\e056"; -} -.glyphicon-indent-left:before { - content: "\e057"; -} -.glyphicon-indent-right:before { - content: "\e058"; -} -.glyphicon-facetime-video:before { - content: "\e059"; -} -.glyphicon-picture:before { - content: "\e060"; -} -.glyphicon-map-marker:before { - content: "\e062"; -} -.glyphicon-adjust:before { - content: "\e063"; -} -.glyphicon-tint:before { - content: "\e064"; -} -.glyphicon-edit:before { - content: "\e065"; -} -.glyphicon-share:before { - content: "\e066"; -} -.glyphicon-check:before { - content: "\e067"; -} -.glyphicon-move:before { - content: "\e068"; -} -.glyphicon-step-backward:before { - content: "\e069"; -} -.glyphicon-fast-backward:before { - content: "\e070"; -} -.glyphicon-backward:before { - content: "\e071"; -} -.glyphicon-play:before { - content: "\e072"; -} -.glyphicon-pause:before { - content: "\e073"; -} -.glyphicon-stop:before { - content: "\e074"; -} -.glyphicon-forward:before { - content: "\e075"; -} -.glyphicon-fast-forward:before { - content: "\e076"; -} -.glyphicon-step-forward:before { - content: "\e077"; -} -.glyphicon-eject:before { - content: "\e078"; -} -.glyphicon-chevron-left:before { - content: "\e079"; -} -.glyphicon-chevron-right:before { - content: "\e080"; -} -.glyphicon-plus-sign:before { - content: "\e081"; -} -.glyphicon-minus-sign:before { - content: "\e082"; -} -.glyphicon-remove-sign:before { - content: "\e083"; -} -.glyphicon-ok-sign:before { - content: "\e084"; -} -.glyphicon-question-sign:before { - content: "\e085"; -} -.glyphicon-info-sign:before { - content: "\e086"; -} -.glyphicon-screenshot:before { - content: "\e087"; -} -.glyphicon-remove-circle:before { - content: "\e088"; -} -.glyphicon-ok-circle:before { - content: "\e089"; -} -.glyphicon-ban-circle:before { - content: "\e090"; -} -.glyphicon-arrow-left:before { - content: "\e091"; -} -.glyphicon-arrow-right:before { - content: "\e092"; -} -.glyphicon-arrow-up:before { - content: "\e093"; -} -.glyphicon-arrow-down:before { - content: "\e094"; -} -.glyphicon-share-alt:before { - content: "\e095"; -} -.glyphicon-resize-full:before { - content: "\e096"; -} -.glyphicon-resize-small:before { - content: "\e097"; -} -.glyphicon-exclamation-sign:before { - content: "\e101"; -} -.glyphicon-gift:before { - content: "\e102"; -} -.glyphicon-leaf:before { - content: "\e103"; -} -.glyphicon-fire:before { - content: "\e104"; -} -.glyphicon-eye-open:before { - content: "\e105"; -} -.glyphicon-eye-close:before { - content: "\e106"; -} -.glyphicon-warning-sign:before { - content: "\e107"; -} -.glyphicon-plane:before { - content: "\e108"; -} -.glyphicon-calendar:before { - content: "\e109"; -} -.glyphicon-random:before { - content: "\e110"; -} -.glyphicon-comment:before { - content: "\e111"; -} -.glyphicon-magnet:before { - content: "\e112"; -} -.glyphicon-chevron-up:before { - content: "\e113"; -} -.glyphicon-chevron-down:before { - content: "\e114"; -} -.glyphicon-retweet:before { - content: "\e115"; -} -.glyphicon-shopping-cart:before { - content: "\e116"; -} -.glyphicon-folder-close:before { - content: "\e117"; -} -.glyphicon-folder-open:before { - content: "\e118"; -} -.glyphicon-resize-vertical:before { - content: "\e119"; -} -.glyphicon-resize-horizontal:before { - content: "\e120"; -} -.glyphicon-hdd:before { - content: "\e121"; -} -.glyphicon-bullhorn:before { - content: "\e122"; -} -.glyphicon-bell:before { - content: "\e123"; -} -.glyphicon-certificate:before { - content: "\e124"; -} -.glyphicon-thumbs-up:before { - content: "\e125"; -} -.glyphicon-thumbs-down:before { - content: "\e126"; -} -.glyphicon-hand-right:before { - content: "\e127"; -} -.glyphicon-hand-left:before { - content: "\e128"; -} -.glyphicon-hand-up:before { - content: "\e129"; -} -.glyphicon-hand-down:before { - content: "\e130"; -} -.glyphicon-circle-arrow-right:before { - content: "\e131"; -} -.glyphicon-circle-arrow-left:before { - content: "\e132"; -} -.glyphicon-circle-arrow-up:before { - content: "\e133"; -} -.glyphicon-circle-arrow-down:before { - content: "\e134"; -} -.glyphicon-globe:before { - content: "\e135"; -} -.glyphicon-wrench:before { - content: "\e136"; -} -.glyphicon-tasks:before { - content: "\e137"; -} -.glyphicon-filter:before { - content: "\e138"; -} -.glyphicon-briefcase:before { - content: "\e139"; -} -.glyphicon-fullscreen:before { - content: "\e140"; -} -.glyphicon-dashboard:before { - content: "\e141"; -} -.glyphicon-paperclip:before { - content: "\e142"; -} -.glyphicon-heart-empty:before { - content: "\e143"; -} -.glyphicon-link:before { - content: "\e144"; -} -.glyphicon-phone:before { - content: "\e145"; -} -.glyphicon-pushpin:before { - content: "\e146"; -} -.glyphicon-usd:before { - content: "\e148"; -} -.glyphicon-gbp:before { - content: "\e149"; -} -.glyphicon-sort:before { - content: "\e150"; -} -.glyphicon-sort-by-alphabet:before { - content: "\e151"; -} -.glyphicon-sort-by-alphabet-alt:before { - content: "\e152"; -} -.glyphicon-sort-by-order:before { - content: "\e153"; -} -.glyphicon-sort-by-order-alt:before { - content: "\e154"; -} -.glyphicon-sort-by-attributes:before { - content: "\e155"; -} -.glyphicon-sort-by-attributes-alt:before { - content: "\e156"; -} -.glyphicon-unchecked:before { - content: "\e157"; -} -.glyphicon-expand:before { - content: "\e158"; -} -.glyphicon-collapse-down:before { - content: "\e159"; -} -.glyphicon-collapse-up:before { - content: "\e160"; -} -.glyphicon-log-in:before { - content: "\e161"; -} -.glyphicon-flash:before { - content: "\e162"; -} -.glyphicon-log-out:before { - content: "\e163"; -} -.glyphicon-new-window:before { - content: "\e164"; -} -.glyphicon-record:before { - content: "\e165"; -} -.glyphicon-save:before { - content: "\e166"; -} -.glyphicon-open:before { - content: "\e167"; -} -.glyphicon-saved:before { - content: "\e168"; -} -.glyphicon-import:before { - content: "\e169"; -} -.glyphicon-export:before { - content: "\e170"; -} -.glyphicon-send:before { - content: "\e171"; -} -.glyphicon-floppy-disk:before { - content: "\e172"; -} -.glyphicon-floppy-saved:before { - content: "\e173"; -} -.glyphicon-floppy-remove:before { - content: "\e174"; -} -.glyphicon-floppy-save:before { - content: "\e175"; -} -.glyphicon-floppy-open:before { - content: "\e176"; -} -.glyphicon-credit-card:before { - content: "\e177"; -} -.glyphicon-transfer:before { - content: "\e178"; -} -.glyphicon-cutlery:before { - content: "\e179"; -} -.glyphicon-header:before { - content: "\e180"; -} -.glyphicon-compressed:before { - content: "\e181"; -} -.glyphicon-earphone:before { - content: "\e182"; -} -.glyphicon-phone-alt:before { - content: "\e183"; -} -.glyphicon-tower:before { - content: "\e184"; -} -.glyphicon-stats:before { - content: "\e185"; -} -.glyphicon-sd-video:before { - content: "\e186"; -} -.glyphicon-hd-video:before { - content: "\e187"; -} -.glyphicon-subtitles:before { - content: "\e188"; -} -.glyphicon-sound-stereo:before { - content: "\e189"; -} -.glyphicon-sound-dolby:before { - content: "\e190"; -} -.glyphicon-sound-5-1:before { - content: "\e191"; -} -.glyphicon-sound-6-1:before { - content: "\e192"; -} -.glyphicon-sound-7-1:before { - content: "\e193"; -} -.glyphicon-copyright-mark:before { - content: "\e194"; -} -.glyphicon-registration-mark:before { - content: "\e195"; -} -.glyphicon-cloud-download:before { - content: "\e197"; -} -.glyphicon-cloud-upload:before { - content: "\e198"; -} -.glyphicon-tree-conifer:before { - content: "\e199"; -} -.glyphicon-tree-deciduous:before { - content: "\e200"; -} -.glyphicon-cd:before { - content: "\e201"; -} -.glyphicon-save-file:before { - content: "\e202"; -} -.glyphicon-open-file:before { - content: "\e203"; -} -.glyphicon-level-up:before { - content: "\e204"; -} -.glyphicon-copy:before { - content: "\e205"; -} -.glyphicon-paste:before { - content: "\e206"; -} -.glyphicon-alert:before { - content: "\e209"; -} -.glyphicon-equalizer:before { - content: "\e210"; -} -.glyphicon-king:before { - content: "\e211"; -} -.glyphicon-queen:before { - content: "\e212"; -} -.glyphicon-pawn:before { - content: "\e213"; -} -.glyphicon-bishop:before { - content: "\e214"; -} -.glyphicon-knight:before { - content: "\e215"; -} -.glyphicon-baby-formula:before { - content: "\e216"; -} -.glyphicon-tent:before { - content: "\26fa"; -} -.glyphicon-blackboard:before { - content: "\e218"; -} -.glyphicon-bed:before { - content: "\e219"; -} -.glyphicon-apple:before { - content: "\f8ff"; -} -.glyphicon-erase:before { - content: "\e221"; -} -.glyphicon-hourglass:before { - content: "\231b"; -} -.glyphicon-lamp:before { - content: "\e223"; -} -.glyphicon-duplicate:before { - content: "\e224"; -} -.glyphicon-piggy-bank:before { - content: "\e225"; -} -.glyphicon-scissors:before { - content: "\e226"; -} -.glyphicon-bitcoin:before { - content: "\e227"; -} -.glyphicon-btc:before { - content: "\e227"; -} -.glyphicon-xbt:before { - content: "\e227"; -} -.glyphicon-yen:before { - content: "\00a5"; -} -.glyphicon-jpy:before { - content: "\00a5"; -} -.glyphicon-ruble:before { - content: "\20bd"; -} -.glyphicon-rub:before { - content: "\20bd"; -} -.glyphicon-scale:before { - content: "\e230"; -} -.glyphicon-ice-lolly:before { - content: "\e231"; -} -.glyphicon-ice-lolly-tasted:before { - content: "\e232"; -} -.glyphicon-education:before { - content: "\e233"; -} -.glyphicon-option-horizontal:before { - content: "\e234"; -} -.glyphicon-option-vertical:before { - content: "\e235"; -} -.glyphicon-menu-hamburger:before { - content: "\e236"; -} -.glyphicon-modal-window:before { - content: "\e237"; -} -.glyphicon-oil:before { - content: "\e238"; -} -.glyphicon-grain:before { - content: "\e239"; -} -.glyphicon-sunglasses:before { - content: "\e240"; -} -.glyphicon-text-size:before { - content: "\e241"; -} -.glyphicon-text-color:before { - content: "\e242"; -} -.glyphicon-text-background:before { - content: "\e243"; -} -.glyphicon-object-align-top:before { - content: "\e244"; -} -.glyphicon-object-align-bottom:before { - content: "\e245"; -} -.glyphicon-object-align-horizontal:before { - content: "\e246"; -} -.glyphicon-object-align-left:before { - content: "\e247"; -} -.glyphicon-object-align-vertical:before { - content: "\e248"; -} -.glyphicon-object-align-right:before { - content: "\e249"; -} -.glyphicon-triangle-right:before { - content: "\e250"; -} -.glyphicon-triangle-left:before { - content: "\e251"; -} -.glyphicon-triangle-bottom:before { - content: "\e252"; -} -.glyphicon-triangle-top:before { - content: "\e253"; -} -.glyphicon-console:before { - content: "\e254"; -} -.glyphicon-superscript:before { - content: "\e255"; -} -.glyphicon-subscript:before { - content: "\e256"; -} -.glyphicon-menu-left:before { - content: "\e257"; -} -.glyphicon-menu-right:before { - content: "\e258"; -} -.glyphicon-menu-down:before { - content: "\e259"; -} -.glyphicon-menu-up:before { - content: "\e260"; -} * { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; diff --git a/static/css/channels.css b/static/css/channels.css index 342675e6..19d8f2e0 100644 --- a/static/css/channels.css +++ b/static/css/channels.css @@ -180,4 +180,8 @@ table.channels-table > tbody > tr > th { .link-to-github p { margin-bottom: 0; +} + +.page-channels .icon-delete { + font-size: 16px; } \ No newline at end of file diff --git a/static/css/icomoon.css b/static/css/icomoon.css new file mode 100644 index 00000000..a62470b5 --- /dev/null +++ b/static/css/icomoon.css @@ -0,0 +1,62 @@ +@font-face { + font-family: 'icomoon'; + src: url('../fonts/icomoon.eot?j2asdo'); + src: url('../fonts/icomoon.eot?j2asdo#iefix') format('embedded-opentype'), + url('../fonts/icomoon.ttf?j2asdo') format('truetype'), + url('../fonts/icomoon.woff?j2asdo') format('woff'), + url('../fonts/icomoon.svg?j2asdo#icomoon') format('svg'); + font-weight: normal; + font-style: normal; +} + +[class^="icon-"], [class*=" icon-"] { + /* use !important to prevent issues with browser extensions that change fonts */ + font-family: 'icomoon' !important; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + + /* Better Font Rendering =========== */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.icon-cancel:before { + content: "\e5c9"; +} +.icon-ok:before { + content: "\e86d"; +} +.icon-up:before { + content: "\e86c"; +} +.icon-close:before { + content: "\e5cd"; +} +.icon-delete:before { + content: "\e872"; +} +.icon-mail:before { + content: "\e159"; +} +.icon-grace:before { + content: "\e000"; +} +.icon-missing:before { + content: "\e001"; +} +.icon-dots:before { + content: "\e5d3"; +} +.icon-down:before { + content: "\e7f8"; +} +.icon-paused:before { + content: "\e7f7"; +} +.icon-settings:before { + content: "\e8b8"; +} \ No newline at end of file diff --git a/static/css/my_checks.css b/static/css/my_checks.css index 4d184c8d..6a1a9254 100644 --- a/static/css/my_checks.css +++ b/static/css/my_checks.css @@ -60,6 +60,7 @@ .label-tag { background-color: #eee; color: #555; + font-style: normal; } diff --git a/static/css/my_checks_desktop.css b/static/css/my_checks_desktop.css index 057b8998..6ef2e13c 100644 --- a/static/css/my_checks_desktop.css +++ b/static/css/my_checks_desktop.css @@ -62,6 +62,10 @@ table.table tr > th.th-name { visibility: hidden; } +.check-menu .icon-settings { + font-size: 16px; +} + .dropdown-menu > li > a.check-menu-remove { color: #B71C1C; } diff --git a/static/css/my_checks_mobile.css b/static/css/my_checks_mobile.css index 6ddbadb6..8ae13ccb 100644 --- a/static/css/my_checks_mobile.css +++ b/static/css/my_checks_mobile.css @@ -14,13 +14,6 @@ font-weight: 400; } -#checks-list h2 .glyphicon { - position: relative; - top: 11px; - margin: 0 10px; - -} - #checks-list h2 code { display: block; font-size: 12px; @@ -33,6 +26,7 @@ position: absolute; top: 0; right: 0; + font-size: 20px; } #checks-list .unnamed { diff --git a/static/css/pricing.css b/static/css/pricing.css index 96d68509..124e9108 100644 --- a/static/css/pricing.css +++ b/static/css/pricing.css @@ -1,10 +1,6 @@ .panel-pricing .panel-heading { padding: 20px 10px; } -.panel-pricing .panel-heading .glyphicon { - margin-top: 10px; - font-size: 58px; -} .panel-pricing .list-group-item { color: #777777; border-bottom: 1px solid rgba(250, 250, 250, 0.5); diff --git a/static/css/settings.css b/static/css/settings.css index ec252da2..ecd01d8a 100644 --- a/static/css/settings.css +++ b/static/css/settings.css @@ -13,4 +13,8 @@ #badges-description { margin-bottom: 24px; +} + +.page-profile .icon-ok { + color: #5cb85c; } \ No newline at end of file diff --git a/static/fonts/icomoon.eot b/static/fonts/icomoon.eot new file mode 100644 index 00000000..2d318da4 Binary files /dev/null and b/static/fonts/icomoon.eot differ diff --git a/static/fonts/icomoon.svg b/static/fonts/icomoon.svg new file mode 100644 index 00000000..2aa4f133 --- /dev/null +++ b/static/fonts/icomoon.svg @@ -0,0 +1,22 @@ + + + +Generated by IcoMoon + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/fonts/icomoon.ttf b/static/fonts/icomoon.ttf new file mode 100644 index 00000000..21cc60cc Binary files /dev/null and b/static/fonts/icomoon.ttf differ diff --git a/static/fonts/icomoon.woff b/static/fonts/icomoon.woff new file mode 100644 index 00000000..642be6a5 Binary files /dev/null and b/static/fonts/icomoon.woff differ diff --git a/stuff/bootstrap/bootstrap.less b/stuff/bootstrap/bootstrap.less index ed56b802..6b948a59 100755 --- a/stuff/bootstrap/bootstrap.less +++ b/stuff/bootstrap/bootstrap.less @@ -11,7 +11,7 @@ // Reset and dependencies @import "normalize.less"; @import "print.less"; -@import "glyphicons.less"; +// @import "glyphicons.less"; // Core CSS @import "scaffolding.less"; diff --git a/templates/accounts/login.html b/templates/accounts/login.html index aa2ce05e..a38a9eed 100644 --- a/templates/accounts/login.html +++ b/templates/accounts/login.html @@ -31,7 +31,7 @@
- +
- +
Revoke {% else %} - + API access is enabled.
{% csrf_token %} @@ -141,7 +141,7 @@
{% endif %} {% else %} - + API access is disabled.
{% csrf_token %} diff --git a/templates/accounts/set_password.html b/templates/accounts/set_password.html index d0b84b46..a76e57cf 100644 --- a/templates/accounts/set_password.html +++ b/templates/accounts/set_password.html @@ -17,7 +17,7 @@
- +
+ diff --git a/templates/front/about.html b/templates/front/about.html index 0af37671..a118ba3f 100644 --- a/templates/front/about.html +++ b/templates/front/about.html @@ -34,7 +34,8 @@

While we can only guarantee a best effort availability, in practice the availability has exceeded 99.9% since the service - publicly launched in July 2015. + publicly launched in July 2015. That is, until 20 August 2016, + when the service experienced a 24 hour outage.

diff --git a/templates/front/channels.html b/templates/front/channels.html index ad87421f..ef0daa40 100644 --- a/templates/front/channels.html +++ b/templates/front/channels.html @@ -112,7 +112,7 @@ data-url="{% url 'hc-remove-channel' ch.code %}" class="btn btn-sm btn-default channel-remove" type="button"> - + diff --git a/templates/front/docs.html b/templates/front/docs.html index bde87b61..69d28213 100644 --- a/templates/front/docs.html +++ b/templates/front/docs.html @@ -198,7 +198,7 @@ powershell.exe -ExecutionPolicy bypass -File C:\Scripts\healthchecks.ps1
- + New. @@ -207,7 +207,7 @@ powershell.exe -ExecutionPolicy bypass -File C:\Scripts\healthchecks.ps1
- + Monitoring Paused. @@ -216,7 +216,7 @@ powershell.exe -ExecutionPolicy bypass -File C:\Scripts\healthchecks.ps1
- + Up. @@ -225,7 +225,7 @@ powershell.exe -ExecutionPolicy bypass -File C:\Scripts\healthchecks.ps1
- + Late. @@ -235,7 +235,7 @@ powershell.exe -ExecutionPolicy bypass -File C:\Scripts\healthchecks.ps1
- + Down. diff --git a/templates/front/log.html b/templates/front/log.html index d280c5cb..77917476 100644 --- a/templates/front/log.html +++ b/templates/front/log.html @@ -73,7 +73,7 @@ {% if record.placeholder_date %}
- +
diff --git a/templates/front/my_checks_desktop.html b/templates/front/my_checks_desktop.html index da049d1d..370b884c 100644 --- a/templates/front/my_checks_desktop.html +++ b/templates/front/my_checks_desktop.html @@ -15,17 +15,17 @@
{% if check.get_status == "new" %} - {% elif check.get_status == "paused" %} - {% elif check.in_grace_period %} - + {% elif check.get_status == "up" %} - + {% elif check.get_status == "down" %} - + {% endif %} @@ -76,7 +76,7 @@