Skip to content

Commit

Permalink
Deleted duplicate components from save frontend (#2882)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cheshiriks authored Dec 15, 2023
1 parent 2580c6e commit caf2f1b
Show file tree
Hide file tree
Showing 79 changed files with 102 additions and 3,396 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,23 @@ suspend fun ComponentWithScope<*, *>.getExecutionInfoFor(
::noopResponseHandler
)

/**
* Makes a call to change project status
*
* @param organizationName name of the organization whose status will be changed
* @param status is new status
* @return lazy response
*/
fun responseChangeOrganizationStatus(organizationName: String, status: OrganizationStatus): suspend WithRequestStatusContext.() -> Response = {
post(
url = "$apiUrl/organizations/$organizationName/change-status?status=$status",
headers = jsonHeaders,
body = undefined,
loadingHandler = ::noopLoadingHandler,
responseHandler = ::noopResponseHandler,
)
}

@Suppress("TYPE_ALIAS")
private suspend fun getDebugInfoFor(
testExecutionId: Long,
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package com.saveourtool.save.frontend.utils
package utils

import com.saveourtool.save.frontend.externals.render
import com.saveourtool.save.frontend.externals.rest
import com.saveourtool.save.frontend.externals.setupWorker
import com.saveourtool.save.frontend.common.utils.useNdjson
import externals.render
import externals.rest
import externals.setupWorker
import react.FC
import react.Props
import react.create
Expand All @@ -11,13 +12,11 @@ import kotlin.test.Test
import kotlin.test.assertContentEquals
import kotlin.test.assertEquals
import kotlinx.browser.window
import kotlinx.serialization.decodeFromString
import kotlinx.serialization.json.Json

/**
* Tests the way _Server-Sent Events_ (SSE) are parsed.
*
* @see useEventStream
* @see useNdjson
*/
class ServerSentEventTest {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.saveourtool.save.frontend.utils
package utils

import kotlinx.serialization.Serializable

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package com.saveourtool.save.frontend.utils
package utils

import com.saveourtool.save.frontend.common.utils.get
import com.saveourtool.save.frontend.common.utils.noopLoadingHandler
import com.saveourtool.save.frontend.externals.render
import com.saveourtool.save.frontend.externals.rest
import com.saveourtool.save.frontend.externals.setupWorker
import com.saveourtool.save.frontend.common.utils.useDeferredRequest
import com.saveourtool.save.frontend.common.utils.useRequest
import externals.render
import externals.rest
import externals.setupWorker

import org.w3c.fetch.Headers
import react.FC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,12 @@ package com.saveourtool.save.frontend
import com.saveourtool.save.frontend.common.components.basic.cookieBanner
import com.saveourtool.save.frontend.common.components.basic.scrollToTopButton
import com.saveourtool.save.frontend.common.components.footer
import com.saveourtool.save.frontend.common.utils.apiUrl
import com.saveourtool.save.frontend.common.utils.get
import com.saveourtool.save.frontend.common.utils.jsonHeaders
import com.saveourtool.save.frontend.common.utils.loadingHandler
import com.saveourtool.save.frontend.common.externals.modal.ReactModal
import com.saveourtool.save.frontend.common.utils.*
import com.saveourtool.save.frontend.components.*
import com.saveourtool.save.frontend.components.topbar.topBarComponent
import com.saveourtool.save.frontend.externals.i18next.initI18n
import com.saveourtool.save.frontend.externals.modal.ReactModal
import com.saveourtool.save.frontend.routing.basicRouting
import com.saveourtool.save.frontend.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 @@ -7,8 +7,8 @@ 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.externals.animations.ringLoader
import com.saveourtool.save.frontend.common.utils.UserInfoAwarePropsWithChildren
import com.saveourtool.save.frontend.components.topbar.topBarComponent
import com.saveourtool.save.frontend.utils.UserInfoAwarePropsWithChildren

import js.core.jso
import org.w3c.fetch.Response
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ package com.saveourtool.save.frontend.components.basic

import com.saveourtool.save.execution.ExecutionDto
import com.saveourtool.save.execution.ExecutionStatus
import com.saveourtool.save.frontend.externals.fontawesome.faRedo
import com.saveourtool.save.frontend.externals.fontawesome.fontAwesomeIcon
import com.saveourtool.save.frontend.common.externals.fontawesome.faRedo
import com.saveourtool.save.frontend.common.externals.fontawesome.fontAwesomeIcon
import com.saveourtool.save.utils.calculateRate
import com.saveourtool.save.utils.getPrecisionRate
import com.saveourtool.save.utils.getRecallRate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
package com.saveourtool.save.frontend.components.basic

import com.saveourtool.save.domain.*
import com.saveourtool.save.frontend.utils.selectorBuilder
import com.saveourtool.save.frontend.utils.useStateFromProps
import com.saveourtool.save.frontend.common.utils.selectorBuilder
import com.saveourtool.save.frontend.common.utils.useStateFromProps

import react.*
import react.dom.html.ReactHTML.div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import com.saveourtool.save.core.result.TestStatus
import com.saveourtool.save.domain.TestResultDebugInfo
import com.saveourtool.save.frontend.common.components.tables.visibleColumnsCount
import com.saveourtool.save.frontend.common.externals.fontawesome.faExternalLinkAlt
import com.saveourtool.save.frontend.utils.buttonBuilder
import com.saveourtool.save.frontend.common.utils.buttonBuilder

import react.FC
import react.Props
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ package com.saveourtool.save.frontend.components.basic

import com.saveourtool.save.entities.cosv.VulnerabilityExt
import com.saveourtool.save.entities.vulnerability.VulnerabilityDateDto
import com.saveourtool.save.frontend.common.utils.buttonBuilder
import com.saveourtool.save.frontend.externals.i18next.useTranslation
import com.saveourtool.save.frontend.utils.buttonBuilder

import react.*
import react.dom.html.ReactHTML.div
import web.cssom.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

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

import com.saveourtool.save.frontend.externals.fontawesome.*
import com.saveourtool.save.frontend.externals.reactace.*
import com.saveourtool.save.frontend.utils.*
import com.saveourtool.save.utils.Languages

import react.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ package com.saveourtool.save.frontend.components.basic.codeeditor

import com.saveourtool.save.frontend.common.components.basic.cardComponent
import com.saveourtool.save.frontend.common.externals.fontawesome.*
import com.saveourtool.save.frontend.common.utils.buttonBuilder
import com.saveourtool.save.frontend.common.utils.selectorBuilder
import com.saveourtool.save.frontend.externals.reactace.AceThemes
import com.saveourtool.save.frontend.utils.buttonBuilder
import com.saveourtool.save.frontend.utils.selectorBuilder
import com.saveourtool.save.utils.Languages

import react.ChildrenBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package com.saveourtool.save.frontend.components.basic.demo.management
import com.saveourtool.save.demo.DemoStatus
import com.saveourtool.save.domain.ProjectCoordinates
import com.saveourtool.save.domain.Role
import com.saveourtool.save.frontend.utils.buttonBuilder
import com.saveourtool.save.frontend.common.utils.buttonBuilder

import react.ChildrenBuilder
import react.dom.html.ReactHTML.div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
package com.saveourtool.save.frontend.components.basic.demo.management

import com.saveourtool.save.demo.RunCommandPair
import com.saveourtool.save.frontend.utils.buttonBuilder
import com.saveourtool.save.frontend.common.utils.buttonBuilder

import react.FC
import react.Props
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import com.saveourtool.save.demo.RunCommandPair
import com.saveourtool.save.frontend.common.components.modal.mediumTransparentModalStyle
import com.saveourtool.save.frontend.common.components.modal.modal
import com.saveourtool.save.frontend.common.components.modal.modalBuilder
import com.saveourtool.save.frontend.utils.buttonBuilder
import com.saveourtool.save.frontend.common.utils.buttonBuilder
import com.saveourtool.save.utils.isNotNull

import react.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
package com.saveourtool.save.frontend.components.basic.demo.run

import com.saveourtool.save.demo.DemoResult
import com.saveourtool.save.frontend.externals.fontawesome.*
import com.saveourtool.save.frontend.utils.*
import com.saveourtool.save.frontend.common.externals.fontawesome.*
import com.saveourtool.save.frontend.common.utils.*

import js.core.jso
import react.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,15 @@ import com.saveourtool.save.demo.DemoDto
import com.saveourtool.save.demo.DemoResult
import com.saveourtool.save.demo.DemoRunRequest
import com.saveourtool.save.domain.ProjectCoordinates
import com.saveourtool.save.frontend.common.externals.fontawesome.*
import com.saveourtool.save.frontend.common.utils.*
import com.saveourtool.save.frontend.common.utils.buttonBuilder
import com.saveourtool.save.frontend.common.utils.post
import com.saveourtool.save.frontend.common.utils.selectorBuilder
import com.saveourtool.save.frontend.common.utils.useDeferredRequest
import com.saveourtool.save.frontend.common.utils.useRequest
import com.saveourtool.save.frontend.components.basic.codeeditor.codeEditorComponent
import com.saveourtool.save.frontend.externals.fontawesome.*
import com.saveourtool.save.frontend.externals.reactace.AceThemes
import com.saveourtool.save.frontend.utils.*
import com.saveourtool.save.frontend.utils.buttonBuilder
import com.saveourtool.save.frontend.utils.selectorBuilder
import com.saveourtool.save.frontend.utils.useDeferredRequest
import com.saveourtool.save.frontend.utils.useRequest
import com.saveourtool.save.utils.Languages

import js.core.asList
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import com.saveourtool.save.entities.FileDto
import com.saveourtool.save.frontend.common.components.basic.fileuploader.deleteFileButton
import com.saveourtool.save.frontend.common.components.basic.fileuploader.downloadFileButton
import com.saveourtool.save.frontend.common.components.inputform.dragAndDropForm
import com.saveourtool.save.frontend.common.http.postUploadFile
import com.saveourtool.save.frontend.common.utils.*
import com.saveourtool.save.frontend.common.utils.noopLoadingHandler
import com.saveourtool.save.frontend.http.postUploadFile
import com.saveourtool.save.utils.toMegabytes

import js.core.asList
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import com.saveourtool.save.domain.*
import com.saveourtool.save.frontend.common.components.basic.fileuploader.deleteFileButton
import com.saveourtool.save.frontend.common.components.basic.fileuploader.downloadFileButton
import com.saveourtool.save.frontend.common.components.inputform.dragAndDropForm
import com.saveourtool.save.frontend.common.http.postUploadFile
import com.saveourtool.save.frontend.common.utils.*
import com.saveourtool.save.frontend.common.utils.noopLoadingHandler
import com.saveourtool.save.frontend.components.basic.codeeditor.FileType
import com.saveourtool.save.frontend.http.postUploadFile

import js.core.asList
import react.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
package com.saveourtool.save.frontend.components.basic.graph

import com.saveourtool.save.demo.cpg.CpgNodeAdditionalInfo
import com.saveourtool.save.frontend.externals.fontawesome.faTimes
import com.saveourtool.save.frontend.externals.fontawesome.fontAwesomeIcon
import com.saveourtool.save.frontend.common.externals.fontawesome.faTimes
import com.saveourtool.save.frontend.common.externals.fontawesome.fontAwesomeIcon
import js.core.jso
import react.ChildrenBuilder
import react.dom.html.ReactHTML.button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ package com.saveourtool.save.frontend.components.basic.table.filters

import com.saveourtool.save.domain.TestResultStatus
import com.saveourtool.save.filters.TestExecutionFilter
import com.saveourtool.save.frontend.externals.fontawesome.faFilter
import com.saveourtool.save.frontend.externals.fontawesome.faSearch
import com.saveourtool.save.frontend.externals.fontawesome.faTrashAlt
import com.saveourtool.save.frontend.externals.fontawesome.fontAwesomeIcon
import com.saveourtool.save.frontend.common.externals.fontawesome.faFilter
import com.saveourtool.save.frontend.common.externals.fontawesome.faSearch
import com.saveourtool.save.frontend.common.externals.fontawesome.faTrashAlt
import com.saveourtool.save.frontend.common.externals.fontawesome.fontAwesomeIcon
import react.FC
import react.Props
import react.dom.html.ReactHTML.button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ package com.saveourtool.save.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.utils.UserInfoAwarePropsWithChildren
import com.saveourtool.save.frontend.utils.notIn
import com.saveourtool.save.frontend.common.utils.UserInfoAwarePropsWithChildren
import com.saveourtool.save.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.save.frontend.components.topbar

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

import react.FC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

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

import com.saveourtool.save.frontend.utils.Style
import com.saveourtool.save.frontend.utils.UserInfoAwareProps
import com.saveourtool.save.frontend.utils.useBackground
import com.saveourtool.save.frontend.utils.useRedirectToIndexIf
import com.saveourtool.save.frontend.common.utils.Style
import com.saveourtool.save.frontend.common.utils.UserInfoAwareProps
import com.saveourtool.save.frontend.common.utils.useBackground
import com.saveourtool.save.frontend.common.utils.useRedirectToIndexIf
import com.saveourtool.save.info.UserStatus
import js.core.jso
import react.FC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import com.saveourtool.save.frontend.common.components.views.AbstractView
import com.saveourtool.save.frontend.common.components.views.usersettings.right.actionButtonClasses
import com.saveourtool.save.frontend.common.components.views.usersettings.right.actionIconClasses
import com.saveourtool.save.frontend.common.externals.fontawesome.*
import com.saveourtool.save.frontend.common.http.responseChangeOrganizationStatus
import com.saveourtool.save.frontend.common.utils.*
import com.saveourtool.save.frontend.common.utils.classLoadingHandler
import com.saveourtool.save.frontend.http.responseChangeOrganizationStatus

import react.ChildrenBuilder
import react.FC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import com.saveourtool.save.frontend.common.http.getProject
import com.saveourtool.save.frontend.common.utils.*
import com.saveourtool.save.frontend.common.utils.noopResponseHandler
import com.saveourtool.save.frontend.components.basic.projects.*
import com.saveourtool.save.frontend.utils.ProjectMenuBar
import com.saveourtool.save.info.UserInfo
import com.saveourtool.save.utils.getHighestRole

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

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

import com.saveourtool.save.frontend.common.utils.*
import com.saveourtool.save.frontend.externals.i18next.useTranslation
import com.saveourtool.save.frontend.utils.*
import com.saveourtool.save.info.UserStatus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

package com.saveourtool.save.frontend.components.views.contests

import com.saveourtool.save.frontend.utils.Style
import com.saveourtool.save.frontend.utils.useBackground
import com.saveourtool.save.frontend.common.utils.Style
import com.saveourtool.save.frontend.common.utils.useBackground
import com.saveourtool.save.info.UserInfo

import react.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ package com.saveourtool.save.frontend.components.views.contests

import com.saveourtool.save.entities.contest.ContestSampleDto
import com.saveourtool.save.frontend.common.components.tables.*
import com.saveourtool.save.frontend.common.externals.fontawesome.faCode
import com.saveourtool.save.frontend.common.utils.*
import com.saveourtool.save.frontend.externals.fontawesome.faCode
import com.saveourtool.save.frontend.utils.*
import com.saveourtool.save.validation.FrontendRoutes

import react.FC
import react.Fragment
import react.Props
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

package com.saveourtool.save.frontend.components.views.contests

import com.saveourtool.save.frontend.externals.fontawesome.FontAwesomeIconModule
import com.saveourtool.save.frontend.externals.fontawesome.fontAwesomeIcon
import com.saveourtool.save.frontend.common.externals.fontawesome.FontAwesomeIconModule
import com.saveourtool.save.frontend.common.externals.fontawesome.fontAwesomeIcon

import js.core.jso
import react.ChildrenBuilder
Expand Down
Loading

0 comments on commit caf2f1b

Please sign in to comment.