Skip to content

Commit

Permalink
Merge pull request #9264 from Clem-Fern/fix#9262
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugeny committed Dec 1, 2023
2 parents 38c9714 + f80db81 commit 9f6263f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tabby-ssh/src/components/sshProfileSettings.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Component, ViewChild } from '@angular/core'
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
import { firstBy } from 'thenby'

import { ConfigService, FileProvidersService, Platform, HostAppService, PromptModalComponent, PartialProfile } from 'tabby-core'
import { FileProvidersService, Platform, HostAppService, PromptModalComponent, PartialProfile, ProfilesService } from 'tabby-core'
import { LoginScriptsSettingsComponent } from 'tabby-terminal'
import { PasswordStorageService } from '../services/passwordStorage.service'
import { ForwardedPortConfig, SSHAlgorithmType, SSHProfile } from '../api'
Expand All @@ -27,14 +27,14 @@ export class SSHProfileSettingsComponent {

constructor (
public hostApp: HostAppService,
private config: ConfigService,
private profilesService: ProfilesService,
private passwordStorage: PasswordStorageService,
private ngbModal: NgbModal,
private fileProviders: FileProvidersService,
) { }

async ngOnInit () {
this.jumpHosts = this.config.store.profiles.filter(x => x.type === 'ssh' && x !== this.profile)
this.jumpHosts = (await this.profilesService.getProfiles({ includeBuiltin: false })).filter(x => x.type === 'ssh' && x !== this.profile)
this.jumpHosts.sort(firstBy(x => this.getJumpHostLabel(x)))

for (const k of Object.values(SSHAlgorithmType)) {
Expand Down Expand Up @@ -67,7 +67,7 @@ export class SSHProfileSettingsComponent {
}

getJumpHostLabel (p: PartialProfile<SSHProfile>) {
return p.group ? `${p.group} / ${p.name}` : p.name
return p.group ? `${this.profilesService.resolveProfileGroupName(p.group)} / ${p.name}` : p.name
}

async setPassword () {
Expand Down

0 comments on commit 9f6263f

Please sign in to comment.