diff --git a/client.py b/client.py index e18f25a..42a731b 100644 --- a/client.py +++ b/client.py @@ -112,8 +112,8 @@ def get_memory_info(error_dict): result_dict = dict() try: mem = psutil.virtual_memory() - result_dict["total"] = mem.total - result_dict["used"] = mem.used + result_dict["total"] = mem.total / 1024 + result_dict["used"] = mem.used / 1024 except Exception as e: error_dict['memory'] = e diff --git a/web/css/style_1.css b/web/css/style_1.css new file mode 100644 index 0000000..9d8698e --- /dev/null +++ b/web/css/style_1.css @@ -0,0 +1,58 @@ +#header-container { + background-color: beige; +} + +.card { + border-style: solid; + border-width: 2px; + border-color: black; + /* background-color: aqua; */ + padding: 5px; + margin: 5px; + border-radius: 8px; +} + +.server-name { + background-color: black; + color: white; + border-radius: 8px; + padding: 4px 10px; + font-size: 26px; +} + +.gpu-info { + /* background-color: aqua; */ + border-style: solid; + border-width: 1px; + border-color: #ccc; + border-radius: 8px; + margin-top: 5px; + padding: 4px 8px; + margin-bottom: 5px; + background-color: #f9f9f9; + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); +} + +.process-item { + color: rgb(26, 92, 247); + font-weight: bold; +} + +/*占用状态*/ +.state-free { + color: green; +} +.state-occupy { + color: red; +} +.state-light-occupy { + color: orange; +} +.state-super-occupy { + color: rgb(255, 0, 0); + font-weight: bold; + font-size: 20px; + background-color: rgb(255, 255, 0); + border-radius: 8px; + padding: 1px 6px; +} \ No newline at end of file diff --git a/web/index.html b/web/index.html index 2b89fbf..32e0425 100644 --- a/web/index.html +++ b/web/index.html @@ -4,8 +4,15 @@