mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-08-13 14:17:54 +00:00
changed workspace remote url (#341)
This commit is contained in:
parent
04c0f8cbcd
commit
56e801a582
@ -55,10 +55,14 @@ func CreateAnonymousToken(envPrefix string) (*GuestToken, error) {
|
|||||||
return token, nil
|
return token, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetRemoteUrl(analyzeDestination string, analyzeToken string) string {
|
func GetRemoteUrl(analyzeDestination string, analyzeModel string, analyzeToken string, guestMode bool) string {
|
||||||
|
if guestMode {
|
||||||
return fmt.Sprintf("https://%s/share/%s", analyzeDestination, analyzeToken)
|
return fmt.Sprintf("https://%s/share/%s", analyzeDestination, analyzeToken)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return fmt.Sprintf("https://%s/app/workspaces/%s", analyzeDestination, analyzeModel)
|
||||||
|
}
|
||||||
|
|
||||||
func CheckIfModelReady(analyzeDestination string, analyzeModel string, analyzeToken string, guestMode bool) bool {
|
func CheckIfModelReady(analyzeDestination string, analyzeModel string, analyzeToken string, guestMode bool) bool {
|
||||||
statusUrl, _ := url.Parse(fmt.Sprintf("https://trcc.%s/models/%s/status", analyzeDestination, analyzeModel))
|
statusUrl, _ := url.Parse(fmt.Sprintf("https://trcc.%s/models/%s/status", analyzeDestination, analyzeModel))
|
||||||
|
|
||||||
@ -123,7 +127,7 @@ var analyzeInformation = &AnalyzeInformation{}
|
|||||||
func GetAnalyzeInfo() *shared.AnalyzeStatus {
|
func GetAnalyzeInfo() *shared.AnalyzeStatus {
|
||||||
return &shared.AnalyzeStatus{
|
return &shared.AnalyzeStatus{
|
||||||
IsAnalyzing: analyzeInformation.IsAnalyzing,
|
IsAnalyzing: analyzeInformation.IsAnalyzing,
|
||||||
RemoteUrl: GetRemoteUrl(analyzeInformation.AnalyzeDestination, analyzeInformation.AnalyzeToken),
|
RemoteUrl: GetRemoteUrl(analyzeInformation.AnalyzeDestination, analyzeInformation.AnalyzedModel, analyzeInformation.AnalyzeToken, analyzeInformation.GuestMode),
|
||||||
IsRemoteReady: CheckIfModelReady(analyzeInformation.AnalyzeDestination, analyzeInformation.AnalyzedModel, analyzeInformation.AnalyzeToken, analyzeInformation.GuestMode),
|
IsRemoteReady: CheckIfModelReady(analyzeInformation.AnalyzeDestination, analyzeInformation.AnalyzedModel, analyzeInformation.AnalyzeToken, analyzeInformation.GuestMode),
|
||||||
SentCount: analyzeInformation.SentCount,
|
SentCount: analyzeInformation.SentCount,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user