starsz commented on a change in pull request #1430:
URL: https://github.com/apache/apisix-dashboard/pull/1430#discussion_r570707626
##########
File path: api/internal/handler/tool/tool.go
##########
@@ -17,28 +17,48 @@
package tool
import (
+ "net/http"
+
"github.com/gin-gonic/gin"
"github.com/shiningrush/droplet"
+ "github.com/shiningrush/droplet/data"
wgin "github.com/shiningrush/droplet/wrapper/gin"
+ "github.com/apisix/manager-api/internal/core/entity"
+ "github.com/apisix/manager-api/internal/core/store"
"github.com/apisix/manager-api/internal/handler"
"github.com/apisix/manager-api/internal/utils"
)
type Handler struct {
+ serverInfoStore store.Interface
}
type InfoOutput struct {
Hash string `json:"commit_hash"`
Version string `json:"version"`
}
+type nodes struct {
+ Hostname string `json:"hostname"`
+ Version string `json:"version"`
+}
+
+type VersionMatchOutput struct {
+ Matched bool `json:"matched"`
+ DashboardVersion string `json:"dashboard_version"`
+ NotMatchedNodes []nodes `json:"not_matched_nodes"`
Review comment:
Good idea.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]