Skip to content

Commit 0af036b

Browse files
author
Daniel Herzog
committed
Changed the layout of the network-details overlay, new position for the close button, new styles for headlines. Tweaky commit, needs cleaning up.
1 parent 3cceab4 commit 0af036b

File tree

2 files changed

+82
-54
lines changed

2 files changed

+82
-54
lines changed

src/network/network_details_templates.js

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,32 @@ templates.details = function(entry, left_val, do_raw)
3232
{
3333
return (
3434
["div",
35-
["span",
35+
[
3636
["span",
37-
"class", "close-request-detail",
38-
"handler", "close-request-detail",
39-
"tabindex", "1"
37+
"class", "resize-request-detail",
38+
"handler", "resize-request-detail"
4039
],
41-
"class", "resize-request-detail",
42-
"handler", "resize-request-detail"
43-
],
44-
["div",
45-
this._details_content(entry, do_raw),
46-
"data-object-id", String(entry.id),
47-
"class", "entry-details"
48-
// Todo: currently can't have the setting-changing context menu only on this container
49-
// ,"data-menu", "network-logger-details"
40+
["div",
41+
[
42+
["span",
43+
"class", "close-request-detail",
44+
"handler", "close-request-detail",
45+
"tabindex", "1"
46+
],
47+
templates.details_headline(entry)
48+
],
49+
"class", "network-details-header-row"
50+
],
51+
["div",
52+
["div",
53+
this._details_content(entry, do_raw),
54+
"data-object-id", String(entry.id),
55+
"class", "entry-details"
56+
// Todo: currently can't have the setting-changing context menu only on this container
57+
// ,"data-menu", "network-logger-details"
58+
],
59+
"class", "height-holder"
60+
]
5061
],
5162
"class", "network-details-container",
5263
"style", "left:" + left_val + "px"]
@@ -60,17 +71,11 @@ templates._details_content = function(entry, do_raw)
6071
if (do_raw)
6172
{
6273
return [
63-
templates.details_headline(entry),
6474
requests_responses
6575
];
6676
}
6777
return (
6878
["table",
69-
["tbody",
70-
this._col_or_row(
71-
templates.details_headline(entry)
72-
)
73-
],
7479
entry.touched_network ? [] : this.did_not_touch_network(entry),
7580
requests_responses
7681
]
@@ -79,23 +84,19 @@ templates._details_content = function(entry, do_raw)
7984

8085
templates.details_headline = function(entry)
8186
{
82-
/*
8387
var responsecode = entry.current_responsecode;
8488
if (responsecode && responsecode in cls.ResourceUtil.http_status_codes)
8589
responsecode = responsecode + " " + cls.ResourceUtil.http_status_codes[responsecode];
86-
*/
87-
return ["h2", entry.url, "class", "url"];
88-
/*
89-
["h2",
90+
91+
return ["h2",
9092
[
9193
["span",
9294
entry.touched_network && responsecode ? String(responsecode) + " – " : "",
9395
"data-spec", "http#" + entry.current_responsecode
9496
],
95-
["span", entry.url ]
96-
]
97+
["span", entry.url]
98+
], "class", "url"
9799
]
98-
*/
99100
};
100101

101102
templates.did_not_touch_network = function(entry)
@@ -316,11 +317,11 @@ templates._response_headers = function(resp, do_raw)
316317
templates._headers_pseudo_raw = function(header)
317318
{
318319
var template = [
319-
["span", header.name + ":",
320+
["span", header.name,
320321
"data-spec", "http#" + header.name.trim(),
321322
"class", cls.HTTPHeaderTokenizer.classnames[cls.HTTPHeaderTokenizer.types.NAME]
322323
],
323-
["span", " " + header.value,
324+
["span", ": " + header.value,
324325
"class", cls.HTTPHeaderTokenizer.classnames[cls.HTTPHeaderTokenizer.types.VALUE]]
325326
];
326327
return templates._pre(template);

src/network/network_style.css

Lines changed: 52 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -233,10 +233,8 @@
233233
}
234234
.close-request-detail
235235
{
236-
position: absolute;
237-
left: 12px;
238-
top: 7px;
239-
cursor: default;
236+
display: inline-block;
237+
margin: 5px;
240238
}
241239

242240
.network_logger .close_incomplete_warning
@@ -267,21 +265,28 @@
267265
height: 100%;
268266
z-index: 2;
269267
left: 120px;
268+
background-color: #fff;
269+
box-shadow: 0 5px 6px rgba(0, 0, 0, 0.39),
270+
0 2px 2px 1px rgba(0, 0, 0, 0.28),
271+
-1px 0 0 rgba(0, 0, 0, 0.05);
270272
}
271273

272274
.network_logger .entry-details
273275
{
274276
overflow: auto;
275277
height: 100%;
276-
padding-top: 15px;
278+
padding-left: 10px;
277279
box-sizing: border-box;
278-
background-color: #fff;
279-
/* using border-left instead of padding-left to keep the
280-
space for the close button when scrolling horizontally */
281-
border-left: 28px solid transparent;
282-
box-shadow: 0 5px 6px rgba(0, 0, 0, 0.39),
283-
0 2px 2px 1px rgba(0, 0, 0, 0.28),
284-
-1px 0 0 rgba(0, 0, 0, 0.05);
280+
}
281+
282+
.height-holder
283+
{
284+
height: 100%;
285+
width: 100%;
286+
padding-top: 40px;
287+
box-sizing: border-box;
288+
position: absolute;
289+
top: 0;
285290
}
286291

287292
.network_logger .header-token-type-first_line_part
@@ -291,12 +296,12 @@
291296

292297
.network_logger .header-token-type-name
293298
{
294-
color: #7070B4;
299+
color: #F19800;
295300
}
296301

297302
.network_logger .http-token-type-boundary
298303
{
299-
color: #AA5544;
304+
color: #E32500;
300305
}
301306

302307
.network_logger .network-summary
@@ -307,21 +312,13 @@
307312
color: #808080;
308313
}
309314

310-
.network-details-container h2
311-
{
312-
padding: 9px 0;
313-
}
314-
315-
.entry-details .url
316-
{
317-
font-weight: normal;
318-
}
319-
320315
.network-details-container pre,
321316
.network-details-container p
322317
{
323318
margin: 0;
319+
/*
324320
word-wrap: break-word;
321+
*/
325322
}
326323

327324
.network-details-container table
@@ -353,16 +350,46 @@
353350
{
354351
border: none;
355352
border-top: 1px solid #a4a4a4;
353+
margin-top: 9px;
356354
}
357355

358-
.network-details-container h2,
359356
.request-crafter h2,
360357
.network-options h2
361358
{
362359
font-size: 125%;
363360
padding: 10px 0 5px 0;
364361
}
365362

363+
.network-details-container h2 {
364+
font-weight: normal;
365+
font-size: 11px;
366+
padding: 0;
367+
margin: 10px -10px;
368+
padding-left: 10px;
369+
370+
line-height: 20px;
371+
background-color: #e9e9e9;
372+
background-image: -o-linear-gradient(-90deg,
373+
rgba(255, 255, 255, 0.85) 0,
374+
rgba(255, 255, 255, 0.45) 100%);
375+
background-image: linear-gradient(rgba(255, 255, 255, 0.85) 0,
376+
rgba(255, 255, 255, 0.45) 100%);
377+
}
378+
379+
.network-details-container .url
380+
{
381+
display: inline-block;
382+
padding: 0 10px;
383+
background-color: transparent;
384+
background-image: none;
385+
}
386+
387+
.entry-details > h2:first-child,
388+
.entry-details tbody:first-child tr:first-child h2
389+
{
390+
margin-top: 0;
391+
}
392+
366393
.network_logger .network-main-container .sortable-table .network-graph-column
367394
{
368395
line-height: 0;

0 commit comments

Comments
 (0)