Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Mode improvements for UI #3109

Merged
merged 17 commits into from
Nov 5, 2016
Merged

Mode improvements for UI #3109

merged 17 commits into from
Nov 5, 2016

Conversation

gavofyork
Copy link
Contributor

Addressing #3049.

@gavofyork gavofyork added the A3-inprogress ⏳ Pull request is in progress. No review needed at this stage. label Nov 2, 2016
@coveralls
Copy link

Coverage Status

Coverage increased (+0.004%) to 85.993% when pulling bfce244 on off-mode into 36d17d5 on master.

is active.
off - Parity never syncs at all (default: {flag_mode}).
dark - Parity syncs only when the RPC is active.
offline - Parity doesn't sync. (default: {flag_mode}).
Copy link
Contributor

Choose a reason for hiding this comment

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

auto not mentioned here, but is set as the default

@@ -67,11 +85,28 @@ impl Visitor for UserDefaultsVisitor {
let fat_db: Value = map.remove("fat_db".into()).unwrap_or_else(|| Value::Bool(false));
let fat_db = try!(fat_db.as_bool().ok_or_else(|| Error::custom("invalid fat_db value")));

let mode: Value = map.remove("mode".into()).unwrap_or_else(|| Value::String("active".to_owned()));
let mode = match try!(mode.as_str().ok_or_else(|| Error::custom("invalid mode value"))) {
"off" => Mode::Off,
Copy link
Collaborator

Choose a reason for hiding this comment

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

"offline" probably?

@gavofyork gavofyork added A0-pleasereview 🤓 Pull request needs code review. M4-core ⛓ Core client code / Rust. and removed A3-inprogress ⏳ Pull request is in progress. No review needed at this stage. labels Nov 4, 2016
[ci:skip]
@arkpar arkpar added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Nov 4, 2016
"off" => Ok(Mode::Off),
_ => Err(format!("{}: Invalid address for --mode. Must be one of active, passive or dark.", s)),
"offline" => Ok(Mode::Off),
_ => Err(format!("{}: Invalid value for --mode. Must be one of active, passive or dark.", s)),
Copy link
Contributor

Choose a reason for hiding this comment

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

...or offline?

@arkpar arkpar added A3-inprogress ⏳ Pull request is in progress. No review needed at this stage. and removed A8-looksgood 🦄 Pull request is reviewed well. labels Nov 4, 2016
*mode = mode.clone().into();
match *self.on_mode_change.lock() {
Some(ref mut f) => f(&*mode),
_ => {}
Copy link
Contributor

Choose a reason for hiding this comment

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

if let Some

@gavofyork gavofyork added A0-pleasereview 🤓 Pull request needs code review. and removed A3-inprogress ⏳ Pull request is in progress. No review needed at this stage. labels Nov 4, 2016

chown $USER $HOME/.parity $HOME/Library/LaunchAgents $HOME/Library/LaunchAgents/io.parity.ethereum.plist
mkdir -p $HOME/.parity/906a34e69aec8c0d
echo -n '{"fat_db":false,"mode":"passive","pruning":"archive","tracing":false}' > $HOME/.parity/906a34e69aec8c0d/user_defaults
Copy link
Collaborator

@arkpar arkpar Nov 4, 2016

Choose a reason for hiding this comment

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

"pruning":"archive"? That's harsh.

@arkpar arkpar added A4-gotissues 💥 Pull request is reviewed and has significant issues which must be addressed. and removed A0-pleasereview 🤓 Pull request needs code review. labels Nov 4, 2016
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 2024c05 on off-mode into * on master*.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 2024c05 on off-mode into * on master*.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 2024c05 on off-mode into * on master*.

@gavofyork gavofyork added A0-pleasereview 🤓 Pull request needs code review. B0-patch and removed A4-gotissues 💥 Pull request is reviewed and has significant issues which must be addressed. labels Nov 4, 2016
@arkpar arkpar added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Nov 4, 2016
@gavofyork gavofyork merged commit 744501c into master Nov 5, 2016
@gavofyork gavofyork deleted the off-mode branch November 5, 2016 09:38
arkpar pushed a commit that referenced this pull request Nov 5, 2016
* `--mode=off` now works.

* Add Mode::Off as a persistent CLI option.

* "last" not "auto" as default.

* Commit accidentally unsaved file.

* Whitespace

[ci:skip]

* Mode CLI parse fix

* or offline

* Save mode when it gets changed.

* Fix Offline mode

* Fix up mode operations.

* Make passive default, but not overriding.

* Fix test

* Maybe not everyone wants to run an archive node...
gavofyork pushed a commit that referenced this pull request Nov 5, 2016
* Mode improvements for UI (#3109)

* `--mode=off` now works.

* Add Mode::Off as a persistent CLI option.

* "last" not "auto" as default.

* Commit accidentally unsaved file.

* Whitespace

[ci:skip]

* Mode CLI parse fix

* or offline

* Save mode when it gets changed.

* Fix Offline mode

* Fix up mode operations.

* Make passive default, but not overriding.

* Fix test

* Maybe not everyone wants to run an archive node...

* Parity configuration settings, i.e. mode (#3212)

* Add initial page

* Add parity icon

* opacity for parity icon

* Mode selector

* Actually set mode when value changes
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well. M4-core ⛓ Core client code / Rust.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants