tweaking ui

This commit is contained in:
chrislusf
2015-03-22 12:50:04 -07:00
parent 23012deccf
commit 78bc7b393f
9 changed files with 93 additions and 13 deletions

View File

@@ -243,7 +243,8 @@ func (s *Store) Status() []*VolumeInfo {
FileCount: v.nm.FileCount(),
DeleteCount: v.nm.DeletedCount(),
DeletedByteCount: v.nm.DeletedSize(),
ReadOnly: v.readOnly}
ReadOnly: v.readOnly,
Ttl: v.Ttl}
stats = append(stats, s)
}
}

View File

@@ -60,19 +60,19 @@ func LoadTTLFromUint32(ttl uint32) (t *TTL) {
}
// save stored bytes to an output with 2 bytes
func (t TTL) ToBytes(output []byte) {
func (t *TTL) ToBytes(output []byte) {
output[0] = t.count
output[1] = t.unit
}
func (t TTL) ToUint32() (output uint32) {
func (t *TTL) ToUint32() (output uint32) {
output = uint32(t.count) << 8
output += uint32(t.unit)
return output
}
func (t TTL) String() string {
if t.count == 0 {
func (t *TTL) String() string {
if t == nil || t.count == 0 {
return ""
}
if t.unit == Empty {