diff --git a/files/api/DriveServer.py b/files/api/DriveServer.py
deleted file mode 100644
index 9a269b9..0000000
--- a/files/api/DriveServer.py
+++ /dev/null
@@ -1,4 +0,0 @@
-# This is the class definition for the remote Storage Systems
-# There will be a StorageLinux and StorageWindows Class, as well as the LocalServer Class
-# The LocalServer class will mostly be a List of Storage server objects and Class functions for interacting with them
-# The actual Storage server Classes will mostly just be collections of variables
diff --git a/files/api/StorageApi.py b/files/api/StorageApi.py
deleted file mode 100644
index b06fc69..0000000
--- a/files/api/StorageApi.py
+++ /dev/null
@@ -1,6 +0,0 @@
-### This file contains the flask routes for interfacing with the DriveServer objects
-### I need routes for adding/updating windows/linux hosts, as well as a query route
-### There needs to also be a Redis handler, meaning also that this will render with PHP
-### but have javascript to update if any Redis data happens
-### This won't happen a lot, but it will happen occasionally
-
diff --git a/files/api/new_descriptors.json b/files/api/new_descriptors.json
index b7f3250..1c4caba 100644
--- a/files/api/new_descriptors.json
+++ b/files/api/new_descriptors.json
@@ -1,6 +1,7 @@
[
{
- "notes:": "this is both a scratch file and a reference for new component descriptors"
+ "notes:": "this is both a scratch file and a reference for new component descriptors",
+ "descriptor descriptor": "the reference descriptor is the next key"
},
{
"name": "",
diff --git a/files/api/archive.py b/files/archive/archive.py
similarity index 100%
rename from files/api/archive.py
rename to files/archive/archive.py
diff --git a/files/vizz/docker/Dockerfile b/files/archive/vizz/docker/Dockerfile
similarity index 100%
rename from files/vizz/docker/Dockerfile
rename to files/archive/vizz/docker/Dockerfile
diff --git a/files/vizz/docker/apache_ports.conf b/files/archive/vizz/docker/apache_ports.conf
similarity index 100%
rename from files/vizz/docker/apache_ports.conf
rename to files/archive/vizz/docker/apache_ports.conf
diff --git a/files/vizz/docker/apache_vhost.conf b/files/archive/vizz/docker/apache_vhost.conf
similarity index 100%
rename from files/vizz/docker/apache_vhost.conf
rename to files/archive/vizz/docker/apache_vhost.conf
diff --git a/files/vizz/docker/supervisord.conf b/files/archive/vizz/docker/supervisord.conf
similarity index 100%
rename from files/vizz/docker/supervisord.conf
rename to files/archive/vizz/docker/supervisord.conf
diff --git a/files/vizz/docker/web/html/index.php b/files/archive/vizz/docker/web/html/index.php
similarity index 100%
rename from files/vizz/docker/web/html/index.php
rename to files/archive/vizz/docker/web/html/index.php
diff --git a/files/vizz/docker/web/html/src/redis.js b/files/archive/vizz/docker/web/html/src/redis.js
similarity index 100%
rename from files/vizz/docker/web/html/src/redis.js
rename to files/archive/vizz/docker/web/html/src/redis.js
diff --git a/files/vizz/docker/web/html/src/styles.css b/files/archive/vizz/docker/web/html/src/styles.css
similarity index 100%
rename from files/vizz/docker/web/html/src/styles.css
rename to files/archive/vizz/docker/web/html/src/styles.css
diff --git a/files/vizz/docker/web/html/src/system_metrics.js b/files/archive/vizz/docker/web/html/src/system_metrics.js
similarity index 100%
rename from files/vizz/docker/web/html/src/system_metrics.js
rename to files/archive/vizz/docker/web/html/src/system_metrics.js
diff --git a/files/vizz/docker/web/html/test.php b/files/archive/vizz/docker/web/html/test.php
similarity index 100%
rename from files/vizz/docker/web/html/test.php
rename to files/archive/vizz/docker/web/html/test.php
diff --git a/files/vizz/docker/web/node_server/package.json b/files/archive/vizz/docker/web/node_server/package.json
similarity index 100%
rename from files/vizz/docker/web/node_server/package.json
rename to files/archive/vizz/docker/web/node_server/package.json
diff --git a/files/vizz/docker/web/node_server/server.js b/files/archive/vizz/docker/web/node_server/server.js
similarity index 100%
rename from files/vizz/docker/web/node_server/server.js
rename to files/archive/vizz/docker/web/node_server/server.js
diff --git a/files/vizz/docker/web/proxy/nginx.conf b/files/archive/vizz/docker/web/proxy/nginx.conf
similarity index 100%
rename from files/vizz/docker/web/proxy/nginx.conf
rename to files/archive/vizz/docker/web/proxy/nginx.conf
diff --git a/files/docker/apis/StorageSummary/Routes.py b/files/docker/apis/StorageSummary/Routes.py
index 2fe819b..a574430 100644
--- a/files/docker/apis/StorageSummary/Routes.py
+++ b/files/docker/apis/StorageSummary/Routes.py
@@ -12,7 +12,6 @@ from requests import RequestException, Response
# import needed Class Libraries
from Storage import *
from Helpers import *
-#SummaryServer = DriveHealthServer(get_hostname())
SummaryServer = load_state()
@@ -20,12 +19,12 @@ if SummaryServer is None:
SummaryServer = DriveHealthServer(get_hostname())
print("Created new SummaryServer")
-# declare flask apps
+# declare flask app
app = Flask(__name__)
-#scheduler = APScheduler()
-
+############################
# Flask routes
+############################
# client update
@app.route('/storage_client_update', methods=['POST'])
@@ -49,7 +48,6 @@ def storage_client_delete():
print(result)
return jsonify(result)
-
# client details
@app.route('/client_details', methods=['GET'])
def client_details():
@@ -86,20 +84,15 @@ def test_route():
"DriveHealthServer": f"{SummaryServer}"
})
-
# test route 2
@app.route('/test_storage_summary', methods=['GET'])
def test_storage_summary():
- return jsonify({
- "message": "Hello world!",
- "hostname": get_hostname(),
- "DriveHealthServer": f"{SummaryServer}"
- })
-
-
+ return test_route()
+############################
# Route Helpers
+############################
# helper function for client_update route
# handles the submission data from the flask route
@@ -112,6 +105,12 @@ def client_update_helper(payload: dict):
result = client_processor(processed_payload)
return result
+# client processing function, add/update logic in Class Methods
+def client_processor(client_dict: dict):
+ result = SummaryServer.process_client_data(client_dict)
+ save_state(SummaryServer)
+ return result
+
# handle submission from remove route
def client_remove_helper(payload: dict):
result = None
@@ -147,30 +146,12 @@ def post_processor(client_dict: dict, required_keys: dict):
client_dict["processed_at"] = time.time()
return client_dict
-# Main functions
-
-# client processing function, add/update logic in Class Methods
-def client_processor(client_dict: dict):
- result = SummaryServer.process_client_data(client_dict)
- save_state(SummaryServer)
- return result
-
-def background_loop():
- return True
+############################
+# Main function
+############################
def run_main():
- #if SummaryServer is none:
-
- #atexit.register(lambda: save_state(SummaryServer)) test
- # Flask scheduler for background loop, run if requested
- #scheduler.add_job(id='background_loop',
- # func=background_loop,
- # trigger='interval',
- # seconds=60)
- #scheduler.init_app(app)
- #scheduler.start()
# Flask API
- background_loop()
app.run(debug=False, host='0.0.0.0', port=5001)
diff --git a/files/docker/apis/StorageSummary/__pycache__/Routes.cpython-313.pyc b/files/docker/apis/StorageSummary/__pycache__/Routes.cpython-313.pyc
index 36b9b84..ed1dd4f 100644
Binary files a/files/docker/apis/StorageSummary/__pycache__/Routes.cpython-313.pyc and b/files/docker/apis/StorageSummary/__pycache__/Routes.cpython-313.pyc differ
diff --git a/files/docker/apis/StorageSummary/__pycache__/Storage.cpython-313.pyc b/files/docker/apis/StorageSummary/__pycache__/Storage.cpython-313.pyc
index 89e6d45..60b39a4 100644
Binary files a/files/docker/apis/StorageSummary/__pycache__/Storage.cpython-313.pyc and b/files/docker/apis/StorageSummary/__pycache__/Storage.cpython-313.pyc differ
diff --git a/files/docker/apis/StorageSummary/app.py b/files/docker/apis/StorageSummary/app.py
index be1de3c..c036897 100644
--- a/files/docker/apis/StorageSummary/app.py
+++ b/files/docker/apis/StorageSummary/app.py
@@ -1,4 +1,5 @@
# main function for storage API
+# this is the barest of bones to load the api
# import class libraries
from Routes import *
diff --git a/files/docker/apis/StorageSummary/storage_api_state.pkl b/files/docker/apis/StorageSummary/storage_api_state.pkl
new file mode 100644
index 0000000..206cff5
Binary files /dev/null and b/files/docker/apis/StorageSummary/storage_api_state.pkl differ
diff --git a/files/docker/web/html/index.php b/files/docker/web/html/index.php
index bfe7cf4..fe07203 100644
--- a/files/docker/web/html/index.php
+++ b/files/docker/web/html/index.php
@@ -9,7 +9,7 @@ date_default_timezone_set('America/Los_Angeles');
$remove_hosts = [];
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['action'])) {
if ($_POST['action'] === 'remove') {
- // The Remove form sends a comma‑separated string of short_id’s
+ // The Remove form sends a comma-separated string of short_id’s
if (!empty($_POST['remove_hosts'])) {
$remove_hosts = array_filter(
explode(',', $_POST['remove_hosts']),
@@ -156,7 +156,7 @@ if (!in_array($mode, $validModes, true)) {
$apiConfig = [
'cosmostat' => ['bind' => '10.200.27.20', 'port' => '5000'],
/*'gali' => ['bind' => '10.200.27.20', 'port' => '5000'], // same as cosmostat*/
- 'drive_health' => ['bind' => '0.0.0.0', 'port' => '5001'], // new API
+ 'drive_health' => ['bind' => '172.25.1.18', 'port' => '5001'], // new API
];
/* ---------- Helper: fetch client details ---------- */
@@ -237,9 +237,6 @@ $systemComponents = $properties['system_components'] ?? [];
$selectedHost = $clients[$selectedIdx]['hostname'] ?? 'Unknown';
-
-/* ---- ---- */
-
/* ---- Sidebar Renderer ---- */
function renderSidebar(string $mode){
@@ -255,74 +252,54 @@ function renderSidebar(string $mode){
';
}
- ?>
-
-
Hosts
-
-
-
-
-
+ ?>
+
-
-
-
-
Endpoints
-
-
-
-
-
-
Shuttle Gali
-
-
+
+
+
+
+
+
+
+
+
+
+
+
Shuttle Gali
+
@@ -344,7 +321,8 @@ function renderMainContent(string $mode){
echo '
No hosts selected.
';
return;
}
- echo '
';
+ echo '
+
';
foreach ($selectedHosts as $sid) {
// Find the client that matches this short_id
$c = null;
@@ -357,41 +335,49 @@ function renderMainContent(string $mode){
if ($c === null) continue; // safety
$hostname = $c['name'] ?? 'Unknown';
- echo '