Commit 534a0f22 authored by Alain Takoudjou's avatar Alain Takoudjou

Add a page for workspace directory view

parent bea2a72f
...@@ -60,6 +60,7 @@ UL.jqueryFileTree A:hover { ...@@ -60,6 +60,7 @@ UL.jqueryFileTree A:hover {
background-color: white; background-color: white;
border: 1px solid #BBBBBB; border: 1px solid #BBBBBB;
} }
div.browser div.gs_dir_content_files{min-height:330px;}
#curDir { #curDir {
height: 30px; height: 30px;
...@@ -124,7 +125,7 @@ UL.jqueryFileTree A:hover { ...@@ -124,7 +125,7 @@ UL.jqueryFileTree A:hover {
font-weight: bold; font-weight: bold;
} }
.gs_head{padding: 10px 5px 10px 0;} .gs_head{padding: 10px 5px 10px 0;}
.gs_title{padding-left: 10px; margin:5px 5px 0 0; background: #e4e4e4;} .gs_title{padding-left: 10px; margin:5px 5px 0 0; background: #e4e4e4; height:30px;}
.rowSelected { .rowSelected {
color: #FFF; color: #FFF;
background-color: #c2c2c2; background-color: #c2c2c2;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
background: #e4e4e4; background: #e4e4e4;
padding:3px; padding:3px;
/*position:relative;*/ /*position:relative;*/
width:757px; width:930px;
font-size: 14px; font-size: 14px;
border-radius: 4px 4px 0 0; border-radius: 4px 4px 0 0;
} }
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
#tabContaier textarea { #tabContaier textarea {
width:702px; width:702px;
} }
#tabContaier textarea.slap{white-space: pre-wrap;word-wrap: break-word;overflow: hidden;color: #6F6F6F;width:430px; max-height:120px; #tabContaier textarea.slap{white-space: pre-wrap;word-wrap: break-word;overflow: hidden;color: #6F6F6F;width:616px; max-height:120px;
resize: none; height:18px;padding:3px;min-height:18px;font-size: 13px;} resize: none; height:18px;padding:3px;min-height:18px;font-size: 13px;}
#tabContaier textarea.mb_style{width:560px;} #tabContaier textarea.mb_style{width:713px;}
#tabContaier > ul{ #tabContaier > ul{
overflow:hidden; overflow:hidden;
height:34px; height:34px;
......
...@@ -39,7 +39,7 @@ th{ ...@@ -39,7 +39,7 @@ th{
} }
table.small th{padding: 4px;font-size: 16px;} table.small th{padding: 4px;font-size: 16px;}
textarea { textarea {
width:762px; width:932px;
font-family: 'Helvetica Neue',Tahoma,Helvetica,Arial,sans-serif; font-family: 'Helvetica Neue',Tahoma,Helvetica,Arial,sans-serif;
} }
...@@ -55,7 +55,7 @@ overflow-y: scroll; ...@@ -55,7 +55,7 @@ overflow-y: scroll;
#page #page
{ {
margin: 20px auto; margin: 20px auto;
width: 841px; width: 1014px;
} }
#logo{ #logo{
...@@ -64,8 +64,8 @@ overflow-y: scroll; ...@@ -64,8 +64,8 @@ overflow-y: scroll;
#header{ #header{
height: 78px; height: 78px;
padding-top: 15px; padding-top: 12px;
width: 847px; width: 1014px;
background: url(../images/head.png) no-repeat; background: url(../images/head.png) no-repeat;
} }
...@@ -86,7 +86,7 @@ overflow-y: scroll; ...@@ -86,7 +86,7 @@ overflow-y: scroll;
font-weight: normal; font-weight: normal;
padding-top: 3px; padding-top: 3px;
float: left; float: left;
width: 656px; width: 820px;
height: 22px; height: 22px;
text-align: center; text-align: center;
color: #4c6172; color: #4c6172;
...@@ -122,8 +122,7 @@ overflow-y: scroll; ...@@ -122,8 +122,7 @@ overflow-y: scroll;
margin:0; margin:0;
margin-top:1px; margin-top:1px;
padding:0; padding:0;
margin-left:20px; margin-left:40px;
height: 36px;
} }
.space{ .space{
...@@ -132,7 +131,6 @@ overflow-y: scroll; ...@@ -132,7 +131,6 @@ overflow-y: scroll;
.wmenu li{ .wmenu li{
float:left; float:left;
background: url(../images/sep.png) left center no-repeat;
} }
.wmenu li .title_software{ .wmenu li .title_software{
...@@ -146,7 +144,7 @@ overflow-y: scroll; ...@@ -146,7 +144,7 @@ overflow-y: scroll;
padding-left: 20px; padding-left: 20px;
padding-right: 5px; padding-right: 5px;
margin-left:4px; margin-left:4px;
height: 20px; height: 18px;
text-shadow:1px 1px 0 #E6EDF2; text-shadow:1px 1px 0 #E6EDF2;
} }
...@@ -168,17 +166,20 @@ overflow-y: scroll; ...@@ -168,17 +166,20 @@ overflow-y: scroll;
.wmenu ul li a{ .wmenu ul li a{
display:block; display:block;
height: 20px; height: 18px;
Color:#000; Color:#000;
font-size:14px; /*background: url(../images/sep.png) right center no-repeat;*/
border-right: 1px solid #c2c2c2;
/*font-weight:bold;*/
font-size:15px;
text-decoration:none; text-decoration:none;
padding:8px; padding:8px 10px 8px 10px;
padding-left: 6px;
} }
.wmenu ul li:last-child a {border: none}
.wmenu ul li a:hover, .wmenu ul li a.active{ .wmenu ul li a:hover, .wmenu ul li a.active{
color:#0271BF; color: #000;/*#0271BF;*/
background:url(../images/menu_hover.png) bottom repeat-x; background:#c2c2c2;
} }
#main #main
...@@ -201,12 +202,12 @@ overflow-y: scroll; ...@@ -201,12 +202,12 @@ overflow-y: scroll;
.main_head{ .main_head{
height: 15px; height: 15px;
background: url(../images/main_top.png) no-repeat; background: url(../images/main_top.png) no-repeat;
width: 794px; width: 966px;
} }
.content{ .content{
background: url(../images/content.png) repeat-y; background: url(../images/content.png) repeat-y;
width: 764px; width: 936px;
padding: 15px; padding: 15px;
padding-top:0; padding-top:0;
padding-bottom:0; padding-bottom:0;
...@@ -229,16 +230,16 @@ overflow-y: scroll; ...@@ -229,16 +230,16 @@ overflow-y: scroll;
.main_foot{ .main_foot{
height: 15px; height: 15px;
background: url(../images/main_bottom.png) no-repeat; background: url(../images/main_bottom.png) no-repeat;
width: 794px; width: 966px;
} }
#footer{ #footer{
height: 35px; height: 35px;
width: 767px; width: 934px;
background: url(../images/footer_bg.png) no-repeat; background: url(../images/footer_bg.png) no-repeat;
padding-left: 40px; padding-left: 40px;
padding-right: 40px; padding-right: 40px;
padding-top: 5px; padding-top: 4px;
text-align: center; text-align: center;
color: #4c6172; color: #4c6172;
text-shadow: 0px 1px 1px #fff; text-shadow: 0px 1px 1px #fff;
...@@ -319,7 +320,8 @@ input[type="radio"], input[type="checkbox"]{ ...@@ -319,7 +320,8 @@ input[type="radio"], input[type="checkbox"]{
border: 2px solid #87B0D4; border: 2px solid #87B0D4;
padding: 0; padding: 0;
color: #4c6172; color: #4c6172;
margin: 15px 59px 15px 59px; margin: 20px auto;
width: 641px;
} }
#home_box a{ #home_box a{
...@@ -415,7 +417,7 @@ padding: 10px;height: 80px;padding-bottom:15px;} ...@@ -415,7 +417,7 @@ padding: 10px;height: 80px;padding-bottom:15px;}
} }
.file_tree { .file_tree {
width: 752px; width: 923px;
height: 300px; height: 300px;
border: solid 1px #678dad; border: solid 1px #678dad;
background: #fff; background: #fff;
...@@ -433,7 +435,7 @@ padding: 10px;height: 80px;padding-bottom:15px;} ...@@ -433,7 +435,7 @@ padding: 10px;height: 80px;padding-bottom:15px;}
} }
.file_tree_short{ .file_tree_short{
width: 352px; width: 525px;
height: 170px; height: 170px;
border: solid 1px #678dad; border: solid 1px #678dad;
background: #fff; background: #fff;
...@@ -454,7 +456,7 @@ padding: 10px;height: 80px;padding-bottom:15px;} ...@@ -454,7 +456,7 @@ padding: 10px;height: 80px;padding-bottom:15px;}
} }
#contentInfo{ #contentInfo{
width: 756px; width: 926px;
border: solid 1px #678dad; border: solid 1px #678dad;
background: #fff; background: #fff;
overflow: auto; overflow: auto;
...@@ -503,13 +505,15 @@ h2.hight:hover{ ...@@ -503,13 +505,15 @@ h2.hight:hover{
border: none; border: none;
background: #f6f7f8; background: #f6f7f8;
color: #000; color: #000;
width: 754px; width: 926px;
padding: 2px; padding: 2px;
height: 450px; height: 450px;
font-size: 13px; font-size: 13px;
overflow-y: auto;
} }
.log_btn{border: 1px solid #678dad; border-top:none; height: 22px; width: 654px; margin: 0 40px 10px 40px; .log_btn{border: 1px solid #678dad; border-top:none; height: 22px; width: 654px; margin: 0 40px 10px 40px;
padding:4px 10px 4px 10px; font-size: 16px; color: #4c6172;} padding:4px 10px 4px 10px; font-size: 16px; color: #4c6172;}
.log p{white-space: pre-wrap; width:100%}
.waitting{ .waitting{
margin-left: 10px; margin-left: 10px;
...@@ -557,7 +561,11 @@ h2.hight:hover{ ...@@ -557,7 +561,11 @@ h2.hight:hover{
margin: 10px; margin: 10px;
margin-top: 20px; margin-top: 20px;
} }
label.header {
color: #4C6172;
font-size: 18px;
font-weight: normal;
}
select { select {
-webkit-appearance: button; -webkit-appearance: button;
-webkit-border-radius: 2px; -webkit-border-radius: 2px;
...@@ -655,7 +663,8 @@ a.lshare img{ ...@@ -655,7 +663,8 @@ a.lshare img{
.form input[type=text] ,.form input[type=password] {float:left; width:190px;margin:5px;} .form input[type=text] ,.form input[type=password] {float:left; width:190px;margin:5px;}
.hiddendiv {display: none;white-space: pre-wrap;min-height: 18px;font-size: 13px; .hiddendiv {display: none;white-space: pre-wrap;min-height: 18px;font-size: 13px;
padding:3px;word-wrap: break-word;width:430px; max-height:120px;font-family: 'Helvetica Neue',Tahoma,Helvetica,Arial,sans-serif;} padding:3px;word-wrap: break-word;width:430px; max-height:120px;font-family: 'Helvetica Neue',Tahoma,Helvetica,Arial,sans-serif;}
.list{background: url(../images/menu_dropdown.png) left center no-repeat; padding-left:10px;} .list{display: block;padding: 5px;background: #E7E7E7; margin-bottom:7px;}
div.sep{display:block; height:7px;}
.slidebox{padding:10px; } .slidebox{padding:10px; }
.alert_message{ background: url(../images/alert.png) center no-repeat; height: 26px;} .alert_message{ background: url(../images/alert.png) center no-repeat; height: 26px;}
.error_message{ background: url(../images/exit.png) center no-repeat; height: 26px;} .error_message{ background: url(../images/exit.png) center no-repeat; height: 26px;}
...@@ -666,9 +675,9 @@ a.lshare img{ ...@@ -666,9 +675,9 @@ a.lshare img{
#pClose:hover, .close:hover{background:url(../images/close_hover.png) no-repeat 0px 0px;} #pClose:hover, .close:hover{background:url(../images/close_hover.png) no-repeat 0px 0px;}
.md5sum {margin:10px; font-size:15px;} .md5sum {margin:10px; font-size:15px;}
.title{background: #e4e4e4; width: 100%; height: 25px; padding-top:2px; text-indent: 5px; color: #737373; text-shadow: 0px 1px #FFF;} .title{background: #e4e4e4; width: 100%; height: 25px; padding-top:2px; text-indent: 5px; color: #737373; text-shadow: 0px 1px #FFF;}
.menu-box-left{float:left; width: 120px; font-size:14px; background: #e4e4e4; padding:5px 0 5px 5px; margin-top:10px; .menu-box-left{float:left; width: 135px; font-size:14px; background: #e4e4e4; padding:5px 0 5px 5px; margin-top:10px;
font-size:14px; border-radius: 4px 0 0 4px;} font-size:14px; border-radius: 4px 0 0 4px;}
.menu-box-right{background: #e4e4e4; padding: 5px; float:right; width: 634px; margin-left: -5px; .menu-box-right{background: #e4e4e4; padding: 5px; float:right; width: 745px; margin-left: -5px;
margin-top:10px; box-shadow: 1px 1px 1px #888888;} margin-top:10px; box-shadow: 1px 1px 1px #888888;}
.menu-box-left ul{margin:0px; list-style:none;} .menu-box-left ul{margin:0px; list-style:none;}
.menu-box-left li{padding: 2px; padding-left:10px; padding-right:10px; text-shadow: 0px 1px #fff;border-bottom:1px solid #fff;} .menu-box-left li{padding: 2px; padding-left:10px; padding-right:10px; text-shadow: 0px 1px #fff;border-bottom:1px solid #fff;}
...@@ -690,10 +699,13 @@ a.lshare img{ ...@@ -690,10 +699,13 @@ a.lshare img{
.popup td.top img { display: block; } .popup td.top img { display: block; }
.popup td#bottomright { background-image: url(../images/bubble-1.png); } .popup td#bottomright { background-image: url(../images/bubble-1.png); }
.popup-contents {background: #fff; color: #666666;} .popup-contents {background: #fff; color: #666666;}
.popup a{display: block; font-weight:bold; color: #4DA0C6;} .popup a{display: block; font-weight:bold; color: #4DA0C6; padding-left: 5px;}
.popup a:hover{color: #666666;} .popup a:hover{color: #666666;}
.popup ul{margin:0; padding:0; list-style:none;} .popup ul{margin:0; margin-bottom:10px; padding:0; list-style:none;}
.popup li{border-bottom: 1px dashed #666666; padding:5px; padding-top:5px;} .popup li{border-bottom: 1px dashed #666666; padding:0;}
.popup ul li:last-child{border-bottom:none}
ul.menu li {padding-top:5px; padding-bottom:5px;}
ul.menu{margin-bottom:0;}
.popup-value{display:none;} .popup-value{display:none;}
textarea.parameter {border: solid 1px #678dad; color: #666666; height:110px;} textarea.parameter {border: solid 1px #678dad; color: #666666; height:110px;}
.link{color:#fff; font-weight:bold; text-decoration:none} .link{color:#fff; font-weight:bold; text-decoration:none}
......
slapos/runner/static/images/content.png

192 Bytes | W: | H:

slapos/runner/static/images/content.png

195 Bytes | W: | H:

slapos/runner/static/images/content.png
slapos/runner/static/images/content.png
slapos/runner/static/images/content.png
slapos/runner/static/images/content.png
  • 2-up
  • Swipe
  • Onion skin
slapos/runner/static/images/footer_bg.png

984 Bytes | W: | H:

slapos/runner/static/images/footer_bg.png

1.08 KB | W: | H:

slapos/runner/static/images/footer_bg.png
slapos/runner/static/images/footer_bg.png
slapos/runner/static/images/footer_bg.png
slapos/runner/static/images/footer_bg.png
  • 2-up
  • Swipe
  • Onion skin
slapos/runner/static/images/head.png

1.27 KB | W: | H:

slapos/runner/static/images/head.png

1.4 KB | W: | H:

slapos/runner/static/images/head.png
slapos/runner/static/images/head.png
slapos/runner/static/images/head.png
slapos/runner/static/images/head.png
  • 2-up
  • Swipe
  • Onion skin
slapos/runner/static/images/main_bg_all.png

236 Bytes | W: | H:

slapos/runner/static/images/main_bg_all.png

215 Bytes | W: | H:

slapos/runner/static/images/main_bg_all.png
slapos/runner/static/images/main_bg_all.png
slapos/runner/static/images/main_bg_all.png
slapos/runner/static/images/main_bg_all.png
  • 2-up
  • Swipe
  • Onion skin
slapos/runner/static/images/main_bottom.png

413 Bytes | W: | H:

slapos/runner/static/images/main_bottom.png

421 Bytes | W: | H:

slapos/runner/static/images/main_bottom.png
slapos/runner/static/images/main_bottom.png
slapos/runner/static/images/main_bottom.png
slapos/runner/static/images/main_bottom.png
  • 2-up
  • Swipe
  • Onion skin
slapos/runner/static/images/main_top.png

374 Bytes | W: | H:

slapos/runner/static/images/main_top.png

379 Bytes | W: | H:

slapos/runner/static/images/main_top.png
slapos/runner/static/images/main_top.png
slapos/runner/static/images/main_top.png
slapos/runner/static/images/main_top.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -3,19 +3,6 @@ ...@@ -3,19 +3,6 @@
/* vim: set et sts=4: */ /* vim: set et sts=4: */
/*Cookies Management*/ /*Cookies Management*/
function setCookie(name, value, expires, path, domain, secure) {
"use strict";
if (!expires) {
var today = new Date();
expires = new Date(today.getTime() + 365 * 24 * 60 * 60 * 1000);
}
document.cookie = name + "=" + escape(value) +
"; expires=" + expires.toGMTString() +
((path) ? "; path=" + path : "/") +
((domain) ? "; domain=" + domain : "") +
((secure) ? "; secure" : "");
}
function getCookie(name) { function getCookie(name) {
"use strict"; "use strict";
var i, var i,
...@@ -37,6 +24,7 @@ function getCookie(name) { ...@@ -37,6 +24,7 @@ function getCookie(name) {
} }
return null; return null;
} }
function deleteCookie(name, path, domain) { function deleteCookie(name, path, domain) {
"use strict"; "use strict";
if (getCookie(name)) { if (getCookie(name)) {
...@@ -46,4 +34,20 @@ function deleteCookie(name, path, domain) { ...@@ -46,4 +34,20 @@ function deleteCookie(name, path, domain) {
"; expires=Thu, 01-Jan-70 00:00:01 GMT"; "; expires=Thu, 01-Jan-70 00:00:01 GMT";
} }
} }
function setCookie(name, value, expires, path, domain, secure) {
"use strict";
if (getCookie(name) !== null){
deleteCookie(name);
}
if (!expires) {
var today = new Date();
expires = new Date(today.getTime() + 365 * 24 * 60 * 60 * 1000);
}
document.cookie = name + "=" + escape(value) +
"; expires=" + expires.toGMTString() +
((path) ? "; path=" + path : "/") +
((domain) ? "; domain=" + domain : "") +
((secure) ? "; secure" : "");
}
/**************************/ /**************************/
...@@ -18,6 +18,8 @@ var processState = "Checking"; //define slapgrid running state ...@@ -18,6 +18,8 @@ var processState = "Checking"; //define slapgrid running state
var openedlogpage = ""; //content software or instance if the current page is software or instance log, otherwise nothing var openedlogpage = ""; //content software or instance if the current page is software or instance log, otherwise nothing
var logReadingPosition = 0; var logReadingPosition = 0;
var speed = 5000; var speed = 5000;
var maxLogSize = 100000; //Define the max limit of log to display ~ 2500 lines
var currentLogSize = 0; //Define the size of log actually displayed
var isRunning = function () { var isRunning = function () {
"use strict"; "use strict";
if (running) { if (running) {
...@@ -44,17 +46,21 @@ function clearAll(setStop) { ...@@ -44,17 +46,21 @@ function clearAll(setStop) {
function getRunningState() { function getRunningState() {
"use strict"; "use strict";
var size = 0;
var param = { var param = {
position: logReadingPosition, position: logReadingPosition,
log: (processState !== "Checking" && openedlogpage === processType.toLowerCase()) ? openedlogpage : "" log: (processState !== "Checking" && openedlogpage === processType.toLowerCase()) ? openedlogpage : ""
}, },
jqxhr = $.post(url, param, function (data) { jqxhr = $.post(url, param, function (data) {
setRunningState(data); setRunningState(data);
size = data.content.position - logReadingPosition;
logReadingPosition = data.content.position; logReadingPosition = data.content.position;
if (data.content.content !== "") { if (data.content.content !== "") {
$("#salpgridLog").append(data.content.content.toHtmlChar()); if (data.content.content !== "") {
$("#salpgridLog") $("#salpgridLog").append("<p rel='" + size + "'>" + data.content.content.toHtmlChar() + "</p>");
.scrollTop($("#salpgridLog")[0].scrollHeight - $("#salpgridLog").height()); $("#salpgridLog")
.scrollTop($("#salpgridLog")[0].scrollHeight - $("#salpgridLog").height());
}
} }
if (running && processState === "Checking" && openedlogpage !== "") { if (running && processState === "Checking" && openedlogpage !== "") {
$("#salpgridLog").show(); $("#salpgridLog").show();
...@@ -67,6 +73,12 @@ function getRunningState() { ...@@ -67,6 +73,12 @@ function getRunningState() {
}) })
.complete(function () { .complete(function () {
if (running) { if (running) {
currentLogSize += parseInt(size, 10);
if (currentLogSize > maxLogSize){
//Remove the first element into log div
currentLogSize -= parseInt($("#salpgridLog p:first-child").attr('rel'), 10);
$("#salpgridLog p:first-child").remove();
}
setTimeout(function () { setTimeout(function () {
getRunningState(); getRunningState();
}, speed); }, speed);
...@@ -83,10 +95,10 @@ function stopProcess() { ...@@ -83,10 +95,10 @@ function stopProcess() {
sendStop = true; sendStop = true;
var urlfor = $SCRIPT_ROOT + "stopSlapgrid", var urlfor = $SCRIPT_ROOT + "stopSlapgrid",
type = "slapgrid-sr"; type = "slapgrid-sr.pid";
if ($("#instrun").text() === "Stop") { if ($("#instrun").text() === "Stop instance") {
type = "slapgrid-cp"; type = "slapgrid-cp.pid";
} }
$.post(urlfor, {type: type}, function (data) { $.post(urlfor, {type: type}, function (data) {
//if (data.result) { //if (data.result) {
...@@ -106,7 +118,7 @@ function stopProcess() { ...@@ -106,7 +118,7 @@ function stopProcess() {
function bindRun() { function bindRun() {
"use strict"; "use strict";
$("#softrun").click(function () { $("#softrun").click(function () {
if ($("#softrun").text() === "Stop") { if ($("#softrun").text() === "Stop software") {
stopProcess(); stopProcess();
} else { } else {
if (!isRunning()) { if (!isRunning()) {
...@@ -117,7 +129,7 @@ function bindRun() { ...@@ -117,7 +129,7 @@ function bindRun() {
return false; return false;
}); });
$("#instrun").click(function () { $("#instrun").click(function () {
if ($("#instrun").text() === "Stop") { if ($("#instrun").text() === "Stop instance") {
stopProcess(); stopProcess();
} else { } else {
if (!isRunning()) { if (!isRunning()) {
...@@ -138,14 +150,14 @@ function setRunningState(data) { ...@@ -138,14 +150,14 @@ function setRunningState(data) {
//change run menu title and style //change run menu title and style
if (data.software) { if (data.software) {
$("#softrun").empty(); $("#softrun").empty();
$("#softrun").append("Stop"); $("#softrun").append("Stop software");
$("#softrun").css("color", "#0271BF"); $("#softrun").css("color", "#0271BF");
$current = $("#softrun"); $current = $("#softrun");
processType = "Software"; processType = "Software";
} }
if (data.instance) { if (data.instance) {
$("#instrun").empty(); $("#instrun").empty();
$("#instrun").append("Stop"); $("#instrun").append("Stop instance");
$("#instrun").css("color", "#0271BF"); $("#instrun").css("color", "#0271BF");
$current = $("#instrun"); $current = $("#instrun");
processType = "Instance"; processType = "Instance";
...@@ -156,11 +168,11 @@ function setRunningState(data) { ...@@ -156,11 +168,11 @@ function setRunningState(data) {
running = false; //nothing is currently running running = false; //nothing is currently running
if ($current !== undefined) { if ($current !== undefined) {
$current.empty(); $current.empty();
$current.append("Run"); $current.append("Run " + processType.toLowerCase());
$current.css("color", "#000"); $current.css("color", "#000");
$current = undefined; $current = undefined;
currentState = false; currentState = false;
$("#error").Popup("Slapgrid completely finish running your " + processType + " Profile", {type: 'info', duration: 3000}); $("#error").Popup("Slapgrid finished running your " + processType + " Profile", {type: 'info', duration: 3000});
} }
} }
currentState = data.result; currentState = data.result;
......
...@@ -37,7 +37,6 @@ $(document).ready(function () { ...@@ -37,7 +37,6 @@ $(document).ready(function () {
$("#info").append(file); $("#info").append(file);
$("input#subfolder").val(file); $("input#subfolder").val(file);
$("#md5sum").empty(); $("#md5sum").empty();
path = "";
send = false; send = false;
edit = false; edit = false;
if (file.substr(-1) !== "/") { if (file.substr(-1) !== "/") {
......
/*jslint undef: true */
/*global $, document, window, $SCRIPT_ROOT, ace */
/* vim: set et sts=4: */
$(document).ready(function () {
"use strict";
$('#fileNavigator').gsFileManager({script: $SCRIPT_ROOT + "/fileBrowser", root:'workspace/'});
});
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
</div> </div>
<br/> <br/>
<h2>Set your Security Mode</h2> <h2>Set your Security Mode</h2>
<div class="menu-box-right" style="width: 592px;"> <div class="menu-box-right">
<div style="background:#fff; padding:10px; min-height:100px; font-size:14px;"> <div style="background:#fff; padding:10px; min-height:100px; font-size:14px;">
<div id="box0"> <div id="box0">
<h2>Clone Repository without using HTTPS and SSH</h2><br/> <h2>Clone Repository without using HTTPS and SSH</h2><br/>
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
</div> </div>
<div id="box2" style="display:none;"> <div id="box2" style="display:none;">
<h2>Enter your username and password for https authentication access</h2><br/> <h2>Enter your username and password for https authentication access</h2><br/>
<div style="margin-left:80px; margin-bottom:20px;"> <div style="margin-left:140px; margin-bottom:20px;">
<label for='username'>Your username:&nbsp;&nbsp;</label> <label for='username'>Your username:&nbsp;&nbsp;</label>
<input type="text" name="username" id="username" size='20' value="Enter your username..." /><br/><br/> <input type="text" name="username" id="username" size='20' value="Enter your username..." /><br/><br/>
<label for='password'>Your password: &nbsp;&nbsp;</label> <label for='password'>Your password: &nbsp;&nbsp;</label>
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="menu-box-left" style="width: 115px;"> <div class="menu-box-left">
<ul id="modelist"> <ul id="modelist">
<li class="checked"><input type="radio" name="security" id="nothing" value="nothing" /><label for="nothing">ReadOnly</label></li> <li class="checked"><input type="radio" name="security" id="nothing" value="nothing" /><label for="nothing">ReadOnly</label></li>
<li><input type="radio" name="security" id="ssh" value="SSH" checked /><label for="ssh">SSH Mode</label></li> <li><input type="radio" name="security" id="ssh" value="SSH" checked /><label for="ssh">SSH Mode</label></li>
......
...@@ -24,17 +24,15 @@ ...@@ -24,17 +24,15 @@
</form> </form>
<div id="tooltip-editOption" style="display:none"> <div id="tooltip-editOption" style="display:none">
<span class="list">MD5 SUM for the current file</span> <span class="list">MD5 SUM for the current file</span>
<div style="margin-top:3px; margin-bottom:5px;border-bottom: 1px dashed #666666; heigth:1px"></div>
<a id='getmd5' href="#">Get or Update md5sum</a> <a id='getmd5' href="#">Get or Update md5sum</a>
<br/><span class="list">Add Project to Develop</span><br/> <div class="sep"></div>
<div style="margin-top:3px;border-bottom: 1px dashed #666666; heigth:1px"></div> <span class="list">Add Project to Develop</span>
<ul id="plist"> <ul id="plist">
{% for name in projectList%} {% for name in projectList%}
<li><input type="checkbox" name="develop" value="{{name}}" id="{{name}}"> <li><input type="checkbox" name="develop" value="{{name}}" id="{{name}}">
<label>{{name}}</label></li> <label>{{name}}</label></li>
{% endfor %} {% endfor %}
</ul> </ul>
<br/>
<a href="#" id="adddevelop" class="lshare">Add to profile</a> <a href="#" id="adddevelop" class="lshare">Add to profile</a>
</div> </div>
{% endblock %} {% endblock %}
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<ul> <ul>
<li><a href="#tab1" class="active">Slapgrid Supervisor</a></li> <li><a href="#tab1" class="active">Slapgrid Supervisor</a></li>
<li><a href="#tab2">SLAP Response</a></li> <li><a href="#tab2">SLAP Response</a></li>
<li><a href="#tab3" id="parameterTab">Parameters</a></li> <li><a href="#tab3" id="parameterTab">SLAP Parameters</a></li>
<li><a href="#tab4" id="instancetabfiles">Partitions Content</a></li> <li><a href="#tab4" id="instancetabfiles">Partitions Content</a></li>
</ul><!-- //Tab buttons --> </ul><!-- //Tab buttons -->
<div class="tabDetails"> <div class="tabDetails">
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<div id="tab2" class="tabContents"> <div id="tab2" class="tabContents">
{% if slap_status %} {% if slap_status %}
<p>Uses parameters below to run your application</p> <p>Uses parameters below to run your application</p>
<div class="menu-box-right" style="width: 597px;"> <div class="menu-box-right">
<div style="background:#fff; padding:10px;"> <div style="background:#fff; padding:10px;">
{% for item in slap_status %} {% for item in slap_status %}
<div id="box{{item[0]}}" style="display:none;"> <div id="box{{item[0]}}" style="display:none;">
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
{% endfor %} {% endfor %}
</div> </div>
</div> </div>
<div class="menu-box-left" style="width: 110px;"> <div class="menu-box-left">
<ul id="slappart"> <ul id="slappart">
{% for item in slap_status %} {% for item in slap_status %}
<li><input type="radio" name="slapresponse" id="{{item[0]}}" value="{{item[0]}}" /> <li><input type="radio" name="slapresponse" id="{{item[0]}}" value="{{item[0]}}" />
......
...@@ -64,19 +64,15 @@ ...@@ -64,19 +64,15 @@
</div> </div>
<div class="wmenu"> <div class="wmenu">
<ul> <ul>
<li><span class="title_software">Software</span></li> <li><a href="{{ url_for('editSoftwareProfile') }}">Profiles</a></li>
<li><a href="{{ url_for('editSoftwareProfile') }}">Edit</a></li> <li><a href="{{ url_for('runSoftwareProfile') }}" id="softrun">Run software</a></li>
<li><a href="{{ url_for('runSoftwareProfile') }}" id="softrun">Run</a></li> <li><a href="{{ url_for('viewSoftwareLog') }}">Software log</a></li>
<li><a href="{{ url_for('viewSoftwareLog') }}">Build log</a></li> <li><a href="{{ url_for('runInstanceProfile') }}" id="instrun">Run instance</a></li>
<li><a href="{{ url_for('inspectSoftware') }}">Inspect</a></li> <li><a href="{{ url_for('viewInstanceLog') }}">Instance log</a></li>
<li><a id="removeSr" href="#">Remove all</a></li> <li><a href="{{ url_for('inspectSoftware') }}">SR result</a></li>
<li><a href="{{ url_for('inspectInstance') }}">Inspect instance</a></li>
<li class="space"><span class="title_instance">Instance</span></li> <li><a id="removeIst" href="#">Remove instance</a></li>
<li><a href="{{ url_for('editInstanceProfile') }}">Edit</a></li> <li><a href="{{ url_for('browseWorkspace') }}">Workspace</a></li>
<li><a href="{{ url_for('runInstanceProfile') }}" id="instrun">Run</a></li>
<li><a href="{{ url_for('viewInstanceLog') }}">Build log</a></li>
<li><a href="{{ url_for('inspectInstance') }}">Inspect</a></li>
<li><a id="removeIst" href="#">Remove all</a></li>
</ul> </ul>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
...@@ -123,7 +119,7 @@ ...@@ -123,7 +119,7 @@
<div id="tooltip-home" style="display:none"> <div id="tooltip-home" style="display:none">
<span style="font-weight:bold">QUICK ACCESS TO MENU</span><br/><br/> <span style="font-weight:bold">QUICK ACCESS TO MENU</span><br/><br/>
<div style="margin-top:3px;border-bottom: 1px dashed #666666; heigth:1px"></div> <div style="margin-top:3px;border-bottom: 1px dashed #666666; heigth:1px"></div>
<ul> <ul class="menu">
<li><a href="{{ url_for('manageProject')}}">Manage Repositories</a></li> <li><a href="{{ url_for('manageProject')}}">Manage Repositories</a></li>
<li><a href="{{ url_for('configRepo')}}" >Clone your repository</a></li> <li><a href="{{ url_for('configRepo')}}" >Clone your repository</a></li>
<li><a href="{{ url_for('openProject', method='open')}}">Open Software Release</a></li> <li><a href="{{ url_for('openProject', method='open')}}">Open Software Release</a></li>
......
...@@ -12,9 +12,8 @@ ...@@ -12,9 +12,8 @@
{% endblock %} {% endblock %}
{% block body %} {% block body %}
<h2>Inspect software release</h2>
<input type="hidden" name="runnerdir" id="runnerdir" value="{{softwareRoot}}" /> <input type="hidden" name="runnerdir" id="runnerdir" value="{{softwareRoot}}" />
<label for='softwarelist'>Software Release: </label> <label for='softwarelist' class='header'>Inspect software release </label>
<select name="softwarelist" id="softwarelist"> <select name="softwarelist" id="softwarelist">
{%if not softwares %}<option >No Software Release found</option>{% endif %} {%if not softwares %}<option >No Software Release found</option>{% endif %}
{%for soft in softwares %} {%for soft in softwares %}
......
...@@ -51,18 +51,16 @@ ...@@ -51,18 +51,16 @@
</div> </div>
</form> </form>
<div id="tooltip-option" style="display:none"> <div id="tooltip-option" style="display:none">
<span class="list">MD5 SUM for the current file</span> <span class="list first-list">MD5 SUM for the current file</span>
<div style="margin-top:3px; margin-bottom:5px;border-bottom: 1px dashed #666666; heigth:1px"></div>
<a id='getmd5' href="#">Get or Update md5sum</a> <a id='getmd5' href="#">Get or Update md5sum</a>
<br/><span class="list">Add Project to Develop</span><br/> <div class="sep"></div>
<div style="margin-top:3px;border-bottom: 1px dashed #666666; heigth:1px"></div> <span class="list">Add Project to Develop</span>
<ul id="plist"> <ul id="plist">
{% for name in projectList%} {% for name in projectList%}
<li><input type="checkbox" name="develop" value="{{name}}" id="{{name}}"> <li><input type="checkbox" name="develop" value="{{name}}" id="{{name}}">
<label>{{name}}</label></li> <label>{{name}}</label></li>
{% endfor %} {% endfor %}
</ul> </ul>
<br/>
<a href="#" id="adddevelop" class="lshare">Add to profile</a> <a href="#" id="adddevelop" class="lshare">Add to profile</a>
</div> </div>
{% endblock %} {% endblock %}
...@@ -24,17 +24,15 @@ ...@@ -24,17 +24,15 @@
</form> </form>
<div id="tooltip-editOption" style="display:none"> <div id="tooltip-editOption" style="display:none">
<span class="list">MD5 SUM for the current file</span> <span class="list">MD5 SUM for the current file</span>
<div style="margin-top:3px; margin-bottom:5px;border-bottom: 1px dashed #666666; heigth:1px"></div>
<a id='getmd5' href="#">Get or Update md5sum</a> <a id='getmd5' href="#">Get or Update md5sum</a>
<br/><span class="list">Add Project to Develop</span><br/> <div class="sep"></div>
<div style="margin-top:3px;border-bottom: 1px dashed #666666; heigth:1px"></div> <span class="list">Add Project to Develop</span><br/>
<ul id="plist"> <ul id="plist">
{% for name in projectList%} {% for name in projectList%}
<li><input type="checkbox" name="develop" value="{{name}}" id="{{name}}"> <li><input type="checkbox" name="develop" value="{{name}}" id="{{name}}">
<label>{{name}}</label></li> <label>{{name}}</label></li>
{% endfor %} {% endfor %}
</ul> </ul>
<br/>
<a href="#" id="adddevelop" class="lshare">Add to profile</a> <a href="#" id="adddevelop" class="lshare">Add to profile</a>
</div> </div>
{% endblock %} {% endblock %}
......
...@@ -24,17 +24,18 @@ ...@@ -24,17 +24,18 @@
</form> </form>
<div id="tooltip-editOption" style="display:none"> <div id="tooltip-editOption" style="display:none">
<span class="list">MD5 SUM for the current file</span> <span class="list">MD5 SUM for the current file</span>
<div style="margin-top:3px; margin-bottom:5px;border-bottom: 1px dashed #666666; heigth:1px"></div>
<a id='getmd5' href="#">Get or Update md5sum</a> <a id='getmd5' href="#">Get or Update md5sum</a>
<br/><span class="list">Add Project to Develop</span><br/> <div class="sep"></div>
<div style="margin-top:3px;border-bottom: 1px dashed #666666; heigth:1px"></div> <span class="list">Curent software release</span>
<a href="{{ url_for('editCurrentProject')}}">Edit software release files</a>
<div class="sep"></div>
<span class="list">Add Project to Develop</span>
<ul id="plist"> <ul id="plist">
{% for name in projectList%} {% for name in projectList%}
<li><input type="checkbox" name="develop" value="{{name}}" id="{{name}}"> <li><input type="checkbox" name="develop" value="{{name}}" id="{{name}}">
<label>{{name}}</label></li> <label>{{name}}</label></li>
{% endfor %} {% endfor %}
</ul> </ul>
<br/>
<a href="#" id="adddevelop" class="lshare">Add to profile</a> <a href="#" id="adddevelop" class="lshare">Add to profile</a>
</div> </div>
{% endblock %} {% endblock %}
......
...@@ -18,6 +18,6 @@ ...@@ -18,6 +18,6 @@
<label for="slow">From time to time</label> <label for="slow">From time to time</label>
</div> </div>
<br/> <br/>
<div class="log_content"><textarea class="log" readonly id="salpgridLog"></textarea> <div class="log_content"><div class="log" id="salpgridLog"></div>
<textarea class="log" readonly id="manualLog" style="display:none">{{result}}</textarea></div> <textarea class="log" readonly id="manualLog" style="display:none">{{result}}</textarea></div>
{% endblock %} {% endblock %}
{% extends "layout.html" %}
{% block title %}Browse webrunner workspace{% endblock %}
{% block head %}
{{ super() }}
<script src="{{ url_for('static', filename='js/ace/ace.js') }}" type="text/javascript" charset="utf-8"></script>
<script src="{{ url_for('static', filename='js/ace/theme-crimson_editor.js') }}" type="text/javascript" charset="utf-8"></script>
<script src="{{ url_for('static', filename='js/scripts/workspace.js') }}" type="text/javascript" charset="utf-8"></script>
<link href="{{ url_for('static', filename='css/colorbox.css', _external=False) }}" rel="stylesheet" type="text/css" media="screen" />
<script src="{{ url_for('static', filename='js/jquery/jquery.colorbox-min.js') }}" type="text/javascript" charset="utf-8"></script>
<link href="{{ url_for('static', filename='css/gsFileManager.css', _external=False) }}" rel="stylesheet" type="text/css" media="screen" />
<script src="{{ url_for('static', filename='js/jquery/gsFileManager.js') }}" type="text/javascript" charset="utf-8"></script>
{% endblock %}
{% block body %}
<div id="fileNavigator" class="browser"></div>
{% endblock %}
\ No newline at end of file
...@@ -366,7 +366,7 @@ def getSvcStatus(config): ...@@ -366,7 +366,7 @@ def getSvcStatus(config):
"""Return all Softwares Instances process Informations""" """Return all Softwares Instances process Informations"""
result = Popen([config['supervisor'], config['configuration_file_path'], result = Popen([config['supervisor'], config['configuration_file_path'],
'status']).communicate()[0] 'status']).communicate()[0]
regex = "(^unix:.+\.socket)|(^error:).*$" regex = "(^unix:.+\.socket)|(^error:)|(^watchdog).*$"
supervisord = [] supervisord = []
for item in result.split('\n'): for item in result.split('\n'):
if item.strip() != "": if item.strip() != "":
...@@ -623,10 +623,11 @@ def tail(f, lines=20): ...@@ -623,10 +623,11 @@ def tail(f, lines=20):
block -= 1 block -= 1
return '\n'.join(''.join(data).splitlines()[-lines:]) return '\n'.join(''.join(data).splitlines()[-lines:])
def readFileFrom(f, lastPosition): def readFileFrom(f, lastPosition, limit=15000):
""" """
Returns the last lines of file `f`, from position lastPosition. Returns the last lines of file `f`, from position lastPosition.
and the last position and the last position
limit = max number of caracter to read
""" """
BUFSIZ = 1024 BUFSIZ = 1024
f.seek(0, 2) f.seek(0, 2)
...@@ -634,8 +635,8 @@ def readFileFrom(f, lastPosition): ...@@ -634,8 +635,8 @@ def readFileFrom(f, lastPosition):
block = -1 block = -1
data = "" data = ""
length = bytes length = bytes
if lastPosition <= 0 and length > 30000: if (lastPosition <= 0 and length > limit) or (length-lastPosition > limit):
lastPosition = length-30000 lastPosition = length - limit
size = bytes - lastPosition size = bytes - lastPosition
while bytes > lastPosition: while bytes > lastPosition:
if abs(block*BUFSIZ) <= size: if abs(block*BUFSIZ) <= size:
......
...@@ -64,6 +64,11 @@ def before_request(): ...@@ -64,6 +64,11 @@ def before_request():
def home(): def home():
return render_template('index.html') return render_template('index.html')
# general views
@login_required()
def browseWorkspace():
return render_template('workspace.html')
@app.route("/login") @app.route("/login")
def login(): def login():
return render_template('login.html') return render_template('login.html')
...@@ -114,11 +119,6 @@ def editSoftwareProfile(): ...@@ -114,11 +119,6 @@ def editSoftwareProfile():
@login_required() @login_required()
def inspectSoftware(): def inspectSoftware():
if not os.path.exists(app.config['software_root']):
result = ""
else:
result = app.config['software_root']
# XXX not used??
return render_template('runResult.html', softwareRoot='software_link/', return render_template('runResult.html', softwareRoot='software_link/',
softwares=loadSoftwareRList(app.config)) softwares=loadSoftwareRList(app.config))
...@@ -597,8 +597,8 @@ def fileBrowser(): ...@@ -597,8 +597,8 @@ def fileBrowser():
except: except:
abort(404) abort(404)
elif opt == 9: elif opt == 9:
truncateTo = int(request.form.get('truncate', '0')) # XXX not used?? truncateTo = int(request.form.get('truncate', '0'))
result = file_request.readFile(dir, filename) result = file_request.readFile(dir, filename, truncateTo)
elif opt == 11: elif opt == 11:
#Upload file #Upload file
result = file_request.uploadFile(dir, request.files) result = file_request.uploadFile(dir, request.files)
...@@ -626,8 +626,7 @@ def editFile(): ...@@ -626,8 +626,7 @@ def editFile():
#Setup List of URLs #Setup List of URLs
app.add_url_rule('/', 'home', home) app.add_url_rule('/', 'home', home)
app.add_url_rule('/editSoftwareProfile', 'editSoftwareProfile', app.add_url_rule('/editSoftwareProfile', 'editSoftwareProfile', editSoftwareProfile)
editSoftwareProfile)
app.add_url_rule('/inspectSoftware', 'inspectSoftware', inspectSoftware) app.add_url_rule('/inspectSoftware', 'inspectSoftware', inspectSoftware)
app.add_url_rule('/removeSoftware', 'removeSoftware', removeSoftware) app.add_url_rule('/removeSoftware', 'removeSoftware', removeSoftware)
app.add_url_rule('/runSoftwareProfile', 'runSoftwareProfile', app.add_url_rule('/runSoftwareProfile', 'runSoftwareProfile',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment