-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Parts DataTable now working with dummy data via API callbacks
fixing test actions (+2 squashed commits) Squashed commits: [4bb5a7c] Fixes failing tests on action as poetry not installing pytest [e211c5c] Parts DataTable now working with dummy data via API callbacks fixed broken reports page (+12 squashed commits) Squashed commits: [06da556] updated dependencies due to dependabot updates added PRs to changelog [9adc02c] Bump pyjwt from 1.7.1 to 2.1.0 Bumps [pyjwt](https://github.com/jpadilla/pyjwt) from 1.7.1 to 2.1.0. - [Release notes](https://github.com/jpadilla/pyjwt/releases) - [Changelog](https://github.com/jpadilla/pyjwt/blob/master/CHANGELOG.rst) - [Commits](jpadilla/pyjwt@1.7.1...2.1.0) Signed-off-by: dependabot[bot] <support@github.com> [3018fbf] Bump fastapi from 0.63.0 to 0.64.0 Bumps [fastapi](https://github.com/tiangolo/fastapi) from 0.63.0 to 0.64.0. - [Release notes](https://github.com/tiangolo/fastapi/releases) - [Commits](tiangolo/fastapi@0.63.0...0.64.0) Signed-off-by: dependabot[bot] <support@github.com> [c6fc277] Bump aiofiles from 0.6.0 to 0.7.0 Bumps [aiofiles](https://github.com/Tinche/aiofiles) from 0.6.0 to 0.7.0. - [Release notes](https://github.com/Tinche/aiofiles/releases) - [Commits](Tinche/aiofiles@v0.6.0...v0.7.0) Signed-off-by: dependabot[bot] <support@github.com> [ce0422a] Bump pytest-asyncio from 0.14.0 to 0.15.1 Bumps [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) from 0.14.0 to 0.15.1. - [Release notes](https://github.com/pytest-dev/pytest-asyncio/releases) - [Commits](pytest-dev/pytest-asyncio@v0.14.0...v0.15.1) Signed-off-by: dependabot[bot] <support@github.com> [a332e5f] Bump python-slugify from 4.0.1 to 5.0.2 Bumps [python-slugify](https://github.com/un33k/python-slugify) from 4.0.1 to 5.0.2. - [Release notes](https://github.com/un33k/python-slugify/releases) - [Changelog](https://github.com/un33k/python-slugify/blob/master/CHANGELOG.md) - [Commits](un33k/python-slugify@4.0.1...5.0.2) Signed-off-by: dependabot[bot] <support@github.com> [20775f2] Bump abatilo/actions-poetry from 2.1.0 to 2.1.2 Bumps [abatilo/actions-poetry](https://github.com/abatilo/actions-poetry) from 2.1.0 to 2.1.2. - [Release notes](https://github.com/abatilo/actions-poetry/releases) - [Changelog](https://github.com/abatilo/actions-poetry/blob/master/.releaserc) - [Commits](abatilo/actions-poetry@v2.1.0...v2.1.2) Signed-off-by: dependabot[bot] <support@github.com> [ee0a378] Bump mindsers/changelog-reader-action from 1 to 2 Bumps [mindsers/changelog-reader-action](https://github.com/mindsers/changelog-reader-action) from 1 to 2. - [Release notes](https://github.com/mindsers/changelog-reader-action/releases) - [Changelog](https://github.com/mindsers/changelog-reader-action/blob/master/CHANGELOG.md) - [Commits](mindsers/changelog-reader-action@v1...v2) Signed-off-by: dependabot[bot] <support@github.com> [95450f6] Update Changelog for PR [bdb7a8b] Bump heinrichreimer/github-changelog-generator-action from 2.1.1 to 2.2 Bumps [heinrichreimer/github-changelog-generator-action](https://github.com/heinrichreimer/github-changelog-generator-action) from 2.1.1 to 2.2. - [Release notes](https://github.com/heinrichreimer/github-changelog-generator-action/releases) - [Commits](heinrichreimer/action-github-changelog-generator@v2.1.1...v2.2) Signed-off-by: dependabot[bot] <support@github.com> [91dd042] parts datatable api now working with dummy data and made async [370e039] basic service tests start of datatable api start of data table implementation in templates
- Loading branch information
1 parent
d656a03
commit 861fd71
Showing
39 changed files
with
1,369 additions
and
971 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,3 +73,6 @@ maker_hub/static/cache_manifest.json | |
!.vscode/launch.json | ||
|
||
site/* | ||
app/coverage.xml | ||
coverage.xml | ||
htmlcov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[[source]] | ||
url = "https://pypi.org/simple" | ||
verify_ssl = true | ||
name = "pypi" | ||
|
||
[packages] | ||
|
||
[dev-packages] | ||
|
||
[requires] | ||
python_version = "3.9" |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import fastapi | ||
|
||
from app.schema.datatable import DataTableRequest, DataTableResponse | ||
from app.services import part_service | ||
|
||
api = fastapi.APIRouter() | ||
|
||
|
||
@api.post("/api/part/datatable") | ||
async def table_datasource(request: DataTableRequest) -> DataTableResponse: | ||
"""Parts Datatable Source | ||
Returns: | ||
[TableResponse]: [DataTable Ajax Response] | ||
""" | ||
|
||
draw = request.draw | ||
|
||
data = await part_service.get_latest_parts( | ||
start=request.start, limit=request.length | ||
) | ||
return DataTableResponse( | ||
draw=draw, recordsTotal=100, recordsFiltered=100, data=data | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
from typing import List, Optional | ||
|
||
from pydantic import BaseModel | ||
|
||
from app.schema.part import Part | ||
|
||
|
||
class Search(BaseModel): | ||
value: str = "" | ||
regex: bool = False | ||
|
||
|
||
class Order(BaseModel): | ||
column: int | ||
dir: str = "asc" | ||
|
||
|
||
class Column(BaseModel): | ||
name: str | ||
data: str | ||
searchable: bool = True | ||
orderable: bool = True | ||
search: Search | ||
|
||
|
||
class DataTableBase(BaseModel): | ||
draw: int | ||
|
||
|
||
class DataTableRequest(DataTableBase): | ||
start: int | ||
length: int | ||
search: Search | ||
order: List[Order] | ||
columns: List[Column] | ||
|
||
|
||
class DataTableResponse(DataTableBase): | ||
recordsTotal: int | ||
recordsFiltered: int | ||
data: List[Part] = [] | ||
error: Optional[str] = None | ||
|
||
|
||
# Example DataTable generated Query | ||
# { | ||
# "draw": 1, | ||
# "columns": [ | ||
# { | ||
# "data": "id", | ||
# "name": "", | ||
# "searchable": false, | ||
# "orderable": false, | ||
# "search": {"value": "", "regex": false}, | ||
# }, | ||
# { | ||
# "data": "name", | ||
# "name": "", | ||
# "searchable": true, | ||
# "orderable": true, | ||
# "search": {"value": "", "regex": false}, | ||
# }, | ||
# { | ||
# "data": "description", | ||
# "name": "", | ||
# "searchable": true, | ||
# "orderable": true, | ||
# "search": {"value": "", "regex": false}, | ||
# }, | ||
# ], | ||
# "order": [{"column": 1, "dir": "asc"}], | ||
# "start": 0, | ||
# "length": 100, | ||
# "search": {"value": "", "regex": false}, | ||
# } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from pydantic import BaseModel | ||
|
||
|
||
class Part(BaseModel): | ||
id: str | ||
name: str | ||
description: str |
Oops, something went wrong.