aboutsummaryrefslogtreecommitdiff
path: root/pkg/bindings/system/system.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/bindings/system/system.go')
-rw-r--r--pkg/bindings/system/system.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/pkg/bindings/system/system.go b/pkg/bindings/system/system.go
index e995770ba..1203f5c3c 100644
--- a/pkg/bindings/system/system.go
+++ b/pkg/bindings/system/system.go
@@ -118,10 +118,10 @@ func Version(ctx context.Context) (*entities.SystemVersionReport, error) {
if err = response.Process(&component); err != nil {
return nil, err
}
- f, _ := strconv.ParseFloat(component.APIVersion, 64)
+
b, _ := time.Parse(time.RFC3339, component.BuildTime)
report.Server = &define.Version{
- APIVersion: int64(f),
+ APIVersion: component.APIVersion,
Version: component.Version.Version,
GoVersion: component.GoVersion,
GitCommit: component.GitCommit,
@@ -129,6 +129,12 @@ func Version(ctx context.Context) (*entities.SystemVersionReport, error) {
Built: b.Unix(),
OsArch: fmt.Sprintf("%s/%s", component.Os, component.Arch),
}
+
+ for _, c := range component.Components {
+ if c.Name == "Podman Engine" {
+ report.Server.APIVersion = c.Details["APIVersion"]
+ }
+ }
return &report, err
}