node-vision / strapi-plugin-entity-relationship-chart

Strapi Plugin displays Entity Relationship Diagram of all models, fields and relations.
180 stars 24 forks source link

Display all kind of models and relations #11

Closed stafyniaksacha closed 2 years ago

stafyniaksacha commented 2 years ago

preview

This changes allow to preview all models (singleTypes in green, collectionTypes in blue and components in yellow) and how they are related (direct relation in grey, by a dynamiczone in orange and by a component in yellow)

It also add a new setting exclude to prevent the controller to send data about a model/component, so it will not be displayed on the graph

// file: config/plugins.js
"use strict";

module.exports = () => ({
  // ...
  "entity-relationship-chart": {
    enabled: true,
    config: {
      // By default all contentTypes and components are included.
      // To exlclude strapi's internal models, use:
      exclude: [
        "strapi::core-store",
        "webhook",
        "admin::permission",
        "admin::user",
        "admin::role",
        "admin::api-token",
        "plugin::upload.file",
        "plugin::i18n.locale",
        "plugin::users-permissions.permission",
        "plugin::users-permissions.role",
      ],
    },
  },
  // ...
});

Note: I removed dead code and used HeaderLayout/ContentLayout/Box from @strapi/design-system to make UI more consistent with the v4 design !

Note 2: If you are ok, can I setup eslint with https://github.com/strapi-community/eslint-config ?

stafyniaksacha commented 2 years ago

@romanmandryk @willianjusten @diiegoburiti any chance to see this merged?

romanmandryk commented 2 years ago

Thank you for your contribution. Covering all types and adding configurations are great additions!

RE: Note 1: OK - this was one of the requested changes by Strapi team to get the plugin more compliant with the marketplace guidelines. RE: Note 2: you can add eslint rules