Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/review 414 #418

Closed
wants to merge 46 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
291be47
Created LogViewerWidget
mprzypasniak99 Sep 25, 2021
af06dd9
Added LogViewer to WidgetIndex
mprzypasniak99 Sep 25, 2021
cd3a269
Added WireMock for LogViewer
mprzypasniak99 Sep 25, 2021
ba65c41
Remove ALL log level, use INFO as default
przemekxa Oct 16, 2021
954f9af
Added placeholder method for processing logs before sending to front-end
mprzypasniak99 Oct 17, 2021
e28ceab
Merge branch 'enhancement/log-viewer-widget' into feature/381
mprzypasniak99 Oct 17, 2021
783fb34
Changed to using strategies [#381]
mprzypasniak99 Oct 22, 2021
e6f39b0
Merge remote-tracking branch 'origin/feature/381' into feature/381
mprzypasniak99 Oct 22, 2021
75fff1f
Strategy adjustments [#381]
mprzypasniak99 Oct 22, 2021
de0aea0
Added tests and Strategies implementations [#381]
mprzypasniak99 Oct 22, 2021
1dbb996
Deleted SSHWidget - replaced by strategies [#381]
mprzypasniak99 Oct 22, 2021
23a2b6b
Changes after code review - problem with tests to solve
Borrubasz Oct 23, 2021
3239153
Add ssh to endpoints dialog fields #412
clmrv Oct 23, 2021
26a173e
Tests fixed
mprzypasniak99 Oct 23, 2021
737c288
Add SSH Key field to Credentials
przemekxa Oct 24, 2021
7d2f0b2
Modify credential test
przemekxa Oct 24, 2021
5729dae
Change SSH Key regex
przemekxa Oct 24, 2021
b5a967e
Add OpenSSH docker image
przemekxa Oct 27, 2021
8acac96
Deleted SSH tests to move them to different branch
mprzypasniak99 Oct 27, 2021
989ee33
Merge remote-tracking branch 'origin/feature/381' into feature/381
mprzypasniak99 Oct 27, 2021
9b2ffcf
Code review changes [#381]
mprzypasniak99 Oct 27, 2021
604f8ca
Merge branch 'feature/412' into feature/376-381-412
clmrv Oct 31, 2021
743c4be
Merge remote-tracking branch 'origin/feature/381' into feature/376-38…
clmrv Oct 31, 2021
82945f2
Add ssh to credentials tests, Turn off LogViewer backend
clmrv Nov 2, 2021
7178432
Change text fo file
przemekxa Nov 2, 2021
c7f3fd5
Merge branch 'feature/412' into feature/376-381-412
przemekxa Nov 2, 2021
622953c
Add SSH Key passphrase
przemekxa Nov 2, 2021
48008a9
Merge branch 'feature/412' into feature/376-381-412
przemekxa Nov 2, 2021
c467182
Move template logs to backend
clmrv Nov 2, 2021
7a341e7
Adjustments for communication with front-end
mprzypasniak99 Nov 2, 2021
d96cf4a
Merge remote-tracking branch 'origin/feature/381' into feature/376-38…
clmrv Nov 3, 2021
a1c7982
Merge fixes
clmrv Nov 3, 2021
7eae0b5
Attempt to load logs from server
clmrv Nov 3, 2021
52170d2
Successfully sending parsed data to front-end
mprzypasniak99 Nov 7, 2021
6e4e608
Data sent to front-end but not shown
mprzypasniak99 Nov 7, 2021
9650fc8
Fix log structure typo
clmrv Nov 7, 2021
0d8f46f
Fixed sending blank log
mprzypasniak99 Nov 7, 2021
86da1ef
Add logLevels config file
clmrv Nov 8, 2021
fd39ed4
Temporarily remove SSH Key tests
przemekxa Nov 8, 2021
1bb0f1a
Remove obsolete event constant #417
clmrv Nov 12, 2021
00c4452
Remove obsolete log generator #417
clmrv Nov 12, 2021
608d790
Code review fixes - deleted unnecesarry comments
mprzypasniak99 Nov 12, 2021
833796e
WTTech code review fixes
mprzypasniak99 Nov 13, 2021
6d49c96
Merge pull request #417 from wttech/feature/376-381-412
TheTerabit Nov 14, 2021
6d86258
WTTech code review fixes
mprzypasniak99 Nov 13, 2021
4685fd7
Merge branch 'fix/review-414' of github.com:wttech/cogboard into fix/…
mprzypasniak99 Nov 14, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -55,7 +55,7 @@ allprojects {

tasks {
named("build") {
dependsOn(":cogboard-app:test", ":cogboard-webapp:buildImage")
dependsOn(":cogboard-app:test", ":cogboard-webapp:buildImage", ":ssh:buildImage")
}
register("cypressInit", Exec::class) {
setWorkingDir("./functional/cypress-tests")
6 changes: 6 additions & 0 deletions cogboard-local-compose.yml
Original file line number Diff line number Diff line change
@@ -16,6 +16,12 @@ services:
- cognet
command: ["--no-request-journal", "--global-response-templating"]

ssh-server:
image: ssh-server
hostname: ssh-server
networks:
- cognet

backend:
image: "cogboard/cogboard-app:${COGBOARD_VERSION}"
environment:
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -17,3 +17,4 @@ rootProject.name = "cogboard"

include("cogboard-app")
include("cogboard-webapp")
include("ssh")
9 changes: 9 additions & 0 deletions ssh/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM lscr.io/linuxserver/openssh-server

ENV PUBLIC_KEY="ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICLzgU4PuqFGnQCd5A5Gl30ssE3b9fW7gcyvES4xHHUo mock@openssh-server"
ENV PASSWORD_ACCESS=true
ENV USER_NAME=mock
ENV USER_PASSWORD=TLQuoLMn*T89&Y*r*YqHviSFH6MkR!4E

ADD gen.sh /home/mock/gen.sh
RUN /home/mock/gen.sh 50 > /home/mock/example.txt
14 changes: 14 additions & 0 deletions ssh/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import com.bmuschko.gradle.docker.tasks.image.DockerBuildImage

plugins {
id("base")
id("com.bmuschko.docker-remote-api")
}

tasks {
register<DockerBuildImage>("buildImage") {
group = "docker"
inputDir.set(file(projectDir))
images.add("ssh-server")
}
}
20 changes: 20 additions & 0 deletions ssh/gen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
labels=(DEBUG INFO WARNING ERROR)
words=(Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce sit amet massa sit amet mi feugiat lobortis. Morbi ultrices hendrerit luctus. Donec fermentum viverra viverra. Integer convallis sapien sit amet facilisis pretium. Ut quis commodo odio, ac bibendum urna. Ut imperdiet ante sed ex sollicitudin auctor. Nulla vel eros sit amet velit vulputate suscipit a malesuada felis. Curabitur commodo, erat eget condimentum tristique, ante diam porttitor nulla, condimentum vulputate nibh ex sit amet velit. Vestibulum vel lectus bibendum, pellentesque nisl id, vehicula tellus. Suspendisse sem turpis, dignissim quis aliquet nec, laoreet sit amet urna. Nulla non euismod tellus, id varius)

COUNT=5
if ! [ -z "$1" ]; then
COUNT=$1
fi

for run in $( seq 1 $COUNT ); do
d=$(date +%Y-%m-%d:%H:%M:%S)
l=${labels[$(($RANDOM%4))]}
w=()
wCount=$(($RANDOM%5+5))
for (( i=0; i<$wCount; i++ ))
do
w[i]=${words[$(($RANDOM%${#words[@]}))]}
done
echo $d "*"${l}"* [FelixStartLevel] " ${w[*]}
done