From: Jeremy Tan Date: Sun, 6 Oct 2013 11:35:41 +0000 (+0800) Subject: Update gui. Add modified version of Justin's system diagram X-Git-Url: https://git.ucc.asn.au/?p=matches%2FMCTX3420.git;a=commitdiff_plain;h=63d1cc182f50d67679e27826534834784ca6f94d Update gui. Add modified version of Justin's system diagram --- diff --git a/testing/MCTXWeb/README.txt b/testing/MCTXWeb/README.txt index a25342b..808af14 100644 --- a/testing/MCTXWeb/README.txt +++ b/testing/MCTXWeb/README.txt @@ -4,4 +4,7 @@ mctx.debug = true In mctx.gui.js to prevent browser redirects and to enable debug messages. -Debug messages are printed to the browser console. (Ctrl+Shift+K in Firefox) \ No newline at end of file +Debug messages are printed to the browser console. (Ctrl+Shift+K in Firefox) + +Files which are needed to generate stuff for public_html, but that are not +directly displayed go in raw_data_not_for_publication. e.g svg files \ No newline at end of file diff --git a/testing/MCTXWeb/public_html/control.html b/testing/MCTXWeb/public_html/control.html new file mode 100644 index 0000000..71ee445 --- /dev/null +++ b/testing/MCTXWeb/public_html/control.html @@ -0,0 +1,126 @@ + + + + MCTX3420 Web Interface + + + + + + + + + + + + + + + + + +
+ + + +
+
+
Controls
+ Main controls +
+ + + + + + + + + + + + + +
Experiment name
Experiment mode + Strain it + Explode it +
+ + + + +
+
+ Error and warning messages
+ +
+
+ + +
+ + diff --git a/testing/MCTXWeb/public_html/index.html b/testing/MCTXWeb/public_html/index.html index 9f2ab04..e1b769e 100644 --- a/testing/MCTXWeb/public_html/index.html +++ b/testing/MCTXWeb/public_html/index.html @@ -3,12 +3,7 @@ MCTX3420 Web Interface - - - @@ -21,18 +16,10 @@ //Set the welcome bar var name = " " + (mctx.friendlyName ? mctx.friendlyName : ""); $("#welcome-container").text("Welcome"+ name + "!"); - //$("#menu-container").populateNavbar(); - + $("#logout-container").css("display", "block"); $("#logout").click(function () { $("#logout").logout(); }); - - $("#main_controls").submit(function () { - //Validate! - return false; - }); - - $("#errorlog").setErrorLog(); }); }) @@ -49,8 +36,6 @@ Exploding Cans
- @@ -68,79 +53,95 @@
+ +
-
Dashboard
- - Main controls -
- - - - - - - - - - - - - -
Experiment name
Experiment mode - Strain it - Explode it -
- - - - -
-
- Error and warning messages
- -
- -
-
Strain gauges
-
- -
+
Welcome
+

+ Welcome to the MCTX3420 remote pressure vessel experiment site! +

+

+ To explore how this system works, hover over the elements of the + system diagram below. Clicking each element will lead to a new + page that describes that component of the system. +

+

+ To begin a new experiment, use the left navigation pane. +

-
-
Camera Feed
- Camera 1 +
System diagram
+ System diagram + + Client PC + BBB + Electronics + Pneumatics + Sensors + Camera + Strain Can + Explode Can + Enclosure + Mounting + Mounting Area + Enclosure Area + + +
-
diff --git a/testing/MCTXWeb/public_html/login.html b/testing/MCTXWeb/public_html/login.html index caa6185..c833e12 100644 --- a/testing/MCTXWeb/public_html/login.html +++ b/testing/MCTXWeb/public_html/login.html @@ -3,12 +3,7 @@ MCTX3420 Web Interface - - - diff --git a/testing/MCTXWeb/public_html/pintest.html b/testing/MCTXWeb/public_html/pintest.html index 254bd09..bd74562 100644 --- a/testing/MCTXWeb/public_html/pintest.html +++ b/testing/MCTXWeb/public_html/pintest.html @@ -3,12 +3,7 @@ MCTX3420 Web Interface - - - @@ -82,8 +77,6 @@ BBB Pin test (debug only)
- diff --git a/testing/MCTXWeb/public_html/static/jquery.maphilight.min.js b/testing/MCTXWeb/public_html/static/jquery.maphilight.min.js new file mode 100644 index 0000000..ec9d021 --- /dev/null +++ b/testing/MCTXWeb/public_html/static/jquery.maphilight.min.js @@ -0,0 +1 @@ +(function(G){var B,J,C,K,N,M,I,E,H,A,L;J=!!document.createElement("canvas").getContext;B=(function(){var P=document.createElement("div");P.innerHTML='';var O=P.firstChild;O.style.behavior="url(#default#VML)";return O?typeof O.adj=="object":true})();if(!(J||B)){G.fn.maphilight=function(){return this};return }if(J){E=function(O){return Math.max(0,Math.min(parseInt(O,16),255))};H=function(O,P){return"rgba("+E(O.substr(0,2))+","+E(O.substr(2,2))+","+E(O.substr(4,2))+","+P+")"};C=function(O){var P=G('').get(0);P.getContext("2d").clearRect(0,0,P.width,P.height);return P};var F=function(Q,O,R,P,S){P=P||0;S=S||0;Q.beginPath();if(O=="rect"){Q.rect(R[0]+P,R[1]+S,R[2]-R[0],R[3]-R[1])}else{if(O=="poly"){Q.moveTo(R[0]+P,R[1]+S);for(i=2;i').get(0)};K=function(P,T,U,X,O){var V,W,R,S;for(var Q in U){U[Q]=parseInt(U[Q],10)}V='';W=(X.stroke?'strokeweight="'+X.strokeWidth+'" stroked="t" strokecolor="#'+X.strokeColor+'"':'stroked="f"');R='';if(T=="rect"){S=G('')}else{if(T=="poly"){S=G('')}else{if(T=="circ"){S=G('')}}}S.get(0).innerHTML=V+R;G(P).append(S)};N=function(P){var O=G("
"+P.innerHTML+"
");O.children("[name=highlighted]").remove();P.innerHTML=O.html()}}M=function(P){var O,Q=P.getAttribute("coords").split(",");for(O=0;O0)){return }if(U.hasClass("maphilighted")){var P=U.parent();U.insertBefore(P);P.remove();G(Q).unbind(".maphilight").find("area[coords]").unbind(".maphilight")}R=G("
").css({display:"block",background:'url("'+this.src+'")',position:"relative",padding:0,width:this.width,height:this.height});if(Y.wrapClass){if(Y.wrapClass===true){R.addClass(G(this).attr("class"))}else{R.addClass(Y.wrapClass)}}U.before(R).css("opacity",0).css(I).remove();if(B){U.css("filter","Alpha(opacity=0)")}R.append(U);T=C(this);G(T).css(I);T.height=this.height;T.width=this.width;X=function(c){var a,b;b=L(this,Y);if(!b.neverOn&&!b.alwaysOn){a=M(this);K(T,a[0],a[1],b,"highlighted");if(b.groupBy){var Z;if(/^[a-zA-Z][\-a-zA-Z]+$/.test(b.groupBy)){Z=Q.find("area["+b.groupBy+'="'+G(this).attr(b.groupBy)+'"]')}else{Z=Q.find(b.groupBy)}var d=this;Z.each(function(){if(this!=d){var f=L(this,Y);if(!f.neverOn&&!f.alwaysOn){var e=M(this);K(T,e[0],e[1],f,"highlighted")}}})}if(!J){G(T).append("")}}};G(Q).bind("alwaysOn.maphilight",function(){if(V){N(V)}if(!J){G(T).empty()}G(Q).find("area[coords]").each(function(){var Z,a;a=L(this,Y);if(a.alwaysOn){if(!V&&J){V=C(U[0]);G(V).css(I);V.width=U[0].width;V.height=U[0].height;U.before(V)}a.fade=a.alwaysOnFade;Z=M(this);if(J){K(V,Z[0],Z[1],a,"")}else{K(T,Z[0],Z[1],a,"")}}})});G(Q).trigger("alwaysOn.maphilight").find("area[coords]").bind("mouseover.maphilight",X).bind("mouseout.maphilight",function(Z){N(T)});U.before(T);U.addClass("maphilighted")})};G.fn.maphilight.defaults={fill:true,fillColor:"000000",fillOpacity:0.2,stroke:true,strokeColor:"ff0000",strokeOpacity:1,strokeWidth:1,fade:true,alwaysOn:false,neverOn:false,groupBy:false,wrapClass:true,shadow:false,shadowX:0,shadowY:0,shadowRadius:6,shadowColor:"000000",shadowOpacity:0.8,shadowPosition:"outside",shadowFrom:false}})(jQuery); \ No newline at end of file diff --git a/testing/MCTXWeb/public_html/static/mctx.gui.js b/testing/MCTXWeb/public_html/static/mctx.gui.js index 9d0270b..106a4b4 100644 --- a/testing/MCTXWeb/public_html/static/mctx.gui.js +++ b/testing/MCTXWeb/public_html/static/mctx.gui.js @@ -16,7 +16,7 @@ mctx.location = mctx.location.substring(0, mctx.location.lastIndexOf('/')) + "/" mctx.api = location.protocol + "//" + location.host + "/" + "api/"; mctx.expected_api_version = 0; mctx.has_control = false; -//mctx.debug = true; +mctx.debug = true; mctx.statusCodes = { STATUS_OK : 1 diff --git a/testing/MCTXWeb/public_html/static/sbd.png b/testing/MCTXWeb/public_html/static/sbd.png new file mode 100644 index 0000000..4938d31 Binary files /dev/null and b/testing/MCTXWeb/public_html/static/sbd.png differ diff --git a/testing/MCTXWeb/public_html/static/style.css b/testing/MCTXWeb/public_html/static/style.css index 18a6b8e..2ff0cb1 100644 --- a/testing/MCTXWeb/public_html/static/style.css +++ b/testing/MCTXWeb/public_html/static/style.css @@ -37,6 +37,10 @@ a:active { color: #0066BB; } +img { + border: none; +} + .pass { color: #7AE309; font-weight: bold; @@ -49,6 +53,7 @@ a:active { div.centre { text-align: center; + margin: auto; } .bold { @@ -170,6 +175,11 @@ input[type="text"]:focus, input[type="password"]:focus { display: inline-block; } +#header #logout-container { + /* Hide until activated by JavaScript */ + display: none; +} + #header #date { font-size: 12px; } @@ -186,7 +196,6 @@ input[type="text"]:focus, input[type="password"]:focus { #sidebar .title { font-size: 20px; - font-weight: bold; } #sidebar .item { @@ -200,18 +209,18 @@ input[type="text"]:focus, input[type="password"]:focus { min-width: 400px; } -#main .title { - font-size: 24px; - font-weight: bold; - margin-bottom: 0.5em; -} - #main .sub-title { font-size: 18px; font-weight: bold; margin-bottom: 0.25em; } +.title { + font-size: 24px; + font-weight: bold; + margin-bottom: 0.5em; +} + .graph { width: 100%; height: 200px; diff --git a/testing/MCTXWeb/raw_data_not_for_publication/sbd.svg b/testing/MCTXWeb/raw_data_not_for_publication/sbd.svg new file mode 100644 index 0000000..5637133 --- /dev/null +++ b/testing/MCTXWeb/raw_data_not_for_publication/sbd.svg @@ -0,0 +1,492 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + Client PC + + + + + + + Beaglebone + + + + Electronicsboard + + + + Pneumatics + + + + + + + Sensors + + + + Strain can + + + + + + Camera + + + + Explodingcan + + + + + + Controls & + Data Signals + + Pressurised air + + + Control Signals + + + + Controls & + Data Signals + + + Data Signals + Data Signals + + Pressurised air + + Mains electricity + + + + Enclosure + + + + Mounting + + + Interlocks + + diff --git a/testing/MCTXWeb/raw_data_not_for_publication/uwacrest-text.svg b/testing/MCTXWeb/raw_data_not_for_publication/uwacrest-text.svg new file mode 100644 index 0000000..6e64c7d --- /dev/null +++ b/testing/MCTXWeb/raw_data_not_for_publication/uwacrest-text.svg @@ -0,0 +1,151 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/testing/uwacrest-text.svg b/testing/uwacrest-text.svg deleted file mode 100644 index 6e64c7d..0000000 --- a/testing/uwacrest-text.svg +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -