Getting Started
Applied Actions
Data Request ActionsLogin Request ActionsBus ActionsExcitation System ActionsGenerator ActionsIBR ActionsllcHVDClink ActionsLoad ActionsSeries Capacitor ActionsSeries Fact ActionsShunt Capacitor ActionsShunt Fact ActionsShunt Reactor ActionsSingleLineDiagram ActionsTransformersThreeWinding ActionsTransformersTwoWinding ActionsTransmission Lines ActionsTurbine Governor ActionsUser ActionsTransmission Lines Actions
Model Schemas
Bus ModelsChanges modelsDefault params modelsExcitation System modelsGenerator ModelsIBR ModelsllcHVDClink ModelsvscHVDClink ModelsLoad ModelsHistory ModelsSeries Capacitor ModelsSeries Fact ModelsShunt Capacitor ActionsShunt Fact ModelsShunt Reactor ModelsSingleLineDiagram ModelsTransformersThreeWinding ModelsTransformersTwoWinding ModelsTransmission Lines ModelsTurbine Governor ModelsUser Models
Components
Add Columns ComponentCreate Form ComponentDelete Confirmation ComponentDisplay Table ComponentFile Upload ComponentFiltered History ComponentForm Skeleton ComponentLogin Form ComponentLogin Provider ComponentNavbar ComponentNothing to Display ComponentPush Mock Data ComponentRegistration Form ComponentSearch ComponentSidebar ComponentTable Heading ComponentTable Skeleton Component
defaultParam Schema
This code defines a Mongoose schema `defaultParamSchema` for managing column sets of system components, each defined by attributes like field name, title, type, and default status. It includes configuration for real-time change stream monitoring in the collection options.
In the src/content/docs/models directory, You can find the defaultParam.mdx
Functions
defaultParamSchema
const defaultParamSchema = new Schema(
{
busColumns: [{ field: convertField("Bus Name"), title: "Bus Name", type: "text", isDefault: true }, /* More fields */],
excitationSystemColumns: [{ field: convertField("Device name"), title: "Device name", type: "text", isDefault: true }, /* More fields */],
generatorColumns: [{ field: convertField("Device name"), title: "Device name", type: "text", isDefault: true }, /* More fields */],
/* Repeat for other columns */
},
{ collectionOptions: { changeStreamPreAndPostImages: { enabled: true } } }
);
This code creates a Mongoose schema called defaultParamSchema to manage different sets of columns for system components. Each column set is an array of objects defining attributes like field name, title, type, and default status. Additionally, it configures collection options for real-time change stream monitoring.
Scroll to top