Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #126

Merged
merged 7 commits into from
Nov 21, 2018
Merged

Fixes #126

merged 7 commits into from
Nov 21, 2018

Conversation

bucko13
Copy link
Contributor

@bucko13 bucko13 commented Nov 20, 2018

Came across some things that needed to be fixed when testing recently:

  • the network check before running npm install and setting up remote plugins wasn't working properly. I fixed the logic around this and added better logging. (I noticed this was still an issue when developing while on the train recently 😄)
  • some linting nits
  • the bcrypto api changed a bit which was breaking the our use of the hash for sidebar checksums
  • added styling for the table header so that long titles get shortened with an ellipses.

@pinheadmz
Copy link
Member

truncate table header overflow LGTM, tested locally before/after with narrow window width and looks good! The other commits I'm not sure how to test...?

@bucko13
Copy link
Contributor Author

bucko13 commented Nov 21, 2018

To test the npm stuff you can just try and run bPanel locally with and without internet connection. If you’ve already got things installed you should be able to turn the server on and off and add new local plugins without anything getting cleared. Also any other packages you have npm linked (like if you’re working on @bpanel/bpanel-ui) those should be maintained since npm install should be skipped.

Thanks for asking! Probably better practice to lay out these steps when creating the PR.

@pinheadmz
Copy link
Member

Remote plugin install without internet:

$ bpanel-cli i simple-wallet
[error] There was a problem on installation: getaddrinfo ENOTFOUND www.npmjs.org www.npmjs.org:443

... I know I entered the plugin name wrong there but I think i should have gotten "Skipping npm install of remote plugins due to lack of network connection" right?

Local install without internet:
$ bpanel-cli i -l bui

error: No network connection found.
info: Skipping npm install of remote plugins due to lack of network connection
info: Creating symlink for local plugin bui...

(local plug-in does appear in bpanel even withut internet, nice!)

with internet, bad plugin name:

$ bpanel-cli i simple-wallet
[warning] simple-wallet does not exist on npm. Use option '--local' if installing a local plugin. Skipping...

Probably better practice to lay out these steps when creating the PR.
Or add tests where applicable? Although testing without network connection is probably hard to do through mocha :-)

@bucko13
Copy link
Contributor Author

bucko13 commented Nov 21, 2018

Ah, good catch! so actually I think that error might be thrown in bPanel-cli and not bPanel. bPanel-cli checks if a remote plugin exists before adding it to the config and bpanel’s build-plugins.js checks before running an npm install which only happens when the config is updated. So it’s actually never even getting to the checks added in this PR for that part. Means we should add better error messaging around that for bPanel-cli too

And yeah, this is a tough thing to add tests for. It’s really an integration test rather than a unit test type of situation which we don’t have the infrastructure for yet :-/

Copy link
Member

@pinheadmz pinheadmz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :-)

@bucko13 bucko13 merged commit 8b0aa43 into development Nov 21, 2018
@bucko13 bucko13 deleted the fixes branch November 21, 2018 21:19
bucko13 added a commit that referenced this pull request Feb 19, 2019
* clientFactory: update client conf handling (#97)

* index: loading animation (#98)

* bugfix: works over tls (#100)

* bugfix: works over tls

* bugfix: account for when port is undefined

* build-plugins: Loading, docker, and plugin-config tweaks (#102)

* Loading and docker tweaks

* Plugins can be overridden with cli or env configs

* Plugins config survives space padding

* footer: update stylings, add attribution, include node pool info (#105)

* feature: expose react-router to plugins (#106)

* router: send supported services with client info (#107)

* check for existence of client

* separate config check for multisig

* fix linting error

* put services in object

* server: Socket Manager (#103)

* test scaffolding for server side tests

* better logging on new socket for legacy system

* SocketManager basic functionality

* passing tests for subscriptions and for multiple connections

* add dispatch support

* add support for multiple client types and unsubscribe

* migrate from socketHandler to socketManager and cleanup

* package-lock

* docker: hsd update (#108)

* update package versions and cleanup

* fixes for docker environment bugs

* some cleanup

* webpack: add support for user specified api keys in bpanel config directory (#112)

* add support for user specified api keys in bpanel config directory

* nit: declaration in function scope

* store: switch network (#109)

* move reducer composer into own file

* update node info on network switch

* working reset state

* persist currentClient

* fix currentClient check

* update bpanel-util version

* add warnings about client info chain

* add all clients to socketManager

* Add STATE_REFRESHED support for better signaling and constants cleanup

* updated packages

* routes: Client config endpoints (#113)

* finished createConfig functionality with tests

* update for force support

* update GET endpoint for statusCheck and full configs scrubbed of keys and tokens

* send which nodes are failing for GET

* add delete endpoint

* add PUT route

* update API for more efficient network checking, and being more explicit with reporting errors (no more nested try/catch/if/else. Also updated status api to 'health'

* bugfix: pull in resolves lost in rebase (#115)

* server: Cleanup and remove deprecated endpoints  (#114)

* cleanup deprecated endpoints

* remove unecessary code for default client.
also moves out some config helpers into the helpers file

* Modularize api (#116)

* cleanup deprecated endpoints

* remove unecessary code for default client.
also moves out some config helpers into the helpers file

* modularize api endpoints for clients

* fix bug with clients POST handler

* remove need for closures in endpoint handlers

* cleanup

* bugfix: remove bcoinuri (#119)

* deps: bump bpanel-ui (#118)

* server: api filters - blacklisting (#117)

* cleanup deprecated endpoints

* remove unnecessary code for default client.
also moves out some config helpers into the helpers file

* modularize api endpoints for clients

* fix bug with clients POST handler

* add basic blacklist support

* add consistent error response

* remove need for closures in endpoint handlers

* flexible blacklisting with RegExp

* cleanup delete handler

* error catching cleanup

* update custom catchall error handler

* move blacklisting to top of middleware stream

* deps: bump bmultisig (#121)

* Backend plugins (#120)

* add backend plugin endpoints

* set clientsMap on request object

* build-plugins: add check for correct versions of npm and node (#123)

* add check for correct versions of npm and node

* add warning about path and fix typo

* socketmanager: socket proxy (#122)

* add backend support for client side node via wsproxy

* set the socket port in the app store so other parts of the app can retrieve it

* set socket port from environment

* Fixes (#126)

* truncate table header overflow

* lint fixes

* update network check behavior for plugin installation

* update network status check

* deps: remove bad dep (#127)

* SocketManager: Disconnect sockets (#124)

* testing subscription handling

* add support for unsubscribing on disconnect

* update package-lock

* add more clarifying comments and cleanup

* update version of bcrypto

* update nav-actions crypto algo

* themeGenerator: add selectable and hover row CSS (#125)

* vendor: add license (#131)

* vendor: add license

* bugfix

* webapp: viewport tag for mobile (#133)

* package.json: stability (#135)

* update karma

* stabalize package versions

* stabalize versions

* server: client configs refactor (#132)

* update handling of client errors

* update version of bcrypto

* update nav-actions crypto algo

* sanitize empty strings from client options

* label styles in theme config

* add package constants

* optimize dll webpack build

* support for node-host or host config options

* add support for checking if config's chain matches with node

* expose pkg file

* add support to reset clients without restarting the server

* add client and make bsert available via webpack

* cleanup api

* cleanup

* add reducer to remove client config

* clients updates for health/status check

* update client reducer replaces whole previous client state

* add new styles for Paper component

* log health status message

* package: update dependencies (#136)

* Panel: Loadable fix (#138)

* fix lint command

* remove react loadable

* server: add process.title (#142)

* configs: ignore argv (#140)

* client configs: ignore argv

* server: join client prefix path

* api: remove add, update, and delete config endpoints (#139)

* add, update, and delete config endpoints removed from core

* add handler for health check

* update backend plugin api to support before _and_ after core middleware

* support custom log levels

* index.html: add base to html template (#145)

* theme: add modal styles (#143)

* basic modal styles

* update styling

* update paper styling

* bump bpanel-ui

* fixes for sidebar ordering and client health (#146)

* update client and services handling

* keep pathName if passed

* fix empty socket bug and bump bpanel-ui

* fix startup server bug

* cleanup

* bugfix: remove extra div (#147)

* theme: remove z-index (#149)

* clients: support for startup with no clients (#152)

* refactor for try/catch around new connection handling

* return 404 for no default client found

* update server to allow for no available client configs

* catch situations on server where no default config or client

* handle situation on app mount where there is no default config

* reset state when clearing current client

* update deps

* Preset 0 (#153)

* upgrade from preset-3 to preset-0

* remove carrot

* theme: fixes for bwallet polish (#155)

* fixes to default modal, requires update for bpanel-ui

* version bumps

* Docker: fix builds (#157)

* Docker: fix builds

* remove extra whitespace

* bugfix: git parse, handshake deps

* bugfix: allow for nginx to route properly

* bpanel: expose tls port

* add details to README

* add gitkeep for local plugins folder

* package: bump -utils to 0.1.7 (#162)

adds support for isSpv check in client. Needed for recent blocks update.

* remove lookbehind (#160)

* remove lookbehind

* support spaces in agent string

* server: Consolidate loggers (#161)

* deps: remove winston plus other deps

* logger: convert to blgr from winston

* fix tests

* working blgr w/ bpanel configs and cleanup

* package.json: update dependencies (#163)

* preinstall: start with settings and connection-manager plugins (#164)

* start with settings and connection-manager plugins

* remove bui

* scripts: typo (#166)

* server: multisig updates (#168)

* github bmultisig and multisig serve default false

* default to multisig false

* fix host config bug

* add clientsDir listener after endpoints are setup

* docs: self signed cert helper (#172)

* store: Persist state for whitelisted plugins (#174)

* track state of rehydration to fix persistence with clientsHydrated

* bugfix: old browserslist (#176)

* bugfix: old browserslist

* deps: update

* update packages (#178)

* update packages

* update bledger

* fix so that localhost is properly used as fallback for client factory (#181)

* bcoin wallet pagination test: docker container and init script (#167)

* delink from local datadir

* use braydonf wallet-pag branch

* warning in readme

* switch to pinheadmz wall-pag branch

* reenable local datadir

* new init script wallet acct setup

* working init script

* revert readme

* fix mining bug

* randomize acct segwit bool

* switch to bcoin-expirimental

* fix dummy-wallets coinbase maturity

* comments

* workaround restarts

* make pagination script default init

* Fix "account not found" error (#182)

* fix docker image (#185)

* Patches (#186)

* simpler script, update readme, and update deps

* connect socket on app mount
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants