Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorganise results tabs in METviewer UI #387 #499

Merged
merged 1 commit into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions webapp/metviewer/js/metviewer_common.js
Original file line number Diff line number Diff line change
Expand Up @@ -7333,17 +7333,18 @@ function updateResult(result) {
document.getElementById('plot_sql').innerHTML = "";
}
});

$.ajax({
type: "GET",
url: urlOutput + "scripts/" + resultName + ".R",
url: urlOutput + "data/" + resultName + ".yaml",
dataType: "text",
contentType: 'text/plain',
mimeType: 'text',
complete: function (data) {
document.getElementById('r_script').innerHTML = (data.responseText).replace(/\n/g, '<br />');
document.getElementById('plot_yaml').innerHTML = (data.responseText).replace(/\n/g, '<br />');
},
error: function () {
document.getElementById('r_script').innerHTML = "";
document.getElementById('plot_yaml').innerHTML = "";
}
});
$.ajax({
Expand All @@ -7361,7 +7362,7 @@ function updateResult(result) {
});

$('#ui-tabs-1').empty();
$("#r_data_url").prop("href", urlOutput + "data/" + resultName + ".data");
$("#plot_data_url").prop("href", urlOutput + "data/" + resultName + ".data");
$("#y1_points_url").prop("href", urlOutput + "data/" + resultName + ".points1");
$("#y2_points_url").prop("href", urlOutput + "data/" + resultName + ".points2");

Expand Down
4 changes: 2 additions & 2 deletions webapp/metviewer/js/metviewer_common.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions webapp/metviewer/metviewer1.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,8 @@
<li><a href="#plot_image" id="plot_image_url">Plot</a></li>
<li><a href="#plot_xml" id="plot_xml_url" >XML</a></li>
<li><a href="#plot_log" id="plot_log_url" >Log</a></li>
<li><a href="#r_script" id="r_script_url" >R script</a></li>
<li><a id="r_data_url" href="R_work/data/.data" onerror="alert(1)" type="text/plain" >R data</a></li>
<li><a href="#plot_yaml" id="plot_yaml_url" >Plot config</a></li>
<li><a id="plot_data_url" href="R_work/data/.data" onerror="alert(1)" type="text/plain" >Plot data</a></li>
<li><a href="#plot_sql" id="plot_sql_url">SQL</a></li>
<li><a id="y1_points_url" href="R_work/data/.points1" type="text/plain" >Y1 Points</a></li>
<li><a id="y2_points_url" href="R_work/data/.points2" type="text/plain" >Y2 Points</a></li>
Expand All @@ -370,12 +370,11 @@

<div id="plot_log">
</div>
<div id="r_script">
<div id="plot_yaml">
</div>
<div id="r_data">
<div id="plot_data">
</div>
<div id="plot_sql">

</div>
<div id="y1_points">

Expand Down