Skip to content

Commit

Permalink
Add the automations feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
pleek91 authored and collincchoy committed May 15, 2024
1 parent db2d318 commit 7d3daeb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ui/src/components/ContextSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
<p-context-nav-item v-if="!canSeeWorkPools" title="Work Queues" :to="routes.workQueues()" />
<p-context-nav-item title="Blocks" :to="routes.blocks()" />
<p-context-nav-item :title="localization.info.variables" :to="routes.variables()" />
<p-context-nav-item title="Automations" :to="routes.automations()" />
<template v-if="can.access.automations">
<p-context-nav-item title="Automations" :to="routes.automations()" />
</template>
<p-context-nav-item title="Notifications" :to="routes.notifications()" />
<p-context-nav-item title="Concurrency" :to="routes.concurrencyLimits()" />

Expand Down
2 changes: 2 additions & 0 deletions ui/src/maps/featureFlag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ export const mapFlagResponseToFeatureFlag: MapFunction<FlagResponse, FeatureFlag
return 'access:deploymentStatus'
case 'work_queue_status':
return 'access:workQueueStatus'
case 'automations':
return 'access:automations'
default:
// we want to have a ts error here but we don't want to break the app so returning null rather than throwing an error
// eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars
Expand Down
1 change: 1 addition & 0 deletions ui/src/types/flagResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ export type FlagResponse =
| 'artifacts'
| 'deployment_status'
| 'work_queue_status'
| 'automations'
1 change: 1 addition & 0 deletions ui/src/utilities/permissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const featureFlags = [
'access:deploymentStatus',
'access:workQueueStatus',
'access:flowRunInfraOverrides',
'access:automations',
] as const

export type FeatureFlag = typeof featureFlags[number] | WorkspaceFeatureFlag
Expand Down

0 comments on commit 7d3daeb

Please sign in to comment.