Skip to content
Draft
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
30 changes: 29 additions & 1 deletion common/src/models/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ pub struct ProjectResponse {
/// Team project belongs to
pub team_id: Option<String>,
pub created_at: DateTime<Utc>,
pub compute_type: Option<ComputeType>,
pub compute_tier: Option<ComputeTier>,
/// State of the current deployment if one exists (something has been deployed).
/// State of the current deployment if one exists (something has been deployed)
pub deployment_state: Option<DeploymentState>,
/// URIs where running deployments can be reached
pub uris: Vec<String>,
Expand All @@ -47,6 +48,22 @@ impl ProjectResponse {
self.team_id.as_deref().unwrap_or("N/A")
)
.unwrap();
writeln!(
&mut s,
" Compute type: {}",
self.compute_type
.map(|c| c.to_string())
.unwrap_or("N/A".to_owned())
)
.unwrap();
writeln!(
&mut s,
" Compute tier: {}",
self.compute_tier
.map(|c| c.to_string())
.unwrap_or("N/A".to_owned())
)
.unwrap();
writeln!(
&mut s,
" Created: {}",
Expand Down Expand Up @@ -83,6 +100,8 @@ pub struct ProjectUpdateRequest {
pub remove_from_team: Option<bool>,
/// Change compute tier
pub compute_tier: Option<ComputeTier>,
/// Change compute type
pub compute_type: Option<ComputeType>,
}

#[derive(
Expand All @@ -100,3 +119,12 @@ pub enum ComputeTier {
XL,
XXL,
}

#[derive(Debug, Clone, Copy, PartialEq, Eq, Display, Serialize, Deserialize, EnumString)]
#[serde(rename_all = "lowercase")]
#[strum(serialize_all = "lowercase")]
#[typeshare::typeshare]
pub enum ComputeType {
Fargate,
FargateSpot,
}
10 changes: 9 additions & 1 deletion common/types.ts

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