Update dev with changes from main (#3654)
This commit is contained in:
Коммит
264e21ed10
|
@ -16,7 +16,7 @@ public class ServerAccountComponent : GH_SpeckleTaskCapableComponent<Account>
|
|||
: base(
|
||||
"Account from Server/Token",
|
||||
"AccST",
|
||||
"Returns an account based on a Server URL and a token. URL can be a stream url too.\n TREAT EACH TOKEN AS A PASSWORD AND NEVER SHARE/SAVE IT IN THE FILE ITSELF",
|
||||
"Returns an account based on a Server URL and a token. URL can be a stream url too.\n You'll need to raise a token with at least Profile:Read and Stream:Read to access your account data. Add Stream:Write to enable publishing.\n TREAT EACH TOKEN AS A PASSWORD AND NEVER SHARE/SAVE IT IN THE FILE ITSELF",
|
||||
ComponentCategories.PRIMARY_RIBBON,
|
||||
ComponentCategories.COMPUTE
|
||||
)
|
||||
|
|
|
@ -14,13 +14,13 @@ public class ComponentTracker
|
|||
Parent = parent;
|
||||
}
|
||||
|
||||
private static void AppendHostAppInfoToProperties(Dictionary<string, object> properties)
|
||||
private static void AppendHostAppInfoToProperties(Dictionary<string, object?> properties)
|
||||
{
|
||||
properties["hostAppVersion"] = Loader.GetGrasshopperHostAppVersion();
|
||||
properties["hostApp"] = HostApplications.Grasshopper.Slug;
|
||||
}
|
||||
|
||||
public void TrackEvent(Speckle.Core.Logging.Analytics.Events eventName, Dictionary<string, object> properties)
|
||||
public void TrackEvent(Speckle.Core.Logging.Analytics.Events eventName, Dictionary<string, object?> properties)
|
||||
{
|
||||
AppendHostAppInfoToProperties(properties);
|
||||
Speckle.Core.Logging.Analytics.TrackEvent(eventName, properties);
|
||||
|
@ -44,9 +44,9 @@ public class ComponentTracker
|
|||
Speckle.Core.Logging.Analytics.TrackEvent(Speckle.Core.Logging.Analytics.Events.NodeRun, customProperties);
|
||||
}
|
||||
|
||||
public void TrackNodeSend(Account acc, bool auto, bool sync = false)
|
||||
public void TrackNodeSend(Account acc, bool auto, string? workspaceId, bool sync = false)
|
||||
{
|
||||
var customProperties = new Dictionary<string, object>();
|
||||
var customProperties = new Dictionary<string, object>() { { "workspace_id", workspaceId } };
|
||||
if (auto)
|
||||
{
|
||||
customProperties.Add("auto", auto);
|
||||
|
@ -61,14 +61,15 @@ public class ComponentTracker
|
|||
Speckle.Core.Logging.Analytics.TrackEvent(acc, Speckle.Core.Logging.Analytics.Events.Send, customProperties);
|
||||
}
|
||||
|
||||
public void TrackNodeReceive(Account acc, bool auto, bool isMultiplayer, string sourceHostApp)
|
||||
public void TrackNodeReceive(Account acc, bool auto, bool isMultiplayer, string sourceHostApp, string? workspaceId)
|
||||
{
|
||||
var properties = new Dictionary<string, object>
|
||||
var properties = new Dictionary<string, object?>
|
||||
{
|
||||
{ "auto", auto },
|
||||
{ "isMultiplayer", isMultiplayer },
|
||||
{ "sourceHostApp", HostApplications.GetHostAppFromString(sourceHostApp).Slug },
|
||||
{ "sourceHostAppVersion", sourceHostApp },
|
||||
{ "workspace_id", workspaceId },
|
||||
};
|
||||
AppendHostAppInfoToProperties(properties);
|
||||
Speckle.Core.Logging.Analytics.TrackEvent(acc, Speckle.Core.Logging.Analytics.Events.Receive, properties);
|
||||
|
|
|
@ -554,7 +554,8 @@ public class ReceiveComponentWorker : WorkerInstance
|
|||
Done();
|
||||
return;
|
||||
}
|
||||
receiveComponent.Tracker.TrackNodeSend(client.Account, receiveComponent.AutoReceive);
|
||||
|
||||
receiveComponent.Tracker.TrackNodeSend(client.Account, receiveComponent.AutoReceive, null);
|
||||
|
||||
var remoteTransport = new ServerTransport(InputWrapper?.GetAccount().Result, InputWrapper?.StreamId);
|
||||
remoteTransport.TransportName = "R";
|
||||
|
|
|
@ -445,7 +445,7 @@ public class SendComponentWorker : WorkerInstance
|
|||
continue;
|
||||
}
|
||||
|
||||
sendComponent.Tracker.TrackNodeSend(acc, sendComponent.AutoSend);
|
||||
sendComponent.Tracker.TrackNodeSend(acc, sendComponent.AutoSend, null);
|
||||
|
||||
var serverTransport = new ServerTransport(acc, sw.StreamId) { TransportName = $"T{t}" };
|
||||
transportBranches.Add(serverTransport, sw.BranchName ?? "main");
|
||||
|
|
|
@ -533,7 +533,7 @@ public class VariableInputSendComponentWorker : WorkerInstance
|
|||
transportBranches.Add(serverTransport, sw.BranchName ?? "main");
|
||||
Transports.Add(serverTransport);
|
||||
|
||||
sendComponent.Tracker.TrackNodeSend(acc, sendComponent.AutoSend);
|
||||
sendComponent.Tracker.TrackNodeSend(acc, sendComponent.AutoSend, null);
|
||||
}
|
||||
else if (transport is ITransport otherTransport)
|
||||
{
|
||||
|
|
|
@ -252,7 +252,15 @@ public class SyncReceiveComponent : SelectKitTaskCapableComponentBase<Base>
|
|||
return null;
|
||||
}
|
||||
|
||||
Tracker.TrackNodeReceive(acc, AutoReceive, myCommit.authorId != acc.userInfo.id, myCommit.sourceApplication);
|
||||
var workspaceId = await client.GetWorkspaceId(StreamWrapper.StreamId).ConfigureAwait(false);
|
||||
|
||||
Tracker.TrackNodeReceive(
|
||||
acc,
|
||||
AutoReceive,
|
||||
myCommit.authorId != acc.userInfo.id,
|
||||
myCommit.sourceApplication,
|
||||
workspaceId
|
||||
);
|
||||
|
||||
var totalObjectCount = 1;
|
||||
|
||||
|
|
|
@ -720,11 +720,14 @@ public class VariableInputReceiveComponentWorker : WorkerInstance
|
|||
}
|
||||
|
||||
ReceivedCommit = myCommit;
|
||||
var workspaceId = await receiveComponent.ApiClient.GetWorkspaceId(InputWrapper.StreamId).ConfigureAwait(false);
|
||||
|
||||
receiveComponent.Tracker.TrackNodeReceive(
|
||||
acc,
|
||||
receiveComponent.AutoReceive,
|
||||
myCommit.authorId != acc.userInfo.id,
|
||||
myCommit.sourceApplication
|
||||
myCommit.sourceApplication,
|
||||
workspaceId
|
||||
);
|
||||
|
||||
if (CancellationToken.IsCancellationRequested)
|
||||
|
|
|
@ -558,7 +558,10 @@ public class NewVariableInputSendComponentWorker : WorkerInstance
|
|||
transportBranches.Add(serverTransport, sw.BranchName ?? "main");
|
||||
Transports.Add(serverTransport);
|
||||
|
||||
sendComponent.Tracker.TrackNodeSend(acc, sendComponent.AutoSend);
|
||||
using Client c = new(acc);
|
||||
var workspaceId = c.GetWorkspaceId(sw.StreamId).Result;
|
||||
|
||||
sendComponent.Tracker.TrackNodeSend(acc, sendComponent.AutoSend, workspaceId);
|
||||
}
|
||||
else if (transport is ITransport otherTransport)
|
||||
{
|
||||
|
|
|
@ -16,7 +16,7 @@ public class StreamGetWithTokenComponent : GH_TaskCapableComponent<StreamWrapper
|
|||
: base(
|
||||
"Stream Get with Token",
|
||||
"SGetWT",
|
||||
"Returns a stream that will authenticate with a specific user by their Personal Access Token.\n TREAT EACH TOKEN AS A PASSWORD AND NEVER SHARE/SAVE IT IN THE FILE ITSELF",
|
||||
"Returns a stream that will authenticate with a specific user by their Personal Access Token.\n You'll need to raise a token with at least Profile:Read and Stream:Read to access your account data. Add Stream:Write to enable publishing.\n TREAT EACH TOKEN AS A PASSWORD AND NEVER SHARE/SAVE IT IN THE FILE ITSELF",
|
||||
ComponentCategories.PRIMARY_RIBBON,
|
||||
ComponentCategories.COMPUTE
|
||||
)
|
||||
|
|
|
@ -17,7 +17,7 @@ public sealed record ProjectModelsFilter(
|
|||
IReadOnlyList<string>? ids,
|
||||
bool? onlyWithVersions,
|
||||
string? search,
|
||||
IReadOnlyList<string> sourceApps
|
||||
IReadOnlyList<string>? sourceApps
|
||||
);
|
||||
|
||||
public sealed record ProjectModelsTreeFilter(
|
||||
|
|
|
@ -4,6 +4,7 @@ namespace Speckle.Core.Api.GraphQL.Models;
|
|||
|
||||
public sealed class ProjectCollaborator
|
||||
{
|
||||
public string id { get; init; }
|
||||
public string role { get; init; }
|
||||
public LimitedUser user { get; init; }
|
||||
}
|
||||
|
|
|
@ -177,8 +177,8 @@ public static class SpeckleLog
|
|||
var serilogLogConfiguration = new LoggerConfiguration().MinimumLevel
|
||||
.Is(logConfiguration.MinimumLevel)
|
||||
.Enrich.FromLogContext()
|
||||
.Enrich.WithProperty("version", fileVersionInfo.FileVersion)
|
||||
.Enrich.WithProperty("productVersion", fileVersionInfo.ProductVersion)
|
||||
.Enrich.WithProperty("version", fileVersionInfo?.FileVersion ?? "unknown")
|
||||
.Enrich.WithProperty("productVersion", fileVersionInfo?.ProductVersion ?? "unknown")
|
||||
.Enrich.WithProperty("hostOs", DetermineHostOsSlug())
|
||||
.Enrich.WithProperty("hostOsVersion", Environment.OSVersion)
|
||||
.Enrich.WithProperty("hostOsArchitecture", RuntimeInformation.ProcessArchitecture.ToString())
|
||||
|
@ -264,9 +264,15 @@ public static class SpeckleLog
|
|||
return id;
|
||||
}
|
||||
|
||||
private static FileVersionInfo GetFileVersionInfo()
|
||||
private static FileVersionInfo? GetFileVersionInfo()
|
||||
{
|
||||
var assembly = Assembly.GetExecutingAssembly().Location;
|
||||
string assembly = Assembly.GetExecutingAssembly().Location;
|
||||
|
||||
if (string.IsNullOrEmpty(assembly))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return FileVersionInfo.GetVersionInfo(assembly);
|
||||
}
|
||||
|
||||
|
|
44
README.md
44
README.md
|
@ -1,46 +1,22 @@
|
|||
<h1 align="center">
|
||||
<img src="https://user-images.githubusercontent.com/2679513/131189167-18ea5fe1-c578-47f6-9785-3748178e4312.png" width="150px"/><br/>
|
||||
Speckle | Sharp
|
||||
Speckle | Sharp (Legacy)
|
||||
</h1>
|
||||
|
||||
<p align="center"><a href="https://twitter.com/SpeckleSystems"><img src="https://img.shields.io/twitter/follow/SpeckleSystems?style=social" alt="Twitter Follow"></a> <a href="https://speckle.community"><img src="https://img.shields.io/discourse/users?server=https%3A%2F%2Fspeckle.community&style=flat-square&logo=discourse&logoColor=white" alt="Community forum users"></a> <a href="https://speckle.systems"><img src="https://img.shields.io/badge/https://-speckle.systems-royalblue?style=flat-square" alt="website"></a> <a href="https://speckle.guide/dev/"><img src="https://img.shields.io/badge/docs-speckle.guide-orange?style=flat-square&logo=read-the-docs&logoColor=white" alt="docs"></a></p>
|
||||
|
||||
> Speckle is the first AEC data hub that connects with your favorite AEC tools. Speckle exists to overcome the challenges of working in a fragmented industry where communication, creative workflows, and the exchange of data are often hindered by siloed software and processes. It is here to make the industry better.
|
||||
|
||||
<h3 align="center">
|
||||
.NET SDK, tooling, schema and Connectors
|
||||
</h3>
|
||||
<p align="center"><b>Speckle</b> is data infrastructure for the AEC industry.</p><br/>
|
||||
|
||||
<p align="center"><a href="https://twitter.com/SpeckleSystems"><img src="https://img.shields.io/twitter/follow/SpeckleSystems?style=social" alt="Twitter Follow"></a> <a href="https://speckle.community"><img src="https://img.shields.io/discourse/users?server=https%3A%2F%2Fspeckle.community&style=flat-square&logo=discourse&logoColor=white" alt="Community forum users"></a> <a href="https://speckle.systems"><img src="https://img.shields.io/badge/https://-speckle.systems-royalblue?style=flat-square" alt="website"></a> <a href="https://speckle.guide/dev/"><img src="https://img.shields.io/badge/docs-speckle.guide-orange?style=flat-square&logo=read-the-docs&logoColor=white" alt="docs"></a></p>
|
||||
<p align="center"><a href="https://circleci.com/gh/specklesystems/speckle-sharp"><img src="https://circleci.com/gh/specklesystems/speckle-sharp.svg?style=svg" alt=".NET Core"></a></p>
|
||||
|
||||
# About Speckle
|
||||
|
||||
What is Speckle? Check our ![YouTube Video Views](https://img.shields.io/youtube/views/B9humiSpHzM?label=Speckle%20in%201%20minute%20video&style=social)
|
||||
|
||||
### Features
|
||||
|
||||
- **Object-based:** say goodbye to files! Speckle is the first object based platform for the AEC industry
|
||||
- **Version control:** Speckle is the Git & Hub for geometry and BIM data
|
||||
- **Collaboration:** share your designs collaborate with others
|
||||
- **3D Viewer:** see your CAD and BIM models online, share and embed them anywhere
|
||||
- **Interoperability:** get your CAD and BIM models into other software without exporting or importing
|
||||
- **Real time:** get real time updates and notifications and changes
|
||||
- **GraphQL API:** get what you need anywhere you want it
|
||||
- **Webhooks:** the base for a automation and next-gen pipelines
|
||||
- **Built for developers:** we are building Speckle with developers in mind and got tools for every stack
|
||||
- **Built for the AEC industry:** Speckle connectors are plugins for the most common software used in the industry such as Revit, Rhino, Grasshopper, AutoCAD, Civil 3D, Excel, Unreal Engine, Unity, QGIS, Blender and more!
|
||||
|
||||
### Try Speckle now!
|
||||
|
||||
Give Speckle a try in no time by:
|
||||
|
||||
- [![speckle](https://img.shields.io/badge/https://-app.speckle.systems-0069ff?style=flat-square&logo=hackthebox&logoColor=white)](https://app.speckle.systems) ⇒ creating an account
|
||||
- [![create a droplet](https://img.shields.io/badge/Create%20a%20Droplet-0069ff?style=flat-square&logo=digitalocean&logoColor=white)](https://marketplace.digitalocean.com/apps/speckle-server?refcode=947a2b5d7dc1) ⇒ deploying an instance in 1 click
|
||||
|
||||
### Resources
|
||||
|
||||
- [![Community forum users](https://img.shields.io/badge/community-forum-green?style=for-the-badge&logo=discourse&logoColor=white)](https://speckle.community) for help, feature requests or just to hang with other speckle enthusiasts, check out our community forum!
|
||||
- [![website](https://img.shields.io/badge/tutorials-speckle.systems-royalblue?style=for-the-badge&logo=youtube)](https://speckle.systems) our tutorials portal is full of resources to get you started using Speckle
|
||||
- [![docs](https://img.shields.io/badge/docs-speckle.guide-orange?style=for-the-badge&logo=read-the-docs&logoColor=white)](https://speckle.guide/dev/) reference on almost any end-user and developer functionality
|
||||
|
||||
![Untitled](https://user-images.githubusercontent.com/2679513/132021739-15140299-624d-4410-98dc-b6ae6d9027ab.png)
|
||||
> [!WARNING]
|
||||
> This is our legacy .NET repo! Check out our active .NET repos here:
|
||||
> [`speckle-sharp-connectors`](https://github.com/specklesystems/speckle-sharp-connectors): our .NET next generation connectors and desktop UI
|
||||
> [`speckle-sharp-sdk`](https://github.com/specklesystems/speckle-sharp-sdk): our .NET SDK, Tests, and Objects
|
||||
|
||||
# Repo structure
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче