mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 14:50:55 +03:00
admin UI: allow to control columns visibility and ordering
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -67,6 +67,19 @@ func (v *BaseVirtualFolder) GetUsersAsString() string {
|
||||
return strings.Join(v.Users, ",")
|
||||
}
|
||||
|
||||
// GetGroupsAsString returns the list of groups as comma separated string
|
||||
func (v *BaseVirtualFolder) GetGroupsAsString() string {
|
||||
return strings.Join(v.Groups, ",")
|
||||
}
|
||||
|
||||
// GetLastQuotaUpdateAsString returns the last quota update as string
|
||||
func (v *BaseVirtualFolder) GetLastQuotaUpdateAsString() string {
|
||||
if v.LastQuotaUpdate > 0 {
|
||||
return util.GetTimeFromMsecSinceEpoch(v.LastQuotaUpdate).UTC().Format("2006-01-02 15:04:05Z")
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// GetQuotaSummary returns used quota and last update as string
|
||||
func (v *BaseVirtualFolder) GetQuotaSummary() string {
|
||||
var result string
|
||||
@@ -74,10 +87,6 @@ func (v *BaseVirtualFolder) GetQuotaSummary() string {
|
||||
if v.UsedQuotaSize > 0 {
|
||||
result += ". Size: " + util.ByteCountIEC(v.UsedQuotaSize)
|
||||
}
|
||||
if v.LastQuotaUpdate > 0 {
|
||||
t := util.GetTimeFromMsecSinceEpoch(v.LastQuotaUpdate)
|
||||
result += fmt.Sprintf(". Last update: %v ", t.Format("2006-01-02 15:04")) // YYYY-MM-DD HH:MM
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user