Skip to content

Commit

Permalink
Add demo and quick documentation for UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Yevhen Zavhorodnii committed Nov 25, 2024
1 parent ac82a8f commit d81ed10
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ repos:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/dnephin/pre-commit-golang
rev: v0.5.0
hooks:
- id: go-fmt
- id: go-imports
- id: no-go-testing
- id: golangci-lint
- id: go-unit-tests
- id: go-unit-tests
Binary file added docs/edit-model.mp4
Binary file not shown.
26 changes: 26 additions & 0 deletions docs/mode-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,29 @@ The server is using [gin](https://github.com/gin-gonic/gin) to serve HTTP connec

- do not support [includes](./includes.md)
- single threaded - because of dependency on running graphviz as a process

## Edit feature

In server mode you can also go and edit model, run analysis on it in UI. The feature is under development and that's only very first iteration is ready.
But most viable product here would be adding an ability to do changes to your model via UI.

Here’s a quick demonstration of the project:

<video width="600" controls>
<source src="./edit-model.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>

Or download and play it locally:

[Download Video](videos/my-video.mp4)

Most important note that the model is fully in the memory of the browser and to store it somewhere you need to export it to your hard drive.

The UI is fully based on the [schema.json](../support/schema.json).

There are a lot of improvements for the feature such as:

1. Allow adding custom risk tracking (currently it's broken).
2. Improve changing technical assets (remember all of dragging around).
3. Add question mark with explanation for each field.
2 changes: 1 addition & 1 deletion pkg/server/execute.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ func (s *server) editModelAnalyze(ginContext *gin.Context) {
}

ginContext.JSON(http.StatusOK, gin.H{
"message": "JSON received successfully",
"message": "Analyzed successfully",
"data": result,
})
}

0 comments on commit d81ed10

Please sign in to comment.