Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions App/StackExchange.DataExplorer/AppSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ static AppSettings()
[Default(null)]
public static HelperTableCachePreferences HelperTableOptions { get; private set; }

[Default(false)]
public static bool EnableOdata { get; private set; }

public static void Refresh()
{
var data = Current.DB.AppSettings.All().ToDictionary(v => v.Setting, v => v.Value);
Expand Down
2 changes: 1 addition & 1 deletion App/StackExchange.DataExplorer/Views/Home/Help.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<h2>Stack Exchange Data Explorer is&hellip;</h2>
<p>
&hellip;an open source tool for running arbitrary queries against public data from the Stack Exchange network.
Features include collaborative query editing and <a href="http://www.odata.org/">OData</a> endpoints for all graduated
Features include collaborative query editing @if (AppSettings.EnableOdata) { @("and") <a href="http://www.odata.org/">OData</a> @("endpoints")} for all graduated
and public beta Stack Exchange sites.
</p>
<p>
Expand Down
5 changes: 4 additions & 1 deletion App/StackExchange.DataExplorer/Views/QuerySet/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@
<span class="title">@site.LastPost.ToRelativeTimeSpanMicro()</span>
<span class="desc">most recent </span>
</div>


@if (AppSettings.EnableOdata)
{
<div class="module odata">
<span class="desc image">
<a href="@site.ODataEndpoint" title="Open Data Protocol endpoint for @site.LongName">
Expand All @@ -65,6 +67,7 @@
<a href="@site.ODataEndpoint" title="Open Data Protocol endpoint for @site.LongName" alt="Open Data Protocol endpoint for @site.LongName">OData</a>
</span>
</div>
}
</div>
}

Expand Down
2 changes: 1 addition & 1 deletion App/StackExchange.DataExplorer/Views/Shared/Master.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<head>
@{Site site = Current.Controller.Site;}
<title>@Html.Raw((string)ViewData["PageTitle"])</title>
@if (site != null)
@if (site != null && AppSettings.EnableOdata)
{
@Html.Raw(string.Format("<link rel=\"odata.service\" title=\"{0} OData Endpoint\" href=\"{1}\"/>", site.LongName, site.ODataEndpoint))
}
Expand Down