Commit 9d9d2157 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Set and show "updated" timestamp.

parent 4f84041b
<?php
#
# Copyright (c) 2006-2015 University of Utah and the Flux Group.
# Copyright (c) 2006-2016 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -99,6 +99,7 @@ class Dataset
function type() { return $this->field("type"); }
function fstype() { return $this->field("fstype"); }
function created() { return NullDate($this->field("created")); }
function updated() { return NullDate($this->field("updated")); }
function expires() { return NullDate($this->field("expires")); }
function last_used() { return NullDate($this->field("last_used")); }
function state() { return $this->field("state"); }
......
......@@ -97,6 +97,8 @@ $fields["dataset_size"] = $dataset->size() ? $dataset->size() : "0";
$fields["dataset_fstype"] = ($dataset->fstype() ?
$dataset->fstype() : "none");
$fields["dataset_created"] = DateStringGMT($dataset->created());
$fields["dataset_updated"] = ($dataset->updated() ?
DateStringGMT($dataset->updated()) : "");
$fields["dataset_expires"] = ($dataset->expires() ?
DateStringGMT($dataset->expires()) : "");
$fields["dataset_lastused"] = ($dataset->last_used() ?
......
......@@ -46,7 +46,12 @@
<td>Created</td>
<td class='format-date'><%- formfields.dataset_created %></td>
</tr>
<% if (formfields.dataset_type != "imdataset") { %>
<% if (formfields.dataset_type == "imdataset") { %>
<tr>
<td>Updated</td>
<td class='format-date'><%- formfields.dataset_updated %></td>
</tr>
<% } else { %>
<tr>
<td>Expires</td>
<td class='format-date'><%- formfields.dataset_expires %></td>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment