Skip to content

Commit

Permalink
Merge pull request #112 from MohsenAbrishami/improve/server-status-in…
Browse files Browse the repository at this point in the history
…-monitoring-panel

Fix bug API address
  • Loading branch information
MohsenAbrishami authored Jul 11, 2023
2 parents 464cb80 + 31431b3 commit f27db7f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/build/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"assets/main-9ece603d.css",
"assets/style-d5d41528.css"
],
"file": "assets/main-5bf2a308.js",
"file": "assets/main-ab2bdb37.js",
"isEntry": true,
"src": "resources/js/src/main.js"
},
Expand Down
3 changes: 2 additions & 1 deletion resources/js/src/components/Chart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ const resources = reactive({
function getResourceLogHistories() {
const fromDate = date.value[0].toISOString().slice(0, 10)
const toDate = date.value[1].toISOString().slice(0, 10)
axios.get(`/monitor/history/${fromDate}/${toDate}`)
axios.get(`${window.LogViewer.host}/monitor/history/${fromDate}/${toDate}
?key=${window.LogViewer.monitoring_panel_key}`)
.then((value) => {
resourceLog.history = value.data
generateChart()
Expand Down
2 changes: 1 addition & 1 deletion resources/js/src/components/Status.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const statusChecker = setInterval(() => {
}, 180000)
function getCurrentStatus() {
axios.get('monitor/current')
axios.get(`${window.LogViewer.host}/monitor/current?key=${window.LogViewer.monitoring_panel_key}`)
.then((value) => {
statuses.cpu = `${Number(value.data.cpu).toFixed(2)} %`
statuses.hardDisk = `${(Number(value.data.hard_disk) / (1024 ** 3)).toFixed(2)} GB`
Expand Down

0 comments on commit f27db7f

Please sign in to comment.