Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/dashboard #211

Merged
merged 23 commits into from
Jul 9, 2018
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
19 changes: 16 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ SRCDIR := $(SCRIPTDIR)
CACHEVOL := $(PROJECT)-gocache
BINDIR := $(ROOTDIR)/bin
VENDORDIR := $(ROOTDIR)/deps
DASHBOARDDIR := $(ROOTDIR)/dashboard

ORGPATH := github.com/arangodb
ORGDIR := $(GOBUILDDIR)/src/$(ORGPATH)
Expand All @@ -24,6 +25,7 @@ GOPATH := $(GOBUILDDIR)
GOVERSION := 1.10.0-alpine

PULSAR := $(GOBUILDDIR)/bin/pulsar$(shell go env GOEXE)
GOASSETSBUILDER := $(GOBUILDDIR)/bin/go-assets-builder$(shell go env GOEXE)

DOCKERFILE := Dockerfile
DOCKERTESTFILE := Dockerfile.test
Expand Down Expand Up @@ -95,6 +97,7 @@ ifdef VERBOSE
endif

SOURCES := $(shell find $(SRCDIR) -name '*.go' -not -path './test/*')
DASHBOARDSOURCES := $(shell find $(DASHBOARDDIR)/src -name '*.js' -not -path './test/*')

.PHONY: all
all: verify-generated build
Expand All @@ -108,7 +111,7 @@ build: check-vars docker manifests

.PHONY: clean
clean:
rm -Rf $(BIN) $(BINDIR) $(GOBUILDDIR)
rm -Rf $(BIN) $(BINDIR) $(GOBUILDDIR) $(DASHBOARDDIR)/node_modules

.PHONY: check-vars
check-vars:
Expand All @@ -123,10 +126,11 @@ deps:
@${MAKE} -B -s $(GOBUILDDIR)

$(GOBUILDDIR):
# Build pulsar from vendor
# Build pulsar & go-assets-builder from vendor
@mkdir -p $(GOBUILDDIR)
@ln -sf $(VENDORDIR) $(GOBUILDDIR)/src
@GOPATH=$(GOBUILDDIR) go install github.com/pulcy/pulsar
@GOPATH=$(GOBUILDDIR) go install github.com/jessevdk/go-assets-builder
@rm -Rf $(GOBUILDDIR)/src
# Prepare .gobuild directory
@mkdir -p $(ORGDIR)
Expand Down Expand Up @@ -187,7 +191,14 @@ update-generated: $(GOBUILDDIR)
verify-generated:
@${MAKE} -B -s VERIFYARGS=--verify-only update-generated

$(BIN): $(GOBUILDDIR) $(CACHEVOL) $(SOURCES)
$(DASHBOARDDIR)/node_modules:
cd $(DASHBOARDDIR) && npm install

dashboard/assets.go: $(DASHBOARDSOURCES) $(DASHBOARDDIR)/node_modules
cd $(DASHBOARDDIR) && npm run-script build
$(GOASSETSBUILDER) -s /dashboard/build/ -o dashboard/assets.go -p dashboard dashboard/build

$(BIN): $(GOBUILDDIR) $(CACHEVOL) $(SOURCES) dashboard/assets.go
@mkdir -p $(BINDIR)
docker run \
--rm \
Expand All @@ -202,6 +213,8 @@ $(BIN): $(GOBUILDDIR) $(CACHEVOL) $(SOURCES)
golang:$(GOVERSION) \
go build -installsuffix cgo -ldflags "-X main.projectVersion=$(VERSION) -X main.projectBuild=$(COMMIT)" -o /usr/code/bin/$(BINNAME) $(REPOPATH)



.PHONY: docker
docker: check-vars $(BIN)
docker build -f $(DOCKERFILE) -t $(OPERATORIMAGE) .
Expand Down
21 changes: 21 additions & 0 deletions dashboard/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
/node_modules

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
2,444 changes: 2,444 additions & 0 deletions dashboard/README.md

Large diffs are not rendered by default.

92 changes: 92 additions & 0 deletions dashboard/assets.go

Large diffs are not rendered by default.

Loading