Skip to content

Commit

Permalink
Rename save-frontend-common to frontend-common (#2929)
Browse files Browse the repository at this point in the history
* Rename save-frontend-common to frontend-common
  • Loading branch information
Cheshiriks authored Feb 29, 2024
1 parent 42f048b commit 570247c
Show file tree
Hide file tree
Showing 296 changed files with 1,175 additions and 1,164 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
save-demo-agent: ${{ steps.calculate-dependencies.outputs.save-demo-agent }}
save-demo-cpg: ${{ steps.calculate-dependencies.outputs.save-demo-cpg }}
save-frontend: ${{ steps.calculate-dependencies.outputs.save-frontend }}
save-frontend-common: ${{ steps.calculate-dependencies.outputs.save-frontend-common }}
frontend-common: ${{ steps.calculate-dependencies.outputs.frontend-common }}
save-orchestrator: ${{ steps.calculate-dependencies.outputs.save-orchestrator }}
save-orchestrator-common: ${{ steps.calculate-dependencies.outputs.save-orchestrator-common }}
save-preprocessor: ${{ steps.calculate-dependencies.outputs.save-preprocessor }}
Expand Down Expand Up @@ -78,8 +78,8 @@ jobs:
- save-demo-cpg/**
save-frontend:
- save-frontend/**
save-frontend-common:
- save-frontend-common/**
frontend-common:
- frontend-common/**
save-orchestrator:
- save-orchestrator/**
save-orchestrator-common:
Expand All @@ -95,7 +95,7 @@ jobs:
set -x
all=$(( ${{ steps.git-changed-files.outputs.root_gradle_all_changed_files_count }} ))
save_cloud_common=$(( $all + ${{ steps.git-changed-files.outputs.save-cloud-common_all_changed_files_count }} ))
save_frontend_common=$(( $save_cloud_common + ${{ steps.git-changed-files.outputs.save-frontend-common_all_changed_files_count }} ))
frontend_common=$(( $save_cloud_common + ${{ steps.git-changed-files.outputs.frontend-common_all_changed_files_count }} ))
save_orchestrator_common=$(( $save_cloud_common + ${{ steps.git-changed-files.outputs.save-orchestrator-common_all_changed_files_count }} ))
authentication_service=$(( $save_cloud_common + ${{ steps.git-changed-files.outputs.authentication-service_all_changed_files_count }} ))
Expand All @@ -108,11 +108,11 @@ 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 + $cosv_backend + $test_utils + ${{ steps.git-changed-files.outputs.save-backend_all_changed_files_count }} ))
cosv_frontend=$(( $save_cloud_common + $save_frontend_common + ${{ steps.git-changed-files.outputs.cosv-frontend_all_changed_files_count }} ))
cosv_frontend=$(( $save_cloud_common + $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 }} ))
save_frontend=$(( $save_cloud_common + $save_frontend_common + ${{ steps.git-changed-files.outputs.save-frontend_all_changed_files_count }} ))
save_frontend=$(( $save_cloud_common + $frontend_common + ${{ steps.git-changed-files.outputs.save-frontend_all_changed_files_count }} ))
save_orchestrator=$(( $save_cloud_common + $save_orchestrator_common + $test_utils + ${{ steps.git-changed-files.outputs.save-orchestrator_all_changed_files_count }} ))
save_preprocessor=$(( $save_cloud_common + $test_utils + ${{ steps.git-changed-files.outputs.save-preprocessor_all_changed_files_count }} ))
Expand All @@ -129,7 +129,7 @@ jobs:
echo "save-demo-agent=$save_demo_agent" >> "$GITHUB_OUTPUT"
echo "save-demo-cpg=$save_demo_cpg" >> "$GITHUB_OUTPUT"
echo "save-frontend=$save_frontend" >> "$GITHUB_OUTPUT"
echo "save-frontend-common=$save_frontend_common" >> "$GITHUB_OUTPUT"
echo "frontend-common=$frontend_common" >> "$GITHUB_OUTPUT"
echo "save-orchestrator=$save_orchestrator" >> "$GITHUB_OUTPUT"
echo "save-orchestrator-common=$save_orchestrator_common" >> "$GITHUB_OUTPUT"
echo "save-preprocessor=$save_preprocessor" >> "$GITHUB_OUTPUT"
Expand All @@ -151,17 +151,17 @@ jobs:
do-build: ${{ github.event_name == 'push' || needs.calculate_build_flags.outputs.save-orchestrator-common > 0 }}
module: save-orchestrator-common
gradle-cache-read-only: ${{ github.ref != 'refs/heads/master' && github.event_name != 'pull_request' }}
build_save-frontend-common:
name: 'Build and test (save-frontend-common)'
build_frontend-common:
name: 'Build and test (frontend-common)'
needs: [ calculate_build_flags, build_save-orchestrator-common ]
uses: ./.github/workflows/build_and_test_reusable.yml
with:
do-build: ${{ github.event_name == 'push' || needs.calculate_build_flags.outputs.save-frontend-common > 0 }}
module: save-frontend-common
do-build: ${{ github.event_name == 'push' || needs.calculate_build_flags.outputs.frontend-common > 0 }}
module: frontend-common
gradle-cache-read-only: ${{ github.ref != 'refs/heads/master' && github.event_name != 'pull_request' }}
build_all:
name: 'Build and test'
needs: [ calculate_build_flags, build_save-frontend-common ]
needs: [ calculate_build_flags, build_frontend-common ]
strategy:
fail-fast: false
matrix:
Expand Down
6 changes: 3 additions & 3 deletions cosv-frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ To pack distribution, use `./gradlew :cosv-frontend:browserDevelopmentWebpack` a

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)
### `nginx` [configuration](../frontend-common/README.md)

### `webpack-dev-server` [configuration for no `api-gateway` run](../save-frontend-common/README.md)
### `webpack-dev-server` [configuration for no `api-gateway` run](../frontend-common/README.md)

### [Using OAuth with a local deployment (`api-gateway` on)](../save-frontend-common/README.md)
### [Using OAuth with a local deployment (`api-gateway` on)](../frontend-common/README.md)
2 changes: 1 addition & 1 deletion cosv-frontend/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ rootProject.plugins.withType<NodeJsRootPlugin> {

dependencies {
implementation(projects.saveCloudCommon)
implementation(projects.saveFrontendCommon)
implementation(projects.frontendCommon)

implementation(enforcedPlatform(libs.kotlin.wrappers.bom))
implementation("org.jetbrains.kotlin-wrappers:kotlin-react")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ 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
import com.saveourtool.save.frontend.common.externals.i18next.initI18n
import com.saveourtool.save.frontend.common.externals.modal.ReactModal
import com.saveourtool.save.frontend.common.utils.*
import com.saveourtool.frontend.common.components.*
import com.saveourtool.frontend.common.components.basic.cookieBanner
import com.saveourtool.frontend.common.components.basic.scrollToTopButton
import com.saveourtool.frontend.common.externals.i18next.initI18n
import com.saveourtool.frontend.common.externals.modal.ReactModal
import com.saveourtool.frontend.common.utils.*
import com.saveourtool.save.info.UserInfo
import com.saveourtool.save.validation.FrontendRoutes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
package com.saveourtool.cosv.frontend.components

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
import com.saveourtool.frontend.common.components.footer
import com.saveourtool.frontend.common.components.views.FallbackView

import js.core.jso
import react.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
package com.saveourtool.cosv.frontend.components

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
import com.saveourtool.save.frontend.common.components.views.FallbackView
import com.saveourtool.save.frontend.common.utils.UserInfoAwarePropsWithChildren
import com.saveourtool.frontend.common.components.*
import com.saveourtool.frontend.common.components.modal.loaderModalStyle
import com.saveourtool.frontend.common.components.modal.modal
import com.saveourtool.frontend.common.components.views.FallbackView
import com.saveourtool.frontend.common.utils.UserInfoAwarePropsWithChildren

import org.w3c.fetch.Response
import react.*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
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
import com.saveourtool.frontend.common.components.views.organization.OrganizationMenuBar
import com.saveourtool.frontend.common.components.views.organization.OrganizationType

object CosvOrganizationType : OrganizationType {
override val listTab: Array<OrganizationMenuBar> = arrayOf(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
package com.saveourtool.cosv.frontend.components.basic

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
import com.saveourtool.frontend.common.components.basic.markdown
import com.saveourtool.frontend.common.externals.i18next.useTranslation

import js.core.jso
import react.FC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

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

import com.saveourtool.save.frontend.common.components.basic.languageSelector
import com.saveourtool.save.frontend.common.externals.fontawesome.*
import com.saveourtool.save.frontend.common.externals.fontawesome.FontAwesomeIconModule
import com.saveourtool.save.frontend.common.externals.fontawesome.fontAwesomeIcon
import com.saveourtool.save.frontend.common.utils.UserInfoAwarePropsWithChildren
import com.saveourtool.save.frontend.common.utils.notIn
import com.saveourtool.frontend.common.components.basic.languageSelector
import com.saveourtool.frontend.common.externals.fontawesome.*
import com.saveourtool.frontend.common.externals.fontawesome.FontAwesomeIconModule
import com.saveourtool.frontend.common.externals.fontawesome.fontAwesomeIcon
import com.saveourtool.frontend.common.utils.UserInfoAwarePropsWithChildren
import com.saveourtool.frontend.common.utils.notIn
import com.saveourtool.save.validation.FrontendRoutes

import js.core.jso
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

import com.saveourtool.save.frontend.common.externals.i18next.useTranslation
import com.saveourtool.frontend.common.externals.i18next.useTranslation
import com.saveourtool.save.validation.FrontendCosvRoutes

import react.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

import com.saveourtool.save.frontend.common.utils.TopBarUrl
import com.saveourtool.frontend.common.utils.TopBarUrl
import com.saveourtool.save.utils.URL_PATH_DELIMITER
import com.saveourtool.save.validation.FrontendCosvRoutes

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

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
import com.saveourtool.save.frontend.common.externals.fontawesome.*
import com.saveourtool.save.frontend.common.externals.i18next.useTranslation
import com.saveourtool.save.frontend.common.utils.*
import com.saveourtool.save.frontend.common.utils.AVATAR_PROFILE_PLACEHOLDER
import com.saveourtool.save.frontend.common.utils.UserInfoAwareProps
import com.saveourtool.save.frontend.common.utils.isSuperAdmin
import com.saveourtool.frontend.common.components.basic.avatarRenderer
import com.saveourtool.frontend.common.components.modal.logoutModal
import com.saveourtool.frontend.common.externals.fontawesome.*
import com.saveourtool.frontend.common.externals.i18next.useTranslation
import com.saveourtool.frontend.common.utils.*
import com.saveourtool.frontend.common.utils.AVATAR_PROFILE_PLACEHOLDER
import com.saveourtool.frontend.common.utils.UserInfoAwareProps
import com.saveourtool.frontend.common.utils.isSuperAdmin
import com.saveourtool.save.validation.FrontendCosvRoutes

import js.core.jso
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ package com.saveourtool.cosv.frontend.components.views.vuln
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
import com.saveourtool.save.frontend.common.utils.particles
import com.saveourtool.save.frontend.common.utils.useBackground
import com.saveourtool.frontend.common.utils.*
import com.saveourtool.frontend.common.utils.Style
import com.saveourtool.frontend.common.utils.buttonBuilder
import com.saveourtool.frontend.common.utils.particles
import com.saveourtool.frontend.common.utils.useBackground

import js.core.jso
import react.FC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@
package com.saveourtool.cosv.frontend.components.views.vuln

import com.saveourtool.cosv.frontend.components.views.vuln.component.cvssBaseScoreCalculator
import com.saveourtool.frontend.common.components.basic.addUserComponent
import com.saveourtool.frontend.common.components.basic.markdown
import com.saveourtool.frontend.common.components.basic.renderAvatar
import com.saveourtool.frontend.common.components.inputform.InputTypes
import com.saveourtool.frontend.common.components.inputform.inputTextFormOptional
import com.saveourtool.frontend.common.components.modal.MAX_Z_INDEX
import com.saveourtool.frontend.common.components.modal.calculatorModalStyle
import com.saveourtool.frontend.common.components.modal.displayModal
import com.saveourtool.frontend.common.components.views.vuln.uploadCosvButton
import com.saveourtool.frontend.common.externals.fontawesome.faPlus
import com.saveourtool.frontend.common.externals.fontawesome.faTimesCircle
import com.saveourtool.frontend.common.externals.i18next.useTranslation
import com.saveourtool.frontend.common.themes.Colors
import com.saveourtool.frontend.common.utils.*
import com.saveourtool.osv4k.Reference
import com.saveourtool.osv4k.ReferenceType
import com.saveourtool.osv4k.Severity
Expand All @@ -12,20 +26,6 @@ import com.saveourtool.save.cvsscalculator.calculateBaseScore
import com.saveourtool.save.cvsscalculator.parsingVectorToMap
import com.saveourtool.save.cvsscalculator.v3.CvssVectorV3
import com.saveourtool.save.entities.OrganizationDto
import com.saveourtool.save.frontend.common.components.basic.addUserComponent
import com.saveourtool.save.frontend.common.components.basic.markdown
import com.saveourtool.save.frontend.common.components.basic.renderAvatar
import com.saveourtool.save.frontend.common.components.inputform.InputTypes
import com.saveourtool.save.frontend.common.components.inputform.inputTextFormOptional
import com.saveourtool.save.frontend.common.components.modal.MAX_Z_INDEX
import com.saveourtool.save.frontend.common.components.modal.calculatorModalStyle
import com.saveourtool.save.frontend.common.components.modal.displayModal
import com.saveourtool.save.frontend.common.components.views.vuln.uploadCosvButton
import com.saveourtool.save.frontend.common.externals.fontawesome.faPlus
import com.saveourtool.save.frontend.common.externals.fontawesome.faTimesCircle
import com.saveourtool.save.frontend.common.externals.i18next.useTranslation
import com.saveourtool.save.frontend.common.themes.Colors
import com.saveourtool.save.frontend.common.utils.*
import com.saveourtool.save.utils.*
import com.saveourtool.save.validation.FrontendCosvRoutes
import com.saveourtool.save.validation.isValidUrl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
package com.saveourtool.cosv.frontend.components.views.vuln

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
import com.saveourtool.save.frontend.common.utils.particles
import com.saveourtool.save.frontend.common.utils.useBackground
import com.saveourtool.frontend.common.components.modal.MAX_Z_INDEX
import com.saveourtool.frontend.common.externals.i18next.useTranslation
import com.saveourtool.frontend.common.utils.Style
import com.saveourtool.frontend.common.utils.particles
import com.saveourtool.frontend.common.utils.useBackground
import js.core.jso
import react.FC
import react.Props
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
package com.saveourtool.cosv.frontend.components.views.vuln

import com.saveourtool.cosv.frontend.components.views.vuln.component.cvssBaseScoreCalculator
import com.saveourtool.frontend.common.components.modal.calculatorModalStyle
import com.saveourtool.frontend.common.components.modal.displayModal
import com.saveourtool.frontend.common.externals.i18next.useTranslation
import com.saveourtool.frontend.common.externals.progressbar.progressBar
import com.saveourtool.frontend.common.themes.Colors
import com.saveourtool.frontend.common.utils.buttonBuilder
import com.saveourtool.frontend.common.utils.useWindowOpenness
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
import com.saveourtool.save.entities.cosv.VulnerabilityExt
import com.saveourtool.save.frontend.common.components.modal.calculatorModalStyle
import com.saveourtool.save.frontend.common.components.modal.displayModal
import com.saveourtool.save.frontend.common.externals.i18next.useTranslation
import com.saveourtool.save.frontend.common.externals.progressbar.progressBar
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 js.core.jso
import react.FC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

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

import com.saveourtool.frontend.common.externals.diffviewer.reactDiffViewer
import com.saveourtool.frontend.common.utils.*
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 js.core.jso
Expand Down
Loading

0 comments on commit 570247c

Please sign in to comment.