Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lab-benchmarker
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SE464 Fall 2023
lab-benchmarker
Commits
b4c78c42
Commit
b4c78c42
authored
1 year ago
by
Jack Hu
Browse files
Options
Downloads
Patches
Plain Diff
format messages better
parent
1cab257a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
public/results.html
+12
-9
12 additions, 9 deletions
public/results.html
with
12 additions
and
9 deletions
public/results.html
+
12
−
9
View file @
b4c78c42
...
@@ -59,7 +59,8 @@
...
@@ -59,7 +59,8 @@
const
grpcJsonData
=
data
[
"
grpc
"
];
const
grpcJsonData
=
data
[
"
grpc
"
];
document
.
getElementById
(
'
results
'
).
replaceChildren
(
jsonToTable
(
"
REST
"
,
restJsonData
));
document
.
getElementById
(
'
results
'
).
replaceChildren
(
jsonToTable
(
"
REST
"
,
restJsonData
));
document
.
getElementById
(
'
results
'
).
appendChild
(
jsonToTable
(
"
gRPC
"
,
grpcJsonData
));
document
.
getElementById
(
'
results
'
).
appendChild
(
jsonToTable
(
"
gRPC
"
,
grpcJsonData
));
document
.
getElementById
(
'
messages
'
).
replaceChildren
(
concatAllMessages
(
restJsonData
,
grpcJsonData
));
document
.
getElementById
(
'
messages
'
).
replaceChildren
(
concatAllMessages
(
"
REST
"
,
restJsonData
));
document
.
getElementById
(
'
messages
'
).
appendChild
(
concatAllMessages
(
"
gRPC
"
,
grpcJsonData
));
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
error
(
e
);
console
.
error
(
e
);
}
}
...
@@ -98,16 +99,18 @@
...
@@ -98,16 +99,18 @@
return
div
;
return
div
;
}
}
function
concatAllMessages
(
...
jsonData
)
{
function
concatAllMessages
(
title
,
jsonData
)
{
const
div
=
document
.
createElement
(
'
div
'
);
const
div
=
document
.
createElement
(
'
div
'
);
for
(
const
data
of
jsonData
)
{
const
h
=
document
.
createElement
(
'
h2
'
);
for
(
const
[
k
,
v
]
of
Object
.
entries
(
data
))
{
h
.
textContent
=
title
;
const
p
=
document
.
createElement
(
'
p
'
);
div
.
appendChild
(
h
);
p
.
textContent
=
`
${
k
}
:
${
v
[
"
message
"
]}
`
;
for
(
const
[
k
,
v
]
of
Object
.
entries
(
jsonData
))
{
p
.
className
=
v
[
"
ok
"
]
?
'
success
'
:
'
fail
'
;
const
p
=
document
.
createElement
(
'
p
'
);
div
.
appendChild
(
p
);
p
.
textContent
=
`
${
k
}
:
${
v
[
"
message
"
]}
`
;
}
p
.
className
=
v
[
"
ok
"
]
?
'
success
'
:
'
fail
'
;
div
.
appendChild
(
p
);
}
}
return
div
;
return
div
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment