Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
FMS_Project_Frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bashar.hussein
FMS_Project_Frontend
Commits
5797df7b
Commit
5797df7b
authored
Aug 12, 2023
by
ReemyHasan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean 10
parent
d5f6f73e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
2 deletions
+5
-2
card-lineChart.tsx
packages/admin/src/features/dashboard/card-lineChart.tsx
+2
-1
index.tsx
packages/admin/src/features/dashboard/index.tsx
+1
-1
columns.tsx
packages/admin/src/features/show-traps/columns.tsx
+2
-0
No files found.
packages/admin/src/features/dashboard/card-lineChart.tsx
View file @
5797df7b
...
...
@@ -4,6 +4,7 @@ import { useCookies } from "react-cookie";
import
{
getSeverityStatistics
}
from
"../../services/traps-service"
;
import
useTranslation
from
"next-translate/useTranslation"
;
import
{
TranslationFiles
}
from
"@/src/data/core"
;
import
MainUtils
from
"@/src/utils/main"
;
export
default
function
CardLineChart
()
{
const
{
t
}
=
useTranslation
(
TranslationFiles
.
COMMON
);
...
...
@@ -32,7 +33,7 @@ export default function CardLineChart() {
window
.
myLine
.
destroy
();
}
// Check if data has been fetched and is not an empty object
if
(
Object
.
keys
(
data
).
length
>
0
)
{
if
(
!
MainUtils
.
isEmptyValue
(
data
)
)
{
const
labels
=
Object
.
keys
(
data
).
sort
();
// Use the sorted timestamps as labels
const
datasets
=
Object
.
keys
(
severityColors
).
map
((
severity
)
=>
({
...
...
packages/admin/src/features/dashboard/index.tsx
View file @
5797df7b
...
...
@@ -82,7 +82,7 @@ const DashboardComponent = () => {
statSubtitle=
{
t
(
"traps"
)
}
statTitle=
{
trapCount
!==
undefined
?
trapCount
:
"..."
}
statArrow=
"up"
statPercent=
{
`${(errorTrapCount/(trapCount+errorTrapCount))}`
}
statPercent=
{
trapCount
!==
undefined
?
`${(errorTrapCount/(trapCount+errorTrapCount))}`
:
"..."
}
statPercentColor=
"text-red-500"
statDescripiron=
{
t
(
"error-traps"
)
}
statIconName=
"traps"
...
...
packages/admin/src/features/show-traps/columns.tsx
View file @
5797df7b
...
...
@@ -193,6 +193,8 @@ export function getColumns(setModalProps:any) {
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
FmsButton
type=
"primary"
size=
"middle"
borderRadius=
{
8
}
onClick=
{
()
=>
setModalProps
({
isOpen
:
true
,
variableBinding
:
record
.
variableBindings
})
}
>
{
t
(
"show-details"
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment