Implemented admin pane + user permission
This commit is contained in:
@@ -22,6 +22,8 @@ type InterfaceMeta struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Version int `json:"version"`
|
||||
// Kind is "plot" for split-layout plot panels, empty for free-form panels.
|
||||
Kind string `json:"kind,omitempty"`
|
||||
}
|
||||
|
||||
// VersionMeta describes a single persisted revision of an interface.
|
||||
@@ -134,6 +136,7 @@ type rootAttrs struct {
|
||||
Name string `xml:"name,attr"`
|
||||
Version int `xml:"version,attr"`
|
||||
Tag string `xml:"tag,attr"`
|
||||
Kind string `xml:"kind,attr"`
|
||||
}
|
||||
|
||||
func (s *Store) readMeta(id string) (InterfaceMeta, error) {
|
||||
@@ -145,7 +148,7 @@ func (s *Store) readMeta(id string) (InterfaceMeta, error) {
|
||||
if err := xml.Unmarshal(data, &root); err != nil {
|
||||
return InterfaceMeta{}, err
|
||||
}
|
||||
return InterfaceMeta{ID: id, Name: root.Name, Version: root.Version}, nil
|
||||
return InterfaceMeta{ID: id, Name: root.Name, Version: root.Version, Kind: root.Kind}, nil
|
||||
}
|
||||
|
||||
// Get returns the raw XML bytes for the interface with the given ID.
|
||||
|
||||
Reference in New Issue
Block a user