add a basic system info
This commit is contained in:
+4
-1
@@ -81,7 +81,10 @@ INSTALLED_APPS = [
|
||||
"autocomplete",
|
||||
'markdownify.apps.MarkdownifyConfig',
|
||||
'django_jsonforms',
|
||||
'django_svelte_jsoneditor'
|
||||
'django_svelte_jsoneditor',
|
||||
'django_psutil_dash',
|
||||
|
||||
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
|
||||
@@ -19,6 +19,8 @@ from django.conf import settings
|
||||
from django.conf.urls.static import static
|
||||
from django.views.generic import TemplateView
|
||||
|
||||
from django_psutil_dash.urls import psutil_urlpatterns
|
||||
|
||||
|
||||
from . import views
|
||||
|
||||
@@ -103,6 +105,7 @@ urlpatterns = [
|
||||
views.UpdateUserProfileView.as_view(),
|
||||
name="account_profile_update",
|
||||
),
|
||||
path("server", views.server, name="server"),
|
||||
path("people", views.people, name="people"),
|
||||
path("accounts/", views.UserListTableView.as_view(), name="accounts_list"),
|
||||
#path("accounts/", views.UserListView.as_view(), name="accounts_list"),
|
||||
@@ -170,6 +173,8 @@ urlpatterns = [
|
||||
path("about/", views.about_view, name="about"),
|
||||
# path('select2/', include('select2.urls')),
|
||||
*HTMXAutoComplete.url_dispatcher('ac'),
|
||||
path('psutil/', psutil_urlpatterns()),
|
||||
|
||||
]
|
||||
|
||||
# handler400 = 'my_app.views.bad_request'
|
||||
|
||||
@@ -79,9 +79,16 @@ from dal import autocomplete
|
||||
|
||||
from loguru import logger
|
||||
|
||||
import psutil
|
||||
|
||||
def feedback_checker(user):
|
||||
return user.groups.filter(name="feedback_checker").exists()
|
||||
|
||||
@user_passes_test(lambda u: u.is_superuser)
|
||||
def server(request):
|
||||
|
||||
return render(request, "server.html")
|
||||
|
||||
@user_is_cid_user_manager
|
||||
def people(request):
|
||||
return render(request, "people.html", {})
|
||||
|
||||
@@ -51,3 +51,5 @@ pylibjpeg-libjpeg
|
||||
#django-jsonforms
|
||||
git+https://github.com/xkjq/django-jsonforms.git@bump-json-editor-lib
|
||||
django_svelte_jsoneditor
|
||||
psutil
|
||||
django-psutil-dash
|
||||
@@ -0,0 +1,15 @@
|
||||
{% extends 'generic/base.html' %}
|
||||
|
||||
{% load crispy_forms_tags %}
|
||||
{% block css %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h2>Server status</h2>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user