-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into feature/cosv-on-cre…
…ating#2532
- Loading branch information
Showing
20 changed files
with
272 additions
and
56 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
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
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
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
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
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
29 changes: 29 additions & 0 deletions
29
...ain/kotlin/com/saveourtool/save/frontend/components/views/vuln/VulnerabilityRawDataTab.kt
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,29 @@ | ||
@file:Suppress("FILE_NAME_MATCH_CLASS", "HEADER_MISSING_IN_NON_SINGLE_CLASS_FILE") | ||
|
||
package com.saveourtool.save.frontend.components.views.vuln | ||
|
||
import com.saveourtool.save.entities.cosv.VulnerabilityExt | ||
import com.saveourtool.save.frontend.externals.jsonview.reactJson | ||
import react.FC | ||
import react.Props | ||
|
||
import kotlinx.serialization.encodeToString | ||
import kotlinx.serialization.json.Json | ||
|
||
val vulnerabilityRawDataTab: FC<VulnerabilityRawDataTabProps> = FC { props -> | ||
reactJson { | ||
src = JSON.parse(Json.encodeToString(props.vulnerability.cosv)) | ||
name = false | ||
theme = "bright:inverted" | ||
} | ||
} | ||
|
||
/** | ||
* [Props] of vulnerability changes tab component | ||
*/ | ||
external interface VulnerabilityRawDataTabProps : Props { | ||
/** | ||
* Vulnerability identifier | ||
*/ | ||
var vulnerability: VulnerabilityExt | ||
} |
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
38 changes: 38 additions & 0 deletions
38
save-frontend/src/main/kotlin/com/saveourtool/save/frontend/externals/jsonview/JsonView.kt
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,38 @@ | ||
@file:Suppress("HEADER_MISSING_IN_NON_SINGLE_CLASS_FILE", "FILE_NAME_MATCH_CLASS") | ||
@file:JsModule("react-json-view") | ||
@file:JsNonModule | ||
|
||
package com.saveourtool.save.frontend.externals.jsonview | ||
|
||
import react.FC | ||
import react.Props | ||
import kotlin.js.Json | ||
|
||
/** | ||
* External declaration of [reactJson] react component | ||
*/ | ||
@JsName("default") | ||
external val reactJson: FC<ReactJsonViewProps> | ||
|
||
/** | ||
* Props of [ReactJsonViewProps] | ||
*/ | ||
external interface ReactJsonViewProps : Props { | ||
/** | ||
* Input JSON | ||
*/ | ||
var src: Json | ||
|
||
/** | ||
* name : {} or no name in case of false | ||
*/ | ||
var name: Boolean | ||
|
||
/** | ||
* theme for the background | ||
*/ | ||
var theme: String | ||
// FixMe: onAdd?: ((add: InteractionProps) => false | any) | false; | ||
// FixMe: onEdit?: ((edit: InteractionProps) => false | any) | false; | ||
// FixMe: onDelete?: ((del: InteractionProps) => false | any) | false; | ||
} |
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.