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

[gui] Expandable runs #2953

Merged
merged 3 commits into from
Oct 30, 2020
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
2 changes: 1 addition & 1 deletion web/api/js/codechecker-api-js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "codechecker-api-js",
"version": "6.33.0",
"version": "6.33.0-dev1",
"description": "Generated jQuery compatible API stubs for CodeChecker server.",
"main": "lib",
"homepage": "https://github.com/Ericsson/codechecker",
Expand Down
2 changes: 1 addition & 1 deletion web/api/js/codechecker-api-node/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "codechecker-api",
"version": "6.33.0",
"version": "6.33.0-dev1",
"description": "Generated node.js compatible API stubs for CodeChecker server.",
"main": "lib",
"homepage": "https://github.com/Ericsson/codechecker",
Expand Down
2 changes: 1 addition & 1 deletion web/api/py/codechecker_api/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
with open('README.md', encoding='utf-8', errors="ignore") as f:
long_description = f.read()

api_version = '6.33.0'
api_version = '6.33.0-dev1'

setup(
name='codechecker_api',
Expand Down
2 changes: 1 addition & 1 deletion web/api/py/codechecker_api_shared/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setup(
name='codechecker_api_shared',
version='6.33.0',
version='6.33.0-dev1',
description='Shared API stub types package for the CodeChecker API.',
long_description_content_type='text/markdown',
long_description=long_description,
Expand Down
5 changes: 3 additions & 2 deletions web/api/report_server.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,9 @@ typedef list<RunHistoryData> RunHistoryDataList
* If exactMatch field is True it will use exact match for run names.
*/
struct RunHistoryFilter {
1: list<string> tagNames, // Part of the tag names.
2: optional list<i64> tagIds, // Tag ids.
1: list<string> tagNames, // Part of the tag names.
2: optional list<i64> tagIds, // Tag ids.
3: optional DateInterval stored, // Date interval when the run was stored at.
}

struct RunTagCount {
Expand Down
4 changes: 2 additions & 2 deletions web/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ alembic==1.4.2
portalocker==1.7.0
psutil==5.7.0

codechecker_api==6.33.0
codechecker_api_shared==6.33.0
codechecker_api==6.33.0-dev1
codechecker_api_shared==6.33.0-dev1
4 changes: 2 additions & 2 deletions web/requirements_py/db_pg8000/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ pg8000==1.15.2
psutil==5.7.0
portalocker==1.7.0

codechecker_api==6.33.0
codechecker_api_shared==6.33.0
codechecker_api==6.33.0-dev1
codechecker_api_shared==6.33.0-dev1
4 changes: 2 additions & 2 deletions web/requirements_py/db_psycopg2/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ psycopg2-binary==2.8.5
psutil==5.7.0
portalocker==1.7.0

codechecker_api==6.33.0
codechecker_api_shared==6.33.0
codechecker_api==6.33.0-dev1
codechecker_api_shared==6.33.0-dev1
4 changes: 2 additions & 2 deletions web/requirements_py/dev/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ nose==1.3.7
mockldap==0.3.0
mkdocs==1.0.4

codechecker_api==6.33.0
codechecker_api_shared==6.33.0
codechecker_api==6.33.0-dev1
codechecker_api_shared==6.33.0-dev1

# publish packages to pypi
twine
4 changes: 2 additions & 2 deletions web/requirements_py/osx/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ portalocker==1.7.0
psutil==5.7.0
sqlalchemy==1.3.16

codechecker_api==6.33.0
codechecker_api_shared==6.33.0
codechecker_api==6.33.0-dev1
codechecker_api_shared==6.33.0-dev1
25 changes: 18 additions & 7 deletions web/server/codechecker_server/api/report_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,15 +459,26 @@ def process_run_history_filter(query, run_ids, run_history_filter):
if run_ids:
query = query.filter(RunHistory.run_id.in_(run_ids))

if run_history_filter and run_history_filter.tagNames:
OR = [RunHistory.version_tag.ilike('{0}'.format(conv(
escape_like(name, '\\'))), escape='\\') for
name in run_history_filter.tagNames]
if run_history_filter:
if run_history_filter.tagNames:
OR = [RunHistory.version_tag.ilike('{0}'.format(conv(
escape_like(name, '\\'))), escape='\\') for
name in run_history_filter.tagNames]

query = query.filter(or_(*OR))

if run_history_filter.tagIds:
query = query.filter(RunHistory.id.in_(run_history_filter.tagIds))

query = query.filter(or_(*OR))
stored = run_history_filter.stored
if stored:
if stored.before:
stored_before = datetime.fromtimestamp(stored.before)
query = query.filter(RunHistory.time <= stored_before)

if run_history_filter and run_history_filter.tagIds:
query = query.filter(RunHistory.id.in_(run_history_filter.tagIds))
if stored.after:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stored.before and stored.after are not optional. Are these guaranteed to be 0 by default?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bruntib I tried it and the default value will be None if these fields are not set on the client side.

stored_after = datetime.fromtimestamp(stored.after)
query = query.filter(RunHistory.time >= stored_after)

return query

Expand Down
7 changes: 4 additions & 3 deletions web/server/vue-cli/e2e/init.db.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,14 @@ const RUNS = [
url: `http://${host}:${port}/e2e`,
description: "This is my simple run."
},
{
// We store this run so many times to test the run history load more feature.
...[ ...Array(10).keys() ].map(idx => ({
name: "simple",
output: path.join(REPORTS_DIR, "simple"),
url: `http://${host}:${port}/e2e`,
tag: "v0.0.2",
tag: `v0.0.${idx}`,
description: "This is my updated run."
},
})),
{
name: "duplicated",
output: path.join(REPORTS_DIR, "simple"),
Expand Down
57 changes: 0 additions & 57 deletions web/server/vue-cli/e2e/pages/history.js

This file was deleted.

Loading