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

Migrate app frontend to Vue #936

Merged
merged 17 commits into from
Jul 21, 2023
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
11 changes: 0 additions & 11 deletions .babelrc

This file was deleted.

68 changes: 1 addition & 67 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,70 +8,4 @@ updates:
time: "03:00"
timezone: Europe/Paris
open-pull-requests-limit: 10
ignore:
- dependency-name: css-loader
versions:
- 5.0.1
- 5.0.2
- 5.1.0
- 5.1.1
- 5.1.2
- 5.1.3
- 5.2.0
- 5.2.1
- dependency-name: webpack
versions:
- 4.46.0
- 5.21.0
- 5.21.2
- 5.23.0
- 5.24.2
- 5.24.3
- 5.25.0
- 5.27.0
- 5.28.0
- 5.30.0
- 5.31.2
- dependency-name: mini-css-extract-plugin
versions:
- 1.3.4
- 1.3.5
- 1.3.6
- 1.3.8
- 1.3.9
- 1.4.0
- 1.4.1
- dependency-name: "@babel/core"
versions:
- 7.12.10
- 7.12.16
- 7.12.17
- 7.13.10
- 7.13.13
- 7.13.14
- 7.13.15
- 7.13.8
- dependency-name: eslint
versions:
- 7.18.0
- 7.20.0
- 7.21.0
- 7.22.0
- 7.23.0
- 7.24.0
- dependency-name: postcss
versions:
- 8.2.6
- 8.2.7
- 8.2.8
- 8.2.9
- dependency-name: react-dropzone
versions:
- 11.2.4
- 11.3.1
- dependency-name: postcss-loader
versions:
- 4.2.0
- dependency-name: ini
versions:
- 1.3.8
versioning-strategy: increase
62 changes: 62 additions & 0 deletions .github/workflows/lint-eslint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# This workflow is provided via the organization template repository
#
# https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
#
# Use lint-eslint together with lint-eslint-when-unrelated to make eslint a required check for GitHub actions
# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks

name: Lint eslint

on:
pull_request:
paths:
- '.github/workflows/**'
- 'src/**'
- 'appinfo/info.xml'
- 'package.json'
- 'package-lock.json'
- 'tsconfig.json'
- '.eslintrc.*'
- '.eslintignore'
- '**.js'
- '**.ts'
- '**.vue'

permissions:
contents: read

concurrency:
group: lint-eslint-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest

name: eslint

steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3

- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2
id: versions
with:
fallbackNode: '^20'
fallbackNpm: '^9'

- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}

- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint
65 changes: 65 additions & 0 deletions .github/workflows/node-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Node tests

on:
pull_request:
push:
branches:
- main
- master
- stable*

permissions:
contents: read

concurrency:
group: node-tests-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3

- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2
id: versions
with:
fallbackNode: '^20'
fallbackNpm: '^9'

- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}

- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"

- name: Install dependencies & build
run: |
npm ci
npm run build --if-present

- name: Test
run: npm run test --if-present

- name: Test and process coverage
run: npm run test:coverage --if-present

- name: Collect coverage
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
with:
files: ./coverage/lcov.info

summary:
runs-on: ubuntu-latest
needs: test
if: always()

name: test-summary
steps:
- name: Summary status
run: if ${{ needs.test.result != 'success' && needs.test.result != 'skipped' }}; then exit 1; fi
11 changes: 10 additions & 1 deletion .github/workflows/phpunit-sqlite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
coverage: none
coverage: xdebug
ini-file: development
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -103,6 +103,15 @@ jobs:
working-directory: apps/${{ env.APP_NAME }}
run: composer run test:unit

- name: Upload PHPUnit code coverage
if: steps.check_phpunit.outcome == 'success'
uses: codecov/codecov-action@v3
with:
root_dir: ./apps/${{ env.APP_NAME }}
files: ./apps/${{ env.APP_NAME }}/tests/clover.unit.xml
fail_ci_if_error: true
flags: unit

- name: Check PHPUnit integration script is defined
id: check_integration
continue-on-error: true
Expand Down
14 changes: 12 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
# Code coverge
.nyc_output/
coverage/

# Test output
cypress/screenshots/
cypress/videos/

# Locally installed packages
node_modules/
build/appstore/
vendor
vendor/

build/
*.cache
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Log reader for Nextcloud with clean exception display, infinite scrolling and mo

Log Reader is installed by default in recent versions of Nextcloud so you don't have to do anything else to use the app.

### Install the latest sable release manually
### Install the latest stable release manually

- Download the last pre-build [release](https://github.com/nextcloud/logreader/releases)
- Extract the `tar.gz` into the apps folder
Expand Down
1 change: 1 addition & 0 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<version>2.13.0</version>
<licence>agpl</licence>
<author>Robin Appelman</author>
<author>Ferdinand Thiessen</author>
<namespace>LogReader</namespace>
<default_enable/>

Expand Down
13 changes: 5 additions & 8 deletions appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,9 @@
return ['routes' => [
// page
['name' => 'page#index', 'url' => '/', 'verb' => 'GET'],
['name' => 'log#get', 'url' => '/get', 'verb' => 'GET'],
['name' => 'log#poll', 'url' => '/poll', 'verb' => 'GET'],
['name' => 'log#search', 'url' => '/search', 'verb' => 'GET'],
['name' => 'log#getSettings', 'url' => '/settings', 'verb' => 'GET'],
['name' => 'log#getLevels', 'url' => '/levels', 'verb' => 'GET'],
['name' => 'log#setLevels', 'url' => '/levels', 'verb' => 'PUT'],
['name' => 'log#setRelative', 'url' => '/relative', 'verb' => 'PUT'],
['name' => 'log#setLive', 'url' => '/live', 'verb' => 'PUT'],
['name' => 'log#get', 'url' => '/api/log', 'verb' => 'GET'],
['name' => 'log#poll', 'url' => '/api/poll', 'verb' => 'GET'],
// app settings
['name' => 'settings#getAppConfig', 'url' => '/api/settings', 'verb' => 'GET'],
['name' => 'settings#updateAppConfig', 'url' => '/api/settings', 'verb' => 'PUT']
]];
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"name": "nextcloud/logreader",
"type": "project",
"license": "AGPLv3",
"require-dev": {
"nextcloud/coding-standard": "v1.1.1",
"nextcloud/ocp": "dev-master",
"phpunit/phpunit": "^8",
"phpunit/phpunit": "^9",
"vimeo/psalm": "^4.27"
},
"config": {
Expand Down
Loading
Loading