hasura / hasura/graphql-engine
console: event triggers with same name under different db's work unexpectedly
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### Version Information
Server Version: [v2.8.0-beta.1](https://hub.docker.com/layers/graphql-engine/hasura/graphql-engine/v2.8.0-beta.1/images/sha256-6dea23cb9ed6dac9ac7aac9db9a2a33d2e041ddc3bc8c11b035043dd452f675b?context=explore)
### Environment
OSS
### What is the expected behaviour?
If i create 2 different triggers under **2 different db's** with same name, they should work properly
### Keywords
event-triggers
### What is the current behaviour?
Both events with same name are highlighted when clicking on the link in sidebar, and only first event's info is shown, can't see the second event.
### How to reproduce the issue?
1. Add 2 postgres db's.
2. Go to events tab.
3. Create 2 different events under both db's with same name.
4. Both events are highlighted when clicking on the link in sidebar, and only first event's info is shown, can't see the second event.

### Any possible solutions?
We could prefix trigger name with db name like so `data/dbName/triggerName/modify` but requires quite a few changes as we use a lot of common components to render sidebar, which [builds the links from the displayed names](https://github.com/hasura/graphql-engine/blob/master/console/src/components/Common/Layout/LeftSubSidebar/TreeView.tsx#L47), we need to make it accept some prefix, while still keeping it generic and making sure other places are unaffected.
Contributor guide
Assessment
This issue has not been assessed yet.