Skip to content

Commit

Permalink
(1) Added DotRas dependency to WiX installation script, (2) made conn…
Browse files Browse the repository at this point in the history
…ection profile and company drop-downs required fields on device screen, (3) updated GSF dependencies and (4) updated version to 0.9.3
  • Loading branch information
ritchiecarroll committed May 28, 2016
1 parent 714c547 commit 96e397b
Show file tree
Hide file tree
Showing 245 changed files with 50 additions and 254,382 deletions.
6 changes: 3 additions & 3 deletions Source/Applications/openMIC/openMIC/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<add name="ConnectionString" value="Data Source=localhost\SQLEXPRESS; Initial Catalog=openMIC; Integrated Security=SSPI" description="Configuration connection string" encrypted="false" scope="Application" />
<add name="DataProviderString" value="AssemblyName={System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089}; ConnectionType=System.Data.SqlClient.SqlConnection; AdapterType=System.Data.SqlClient.SqlDataAdapter" description="Configuration database ADO.NET data provider assembly type creation string used when ConfigurationType=Database" encrypted="false" scope="Application" />
<!-- **************************************************************** -->
<add name="NodeID" value="8CDD6C70-A864-4EF6-B7AB-05FB1F5381FD" description="Unique Node ID" encrypted="false" scope="Application" />
<add name="NodeID" value="6d5c3018-a59d-463d-9a5d-1be60cdc3b65" description="Unique Node ID" encrypted="false" scope="Application" />
<add name="ProcessPriority" value="High" description="Sets desired process priority: Normal, AboveNormal, High, RealTime" encrypted="false" />
<add name="UseMeasurementRouting" value="True" description="Set to true to use optimized adapter measurement routing." encrypted="false" />
<add name="UniqueAdaptersIDs" value="True" description="Set to true if all runtime adapter ID's will be unique to allow for easier adapter specification" encrypted="false" />
Expand All @@ -36,8 +36,8 @@
<add name="EmbeddedTemplatePath" value="GSF.Web.Model.Views." description="Embedded name space path for data context based razor field templates." encrypted="false" />
<add name="ClientCacheEnabled" value="true" description="Determines if cache control is enabled for browser clients." encrypted="false" />
<add name="DefaultWebPage" value="Index.cshtml" description="The default web page for the hosted web server." encrypted="false" />
<add name="CompanyName" value="Tennessee Valley Authority" description="The name of the company who owns this instance of the openMIC." encrypted="false" />
<add name="CompanyAcronym" value="TVA" description="The acronym representing the company who owns this instance of the openMIC." encrypted="false" />
<add name="CompanyName" value="Grid Protection Alliance" description="The name of the company who owns this instance of the openMIC." encrypted="false" />
<add name="CompanyAcronym" value="GPA" description="The acronym representing the company who owns this instance of the openMIC." encrypted="false" />
<add name="DefaultCulture" value="en-US" description="Default culture to use for language, country/region and calendar formats." encrypted="false" />
<add name="DateFormat" value="MM/dd/yyyy" description="The date format to use when rendering timestamps." encrypted="false" />
<add name="TimeFormat" value="HH:mm.ss.fff" description="The time format to use when rendering timestamps." encrypted="false" />
Expand Down
1 change: 1 addition & 0 deletions Source/Applications/openMIC/openMIC/Model/Device.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public bool IsConcentrator
set;
}

[Required]
[Label("Company")]
public int? CompanyID
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Runtime.InteropServices;

// Assembly identity attributes.
[assembly: AssemblyVersion("0.9.2.0")]
[assembly: AssemblyVersion("0.9.3.0")]

// Informational attributes.
[assembly: AssemblyCompany("Grid Protection Alliance")]
Expand Down
4 changes: 2 additions & 2 deletions Source/Applications/openMIC/openMIC/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ public void Configuration(IAppBuilder app)

// Setup resolver for web page controller instances
httpConfig.DependencyResolver = WebPageController.GetDependencyResolver(WebServer.Default, Program.Host.DefaultWebPage, new AppModel(), typeof(AppModel));
#if DEBUG

// Enabled detailed client errors
hubConfig.EnableDetailedErrors = true;
#endif
// Load ServiceHub SignalR class
app.MapSignalR(hubConfig);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
}
@helper AddNewEditDialog(DataContext dataContext)
{
@Raw(dataContext.AddInputField<Company>("Acronym"))
@Raw(dataContext.AddInputField<Company>("Acronym", initialFocus: true))
@Raw(dataContext.AddInputField<Company>("Name"))
@Raw(dataContext.AddInputField<Company>("MapAcronym"))
@Raw(dataContext.AddInputField<Company>("URL", "url"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
@helper AddNewEditDialog(DataContext dataContext)
{
<div class="col-md-6">
@Raw(dataContext.AddInputField<ConnectionProfileTask>("Name"))
@Raw(dataContext.AddInputField<ConnectionProfileTask>("Name", initialFocus: true))
@Raw(dataContext.AddInputField("get('fileextensions')", true, fieldLabel: "File Names or Extensions to Download", fieldID: "inputFileExtensions", groupDataBinding: "with: $root.connectionString", toolTip: "Separate multiple file names or extension patterns with commas", enableHotLinks: false))
@Raw(dataContext.AddInputField("get('remotepath')", true, fieldLabel: "Remote Path", fieldID: "inputRemotePath", groupDataBinding: "with: $root.connectionString", enableHotLinks: false))
@Raw(dataContext.AddInputField("get('localpath')", true, fieldLabel: "Local Path", fieldID: "inputLocalPath", groupDataBinding: "with: $root.connectionString", toolTip: string.Format("User \"{0}\" will need rights to this folder or local path authentication will need to be specified >>", UserInfo.CurrentUserID).HtmlEncode(), enableHotLinks: false))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
}
@helper AddNewEditDialog(DataContext dataContext)
{
@Raw(dataContext.AddInputField<ConnectionProfile>("Name"))
@Raw(dataContext.AddInputField<ConnectionProfile>("Name", initialFocus: true))
@Raw(dataContext.AddInputField<ConnectionProfile>("Description"))
}
@Include("PagedViewModel.cshtml")
Expand Down
20 changes: 12 additions & 8 deletions Source/Applications/openMIC/openMIC/wwwroot/Devices.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,15 @@
};

// Lookup default company ID
try {
ViewBag.DefaultCompanyID = dataContext.Connection.ExecuteScalar<int>("SELECT ID FROM Company WHERE Acronym={0}", Model.Global.CompanyAcronym);
int? companyID;

try
{
companyID = dataContext.Connection.ExecuteScalar<int?>("SELECT ID FROM Company WHERE Acronym={0}", Model.Global.CompanyAcronym);
}
catch {
ViewBag.DefaultCompanyID = 0;
catch
{
companyID = null;
}

ViewBag.BodyRows = BodyRows().ToString();
Expand All @@ -74,13 +78,13 @@
}
@helper AddNewEditDialog(DataContext dataContext) {
<div class="col-md-6">
@Raw(dataContext.AddInputField<Device>("Acronym", enableHotLinks: false))
@Raw(dataContext.AddInputField<Device>("Acronym", initialFocus:true, enableHotLinks: false))
@Raw(dataContext.AddInputField<Device>("Name", enableHotLinks: false))
@Raw(dataContext.AddInputField<Device>("OriginalSource", enableHotLinks: false))
@Raw(dataContext.AddInputField("get('connectionhostname')", false, fieldLabel: "Connection Host Name/IP", fieldID: "inputConnectionHostName", groupDataBinding: "with: $root.connectionString", enableHotLinks: false))
@Raw(dataContext.AddInputField("get('connectionusername')", false, fieldLabel: "Connection User Name", fieldID: "inputConnectionUserName", groupDataBinding: "with: $root.connectionString", enableHotLinks: false))
@Raw(dataContext.AddInputField("get('connectionpassword')", false, inputType: "password", fieldLabel: "Connection Password", fieldID: "inputConnectionPassword", groupDataBinding: "with: $root.connectionString", enableHotLinks: false))
@Raw(dataContext.AddSelectField<ConnectionProfile>("get('connectionprofileid')", false, "ID", "Name", fieldLabel: "Connection Profile<span class=\"pull-right\">&nbsp;&nbsp;<a href=\"ConnectionProfiles.cshtml\"><small><em>Edit Connection Profiles</em></small></a></span>", fieldID: "selectConnectionProfile", groupDataBinding: "with: $root.connectionString"))
@Raw(dataContext.AddSelectField<ConnectionProfile>("get('connectionprofileid')", true, "ID", "Name", fieldLabel: "Connection Profile<span class=\"pull-right\">&nbsp;&nbsp;<a href=\"ConnectionProfiles.cshtml\"><small><em>Edit Connection Profiles</em></small></a></span>", fieldID: "selectConnectionProfile", groupDataBinding: "with: $root.connectionString"))
@Raw(dataContext.AddInputField("get('schedule')", true, fieldLabel: "Schedule Cron<span class=\"pull-right\">&nbsp;&nbsp;<a href=\"#\" data-toggle=\"modal\" data-target=\"#cronHelpDialog\" data-backdrop=\"static\"><small><em>Syntax Help</em></small></a></span>", fieldID: "inputSchedule", groupDataBinding: "with: $root.connectionString", enableHotLinks: false))
@Raw(dataContext.AddSelectField<Device, VendorDevice>("VendorDeviceID", "ID", "Name"))
</div>
Expand Down Expand Up @@ -177,7 +181,7 @@
defaultConnectionString.set("connectionHostName", "");
defaultConnectionString.set("connectionUserName", "@Raw(Model.Global.DefaultFTPUserName.JavaScriptEncode())");
defaultConnectionString.set("connectionPassword", "@Raw(Model.Global.DefaultFTPPassword.JavaScriptEncode())");
defaultConnectionString.set("connectionProfileID", 0);
defaultConnectionString.set("connectionProfileID", "");
defaultConnectionString.set("schedule", "* * * * *");
defaultConnectionString.set("useDialUp", false);
defaultConnectionString.set("dialUpEntryName", "");
Expand Down Expand Up @@ -215,7 +219,7 @@
$(viewModel).on("newRecord", function(event, record) {
// Initialize default values for new record
record.CompanyID = @ViewBag.DefaultCompanyID;
record.CompanyID = @Raw(companyID == null ? "\"\"" : companyID.ToString());
});
$(viewModel).on("currentRecordChanged", function(event) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,11 +282,13 @@
$(""#pageHeader"").append(""{0}"");
$(""#searchFilter"").on(""keyup"", function (e) {{
if ($(""#searchFilter"").val().length === 0) {{
const searchText = $(""#searchFilter"").val();
if (searchText.length === 0) {{
viewModel.filterText = """";
viewModel.queryPageRecords();
}} else {{
viewModel.filterText = $(""#searchFilter"").val();
viewModel.filterText = searchText;
viewModel.queryPageRecords();
}}
}});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
@helper AddNewEditDialog(DataContext dataContext)
{
@Raw(dataContext.AddSelectField<VendorDevice, Vendor>("VendorID", "ID", "Acronym"))
@Raw(dataContext.AddInputField<VendorDevice>("Name"))
@Raw(dataContext.AddInputField<VendorDevice>("Name", initialFocus: true))
@Raw(dataContext.AddInputField<VendorDevice>("Description"))
@Raw(dataContext.AddInputField<VendorDevice>("URL", "url"))
}
Expand Down
4 changes: 2 additions & 2 deletions Source/Applications/openMIC/openMIC/wwwroot/Vendors.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
ViewBag.ShowSearchFilter = true;

ViewBag.HeaderColumns = new[]
{ // { "Field", "Label", "Classes" }
{ // { "Field", "Label", "Classes" }
new[] { "Acronym", "Acronym", "text-left" },
new[] { "Name", "Name", "text-left" },
new[] { "URL", "URL", "text-left" }
Expand All @@ -61,7 +61,7 @@
}
@helper AddNewEditDialog(DataContext dataContext)
{
@Raw(dataContext.AddInputField<Vendor>("Acronym"))
@Raw(dataContext.AddInputField<Vendor>("Acronym", initialFocus: true))
@Raw(dataContext.AddInputField<Vendor>("Name"))
@Raw(dataContext.AddInputField<Vendor>("PhoneNumber", "tel"))
@Raw(dataContext.AddInputField<Vendor>("ContactEmail", "email"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Runtime.InteropServices;

// Assembly identity attributes.
[assembly: AssemblyVersion("0.9.2.0")]
[assembly: AssemblyVersion("0.9.3.0")]

// Informational attributes.
[assembly: AssemblyCompany("Grid Protection Alliance")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Runtime.InteropServices;

// Assembly identity attributes.
[assembly: AssemblyVersion("0.9.2.0")]
[assembly: AssemblyVersion("0.9.3.0")]

// Informational attributes.
[assembly: AssemblyCompany("Grid Protection Alliance")]
Expand Down
4 changes: 2 additions & 2 deletions Source/Applications/openMIC/openMICSetup/WebFiles.wxi
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
<Component Id="Help_cshtml">
<File Id="Help.cshtml" Name="Help.cshtml" Source="$(var.SolutionDir)Applications\openMIC\openMIC\wwwroot\Help.cshtml" />
</Component>
<Component Id="Index_cshtml">
<File Id="Index.cshtml" Name="Index.cshtml" Source="$(var.SolutionDir)Applications\openMIC\openMIC\wwwroot\Index.cshtml" />
<Component Id="index_cshtml">
<File Id="index.cshtml" Name="index.cshtml" Source="$(var.SolutionDir)Applications\openMIC\openMIC\wwwroot\index.cshtml" />
</Component>
<Component Id="Layout_cshtml">
<File Id="Layout.cshtml" Name="Layout.cshtml" Source="$(var.SolutionDir)Applications\openMIC\openMIC\wwwroot\Layout.cshtml" />
Expand Down
5 changes: 5 additions & 0 deletions Source/Applications/openMIC/openMICSetup/openMICSetup.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,11 @@
<File Id="WPFToolkit.dll" Name="WPFToolkit.dll" Source="$(var.SolutionDir)\Dependencies\Microsoft\WPF\WPFToolkit.dll" />
</Component>

<!-- DotRas dial-up components -->
<Component Id="DotRas">
<File Id="DotRas.dll" Name="DotRas.dll" Source="$(var.SolutionDir)Dependencies\NuGet\DotRas.for.Win7.1.3.0\lib\net40\DotRas.dll" />
</Component>

<!-- Self Hosting SignalR, WebAPI and Razor Engine Components (from NuGet) -->
<Component Id="Microsoft.AspNet.Razor">
<File Id="Microsoft.AspNet.Razor.dll" Name="Microsoft.AspNet.Razor.dll" Source="$(var.SolutionDir)Dependencies\NuGet\Microsoft.AspNet.Razor.4.0.0-beta7\lib\net45\Microsoft.AspNet.Razor.dll" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("0.9.2.0")]
[assembly: AssemblyVersion("0.9.2.0")]
[assembly: AssemblyFileVersion("0.9.2.0")]
// [assembly: AssemblyVersion("0.9.3.0")]
[assembly: AssemblyVersion("0.9.3.0")]
[assembly: AssemblyFileVersion("0.9.3.0")]
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("0.9.2.0")]
[assembly: AssemblyVersion("0.9.2.0")]
[assembly: AssemblyFileVersion("0.9.2.0")]
// [assembly: AssemblyVersion("0.9.3.0")]
[assembly: AssemblyVersion("0.9.3.0")]
[assembly: AssemblyFileVersion("0.9.3.0")]
Binary file removed Source/Dependencies/GSF-Debug/AdoAdapters.dll
Binary file not shown.
Loading

0 comments on commit 96e397b

Please sign in to comment.