dev: automated commit - 2025-10-21 09:19:45
This commit is contained in:
parent
e7f0b5feec
commit
aa0e46a87d
3 changed files with 32 additions and 22 deletions
1
.gitattributes
vendored
1
.gitattributes
vendored
|
|
@ -6,6 +6,7 @@ zsh/.config/zsh/zsh_history* filter=git-crypt diff=git-crypt
|
|||
config/.config/sdm-ui.yaml filter=git-crypt diff=git-crypt
|
||||
config/.config/ngrok/ngrok.yml filter=git-crypt diff=git-crypt
|
||||
aws/.aws/config filter=git-crypt diff=git-crypt
|
||||
rbw/.config/rbw/config.json filter=git-crypt diff=git-crypt
|
||||
|
||||
# Add any new paths for sensitive files in your new modules
|
||||
# For example, if you have API tokens in new locations:
|
||||
|
|
|
|||
|
|
@ -108,17 +108,23 @@ def group_connections(connections):
|
|||
groups = defaultdict(list)
|
||||
|
||||
for conn in connections:
|
||||
if conn['customer'] == 'internal':
|
||||
group_name = 'Internal'
|
||||
# Mirror DBeaver grouping: internal/features -> 'internal', otherwise by customer, else 'other'
|
||||
if conn['customer'] == 'internal' or conn['customer'].startswith('feature'):
|
||||
group_name = 'internal'
|
||||
elif conn['stage'] in ['stage', 'production']:
|
||||
group_name = conn['customer']
|
||||
else:
|
||||
group_name = 'other'
|
||||
|
||||
# Keep stage-based color coding
|
||||
if conn['stage'] == 'internal':
|
||||
conn_stage = 'internal'
|
||||
elif conn['stage'] in ['stage']:
|
||||
group_name = 'Stage'
|
||||
elif conn['stage'] == 'stage':
|
||||
conn_stage = 'stage'
|
||||
elif conn['stage'] in ['production']:
|
||||
group_name = 'Production'
|
||||
elif conn['stage'] == 'production':
|
||||
conn_stage = 'production'
|
||||
else:
|
||||
continue
|
||||
conn_stage = 'unknown'
|
||||
|
||||
conn_yaml = create_connection_yaml(
|
||||
conn['name'],
|
||||
|
|
@ -133,10 +139,13 @@ def group_connections(connections):
|
|||
|
||||
def generate_yaml_content(groups):
|
||||
yaml_lines = []
|
||||
group_order = ['Internal', 'Stage', 'Production']
|
||||
# Prefer 'internal' first, then alphabetical by customer
|
||||
ordered_groups = []
|
||||
if 'internal' in groups:
|
||||
ordered_groups.append('internal')
|
||||
ordered_groups.extend(sorted([g for g in groups.keys() if g != 'internal']))
|
||||
|
||||
for group_name in group_order:
|
||||
if group_name in groups:
|
||||
for group_name in ordered_groups:
|
||||
yaml_lines.append(f"- name: {group_name}")
|
||||
yaml_lines.append(" last_db: 0")
|
||||
yaml_lines.append(" type: group")
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue