diff --git a/misc/BreCalApi.cs b/misc/BreCalApi.cs index a025cd2..b22a83e 100644 --- a/misc/BreCalApi.cs +++ b/misc/BreCalApi.cs @@ -4833,7 +4833,7 @@ namespace BreCalClient.misc.Client { Proxy = null; UserAgent = WebUtility.UrlEncode("OpenAPI-Generator/1.0.0/csharp"); - BasePath = "https://brecaldevel.bsmd-emswe.eu"; + BasePath = "https://brecaltest.bsmd-emswe.eu"; DefaultHeaders = new ConcurrentDictionary(); ApiKey = new ConcurrentDictionary(); ApiKeyPrefix = new ConcurrentDictionary(); @@ -4841,7 +4841,7 @@ namespace BreCalClient.misc.Client { { new Dictionary { - {"url", "https://brecaldevel.bsmd-emswe.eu"}, + {"url", "https://brecaltest.bsmd-emswe.eu"}, {"description", "Development server hosted on vcup"}, } } @@ -4860,7 +4860,7 @@ namespace BreCalClient.misc.Client IDictionary defaultHeaders, IDictionary apiKey, IDictionary apiKeyPrefix, - string basePath = "https://brecaldevel.bsmd-emswe.eu") : this() + string basePath = "https://brecaltest.bsmd-emswe.eu") : this() { if (string.IsNullOrWhiteSpace(basePath)) throw new ArgumentException("The provided basePath is invalid.", "basePath"); diff --git a/misc/BreCalApi.yaml b/misc/BreCalApi.yaml index 3aa5650..1844370 100644 --- a/misc/BreCalApi.yaml +++ b/misc/BreCalApi.yaml @@ -14,7 +14,7 @@ info: name: Use at your own risk url: 'https://www.bsmd.de/license' servers: - - url: 'https://brecaldevel.bsmd-emswe.eu' + - url: 'https://brecaltest.bsmd-emswe.eu' description: Development server hosted on vcup tags: - name: user diff --git a/misc/update_1.1_to_1.2.sql b/misc/update_1.1_to_1.2.sql index 4ccc23d..b0ea427 100644 --- a/misc/update_1.1_to_1.2.sql +++ b/misc/update_1.1_to_1.2.sql @@ -2,7 +2,7 @@ -- evaluation_time: Time when the "traffic light" was last changed -- evaluation_notifications_sent: Flag to indicate if notifications were sent for the current evaluation -ALTER TABLE `bremen_calling_devel`.`shipcall` +ALTER TABLE `bremen_calling_test`.`shipcall` ADD COLUMN `evaluation_time` DATETIME NULL DEFAULT NULL AFTER `evaluation_message`, ADD COLUMN `evaluation_notifications_sent` BIT NULL AFTER `evaluation_time`, ADD COLUMN `time_ref_point` INT NULL DEFAULT 0 COMMENT 'Index of a location which is the reference point for all time value entries, e.g. berth or Geeste' AFTER `modified`; @@ -12,10 +12,10 @@ ADD COLUMN `time_ref_point` INT NULL DEFAULT 0 COMMENT 'Index of a location whic -- removed reference to participant and times and dropped unnecessary columns -- added reference to shipcall -ALTER TABLE `bremen_calling_devel`.`notification` +ALTER TABLE `bremen_calling_test`.`notification` DROP FOREIGN KEY `FK_NOT_TIMES`, DROP FOREIGN KEY `FK_NOT_PART`; -ALTER TABLE `bremen_calling_devel`.`notification` +ALTER TABLE `bremen_calling_test`.`notification` DROP COLUMN `deleted`, DROP COLUMN `acknowledged`, DROP COLUMN `participant_id`, @@ -25,10 +25,10 @@ ADD INDEX `FK_NOTIFICATION_SHIPCALL_idx` (`shipcall_id` ASC) VISIBLE, DROP INDEX `FK_NOT_PART` , DROP INDEX `FK_NOT_TIMES` ; ; -ALTER TABLE `bremen_calling_devel`.`notification` +ALTER TABLE `bremen_calling_test`.`notification` ADD CONSTRAINT `FK_NOTIFICATION_SHIPCALL` FOREIGN KEY (`shipcall_id`) - REFERENCES `bremen_calling_devel`.`shipcall` (`id`) + REFERENCES `bremen_calling_test`.`shipcall` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION; @@ -36,22 +36,22 @@ ADD CONSTRAINT `FK_NOTIFICATION_SHIPCALL` -- added notification flags -- participant reference is now mandatory -ALTER TABLE `bremen_calling_devel`.`user` +ALTER TABLE `bremen_calling_test`.`user` DROP FOREIGN KEY `FK_USER_PART`; -ALTER TABLE `bremen_calling_devel`.`user` +ALTER TABLE `bremen_calling_test`.`user` ADD COLUMN `notify_email` BIT NULL DEFAULT NULL AFTER `api_key`, ADD COLUMN `notify_whatsapp` BIT NULL DEFAULT NULL AFTER `notify_email`, ADD COLUMN `notify_signal` BIT NULL DEFAULT NULL AFTER `notify_whatsapp`, ADD COLUMN `notify_popup` BIT NULL DEFAULT NULL AFTER `notify_signal`, CHANGE COLUMN `participant_id` `participant_id` INT UNSIGNED NOT NULL ; -ALTER TABLE `bremen_calling_devel`.`user` +ALTER TABLE `bremen_calling_test`.`user` ADD CONSTRAINT `FK_USER_PART` FOREIGN KEY (`participant_id`) - REFERENCES `bremen_calling_devel`.`participant` (`id`); + REFERENCES `bremen_calling_test`.`participant` (`id`); -- History table for change tracking -CREATE TABLE `bremen_calling_devel`.`history` ( +CREATE TABLE `bremen_calling_test`.`history` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, `participant_id` INT UNSIGNED NOT NULL, `user_id` INT UNSIGNED NOT NULL, @@ -65,31 +65,31 @@ COMMENT = 'This table stores a history of changes made to shipcalls so that ever -- and foreign keys -ALTER TABLE `bremen_calling_devel`.`history` +ALTER TABLE `bremen_calling_test`.`history` ADD INDEX `FK_HISTORY_PARTICIPANT_idx` (`participant_id` ASC) VISIBLE, ADD INDEX `FK_HISTORY_SHIPCALL_idx` (`shipcall_id` ASC) VISIBLE; ; -ALTER TABLE `bremen_calling_devel`.`history` +ALTER TABLE `bremen_calling_test`.`history` ADD CONSTRAINT `FK_HISTORY_PARTICIPANT` FOREIGN KEY (`participant_id`) - REFERENCES `bremen_calling_devel`.`participant` (`id`) + REFERENCES `bremen_calling_test`.`participant` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, ADD CONSTRAINT `FK_HISTORY_SHIPCALL` FOREIGN KEY (`shipcall_id`) - REFERENCES `bremen_calling_devel`.`shipcall` (`id`) + REFERENCES `bremen_calling_test`.`shipcall` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, ADD CONSTRAINT `FK_HISTORY_USER` FOREIGN KEY (`user_id`) - REFERENCES `bremen_calling_devel`.`user` (`id`) + REFERENCES `bremen_calling_test`.`user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION; -- add additional fields to times -ALTER TABLE `bremen_calling_devel`.`times` +ALTER TABLE `bremen_calling_test`.`times` ADD COLUMN `ata` DATETIME NULL DEFAULT NULL COMMENT 'Relevant only for mooring, this field can be used to record actual ATA' AFTER `participant_type`, ADD COLUMN `atd` DATETIME NULL DEFAULT NULL COMMENT 'Relevant only for mooring, this field can be used to record actual ATD' AFTER `ata`, -ADD COLUMN `eta_interval_end` DATETIME NULL DEFAULT NULL COMMENT 'If this value is set the times are given as interval instead of a single point in time. The start time value depends on the participant type.' AFTER `atd`; +ADD COLUMN `eta_interval_end` DATETIME NULL DEFAULT NULL COMMENT 'If this value is set the times are given as interval instead of a single point in time. The start time value depends on the participant type.' AFTER `atd`, ADD COLUMN `etd_interval_end` DATETIME NULL DEFAULT NULL COMMENT 'If this value is set the times are given as interval instead of a single point in time. The start time value depends on the participant type.' AFTER `eta_interval_end`; \ No newline at end of file diff --git a/src/BreCalClient/App.config b/src/BreCalClient/App.config index 82a5b92..eb2f740 100644 --- a/src/BreCalClient/App.config +++ b/src/BreCalClient/App.config @@ -11,7 +11,7 @@ - #1D751F + #751D1F !!Bremen calling Testversion!! @@ -20,7 +20,7 @@ https://www.textbausteine.net/ - https://brecaldevel.bsmd-emswe.eu + https://brecaltest.bsmd-emswe.eu diff --git a/src/BreCalClient/BreCalClient.csproj b/src/BreCalClient/BreCalClient.csproj index 4c4c0a8..62704fd 100644 --- a/src/BreCalClient/BreCalClient.csproj +++ b/src/BreCalClient/BreCalClient.csproj @@ -13,7 +13,7 @@ Bremen calling client A Windows WPF client for the Bremen calling API. containership.ico - BreCalDevelClient + BreCalTestClient diff --git a/src/BreCalClient/Properties/PublishProfiles/ClickOnceDevelProfile.pubxml b/src/BreCalClient/Properties/PublishProfiles/ClickOnceDevelProfile.pubxml index 67235dc..319b35a 100644 --- a/src/BreCalClient/Properties/PublishProfiles/ClickOnceDevelProfile.pubxml +++ b/src/BreCalClient/Properties/PublishProfiles/ClickOnceDevelProfile.pubxml @@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. 1 - 1.2.0.1 + 1.2.0.2 True Debug True diff --git a/src/BreCalClient/Properties/PublishProfiles/ClickOnceTestProfile.pubxml b/src/BreCalClient/Properties/PublishProfiles/ClickOnceTestProfile.pubxml index c13a9b0..718f8e3 100644 --- a/src/BreCalClient/Properties/PublishProfiles/ClickOnceTestProfile.pubxml +++ b/src/BreCalClient/Properties/PublishProfiles/ClickOnceTestProfile.pubxml @@ -4,8 +4,8 @@ https://go.microsoft.com/fwlink/?LinkID=208121. --> - 0 - 1.2.0.0 + 2 + 1.2.0.2 True Debug True diff --git a/src/BreCalClient/Properties/Settings.Designer.cs b/src/BreCalClient/Properties/Settings.Designer.cs index 2e8d6de..bd1cc90 100644 --- a/src/BreCalClient/Properties/Settings.Designer.cs +++ b/src/BreCalClient/Properties/Settings.Designer.cs @@ -9,29 +9,29 @@ //------------------------------------------------------------------------------ namespace BreCalClient.Properties { - - + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.5.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { - + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - + public static Settings Default { get { return defaultInstance; } } - + [global::System.Configuration.ApplicationScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("#1D751F")] + [global::System.Configuration.DefaultSettingValueAttribute("#751D1F")] public string BG_COLOR { get { return ((string)(this["BG_COLOR"])); } } - + [global::System.Configuration.ApplicationScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("!!Bremen calling Testversion!!")] @@ -40,7 +40,7 @@ namespace BreCalClient.Properties { return ((string)(this["APP_TITLE"])); } } - + [global::System.Configuration.ApplicationScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("https://www.textbausteine.net/")] @@ -49,7 +49,7 @@ namespace BreCalClient.Properties { return ((string)(this["LOGO_IMAGE_URL"])); } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] @@ -61,16 +61,16 @@ namespace BreCalClient.Properties { this["FilterCriteria"] = value; } } - + [global::System.Configuration.ApplicationScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("https://brecaldevel.bsmd-emswe.eu")] + [global::System.Configuration.DefaultSettingValueAttribute("https://brecaltest.bsmd-emswe.eu")] public string API_URL { get { return ((string)(this["API_URL"])); } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("800")] @@ -82,7 +82,7 @@ namespace BreCalClient.Properties { this["Width"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("450")] @@ -94,7 +94,7 @@ namespace BreCalClient.Properties { this["Height"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("0")] @@ -106,7 +106,7 @@ namespace BreCalClient.Properties { this["Left"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("0")] @@ -118,7 +118,7 @@ namespace BreCalClient.Properties { this["Top"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("0")] @@ -130,7 +130,7 @@ namespace BreCalClient.Properties { this["W1Left"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("0")] @@ -142,7 +142,7 @@ namespace BreCalClient.Properties { this["W1Top"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("0")] @@ -154,7 +154,7 @@ namespace BreCalClient.Properties { this["W2Left"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("0")] @@ -166,7 +166,7 @@ namespace BreCalClient.Properties { this["W2Top"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("0")] @@ -178,7 +178,7 @@ namespace BreCalClient.Properties { this["W3Left"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("0")] @@ -190,7 +190,7 @@ namespace BreCalClient.Properties { this["W3Top"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("0")] @@ -202,7 +202,7 @@ namespace BreCalClient.Properties { this["W4Left"] = value; } } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("0")] diff --git a/src/BreCalClient/Properties/Settings.settings b/src/BreCalClient/Properties/Settings.settings index 7903ee0..d2a54f5 100644 --- a/src/BreCalClient/Properties/Settings.settings +++ b/src/BreCalClient/Properties/Settings.settings @@ -3,7 +3,7 @@ - #1D751F + #751D1F !!Bremen calling Testversion!! @@ -15,7 +15,7 @@ - https://brecaldevel.bsmd-emswe.eu + https://brecaltest.bsmd-emswe.eu 800 diff --git a/src/BreCalClient/ShipcallControl.xaml b/src/BreCalClient/ShipcallControl.xaml index 39db78b..e168878 100644 --- a/src/BreCalClient/ShipcallControl.xaml +++ b/src/BreCalClient/ShipcallControl.xaml @@ -5,7 +5,7 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:p = "clr-namespace:BreCalClient.Resources" xmlns:sets="clr-namespace:BreCalClient.Properties" - xmlns:db="clr-namespace:BreCalClient;assembly=BreCalDevelClient" + xmlns:db="clr-namespace:BreCalClient;assembly=BreCalTestClient" mc:Ignorable="d" d:DesignHeight="135" d:DesignWidth="800"> diff --git a/src/BreCalClient/ShipcallControl.xaml.cs b/src/BreCalClient/ShipcallControl.xaml.cs index 5739b7c..5516200 100644 --- a/src/BreCalClient/ShipcallControl.xaml.cs +++ b/src/BreCalClient/ShipcallControl.xaml.cs @@ -213,13 +213,13 @@ namespace BreCalClient switch (this.ShipcallControlModel?.Shipcall?.Type) { case ShipcallType.Arrival: // incoming - this.imageShipcallType.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalDevelClient;component/Resources/arrow_down_red.png")); + this.imageShipcallType.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalTestClient;component/Resources/arrow_down_red.png")); break; case ShipcallType.Departure: // outgoing - this.imageShipcallType.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalDevelClient;component/Resources/arrow_up_blue.png")); + this.imageShipcallType.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalTestClient;component/Resources/arrow_up_blue.png")); break; case ShipcallType.Shifting: // shifting - this.imageShipcallType.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalDevelClient;component/Resources/arrow_right_green.png")); + this.imageShipcallType.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalTestClient;component/Resources/arrow_right_green.png")); break; default: break; @@ -228,13 +228,13 @@ namespace BreCalClient switch(this.ShipcallControlModel?.LightMode) { case ShipcallControlModel.TrafficLightMode.GREEN: - this.imageEvaluation.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalDevelClient;component/Resources/check.png")); + this.imageEvaluation.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalTestClient;component/Resources/check.png")); break; case ShipcallControlModel.TrafficLightMode.YELLOW: - this.imageEvaluation.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalDevelClient;component/Resources/sign_warning.png")); + this.imageEvaluation.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalTestClient;component/Resources/sign_warning.png")); break; case ShipcallControlModel.TrafficLightMode.RED: - this.imageEvaluation.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalDevelClient;component/Resources/delete2.png")); + this.imageEvaluation.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalTestClient;component/Resources/delete2.png")); break; default: break; diff --git a/src/server/BreCal/__init__.py b/src/server/BreCal/__init__.py index eb832f5..3db4e41 100644 --- a/src/server/BreCal/__init__.py +++ b/src/server/BreCal/__init__.py @@ -62,7 +62,7 @@ def create_app(test_config=None): app.register_blueprint(user.bp) app.register_blueprint(history.bp) - logging.basicConfig(filename='brecaldevel.log', level=logging.DEBUG, format='%(asctime)s | %(name)s | %(levelname)s | %(message)s') + logging.basicConfig(filename='brecaltest.log', level=logging.DEBUG, format='%(asctime)s | %(name)s | %(levelname)s | %(message)s') local_db.initPool(os.path.dirname(app.instance_path)) logging.info('App started') diff --git a/src/server/BreCal/local_db.py b/src/server/BreCal/local_db.py index 85dff68..baa0499 100644 --- a/src/server/BreCal/local_db.py +++ b/src/server/BreCal/local_db.py @@ -11,7 +11,7 @@ def initPool(instancePath): try: global config_path if(config_path == None): - config_path = os.path.join(instancePath,'../../../secure/connection_data_devel.json'); + config_path = os.path.join(instancePath,'../../../secure/connection_data_test.json'); print (config_path) diff --git a/src/server/flaskapp.wsgi b/src/server/flaskapp.wsgi index 4a5f543..9dec941 100644 --- a/src/server/flaskapp.wsgi +++ b/src/server/flaskapp.wsgi @@ -2,7 +2,7 @@ import os import sys import logging -sys.path.insert(0, '/var/www/brecal_devel/src/server') +sys.path.insert(0, '/var/www/brecal_test/src/server') sys.path.insert(0, '/var/www/venv/lib/python3.10/site-packages/') import schedule