Skip to content
Snippets Groups Projects
Unverified Commit e212795a authored by jkrvivian's avatar jkrvivian Committed by GitHub
Browse files

Refactor: Rename SPA to Dashboard (#336)

parent 02e044d0
No related branches found
No related tags found
No related merge requests found
Showing
with 16 additions and 16 deletions
......@@ -10,7 +10,7 @@ const (
PriorityAutopeering
PriorityGossip
PriorityWebAPI
PrioritySPA
PriorityDashboard
PriorityGraph
PrioritySpammer
PriorityBadgerGarbageCollection
......
......@@ -2,11 +2,11 @@ package ui
import (
"github.com/iotaledger/goshimmer/plugins/graph"
"github.com/iotaledger/goshimmer/plugins/spa"
"github.com/iotaledger/goshimmer/plugins/dashboard"
"github.com/iotaledger/hive.go/node"
)
var PLUGINS = node.Plugins(
spa.PLUGIN,
dashboard.PLUGIN,
graph.PLUGIN,
)
......@@ -3,6 +3,6 @@
// You can use the "packr clean" command to clean up this,
// and any other packr generated files.
package spa
package dashboard
import _ "github.com/iotaledger/goshimmer/plugins/spa/packrd"
import _ "github.com/iotaledger/goshimmer/plugins/dashboard/packrd"
package spa
package dashboard
import (
"encoding/hex"
......@@ -42,14 +42,14 @@ func runDrngLiveFeed() {
}
})
daemon.BackgroundWorker("SPA[DRNGUpdater]", func(shutdownSignal <-chan struct{}) {
daemon.BackgroundWorker("Dashboard[DRNGUpdater]", func(shutdownSignal <-chan struct{}) {
drng.Instance.Events.Randomness.Attach(notifyNewRandomness)
drngLiveFeedWorkerPool.Start()
<-shutdownSignal
log.Info("Stopping SPA[DRNGUpdater] ...")
log.Info("Stopping Dashboard[DRNGUpdater] ...")
drng.Instance.Events.Randomness.Detach(notifyNewRandomness)
newMsgRateLimiter.Stop()
drngLiveFeedWorkerPool.Stop()
log.Info("Stopping SPA[DRNGUpdater] ... done")
}, shutdown.PrioritySPA)
log.Info("Stopping Dashboard[DRNGUpdater] ... done")
}, shutdown.PriorityDashboard)
}
package spa
package dashboard
import (
"net/http"
......
# GoShimmer SPA
# GoShimmer Dashboard
Programmed using modern web technologies.
### SPA in dev mode
### Dashboard in dev mode
1. Make sure to set `dashboard.dev` to true, to enable GoShimmer to serve assets
from the webpack-dev-server.
......@@ -10,15 +10,15 @@ Programmed using modern web technologies.
3. Run a webpack-dev-server instance by running `yarn start` within the `frontend` directory.
4. Using default port config, you should now be able to access the dashboard under http://127.0.0.1:8081
The SPA is hot-reload enabled.
The Dashboard is hot-reload enabled.
### Pack your changes
We are using [packr2](https://github.com/gobuffalo/packr/tree/master/v2) to wrap all built frontend files into Go files.
1. [Install `packr2`](https://github.com/gobuffalo/packr/tree/master/v2#binary-installation) if not already done.
2. Build SPA by running `yarn build` within the `frontend` directory.
2. Build Dashboard by running `yarn build` within the `frontend` directory.
3. Change to the `plugins/spa` directory.
4. Run `packr2`.
5. `plugins/spa/packrd` should have been modified.
6. Done. Now you can build goShimmer and your SPA changes will be included within the binary.
6. Done. Now you can build goShimmer and your Dashboard changes will be included within the binary.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment