Skip to content

Commit

Permalink
Small filter improvements (#138)
Browse files Browse the repository at this point in the history
Remove Unlabeled filter whenever adding another filter
Filter out backlog labeled items in all Workflow Contexts
Fixes to dev env / db restorer from updating CloudSQL proxy setup to match latest Google documentation
  • Loading branch information
wcjordan authored May 5, 2024
1 parent 241aa2b commit d8b1061
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions helm/templates/db-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ spec:
- name: cloud-sql-proxy
image: gcr.io/cloud-sql-connectors/cloud-sql-proxy:latest
args:
- "--exit-zero-on-sigterm"
- "--structured-logs"
- "--port=5432"
- {{ printf "%s:us-east4:%s" .Values.gcpProject (include "..dbInstanceName" .) | quote }}
Expand Down
4 changes: 2 additions & 2 deletions misc_containers/db_restorer/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ else
psql < ./backup_to_restore.sql
fi

# Kill cloud_sql_proxy so the job will complete
kill -INT $(pgrep cloud_sql_proxy)
# Kill cloud-sql-proxy so the job will complete
kill -SIGTERM -INT $(pgrep cloud-sql-proxy)
9 changes: 9 additions & 0 deletions ui/js/src/redux/workspaceSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,34 @@ export const workContexts: { [key: string]: WorkContext } = {
displayName: 'Urgent',
labels: {
urgent: FILTER_STATUS.Active,
backlog: FILTER_STATUS.Inverted,
},
},
quickFixes: {
displayName: 'Quick Fixes',
labels: {
'5 minutes': FILTER_STATUS.Active,
backlog: FILTER_STATUS.Inverted,
},
},
upNext: {
displayName: 'Up Next',
labels: {
backlog: FILTER_STATUS.Inverted,
'up next': FILTER_STATUS.Active,
},
},
work: {
displayName: 'Work',
labels: {
backlog: FILTER_STATUS.Inverted,
work: FILTER_STATUS.Active,
},
},
shopping: {
displayName: 'Shopping',
labels: {
backlog: FILTER_STATUS.Inverted,
Shopping: FILTER_STATUS.Active,
},
},
Expand Down Expand Up @@ -86,6 +91,10 @@ export default createSlice({
const newLabels = Object.assign({}, state.filterLabels);

const toggledLabel = action.payload;
if (toggledLabel !== 'Unlabeled') {
delete newLabels['Unlabeled'];
}

const prevStatus = newLabels[toggledLabel];
if (prevStatus === FILTER_STATUS.Active) {
// Invert existing item
Expand Down

0 comments on commit d8b1061

Please sign in to comment.