Skip to content

Commit

Permalink
fix: disk the number of query results is inconsistent && nebula-stat… (
Browse files Browse the repository at this point in the history
…#16)

* fix: disk the number of query results is inconsistent &&  nebula-stats-exorter package

* mod: nebula-stats-exporter  executable permission
  • Loading branch information
NicolaCage authored Sep 26, 2021
1 parent c17c6ae commit 267b4ba
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/assets/modules/MachineDashboard/Cards/DiskCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ const mapState = (state: IRootState) => {
// According to type, only the detail increases total
diskUsageDetail: diskStat.filter(item => item.metric.instance !== 'total').map((instance, idx) => {
const latestValues = _.last(instance.values);
const size = diskSizeStat.length ? Number(diskSizeStat[idx].value[1]) : 0;
let size = 0;
if (diskSizeStat[idx]) {
size = Number(diskSizeStat[idx].value[1]);
}
const name = instance.metric.instance;
return {
size,
Expand Down
1 change: 1 addition & 0 deletions scripts/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ mv $DASHBOARD/vendors/gateway.conf $TARGET_GATEWAY/conf/app.conf
mv $GATEWAY/nebula-httpd $TARGET_GATEWAY/

### nebula-stat-exporter build ###
chmod 755 $DASHBOARD/vendors/nebula-stats-exporter/nebula-stats-exporter
mv $DASHBOARD/vendors/nebula-stats-exporter/ $TARGET/

### node-exporter
Expand Down
Empty file modified vendors/nebula-stats-exporter/nebula-stats-exporter
100644 → 100755
Empty file.

0 comments on commit 267b4ba

Please sign in to comment.