-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NodeMonitor: FE: +ReportDiffs, +NodeType/UserName:
* Rebase/Merge completed due to REST API reorg * ReportDiffs: Compares reports and highlights deviations based on thresholds. * NodeType/UserName: Displays node type and username alongside the address. * Unified BE/FE naming conventions and API endpoints for consistency. --- ReportDiffs enables comparison across all reports and provides average values. It supports three configurable thresholds, which can be adjusted in the settings. Threshold violations are visually highlighted: for subtables, the background of the button that toggles the detail view is marked based on the highest exceeded threshold.
- Loading branch information
Showing
32 changed files
with
2,128 additions
and
778 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
plugins { | ||
id("bisq.java-library") | ||
id("bisq.protobuf") | ||
application | ||
} | ||
|
||
|
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
71 changes: 71 additions & 0 deletions
71
apps/rest-api-app/src/main/java/bisq/rest_api/proto/AddressDetails.java
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,71 @@ | ||
/* | ||
* This file is part of Bisq. | ||
* | ||
* Bisq is free software: you can redistribute it and/or modify it | ||
* under the terms of the GNU Affero General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or (at | ||
* your option) any later version. | ||
* | ||
* Bisq 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 Affero General Public | ||
* License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package bisq.rest_api.proto; | ||
|
||
import bisq.common.proto.NetworkProto; | ||
import bisq.common.proto.Proto; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.ToString; | ||
import lombok.extern.slf4j.Slf4j; | ||
|
||
import static com.google.common.base.Preconditions.checkArgument; | ||
|
||
@Slf4j | ||
@Getter | ||
@EqualsAndHashCode | ||
@ToString | ||
@Schema(name = "AddressDetails") | ||
public final class AddressDetails implements NetworkProto { | ||
private final String address; | ||
private final String bondedRoleType; | ||
private final String nickNameOrBondUserName; | ||
|
||
public AddressDetails(String address, String bondedRoleType, String nickNameOrBondUserName) { | ||
this.address = address; | ||
this.bondedRoleType = bondedRoleType; | ||
this.nickNameOrBondUserName = nickNameOrBondUserName; | ||
} | ||
|
||
@Override | ||
public void verify() { | ||
checkArgument(address != null && address.length() > 0); | ||
checkArgument(bondedRoleType != null && bondedRoleType.length() > 0); | ||
checkArgument(nickNameOrBondUserName != null && nickNameOrBondUserName.length() > 0); | ||
} | ||
|
||
@Override | ||
public bisq.rest_api.protobuf.AddressDetails toProto(boolean serializeForHash) { | ||
return resolveProto(serializeForHash); | ||
} | ||
|
||
@Override | ||
public bisq.rest_api.protobuf.AddressDetails.Builder getBuilder(boolean serializeForHash) { | ||
return bisq.rest_api.protobuf.AddressDetails.newBuilder() | ||
.setAddress(this.address) | ||
.setBondedRoleType(this.bondedRoleType) | ||
.setNickNameOrBondUserName(this.nickNameOrBondUserName); | ||
} | ||
|
||
public static AddressDetails fromProto(bisq.rest_api.protobuf.AddressDetails proto) { | ||
return new AddressDetails(proto.getAddress(), | ||
proto.getBondedRoleType(), | ||
proto.getNickNameOrBondUserName()); | ||
} | ||
} |
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,10 @@ | ||
syntax = "proto3"; | ||
package rest_api; | ||
option java_package = "bisq.rest_api.protobuf"; | ||
option java_multiple_files = true; | ||
|
||
message AddressDetails { | ||
string address = 1; | ||
string bondedRoleType = 2; | ||
string nickNameOrBondUserName = 3; | ||
} |
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
Oops, something went wrong.