From 7fbeff089404557128382c6b699f2ff55f887a82 Mon Sep 17 00:00:00 2001 From: Puneet Date: Tue, 20 Sep 2016 23:03:45 -0700 Subject: [PATCH] Added last Accessed Time column to dataset list --- .../sforce/dataset/server/DatasetUtilServer.java | 2 +- src/main/webapp/finder.html | 14 ++++++++++---- src/main/webapp/js/finder.js | 12 +++++++++--- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/sforce/dataset/server/DatasetUtilServer.java b/src/main/java/com/sforce/dataset/server/DatasetUtilServer.java index 13e403d..af9195c 100644 --- a/src/main/java/com/sforce/dataset/server/DatasetUtilServer.java +++ b/src/main/java/com/sforce/dataset/server/DatasetUtilServer.java @@ -92,7 +92,7 @@ public void init(String[] args, boolean join) throws Exception { server.start(); } catch (BindException e) { System.out.println("\n\t\t**************************************************"); - System.out.println("Cannot start Datsetutils,maybe datasetutils is already running"); + System.out.println("\tCannot start server. Maybe datasetUtils is already running"); System.out.println("\t\t**************************************************\n"); //e.printStackTrace(); throw e; diff --git a/src/main/webapp/finder.html b/src/main/webapp/finder.html index 5b6aceb..702d872 100644 --- a/src/main/webapp/finder.html +++ b/src/main/webapp/finder.html @@ -67,10 +67,16 @@
- -
+
+
+
+
+
@@ -82,8 +88,8 @@ App Modified By Modified Date - Status - Actions + Access Date + Actions diff --git a/src/main/webapp/js/finder.js b/src/main/webapp/js/finder.js index 01ddc3e..03413f0 100644 --- a/src/main/webapp/js/finder.js +++ b/src/main/webapp/js/finder.js @@ -11,6 +11,7 @@ $(document).ready(function() { function listDatasets(){ $.getJSON('list?type=datasetAndApps¤t=true',{},function(data){ if (typeof data !== 'undefined' && data.length > 0) { + $("#header-count").text('Dataset Count: '+data.length); printTable(data); }else { @@ -62,6 +63,13 @@ function deleteDataset(datasetAlias,datasetId){ buttonClass = buttonClass + " disabled"; } + var lastAccessed = "n/a"; + if(data[i]._lastAccessed>0) + { + lastAccessed = new Date(data[i]._lastAccessed).toLocaleString(); + } + + var tablerow = " \ "+data[i].name+" \ \ @@ -70,9 +78,7 @@ function deleteDataset(datasetAlias,datasetId){ "+data[i]._createdBy.name+" \ \ "+new Date(data[i].edgemartData._createdDateTime).toLocaleString()+" \ - \ - Current \ - \ + "+lastAccessed+" \ \
\