Skip to content

Commit

Permalink
development env path update
Browse files Browse the repository at this point in the history
  • Loading branch information
SoniaRuiz committed Jan 27, 2021
1 parent 70f93d6 commit 14c5c60
Show file tree
Hide file tree
Showing 12 changed files with 81 additions and 160 deletions.
Binary file modified .vs/CoExp_Web/v16/.suo
Binary file not shown.
3 changes: 2 additions & 1 deletion Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ public class Program
public static void Main(string[] args)
{
CreateWebHostBuilder(args)
.UseEnvironment("Private")
//Change here the environment. Possible values: "Production", "Development", "Private", "Docker"
.UseEnvironment("Development")
.Build()
.Run();
}
Expand Down
9 changes: 2 additions & 7 deletions Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,7 @@ public void ConfigureServices(IServiceCollection services)

services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);

//if (env.IsDevelopment() || env.IsEnvironment("Private"))
//{
//Add trailing slash to the end
services.Configure<RouteOptions>(options => options.AppendTrailingSlash = true);

//}
//services.Configure<RouteOptions>(options => options.AppendTrailingSlash = true);


//services.AddSingleton<IEmailConfiguration>(Configuration.GetSection("EmailConfiguration").Get<EmailConfiguration>());
Expand All @@ -79,7 +74,7 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env)
}
else if (env.IsDevelopment())
{
app.UsePathBase("/coexp_test/");
app.UsePathBase("/coexp_test");
app.UseHttpsRedirection();
}
else if (env.IsEnvironment("Docker"))
Expand Down
144 changes: 72 additions & 72 deletions Views/Run/Catalogue.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@
<h5>Please, click the button below to download the gene list of this module:</h5>
<button id="get_gene_list" type="button" class="btn btn-info">Get Gene List</button>
</div>

<div id="menu_data">
@*<h4>Please, make your selection:</h4>
<hr class="menu-hr" />*@

<div id="step1">
<span class="fa-li" data-toggle="tooltip"
Expand All @@ -39,7 +38,6 @@
</span><p class="fa-li-p" for="category_dropdown">Category:</p>

<select id="category_dropdown" name="category" class="selectpicker" title="Select an option ...">
@*<option></option>*@
</select>
</div><br>

Expand Down Expand Up @@ -71,16 +69,19 @@
</div>

<hr class="menu-hr" />

<div id="step4">
<button id="send_button" class="btn btn-primary">Accept</button>
</div>
</div>
</div>

<div id="step5" class="col-md-9">

<div id="empty-initial-results">
<p>Your results will appear here.</p>
</div>

<!-- Nav tabs -->
<ul id="tabs" class="nav nav-tabs" style="display:none">
<li class="active"><a href="#tab1" data-toggle="tab">Ontology view</a></li>
Expand Down Expand Up @@ -122,18 +123,15 @@
<h5>The webmaster has already been informed about this error and it will be sorted shortly. <br />Please, try again later.</h5>
</div>

@*<div id="error">
<br>
<h4>Please, select a module selection type.</h4>
<br>
</div>*@
</div>
<div class="loading_layer"><!-- loading layer --></div>

</div>
@section HeadStyles{

}
@section Scripts{

<script type="text/javascript">
// Turn active current menu's option
$(".nav-item").find(".active").removeClass("active");
Expand All @@ -142,7 +140,11 @@


<script type="text/javascript">
$(document).ready(function () {
// Initiate the tooltips
$('[data-toggle="tooltip"]').tooltip()
$("[data-placement='bottom']").popover();
Expand All @@ -161,77 +163,75 @@
API.prototype.menuInit(11);
}
});
function startIntro(){
var intro = introJs();
intro.setOptions({
disableInteraction: true,
steps: [
{
element: '#step1',
intro: "<p><b>Category</b></p><p>Please, select here a category of co-expression networks.<br/><br/>It has been pre-selected the <b>'10UKBEC'</b> category. For further information about the networks, please visit the <a href='@Url.Action("Datasets", "Run")' target='_blank'>Datasets</a> section.</p>",
position: 'right',
scrollTo: 'tooltip'
},
{
element: '#step2',
intro: "<b>Network</b><br/><br/>These are all gene co-expression networks that belong to the category selected in the previous step.<br/><br/>It has been pre-selected the <b>'SNIG'</b> network. For further information about the networks, please visit the <a href='@Url.Action("Datasets", "Run")' target='_blank'>Datasets</a> section.</p>",
position: 'right'
},
{
element: '#step3',
intro: "<b>Show results by...</b><br/><br/>These are the different types of results that can be retrieved in this query.<br/><br/>Only the <b>'Gene Ontology'</b> view has been pre-selected by default. You can select only one or both views.",
position: 'right'
},
{
element: '#step4',
intro: "<b>Accept</b><br/><br/>Once you are ready, press this button to submit your query.",
position: 'right'
},
{
element: '#step5',
intro: "<b>Results</b><br/><br/>This is the results area.",
position: 'bottom'
}
]
});
intro.onbeforechange(function (targetElement) {
// Code for the initial tour (i.e. the aid)
function startIntro(){
var intro = introJs();
intro.setOptions({
disableInteraction: true,
steps: [
{
element: '#step1',
intro: "<p><b>Category</b></p><p>Please, select here a category of co-expression networks.<br/><br/>It has been pre-selected the <b>'10UKBEC'</b> category. For further information about the networks, please visit the <a href='@Url.Action("Datasets", "Run")' target='_blank'>Datasets</a> section.</p>",
position: 'right',
scrollTo: 'tooltip'
},
{
element: '#step2',
intro: "<b>Network</b><br/><br/>These are all gene co-expression networks that belong to the category selected in the previous step.<br/><br/>It has been pre-selected the <b>'SNIG'</b> network. For further information about the networks, please visit the <a href='@Url.Action("Datasets", "Run")' target='_blank'>Datasets</a> section.</p>",
position: 'right'
},
{
element: '#step3',
intro: "<b>Show results by...</b><br/><br/>These are the different types of results that can be retrieved in this query.<br/><br/>Only the <b>'Gene Ontology'</b> view has been pre-selected by default. You can select only one or both views.",
position: 'right'
},
{
element: '#step4',
intro: "<b>Accept</b><br/><br/>Once you are ready, press this button to submit your query.",
position: 'right'
},
{
element: '#step5',
intro: "<b>Results</b><br/><br/>This is the results area.",
position: 'bottom'
}
]
});
intro.onbeforechange(function (targetElement) {
if (targetElement.id == "step2" && $("#category_dropdown").val() == "10UKBEC") {
$('#network_dropdown').val('SNIG').change();
$('#network_dropdown')
.prop("disabled", false)
.selectpicker('refresh');
}
if (targetElement.id == "step3") {
$('#view_selection').val('1').change();
$('#view_selection')
.selectpicker('refresh');
}
});
if (targetElement.id == "step2" && $("#category_dropdown").val() == "10UKBEC") {
$('#network_dropdown').val('SNIG').change();
$('#network_dropdown')
.prop("disabled", false)
.selectpicker('refresh');
}
if (targetElement.id == "step3") {
$('#view_selection').val('1').change();
$('#view_selection')
.selectpicker('refresh');
}
});
var doneTourCatalogue = sessionStorage.getItem('EventTourCatalogue') === 'Completed';
if (doneTourCatalogue) {
return;
}
else {
if (environment != "ATN_5843218Gt") {
intro.start();
var doneTourCatalogue = sessionStorage.getItem('EventTourCatalogue') === 'Completed';
if (doneTourCatalogue) {
return;
}
else {
if (environment != "ATN_5843218Gt") {
intro.start();
intro.oncomplete(function () {
sessionStorage.setItem('EventTourCatalogue', 'Completed');
});
intro.oncomplete(function () {
sessionStorage.setItem('EventTourCatalogue', 'Completed');
});
intro.onexit(function () {
sessionStorage.setItem('EventTourCatalogue', 'Completed');
});
intro.onexit(function () {
sessionStorage.setItem('EventTourCatalogue', 'Completed');
});
}
}
}
}
}
</script>
}
2 changes: 1 addition & 1 deletion obj/CoExp_Web.csproj.nuget.dgspec.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
],
"assetTargetFallback": true,
"warn": true,
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.101\\RuntimeIdentifierGraph.json"
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.102\\RuntimeIdentifierGraph.json"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion obj/CoExp_Web.csproj.nuget.g.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\skgtsg0\.nuget\packages\;C:\Program Files\dotnet\sdk\NuGetFallbackFolder</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">5.8.0</NuGetToolVersion>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">5.8.1</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="$([MSBuild]::EnsureTrailingSlash($(NuGetPackageFolders)))" />
Expand Down
Binary file modified obj/Debug/netcoreapp2.1/CoExp_Web.Views.dll
Binary file not shown.
Binary file modified obj/Debug/netcoreapp2.1/CoExp_Web.csprojAssemblyReference.cache
Binary file not shown.
Binary file modified obj/Debug/netcoreapp2.1/CoExp_Web.dll
Binary file not shown.
Binary file modified obj/Debug/netcoreapp2.1/CoExp_Web.pdb
Binary file not shown.
2 changes: 1 addition & 1 deletion obj/project.assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -12603,7 +12603,7 @@
],
"assetTargetFallback": true,
"warn": true,
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.101\\RuntimeIdentifierGraph.json"
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.102\\RuntimeIdentifierGraph.json"
}
}
}
Expand Down
79 changes: 2 additions & 77 deletions wwwroot/js/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,23 +253,7 @@ API.prototype.menuInit = function (view) {
$('#send_button').on('click', function () {
API.prototype.sendButtonFunction(view);
});
//When the user press the 'Save Plot' button (in 'Plot' view):
//$('#save_plot').on('click', function () {

// var blob = new Blob(["Hello, world!"], { type: "text/plain;charset=utf-8" });
// saveAs(blob, "hello world.txt");
// //var b64key = 'base64,';
// //var b64 = cy.png().substring( cy.png().indexOf(b64key) + b64key.length );
// //var imgBlob = base64ToBlob(b64, 'image/png');

// //saveAs(imgBlob, 'graph.png');
//});
////When the user press the 'Save Data' button (in 'Plot' view):
//$('#save_data').on('click', function () {
// var jsonBlob = new Blob([JSON.stringify(cy.json())], { type: 'application/javascript;charset=utf-8' });

// saveAs(jsonBlob, 'graph.json');
//});

// Add event listener for opening and closing table details
$('#goFromTissue_table').on('click', 'td.details-control', function () {
Expand Down Expand Up @@ -535,6 +519,7 @@ API.prototype.getModuleTOMGenes = function (category, network, module) {
});
}
}

/**
* This function requests all data in a tree-menu format and fills it.
*/
Expand Down Expand Up @@ -1766,8 +1751,7 @@ API.prototype.hideRowsReportOnGenes = function (d, tr, row, id) {/* Formatting f
* @param {string} term Gene name.
*/
API.prototype.getCardData = function (term) {



let url = '/' + environment + '/API/GetInfoFromQuickGO';

$.ajax({
Expand Down Expand Up @@ -1875,29 +1859,6 @@ API.prototype.generateGraph = function () {
}
}

///**
// * Function to download the plot's raw data. The data is downloaded using a xlsx file.
// */
//API.prototype.downloadSVGData = function () {

// /* make the worksheet */
// const ws = XLSX.utils.json_to_sheet(SVGData.nodes, { header: Object.keys(SVGData.nodes[1]) })

// /* add to workbook */
// const wb = XLSX.utils.book_new();
// XLSX.utils.book_append_sheet(wb, ws, "CoExpData");

// const category = $('#category_dropdown').find(":selected").val();
// const network = $('#network_dropdown').find(":selected").val();
// const moduleColor = $('#module_dropdown').find(":selected").val();
// const top = $('#text-box_genes-range').val();
// var dt = new Date();
// var time = dt.getDay() + "-" + dt.getMonth() + "-" + dt.getFullYear()
// const fileName = category + '_' + network + '_' + moduleColor + '_' + top + 'genes_' + time + '.xlsx';

// /* generate an XLSX file */
// XLSX.writeFile(wb, fileName);
//}

API.prototype.getMM = function (network, category, module) {

Expand Down Expand Up @@ -1965,42 +1926,6 @@ API.prototype.getMM = function (network, category, module) {
});
}

//API.prototype.sendFeedback = function() {

// let comments = $("#feedback_comments").val();
// let grade_experience = $('input[name=feedback_radio]:checked').val()
// let name_feedback = $('#feedback_name').val()
// let email_feedback = $('#feedback_email').val()
// var email_regex = /^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;

// if (name_feedback == "") {
// alert("Please, introduce your name.")
// } else if (email_feedback == "") {
// alert("Please, introduce your email.")
// } else if (comments == "") {
// alert("Please, introduce your comments.")
// } else if (!email_regex.test(email_feedback)) {
// alert("You have entered an invalid e-mail address. Please, try it again.")
// } else {

// //Make a request to CoExp-R-software's API
// $.ajax({
// url: '/' + environment + '/API/SendFeedback?Name=' + name_feedback + '&Address=' + email_feedback
// +'&Subject=CoExp_Feedback&Content=' + comments + '&LevelSatisfaction=' + grade_experience,
// type: 'GET',
// success: function (data) {
// alert("Your feedback has been successfully sent! Thanks for taking the time to provide it!\n")
// $("#close_feedback").trigger("click")
// },
// error: function (data) {
// //If an error occurs:
// alert("Sorry, an error has occurred. You may have entered an invalid e-mail address. Please, try it again.")
// console.log(data);
// }
// });
// }
//};

API.prototype.arrayDiff = function (array1, array2) {
var ret = [];
for (var i in array1) {
Expand Down

0 comments on commit 14c5c60

Please sign in to comment.