|
@@ -4,8 +4,7 @@
|
|
<meta charset="utf-8">
|
|
<meta charset="utf-8">
|
|
<title>Vue.js markdown editor example</title>
|
|
<title>Vue.js markdown editor example</title>
|
|
<link rel="stylesheet" href="css/style.css">
|
|
<link rel="stylesheet" href="css/style.css">
|
|
- <script src="https://unpkg.com/lodash@4.16.0"></script>
|
|
+ <script src="js/moment.js"></script>
|
|
-
|
|
|
|
<script src="js/vue.js"></script>
|
|
<script src="js/vue.js"></script>
|
|
</head>
|
|
</head>
|
|
<body>
|
|
<body>
|
|
@@ -17,7 +16,7 @@
|
|
|
|
|
|
<ul id="loglist">
|
|
<ul id="loglist">
|
|
<li v-for="(item, index) in log.slice().reverse()">
|
|
<li v-for="(item, index) in log.slice().reverse()">
|
|
- {{ index }} - {{ item.entry.message }}
|
|
+ {{ index }} - {{ item.entry.message }} - {{ ts2txt(item.ts) }}
|
|
</li>
|
|
</li>
|
|
</ul>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
@@ -46,6 +45,9 @@
|
|
return response;
|
|
return response;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ ts2txt: function (ts) {
|
|
|
|
+ return moment(ts).format('YYYY-MM-DD [at] hh:mm')
|
|
|
|
+ },
|
|
update: function (event) {
|
|
update: function (event) {
|
|
fetch('/log/'+this.lastID, {method: "GET"})
|
|
fetch('/log/'+this.lastID, {method: "GET"})
|
|
.then((response) => {
|
|
.then((response) => {
|