Skip to content

Commit 45211d5

Browse files
committed
Prune the spec as suggested in review
1 parent f7ac183 commit 45211d5

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

component/notifications.libsonnet

+9-7
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@ local makeConsoleNotification(name, args) =
1818
'appuio.io/notification': 'true',
1919
},
2020
},
21-
spec: {
22-
text: args.text,
23-
location: std.get(args, 'location', 'BannerTop'),
24-
color: std.get(args, 'color', '#fff'),
25-
backgroundColor: std.get(args, 'backgroundColor', '#2596be'),
26-
link: std.get(args, 'link'),
27-
},
21+
spec: std.prune(
22+
{
23+
text: args.text,
24+
location: std.get(args, 'location', 'BannerTop'),
25+
color: std.get(args, 'color', '#fff'),
26+
backgroundColor: std.get(args, 'backgroundColor', '#2596be'),
27+
link: std.get(args, 'link'),
28+
},
29+
),
2830
};
2931

3032
local consoleNotifications = [

tests/golden/notifications/openshift4-console/openshift4-console/30_notifications.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,5 @@ metadata:
2626
spec:
2727
backgroundColor: '#2596be'
2828
color: '#fff'
29-
link: null
3029
location: BannerTop
3130
text: Standard Notification

0 commit comments

Comments
 (0)