add timestamp to json
This commit is contained in:
parent
534d2bd6c1
commit
0b0abf6801
@ -384,15 +384,17 @@ ClusteringDialog.prototype._export = function() {
|
|||||||
var clusters = this._getRestrictedClusters();
|
var clusters = this._getRestrictedClusters();
|
||||||
var projectName = theProject.metadata.name;
|
var projectName = theProject.metadata.name;
|
||||||
var columnName = this._columnName;
|
var columnName = this._columnName;
|
||||||
|
var timeStamp = (new Date()).toISOString();
|
||||||
var obj = {
|
var obj = {
|
||||||
'projectName': projectName,
|
'projectName': projectName,
|
||||||
'columnName': columnName,
|
'columnName': columnName,
|
||||||
|
'timeStamp': timeStamp,
|
||||||
'clusters': clusters,
|
'clusters': clusters,
|
||||||
};
|
};
|
||||||
var data = "text/json;charset=utf-8," + encodeURIComponent(JSON.stringify(obj));
|
var data = "text/json;charset=utf-8," + encodeURIComponent(JSON.stringify(obj));
|
||||||
var link=document.createElement('a');
|
var link=document.createElement('a');
|
||||||
link.href='data:' + data;
|
link.href='data:' + data;
|
||||||
link.download="clusters_" + projectName + "_" + columnName + "_" + (new Date()).toISOString() + ".json";
|
link.download="clusters_" + projectName + "_" + columnName + "_" + timeStamp + ".json";
|
||||||
link.click();
|
link.click();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user