-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🎨 publish port events to frontend (#6396)
Co-authored-by: Andrei Neagu <[email protected]>
- Loading branch information
Showing
26 changed files
with
866 additions
and
259 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
packages/models-library/src/models_library/api_schemas_dynamic_sidecar/ports.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
from enum import auto | ||
|
||
from models_library.projects import ProjectID | ||
from models_library.projects_nodes_io import NodeID | ||
from models_library.services_types import ServicePortKey | ||
from models_library.utils.enums import StrAutoEnum | ||
from pydantic import BaseModel | ||
|
||
|
||
class OutputStatus(StrAutoEnum): | ||
UPLOAD_STARTED = auto() | ||
UPLOAD_WAS_ABORTED = auto() | ||
UPLOAD_FINISHED_SUCCESSFULLY = auto() | ||
UPLOAD_FINISHED_WITH_ERRROR = auto() | ||
|
||
|
||
class InputStatus(StrAutoEnum): | ||
DOWNLOAD_STARTED = auto() | ||
DOWNLOAD_WAS_ABORTED = auto() | ||
DOWNLOAD_FINISHED_SUCCESSFULLY = auto() | ||
DOWNLOAD_FINISHED_WITH_ERRROR = auto() | ||
|
||
|
||
class _PortStatusCommon(BaseModel): | ||
project_id: ProjectID | ||
node_id: NodeID | ||
port_key: ServicePortKey | ||
|
||
|
||
class OutputPortStatus(_PortStatusCommon): | ||
status: OutputStatus | ||
|
||
|
||
class InputPortSatus(_PortStatusCommon): | ||
status: InputStatus |
2 changes: 2 additions & 0 deletions
2
packages/models-library/src/models_library/api_schemas_dynamic_sidecar/socketio.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
from typing import Final | ||
|
||
SOCKET_IO_SERVICE_DISK_USAGE_EVENT: Final[str] = "serviceDiskUsage" | ||
SOCKET_IO_STATE_OUTPUT_PORTS_EVENT: Final[str] = "stateOutputPorts" | ||
SOCKET_IO_STATE_INPUT_PORTS_EVENT: Final[str] = "stateInputPorts" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.