argus-alm 0.15.2__py3-none-any.whl → 0.15.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- argus/_version.py +2 -2
- argus/client/generic_result.py +6 -1
- {argus_alm-0.15.2.dist-info → argus_alm-0.15.3.dist-info}/METADATA +1 -1
- argus_alm-0.15.3.dist-info/RECORD +22 -0
- argus/backend/.gitkeep +0 -0
- argus/backend/__init__.py +0 -0
- argus/backend/cli.py +0 -57
- argus/backend/controller/__init__.py +0 -0
- argus/backend/controller/admin.py +0 -20
- argus/backend/controller/admin_api.py +0 -355
- argus/backend/controller/api.py +0 -589
- argus/backend/controller/auth.py +0 -67
- argus/backend/controller/client_api.py +0 -109
- argus/backend/controller/main.py +0 -316
- argus/backend/controller/notification_api.py +0 -72
- argus/backend/controller/notifications.py +0 -13
- argus/backend/controller/planner_api.py +0 -194
- argus/backend/controller/team.py +0 -129
- argus/backend/controller/team_ui.py +0 -19
- argus/backend/controller/testrun_api.py +0 -513
- argus/backend/controller/view_api.py +0 -188
- argus/backend/controller/views_widgets/__init__.py +0 -0
- argus/backend/controller/views_widgets/graphed_stats.py +0 -54
- argus/backend/controller/views_widgets/graphs.py +0 -68
- argus/backend/controller/views_widgets/highlights.py +0 -135
- argus/backend/controller/views_widgets/nemesis_stats.py +0 -26
- argus/backend/controller/views_widgets/summary.py +0 -43
- argus/backend/db.py +0 -98
- argus/backend/error_handlers.py +0 -41
- argus/backend/events/event_processors.py +0 -34
- argus/backend/models/__init__.py +0 -0
- argus/backend/models/argus_ai.py +0 -24
- argus/backend/models/github_issue.py +0 -60
- argus/backend/models/plan.py +0 -24
- argus/backend/models/result.py +0 -187
- argus/backend/models/runtime_store.py +0 -58
- argus/backend/models/view_widgets.py +0 -25
- argus/backend/models/web.py +0 -403
- argus/backend/plugins/__init__.py +0 -0
- argus/backend/plugins/core.py +0 -248
- argus/backend/plugins/driver_matrix_tests/controller.py +0 -66
- argus/backend/plugins/driver_matrix_tests/model.py +0 -429
- argus/backend/plugins/driver_matrix_tests/plugin.py +0 -21
- argus/backend/plugins/driver_matrix_tests/raw_types.py +0 -62
- argus/backend/plugins/driver_matrix_tests/service.py +0 -61
- argus/backend/plugins/driver_matrix_tests/udt.py +0 -42
- argus/backend/plugins/generic/model.py +0 -86
- argus/backend/plugins/generic/plugin.py +0 -15
- argus/backend/plugins/generic/types.py +0 -14
- argus/backend/plugins/loader.py +0 -39
- argus/backend/plugins/sct/controller.py +0 -224
- argus/backend/plugins/sct/plugin.py +0 -37
- argus/backend/plugins/sct/resource_setup.py +0 -177
- argus/backend/plugins/sct/service.py +0 -682
- argus/backend/plugins/sct/testrun.py +0 -288
- argus/backend/plugins/sct/udt.py +0 -100
- argus/backend/plugins/sirenada/model.py +0 -118
- argus/backend/plugins/sirenada/plugin.py +0 -16
- argus/backend/service/admin.py +0 -26
- argus/backend/service/argus_service.py +0 -696
- argus/backend/service/build_system_monitor.py +0 -185
- argus/backend/service/client_service.py +0 -127
- argus/backend/service/event_service.py +0 -18
- argus/backend/service/github_service.py +0 -233
- argus/backend/service/jenkins_service.py +0 -269
- argus/backend/service/notification_manager.py +0 -159
- argus/backend/service/planner_service.py +0 -608
- argus/backend/service/release_manager.py +0 -229
- argus/backend/service/results_service.py +0 -690
- argus/backend/service/stats.py +0 -610
- argus/backend/service/team_manager_service.py +0 -82
- argus/backend/service/test_lookup.py +0 -172
- argus/backend/service/testrun.py +0 -489
- argus/backend/service/user.py +0 -308
- argus/backend/service/views.py +0 -219
- argus/backend/service/views_widgets/__init__.py +0 -0
- argus/backend/service/views_widgets/graphed_stats.py +0 -180
- argus/backend/service/views_widgets/highlights.py +0 -374
- argus/backend/service/views_widgets/nemesis_stats.py +0 -34
- argus/backend/template_filters.py +0 -27
- argus/backend/tests/__init__.py +0 -0
- argus/backend/tests/client_service/__init__.py +0 -0
- argus/backend/tests/client_service/test_submit_results.py +0 -79
- argus/backend/tests/conftest.py +0 -180
- argus/backend/tests/results_service/__init__.py +0 -0
- argus/backend/tests/results_service/test_best_results.py +0 -178
- argus/backend/tests/results_service/test_cell.py +0 -65
- argus/backend/tests/results_service/test_chartjs_additional_functions.py +0 -259
- argus/backend/tests/results_service/test_create_chartjs.py +0 -220
- argus/backend/tests/results_service/test_result_metadata.py +0 -100
- argus/backend/tests/results_service/test_results_service.py +0 -203
- argus/backend/tests/results_service/test_validation_rules.py +0 -213
- argus/backend/tests/view_widgets/__init__.py +0 -0
- argus/backend/tests/view_widgets/test_highlights_api.py +0 -532
- argus/backend/util/common.py +0 -65
- argus/backend/util/config.py +0 -38
- argus/backend/util/encoders.py +0 -56
- argus/backend/util/logsetup.py +0 -80
- argus/backend/util/module_loaders.py +0 -30
- argus/backend/util/send_email.py +0 -91
- argus/client/tests/__init__.py +0 -0
- argus/client/tests/conftest.py +0 -19
- argus/client/tests/test_package.py +0 -45
- argus/client/tests/test_results.py +0 -224
- argus_alm-0.15.2.dist-info/RECORD +0 -122
- {argus_alm-0.15.2.dist-info → argus_alm-0.15.3.dist-info}/WHEEL +0 -0
- {argus_alm-0.15.2.dist-info → argus_alm-0.15.3.dist-info}/entry_points.txt +0 -0
- {argus_alm-0.15.2.dist-info → argus_alm-0.15.3.dist-info}/licenses/LICENSE +0 -0
- {argus_alm-0.15.2.dist-info → argus_alm-0.15.3.dist-info}/top_level.txt +0 -0
argus/_version.py
CHANGED
argus/client/generic_result.py
CHANGED
|
@@ -155,7 +155,7 @@ class StaticGenericResultTable(GenericResultTable):
|
|
|
155
155
|
"""Results class for static results metainformation, defined in Meta class."""
|
|
156
156
|
|
|
157
157
|
def __init__(
|
|
158
|
-
self, name=None, description=None, columns=None, sut_package_name=None, validation_rules=None
|
|
158
|
+
self, name=None, description=None, columns=None, sut_package_name=None, validation_rules=None, results=None, sut_timestamp=0
|
|
159
159
|
):
|
|
160
160
|
meta = getattr(self.__class__, "Meta")
|
|
161
161
|
super().__init__(
|
|
@@ -165,4 +165,9 @@ class StaticGenericResultTable(GenericResultTable):
|
|
|
165
165
|
sut_package_name=sut_package_name or getattr(meta, "sut_package_name", ""),
|
|
166
166
|
validation_rules=validation_rules or getattr(
|
|
167
167
|
meta, "ValidationRules", getattr(meta, "validation_rules", {})),
|
|
168
|
+
results=results or [],
|
|
169
|
+
sut_timestamp=sut_timestamp
|
|
168
170
|
)
|
|
171
|
+
|
|
172
|
+
class Meta:
|
|
173
|
+
pass
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
argus/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
argus/_version.py,sha256=PbirELW_mdGsRZ5YJl3tATepVxI3ZSPTmrkO5T21Xtw,513
|
|
3
|
+
argus/client/__init__.py,sha256=bO9_j5_jK5kvTHR46KEZ0Y-p0li7CBW8QSd-K5Ez4vA,42
|
|
4
|
+
argus/client/base.py,sha256=QlJDC-E6OXf33FtPagOuH1wWsTd9NEBJO2lBUL5eAqE,8143
|
|
5
|
+
argus/client/generic_result.py,sha256=9D0zrpfEDiIL7PjL12TZnqk5Mi_1T1UvesF5wWeMfz0,6264
|
|
6
|
+
argus/client/driver_matrix_tests/cli.py,sha256=JpI0v1hzRQr9KkrxO7D4hEbkzumexFFC_iRM8558zHU,8375
|
|
7
|
+
argus/client/driver_matrix_tests/client.py,sha256=fFucqwog6WnDnje1xB-4ERfwHXblXP4upmtt9RtOkls,2806
|
|
8
|
+
argus/client/generic/cli.py,sha256=0mTTjbeB0iDiR5kKim9JYu_0PetCHiJUf8VYvdvmLHo,4570
|
|
9
|
+
argus/client/generic/client.py,sha256=D9j2047guXO0SgkcWQSftuntvj3LtTSAxBMBr4-4v58,1915
|
|
10
|
+
argus/client/sct/client.py,sha256=q5W0RL1BhA6Foc9rA10jLsnQ7MNGWgjbmy3_E0ePjeI,11436
|
|
11
|
+
argus/client/sct/types.py,sha256=VLgVe7qPmJtCLqtPnuX8N8kMKZq-iY3SKz68nvU6nJ4,371
|
|
12
|
+
argus/client/sirenada/client.py,sha256=lzhmBFAUnvPSAJfCjeQ0L5nbp50Q0YLHwIondO9rvt4,6321
|
|
13
|
+
argus/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
|
+
argus/common/enums.py,sha256=EhTQrgedlEz5sDYJ1gFnE2eC2nc1neQCRgzOgssQvWY,749
|
|
15
|
+
argus/common/sct_types.py,sha256=csRkFdYkjLw1qaJhikW2NKvzdA1DQ1a93nwtKUB1gRs,1329
|
|
16
|
+
argus/common/sirenada_types.py,sha256=CZH2JXA1KYUj29eXYe8rIAAWdN1XPqOsDPAXvM25bVQ,698
|
|
17
|
+
argus_alm-0.15.3.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
18
|
+
argus_alm-0.15.3.dist-info/METADATA,sha256=GMIcQjxIfBHn3EBlD8JAJGMGz7HPYsiWIaD8YltMGZg,4860
|
|
19
|
+
argus_alm-0.15.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
20
|
+
argus_alm-0.15.3.dist-info/entry_points.txt,sha256=5mSBLLPndhFHKY5M9SCF8WhDBAArrj-S2IL-uoiaJiE,140
|
|
21
|
+
argus_alm-0.15.3.dist-info/top_level.txt,sha256=Pea173vTU-Et8xmNCctS34REW4cH0Xmjyiztu0HuM0c,6
|
|
22
|
+
argus_alm-0.15.3.dist-info/RECORD,,
|
argus/backend/.gitkeep
DELETED
|
File without changes
|
argus/backend/__init__.py
DELETED
|
File without changes
|
argus/backend/cli.py
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import logging
|
|
2
|
-
import click
|
|
3
|
-
from flask import Blueprint
|
|
4
|
-
from flask.cli import with_appcontext
|
|
5
|
-
from cassandra.cqlengine.management import sync_table, sync_type
|
|
6
|
-
from argus.backend.db import ScyllaCluster
|
|
7
|
-
from argus.backend.plugins.loader import all_plugin_models, all_plugin_types
|
|
8
|
-
from argus.backend.service.build_system_monitor import JenkinsMonitor
|
|
9
|
-
from argus.backend.service.github_service import GithubService
|
|
10
|
-
|
|
11
|
-
cli_bp = Blueprint("cli", __name__)
|
|
12
|
-
LOGGER = logging.getLogger(__name__)
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
@cli_bp.cli.add_command
|
|
16
|
-
@click.command('sync-models')
|
|
17
|
-
@with_appcontext
|
|
18
|
-
def sync_models_command():
|
|
19
|
-
sync_models()
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
def sync_models():
|
|
23
|
-
cluster = ScyllaCluster.get()
|
|
24
|
-
cluster.sync_core_tables()
|
|
25
|
-
LOGGER.info("Synchronizing plugin types...")
|
|
26
|
-
for user_type in all_plugin_types():
|
|
27
|
-
LOGGER.info("Synchronizing plugin type %s...", user_type.__name__)
|
|
28
|
-
sync_type(ks_name=cluster.config["SCYLLA_KEYSPACE_NAME"], type_model=user_type)
|
|
29
|
-
LOGGER.info("Synchronizing plugin models...")
|
|
30
|
-
for model in all_plugin_models(True):
|
|
31
|
-
LOGGER.info("Synchronizing plugin model %s...", model.__name__)
|
|
32
|
-
sync_table(model=model, keyspaces=[cluster.config["SCYLLA_KEYSPACE_NAME"]])
|
|
33
|
-
|
|
34
|
-
LOGGER.info("Plugins ready.")
|
|
35
|
-
click.echo("All models synchronized.")
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
def refresh_issues():
|
|
39
|
-
ScyllaCluster.get()
|
|
40
|
-
gh = GithubService()
|
|
41
|
-
gh.refresh_stale_issues()
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
@cli_bp.cli.add_command
|
|
45
|
-
@click.command('refresh-issues')
|
|
46
|
-
@with_appcontext
|
|
47
|
-
def refresh_issues_command():
|
|
48
|
-
refresh_issues()
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
@cli_bp.cli.add_command
|
|
52
|
-
@click.command('scan-jenkins')
|
|
53
|
-
@with_appcontext
|
|
54
|
-
def scan_jenkins_command():
|
|
55
|
-
monitor = JenkinsMonitor()
|
|
56
|
-
monitor.collect()
|
|
57
|
-
click.echo("Done.")
|
|
File without changes
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import logging
|
|
2
|
-
from flask import (
|
|
3
|
-
Blueprint,
|
|
4
|
-
render_template,
|
|
5
|
-
)
|
|
6
|
-
from argus.backend.controller.admin_api import bp as admin_api_bp
|
|
7
|
-
from argus.backend.service.user import login_required, check_roles
|
|
8
|
-
from argus.backend.models.web import UserRoles
|
|
9
|
-
|
|
10
|
-
bp = Blueprint('admin', __name__, url_prefix='/admin')
|
|
11
|
-
bp.register_blueprint(admin_api_bp)
|
|
12
|
-
LOGGER = logging.getLogger(__name__)
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
@bp.route("/")
|
|
16
|
-
@bp.route("/<string:path>")
|
|
17
|
-
@check_roles(UserRoles.Admin)
|
|
18
|
-
@login_required
|
|
19
|
-
def index(path: str = "index"):
|
|
20
|
-
return render_template("admin/index.html.j2", current_route=path)
|
|
@@ -1,355 +0,0 @@
|
|
|
1
|
-
import logging
|
|
2
|
-
from uuid import UUID
|
|
3
|
-
from flask import (
|
|
4
|
-
Blueprint,
|
|
5
|
-
request,
|
|
6
|
-
Request,
|
|
7
|
-
)
|
|
8
|
-
from argus.backend.error_handlers import handle_api_exception
|
|
9
|
-
from argus.backend.service.release_manager import ReleaseEditPayload, ReleaseManagerService
|
|
10
|
-
from argus.backend.service.user import UserService, api_login_required, check_roles
|
|
11
|
-
from argus.backend.models.web import User, UserRoles
|
|
12
|
-
|
|
13
|
-
bp = Blueprint('admin_api', __name__, url_prefix='/api/v1')
|
|
14
|
-
LOGGER = logging.getLogger(__name__)
|
|
15
|
-
bp.register_error_handler(Exception, handle_api_exception)
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
def get_payload(client_request: Request):
|
|
19
|
-
if not client_request.is_json:
|
|
20
|
-
raise Exception(
|
|
21
|
-
"Content-Type mismatch, expected application/json, got:", client_request.content_type)
|
|
22
|
-
request_payload = client_request.get_json()
|
|
23
|
-
|
|
24
|
-
return request_payload
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
@bp.route("/", methods=["GET"])
|
|
28
|
-
@check_roles(UserRoles.Admin)
|
|
29
|
-
@api_login_required
|
|
30
|
-
def index():
|
|
31
|
-
return {
|
|
32
|
-
"version": "v1"
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
@bp.route("/release/create", methods=["POST"])
|
|
37
|
-
@check_roles(UserRoles.Admin)
|
|
38
|
-
@api_login_required
|
|
39
|
-
def create_release():
|
|
40
|
-
payload = get_payload(request)
|
|
41
|
-
release = ReleaseManagerService().create_release(**payload)
|
|
42
|
-
|
|
43
|
-
return {
|
|
44
|
-
"status": "ok",
|
|
45
|
-
"response": {
|
|
46
|
-
"new_release": release
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
@bp.route("/release/set_perpetual", methods=["POST"])
|
|
52
|
-
@check_roles(UserRoles.Admin)
|
|
53
|
-
@api_login_required
|
|
54
|
-
def set_release_perpetual():
|
|
55
|
-
payload = get_payload(request)
|
|
56
|
-
result = ReleaseManagerService().set_release_perpetuality(**payload)
|
|
57
|
-
return {
|
|
58
|
-
"status": "ok",
|
|
59
|
-
"response": {
|
|
60
|
-
"updated": result
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
@bp.route("/release/set_state", methods=["POST"])
|
|
66
|
-
@check_roles(UserRoles.Admin)
|
|
67
|
-
@api_login_required
|
|
68
|
-
def set_release_state():
|
|
69
|
-
payload = get_payload(request)
|
|
70
|
-
result = ReleaseManagerService().set_release_state(**payload)
|
|
71
|
-
|
|
72
|
-
return {
|
|
73
|
-
"status": "ok",
|
|
74
|
-
"response": {
|
|
75
|
-
"updated": result
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
@bp.route("/release/set_dormant", methods=["POST"])
|
|
81
|
-
@check_roles(UserRoles.Admin)
|
|
82
|
-
@api_login_required
|
|
83
|
-
def set_release_dormancy():
|
|
84
|
-
payload = get_payload(request)
|
|
85
|
-
result = ReleaseManagerService().set_release_dormancy(**payload)
|
|
86
|
-
|
|
87
|
-
return {
|
|
88
|
-
"status": "ok",
|
|
89
|
-
"response": {
|
|
90
|
-
"updated": result
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
@bp.route("/release/edit", methods=["POST"])
|
|
96
|
-
@check_roles(UserRoles.Admin)
|
|
97
|
-
@api_login_required
|
|
98
|
-
def edit_release():
|
|
99
|
-
payload: ReleaseEditPayload = get_payload(request)
|
|
100
|
-
result = ReleaseManagerService().edit_release(payload)
|
|
101
|
-
|
|
102
|
-
return {
|
|
103
|
-
"status": "ok",
|
|
104
|
-
"response": {
|
|
105
|
-
"updated": result
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
@bp.route("/release/delete", methods=["POST"])
|
|
111
|
-
@check_roles(UserRoles.Admin)
|
|
112
|
-
@api_login_required
|
|
113
|
-
def delete_release():
|
|
114
|
-
payload = get_payload(request)
|
|
115
|
-
result = ReleaseManagerService().delete_release(release_id=payload["releaseId"])
|
|
116
|
-
|
|
117
|
-
return {
|
|
118
|
-
"status": "ok",
|
|
119
|
-
"response": {
|
|
120
|
-
"deleted": result
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
@bp.route("/group/create", methods=["POST"])
|
|
126
|
-
@check_roles(UserRoles.Admin)
|
|
127
|
-
@api_login_required
|
|
128
|
-
def create_group():
|
|
129
|
-
payload = get_payload(request)
|
|
130
|
-
group = ReleaseManagerService().create_group(**payload)
|
|
131
|
-
|
|
132
|
-
return {
|
|
133
|
-
"status": "ok",
|
|
134
|
-
"response": {
|
|
135
|
-
"new_group": group
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
@bp.route("/group/update", methods=["POST"])
|
|
141
|
-
@check_roles(UserRoles.Admin)
|
|
142
|
-
@api_login_required
|
|
143
|
-
def update_group():
|
|
144
|
-
payload = get_payload(request)
|
|
145
|
-
result = ReleaseManagerService().update_group(**payload)
|
|
146
|
-
return {
|
|
147
|
-
"status": "ok",
|
|
148
|
-
"response": {
|
|
149
|
-
"updated": result
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
@bp.route("/group/delete", methods=["POST"])
|
|
155
|
-
@check_roles(UserRoles.Admin)
|
|
156
|
-
@api_login_required
|
|
157
|
-
def delete_group():
|
|
158
|
-
payload = get_payload(request)
|
|
159
|
-
result = ReleaseManagerService().delete_group(**payload)
|
|
160
|
-
|
|
161
|
-
return {
|
|
162
|
-
"status": "ok",
|
|
163
|
-
"response": {
|
|
164
|
-
"deleted": result
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
@bp.route("/test/create", methods=["POST"])
|
|
170
|
-
@check_roles(UserRoles.Admin)
|
|
171
|
-
@api_login_required
|
|
172
|
-
def create_test():
|
|
173
|
-
payload = get_payload(request)
|
|
174
|
-
test = ReleaseManagerService().create_test(**payload)
|
|
175
|
-
return {
|
|
176
|
-
"status": "ok",
|
|
177
|
-
"response": {
|
|
178
|
-
"new_test": test
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
@bp.route("/test/update", methods=["POST"])
|
|
184
|
-
@check_roles(UserRoles.Admin)
|
|
185
|
-
@api_login_required
|
|
186
|
-
def update_test():
|
|
187
|
-
payload = get_payload(request)
|
|
188
|
-
result = ReleaseManagerService().update_test(**payload)
|
|
189
|
-
return {
|
|
190
|
-
"status": "ok",
|
|
191
|
-
"response": {
|
|
192
|
-
"updated": result
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
@bp.route("/test/batch_move", methods=["POST"])
|
|
198
|
-
@check_roles(UserRoles.Admin)
|
|
199
|
-
@api_login_required
|
|
200
|
-
def batch_move_tests():
|
|
201
|
-
payload = get_payload(request)
|
|
202
|
-
result = ReleaseManagerService().batch_move_tests(**payload)
|
|
203
|
-
return {
|
|
204
|
-
"status": "ok",
|
|
205
|
-
"response": {
|
|
206
|
-
"moved": result
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
@bp.route("/test/delete", methods=["POST"])
|
|
212
|
-
@check_roles(UserRoles.Admin)
|
|
213
|
-
@api_login_required
|
|
214
|
-
def delete_test():
|
|
215
|
-
payload = get_payload(request)
|
|
216
|
-
result = ReleaseManagerService().delete_test(**payload)
|
|
217
|
-
|
|
218
|
-
return {
|
|
219
|
-
"status": "ok",
|
|
220
|
-
"response": {
|
|
221
|
-
"deleted": result
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
@bp.route("/releases/get", methods=["GET"])
|
|
227
|
-
@check_roles(UserRoles.Admin)
|
|
228
|
-
@api_login_required
|
|
229
|
-
def get_releases():
|
|
230
|
-
releases = ReleaseManagerService().get_releases()
|
|
231
|
-
return {
|
|
232
|
-
"status": "ok",
|
|
233
|
-
"response": releases
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
@bp.route("/groups/get", methods=["GET"])
|
|
238
|
-
@check_roles(UserRoles.Admin)
|
|
239
|
-
@api_login_required
|
|
240
|
-
def get_groups_for_release():
|
|
241
|
-
release_id = request.args.get("releaseId")
|
|
242
|
-
if not release_id:
|
|
243
|
-
raise Exception("ReleaseId not provided in the request")
|
|
244
|
-
groups = ReleaseManagerService().get_groups(release_id=UUID(release_id))
|
|
245
|
-
|
|
246
|
-
return {
|
|
247
|
-
"status": "ok",
|
|
248
|
-
"response": groups
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
@bp.route("/tests/get", methods=["GET"])
|
|
253
|
-
@check_roles(UserRoles.Admin)
|
|
254
|
-
@api_login_required
|
|
255
|
-
def get_tests_for_group():
|
|
256
|
-
group_id = request.args.get("groupId")
|
|
257
|
-
if not group_id:
|
|
258
|
-
raise Exception("GroupId not provided in the request")
|
|
259
|
-
tests = ReleaseManagerService().get_tests(group_id=UUID(group_id))
|
|
260
|
-
return {
|
|
261
|
-
"status": "ok",
|
|
262
|
-
"response": tests
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
@bp.route("/release/test/state/toggle", methods=["POST"])
|
|
267
|
-
@check_roles(UserRoles.Admin)
|
|
268
|
-
@api_login_required
|
|
269
|
-
def quick_toggle_test_enabled():
|
|
270
|
-
|
|
271
|
-
payload = get_payload(request)
|
|
272
|
-
res = ReleaseManagerService().toggle_test_enabled(test_id=payload["entityId"], new_state=payload["state"])
|
|
273
|
-
return {
|
|
274
|
-
"status": "ok",
|
|
275
|
-
"response": res
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
@bp.route("/release/group/state/toggle", methods=["POST"])
|
|
280
|
-
@check_roles(UserRoles.Admin)
|
|
281
|
-
@api_login_required
|
|
282
|
-
def quick_toggle_group_enabled():
|
|
283
|
-
|
|
284
|
-
payload = get_payload(request)
|
|
285
|
-
res = ReleaseManagerService().toggle_group_enabled(group_id=payload["entityId"], new_state=payload["state"])
|
|
286
|
-
return {
|
|
287
|
-
"status": "ok",
|
|
288
|
-
"response": res
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
@bp.route("/users", methods=["GET"])
|
|
293
|
-
@check_roles(UserRoles.Admin)
|
|
294
|
-
@api_login_required
|
|
295
|
-
def user_info():
|
|
296
|
-
result = UserService().get_users_privileged()
|
|
297
|
-
|
|
298
|
-
return {
|
|
299
|
-
"status": "ok",
|
|
300
|
-
"response": result
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
@bp.route("/user/<string:user_id>/email/set", methods=["POST"])
|
|
305
|
-
@check_roles(UserRoles.Admin)
|
|
306
|
-
@api_login_required
|
|
307
|
-
def user_change_email(user_id: str):
|
|
308
|
-
payload = get_payload(request)
|
|
309
|
-
|
|
310
|
-
user = User.get(id=user_id)
|
|
311
|
-
result = UserService().update_email(user=user, new_email=payload["newEmail"])
|
|
312
|
-
|
|
313
|
-
return {
|
|
314
|
-
"status": "ok",
|
|
315
|
-
"response": result
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
@bp.route("/user/<string:user_id>/delete", methods=["POST"])
|
|
320
|
-
@check_roles(UserRoles.Admin)
|
|
321
|
-
@api_login_required
|
|
322
|
-
def user_delete(user_id: str):
|
|
323
|
-
result = UserService().delete_user(user_id=user_id)
|
|
324
|
-
|
|
325
|
-
return {
|
|
326
|
-
"status": "ok",
|
|
327
|
-
"response": result
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
@bp.route("/user/<string:user_id>/password/set", methods=["POST"])
|
|
332
|
-
@check_roles(UserRoles.Admin)
|
|
333
|
-
@api_login_required
|
|
334
|
-
def user_change_password(user_id: str):
|
|
335
|
-
payload = get_payload(request)
|
|
336
|
-
|
|
337
|
-
user = User.get(id=user_id)
|
|
338
|
-
result = UserService().update_password(user=user, old_password="", new_password=payload["newPassword"], force=True)
|
|
339
|
-
|
|
340
|
-
return {
|
|
341
|
-
"status": "ok",
|
|
342
|
-
"response": result
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
@bp.route("/user/<string:user_id>/admin/toggle", methods=["POST"])
|
|
347
|
-
@check_roles(UserRoles.Admin)
|
|
348
|
-
@api_login_required
|
|
349
|
-
def user_toggle_admin(user_id: str):
|
|
350
|
-
result = UserService().toggle_admin(user_id=user_id)
|
|
351
|
-
|
|
352
|
-
return {
|
|
353
|
-
"status": "ok",
|
|
354
|
-
"response": result
|
|
355
|
-
}
|