Compare commits
4 Commits
b885ea5e3f
...
00722e6b76
Author | SHA1 | Date |
---|---|---|
Starbeamrainbowlabs | 00722e6b76 | |
Starbeamrainbowlabs | 658c6ca7f6 | |
Starbeamrainbowlabs | 7f383dcc74 | |
Starbeamrainbowlabs | f1321d6c37 |
12
build.sh
12
build.sh
|
@ -37,6 +37,7 @@ if [[ "$#" -lt 1 ]]; then
|
|||
echo -e "${CSECTION}Available actions${RS}";
|
||||
echo -e " ${CACTION}setup${RS} - Perform initial setup";
|
||||
echo -e " ${CACTION}launch${RS} - Launch a 3-node development swarm";
|
||||
echo -e " ${CACTION}start-dev${RS} - As launch, but additionally starts a tab for esbuild.";
|
||||
echo -e "";
|
||||
|
||||
exit 1;
|
||||
|
@ -74,6 +75,17 @@ task_setup() {
|
|||
|
||||
}
|
||||
|
||||
task_start-dev() {
|
||||
|
||||
set_title "systemquery:dev";
|
||||
|
||||
task_begin "Launching esbuild";
|
||||
terminal_tab "systemquery:build" bash -c "npm run watch; read -p 'Press enter to exit....';";
|
||||
task_end "$?";
|
||||
|
||||
task_launch;
|
||||
}
|
||||
|
||||
task_launch() {
|
||||
task_begin "Launching swarm";
|
||||
|
||||
|
|
|
@ -17,13 +17,14 @@ class InfoBroker {
|
|||
|
||||
this.allowed_tables = {
|
||||
// name → sysinfo name
|
||||
cpu: "cpu",
|
||||
// Note that the order here is the order in the web interface
|
||||
cpu_live: async () => {
|
||||
return {
|
||||
frequency: await sysinfo.cpuCurrentSpeed(),
|
||||
temperature: await sysinfo.cpuTemperature()
|
||||
};
|
||||
},
|
||||
cpu: "cpu",
|
||||
meta: async () => await this.make_table_meta()
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
"use strict";
|
||||
|
||||
import cpu from './tabledefs/cpu.mjs';
|
||||
import cpu_live from './tabledefs/cpu_live.mjs';
|
||||
|
||||
export default {
|
||||
cpu,
|
||||
cpu_live
|
||||
}
|
|
@ -1,7 +1,5 @@
|
|||
"use strict";
|
||||
|
||||
import human_filesize from '../misc/human_filesize.mjs';
|
||||
|
||||
export default {
|
||||
name: "CPU",
|
||||
icon: "microchip",
|
||||
|
|
|
@ -35,16 +35,19 @@ class GlobalUI {
|
|||
const result = document.createDocumentFragment();
|
||||
for(const table_name of status.tables) {
|
||||
console.log(`[nav] new dynamic item ${table_name}, def`, tabledefs[table_name]);
|
||||
const icondef = typeof tabledefs[table_name] === "undefined"
|
||||
? "question-circle"
|
||||
: tabledefs[table_name].icon;
|
||||
let icondef = `question-circle`;
|
||||
let display_name = table_name;
|
||||
if(typeof tabledefs[table_name] !== "undefined") {
|
||||
icondef = tabledefs[table_name].icon;
|
||||
display_name = tabledefs[table_name].name;
|
||||
}
|
||||
|
||||
const emel_icon = forkawesome_emel(icondef);
|
||||
console.log(`emel_icon`, emel_icon);
|
||||
result.append(this.emel(`li>a[href="?"]>${emel_icon}+span{?}`, {
|
||||
placeholders: [
|
||||
`#table/${table_name}`,
|
||||
table_name
|
||||
display_name
|
||||
]
|
||||
}));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue