-
Notifications
You must be signed in to change notification settings - Fork 9
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
Widget | Log Viewer - preview #414
base: master
Are you sure you want to change the base?
Conversation
cogboard-app/src/main/kotlin/com/cognifide/cogboard/ssh/auth/SSHAuthData.kt
Outdated
Show resolved
Hide resolved
cogboard-app/src/main/kotlin/com/cognifide/cogboard/ssh/auth/SSHAuthData.kt
Outdated
Show resolved
Hide resolved
cogboard-app/src/main/kotlin/com/cognifide/cogboard/ssh/auth/SSHAuthData.kt
Outdated
Show resolved
Hide resolved
} | ||
|
||
fun createCommand(): String { | ||
val logLines = config.getString(CogboardConstants.Props.LOG_LINES) ?: "0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the overloaded getString
method that uses the second parameter:
config.getString(CogboardConstants.Props.LOG_LINES, "0")
connect(config) | ||
} catch (e: JSchException) { | ||
LOGGER.error(e.message) | ||
vertx.eventBus().send(eventBusAddress, e) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we extract method here:
sendError(e)
|
||
private fun initSSHSession(authData: SSHAuthData) { | ||
jsch = JSch() | ||
jsch.setKnownHosts("~/.ssh/known_hosts") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this line mean? - does it requires some configuration?
cogboard-app/src/main/kotlin/com/cognifide/cogboard/ssh/session/SessionStrategyFactory.kt
Outdated
Show resolved
Hide resolved
|
||
class SSHKeyAuthSessionStrategy(jSch: JSch, authData: SSHAuthData) : SessionStrategy(jSch, authData) { | ||
override fun initSession(): Session { | ||
if (authData.password == "") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use: import io.netty.util.internal.StringUtil.EMPTY_STRING
Fix/review 414
Added proper exception handling to react to errors #420
channel.inputStream = null | ||
sshInputStream = channel.inputStream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get this part: why do we set those nulls
here?
BASIC -> config.getString(Props.PASSWORD) | ||
SSH_KEY -> config.getString(Props.SSH_KEY) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have created variables for this: lines 12, 14
LogsViewer - change logs generator permissions
#476 - LogsViewer - Changes on frontend
LogViewer | Fix copy button
Feature/448
DO NOT MERGE
This is just a changes preview fro CR purposes
SP: 1