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

Infra: Continuous integration workflow #304

Draft
wants to merge 150 commits into
base: development
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
150 commits
Select commit Hold shift + click to select a range
dbc67b3
Add Export model button to list of models page
idmarjr Dec 12, 2021
6de196c
Add export model button to Logic model workspace
idmarjr Dec 12, 2021
3b56200
Add export model button to cConceptual model workspace
idmarjr Dec 12, 2021
689952d
Remove aria-hidden from actions in models list
idmarjr Dec 12, 2021
edca2d6
Merge branch 'development' into feature/export-model
idmarjr Dec 12, 2021
8a3ec81
Merge branch 'development' into feature/export-model
idmarjr Dec 13, 2021
0cdb208
Add script to run cypress tests on firefox
wlsf82 Dec 13, 2021
258d4be
Create github workflow to run tests
wlsf82 Dec 13, 2021
7bd3a01
Merge branch 'development' into feature/export-model
idmarjr May 13, 2022
9496040
Merge branch 'development' into feature/export-model
idmarjr Jun 26, 2022
a13e645
Validate user on get model
miltonbsn Sep 16, 2023
7a18bfd
Move .separator to atomic.scss
idmarjr Sep 17, 2023
f859605
No access page
idmarjr Sep 17, 2023
6aa1fa6
Remove debbug code
miltonbsn Sep 17, 2023
378ce39
Fix typo
miltonbsn Sep 17, 2023
3edc0f9
Validade user on get logic model
miltonbsn Sep 17, 2023
007ce1c
Set log on error
miltonbsn Sep 17, 2023
8b0e1aa
feat(config): Add config file to centralize the env var loads
joaomfiumari Dec 20, 2022
84551cb
feat(auth): Add jwt middleware to validate received access-token
joaomfiumari Dec 20, 2022
680f141
feat(auth): Add interceptor to add jwt token in the requests
joaomfiumari Dec 20, 2022
e16750b
Bump jsonwebtoken from 8.5.1 to 9.0.0
dependabot[bot] Sep 24, 2023
1110104
Merge pull request #468 from brmodeloweb/dependabot/npm_and_yarn/json…
miltonbsn Sep 24, 2023
46651c6
Merge branch 'main' into ci/create-continuous-integration-workflow
idmarjr Sep 30, 2023
ccea7fa
Merge branch 'main' into feature/export-model
idmarjr Sep 30, 2023
b98e3f1
Update ci.yml
idmarjr Sep 30, 2023
d58b098
Update minor version devDependencies updates
idmarjr Oct 1, 2023
59b3d9c
Update Major devDependencies with 1x version
idmarjr Oct 1, 2023
0075b7f
Update rimraf: v3.x --> v5.x
idmarjr Oct 1, 2023
fa5bdb5
Update Cypress & Jest
idmarjr Oct 1, 2023
ee6129d
Merge pull request #471 from brmodeloweb/update-dev-dependencies
idmarjr Oct 1, 2023
31c16b0
Define missing children types
idmarjr Oct 2, 2023
fe98e2e
Update react related dependencies
idmarjr Oct 2, 2023
16c14fd
Update dependencies with minor version changes
idmarjr Oct 2, 2023
eee8c0f
Update dotenv dependency
idmarjr Oct 2, 2023
e2be9c2
Update i18next related dependencies
idmarjr Oct 2, 2023
e850dab
Merge pull request #472 from brmodeloweb/update-project-dependencies
idmarjr Oct 3, 2023
a423b09
Remove default tracker
miltonbsn Oct 7, 2023
5be728a
Send track event on route change
miltonbsn Oct 7, 2023
eb8fa7f
Optimize listAll query
miltonbsn Oct 7, 2023
6422298
Add copyAll, pastAll and deletAll on elementSelector
miltonbsn Oct 8, 2023
90b5a83
Add new features to conceptual editor
miltonbsn Oct 8, 2023
5cbf2f6
Add new features to logic editor
miltonbsn Oct 8, 2023
1ea3cd2
Fix email type
miltonbsn Oct 8, 2023
7bb81ce
Merge pull request #477 from brmodeloweb/feature/copy-and-past
miltonbsn Oct 8, 2023
3a1627b
Merge pull request #478 from brmodeloweb/fix/email-signup-validation
miltonbsn Oct 8, 2023
e975a47
Create FUNDING.yml
idmarjr Oct 9, 2023
9aeda01
Bump @babel/traverse from 7.16.5 to 7.23.2
dependabot[bot] Oct 17, 2023
b4bb90a
Update default app <title>
idmarjr Oct 19, 2023
4d0c0cd
Merge pull request #479 from brmodeloweb/dependabot/npm_and_yarn/babe…
idmarjr Oct 22, 2023
c58767d
Update Cypress to V13
idmarjr Nov 12, 2023
9401526
Update depenencis via: yarn upgrade
idmarjr Nov 12, 2023
b57b81f
Update faker
idmarjr Nov 12, 2023
1272976
Update faker import at test files
idmarjr Nov 12, 2023
cece600
Define api url as a cypress env
wlsf82 Nov 12, 2023
0465931
Login via gui in all tests
wlsf82 Nov 12, 2023
7d550f6
Delete the login via api custom cmd
wlsf82 Nov 12, 2023
022d1ef
Remove test assertions that are not working
wlsf82 Nov 12, 2023
1a7cc03
Get token and use as request header
wlsf82 Nov 12, 2023
13fb652
Temporarily skip failing test
wlsf82 Nov 12, 2023
83c2ee4
Delete drag and drop command
wlsf82 Nov 12, 2023
0855957
Update Tests section o Readme.md
idmarjr Nov 13, 2023
0791255
Fix header hiearchy on Readme.md
idmarjr Nov 13, 2023
837ddd9
Better text on Tests WARNING block
idmarjr Nov 13, 2023
7b4a61f
Merge pull request #485 from brmodeloweb/migrate-cypress-files-to-v13
idmarjr Nov 13, 2023
ea73145
Bump follow-redirects from 1.15.3 to 1.15.4
dependabot[bot] Jan 11, 2024
519ca9d
Merge pull request #491 from brmodeloweb/dependabot/npm_and_yarn/foll…
idmarjr Jan 20, 2024
7c2366f
Create DISPLAY_SPONSORS.yml
idmarjr Jan 28, 2024
851ba6c
Update DISPLAY_SPONSORS.yml
idmarjr Jan 28, 2024
de017c1
Update DISPLAY_SPONSORS.yml
idmarjr Jan 28, 2024
7cb497f
Update README.md
idmarjr Jan 28, 2024
bbcbf15
Update Sponsor insertion markup
idmarjr Jan 28, 2024
7f016f7
Update README.md
idmarjr Feb 4, 2024
cedae09
Update DISPLAY_SPONSORS.yml
idmarjr Feb 4, 2024
961f5e5
Update DISPLAY_SPONSORS.yml
idmarjr Feb 4, 2024
532eeb7
Remove Sponsors workflow (For now)
idmarjr Feb 4, 2024
34c3c98
Add git and mongo db folder to .dockerignore
Tarliton Feb 4, 2024
4e9edd0
Rewrite Dockerfile
Tarliton Feb 4, 2024
d51648f
Bump docker-compose version to 3
Tarliton Feb 4, 2024
792cd99
docs: update README.md [skip ci]
allcontributors[bot] Feb 4, 2024
ef76001
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] Feb 4, 2024
f7d65e7
Merge pull request #497 from brmodeloweb/all-contributors/add-Tarliton
miltonbsn Feb 4, 2024
2437d9f
Bump ip from 2.0.0 to 2.0.1
dependabot[bot] Feb 21, 2024
9df7a7c
Merge pull request #502 from brmodeloweb/dependabot/npm_and_yarn/ip-2…
idmarjr Feb 24, 2024
c8d055a
Bump follow-redirects from 1.15.4 to 1.15.6
dependabot[bot] Mar 16, 2024
f1c2526
Bump webpack-dev-middleware from 5.3.3 to 5.3.4
dependabot[bot] Mar 23, 2024
6fb5cf9
Merge pull request #507 from brmodeloweb/dependabot/npm_and_yarn/webp…
idmarjr Mar 26, 2024
e31fd0f
Bump express from 4.18.2 to 4.19.2
dependabot[bot] Mar 26, 2024
d7ec21d
Create publicview module structure
miltonbsn Apr 20, 2024
1dc2b08
Merge pull request #512 from brmodeloweb/dependabot/npm_and_yarn/expr…
miltonbsn Apr 20, 2024
5a9b69e
Merge pull request #504 from brmodeloweb/dependabot/npm_and_yarn/foll…
miltonbsn Apr 20, 2024
818537e
Merge branch 'main' into feature/export-model
idmarjr Apr 20, 2024
39316b3
Update icon and copy frokm "Export" to "Share"
idmarjr Apr 20, 2024
0fb1731
Add Share modal
idmarjr Apr 20, 2024
4334e81
Create load share apis
miltonbsn Apr 20, 2024
857432e
Merge branch 'feature/share-backend' into feature/export-model
miltonbsn Apr 20, 2024
22d2818
Visual adjustments to publicView
idmarjr Apr 20, 2024
3db0424
Avoid layout break for models with long names
idmarjr Apr 20, 2024
5246f1e
Fix: .projectsList layout break
idmarjr Apr 20, 2024
04c7888
Create load config endpoint
miltonbsn Apr 21, 2024
cad5789
Add share into list
miltonbsn Apr 21, 2024
b752178
Remove logs
miltonbsn Apr 21, 2024
583ae4e
Add share into conceptual
miltonbsn Apr 21, 2024
02f72db
Remove logs
miltonbsn Apr 21, 2024
122c125
Short refactoring
miltonbsn Apr 21, 2024
53240f4
Add share into logic
miltonbsn Apr 21, 2024
a095b02
Change load to support always generate link
miltonbsn Apr 21, 2024
bbf3d53
Prevents exit on click outside modal
miltonbsn Apr 21, 2024
f3c83e1
Add new save button and related functions
miltonbsn Apr 21, 2024
84583f9
Disable copy button when url is empty
miltonbsn Apr 21, 2024
b778f9b
Draft markupo for Sponsor banner at Models List
idmarjr Apr 21, 2024
343d9e0
Update copy and add translations
idmarjr Apr 22, 2024
beefc18
Small copy update
idmarjr Apr 22, 2024
37f8e21
Merge pull request #516 from brmodeloweb/feature/public-view-module
miltonbsn Apr 22, 2024
7b23b78
Move GithubSponsorBanner to it's own component
idmarjr Apr 22, 2024
701c855
Fix bug on duplicate model feedback message
idmarjr Apr 22, 2024
a872c8e
Add Feedback module to ModelsList
idmarjr Apr 22, 2024
77b1eb4
Update success save message for copy consistency
idmarjr Apr 22, 2024
88ec8c7
Improve ModelList feedback
idmarjr Apr 22, 2024
9f91e89
Create load shared model api
miltonbsn Apr 22, 2024
98d746a
Load shared model on publicview module
miltonbsn Apr 22, 2024
ebc3263
Merge branch 'feature/export-model' of github.com:brmodeloweb/brmodel…
miltonbsn Apr 22, 2024
f3cccce
Remove unused testes
miltonbsn Apr 22, 2024
2e7d365
Small fixies
miltonbsn Apr 22, 2024
67b7859
Merge pull request #520 from brmodeloweb/bugfix/workspace-feedback-mo…
miltonbsn Apr 22, 2024
64150b6
Use icons to represent model types
idmarjr Apr 22, 2024
d298c2c
Merge pull request #521 from brmodeloweb/model-type-icons
miltonbsn Apr 22, 2024
142be07
Merge main features
miltonbsn Apr 23, 2024
3edd0c2
Add sharing feedback on workspace
miltonbsn Apr 23, 2024
6bd0954
Fix sharing config message on conceptual model
miltonbsn Apr 23, 2024
80e6640
Fix sharing config message on logic model
miltonbsn Apr 23, 2024
8c06ea9
Add icon type on publicviem
miltonbsn Apr 23, 2024
2c0a77f
Add panning command into public view
miltonbsn Apr 23, 2024
f24140f
Fix missing translation
idmarjr Apr 23, 2024
560c104
Move publicView styles to it's ow component scss
idmarjr Apr 23, 2024
207f93b
Fix small interface bug on modelSidebar
idmarjr Apr 23, 2024
e9f5a17
Change shared model contract
miltonbsn Apr 23, 2024
bac5c00
Merge branch 'feature/export-model' of github.com:brmodeloweb/brmodel…
idmarjr Apr 23, 2024
c4c78eb
Fix icon loading
miltonbsn Apr 23, 2024
6350c03
Merge pull request #518 from brmodeloweb/feature/export-model
miltonbsn Apr 23, 2024
a1e8bf6
Merge branch 'main' into github-sponsor-visibility-boost
idmarjr Apr 23, 2024
423cc01
1px layout fix (True story)
idmarjr Apr 23, 2024
efa2183
Fix missing translation at Share modal
idmarjr Apr 23, 2024
00cbd4e
Merge pull request #519 from brmodeloweb/github-sponsor-visibility-boost
idmarjr Apr 23, 2024
ce8e715
Create duplicate api endpoint
miltonbsn Apr 24, 2024
59b1a85
Improve duplicate modal functionality
miltonbsn Apr 24, 2024
51d298c
Add new duplicate modal to conceptual model
miltonbsn Apr 24, 2024
d51fa53
Add new duplicate modal to logic model
miltonbsn Apr 24, 2024
c461d2f
Add new duplicate modal to workspace
miltonbsn Apr 24, 2024
fc59ebc
Merge pull request #524 from brmodeloweb/fix/duplicate-model
miltonbsn Apr 24, 2024
1c12d0b
Merge branch 'main' into ci/create-continuous-integration-workflow
idmarjr Apr 25, 2024
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
14 changes: 13 additions & 1 deletion .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,24 @@
"contributions": [
"test"
]
},
{
"login": "Tarliton",
"name": "Tárliton Basso de Godoy",
"avatar_url": "https://avatars.githubusercontent.com/u/7471617?v=4",
"profile": "https://github.com/Tarliton",
"contributions": [
"code",
"infra"
]
}
],
"contributorsPerLine": 7,
"projectName": "brmodelo-app",
"projectOwner": "brmodeloweb",
"repoType": "github",
"repoHost": "https://github.com",
"skipCi": true
"skipCi": true,
"commitType": "docs",
"commitConvention": "angular"
}
4 changes: 3 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
node_modules/
node_modules/
.git/
data/
13 changes: 13 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# These are supported funding model platforms

github: brmodeloweb # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
65 changes: 65 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: ci

on:
push:
branches:
- main
pull_request:

jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: yarn install
- name: Run unit tests 🧪
run: yarn test
end-to-end-tests-chrome:
needs: unit-tests
runs-on: ubuntu-latest
container: cypress/base:16.5.0
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install dependencies
uses: cypress-io/github-action@v2
with:
install-command: yarn install
runTests: false
- name: Run end-to-end tests on Chrome 🧪
uses: cypress-io/github-action@v2
env:
API_URL: ${{ secrets.API_URL }}
PORT: ${{ secrets.PORT }}
MONGODB_LOCAL_URL: ${{ secrets.MONGODB_LOCAL_URL }}
CYPRESS_user: ${{ secrets.CYPRESS_user }}
CYPRESS_password: ${{ secrets.CYPRESS_password }}
with:
install: false
start: yarn start:dev, yarn start:frontend
command: yarn test:cy
end-to-end-tests-firefox:
needs: unit-tests
runs-on: ubuntu-latest
container: cypress/base:16.5.0
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install dependencies
uses: cypress-io/github-action@v2
with:
install-command: yarn install
runTests: false
- name: Run end-to-end tests on Firefox 🧪
uses: cypress-io/github-action@v2
env:
API_URL: ${{ secrets.API_URL }}
PORT: ${{ secrets.PORT }}
MONGODB_LOCAL_URL: ${{ secrets.MONGODB_LOCAL_URL }}
CYPRESS_user: ${{ secrets.CYPRESS_user }}
CYPRESS_password: ${{ secrets.CYPRESS_password }}
with:
install: false
start: yarn start:dev, yarn start:frontend
command: yarn test:cy:firefox
16 changes: 10 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
FROM node:16-alpine
RUN mkdir -p /usr/src/app
ENV APP_PATH /usr/src/app
COPY package.json $APP_PATH
WORKDIR $APP_PATH
RUN yarn install
COPY . $APP_PATH

WORKDIR /usr/src/app

COPY yarn.lock package.json .

RUN --mount=type=cache,target=/root/.yarn --mount=type=cache,target=/root/.cache YARN_CACHE_FOLDER=/root/.yarn yarn install

COPY . .

# expose port 3000 for server and 9000 for webpack-dev-server
EXPOSE 3000 9000

# run start:frontend and start:dev in parallel
CMD ["yarn", "start:frontend", "start:dev"]
61 changes: 36 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# [app.brmodeloweb.com](https://app.brmodeloweb.com)
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-8-orange.svg?style=flat-square)](#contributors-)
[![All Contributors](https://img.shields.io/badge/all_contributors-9-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

## Web application for database modeling and teaching
Expand All @@ -21,7 +21,7 @@ To run this application you'll need:

1. Install dependencies: `yarn install`
1. Duplicate `.env.example` and rename it to `.env`
1. Make sure you have MongoDB running (To know more: [MacOS](https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/#run-mongodb-community-edition), [Windows](https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows/#run-mongodb-community-edition-as-a-windows-service), [CentOS](https://docs.mongodb.com/manual/tutorial/install-mongodb-on-red-hat/#run-mongodb-community-edition), [Ubuntu](https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/#run-mongodb-community-edition) or [Debian](https://docs.mongodb.com/manual/tutorial/install-mongodb-on-debian/#run-mongodb-community-edition))
1. Make sure you have MongoDB running (To know more: [MacOS](https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/#run-mongodb-community-edition), [Windows](https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows/#run-mongodb-community-edition-as-a-windows-service), [CentOS](https://docs.mongodb.com/manual/tutorial/install-mongodb-on-red-hat/#run-mongodb-community-edition), [Ubuntu](https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/#run-mongodb-community-edition) or [Debian](https://docs.mongodb.com/manual/tutorial/install-mongodb-on-debian/#run-mongodb-community-edition))
1. Start frontend: `yarn start:frontend`
1. Start server: `yarn start:dev`
1. Access it: [http://localhost:9000/](http://localhost:9000/)
Expand All @@ -30,29 +30,37 @@ To run this application you'll need:

> **Note:** Docker setup is still a work in progress and does not offer a good developer experience. For now we recommend you to run the project locally following the instructions listed above. If you still want to use docker, here's how:

1. Make sure you have [Docker Desktop](https://www.docker.com/get-started) running
1. Make sure you have [Docker Desktop](https://www.docker.com/get-started) running
1. Start docker: `docker-compose up` or `docker-compose up -d`
1. Access it: [http://localhost:9000/](http://localhost:9000/)
1. Once your done, finish docker: `docker-compose down`

## Tests

### Setup tests

1. Duplicate `cypress.env.example.json` and rename it to `cypress.env.json`
1. Update `cypress.env.json` with valid user credentials (Username and password)

> [!WARNING]
> The data from the accound you set in `cypress.env.json` will be wiped out after the tests run.
> So, don't use your real account here!

### E2E tests

To run E2E tests you have two options:

1. Run headless mode in your terminal window: `yarn test:cy`
1. Run interactive mode: `yarn cy:open`


### Unit Tests

To run the unit tests you have two options:

- `yarn test` to run all the tests and collect the coverage report. Or;
- `yarn test` to run all the tests and collect the coverage report. Or;
- Execute in a `watch` mode by running `yarn test:watch`

### E2E Tests
First, make sure you have the project up and running with database, backend, and frontend.

1. Duplicate `cypress.env.example.json` and rename it to `cypress.env.json`
1. Edit `cypress.env.json` adding valid user credentials (Username and password)
> **Note:** Tests will delete all models from your user. To avoid lost your work we recommend you to create a different user to run the tests
1. To run the tests you have two options:
1. Run headless mode in your terminal window: `yarn test:cy`
1. Run interactive mode: `yarn cy:open`

## Production environments

Expand All @@ -67,18 +75,21 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tr>
<td align="center"><a href="https://github.com/miltonbsn"><img src="https://avatars2.githubusercontent.com/u/881231?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Milton Bittencourt de Souza Neto</b></sub></a><br /><a href="https://github.com/brmodeloweb/brmodelo-app/commits?author=miltonbsn" title="Code">💻</a> <a href="https://github.com/brmodeloweb/brmodelo-app/commits?author=miltonbsn" title="Tests">⚠️</a> <a href="https://github.com/brmodeloweb/brmodelo-app/issues?q=author%3Amiltonbsn" title="Bug reports">🐛</a> <a href="#maintenance-miltonbsn" title="Maintenance">🚧</a></td>
<td align="center"><a href="http://id.etc.br"><img src="https://avatars3.githubusercontent.com/u/301545?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Idmar Ramos Junior (Id)</b></sub></a><br /><a href="https://github.com/brmodeloweb/brmodelo-app/commits?author=idmarjr" title="Code">💻</a> <a href="#design-idmarjr" title="Design">🎨</a> <a href="#projectManagement-idmarjr" title="Project Management">📆</a> <a href="#maintenance-idmarjr" title="Maintenance">🚧</a></td>
<td align="center"><a href="https://about.me/feekosta"><img src="https://avatars3.githubusercontent.com/u/13004903?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Felipe de Souza da Costa</b></sub></a><br /><a href="https://github.com/brmodeloweb/brmodelo-app/commits?author=feekosta" title="Code">💻</a> <a href="#infra-feekosta" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="https://github.com/brmodeloweb/brmodelo-app/pulls?q=is%3Apr+reviewed-by%3Afeekosta" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://github.com/oicramps"><img src="https://avatars.githubusercontent.com/u/7519115?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Márcio Santos</b></sub></a><br /><a href="https://github.com/brmodeloweb/brmodelo-app/commits?author=oicramps" title="Code">💻</a> <a href="https://github.com/brmodeloweb/brmodelo-app/pulls?q=is%3Apr+reviewed-by%3Aoicramps" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://www.linkedin.com/in/telmo-trooper/"><img src="https://avatars.githubusercontent.com/u/9438853?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Telmo "Trooper"</b></sub></a><br /><a href="https://github.com/brmodeloweb/brmodelo-app/commits?author=telmotrooper" title="Code">💻</a></td>
<td align="center"><a href="https://www.linkedin.com/in/arthurmota/"><img src="https://avatars.githubusercontent.com/u/25749372?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Arthur Mota</b></sub></a><br /><a href="https://github.com/brmodeloweb/brmodelo-app/commits?author=ArthurMota9" title="Code">💻</a> <a href="https://github.com/brmodeloweb/brmodelo-app/pulls?q=is%3Apr+reviewed-by%3AArthurMota9" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://github.com/joaomfiumari"><img src="https://avatars.githubusercontent.com/u/7141759?v=4?s=100" width="100px;" alt=""/><br /><sub><b>joaomfiumari</b></sub></a><br /><a href="https://github.com/brmodeloweb/brmodelo-app/commits?author=joaomfiumari" title="Code">💻</a> <a href="#infra-joaomfiumari" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
</tr>
<tr>
<td align="center"><a href="https://walmyr.dev"><img src="https://avatars.githubusercontent.com/u/2768415?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Walmyr</b></sub></a><br /><a href="https://github.com/brmodeloweb/brmodelo-app/commits?author=wlsf82" title="Tests">⚠️</a></td>
</tr>
<tbody>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/miltonbsn"><img src="https://avatars2.githubusercontent.com/u/881231?v=4?s=100" width="100px;" alt="Milton Bittencourt de Souza Neto"/><br /><sub><b>Milton Bittencourt de Souza Neto</b></sub></a><br /><a href="https://github.com/brmodeloweb/brmodelo-app/commits?author=miltonbsn" title="Code">💻</a> <a href="https://github.com/brmodeloweb/brmodelo-app/commits?author=miltonbsn" title="Tests">⚠️</a> <a href="https://github.com/brmodeloweb/brmodelo-app/issues?q=author%3Amiltonbsn" title="Bug reports">🐛</a> <a href="#maintenance-miltonbsn" title="Maintenance">🚧</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://id.etc.br"><img src="https://avatars3.githubusercontent.com/u/301545?v=4?s=100" width="100px;" alt="Idmar Ramos Junior (Id)"/><br /><sub><b>Idmar Ramos Junior (Id)</b></sub></a><br /><a href="https://github.com/brmodeloweb/brmodelo-app/commits?author=idmarjr" title="Code">💻</a> <a href="#design-idmarjr" title="Design">🎨</a> <a href="#projectManagement-idmarjr" title="Project Management">📆</a> <a href="#maintenance-idmarjr" title="Maintenance">🚧</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://about.me/feekosta"><img src="https://avatars3.githubusercontent.com/u/13004903?v=4?s=100" width="100px;" alt="Felipe de Souza da Costa"/><br /><sub><b>Felipe de Souza da Costa</b></sub></a><br /><a href="https://github.com/brmodeloweb/brmodelo-app/commits?author=feekosta" title="Code">💻</a> <a href="#infra-feekosta" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="https://github.com/brmodeloweb/brmodelo-app/pulls?q=is%3Apr+reviewed-by%3Afeekosta" title="Reviewed Pull Requests">👀</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/oicramps"><img src="https://avatars.githubusercontent.com/u/7519115?v=4?s=100" width="100px;" alt="Márcio Santos"/><br /><sub><b>Márcio Santos</b></sub></a><br /><a href="https://github.com/brmodeloweb/brmodelo-app/commits?author=oicramps" title="Code">💻</a> <a href="https://github.com/brmodeloweb/brmodelo-app/pulls?q=is%3Apr+reviewed-by%3Aoicramps" title="Reviewed Pull Requests">👀</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/telmo-trooper/"><img src="https://avatars.githubusercontent.com/u/9438853?v=4?s=100" width="100px;" alt="Telmo "Trooper""/><br /><sub><b>Telmo "Trooper"</b></sub></a><br /><a href="https://github.com/brmodeloweb/brmodelo-app/commits?author=telmotrooper" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/arthurmota/"><img src="https://avatars.githubusercontent.com/u/25749372?v=4?s=100" width="100px;" alt="Arthur Mota"/><br /><sub><b>Arthur Mota</b></sub></a><br /><a href="https://github.com/brmodeloweb/brmodelo-app/commits?author=ArthurMota9" title="Code">💻</a> <a href="https://github.com/brmodeloweb/brmodelo-app/pulls?q=is%3Apr+reviewed-by%3AArthurMota9" title="Reviewed Pull Requests">👀</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/joaomfiumari"><img src="https://avatars.githubusercontent.com/u/7141759?v=4?s=100" width="100px;" alt="joaomfiumari"/><br /><sub><b>joaomfiumari</b></sub></a><br /><a href="https://github.com/brmodeloweb/brmodelo-app/commits?author=joaomfiumari" title="Code">💻</a> <a href="#infra-joaomfiumari" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://walmyr.dev"><img src="https://avatars.githubusercontent.com/u/2768415?v=4?s=100" width="100px;" alt="Walmyr"/><br /><sub><b>Walmyr</b></sub></a><br /><a href="https://github.com/brmodeloweb/brmodelo-app/commits?author=wlsf82" title="Tests">⚠️</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Tarliton"><img src="https://avatars.githubusercontent.com/u/7471617?v=4?s=100" width="100px;" alt="Tárliton Basso de Godoy"/><br /><sub><b>Tárliton Basso de Godoy</b></sub></a><br /><a href="https://github.com/brmodeloweb/brmodelo-app/commits?author=Tarliton" title="Code">💻</a> <a href="#infra-Tarliton" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
</tr>
</tbody>
</table>

<!-- markdownlint-restore -->
Expand Down
19 changes: 14 additions & 5 deletions app/angular/components/duplicateModelModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,26 @@ import template from "./duplicateModelModal.html";

const app = angular.module("app.duplicateModelModalController", []);

const Controller = function () {
const Controller = function(ModelAPI) {
const $ctrl = this;
$ctrl.submitted = false;

$ctrl.$onInit = () => {
$ctrl.name = $ctrl.suggestedName;
};

$ctrl.save = function (modelname) {
$ctrl.save = function (newName) {
$ctrl.submitted = true;
if (modelname != null && modelname != "") {
$ctrl.close({
result: modelname,
if (newName != null && newName != "") {
ModelAPI.duplicate($ctrl.modelId, $ctrl.userId, newName).then((newModelResponse) => {
$ctrl.close({
result: newModelResponse.data,
});
}).catch(error => {
$ctrl.dismiss({
result: "error",
reason: error
});
});
}
};
Expand All @@ -33,6 +40,8 @@ export default app.component("duplicateModelModal", {
close: "&",
dismiss: "&",
suggestedName: "<",
userId: "<",
modelId: "<",
},
controller: Controller,
}).name;
9 changes: 9 additions & 0 deletions app/angular/components/githubSponsorBanner/index.html

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions app/angular/components/githubSponsorBanner/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import angular from "angular";
import template from "./index.html";
import "./index.scss";

const githubSponsorBanner = function () {};

export default angular.module("app.githubSponsorBanner", []).component("githubSponsorBanner", {
template,
controller: githubSponsorBanner,
}).name;
13 changes: 13 additions & 0 deletions app/angular/components/githubSponsorBanner/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
////////////////////////////////////////////////////////////////////////////////
// .alert-sponsor
////////////////////////////////////////////////////////////////////////////////
.github-sponsor-banner {
display: flex;
gap: 10px;
border: 1px solid #ddd;
margin-top: 24px;
}

.github-sponsor-banner .github-sponsor-img {
width: 128px;
}
1 change: 1 addition & 0 deletions app/angular/components/icons/conceptual/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="20" viewBox="0 -960 960 960"><path d="M479.995-95.463q-59.995 0-102.033-42.042-42.038-42.042-42.038-102.034 0-53.265 33.615-93.171 33.616-39.906 84.462-48.888v-84.403h-206v-111.922H141.925v-264.152h264.152v264.152H300v59.924h372v-62.386q-50.846-8.538-84.461-48.444-33.616-39.906-33.616-93.17 0-59.992 42.044-102.034 42.043-42.042 102.038-42.042 59.994 0 102.032 42.042t42.038 102.034q0 53.264-33.615 93.17t-84.461 48.444v114.384h-218v84.403q50.846 8.982 84.462 48.888 33.615 39.906 33.615 93.171 0 59.992-42.044 102.034-42.043 42.042-102.037 42.042Zm218.227-534.459q38.239 0 65.047-27.031t26.808-65.269q0-38.239-27.031-65.047t-65.27-26.808q-38.239 0-65.046 27.031-26.808 27.031-26.808 65.27t27.031 65.046q27.031 26.808 65.269 26.808Zm-504.299 0h160.155v-160.155H193.923v160.155Zm286.3 482.46q38.239 0 65.047-27.031t26.808-65.269q0-38.239-27.031-65.047t-65.27-26.808q-38.239 0-65.047 27.031t-26.808 65.27q0 38.238 27.031 65.046 27.031 26.808 65.27 26.808ZM274.001-709.999Zm423.998-12ZM480-239.539Z"/></svg>
10 changes: 10 additions & 0 deletions app/angular/components/icons/conceptual/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import angular from "angular";
import template from "./index.html";
import "./index.scss";

const iconConceptual = function () {};

export default angular.module("app.iconConceptual", []).component("iconConceptual", {
template,
controller: iconConceptual
}).name;
10 changes: 10 additions & 0 deletions app/angular/components/icons/conceptual/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
icon-conceptual {
position: relative;
display: inline-block;
}

icon-conceptual svg {
display: block;
position: relative;
top: 5px;
}
Loading
Loading