mirror of
https://github.com/minio/minio.git
synced 2026-06-13 19:00:52 -04:00
UI: implement rpc call to return UI version
This commit is contained in:
parent
4ef01bc225
commit
5e32dec4fb
2 changed files with 9 additions and 0 deletions
|
|
@ -36,6 +36,9 @@ type ServerInfoArgs struct{}
|
|||
// ListBucketsArgs - list bucket args.
|
||||
type ListBucketsArgs struct{}
|
||||
|
||||
// GenericArgs - empty struct
|
||||
type GenericArgs struct{}
|
||||
|
||||
// DiskInfoRep - disk info reply.
|
||||
type DiskInfoRep struct {
|
||||
DiskInfo disk.Info `json:"diskInfo"`
|
||||
|
|
|
|||
|
|
@ -51,6 +51,12 @@ func isAuthenticated(req *http.Request) bool {
|
|||
return tokenRequest.Valid
|
||||
}
|
||||
|
||||
// GetUIVersion - get UI version
|
||||
func (web WebAPI) GetUIVersion(r *http.Request, args *GenericArgs, reply *GenericRep) error {
|
||||
reply.UIVersion = uiVersion
|
||||
return nil
|
||||
}
|
||||
|
||||
// ServerInfo - get server info.
|
||||
func (web *WebAPI) ServerInfo(r *http.Request, args *ServerInfoArgs, reply *ServerInfoRep) error {
|
||||
if !isAuthenticated(r) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue