From 7c744f0e657f5d3afd07365af5751876ed06b401 Mon Sep 17 00:00:00 2001 From: Nick Jungmann Date: Sun, 4 Dec 2022 18:35:28 +0100 Subject: [PATCH 1/4] Updated CPL to 2022.12.0 #140 --- kdb-bot/src/bot/bot.json | 12 ++++++------ kdb-bot/src/bot_api/bot-api.json | 4 ++-- kdb-bot/src/bot_core/bot-core.json | 4 ++-- kdb-bot/src/bot_data/bot-data.json | 4 ++-- kdb-bot/src/modules/auto_role/auto-role.json | 4 ++-- kdb-bot/src/modules/base/base.json | 4 ++-- kdb-bot/src/modules/boot_log/boot-log.json | 4 ++-- kdb-bot/src/modules/database/database.json | 4 ++-- kdb-bot/src/modules/level/level.json | 4 ++-- kdb-bot/src/modules/permission/permission.json | 4 ++-- kdb-bot/src/modules/stats/stats.json | 4 ++-- kdb-bot/src/modules/technician/technician.json | 4 ++-- kdb-bot/tools/get_version/get-version.json | 4 ++-- kdb-bot/tools/post_build/post-build.json | 4 ++-- kdb-bot/tools/set_version/set-version.json | 4 ++-- 15 files changed, 34 insertions(+), 34 deletions(-) diff --git a/kdb-bot/src/bot/bot.json b/kdb-bot/src/bot/bot.json index 2d447472..c5d29fe8 100644 --- a/kdb-bot/src/bot/bot.json +++ b/kdb-bot/src/bot/bot.json @@ -16,22 +16,22 @@ "LicenseName": "MIT", "LicenseDescription": "MIT, see LICENSE for more details.", "Dependencies": [ - "cpl-core==2022.10.0.post9", + "cpl-core==2022.12.0", "cpl-translation==2022.10.0.post2", - "cpl-query==2022.10.0.post2", - "cpl-discord==2022.10.0.post6", + "cpl-query==2022.12.0", + "cpl-discord==2022.12.0", "Flask==2.2.2", "Flask-Classful==0.14.2", "Flask-Cors==3.0.10", "PyJWT==2.6.0", "waitress==2.1.2", - "Flask-SocketIO==5.3.1", - "eventlet==0.33.1", + "Flask-SocketIO==5.3.2", + "eventlet==0.33.2", "requests-oauthlib==1.3.1", "icmplib==3.0.3" ], "DevDependencies": [ - "cpl-cli==2022.10.0" + "cpl-cli==2022.12.0" ], "PythonVersion": ">=3.10.4", "PythonPath": {}, diff --git a/kdb-bot/src/bot_api/bot-api.json b/kdb-bot/src/bot_api/bot-api.json index f82b3711..f7a9c0cc 100644 --- a/kdb-bot/src/bot_api/bot-api.json +++ b/kdb-bot/src/bot_api/bot-api.json @@ -16,10 +16,10 @@ "LicenseName": "", "LicenseDescription": "", "Dependencies": [ - "cpl-core==2022.10.0.post7" + "cpl-core==2022.12.0" ], "DevDependencies": [ - "cpl-cli==2022.10.0" + "cpl-cli==2022.12.0" ], "PythonVersion": ">=3.10.4", "PythonPath": {}, diff --git a/kdb-bot/src/bot_core/bot-core.json b/kdb-bot/src/bot_core/bot-core.json index d61ed8f2..79d93cae 100644 --- a/kdb-bot/src/bot_core/bot-core.json +++ b/kdb-bot/src/bot_core/bot-core.json @@ -16,10 +16,10 @@ "LicenseName": "MIT", "LicenseDescription": "MIT, see LICENSE for more details.", "Dependencies": [ - "cpl-core>=0.3.dev70" + "cpl-core==2022.12.0" ], "DevDependencies": [ - "cpl-cli==2022.10.0" + "cpl-cli==2022.12.0" ], "PythonVersion": ">=3.10.4", "PythonPath": {}, diff --git a/kdb-bot/src/bot_data/bot-data.json b/kdb-bot/src/bot_data/bot-data.json index 28a4657a..fc5d10f2 100644 --- a/kdb-bot/src/bot_data/bot-data.json +++ b/kdb-bot/src/bot_data/bot-data.json @@ -16,10 +16,10 @@ "LicenseName": "MIT", "LicenseDescription": "MIT, see LICENSE for more details.", "Dependencies": [ - "cpl-core>=0.3.dev70" + "cpl-core==2022.12.0" ], "DevDependencies": [ - "cpl-cli==2022.10.0" + "cpl-cli==2022.12.0" ], "PythonVersion": ">=3.10.4", "PythonPath": {}, diff --git a/kdb-bot/src/modules/auto_role/auto-role.json b/kdb-bot/src/modules/auto_role/auto-role.json index 9730a2bc..9d869df8 100644 --- a/kdb-bot/src/modules/auto_role/auto-role.json +++ b/kdb-bot/src/modules/auto_role/auto-role.json @@ -16,10 +16,10 @@ "LicenseName": "", "LicenseDescription": "", "Dependencies": [ - "cpl-core>=2022.10.0.post5" + "cpl-core==2022.12.0" ], "DevDependencies": [ - "cpl-cli==2022.10.0" + "cpl-cli==2022.12.0" ], "PythonVersion": ">=3.10.4", "PythonPath": {}, diff --git a/kdb-bot/src/modules/base/base.json b/kdb-bot/src/modules/base/base.json index 7a8a49c7..cbe8c7c0 100644 --- a/kdb-bot/src/modules/base/base.json +++ b/kdb-bot/src/modules/base/base.json @@ -16,10 +16,10 @@ "LicenseName": "", "LicenseDescription": "", "Dependencies": [ - "cpl-core>=2022.10.0.post2" + "cpl-core==2022.12.0" ], "DevDependencies": [ - "cpl-cli==2022.10.0" + "cpl-cli==2022.12.0" ], "PythonVersion": ">=3.10.4", "PythonPath": {}, diff --git a/kdb-bot/src/modules/boot_log/boot-log.json b/kdb-bot/src/modules/boot_log/boot-log.json index 6273fe84..aceea3f7 100644 --- a/kdb-bot/src/modules/boot_log/boot-log.json +++ b/kdb-bot/src/modules/boot_log/boot-log.json @@ -16,10 +16,10 @@ "LicenseName": "", "LicenseDescription": "", "Dependencies": [ - "cpl-core>=2022.10.0.post2" + "cpl-core==2022.12.0" ], "DevDependencies": [ - "cpl-cli==2022.10.0" + "cpl-cli==2022.12.0" ], "PythonVersion": ">=3.10.4", "PythonPath": {}, diff --git a/kdb-bot/src/modules/database/database.json b/kdb-bot/src/modules/database/database.json index 2954470f..79655361 100644 --- a/kdb-bot/src/modules/database/database.json +++ b/kdb-bot/src/modules/database/database.json @@ -16,10 +16,10 @@ "LicenseName": "MIT", "LicenseDescription": "MIT, see LICENSE for more details.", "Dependencies": [ - "cpl-core>=2022.10.0.post2" + "cpl-core==2022.12.0" ], "DevDependencies": [ - "cpl-cli==2022.10.0" + "cpl-cli==2022.12.0" ], "PythonVersion": ">=3.10.4", "PythonPath": {}, diff --git a/kdb-bot/src/modules/level/level.json b/kdb-bot/src/modules/level/level.json index c917e226..fef52546 100644 --- a/kdb-bot/src/modules/level/level.json +++ b/kdb-bot/src/modules/level/level.json @@ -16,10 +16,10 @@ "LicenseName": "", "LicenseDescription": "", "Dependencies": [ - "cpl-core>=2022.10.0.post7" + "cpl-core==2022.12.0" ], "DevDependencies": [ - "cpl-cli>=2022.10.1" + "cpl-cli==2022.12.0" ], "PythonVersion": ">=3.10.4", "PythonPath": {}, diff --git a/kdb-bot/src/modules/permission/permission.json b/kdb-bot/src/modules/permission/permission.json index 40642f2a..f1754590 100644 --- a/kdb-bot/src/modules/permission/permission.json +++ b/kdb-bot/src/modules/permission/permission.json @@ -16,10 +16,10 @@ "LicenseName": "", "LicenseDescription": "", "Dependencies": [ - "cpl-core>=2022.10.0.post2" + "cpl-core==2022.12.0" ], "DevDependencies": [ - "cpl-cli==2022.10.0" + "cpl-cli==2022.12.0" ], "PythonVersion": ">=3.10.4", "PythonPath": {}, diff --git a/kdb-bot/src/modules/stats/stats.json b/kdb-bot/src/modules/stats/stats.json index b4f6c717..84ac4c67 100644 --- a/kdb-bot/src/modules/stats/stats.json +++ b/kdb-bot/src/modules/stats/stats.json @@ -16,10 +16,10 @@ "LicenseName": "", "LicenseDescription": "", "Dependencies": [ - "cpl-core>=2022.10.0.post7" + "cpl-core==2022.12.0" ], "DevDependencies": [ - "cpl-cli>=2022.10.1" + "cpl-cli==2022.12.0" ], "PythonVersion": ">=3.10.4", "PythonPath": {}, diff --git a/kdb-bot/src/modules/technician/technician.json b/kdb-bot/src/modules/technician/technician.json index 9357fda8..a589a96b 100644 --- a/kdb-bot/src/modules/technician/technician.json +++ b/kdb-bot/src/modules/technician/technician.json @@ -16,10 +16,10 @@ "LicenseName": "", "LicenseDescription": "", "Dependencies": [ - "cpl-core>=2022.10.0.post7" + "cpl-core==2022.12.0" ], "DevDependencies": [ - "cpl-cli>=2022.10.0" + "cpl-cli==2022.12.0" ], "PythonVersion": ">=3.10.6", "PythonPath": {}, diff --git a/kdb-bot/tools/get_version/get-version.json b/kdb-bot/tools/get_version/get-version.json index 2dd83742..dfbff1fd 100644 --- a/kdb-bot/tools/get_version/get-version.json +++ b/kdb-bot/tools/get_version/get-version.json @@ -16,10 +16,10 @@ "LicenseName": "MIT", "LicenseDescription": "MIT, see LICENSE for more details.", "Dependencies": [ - "cpl-core==2022.10.0.post7" + "cpl-core==2022.12.0" ], "DevDependencies": [ - "cpl-cli==2022.10.0" + "cpl-cli==2022.12.0" ], "PythonVersion": ">=3.10.4", "PythonPath": {}, diff --git a/kdb-bot/tools/post_build/post-build.json b/kdb-bot/tools/post_build/post-build.json index b203f863..c12accdd 100644 --- a/kdb-bot/tools/post_build/post-build.json +++ b/kdb-bot/tools/post_build/post-build.json @@ -16,10 +16,10 @@ "LicenseName": "MIT", "LicenseDescription": "MIT, see LICENSE for more details.", "Dependencies": [ - "cpl-core>=2022.10.0.post7" + "cpl-core==2022.12.0" ], "DevDependencies": [ - "cpl-cli>=2022.10.0" + "cpl-cli==2022.12.0" ], "PythonVersion": ">=3.10.4", "PythonPath": {}, diff --git a/kdb-bot/tools/set_version/set-version.json b/kdb-bot/tools/set_version/set-version.json index 678b796a..a8c051ab 100644 --- a/kdb-bot/tools/set_version/set-version.json +++ b/kdb-bot/tools/set_version/set-version.json @@ -16,11 +16,11 @@ "LicenseName": "MIT", "LicenseDescription": "MIT, see LICENSE for more details.", "Dependencies": [ - "cpl-core==2022.10.0.post7", + "cpl-core==2022.12.0" "GitPython==3.1.27" ], "DevDependencies": [ - "cpl-cli==2022.10.0" + "cpl-cli==2022.12.0" ], "PythonVersion": ">=3.10.4", "PythonPath": {}, From eb9f5b83d51b6047b0914e4137a80817546a88bc Mon Sep 17 00:00:00 2001 From: Nick Jungmann Date: Sun, 11 Dec 2022 03:03:12 +0100 Subject: [PATCH 2/4] Changed cpl-query to "2022.12.1.post1" in "kdb-bot/src/bot/bot.json" --- kdb-bot/src/bot/bot.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kdb-bot/src/bot/bot.json b/kdb-bot/src/bot/bot.json index c5d29fe8..bdbcc3b7 100644 --- a/kdb-bot/src/bot/bot.json +++ b/kdb-bot/src/bot/bot.json @@ -18,7 +18,7 @@ "Dependencies": [ "cpl-core==2022.12.0", "cpl-translation==2022.10.0.post2", - "cpl-query==2022.12.0", + "cpl-query==2022.12.1.post1", "cpl-discord==2022.12.0", "Flask==2.2.2", "Flask-Classful==0.14.2", From b25b75e382e0f5bd11fcdcb46f972c112da71a94 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sat, 17 Dec 2022 15:26:48 +0100 Subject: [PATCH 3/4] Fixed frontend --- .../view/server/members/members-routing.module.ts | 13 ------------- .../modules/view/server/server-routing.module.ts | 8 +++----- 2 files changed, 3 insertions(+), 18 deletions(-) delete mode 100644 kdb-web/src/app/modules/view/server/members/members-routing.module.ts diff --git a/kdb-web/src/app/modules/view/server/members/members-routing.module.ts b/kdb-web/src/app/modules/view/server/members/members-routing.module.ts deleted file mode 100644 index 2daacede..00000000 --- a/kdb-web/src/app/modules/view/server/members/members-routing.module.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { NgModule } from "@angular/core"; -import { RouterModule, Routes } from "@angular/router"; -import { MembersComponent } from "./component/members/members.component"; - -const routes: Routes = [ - { path: '', component: MembersComponent }, -]; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule] -}) -export class MembersRoutingModule { } diff --git a/kdb-web/src/app/modules/view/server/server-routing.module.ts b/kdb-web/src/app/modules/view/server/server-routing.module.ts index 174266af..d7e96c59 100644 --- a/kdb-web/src/app/modules/view/server/server-routing.module.ts +++ b/kdb-web/src/app/modules/view/server/server-routing.module.ts @@ -1,11 +1,9 @@ -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; -import { ServerDashboardComponent } from './server-dashboard/server-dashboard.component'; -import { AuthGuard } from "../../shared/guards/auth/auth.guard"; +import { NgModule } from "@angular/core"; +import { RouterModule, Routes } from "@angular/router"; +import { ServerDashboardComponent } from "./server-dashboard/server-dashboard.component"; const routes: Routes = [ { path: '', component: ServerDashboardComponent }, - { path: 'members', loadChildren: () => import('./members/members.module').then(m => m.MembersModule), canActivate: [AuthGuard] }, ]; @NgModule({ From bcf71a26f0b2435649079b22b3cf56c54a4899ed Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sat, 17 Dec 2022 16:17:14 +0100 Subject: [PATCH 4/4] Fixed cpl query update --- kdb-bot/src/bot/bot.json | 2 +- kdb-bot/src/bot_api/controller/auth_controller.py | 4 ++-- .../src/bot_api/controller/discord/server_controller.py | 8 ++++---- kdb-bot/src/modules/level/level_seeder.py | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/kdb-bot/src/bot/bot.json b/kdb-bot/src/bot/bot.json index bdbcc3b7..59f1bc69 100644 --- a/kdb-bot/src/bot/bot.json +++ b/kdb-bot/src/bot/bot.json @@ -18,7 +18,7 @@ "Dependencies": [ "cpl-core==2022.12.0", "cpl-translation==2022.10.0.post2", - "cpl-query==2022.12.1.post1", + "cpl-query==2022.12.2", "cpl-discord==2022.12.0", "Flask==2.2.2", "Flask-Classful==0.14.2", diff --git a/kdb-bot/src/bot_api/controller/auth_controller.py b/kdb-bot/src/bot_api/controller/auth_controller.py index d3eb3c3e..89eaa38b 100644 --- a/kdb-bot/src/bot_api/controller/auth_controller.py +++ b/kdb-bot/src/bot_api/controller/auth_controller.py @@ -46,14 +46,14 @@ class AuthController: @Route.authorize(role=AuthRoleEnum.admin) async def get_all_users(self) -> Response: result = await self._auth_service.get_all_auth_users_async() - return jsonify(result.select(lambda x: x.to_dict())) + return jsonify(result.select(lambda x: x.to_dict()).to_list()) @Route.post(f'{BasePath}/users/get/filtered') @Route.authorize(role=AuthRoleEnum.admin) async def get_filtered_users(self) -> Response: dto: AuthUserSelectCriteria = JSONProcessor.process(AuthUserSelectCriteria, request.get_json(force=True, silent=True)) result = await self._auth_service.get_filtered_auth_users_async(dto) - result.result = result.result.select(lambda x: x.to_dict()) + result.result = result.result.select(lambda x: x.to_dict()).to_list() return jsonify(result.to_dict()) @Route.get(f'{BasePath}/users/get/') diff --git a/kdb-bot/src/bot_api/controller/discord/server_controller.py b/kdb-bot/src/bot_api/controller/discord/server_controller.py index 1c362ab9..2a6f7c1d 100644 --- a/kdb-bot/src/bot_api/controller/discord/server_controller.py +++ b/kdb-bot/src/bot_api/controller/discord/server_controller.py @@ -40,14 +40,14 @@ class ServerController: @Route.authorize(role=AuthRoleEnum.admin) async def get_all_servers(self) -> Response: result = await self._discord_service.get_all_servers() - result = result.select(lambda x: x.to_dict()) + result = result.select(lambda x: x.to_dict()).to_list() return jsonify(result) @Route.get(f'{BasePath}/get/servers-by-user') @Route.authorize async def get_all_servers_by_user(self) -> Response: result = await self._discord_service.get_all_servers_by_user() - result = result.select(lambda x: x.to_dict()) + result = result.select(lambda x: x.to_dict()).to_list() return jsonify(result) @Route.post(f'{BasePath}/get/filtered') @@ -55,11 +55,11 @@ class ServerController: async def get_filtered_servers(self) -> Response: dto: ServerSelectCriteria = JSONProcessor.process(ServerSelectCriteria, request.get_json(force=True, silent=True)) result = await self._discord_service.get_filtered_servers_async(dto) - result.result = result.result.select(lambda x: x.to_dict()) + result.result = result.result.select(lambda x: x.to_dict()).to_list() return jsonify(result.to_dict()) @Route.get(f'{BasePath}/get/') @Route.authorize async def get_server_by_id(self, id: int) -> Response: - result = await self._discord_service.get_server_by_id_async(id) + result = await self._discord_service.get_server_by_id_async(id).to_list() return jsonify(result.to_dict()) diff --git a/kdb-bot/src/modules/level/level_seeder.py b/kdb-bot/src/modules/level/level_seeder.py index 2708324c..7dcd6118 100644 --- a/kdb-bot/src/modules/level/level_seeder.py +++ b/kdb-bot/src/modules/level/level_seeder.py @@ -88,7 +88,7 @@ class LevelSeeder(DataSeederABC): if levels.where(lambda l: l.name == role.name).count() == 0: continue - new_position = position_above_levels - (levels.index(levels.where(lambda l: l.name == role.name).single()) + 1) + new_position = position_above_levels - (levels.index_of(levels.where(lambda l: l.name == role.name).single()) + 1) if new_position <= 0: new_position = 1 try: