Skip to content

Commit

Permalink
Merge branch 'main' into frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizcky committed Apr 29, 2024
2 parents b70714b + 6e49bfc commit 5c86053
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 36 deletions.
73 changes: 41 additions & 32 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 17 additions & 1 deletion kraken/src/api/handler/data_export/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use actix_web::web::Json;
use actix_web::web::Path;
use chrono::Utc;
use futures::TryStreamExt;
use log::error;
use rorm::and;
use rorm::query;
use rorm::FieldAccess;
Expand Down Expand Up @@ -259,30 +260,45 @@ pub(crate) async fn export_workspace(
host: None,
port: None,
service: None,
http_service: None,
..
} => (*fm.key(), AggregationType::Domain),
FindingAffected {
domain: None,
host: Some(fm),
port: None,
service: None,
http_service: None,
..
} => (*fm.key(), AggregationType::Host),
FindingAffected {
domain: None,
host: None,
port: Some(fm),
service: None,
http_service: None,
..
} => (*fm.key(), AggregationType::Port),
FindingAffected {
domain: None,
host: None,
port: None,
service: Some(fm),
http_service: None,
..
} => (*fm.key(), AggregationType::Service),
_ => return ready(Err(ApiError::InternalServerError)),
FindingAffected {
domain: None,
host: None,
port: None,
service: None,
http_service: Some(fm),
..
} => (*fm.key(), AggregationType::HttpService),
FindingAffected {uuid, ..} => {
error!("Invalid \"findingaffected\": {uuid}. This means a) invalid db state or b) programmer forgot a match arm.");
return ready(Err(ApiError::InternalServerError));
}
};
ready(Ok((*x.finding.key(), aggr_uuid, aggr_type)))
})
Expand Down
2 changes: 1 addition & 1 deletion kraken_frontend/src/views/workspace/workspace-data.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ export default function WorkspaceData(props: WorkspaceDataProps) {
<span>{httpService.comment}</span>
<Severity
severity={httpService.severity}
dataType={"Service"}
dataType={"HttpService"}
uuid={httpService.uuid}
workspace={workspace}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ export const WorkspaceFindingDataTable = forwardRef<WorkspaceFindingDataTableRef
<span>{httpService.comment}</span>
<Severity
severity={httpService.severity}
dataType={"Service"}
dataType={"HttpService"}
uuid={httpService.uuid}
workspace={workspace}
/>
Expand Down
2 changes: 1 addition & 1 deletion sdk/rust-kraken-sdk/src/sdk/domains.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ impl KrakenClient {
domain: Uuid,
) -> KrakenResult<DomainRelations> {
self.get(&format!(
"api/v1/workspaces/{workspace}/domain/{domain}/relations"
"api/v1/workspaces/{workspace}/domains/{domain}/relations"
))
.send()
.await
Expand Down

0 comments on commit 5c86053

Please sign in to comment.