export to variable in js first works
This commit is contained in:
parent
b00d0e937d
commit
4547400137
|
@ -134,6 +134,7 @@
|
||||||
<Content Include="cluster_dependencies\bootstrap\css\bootstrap.min.css.map" />
|
<Content Include="cluster_dependencies\bootstrap\css\bootstrap.min.css.map" />
|
||||||
<Content Include="cluster_dependencies\alchemy\testdata\contrib.json" />
|
<Content Include="cluster_dependencies\alchemy\testdata\contrib.json" />
|
||||||
<Content Include="cluster_dependencies\Blueprint.json" />
|
<Content Include="cluster_dependencies\Blueprint.json" />
|
||||||
|
<Content Include="cluster_dependencies\alchemy\testdata\cluster.json" />
|
||||||
<None Include="packages.config" />
|
<None Include="packages.config" />
|
||||||
<None Include="Web.Debug.config">
|
<None Include="Web.Debug.config">
|
||||||
<DependentUpon>Web.config</DependentUpon>
|
<DependentUpon>Web.config</DependentUpon>
|
||||||
|
|
|
@ -10,8 +10,7 @@
|
||||||
<link rel="stylesheet" type="text/css" href="cluster_dependencies/alchemy/alchemy.css" />
|
<link rel="stylesheet" type="text/css" href="cluster_dependencies/alchemy/alchemy.css" />
|
||||||
<link rel="stylesheet" type="text/css" href="cluster_dependencies/alchemy/styles/vendor.css" />
|
<link rel="stylesheet" type="text/css" href="cluster_dependencies/alchemy/styles/vendor.css" />
|
||||||
<link rel="stylesheet" type="text/css" href="cluster_dependencies/bootstrap/css/bootstrap.css" />
|
<link rel="stylesheet" type="text/css" href="cluster_dependencies/bootstrap/css/bootstrap.css" />
|
||||||
<script type="text/javascript" src="cluster_dependencies/jquery/jquery-3.3.1.min.js"></script>
|
<script type="text/javascript" src="cluster_dependencies/jquery/jquery-3.3.1.min.js"></script>
|
||||||
<script type="text/javascript" src="~/Scripts/jquery-1.10.2.intellisense.js"></script>
|
|
||||||
<script type="text/javascript" src="cluster_dependencies/lodash/lodash.js"></script>
|
<script type="text/javascript" src="cluster_dependencies/lodash/lodash.js"></script>
|
||||||
<script type="text/javascript" src="cluster_dependencies/bootstrap/js/bootstrap.bundle.js"></script>
|
<script type="text/javascript" src="cluster_dependencies/bootstrap/js/bootstrap.bundle.js"></script>
|
||||||
<%--<script type="text/javascript" src="cluster_dependencies/d3/d3.min.js"></script>--%>
|
<%--<script type="text/javascript" src="cluster_dependencies/d3/d3.min.js"></script>--%>
|
||||||
|
@ -20,55 +19,13 @@
|
||||||
<%--<script type="text/javascript" src="cluster_dependencies/alchemy/alchemy.min.js"></script>--%>
|
<%--<script type="text/javascript" src="cluster_dependencies/alchemy/alchemy.min.js"></script>--%>
|
||||||
<script type="text/javascript" src="cluster_dependencies/alchemy/scripts/vendor.js"></script>
|
<script type="text/javascript" src="cluster_dependencies/alchemy/scripts/vendor.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<%--diese habe ich versucht nachzustellen:--%>
|
|
||||||
<%--https://codereview.stackexchange.com/questions/3208/making-a-simple-call-to-a-server--%>
|
|
||||||
<%--https://stackoverflow.com/questions/8703317/troubleshooting-jquery-ajax-call-using-generic-handler-in-asp-net--%>
|
|
||||||
<%--https://codepedia.info/jquery-ajax-json-example-asp-net-sql-database/--%>
|
|
||||||
|
|
||||||
<%-- <script type="text/javascript">
|
|
||||||
$(function () {
|
|
||||||
$("#myButton").on("click", function (e) {
|
|
||||||
console.log("inside_myButton_onClick");
|
|
||||||
e.preventDefault();
|
|
||||||
var aData= [];
|
|
||||||
aData[0] = $("#ddlSelectYear").val();
|
|
||||||
$("#contentHolder").empty();
|
|
||||||
var jsonData = JSON.stringify({ aData:aData});
|
|
||||||
$.ajax({
|
|
||||||
type: "POST",
|
|
||||||
//getListOfCars is my webmethod
|
|
||||||
url: "ClusterService.asmx.cs",
|
|
||||||
data: jsonData,
|
|
||||||
contentType: "application/json; charset=utf-8",
|
|
||||||
dataType: "json", // dataType is json format
|
|
||||||
success: OnSuccess,
|
|
||||||
error: OnErrorCall
|
|
||||||
});
|
|
||||||
function OnSuccess(response) {
|
|
||||||
console.log("inside_myButton_onSuccess");
|
|
||||||
console.log(response.d);
|
|
||||||
}
|
|
||||||
function OnErrorCall(response) {
|
|
||||||
console.log("inside_myButton_onErrorCall");
|
|
||||||
console.log(error);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>--%>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<form id="form1" runat="server">
|
<form id="form1" runat="server">
|
||||||
<div>
|
<div>
|
||||||
<h1>EHEC Clusteranalysis</h1>
|
<h1>EHEC Clusteranalysis</h1>
|
||||||
</div>
|
</div>
|
||||||
<%--<select id="ddlSelectYear">
|
|
||||||
<option>2014</option>
|
|
||||||
<option>2015</option>
|
|
||||||
</select>
|
|
||||||
<button id="myButton" style="color:DodgerBlue;font-weight:bold;height:45px;width:150px;">Get Cluster Data</button>
|
|
||||||
<div id="contentHolder"></div>--%>
|
|
||||||
<asp:Button
|
<asp:Button
|
||||||
ID="Button1"
|
ID="Button1"
|
||||||
runat="server"
|
runat="server"
|
||||||
|
@ -83,11 +40,9 @@
|
||||||
<div class="alchemy" id="alchemy"></div>
|
<div class="alchemy" id="alchemy"></div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
//$url = "@C:\Users\Public\Documents\cluster.json"";
|
var htmlClusterData = <%=Clusterdata%>;
|
||||||
//$json = file_get_contents($url);
|
|
||||||
//$data = json_decode($json);
|
|
||||||
var config = {
|
var config = {
|
||||||
dataSource: "<%=Clusterdata%>",
|
dataSource: htmlClusterData, <%-- /cluster_dependencies/alchemy/testdata/cluster.json --%> <%-- <%=Clusterdata%> --%>
|
||||||
forceLocked: true,
|
forceLocked: true,
|
||||||
graphHeight: function(){ return 800; },
|
graphHeight: function(){ return 800; },
|
||||||
graphWidth: function(){ return 800; },
|
graphWidth: function(){ return 800; },
|
||||||
|
@ -100,9 +55,6 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
nodeMouseOver: 'fun_fact',
|
nodeMouseOver: 'fun_fact',
|
||||||
//nodeCaption: function(node){
|
|
||||||
// return node.caption + " _ " + node.fun_fact;
|
|
||||||
//}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -20,15 +20,8 @@ namespace EHEC_Server
|
||||||
ContractResolver = new CamelCasePropertyNamesContractResolver()
|
ContractResolver = new CamelCasePropertyNamesContractResolver()
|
||||||
};
|
};
|
||||||
var Json = JObject.FromObject(GetCluster(), serializer);
|
var Json = JObject.FromObject(GetCluster(), serializer);
|
||||||
//ClusterPatient p = new ClusterPatient();
|
|
||||||
//List<ClusterPatient> clusterPatientsList = new List<ClusterPatient>();
|
|
||||||
//clusterPatientsList = p.GetClusterPatients();
|
|
||||||
//ClusterResult r = new ClusterResult();
|
|
||||||
//List<ClusterResult> clusterResultsList = new List<ClusterResult>();
|
|
||||||
//clusterResultsList = r.GetClusterResults();
|
|
||||||
System.IO.File.WriteAllText(@"C: \Users\novski\Desktop\cluster.json", JsonConvert.SerializeObject(Json));
|
System.IO.File.WriteAllText(@"C: \Users\novski\Desktop\cluster.json", JsonConvert.SerializeObject(Json));
|
||||||
return Json; //= JsonConverter.Serialize(clusterPatientsList);
|
return Json;
|
||||||
|
|
||||||
}
|
}
|
||||||
private ClusterModel GetCluster()
|
private ClusterModel GetCluster()
|
||||||
{
|
{
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
{"comment":"some comment","nodes":[{"id":1,"name":"North Enricoshire","nodetype":"origin"},{"id":2,"name":"Martinashire","nodetype":"origin"},{"id":3,"name":"West Rolfside","nodetype":"origin"},{"id":4,"name":"Lake Jeanbury","nodetype":"origin"},{"id":5,"name":"East Roberto","nodetype":"origin"},{"id":6,"name":"Hotzville","nodetype":"origin"},{"id":7,"name":"Schulerstad","nodetype":"origin"},{"id":8,"name":"Gérardmouth","nodetype":"origin"},{"id":9,"name":"East Suzannemouth","nodetype":"origin"},{"id":10,"name":"North Karlville","nodetype":"origin"},{"id":11,"name":"Erichside","nodetype":"origin"},{"id":12,"name":"West Toniberg","nodetype":"origin"},{"id":1,"name":"Andreas Zingg","nodetype":"patient"},{"id":2,"name":"Adrien Howald","nodetype":"patient"},{"id":3,"name":"Ivan Howald","nodetype":"patient"},{"id":4,"name":"Stefan Howald","nodetype":"patient"},{"id":5,"name":"Adrien Schär","nodetype":"patient"},{"id":6,"name":"Michael Meister","nodetype":"patient"},{"id":7,"name":"Adrien Feldmann","nodetype":"patient"},{"id":8,"name":"Andreas Zingg","nodetype":"patient"},{"id":9,"name":"Ivan Schär","nodetype":"patient"},{"id":10,"name":"Adrien Feldmann","nodetype":"patient"},{"id":11,"name":"Jacqueline Leu","nodetype":"patient"},{"id":12,"name":"Petra Vogt","nodetype":"patient"},{"id":13,"name":"Anne Egli","nodetype":"patient"},{"id":14,"name":"Stefan Zingg","nodetype":"patient"},{"id":15,"name":"Andreas Aebi","nodetype":"patient"},{"id":16,"name":"Stefan Howald","nodetype":"patient"},{"id":17,"name":"Ivan Schär","nodetype":"patient"},{"id":18,"name":"Andreas Meister","nodetype":"patient"},{"id":19,"name":"Adrien Zingg","nodetype":"patient"},{"id":20,"name":"Michael Howald","nodetype":"patient"},{"id":21,"name":"Andreas Feldmann","nodetype":"patient"},{"id":22,"name":"Stefan Schär","nodetype":"patient"},{"id":23,"name":"Adrien Zingg","nodetype":"patient"},{"id":24,"name":"Adrien Aebi","nodetype":"patient"},{"id":25,"name":"Ivan Howald","nodetype":"patient"},{"id":26,"name":"Stefan Meister","nodetype":"patient"},{"id":27,"name":"Michael Feldmann","nodetype":"patient"},{"id":28,"name":"Andreas Schär","nodetype":"patient"},{"id":29,"name":"Ivan Schär","nodetype":"patient"},{"id":30,"name":"Andreas Eberhard","nodetype":"patient"},{"id":31,"name":"Michael Feldmann","nodetype":"patient"},{"id":32,"name":"Michael Feldmann","nodetype":"patient"},{"id":33,"name":"Michael Meister","nodetype":"patient"},{"id":34,"name":"Stefan Feldmann","nodetype":"patient"},{"id":35,"name":"Stefan Meister","nodetype":"patient"},{"id":36,"name":"Andreas Feldmann","nodetype":"patient"},{"id":37,"name":"Adrien Meister","nodetype":"patient"},{"id":38,"name":"Adrien Feldmann","nodetype":"patient"},{"id":39,"name":"Ivan Meister","nodetype":"patient"},{"id":40,"name":"Adrien Zingg","nodetype":"patient"},{"id":41,"name":"Andreas Zingg","nodetype":"patient"},{"id":42,"name":"Ivan Aebi","nodetype":"patient"},{"id":43,"name":"Stefan Eberhard","nodetype":"patient"},{"id":1,"name":"EHEC-A","nodetype":"result"},{"id":2,"name":"EHEC-B","nodetype":"result"},{"id":3,"name":"EHEC-C","nodetype":"result"},{"id":4,"name":"EHEC-D","nodetype":"result"},{"id":5,"name":"EHEC-E","nodetype":"result"},{"id":6,"name":"bacteriaName","nodetype":"result"},{"id":7,"name":"bacteriaName","nodetype":"result"},{"id":8,"name":"bacteriaName","nodetype":"result"}],"edges":[{"source":11,"target":11,"edgetype":"Angesteckt in "},{"source":12,"target":12,"edgetype":"Angesteckt in "},{"source":13,"target":13,"edgetype":"Angesteckt in "},{"source":11,"target":6,"edgetype":"Wurde Angesteckt mit "},{"source":12,"target":7,"edgetype":"Wurde Angesteckt mit "},{"source":13,"target":8,"edgetype":"Wurde Angesteckt mit "}]}
|
Loading…
Reference in New Issue