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: adminforth/documentation/docs/tutorial/05-ListOfAdapters.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -255,7 +255,8 @@ Cones:
255
255
npm i @adminforth/key-value-adapter-redis
256
256
```
257
257
258
-
Redis adapter uses redis database.
258
+
Redis adapter uses in-memory RAM-based Redis database with O(1) get complexity. It is great fit for most of lightweight tasks which fit in RAM. Also capable with multi-process or replica-based installations as centralized storage. Please note that Redis daemon might be not persisted to disk during restarts without additional settings, so if persistence is critical for your task - you might need to set up it separately (for many tasks like rate-limits ephemeral data are fine
LebelDB uses disk storage with o(log(n)) get complexity. Good fit for large and/or persistent KV datasets which still require fast KV access but don't efficently fit into RAM. Please not that this is a single-process adapter only, so if you will run severall processes of admin - they will not be able to work with this adapter (>=2 processes which look at same level database might lead to unpredicted behaviour - exceptions or crashes).
279
+
280
+
You can use replicas with isolated disks, however in this case state will be also separated between replicas.
Copy file name to clipboardExpand all lines: adminforth/index.ts
+19-2Lines changed: 19 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -116,6 +116,7 @@ class AdminForth implements IAdminForth {
116
116
connectorClasses: any;
117
117
runningHotReload: boolean;
118
118
activatedPlugins: Array<AdminForthPlugin>;
119
+
pluginsById: Record<string,AdminForthPlugin>={};
119
120
configValidator: IConfigValidator;
120
121
restApi: AdminForthRestAPI;
121
122
@@ -256,6 +257,13 @@ class AdminForth implements IAdminForth {
256
257
thrownewError(`Attempt to activate Plugin ${pluginInstance.constructor.name} second time for same resource, but plugin does not support it.
257
258
To support multiple plugin instance pre one resource, plugin should return unique string values for each installation from instanceUniqueRepresentation`);
258
259
}
260
+
constpluginId=pluginInstance.pluginOptions?.id;
261
+
if(pluginId){
262
+
if(this.pluginsById[pluginId]){
263
+
thrownewError(`Plugin with id "${pluginId}" already exists!`);
thrownewError(`Resource '${res.table}' has no column defined or auto-discovered. Please set 'primaryKey: true' in a columns which has unique value for each record and index`);
450
+
thrownewError(`Table '${res.table}' has no column defined or auto-discovered. Please set 'primaryKey: true' in a columns which has unique value for each record and index`);
Copy file name to clipboardExpand all lines: adminforth/spa/src/afcl/Input.vue
+26-1Lines changed: 26 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,9 @@
12
12
ref="input"
13
13
v-bind="$attrs"
14
14
:type="type"
15
-
@input="$emit('update:modelValue', type === 'number' ? Number(($event.target as HTMLInputElement)?.value) : ($event.target as HTMLInputElement)?.value)"
0 commit comments