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

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

Powered by Google App Engine
This is Rietveld 408576698