Skip to content

Commit

Permalink
fix problem with values column in LogViewer
Browse files Browse the repository at this point in the history
  • Loading branch information
pmayd committed Apr 22, 2024
1 parent b80ec41 commit 3745ad0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions tools/LogViewerA4D/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,13 @@ shinyServer(function(input, output, session) {
select(-"tracker_in_fileName")

values$eventLog <- values$eventLog %>%
mutate(Message = map(Message, ~ jsonlite::fromJSON(.) %>% lapply(.,function(x) if(is.null(x)) NA else x ) %>% as_tibble())) %>%
unnest(Message) %>% rename(Message=message) %>%
dplyr::filter(substr(Message, 1, 1) == "{") %>%
mutate(Message = map(Message, ~ jsonlite::fromJSON(.) %>% lapply(.,function(x) if(is.null(x)) NA else if (is.list(x)) toString(x) else x ) %>% as_tibble())) %>%
unnest(Message) %>%
rename(Message=message) %>%
ungroup() %>%
mutate(across(c("file","errorCode","warningCode","functionName"),factor))


values$proccessedFilesInfo <- allLogs %>%
filter(str_detect(pattern = "Found", Message)) %>%
extract(Message, into = c("number", "type"), regex = "Found (\\d+) (\\w+)") %>%
Expand Down
4 changes: 2 additions & 2 deletions tools/LogViewerA4D/ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ shinyUI(
tabName = "dashboard",
fluidRow(
box(
width = 6,
width = 8,
title = "Main Table",
DTOutput("logTable")
),
box(
width = 6,
width = 4,
title = "Tracker Overview",
DTOutput("trackerSummary"),
plotlyOutput("sankey")
Expand Down

0 comments on commit 3745ad0

Please sign in to comment.