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

feat: Add preparation_state to feedback email #2079

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion backend/capellacollab/feedback/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,12 @@ class AnonymizedSession(core_pydantic.BaseModel):

version: tools_models.MinimalToolVersionWithTool

state: str = pydantic.Field(default="UNKNOWN")
preparation_state: sessions_models.SessionPreparationState = (
pydantic.Field(default=sessions_models.SessionPreparationState.UNKNOWN)
)
state: sessions_models.SessionState = pydantic.Field(
default=sessions_models.SessionState.UNKNOWN
)
warnings: list[core_models.Message] = pydantic.Field(default=[])

connection_method: (
Expand Down
2 changes: 1 addition & 1 deletion backend/tests/test_feedback.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def test_send_feedback_with_session(
"name": "6.1.0",
"tool": {"id": 1, "name": "Capella"},
},
"state": "Started",
"state": "Running",
"warnings": [],
"connection_method": {
"id": "xpra",
Expand Down
5 changes: 4 additions & 1 deletion frontend/src/app/openapi/model/anonymized-session.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 7 additions & 6 deletions frontend/src/app/sessions/session/session-viewer.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import { SafeResourceUrl } from '@angular/platform-browser';
import { Meta, moduleMetadata, StoryObj } from '@storybook/angular';
import { BehaviorSubject } from 'rxjs';
import { SessionPreparationState, SessionState } from 'src/app/openapi';
import {
SessionViewerService,
ViewerSession,
Expand Down Expand Up @@ -116,13 +117,13 @@ export const TwoSessionsTilingPending: Story = {
mockSessionServiceProvider([
{
...mockPersistentViewerSession,
preparation_state: 'Pending',
state: 'Pending',
preparation_state: SessionPreparationState.Pending,
state: SessionState.Pending,
},
{
...mockReadOnlyViewerSession,
preparation_state: 'Completed',
state: 'Failed',
preparation_state: SessionPreparationState.Completed,
state: SessionState.Failed,
},
]),
],
Expand All @@ -140,8 +141,8 @@ export const OneSessionTilingPending: Story = {
mockSessionServiceProvider([
{
...mockPersistentViewerSession,
preparation_state: 'Completed',
state: 'Pending',
preparation_state: SessionPreparationState.Completed,
state: SessionState.Pending,
},
]),
],
Expand Down
Loading