chronograf/Makefile

111 lines
2.5 KiB
Makefile
Raw Normal View History

.PHONY: assets dep clean test gotest gotestrace jstest run run-dev ctags continuous
2016-11-02 20:29:16 +00:00
VERSION ?= $(shell git describe --always --tags)
COMMIT ?= $(shell git rev-parse --short=8 HEAD)
GDM := $(shell command -v gdm 2> /dev/null)
GOBINDATA := $(shell go list -f {{.Root}} github.com/jteeuwen/go-bindata 2> /dev/null)
YARN := $(shell command -v yarn 2> /dev/null)
2016-09-15 21:01:51 +00:00
SOURCES := $(shell find . -name '*.go' ! -name '*_gen.go')
UISOURCES := $(shell find ui -type f -not \( -path ui/build/\* -o -path ui/node_modules/\* -prune \) )
2016-09-15 21:01:51 +00:00
2017-01-13 23:10:50 +00:00
LDFLAGS=-ldflags "-s -X main.version=${VERSION} -X main.commit=${COMMIT}"
2016-10-20 14:38:23 +00:00
BINARY=chronograf
2016-09-15 21:01:51 +00:00
.DEFAULT_GOAL := all
all: dep build
2016-09-15 21:01:51 +00:00
build: assets ${BINARY}
dev: dep dev-assets ${BINARY}
${BINARY}: $(SOURCES) .bindata .jsdep .godep
2016-11-02 20:29:16 +00:00
go build -o ${BINARY} ${LDFLAGS} ./cmd/chronograf/main.go
2016-09-15 21:01:51 +00:00
docker-${BINARY}: $(SOURCES)
CGO_ENABLED=0 GOOS=linux go build -installsuffix cgo -o ${BINARY} ${LDFLAGS} \
2016-11-02 20:29:16 +00:00
./cmd/chronograf/main.go
docker: dep assets docker-${BINARY}
2016-10-20 14:38:23 +00:00
docker build -t chronograf .
2016-09-15 21:01:51 +00:00
assets: .jssrc .bindata
dev-assets: .dev-jssrc .bindata
.bindata: server/swagger_gen.go canned/bin_gen.go dist/dist_gen.go
@touch .bindata
dist/dist_gen.go: $(UISOURCES)
2016-10-25 15:20:06 +00:00
go generate -x ./dist
server/swagger_gen.go: server/swagger.json
2016-10-25 15:20:06 +00:00
go generate -x ./server
canned/bin_gen.go: canned/*.json
go generate -x ./canned
.jssrc: $(UISOURCES)
cd ui && npm run build
@touch .jssrc
.dev-jssrc: $(UISOURCES)
cd ui && npm run build:dev
@touch .dev-jssrc
dep: .jsdep .godep
.godep: Godeps
ifndef GDM
@echo "Installing GDM"
2016-09-15 21:01:51 +00:00
go get github.com/sparrc/gdm
endif
ifndef GOBINDATA
@echo "Installing go-bindata"
go get -u github.com/jteeuwen/go-bindata/...
endif
gdm restore
@touch .godep
.jsdep: ui/yarn.lock
ifndef YARN
$(error Please install yarn 0.19.1+)
else
cd ui && yarn --no-progress --no-emoji
@touch .jsdep
endif
2016-09-15 21:01:51 +00:00
2016-09-28 19:32:58 +00:00
gen: bolt/internal/internal.proto
2016-10-25 15:20:06 +00:00
go generate -x ./bolt/internal
2016-09-28 19:32:58 +00:00
test: jstest gotest gotestrace
2016-09-15 21:01:51 +00:00
gotest:
go test ./...
gotestrace:
go test -race ./...
2016-09-15 21:01:51 +00:00
jstest:
cd ui && npm test
run: ${BINARY}
./chronograf
run-dev: ${BINARY}
2017-02-19 06:54:52 +00:00
./chronograf -d --log-level=debug
clean:
if [ -f ${BINARY} ] ; then rm ${BINARY} ; fi
cd ui && npm run clean
cd ui && rm -rf node_modules
rm -f dist/dist_gen.go canned/bin_gen.go server/swagger_gen.go
@rm -f .godep .jsdep .jssrc .dev-jssrc .bindata
continuous:
Introduce ability to edit a dashboard cell * Correct documentation for dashboards * Exclude .git and use 'make run-dev' in 'make continuous' * Fix dashboard deletion bug where id serialization was wrong * Commence creation of overlay technology, add autoRefresh props to DashboardPage * Enhance overlay magnitude of overlay technology * Add confirm buttons to overlay technology * Refactor ResizeContainer to accommodate arbitrary containers * Refactor ResizeContainer to require explicit ResizeTop and ResizeBottom for clarity * Add markup and styles for OverlayControls * CellEditorOverlay needs a larger minimum bottom height to accommodate more things * Revert Visualization to not use ResizeTop or flex-box * Remove TODO and move to issue * Refactor CellEditorOverlay to allow selection of graph type * Style Overlay controls, move confirm buttons to own stylesheet * Fix toggle buttons in overlay so active is actually active * Block user-select on a few UI items * Update cell query shape to support Visualization and LayoutRenderer * Code cleanup * Repair fixture schema; update props for affected components * Wired up selectedGraphType and activeQueryID in CellEditorOverlay * Wire up chooseMeasurements in QueryBuilder Pass queryActions into QueryBuilder so that DataExplorer can provide actionCreators and CellEditorOverlay can provide functions that modify its component state * semicolon cleanup * Bind all queryModifier actions to component state with a stateReducer * Overlay Technologies™ can add and delete a query from a cell * Semicolon cleanup * Add conversion of InfluxQL to QueryConfig for dashboards * Update go deps to add influxdb at af72d9b0e4ebe95be30e89b160f43eabaf0529ed * Updated docs for dashboard query config * Update CHANGELOG to mention InfluxQL to QueryConfig * Make reducer’s name more specific for clarity * Remove 'table' as graphType * Make graph renaming prettier * Remove duplicate DashboardQuery in swagger.json * Fix swagger to include name and links for Cell * Refactor CellEditorOverlay to enable graph type selection * Add link.self to all Dashboard cells; add bolt migrations * Make dash graph names only hover on contents * Consolidate timeRange format patterns, clean up * Add cell endpoints to dashboards * Include Line + Stat in Visualization Type list * Add cell link to dashboards * Enable step plot and stacked graph in Visualization * Overlay Technologies are summonable and dismissable * OverlayTechnologies saves changes to a cell * Convert NameableGraph to createClass for state This was converted from a pure function to encapsulate the state of the buttons. An attempt was made previously to store this state in Redux, but it proved too convoluted with the current state of the reducers for cells and dashboards. Another effort must take place to separate a cell reducer to manage the state of an individual cell in Redux in order for this state to be sanely kept in Redux as well. For the time being, this state is being kept in the component for the sake of expeditiousness, since this is needed for Dashboards to be released. A refactor of this will occur later. * Cells should contain a links key in server response * Clean up console logs * Use live data instead of a cellQuery fixture * Update docs for dashboard creation * DB and RP are already present in the Command field * Fix LayoutRenderer’s understanding of query schema * Return a new object, rather that mutate in place * Visualization doesn’t use activeQueryID * Selected is an object, not a string * QueryBuilder refactored to use query index instead of query id * CellEditorOverlay refactored to use query index instead of query id * ConfirmButtons doesn’t need to act on an item * Rename functions to follow convention * Queries are no longer guaranteed to have ids * Omit WHERE and GROUP BY clauses when saving query * Select new query on add in OverlayTechnologies * Add click outside to dash graph menu, style menu also * Change context menu from ... to a caret More consistent with the rest of the UI, better affordance * Hide graph context menu in presentation mode Don’t want people editing a dashboard from presentation mode * Move graph refreshing spinner so it does not overlap with context menu * Wire up Cell Menu to Overlay Technologies * Correct empty dashboard type * Refactor dashboard spec fixtures * Test syncDashboardCell reducer * Remove Delete button from graph dropdown menu (for now) * Update changelog
2017-03-24 00:12:33 +00:00
while true; do if fswatch -e "\.git" -r --one-event .; then echo "#-> Starting build: `date`"; make dev; pkill -9 chronograf; make run-dev & echo "#-> Build complete."; fi; sleep 0.5; done
ctags:
ctags -R --languages="Go" --exclude=.git --exclude=ui .