Git Product home page Git Product logo

leto-modelizer-admin's Introduction

leto-modelizer-admin (leto-modelizer-admin)

Quality Gate Status Reliability Rating Maintainability Rating Security Rating

Code Smells Bugs Vulnerabilities Technical Debt

Lines of Code Coverage Duplicated Lines (%)

Administration application for leto-modelizer.

Features

Getting Started

Requirements

  • node - v18.14
  • npm - v8.19.3

This server is based on Quasar.

Installation

To get started with leto-modelizer-admin using Docker, follow these steps:

1. Install Docker

If you don't have Docker installed on your system, you can download and install it from the official website for your operating system:

2. Clone the repository

Open your terminal or command prompt and clone the project repository to your machine:

git clone [email protected]:ditrit/leto-modelizer-admin.git
cd leto-modelizer-admin

How to build this app

⚠️ Leto-Modelizer-Admin can't work without Leto-Modelizer-Api and Leto-Modelizer, you must setup both of them first!

Configuration

We are using Leto-Modelizer-Api authentication (as a backend). To configure it, you must fill the configuration inside global.config.json root file.

{
  "backendUrl": "https://localhost:8443",
  "backendAppId": "leto-modelizer-api-dev",
  "letoModelizerUrl": "http://localhost:8080",
  "inputDebounceTime": 1000
}

Here's a description of each key in the provided configuration:

  • backendUrl: the url of the backend, this field is mandatory.
  • backendAppId: the application ID of the backend, this field is mandatory.
  • letoModelizerUrl: the url of the leto-modelizer application, this field is mandatory.
  • inputDebounceTime: debounce time for filters input, default time is 1000ms.

Native build

Run this command to build the app:

npm run build

It will generate the built application in the dist folder.

Docker build

To build this app with docker, please use this command:

docker build . -t leto-modelizer-admin

leto-modelizer-admin's People

Contributors

justinehell avatar zorin95670 avatar dimitrichauvel avatar

Stargazers

 avatar

Watchers

 avatar Pierre Tanghe avatar Abou avatar viennem avatar

leto-modelizer-admin's Issues

Setup User page

Description

blocked by #14

Add actions column in users table and for each row, add a button.
When we clicked to the button, we go to the user page (/users/{user_id}).

Setup user page with white banner:

  • breadcrumb to come back to users page
  • firstname and lastname

⚠️ This page is independant from previous, so in onMounted you have to make a call to get the object by id.

image
image

Setup libraries page

Description

blocked by #6

Add in the drawer an item : Libraries, on click that go the LibrariesPage (/libraries).

On libraries page only display Libraries title.

image

Delete an user group

Description

blocked by #13

Add actions column in user groups table and for each row, add a button.
When we clicked to the button, we display the popup and on confirmation delete the group.

image
image

Remove default pagination

Description

Remove default pagination LIMIT=10 in all table and request. This will be handle by another issues.

Add a library

Description

blocked by #17

On libraries page add button to create a library.
When we click on the button, we go to the AddLibraryPage(/add-library) .

On AddLibraryPage, we have a library field, it have to be a valid http(s) url.

On cancel go back to the libraries page.
On create, display a loading popup.
On success, display a message to say it's created, TODO.
On error, display error message from backend into the input field error.

⚠️ Verify, on go back to libraries page, that libraries are reloaded from back.
⚠️ Popup image are example.

image
image
image
image

Table to list all user groups

Description

blocked by #10

Create a component UserGroupsTable with 3 columns:

  • Name
  • Number of users in the groups
  • Roles of the groups

In UserGroupsPage, load ten first user groups from backend and display it in table.

Here is the call we have to do: api/classes/Groups?limit=10
See leto-modelizer for call headers.

image

Add filter on users page

Description

blocked by #14

Add a filters card to filters libraries by name (first and last) and role on users page.

image

Table to list all libraries

Description

blocked by #7

Create a component LibrariesTable with only one column:

  • Name

In LibrariesPage, load ten first libraries from backend and display it in table.

Here is the call we have to do: api/classes/Library?limit=10
See leto-modelizer for call headers.

image

Setup Roles page

Description

blocked by #6

Add in the drawer an item : Roles, on click that go the RolesPage (/roles).

On roles page only display Roles title.

image

Add doc to explain what is the expected url when adding a library

Description

See current state after adding library with wrong url -> no indication as to why this url cannot be downloaded
image

Valid Url must be for example
https://raw.githubusercontent.com/ditrit/leto-modelizer-templates-library/main/index.json

http://libraries/valid/simple/index.json
http://libraries/invalid/simple/index.json

Setup authentication

Description

Setup authentication as defined in Leto-modelizer.

Have a splash screen to authenticate user, by default splash screen only check user is connected and have the valid role (admin) to go on this application.

If user don't have the permission to use application display a message on splash screen.

No need to use vue-simple-acl, because user can use all if it's an admin.

Display origin of role in user page

Description

blocked by #31

TODO: add blocked issue of api to get origin of role.

Update roles to add an optional column to display origin of role.
Update roles actions to display only deleted action on direct role.

image

Remove a member from a group

On GroupPage, add an action on GroupsTable.
Make actions optional and table don't do the result of action, only send the event that action are click on the parent.

You can call the props something like that: with-delete-action.

On delete event, display a confirmation popup and confirmation delete the group user association.

image

Add a role to a user

Description

blocked by #84

On user page, add button to add a role(s) on the user.

On button click, open pop to chose one or many roles to add on user.

Update Rolestable to make optional multiselection.

image
image

Delete a user

Description

blocked by #14

Add actions column in users table and for each row, add a button.
When we clicked to the button, we display the popup and on confirmation delete the user.

(This image is an example, display user first/last name in the popup)
image
image

Display groups of the user

Description

blocked by #15
blocked by #13

On UserPage, add UserGroupsTable with pagination to display all group of the user.

Actions are not to implemented in this task.

image

Add a group to a user

Description

blocked by #32

On user page, add button to add a group(s) on the user.

On button click, open pop to chose one or many groups to add on user.

Update GroupsTable to make optional multiselection.

⚠️ popup is an example of what we want.

image
image

Remove data-cy attribute on build

Description

Like leto-modelizer remove data-cy html attribute on production build except if :

  • process.env.KEEP_CYPRESS_ATTRIBUTE === 'true'

OR

  • process.env.NODE_ENV === 'development'

Setup user groups page

Description

blocked by #6

Add in the drawer an item : User groups, on click that go the UserGroupsPage (/user-groups).

On user groups page only display User groups title.

image

Setup home page

Description

Blocked by #4

Home page of leto-modelizer-admin is the UsersPage.

Main layout is composed of:

  • header bar with:
    • Logo
    • Application title
    • Avatar like leto-modelizer (initial)
  • Drawer for naviguation with only one item (users and icon). Drawer items are selected if route correspond to current url.

UsersPage(/users) have only title "Users" in the content.

image

Setup user group page

Description

blocked by #13

Add actions column in user groups table and for each row, add a button.
When we clicked to the button, we go to the user-group page (/user-group/{group_id}).

Setup user page with white banner:

  • breadcrumb to come back to roles page
  • group name

⚠️ This page is independant from previous, so in onMounted you have to make a call to get the object by id.

image
image

Table to list all users

Description

blocked by #11

Create a component UsersTable with only one column:

  • last name
  • first name
  • first 3 roles and a special ellipse

In UsersPage, load ten first users from backend and display it in table.

Here is the call we have to do: api/classes/User?limit=10
See leto-modelizer for call headers.

image

Setup project

Setup this project with a blank page with only project name.

Add this functionnality too:

  • eslint
  • unit test (vitest)
  • e2e test
  • all github workflows
  • changelog
  • i18n
  • vite

You have to use the same configuration as leto-modelizer (except for vite/vitest).

Update:

  • Readme, to explain the purpose of this projet.

Delete current user

Description

Blocked by #59

On delete current user, redirect to leto-modelizer. And add a specific message to prevent user, that he delete himself.

Setup users page

Description

blocked by #6

Add in the drawer an item : Users, on click that go the UsersPage (/users).

On users page only display Users title.

image

Display users of a group

On GroupPage, add UsersTable to display all users of a group.

Actions are not to implemented in this task.

image

Add script to initialized first admin

Description

Update readme to explain that on application setup, first admin have to connect on leto-modelizer.
And them they have to run the script to set first admin.

The script will attach the role admin to the user.
It need the global.config to get the backend information.
Admin have to give the masterKey and the username of user.

The script will be code in node, and add the package.json.

Steps:

  1. Check connection to api
  2. Get userId from username
  3. Add role admin to previous
  4. Display a message to say it's ok!

You can help you from https://github.com/ditrit/leto-modelizer-plugin-cli

Delete a library

Description

blocked by #8

Add actions column in libraries table and for each row, add a button.
When we clicked to the button, we display the popup and on confirmation delete the library.

image
image

Setup library page

Description

blocked by #8

Add actions column in libraries table and for each row, add a button.
When we clicked to the button, we go to the library page (/libraries/{library_id}).

Setup library page with white banner:

  • breadcrumb to come back to library page
  • library name
  • version
  • author
  • description

⚠️ This page is independant from previous, so in onMounted you have to make a call to get the object by id.

image
image

Remove a role of a user

Description

blocked by #84

On UserPage, add an action on RolesTable.
Make actions optional and table don't to do the result of action, only send the event that action are click on the parent.

You can call the props something like that: with-delete-action.

On delete event, display a confirmation popup and confirmation delete the role user association.

image
image

Synchronize library

Description

blocked by #17

On library page display an input with library url and a button to synchronize it inside an "Informations" tab.

On button click, even if the library url is not change, make a call to update library.

⚠️ on update reload all informations of the library (name, description, roles, templates, etc etc) the reload depends of what with have implemented on the page.

image

Remove a group of a user

Description

blocked by #32

On UserPage, add an action on UserGroupsTable.
Make actions optional and table don't do the result of action, only send the event that action are click on the parent.

You can call the props something like that: with-delete-action.

On delete event, display a confirmation popup and confirmation delete the group user association.

⚠️ Its an example of popup.

image
image

Table to list all roles

Description

blocked by #9

Create a component RolesTable with two column:

  • Name
  • Type

In RolesPage, load ten first roles from backend and display it in table.

Here is the call we have to do: api/classes/_Role?limit=10
See leto-modelizer for call headers.

image

Display roles of the user

Description

blocked by #15
blocked by #12

On UserPage, add RolesTable with pagination to display all role of the user.

Origin of role and actions are not to implemented in this task.

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.