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

fix: link to segment and identity override #5067

Merged
merged 2 commits into from
Feb 10, 2025
Merged
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
29 changes: 24 additions & 5 deletions frontend/web/components/FeatureRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ import { getTags } from 'common/services/useTag'
import { getStore } from 'common/store'

export const width = [200, 70, 55, 70, 450]

export const TABS = {
ANALYTICS: 'analytics',
HISTORY: 'history',
IDENTITY_OVERRIDES: 'identity-overrides',
LINKS: 'links',
SEGMENT_OVERRIDES: 'segment-overrides',
SETTINGS: 'settings',
VALUE: 'value',
}

class TheComponent extends Component {
static contextTypes = {
router: propTypes.object.isRequired,
Expand Down Expand Up @@ -238,7 +249,7 @@ class TheComponent extends Component {
this.editFeature(
projectFlag,
environmentFlags[id],
'segment-overrides',
TABS.SEGMENT_OVERRIDES,
)
}}
count={projectFlag.num_segment_overrides}
Expand All @@ -249,7 +260,7 @@ class TheComponent extends Component {
this.editFeature(
projectFlag,
environmentFlags[id],
'identity-overrides',
TABS.IDENTITY_OVERRIDES,
)
}}
count={projectFlag.num_identity_overrides}
Expand Down Expand Up @@ -310,14 +321,22 @@ class TheComponent extends Component {
<SegmentOverridesIcon
onClick={(e) => {
e.stopPropagation()
this.editFeature(projectFlag, environmentFlags[id], 1)
this.editFeature(
projectFlag,
environmentFlags[id],
TABS.SEGMENT_OVERRIDES,
)
}}
count={projectFlag.num_segment_overrides}
/>
<IdentityOverridesIcon
onClick={(e) => {
e.stopPropagation()
this.editFeature(projectFlag, environmentFlags[id], 1)
this.editFeature(
projectFlag,
environmentFlags[id],
TABS.IDENTITY_OVERRIDES,
)
}}
count={projectFlag.num_identity_overrides}
showPlusIndicator={showPlusIndicator}
Expand Down Expand Up @@ -416,7 +435,7 @@ class TheComponent extends Component {
hideHistory={!environment?.use_v2_feature_versioning}
onShowHistory={() => {
if (disableControls) return
this.editFeature(projectFlag, environmentFlags[id], 'history')
this.editFeature(projectFlag, environmentFlags[id], TABS.HISTORY)
}}
onShowAudit={() => {
if (disableControls) return
Expand Down
Loading