* test vue-echarts and dataset>source instead of series>data Signed-off-by: Stefan Dej <meteyou@gmail.com> * fix disposed state of chart & delete update interval of settings page Signed-off-by: Stefan Dej <meteyou@gmail.com> * init TS migation & dashboard Signed-off-by: Stefan Dej <meteyou@gmail.com> * bugfix: dashbaord console Signed-off-by: Stefan Dej <meteyou@gmail.com> * feature: add "disabled" status to the filament runout sensor on the dashboard Signed-off-by: Stefan Dej <meteyou@gmail.com> * fix klipper restart process Signed-off-by: Stefan Dej <meteyou@gmail.com> * fix status panel during a print Signed-off-by: Stefan Dej <meteyou@gmail.com> * convert g-code files to typescript Signed-off-by: Stefan Dej <meteyou@gmail.com> * convert history files to typescript Signed-off-by: Stefan Dej <meteyou@gmail.com> * convert machine limits to typescript Signed-off-by: Stefan Dej <meteyou@gmail.com> * convert update manager to typescript Signed-off-by: Stefan Dej <meteyou@gmail.com> * convert endstops & logfiles to typescript Signed-off-by: Stefan Dej <meteyou@gmail.com> * fix temp display in tools panel Signed-off-by: Stefan Dej <meteyou@gmail.com> * convert machine > config files to TS Signed-off-by: Stefan Dej <meteyou@gmail.com> * convert select printer dialog to TS Signed-off-by: Stefan Dej <meteyou@gmail.com> * convert select printer menu to TS Signed-off-by: Stefan Dej <meteyou@gmail.com> * convert farm page to TS Signed-off-by: Stefan Dej <meteyou@gmail.com> * fix debug output of farm printer getters Signed-off-by: Stefan Dej <meteyou@gmail.com> * fix import webcam streams in farm view Signed-off-by: Stefan Dej <meteyou@gmail.com> * better handling when changing printers Signed-off-by: Stefan Dej <meteyou@gmail.com> * convert heightmap to TS Signed-off-by: Stefan Dej <meteyou@gmail.com> * convert heightmap to TS Signed-off-by: Stefan Dej <meteyou@gmail.com> * Console QOL (#300) * CHORE Signed-off-by: Eike Ahmels <eike.ahmels@tu-dortmund.de> * NEW: console ts refactor, linux autocomplete, gui helplist, multiline Signed-off-by: Eike Ahmels <eike.ahmels@tu-dortmund.de> * FIX: console autocomplete flood fix Signed-off-by: Eike Ahmels <eike.ahmels@tu-dortmund.de> * fix merged console Signed-off-by: Stefan Dej <meteyou@gmail.com> * fixed return of ConsoleTable.vue isCommand Signed-off-by: Stefan Dej <meteyou@gmail.com> * fix: add toast after creating file in ConfigFilesPanel.vue Signed-off-by: Stefan Dej <meteyou@gmail.com> * fix: file upload message Signed-off-by: Stefan Dej <meteyou@gmail.com> * add toolbar to files panels Signed-off-by: Stefan Dej <meteyou@gmail.com> * fix: disable scrollbars in TempChart.vue Signed-off-by: Stefan Dej <meteyou@gmail.com> * fix: sidebar z-index and farm printer toolbar Signed-off-by: Stefan Dej <meteyou@gmail.com> * fix: sidebar & topbar z-index and farm printer toolbar Signed-off-by: Stefan Dej <meteyou@gmail.com> * update toolbars in gcode-files and history Signed-off-by: Stefan Dej <meteyou@gmail.com> * feature: new settings dialog (#302) * create settings dialog and integrate general, console, control, marcos, presets, webcams Signed-off-by: Stefan Dej <meteyou@gmail.com> * fix: renamed webcam gui state variable Signed-off-by: Stefan Dej <meteyou@gmail.com> * fix: temperature_fan chamber in farm printers dashboard Signed-off-by: Stefan Dej <meteyou@gmail.com> * fix: only display RPM in tools panel, when its available Signed-off-by: Stefan Dej <meteyou@gmail.com> * fix: reading empty remote printers list Signed-off-by: Stefan Dej <meteyou@gmail.com> * fix: loading additionalSensors in temp panel Signed-off-by: Stefan Dej <meteyou@gmail.com> * fix: bed_mesh loading rework heightmap settings save heightmap settings in moonraker db Signed-off-by: Stefan Dej <meteyou@gmail.com> * add remote printers to settings Signed-off-by: Stefan Dej <meteyou@gmail.com> * fix types Signed-off-by: Stefan Dej <meteyou@gmail.com> * add beforeDestroy to echarts Signed-off-by: Stefan Dej <meteyou@gmail.com> * add heightmap visualMap scaling and format tooltip Signed-off-by: Stefan Dej <meteyou@gmail.com> * feature: logo & primary color customizing Signed-off-by: Stefan Dej <meteyou@gmail.com> * remove keep-alive in app.vue Signed-off-by: Stefan Dej <meteyou@gmail.com> * round tempchart data Signed-off-by: Stefan Dej <meteyou@gmail.com> * normalize toolbar buttons Signed-off-by: Stefan Dej <meteyou@gmail.com> * fix series attributes & update echarts-gl Signed-off-by: Stefan Dej <meteyou@gmail.com> * fix hostname in sidebar Signed-off-by: Stefan Dej <meteyou@gmail.com> * rework websocket loadings Signed-off-by: Stefan Dej <meteyou@gmail.com> * fix rework websocket loadings Signed-off-by: Stefan Dej <meteyou@gmail.com> * Fixes for console QOL PR (#301) * FIX: command help dialog added Signed-off-by: Eike Ahmels <eike.ahmels@tu-dortmund.de> * FIX: console fixes Signed-off-by: Eike Ahmels <eike.ahmels@tu-dortmund.de> * rework events store Signed-off-by: Stefan Dej <meteyou@gmail.com> * bugfix: check customFilters if string or array Signed-off-by: Stefan Dej <meteyou@gmail.com> * bugfix: edit preset dont work (existing name check) Signed-off-by: Stefan Dej <meteyou@gmail.com> * bugfix: save webcam with index 0 Signed-off-by: Stefan Dej <meteyou@gmail.com> * bugfix: tool combobox input dont work Signed-off-by: Stefan Dej <meteyou@gmail.com> * bugfix: tooltip position & z-index Signed-off-by: Stefan Dej <meteyou@gmail.com> * rework console Signed-off-by: Stefan Dej <meteyou@gmail.com> * fix output name of filament sensor Signed-off-by: Stefan Dej <meteyou@gmail.com> * store performance updates and StatusPanel.vue optimizing Signed-off-by: Stefan Dej <meteyou@gmail.com> * console bugfixes Signed-off-by: Stefan Dej <meteyou@gmail.com> * fix icon-rotate in temperatures panel Signed-off-by: Stefan Dej <meteyou@gmail.com> * add auto-grow to console input fields Signed-off-by: Stefan Dej <meteyou@gmail.com> * fix dialog action button colors Signed-off-by: Stefan Dej <meteyou@gmail.com> * fix refreshMetadata of gcocde files Signed-off-by: Stefan Dej <meteyou@gmail.com> * feature: add multi fileupload to drag&drop upload Signed-off-by: Stefan Dej <meteyou@gmail.com> * convert SystemPanel to TS Signed-off-by: Stefan Dej <meteyou@gmail.com> * add init and getters for system panels Signed-off-by: Stefan Dej <meteyou@gmail.com> * add init and getters for system panels Signed-off-by: Stefan Dej <meteyou@gmail.com> * finish SystemPanel.vue Signed-off-by: Stefan Dej <meteyou@gmail.com> * feature: raspberry throttled flags in topbar Signed-off-by: Stefan Dej <meteyou@gmail.com> * bugfix: fix type in TheThrottledStates.vue Signed-off-by: Stefan Dej <meteyou@gmail.com> * feature: add new editor (#307) * init test Signed-off-by: Stefan Dej <meteyou@gmail.com> * theme test Signed-off-by: Stefan Dej <meteyou@gmail.com> * feature: switch to codemirror editor Signed-off-by: Stefan Dej <meteyou@gmail.com> * bugfix: fix type in TheThrottledStates.vue Signed-off-by: Stefan Dej <meteyou@gmail.com> * reformat flags output and deactivate debug output Signed-off-by: Stefan Dej <meteyou@gmail.com> * add types to throttle states Signed-off-by: Stefan Dej <meteyou@gmail.com> * display "dirty" in the board firmware version string Signed-off-by: Stefan Dej <meteyou@gmail.com> * fix mini console array cut Signed-off-by: Stefan Dej <meteyou@gmail.com> * delete old comment Signed-off-by: Stefan Dej <meteyou@gmail.com> * fix config files on small devices Signed-off-by: Stefan Dej <meteyou@gmail.com> * feature: display macro description in settings tab Signed-off-by: Stefan Dej <meteyou@gmail.com> * change settings icons Signed-off-by: Stefan Dej <meteyou@gmail.com> * rename dashboard panel & change slider text in settings Signed-off-by: Stefan Dej <meteyou@gmail.com> * responsive optimations for settings Signed-off-by: Stefan Dej <meteyou@gmail.com> * bugfix throttled state flags filter Signed-off-by: Stefan Dej <meteyou@gmail.com> * Code highlighting for codemirror (#309) * init test Signed-off-by: Stefan Dej <meteyou@gmail.com> * theme test Signed-off-by: Stefan Dej <meteyou@gmail.com> * feature: switch to codemirror editor Signed-off-by: Stefan Dej <meteyou@gmail.com> * NEW: klipper_config editor theme Signed-off-by: Eike Ahmels <eike.ahmels@tu-dortmund.de> * NEW: code highlighting for codemirror Signed-off-by: Eike Ahmels <eike.ahmels@tu-dortmund.de> Co-authored-by: Stefan Dej <meteyou@gmail.com> * feature: hide/show jobs with special print status Signed-off-by: Stefan Dej <meteyou@gmail.com> * redesign console help modal Signed-off-by: Stefan Dej <meteyou@gmail.com> * bugfix: default state of sidebar was wrong on mobile devices Signed-off-by: Stefan Dej <meteyou@gmail.com> * bugfix: mobile view interface settings Signed-off-by: Stefan Dej <meteyou@gmail.com> * bugfix: optimize mobile view interface settings Signed-off-by: Stefan Dej <meteyou@gmail.com> * bugfix: block empty console commands Signed-off-by: Stefan Dej <meteyou@gmail.com> * push version number Signed-off-by: Stefan Dej <meteyou@gmail.com> * feature: add current / max flow in status panel Signed-off-by: Stefan Dej <meteyou@gmail.com> * feature: add big gcode thumbnail to status panel Signed-off-by: Stefan Dej <meteyou@gmail.com> * bugfix: fix favicon and setting tab names Signed-off-by: Stefan Dej <meteyou@gmail.com> * cleanup old editor Signed-off-by: Stefan Dej <meteyou@gmail.com> * bugfix: add redirect for updates from 1.6.0 to 2.0.0 Signed-off-by: Stefan Dej <meteyou@gmail.com> Co-authored-by: Eike Ahmels <hui_buh-@gmx.net>
210 lines
11 KiB
Vue
210 lines
11 KiB
Vue
<style scoped>
|
|
.cursor--pointer {
|
|
cursor: pointer;
|
|
}
|
|
</style>
|
|
|
|
<template>
|
|
<div>
|
|
<v-card class="mb-6">
|
|
<v-toolbar flat dense >
|
|
<v-toolbar-title>
|
|
<span class="subheading"><v-icon left>mdi-memory</v-icon>{{ $t('Machine.SystemPanel.SystemLoad') }}</span>
|
|
</v-toolbar-title>
|
|
</v-toolbar>
|
|
<v-card-text class="px-0 py-2">
|
|
<div v-for="(mcu, index) of mcus" v-bind:key="mcu.name">
|
|
<v-divider class="my-2" v-if="index" ></v-divider>
|
|
<v-row class="py-0">
|
|
<v-col class="pl-6">
|
|
<strong style="cursor: pointer;" @click="openMcuDetails(mcu)">{{ mcu.name }}</strong><small v-if="mcu.chip" class="ml-2">({{ mcu.chip }})</small><br />
|
|
{{ $t('Machine.SystemPanel.Version') }}: {{ mcu.version }}<br />
|
|
{{ $t('Machine.SystemPanel.Load') }}: {{ mcu.load }},
|
|
{{ $t('Machine.SystemPanel.Awake') }}: {{ mcu.awake }}
|
|
<span v-if="mcu.freq !== null">, {{ $t('Machine.SystemPanel.Frequency') }}: {{ mcu.freqFormat }}</span>
|
|
<template v-if="mcu.tempSensor">
|
|
<span>, </span>
|
|
<v-tooltip top>
|
|
<template v-slot:activator="{ on, attrs }">
|
|
<span v-bind="attrs" v-on="on">Temp: {{ mcu.tempSensor.temperature+"°C" }}</span>
|
|
</template>
|
|
<span>
|
|
max: {{ mcu.tempSensor.measured_max_temp }}°C<br />
|
|
min: {{ mcu.tempSensor.measured_min_temp }}°C
|
|
</span>
|
|
</v-tooltip>
|
|
</template>
|
|
</v-col>
|
|
<v-col class="px-6 col-auto d-flex justify-end align-center">
|
|
<v-progress-circular
|
|
:rotate="-90"
|
|
:size="55"
|
|
:width="7"
|
|
:value="mcu.loadPercent"
|
|
:color="mcu.loadProgressColor"
|
|
>
|
|
{{ mcu.loadPercent }}
|
|
</v-progress-circular>
|
|
</v-col>
|
|
</v-row>
|
|
</div>
|
|
<div v-if="hostStats">
|
|
<v-divider class="my-2" v-if="mcus.length" ></v-divider>
|
|
<v-row class="py-0">
|
|
<v-col class="pl-6">
|
|
<strong style="cursor: pointer;" @click="hostDetailsDialog.bool = true">Host</strong>
|
|
<v-tooltip top>
|
|
<template v-slot:activator="{ on, attrs }">
|
|
<small v-if="hostStats.cpuName" class="ml-2" v-bind="attrs" v-on="on">({{ hostStats.cpuName }})</small>
|
|
</template>
|
|
<span v-if="hostStats.cpuDesc">{{ hostStats.cpuDesc }}</span>
|
|
</v-tooltip>
|
|
<br />
|
|
<span v-if="hostStats.version">{{ $t('Machine.SystemPanel.Version') }}: {{ hostStats.version }}<br /></span>
|
|
<span v-if="hostStats.os">{{ $t('Machine.SystemPanel.Os') }}: {{ hostStats.os }}<br /></span>
|
|
<span>{{ $t('Machine.SystemPanel.Load') }}: {{ hostStats.load }}</span>
|
|
<span v-if="hostStats.memoryFormat">, {{ $t('Machine.SystemPanel.Memory') }}: {{ hostStats.memoryFormat }}</span>
|
|
<template v-if="hostStats.tempSensor">
|
|
<span>, </span>
|
|
<v-tooltip top>
|
|
<template v-slot:activator="{ on, attrs }">
|
|
<span v-bind="attrs" v-on="on">Temp: {{ hostStats.tempSensor.temperature+"°C" }}</span>
|
|
</template>
|
|
<span v-if="hostStats.tempSensor.measured_min_temp && hostStats.tempSensor.measured_max_temp">
|
|
max: {{ hostStats.tempSensor.measured_max_temp }}°C<br />
|
|
min: {{ hostStats.tempSensor.measured_min_temp }}°C
|
|
</span>
|
|
</v-tooltip>
|
|
</template>
|
|
</v-col>
|
|
<v-col class="px-6 col-auto d-flex justify-end align-center">
|
|
<v-progress-circular
|
|
:rotate="-90"
|
|
:size="55"
|
|
:width="7"
|
|
:value="hostStats.loadPercent"
|
|
:color="hostStats.loadProgressColor"
|
|
>
|
|
{{ hostStats.loadPercent }}
|
|
</v-progress-circular>
|
|
</v-col>
|
|
</v-row>
|
|
</div>
|
|
</v-card-text>
|
|
</v-card>
|
|
<v-dialog v-model="mcuDetailsDialog.bool" :max-width="400" :max-height="500" scrollable>
|
|
<v-card dark>
|
|
<v-toolbar flat dense >
|
|
<v-toolbar-title>
|
|
<span class="subheading"><v-icon left>mdi-text-box-search-outline</v-icon>{{ mcuDetailsDialog.headline }}</span>
|
|
</v-toolbar-title>
|
|
<v-spacer></v-spacer>
|
|
<v-btn small class="minwidth-0 px-2" color="grey darken-3" @click="mcuDetailsDialog.bool = false"><v-icon small>mdi-close-thick</v-icon></v-btn>
|
|
</v-toolbar>
|
|
<v-card-text class="pt-5" style="height: 350px;">
|
|
<template v-if="mcuDetailsDialog.mcu.mcu_constants">
|
|
<v-row>
|
|
<v-col><span class="headline">{{ $t('Machine.SystemPanel.Constants') }}</span></v-col>
|
|
</v-row>
|
|
<div v-for="(value, key, index) in mcuDetailsDialog.mcu.mcu_constants" :key="key">
|
|
<v-divider class="my-3" v-if="index"></v-divider>
|
|
<v-row>
|
|
<v-col>{{ key }}</v-col>
|
|
<v-col class="text-right">{{ value }}</v-col>
|
|
</v-row>
|
|
</div>
|
|
</template>
|
|
<template v-if="mcuDetailsDialog.mcu.last_stats">
|
|
<v-row class="mt-5">
|
|
<v-col><span class="headline">{{ $t('Machine.SystemPanel.LastStats') }}</span></v-col>
|
|
</v-row>
|
|
<div v-for="(value, key, index) in mcuDetailsDialog.mcu.last_stats" :key="key">
|
|
<v-divider class="my-3" v-if="index"></v-divider>
|
|
<v-row>
|
|
<v-col>{{ key }}</v-col>
|
|
<v-col class="text-right">{{ value }}</v-col>
|
|
</v-row>
|
|
</div>
|
|
</template>
|
|
</v-card-text>
|
|
</v-card>
|
|
</v-dialog>
|
|
<v-dialog v-model="hostDetailsDialog.bool" :max-width="600" :max-height="500" scrollable>
|
|
<v-card dark>
|
|
<v-toolbar flat dense >
|
|
<v-toolbar-title>
|
|
<span class="subheading"><v-icon left>mdi-text-box-search-outline</v-icon>{{ $t('Machine.SystemPanel.HostDetails') }}</span>
|
|
</v-toolbar-title>
|
|
<v-spacer></v-spacer>
|
|
<v-btn small class="minwidth-0 px-2" color="grey darken-3" @click="hostDetailsDialog.bool = false"><v-icon small>mdi-close-thick</v-icon></v-btn>
|
|
</v-toolbar>
|
|
<v-card-text class="pt-5" style="height: 350px;">
|
|
<template v-if="Object.keys(systemInfo).length">
|
|
<div v-for="(infoGroup, key, index) of systemInfo" v-bind:key="key">
|
|
<template v-if="key !== 'available_services'">
|
|
<v-row :class="index ? 'mt-5' : ''">
|
|
<v-col><span class="headline">{{ key }}</span></v-col>
|
|
</v-row>
|
|
<div v-for="(value, key, index) in infoGroup" :key="key">
|
|
<v-divider class="my-3" v-if="index"></v-divider>
|
|
<v-row>
|
|
<v-col>{{ key }}</v-col>
|
|
<v-col class="text-right">{{ value }}</v-col>
|
|
</v-row>
|
|
</div>
|
|
</template>
|
|
</div>
|
|
</template>
|
|
<template v-else>
|
|
<v-row class="mt-5">
|
|
<v-col><p>No more Infos</p></v-col>
|
|
</v-row>
|
|
</template>
|
|
</v-card-text>
|
|
</v-card>
|
|
</v-dialog>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
|
|
import {Component, Mixins} from "vue-property-decorator";
|
|
import BaseMixin from "../../mixins/base";
|
|
import {formatFilesize} from "@/plugins/helpers";
|
|
|
|
@Component
|
|
export default class SystemPanel extends Mixins(BaseMixin) {
|
|
|
|
private mcuDetailsDialog: { bool: boolean, headline: string, mcu: any } = {
|
|
bool: false,
|
|
headline: "",
|
|
mcu: {
|
|
mcu_constants: null,
|
|
last_stats: null,
|
|
}
|
|
}
|
|
|
|
private hostDetailsDialog: { bool: boolean } = {
|
|
bool: false,
|
|
}
|
|
|
|
get mcus() {
|
|
return this.$store.getters["printer/getMcus"] ?? []
|
|
}
|
|
|
|
get hostStats() {
|
|
return this.$store.getters["server/getHostStats"] ?? null
|
|
}
|
|
|
|
get systemInfo() {
|
|
return this.$store.state.server?.system_info ?? {}
|
|
}
|
|
|
|
openMcuDetails(mcu: any) {
|
|
this.mcuDetailsDialog.headline = mcu.name
|
|
this.mcuDetailsDialog.mcu.mcu_constants = {...mcu.mcu_constants}
|
|
this.mcuDetailsDialog.mcu.last_stats = {...mcu.last_stats}
|
|
this.mcuDetailsDialog.bool = true
|
|
}
|
|
}
|
|
</script> |