forked from jenkinsci/design-library-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.jelly
More file actions
96 lines (92 loc) · 3.97 KB
/
index.jelly
File metadata and controls
96 lines (92 loc) · 3.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:s="/lib/samples" xmlns:st="jelly:stapler">
<s:layout>
<s:section title="Default">
<s:group>
<s:preview>
<div class="jdl-notifications-group">
<div class="jenkins-notification">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<path
d="M256 56C145.72 56 56 145.72 56 256s89.72 200 200 200 200-89.72 200-200S366.28 56 256 56zm0 82a26 26 0 11-26 26 26 26 0 0126-26zm48 226h-88a16 16 0 010-32h28v-88h-16a16 16 0 010-32h32a16 16 0 0116 16v104h28a16 16 0 010 32z"
fill='currentColor'/>
</svg>
Default
</div>
</div>
</s:preview>
<s:code language="java"
code="notificationBar.show('Default')"
callback="showDefault"
executable="true"/>
</s:group>
</s:section>
<s:section title="Success">
<s:group>
<s:preview>
<div class="jdl-notifications-group">
<div class="jenkins-notification jenkins-notification--success">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<path
d="M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208 208-93.31 208-208S370.69 48 256 48zm108.25 138.29l-134.4 160a16 16 0 01-12 5.71h-.27a16 16 0 01-11.89-5.3l-57.6-64a16 16 0 1123.78-21.4l45.29 50.32 122.59-145.91a16 16 0 0124.5 20.58z"
fill='currentColor'/>
</svg>
Success
</div>
</div>
</s:preview>
<s:code language="java"
code="notificationBar.show('Success', notificationBar.SUCCESS)"
callback="showSuccess"
executable="true"/>
</s:group>
</s:section>
<s:section title="Warning">
<s:group>
<s:preview>
<div class="jdl-notifications-group">
<div class="jenkins-notification jenkins-notification--warning">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<path
d="M449.07 399.08L278.64 82.58c-12.08-22.44-44.26-22.44-56.35 0L51.87 399.08A32 32 0 0080 446.25h340.89a32 32 0 0028.18-47.17zm-198.6-1.83a20 20 0 1120-20 20 20 0 01-20 20zm21.72-201.15l-5.74 122a16 16 0 01-32 0l-5.74-121.95a21.73 21.73 0 0121.5-22.69h.21a21.74 21.74 0 0121.73 22.7z"
fill='currentColor'/>
</svg>
Warning
</div>
</div>
</s:preview>
<s:code language="java"
code="notificationBar.show('Warning', notificationBar.WARNING)"
callback="showWarning"
executable="true"/>
</s:group>
</s:section>
<s:section title="Error">
<s:group>
<s:preview>
<div class="jdl-notifications-group">
<div class="jenkins-notification jenkins-notification--error">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<path
d="M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208 208-93.31 208-208S370.69 48 256 48zm0 319.91a20 20 0 1120-20 20 20 0 01-20 20zm21.72-201.15l-5.74 122a16 16 0 01-32 0l-5.74-121.94v-.05a21.74 21.74 0 1143.44 0z"
fill='currentColor'/>
</svg>
Error
</div>
</div>
</s:preview>
<s:code language="java"
code="notificationBar.show('Error', notificationBar.ERROR)"
callback="showError"
executable="true"/>
</s:group>
</s:section>
<s:section title="Closing notifications" description="${%usage.2}">
<s:code language="java"
code="notificationBar.hide()"
callback="hideNotification"
executable="true"/>
</s:section>
</s:layout>
<st:adjunct includes="io.jenkins.plugins.designlibrary.Notifications.adjunct" />
</j:jelly>