mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-14 10:33:48 +00:00
Fixed secret retrieval for connection testing while adding an ERI data source (#325)
This commit is contained in:
1 parent
0125f48f61
commit
2429788ccc
10 files changed
+53
-40
No files matched your search
@@ -98,7 +98,7 @@ public partial class DataSourceERI_V1InfoDialog : ComponentBase, IAsyncDisposabl
|
||||
return;
|
||||
}
|
||||
|
||||
var loginResult = await client.AuthenticateAsync(this.DataSource, this.RustService);
|
||||
var loginResult = await client.AuthenticateAsync(this.RustService);
|
||||
if (!loginResult.Successful)
|
||||
{
|
||||
this.dataIssues.Add(loginResult.Message);
|
||||
|
||||
@@ -188,14 +188,8 @@ public partial class DataSourceERI_V1Dialog : ComponentBase, ISecretId
|
||||
try
|
||||
{
|
||||
var cts = new CancellationTokenSource(TimeSpan.FromSeconds(14));
|
||||
var dataSource = new DataSourceERI_V1
|
||||
{
|
||||
AuthMethod = this.dataAuthMethod,
|
||||
Hostname = this.dataHostname,
|
||||
Port = this.dataPort,
|
||||
};
|
||||
|
||||
using var client = ERIClientFactory.Get(ERIVersion.V1, dataSource);
|
||||
this.DataSource = this.CreateDataSource();
|
||||
using var client = ERIClientFactory.Get(ERIVersion.V1, this.DataSource);
|
||||
if(client is null)
|
||||
{
|
||||
await this.form.Validate();
|
||||
@@ -217,7 +211,7 @@ public partial class DataSourceERI_V1Dialog : ComponentBase, ISecretId
|
||||
|
||||
this.availableAuthMethods = authSchemes.Data!.Select(n => n.AuthMethod).ToList();
|
||||
|
||||
var loginResult = await client.AuthenticateAsync(this.DataSource, this.RustService, cts.Token);
|
||||
var loginResult = await client.AuthenticateAsync(this.RustService, this.dataSecret, cts.Token);
|
||||
if (!loginResult.Successful)
|
||||
{
|
||||
await this.form.Validate();
|
||||
|
||||
Reference in new issue
Block a user