forked from graphsense/graphsense-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
261 additions
and
83 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 |
---|---|---|
@@ -1,6 +1,19 @@ | ||
include .env | ||
|
||
API_ELM=openapi/src/Api.elm | ||
|
||
openapi: | ||
tools/generate-openapi.sh | ||
tools/generate-openapi.sh $(OPENAPI_LOCATION) | ||
#--global-property=debugModels \ | ||
#--global-property=debugOperations \ | ||
|
||
watch: | ||
find . -name \*.elm | entr make dev | ||
|
||
dev: $(API_ELM) $(wildcard src/**) | ||
npx elm-test | ||
|
||
$(API_ELM): $(wildcard templates/*) | ||
make openapi | ||
|
||
.PHONY: openapi |
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
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
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 |
---|---|---|
@@ -1,23 +1,33 @@ | ||
module Init exposing (init) | ||
|
||
import Api.Data | ||
import Browser.Navigation as Nav | ||
import Effect exposing (Effect(..), n) | ||
import Iknaio | ||
import Locale.Init as Locale | ||
import Model exposing (..) | ||
import RemoteData exposing (RemoteData(..)) | ||
import Url exposing (Url) | ||
|
||
|
||
init : Flags -> Url -> key -> ( Model key, Effect ) | ||
init _ url key = | ||
( { url = url | ||
, key = key | ||
, locale = Locale.init | ||
, theme = Iknaio.theme | ||
, search = () | ||
, user = () | ||
, stats = Api.Data.Stats Nothing Nothing Nothing | ||
} | ||
, GetStatisticsEffect | ||
) | ||
n | ||
{ url = url | ||
, key = key | ||
, locale = Locale.init | ||
, theme = Iknaio.theme | ||
, search = () | ||
, user = () | ||
, stats = NotAsked | ||
} | ||
|> getStatistics | ||
|
||
|
||
getStatistics : ( Model key, Effect ) -> ( Model key, Effect ) | ||
getStatistics ( model, eff ) = | ||
if model.stats == NotAsked then | ||
( { model | stats = Loading } | ||
, Effect.batch [ eff, GetStatisticsEffect ] | ||
) | ||
|
||
else | ||
( model, eff ) |
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
Oops, something went wrong.