diff --git a/photon-client/src/App.vue b/photon-client/src/App.vue index a54bc10d2..480023f20 100644 --- a/photon-client/src/App.vue +++ b/photon-client/src/App.vue @@ -38,9 +38,9 @@ @@ -53,6 +53,7 @@ mdi-settings @@ -118,7 +119,7 @@ > - + @@ -246,6 +247,9 @@ import Logs from "./views/LogsView" this.handleInputWithIndex('currentPipeline', this.previouslySelectedIndex || 0); } this.previouslySelectedIndex = null; + }, + switchToSettingsTab() { + this.axios.post('http://' + this.$address + '/api/sendMetrics', {}) } } }; diff --git a/photon-client/src/store/index.js b/photon-client/src/store/index.js index da51e2347..b6e475aa1 100644 --- a/photon-client/src/store/index.js +++ b/photon-client/src/store/index.js @@ -127,6 +127,14 @@ export default new Vuex.Store({ patternHeight: 7, boardType: 0, // Chessboard, dotboard }, + metrics: { + cpuTemp: "N/A", + cpuUtil: "N/A", + cpuMem: "N/A", + gpuMem: "N/A", + ramUtil: "N/A", + gpuMemUtil: "N/A", + } }, mutations: { compactMode: set('compactMode'), @@ -135,6 +143,7 @@ export default new Vuex.Store({ selectedOutputs: set('selectedOutputs'), settings: set('settings'), calibrationData: set('calibrationData'), + metrics: set('metrics'), logString: (state, newStr) => { const str = state.logMessages; str.push(newStr) @@ -182,8 +191,12 @@ export default new Vuex.Store({ Vue.set(state, 'pipelineResults', payload[key]) } } + }, - + mutateEnabledLEDPercentage(state, payload) { + const settings = state.settings; + settings.lighting.brightness = payload; + Vue.set(state, "settings", settings); }, mutateCalibrationState: (state, payload) => { diff --git a/photon-client/src/views/SettingsView.vue b/photon-client/src/views/SettingsView.vue index ad6e18441..67375ab61 100644 --- a/photon-client/src/views/SettingsView.vue +++ b/photon-client/src/views/SettingsView.vue @@ -8,32 +8,19 @@ cols="12" style="max-width: 1400px" > - - - {{ item.name }} - - - - Save - - + {{ item.name }} + + diff --git a/photon-client/src/views/SettingsViews/General.vue b/photon-client/src/views/SettingsViews/General.vue index 064d9f121..0c56ac658 100644 --- a/photon-client/src/views/SettingsViews/General.vue +++ b/photon-client/src/views/SettingsViews/General.vue @@ -1,14 +1,21 @@