Disable UI if it's not compiled in. (#5773)

* Disable UI if it's not compiled in.

* Properly enabled/disable ui server depending on features.
This commit is contained in:
Tomasz Drwięga 2017-06-09 12:26:57 +02:00 committed by Gav Wood
parent 5c3ea4ec29
commit 4c516e1f6f
3 changed files with 5 additions and 4 deletions

View File

@ -72,13 +72,14 @@ daemonize = "0.2"
[features]
default = ["ui-precompiled"]
ui = [
"dapps",
"ui-enabled",
"parity-dapps/ui",
]
ui-precompiled = [
"dapps",
"ui-enabled",
"parity-dapps/ui-precompiled",
]
ui-enabled = ["dapps"]
dapps = ["parity-dapps"]
ipc = ["ethcore/ipc", "ethsync/ipc"]
jit = ["ethcore/jit"]

View File

@ -1036,7 +1036,7 @@ impl Configuration {
self.args.flag_geth ||
self.args.flag_no_ui;
!ui_disabled
!ui_disabled && cfg!(feature = "ui-enabled")
}
fn verifier_settings(&self) -> VerifierSettings {

View File

@ -102,7 +102,7 @@ impl From<UiConfiguration> for HttpConfiguration {
impl Default for UiConfiguration {
fn default() -> Self {
UiConfiguration {
enabled: true,
enabled: true && cfg!(feature = "ui-enabled"),
port: 8180,
interface: "127.0.0.1".into(),
hosts: Some(vec![]),