Added support for nested snapshot elements
This commit is contained in:
parent
189aaeadb7
commit
e4424d5191
1 changed files with 11 additions and 2 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
<%
|
||||||
|
var reprValue = function(value) {
|
||||||
|
if (typeof(value) === 'string' || value instanceof String) {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
return JSON.stringify(value);
|
||||||
|
};
|
||||||
|
%>
|
||||||
|
|
||||||
<h1>History</h1>
|
<h1>History</h1>
|
||||||
<table class="history">
|
<table class="history">
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -45,13 +54,13 @@
|
||||||
<ul><!--
|
<ul><!--
|
||||||
--><% _.each(historyEntry.dataDifference['+'], function (difference) { %><!--
|
--><% _.each(historyEntry.dataDifference['+'], function (difference) { %><!--
|
||||||
--><li class="addition difference-<%= difference[0] %>"><!--
|
--><li class="addition difference-<%= difference[0] %>"><!--
|
||||||
--><%= difference[0] + ':' + difference[1] %><!--
|
--><%= difference[0] + ':' + reprValue(difference[1]) %><!--
|
||||||
--></li><!--
|
--></li><!--
|
||||||
--><% }) %><!--
|
--><% }) %><!--
|
||||||
|
|
||||||
--><% _.each(historyEntry.dataDifference['-'], function (difference) { %><!--
|
--><% _.each(historyEntry.dataDifference['-'], function (difference) { %><!--
|
||||||
--><li class="removal difference-<%= difference[0] %>"><!--
|
--><li class="removal difference-<%= difference[0] %>"><!--
|
||||||
--><%= difference[0] + ':' + difference[1] %><!--
|
--><%= difference[0] + ':' + reprValue(difference[1]) %><!--
|
||||||
--></li><!--
|
--></li><!--
|
||||||
--><% }) %><!--
|
--><% }) %><!--
|
||||||
--></ul>
|
--></ul>
|
||||||
|
|
Loading…
Reference in a new issue