Skip to content

Commit

Permalink
fix ns form
Browse files Browse the repository at this point in the history
  • Loading branch information
Son Roy Almerol committed Nov 8, 2024
1 parent d79f194 commit cff1ce0
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 11 deletions.
10 changes: 0 additions & 10 deletions internal/agent/serverlog/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,7 @@ type Logger struct {
Hostname string
}

type PingResponse struct {
Pong bool `json:"pong"`
}

func InitializeLogger() (*Logger, error) {
var pingResp PingResponse
err := agent.ProxmoxHTTPRequest(http.MethodGet, "/api2/json/ping", nil, &pingResp)
if err != nil {
return nil, fmt.Errorf("InitializeLogger: failed to ping server -> %w", err)
}

hostname, _ := os.Hostname()
return &Logger{Hostname: hostname}, nil
}
Expand Down
2 changes: 2 additions & 0 deletions internal/backend/mount/mount.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build linux

package mount

import (
Expand Down
2 changes: 2 additions & 0 deletions internal/backend/target/register_agent.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build linux

package target

import (
Expand Down
2 changes: 2 additions & 0 deletions internal/store/agent_ping.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build linux

package store

import (
Expand Down
4 changes: 3 additions & 1 deletion internal/store/db.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build linux

package store

import (
Expand Down Expand Up @@ -25,7 +27,7 @@ type Job struct {
Schedule string `db:"schedule" json:"schedule"`
Comment string `db:"comment" json:"comment"`
NotificationMode string `db:"notification_mode" json:"notification-mode"`
Namespace string `db:"namespace" json:"namespace"`
Namespace string `db:"namespace" json:"ns"`
NextRun *int64 `db:"next_run" json:"next-run"`
LastRunUpid *string `db:"last_run_upid" json:"last-run-upid"`
LastRunState *string `json:"last-run-state"`
Expand Down
2 changes: 2 additions & 0 deletions internal/store/http.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build linux

package store

import (
Expand Down
2 changes: 2 additions & 0 deletions internal/store/status.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build linux

package store

import (
Expand Down
2 changes: 2 additions & 0 deletions internal/store/systemd_time.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build linux

package store

import (
Expand Down
2 changes: 2 additions & 0 deletions internal/store/tasks.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build linux

package store

import (
Expand Down

0 comments on commit cff1ce0

Please sign in to comment.