Skip to content

Commit

Permalink
Merge Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewste committed Mar 16, 2013
1 parent 384eb9c commit dc105bf
Show file tree
Hide file tree
Showing 4 changed files with 429 additions and 0 deletions.
Binary file added GUI2/OSA.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
96 changes: 96 additions & 0 deletions WebUI/MasterPage.master.orig
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>

<!DOCTYPE html>

<html lang="en">
<head runat="server">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Open Source Automation</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">

<!-- Le styles -->
<link href="bootstrap/css/bootstrap.css" rel="stylesheet" type="text/css">
<link href="css/style.css" rel="stylesheet" type="text/css">
<link href="bootstrap/css/bootstrap-responsive.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="bootstrap/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="includes/osae.js"></script>
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

<!-- Le fav and touch icons -->
</head>
<body>
<form id="form2" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container-fluid">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="http://www.opensourceautomation.com/">Open Source Automation</a>
<div class="nav-collapse">
<%-- <asp:Menu class="nav" ID="primaryMenu" runat="server" Orientation="Horizontal" RenderingMode="List">
<Items>
<asp:MenuItem Text="Logs" Value="Logs">
<asp:MenuItem Text="Event Logs" Value="Event Logs"></asp:MenuItem>
<asp:MenuItem Text="Server Logs" Value="Server Logs"></asp:MenuItem>
</asp:MenuItem>
<asp:MenuItem NavigateUrl="~/objtypes.aspx" Text="Object Types" Value="Object Types"></asp:MenuItem>
</Items>
</asp:Menu>--%>
<ul class="nav">

<%--<li><a href="screens.aspx">Screens</a></li>--%>
<li><a href="objects.aspx">Objects</a></li>
<li><a href="objtypes.aspx">Object Types</a></li>
<li><a href="scripts.aspx">Named Scripts</a></li>
<li><a href="editor.aspx">Script Editor</a></li>
<li><a href="schedules.aspx">Schedules</a></li>
<<<<<<< HEAD
<%--<li><a href="plugins.aspx">Plugins</a></li>
<li><a href="analytics.aspx">Analytics</a></li>--%>
=======
<li><a href="plugins.aspx">Plugins</a></li>
<li><a href="analytics.aspx">Analytics</a></li>
<li><a href="eventlogs.aspx">Event Logs</a></li>
>>>>>>> pr/n51_matthewste
</ul>
</div>
<!--/.nav-collapse -->
</div>
</div>
</div>


<div class="container-fluid">

<div>
<asp:ContentPlaceHolder ID="ContentPlaceHolder" runat="server">
</asp:ContentPlaceHolder>
</div>
<hr>

<footer>
<p>&copy; Open Source Automation 2013</p>
</footer>

</div>
<!--/.fluid-container-->

</form>
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script type="text/javascript" src="bootstrap/js/bootstrap-transition.js"></script>
<script type="text/javascript" src="bootstrap/js/bootstrap-collapse.js"></script>
<script type="text/javascript" src="bootstrap/js/bootstrap-dropdown.js"></script>
</body>
</html>

151 changes: 151 additions & 0 deletions WebUI/patterns.aspx
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="patterns.aspx.cs" Inherits="patterns" EnableEventValidation="false" MaintainScrollPositionOnPostback="true"%>
<%@ Implements Interface="System.Web.UI.IPostBackEventHandler" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder" Runat="Server">
<script>
window.onload = function () {
var strCook = document.cookie;
if (strCook.indexOf("!~") != 0) {
var intS = strCook.indexOf("!~");
var intE = strCook.indexOf("~!");
var strPos = strCook.substring(intS + 2, intE);
document.getElementById("PatternsGrid").scrollTop = strPos;
}
if (strCook.indexOf("$~") != 0) {
var intS = strCook.indexOf("$~");
var intE = strCook.indexOf("~$");
var strPos = strCook.substring(intS + 2, intE);
document.getElementById("MatchesGrid").scrollTop = strPos;
}
if (strCook.indexOf("#~") != 0) {
var intS = strCook.indexOf("#~");
var intE = strCook.indexOf("~#");
var strPos = strCook.substring(intS + 2, intE);
document.getElementById("ScriptGrid").scrollTop = strPos;
}
}
function SetPatternDivPosition() {
var intY = document.getElementById("PatternsGrid").scrollTop;
document.cookie = "yPos=!~" + intY + "~!";
}
function SetMatchScriptDivPosition() {
var intY = document.getElementById("MatchesGrid").scrollTop;
document.cookie = "yPos=$~" + intY + "~$";
}
function SetScriptDivPosition() {
var intY = document.getElementById("ScriptGrid").scrollTop;
document.cookie = "yPos=#~" + intY + "~#";
}
</script>
<style type="text/css" media="screen">
#editor {
position:relative;
width: 100%;
height: 100%;
}
</style>

<div class="row-fluid">
<div class="span4">
<div class="row-fluid">
<div class="span12">
<div class="row-fluid" ID="PatternsGrid" style="overflow: auto; max-height:650px;" onscroll="SetPatternDivPosition()">
<asp:GridView runat="server" ID="gvPatterns"
AutoGenerateColumns="False"
GridLines="None"
CssClass="mGrid" ShowHeader="true"
AlternatingRowStyle-CssClass="alt" OnRowDataBound="gvPatterns_RowDataBound" DataKeyNames="pattern,pattern_id">
<Columns>
<asp:BoundField DataField="pattern" HeaderText="Pattern" />
<asp:BoundField DataField="pattern_id" Visible="false" />
</Columns>
</asp:GridView>
</div>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<br />
<asp:TextBox runat="server" ID="txtPattern" class="input-large"></asp:TextBox>
<asp:Button runat="server" ID="btnPatternSave" class="btn" OnClick="btnPatternAdd_Click" Text="Add" /> &nbsp;
<asp:Button runat="server" ID="btnPatternDelete" class="btn" OnClick="btnPatternDelete_Click" Text="Delete"/>
</div>
</div>
</div>
<div class="span4">
<div class="row-fluid">
<div class="span12">
<div class="row-fluid" ID="MatchesGrid" style="overflow: auto; max-height:650px;" onscroll="SetMatchDivPosition()">
<asp:GridView runat="server" ID="gvMatches"
AutoGenerateColumns="False"
GridLines="None"
CssClass="mGrid" ShowHeader="true"
AlternatingRowStyle-CssClass="alt" OnRowDataBound="gvMatches_RowDataBound" DataKeyNames="match,match_id">
<Columns>
<asp:BoundField DataField="match" HeaderText="Match" />
<asp:BoundField DataField="match_id" Visible="false" />
</Columns>
</asp:GridView>
</div>
</div>
</div>
<div class="row-fluid">
<div class="span12" style="text-align:right;">
<asp:Panel runat="server" ID="pnlMatchForm" Visible ="false">
<br />
<asp:TextBox runat="server" ID="txtMatch" class="input-large"></asp:TextBox>
<asp:Button runat="server" ID="btnMatchAdd" class="btn" OnClick="btnMatchAdd_Click" Text="Add" /> &nbsp;
<asp:Button runat="server" ID="btnMatchDelete" class="btn" OnClick="btnMatchDelete_Click" Text="Delete"/>
</asp:Panel>
</div>
</div>
</div>
<div class="span4">
<div class="row-fluid">
<div class="span12">
<div class="row-fluid" ID="scriptGrid" style="overflow: auto; max-height:650px; " onscroll="SetScriptDivPosition()">
<asp:GridView runat="server" ID="gvScripts"
AutoGenerateColumns="False"
GridLines="None"
CssClass="mGrid" ShowHeader="true"
AlternatingRowStyle-CssClass="alt" OnRowDataBound="gvScripts_RowDataBound" DataKeyNames="script_name,script_sequence, pattern_script_id">
<Columns>
<asp:BoundField DataField="script_name" HeaderText="Script" />
<asp:BoundField DataField="script_sequence" HeaderText="Sequence" />
<asp:BoundField DataField="pattern_script_id" Visible="False" />
</Columns>
</asp:GridView>
</div>
</div>
</div>
<div class="row-fluid">
<div class="span12" style="text-align:right;">
<asp:Panel runat="server" ID="pnlScriptForm" Visible ="false">
<br />
<asp:DropDownList runat="server" ID="ddlScript" datatextfield="Text" datavaluefield="Value" ></asp:DropDownList>
<asp:Button runat="server" ID="btnScriptAdd" class="btn" OnClick="btnScriptAdd_Click" Text="Add" /> &nbsp;
<asp:Button runat="server" ID="btnScriptDelete" class="btn" OnClick="btnScriptDelete_Click" Text="Delete"/>
</asp:Panel>
</div>
</div>
</div>
</div>

<asp:HiddenField runat="server" ID="hdnScript"></asp:HiddenField>
<asp:Label runat="server" ID="hdnSelectedPatternRow" Visible="false"></asp:Label>
<asp:Label runat="server" ID="hdnSelectedPatternName" Visible="false"></asp:Label>
<asp:Label runat="server" ID="hdnSelectedMatchRow" Visible="false"></asp:Label>
<asp:Label runat="server" ID="hdnSelectedMatchID" Visible="false"></asp:Label>
<asp:Label runat="server" ID="hdnSelectedMatchName" Visible="false"></asp:Label>
<asp:Label runat="server" ID="hdnSelectedScriptRow" Visible="false"></asp:Label>
<asp:Label runat="server" ID="hdnSelectedScriptID" Visible="false"></asp:Label>
<script src="js/ace.js" type="text/javascript" charset="utf-8"></script>
<script>
var editor = ace.edit("editor");
editor.setTheme("ace/theme/tomorrow");
//editor.getSession().setMode("ace/mode/javascript");
editor.setValue(document.getElementById('<%=hdnScript.ClientID%>').value);
</script>
</asp:Content>

Loading

0 comments on commit dc105bf

Please sign in to comment.