Skip to content

Commit

Permalink
Merge pull request #499 from dtcenter/issue_387_tabs
Browse files Browse the repository at this point in the history
Reorganise results tabs in METviewer UI #387
  • Loading branch information
TatianaBurek authored Oct 17, 2023
2 parents bcb6a50 + dacc311 commit 31482cd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
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

0 comments on commit 31482cd

Please sign in to comment.