-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from sudomesh/devtools
Dashboard development sans node
- Loading branch information
Showing
9 changed files
with
457 additions
and
61 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
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,25 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Use this script to deploy the dashboard app | ||
# to a home node. You might want to do this to test a new | ||
# version of the dashboard. | ||
|
||
set -e | ||
|
||
# NODE_IP is 172.30.0.1 by default | ||
NODE_IP=${1:-"172.30.0.1"} | ||
DEST_DIR=/www | ||
|
||
echo "Executing npm run build-prod..." | ||
npm run build-prod | ||
|
||
echo "Copying build/ to root@$NODE_IP:$DEST_DIR" | ||
read -r -p "Are you sure? This will overwrite the $DEST_DIR folder on your node. [yN] " response | ||
|
||
if [[ "$response" == "y" ]] | ||
then | ||
scp -r build/* root@$NODE_IP:$DEST_DIR | ||
else | ||
echo "Yeah... maybe you should back that up first. Aborting." | ||
fi | ||
|
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,17 @@ | ||
import config from '../config.js' | ||
import routerInfo from './stubs/getRouterInfo.stub.js' | ||
import env from '../env.js' | ||
|
||
function getRouterInfo() { | ||
return fetch(config.infogatherUrl).then((res) => res.text()) | ||
} | ||
|
||
function getRouterInfoStub() { | ||
return routerInfo | ||
} | ||
|
||
const useStubs = env === 'development' | ||
|
||
export default { | ||
getRouterInfo: useStubs ? getRouterInfoStub : getRouterInfo | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.