Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-Core
Commits
b5be7840
Verified
Commit
b5be7840
authored
5 years ago
by
Tom Teichler
Browse files
Options
Downloads
Patches
Plain Diff
Add some more checks. Advances
#86
.
parent
2d52cb29
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
biscuit/core/templates/core/system_status.html
+21
-9
21 additions, 9 deletions
biscuit/core/templates/core/system_status.html
biscuit/core/views.py
+2
-0
2 additions, 0 deletions
biscuit/core/views.py
with
23 additions
and
9 deletions
biscuit/core/templates/core/system_status.html
+
21
−
9
View file @
b5be7840
...
@@ -7,21 +7,33 @@
...
@@ -7,21 +7,33 @@
{% block page_title %}{% blocktrans %}System status{% endblocktrans %}{% endblock %}
{% block page_title %}{% blocktrans %}System status{% endblocktrans %}{% endblock %}
{% block content %}
{% block content %}
{% if maintenance_mode %}
<div
class=
"card"
>
<div
class=
"card"
>
<div
class=
"card-header bg-light text-dark"
>
<div
class=
"card-header bg-light text-dark"
>
{% blocktrans %}
Maintenance mode
{% endblocktrans %}
{% blocktrans %}
Services
{% endblocktrans %}
</div>
</div>
<ul
class=
"list-group list-group-flush"
>
<ul
class=
"list-group list-group-flush"
>
<li
class=
"list-group-item d-flex justify-content-between align-items-center"
>
<li
class=
"list-group-item d-flex justify-content-between align-items-center"
>
<div>
<div>
<p>
{% blocktrans %}Maintenance mode currently enabled!{% endblocktrans %}
</p>
<p>
{% blocktrans %}Maintenance mode disabled{% endblocktrans %}
</p>
</div>
</div>
<span
class=
"badge badge-danger"
>
{% fa 'exclamation-triangle' %}
</span>
{% if maintenance_mode %}
</li>
<span
class=
"badge badge-danger"
>
{% fa 'times' %}
</span>
{% else %}
<span
class=
"badge badge-success"
>
{% fa 'check' %}
</span>
{% endif %}
</li>
<li
class=
"list-group-item d-flex justify-content-between align-items-center"
>
<div>
<p>
{% blocktrans %}Debug mode disabled{% endblocktrans %}
</p>
</div>
{% if debug_mode %}
<span
class=
"badge badge-success"
>
{% fa 'check' %}
</span>
{% else %}
<span
class=
"badge badge-danger"
>
{% fa 'times' %}
</span>
{% endif %}
</li>
</ul>
</ul>
</div>
</div>
{% endif %}
<div
class=
"card"
>
<div
class=
"card"
>
<div
class=
"card-header bg-light text-dark"
>
<div
class=
"card-header bg-light text-dark"
>
...
...
This diff is collapsed.
Click to expand it.
biscuit/core/views.py
+
2
−
0
View file @
b5be7840
from
typing
import
Callable
,
Optional
from
typing
import
Callable
,
Optional
from
django.conf
import
settings
from
django.contrib.auth.decorators
import
login_required
from
django.contrib.auth.decorators
import
login_required
from
django.http
import
Http404
,
HttpRequest
,
HttpResponse
from
django.http
import
Http404
,
HttpRequest
,
HttpResponse
from
django.shortcuts
import
get_object_or_404
,
render
,
redirect
from
django.shortcuts
import
get_object_or_404
,
render
,
redirect
...
@@ -181,6 +182,7 @@ def data_management(request: HttpRequest) -> HttpResponse:
...
@@ -181,6 +182,7 @@ def data_management(request: HttpRequest) -> HttpResponse:
def
system_status
(
request
:
HttpRequest
)
->
HttpResponse
:
def
system_status
(
request
:
HttpRequest
)
->
HttpResponse
:
context
=
{}
context
=
{}
context
[
'
debug-mode
'
]
=
settings
.
DEBUG
context
[
'
backups
'
]
=
CronJobLog
.
objects
.
filter
(
context
[
'
backups
'
]
=
CronJobLog
.
objects
.
filter
(
code
=
'
biscuit.core.Backup
'
code
=
'
biscuit.core.Backup
'
).
order_by
(
'
-end_time
'
)[:
10
]
).
order_by
(
'
-end_time
'
)[:
10
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment