Skip to content

Commit

Permalink
feat(systemLoads): add function to output app name in system loads pa…
Browse files Browse the repository at this point in the history
…nel (#1906)

Signed-off-by: Stefan Dej <meteyou@gmail.com>
  • Loading branch information
meteyou committed Jun 14, 2024
1 parent b75f842 commit f6fba3f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/store/printer/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export const actions: ActionTree<PrinterState, RootState> = {
)

commit('setData', {
app_name: payload.app ?? null,
hostname: payload.hostname,
software_version: payload.software_version,
cpu_info: payload.cpu_info,
Expand Down
4 changes: 4 additions & 0 deletions src/store/server/getters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ export const getters: GetterTree<ServerState, any> = {
version = rootState.printer?.software_version.split('-').slice(0, 4).join('-')
}

if (rootState.printer?.app_name) {
version = rootState.printer?.app_name + ' ' + version
}

let pythonVersion: null | string = null
if (state.system_info?.python?.version_string) {
const firstSpace = state.system_info?.python?.version_string.indexOf(' ')
Expand Down

0 comments on commit f6fba3f

Please sign in to comment.