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

Widget | Log Viewer - preview #414

Open
wants to merge 314 commits into
base: master
Choose a base branch
from

Conversation

szymon-owczarzak
Copy link
Contributor

@szymon-owczarzak szymon-owczarzak commented Oct 18, 2021

DO NOT MERGE

This is just a changes preview fro CR purposes

SP: 1

@szymon-owczarzak szymon-owczarzak added the do not merge This task not finished yet label Oct 18, 2021
@szymon-owczarzak szymon-owczarzak self-assigned this Oct 18, 2021
}

fun createCommand(): String {
val logLines = config.getString(CogboardConstants.Props.LOG_LINES) ?: "0"
Copy link
Contributor Author

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)
Copy link
Contributor Author

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")
Copy link
Contributor Author

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?


class SSHKeyAuthSessionStrategy(jSch: JSch, authData: SSHAuthData) : SessionStrategy(jSch, authData) {
override fun initSession(): Session {
if (authData.password == "") {
Copy link
Contributor Author

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

@mprzypasniak99 mprzypasniak99 mentioned this pull request Nov 13, 2021
7 tasks
@mprzypasniak99 mprzypasniak99 mentioned this pull request Nov 14, 2021
7 tasks
Comment on lines 87 to 88
channel.inputStream = null
sshInputStream = channel.inputStream
Copy link
Contributor Author

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?

Comment on lines 36 to 37
BASIC -> config.getString(Props.PASSWORD)
SSH_KEY -> config.getString(Props.SSH_KEY)
Copy link
Contributor Author

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

@przemekxa przemekxa mentioned this pull request Jan 18, 2022
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge This task not finished yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants