Skip to content

Commit

Permalink
fix: playground
Browse files Browse the repository at this point in the history
Signed-off-by: Charles-Edouard Brétéché <[email protected]>
  • Loading branch information
eddycharly committed Oct 19, 2023
1 parent 4ee2aa7 commit c9a3da6
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 13 deletions.
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.tools
.gopath
/kyverno-json
website/site
website/playground/assets/main.wasm
pkg/server/ui/dist/assets/main.wasm
/pkg/server/ui/dist/assets/main.wasm
/website/docs/_playground
/website/playground/assets/main.wasm
/website/site
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,8 @@ codegen-schemas: codegen-schemas-openapi codegen-schemas-json ## Generate openap
.PHONY: codegen-playground
codegen-playground: build-wasm ## Generate playground
@echo Generate playground... >&2
@cp -r ./website/playground/* ./pkg/server/ui/dist
@rm -rf ./pkg/server/ui/dist && mkdir -p ./pkg/server/ui/dist && cp -r ./website/playground/* ./pkg/server/ui/dist
@rm -rf ./website/docs/_playground && mkdir -p ./website/docs/_playground && cp -r ./website/playground/* ./website/docs/_playground

.PHONY: codegen-helm-crds
codegen-helm-crds: codegen-crds ## Generate helm CRDs
Expand Down
2 changes: 1 addition & 1 deletion pkg/server/ui/dist/assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ document.addEventListener("keydown", (event) => {
}
});

fetch("../assets/data.json")
fetch("./assets/data.json")
.then((response) => response.json())
.then(({ examples }) => {

Expand Down
8 changes: 1 addition & 7 deletions website/docs/playground.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
# Playground

<p align="center">
<img src="../static/WIP.jpg" />
</p>

There is no playground available for `kyverno-json` yet but we are actively working on it.

It should be available soon!
The `kyverno-json` <a href="../_playground" target="_blank" >playground</a> can be used to test `kyverno-json` directly in your web browser.
2 changes: 1 addition & 1 deletion website/playground/assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ document.addEventListener("keydown", (event) => {
}
});

fetch("../assets/data.json")
fetch("./assets/data.json")
.then((response) => response.json())
.then(({ examples }) => {

Expand Down

0 comments on commit c9a3da6

Please sign in to comment.