Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Task Log dont refresh automatically when adding new one. #1977

Closed
torsolaso opened this issue Apr 15, 2021 · 11 comments
Closed

[Bug] Task Log dont refresh automatically when adding new one. #1977

torsolaso opened this issue Apr 15, 2021 · 11 comments
Assignees
Labels
bug TheHive4 TheHive4 related issues
Milestone

Comments

@torsolaso
Copy link

Request Type

Bug

Work Environment

Question Answer
TheHive version / git hash 4.1.3
DB Cassandra
Index ES

Problem Description

The UX when adding a task log inside a case is not good, because when you write some note you must change tab or refresh the browser.

Steps to Reproduce

  1. Create ORG A
  2. Create Case A
  3. Create Task A
  4. Click on "+Add new task log"
  5. Write something and click in "Add log" and repeat

Possible Solutions

Refresh task logs on add.

Complementary information

TaskLog2.mp4
@torsolaso torsolaso added TheHive4 TheHive4 related issues bug labels Apr 15, 2021
@nadouani nadouani self-assigned this Jun 7, 2021
@nadouani nadouani added this to the 4.1.6 milestone Jun 7, 2021
@nadouani
Copy link
Contributor

nadouani commented Jun 9, 2021

Hello @torsolaso could you please confirm this is still the case in 4.1.5?

@nadouani
Copy link
Contributor

@torsolaso Quick question: do you see a new an event popping in the right side live feed or not when you add a new task log?

@torsolaso
Copy link
Author

HI nadouni,

i tested it again on 4.1.4 (havent got 4.1.5 yet). On the right side (live feed) i can see new task log posted but the task log only refresh when you post second task log.

let me explain what i am seeing.

  1. Create Case
    image

  2. Create task
    image

I see the toast below "Task has been successfully added" and i can see it on the live feed but now shown. I refresh manually or change tab.
image

  1. Add new task log

image

I can see and it is shown.

  1. Add other new task log

image

I can see on live feed that new task log 2 is created but is not shown

  1. Add new task log

image

I can see previous tag log posted and on right (live feed) i can see "new task log 3"

i hope these screenshot will be useful

@nadouani
Copy link
Contributor

Ok, thanks for the feedback.

Can you see a call t the /api/query API after the task creation? This is supposed to be called when the UI receives an event from the stream. The same event is used to display the live feed update.

@nadouani
Copy link
Contributor

Are you using a single node or multi nodes TheHive instance?

@torsolaso
Copy link
Author

torsolaso commented Jun 14, 2021

Hi @nadouani when i write a task log i see following requests:

image

  • /api/v1/query?name=case-task-logs OUTPUT does not contains the object with "test3" comment that i can see on /api/case/task/~3083735176/log submit
[
    {
        "_id": "~2156773544",
        "_type": "Log",
        "_createdBy": "[email protected]",
        "_createdAt": 1623321719529,
        "message": "first",
        "date": 1623321719529,
        "owner": "[email protected]",
        "extraData": {
            "actionCount": 0
        }
    },
    {
        "_id": "~886972496",
        "_type": "Log",
        "_createdBy": "[email protected]",
        "_createdAt": 1623321701678,
        "message": "12",
        "date": 1623321701678,
        "owner": "[email protected]",
        "extraData": {
            "actionCount": 0
        }
    },
    {
        "_id": "~927547504",
        "_type": "Log",
        "_createdBy": "[email protected]",
        "_createdAt": 1623321696653,
        "message": "11",
        "date": 1623321696653,
        "owner": "[email protected]",
        "extraData": {
            "actionCount": 0
        }
    },
    {
        "_id": "~2633101328",
        "_type": "Log",
        "_createdBy": "[email protected]",
        "_createdAt": 1623321670794,
        "message": "3",
        "date": 1623321670794,
        "owner": "[email protected]",
        "extraData": {
            "actionCount": 0
        }
    },
    {
        "_id": "~927363232",
        "_type": "Log",
        "_createdBy": "[email protected]",
        "_createdAt": 1623321664902,
        "message": "2",
        "date": 1623321664902,
        "owner": "[email protected]",
        "extraData": {
            "actionCount": 0
        }
    },
    {
        "_id": "~2633089040",
        "_type": "Log",
        "_createdBy": "[email protected]",
        "_createdAt": 1623321661055,
        "message": "1",
        "date": 1623321661055,
        "owner": "[email protected]",
        "extraData": {
            "actionCount": 0
        }
    },
    {
        "_id": "~927355040",
        "_type": "Log",
        "_createdBy": "[email protected]",
        "_createdAt": 1623321635610,
        "message": "sdasdasd",
        "date": 1623321635610,
        "owner": "[email protected]",
        "extraData": {
            "actionCount": 0
        }
    },
    {
        "_id": "~764334184",
        "_type": "Log",
        "_createdBy": "[email protected]",
        "_createdAt": 1623321630769,
        "message": "new task log",
        "date": 1623321630769,
        "owner": "[email protected]",
        "extraData": {
            "actionCount": 0
        }
    },
    {
        "_id": "~886935632",
        "_type": "Log",
        "_createdBy": "[email protected]",
        "_createdAt": 1623321531281,
        "message": "asdsadasdasd",
        "date": 1623321531281,
        "owner": "[email protected]",
        "extraData": {
            "actionCount": 0
        }
    },
    {
        "_id": "~927477872",
        "_type": "Log",
        "_createdBy": "[email protected]",
        "_createdAt": 1623321526604,
        "message": "123123",
        "date": 1623321526604,
        "owner": "[email protected]",
        "extraData": {
            "actionCount": 0
        }
    }
]

@nadouani
Copy link
Contributor

Are you using a single node or multi nodes TheHive instance?

@torsolaso can you please tell us more about this?

@torsolaso
Copy link
Author

single node. Only 1 ES + 1 Cassandra + 1 TH

@nicpenning
Copy link

Setup for us:
1 TH + 1 Cassandra + Robust 4 Node Elasticsearch Cluster

@To-om
Copy link
Contributor

To-om commented Aug 23, 2021

Can you try to add the following settings in configuration:

db.janusgraph.index.search.elasticsearch.bulk-refresh=wait_for

@nicpenning
Copy link

@To-om Good news! Adding the configuration item has allowed the Task Log and Observables to be shown as soon as they are added!

To-om added a commit that referenced this issue Sep 3, 2021
@To-om To-om closed this as completed Sep 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug TheHive4 TheHive4 related issues
Projects
None yet
Development

No branches or pull requests

4 participants