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

55 lines
1.4 KiB
Text

<div id="vue-app">
<page-stats
:csrf="csrf"
:source_value="source_value"
:source_sub_value="source_sub_value"
:is_ntop_pro="is_ntop_pro"
:enable_snapshots="is_ntop_enterprise_m"
:is_history_enabled="is_history_enabled"
:traffic_extraction_permitted="traffic_extraction_permitted">
</page-stats>
</div>
<script type="application/javascript">
let pageCsrf = "{{ ntop.getRandomCSRFValue() }}";
function start_vue() {
const is_ntop_pro = '{* ntop.isPro() *}' == 'true';
const is_ntop_enterprise_m = '{* ntop.isEnterpriseM() *}' == 'true';
const is_history_enabled = '{* ntop.isClickHouseEnabled() *}' == 'true';
const traffic_extraction_permitted = '{* traffic_extraction_permitted *}' == 'true';
const source_value = '{* source_value *}'
const source_sub_value = '{* source_sub_value *}'
const vue_options = {
components: {
'page-stats': ntopVue.PageStats,
},
/**
* First method called when the component is created.
*/
created() {},
mounted() {},
data() {
return {
csrf: pageCsrf,
source_value,
source_sub_value,
is_ntop_pro,
is_ntop_enterprise_m,
traffic_extraction_permitted,
is_history_enabled,
};
},
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>