Skip to content

Commit

Permalink
Merge branch '8.0.x' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
macite committed Jun 1, 2024
2 parents ea16363 + f538239 commit 0580a54
Show file tree
Hide file tree
Showing 52 changed files with 944 additions and 415 deletions.
12 changes: 12 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@
"jasmine": true
},
"rules": {
"@typescript-eslint/no-unused-vars": [
"warn",
{
"args": "all",
"argsIgnorePattern": "^_",
"caughtErrors": "all",
"caughtErrorsIgnorePattern": "^_",
"destructuredArrayIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"ignoreRestSiblings": true
}
],
"@angular-eslint/no-empty-lifecycle-method": "warn",
"@angular-eslint/component-class-suffix": "warn",
"@angular-eslint/no-output-on-prefix": "warn",
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,25 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
if: github.event_name != 'pull_request'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Setup meta for development image
id: docker_meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: lmsdoubtfire/doubtfire-web
tags: |
type=semver,pattern={{major}}.{{minor}}.x-dev
- name: Build and push web server
id: docker_build
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
Expand All @@ -48,18 +48,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
if: github.event_name != 'pull_request'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Setup meta for web server
id: docker_meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: lmsdoubtfire/doubtfire-web
tags: |
Expand All @@ -70,7 +70,7 @@ jobs:
type=semver,pattern=prod-{{major}}
- name: Build and push web server
id: docker_build
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
file: deploy.Dockerfile
context: .
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/nodejs-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ jobs:

strategy:
matrix:
node-version: [18.x]
node-version: [20]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: browser-actions/setup-chrome@latest
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm install -g @angular/cli
- run: npm ci
- run: npm run lint
# - run: npm run lint
# - run: npm run test:ci
- run: npm run build --if-present
356 changes: 356 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ WORKDIR /doubtfire-web
COPY --chown="${USER}":root . .

# Setup within container
RUN npm install --force
RUN npm ci --force --include=optional

EXPOSE 9876

Expand Down
2 changes: 1 addition & 1 deletion deploy.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ USER node
# Copy in doubtfire-web code
WORKDIR /doubtfire-web
COPY package.json package-lock.json ./
RUN npm ci --force
RUN npm ci --force --include=optional

COPY --chown=node:node . .
RUN chmod 777 src
Expand Down
4 changes: 2 additions & 2 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ http {
listen 80;

add_header Content-Security-Policy "default-src https: 'unsafe-inline' 'unsafe-eval' blob: data: ws:" always;
add_header Feature-Policy "microphone 'self';speaker 'self';fullscreen 'self';payment none;" always;
add_header Permissions-Policy "microphone=(self), fullscreen=(self), payment=()" always;
# add_header Feature-Policy "microphone=(self),speaker=(self),fullscreen=(self),payment=(none);" always;
add_header Permissions-Policy "microphone=(self),speaker=(self),fullscreen=(self),payment=(none)" always;
}

gzip on;
Expand Down
91 changes: 83 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 11 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "doubtfire",
"version": "8.0.0-4",
"homepage": "https://github.com/doubtfire-lms/",
"version": "8.0.9",
"homepage": "http://github.com/doubtfire-lms/",
"description": "Learning and feedback tool.",
"license": "AGPL-3.0",
"repository": {},
Expand Down Expand Up @@ -41,6 +41,7 @@
"@angular/service-worker": "^17.3.6",
"@angular/upgrade": "^17.3.6",
"@ctrl/ngx-emoji-mart": "^9.2.0",
"@ngneat/hotkeys": "^4.0.0",
"@uirouter/angular": "^13.0",
"@uirouter/angular-hybrid": "^17.1.0",
"@uirouter/angularjs": "^1.0.30",
Expand Down Expand Up @@ -73,7 +74,7 @@
"font-awesome": "~4.7.0",
"jquery": "2.1.4",
"lodash": "~4.17",
"lottie-web": "^5",
"lottie-web": "^5.12.2",
"marked": "^11.1.0",
"moment": "^2.29.4",
"ng-csv": "0.2.3",
Expand All @@ -82,7 +83,7 @@
"ng2-pdf-viewer": "^10.0",
"ngx-bootstrap": "^6.1.0",
"ngx-entity-service": "^0.0.38",
"ngx-lottie": "^10.0.0",
"ngx-lottie": "^11.0.2",
"nvd3": "1.8.6",
"rxjs": "~7.4.0",
"ts-md5": "^1.3.1",
Expand Down Expand Up @@ -159,5 +160,11 @@
"ts-node": "~10.9",
"typescript": "~5.2",
"underscore": "^1.8.3"
},
"optionalDependencies": {
"@nx/nx-darwin-arm64": "^18.0",
"@nx/nx-darwin-x64": "^18.0",
"@nx/nx-linux-x64-gnu": "^18.0",
"@nx/nx-win32-x64-msvc": "^18.0"
}
}
11 changes: 5 additions & 6 deletions src/app/admin/states/f-units/f-units.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ <h3>{{ title }}</h3>
[dataSource]="dataSource"
matSort
(matSortChange)="sortTableData($event)"
matSortActive="start_date"
matSortDirection="desc"
matSortDisableClear
>
<!-- Unit Code Column -->
<ng-container matColumnDef="unit_code" sticky>
Expand Down Expand Up @@ -52,11 +55,7 @@ <h3>{{ title }}</h3>
<ng-container matColumnDef="teaching_period" sticky>
<th mat-header-cell *matHeaderCellDef mat-sort-header>Teaching Period</th>
<td mat-cell *matCellDef="let element">
@if (element.teachingPeriod) {
{{ element.teachingPeriod.name }}
} @else {
Custom
}
{{ element.teaching_period }}
</td>
</ng-container>

Expand All @@ -69,7 +68,7 @@ <h3>{{ title }}</h3>
<!-- End Date Column -->
<ng-container matColumnDef="end_date" sticky>
<th mat-header-cell *matHeaderCellDef mat-sort-header>End Date</th>
<td mat-cell *matCellDef="let element">{{ element.start_date | date: 'EEE d MMM y' }}</td>
<td mat-cell *matCellDef="let element">{{ element.end_date | date: 'EEE d MMM y' }}</td>
</ng-container>

<!-- Active Column -->
Expand Down
Loading

0 comments on commit 0580a54

Please sign in to comment.