-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from szkiba/feature/report
export HTML report feature
- Loading branch information
Showing
108 changed files
with
9,032 additions
and
365 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
|
||
k6 | ||
|
||
test_result.* | ||
test_result* | ||
|
||
coverage.txt | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# SPDX-FileCopyrightText: 2023 Iván Szkiba | ||
# | ||
# SPDX-License-Identifier: MIT | ||
|
||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// SPDX-FileCopyrightText: 2023 Iván Szkiba | ||
// | ||
// SPDX-License-Identifier: MIT | ||
|
||
package assets | ||
|
||
import ( | ||
"embed" | ||
"io/fs" | ||
) | ||
|
||
//go:embed ui brief | ||
var distFS embed.FS | ||
|
||
func DirUI() fs.FS { | ||
return dir("ui") | ||
} | ||
|
||
func DirBrief() fs.FS { | ||
return dir("brief") | ||
} | ||
|
||
func dir(dirname string) fs.FS { | ||
subfs, err := fs.Sub(distFS, dirname) | ||
if err != nil { | ||
panic(err) | ||
} | ||
|
||
return subfs | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// SPDX-FileCopyrightText: 2023 Iván Szkiba | ||
// | ||
// SPDX-License-Identifier: MIT | ||
|
||
package assets | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func Test_dir(t *testing.T) { | ||
t.Parallel() | ||
|
||
fs := dir("hu") | ||
|
||
assert.NotNil(t, fs) | ||
assert.Panics(t, func() { | ||
dir("..") //nolint:errcheck | ||
}) | ||
} | ||
|
||
func TestDirUI(t *testing.T) { | ||
t.Parallel() | ||
|
||
fs := DirUI() | ||
|
||
assert.NotNil(t, fs) | ||
|
||
file, err := fs.Open("index.html") | ||
|
||
assert.NoError(t, err) | ||
assert.NotNil(t, file) | ||
|
||
assert.NoError(t, file.Close()) | ||
} | ||
|
||
func TestDirBrief(t *testing.T) { | ||
t.Parallel() | ||
|
||
fs := DirBrief() | ||
|
||
assert.NotNil(t, fs) | ||
|
||
file, err := fs.Open("index.html") | ||
|
||
assert.NoError(t, err) | ||
assert.NotNil(t, file) | ||
|
||
assert.NoError(t, file.Close()) | ||
} |
File renamed without changes.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
window.config = window.config || window.defaultConfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"$schema": "node_modules/lerna/schemas/lerna-schema.json", | ||
"npmClient": "yarn", | ||
"version": "independent" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "xk6-dashboard-assets", | ||
"version": "1.0.0", | ||
"description": "xk6-dashboard embeddable assets", | ||
"license": "MIT", | ||
"private": true, | ||
"scripts": { | ||
"build": "lerna run build" | ||
}, | ||
"devDependencies": { | ||
"lerna": "^7.1.5", | ||
"vite": "^4.4.9" | ||
}, | ||
"workspaces": [ | ||
"packages/*" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# SPDX-FileCopyrightText: 2023 Iván Szkiba | ||
# | ||
# SPDX-License-Identifier: MIT | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" | ||
href="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNTYiIGhlaWdodD0iMjU2IiB2aWV3Qm94PSIwIDAgNjcuNzMzIDY3LjczMyIgZmlsbD0iIzdiNjVmYSIgeG1sbnM6dj0iaHR0cHM6Ly92ZWN0YS5pby9uYW5vIj48cGF0aCBkPSJNMy45MDIgNjMuODMxVjEwLjI2NiIvPjxwYXRoIGQ9Ik0zLjAwNSAxMC4yNjZWNjMuODNoMS43OTNWMTAuMjY2eiIvPjxwYXRoIGQ9Ik0zLjkwMiAzLjA5NWwyLjM5MyA3LjE3MUgxLjUwOXoiLz48cGF0aCBkPSJNMy45MDEuMjY0TC4yNjUgMTEuMTYySDcuNTR6bS0uOTM4IDYzLjU2N2g1NC41MDQiLz48cGF0aCBkPSJNMi45NjQgNjIuOTI2djEuODA5aDU0LjUwNHYtMS44MDl6Ii8+PHBhdGggZD0iTTY0LjYzOCA2My44MzFsLTcuMTcxIDIuMzkzdi00Ljc4NnoiLz48cGF0aCBkPSJNNTYuNTcxIDYwLjE5M3Y3LjI3NUw2Ny40NyA2My44M2wtMTAuODk4LTMuNjM3eiIvPjxwYXRoIGQ9Ik01NC4xOTMgNjMuNjg1SDQuNjhsMTYuNDgzLTM1LjE2IDkuOTI5IDcuMjk5IDEyLjk1MS0yMC4xOTJ6IiBmaWxsLW9wYWNpdHk9Ii41MDIiIHN0cm9rZT0iIzdiNjVmYSIgc3Ryb2tlLXdpZHRoPSIxLjg3MyIvPjwvc3ZnPg==" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>k6 report</title> | ||
<script id="init" type="module">{{{ testconfig }}}</script> | ||
</head> | ||
|
||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.jsx"></script> | ||
<script id="data" type="application/json; charset=utf-8; gzip; base64">{{{ testdata }}}</script> | ||
<body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"name": "xk6-dashboard-brief", | ||
"private": true, | ||
"version": "1.0.0", | ||
"type": "module", | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "vite build --emptyOutDir", | ||
"preview": "vite preview" | ||
}, | ||
"dependencies": { | ||
"bootstrap": "^5.3.1", | ||
"byte-size": "^8.1.1", | ||
"humanize-duration": "^3.28.0", | ||
"numeral": "^2.0.6", | ||
"preact": "^10.16.0", | ||
"pretty-bytes": "^6.1.0", | ||
"pretty-ms": "^8.0.0", | ||
"round-to": "^6.0.0", | ||
"uplot": "^1.6.24", | ||
"uplot-react": "^1.1.4" | ||
}, | ||
"devDependencies": { | ||
"@preact/preset-vite": "^2.5.0", | ||
"sass": "^1.65.1", | ||
"vite": "^4.4.5", | ||
"vite-plugin-handlebars": "^1.6.0", | ||
"vite-plugin-singlefile": "^0.13.5" | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
window.config = window.config || window.defaultConfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 Iván Szkiba | ||
* | ||
* SPDX-License-Identifier: MIT | ||
*/ | ||
|
||
.usage { | ||
color: #808080; | ||
font-style: italic; | ||
} |
Oops, something went wrong.