Changeset 6303 for branches/WebApplication
- Timestamp:
- 05/26/11 23:53:57 (14 years ago)
- Location:
- branches/WebApplication/MVC2
- Files:
-
- 2 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Controllers/ChartController.cs
r6242 r6303 31 31 32 32 // Later, we will get the runs from the session ... 33 QueryServiceClient client = Query.GetClientFactory("okbtester", "okbtester"); 34 35 long[] runIds = new long[104]; 36 for (int i = 0; i < 104; i++) { 37 runIds[i] = i; 38 } 39 Run[] runs = client.GetRuns(runIds, false); 40 //cm.Runs = runs; 33 QueryServiceClient client = Query.GetClientFactory(); 34 35 //long[] runIds = new long[104]; 36 //for (int i = 0; i < 104; i++) { 37 // runIds[i] = i; 38 //} 39 long[] runIds = client.GetRunIds((CombinedFilter)Session["Content"]); 40 Run[] runs = client.GetRuns(runIds,false); 41 // Run[] runs = Session[""]; 42 cm.Runs = runs; 41 43 cm.UpdateRunCollection(runs); 42 44 cm.UpdateBubbleChart(selectedAxisY, selectedAxisX, selectedBubbleSize); -
branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Controllers/FilterController.cs
r6247 r6303 8 8 using HLWebOKBQueryPlugin.OKBQueryService; 9 9 using System.Web.Routing; 10 using HLWebOKBQueryPlugin.Models; 10 11 11 12 namespace HLWebOKBQueryPlugin.Controllers … … 20 21 /// </summary> 21 22 /// <returns></returns> 22 public void GetRuns() 23 { 24 FilterModel qm = new FilterModel(); 25 qm.Content = (CombinedFilter)Session["Content"]; 26 27 QueryServiceClient client = Query.GetClientFactory("okbtester", "okbtester"); 28 29 30 long[] ids = client.GetRunIds(qm.Content); 23 public ActionResult GetRuns() 24 { 25 Session["SelectedSubMenu"] = "Filter"; 26 27 FilterModel fm = new FilterModel(); 28 fm.Content = (CombinedFilter)Session["Content"]; 29 30 QueryServiceClient client = Query.GetClientFactory(); 31 32 33 long[] ids = client.GetRunIds(fm.Content); 31 34 32 35 Response.Write("Found <" + ids.Count() + "> Runs."); 33 34 // return View("Index", qm); // name of usercontrol 36 QueryModel qm = new QueryModel(); 37 qm.Runs = ids; 38 return View("Results", qm); // name of usercontrol 35 39 } 36 40 … … 51 55 /// <param name="collection"></param> 52 56 /// <returns></returns> 53 public ActionResult AddFilter And(string submitButton,FormCollection collection)57 public ActionResult AddFilter(FormCollection collection) 54 58 { 55 59 FilterModel fm = new FilterModel((CombinedFilter)Session["Content"]); 56 57 Response.Write("Submit:" + submit Button);60 string submitAction = collection.Get("action"); 61 Response.Write("Submit:" + submitAction); 58 62 59 63 //update model with form data 60 64 UpdateModel(collection, fm); 61 65 62 if (submitButton.StartsWith("+")) 63 { 64 string stringid = submitButton.Substring(2); 66 if ("add".Equals(submitAction)) 67 { 68 // string stringid = submitButton.Substring(2); 69 string stringid = collection.Get("selectedFilter"); 65 70 AddNewFilter(collection, fm, stringid); 66 71 } 67 else if (submitButton.StartsWith("-")) 68 { 69 string stringid = submitButton.Substring(2); 72 else if ("delete".Equals(submitAction)) 73 { 74 string stringid= collection.Get("selectedFilter"); 75 // string stringid = submitButton.Substring(2); 70 76 DeleteFilter(new Guid(stringid)); 71 77 } 72 else if ( submitButton.Equals("runs"))73 { 74 GetRuns();75 } 76 else if ( submitButton.Equals("or"))78 else if ("runs".Equals(submitAction)) 79 { 80 return GetRuns(); 81 } 82 else if ("or".Equals(submitAction)) 77 83 { 78 84 AddFilterOr( fm); -
branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Controllers/QueryController.cs
r6253 r6303 11 11 using System.Reflection; 12 12 using System.Text; 13 using HLWeb PluginHost.Models;13 using HLWebOKBQueryPlugin.Models; 14 14 using HLWebOKBQueryPlugin.OKBQueryService; 15 15 using HLWebOKBQueryPlugin.Helpers; … … 43 43 44 44 public ActionResult RunCollectionTable() { 45 46 // Get runs from filter 47 48 49 QueryServiceClient client = Query.GetClientFactory(); 50 51 52 long[] ids = client.GetRunIds((CombinedFilter)Session["Content"]); 53 45 54 QueryModel qm = new QueryModel(); 46 Session["QueryRuns"] = qm.getTestRuns(); 55 qm.Runs = ids; 56 Session["QueryRuns"] = qm.RunCollection; 47 57 return View(qm); 48 58 } -
branches/WebApplication/MVC2/HLWebOKBQueryPlugin/HLWebOKBQueryPlugin.csproj
r6253 r6303 108 108 <Compile Include="ViewModels\ComparisonItem.cs" /> 109 109 <Compile Include="ViewModels\ComparisonsHelper.cs" /> 110 <Compile Include=" ViewModels\FilterModel.cs" />110 <Compile Include="Models\FilterModel.cs" /> 111 111 <Compile Include="Models\QueryModel.cs" /> 112 112 <Compile Include="Properties\AssemblyInfo.cs" /> … … 161 161 <Content Include="Views\Chart\Index.aspx" /> 162 162 <Content Include="Views\Filter\Index.aspx" /> 163 <Content Include="Views\Filter\Results.aspx" /> 163 164 <Content Include="Views\Home\About.aspx" /> 164 165 <Content Include="Views\Home\Index.aspx" /> … … 213 214 <Folder Include="App_Data\" /> 214 215 <Folder Include="App_LocalResources\" /> 215 <Folder Include="Views\AlgorithmClass\" />216 216 </ItemGroup> 217 217 <ItemGroup> -
branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Models/QueryModel.cs
r6253 r6303 8 8 using HLWebOKBQueryPlugin.Helpers; 9 9 10 namespace HLWebPluginHost.Models { 10 namespace HLWebOKBQueryPlugin.Models 11 { 11 12 public class QueryModel { 12 13 13 14 public String SelectedSubMenu { get; set; } 15 private long[] runs; 16 17 14 18 15 19 public IList<Filter> QueryFilterGetAll() { … … 41 45 } 42 46 47 48 public long[] Runs 49 { 50 get 51 { 52 return this.runs; 53 } 54 set 55 { 56 this.runs = value; 57 } 58 59 } 60 61 62 public IList<RunCollectionData> RunCollection 63 { 64 get 65 { 66 QueryServiceClient client = Query.GetClientFactory(); 67 if (client != null) 68 { 69 IList<RunCollectionData> runCollection = new List<RunCollectionData>(); 70 71 IList<Run> runList = client.GetRuns(runs, false).ToList<Run>(); 72 73 foreach (Run r in runList) 74 runCollection.Add(new RunCollectionData(r)); 75 76 return runCollection; 77 } 78 return new List<RunCollectionData>(); 79 } 80 } 81 43 82 // just 4 testing 44 public IList<RunCollectionData> getTestRuns() {83 //public IList<RunCollectionData> getTestRuns() { 45 84 46 QueryServiceClient client = Query.GetClientFactory();85 // QueryServiceClient client = Query.GetClientFactory(); 47 86 48 if (client != null) {49 IList<RunCollectionData> runs = new List<RunCollectionData>();87 // if (client != null) { 88 // IList<RunCollectionData> runs = new List<RunCollectionData>(); 50 89 51 //long[] runIds = client.GetRunIds(new Filter());52 //if (runIds.Length < cnt) cnt = runIds.Length;90 // //long[] runIds = client.GetRunIds(new Filter()); 91 // //if (runIds.Length < cnt) cnt = runIds.Length; 53 92 54 long[] getRuns = new long[2] { 1, 2 };93 // long[] getRuns = new long[2] { 1, 2 }; 55 94 56 IList<Run> runList = client.GetRuns(getRuns, false).ToList<Run>();95 // IList<Run> runList = client.GetRuns(getRuns, false).ToList<Run>(); 57 96 58 foreach (Run r in runList)59 runs.Add(new RunCollectionData(r));97 // foreach (Run r in runList) 98 // runs.Add(new RunCollectionData(r)); 60 99 61 return runs;62 }63 return new List<RunCollectionData>();64 }100 // return runs; 101 // } 102 // return new List<RunCollectionData>(); 103 //} 65 104 66 105 } -
branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Properties/AssemblyInfo.cs
r5910 r6303 2 2 using System.Runtime.CompilerServices; 3 3 using System.Runtime.InteropServices; 4 using HLWebPluginHost.PluginLib;5 4 using System.Web.UI; 6 5 using System.Collections; 6 using HLWebPluginHost.PluginLib; 7 7 8 8 // General Information about an assembly is controlled through the following -
branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Views/Filter/Filters.ascx
r6268 r6303 8 8 <script src="/Scripts/MicrosoftMvcValidation.js" type="text/javascript"></script> 9 9 10 <script type="text/javascript"> 11 function setAction(action, id) { 12 document.getElementById('selectedFilter').value = id; 13 document.getElementById('action').value = action; 14 document.filterForm.submit(); 15 } 16 </script> 17 18 10 19 <% Html.EnableClientValidation(); %> 20 <% using (Html.BeginForm("AddFilter", "Filter", FormMethod.Post, new { Name = "filterForm" })) %> 21 <% { %> 22 <!-- Put all into a form that calls the "AddFilter" Action--> 11 23 12 <!-- Put all into a form that calls the "AddFilter" Action--> 13 <div><table> 24 <% 25 CombinedFilter topFilter = ((FilterModel)Model).Content; 26 %> 27 <div><table> 14 28 <tr><td>A<br />N<br />D</td><td> 15 <p> 16 <% 17 CombinedFilter topFilter = ((FilterModel)Model).Content; 29 30 31 32 <% 33 foreach (Filter fNode in topFilter.Filters) 34 { 35 36 CombinedFilter currentFilter = (CombinedFilter)fNode; 37 string comboboxName = FilterModel.ComboboxName + "." + currentFilter.Id; 38 string hiddenName = FilterModel.ParentIdName + "." + currentFilter.Id; 18 39 %> 19 <% using (Html.BeginForm("AddFilterAnd", "Filter", FormMethod.Post, new { id = topFilter.Id, name = topFilter.Id })) %> 20 <% { 21 22 foreach (Filter fNode in topFilter.Filters) 23 { 24 25 CombinedFilter currentFilter = (CombinedFilter)fNode; 26 string comboboxName = FilterModel.ComboboxName + "." + currentFilter.Id; 27 string hiddenName = FilterModel.ParentIdName + "." + currentFilter.Id; 28 %> 29 <%: Html.Hidden(hiddenName,currentFilter.Id.ToString()) %> 30 <%: Html.DropDownList( comboboxName, new SelectList(((FilterModel)Model).AvailableFilterForCombobox, "FilterTypeName", "Label"))%> 31 <input type="submit" name="submitButton" value="+.<%:currentFilter.Id%>" /> 32 </p> 40 <table border="0"><tr><td> 41 <%: Html.Hidden(hiddenName, currentFilter.Id.ToString())%> 42 <%: Html.Hidden("selectedFilter",null, new { Id = "selectedFilter" })%> 43 <%: Html.Hidden("action", null, new { Id = "action" })%> 44 <%: Html.DropDownList(comboboxName, new SelectList(((FilterModel)Model).AvailableFilterForCombobox, "FilterTypeName", "Label"))%> 45 46 47 <input type="button" name="submitButton" value="+" class="hl-button-text-plus" onClick="setAction('add','<%: currentFilter.Id%>');" /> 48 <!-- <input type="submit" name="submitButton" value="+.<%:currentFilter.Id%>" />--> 49 </td></tr><tr><td> 33 50 <!-- Build the selected filters. The filtesr will be stored in the session and the 34 51 Controller puts the current filters from the session into the model. Selected Filters … … 42 59 { %> 43 60 44 <t able border="0"><tr><td>61 <tr><td> 45 62 <% 46 63 47 64 48 if ("StringComparisonFilter".Equals(f.GetType().Name))49 { %>65 if ("StringComparisonFilter".Equals(f.GetType().Name)) 66 { %> 50 67 <% StringComparisonFilter filter = ((StringComparisonFilter)f); %> 51 68 <%: Html.Label(filter.Label)%> 52 <%: Html.DropDownList(f.Id + "." + FilterModel.ComparisonDropDownList, new SelectList(FilterModel.StringComparisons, "Value", "Text", (int)filter.Comparison))%>69 <%: Html.DropDownList(f.Id + "." + FilterModel.ComparisonDropDownList, new SelectList(FilterModel.StringComparisons, "Value", "Text", (int)filter.Comparison))%> 53 70 <%: Html.TextBox(f.Id + "." + FilterModel.ValueTextbox, (filter.Value))%> 54 <%: Html.TextBoxFor(model => ((FilterModel)Model).IntValue, (filter.Value)) 55 <%: Html.ValidationMessageFor(model => ((FilterModel)Model).IntValue) 71 <%: Html.TextBoxFor(model => ((FilterModel)Model).IntValue, (filter.Value))%> 72 <%: Html.ValidationMessageFor(model => ((FilterModel)Model).IntValue)%> 56 73 <% } 57 else if ("NameStringComparisonFilter".Equals(f.GetType().Name))58 { %>74 else if ("NameStringComparisonFilter".Equals(f.GetType().Name)) 75 { %> 59 76 <% NameStringComparisonFilter filter = ((NameStringComparisonFilter)f); %> 60 77 <%: Html.Label(filter.Label)%> 61 <%: Html.DropDownList(f.Id + "." + FilterModel.ComparisonDropDownList, new SelectList(FilterModel.StringComparisons, "Value", "Text", (int)filter.Comparison))%>78 <%: Html.DropDownList(f.Id + "." + FilterModel.ComparisonDropDownList, new SelectList(FilterModel.StringComparisons, "Value", "Text", (int)filter.Comparison))%> 62 79 <%: Html.TextBox(f.Id + "." + FilterModel.ValueTextbox, filter.Value)%> 63 80 <% } 64 else if ("StringComparisonAvailableValuesFilter".Equals(f.GetType().Name))65 { %>81 else if ("StringComparisonAvailableValuesFilter".Equals(f.GetType().Name)) 82 { %> 66 83 <% StringComparisonAvailableValuesFilter filter = ((StringComparisonAvailableValuesFilter)f); %> 67 84 <%: Html.Label(filter.Label)%> 68 <%: Html.DropDownList(f.Id + "." + FilterModel.ComparisonDropDownList, new SelectList(FilterModel.StringComparisons, "Value", "Text", (int)filter.Comparison))%>85 <%: Html.DropDownList(f.Id + "." + FilterModel.ComparisonDropDownList, new SelectList(FilterModel.StringComparisons, "Value", "Text", (int)filter.Comparison))%> 69 86 <%: Html.DropDownList(f.Id + "." + FilterModel.ValueTextbox, new SelectList(filter.AvailableValues, filter.Value))%> 70 87 <% } 71 else if ("NameEqualityComparisonByteArrayFilter".Equals(f.GetType().Name))72 { %>88 else if ("NameEqualityComparisonByteArrayFilter".Equals(f.GetType().Name)) 89 { %> 73 90 <% NameEqualityComparisonByteArrayFilter filter = ((NameEqualityComparisonByteArrayFilter)f); %> 74 91 <%: Html.Label(filter.Label)%> 75 92 <%: Html.Label("not supported")%> 76 93 <% } 77 else if ("NameEqualityComparisonBoolFilter".Equals(f.GetType().Name))78 { %>94 else if ("NameEqualityComparisonBoolFilter".Equals(f.GetType().Name)) 95 { %> 79 96 <% NameEqualityComparisonBoolFilter filter = ((NameEqualityComparisonBoolFilter)f); %> 80 97 <%: Html.Label(filter.Label)%> 81 <%: Html.DropDownList(f.Id + "." + FilterModel.ComparisonDropDownList, new SelectList(FilterModel.BoolComparisons, "Value", "Text", (int)filter.Comparison))%>98 <%: Html.DropDownList(f.Id + "." + FilterModel.ComparisonDropDownList, new SelectList(FilterModel.BoolComparisons, "Value", "Text", (int)filter.Comparison))%> 82 99 <%: Html.DropDownList(f.Id + "." + FilterModel.ValueDropDownList, new SelectList(((FilterModel)Model).BoolStates, filter.Value))%> 83 100 <% } 84 else if ("NameOrdinalComparisonIntFilter".Equals(f.GetType().Name))85 { %>101 else if ("NameOrdinalComparisonIntFilter".Equals(f.GetType().Name)) 102 { %> 86 103 <% NameOrdinalComparisonIntFilter filter = ((NameOrdinalComparisonIntFilter)f); %> 87 104 <%: Html.Label(filter.Label)%> … … 89 106 <%: Html.TextBox(f.Id + "." + FilterModel.ValueTextbox, filter.Value)%> 90 107 <% } 91 else if ("NameStringComparisonAvailableValuesFilter".Equals(f.GetType().Name))92 { %>108 else if ("NameStringComparisonAvailableValuesFilter".Equals(f.GetType().Name)) 109 { %> 93 110 <% NameStringComparisonAvailableValuesFilter filter = ((NameStringComparisonAvailableValuesFilter)f); %> 94 111 <%: Html.Label(filter.Label)%> 95 <%: Html.DropDownList(f.Id + "." + FilterModel.ComparisonDropDownList, new SelectList(FilterModel.StringComparisons, "Value", "Text", (int)filter.Comparison))%>112 <%: Html.DropDownList(f.Id + "." + FilterModel.ComparisonDropDownList, new SelectList(FilterModel.StringComparisons, "Value", "Text", (int)filter.Comparison))%> 96 113 <%: Html.DropDownList(f.Id + "." + FilterModel.ValueDropDownList, new SelectList(filter.AvailableValues, filter.Value))%> 97 114 <% } 98 else if ("NameOrdinalComparisonDoubleFilter".Equals(f.GetType().Name))99 { %>115 else if ("NameOrdinalComparisonDoubleFilter".Equals(f.GetType().Name)) 116 { %> 100 117 <% NameOrdinalComparisonDoubleFilter filter = ((NameOrdinalComparisonDoubleFilter)f); %> 101 118 <%: Html.Label(filter.Label)%> … … 103 120 <%: Html.TextBox(f.Id + "." + FilterModel.ValueTextbox, filter.Value)%> 104 121 <% } 105 else if ("NameOrdinalComparisonFloatFilter".Equals(f.GetType().Name))106 { %>122 else if ("NameOrdinalComparisonFloatFilter".Equals(f.GetType().Name)) 123 { %> 107 124 <% NameOrdinalComparisonFloatFilter filter = ((NameOrdinalComparisonFloatFilter)f); %> 108 125 <%: Html.Label(filter.Label)%> … … 110 127 <%: Html.TextBox(f.Id + "." + FilterModel.ValueTextbox, filter.Value)%> 111 128 <% } 112 else if ("NameOrdinalComparisonLongFilter".Equals(f.GetType().Name))113 { %>129 else if ("NameOrdinalComparisonLongFilter".Equals(f.GetType().Name)) 130 { %> 114 131 <% NameOrdinalComparisonLongFilter filter = ((NameOrdinalComparisonLongFilter)f); %> 115 132 <%: Html.Label(filter.Label)%> … … 117 134 <%: Html.TextBox(f.Id + "." + FilterModel.ValueTextbox, filter.Value)%> 118 135 <% } 119 else if ("OrdinalComparisonDateTimeFilter".Equals(f.GetType().Name))120 { %>136 else if ("OrdinalComparisonDateTimeFilter".Equals(f.GetType().Name)) 137 { %> 121 138 <% OrdinalComparisonDateTimeFilter filter = ((OrdinalComparisonDateTimeFilter)f); %> 122 139 <%: Html.Label(filter.Label)%> … … 126 143 127 144 %> 128 129 <input type="submit" name="submitButton" value="-.<%:f.Id%>" /> 145 <!-- <input type="submit" name="submitButton" value="-.<%:f.Id%>" class="hl-icon-delete" style="text-indent:-999em;" /> 146 --> 147 <input type="button" name="submitButton" value="-" class="hl-icon-delete" onClick="setAction('delete','<%: f.Id%>');" /> 130 148 131 149 <% }%> 132 </td></tr> </table>150 </td></tr> 133 151 <% } %> 152 </table></td></tr> 134 153 <% }%> 135 154 <% }%> 136 <input type="submit" name="submitButton" value="or" /> 155 156 157 158 159 </table> <input type="button" name="submitButton" value="or" onClick="setAction('or','');" /> 137 160 </br> 138 <input type="submit" name="submitButton" value="runs" /> 139 140 141 142 <% } 143 144 %> </td></tr> 145 </table></div> 161 <input type="button" name="submitButton" value="runs" onClick="setAction('runs','');" /> 162 163 164 <% } 165 %> 166 </div> -
branches/WebApplication/MVC2/HeuristicLabWeb.PluginHost/HLWebPluginHost/Web.config
r6164 r6303 13 13 </connectionStrings> 14 14 ImplementedEND--> 15 <appSettings> 16 <add key="ChartImageHandler" value="storage=memory;deleteAfterServicing=true;"/> 17 </appSettings> 18 15 19 16 20 <system.web> … … 103 107 <add name="ChartImageHandler" 104 108 preCondition="integratedMode" 105 verb="GET,HEAD "109 verb="GET,HEAD,POST" 106 110 path="ChartImg.axd" 107 type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version= 3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>111 type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> 108 112 109 113 … … 172 176 </security> 173 177 </binding> 174 <binding name="QueryService" closeTimeout="00:0 1:00" openTimeout="00:01:00"175 receiveTimeout="00:10:00" sendTimeout="00:0 1:00" bypassProxyOnLocal="false"178 <binding name="QueryService" closeTimeout="00:03:00" openTimeout="00:03:00" 179 receiveTimeout="00:10:00" sendTimeout="00:03:00" bypassProxyOnLocal="false" 176 180 transactionFlow="false" hostNameComparisonMode="StrongWildcard" 177 181 maxBufferPoolSize="524288" maxReceivedMessageSize="99999999" messageEncoding="Text"
Note: See TracChangeset
for help on using the changeset viewer.