This commit is contained in:
Rick Falkvinge
2017-01-15 18:38:49 +01:00
55 changed files with 1159 additions and 1117 deletions
+1 -1
View File
@@ -77,7 +77,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="CommsTransmitter.cs" />
<Compile Include="Program.cs" />
<Compile Include="BackendLoop.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
File diff suppressed because it is too large Load Diff
+6 -1
View File
@@ -33,7 +33,12 @@ namespace Swarmops.Common.Enums
/// <summary>
/// Totally customized and not stock localized - look up in PositionTitlesCustom table
/// </summary>
Custom
Custom,
/// <summary>
/// These titles are not actual positions, but UX elements (categories, etc)
/// </summary>
UxElement
// Expand with various title names
}
+2 -1
View File
@@ -46,7 +46,8 @@ namespace Swarmops.Common.Enums
Geographic_ActivismLeader, /* dotreports to Operations */
Geographic_ActivismLeaderAssistant,
Geographic_OutreachLeader, /* dotreports to Marketing */
Geographic_OutreachLeaderAssistant
Geographic_OutreachLeaderAssistant,
Geographic_ExpandingSubleaderNode /* Just a UX element, not a position */
// ReSharper restore InconsistentNaming
}
}
+2 -2
View File
@@ -56,8 +56,8 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="SocketServices.cs" />
<Compile Include="Program.cs" />
<Compile Include="MasterServices.cs" />
<Compile Include="FrontendLoop.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
@@ -1,5 +1,6 @@
using System;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Net;
using System.Net.Security;
@@ -8,15 +9,25 @@ using Mono.Unix;
using Mono.Unix.Native;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Swarmops.Logic.Communications;
using Swarmops.Logic.Communications.Payload;
using Swarmops.Logic.ExtensionMethods;
using Swarmops.Logic.Support;
using WebSocketSharp.Server;
namespace Swarmops.Frontend.Socket
{
internal class Program
internal class FrontendLoop
{
static void Main(string[] args)
{
// Check if we're Sandbox
if (PilotInstallationIds.IsPilot(PilotInstallationIds.DevelopmentSandbox))
{
_isSandbox = true;
}
// Disable SSL cert checking (because Mono doesn't have a cert repo, dammit)
Swarmops.Logic.Support.SupportFunctions.DisableSslCertificateChecks();
@@ -31,8 +42,10 @@ namespace Swarmops.Frontend.Socket
Console.WriteLine(" * Swarmops Frontend Socket Server starting up.");
OutboundComm.CreateNotification(null, NotificationResource.System_Startup_Frontend);
_socketServer = new WebSocketServer (12172); // TODO: Read from database
_socketServer.AddWebSocketService<SocketServices> ("/ws");
_socketServer.AddWebSocketService<MasterServices> ("/Master");
// _socketServer.KeepClean = false; // as per the author's recommendation - this may be bad in the long run
_socketServer.Start();
@@ -143,11 +156,27 @@ namespace Swarmops.Frontend.Socket
Console.WriteLine(" * Swarmops Frontend Socket Server exiting");
}
private static WebSocketServer _socketServer;
private static WebSocketServer _socketServer;
private static bool _isSandbox = false;
private static int _sandboxDummy1 = 500;
private static int _sandboxDummy2 = 50000;
private static void OnEveryTenSeconds()
{
_socketServer.WebSocketServices.Broadcast ("{\"messageType\":\"Heartbeat\"}");
if (_isSandbox)
{
_sandboxDummy1 += new Random().Next(10) - 3;
_sandboxDummy2 += new Random().Next(1000) - 200;
JObject data = new JObject();
data["messageType"] = "SandboxUpdate";
data["local"] = _sandboxDummy1.ToString(CultureInfo.InvariantCulture);
data["profit"] = _sandboxDummy2.ToString(CultureInfo.InvariantCulture);
_socketServer.WebSocketServices.Broadcast(data.ToString());
}
}
@@ -11,9 +11,9 @@ using WebSocketSharp.Server;
namespace Swarmops.Frontend.Socket
{
internal class SocketServices: WebSocketBehavior
internal class MasterServices: WebSocketBehavior
{
public SocketServices()
public MasterServices()
{
base.IgnoreExtensions = true; // Necessary to suppress a Deflate exception that kills server otherwise
}
@@ -34,7 +34,7 @@ namespace Swarmops.Frontend.Socket
switch (serverRequest)
{
case "UpdateQueueCounts":
Sessions.Broadcast (Program.GetQueueInfoJson());
Sessions.Broadcast (FrontendLoop.GetQueueInfoJson());
break;
case "Ping":
Sessions.Broadcast("{\"messageType\":\"Heartbeat\"}");
@@ -47,18 +47,22 @@ namespace Swarmops.Frontend.Socket
protected override void OnOpen()
{
Console.WriteLine(" * Attempted socket connection");
string authBase64 = Context.QueryString["Auth"];
authBase64 = Uri.UnescapeDataString (authBase64); // Defensive programming - % sign does not exist in base64 so this won't ever collapse a working encoding
_authority = Authority.FromEncryptedXml (authBase64);
Console.WriteLine(" - - authenticated: " + _authority.Person.Canonical);
base.OnOpen();
if (Context.QueryString["Notify"] != "false")
{
Sessions.Broadcast ("{\"messageType\":\"EditorCount\"," +
String.Format("\"editorCount\":\"{0}\"", Sessions.ActiveIDs.ToArray().Length) + '}');
Send(Program.GetQueueInfoJson());
Send(FrontendLoop.GetQueueInfoJson());
}
}
@@ -144,7 +144,8 @@ namespace Swarmops.Logic.Communications.Payload
public enum NotificationResource
{
Unknown = 0,
System_Startup,
System_Startup_Backend,
System_Startup_Frontend,
System_Exception,
System_DatabaseSchemaUpgraded,
System_DatabaseUpgradeFailed,
@@ -846,18 +846,36 @@ namespace Swarmops.Logic.Resources {
/// <summary>
/// Looks up a localized string similar to Swarmops Backend version [SwarmopsVersion] on host [HostName] has successfully started and connected to database and notification frameworks..
/// </summary>
internal static string System_Startup_Body {
internal static string System_Startup_Backend_Body {
get {
return ResourceManager.GetString("System_Startup_Body", resourceCulture);
return ResourceManager.GetString("System_Startup_Backend_Body", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Swarmops Backend operational.
/// </summary>
internal static string System_Startup_Subject {
internal static string System_Startup_Backend_Subject {
get {
return ResourceManager.GetString("System_Startup_Subject", resourceCulture);
return ResourceManager.GetString("System_Startup_Backend_Subject", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Swarmops Frontend socket server version [SwarmopsVersion] on host [HostName] has successfully started and connected to database and notification frameworks..
/// </summary>
internal static string System_Startup_Frontend_Body {
get {
return ResourceManager.GetString("System_Startup_Frontend_Body", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Swarmops Frontend operational.
/// </summary>
internal static string System_Startup_Frontend_Subject {
get {
return ResourceManager.GetString("System_Startup_Frontend_Subject", resourceCulture);
}
}
@@ -455,12 +455,18 @@ The upgrade will be retried every hour. Some functionality may be disabled until
<data name="System_PublicRootReset_Subject" xml:space="preserve">
<value>Swarmops: Hotwallet public root key reset</value>
</data>
<data name="System_Startup_Body" xml:space="preserve">
<data name="System_Startup_Backend_Body" xml:space="preserve">
<value>Swarmops Backend version [SwarmopsVersion] on host [HostName] has successfully started and connected to database and notification frameworks.</value>
</data>
<data name="System_Startup_Subject" xml:space="preserve">
<data name="System_Startup_Backend_Subject" xml:space="preserve">
<value>Swarmops Backend operational</value>
</data>
<data name="System_Startup_Frontend_Body" xml:space="preserve">
<value>Swarmops Frontend socket server version [SwarmopsVersion] on host [HostName] has successfully started and connected to database and notification frameworks.</value>
</data>
<data name="System_Startup_Frontend_Subject" xml:space="preserve">
<value>Swarmops Frontend operational</value>
</data>
<data name="System_UnrecognizedPayload_Body" xml:space="preserve">
<value>The Swarmops transmission engine on [HostName] has encountered an unknown payload type ([UnrecognizedPayloadType]). This should only happen at very rare occasions in conjunction with upgrades where an upgraded version has to take care of something that changed names in the process, itself a rare phenomenon.
+9
View File
@@ -456,6 +456,15 @@ namespace Swarmops.Logic.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Geographic Subleaders.
/// </summary>
internal static string Position_Geographic_ExpandingSubleaderNode_UxElement {
get {
return ResourceManager.GetString("Position_Geographic_ExpandingSubleaderNode_UxElement", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Information Leader.
/// </summary>
@@ -249,6 +249,10 @@
<data name="Position_Geographic_Deputy_Plural" xml:space="preserve">
<value>Deputies</value>
</data>
<data name="Position_Geographic_ExpandingSubleaderNode_UxElement" xml:space="preserve">
<value>Geographic Subleaders</value>
<comment>Leaders for geographies below the one displayed</comment>
</data>
<data name="Position_Geographic_InfoLeader" xml:space="preserve">
<value>Information Leader</value>
</data>
+1 -1
View File
@@ -44,7 +44,7 @@ namespace Swarmops.Logic.Swarm
DashboardTodo todo = new DashboardTodo();
todo.Description = Logic_Swarm_DashboardTodos.Bitcoin_SetPayoutAddress;
todo.Icon = "/Images/Icons/bitcoin-icon-16px.png";
todo.Icon = "/Images/Icons/bitcoin-icon-256px.png";
todo.JavaScript = "alertify.prompt(decodeURIComponent('" +
Uri.EscapeDataString (
Logic_Swarm_DashboardTodos.Bitcoin_SetPayoutAddress_Prompt.Replace (
+1 -1
View File
@@ -196,7 +196,7 @@ namespace Swarmops.Logic.Swarm
string titleStringUntyped = type.ToString();
string titleStringTyped = titleStringUntyped + "_" + title.ToString();
if (plural)
if (plural && title != PositionTitle.UxElement)
{
titleStringUntyped += "_Plural";
titleStringTyped += "_Plural";
+6 -1
View File
@@ -61,7 +61,12 @@ namespace Swarmops.Logic.Swarm
Tree<Geography> geoTree = geography.Tree;
ForOrganizationGeographyRecurse (geoTree.RootNodes[0], treeResult.RootNodes[0], geographyLeaderTemplate, 2);
Position expandingSubleaderNode =
Position.FromBasic(new BasicPosition(0, PositionLevel.GeographyDefault, organization.Identity, geography.Identity, 0, 0, 0, DateTime.Today,
"Geographic_ExpandingSubleaderNode", "UxElement", false, true, false, false, false, 0, 0, 0, 0)); // UX element, not real position
TreeNode<Position> expandingNode = treeResult.RootNodes[0].AddChild(expandingSubleaderNode);
ForOrganizationGeographyRecurse (geoTree.RootNodes[0], expandingNode, geographyLeaderTemplate, 2);
return treeResult;
}
+10 -1
View File
@@ -19,7 +19,7 @@ namespace Resources.Controls {
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option or rebuild the Visual Studio project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Web.Application.StronglyTypedResourceProxyBuilder", "11.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Web.Application.StronglyTypedResourceProxyBuilder", "14.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Swarm {
@@ -222,6 +222,15 @@ namespace Resources.Controls {
}
}
/// <summary>
/// Looks up a localized string similar to Leaders of subdivisions.
/// </summary>
internal static string Positions_Subleaders {
get {
return ResourceManager.GetString("Positions_Subleaders", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Do Not Terminate.
/// </summary>
@@ -193,4 +193,7 @@
<data name="Positions_CreatePosition" xml:space="preserve">
<value>Create new position...</value>
</data>
<data name="Positions_Subleaders" xml:space="preserve">
<value>Leaders of subdivisions</value>
</data>
</root>
+30 -5
View File
@@ -130,6 +130,7 @@ namespace Swarmops.Frontend.Automation
nodeState = "closed";
}
string expires = string.Empty;
string action = string.Empty;
string assignedName = string.Empty;
@@ -153,6 +154,7 @@ namespace Swarmops.Frontend.Automation
if (localizedPositionName == null)
{
localizedPositionName = @"NULL (" + position.PositionType.ToString() + ")";
string test = position.Localized();
}
if (assignments.Count > 0)
@@ -172,12 +174,35 @@ namespace Swarmops.Frontend.Automation
assignments[0].PersonId == CurrentUser.Identity ? "self='true'" : string.Empty);
}
}
string element = string.Empty;
string element = string.Format("\"id\":\"{0}-1-{8}\",\"positionTitle\":\"{1}\",\"assignedName\":\"{2}\",\"expires\":\"{3}\",\"minMax\":\"{4} / {5}\",\"iconType\":\"{6}\",\"actions\":\"{7}\"",
position.Identity, JsonSanitize (localizedPositionName), JsonSanitize (assignedName), JsonSanitize (expires), position.MinCount,
position.MaxCount == 0? @"&infin;" : position.MaxCount.ToString(CultureInfo.InvariantCulture),
position.MaxCount == 1? "Person" : "Group",
action, position.GeographyId);
if (position.Identity > 0) // regular
{
element =
string.Format(
"\"id\":\"{0}-1-{8}\",\"positionTitle\":\"{1}\",\"assignedName\":\"{2}\",\"expires\":\"{3}\",\"minMax\":\"{4} / {5}\",\"iconType\":\"{6}\",\"actions\":\"{7}\"",
position.Identity, JsonSanitize(localizedPositionName), JsonSanitize(assignedName),
JsonSanitize(expires), position.MinCount,
position.MaxCount == 0
? @"&infin;"
: position.MaxCount.ToString(CultureInfo.InvariantCulture),
position.MaxCount == 1 ? "Person" : "Group",
action, position.GeographyId);
}
else // UX element
{
nodeState = "closed";
element =
string.Format(
"\"id\":\"{0}-1-{8}\",\"positionTitle\":\"{1}\",\"assignedName\":\"\",\"expires\":\"\",\"minMax\":\"\",\"iconType\":\"{6}\",\"actions\":\"\"",
position.Identity, JsonSanitize(localizedPositionName), JsonSanitize(assignedName),
JsonSanitize(expires), position.MinCount,
position.MaxCount == 0
? @"&infin;"
: position.MaxCount.ToString(CultureInfo.InvariantCulture),
position.MaxCount == 1 ? "Person" : "Group",
action, position.GeographyId);
}
// TODO: Add all assignments after the first one right here
+1 -1
View File
@@ -173,7 +173,7 @@
</script>
<table id="<%=this.ClientID %>_tablePositions" title="" class="easyui-treegrid" style="width:680px;height:600px"
<table id="<%=this.ClientID %>_tablePositions" title="" class="easyui-treegrid" style="width:680px<%=this.HeightField%>"
url="/Automation/Json-PositionsTree.aspx?Level=<%=this.Level%>&GeographyId=<%=this.GeographyId %>&Cookie=<%=this.Cookie %>"
rownumbers="false"
animate="true"
@@ -61,6 +61,18 @@ namespace Swarmops.Frontend.Controls.Swarm
public int GeographyId { get; set; }
public string Cookie { get; set; }
public int Height { get; set; }
protected string HeightField
{
get
{
if (Height == 0)
{
return string.Empty;
}
return String.Format(";height={0}px", Height);
}
}
}
}
+8 -13
View File
@@ -1,4 +1,4 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Master-v5.master" AutoEventWireup="true" Inherits="Swarmops.Frontend.Default" Codebehind="Default.aspx.cs" %>
<%@ Page Title="" Language="C#" MasterPageFile="~/Master-v5.master" AutoEventWireup="true" Inherits="Swarmops.Frontend.Default" CodeFile="Default.aspx.cs" %>
<asp:Content ID="Content1" ContentPlaceHolderID="PlaceHolderHead" Runat="Server">
<!-- Odometer -->
@@ -9,34 +9,29 @@
<asp:Content ID="Content2" ContentPlaceHolderID="PlaceHolderMain" Runat="Server">
<div class="box" style="background-image: url(/Images/Other/member-background-istockphoto.jpg); background-size: 700px"><div class="content">
<div class="odometer-wrapper"><div class="elementFloatFar odometer odometer-integer nocents" id="odoGlobalParticipation">12345689.001</div><div class="odometer-label">Current Participants (Testing new code)</div>
<div class="odometer-wrapper"><div class="elementFloatFar odometer odometer-integer nocents" id="odoGlobalParticipation">12342500</div><div class="odometer-label">Current Participants (Testing new code)</div>
</div>
<div class="odometer-wrapper"><div class="elementFloatFar odometer odometer-integer nocents" id="odoActiveParticipation">123689.001</div><div class="odometer-label">Active Participants Last 30 Days (Testing new code)</div>
<div class="odometer-wrapper"><div class="elementFloatFar odometer odometer-integer nocents" id="odoActiveParticipation">125498</div><div class="odometer-label">Active Participants Last 30 Days (Testing new code)</div>
</div>
<hr/>
<div class="odometer-wrapper"><div class="elementFloatFar odometer odometer-integer nocents" id="odoLocalParticipation">123689.001</div><div class="odometer-label">Current Participants Sollentuna</div>
<div class="odometer-wrapper"><div class="elementFloatFar odometer odometer-integer nocents" id="odoLocalParticipation">498.001</div><div class="odometer-label">Current Participants Sollentuna</div>
</div>
</div></div>
<div class="box" style="background-image: url(/Images/Other/coins-background-istockphoto.jpg); background-size: 700px"><div class="content">
<div class="odometer-wrapper"><div class="elementFloatFar odometer odometer-currency" id="odoProfitLossToDate">12345689.001</div><div class="odometer-label">Annual Profit To Date (Testing new code)</div>
<div class="odometer-wrapper"><div class="elementFloatFar odometer odometer-currency" id="odoProfitLossToDate">0.001</div><div class="odometer-label">Annual Profit To Date (Testing new code)</div>
</div></div></div>
<div class="box"><div class="content">
<h2>Dashboard Placeholder</h2>
<p>This system, <em>Swarmops,</em> is under heavy (re)construction. It has been the admin mainstay of the Swedish Pirate Party since 2006, and is being generalized to encompass any organization.</p>
<p>What you see here is the new interface being rewritten on top of the already-running engine. It runs on Debian/Ubuntu servers for frontend and backend.</p>
<p>This notice will be replaced with a proper Dashboard when all the basic functions are in place. You can see functions appear as they are implemented in the menu.</p>
<p>A <a href="http://tinyurl.com/swarmops-plans-2014">rough roadmap</a> says that basic financials are implemented first, then member registry functions, then communications, then responsibilities, then governance. For more on the specific roadmap, go to the <a href="http://scrum.pirateacademy.eu/p/SWARMOPS#project">SCRUM planning</a> for Swarmops.</p>
<p>Look at the Swarmops code on <a href="https://github.com/Swarmops/Swarmops">Github</a> (and feel free to contribute)! Current line count: <!--KaylockCount-->140,936<!--EndKaylock-->.</p>
<p>Use this form to <a href="https://github.com/Swarmops/Swarmops/issues/new">report bugs</a> for these early builds.</p>
<h2><asp:Label ID="LabelHeaderLocal" runat="server" /></h2>
<Swarmops5:TreePositions ID="TreePositions" Level="Geography" runat="server" />
</div></div>
</div></div>
</asp:Content>
+31
View File
@@ -4,6 +4,7 @@ using Swarmops.Logic.Financial;
using Swarmops.Logic.Security;
using Swarmops.Logic.Support;
using Swarmops.Logic.Swarm;
using Swarmops.Logic.Structure;
namespace Swarmops.Frontend
{
@@ -28,6 +29,8 @@ namespace Swarmops.Frontend
InfoBoxLiteral =
"This is a Dashboard placeholder. It will contain a snapshot of the state of things as soon as the basic functions are re-implemented in the new interface.";
InitializePositionPanel();
// If Open Ledgers, redirect to Balance Sheet: Don't show Dashboard
if (CurrentUser.Identity == Person.OpenLedgersIdentity)
@@ -35,5 +38,33 @@ namespace Swarmops.Frontend
Response.Redirect ("/Ledgers/BalanceSheet");
}
}
internal void InitializePositionPanel()
{
Geography displayGeography = CurrentUser.Geography;
if (CurrentAuthority.Position != null && CurrentAuthority.Position.Geography != CurrentUser.Geography)
{
if (CurrentAuthority.Position.Geography == null)
{
displayGeography = Geography.Root;
}
else
{
displayGeography = CurrentAuthority.Position.Geography;
}
}
if (displayGeography.Identity == Geography.RootIdentity)
{
this.LabelHeaderLocal.Text = Resources.Pages.Swarm.LocalOrganization_HeaderGlobal;
}
else
{
this.LabelHeaderLocal.Text = String.Format(Resources.Pages.Swarm.LocalOrganization_Header, displayGeography.Name);
}
this.TreePositions.GeographyId = displayGeography.Identity;
}
}
}
+18
View File
@@ -11,5 +11,23 @@ namespace Swarmops.Frontend {
public partial class Default {
/// <summary>
/// LabelHeaderLocal control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label LabelHeaderLocal;
/// <summary>
/// TreePositions control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Swarmops.Frontend.Controls.Swarm.TreePositions TreePositions;
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

+7 -4
View File
@@ -142,10 +142,13 @@
</script>
<!-- initialize tooltips -->
<!-- initialize socket, tabs, and search -->
<script language="javascript" type="text/javascript">
$(document).ready(function () {
_masterInitializeSocket('<%=CommonV5.JavascriptEscape(this.CurrentAuthority.ToEncryptedXml())%>');
$('#divTabsEditPerson').tabs();
$('#<%=this.SearchBox.ClientID%>').focus(function() {
@@ -176,8 +179,8 @@
</div>-->
<div class="topmenu">
<div class="center980px">
<div class="elementFloatFar" style="padding-top: 10px;"><a href="/User/SelectLanguage"><asp:Image ID="ImageCultureIndicator" runat="server" ImageUrl="~/Images/Flags/uk-24px.png" /></a></div>
<div class="elementFloatFar" style="padding-top: 5px; padding-left: 3px; padding-right: 3px"><a href="javascript:masterBeginEditPerson(0);"><img src="/Images/Icons/iconshock-user-<%=CurrentUser.Gender.ToString().ToLower() %>.png" height="28"/></a></div>
<a href="/User/SelectLanguage"><div id="DivMasterFlag" class="elementFloatFar"><asp:Image ID="ImageCultureIndicator" runat="server" ImageUrl="~/Images/Flags/uk-24px.png" /></div></a>
<div class="elementFloatFar" style="padding-top: 5px; padding-left: 3px; padding-right: 3px"><a href="javascript:masterBeginEditPerson(0);"><div id="DivMasterUserIcon" style="background-image:url('/Images/Icons/iconshock-user-<%=CurrentUser.Gender.ToString().ToLower() %>.png')"></div></a></div>
<div class="topSearchBox" id="divTopSearchBox"><asp:TextBox ID="SearchBox" runat="server" /></div>
<Swarmops5:MainMenu ID="MainMenu" runat="server" />
</div>
@@ -243,7 +246,7 @@
<div class="content">
<asp:Repeater runat="server" ID="RepeaterTodoItems"><ItemTemplate>
<div class="link-row-encaps" onclick="<%# DataBinder.Eval(Container.DataItem, "OnClick") %>" >
<div class="link-row-icon" style="background-image:url('<%# DataBinder.Eval(Container.DataItem, "Icon") %>')"></div>
<div class="link-row-icon" style="background-size: 16px; background-image:url('<%# DataBinder.Eval(Container.DataItem, "Icon") %>')"></div>
<asp:Label ID="Label1" Text='<%# DataBinder.Eval(Container.DataItem, "Description") %>' runat="server" />
</div>
</ItemTemplate></asp:Repeater>
+1 -1
View File
@@ -96,7 +96,7 @@ namespace Swarmops.Frontend
// only check client-side as many server sites de-SSL the connection before reaching the web server
{
if (!Request.Url.ToString().StartsWith ("http://dev.swarmops.com/") &&
!Request.Url.ToString().StartsWith("http://dev-opentest.swarmops.com") &&
!Request.Url.ToString().StartsWith("http://sandbox.swarmops.com/") &&
!Request.Url.ToString().StartsWith("http://localhost:"))
{
if (SystemSettings.RequireSsl)
+4 -4
View File
@@ -1,4 +1,4 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Master-v5.master" AutoEventWireup="true" Inherits="Swarmops.Frontend.Pages.v5.Admin.OrganizationStaffing" Codebehind="OrgStaffing.aspx.cs" %>
<%@ Page Title="" Language="C#" MasterPageFile="~/Master-v5.master" AutoEventWireup="true" Inherits="Swarmops.Frontend.Pages.v5.Admin.OrganizationStaffing" CodeFile="OrgStaffing.aspx.cs" %>
<%@ Register tagPrefix="Swarmops5" tagName="AjaxTextBox" src="~/Controls/v5/Base/AjaxTextBox.ascx" %>
<%@ Register tagPrefix="Swarmops5" tagName="TreePositions" src="~/Controls/v5/Swarm/TreePositions.ascx" %>
@@ -20,15 +20,15 @@
<div id="divTabs" class="easyui-tabs" data-options="tabWidth:70,tabHeight:70">
<div title="<img src='/Images/Icons/iconshock-general-128px.png' width='64' height='64' />">
<h2><asp:Label ID="LabelHeaderStrategic" runat="server" /></h2>
<Swarmops5:TreePositions ID="TreePositionsStrategic" Level="OrganizationStrategic" Cookie="Strategic" runat="server" />
<Swarmops5:TreePositions ID="TreePositionsStrategic" Level="OrganizationStrategic" Cookie="Strategic" Height="600" runat="server" />
</div>
<div title="<img src='/Images/Icons/iconshock-executive-128px.png' width='64' height='64' />">
<h2><asp:Label ID="LabelHeaderExecutive" runat="server" /></h2>
<Swarmops5:TreePositions ID="TreePositionsExecutive" Level="OrganizationExecutive" Cookie="Executive" runat="server" />
<Swarmops5:TreePositions ID="TreePositionsExecutive" Level="OrganizationExecutive" Cookie="Executive" Height="600" runat="server" />
</div>
<div title="<img src='/Images/Icons/iconshock-foreman-128px.png' width='64' height='64' />">
<h2><asp:Label ID="LabelHeaderGeographicDefault" runat="server" /></h2>
<Swarmops5:TreePositions ID="TreePositionsGeographic" Level="GeographyDefault" Cookie="Local" runat="server" />
<Swarmops5:TreePositions ID="TreePositionsGeographic" Level="GeographyDefault" Cookie="Local" Height="600" runat="server" />
</div>
<div title="<img src='/Images/Icons/iconshock-redshirt-128px.png' width='64' height='64' />">
<h2><asp:Label ID="LabelHeaderVolunteers" runat="server" /></h2>
+2 -2
View File
@@ -1,4 +1,4 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Master-v5.master" AutoEventWireup="true" Inherits="Swarmops.Frontend.Pages.Admin.SystemSettingsPage" Codebehind="SystemSettings.aspx.cs" %>
<%@ Page Title="" Language="C#" MasterPageFile="~/Master-v5.master" AutoEventWireup="true" Inherits="Swarmops.Frontend.Pages.Admin.SystemSettingsPage" CodeFile="SystemSettings.aspx.cs" %>
<%@ Register tagPrefix="Swarmops5" tagName="AjaxTextBox" src="~/Controls/v5/Base/AjaxTextBox.ascx" %>
<%@ Register tagPrefix="Swarmops5" tagName="TreePositions" src="~/Controls/v5/Swarm/TreePositions.ascx" %>
<%@ Register tagPrefix="Swarmops5" tagName="DropDown" src="~/Controls/v5/Base/DropDown.ascx" %>
@@ -118,7 +118,7 @@
</div>
<div title="<img src='/Images/Icons/iconshock-group-diversified-64px.png' />">
<h2><asp:Label ID="LabelHeaderSysops" runat="server" /></h2>
<Swarmops5:TreePositions ID="TreePositions" Level="SystemWide" runat="server" />
<Swarmops5:TreePositions ID="TreePositions" Level="SystemWide" runat="server" Height="600" />
</div>
<div title="<img src='/Images/Icons/iconshock-mail-open-64px.png' />">
<h2><asp:Label ID="LabelHeaderCorrespondenceTransmission" runat="server" /></h2>
@@ -1,6 +1,4 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Master-v5.master" AutoEventWireup="true" Inherits="Swarmops.Frontend.Pages.v5.Swarm.LocalOrganization" CodeFile="LocalOrganization.aspx.cs" %>
<%@ Register tagPrefix="Swarmops5" tagName="AjaxTextBox" src="~/Controls/v5/Base/AjaxTextBox.ascx" %>
<%@ Register tagPrefix="Swarmops5" tagName="TreePositions" src="~/Controls/v5/Swarm/TreePositions.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="PlaceHolderHead" Runat="Server">
+63 -1
View File
@@ -1,4 +1,66 @@
var SwarmopsJS = (function() {
// ------------------- _masterSocket functions -----------------------
var _masterSocket;
var _masterSocketHeartbeatsLost;
function _masterInitializeSocket(authenticationTicket) {
if (_masterSocket != null) {
_masterSocket.close();
_masterSocket = null;
}
alertify.log("DEBUG: Opening socket " + getMasterSocketAddress() + "...");
var socketUrl = getMasterSocketAddress() + "?Auth=" + authenticationTicket;
_masterSocket = new WebSocket(socketUrl);
_masterSocket.onopen = function(data) {
alertify.success('Socket Connected!');
if (_masterSocketHeartbeatsLost) {
// Reload all edits and the edit pool. If there are discrepancies, we can probably live with them. (Detect editing?)
alertify.log("Backend connection restored without interruption.");
_masterSocketHeartbeatsLost = false;
}
//watchHeartbeat();
};
_masterSocket.onclose = function(data) { alertify.log("Connection Lost"); };
_masterSocket.onerror = function(data) { alertify.log("Connection Error"); };
_masterSocket.onmessage = function(data) {
console.log(data.data);
var message = $.parseJSON(data.data);
if (message.messageType == "Heartbeat") {
//alertify.log("Master socket heartbeat");
}
else if (message.messageType == "SandboxUpdate") {
if (odoLocalParticipation != undefined) { // Real ugly accessing specific page elements here, but it's temporary
odoLocalParticipation.innerHTML = message.local;
odoGlobalParticipation.innerHTML = 12345678 + message.local * 5;
odoActiveParticipation.innerHTML = 123412 + message.local * 5;
odoProfitLossToDate.innerHTML = (message.profit / 100.0) + 0.001;
}
}
};
}
function getMasterSocketAddress() {
if (location.host.indexOf ("localhost") >= 0) { // Assume dev environment, go for sandbox socket
return 'ws://sandbox.swarmops.com/ws/Master';
} else {
var protocol = ('https:' == document.location.protocol ? 'wss://' : 'ws://');
return protocol + location.host + "/ws/Master";
}
}
// ------------------- SwarmopsJS object ----------------------
var SwarmopsJS = (function () {
var publicSymbols = {},
initFunctions = [];
-53
View File
@@ -1,53 +0,0 @@
<%@ Page Language="C#" AutoEventWireup="true" EnableViewState="true" Inherits="Swarmops.Pages.Security.LoginOld" Codebehind="Login-Old.aspx.cs" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<link href='https://fonts.googleapis.com/css?family=Permanent+Marker' rel='stylesheet' type='text/css' />
<link href='https://fonts.googleapis.com/css?family=Arimo:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css' />
<link href="../Style/style-v5.css" rel="stylesheet" type="text/css" />
<title>Swarmops Alpha - Login</title>
</head>
<body class="loginpage">
<div class="center640px">
<div style="height:100px">&nbsp;</div>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<script type="text/javascript">
//Put your JavaScript code here.
</script>
<div class="loginbox">
<div class="content">
<div class="content">
<div style="width:64px;height:64px;float:left"><img src="/Security/Images/iconshock-fingerprint-scanner-unlock-64px.png" alt="unlock icon" /></div><h1>PIRATEWEB5<span class="loginalphabetasign">&beta;</span> LOGIN</h1>
<div class="box">
<div class="content">
<div class="entryLabelsAdmin">
Login:<br />
Password:<br />
</div>
<div class="entryFieldsAdmin">
<asp:TextBox ID="TextLogin" runat="server" CssClass="textinput" />&nbsp;<br />
<asp:TextBox ID="TextPassword" runat="server" CssClass="textinput" TextMode="Password" />&nbsp;<br />
<div class="button-orange-encaps" style="float:right; margin-top:5px; margin-right:2px;margin-bottom:3px;">
<asp:Button ID="ButtonLogin" runat="server"
Text="Login" onclick="ButtonLogin_Click" CssClass="button button-orange" /></div><br clear="all" />
</div>
<div class="entryValidationAdmin">
<asp:RequiredFieldValidator ID="ValidatorRequired_Login" Text="Please enter a valid login." runat="server" Display="Dynamic" EnableClientScript="false" ControlToValidate="TextLogin" CssClass="" />&nbsp;<asp:Label ID="LabelLoginFailed" runat="server" Visible="false" Text="Login failed, please retry." /><br />
<asp:RequiredFieldValidator ID="ValidatorRequired_Password" Text="Please enter your password." runat="server" Display="Dynamic" EnableClientScript="false" ControlToValidate="TextPassword" CssClass="" />&nbsp;<br />
</div>
<div class="break"></div>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
</body>
</html>
-106
View File
@@ -1,106 +0,0 @@
using System;
using System.Diagnostics;
using System.Threading;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using Swarmops.Basic.Types;
using Swarmops.Basic.Types.Swarm;
using Swarmops.Interface.Support;
using Swarmops.Logic.Security;
using Swarmops.Logic.Support;
using Swarmops.Logic.Swarm;
namespace Swarmops.Pages.Security
{
public partial class LoginOld : Page
{
protected void Page_Load (object sender, EventArgs e)
{
// Check if this is the first run ever. If so, redirect to Init.
if (!SupportFunctions.DatabaseConfigured)
{
Response.Redirect ("/Pages/v5/Init/", true);
return;
}
// If this is the Dev Sandbox, autologin
if (Request.Url.Host == "dev.swarmops.com" &&
PilotInstallationIds.IsPilot (PilotInstallationIds.DevelopmentSandbox))
{
DashboardMessage.Set ("<p>You have been logged on as <strong>Sandbox Administrator</strong> to the Swarmops Development Sandbox.</p><br/><p>This machine runs the latest development build, so you may run into diagnostic code and half-finished features. All data here is bogus test data and is reset every night.</p><br/><p><strong>In other words, welcome, and play away!</strong></p><br/><br/>");
FormsAuthentication.RedirectFromLoginPage ("1,1", true);
}
// THE DAMN BITID NEEDS TO GO INTO ANDROID WALLET SO WE CAN STREAMLINE AND REWRITE THIS POS
this.LabelLoginFailed.Visible = false;
this.TextLogin.Focus();
// Check for SSL and force it
// Special case for CloudFlare deployments - there is a case where somebody will get their connections de-SSLed at the server
string cloudFlareVisitorScheme = Request.Headers["CF-Visitor"];
bool cloudFlareSsl = false;
if (!string.IsNullOrEmpty (cloudFlareVisitorScheme))
{
if (cloudFlareVisitorScheme.Contains ("\"scheme\":\"https\""))
{
cloudFlareSsl = true;
}
}
// TODO: Same thing for Pound deployments
// Rewrite if applicable
if (Request.Url.ToString().StartsWith ("http://") && !cloudFlareSsl)
// only check client-side as many server sites de-SSL the connection before reaching the web server
{
if (!Request.Url.ToString().StartsWith ("http://dev.swarmops.com/") &&
!Request.Url.ToString().StartsWith ("http://localhost:") &&
!Request.Url.ToString().StartsWith ("http://swarmops-"))
{
Response.Redirect (Request.Url.ToString().Replace ("http:", "https:"));
}
}
}
protected void ButtonLogin_Click (object sender, EventArgs e)
{
string loginToken = this.TextLogin.Text;
string password = this.TextPassword.Text;
if (!string.IsNullOrEmpty (loginToken.Trim()) && !string.IsNullOrEmpty (password.Trim()))
{
try
{
BasicPerson authenticatedPerson = Authentication.Authenticate (loginToken,
password);
Person p = Person.FromIdentity (authenticatedPerson.PersonId);
if (p.PreferredCulture != Thread.CurrentThread.CurrentCulture.Name)
p.PreferredCulture = Thread.CurrentThread.CurrentCulture.Name;
// TODO: Determine logged-on organization; possibly ask for clarification
FormsAuthentication.RedirectFromLoginPage (authenticatedPerson.PersonId + ",1", true);
}
catch (Exception exception)
{
Debug.WriteLine (exception.ToString());
this.LabelLoginFailed.Text = exception.ToString();
this.LabelLoginFailed.Visible = true;
this.TextLogin.Focus();
}
}
}
}
}
-87
View File
@@ -1,87 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Swarmops.Pages.Security {
public partial class LoginOld {
/// <summary>
/// form1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// ScriptManager1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.ScriptManager ScriptManager1;
/// <summary>
/// TextLogin control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox TextLogin;
/// <summary>
/// TextPassword control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox TextPassword;
/// <summary>
/// ButtonLogin control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button ButtonLogin;
/// <summary>
/// ValidatorRequired_Login control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator ValidatorRequired_Login;
/// <summary>
/// LabelLoginFailed control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label LabelLoginFailed;
/// <summary>
/// ValidatorRequired_Password control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator ValidatorRequired_Password;
}
}
+15 -8
View File
@@ -565,13 +565,6 @@
<Compile Include="Security\FinalizeLogin.aspx.designer.cs">
<DependentUpon>FinalizeLogin.aspx</DependentUpon>
</Compile>
<Compile Include="Security\Login-Old.aspx.cs">
<DependentUpon>Login-Old.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Security\Login-Old.aspx.designer.cs">
<DependentUpon>Login-Old.aspx</DependentUpon>
</Compile>
<Compile Include="Security\Login.aspx.cs">
<DependentUpon>Login.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@@ -690,6 +683,7 @@
<Content Include="Images\Flags\es-64px.png" />
<Content Include="Images\Flags\fi-24px.png" />
<Content Include="Images\Flags\fi-64px.png" />
<Content Include="Images\Flags\flag-highlight-128px.png" />
<Content Include="Images\Flags\FlagsLicense.txt" />
<Content Include="Images\Flags\fr-24px.png" />
<Content Include="Images\Flags\fr-64px.png" />
@@ -731,8 +725,13 @@
<Content Include="Images\Flags\us-24px.png" />
<Content Include="Images\Icons\bitcoin-icon-128px.png" />
<Content Include="Images\Icons\bitcoin-icon-16px.png" />
<Content Include="Images\Icons\bitcoin-icon-256px.png" />
<Content Include="Images\Icons\iconshock-add-16px.png" />
<Content Include="Images\Icons\iconshock-add-96px.png" />
<Content Include="Images\Icons\iconshock-balloon-128x96px-hot.png" />
<Content Include="Images\Icons\iconshock-balloon-128x96px.png" />
<Content Include="Images\Icons\iconshock-balloon-defer-128x96px-hot.png" />
<Content Include="Images\Icons\iconshock-balloon-defer-128x96px.png" />
<Content Include="Images\Icons\iconshock-balloon-no-128x96px-disabled.png" />
<Content Include="Images\Icons\iconshock-balloon-no-128x96px-hot-disabled.png" />
<Content Include="Images\Icons\iconshock-balloon-no-128x96px-hot.png" />
@@ -744,6 +743,8 @@
<Content Include="Images\Icons\iconshock-balloon-undo-128x96px.png" />
<Content Include="Images\Icons\iconshock-balloon-undo-16px-hot.png" />
<Content Include="Images\Icons\iconshock-balloon-undo-16px.png" />
<Content Include="Images\Icons\iconshock-balloon-wrench-128x96px-hot.png" />
<Content Include="Images\Icons\iconshock-balloon-wrench-128x96px.png" />
<Content Include="Images\Icons\iconshock-balloon-yes-128x96px-disabled.png" />
<Content Include="Images\Icons\iconshock-balloon-yes-128x96px-gold.png" />
<Content Include="Images\Icons\iconshock-balloon-yes-128x96px-hot-disabled.png" />
@@ -811,6 +812,12 @@
<Content Include="Images\Icons\iconshock-settings-16px.png" />
<Content Include="Images\Icons\iconshock-soldier-128px.png" />
<Content Include="Images\Icons\iconshock-star-gold-64px.png" />
<Content Include="Images\Icons\iconshock-stars-1-128x96px.png" />
<Content Include="Images\Icons\iconshock-stars-2-128x96px.png" />
<Content Include="Images\Icons\iconshock-stars-3-128x96px.png" />
<Content Include="Images\Icons\iconshock-stars-4-128x96px.png" />
<Content Include="Images\Icons\iconshock-stars-5-128x96px.png" />
<Content Include="Images\Icons\iconshock-stars-6-128x96px.png" />
<Content Include="Images\Icons\iconshock-switch-red-64px-hot.png" />
<Content Include="Images\Icons\iconshock-switch-red-64px.png" />
<Content Include="Images\Icons\iconshock-user-16px.png" />
@@ -827,6 +834,7 @@
<Content Include="Images\Icons\iconshock-warning-red-24x16px.png" />
<Content Include="Images\Icons\iconshock-warning-red-96px.png" />
<Content Include="Images\Icons\iconshock-workchair-16px.png" />
<Content Include="Images\Icons\iconshock-wrench-128x96px-centered.png" />
<Content Include="Images\Icons\iconshock-wrench-16px-hot.png" />
<Content Include="Images\Icons\iconshock-wrench-16px.png" />
<Content Include="Images\Icons\undo-16px.png" />
@@ -1762,7 +1770,6 @@
<Content Include="Security\Images\iconshock-foreign-key-24px.png" />
<Content Include="Security\Images\iconshock-greentick-16px.png" />
<Content Include="Security\Images\Swarmops-Logo.png" />
<Content Include="Security\Login-Old.aspx" />
<Content Include="Security\Login.aspx" />
<Content Include="Security\RequestPasswordReset.aspx" />
<Content Include="Security\ResetPassword.aspx" />
+1 -2
View File
@@ -111,8 +111,7 @@
color: #000;
}
.odometer.odometer-auto-theme:not(.nocents) .odometer-digit:nth-last-child(1) {
.odometer.odometer-auto-theme:not(.nocents) .odometer-digit:last-child, .odometer.odometer-auto-theme:not(.nocents) .odometer-digit:nth-last-child(1), .odometer.odometer-theme-car:not(.nocents) .odometer-digit:last-child, .odometer.odometer-theme-car:not(.nocents) .odometer-digit:nth-last-child(1) {
display: none;
}
+29
View File
@@ -254,6 +254,28 @@ body.rtl span.buildId {
direction: ltr; /* parentheses freak out unless specified LTR */
}
div#DivMasterUserIcon {
height: 28px;
width: 28px;
background-size: 28px;
background-position-y: 0;
}
div#DivMasterUserIcon:hover {
background-position-y: 28px;
}
div#DivMasterFlag {
margin-top: 6px;
padding-top: 4px;
background-image: url('/Images/Flags/flag-highlight-128px.png');
background-size:0
}
div#DivMasterFlag:hover {
background-size: 28px;
}
/* DASHBOARD THINGS */
.odometer {
@@ -278,6 +300,13 @@ body.rtl .odometer-label {
padding-right: 4px;
}
.odometer.odometer-auto-theme:not(.nocents) .odometer-digit:last-child, .odometer.odometer-auto-theme:not(.nocents) .odometer-digit:nth-last-child(1), .odometer.odometer-theme-car:not(.nocents) .odometer-digit:last-child, .odometer.odometer-theme-car:not(.nocents) .odometer-digit:nth-last-child(1) {
display: none; /* redundant workaround for cent rounding - moved here to escape caching of styles; main file has a cache buster and others don't */
}
/* BARS AND BOXEN */
.mainbar
+25 -11
View File
@@ -2,11 +2,11 @@ ServerName swarmops-frontend
ServerAdmin swarmops-frontend@swarmops.com
DocumentRoot /usr/share/swarmops/frontend/
# Redirect websocket requests to Swarmops FrontSocket server
# With mod_proxy enabled, kill the ability to make unsolicited proxy requests
ProxyRequests Off
ProxyPass "/ws/" "ws:/localhost:12172"
# Explicitly specify Mono version 4
# Point out application folder, explicitly specify Mono version 4
MonoApplications swarmops-frontend "/:/usr/share/swarmops/frontend/"
MonoServerPath swarmops-frontend "/usr/bin/mod-mono-server4"
# Uncomment the line below to enable debugging:
@@ -15,16 +15,30 @@ MonoServerPath swarmops-frontend "/usr/bin/mod-mono-server4"
# Uncomment the line below and enter FQDNs (one or more) for Swarmops if
# running virtual hosts:
# ServerAlias FQDN1 FQDN2 FQDN3 ...
MonoApplications swarmops-frontend "/:/usr/share/swarmops/frontend/"
<Location "/">
# Redirect websocket requests to Swarmops FrontSocket server
<Location "/ws/">
Allow from all
Order allow,deny
SetHandler mono
MonoSetServerAlias swarmops-frontend
SetOutputFilter DEFLATE
SetEnvIfNoCase Request_URI "\.(?:gif|jpe?g|png)$" no-gzip dont-vary
ProxyPass "ws://localhost:12172/"
ProxyPassReverse "ws://localhost:12172/"
</Location>
# Trigger main handler only if Upgrade header is not [Ww]ebsocket
# (because in that particular case, we're passing to socket above)
<Location "/">
<If "! %{HTTP:Upgrade} =~ /[Ww]ebsocket/">
Allow from all
Order allow,deny
SetHandler mono
MonoSetServerAlias swarmops-frontend
SetOutputFilter DEFLATE
SetEnvIfNoCase Request_URI "\.(?:gif|jpe?g|png)$" no-gzip dont-vary
</If>
</Location>
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript
</IfModule>
+1
View File
@@ -40,6 +40,7 @@
<add tagPrefix="Swarmops5" tagName="ExternalScripts" src="~/Controls/v5/UI/ExternalScripts.ascx" />
<add tagPrefix="Swarmops5" tagName="IncludedScripts" src="~/Controls/v5/UI/IncludedScripts.ascx" />
<add tagPrefix="Swarmops5" tagName="MainMenu" src="~/Controls/v5/Base/MainMenu.ascx" />
<add tagPrefix="Swarmops5" tagName="TreePositions" src="~/Controls/v5/Swarm/TreePositions.ascx" />
</controls>
</pages>
</system.web>