Skip to content

Commit

Permalink
[ui] add event view, use old log view for logs. events == db events a…
Browse files Browse the repository at this point in the history
…nd logs
  • Loading branch information
lts-po authored and lts-rad committed Jun 28, 2023
1 parent 53fe63c commit 86bf61d
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/Logs/LogListDb.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ const LogList = (props) => {
return (
<View h={h} display="flex">
<HStack space={2} p={4} alignItems={'flex-end'}>
<Heading fontSize="lg">Logs: {niceTopic(getCurrentBucket())}</Heading>
<Heading fontSize="lg">Events: {niceTopic(getCurrentBucket())}</Heading>
<Text color="muted.500" mt="auto" display={total ? 'flex' : 'none'}>
{/*page={page}/{Math.ceil(total / perPage)}, total = {total}*/}
{total} items
Expand Down
9 changes: 9 additions & 0 deletions frontend/src/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import Firewall from 'views/Firewall'
import PFW from 'views/Pfw'
import Mesh from 'views/Mesh'
import Logs from 'views/Logs'
import Events from 'views/Events'
import Plugins from 'views/Plugins'
import AuthSettings from 'views/AuthSettings'
import SystemInfo from 'views/SystemInfo'
Expand All @@ -49,6 +50,7 @@ import {
faHome,
faLaptop,
faLineChart,
faList,
faListAlt,
faNetworkWired,
faObjectGroup,
Expand Down Expand Up @@ -270,6 +272,13 @@ const routes = [
component: Logs,
layout: 'admin'
},
{
path: 'events',
name: 'Events',
icon: faList,
component: Events,
layout: 'admin'
},
{
path: 'auth/',
name: 'Auth',
Expand Down
15 changes: 15 additions & 0 deletions frontend/src/views/Events.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React, { useContext, useEffect, useState } from 'react'
import { useParams } from 'react-router-dom'
import { View } from 'native-base'

import LogListDb from 'components/Logs/LogListDb'

const Events = (props) => {
return (
<View>
<LogListDb />
</View>
)
}

export default Events
4 changes: 2 additions & 2 deletions frontend/src/views/Logs.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ const Logs = (props) => {

return (
<View>
{/*<LogList containers={containers} />*/}
<LogListDb />
<LogList containers={containers} />
{/*<LogListDb />*/}
</View>
)
}
Expand Down

0 comments on commit 86bf61d

Please sign in to comment.