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

Set and show "updated" timestamp.

parent 4f84041b
<?php <?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 # {{{EMULAB-LICENSE
# #
...@@ -99,6 +99,7 @@ class Dataset ...@@ -99,6 +99,7 @@ class Dataset
function type() { return $this->field("type"); } function type() { return $this->field("type"); }
function fstype() { return $this->field("fstype"); } function fstype() { return $this->field("fstype"); }
function created() { return NullDate($this->field("created")); } function created() { return NullDate($this->field("created")); }
function updated() { return NullDate($this->field("updated")); }
function expires() { return NullDate($this->field("expires")); } function expires() { return NullDate($this->field("expires")); }
function last_used() { return NullDate($this->field("last_used")); } function last_used() { return NullDate($this->field("last_used")); }
function state() { return $this->field("state"); } function state() { return $this->field("state"); }
......
...@@ -97,6 +97,8 @@ $fields["dataset_size"] = $dataset->size() ? $dataset->size() : "0"; ...@@ -97,6 +97,8 @@ $fields["dataset_size"] = $dataset->size() ? $dataset->size() : "0";
$fields["dataset_fstype"] = ($dataset->fstype() ? $fields["dataset_fstype"] = ($dataset->fstype() ?
$dataset->fstype() : "none"); $dataset->fstype() : "none");
$fields["dataset_created"] = DateStringGMT($dataset->created()); $fields["dataset_created"] = DateStringGMT($dataset->created());
$fields["dataset_updated"] = ($dataset->updated() ?
DateStringGMT($dataset->updated()) : "");
$fields["dataset_expires"] = ($dataset->expires() ? $fields["dataset_expires"] = ($dataset->expires() ?
DateStringGMT($dataset->expires()) : ""); DateStringGMT($dataset->expires()) : "");
$fields["dataset_lastused"] = ($dataset->last_used() ? $fields["dataset_lastused"] = ($dataset->last_used() ?
......
...@@ -46,7 +46,12 @@ ...@@ -46,7 +46,12 @@
<td>Created</td> <td>Created</td>
<td class='format-date'><%- formfields.dataset_created %></td> <td class='format-date'><%- formfields.dataset_created %></td>
</tr> </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> <tr>
<td>Expires</td> <td>Expires</td>
<td class='format-date'><%- formfields.dataset_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