adminforth 1.2.85 → 1.2.86
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -149,7 +149,8 @@ export default class ConfigValidator {
|
|
|
149
149
|
};
|
|
150
150
|
}
|
|
151
151
|
res.resourceId = res.resourceId || res.table;
|
|
152
|
-
|
|
152
|
+
// as fallback value, capitalize and then replace _ with space
|
|
153
|
+
res.label = res.label || res.resourceId.replace(/_/g, ' ').replace(/\b\w/g, (l) => l.toUpperCase());
|
|
153
154
|
if (!res.dataSource) {
|
|
154
155
|
errors.push(`Resource "${res.resourceId}" is missing dataSource`);
|
|
155
156
|
}
|
|
@@ -162,7 +162,8 @@ export default class ConfigValidator implements IConfigValidator {
|
|
|
162
162
|
|
|
163
163
|
|
|
164
164
|
res.resourceId = res.resourceId || res.table;
|
|
165
|
-
|
|
165
|
+
// as fallback value, capitalize and then replace _ with space
|
|
166
|
+
res.label = res.label || res.resourceId.replace(/_/g, ' ').replace(/\b\w/g, (l) => l.toUpperCase());
|
|
166
167
|
if (!res.dataSource) {
|
|
167
168
|
errors.push(`Resource "${res.resourceId}" is missing dataSource`);
|
|
168
169
|
}
|