ntopng/httpdocs/templates/pages/components/historical_interface.template

37 lines
No EOL
777 B
Text

<div id="vue-app">
<page-stats :csrf="csrf" :enable_snapshots="is_ntop_enterprise_m">
</page-stats>
</div>
<script type="application/javascript">
let pageCsrf = "{{ ntop.getRandomCSRFValue() }}";
function start_vue() {
let is_ntop_enterprise_m = '{* ntop.isEnterpriseM() *}' == 'true';
let vue_options = {
components: {
'page-stats': ntopVue.PageStats,
},
/**
* First method called when the component is created.
*/
created() {},
mounted() {},
data() {
return {
csrf: pageCsrf,
is_ntop_enterprise_m,
};
},
methods: {},
};
const _vue = ntopVue.Vue.createApp(vue_options);
const vue_app = _vue.mount("#vue-app");
return vue_app;
}
$(document).ready(async function(){
start_vue();
});
</script>