You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use graphexp to visualize my JanusGraph database. It supports java.util.Date as vertex property type. But graphexp displays the value as unix timestamp (number). With a small hack, I was able to change infobox.js:
function _display_vertex_properties(key,value,info_table) {
if (typeof value === "string" && $('#communication_method').val() =="GraphSON3_4"){
var new_info_row = info_table.append("tr");
new_info_row.append("td").text(key).style("font-size",_font_size);
var formattedValue = value
if (key.includes("time")) {
formattedValue = new Date(parseInt(value)).toLocaleString("en-GB", {timeZone: "Region/City", timeZoneName: "short", hour12: false})
}
new_info_row.append("td").text(formattedValue).style("font-size",_font_size);
new_info_row.append("td").text('').style("font-size",_font_size);
}
This would parse the number to a date, each time the property key contains "time".
Anyone has a nice idea for a general, robust solution?
The text was updated successfully, but these errors were encountered:
I use graphexp to visualize my JanusGraph database. It supports
java.util.Date
as vertex property type. But graphexp displays the value as unix timestamp (number). With a small hack, I was able to changeinfobox.js
:This would parse the number to a date, each time the property key contains
"time"
.Anyone has a nice idea for a general, robust solution?
The text was updated successfully, but these errors were encountered: