@model LittleShop.DTOs.BotDto @{ ViewData["Title"] = $"Bot Details - {Model.Name}"; var metricsSummary = ViewData["MetricsSummary"] as LittleShop.DTOs.BotMetricsSummaryDto; var activeSessions = ViewData["ActiveSessions"] as IEnumerable; }

Bot Details

@if (TempData["Success"] != null) { } @if (TempData["BotKey"] != null) {
Important! Save this API key securely. It will not be shown again:
@TempData["BotKey"]
}
Bot Information
Name
@Model.Name
Description
@(string.IsNullOrEmpty(Model.Description) ? "N/A" : Model.Description)
Type
@Model.Type
Platform Info
@if (!string.IsNullOrEmpty(Model.PlatformUsername)) {
@@@Model.PlatformUsername @if (!string.IsNullOrEmpty(Model.PlatformDisplayName)) {
@Model.PlatformDisplayName } @if (!string.IsNullOrEmpty(Model.PlatformId)) {
ID: @Model.PlatformId }
} else { Not configured - platform info will be auto-detected on first connection }
Status
@switch (Model.Status) { case LittleShop.Enums.BotStatus.Active: Active break; case LittleShop.Enums.BotStatus.Inactive: Inactive break; case LittleShop.Enums.BotStatus.Suspended: Suspended break; default: @Model.Status break; }
Bot ID
@Model.Id
Version
@(string.IsNullOrEmpty(Model.Version) ? "N/A" : Model.Version)
IP Address
@(string.IsNullOrEmpty(Model.IpAddress) ? "N/A" : Model.IpAddress)
Created
@Model.CreatedAt.ToString("yyyy-MM-dd HH:mm:ss")
Last Seen
@if (Model.LastSeenAt.HasValue) { @Model.LastSeenAt.Value.ToString("yyyy-MM-dd HH:mm:ss") @if ((DateTime.UtcNow - Model.LastSeenAt.Value).TotalMinutes < 5) { Online } } else { Never }
Config Synced
@if (Model.LastConfigSyncAt.HasValue) { @Model.LastConfigSyncAt.Value.ToString("yyyy-MM-dd HH:mm:ss") } else { Never }
@if (Model.IsRemote) {
Remote Connection
Remote Address
@Model.RemoteAddress:@Model.RemotePort
Instance ID
@(Model.RemoteInstanceId ?? "N/A")
Discovery Status
@switch (Model.DiscoveryStatus) { case "Configured": @Model.DiscoveryStatus break; case "Initialized": @Model.DiscoveryStatus break; case "Discovered": @Model.DiscoveryStatus break; case "Offline": case "Error": @Model.DiscoveryStatus break; default: @Model.DiscoveryStatus break; }
Last Discovery
@if (Model.LastDiscoveryAt.HasValue) { @Model.LastDiscoveryAt.Value.ToString("yyyy-MM-dd HH:mm:ss") } else { Never }

@Html.AntiForgeryToken()
@if (Model.DiscoveryStatus == "Initialized" || Model.DiscoveryStatus == "Configured") { Re-push Config }
@if (Model.DiscoveryStatus == "Configured") {
Bot Control
@Html.AntiForgeryToken()
@Html.AntiForgeryToken()
@Html.AntiForgeryToken()
Controls the Telegram polling connection on the remote bot instance. }
}
30-Day Metrics Summary
@if (metricsSummary != null) {

@metricsSummary.TotalSessions

Total Sessions

@metricsSummary.TotalOrders

Total Orders

$@metricsSummary.TotalRevenue.ToString("F2")

Total Revenue

@metricsSummary.TotalErrors

Total Errors

@if (metricsSummary.UptimePercentage > 0) {
Uptime: @metricsSummary.UptimePercentage.ToString("F1")%
} } else {

No metrics available

}
Active Sessions
@if (activeSessions != null && activeSessions.Any()) {
@foreach (var session in activeSessions.Take(10)) { }
Session ID Platform Started Messages Orders Spent
@session.Id.ToString().Substring(0, 8)... @session.Platform @session.StartedAt.ToString("HH:mm:ss") @session.MessageCount @session.OrderCount $@session.TotalSpent.ToString("F2")
} else {

No active sessions

}
Actions
Edit Settings View Detailed Metrics Share Bot @if (Model.Status == LittleShop.Enums.BotStatus.Active) {
} else if (Model.Status == LittleShop.Enums.BotStatus.Suspended) {
}
@Html.AntiForgeryToken()
Quick Stats
  • Total Sessions: @Model.TotalSessions
  • Active Sessions: @Model.ActiveSessions
  • Total Orders: @Model.TotalOrders
  • Total Revenue: $@Model.TotalRevenue.ToString("F2")
Back to List