-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into TP2000-553-edit-multiple-measures
- Loading branch information
Showing
47 changed files
with
802 additions
and
232 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<env:envelope id="22001" xmlns="urn:publicid:-:DGTAXUD:TARIC:MESSAGE:1.0" xmlns:env="urn:publicid:-:DGTAXUD:GENERAL:ENVELOPE:1.0"> | ||
<env:transaction id="392602"> | ||
<env:app.message id="1"> | ||
<oub:transmission xmlns:env="urn:publicid:-:DGTAXUD:GENERAL:ENVELOPE:1.0" xmlns:oub="urn:publicid:-:DGTAXUD:TARIC:MESSAGE:1.0"> | ||
<oub:record> | ||
<oub:transaction.id>19802301</oub:transaction.id> | ||
<oub:record.code>370</oub:record.code> | ||
<oub:subrecord.code>00</oub:subrecord.code> | ||
<oub:record.sequence.number>450</oub:record.sequence.number> | ||
<oub:update.type>3</oub:update.type> | ||
<oub:quota.definition> | ||
<oub:quota.definition.sid>21830</oub:quota.definition.sid> | ||
<oub:quota.order.number.id>091528</oub:quota.order.number.id> | ||
<oub:validity.start.date>2023-01-01</oub:validity.start.date> | ||
<oub:validity.end.date>2023-12-31</oub:validity.end.date> | ||
<oub:quota.order.number.sid>2554</oub:quota.order.number.sid> | ||
<oub:volume>2550000</oub:volume> | ||
<oub:initial.volume>2550000</oub:initial.volume> | ||
<oub:measurement.unit.code>LTR</oub:measurement.unit.code> | ||
<oub:maximum.precision>3</oub:maximum.precision> | ||
<oub:critical.state>N</oub:critical.state> | ||
<oub:critical.threshold>90</oub:critical.threshold> | ||
<oub:description>Commission Implementation Regulation (EU) No 343/2011 - Opening and providing for the administration of Union tariff quotas for wines originating in Bosnia and Herzegovina | ||
L 96/12 of 9/04/2011 | ||
Increase of volumes with COMMISSION IMPLEMENTING REGULATION (EU) 2017/822 of 15 May 2017 amending Implementing Regulation (EU) No 343/2011 opening and providing for the administration of Union tariff quotas for wines originating in Bosnia and Herzegovina (see OJ L 123/1)</oub:description> | ||
</oub:quota.definition> | ||
</oub:record> | ||
</oub:transmission> | ||
</env:app.message> | ||
</env:transaction> | ||
</env:envelope> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
{% extends "layouts/layout.jinja" %} | ||
|
||
{% from "components/inset-text/macro.njk" import govukInsetText %} | ||
{% from "components/table/macro.njk" import govukTable %} | ||
|
||
|
||
{% set page_title = "Application information" %} | ||
|
||
{% block breadcrumb %} | ||
<div class="govuk-breadcrumbs"> | ||
<ol class="govuk-breadcrumbs__list"> | ||
<li class="govuk-breadcrumbs__list-item"> | ||
<a class="govuk-breadcrumbs__link" href="{{ url('home') }}">Home</a> | ||
</li> | ||
<li class="govuk-breadcrumbs__list-item"> | ||
{{ page_title }} | ||
</li> | ||
</ol> | ||
</div> | ||
{% endblock %} | ||
|
||
{% block content %} | ||
<h1 class="govuk-heading-xl"> | ||
{% block page_title %} | ||
{{ page_title }} | ||
{% endblock %} | ||
</h1> | ||
|
||
<h2 class="govuk-heading-m"> | ||
Active business rule checks | ||
</h2> | ||
|
||
{% set table_head = [ | ||
{"text": "Workbasket ID"}, | ||
{"text": "Time started"}, | ||
{"text": "Celery task ID"}, | ||
] %} | ||
{% set table_rows = [] %} | ||
|
||
{% if celery_healthy %} | ||
{% if active_checks %} | ||
{% for check in active_checks %} | ||
{{ table_rows.append([ | ||
{"text": check.workbasket_id}, | ||
{"text": check.date_time_start}, | ||
{"text": check.task_id}, | ||
]) or "" }} | ||
{% endfor %} | ||
{% else %} | ||
{{ table_rows.append([ | ||
{ | ||
"text": "No active checks.", | ||
"colspan": 3, | ||
} | ||
]) or "" }} | ||
{% endif %} | ||
{% else %} | ||
{{ table_rows.append([ | ||
{ | ||
"text": "Business rule check details are currently unavailable.", | ||
"colspan": 3, | ||
} | ||
]) or "" }} | ||
{% endif %} | ||
|
||
{{ govukTable({ | ||
"head": table_head, | ||
"rows": table_rows | ||
}) }} | ||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Generated by Django 3.1.14 on 2022-02-21 14:57 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("common", "0005_transaction_index"), | ||
("measures", "0010_add_requires_to_action_and_accepts_to_condition_code"), | ||
] | ||
|
||
operations = [] |
50 changes: 50 additions & 0 deletions
50
common/migrations/0007_auto_20221114_1040_fix_missing_current_versions.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Generated by Django 3.1.14 on 2022-02-21 14:57 | ||
|
||
from django.db import migrations | ||
|
||
|
||
def current_versions_without_tracked_models(apps): | ||
from common.models.transactions import TransactionPartition | ||
from workbaskets.validators import WorkflowStatus | ||
|
||
""":return: Queryset of tracked models with no current version, but are published, and on the correct partition.""" | ||
|
||
TrackedModel = apps.get_model("common", "TrackedModel") | ||
|
||
return ( | ||
TrackedModel.objects.select_related("version_group") | ||
.filter( | ||
version_group__current_version_id__isnull=True, | ||
) | ||
.select_related("transaction") | ||
.filter( | ||
transaction__partition=TransactionPartition.REVISION, | ||
transaction__workbasket__status=WorkflowStatus.PUBLISHED, | ||
) | ||
.order_by("transaction__order") | ||
) | ||
|
||
|
||
def fix_current_versions(apps, schemaeditor): | ||
"""Update affected models and run through in transaction order, to correctly | ||
update the missing correct current version.""" | ||
|
||
results = current_versions_without_tracked_models(apps) | ||
|
||
for result in results: | ||
version_group = result.version_group | ||
version_group.current_version_id = result.id | ||
version_group.save() | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("common", "0006_auto_20221114_1000"), | ||
] | ||
|
||
operations = [ | ||
migrations.RunPython( | ||
fix_current_versions, | ||
lambda apps, schema: None, | ||
), | ||
] |
Oops, something went wrong.