diff --git a/docs/widgets/services/truenas.md b/docs/widgets/services/truenas.md
index 243504905..8933f656e 100644
--- a/docs/widgets/services/truenas.md
+++ b/docs/widgets/services/truenas.md
@@ -11,6 +11,8 @@ To create an API Key, follow [the official TrueNAS documentation](https://www.tr
A detailed pool listing is disabled by default, but can be enabled with the `enablePools` option.
+The Scale and Core API's provide information on the pools in different manners. The `nasType` option choses which API response parsing should be used.
+
```yaml
widget:
type: truenas
@@ -19,4 +21,5 @@ widget:
password: pass # not required if using api key
key: yourtruenasapikey # not required if using username / password
enablePools: true # optional, defaults to false
+ nasType: scale # defaults to scale, values are core or scale
```
diff --git a/src/utils/config/service-helpers.js b/src/utils/config/service-helpers.js
index bee7db4e2..7634f41c8 100644
--- a/src/utils/config/service-helpers.js
+++ b/src/utils/config/service-helpers.js
@@ -448,6 +448,7 @@ export function cleanServiceGroups(groups) {
// truenas
enablePools,
+ nasType,
// unifi
site,
@@ -520,6 +521,11 @@ export function cleanServiceGroups(groups) {
}
if (type === "truenas") {
if (enablePools !== undefined) cleanedService.widget.enablePools = JSON.parse(enablePools);
+ if (nasType) {
+ cleanedService.widget.nasType = nasType;
+ } else {
+ cleanedService.widget.nasType = "scale";
+ }
}
if (["diskstation", "qnap"].includes(type)) {
if (volume) cleanedService.widget.volume = volume;
diff --git a/src/widgets/truenas/component.jsx b/src/widgets/truenas/component.jsx
index 872d8c647..119bb5081 100644
--- a/src/widgets/truenas/component.jsx
+++ b/src/widgets/truenas/component.jsx
@@ -3,7 +3,8 @@ import { useTranslation } from "next-i18next";
import Container from "components/services/widget/container";
import Block from "components/services/widget/block";
import useWidgetAPI from "utils/proxy/use-widget-api";
-import Pool from "widgets/truenas/pool";
+import ScalePool from "widgets/truenas/scale-pool";
+import CorePool from "widgets/truenas/core-pool";
export default function Component({ service }) {
const { t } = useTranslation();
@@ -30,6 +31,8 @@ export default function Component({ service }) {
}
const enablePools = widget?.enablePools && Array.isArray(poolsData) && poolsData.length > 0;
+ const scaleDeployment = widget?.nasType === "scale";
+ const coreDeployment = widget?.nasType === "core";
return (
<>
@@ -39,9 +42,19 @@ export default function Component({ service }) {