diff --git a/CHANGELOG.md b/CHANGELOG.md index 860b0715e242a1155fd99c8607af4238ab2811c0..f547f2854adf4e180d4d3c782920149876f6409f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.2.3] 2025-01-16 +### Fixed +- summary after migration is listed +### Changed +- text improvements +- code quality improvements + ## [1.2.2] 2025-01-14 ### Changed - initial page style diff --git a/app/app.py b/app/app.py index 8f9823644e545d6b2f83f53e1c6daeec8224d1f2..938d0977566dac1bdcd3657cfc6226e501f3a239 100644 --- a/app/app.py +++ b/app/app.py @@ -97,7 +97,12 @@ def index(): G1 Metacentrum OpenStack cloud</a> what cloud resources need to be migrated and <a href="https://brno.openstack.cloud.e-infra.cz" target="_blank" rel="noopener noreferrer"> G2 Metacentrum OpenStack cloud</a> needs to be visited for automatic creation of your personal project. - <BR>''' + <BR> + After cloud migration, <strong>cloud user is responsible for deletion of the + <a href="https://cloud.metacentrum.cz/" target="_blank" rel="noopener noreferrer">G1 Metacentrum OpenStack cloud</a> + project resources</strong>. Not released G1 cloud resources may be automatically removed 7 days after migration. + <BR> + ''' for box in boxes: test_resutl = box.test('State','Not exist') if not test_resutl: @@ -168,16 +173,16 @@ def select_vm_process(): @app.route('/migrate') def migrate(): - gitlab_pipeline_status = gitlab_lib.get_gitlab_pipeline(os.getenv('GITLAB_URL'),os.getenv('GITLAB_PROJECT_ID'), session['gitlab_pipeline_id']) + gitlab_pipeline_status = gitlab_lib.get_gitlab_pipeline(os.getenv('GITLAB_URL'), + os.getenv('GITLAB_PROJECT_ID'), + session['gitlab_pipeline_id']) gitlab_pipeline_status_data = gitlab_pipeline_status.json() boxes=[Box('Cloud migration was started.',[ - BoxItem('Watch process on ics gitlab ',session['gitlab_url'],tag='a'), - BoxItem('CI is in state',gitlab_pipeline_status_data['status'])]), + BoxItem('Migration process can be watched on MU ICS Gitlab ', session['gitlab_url'], tag='a'), + BoxItem('Migration (CI) job state: ', gitlab_pipeline_status_data['status'])]), ] - display_retry_button = False + display_retry_button = gitlab_pipeline_status_data['status'] in ['passed', 'failed'] retry_button_url = '/select-vm' - if gitlab_pipeline_status_data['status'] == 'passed' or gitlab_pipeline_status_data['status'] == 'failed': - display_retry_button = True return render_template('content/migrate.html', boxes=boxes, display_retry_button=display_retry_button, @@ -190,7 +195,9 @@ def get_pipeline_status(): if 'gitlab_pipeline_id' not in session: return None else: - gitlab_pipeline_status = gitlab_lib.get_gitlab_pipeline(os.getenv('GITLAB_URL'),os.getenv('GITLAB_PROJECT_ID'), session['gitlab_pipeline_id']) + gitlab_pipeline_status = gitlab_lib.get_gitlab_pipeline(os.getenv('GITLAB_URL'), + os.getenv('GITLAB_PROJECT_ID'), + session['gitlab_pipeline_id']) gitlab_pipeline_status_data = gitlab_pipeline_status.json() return gitlab_pipeline_status_data['status'] diff --git a/app/static/css/styles.css b/app/static/css/styles.css index 720587effd3d2705f1b6a845e0af5e7c49bc6b94..3ce134e616d7b0f877fb1d8cc44711939da1bb53 100644 --- a/app/static/css/styles.css +++ b/app/static/css/styles.css @@ -6229,3 +6229,6 @@ td) { .announcement a { text-decoration: underline; } +.d-flex a { + text-decoration: underline; +} diff --git a/app/static/js/migration.js b/app/static/js/migration.js index 8a1d154af53d75efcb6a947e9bee12f1cc2fb8f4..2e91e99fa7dfa882958068cbffd1d7eb9eba7c19 100644 --- a/app/static/js/migration.js +++ b/app/static/js/migration.js @@ -3,6 +3,8 @@ url: '/api/pipeline-status', method: 'GET', success: function(data) { + console.log("Fetched data: ", data); + console.log("general-status-message: ", $('#general-status-message')); // Update the HTML content with the received data if($('.migration_box').last().find('input').val() != data){ $('.migration_box').children().last().find('input').val(data) @@ -17,6 +19,7 @@ } }, error: function(jqXHR, textStatus, errorThrown) { + console.log("general-status-message: ", $('#general-status-message')); console.error("Error fetching data: ", textStatus, errorThrown); } });