supervaizer 0.9.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- supervaizer/__init__.py +88 -0
- supervaizer/__version__.py +10 -0
- supervaizer/account.py +304 -0
- supervaizer/account_service.py +87 -0
- supervaizer/admin/routes.py +1254 -0
- supervaizer/admin/templates/agent_detail.html +145 -0
- supervaizer/admin/templates/agents.html +175 -0
- supervaizer/admin/templates/agents_grid.html +80 -0
- supervaizer/admin/templates/base.html +233 -0
- supervaizer/admin/templates/case_detail.html +230 -0
- supervaizer/admin/templates/cases_list.html +182 -0
- supervaizer/admin/templates/cases_table.html +134 -0
- supervaizer/admin/templates/console.html +389 -0
- supervaizer/admin/templates/dashboard.html +153 -0
- supervaizer/admin/templates/job_detail.html +192 -0
- supervaizer/admin/templates/jobs_list.html +180 -0
- supervaizer/admin/templates/jobs_table.html +122 -0
- supervaizer/admin/templates/navigation.html +153 -0
- supervaizer/admin/templates/recent_activity.html +81 -0
- supervaizer/admin/templates/server.html +105 -0
- supervaizer/admin/templates/server_status_cards.html +121 -0
- supervaizer/agent.py +816 -0
- supervaizer/case.py +400 -0
- supervaizer/cli.py +135 -0
- supervaizer/common.py +283 -0
- supervaizer/event.py +181 -0
- supervaizer/examples/controller-template.py +195 -0
- supervaizer/instructions.py +145 -0
- supervaizer/job.py +379 -0
- supervaizer/job_service.py +155 -0
- supervaizer/lifecycle.py +417 -0
- supervaizer/parameter.py +173 -0
- supervaizer/protocol/__init__.py +11 -0
- supervaizer/protocol/a2a/__init__.py +21 -0
- supervaizer/protocol/a2a/model.py +227 -0
- supervaizer/protocol/a2a/routes.py +99 -0
- supervaizer/protocol/acp/__init__.py +21 -0
- supervaizer/protocol/acp/model.py +198 -0
- supervaizer/protocol/acp/routes.py +74 -0
- supervaizer/py.typed +1 -0
- supervaizer/routes.py +667 -0
- supervaizer/server.py +554 -0
- supervaizer/server_utils.py +54 -0
- supervaizer/storage.py +436 -0
- supervaizer/telemetry.py +81 -0
- supervaizer-0.9.6.dist-info/METADATA +245 -0
- supervaizer-0.9.6.dist-info/RECORD +50 -0
- supervaizer-0.9.6.dist-info/WHEEL +4 -0
- supervaizer-0.9.6.dist-info/entry_points.txt +2 -0
- supervaizer-0.9.6.dist-info/licenses/LICENSE.md +346 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<div class="bg-white shadow overflow-hidden rounded-md">
|
|
2
|
+
{% if activities %}
|
|
3
|
+
<ul role="list" class="divide-y divide-gray-200">
|
|
4
|
+
{% for activity in activities %}
|
|
5
|
+
<li class="px-6 py-4 hover:bg-gray-50">
|
|
6
|
+
<div class="flex items-center justify-between">
|
|
7
|
+
<div class="flex items-center">
|
|
8
|
+
<div class="flex-shrink-0">
|
|
9
|
+
{% if activity.type == 'job' %}
|
|
10
|
+
<div class="w-8 h-8 bg-blue-100 rounded-full flex items-center justify-center">
|
|
11
|
+
<svg class="w-4 h-4 text-blue-600" fill="currentColor" viewBox="0 0 20 20">
|
|
12
|
+
<path fill-rule="evenodd" d="M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z" clip-rule="evenodd"></path>
|
|
13
|
+
</svg>
|
|
14
|
+
</div>
|
|
15
|
+
{% else %}
|
|
16
|
+
<div class="w-8 h-8 bg-green-100 rounded-full flex items-center justify-center">
|
|
17
|
+
<svg class="w-4 h-4 text-green-600" fill="currentColor" viewBox="0 0 20 20">
|
|
18
|
+
<path fill-rule="evenodd" d="M3 4a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zm0 4a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zm0 4a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zm0 4a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z" clip-rule="evenodd"></path>
|
|
19
|
+
</svg>
|
|
20
|
+
</div>
|
|
21
|
+
{% endif %}
|
|
22
|
+
</div>
|
|
23
|
+
<div class="ml-4">
|
|
24
|
+
<div class="flex items-center">
|
|
25
|
+
<p class="text-sm font-medium text-gray-900">
|
|
26
|
+
{{ activity.name or activity.id[:8] + "..." }}
|
|
27
|
+
</p>
|
|
28
|
+
<span class="ml-2 px-2 inline-flex text-xs leading-5 font-semibold rounded-full
|
|
29
|
+
{% if activity.status == 'completed' %}bg-green-100 text-green-800
|
|
30
|
+
{% elif activity.status == 'in_progress' %}bg-blue-100 text-blue-800
|
|
31
|
+
{% elif activity.status == 'failed' %}bg-red-100 text-red-800
|
|
32
|
+
{% elif activity.status == 'cancelled' %}bg-gray-100 text-gray-800
|
|
33
|
+
{% else %}bg-yellow-100 text-yellow-800{% endif %}">
|
|
34
|
+
{{ activity.status.replace('_', ' ').title() }}
|
|
35
|
+
</span>
|
|
36
|
+
</div>
|
|
37
|
+
<div class="mt-1 flex items-center text-sm text-gray-500">
|
|
38
|
+
<span class="capitalize">{{ activity.type }}</span>
|
|
39
|
+
{% if activity.type == 'job' and activity.agent_name %}
|
|
40
|
+
<span class="mx-1">•</span>
|
|
41
|
+
<span>{{ activity.agent_name }}</span>
|
|
42
|
+
{% elif activity.type == 'case' and activity.job_id %}
|
|
43
|
+
<span class="mx-1">•</span>
|
|
44
|
+
<span>Job: {{ activity.job_id[:8] }}...</span>
|
|
45
|
+
{% endif %}
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
<div class="flex items-center space-x-4">
|
|
50
|
+
<div class="text-sm text-gray-500">
|
|
51
|
+
{% if activity.created_at %}
|
|
52
|
+
{{ activity.created_at[:10] }}
|
|
53
|
+
{% else %}
|
|
54
|
+
-
|
|
55
|
+
{% endif %}
|
|
56
|
+
</div>
|
|
57
|
+
<button
|
|
58
|
+
{% if activity.type == 'job' %}
|
|
59
|
+
onclick="showJobDetails('{{ activity.id }}')"
|
|
60
|
+
{% else %}
|
|
61
|
+
onclick="showCaseDetails('{{ activity.id }}')"
|
|
62
|
+
{% endif %}
|
|
63
|
+
class="text-blue-600 hover:text-blue-900 text-sm font-medium"
|
|
64
|
+
>
|
|
65
|
+
View
|
|
66
|
+
</button>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
</li>
|
|
70
|
+
{% endfor %}
|
|
71
|
+
</ul>
|
|
72
|
+
{% else %}
|
|
73
|
+
<div class="px-6 py-12 text-center">
|
|
74
|
+
<svg class="mx-auto h-12 w-12 text-gray-400" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
75
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" />
|
|
76
|
+
</svg>
|
|
77
|
+
<h3 class="mt-2 text-sm font-medium text-gray-900">No recent activity</h3>
|
|
78
|
+
<p class="mt-1 text-sm text-gray-500">Activity will appear here as jobs and cases are created and updated.</p>
|
|
79
|
+
</div>
|
|
80
|
+
{% endif %}
|
|
81
|
+
</div>
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
{% extends "base.html" %}
|
|
2
|
+
|
|
3
|
+
{% block title %}Server - Supervaizer Admin{% endblock %}
|
|
4
|
+
|
|
5
|
+
{% block content %}
|
|
6
|
+
<div class="px-4 py-6 sm:px-0">
|
|
7
|
+
<!-- Header -->
|
|
8
|
+
<div class="md:flex md:items-center md:justify-between">
|
|
9
|
+
<div class="min-w-0 flex-1">
|
|
10
|
+
<h2 class="text-2xl font-bold leading-7 text-gray-900 sm:truncate sm:text-3xl sm:tracking-tight">
|
|
11
|
+
Server Status
|
|
12
|
+
</h2>
|
|
13
|
+
<p class="mt-1 text-sm text-gray-500">Monitor server health and configuration</p>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="mt-4 flex md:mt-0">
|
|
16
|
+
<button
|
|
17
|
+
hx-get="/admin/api/server/status"
|
|
18
|
+
hx-target="#server-status-container"
|
|
19
|
+
hx-indicator="#refresh-indicator"
|
|
20
|
+
class="inline-flex items-center px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"
|
|
21
|
+
>
|
|
22
|
+
<svg id="refresh-indicator" class="htmx-indicator -ml-1 mr-2 h-4 w-4 animate-spin" fill="none" viewBox="0 0 24 24">
|
|
23
|
+
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
|
|
24
|
+
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
|
|
25
|
+
</svg>
|
|
26
|
+
Refresh
|
|
27
|
+
</button>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<!-- Server Status Cards -->
|
|
32
|
+
<div id="server-status-container" class="mt-6">
|
|
33
|
+
{% include "server_status_cards.html" %}
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<!-- Server Configuration -->
|
|
37
|
+
<div class="mt-8">
|
|
38
|
+
<div class="bg-white shadow overflow-hidden sm:rounded-lg">
|
|
39
|
+
<div class="px-4 py-5 sm:px-6">
|
|
40
|
+
<h3 class="text-lg leading-6 font-medium text-gray-900">Server Configuration</h3>
|
|
41
|
+
<p class="mt-1 max-w-2xl text-sm text-gray-500">Current server settings and environment</p>
|
|
42
|
+
</div>
|
|
43
|
+
<div class="border-t border-gray-200">
|
|
44
|
+
<dl>
|
|
45
|
+
<div class="bg-gray-50 px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
|
46
|
+
<dt class="text-sm font-medium text-gray-500">Host</dt>
|
|
47
|
+
<dd class="mt-1 text-sm text-gray-900 sm:col-span-2 sm:mt-0">{{ server_config.host }}</dd>
|
|
48
|
+
</div>
|
|
49
|
+
<div class="bg-white px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
|
50
|
+
<dt class="text-sm font-medium text-gray-500">Port</dt>
|
|
51
|
+
<dd class="mt-1 text-sm text-gray-900 sm:col-span-2 sm:mt-0">{{ server_config.port }}</dd>
|
|
52
|
+
</div>
|
|
53
|
+
<div class="bg-gray-50 px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
|
54
|
+
<dt class="text-sm font-medium text-gray-500">API Version</dt>
|
|
55
|
+
<dd class="mt-1 text-sm text-gray-900 sm:col-span-2 sm:mt-0">{{ server_config.api_version }}</dd>
|
|
56
|
+
</div>
|
|
57
|
+
<div class="bg-white px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
|
58
|
+
<dt class="text-sm font-medium text-gray-500">Environment</dt>
|
|
59
|
+
<dd class="mt-1 text-sm text-gray-900 sm:col-span-2 sm:mt-0 capitalize">{{ server_config.environment }}</dd>
|
|
60
|
+
</div>
|
|
61
|
+
<div class="bg-gray-50 px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
|
62
|
+
<dt class="text-sm font-medium text-gray-500">Database</dt>
|
|
63
|
+
<dd class="mt-1 text-sm text-gray-900 sm:col-span-2 sm:mt-0">{{ server_config.database_type }}</dd>
|
|
64
|
+
</div>
|
|
65
|
+
<div class="bg-white px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
|
66
|
+
<dt class="text-sm font-medium text-gray-500">Storage Path</dt>
|
|
67
|
+
<dd class="mt-1 text-sm text-gray-900 sm:col-span-2 sm:mt-0">{{ server_config.storage_path }}</dd>
|
|
68
|
+
</div>
|
|
69
|
+
{% if server_config.agents %}
|
|
70
|
+
<div class="bg-gray-50 px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
|
71
|
+
<dt class="text-sm font-medium text-gray-500">Agents</dt>
|
|
72
|
+
<dd class="mt-1 text-sm text-gray-900 sm:col-span-2 sm:mt-0">
|
|
73
|
+
<div class="space-y-2">
|
|
74
|
+
{% for agent in server_config.agents %}
|
|
75
|
+
<div class="bg-white p-2 rounded border">
|
|
76
|
+
<div class="font-medium">{{ agent.name }}</div>
|
|
77
|
+
<div class="text-xs text-gray-500">{{ agent.description }}</div>
|
|
78
|
+
<div class="text-xs text-gray-400">v{{ agent.version }}</div>
|
|
79
|
+
</div>
|
|
80
|
+
{% endfor %}
|
|
81
|
+
</div>
|
|
82
|
+
</dd>
|
|
83
|
+
</div>
|
|
84
|
+
{% endif %}
|
|
85
|
+
</dl>
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
</div>
|
|
92
|
+
|
|
93
|
+
<script>
|
|
94
|
+
// Auto-refresh server status every 30 seconds
|
|
95
|
+
document.addEventListener('DOMContentLoaded', function() {
|
|
96
|
+
// Set up auto-refresh interval
|
|
97
|
+
setInterval(function() {
|
|
98
|
+
const refreshButton = document.querySelector('[hx-get="/admin/api/server/status"]');
|
|
99
|
+
if (refreshButton) {
|
|
100
|
+
htmx.trigger(refreshButton, 'click');
|
|
101
|
+
}
|
|
102
|
+
}, 30000); // Refresh every 30 seconds
|
|
103
|
+
});
|
|
104
|
+
</script>
|
|
105
|
+
{% endblock %}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
<div class="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-4">
|
|
2
|
+
<!-- Overall Status -->
|
|
3
|
+
<div class="bg-white overflow-hidden shadow rounded-lg">
|
|
4
|
+
<div class="p-5">
|
|
5
|
+
<div class="flex items-center">
|
|
6
|
+
<div class="flex-shrink-0">
|
|
7
|
+
{% if server_status.status == "online" %}
|
|
8
|
+
<div class="w-8 h-8 bg-green-100 rounded-full flex items-center justify-center">
|
|
9
|
+
<svg class="w-5 h-5 text-green-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
10
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path>
|
|
11
|
+
</svg>
|
|
12
|
+
</div>
|
|
13
|
+
{% else %}
|
|
14
|
+
<div class="w-8 h-8 bg-red-100 rounded-full flex items-center justify-center">
|
|
15
|
+
<svg class="w-5 h-5 text-red-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
16
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
|
|
17
|
+
</svg>
|
|
18
|
+
</div>
|
|
19
|
+
{% endif %}
|
|
20
|
+
</div>
|
|
21
|
+
<div class="ml-5 w-0 flex-1">
|
|
22
|
+
<dl>
|
|
23
|
+
<dt class="text-sm font-medium text-gray-500 truncate">Server Status</dt>
|
|
24
|
+
<dd class="text-lg font-medium text-gray-900 capitalize">{{ server_status.status }}</dd>
|
|
25
|
+
</dl>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<!-- Uptime -->
|
|
32
|
+
<div class="bg-white overflow-hidden shadow rounded-lg">
|
|
33
|
+
<div class="p-5">
|
|
34
|
+
<div class="flex items-center">
|
|
35
|
+
<div class="flex-shrink-0">
|
|
36
|
+
<div class="w-8 h-8 bg-blue-100 rounded-full flex items-center justify-center">
|
|
37
|
+
<svg class="w-5 h-5 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
38
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"></path>
|
|
39
|
+
</svg>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
<div class="ml-5 w-0 flex-1">
|
|
43
|
+
<dl>
|
|
44
|
+
<dt class="text-sm font-medium text-gray-500 truncate">Uptime</dt>
|
|
45
|
+
<dd class="text-lg font-medium text-gray-900">{{ server_status.uptime }}</dd>
|
|
46
|
+
</dl>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
<!-- Active Connections -->
|
|
53
|
+
<div class="bg-white overflow-hidden shadow rounded-lg">
|
|
54
|
+
<div class="p-5">
|
|
55
|
+
<div class="flex items-center">
|
|
56
|
+
<div class="flex-shrink-0">
|
|
57
|
+
{% if server_status.active_connections > 20 %}
|
|
58
|
+
<div class="w-8 h-8 bg-red-100 rounded-full flex items-center justify-center">
|
|
59
|
+
<svg class="w-5 h-5 text-red-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
60
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"></path>
|
|
61
|
+
</svg>
|
|
62
|
+
</div>
|
|
63
|
+
{% elif server_status.active_connections > 10 %}
|
|
64
|
+
<div class="w-8 h-8 bg-yellow-100 rounded-full flex items-center justify-center">
|
|
65
|
+
<svg class="w-5 h-5 text-yellow-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
66
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"></path>
|
|
67
|
+
</svg>
|
|
68
|
+
</div>
|
|
69
|
+
{% else %}
|
|
70
|
+
<div class="w-8 h-8 bg-green-100 rounded-full flex items-center justify-center">
|
|
71
|
+
<svg class="w-5 h-5 text-green-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
72
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"></path>
|
|
73
|
+
</svg>
|
|
74
|
+
</div>
|
|
75
|
+
{% endif %}
|
|
76
|
+
</div>
|
|
77
|
+
<div class="ml-5 w-0 flex-1">
|
|
78
|
+
<dl>
|
|
79
|
+
<dt class="text-sm font-medium text-gray-500 truncate">Active Connections</dt>
|
|
80
|
+
<dd class="text-lg font-medium text-gray-900">{{ server_status.active_connections }}</dd>
|
|
81
|
+
</dl>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
|
|
87
|
+
<!-- Memory Usage -->
|
|
88
|
+
<div class="bg-white overflow-hidden shadow rounded-lg">
|
|
89
|
+
<div class="p-5">
|
|
90
|
+
<div class="flex items-center">
|
|
91
|
+
<div class="flex-shrink-0">
|
|
92
|
+
{% if server_status.memory_percent > 80 %}
|
|
93
|
+
<div class="w-8 h-8 bg-red-100 rounded-full flex items-center justify-center">
|
|
94
|
+
<svg class="w-5 h-5 text-red-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
95
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"></path>
|
|
96
|
+
</svg>
|
|
97
|
+
</div>
|
|
98
|
+
{% elif server_status.memory_percent > 60 %}
|
|
99
|
+
<div class="w-8 h-8 bg-yellow-100 rounded-full flex items-center justify-center">
|
|
100
|
+
<svg class="w-5 h-5 text-yellow-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
101
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"></path>
|
|
102
|
+
</svg>
|
|
103
|
+
</div>
|
|
104
|
+
{% else %}
|
|
105
|
+
<div class="w-8 h-8 bg-green-100 rounded-full flex items-center justify-center">
|
|
106
|
+
<svg class="w-5 h-5 text-green-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
107
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"></path>
|
|
108
|
+
</svg>
|
|
109
|
+
</div>
|
|
110
|
+
{% endif %}
|
|
111
|
+
</div>
|
|
112
|
+
<div class="ml-5 w-0 flex-1">
|
|
113
|
+
<dl>
|
|
114
|
+
<dt class="text-sm font-medium text-gray-500 truncate">Memory Usage</dt>
|
|
115
|
+
<dd class="text-lg font-medium text-gray-900">{{ server_status.memory_usage }}</dd>
|
|
116
|
+
</dl>
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
</div>
|