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

Enable slack notifications per entity #86

Merged

Conversation

renzodgc
Copy link
Collaborator

Move Slack Configuration from a global config to each area/camera

@@ -24,6 +24,7 @@ class NotificationConfig(SnakeModel):
violationThreshold: Optional[int] = Field(0, example=100)
notifyEveryMinutes: Optional[int] = Field(0, example=15)
emails: Optional[str] = Field("", example='john@email.com,doe@email.com')
enableSlackNotifications: Optional[str] = Field(False, example=False)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can declare it as a bool field.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it needs to be a string to be written in the config file

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 But the daily report is declared as bool and it works.
If we declare it as a string, the field definition should be Field("False", example="False")

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You were right :), I got mixed up

@renzodgc renzodgc force-pushed the EnableSlackNotificationsPerEntity branch from a3c0058 to 58572bc Compare November 23, 2020 13:31
@renzodgc renzodgc force-pushed the EnableSlackNotificationsPerEntity branch from 8d4cc5e to 404fa79 Compare November 23, 2020 14:21
@renzodgc renzodgc merged commit 9dada83 into galliot-us:master Nov 23, 2020
@renzodgc renzodgc deleted the EnableSlackNotificationsPerEntity branch November 23, 2020 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants