Skip to content

Commit

Permalink
Renaming cosv-frontend package (#2918)
Browse files Browse the repository at this point in the history
  • Loading branch information
orchestr7 authored Jan 31, 2024
1 parent 3886b6d commit 0e19690
Show file tree
Hide file tree
Showing 166 changed files with 103 additions and 106 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
save-backend: ${{ steps.calculate-dependencies.outputs.save-backend }}
save-cloud-common: ${{ steps.calculate-dependencies.outputs.save-cloud-common }}
save-cosv: ${{ steps.calculate-dependencies.outputs.save-cosv }}
save-cosv-frontend: ${{ steps.calculate-dependencies.outputs.save-cosv-frontend }}
cosv-frontend: ${{ steps.calculate-dependencies.outputs.cosv-frontend }}
save-demo: ${{ steps.calculate-dependencies.outputs.save-demo }}
save-demo-agent: ${{ steps.calculate-dependencies.outputs.save-demo-agent }}
save-demo-cpg: ${{ steps.calculate-dependencies.outputs.save-demo-cpg }}
Expand Down Expand Up @@ -68,8 +68,8 @@ jobs:
- save-cloud-common/**
save-cosv:
- save-cosv/**
save-cosv-frontend:
- save-cosv-frontend/**
cosv-frontend:
- cosv-frontend/**
save-demo:
- save-demo/**
save-demo-agent:
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
save_agent=$(( $save_cloud_common + ${{ steps.git-changed-files.outputs.save-agent_all_changed_files_count }} ))
save_api_cli=$(( $save_cloud_common + $save_api + ${{ steps.git-changed-files.outputs.save-api-cli_all_changed_files_count }} ))
save_backend=$(( $save_cloud_common + $authentication_service + $test_analysis_core + $save_cosv + $test_utils + ${{ steps.git-changed-files.outputs.save-backend_all_changed_files_count }} ))
save_cosv_frontend=$(( $save_cloud_common + $save_frontend_common + ${{ steps.git-changed-files.outputs.save-cosv-frontend_all_changed_files_count }} ))
cosv_frontend=$(( $save_cloud_common + $save_frontend_common + ${{ steps.git-changed-files.outputs.cosv-frontend_all_changed_files_count }} ))
save_demo=$(( $save_cloud_common + ${{ steps.git-changed-files.outputs.save-demo_all_changed_files_count }} ))
save_demo_agent=$(( $save_cloud_common + ${{ steps.git-changed-files.outputs.save-demo-agent_all_changed_files_count }} ))
save_demo_cpg=$(( $save_cloud_common + ${{ steps.git-changed-files.outputs.save-demo-cpg_all_changed_files_count }} ))
Expand All @@ -124,7 +124,7 @@ jobs:
echo "save-backend=$save_backend" >> "$GITHUB_OUTPUT"
echo "save-cloud-common=$save_cloud_common" >> "$GITHUB_OUTPUT"
echo "save-cosv=$save_cosv" >> "$GITHUB_OUTPUT"
echo "save-cosv-frontend=$save_cosv_frontend" >> "$GITHUB_OUTPUT"
echo "cosv-frontend=$cosv_frontend" >> "$GITHUB_OUTPUT"
echo "save-demo=$save_demo" >> "$GITHUB_OUTPUT"
echo "save-demo-agent=$save_demo_agent" >> "$GITHUB_OUTPUT"
echo "save-demo-cpg=$save_demo_cpg" >> "$GITHUB_OUTPUT"
Expand Down Expand Up @@ -173,7 +173,7 @@ jobs:
'save-api-cli',
'save-backend',
'save-cosv',
'save-cosv-frontend',
'cosv-frontend',
'save-demo',
'save-demo-agent',
'save-demo-cpg',
Expand All @@ -200,8 +200,8 @@ jobs:
do-build: ${{ github.event_name == 'push' || needs.calculate_build_flags.outputs.save-backend > 0 }}
- module: save-cosv
do-build: ${{ github.event_name == 'push' || needs.calculate_build_flags.outputs.save-cosv > 0 }}
- module: save-cosv-frontend
do-build: ${{ github.event_name == 'push' || needs.calculate_build_flags.outputs.save-cosv-frontend > 0 }}
- module: cosv-frontend
do-build: ${{ github.event_name == 'push' || needs.calculate_build_flags.outputs.cosv-frontend > 0 }}
- module: save-demo
do-build: ${{ github.event_name == 'push' || needs.calculate_build_flags.outputs.save-demo > 0 }}
- module: save-demo-agent
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
'save-cosv',
'api-gateway',
'save-frontend',
'save-cosv-frontend',
'cosv-frontend',
'save-orchestrator',
'save-preprocessor',
'save-demo-cpg',
Expand All @@ -104,7 +104,7 @@ jobs:
do-build: ${{ inputs.gateway }}
- module: save-frontend
do-build: ${{ inputs.frontend }}
- module: save-cosv-frontend
- module: cosv-frontend
do-build: ${{ inputs.frontend }}
- module: save-orchestrator
do-build: ${{ inputs.orchestrator }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy_images_reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
echo SAVE_DEMO_AGENT_GRADLE_OPTS = >> $GITHUB_ENV
echo GRADLE_TASKS=:${{ inputs.module}}:bootBuildImage >> $GITHUB_ENV
- name: Override gradle command for frontend
if: inputs.module == 'save-frontend' || inputs.module == 'save-cosv-frontend'
if: inputs.module == 'save-frontend' || inputs.module == 'cosv-frontend'
run: |
echo GRADLE_TASKS=:${{ inputs.module}}:buildImage >> $GITHUB_ENV
- name: Override dockerTag
Expand Down
2 changes: 1 addition & 1 deletion .run/Cosv-Frontend-LocalRun.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</option>
<option name="taskNames">
<list>
<option value="save-cosv-frontend:run" />
<option value="cosv-frontend:run" />
</list>
</option>
<option name="vmOptions" />
Expand Down
4 changes: 2 additions & 2 deletions save-cosv-frontend/README.md → cosv-frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
### 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 run frontend locally, use `./gradlew :cosv-frontend:browserDevelopmentRun --continuous` or `./gradlew :cosv-frontend:browserProductionRun --continuous`.

To pack distribution, use `./gradlew :save-cosv-frontend:browserDevelopmentWebpack` and `./gradlew :save-cosv-frontend:browserProductionWebpack`.
To pack distribution, use `./gradlew :cosv-frontend:browserDevelopmentWebpack` and `./gradlew :cosv-frontend:browserProductionWebpack`.

save-backend consumes frontend distribution as a dependency. Frontend distribution is copied and included in spring boot resources.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ tasks.withType<org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpack> {

val distribution: Configuration by configurations.creating
val distributionJarTask by tasks.registering(Jar::class) {
dependsOn(":save-cosv-frontend:browserDistribution")
dependsOn(":cosv-frontend:browserDistribution")
archiveClassifier.set("distribution")
from("$buildDir/$distributionsDirName") {
into("static")
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
* Main entrypoint for SAVE frontend
*/

package com.saveourtool.save.cosv.frontend
package com.saveourtool.cosv.frontend

import com.saveourtool.save.cosv.frontend.components.ErrorBoundary
import com.saveourtool.save.cosv.frontend.components.requestModalHandler
import com.saveourtool.save.cosv.frontend.components.topbar.topBarComponent
import com.saveourtool.save.cosv.frontend.routing.basicRouting
import com.saveourtool.cosv.frontend.components.ErrorBoundary
import com.saveourtool.cosv.frontend.components.requestModalHandler
import com.saveourtool.cosv.frontend.components.topbar.topBarComponent
import com.saveourtool.cosv.frontend.routing.basicRouting
import com.saveourtool.save.frontend.common.components.*
import com.saveourtool.save.frontend.common.components.basic.cookieBanner
import com.saveourtool.save.frontend.common.components.basic.scrollToTopButton
Expand Down Expand Up @@ -85,7 +85,7 @@ fun main() {
return
}

kotlinext.js.require<dynamic>("../scss/save-cosv-frontend.scss") // this is needed for webpack to include resource
kotlinext.js.require<dynamic>("../scss/cosv-frontend.scss") // this is needed for webpack to include resource
kotlinext.js.require<dynamic>("bootstrap") // this is needed for webpack to include bootstrap
ReactModal.setAppElement(document.getElementById("wrapper") as HTMLElement) // required for accessibility in react-modal

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
* Support for [error boundaries](https://reactjs.org/docs/error-boundaries.html)
*/

package com.saveourtool.save.cosv.frontend.components
package com.saveourtool.cosv.frontend.components

import com.saveourtool.save.cosv.frontend.components.topbar.topBarComponent
import com.saveourtool.cosv.frontend.components.topbar.topBarComponent
import com.saveourtool.save.frontend.common.components.footer
import com.saveourtool.save.frontend.common.components.views.FallbackView

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@file:Suppress("HEADER_MISSING_IN_NON_SINGLE_CLASS_FILE")

package com.saveourtool.save.cosv.frontend.components
package com.saveourtool.cosv.frontend.components

import com.saveourtool.save.cosv.frontend.components.topbar.topBarComponent
import com.saveourtool.cosv.frontend.components.topbar.topBarComponent
import com.saveourtool.save.frontend.common.components.*
import com.saveourtool.save.frontend.common.components.modal.loaderModalStyle
import com.saveourtool.save.frontend.common.components.modal.modal
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.saveourtool.save.cosv.frontend.components.basic
package com.saveourtool.cosv.frontend.components.basic

import com.saveourtool.save.frontend.common.components.views.organization.OrganizationMenuBar
import com.saveourtool.save.frontend.common.components.views.organization.OrganizationType
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@file:Suppress("HEADER_MISSING_IN_NON_SINGLE_CLASS_FILE")

package com.saveourtool.save.cosv.frontend.components.basic
package com.saveourtool.cosv.frontend.components.basic

import com.saveourtool.save.cosv.frontend.components.views.vuln.columnHeight
import com.saveourtool.cosv.frontend.components.views.vuln.columnHeight
import com.saveourtool.save.frontend.common.components.basic.markdown
import com.saveourtool.save.frontend.common.externals.i18next.useTranslation

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

@file:Suppress("FILE_NAME_MATCH_CLASS", "FILE_WILDCARD_IMPORTS", "WildcardImport")

package com.saveourtool.save.cosv.frontend.components.topbar
package com.saveourtool.cosv.frontend.components.topbar

import com.saveourtool.save.frontend.common.components.basic.languageSelector
import com.saveourtool.save.frontend.common.externals.fontawesome.*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@file:Suppress("HEADER_MISSING_IN_NON_SINGLE_CLASS_FILE")

package com.saveourtool.save.cosv.frontend.components.topbar
package com.saveourtool.cosv.frontend.components.topbar

import com.saveourtool.save.frontend.common.externals.i18next.useTranslation
import com.saveourtool.save.validation.FrontendCosvRoutes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@file:Suppress("FILE_NAME_MATCH_CLASS")

package com.saveourtool.save.cosv.frontend.components.topbar
package com.saveourtool.cosv.frontend.components.topbar

import com.saveourtool.save.frontend.common.utils.TopBarUrl
import com.saveourtool.save.utils.URL_PATH_DELIMITER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* FC user's topbar
*/

package com.saveourtool.save.cosv.frontend.components.topbar
package com.saveourtool.cosv.frontend.components.topbar

import com.saveourtool.save.frontend.common.components.basic.avatarRenderer
import com.saveourtool.save.frontend.common.components.modal.logoutModal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
* View, which represents the COSV schema
*/

package com.saveourtool.save.cosv.frontend.components.views.vuln
package com.saveourtool.cosv.frontend.components.views.vuln

import com.saveourtool.save.cosv.frontend.components.views.vuln.utils.COSV_SCHEMA_JSON
import com.saveourtool.save.cosv.frontend.components.views.vuln.utils.cosvFieldsDescriptionsMap
import com.saveourtool.save.cosv.frontend.components.views.vuln.utils.keysOnlyFromCosv
import com.saveourtool.cosv.frontend.components.views.vuln.utils.COSV_SCHEMA_JSON
import com.saveourtool.cosv.frontend.components.views.vuln.utils.cosvFieldsDescriptionsMap
import com.saveourtool.cosv.frontend.components.views.vuln.utils.keysOnlyFromCosv
import com.saveourtool.save.frontend.common.utils.*
import com.saveourtool.save.frontend.common.utils.Style
import com.saveourtool.save.frontend.common.utils.buttonBuilder
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
@file:Suppress("HEADER_MISSING_IN_NON_SINGLE_CLASS_FILE")

package com.saveourtool.save.cosv.frontend.components.views.vuln
package com.saveourtool.cosv.frontend.components.views.vuln

import com.saveourtool.save.cosv.frontend.components.views.vuln.component.cvssBaseScoreCalculator
import com.saveourtool.cosv.frontend.components.views.vuln.component.cvssBaseScoreCalculator
import com.saveourtool.osv4k.Reference
import com.saveourtool.osv4k.ReferenceType
import com.saveourtool.osv4k.Severity
import com.saveourtool.osv4k.SeverityType
import com.saveourtool.save.cvsscalculator.CvssVersion
import com.saveourtool.save.cvsscalculator.calculateBaseScore
import com.saveourtool.save.cvsscalculator.parsingVectorToMap
Expand All @@ -26,10 +30,6 @@ import com.saveourtool.save.utils.*
import com.saveourtool.save.validation.FrontendCosvRoutes
import com.saveourtool.save.validation.isValidUrl

import com.saveourtool.osv4k.Reference
import com.saveourtool.osv4k.ReferenceType
import com.saveourtool.osv4k.Severity
import com.saveourtool.osv4k.SeverityType
import js.core.jso
import react.ChildrenBuilder
import react.FC
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@file:Suppress("HEADER_MISSING_IN_NON_SINGLE_CLASS_FILE")

package com.saveourtool.save.cosv.frontend.components.views.vuln
package com.saveourtool.cosv.frontend.components.views.vuln

import com.saveourtool.save.cosv.frontend.components.views.vuln.component.cosvFileManagerComponent
import com.saveourtool.cosv.frontend.components.views.vuln.component.cosvFileManagerComponent
import com.saveourtool.save.frontend.common.components.modal.MAX_Z_INDEX
import com.saveourtool.save.frontend.common.externals.i18next.useTranslation
import com.saveourtool.save.frontend.common.utils.Style
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
@file:Suppress("FILE_NAME_MATCH_CLASS")

package com.saveourtool.save.cosv.frontend.components.views.vuln
package com.saveourtool.cosv.frontend.components.views.vuln

import com.saveourtool.save.cosv.frontend.components.views.vuln.component.cvssBaseScoreCalculator
import com.saveourtool.cosv.frontend.components.views.vuln.component.cvssBaseScoreCalculator
import com.saveourtool.osv4k.Severity
import com.saveourtool.osv4k.SeverityType
import com.saveourtool.save.cvsscalculator.CvssVersion
import com.saveourtool.save.cvsscalculator.parsingVectorToMap
import com.saveourtool.save.cvsscalculator.v3.CvssVectorV3
Expand All @@ -15,8 +17,6 @@ import com.saveourtool.save.frontend.common.themes.Colors
import com.saveourtool.save.frontend.common.utils.buttonBuilder
import com.saveourtool.save.frontend.common.utils.useWindowOpenness

import com.saveourtool.osv4k.Severity
import com.saveourtool.osv4k.SeverityType
import js.core.jso
import react.FC
import react.Props
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
@file:Suppress("FILE_NAME_MATCH_CLASS", "HEADER_MISSING_IN_NON_SINGLE_CLASS_FILE")

package com.saveourtool.save.cosv.frontend.components.views.vuln
package com.saveourtool.cosv.frontend.components.views.vuln

import com.saveourtool.osv4k.RawOsvSchema
import com.saveourtool.save.entities.cosv.CosvFileDto
import com.saveourtool.save.frontend.common.externals.diffviewer.reactDiffViewer
import com.saveourtool.save.frontend.common.utils.*
import com.saveourtool.save.utils.toUnixCalendarFormat

import com.saveourtool.osv4k.RawOsvSchema
import js.core.jso
import react.FC
import react.Props
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

@file:Suppress("FILE_NAME_MATCH_CLASS")

package com.saveourtool.save.cosv.frontend.components.views.vuln
package com.saveourtool.cosv.frontend.components.views.vuln

import com.saveourtool.save.cosv.frontend.components.basic.vulnerabilityIntroductionComponent
import com.saveourtool.cosv.frontend.components.basic.vulnerabilityIntroductionComponent
import com.saveourtool.save.filters.VulnerabilityFilter
import com.saveourtool.save.frontend.common.components.basic.*
import com.saveourtool.save.frontend.common.components.views.vuln.vulnerabilityTableComponent
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@file:Suppress("FILE_NAME_MATCH_CLASS")

package com.saveourtool.save.cosv.frontend.components.views.vuln
package com.saveourtool.cosv.frontend.components.views.vuln

import com.saveourtool.save.entities.CommentDto
import com.saveourtool.save.entities.cosv.VulnerabilityExt
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@file:Suppress("FILE_NAME_MATCH_CLASS")

package com.saveourtool.save.cosv.frontend.components.views.vuln
package com.saveourtool.cosv.frontend.components.views.vuln

import com.saveourtool.save.entities.cosv.VulnerabilityExt
import com.saveourtool.save.entities.vulnerability.VulnerabilityDateDto
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.saveourtool.save.cosv.frontend.components.views.vuln
package com.saveourtool.cosv.frontend.components.views.vuln

import com.saveourtool.osv4k.ConfirmType
import com.saveourtool.osv4k.Credit
import com.saveourtool.save.entities.cosv.VulnerabilityExt
import com.saveourtool.save.entities.cosv.VulnerabilityMetadataDto.Companion.SUMMARY_LENGTH
import com.saveourtool.save.entities.vulnerability.VulnerabilityStatus
Expand All @@ -22,8 +24,6 @@ import com.saveourtool.save.utils.shorten
import com.saveourtool.save.utils.toUnixCalendarFormat
import com.saveourtool.save.validation.isValidName

import com.saveourtool.osv4k.ConfirmType
import com.saveourtool.osv4k.Credit
import js.core.jso
import react.*
import react.dom.html.ReactHTML.div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

@file:Suppress("FILE_NAME_MATCH_CLASS")

package com.saveourtool.save.cosv.frontend.components.views.vuln
package com.saveourtool.cosv.frontend.components.views.vuln

import com.saveourtool.save.entities.CommentDto
import com.saveourtool.save.entities.cosv.VulnerabilityExt
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@file:Suppress("FILE_NAME_MATCH_CLASS", "HEADER_MISSING_IN_NON_SINGLE_CLASS_FILE")

package com.saveourtool.save.cosv.frontend.components.views.vuln
package com.saveourtool.cosv.frontend.components.views.vuln

import com.saveourtool.save.entities.cosv.CosvFileDto
import com.saveourtool.save.frontend.common.components.tables.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
"HEADER_MISSING_IN_NON_SINGLE_CLASS_FILE",
)

package com.saveourtool.save.cosv.frontend.components.views.vuln
package com.saveourtool.cosv.frontend.components.views.vuln

import com.saveourtool.save.cosv.frontend.components.views.vuln.component.timelineComponent
import com.saveourtool.cosv.frontend.components.views.vuln.component.timelineComponent
import com.saveourtool.osv4k.Affected
import com.saveourtool.save.entities.cosv.VulnerabilityExt
import com.saveourtool.save.entities.vulnerability.VulnerabilityDateDto
import com.saveourtool.save.entities.vulnerability.VulnerabilityDateType
Expand All @@ -30,7 +31,6 @@ import com.saveourtool.save.utils.asTimelineEntry
import com.saveourtool.save.utils.getTimeline
import com.saveourtool.save.utils.listToShortString

import com.saveourtool.osv4k.Affected
import react.*
import react.dom.html.ReactHTML.div
import react.dom.html.ReactHTML.h4
Expand Down
Loading

0 comments on commit 0e19690

Please sign in to comment.