You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: MyApp/_pages/admin-ui-analytics.md
+91-12
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Admin UI Analytics
3
3
---
4
4
5
-
Comprehensive API Analytics is available to all ServiceStack Apps configured with [SQLite Request Logging[(/sqlite-request-logs).
5
+
Comprehensive API Analytics is available to all ServiceStack Apps configured with [SQLite Request Logging](/sqlite-request-logs).
6
6
7
7
### Benefits of API Analytics
8
8
@@ -15,21 +15,19 @@ IPs where most traffic generates:
15
15
-**Troubleshooting:** Aids in quickly identifying trends, anomalies, or specific endpoints related to issues.
16
16
-**Resource Planning:** Understanding usage patterns helps in scaling infrastructure appropriately.
17
17
-**Security Insight:** Identifying bot traffic and unusual request patterns can be an early indicator of security concerns.
18
+
-**Interactive Analytics:** Analytics are also interactive where you're able to drill down to monitor the activity of individual APIs, Users, API Keys and IPs with links back to the request logs which the summary analytics are derived from.
18
19
19
-
### Interactive Analytics
20
+
### Getting Started
20
21
21
-
Analytics are also interactive where you're able to drill down to monitor the activity of individual APIs, Users, API Keys
22
-
and IPs which have further links back to the request logs which the summary analytics are derived from.
23
-
24
-
As they offer significant and valuable insights they're now built into all ASP.NET Core IdentityAuth templates,
22
+
As they offer significant and valuable insights they're now built into all new ASP.NET Core IdentityAuth templates,
25
23
existing .NET 8 IdentityAuth templates can enable it with:
26
24
27
25
:::sh
28
26
x mix sqlitelogs
29
27
:::
30
28
31
-
.NET 8 Templates that are not configured to use [Endpoint Routing[(/endpoint-routing)
32
-
and [ASP.NET Core IOC[(/net-ioc) will need to explicitly register `SqliteRequestLogger`
29
+
.NET 8 Templates that are not configured to use [Endpoint Routing](/endpoint-routing)
30
+
and [ASP.NET Core IOC](/net-ioc) will need to explicitly register `SqliteRequestLogger`
33
31
as a singleton dependency in addition to configuring it on the `RequestLogsFeature` plugin:
34
32
35
33
```csharp
@@ -56,18 +54,24 @@ public class ConfigureRequestLogs : IHostingStartup
56
54
}
57
55
```
58
56
59
-
This will enable a more feature rich Request Logging Admin UI which utilizes the full queryability of an AutoQueryGrid
60
-
to filter, sort and export Request Logs.
57
+
## Analytics Admin UI
58
+
59
+
Once configured, [SQLite Request Logs](/sqlite-request-logs) enable a more feature rich Request Logging Admin UI which utilizes the full queryability of an AutoQueryGrid to filter, sort and export Request Logs.
Benefits of using SQLite includes removing load from your App's primary database and being able to create naturally scalable and isolated Monthly databases on-the-fly which allow requests to be easily archived into managed file storage instead of a singular growing database.
66
+
64
67
## Analytics Overview
65
68
66
-
Utilizing an `SqliteRequestLogger` will also enable the new **Analytics** Admin UI in the sidebar which initially
67
-
displays the API Analytics Dashboard:
69
+
It also enables the new **Analytics** Admin UI in the sidebar which initially displays the API Analytics overview Dashboard:
The insights from the Analytics showed us that our [pvq.app](https://pvq.app) was experiencing significant load from
240
+
AI bots and scrapers which was the primary cause of its high resource usage and detrimental load times for normal
241
+
user requests, so much so we've intervened to prevent these bots from scraping our site.
242
+
243
+
### Disallowing Bots in robots.txt
244
+
245
+
In an ideal world you would just need to instruct problematic bots not to scrape your site by adding them to [pvq.app/robots.txt](https://pvq.app/robots.txt), e.g:
246
+
247
+
```txt
248
+
User-agent: Googlebot
249
+
Allow: /
250
+
User-agent: Bingbot
251
+
Allow: /
252
+
253
+
User-agent: bytespider
254
+
Disallow: /
255
+
User-agent: gptbot
256
+
Disallow: /
257
+
User-agent: claudebot
258
+
Disallow: /
259
+
User-agent: amazonbot
260
+
Disallow: /
261
+
User-agent: mj12bot
262
+
Disallow: /
263
+
User-agent: semrushbot
264
+
Disallow: /
265
+
User-agent: dotbot
266
+
Disallow: /
267
+
User-agent: WhatsApp Bot
268
+
Disallow: /
269
+
User-agent: *
270
+
Disallow: /
271
+
```
272
+
273
+
### Disallowing Bot Requests
274
+
275
+
As this was not having an immediate effect we took a more forceful approach to implement a middleware to reject all
276
+
requests from disallowed bots from accessing our App which you can add to your own App with:
277
+
278
+
:::sh
279
+
x mix useragent-blocking
280
+
:::
281
+
282
+
This will allow you to configure which Bot User Agents you want to reject from accessing your site, e.g:
Copy file name to clipboardExpand all lines: MyApp/_pages/ai-server/image-to-text.md
+57-1
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,14 @@ AI Server's Image to Text UI lets you request image classifications from its act
18
18
19
19
::include ai-server/endpoint-usage.md::
20
20
21
+
### Ollama Vision Models
22
+
23
+
If AI Server has access to any Ollama Vision Models (e.g. **gemma3:27b** or **mistral-small**), it can be used
24
+
instead to get information about the uploaded image:
25
+
26
+
-`Model` - the ollama vision model to use
27
+
-`Prompt` - vision model prompt
28
+
21
29
### Image to Text {#image-to-text}
22
30
23
31
::include ai-server/cs/image-to-text-1.cs.md::
@@ -29,4 +37,52 @@ AI Server's Image to Text UI lets you request image classifications from its act
29
37
:::info
30
38
Ensure that the ComfyUI Agent has the Florence 2 model downloaded and installed for the Image-To-Text functionality to work.
31
39
This can be done by setting the `DEFAULT_MODELS` environment variable in the `.env` file to include `image-to-text`
32
-
:::
40
+
:::
41
+
42
+
## Support for Ollama Vision Models
43
+
44
+
By default [ImageToText](/ai-server/image-to-text) uses a purpose-specific **Florence 2 Vision model** with ComfyUI for its functionality which is capable of generating a very short description about an image, e.g:
45
+
46
+
> A woman sitting on the edge of a lake with a wolf
47
+
48
+
But with LLMs gaining multi modal capabilities and Ollama's recent support of Vision Models we can instead use popular
49
+
Open Source models like Google's **gemma3:27b** or Mistral's **mistral-small:24b** to extract information from images.
50
+
51
+
Both models are very capable vision models that's can provide rich detail about an image:
Copy file name to clipboardExpand all lines: MyApp/_pages/templates/angular.md
+2-3
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ The default Angular SPA Template can be downloaded below:
31
31
</project-template>
32
32
</project-creator>
33
33
34
-
Alternatively you can download a custom template from the [Start Page](/start).
34
+
Alternatively you can download a custom template from the [Start Page](https://servicestack.net/start).
35
35
36
36
The source code for the template is maintained at [NetCoreTemplates/angular-spa](https://github.com/NetCoreTemplates/angular-spa)
37
37
whilst an online live-demo is available from: [angular-spa.web-templates.io](https://angular-spa.web-templates.io)
@@ -254,8 +254,7 @@ export class BookingListComponent implements OnInit {
254
254
}
255
255
```
256
256
257
-
Using `provideApiState()` implicitly injects the populated API context containing both the APIs Loading and Error into
258
-
child components saving you from explicitly specifying it in each component.
257
+
Using `provideApiState()` implicitly injects the populated API context containing both the APIs Loading and Error state into child components saving you from having to explicitly inject it into each component.
259
258
260
259
E.g. the `<form-loading>` component will display when API Requests are in-flight whilst API Error Responses are displayed
0 commit comments