Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
zesqq committed Jan 6, 2020
1 parent 54d4092 commit 0996cc4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 6 additions & 2 deletions js/compare/load.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,18 +191,22 @@ function loadHARsFromConfig(config) {
}
harPromise2 = loadJson(reworkedConfig2.url);
}
let label1 = (new URL(reworkedConfig.url)).pathname;
let label2 = (new URL(reworkedConfig2.url)).pathname;
label1 = label1.replace(/.*\//, "");
label2 = label2.replace(/.*\//, "");
Promise.all([harPromise, harPromise2])
.then(([har1, har2]) =>
generate({
har1: {
har: har1,
run: reworkedConfig.run || config.har1.run || 0,
label: config.har1.label || 'HAR1'
label: config.har1.label || label1
},
har2: {
har: har2,
run: reworkedConfig2.run || config.har2.run || 0,
label: config.har2.label || 'HAR2'
label: config.har2.label || label2
},
comments: config.comments || undefined,
title: config.title || 'Compare HAR files',
Expand Down
6 changes: 3 additions & 3 deletions js/compare/upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ function createMainDropZone(id) {
har1: {
har: har1,
run: 0,
label: 'HAR1'
label: files[0].name
},
har2: {
har: har2,
run: 0,
label: 'HAR2'
label: files[1].name
}
})
)
Expand All @@ -46,7 +46,7 @@ function createMainDropZone(id) {
har1: {
har: har,
run: 0,
label: 'HAR1'
label: files[0].name
},
har2: {
har: har,
Expand Down

0 comments on commit 0996cc4

Please sign in to comment.