Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
2cdde7e
Adding new views
jorgefl8 Feb 20, 2024
04032ad
feat(ui): addes new images and svgs for new NavMenu and delete some n…
jorgefl8 Jun 4, 2024
171df9f
feat(templates): new file to declare templates samples from github
jorgefl8 Jun 4, 2024
4e8c1ee
feat(config): Added javascript json rute configuration
jorgefl8 Jun 4, 2024
1c694a8
refactor(assets): css modified to new implementations
jorgefl8 Jun 4, 2024
db31d85
refactor: now SelectTpa.vue and TpaDetilas.vue are included and refac…
jorgefl8 Jun 4, 2024
2c80d08
feat: added directive tooltip & changed App.vue wrapper changed due t…
jorgefl8 Jun 4, 2024
0145647
fix: added new logic for tpa mode
jorgefl8 Jun 4, 2024
e4349c8
feat: added and fiex some views and components
jorgefl8 Jun 4, 2024
92eb6f8
fix: added and modified app routes
jorgefl8 Jun 4, 2024
6e4207b
feat: now bluejay urls are typed in bluejayInfra.js
jorgefl8 Jun 4, 2024
d5c8ee8
fix: added logic for template and delete bluejay URLS due to bluejayI…
jorgefl8 Jun 4, 2024
3fa11bc
feat: added a View to utils that follows the design of a view, due to…
jorgefl8 Jun 4, 2024
d1c1f29
fix: about functionalitys have been distributed
jorgefl8 Jun 4, 2024
f69fb73
fix: about functionalities have been distributed
jorgefl8 Jun 4, 2024
8014fc2
refactor: rename class to course
jorgefl8 Jun 10, 2024
6c0bfcf
docs: updated license and readme
jorgefl8 Jun 10, 2024
73706bd
feat: added Toast comp to App.vue
jorgefl8 Jun 10, 2024
dceebaf
refactor: rename class to course
jorgefl8 Jun 10, 2024
7912975
fix: TreeBrowser logic has been edited to avoid recursively calls
jorgefl8 Jun 10, 2024
5cc9d91
feat: added template field
jorgefl8 Jun 10, 2024
d32dac8
feat: :zap: added new way to save TPA changes
jorgefl8 Jun 10, 2024
a0a887a
feat: added show hidden courses
jorgefl8 Jun 10, 2024
adcdb7c
fix: minor fixes
jorgefl8 Jun 10, 2024
5ad4335
Merge branch 'develop' of https://github.com/jorgefl8/tpa-manager int…
jorgefl8 Jun 10, 2024
29f430c
docs: update readme
jorgefl8 Jun 10, 2024
9fdd370
fix: rename classes to courses
jorgefl8 Jun 10, 2024
46a8a42
feat: updated deepscan badge
jorgefl8 Jun 10, 2024
d838abd
refactor(tests): :white_check_mark: tests have been modified in order…
jorgefl8 Jun 10, 2024
b83ee5a
feat: env.example
jorgefl8 Jun 10, 2024
9f0bcaf
fix: minor fixes
jorgefl8 Jun 10, 2024
273c100
fix: tests fix
jorgefl8 Jun 10, 2024
206536c
fix: deepScan fixes
jorgefl8 Jun 10, 2024
89e47c2
fix: deleted vite test until it works correctly
jorgefl8 Jun 10, 2024
706251d
fix: tests fixes
jorgefl8 Jun 10, 2024
1811239
feat: trying ubuntu instead of windows in workflow
jorgefl8 Jun 10, 2024
f6c8b2f
fix: trying to solve tests
jorgefl8 Jun 10, 2024
a19d830
fix: trying to solve tests
jorgefl8 Jun 10, 2024
f43b668
fix: some errors fixed due to tests
jorgefl8 Jun 10, 2024
76ffe51
fix: deepScan erros & template test
jorgefl8 Jun 10, 2024
a344984
fix: error using alltemplates instead of allTemplates
jorgefl8 Jun 10, 2024
4d7c171
fix: deepscan errors
jorgefl8 Jun 10, 2024
5d902e6
fix: deepscan Error data message
jorgefl8 Jun 10, 2024
40fc14d
Merge pull request #1 from jorgefl8/develop
jorgefl8 Jun 10, 2024
1145cce
Update README.md
jorgefl8 Jun 10, 2024
b87f0ce
Update README.md
jorgefl8 Jun 10, 2024
4488d0c
Update LICENSE
jorgefl8 Jun 10, 2024
aeef103
fix: deepscan errors
jorgefl8 Jun 11, 2024
30ce3e5
fix: minor fix in template cy test
jorgefl8 Jun 11, 2024
20ffc3e
fix: minor fixes release
jorgefl8 Jun 14, 2024
f1c69fb
perf: Optimized some components and images
jorgefl8 Jun 16, 2024
5c33a00
feat: new litle changes on Buttons and card border
jorgefl8 Jun 16, 2024
9815998
feat: added new bluejay rules in order to new interface and loading .…
jorgefl8 Jun 16, 2024
69ac749
fix: added new URLS to env example & fixed wrong URL on readme file
jorgefl8 Jun 17, 2024
121cd38
Update README.md
jorgefl8 Jun 17, 2024
d851e63
fix: deepscan minor errors
jorgefl8 Jun 18, 2024
41889f3
Merge branch 'main' of https://github.com/jorgefl8/tpa-manager
jorgefl8 Jun 18, 2024
6b00740
feat: added aria labels for web accessibility
jorgefl8 Jun 21, 2024
fb1cdaf
refactor: some rename class to course
jorgefl8 Jun 21, 2024
aae57db
fix: now show hidden courses working properly
jorgefl8 Jun 21, 2024
2781c87
fix: fixed scrollbar problem on browsers like Brave
jorgefl8 Jun 25, 2024
91e2fb9
Merge remote-tracking branch 'TPA-manager-v2/main' from @jorgefl8
motero2k Jul 6, 2024
016df51
feat: docker image v2
motero2k Jul 15, 2024
c1704f6
fix: now dockerfile working in order to create Governify image
jorgefl8 Jul 21, 2024
daa1b15
docs: modified contributors
jorgefl8 Jul 21, 2024
566bc0f
feat: added new tpa manager needed urls
jorgefl8 Jul 21, 2024
7270ea3
fix: fixed samples urls
jorgefl8 Jul 21, 2024
fcaf7da
fix: fixed assets url and modified dialogs
jorgefl8 Jul 21, 2024
b98712e
feat: added authenticated prop in order to dont need to reload when a…
jorgefl8 Jul 21, 2024
0f649f5
fix: authorization fixed and some optimizations
jorgefl8 Jul 21, 2024
598bf97
fix: minor fixes and optimizations
jorgefl8 Jul 21, 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
13 changes: 13 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.git
.github
*Dockerfile*
*docker-compose*
node_modules
*.log
*.ps1
*.cmd
*.sh
tests
tests/*
.env
.env.*
5 changes: 3 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
NODE_ENV=development
BASE_URL=null
REGISTRY_URL=null
SCOPE_MANAGER_URL=null
COLLECTOR_EVENTS_URL=null
ASSETS_MANAGER_URL=null
ASSETS_MANAGER_URL=null
DASHBOARD_URL=null
REPORTER_URL=null
35 changes: 22 additions & 13 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,37 @@ on: push

jobs:
test:
runs-on: windows-latest
runs-on: ubuntu-latest
steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'

- name: Checkout
uses: actions/checkout@v3
- name: Run Vitest tests
run: |
npm ci
npm run test
uses: actions/checkout@v4

- name: Install Dependencies
run: npm install

- name: Start the Server
run: npm run dev &

- name: Run Cypress tests
uses: cypress-io/github-action@v5
with:
start: npm run dev
run: npx cypress run

- name: Upload Cypress screenshots
uses: actions/upload-artifact@v3
if: failure() # Store screenshots only on failures
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
if-no-files-found: ignore

- name: Upload Cypress videos
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-videos
path: cypress/videos
if-no-files-found: ignore
if-no-files-found: ignore
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM node:20

WORKDIR /app

COPY . .

RUN npm install

EXPOSE 5173

CMD ["npm", "run", "docker"]


1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
MIT License

Copyright (c) 2023 Mariano Manuel Torrado Sánchez
Copyright (c) 2024 Jorge Florentino Serra

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# TPA Designer
# TPA Manager extension

TPA Designer is a web application that allows the user to create and edit Team Practices Agreements (TPAs) for the Governify framework. It has been developed using Vue.js 3, Vite and PrimeVue.
This project has been a extension and improved from original [TPA Manager](https://github.com/MaToSan24/TPA-Manager).

TPA Manager is a web application that allows users to navigate through their scope, in order to manage courses, Team Practices Agreements (TPAs), and TPA templates. It has been developed using Vue.js 3, Vite, and PrimeVue.

## Table of contents

Expand Down Expand Up @@ -52,19 +54,24 @@ The Code Editor component used for editing JSON, JavaScript and GraphQL is [Simp

## Governify specific configuration

This application has been developed to be used within the Governify framework. In order to do so, some Governify-specific tool like ***Bluejay*** must be deployed in the same server as the TPA Designer.
This application has been developed to be used within the Governify framework. In order to do so, some Governify-specific tool like ***Bluejay*** must be deployed in the same server as the TPA Manager.

The following table shows the tools that must be deployed and the corresponding environment variables that must be set in the TPA Designer.
The following table shows the tools that must be deployed and the corresponding environment variables that must be set in the TPA Manager.

| Tool | Environment variable | Default value | Example value |
| ---- | --------------------- | ------------- | ------------- |
| TPA Designer | - | http://localhost:5173 | https://designer.bluejay.governify.io |
| TPA Manager | - | http://localhost:5173 | https://tpa-manager.bluejay.governify.io |
| ASSETS_MANAGER_URL | process.env.ASSETS_MANAGER_URL | http://localhost:5200 | https://assets.bluejay.governify.io/ |
| REGISTRY_URL | process.env.REGISTRY_URL | http://localhost:5400 | https://registry.bluejay.governify.io/ |
| SCOPE_MANAGER_URL | process.env.SCOPE_MANAGER_URL | http://localhost:5700 | https://scopes.bluejay.governify.io |
| COLLECTOR_EVENTS_URL | process.env.COLLECTOR_EVENTS_URL | http://localhost:5500 | https://event-collector.bluejay.governify.io/ |
| DASHBOARD_URL | process.env.DASHBOARD_URL | http://localhost:5600 | https://dashboard.bluejay.governify.io/ |
| REPORTER_URL | process.env.REPORTER_URL | http://localhost:5300 | https://reporter.bluejay.governify.io/ |




There are two ways to set the environment variables:
To set the environment variables:

1. Create a `.env` file in the root directory of the project and set the variables there. The file should look like this (the values are just examples):

Expand All @@ -73,23 +80,16 @@ ASSETS_MANAGER_URL=https://assets.bluejay.governify.io/
REGISTRY_URL=https://registry.bluejay.governify.io/
SCOPE_MANAGER_URL=https://scopes.bluejay.governify.io
COLLECTOR_EVENTS_URL=https://event-collector.bluejay.governify.io/
DASHBOARD_URL=https://dashboard.bluejay.governify.io/
REPORTER_URL=https://reporter.bluejay.governify.io/
```

2. Set the environment variables in the server where the TPA Designer is deployed.

In the `/src/stores/tpaEdition.js` file, there are some variables that hold the enumerated values for the different options that can be selected in the edition mode of the app. These variables are used to populate the dropdowns in the TPA Designer, among other things. The values of these variables can be modified to add new types to the dropdowns. The variables are:

- `BLOCK_TYPES`
- `COLLECTOR_EVENT_SOURCES`
- `COLLECTOR_EVENT_ENDPOINTS`
- `STEP_TYPES`
- `WINDOW_PERIOD_OPTIONS`

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

## Authors

* **Jorge Florentino Serra** - [jorgefl8](https://github.com/jorgefl8)
* **Mariano Manuel Torrado Sánchez** - [MaToSan24](https://github.com/MaToSan24)

## License
Expand All @@ -98,4 +98,4 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file

## Badges

[![DeepScan grade](https://deepscan.io/api/teams/21971/projects/25327/branches/790692/badge/grade.svg)](https://deepscan.io/dashboard#view=project&tid=21971&pid=25327&bid=790692)
[![DeepScan grade](https://deepscan.io/api/teams/24171/projects/27402/branches/875329/badge/grade.svg)](https://deepscan.io/dashboard#view=project&tid=24171&pid=27402&bid=875329)
13 changes: 13 additions & 0 deletions cypress/e2e/AddAuth.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
describe('Add authorization', () => {
it('should add correctly authorization', () => {
cy.visit(Cypress.env('BASE_URL'));
cy.get('.p-speeddial-button', { timeout: 10000 }).should('be.visible').click();
cy.get('.pi-user-plus').should('exist').click();
cy.get('#auth', { timeout: 20000 }).should('be.visible').type('sample-auth');
cy.get('button').contains('Save').click();
cy.get('.p-toast-message').should('contain', 'Auth has been added');
cy.get('.p-speeddial-button', { timeout: 10000 }).should('be.visible').click();
cy.get('.pi-sign-out').should('exist').click();
cy.get('.p-toast-message').should('contain', 'Auth has been removed');
});
});
16 changes: 5 additions & 11 deletions cypress/e2e/ChangeAppTheme.cy.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
describe('Change App Theme', () => {
it('should change the theme to dark mode and back to light mode', () => {
cy.visit(Cypress.env('BASE_URL'));

const toggleThemeButton = cy.get('button.right-0');
const themeIcon = toggleThemeButton.find('span.p-button-icon');
themeIcon.should('have.class', 'pi-sun');

toggleThemeButton.click();
themeIcon.should('have.class', 'pi-moon');

toggleThemeButton.click();
themeIcon.should('have.class', 'pi-sun');
cy.get('.p-speeddial-button', { timeout: 10000 }).should('be.visible').click();
cy.get('.pi-sun').should('exist').click();
cy.get('.pi-moon').should('exist').click();
cy.get('.pi-sun').should('exist');
});
});
});
29 changes: 29 additions & 0 deletions cypress/e2e/CreateCourse.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
beforeEach(() => {
cy.intercept("GET", Cypress.env("REGISTRY_URL") + "/api/v6/templates", {
fixture: "templates.json",
}).as("templatesCheck");
cy.intercept('POST', Cypress.env("SCOPE_MANAGER_URL") + '/api/v1/scopes/development/courses', { fixture: 'new-course.json' }).as('coursesCheck');

cy.visit(Cypress.env("BASE_URL") + "/new-course");
});

describe("Correct Title", () => {
it("should see the New Course component", () => {
const homePageTitle = cy.get(".header-top > span");
homePageTitle.should("have.text", "Create new Course");
});
});

describe("Create Course", () => {
it("message", () => {
cy.get("#class-name").type("New-course-name");
cy.get("#join-code").type("12345");
cy.get('span.p-dropdown-label').click();
cy.get('li').contains('template-test_showcase-v1-0-0').click();
cy.get(".p-button").contains("Create").click();
cy.get(".p-toast-message").should(
"contain",
"Course created successfully!"
);
});
});
Loading
Loading