-
Notifications
You must be signed in to change notification settings - Fork 299
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
Teams redesign #1528
Teams redesign #1528
Conversation
there are two bugs in search/filter right now
|
…l into iskhakov/teams-refactoring
…l into iskhakov/teams-refactoring
…l into iskhakov/teams-refactoring
@vadimkerr thank you for the thorough review
Maxim is catching up on that
Thank you for poitning the bug with General team, it is fixed |
@joeyorlando thank you for all the ideas you proposed, I implemented most of them already. The rest will go in the separate PR |
try: | ||
obj = organization.custom_buttons.get(public_primary_key=pk) | ||
obj = organization.custom_buttons.filter(*self.available_teams_lookup_args).get(public_primary_key=pk) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is used to show selected object in escalation step if this object belongs to other team (case when escalation chain was moved to another team). I don't think that we should filter by available teams here 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we will display this kind of schedules as "🔒private outgoing webhook"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it, good idea 👍
engine/apps/api/views/schedule.py
Outdated
@@ -219,6 +227,7 @@ def get_object_from_organization(self): | |||
organization = self.request.auth.organization | |||
queryset = organization.oncall_schedules.filter( | |||
public_primary_key=pk, | |||
*self.available_teams_lookup_args, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same case as with custom buttons. This method is used to show selected object in escalation step if this object belongs to other team (case when escalation chain was moved to another team). I don't think that we should filter by available teams here 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we will display this kind of schedules as "🔒private schedule"
@@ -708,20 +708,19 @@ class AlertRules extends React.Component<AlertRulesProps, AlertRulesState> { | |||
{channelFilterIds.length > 1 && <Text keyboard>ELSE</Text>} | |||
<Text>route to escalation chain:</Text> | |||
<WithPermissionControlTooltip userAction={UserActions.IntegrationsWrite}> | |||
<div onClick={(e) => e.stopPropagation()}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the removal of stopPropagation
? There's no comment indicating why we're doing that but I assume it's fix for a different scenario.
engine/apps/api/views/paging.py
Outdated
serializer.is_valid(raise_exception=True) | ||
|
||
users = [(user["instance"], user["important"]) for user in serializer.validated_data["users"]] | ||
schedules = [ | ||
(schedule["instance"], schedule["important"]) for schedule in serializer.validated_data["schedules"] | ||
] | ||
|
||
print(serializer.validated_data["team"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
print
statement can be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note we introduced an OutgoingWebhooks2 page for the new webhooks backend (that will eventually replace the original one), I guess we will need a similar update there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, good point
…l into iskhakov/teams-refactoring
public docs will go in the separate PR |
# What this PR does * api returns all the resources available to the user by default * substitutes `team switcher` with `multi-select team filter` * allow referencing between integrations - escalations chains - [schedules, outgoing webhooks] across teams https://user-images.githubusercontent.com/2262529/225634581-2d2e8af2-15ce-4c01-a90e-8267d98f5a23.mov ## Which issue(s) this PR fixes ## Checklist - [ ] Tests updated - [ ] Documentation added - [ ] `CHANGELOG.md` updated --------- Co-authored-by: Maxim <maxim.mordasov@grafana.com> Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
What this PR does
team switcher
withmulti-select team filter
Screen.Recording.2023-03-16.at.21.37.41.mov
Which issue(s) this PR fixes
Checklist
CHANGELOG.md
updated