public OkNegotiatedContentResult <RootUrls> Urls() { var baseUrl = Url.Content("~/"); var model = new RootUrls { EndpointsUrl = baseUrl + "endpoints", KnownEndpointsUrl = "/endpoints/known", // relative URI to allow proxying SagasUrl = baseUrl + "sagas", ErrorsUrl = baseUrl + "errors/{?page,per_page,direction,sort}", EndpointsErrorUrl = baseUrl + "endpoints/{name}/errors/{?page,per_page,direction,sort}", MessageSearchUrl = baseUrl + "messages/search/{keyword}/{?page,per_page,direction,sort}", EndpointsMessageSearchUrl = baseUrl + "endpoints/{name}/messages/search/{keyword}/{?page,per_page,direction,sort}", EndpointsMessagesUrl = baseUrl + "endpoints/{name}/messages/{?page,per_page,direction,sort}", Name = SettingsReader <string> .Read("Name", "ServiceControl"), Description = SettingsReader <string> .Read("Description", "The management backend for the Particular Service Platform"), LicenseStatus = license.IsValid ? "valid" : "invalid", LicenseDetails = baseUrl + "license", Configuration = baseUrl + "configuration", EventLogItems = baseUrl + "eventlogitems", ArchivedGroupsUrl = baseUrl + "errors/groups/{classifier?}", GetArchiveGroup = baseUrl + "archive/groups/id/{groupId}", }; return(Ok(model)); }
public OkNegotiatedContentResult <RootUrls> Urls() { var baseUrl = Url.Content("~/"); var model = new RootUrls { KnownEndpointsUrl = "/endpoints/known", // relative URI to allow proxying MessageSearchUrl = baseUrl + "messages/search/{keyword}/{?page,per_page,direction,sort}", EndpointsMessageSearchUrl = baseUrl + "endpoints/{name}/messages/search/{keyword}/{?page,per_page,direction,sort}", EndpointsMessagesUrl = baseUrl + "endpoints/{name}/messages/{?page,per_page,direction,sort}", Name = SettingsReader <string> .Read("Name", "ServiceControl.Audit"), Description = SettingsReader <string> .Read("Description", "The audit backend for the Particular Service Platform"), Configuration = baseUrl + "configuration" }; return(Ok(model)); }
public RootModule() { Get["/"] = parameters => { var model = new RootUrls { AuditUrl = BaseUrl + "/audit/{?page,per_page,direction,sort}", EndpointsAuditUrl = BaseUrl + "/endpoints/{name}/audit/{?page,per_page,direction,sort}", EndpointsUrl = BaseUrl + "/endpoints", SagasUrl = BaseUrl + "/sagas", ErrorsUrl = BaseUrl + "/errors/{?page,per_page,direction,sort}", EndpointsErrorUrl = BaseUrl + "/endpoints/{name}/errors/{?page,per_page,direction,sort}", MessageSearchUrl = BaseUrl + "/messages/search/{keyword}/{?page,per_page,direction,sort}", EndpointsMessageSearchUrl = BaseUrl + "/endpoints/{name}/messages/search/{keyword}/{?page,per_page,direction,sort}", EndpointsMessagesUrl = BaseUrl + "/endpoints/{name}/messages/{?page,per_page,direction,sort}", Name = SettingsReader<string>.Read("Name", "ServiceControl"), Description = SettingsReader<string>.Read("Description", "The management backend for the Particular Service Platform"), LicenseStatus = License.IsValid ? "valid" : "invalid", }; return Negotiate .WithModel(model) .WithHeader("ETag", CurrentEtag) .WithHeader("Last-Modified", CurrentLastModified); }; Get["/instance-info"] = p => Negotiate .WithModel(new { LogfilePath = Path.Combine(Settings.LogPath, "logfile.txt"), Settings.TransportType, }) .WithHeader("ETag", CurrentEtag) .WithHeader("Last-Modified", CurrentLastModified); }
public RootModule() { Get["/"] = parameters => { var model = new RootUrls { AuditUrl = BaseUrl + "/audit/{?page,per_page,direction,sort}", EndpointsAuditUrl = BaseUrl + "/endpoints/{name}/audit/{?page,per_page,direction,sort}", EndpointsUrl = BaseUrl + "/endpoints", ErrorsUrl = BaseUrl + "/errors/{?page,per_page,direction,sort}", EndpointsErrorUrl = BaseUrl + "/endpoints/{name}/errors/{?page,per_page,direction,sort}", MessageSearchUrl = BaseUrl + "/messages/search/{keyword}/{?page,per_page,direction,sort}", EndpointsMessageSearchUrl = BaseUrl + "/endpoints/{name}/messages/search/{keyword}/{?page,per_page,direction,sort}", EndpointsMessagesUrl = BaseUrl + "/endpoints/{name}/messages/{?page,per_page,direction,sort}", Name = SettingsReader <string> .Read("Name", "Particular Management"), Description = SettingsReader <string> .Read("Description", "Description for Particular Management"), }; return(Negotiate //.WithMediaRangeModel(MediaRange.FromString(@"application/vnd.particular-v1"), new RootUrls{ // AuditUrl = baseUrl + "/audit/{?page,per_page,direction,sort}", // EndpointsAuditUrl = baseUrl + "/endpoints/{name}/audit/{?page,per_page,direction,sort}", // }) //.WithMediaRangeModel(MediaRange.FromString(@"application/vnd.particular-v2"), new RootUrls // { // AuditUrl = baseUrl + "/audit/{?page,per_page,direction,sort}", // EndpointsAuditUrl = baseUrl + "/endpoints/{name}/audit/{?page,per_page,direction,sort}", // }) .WithModel(model) .WithHeader("ETag", CurrentEtag) .WithHeader("Last-Modified", CurrentLastModified) .WithHeader("Cache-Control", "private, max-age=0, must-revalidate")); }; }
public RootModule() { Get["/"] = parameters => { var model = new RootUrls { AuditUrl = BaseUrl + "/audit/{?page,per_page,direction,sort}", EndpointsAuditUrl = BaseUrl + "/endpoints/{name}/audit/{?page,per_page,direction,sort}", EndpointsUrl = BaseUrl + "/endpoints", ErrorsUrl = BaseUrl + "/errors/{?page,per_page,direction,sort}", EndpointsErrorUrl = BaseUrl + "/endpoints/{name}/errors/{?page,per_page,direction,sort}", MessageSearchUrl = BaseUrl + "/messages/search/{keyword}/{?page,per_page,direction,sort}", EndpointsMessageSearchUrl = BaseUrl + "/endpoints/{name}/messages/search/{keyword}/{?page,per_page,direction,sort}", EndpointsMessagesUrl = BaseUrl + "/endpoints/{name}/messages/{?page,per_page,direction,sort}", Name = SettingsReader<string>.Read("Name", "Particular Management"), Description = SettingsReader<string>.Read("Description", "Description for Particular Management"), }; return Negotiate //.WithMediaRangeModel(MediaRange.FromString(@"application/vnd.particular-v1"), new RootUrls{ // AuditUrl = baseUrl + "/audit/{?page,per_page,direction,sort}", // EndpointsAuditUrl = baseUrl + "/endpoints/{name}/audit/{?page,per_page,direction,sort}", // }) //.WithMediaRangeModel(MediaRange.FromString(@"application/vnd.particular-v2"), new RootUrls // { // AuditUrl = baseUrl + "/audit/{?page,per_page,direction,sort}", // EndpointsAuditUrl = baseUrl + "/endpoints/{name}/audit/{?page,per_page,direction,sort}", // }) .WithModel(model) .WithHeader("ETag", CurrentEtag) .WithHeader("Last-Modified", CurrentLastModified) .WithHeader("Cache-Control", "private, max-age=0, must-revalidate"); }; }
public RootModule() { Get["/"] = parameters => { var model = new RootUrls { EndpointsUrl = BaseUrl + "/endpoints", SagasUrl = BaseUrl + "/sagas", ErrorsUrl = BaseUrl + "/errors/{?page,per_page,direction,sort}", EndpointsErrorUrl = BaseUrl + "/endpoints/{name}/errors/{?page,per_page,direction,sort}", MessageSearchUrl = BaseUrl + "/messages/search/{keyword}/{?page,per_page,direction,sort}", EndpointsMessageSearchUrl = BaseUrl + "/endpoints/{name}/messages/search/{keyword}/{?page,per_page,direction,sort}", EndpointsMessagesUrl = BaseUrl + "/endpoints/{name}/messages/{?page,per_page,direction,sort}", Name = SettingsReader<string>.Read("Name", "ServiceControl"), Description = SettingsReader<string>.Read("Description", "The management backend for the Particular Service Platform"), LicenseStatus = License.IsValid ? "valid" : "invalid", InstanceInfo = BaseUrl + "/instance-info" }; return Negotiate .WithModel(model); }; Get["/instance-info"] = p => Negotiate .WithModel(new { WindowsService = Settings.ServiceName, LogfilePath = Path.Combine(Settings.LogPath, "logfile.txt"), Settings.TransportType, RavenDBPath = Settings.DbPath }); }
public RootModule() { Get["/"] = parameters => { var model = new RootUrls { EndpointsUrl = BaseUrl + "/endpoints", SagasUrl = BaseUrl + "/sagas", ErrorsUrl = BaseUrl + "/errors/{?page,per_page,direction,sort}", EndpointsErrorUrl = BaseUrl + "/endpoints/{name}/errors/{?page,per_page,direction,sort}", MessageSearchUrl = BaseUrl + "/messages/search/{keyword}/{?page,per_page,direction,sort}", EndpointsMessageSearchUrl = BaseUrl + "/endpoints/{name}/messages/search/{keyword}/{?page,per_page,direction,sort}", EndpointsMessagesUrl = BaseUrl + "/endpoints/{name}/messages/{?page,per_page,direction,sort}", Name = SettingsReader <string> .Read("Name", "ServiceControl"), Description = SettingsReader <string> .Read("Description", "The management backend for the Particular Service Platform"), LicenseStatus = License.IsValid ? "valid" : "invalid", InstanceInfo = BaseUrl + "/instance-info" }; return(Negotiate .WithModel(model)); }; Get["/instance-info"] = p => Negotiate .WithModel(new { WindowsService = Settings.ServiceName, LogfilePath = Path.Combine(Settings.LogPath, "logfile.txt"), Settings.TransportType, RavenDBPath = Settings.DbPath }); }
public RootModule() { Get["/"] = parameters => { var model = new RootUrls { EndpointsUrl = BaseUrl + "/endpoints", SagasUrl = BaseUrl + "/sagas", ErrorsUrl = BaseUrl + "/errors/{?page,per_page,direction,sort}", EndpointsErrorUrl = BaseUrl + "/endpoints/{name}/errors/{?page,per_page,direction,sort}", MessageSearchUrl = BaseUrl + "/messages/search/{keyword}/{?page,per_page,direction,sort}", EndpointsMessageSearchUrl = BaseUrl + "/endpoints/{name}/messages/search/{keyword}/{?page,per_page,direction,sort}", EndpointsMessagesUrl = BaseUrl + "/endpoints/{name}/messages/{?page,per_page,direction,sort}", Name = SettingsReader <string> .Read("Name", "ServiceControl"), Description = SettingsReader <string> .Read("Description", "The management backend for the Particular Service Platform"), LicenseStatus = License.IsValid ? "valid" : "invalid", LicenseDetails = BaseUrl + "/license", Configuration = BaseUrl + "/configuration" }; return(Negotiate .WithModel(model)); }; Func <dynamic, dynamic> configuration = p => Negotiate .WithModel(new { Host = new { Settings.ServiceName, RavenDBPath = Settings.DbPath, Logging = new { LoggingSettings.LogPath, LoggingLevel = LoggingSettings.LoggingLevel.Name, RavenDBLogLevel = LoggingSettings.RavenDBLogLevel.Name } }, DataRetention = new { AuditRetentionPeriod = Settings.AuditRetentionPeriod, ErrorRetentionPeriod = Settings.ErrorRetentionPeriod }, PerformanceTunning = new { Settings.MaximumMessageThroughputPerSecond, MaxBodySizeToStore = Settings.MaxBodySizeToStore, Settings.HttpDefaultConnectionLimit, Settings.ExternalIntegrationsDispatchingBatchSize, Settings.ExpirationProcessBatchSize, Settings.ExpirationProcessTimerInSeconds }, Transport = new { Settings.TransportType, AuditLogQueue = Settings.AuditLogQueue.Queue, AuditQueue = Settings.AuditQueue.Queue, ErrorLogQueue = Settings.ErrorLogQueue.Queue, ErrorQueue = Settings.ErrorQueue.Queue, Settings.ForwardAuditMessages, Settings.ForwardErrorMessages }, Plugins = new { HeartbeatGracePeriod = Settings.HeartbeatGracePeriod } }); Get["/instance-info"] = Get["/configuration"] = configuration; }
public RootModule() { Get["/"] = parameters => { var model = new RootUrls { KnownEndpointsUrl = "/endpoints/known", // relative URI to allow proxying MessageSearchUrl = BaseUrl + "/messages/search/{keyword}/{?page,per_page,direction,sort}", EndpointsMessageSearchUrl = BaseUrl + "/endpoints/{name}/messages/search/{keyword}/{?page,per_page,direction,sort}", EndpointsMessagesUrl = BaseUrl + "/endpoints/{name}/messages/{?page,per_page,direction,sort}", Name = SettingsReader <string> .Read("Name", "ServiceControl.Audit"), Description = SettingsReader <string> .Read("Description", "The audit backend for the Particular Service Platform"), Configuration = BaseUrl + "/configuration" }; return(Negotiate .WithModel(model)); }; Func <dynamic, dynamic> configuration = p => Negotiate .WithModel(new { Host = new { Settings.ServiceName, RavenDBPath = Settings.DbPath, Logging = new { LoggingSettings.LogPath, LoggingLevel = LoggingSettings.LoggingLevel.Name, RavenDBLogLevel = LoggingSettings.RavenDBLogLevel.Name } }, DataRetention = new { Settings.AuditRetentionPeriod, }, PerformanceTunning = new { Settings.MaxBodySizeToStore, Settings.HttpDefaultConnectionLimit, Settings.ExpirationProcessBatchSize, Settings.ExpirationProcessTimerInSeconds }, Transport = new { Settings.TransportCustomizationType, Settings.AuditLogQueue, Settings.AuditQueue, Settings.ForwardAuditMessages, }, Plugins = new { } }); Get["/instance-info"] = Get["/configuration"] = configuration; }