diff --git a/public/main.js b/public/main.js index c317644322175e389d4ca8950ee7db1870b54f74..020080209c4e62d37d5976bc233aba210cc6e8b8 100644 --- a/public/main.js +++ b/public/main.js @@ -1,19 +1,14 @@ import * as utils from "./utils.js"; import { Cluster } from "./cluster.js"; -// import { Workstations } from "./workstations.js"; var last_updated = new utils.Field('Last update', '', false); last_updated.get_node_from_id('last-updated'); var cluster = new Cluster(); -// var ws = new Workstations(); -var active = cluster; -// var inactive = ws; // Show the default page -active.show(); +cluster.show(); -// TODO use socketio rooms instead of namespaces (easier to switch) // console.log("Connecting to socket") var socket = io('https://rlhm.glepage.com'); // console.log("Succesfully connected to socket server.") @@ -31,20 +26,5 @@ socket.on('update', function(new_dict) { update_timestamp(); // Update data - active.update(new_dict); + cluster.update(new_dict); }); - -// function tab_button_callback(selected_tab) { -// // If already in this mode, return and do nothing -// -// // Else, -// // Release previous button -// // Push selected button -// -// // Connect to corresponding namespace on the socket -// -// // Swap the active and inactive modules -// [active, inactive] = [inactive, active]; -// inactive.hide(); -// active.show(); -// } diff --git a/public/workstations.js b/public/workstations.js deleted file mode 100644 index 27228882faeef29d54b4b46cbe0a5e2782e5aa41..0000000000000000000000000000000000000000 --- a/public/workstations.js +++ /dev/null @@ -1,5 +0,0 @@ -export class Workstations { - constructor() { - } -} -