Skip to content

Commit

Permalink
Removed connection string, updated proto file
Browse files Browse the repository at this point in the history
Removed publish info and connection string that contained backend
credentials.

Updated proto file with new "uptime" field that provides relative
timestamps instances of VehicleMessage.
  • Loading branch information
mgiannikouris committed Dec 10, 2014
1 parent e16c59c commit 1ecb55b
Show file tree
Hide file tree
Showing 11 changed files with 288 additions and 123 deletions.
52 changes: 27 additions & 25 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,33 +1,35 @@
# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# =========================
# Operating System Files
# =========================

# OSX
# =========================

# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

#SVN
.svn

# =========================
# Operating System Files
# =========================

# OSX
# =========================

.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

Icon
# Thumbnails
._*

Expand Down
Binary file modified .svn/wc.db
Binary file not shown.
24 changes: 21 additions & 3 deletions OpenXC.Web/Controllers/DeviceApiController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,29 @@ public async Task<HttpResponseMessage> GetConfiguration(string deviceName)
{
try
{
var valid = JContainer.Parse(configuration);
// Parse out the JSON and add null characters after each command to satisfy the command parser.
var parsedJson = JContainer.Parse(configuration);
StringBuilder sb = new StringBuilder();
if (parsedJson is JObject)
{
// Single object.
sb.Append(parsedJson.ToString(Formatting.None));
sb.Append('\0');
}
else if (parsedJson is JArray)
{
// Multiple objects.
foreach (var command in parsedJson)
{
sb.Append(command.ToString(Formatting.None));
sb.Append('\0');
}
}

return new HttpResponseMessage
{
StatusCode = HttpStatusCode.OK,
Content = new StringContent(configuration, Encoding.UTF8, "application/json")
Content = new StringContent(sb.ToString(), Encoding.ASCII, "application/json")
};
}
catch (Exception e)
Expand All @@ -99,7 +117,7 @@ public async Task<HttpResponseMessage> GetConfiguration(string deviceName)
return new HttpResponseMessage
{
StatusCode = HttpStatusCode.OK,
Content = new StringContent(configuration, Encoding.UTF8, "text/plain")
Content = new StringContent(configuration, Encoding.ASCII, "text/plain")
};
}
else
Expand Down
7 changes: 5 additions & 2 deletions OpenXC.Web/OpenXC.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,8 @@
<Content Include="fonts\glyphicons-halflings-regular.eot" />
<Content Include="Content\bootstrap-theme.css.map" />
<Content Include="Content\bootstrap.css.map" />
<None Include="Properties\PublishProfiles\openxcserverdemo - FTP.pubxml" />
<None Include="Properties\PublishProfiles\openxcserverdemo - Web Deploy.pubxml" />
<None Include="Protobuf\openxc.proto" />
<Compile Include="Protobuf\openxc-proto.cs">
<DependentUpon>openxc.proto</DependentUpon>
Expand Down Expand Up @@ -328,7 +330,6 @@
<Content Include="favicon.ico" />
<Content Include="Global.asax" />
<Content Include="Content\Site.css" />
<None Include="Properties\PublishProfiles\openxcserverdemo.pubxml" />
<Content Include="Scripts\DataTables-1.10.3\dataTables.autoFill.js" />
<Content Include="Scripts\DataTables-1.10.3\dataTables.autoFill.min.js" />
<Content Include="Scripts\DataTables-1.10.3\dataTables.bootstrap.js" />
Expand All @@ -354,7 +355,9 @@
<Content Include="Scripts\DataTables-1.10.3\jquery.dataTables.min.js" />
<Content Include="Scripts\jquery-2.1.1.min.map" />
<Content Include="Scripts\_references.js" />
<Content Include="Web.config" />
<Content Include="Web.config">
<SubType>Designer</SubType>
</Content>
<Content Include="Web.Debug.config">
<DependentUpon>Web.config</DependentUpon>
</Content>
Expand Down
39 changes: 0 additions & 39 deletions OpenXC.Web/OpenXC.Web.csproj.user

This file was deleted.

39 changes: 0 additions & 39 deletions OpenXC.Web/Properties/PublishProfiles/openxcserverdemo.pubxml

This file was deleted.

11 changes: 0 additions & 11 deletions OpenXC.Web/Properties/PublishProfiles/openxcserverdemo.pubxml.user

This file was deleted.

Loading

0 comments on commit 1ecb55b

Please sign in to comment.