-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to latest fedora-bootstrap (bootstrap5) #354
Conversation
@@ -105,7 +105,7 @@ def create_app(config=None): | |||
# Admin UI | |||
# Flask-Admin does not support having a single instance and multiple calls | |||
# to init_app() (it stores the app as an instance attribute) | |||
ADMIN = Admin(template_mode="bootstrap3") | |||
ADMIN = Admin(template_mode="bootstrap4") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flask-admin doesnt have a bootstrap5 template mode, so we use the bootstrap4 one... it works ok enough for the admin pages
@@ -1,94 +1,24 @@ | |||
{% extends 'admin/base.html' %} | |||
{% import 'admin/lib.html' as lib with context %} | |||
{% import 'admin/static.html' as admin_static with context %} | |||
{% from "_macros.html" import footer, headincludes, nav, flashmessages, bottomincludes %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this template is why i used macros here -- cos the admin plugin basically needs its own master template, so used macros for the complex stuff here so we can re-use in the main master template
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Some remarks:
- all the flash messages for errors display in green, they should have the
error
category. - you can drop the views and templates you no longer use, such as
host_category
.
@@ -0,0 +1,26 @@ | |||
<div class="alert alert-light form-text"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't that duplicated from the macro with the same name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whoops -- yeah didnt mean to add that file -- just going to keep this macro in _macros.html
removed this file
@@ -1,4 +1,4 @@ | |||
{% extends "master_noauth.html" %} | |||
{% extends "master" %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be master.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the catch! fixed.
{{ asn.asn }} | ||
{% if not host.private %} | ||
<div><strong>Last Crawled:</strong> {% if host.last_crawled %} {{ host.last_crawled | ||
}} <a href="{{url_for('base.crawler_log', host_id=host.id)}}">[Log]</a> {% else %} - {% endif %} </div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe "never" rather than "-" here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah -- it was always '-' but never is better. fixed.
Signed-off-by: Ryan Lerch <[email protected]>
|
Ready for re-review if you want |
Looks great, anything you want to change before we merge it? |
<div class="mt-3 d-flex justify-content-between align-items-center"> | ||
<div> | ||
<h2 class="mb-0"><span class="fa fa-globe"></span> {{ site.name }}</h2> | ||
Created by <strong>{{ site.created_by }}</strong> at <strong>{{ site.created_at }}</strong> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah -- i started that, but involved adding a filter -- so will merge this, and fix in another PR
No description provided.