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

51 lines
1.1 KiB
HTML
Raw Normal View History

2024-02-07 14:39:19 +01:00
<!--
Author: David Cruciani
-->
{% extends 'base.html' %}
{% block content %}
2024-02-08 11:30:55 +01:00
<h1 id="top">History</h1>
2024-02-07 14:39:19 +01:00
<hr>
<br>
<div v-if="history">
2024-02-07 15:53:43 +01:00
<template v-for="h, key in history">
2024-02-12 15:33:47 +01:00
<history_view :history="h" :key_loop="key" />
2024-02-07 15:53:43 +01:00
</template>
2024-02-07 14:39:19 +01:00
</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'
2024-02-12 15:33:47 +01:00
import history_view from '/static/js/history_view.js'
2024-02-07 14:39:19 +01:00
createApp({
delimiters: ['[[', ']]'],
2024-02-12 15:33:47 +01:00
components: {
history_view
},
2024-02-07 14:39:19 +01:00
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 %}