forked from openethereum/parity-ethereum
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UI server refactoring (openethereum#5580)
* Full API in Authenticated WS server. * Replacing UI server with Hyper. * Solving CLI, RPCs and tests. * Porting signer tests. * Fixing origin recognition for dapps/rpc. * Fixing tests. Adding parity-rpc-client to test. * Dapps exposed as RPC method. * JS code to support new connection scheme. * Fixing dapps tests. * Updating allowed origins/hosts to support web3.site. * Fixing tests, fixing UI. * Fixing tests. * Removing invalid tests. * Fixing merge. * 404 fallback for UI * Improve ContentFetcher constructor readability. * Naming. * Update .gitlab-ci.yml fix CI lint error * Fixing tests and linting issues. * Fixing new tests. * UI hosts. * Submodules fix.
- Loading branch information
Showing
91 changed files
with
2,177 additions
and
2,597 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -21,4 +21,3 @@ mod response; | |
mod types; | ||
|
||
pub use self::api::RestApi; | ||
pub use self::types::App; |
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,55 @@ | ||
// Copyright 2015-2017 Parity Technologies (UK) Ltd. | ||
// This file is part of Parity. | ||
|
||
// Parity is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
|
||
// Parity is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
|
||
// You should have received a copy of the GNU General Public License | ||
// along with Parity. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
use endpoint::EndpointInfo; | ||
|
||
#[derive(Debug, PartialEq, Clone, Serialize, Deserialize)] | ||
#[serde(deny_unknown_fields)] | ||
pub struct App { | ||
pub id: String, | ||
pub name: String, | ||
pub description: String, | ||
pub version: String, | ||
pub author: String, | ||
#[serde(rename="iconUrl")] | ||
pub icon_url: String, | ||
} | ||
|
||
impl App { | ||
/// Creates `App` instance from `EndpointInfo` and `id`. | ||
pub fn from_info(id: &str, info: &EndpointInfo) -> Self { | ||
App { | ||
id: id.to_owned(), | ||
name: info.name.to_owned(), | ||
description: info.description.to_owned(), | ||
version: info.version.to_owned(), | ||
author: info.author.to_owned(), | ||
icon_url: info.icon_url.to_owned(), | ||
} | ||
} | ||
} | ||
|
||
impl Into<EndpointInfo> for App { | ||
fn into(self) -> EndpointInfo { | ||
EndpointInfo { | ||
name: self.name, | ||
description: self.description, | ||
version: self.version, | ||
author: self.author, | ||
icon_url: self.icon_url, | ||
} | ||
} | ||
} |
Oops, something went wrong.