Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: update new versions #523

Merged
merged 8 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,8 @@ jobs:
run: |
npm install -g [email protected] && \
npm ci && \
npm run plugin:install -- repository-name="githubator-plugin" repository-url="https://github.com/ditrit/githubator-plugin.git#0.4.2" && \
npm run plugin:install -- repository-name="terrator-plugin" repository-url="https://github.com/ditrit/terrator-plugin.git#0.11.0" && \
npm run plugin:init && \
npm run plugin:install -- name="githubator-plugin" version="0.5.2" && \
npm run plugin:install -- name="terrator-plugin" version="0.12.2" && \
docker build -t leto-modelizer -f DockerfileE2E .
- name: Run application
run: docker run -p 8080:80 -d leto-modelizer
Expand Down
10 changes: 4 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@ To run all the e2e tests, you need to run the application with ALL official plug

```bash
npm ci
npm run plugin:install -- repository-name="terrator-plugin" repository-url="https://github.com/ditrit/terrator-plugin.git#0.11.0"
npm run plugin:install -- repository-name="githubator-plugin" repository-url="https://github.com/ditrit/githubator-plugin.git#0.4.2"
npm run plugin:init
npm run plugin:install -- name="terrator-plugin" version="0.12.2"
npm run plugin:install -- name="githubator-plugin" version="0.5.2"
TEMPLATE_LIBRARY_BASE_URL="https://raw.githubusercontent.com/ditrit/leto-modelizer-templates-library/leto-modelizer/e2e_test" npm run dev
```

Expand All @@ -66,9 +65,8 @@ TEMPLATE_LIBRARY_BASE_URL="https://raw.githubusercontent.com/ditrit/leto-modeliz

```bash
npm ci
npm run plugin:install -- repository-name="terrator-plugin" repository-url="https://github.com/ditrit/terrator-plugin.git#0.11.0"
npm run plugin:install -- repository-name="githubator-plugin" repository-url="https://github.com/ditrit/githubator-plugin.git#0.4.2"
npm run plugin:init
npm run plugin:install -- name="terrator-plugin" version="0.12.2"
npm run plugin:install -- name="githubator-plugin" version="0.5.2"
```

2. Build the application for e2e tests
Expand Down
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ ARG TERRATOR_PLUGIN_VERSION
ARG GITHUBATOR_PLUGIN_VERSION
ARG KUBERNATOR_PLUGIN_VERSION
WORKDIR /app
RUN npm run plugin:install -- repository-name="terrator-plugin" repository-url="https://github.com/ditrit/terrator-plugin.git#${TERRATOR_PLUGIN_VERSION}"
RUN npm run plugin:install -- repository-name="githubator-plugin" repository-url="https://github.com/ditrit/githubator-plugin.git#${GITHUBATOR_PLUGIN_VERSION}"
RUN npm run plugin:install -- repository-name="kubernator-plugin" repository-url="https://github.com/ditrit/kubernator-plugin.git#${KUBERNATOR_PLUGIN_VERSION}"
RUN npm run plugin:init
RUN npm run plugin:install -- name="terrator-plugin" version="${TERRATOR_PLUGIN_VERSION}"
RUN npm run plugin:install -- name="githubator-plugin" version="${GITHUBATOR_PLUGIN_VERSION}"
RUN npm run plugin:install -- name="kubernator-plugin" version="${KUBERNATOR_PLUGIN_VERSION}"
RUN npm run build

# Production stage
Expand Down
115 changes: 78 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ If you only want your own language component (maybe based on existing plugins),

## Requirements

* node - [v18.4](https://nodejs.org/en/blog/release/v18.4.0)
* npm - [v8.19.3](https://www.npmjs.com/package/npm/v/8.19.3)
* node - [v20.16.0](https://nodejs.org/en/blog/release/v20.16.0)
* npm - [v10.8.1](https://www.npmjs.com/package/npm/v/10.8.1)

## Official plugins

Expand All @@ -50,19 +50,19 @@ For now, we don't have many plugins to offer you, but follow us and in the next

Plugin to manage terraform files, by default it comes with aws provider definition.

[GitHub url](https://github.com/ditrit/terrator-plugin#0.11.0)
[GitHub url](https://github.com/ditrit/terrator-plugin#0.12.2)

### Github plugin

Plugin to manage GitHub action files.

[GitHub url](https://github.com/ditrit/githubator-plugin#0.4.2)
[GitHub url](https://github.com/ditrit/githubator-plugin#0.5.2)

### Kubernetes plugin

Plugin to manage Kubernetes files.

[GitHub url](https://github.com/ditrit/kubernator-plugin#0.2.1)
[GitHub url](https://github.com/ditrit/kubernator-plugin#0.3.2)

## Compatibility versions table

Expand Down Expand Up @@ -110,10 +110,10 @@ Plugin to manage Kubernetes files.
</tr>
<tr>
<td>next version</td>
<td>= 0.26.2</td>
<td>= 0.11.0</td>
<td>= 0.4.2</td>
<td>= 0.2.1</td>
<td>= 0.28.0</td>
<td>= 0.12.2</td>
<td>= 0.5.2</td>
<td>= 0.3.2</td>
</tr>
</tbody>
</table>
Expand All @@ -123,59 +123,100 @@ Plugin to manage Kubernetes files.
Run `npm install` to let npm retrieve all dependencies and especially our cli to easily install your plugins 😉.

Then you just have to know two things about your plugins:
- it's name
- it's repository url

To install plugin, run this command `npm run plugin:install`.
You can choose between installing __official__ or __custom__ plugins.
- its name
- its version

### Install official plugins

The `leto-modelizer-plugin-cli.json` file, at the root of Leto Modelizer, contains the list of official plugins provided by the team. Each plugin is represented by an object containing the name, repository URL and version of the plugin.
The `leto-modelizer-plugin-cli.json` file, at the root of Leto Modelizer, contains the list of official plugins provided by the team.
Each plugin is represented by an object containing the name, scope and version of the plugin.

Choose __Official plugins__ to select from the list of official plugins, one or more plugin(s) to install.
To install plugin, run this command `npm run plugin:install`.

![](docs/plugin-install-official.gif)

### Install custom plugin

Choose __Custom plugin__ to install a specific plugin not referenced as an official plugin.
If you want to add a custom plugin, you can modify `leto-modelizer-plugin-cli.json`:
- if your plugin is referenced on npm:
```js
// leto-modelizer-plugin-cli.json
[
// (...)
{
"displayName": "YOUR_PLUGIN_DISPLAY_NAME",
"name": "YOUR_PLUGIN_NAME",
"scope": "NPM_ORGANISATION",
"version": "X.X.X"
}
]
```
- if your plugin only have a repository url on a git provider:
```js
// leto-modelizer-plugin-cli.json
[
// (...)
{
"displayName": "YOUR_PLUGIN_DISPLAY_NAME",
"name": "YOUR_PLUGIN_NAME",
"scope": "YOUR_ORGANISATION",
"version": "X.X.X",
"url": "YOUR_REPOSITORY_URL" // like http(s)://github.com/repository.git#1.0.0
}
]
```

![](docs/plugin-install-custom.gif)
For more information about configuring plugin, you can read this [documentation](https://github.com/ditrit/leto-modelizer-plugin-cli).

Examples with official plugins:
- terrator-plugin:
- plugin name: `terrator-plugin`
- git repository url: `https://github.com/ditrit/terrator-plugin.git#0.11.0`
- githubator-plugin:
- plugin name: `githubator-plugin`
- git repository url: `https://github.com/ditrit/githubator-plugin.git#0.4.2`
- kubernator-plugin:
- plugin name: `kubernator-plugin`
- git repository url: `https://github.com/ditrit/kubernator-plugin.git#0.2.1`
Then execute this command `npm run plugin:install` and choose your custom plugin in the list to install it.

### Install custom plugin in command line
### Install official/custom plugin in command line

Options `repository-name` and `repository-url` can be added with the `npm run plugin:install` command to bypass cli prompts.
Options `name` and `version` can be added with the `npm run plugin:install` command to bypass cli prompts.

```bash
# Example with terraform plugin
npm run plugin:install -- repository-name="terrator-plugin" repository-url="https://github.com/ditrit/terrator-plugin.git#0.11.0"
npm run plugin:install -- name="terrator-plugin" version="0.12.2"

# Example with github action plugin
npm run plugin:install -- repository-name="githubator-plugin" repository-url="https://github.com/ditrit/githubator-plugin.git#0.4.2"
npm run plugin:install -- name="githubator-plugin" version="0.5.2"

# Example with kubernator plugin
npm run plugin:install -- repository-name="kubernator-plugin" repository-url="https://github.com/ditrit/kubernator-plugin.git#0.2.1"
npm run plugin:install -- name="kubernator-plugin" version="0.3.2"
```

Now that your plugin is installed, you can continue to install other plugins with the same command if you want.

### Initialize plugins
## How to uninstall plugin

Run `npm install` to let npm retrieve all dependencies and especially our cli to easily uninstall your plugins 😉.

Then you just have to know two things about your plugins:
- its name
- its version

### Uninstall plugins

When you have installed all the desired plugins, please run this commands `npm run plugin:init` to complete all plugins' installation.
To uninstall plugin, run this command `npm run plugin:uninstall`.

![](docs/plugin-uninstall.gif)
-
### Uninstall plugin in command line

Options `name` and `version` can be added with the `npm run plugin:uninstall` command to bypass cli prompts.

```bash
# Example with terraform plugin
npm run plugin:uninstall -- name="terrator-plugin" version="0.12.2"

# Example with github action plugin
npm run plugin:uninstall -- name="githubator-plugin" version="0.5.2"

# Example with kubernator plugin
npm run plugin:uninstall -- name="kubernator-plugin" version="0.3.2"
```

![](docs/plugin-init.png)
Now that your plugin is uninstalled, you can continue to uninstall other plugins with the same command if you want.

## How to setup the authentication with Leto-Modelizer-Api

Expand Down Expand Up @@ -210,7 +251,7 @@ It will generate the built application in the `dist` folder.

To build this app with docker (the two main plugins for terraform & github are included), please use this command:
```bash
docker build . -build-arg TERRATOR_PLUGIN_VERSION="0.11.0" -build-arg GITHUBATOR_PLUGIN_VERSION="0.4.2" -build-arg KUBERNATOR_PLUGIN_VERSION="0.2.1" -t leto-modelizer
docker build . -build-arg TERRATOR_PLUGIN_VERSION="0.12.2" -build-arg GITHUBATOR_PLUGIN_VERSION="0.5.2" -build-arg KUBERNATOR_PLUGIN_VERSION="0.3.2" -t leto-modelizer
```

### Docker run
Expand Down
44 changes: 23 additions & 21 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Technical content:
* Update import of vue components.
* Plugin management:
* Work with [plugin-core](https://github.com/ditrit/leto-modelizer-plugin-core/tree/0.25.0) version 0.26.2.
* Work with [terrator-plugin](https://github.com/ditrit/terrator-plugin/tree/0.11.0) version 0.11.0.
* Work with [githubator-plugin](https://github.com/ditrit/githubator-plugin/tree/0.4.2) version 0.4.2.
* Work with [kubernator-plugin](https://github.com/ditrit/kubernator-plugin/tree/0.2.1) version 0.2.1.
* Work with [plugin-core](https://github.com/ditrit/leto-modelizer-plugin-core/tree/0.28.0) version `0.28.0`.
* Work with [terrator-plugin](https://github.com/ditrit/terrator-plugin/tree/0.12.2) version `0.12.2`.
* Work with [githubator-plugin](https://github.com/ditrit/githubator-plugin/tree/0.5.2) version `0.5.2`.
* Work with [kubernator-plugin](https://github.com/ditrit/kubernator-plugin/tree/0.3.2) version `0.3.2`.
* Improve performance on git add.
* Replace OIDC authentication by Leto-Modelizer-Api, see [this issue](https://github.com/ditrit/leto-modelizer/issues/425).
* Separating git-related functions into a dedicated composable.
* Merge add/create diagram buttons into a drop-down button, see [this issue](https://github.com/ditrit/leto-modelizer/issues/471).
* Improve Authentication by re-doing login process if the token is expired, see [this issue](https://github.com/ditrit/leto-modelizer/issues/478).
* Handle external id.
* Replaced old authentication (Parse) by the new LetoModelizeApi (Java/Spring).
* Replaced old authentication (Parse) by the new Leto-Modelize-Api (Java/Spring).
* Use display name of plugin.
* Use new logo of plugin.

### Fixed

Expand Down Expand Up @@ -100,27 +102,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Rework and clean all layouts and pages.
* Have only one configuration file by project to save all diagrams positions.
* Save diagram template position.
* Rework on project documenation (replace esdoc by jsdoc).
* Rework on project documentation (replace esdoc by jsdoc).
* Models page:
* Rework on tag display, use tag category for all diagrams in table.
* Rework on tag display, use tag language for plugin selection on create diagram from template.
* Update naviguation bar to display user info.
* Update navigation bar to display user info.
* Draw page:
* Rework on left drawer.
* Re-design attribute fields.
* Re-design information icon on attribute fields.
* Plugin management:
* Work with [terrator-plugin](https://github.com/ditrit/terrator-plugin/tree/0.7.0) version 0.7.0.
* Work with [plugin-core](https://github.com/ditrit/leto-modelizer-plugin-core/tree/0.21.0) version 0.21.0.
* Work with [githubator-plugin](https://github.com/ditrit/githubator-plugin/tree/0.2.5) version 0.2.5.
* Improve performance of the automatic functionnal tests.
* Work with [terrator-plugin](https://github.com/ditrit/terrator-plugin/tree/0.7.0) version `0.7.0`.
* Work with [plugin-core](https://github.com/ditrit/leto-modelizer-plugin-core/tree/0.21.0) version `0.21.0`.
* Work with [githubator-plugin](https://github.com/ditrit/githubator-plugin/tree/0.2.5) version `0.2.5`.
* Improve performance of the automatic functional tests.
* User settings:
* Save records by page in ModelsPage.

### Fixed

* Fix bug on models default folder opening, see [this issue](https://github.com/ditrit/leto-modelizer/issues/303).
* Fix Sonar new bugs/code smell due to quality profil change, see [this issue](https://github.com/ditrit/leto-modelizer/issues/322).
* Fix Sonar new bugs/code smell due to quality profile change, see [this issue](https://github.com/ditrit/leto-modelizer/issues/322).
* Fix bug on using default file name from plugin instead of the file name specified by the user, when adding a component after creating a diagram from scratch.
* Fix bug on deleted files while pushing a branch or using "upload to git" button, see [this issue](https://github.com/ditrit/leto-modelizer/issues/358).
* Fix bug on import repository with `.git` or `/` at the end, see [this issue](https://github.com/ditrit/leto-modelizer/issues/368).
Expand Down Expand Up @@ -162,9 +164,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Redesign template grid.
* Redesign template card.
* Plugin management:
* Work with [terrator-plugin](https://github.com/ditrit/terrator-plugin/tree/0.3.0) version 0.3.0.
* Work with [plugin-core](https://github.com/ditrit/leto-modelizer-plugin-core/tree/0.16.0) version 0.16.0.
* Work with [githubator-plugin](https://github.com/ditrit/githubator-plugin/tree/0.2.0) version 0.2.0.
* Work with [terrator-plugin](https://github.com/ditrit/terrator-plugin/tree/0.3.0) version `0.3.0`.
* Work with [plugin-core](https://github.com/ditrit/leto-modelizer-plugin-core/tree/0.16.0) version `0.16.0`.
* Work with [githubator-plugin](https://github.com/ditrit/githubator-plugin/tree/0.2.0) version `0.2.0`.

## [1.1.0] - 2023/05/04

Expand Down Expand Up @@ -192,10 +194,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Internal optimization of plugin usage.
* New display for library list & component grid.
* Plugin management:
* Work with [terrator-plugin](https://github.com/ditrit/terrator-plugin/tree/0.2.0) version 0.2.0.
* Work with [plugin-core](https://github.com/ditrit/leto-modelizer-plugin-core/tree/0.15.2) version 0.15.2.
* Work with [githubator-plugin](https://github.com/ditrit/githubator-plugin/tree/0.1.1) version 0.1.1.
* Update [plugin-cli](https://github.com/ditrit/leto-modelizer-plugin-cli/tree/1.0.0) version 1.0.0.
* Work with [terrator-plugin](https://github.com/ditrit/terrator-plugin/tree/0.2.0) version `0.2.0`.
* Work with [plugin-core](https://github.com/ditrit/leto-modelizer-plugin-core/tree/0.15.2) version `0.15.2`.
* Work with [githubator-plugin](https://github.com/ditrit/githubator-plugin/tree/0.1.1) version `0.1.1`.
* Update [plugin-cli](https://github.com/ditrit/leto-modelizer-plugin-cli/tree/1.0.0) version `1.0.0`.

### Fixed

Expand Down Expand Up @@ -254,8 +256,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Push branch to git provider.
* Plugin management:
* Work with multi-plugin.
* Work with [terrator-plugin](https://github.com/ditrit/terrator-plugin/tree/0.1.12) version 0.1.12.
* Work with [plugin-core](https://github.com/ditrit/leto-modelizer-plugin-core/tree/0.13.0) version 0.13.0.
* Work with [terrator-plugin](https://github.com/ditrit/terrator-plugin/tree/0.1.12) version `0.1.12`.
* Work with [plugin-core](https://github.com/ditrit/leto-modelizer-plugin-core/tree/0.13.0) version `0.13.0`.

[1.3.0]: https://github.com/ditrit/leto-modelizer/blob/main/changelog.md#1.3.0
[1.2.0]: https://github.com/ditrit/leto-modelizer/blob/main/changelog.md#1.2.0
Expand Down
10 changes: 6 additions & 4 deletions cypress/e2e/Bugfix/Issue370.feature
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,27 @@ Feature: Fix issue #370: Wrong files opened when I switch to text view if multip
# Create first model
When I click on '[data-cy="create-diagram-button"]'
And I click on '[data-cy="create-diagram-from-scratch-button"]'
Then I expect '[data-cy="create-model-form"] [data-cy="plugin-select"]' is 'terrator-plugin'
And I select '[data-cy="item_@ditrit/terrator-plugin"]' in '[data-cy="create-model-form"] [data-cy="plugin-select"]'
Then I expect '[data-cy="create-model-form"] [data-cy="plugin-select"]' is '@ditrit/terrator-plugin'

When I set on '[data-cy="create-model-form"] [data-cy="name-input"]' text 'infraFirst'
And I click on '[data-cy="create-model-form"] [data-cy="submit-button"]'
And I wait 1 second
Then I expect 'positive' toast to appear with text 'Model has been created 🥳!'
And I expect current url is 'projectName/modelizer/draw\?plugin=terrator-plugin&path=infraFirst'
And I expect current url is 'projectName/modelizer/draw\?plugin=@ditrit/terrator-plugin&path=infraFirst'

# Create second model
When I click on '[data-cy="models-page-link-button"]'
And I click on '[data-cy="create-diagram-button"]'
And I click on '[data-cy="create-diagram-from-scratch-button"]'
Then I expect '[data-cy="create-model-form"] [data-cy="plugin-select"]' is 'terrator-plugin'
And I select '[data-cy="item_@ditrit/terrator-plugin"]' in '[data-cy="create-model-form"] [data-cy="plugin-select"]'
Then I expect '[data-cy="create-model-form"] [data-cy="plugin-select"]' is '@ditrit/terrator-plugin'

When I set on '[data-cy="create-model-form"] [data-cy="name-input"]' text 'infra'
And I click on '[data-cy="create-model-form"] [data-cy="submit-button"]'
And I wait 1 second
Then I expect 'positive' toast to appear with text 'Model has been created 🥳!'
And I expect current url is 'projectName/modelizer/draw\?plugin=terrator-plugin&path=infra'
And I expect current url is 'projectName/modelizer/draw\?plugin=@ditrit/terrator-plugin&path=infra'

When I click on '[data-cy="modelizer-switch-button"] [aria-pressed="false"]'
And I wait 1 second
Expand Down
Loading
Loading