Преглед на файлове

fix: health does not report infinite array of strings, add build files to gitignore

master
Blaz Smehov преди 3 дни
родител
ревизия
c917ace01e
променени са 7 файла, в които са добавени 13 реда и са изтрити 6 реда
  1. +5
    -0
      .gitignore
  2. Двоични данни
      bridge
  3. Двоични данни
      decoder
  4. +2
    -1
      internal/pkg/common/appcontext/health.go
  5. +6
    -5
      internal/pkg/model/alerts.go
  6. Двоични данни
      location
  7. Двоични данни
      server

+ 5
- 0
.gitignore Целия файл

@@ -26,6 +26,11 @@ vendor/
volumes/node-red/
main

bridge
decoder
server
location

**/*.log

ROADMAP.md

Двоични данни
bridge Целия файл


Двоични данни
decoder Целия файл


+ 2
- 1
internal/pkg/common/appcontext/health.go Целия файл

@@ -9,7 +9,7 @@ import (

// ServiceStatus represents the health of an external service (e.g. Kafka, database).
type ServiceStatus struct {
Status string `json:"status"` // "up", "down", "unknown"
Status string `json:"status"` // "up", "down", "unknown"
Message string `json:"message,omitempty"`
}

@@ -56,6 +56,7 @@ func (b *BaseHealth) GetActiveWriters(m *kafkaclient.KafkaManager) {

func (b *BaseHealth) GetActiveBeacons(m *AppState) {
beacons := m.GetAllBeacons()
b.ActiveBeacons = []string{}
for beacon := range beacons {
b.ActiveBeacons = append(b.ActiveBeacons, beacon)
}


+ 6
- 5
internal/pkg/model/alerts.go Целия файл

@@ -3,9 +3,10 @@ package model
import "time"

type Alert struct {
ID string `json:"id" gorm:"primaryKey"`
TrackerID string `json:"tracker_id"`
Type string `json:"type"`
Status string `json:"status"`
Timestamp time.Time `json:"timestamp"`
ID string `json:"id" gorm:"primaryKey"`
TrackerID string `json:"tracker_id"`
Type string `json:"type"`
Status string `json:"status"`
Timestamp time.Time `json:"timestamp"`
ResolutionTimestamp time.Time `json:"resolution_timestamp"`
}

Двоични данни
location Целия файл


Двоични данни
server Целия файл


Зареждане…
Отказ
Запис