Skip to content

Commit

Permalink
OPCT-226: cmd/report UX enhancements
Browse files Browse the repository at this point in the history
Several enhancements applied to the command 'report' to provide a better
experience in the UI when reviewing artifacts.

The alpha version is experimental version for v0.5 introducting the
changes from the PR:
#76
  • Loading branch information
mtulio committed Jul 24, 2024
1 parent 32853e2 commit ae887ab
Show file tree
Hide file tree
Showing 52 changed files with 6,118 additions and 1,295 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ kubeconfig

# build files
dist/
build/

# changelog is generated automaticaly by hack/generate-changelog.sh
# available only in the rendered webpage (built by mkdocs).
Expand Down
33 changes: 18 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,26 @@ GOARCH ?= amd64
unexport GOFLAGS

.PHONY: all
all: build-linux-amd64
all: build-windows-amd64
all: build-darwin-amd64
all: build-darwin-arm64
all: linux-amd64-container build-windows-amd64 build-darwin-amd64 build-darwin-arm64

.PHONY: build-dep
build-dep:
@mkdir -p $(BUILD_DIR)

.PHONY: build
build: build-dep
GOOS=$(GOOS) GOARCH=$(GOARCH) go build -o $(BUILD_DIR)/opct-$(GOOS)-$(GOARCH)$(GOEXT) $(GO_BUILD_FLAGS)
@cd $(BUILD_DIR); md5sum $(BUILD_DIR)/opct-$(GOOS)-$(GOARCH)$(GOEXT) > $(BUILD_DIR)/opct-$(GOOS)-$(GOARCH)$(GOEXT).sum; cd -
GOOS=$(GOOS) GOARCH=$(GOARCH) go build -o $(BUILD_DIR)/opct-$(GOOS)-$(GOARCH) $(GO_BUILD_FLAGS)
@cd $(BUILD_DIR); md5sum $(BUILD_DIR)/opct-$(GOOS)-$(GOARCH) > $(BUILD_DIR)/opct-$(GOOS)-$(GOARCH).sum; cd -

.PHONY: build-linux-amd64
build-linux-amd64: GOOS = linux
build-linux-amd64: GOARCH = amd64
build-linux-amd64: build

.PHONY: build-windows-amd64
build-windows-amd64: GOOS = windows
build-windows-amd64: GOARCH = amd64
build-windows-amd64: GOEXT = .exe
build-windows-amd64: build
build-windows-amd64: build-dep
GOOS=windows GOARCH=amd64 go build -o $(BUILD_DIR)/opct-windows.exe $(GO_BUILD_FLAGS)
@cd $(BUILD_DIR); md5sum $(BUILD_DIR)/opct-windows-amd64 > $(BUILD_DIR)/opct-windows-amd64.sum; cd -

.PHONY: build-darwin-amd64
build-darwin-amd64: GOOS = darwin
Expand All @@ -57,11 +53,18 @@ build-darwin-arm64: build
linux-amd64-container: build-linux-amd64
podman build -t $(IMG):latest -f hack/Containerfile --build-arg=RELEASE_TAG=$(RELEASE_TAG) .

# Utils dev
.PHONY: update-go
update-go:
go get -u
go mod tidy
# Publish devel binaries (non-official). Must be used only for troubleshooting in development/support.
.PHONY: publish-amd64-devel
publish-amd64-devel: build-linux-amd64
aws s3 cp $(BUILD_DIR)/opct-linux-amd64 s3://openshift-provider-certification/bin/opct-linux-amd64-devel

.PHONY: publish-darwin-arm64-devel
publish-darwin-arm64-devel: build-darwin-arm64
aws s3 cp $(BUILD_DIR)/opct-darwin-arm64 s3://openshift-provider-certification/bin/opct-darwin-arm64-devel

.PHONY: publish-devel
publish-devel: publish-amd64-devel
publish-devel: publish-darwin-arm64-devel

.PHONY: test
test:
Expand Down
2 changes: 1 addition & 1 deletion cmd/root.go → cmd/opct/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"github.com/spf13/viper"
"github.com/vmware-tanzu/sonobuoy/cmd/sonobuoy/app"

"github.com/redhat-openshift-ecosystem/provider-certification-tool/pkg/cmd/report"
"github.com/redhat-openshift-ecosystem/provider-certification-tool/pkg/destroy"
"github.com/redhat-openshift-ecosystem/provider-certification-tool/pkg/report"
"github.com/redhat-openshift-ecosystem/provider-certification-tool/pkg/retrieve"
"github.com/redhat-openshift-ecosystem/provider-certification-tool/pkg/run"
"github.com/redhat-openshift-ecosystem/provider-certification-tool/pkg/status"
Expand Down
14 changes: 14 additions & 0 deletions data/templates/report/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Report HTML app

Report is build upon Vue framework using native browser.

The pages are reactive, using the opct-report.json as data source.

The opct-report.json is generated by `report` command when processing
the results.


References:

- https://vuejs.org/guide/extras/ways-of-using-vue.html
- https://markus.oberlehner.net/blog/goodbye-webpack-building-vue-applications-without-webpack/
Loading

0 comments on commit ae887ab

Please sign in to comment.