-
-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7b88fd4
commit 5eaed9f
Showing
2 changed files
with
67 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,37 @@ | ||
<div>Some data here</div> | ||
<script lang="ts"> | ||
import { useNuiEvent } from '../../utils/useNuiEvent'; | ||
import { debugData } from '../../utils/debugData'; | ||
debugData([ | ||
{ | ||
action: 'init', | ||
data: { | ||
resources: ['ox_inventory', 'luke_garages', 'npwd'], | ||
totalQueries: 350, | ||
totalTime: 75000, | ||
}, | ||
}, | ||
]); | ||
interface QueryData { | ||
date: number; | ||
query: string; | ||
executionTime: number; | ||
} | ||
type QueryLog = Record<string, QueryData[]>; | ||
let initData: QueryLog; | ||
useNuiEvent('init', (data: QueryLog) => { | ||
initData = data; | ||
}); | ||
</script> | ||
|
||
<div> | ||
{#if initData} | ||
<div>Resources: {initData.resources}</div> | ||
<div>Total queries: {initData.totalQueries}</div> | ||
<div>Total time: {initData.totalTime}</div> | ||
{/if} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters