Giter VIP home page Giter VIP logo

btfs-webui's Introduction

BTFS Web UI

Check on your node stats, explore the IPLD powered merkle forest, see peers around the world and manage your files, without needing to touch the CLI.

Test the WebUI

After making changes to the WebUI repository, the updated changes can be viewed in the browser using the following steps:

Download the repo

git clone https://github.com/TRON-US/btfs-webui

CD into the btfs-webui repo. Then with node >= 8.12 and npm >= 6.4.1 installed, run

cd btfs-webui
npm install

Open a separate terminal and start the BTFS daemon. This will allow you to see the updated WebUI in your localhost:

btfs daemon

In your previous terminal, run the dev server:

npm start

The final output should be as such:

Compiled successfully!

You can now view btfs-webui in the browser.

  Local:            http://localhost:3000/
  On Your Network:  http://10.10.0.77:3000/

Note that the development build is not optimized.
To create a production build, use npm run build.

Paste the local host URL into your web browser to view the updated WebUI.

When working on the code, run a btfs daemon, the local dev server, the unit tests, and the storybook component viewer and see the results of your changes as you save files. For debugging follow this post

In separate shells run the following:

# Run BTFS
> btfs daemon
# Run the dev server @ http://localhost:3000
> npm start
# Run the unit tests
> npm test
# Run the UI component viewer @ http://localhost:9009
> npm run storybook

Configure BTFS API CORS headers

You must configure your BTFS API at http://0.0.0.0:5001 to allow cross-origin (CORS) requests from your dev server at http://localhost:3000

Easy mode

Run the cors-config.sh script with:

> ./cors-config.sh

The manual way

> btfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["http://localhost:3000"]'
> btfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "GET", "POST"]'

Reverting

To reset your config back to the default configuration, run the following command.

> btfs config --json API.HTTPHeaders {}

You might also like to copy the ~/.btfs/config file somewhere with a useful name so you can use btfs config replace <file> to switch your node between default and dev mode easily.

Build

To create an optimized static build of the app, output to the build directory:

# Build out the html, css & jss to ./build
> npm run build

Test

The following command will run the app tests, watch source files and re-run the tests when changes are made:

> npm test

The WebUI uses Jest to run the isolated unit tests. Unit test files are located next to the component they test and have the same file name, but with the extension .test.js

End-to-end tests

The end-to-end tests (e2e) test the full app in a headless Chromium browser. They require an http server to be running to serve the app.

In dev, run npm start in another shell before starting the tests

# Run the end-to-end tests
> npm run test:e2e

By default the test run headless, so you won't see the the browser. To debug test errors, it can be helpful to see the robot clicking around the site. To disable headless mode and see the browser, set the environment variable DEBUG=true

# See the end-to-end tests in a browser
> DEBUG=true npm run test:e2e

Coverage

To do a single run of the tests and generate a coverage report, run the following:

> npm run test:coverage

Lint

Perform standard linting on the code:

> npm run lint

Analyze

To inspect the built bundle for bundled modules and their size, first build the app then:

# Run bundle
> npm run analyze

Translations

The translations are stored on ./public/locales and the English version is the source of truth. We use Transifex to help us translate WebUI to another languages.

Release WebUI

After all changes have been made and tested, follow the steps below to release a new version of the BTFS WebUI:

  1. In the terminal, navigate to the btfs-webui directory. Then run npm run build. This builds the the WebUI files and places them in a newly created build folder.
  2. SSH into the first bootstrap node(/ip4/18.237.54.123/tcp/4001/p2p/QmWJWGxKKaqZUW4xga2BCzT5FBtYDL8Cc5Q5jywd6xPt1g). Then upload the build folder by running btfs add build/, and republish the new hash value to /btns/QmWJWGxKKaqZUW4xga2BCzT5FBtYDL8Cc5Q5jywd6xPt1g by running btfs name publish /btfs/$new_hash.
  3. SSH into all bootstrap nodes and run btfs name resolve /btns/QmWJWGxKKaqZUW4xga2BCzT5FBtYDL8Cc5Q5jywd6xPt1g.

License

MIT © TRON Foundation

btfs-webui's People

Contributors

59023g avatar alanshaw avatar atinux avatar caioalonso avatar daviddias avatar digital-dreamer avatar dignifiedquire avatar drathir avatar fsdiogo avatar gabe-hernandez-tron avatar grassias avatar greenkeeperio-bot avatar hacdias avatar harlantwood avatar harveyqiu avatar infinisil avatar jbenet avatar jirayudech avatar krl avatar lidel avatar luigiplr avatar mappum avatar olizilla avatar richardlitt avatar strml avatar travisperson avatar tsudoko avatar tycm4109 avatar uchetron avatar victorb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

btfs-webui's Issues

Web host wallet password allows you to set longer passwords than what are accepted during login

  • Create a new wallet at http://127.0.0.1:5001/hostui/#/wallet
  • Enter a password 64 characters of length or higher
  • The UI shows strong, matching password/confirmation
  • Click save and receive a success message, redirect to wallet login
  • Attempt to login with your password >64 characters
  • Password is not accepted
  • Reimport seed phrase, set password to 32 characters
  • Password is accepted

I started at 128, then 64, finally worked at 32.

Initializing daemon...
go-btfs version: 1.5.1-208e586
Repo version: 10
System version: amd64/windows
Golang version: go1.15.8

How to use BTFS with a dynamic IP?

With dynamic IP address - getting an error ''routing not found''

How to use a domain name in BTFS instead of IP address ?

Could someone please give details with a solution?

Use same system of units as hostui

Is your feature request related to a problem? Please describe.
webui always show different host size/repo size with hostui

Describe the solution you'd like
use same system of units

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
1

PUBLIC IP NOT VISIBLE IN WEBUI

PUBLIC IP NOT VISIBLE IN WEBUI

After restarting daemon stays there for few hrs.. then not staying there..

webui does not contains pub ip

Unable to list file in command line

Describe the bug
File added trough the command line cannot be listed

To Reproduce
Steps to reproduce the behavior:

  1. $ btfs add file_example_JPG_100kB.jpg
    added QmbBp5huHazG582ean3eGGwWXkkVKnRc7V5te16ByWNs2N file_example_JPG_100kB.jpg
  2. $ btfs files ls
    Nothing is listed - It is empty

Expected behavior
Should see the added file because upon checking the WebUI, I can see the file:
http://gateway.btfs.io/btfs/QmbBp5huHazG582ean3eGGwWXkkVKnRc7V5te16ByWNs2N

I'm running the following btfs version which is new:
$ btfs version
btfs version 1.3.4

Files added through CLI not showing in Web UI

When I add a file using the following command:

btfs add file1.txt
I cannot see the file when I'm looking at this link http://127.0.0.1:5001/btfs/webui

However, If I load a file or create a folder from the web ui, then I run this command in the terminal

btfs files ls
I can properly see the files in the CLI

Is there a way to fix this or am I missing something?

Kindly let me know your thoughts

Solved:Daemon Wont Start on Windows Server 2019

so on my server i noticed that my daemon exe wont start even under administrator and compatibility with windows 8 double click empty black box that just closes on its own but on my personal PC it works just fine running windows 10 im so confused what am i missing function wise that might cause this?

-- problem solved im just stupid thank you that is all

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.