Skip to content

Commit

Permalink
Merge branch 'main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasmllr authored Feb 7, 2024
2 parents deb934a + c314beb commit de58a4a
Show file tree
Hide file tree
Showing 15 changed files with 158 additions and 155 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/merge-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
file: frontend/openshift.deploy.yml
overwrite: true
steps:
- uses: bcgov-nr/action-deployer-openshift@v2.0.0
- uses: bcgov-nr/action-deployer-openshift@v2.1.0
with:
file: ${{ matrix.file }}
oc_namespace: ${{ secrets.OC_NAMESPACE }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-close.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
matrix:
package: [frontend,rctool]
steps:
- uses: shrink/actions-docker-registry-tag@v3
- uses: shrink/actions-docker-registry-tag@v4
with:
registry: ghcr.io
repository: ${{ github.repository }}/${{ matrix.package }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
overwrite: true
parameters: -p MIN_REPLICAS=1 -p MAX_REPLICAS=1
steps:
- uses: bcgov-nr/action-deployer-openshift@v2.0.0
- uses: bcgov-nr/action-deployer-openshift@v2.1.0
with:
file: ${{ matrix.file }}
oc_namespace: ${{ secrets.OC_NAMESPACE }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
file: frontend/openshift.deploy.yml
overwrite: true
steps:
- uses: bcgov-nr/action-deployer-openshift@v2.0.0
- uses: bcgov-nr/action-deployer-openshift@v2.1.0
with:
file: ${{ matrix.file }}
oc_namespace: ${{ secrets.OC_NAMESPACE }}
Expand All @@ -44,7 +44,7 @@ jobs:
matrix:
component: [frontend, rctool]
steps:
- uses: shrink/actions-docker-registry-tag@v3
- uses: shrink/actions-docker-registry-tag@v4
with:
registry: ghcr.io
repository: ${{ github.repository }}/${{ matrix.component }}
Expand Down
12 changes: 0 additions & 12 deletions frontend/rctool/templates/rctool/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,6 @@
{% block content %}
{% endblock %}













{% block footer %}
{% endblock %}

Expand Down
4 changes: 2 additions & 2 deletions frontend/rctool/templates/rctool/components/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
</li>
</ul>
</div>
</nav>
<div class='nav-bottom'></div>
</nav>
<div class='nav-bottom'></div>
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

<form method="POST" action="." id="rcform">
{% csrf_token %}
<p style="color: #003466; margin-bottom: 3px; font-size:13.5px; font-weight:500;">segment 1</p>
<small style="color: #003466; margin-bottom: 3px; font-size:11.5px; font-weight:500;">segment 1</small>
<div style="display: flex; width: 100%; margin: 10px 0px 10px 0px;">
<div style="flex: 1; margin-right: 10px;">
<p class="text-medium">end points:</p>
<small class="text-medium">end points:</small>
</div>
<div style="flex: 3;">
<div style="display:flex">
Expand All @@ -17,15 +17,15 @@
</div>
<div style="display: flex; width: 100%; margin: 10px 0px 10px 0px;" id="offset1-panel">
<div style="flex: 1; margin-right: 10px;">
<p class="text-medium">offset:</p>
<small class="text-medium">offset:</small>
</div>
<div style="flex: 3;">
<input type="number" step="any" max="{{ max_offset }}" class="form-control form-control-sm" name="offset1" id="offset1" value="{{ offsets.0 }}" onchange="setOffset(0, this.value, '{{ max_offset }}')" style="font-size:12px;" onkeydown="return event.key != 'Enter';" data-toggle="tooltip" data-placement="top" title="segment 1 offset" required>
</div>
</div>
<div style="display: flex; width: 100%; margin: 20px 0px 5px 0px;">
<div style="flex: 1; margin-right: 10px;">
<p class="text-medium">equation:</p>
<small class="text-medium">equation:</small>
</div>
<div style="flex: 3;">
<div style="display:flex; font-size:12.5px; color:#696969;">
Expand Down Expand Up @@ -68,17 +68,17 @@
{% if n_seg > 1 %}
<div id="enter-breakpoint-field" style="display:flex; width: 100%; margin-top: 0px">
<div style="flex: 1; margin-right: 10px;">
<p class="text-medium">breakpoint:</p>
<small class="text-medium">breakpoint:</small>
</div>
<div style="flex: 3;">
<input type="number" step="any" class="form-control form-control-sm" name="breakpoint1" id="breakpoint1" value="{{ breakpoint1 }}" max="{{ breakpoint_max }}" min="{{ breakpoint_min }}" onchange="setBreakpoint1(this.value)" onkeydown="return event.key != 'Enter';" style="font-size:12px;" data-toggle="tooltip" data-placement="top" title="breakpoint">
</div>
</div>
<br>
<p style="color: #003466; margin-bottom: 3px; font-size: 13.5px; font-weight:500;">segment 2</p>
<p style="color: #003466; margin-bottom: 3px; font-size: 11.5px; font-weight:500;">segment 2</p>
<div style="display: flex; width: 100%; margin: 10px 0px 10px 0px;">
<div style="flex: 1; margin-right: 10px;">
<p class="text-medium">end points:</p>
<small class="text-medium">end points:</small>
</div>
<div style="flex: 3;">
<div style="display:flex">
Expand All @@ -91,15 +91,15 @@
</div>
<div style="display: flex; width: 100%; margin: 10px 0px 10px 0px;">
<div style="flex: 1; margin-right: 10px;">
<p class="text-medium">offset:</p>
<small class="text-medium">offset:</small>
</div>
<div style="flex: 3;">
<input type="number" step="any" max="{{ max_offset }}" class="form-control form-control-sm" name="offset2" id="offset2" value="{{ offsets.1 }}" onchange="setOffset(1, this.value, '{{ max_offset }}')" onkeydown="return event.key != 'Enter';" href="#" style="font-size:12px;" data-toggle="tooltip" data-placement="top" title="segment 2 offset" required>
</div>
</div>
<div style="display: flex; width: 100%; margin: 20px 0px 0px 0px;">
<div style="flex: 1; margin-right: 10px;">
<p class="text-medium">equation:</p>
<small class="text-medium">equation:</small>
</div>
<div style = " flex: 3;">
<div style="display:flex; font-size:12.5px; color:#696969;">
Expand All @@ -121,16 +121,16 @@
{% if n_seg > 1 %}
<div id='autofit-breakpoint-checkbox' style="display:flex; margin:0px; padding:0px;">
<input type="checkbox" id="toggle_breakpoint" name="toggle_breakpoint" onchange="" style="margin:0px; padding:0px;">
<label><p class="text-small margin-left:3px; padding-left:3px"> autofit new breakpoint</p></label>
<label><small class="text-small margin-left:3px; padding-left:3px"> autofit new breakpoint</small></label>
</div>
{% endif %}
<div style="display: flex; margin:0px; padding:0px;">
<input type="checkbox" id="toggle_weighted_fit" name="toggle_weighted_fit" onchange="" style="margin:0px; padding:0px;">
<label><p class="text-small margin-left:3px; padding-left:3px;"> autofit with weighted uncertainty</p></label>
<label><small class="text-small margin-left:3px; padding-left:3px;"> autofit with weighted uncertainty</small></label>
</div>
</div>
<div class="d-grid gap-2">
<button class="btn btn-secondary btn-block" type="submit" href="{% url 'rctool_develop_autofit' %}" onkeydown="return event.key != 'Enter';">autofit new rating curve</button>
<button class="btn btn-secondary btn-block" type="submit" href="{% url 'rctool_develop_autofit' %}" onkeydown="return event.key != 'Enter';"><small>autofit new rating curve</small></button>
</div>

</form>
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{% load static %}
{% load custom_tags %}

<!-- <div id="field" class="tabcontent">
<div class="card-body px-4 py-2" style="display: flex;">
<table class="table" id="fieldtable">
<tr class="table-header">
{% for header in table_dict.headings %}
{% if forloop.counter0 != 5 %}
<th class="table-cell">{{ header }}</th>
{% endif %}
{% endfor %}
<th class="table-cell">use point</th>
</tr>
{% for row in table_dict.data %}
<tr class="table-row">
{% for cell in row %}
{% if forloop.counter0 != 5 %}
<td class="table-cell">{{ cell }} </td>
{% endif %}
{% endfor %}
<td><input type="checkbox" id="toggle_data_point" name="toggle_data_point" checked="checked" onchange="togglePoint('{{ forloop.counter0 }}', this.checked)"></td>
</tr>
{% endfor %}
</table>
</div>
</div> -->

<div id="field" class="tabcontent">
<div class="card-body px-4 py-2" style="display: flex;">
<div class="table-container">
<table class="table" id="fieldtable">
<thead>
<tr class="table-header">
{% for header in table_dict.headings %}
{% if forloop.counter0 != 5 %}
<th class="table-cell">{{ header }}</th>
{% endif %}
{% endfor %}
<th class="table-cell">use point</th>
</tr>
</thead>
<tbody>
{% for row in table_dict.data %}
<tr class="table-row">
{% for cell in row %}
{% if forloop.counter0 != 5 %}
<td class="table-cell">{{ cell }} </td>
{% endif %}
{% endfor %}
<td><input type="checkbox" id="toggle_data_point" name="toggle_data_point" checked="checked" onchange="togglePoint('{{ forloop.counter0 }}', this.checked)"></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -1,41 +1,8 @@
{% load static %}
{% load custom_tags %}



<div class="tab">
<a class="tablinks" onclick="openTable(event, 'field')" id="defaultOpen">field</a>
<a class="tablinks" onclick="openTable(event, 'rating')">rating</a>
<a class="tablinks" onclick="openTable(event, 'compare')">compare</a>
</div>

<div id="field" class="tabcontent">
<div class="card-body py-4" style="display: flex;">
<table class="table" id="fieldtable">
<tr class="table-header">
{% for header in table_dict.headings %}
{% if forloop.counter0 != 5 %}
<th class="table-cell">{{ header }}</th>
{% endif %}
{% endfor %}
<th class="table-cell">use point</th>
</tr>
{% for row in table_dict.data %}
<tr class="table-row">
{% for cell in row %}
{% if forloop.counter0 != 5 %}
<td class="table-cell">{{ cell }} </td>
{% endif %}
{% endfor %}
<td><input type="checkbox" id="toggle_data_point" name="toggle_data_point" checked="checked" onchange="togglePoint('{{ forloop.counter0 }}', this.checked)"></td>
</tr>
{% endfor %}
</table>
</div>
</div>

<div id="rating" class="tabcontent">
<div class="card-body py-4" style="display: flex;">
<!-- <div id="rating" class="tabcontent">
<div class="card-body px-4 py-2" style="display: flex;">
{% if rc.parameters %}
<table class="table">
<tr class="table-header">
Expand Down Expand Up @@ -64,10 +31,10 @@
<p>Please set offset and select generate curve</p>
{% endif %}
</div>
</div>
</div> -->

<div id="compare" class="tabcontent">
<div class="card-body py-4">
<div class="card-body px-4 py-2">
<table class="table">
<tr class="table-header">
<th class="table-cell">segment</th>
Expand All @@ -76,6 +43,7 @@
<th class="table-cell">offset</th>
<th class="table-cell">start point</th>
<th class="table-cell">end point</th>
<th class="table-cell">RMSE</th>
<th class="table-cell"><p style="color:#9ec1a3">add curve</p></th>
<!-- <th class="table-cell">edit rating</th> -->
</tr>
Expand All @@ -87,6 +55,7 @@
<td class="table-cell"><p id="table2-segment1-offset">{{rc.parameters.0.offset}}</p></td>
<td class="table-cell"><p id="table2-endpoint-Seg1H0">{{rc.parameters.0.seg_bounds.0.0}}</p></td>
<td class="table-cell"><p id="table2-endpoint-Seg1H1">{{rc.parameters.0.seg_bounds.1.0}}</p></td>
<td class="table-cell"><p id="table1-segment1-rmse">{{rc.parameters.0.rmse}}</p></td>
<td class="table-cell"><p></p></td>
</tr>
{% endif %}
Expand All @@ -98,6 +67,7 @@
<td class="table-cell"><p id="table2-segment2-offset"> {{rc.parameters.1.offset}}</p></td>
<td class="table-cell"><p id="table2-endpoint-Seg2H0">{{rc.parameters.1.seg_bounds.0.0}}</p></td>
<td class="table-cell"><p id="table2-endpoint-Seg2H1">{{rc.parameters.1.seg_bounds.1.0}}</p></td>
<td class="table-cell"><p id="table1-segment2-rmse">{{rc.parameters.1.rmse}}</p></td>
<td class="table-cell"><p></p></td>
</tr>
{% endif %}
Expand Down Expand Up @@ -132,18 +102,15 @@
<input type="number" step="0.01" class="form-control form-control-sm" name="compareEndBounds" id="compareEndBounds" style="font-size: 12px" placeholder="" onchange="" onkeydown="return event.key != 'Enter';">
</div>
</td>
<td class="table-cell">
<div style="width: 40px;">
<p></p>
</div>
</td>
<td class="table-cell">
<button class="btn btn-success btn-sm" type="submit" href="#" onclick="addCompareCurve()" style="background-color: #9ec1a3 !important; border-color: #FFFFFF; width: 40px;" onkeydown="return event.key != 'Enter';"> + </button>
</td>
</tr>
</table>
</div>
</div>


<!--
<script>
// Get the element with id="defaultOpen" and click on it
document.getElementById("defaultOpen").click();
</script>
-->
Loading

0 comments on commit de58a4a

Please sign in to comment.