-
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/update-dikt…
…at-analysis.yml
- Loading branch information
Showing
319 changed files
with
20,565 additions
and
313 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="Cosv-Frontend-LocalRun" type="GradleRunConfiguration" factoryName="Gradle"> | ||
<ExternalSystemSettings> | ||
<option name="executionName" /> | ||
<option name="externalProjectPath" value="$PROJECT_DIR$" /> | ||
<option name="externalSystemIdString" value="GRADLE" /> | ||
<option name="scriptParameters" value="--continuous" /> | ||
<option name="taskDescriptions"> | ||
<list /> | ||
</option> | ||
<option name="taskNames"> | ||
<list> | ||
<option value="save-cosv-frontend:run" /> | ||
</list> | ||
</option> | ||
<option name="vmOptions" /> | ||
</ExternalSystemSettings> | ||
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess> | ||
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess> | ||
<DebugAllEnabled>false</DebugAllEnabled> | ||
<method v="2" /> | ||
</configuration> | ||
</component> |
63 changes: 63 additions & 0 deletions
63
...-cloud-common/src/commonMain/kotlin/com/saveourtool/save/validation/FrontendCosvRoutes.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,63 @@ | ||
/** | ||
* Names that are used as endpoints in the frontend. | ||
* If you create a new view with new URL - add it here. | ||
*/ | ||
|
||
package com.saveourtool.save.validation | ||
|
||
import com.saveourtool.save.utils.URL_PATH_DELIMITER | ||
import kotlin.js.JsExport | ||
|
||
/** | ||
* @property path substring of url that defines given route | ||
*/ | ||
@JsExport | ||
enum class FrontendCosvRoutes(val path: String) { | ||
ABOUT_US("about"), | ||
BAN("ban"), | ||
COOKIE("cookie"), | ||
ERROR_404("404"), | ||
MANAGE_ORGANIZATIONS("organizations"), | ||
NOT_FOUND("not-found"), | ||
PROFILE("profile"), | ||
REGISTRATION("registration"), | ||
SETTINGS_DELETE("$SETTINGS/delete"), | ||
SETTINGS_EMAIL("$SETTINGS/email"), | ||
SETTINGS_ORGANIZATIONS("$SETTINGS/organizations"), | ||
SETTINGS_PROFILE("$SETTINGS/profile"), | ||
SETTINGS_TOKEN("$SETTINGS/token"), | ||
TERMS_OF_USE("terms-of-use"), | ||
THANKS_FOR_REGISTRATION("thanks-for-registration"), | ||
VULN("vuln"), | ||
VULNERABILITIES("$VULN/list"), | ||
VULNERABILITY_SINGLE("$VULN/collection"), | ||
VULN_COSV_SCHEMA("$VULN/schema"), | ||
VULN_CREATE("$VULN/create-vulnerability"), | ||
VULN_TOP_RATING("$VULN/top-rating"), | ||
VULN_UPLOAD("$VULN/upload-vulnerability"), | ||
; | ||
|
||
override fun toString(): String = path | ||
|
||
companion object { | ||
/** | ||
* List of views on which topbar should not be rendered | ||
*/ | ||
val noTopBarViewList = arrayOf( | ||
REGISTRATION, | ||
ERROR_404, | ||
TERMS_OF_USE, | ||
THANKS_FOR_REGISTRATION, | ||
) | ||
|
||
/** | ||
* Get forbidden words from [FrontendCosvRoutes]. | ||
* | ||
* @return list of forbidden words | ||
*/ | ||
fun getForbiddenWords() = FrontendCosvRoutes.values() | ||
.map { it.path.split(URL_PATH_DELIMITER) } | ||
.flatten() | ||
.toTypedArray() | ||
} | ||
} |
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,16 @@ | ||
# COSV Frontend | ||
|
||
### Building | ||
* For IR usage see https://github.com/JetBrains/kotlin-wrappers#experimental-ir-backend | ||
|
||
To run frontend locally, use `./gradlew :save-cosv-frontend:browserDevelopmentRun --continuous` or `./gradlew :save-cosv-frontend:browserProductionRun --continuous`. | ||
|
||
To pack distribution, use `./gradlew :save-cosv-frontend:browserDevelopmentWebpack` and `./gradlew :save-cosv-frontend:browserProductionWebpack`. | ||
|
||
save-backend consumes frontend distribution as a dependency. Frontend distribution is copied and included in spring boot resources. | ||
|
||
### `nginx` [configuration](../save-frontend-common/README.md) | ||
|
||
### `webpack-dev-server` [configuration for no `api-gateway` run](../save-frontend-common/README.md) | ||
|
||
### [Using OAuth with a local deployment (`api-gateway` on)](../save-frontend-common/README.md) |
Oops, something went wrong.