Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(211)

Side by Side Diff: runtime/observatory/lib/src/elements/nav_bar.html

Issue 2167053002: Converted Observatory nav-notify element (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Added tests Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <link rel="import" href="../../../../packages/polymer/polymer.html"> 1 <link rel="import" href="../../../../packages/polymer/polymer.html">
2 <link rel="import" href="action_link.html"> 2 <link rel="import" href="action_link.html">
3 <link rel="import" href="observatory_element.html"> 3 <link rel="import" href="observatory_element.html">
4 4
5 <polymer-element name="nav-bar" extends="observatory-element"> 5 <polymer-element name="nav-bar" extends="observatory-element">
6 <template> 6 <template>
7 <link rel="stylesheet" href="css/shared.css"> 7 <link rel="stylesheet" href="css/shared.css">
8 <style> 8 <style>
9 nav { 9 nav {
10 position: fixed; 10 position: fixed;
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 <polymer-element name="class-nav-menu" extends="observatory-element"> 109 <polymer-element name="class-nav-menu" extends="observatory-element">
110 <template> 110 <template>
111 <nav-menu link="{{ makeLink('/inspect', cls) }}" 111 <nav-menu link="{{ makeLink('/inspect', cls) }}"
112 anchor="{{ cls.name }}" last="{{ last }}"> 112 anchor="{{ cls.name }}" last="{{ last }}">
113 <content></content> 113 <content></content>
114 </nav-menu> 114 </nav-menu>
115 </template> 115 </template>
116 </polymer-element> 116 </polymer-element>
117 117
118 <polymer-element name="nav-notify" extends="observatory-element">
119 <template>
120 <style>
121 .menu {
122 float: right;
123 }
124 .menu .list {
125 display: block;
126 position: absolute;
127 top: 98%;
128 right: 0;
129 margin: 0;
130 padding: 0;
131 width: auto;
132 z-index: 1000;
133 font: 400 12px 'Montserrat', sans-serif;
134 color: white;
135 background: none;
136 }
137 </style>
138
139 <div class="menu">
140 <div class="list">
141 <template repeat="{{ notification in notifications }}">
142 <template if="{{ notification.event != null }}">
143 <nav-notify-event notifications="{{ notifications }}"
144 notification="{{ notification }}"
145 event="{{ notification.event }}"
146 notifyOnPause="{{ notifyOnPause }}">
147 </nav-notify-event>
148 </template>
149 <template if="{{ notification.exception != null }}">
150 <nav-notify-exception notifications="{{ notifications }}"
151 notification="{{ notification }}"
152 exception="{{ notification.exception }}"
153 stacktrace="{{ notification.stacktrace }}">
154 </nav-notify-exception>
155 </template>
156 </template>
157 </div>
158 </div>
159 </template>
160 </polymer-element>
161
162 <polymer-element name="nav-notify-event" extends="observatory-element">
163 <template>
164 <style>
165 .item {
166 position: relative;
167 padding: 16px;
168 margin-top: 10px;
169 margin-right: 10px;
170 padding-right: 25px;
171 width: 250px;
172 color: #ddd;
173 background: rgba(0,0,0,.6);
174 border: solid 2px white;
175 box-shadow: 0 0 5px black;
176 border-radius: 5px;
177 animation: fadein 1s;
178 }
179
180 .wide-item {
181 width: 50vw;
182 }
183
184 @keyframes fadein {
185 from { opacity: 0; }
186 to { opacity: 1; }
187 }
188
189 a.link {
190 color: white;
191 text-decoration: none;
192 }
193 a.link:hover {
194 text-decoration: underline;
195 }
196
197 a.boxclose {
198 position: absolute;
199 display: block;
200 top: 4px;
201 right: 4px;
202 height: 18px;
203 width: 18px;
204 line-height: 16px;
205 border-radius: 9px;
206 color: white;
207 font-size: 18px;
208 cursor: pointer;
209 text-align: center;
210 }
211 a.boxclose:hover {
212 background: rgba(255,255,255,0.5);
213 }
214 .error {
215 white-space: pre;
216 }
217 </style>
218 <template if="{{ event != null }}">
219 <template if="{{ notifyOnPause && event.isPauseEvent }}">
220 <div class="item">
221 Isolate
222 <a class="link" on-click="{{ goto }}"
223 _href="{{ gotoLink('/inspect', event.isolate) }}">{{ event.isolate. name }}</a>
224 is paused
225 <template if="{{ event.kind == 'PauseStart' }}">
226 at isolate start
227 </template>
228 <template if="{{ event.kind == 'PauseExit' }}">
229 at isolate exit
230 </template>
231 <template if="{{ event.breakpoint != null }}">
232 at breakpoint {{ event.breakpoint.number }}
233 </template>
234 <template if="{{ event.kind == 'PauseException' }}">
235 due to exception
236 </template>
237
238 <br><br>
239 [<a class="link" on-click="{{ goto }}"
240 _href="{{ gotoLink('/debugger', event.isolate) }}">debug</a>]
241
242 <a class="boxclose" on-click="{{ closeItem }}">&times;</a>
243 </div>
244 </template>
245 <template if="{{ event.kind == 'ConnectionClosed' }}">
246 <div class="item">
247 Disconnected from VM: {{ event.reason }}
248 <br><br>
249 [<a class="link" on-click="{{ goto }}"
250 _href="{{ gotoLink('/vm-connect') }}">Connect to a VM</a>]
251 <a class="boxclose" on-click="{{ closeItem }}">&times;</a>
252 </div>
253 </template>
254 <template if="{{ event.kind == 'Inspect' }}">
255 <div class="item">
256 Inspect <any-service-ref ref="{{ event.inspectee }}"></any-service-ref >
257 <br><br>
258 <a class="boxclose" on-click="{{ closeItem }}">&times;</a>
259 </div>
260 </template>
261 <template if="{{ event.kind == 'IsolateReload' }}">
262 <div class="wide-item item">
263 Isolate reload
264 <template if="{{ event.reloadError != null }}">
265 failed:
266 <br>
267 <br>
268 <div class="indent error">{{ event.reloadError.message.toString() }} </div><br>
269 </template>
270 <template if="{{ event.reloadError == null }}">
271 succeeded
272 </template>
273 <a class="boxclose" on-click="{{ closeItem }}">&times;</a>
274 </div>
275 </template>
276 </template>
277 </template>
278 </polymer-element>
279
280
281 <polymer-element name="nav-notify-exception" extends="observatory-element">
282 <template>
283 <style>
284 .item {
285 position: relative;
286 padding: 16px;
287 margin-top: 10px;
288 margin-right: 10px;
289 padding-right: 25px;
290 width: 500px;
291 color: #ddd;
292 background: rgba(0,0,0,.6);
293 border: solid 2px white;
294 box-shadow: 0 0 5px black;
295 border-radius: 5px;
296 animation: fadein 1s;
297 }
298
299 @keyframes fadein {
300 from { opacity: 0; }
301 to { opacity: 1; }
302 }
303
304 a.link {
305 color: white;
306 text-decoration: none;
307 }
308 a.link:hover {
309 text-decoration: underline;
310 }
311 .indent {
312 margin-left:20px;
313 }
314
315 a.boxclose {
316 position: absolute;
317 display: block;
318 top: 4px;
319 right: 4px;
320 height: 18px;
321 width: 18px;
322 line-height: 16px;
323 border-radius: 9px;
324 color: white;
325 font-size: 18px;
326 cursor: pointer;
327 text-align: center;
328 }
329 a.boxclose:hover {
330 background: rgba(255,255,255,0.5);
331 }
332 .stacktrace {
333 white-space: pre
334 }
335 </style>
336 <template if="{{ isUnexpectedError }}">
337 <!-- TODO(turnidge): Add a file-a-bug link to this notification -->
338 <div class="item">
339 Unexpected exception:<br><br>
340 <div class="indent">{{ exception.toString() }}</div><br>
341 <template if="{{ stacktrace != null }}">
342 Stacktrace:<br><br>
343 <div class="indent stacktrace">{{ stacktrace.toString() }}</div>
344 <br>
345 </template>
346 [<a class="link" on-click="{{ goto }}"
347 _href="{{ gotoLink('vm-connect') }}">Connect to a different VM</a>]
348 <a class="boxclose" on-click="{{ closeItem }}">&times;</a>
349 </div>
350 </template>
351 <template if="{{ isNetworkError }}">
352 <div class="item">
353 The request cannot be completed because the VM is currently
354 disconnected.
355 <br><br>
356 [<a class="link" on-click="{{ goto }}"
357 _href="{{ gotoLink('vm-connect') }}">Connect to a different VM</a>]
358 <a class="boxclose" on-click="{{ closeItem }}">&times;</a>
359 </div>
360 </template>
361 </template>
362 </polymer-element>
363
364
365 <script type="application/dart" src="nav_bar.dart"></script> 118 <script type="application/dart" src="nav_bar.dart"></script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698