misp-modules/website/app/templates/history.html

51 lines
1.1 KiB
HTML

<!--
Author: David Cruciani
-->
{% extends 'base.html' %}
{% block content %}
<h1 id="top">History</h1>
<hr>
<br>
<div v-if="history">
<template v-for="h, key in history">
<history_view :history="h" :key_loop="key" />
</template>
</div>
<span id="goTop">[<a href="#top">Go Back Top</a>]</span>
{% endblock %}
{% block script %}
<script type="module">
const { createApp, ref, onMounted, nextTick, defineComponent} = Vue
import {display_toast, message_list} from '/static/js/toaster.js'
import history_view from '/static/js/history_view.js'
createApp({
delimiters: ['[[', ']]'],
components: {
history_view
},
setup() {
const history = ref({})
async function get_history(){
let res = await fetch("/get_history")
let loc = await res.json()
history.value = loc
}
get_history()
return {
message_list,
history,
}
}
}).mount('.container')
</script>
{% endblock %}