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

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: Merge with master 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="library-nav-menu" extends="observatory-element"> 5 <polymer-element name="library-nav-menu" extends="observatory-element">
6 <template> 6 <template>
7 <nav-menu link="{{ makeLink('/inspect', library) }}" 7 <nav-menu link="{{ makeLink('/inspect', library) }}"
8 anchor="{{ library.name }}" last="{{ last }}"> 8 anchor="{{ library.name }}" last="{{ last }}">
9 <content></content> 9 <content></content>
10 </nav-menu> 10 </nav-menu>
11 </template> 11 </template>
12 </polymer-element> 12 </polymer-element>
13 13
14 <polymer-element name="class-nav-menu" extends="observatory-element"> 14 <polymer-element name="class-nav-menu" extends="observatory-element">
15 <template> 15 <template>
16 <nav-menu link="{{ makeLink('/inspect', cls) }}" 16 <nav-menu link="{{ makeLink('/inspect', cls) }}"
17 anchor="{{ cls.name }}" last="{{ last }}"> 17 anchor="{{ cls.name }}" last="{{ last }}">
18 <content></content> 18 <content></content>
19 </nav-menu> 19 </nav-menu>
20 </template> 20 </template>
21 </polymer-element> 21 </polymer-element>
22 22
23 <polymer-element name="nav-notify" extends="observatory-element">
24 <template>
25 <style>
26 .menu {
27 float: right;
28 }
29 .menu .list {
30 display: block;
31 position: absolute;
32 top: 98%;
33 right: 0;
34 margin: 0;
35 padding: 0;
36 width: auto;
37 z-index: 1000;
38 font: 400 12px 'Montserrat', sans-serif;
39 color: white;
40 background: none;
41 }
42 </style>
43
44 <div class="menu">
45 <div class="list">
46 <template repeat="{{ notification in notifications }}">
47 <template if="{{ notification.event != null }}">
48 <nav-notify-event notifications="{{ notifications }}"
49 notification="{{ notification }}"
50 event="{{ notification.event }}"
51 notifyOnPause="{{ notifyOnPause }}">
52 </nav-notify-event>
53 </template>
54 <template if="{{ notification.exception != null }}">
55 <nav-notify-exception notifications="{{ notifications }}"
56 notification="{{ notification }}"
57 exception="{{ notification.exception }}"
58 stacktrace="{{ notification.stacktrace }}">
59 </nav-notify-exception>
60 </template>
61 </template>
62 </div>
63 </div>
64 </template>
65 </polymer-element>
66
67 <polymer-element name="nav-notify-event" extends="observatory-element">
68 <template>
69 <style>
70 .item {
71 position: relative;
72 padding: 16px;
73 margin-top: 10px;
74 margin-right: 10px;
75 padding-right: 25px;
76 width: 250px;
77 color: #ddd;
78 background: rgba(0,0,0,.6);
79 border: solid 2px white;
80 box-shadow: 0 0 5px black;
81 border-radius: 5px;
82 animation: fadein 1s;
83 }
84
85 .wide-item {
86 width: 50vw;
87 }
88
89 @keyframes fadein {
90 from { opacity: 0; }
91 to { opacity: 1; }
92 }
93
94 a.link {
95 color: white;
96 text-decoration: none;
97 }
98 a.link:hover {
99 text-decoration: underline;
100 }
101
102 a.boxclose {
103 position: absolute;
104 display: block;
105 top: 4px;
106 right: 4px;
107 height: 18px;
108 width: 18px;
109 line-height: 16px;
110 border-radius: 9px;
111 color: white;
112 font-size: 18px;
113 cursor: pointer;
114 text-align: center;
115 }
116 a.boxclose:hover {
117 background: rgba(255,255,255,0.5);
118 }
119 .error {
120 white-space: pre;
121 }
122 </style>
123 <template if="{{ event != null }}">
124 <template if="{{ notifyOnPause && event.isPauseEvent }}">
125 <div class="item">
126 Isolate
127 <a class="link" on-click="{{ goto }}"
128 _href="{{ gotoLink('/inspect', event.isolate) }}">{{ event.isolate. name }}</a>
129 is paused
130 <template if="{{ event.kind == 'PauseStart' }}">
131 at isolate start
132 </template>
133 <template if="{{ event.kind == 'PauseExit' }}">
134 at isolate exit
135 </template>
136 <template if="{{ event.breakpoint != null }}">
137 at breakpoint {{ event.breakpoint.number }}
138 </template>
139 <template if="{{ event.kind == 'PauseException' }}">
140 due to exception
141 </template>
142
143 <br><br>
144 [<a class="link" on-click="{{ goto }}"
145 _href="{{ gotoLink('/debugger', event.isolate) }}">debug</a>]
146
147 <a class="boxclose" on-click="{{ closeItem }}">&times;</a>
148 </div>
149 </template>
150 <template if="{{ event.kind == 'ConnectionClosed' }}">
151 <div class="item">
152 Disconnected from VM: {{ event.reason }}
153 <br><br>
154 [<a class="link" on-click="{{ goto }}"
155 _href="{{ gotoLink('/vm-connect') }}">Connect to a VM</a>]
156 <a class="boxclose" on-click="{{ closeItem }}">&times;</a>
157 </div>
158 </template>
159 <template if="{{ event.kind == 'Inspect' }}">
160 <div class="item">
161 Inspect <any-service-ref ref="{{ event.inspectee }}"></any-service-ref >
162 <br><br>
163 <a class="boxclose" on-click="{{ closeItem }}">&times;</a>
164 </div>
165 </template>
166 <template if="{{ event.kind == 'IsolateReload' }}">
167 <div class="wide-item item">
168 Isolate reload
169 <template if="{{ event.reloadError != null }}">
170 failed:
171 <br>
172 <br>
173 <div class="indent error">{{ event.reloadError.message.toString() }} </div><br>
174 </template>
175 <template if="{{ event.reloadError == null }}">
176 succeeded
177 </template>
178 <a class="boxclose" on-click="{{ closeItem }}">&times;</a>
179 </div>
180 </template>
181 </template>
182 </template>
183 </polymer-element>
184
185
186 <polymer-element name="nav-notify-exception" extends="observatory-element">
187 <template>
188 <style>
189 .item {
190 position: relative;
191 padding: 16px;
192 margin-top: 10px;
193 margin-right: 10px;
194 padding-right: 25px;
195 width: 500px;
196 color: #ddd;
197 background: rgba(0,0,0,.6);
198 border: solid 2px white;
199 box-shadow: 0 0 5px black;
200 border-radius: 5px;
201 animation: fadein 1s;
202 }
203
204 @keyframes fadein {
205 from { opacity: 0; }
206 to { opacity: 1; }
207 }
208
209 a.link {
210 color: white;
211 text-decoration: none;
212 }
213 a.link:hover {
214 text-decoration: underline;
215 }
216 .indent {
217 margin-left:20px;
218 }
219
220 a.boxclose {
221 position: absolute;
222 display: block;
223 top: 4px;
224 right: 4px;
225 height: 18px;
226 width: 18px;
227 line-height: 16px;
228 border-radius: 9px;
229 color: white;
230 font-size: 18px;
231 cursor: pointer;
232 text-align: center;
233 }
234 a.boxclose:hover {
235 background: rgba(255,255,255,0.5);
236 }
237 .stacktrace {
238 white-space: pre
239 }
240 </style>
241 <template if="{{ isUnexpectedError }}">
242 <!-- TODO(turnidge): Add a file-a-bug link to this notification -->
243 <div class="item">
244 Unexpected exception:<br><br>
245 <div class="indent">{{ exception.toString() }}</div><br>
246 <template if="{{ stacktrace != null }}">
247 Stacktrace:<br><br>
248 <div class="indent stacktrace">{{ stacktrace.toString() }}</div>
249 <br>
250 </template>
251 [<a class="link" on-click="{{ goto }}"
252 _href="{{ gotoLink('vm-connect') }}">Connect to a different VM</a>]
253 <a class="boxclose" on-click="{{ closeItem }}">&times;</a>
254 </div>
255 </template>
256 <template if="{{ isNetworkError }}">
257 <div class="item">
258 The request cannot be completed because the VM is currently
259 disconnected.
260 <br><br>
261 [<a class="link" on-click="{{ goto }}"
262 _href="{{ gotoLink('vm-connect') }}">Connect to a different VM</a>]
263 <a class="boxclose" on-click="{{ closeItem }}">&times;</a>
264 </div>
265 </template>
266 </template>
267 </polymer-element>
268
269
270 <script type="application/dart" src="nav_bar.dart"></script> 23 <script type="application/dart" src="nav_bar.dart"></script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698