jina-ai / dashboard

Interactive UI for analyzing Jina logs, designing Flows and viewing Hub images
https://dashboard.jina.ai
Apache License 2.0
118 stars 61 forks source link

Adding a new workspace adds a new Flow as well #303

Closed aga11313 closed 3 years ago

aga11313 commented 3 years ago

Describe the bug

Clicking on the button to add a new Workspace also creates a new Custom Flow within that workspace.

Have you solved it? If so, let us know how!


Environment

Screenshots and logs

addworkspace

franquil commented 3 years ago

What's the expected behaviour? Shall a new 'custom flow' created at the Wordspace that just being created instead of the one that currently selected? @aga11313

aga11313 commented 3 years ago

Expected behavior: @franquil

  1. New workspace button only adds a new Workspace (currently this button adds both a new Workspace and a new Flow) image

  2. New Flow button only adds a new Flow image

franquil commented 3 years ago

@aga11313 So the new created Workspace will be empty? Looks like the code deliberately created a default 'custom flow' when creating a workspace, however, it failed to set selectedWorkspaceId attribute which leads to the new 'custom flow' being created at the wrong workspace.

aga11313 commented 3 years ago

Yeah you are correct, there should be a new Flow created but currently that is happening in the wrong workspace. Each new workspace should have a default Flow created inside it.

franquil commented 3 years ago

@aga11313 Another thing I wonder is that the newly created workspace shall be selected after creating, or the one that being working on shall be selected. Looks like the former is expected behaviour? I suppose I can sort the issue out.

aga11313 commented 3 years ago

The new workspace should be selected

franquil commented 3 years ago

Looks like PR #304 fixed this issue.