diff --git a/broker/src/StreamLoopController.ts b/broker/src/StreamLoopController.ts index 5b3a04d..8110abd 100644 --- a/broker/src/StreamLoopController.ts +++ b/broker/src/StreamLoopController.ts @@ -22,7 +22,7 @@ export async function startStreamLoop() { delay: { base: 100, empty: 5000 }, readBlock: 2500 }, processStreamEvent); - + } @@ -97,6 +97,11 @@ async function process_keep_alive(data: Record, sessionHash: str const { pid, instant, flowHash } = data; + const existingSession = await SessionModel.findOne({ project_id: pid }, { _id: 1 }); + if (!existingSession) { + await ProjectCountModel.updateOne({ project_id: pid }, { $inc: { 'sessions': 1 } }, { upsert: true }); + } + if (instant == "true") { await SessionModel.updateOne({ project_id: pid, session: sessionHash, }, { $inc: { duration: 0 }, diff --git a/dashboard/app.vue b/dashboard/app.vue index ed99862..e4fce55 100644 --- a/dashboard/app.vue +++ b/dashboard/app.vue @@ -6,15 +6,37 @@ Lit.init('6643cd08a1854e3b81722ab5'); const debugMode = process.dev; -const { showDialog, closeDialog, dialogComponent, dialogParams } = useCustomDialog(); +const { alerts, closeAlert } = useAlert(); + +const { showDialog, closeDialog, dialogComponent, dialogParams, dialogStyle, dialogClosable } = useCustomDialog(); + diff --git a/dashboard/components/AdvancedLineChart.vue b/dashboard/components/AdvancedLineChart.vue index 00c9c8d..070ac00 100644 --- a/dashboard/components/AdvancedLineChart.vue +++ b/dashboard/components/AdvancedLineChart.vue @@ -80,6 +80,7 @@ const { lineChartProps, lineChartRef } = useLineChart({ chartData: chartData, op onMounted(async () => { + const c = document.createElement('canvas'); const ctx = c.getContext("2d"); let gradient: any = `${props.color}22`; @@ -95,7 +96,6 @@ onMounted(async () => { chartData.value.datasets[0].backgroundColor = [gradient]; watch(props, () => { - console.log('UPDATE') chartData.value.labels = props.labels; chartData.value.datasets[0].data = props.data; }); @@ -106,5 +106,5 @@ onMounted(async () => { diff --git a/dashboard/components/CVerticalNavigation.vue b/dashboard/components/CVerticalNavigation.vue index d001495..5cbfe1c 100644 --- a/dashboard/components/CVerticalNavigation.vue +++ b/dashboard/components/CVerticalNavigation.vue @@ -1,5 +1,7 @@