-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #212 from D10S0VSkY-OSS/feature/metadata_filters
🔥feat: Add filter and metadata vars
- Loading branch information
Showing
18 changed files
with
601 additions
and
66 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
from pydantic import BaseModel | ||
from typing import List | ||
|
||
|
||
class UserActivity(BaseModel): | ||
username: str | ||
deploy_count: int | ||
|
||
|
||
class ActionCount(BaseModel): | ||
action: str | ||
count: int | ||
|
||
|
||
class EnvironmentCount(BaseModel): | ||
environment: str | ||
count: int | ||
|
||
|
||
class StackUsage(BaseModel): | ||
stack_name: str | ||
count: int | ||
|
||
|
||
class MonthlyDeployCount(BaseModel): | ||
month: int | ||
count: int | ||
|
||
|
||
class SquadDeployCount(BaseModel): | ||
squad: str | ||
count: int | ||
|
||
|
||
class CloudProviderUsage(BaseModel): | ||
provider: str | ||
count: int | ||
|
||
|
||
class SquadEnvironmentUsage(BaseModel): | ||
squad: str | ||
environment: str | ||
count: int | ||
|
||
|
||
class AllMetricsResponse(BaseModel): | ||
user_activity: List[UserActivity] | ||
action_count: List[ActionCount] | ||
environment_count: List[EnvironmentCount] | ||
stack_usage: List[StackUsage] | ||
monthly_deploy_count: List[MonthlyDeployCount] | ||
squad_deploy_count: List[SquadDeployCount] | ||
cloud_provider_usage: List[CloudProviderUsage] | ||
squad_environment_usage: List[SquadEnvironmentUsage] |
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,40 @@ | ||
from pydantic import BaseModel | ||
from typing import Optional | ||
from datetime import datetime | ||
|
||
|
||
class DeployFilter(BaseModel): | ||
id: Optional[str] = None | ||
task_id: Optional[str] = None | ||
name: Optional[str] = None | ||
action: Optional[str] = None | ||
stack_name: Optional[str] = None | ||
stack_branch: Optional[str] = None | ||
user_id: Optional[int] = None | ||
username: Optional[str] = None | ||
squad: Optional[str] = None | ||
environment: Optional[str] = None | ||
tfvar_file: Optional[str] = None | ||
project_path: Optional[str] = None | ||
|
||
|
||
class DeployFilterResponse(BaseModel): | ||
id: int | ||
task_id: str | ||
name: str | ||
action: str | ||
start_time: Optional[str] | ||
destroy_time: Optional[str] | ||
stack_name: str | ||
stack_branch: str | ||
created_at: datetime | ||
updated_at: Optional[datetime] | ||
user_id: int | ||
username: str | ||
squad: str | ||
variables: dict | ||
environment: str | ||
tfvar_file: Optional[str] | ||
project_path: Optional[str] | ||
|
||
|
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.