-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Display scripts executions by environments
- Loading branch information
Showing
25 changed files
with
396 additions
and
30 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import kotlin.random.Random | ||
|
||
private val charactersAvailableForRandom = listOf( | ||
'a', 'b', 'c', 'd', 'e', 'f', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', | ||
'y', 'z' | ||
) | ||
|
||
fun randomString(length: Int = 10): String { | ||
return (1..length) | ||
.map { Random.nextInt(0, charactersAvailableForRandom.size).let { charactersAvailableForRandom[it] } } | ||
.joinToString("") | ||
} |
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
7 changes: 4 additions & 3 deletions
7
modules/app-server/dao/src/test/kotlin/dao/script/ScriptBuilder.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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
package dao.script | ||
|
||
import randomString | ||
import script.ScriptCreationRequest | ||
|
||
fun buildScriptCreationRequest( | ||
name: String = "myName", | ||
checksum: String = "checksum", | ||
content: String = "content" | ||
name: String = randomString(), | ||
checksum: String = randomString(), | ||
content: String = randomString() | ||
) = ScriptCreationRequest(name = name, checksum = checksum, content = content) |
27 changes: 27 additions & 0 deletions
27
.../app-server/domain/src/main/kotlin/execution/script/ModuleScriptsExecutionsInformation.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,27 @@ | ||
package execution.script | ||
|
||
import environment.Environment | ||
import execution.Status | ||
import script.Script | ||
import java.time.OffsetDateTime | ||
import java.util.* | ||
|
||
data class ModuleScriptsExecutionsInformation( | ||
val scriptsWithAllExecutions: List<ScriptWithAllExecutions>, | ||
val environments: List<Environment> | ||
) | ||
|
||
data class ScriptExecutionWithEnvironment( | ||
val id: UUID, | ||
val startDate: OffsetDateTime?, | ||
val durationInMs: Int?, | ||
val executionOrderIndex: Int, | ||
val output: String?, | ||
val status: Status?, | ||
val fkEnvironmentRef: UUID | ||
) | ||
|
||
data class ScriptWithAllExecutions( | ||
val script: Script, | ||
val executions: List<ScriptExecutionWithEnvironment> | ||
) |
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.