Skip to content

Commit

Permalink
Prune the spec as suggested in review
Browse files Browse the repository at this point in the history
  • Loading branch information
haasad committed Jan 13, 2025
1 parent f7ac183 commit 45211d5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
16 changes: 9 additions & 7 deletions component/notifications.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ local makeConsoleNotification(name, args) =
'appuio.io/notification': 'true',
},
},
spec: {
text: args.text,
location: std.get(args, 'location', 'BannerTop'),
color: std.get(args, 'color', '#fff'),
backgroundColor: std.get(args, 'backgroundColor', '#2596be'),
link: std.get(args, 'link'),
},
spec: std.prune(
{
text: args.text,
location: std.get(args, 'location', 'BannerTop'),
color: std.get(args, 'color', '#fff'),
backgroundColor: std.get(args, 'backgroundColor', '#2596be'),
link: std.get(args, 'link'),
},
),
};

local consoleNotifications = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,5 @@ metadata:
spec:
backgroundColor: '#2596be'
color: '#fff'
link: null
location: BannerTop
text: Standard Notification

0 comments on commit 45211d5

Please sign in to comment.