Commit Graph

1406 Commits

Author SHA1 Message Date
Sylvia Crowe
ea253c33ae merge 'main' into use-ssh-library--add-user-input
I had to reimplement a few front end changes but nothing too major aside
from that.
2024-02-08 15:51:32 -08:00
Sylvia Crowe
53de138832 fix: add the userinput.tsx changes
These were missed in the previous commit. Adding them now.
2024-02-08 13:07:37 -08:00
Sylvia Crowe
75778963c5 merge 'main' into use-ssh-library--add-user-input
This merge is rather large, so it needs some explaining. Most of it was
a straightforward merge, but there were a few markdown edits i made that
had to manually be resolved.

There were also a few path changes to be made in the userinput.tsx file.
2024-02-08 13:06:56 -08:00
Red J Adaya
e692c7c180
Split model into separate files (#279)
* split settings modals

* init

* init

* remove styles not related to checkbox

* remove styles not related to CmdStrCode

* renderCmdText doesn't need styles

* remove styles not related to dropdown

* IconButton doesn't need styles because it extends Button

* remove old connections

* InfoMessage conmponent no longer needed

* fix import error

* remove styles not related to InlineSettingsTextEdit

* remove styles not related to InputDecoration

* LinkButton doesn't need styles cos it's extends Button component

* remove styles not related to markdown

* remove styles not related to modal

* NumberField doesn't need styles cos it extends TextField

* remove styles not related to PasswordField

* RemoteStatusLight no longer used. It's replaced by Status component.

* remove styles not related to ResizableSidebar

* SettingsError doesn't need styles cos it uses classnames in app.less

* remove styles not related to Status

* remove styles not related to TextField

* remove styles not related to Toggle

* remove styles not related to Tooltip

* init

* cleanup bookmarks model

* cleanup clientsettingsview model

* cleanup cmd model

* remove dayjs import from bookmarks model

* cleanup commandrunner model

* cleanup historyview model

* cleanup input model

* cleanup linecontainer model

* cleanup mainsidebar model

* cleanup main model

* cleanup plugins model

* cleanup remote model

* cleanup screen model

* cleanup screenlines model

* cleanup session model

* cleanup screenlinecontainer model

* cleanup connectionsview model

* add index.ts inside model dir

* replace /model_old imports with /model

* rename model to models

* move model_old to models

* fix ptyDataSource errors

* split models/model
2024-02-08 17:52:42 -03:00
Cole Lashley
b37f7f722e
Command to copy file from remote to local (#231)
* first pass of copy file

* first pass fixing up function

* fleshed out copy function, still working on display and parameters

* implemented scp like syntax

* finished implemententation of copy file - there are still issues

* more bug fixes, still running into error

* pushing waveshell concurrency and channel fixes - still need to do some qol fixes before merge

* aesthetic fixes and removed logs

* fixed bug in GetRemoteRuntimeState

* formatting small fix

* fixed pretty print bytes

* added local to local command

* small fix removing workaround

* added workaround back

* added some logs for debug

* added some more logs

* quick bug fix for update cmd race condition

* added fix for race condition

* added some more logs for debugging

* fixed up logs

* added proper fe state for dest parameter

* implemented setting status indicator output

* first pass at updating status indicators

* removed logs and small fix ups

* removed whitespace

* addressed review comments
2024-02-08 17:37:23 -03:00
Sylvia Crowe
89906d21d4 feat: create naive ui for ssh key passphrases
This isn't quite as reactive as the other methods, but it does attempt
to use publickey without a passphrase, then attempt to use the password
as the passphrase, and finally prompting the user for a passphrase. The
problem with this approach is that if multiple keys are used and they
all have passphrases, they need to all be checked up front. In practice,
this will not happen often, but it is something to be aware of.
2024-02-08 02:53:37 -08:00
Sylvia Crowe
747a2b784a fix: set number of retries to two again
I was wrong in my previous analysis. The number given is the total
number of tries. This is confusing when keyboard authentication and
password authentication are both available which usually doesn't happen.
2024-02-07 17:03:08 -08:00
Sylvia Crowe
84e7605e36 refactor: change argument order in GetUserInput
This is a simple change to move the context to the first argument of
GetUserInput to match the convention used elsewhere in the code.
2024-02-07 17:01:35 -08:00
Sylvia Crowe
839e338dad fix: set number of retries to one in ssh
Number of retries means number of attempts after the fact, not number of
total attempts. It has been adjusted from 2 to 1 to reflect this.
2024-02-07 16:24:27 -08:00
Sylvia Crowe
771046637d fix: allow automatic and interactive auth together
Previously, it was impossible to use to separate methods of the same
type to try ssh authentication. This made it impossible to make an auto
attempt before a manual one. This change restricts that by combining
them into one method where the auto attempt is tried once first and
cannot be tried again. Following that, interactive authentication can be
tried separately.

It also lowers the time limit on kbd interactive authentication to 15
seconds due to limitations on the library we are using.
2024-02-07 16:00:39 -08:00
Sylvia Crowe
8dc3b3b0c1 feat: add interactive password authentication
This makes the ssh password authentication interactive with its own user
input modal. Unfortunately, this method does not allow trying a default
first. This will need to be expanded in the future to accomodate that.
2024-02-07 14:50:34 -08:00
sawka
ff855cf308 add AI and the blog 2024-02-07 17:20:28 -03:00
Sylvia Crowe
0a8c8221fd feat: add user input for kbd-interactive auth
This adds a modal so the user can respond to prompts provided using the
keyboard interactive authentication method.
2024-02-06 21:34:33 -08:00
Red J Adaya
bf1b556537
Split components in common (#276)
* split settings modals

* init

* init

* remove styles not related to checkbox

* remove styles not related to CmdStrCode

* renderCmdText doesn't need styles

* remove styles not related to dropdown

* IconButton doesn't need styles because it extends Button

* remove old connections

* InfoMessage conmponent no longer needed

* fix import error

* remove styles not related to InlineSettingsTextEdit

* remove styles not related to InputDecoration

* LinkButton doesn't need styles cos it's extends Button component

* remove styles not related to markdown

* remove styles not related to modal

* NumberField doesn't need styles cos it extends TextField

* remove styles not related to PasswordField

* RemoteStatusLight no longer used. It's replaced by Status component.

* remove styles not related to ResizableSidebar

* SettingsError doesn't need styles cos it uses classnames in app.less

* remove styles not related to Status

* remove styles not related to TextField

* remove styles not related to Toggle

* remove styles not related to Tooltip
2024-02-06 18:23:56 -03:00
Sylvia Crowe
38c6e8f5f8 merge branch 'main' into use-ssh-library--add-user-input 2024-02-05 16:36:15 -08:00
Sylvia Crowe
def90a0493 feat: allow writing to known_hosts first pass
As a follow-up to the previous change, we now allow the user to respond
to interactive queries in order to determine if an unknown known hosts
key can be added to a known_hosts file if it is missing. This needs to
be refined further, but it gets the basic functionality there.
2024-02-05 16:26:54 -08:00
Red J Adaya
fc65e65f11
remove old connections (#273) 2024-02-03 01:23:10 -03:00
Red J Adaya
cedebe2196
split settings modals (#272) 2024-02-03 01:22:30 -03:00
Sylvia Crowe
e2d10cd807 feat: create first pass known_hosts detection
Manually integrating with golang's ssh library means that the code must
authenticate known_hosts on its own. This is a first pass at creating a
system that parses the known hosts files and denys a connection if there
is a mismatch. This needs to be updated with a means to add keys to the
known-hosts file if the user requests it.
2024-02-02 11:50:02 -08:00
Red J Adaya
3a9f6dec6d
remove modals.tsx as it's no longer used. rename modals.less to settings.less (#271) 2024-02-02 00:02:45 -03:00
Sylvia Crowe
26240bea97 feat: complete user input modal
This rounds out the most immediate concerns for the new user input
modal. The frontend now includes a timer to show how much time is left
and will close itself once it reaches zero. Css
formatting has been cleaned up to be more reasonable.

There is still some test code present on the back end. This will be
removed once actuall examples of the new modal are in place.
2024-01-31 23:00:50 -08:00
Sylvia Crowe
fa9a0bd228 merge branch 'main' into use-ssh-library--add-user-input 2024-01-31 14:46:43 -08:00
Sylvie Crowe
51ee7bef61
Shellpref for sshconfig import (#270) 2024-01-31 14:11:12 -08:00
Sylvia Crowe
fa2c684c0e fix: add props to user input request modal
There was a second place that the modals were created that I previously
missed. This fixes that second casel
2024-01-31 11:58:32 -08:00
Sylvia Crowe
750e8bc9f7 refactor: update user input backend/interface
This updates the user input backend to fix a few potential bugs. It also
refactors the user input request and response types to better handle
markdown and errors while making it more convenient to work with.

A couple frontend changes were made to keep everything compatible.
2024-01-31 03:43:22 -08:00
Sylvia Crowe
f781e358e5 feat: create frontend for user input requests
This is part of a change to allow the backend to request user input from
the frontend. This adds a component specifically for handling this
logic. It is only a starting point, and does not work perfectly yet.
2024-01-30 22:50:40 -08:00
Evan Simkowitz
5ce7b92232
Simplify logic for startResizing width calculation (#269)
* Apply Red's suggestion and move width logic to getWidth

* remove unnecessary

* a little more

* remove comment
2024-01-30 22:34:00 -08:00
Evan Simkowitz
81a9e74991
Fix onMouseDown causing width to snap back to persisted width (#268)
* Fix onMouseDown causing width to snap back to persisted width

* var name change

* remove logs

* remove redundant call
2024-01-30 22:23:00 -08:00
Evan Simkowitz
679e85a84a
Fix sidebar width not persisting when un-collapsing (#267)
* Do not persist collapsed width to db

* remove console.logs

* one more

* one more

* remove setTemp from getWidth and add to the startResize call
2024-01-30 22:04:25 -08:00
Evan Simkowitz
da69a0f583
Fix broken merge (#266) 2024-01-30 20:56:32 -08:00
Red J Adaya
37ab1bca90
allow resizing of left sidebar (#244)
* wip

* integrate original sidebar content

* ResizableSidebar component

* trigger toggleCollapse

* remove debugging code

* minor refactor. disable text select on mousemove

* replace icons with fontawesome icons. fix alignment issues

* fix session view width when tabs overflow

* prevent index and icon from shifting when resizing

* snap effect

* minor refactor

* apply collapsed mode to sidebar contents

* change default width to 240px

* backend implementation

* fix wrong subcmd

* save collapsed state

* retore sidebar state on reload/launch

* use collapse data form db on first load. use previously saved width on expand.

* persist width as well collapse state

* various fixes and improvements

* bind methods

* refactor

* more refactor

* fix minor bug

* fix merge issues

* various fixes

* refactor

* fixes

* fix issues

* fix all issues

* resolve undefind tempWidth

* fix toggleCollapsed

* use Promise in stopResizing method

* use tempCollapsed to for real time toggling between logos

* minor method name change

* refactor

* remove debugging code

* fix conflict

* fix setting collapsed state via CLI

* minor refactor

* remove debugging code

* create setTempWidthAndTempCollapsed method

* handle invalid width set via cli

* refactor: setbycli not actually needed

* remove unused code
2024-01-30 20:17:49 -08:00
Evan Simkowitz
40757fa7f4
Prevent the status indicator flickering for quick-returning commands (#265)
* add status-indicator-visible

* save

* save

* Prevent the status indicator flickering for quick returns

* flx regression

* reduce delay, reset spinnerVisible when there's no more running commands

* clean up code reuse

* move code around

* slight optimizations to prevent rendering before spinner is visible

* rename var

* revert shouldSync change as it broke the sync
2024-01-30 16:31:38 -08:00
Evan Simkowitz
e576f7f07d
Sync RotateIcon spin as well (#262)
* Sync RotateIcon spin as well

* make shouldSync a boolean value
2024-01-30 14:16:33 -08:00
Evan Simkowitz
9e804232c2
Fix SidebarItem key error (#263) 2024-01-30 11:54:35 -08:00
sawka
d3dbac6e77 fix missing react key 2024-01-30 11:29:12 -08:00
Mike Sawka
198de02a65
code to restore indicator state on refresh (#260)
* code to restore indicator state on refresh

* fix style
2024-01-29 23:51:01 -08:00
Mike Sawka
8f64d6a589
set animation startTime to sync spinners for status indicators (#259)
* set animation startTime to sync spinners for status indicators

* catch animationstart (hover interaction) to restart startTime.

* use const

---------

Co-authored-by: Evan Simkowitz <esimkowitz@users.noreply.github.com>
2024-01-29 23:48:37 -08:00
Sylvia Crowe
98f6b84d3e feat: create backend for user input requests
This is the first part of a change that allows the backend to request
user input from the frontend. Essentially, the backend will send a
request for the user to answer some query, and the frontend will send
that answer back. It is blocking, so it needs to be used within a
goroutine.

There is some placeholder code in the frontend that will be updated in
future commits. Similarly, there is some debug code in the backend
remote.go file.
2024-01-29 16:19:34 -08:00
Evan Simkowitz
1a51d93a54
Fix add-workspace so that only the plus button shows pointer (#258) 2024-01-29 14:10:58 -08:00
sawka
9ab3b2a5b7 only run prettier on js/ts/css/less files 2024-01-29 13:35:09 -08:00
Evan Simkowitz
856c879cdf
Adjust the status indicator icon to make the spinner a little bigger (#257) 2024-01-29 11:03:18 -08:00
sawka
ea3f744d93 bump to v0.6.1 2024-01-29 09:39:36 -08:00
Evan Simkowitz
dd3d52e47d
Add indicator to tabs and workspaces to show when commands are running (#254)
* save

* not working yet but close

* logic is working, just need to do styling

* save work

* save

* save work

* ta da!

* fix line height

* format files

* remove running commands on hangup.  also don't allow numrunning to be less than 0

* remove < 0 check (safer without for concurrency)
2024-01-28 13:47:36 -08:00
Evan Simkowitz
32499f0421
Add workspace settings for formatter and recommended extensions (#255) 2024-01-28 13:14:54 -08:00
Mike Sawka
b136c915df
Restart command (#253)
* working on cmd restart logic

* button to restart command

* bind Cmd-R to restart selected command, and Cmd-Shift-R to restart last command.  Browser Refresh is now Option-R.  also fix 'clear' command to not delete running commands (like archive).  some small changes to keyboard utility code to always set 'alt' and 'meta' appropriately.  use 'cmd' and 'option' for crossplatform bindings

* focus restarted line

* update termopts, use current winsize to set termopts for new command

* add cmd.restartts to track restart time

* display restarted time in line w/ tooltip with original time

* add restartts to line:show
2024-01-26 16:25:21 -08:00
Cole Lashley
0648d48ba1
Intenational key binding fixes (#234)
* first pass of copy file

* first pass fixing up function

* first pass fixing key press

* fixed up key press parsing

* reverted cmdrunner.go

* fixed cmdrunner.go again :p

* fixed cmdrunner again lol

* Add job status indicators to tabs within a workspace (#232)

Adds job status indicators that will show any updates to running commands while you are focused away from a tab. These will show up as status icons in the tab view.

These indicators will reset for a given tab when you focus back to it.

I've updated the inner formatting of the tab to use flexboxes, allowing the title to display more text when there are no icons to display.

Also includes some miscellaneous for-loop pattern improvements in model.ts and removing of unused variables, etc.

* first pass fixing key press

* added key util check file

* addressed rebase artifacts

* fixed more rebase artifacts

* fixed keybindings

* removed log

* fixed a ton of rebase artifacts

* fixed a ton of rebase artifacts

* added cmd maps to altKey if not on macos

* fixed platform check code and fixed some small bugs
2024-01-26 10:50:11 -08:00
Evan Simkowitz
b97423268c
Move icons out of common, clean up visibility story (#251) 2024-01-25 16:17:03 -08:00
Evan Simkowitz
34ec4ff39f
Add status indicators to workspace items in the sidebar (#245)
* save work

* refactor end-icon and actions-icon into separate components

* reverting change part 1

* fix

* separate out workspace and tab formatting more

* save work

* Got it working!

* fix scrollbar but hide it so that the formatting doesn't jump when hovering

* revert some changes, replace some svgs with fontawesome

* remove listitem

* remove log
2024-01-25 13:31:20 -08:00
Sylvie Crowe
018bb14b6a
Use ssh library for remote connections (#250)
* create proof of concept ssh library integration

This is a first attempt to integrate the golang crypto/ssh library for
handling remote connections. As it stands, this features is limited to
identity files without passphrases. It needs to be expanded to include
key+passphrase and password verifications as well.

* add password and keyboard-interactive ssh auth

This adds several new ssh auth methods. In addition to the PublicKey
method used previously, this adds password authentication,
keyboard-interactive authentication, and PublicKey+Passphrase
authentication.

Furthermore, it refactores the ssh connection code into its own wavesrv
file rather than storing int in waveshell's shexec file.

* clean up old mshell launch methods

In the debugging the addition of the ssh library, i had several versions
of the MShellProc Launch function. Since this seems mostly stable, I
have removed the old version and the experimental version in favor of
the combined version.

* allow switching between new and old ssh for dev

It is inconvenient to create milestones without being able to merge into
the main branch. But due to the experimental nature of the ssh changes,
it is not desired to use these changes in the main branch yet. This
change disables the new ssh launcher by default. It can be used by
changing the UseSshLibrary constant to true in remote.go. With this, it
becomes possible to merge these changes into the main branch without
them being used in production.

* fix: allow retry after ssh auth failure

Previously, the error status was not set when an ssh connection failed.
Because of this, an ssh connection failure would lock the failed remote
until waveterm was rebooted. This fix properly sets the error status so
this cannot happen.
2024-01-25 10:18:11 -08:00
Evan Simkowitz
99f5c094d2
Merge pull request #249 from wavetermdev:evan/update-disclaimer
Update disclaimers with latest dependencies
2024-01-24 14:52:02 -08:00