-
Notifications
You must be signed in to change notification settings - Fork 26
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
23 changed files
with
463 additions
and
241 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 |
---|---|---|
|
@@ -33,4 +33,5 @@ tmp/ | |
config.yml | ||
memento | ||
.dump/ | ||
.volumes | ||
.volumes | ||
/web/assets/css/tailwind.min.css |
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,37 +1,5 @@ | ||
package api | ||
|
||
import ( | ||
"github.com/Alethio/memento/api/types" | ||
) | ||
|
||
const MaxBlocksInRange = 300 | ||
|
||
var DBEntries = types.DBEntries{ | ||
Blocks: types.Stat{Name: "Blocks", Icon: "cube-outline", Color: "green"}, | ||
Txs: types.Stat{Name: "Transactions", Icon: "swap-horizontal-circle-outline", Color: "green"}, | ||
Uncles: types.Stat{Name: "Uncles", Icon: "file-tree", Color: "green"}, | ||
LogEntries: types.Stat{Name: "Log entries", Icon: "file-outline", Color: "green"}, | ||
} | ||
|
||
var DBStats = types.DBStats{ | ||
DataSize: types.Stat{Name: "Data size", Icon: "file-document-box-outline", Color: "purple"}, | ||
IndexesSize: types.Stat{Name: "Indexes size", Icon: "table-search", Color: "purple"}, | ||
TotalSize: types.Stat{Name: "Total size", Icon: "database", Color: "purple"}, | ||
MigrationsVersion: types.Stat{Name: "Migrations version", Icon: "source-branch", Color: "purple"}, | ||
MaxBlock: types.Stat{Name: "Highest processed block", Icon: "cube-send", Color: "blue"}, | ||
} | ||
|
||
var ProcStats = types.ProcStats{ | ||
MemoryUsage: types.Stat{Name: "Current memory usage", Icon: "memory", Color: "orange"}, | ||
TodoLength: types.Stat{Name: "Tasks in todo", Icon: "clipboard-list-outline", Color: "blue"}, | ||
ReorgedBlocks: types.Stat{Name: "Reorganized blocks", Icon: "link-variant-off", Color: "blue"}, | ||
InvalidBlocks: types.Stat{Name: "Validation fails", Icon: "alert-circle-outline", Color: "blue"}, | ||
} | ||
|
||
var TimingStats = types.TimingStats{ | ||
ProcessingTime: types.Stat{Name: "Total time / block", Icon: "clock-outline", Color: "orange"}, | ||
ScrapingTime: types.Stat{Name: "Scraping time / block", Icon: "flip-horizontal", Color: "orange"}, | ||
IndexingTime: types.Stat{Name: "Indexing time / block", Icon: "card-search-outline", Color: "orange"}, | ||
} | ||
|
||
var ViperIgnoredSettings = []string{"to", "from", "block", "version", "db.connection-string"} |
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
Large diffs are not rendered by default.
Oops, something went wrong.
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,5 +1,5 @@ | ||
{{ define "block" }} | ||
<p class="font-bold text-white bg-blue-500 px-4 py-1 text-lg sm:text-xl inline rounded-xl block-shadow"> | ||
<p class="font-bold text-white bg-blue-500 px-4 py-1 text-lg sm:text-xl inline rounded-xl blue-shadow"> | ||
#{{ . }} | ||
</p> | ||
{{ end }} |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{{ define "form-button" }} | ||
<button class="px-4 py-2 my-2 bg-blue-500 font-bold text-sm text-white rounded border border-blue-500 hover:bg-white hover:text-blue-500 transition blue-shadow"> | ||
{{ . }} | ||
</button> | ||
{{ end }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,8 +1,3 @@ | ||
{{ define "page-title" }} | ||
<div class="mt-6 sm:mt-10 flex items-center"> | ||
<div class="px-4 py-2 mr-4 rounded-xl flex items-center justify-center bg-white"> | ||
<span class="mdi mdi-{{ .Icon }} text-3xl text-blue-900"></span> | ||
</div> | ||
<h1 class="text-2xl text-blue-900">{{ .Title }}</h1> | ||
</div> | ||
<h1 class="text-2xl text-blue-900 font-bold mb-10">{{ .Title }}</h1> | ||
{{ end }} |
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,17 +1,39 @@ | ||
{{ define "stat" }} | ||
<div class="w-full sm:w-1/2 lg:w-1/4"> | ||
<div class="py-2 sm:py-0 sm:m-4"> | ||
<div class="py-2 sm:py-0 bg-white w-full rounded-xl flex"> | ||
<div class="flex items-center px-4" role="icon"> | ||
<div class="flex items-center justify-center w-10 h-10 bg-{{ .Color }}-100 rounded-xl"> | ||
<span class="mdi mdi-{{ .Icon }} text-{{ .Color }}-600 text-2xl"></span> | ||
</div> | ||
</div> | ||
<div class="py-2 sm:py-4 flex w-full flex-col"> | ||
<p class="text-blue-900 font-bold text-2xl" style="line-height: 26px">{{ .Value }}</p> | ||
<p class="text-grey-600 text-xs" style="line-height: 14px">{{ .Name }}</p> | ||
</div> | ||
</div> | ||
<div class="bg-white rounded-xl border border-gray-300 w-full py-4 flex flex-col items-center m-4"> | ||
<div class="flex items-center justify-center w-10 h-10 rounded-xl bg-{{.Color}}-100"> | ||
<span class="mdi mdi-{{.Icon}} text-2xl text-{{.Color}}-600"></span> | ||
</div> | ||
<p class="text-blue-900 text-2xl font-bold leading-tight mt-4">{{ .Value }}</p> | ||
<p class="text-gray-500 text-xs font-semibold">{{ .Name }}</p> | ||
</div> | ||
{{ end }} | ||
|
||
{{ define "stat-highlight" }} | ||
<div class="bg-{{ .Color }}-500 rounded-xl border border-gray-300 w-full py-4 flex flex-col items-center m-4"> | ||
<div class="flex items-center justify-center w-10 h-10 rounded-xl bg-{{.Color}}-400"> | ||
<span class="mdi mdi-{{.Icon}} text-2xl text-white"></span> | ||
</div> | ||
<p class="text-white text-2xl font-bold leading-tight mt-4">{{ .Value }}</p> | ||
<p class="text-white text-xs font-semibold">{{ .Name }}</p> | ||
</div> | ||
{{ end }} | ||
|
||
{{ define "stat-inline" }} | ||
<div class="flex items-center justify-center w-10 h-10 rounded-xl bg-{{.Color}}-100 mr-2"> | ||
<span class="mdi mdi-{{.Icon}} text-2xl text-{{.Color}}-600"></span> | ||
</div> | ||
<div class="flex flex-col"> | ||
<p class="text-blue-900 text-2xl font-bold leading-tight">{{ .Value }}</p> | ||
<p class="text-gray-500 text-xs font-semibold">{{ .Name }}</p> | ||
</div> | ||
{{ end }} | ||
|
||
{{ define "stat-inline-chart" }} | ||
<div class="flex justify-center w-2 mr-2 mt-3"> | ||
<span class="rounded-full w-2 h-2" style="background-color: {{.Color}}"></span> | ||
</div> | ||
<div class="flex flex-col"> | ||
<p class="text-blue-900 text-2xl font-bold leading-tight">{{ .Value }}</p> | ||
<p class="text-gray-500 text-xs font-semibold">{{ .Name }}</p> | ||
</div> | ||
{{ end }} |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.