|
| 1 | +{%extends'@WebProfiler/Profiler/layout.html.twig' %} |
| 2 | + |
| 3 | +{%blocktoolbar %} |
| 4 | + {%setevents=collector.events %} |
| 5 | + |
| 6 | + {%ifevents.messages|length %} |
| 7 | + {%seticon %} |
| 8 | + {%include('@WebProfiler/Icon/mailer.svg') %} |
| 9 | + <spanclass="sf-toolbar-value">{{events.messages|length }}</span> |
| 10 | + {%endset %} |
| 11 | + |
| 12 | + {%settext %} |
| 13 | + <divclass="sf-toolbar-info-piece"> |
| 14 | + <b>Sent notifications</b> |
| 15 | + <spanclass="sf-toolbar-status">{{events.messages|length }}</span> |
| 16 | + </div> |
| 17 | + |
| 18 | + {%fortransportinevents.transports %} |
| 19 | + <divclass="sf-toolbar-info-piece"> |
| 20 | + <b>{{transport }}</b> |
| 21 | + <spanclass="sf-toolbar-status">{{ events.messages(transport)|length }}</span> |
| 22 | + </div> |
| 23 | + {%endfor %} |
| 24 | + {%endset %} |
| 25 | + |
| 26 | + {{include('@WebProfiler/Profiler/toolbar_item.html.twig', {'link':profiler_url }) }} |
| 27 | + {%endif %} |
| 28 | +{%endblock %} |
| 29 | + |
| 30 | +{%blockhead %} |
| 31 | + {{parent() }} |
| 32 | + <styletype="text/css"> |
| 33 | +/* utility classes*/ |
| 34 | +.m-t-0 {margin-top:0!important; } |
| 35 | +.m-t-10 {margin-top:10px!important; } |
| 36 | +
|
| 37 | +/* basic grid*/ |
| 38 | +.row { |
| 39 | +display:flex; |
| 40 | +flex-wrap:wrap; |
| 41 | +margin-right:-15px; |
| 42 | +margin-left:-15px; |
| 43 | + } |
| 44 | +.col { |
| 45 | +flex-basis:0; |
| 46 | +flex-grow:1; |
| 47 | +max-width:100%; |
| 48 | +position:relative; |
| 49 | +width:100%; |
| 50 | +min-height:1px; |
| 51 | +padding-right:15px; |
| 52 | +padding-left:15px; |
| 53 | + } |
| 54 | +.col-4 { |
| 55 | +flex:0033.333333%; |
| 56 | +max-width:33.333333%; |
| 57 | + } |
| 58 | +
|
| 59 | +/* small tabs*/ |
| 60 | +.sf-tabs-sm.tab-navigationli { |
| 61 | +font-size:14px; |
| 62 | +padding:.3em.5em; |
| 63 | + } |
| 64 | + </style> |
| 65 | +{%endblock %} |
| 66 | + |
| 67 | +{%blockmenu %} |
| 68 | + {%setevents=collector.events %} |
| 69 | + |
| 70 | + <spanclass="label {{events.messages|length?'':'disabled' }}"> |
| 71 | + <spanclass="icon">{{include('@WebProfiler/Icon/mailer.svg') }}</span> |
| 72 | + |
| 73 | + <strong>Notifications</strong> |
| 74 | + {%ifevents.messages|length>0 %} |
| 75 | + <spanclass="count"> |
| 76 | + <span>{{events.messages|length }}</span> |
| 77 | + </span> |
| 78 | + {%endif %} |
| 79 | + </span> |
| 80 | +{%endblock %} |
| 81 | + |
| 82 | +{%blockpanel %} |
| 83 | + {%setevents=collector.events %} |
| 84 | + |
| 85 | + <h2>Notifications</h2> |
| 86 | + |
| 87 | + {%ifnotevents.messages|length %} |
| 88 | + <divclass="empty"> |
| 89 | + <p>No notifications were sent.</p> |
| 90 | + </div> |
| 91 | + {%endif %} |
| 92 | + |
| 93 | + <divclass="metrics"> |
| 94 | + {%fortransportinevents.transports %} |
| 95 | + <divclass="metric"> |
| 96 | + <spanclass="value">{{ events.messages(transport)|length }}</span> |
| 97 | + <spanclass="label">{{transport }}</span> |
| 98 | + </div> |
| 99 | + {%endfor %} |
| 100 | + </div> |
| 101 | + |
| 102 | + {%fortransportinevents.transports %} |
| 103 | + <h3>{{transport }}</h3> |
| 104 | + |
| 105 | + <divclass="card-block"> |
| 106 | + <divclass="sf-tabs sf-tabs-sm"> |
| 107 | + {%foreventin events.events(transport) %} |
| 108 | + {%setmessage=event.message %} |
| 109 | + <divclass="tab"> |
| 110 | + <h3class="tab-title">Message #{{loop.index }} <small>({{ event.isQueued()?'queued':'sent' }})</small></h3> |
| 111 | + <divclass="tab-content"> |
| 112 | + <divclass="card"> |
| 113 | + <divclass="card-block"> |
| 114 | + <spanclass="label">Subject</span> |
| 115 | + <h2class="m-t-10">{{ message.getSubject() ??'(empty)' }}</h2> |
| 116 | + </div> |
| 117 | + {%ifmessage.getNotificationisdefined %} |
| 118 | + <divclass="card-block"> |
| 119 | + <divclass="row"> |
| 120 | + <divclass="col"> |
| 121 | + <spanclass="label">Content</span> |
| 122 | + <preclass="prewrap">{{ message.getNotification().getContent() ??'(empty)' }}</pre> |
| 123 | + <spanclass="label">Importance</span> |
| 124 | + <preclass="prewrap">{{ message.getNotification().getImportance() }}</pre> |
| 125 | + </div> |
| 126 | + </div> |
| 127 | + </div> |
| 128 | + {%endif %} |
| 129 | + <divclass="card-block"> |
| 130 | + <divclass="sf-tabs sf-tabs-sm"> |
| 131 | + {%ifmessage.getNotificationisdefined %} |
| 132 | + <divclass="tab"> |
| 133 | + <h3class="tab-title">Notification</h3> |
| 134 | + {%setnotification=event.message.getNotification() %} |
| 135 | + <divclass="tab-content"> |
| 136 | + <preclass="prewrap"style="max-height: 600px"> |
| 137 | + {{-'Subject:'~ notification.getSubject() }}<br/> |
| 138 | + {{-'Content:'~ notification.getContent() }}<br/> |
| 139 | + {{-'Importance:'~ notification.getImportance() }}<br/> |
| 140 | + {{-'Emoji:'~ (notification.getEmoji()isempty?'(empty)': notification.getEmoji()) }}<br/> |
| 141 | + {{-'Exception:'~ notification.getException() ??'(empty)' }}<br/> |
| 142 | + {{-'ExceptionAsString:'~ (notification.getExceptionAsString()isempty?'(empty)': notification.getExceptionAsString()) }} |
| 143 | + </pre> |
| 144 | + </div> |
| 145 | + </div> |
| 146 | + {%endif %} |
| 147 | + <divclass="tab"> |
| 148 | + <h3class="tab-title">Message Options</h3> |
| 149 | + <divclass="tab-content"> |
| 150 | + <preclass="prewrap"style="max-height: 600px"> |
| 151 | + {%-if message.getOptions()isnull %} |
| 152 | + {{-'(empty)' }} |
| 153 | + {%-else %} |
| 154 | + {{- message.getOptions()|json_encode(constant('JSON_PRETTY_PRINT')) }} |
| 155 | + {%-endif %} |
| 156 | + </pre> |
| 157 | + </div> |
| 158 | + </div> |
| 159 | + </div> |
| 160 | + </div> |
| 161 | + </div> |
| 162 | + </div> |
| 163 | + </div> |
| 164 | + {%endfor %} |
| 165 | + </div> |
| 166 | + </div> |
| 167 | + {%endfor %} |
| 168 | +{%endblock %} |