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 {
background-color: white;
border: 1px solid #BBBBBB;
}
div.browser div.gs_dir_content_files{min-height:330px;}
#curDir {
height: 30px;
......@@ -124,7 +125,7 @@ UL.jqueryFileTree A:hover {
font-weight: bold;
}
.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 {
color: #FFF;
background-color: #c2c2c2;
......
......@@ -2,7 +2,7 @@
background: #e4e4e4;
padding:3px;
/*position:relative;*/
width:757px;
width:930px;
font-size: 14px;
border-radius: 4px 4px 0 0;
}
......@@ -10,9 +10,9 @@
#tabContaier textarea {
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;}
#tabContaier textarea.mb_style{width:560px;}
#tabContaier textarea.mb_style{width:713px;}
#tabContaier > ul{
overflow:hidden;
height:34px;
......
......@@ -39,7 +39,7 @@ th{
}
table.small th{padding: 4px;font-size: 16px;}
textarea {
width:762px;
width:932px;
font-family: 'Helvetica Neue',Tahoma,Helvetica,Arial,sans-serif;
}
......@@ -55,7 +55,7 @@ overflow-y: scroll;
#page
{
margin: 20px auto;
width: 841px;
width: 1014px;
}
#logo{
......@@ -64,8 +64,8 @@ overflow-y: scroll;
#header{
height: 78px;
padding-top: 15px;
width: 847px;
padding-top: 12px;
width: 1014px;
background: url(../images/head.png) no-repeat;
}
......@@ -86,7 +86,7 @@ overflow-y: scroll;
font-weight: normal;
padding-top: 3px;
float: left;
width: 656px;
width: 820px;
height: 22px;
text-align: center;
color: #4c6172;
......@@ -122,8 +122,7 @@ overflow-y: scroll;
margin:0;
margin-top:1px;
padding:0;
margin-left:20px;
height: 36px;
margin-left:40px;
}
.space{
......@@ -132,7 +131,6 @@ overflow-y: scroll;
.wmenu li{
float:left;
background: url(../images/sep.png) left center no-repeat;
}
.wmenu li .title_software{
......@@ -146,7 +144,7 @@ overflow-y: scroll;
padding-left: 20px;
padding-right: 5px;
margin-left:4px;
height: 20px;
height: 18px;
text-shadow:1px 1px 0 #E6EDF2;
}
......@@ -168,17 +166,20 @@ overflow-y: scroll;
.wmenu ul li a{
display:block;
height: 20px;
height: 18px;
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;
padding:8px;
padding-left: 6px;
padding:8px 10px 8px 10px;
}
.wmenu ul li:last-child a {border: none}
.wmenu ul li a:hover, .wmenu ul li a.active{
color:#0271BF;
background:url(../images/menu_hover.png) bottom repeat-x;
color: #000;/*#0271BF;*/
background:#c2c2c2;
}
#main
......@@ -201,12 +202,12 @@ overflow-y: scroll;
.main_head{
height: 15px;
background: url(../images/main_top.png) no-repeat;
width: 794px;
width: 966px;
}
.content{
background: url(../images/content.png) repeat-y;
width: 764px;
width: 936px;
padding: 15px;
padding-top:0;
padding-bottom:0;
......@@ -229,16 +230,16 @@ overflow-y: scroll;
.main_foot{
height: 15px;
background: url(../images/main_bottom.png) no-repeat;
width: 794px;
width: 966px;
}
#footer{
height: 35px;
width: 767px;
width: 934px;
background: url(../images/footer_bg.png) no-repeat;
padding-left: 40px;
padding-right: 40px;
padding-top: 5px;
padding-top: 4px;
text-align: center;
color: #4c6172;
text-shadow: 0px 1px 1px #fff;
......@@ -319,7 +320,8 @@ input[type="radio"], input[type="checkbox"]{
border: 2px solid #87B0D4;
padding: 0;
color: #4c6172;
margin: 15px 59px 15px 59px;
margin: 20px auto;
width: 641px;
}
#home_box a{
......@@ -415,7 +417,7 @@ padding: 10px;height: 80px;padding-bottom:15px;}
}
.file_tree {
width: 752px;
width: 923px;
height: 300px;
border: solid 1px #678dad;
background: #fff;
......@@ -433,7 +435,7 @@ padding: 10px;height: 80px;padding-bottom:15px;}
}
.file_tree_short{
width: 352px;
width: 525px;
height: 170px;
border: solid 1px #678dad;
background: #fff;
......@@ -454,7 +456,7 @@ padding: 10px;height: 80px;padding-bottom:15px;}
}
#contentInfo{
width: 756px;
width: 926px;
border: solid 1px #678dad;
background: #fff;
overflow: auto;
......@@ -503,13 +505,15 @@ h2.hight:hover{
border: none;
background: #f6f7f8;
color: #000;
width: 754px;
width: 926px;
padding: 2px;
height: 450px;
font-size: 13px;
overflow-y: auto;
}
.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;}
.log p{white-space: pre-wrap; width:100%}
.waitting{
margin-left: 10px;
......@@ -557,7 +561,11 @@ h2.hight:hover{
margin: 10px;
margin-top: 20px;
}
label.header {
color: #4C6172;
font-size: 18px;
font-weight: normal;
}
select {
-webkit-appearance: button;
-webkit-border-radius: 2px;
......@@ -655,7 +663,8 @@ a.lshare img{
.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;
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; }
.alert_message{ background: url(../images/alert.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{
#pClose:hover, .close:hover{background:url(../images/close_hover.png) no-repeat 0px 0px;}
.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;}
.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;}
.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;}
.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;}
......@@ -690,10 +699,13 @@ a.lshare img{
.popup td.top img { display: block; }
.popup td#bottomright { background-image: url(../images/bubble-1.png); }
.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 ul{margin:0; padding:0; list-style:none;}
.popup li{border-bottom: 1px dashed #666666; padding:5px; padding-top:5px;}
.popup ul{margin:0; margin-bottom:10px; padding:0; list-style:none;}
.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;}
textarea.parameter {border: solid 1px #678dad; color: #666666; height:110px;}
.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 @@
/* vim: set et sts=4: */
/*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) {
"use strict";
var i,
......@@ -37,6 +24,7 @@ function getCookie(name) {
}
return null;
}
function deleteCookie(name, path, domain) {
"use strict";
if (getCookie(name)) {
......@@ -46,4 +34,20 @@ function deleteCookie(name, path, domain) {
"; 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
var openedlogpage = ""; //content software or instance if the current page is software or instance log, otherwise nothing
var logReadingPosition = 0;
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 () {
"use strict";
if (running) {
......@@ -44,17 +46,21 @@ function clearAll(setStop) {
function getRunningState() {
"use strict";
var size = 0;
var param = {
position: logReadingPosition,
log: (processState !== "Checking" && openedlogpage === processType.toLowerCase()) ? openedlogpage : ""
},
jqxhr = $.post(url, param, function (data) {
setRunningState(data);
size = data.content.position - logReadingPosition;
logReadingPosition = data.content.position;
if (data.content.content !== "") {
$("#salpgridLog").append(data.content.content.toHtmlChar());
$("#salpgridLog")
.scrollTop($("#salpgridLog")[0].scrollHeight - $("#salpgridLog").height());
if (data.content.content !== "") {
$("#salpgridLog").append("<p rel='" + size + "'>" + data.content.content.toHtmlChar() + "</p>");
$("#salpgridLog")
.scrollTop($("#salpgridLog")[0].scrollHeight - $("#salpgridLog").height());
}
}
if (running && processState === "Checking" && openedlogpage !== "") {
$("#salpgridLog").show();
......@@ -67,6 +73,12 @@ function getRunningState() {
})
.complete(function () {
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 () {
getRunningState();
}, speed);
......@@ -83,10 +95,10 @@ function stopProcess() {
sendStop = true;
var urlfor = $SCRIPT_ROOT + "stopSlapgrid",
type = "slapgrid-sr";
type = "slapgrid-sr.pid";
if ($("#instrun").text() === "Stop") {
type = "slapgrid-cp";
if ($("#instrun").text() === "Stop instance") {
type = "slapgrid-cp.pid";
}
$.post(urlfor, {type: type}, function (data) {
//if (data.result) {
......@@ -106,7 +118,7 @@ function stopProcess() {
function bindRun() {
"use strict";
$("#softrun").click(function () {
if ($("#softrun").text() === "Stop") {
if ($("#softrun").text() === "Stop software") {
stopProcess();
} else {
if (!isRunning()) {
......@@ -117,7 +129,7 @@ function bindRun() {
return false;
});
$("#instrun").click(function () {
if ($("#instrun").text() === "Stop") {
if ($("#instrun").text() === "Stop instance") {
stopProcess();
} else {
if (!isRunning()) {
......@@ -138,14 +150,14 @@ function setRunningState(data) {
//change run menu title and style
if (data.software) {
$("#softrun").empty();
$("#softrun").append("Stop");
$("#softrun").append("Stop software");
$("#softrun").css("color", "#0271BF");
$current = $("#softrun");
processType = "Software";
}
if (data.instance) {
$("#instrun").empty();
$("#instrun").append("Stop");
$("#instrun").append("Stop instance");
$("#instrun").css("color", "#0271BF");
$current = $("#instrun");
processType = "Instance";
......@@ -156,11 +168,11 @@ function setRunningState(data) {
running = false; //nothing is currently running
if ($current !== undefined) {
$current.empty();
$current.append("Run");
$current.append("Run " + processType.toLowerCase());
$current.css("color", "#000");
$current = undefined;
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;
......
......@@ -37,7 +37,6 @@ $(document).ready(function () {
$("#info").append(file);
$("input#subfolder").val(file);
$("#md5sum").empty();
path = "";
send = false;
edit = false;
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 @@
</div>
<br/>
<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 id="box0">
<h2>Clone Repository without using HTTPS and SSH</h2><br/>
......@@ -53,7 +53,7 @@
</div>
<div id="box2" style="display:none;">
<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>
<input type="text" name="username" id="username" size='20' value="Enter your username..." /><br/><br/>
<label for='password'>Your password: &nbsp;&nbsp;</label>
......@@ -63,7 +63,7 @@
</div>
</div>
</div>
<div class="menu-box-left" style="width: 115px;">
<div class="menu-box-left">
<ul id="modelist">
<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>
......
......@@ -24,17 +24,15 @@
</form>
<div id="tooltip-editOption" style="display:none">
<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>
<br/><span class="list">Add Project to Develop</span><br/>
<div style="margin-top:3px;border-bottom: 1px dashed #666666; heigth:1px"></div>
<div class="sep"></div>
<span class="list">Add Project to Develop</span>
<ul id="plist">
{% for name in projectList%}
<li><input type="checkbox" name="develop" value="{{name}}" id="{{name}}">
<label>{{name}}</label></li>
<li><input type="checkbox" name="develop" value="{{name}}" id="{{name}}">
<label>{{name}}</label></li>
{% endfor %}
</ul>
<br/>
<a href="#" id="adddevelop" class="lshare">Add to profile</a>
</div>
{% endblock %}
......
......@@ -20,7 +20,7 @@
<ul>
<li><a href="#tab1" class="active">Slapgrid Supervisor</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>
</ul><!-- //Tab buttons -->
<div class="tabDetails">
......@@ -51,7 +51,7 @@
<div id="tab2" class="tabContents">
{% if slap_status %}
<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;">
{% for item in slap_status %}
<div id="box{{item[0]}}" style="display:none;">
......@@ -82,7 +82,7 @@
{% endfor %}
</div>
</div>
<div class="menu-box-left" style="width: 110px;">
<div class="menu-box-left">
<ul id="slappart">
{% for item in slap_status %}
<li><input type="radio" name="slapresponse" id="{{item[0]}}" value="{{item[0]}}" />
......
......@@ -64,19 +64,15 @@
</div>
<div class="wmenu">
<ul>
<li><span class="title_software">Software</span></li>
<li><a href="{{ url_for('editSoftwareProfile') }}">Edit</a></li>
<li><a href="{{ url_for('runSoftwareProfile') }}" id="softrun">Run</a></li>
<li><a href="{{ url_for('viewSoftwareLog') }}">Build log</a></li>
<li><a href="{{ url_for('inspectSoftware') }}">Inspect</a></li>
<li><a id="removeSr" href="#">Remove all</a></li>
<li class="space"><span class="title_instance">Instance</span></li>
<li><a href="{{ url_for('editInstanceProfile') }}">Edit</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>
<li><a href="{{ url_for('editSoftwareProfile') }}">Profiles</a></li>
<li><a href="{{ url_for('runSoftwareProfile') }}" id="softrun">Run software</a></li>
<li><a href="{{ url_for('viewSoftwareLog') }}">Software log</a></li>
<li><a href="{{ url_for('runInstanceProfile') }}" id="instrun">Run instance</a></li>
<li><a href="{{ url_for('viewInstanceLog') }}">Instance log</a></li>
<li><a href="{{ url_for('inspectSoftware') }}">SR result</a></li>
<li><a href="{{ url_for('inspectInstance') }}">Inspect instance</a></li>
<li><a id="removeIst" href="#">Remove instance</a></li>
<li><a href="{{ url_for('browseWorkspace') }}">Workspace</a></li>
</ul>
</div>
<div class="clear"></div>
......@@ -123,7 +119,7 @@
<div id="tooltip-home" style="display:none">
<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>
<ul>
<ul class="menu">
<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('openProject', method='open')}}">Open Software Release</a></li>
......
......@@ -12,9 +12,8 @@
{% endblock %}
{% block body %}
<h2>Inspect software release</h2>
<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">
{%if not softwares %}<option >No Software Release found</option>{% endif %}
{%for soft in softwares %}
......
......@@ -51,18 +51,16 @@
</div>
</form>
<div id="tooltip-option" style="display:none">
<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>
<span class="list first-list">MD5 SUM for the current file</span>
<a id='getmd5' href="#">Get or Update md5sum</a>
<br/><span class="list">Add Project to Develop</span><br/>
<div style="margin-top:3px;border-bottom: 1px dashed #666666; heigth:1px"></div>
<div class="sep"></div>
<span class="list">Add Project to Develop</span>
<ul id="plist">
{% for name in projectList%}
<li><input type="checkbox" name="develop" value="{{name}}" id="{{name}}">
<label>{{name}}</label></li>
<li><input type="checkbox" name="develop" value="{{name}}" id="{{name}}">
<label>{{name}}</label></li>
{% endfor %}
</ul>
<br/>
<a href="#" id="adddevelop" class="lshare">Add to profile</a>
</div>
{% endblock %}
......@@ -24,17 +24,15 @@
</form>
<div id="tooltip-editOption" style="display:none">
<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>
<br/><span class="list">Add Project to Develop</span><br/>
<div style="margin-top:3px;border-bottom: 1px dashed #666666; heigth:1px"></div>
<div class="sep"></div>
<span class="list">Add Project to Develop</span><br/>
<ul id="plist">
{% for name in projectList%}
<li><input type="checkbox" name="develop" value="{{name}}" id="{{name}}">
<label>{{name}}</label></li>
{% endfor %}
</ul>
<br/>
<a href="#" id="adddevelop" class="lshare">Add to profile</a>
</div>
{% endblock %}
......
......@@ -24,17 +24,18 @@
</form>
<div id="tooltip-editOption" style="display:none">
<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>
<br/><span class="list">Add Project to Develop</span><br/>
<div style="margin-top:3px;border-bottom: 1px dashed #666666; heigth:1px"></div>
<div class="sep"></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">
{% for name in projectList%}
<li><input type="checkbox" name="develop" value="{{name}}" id="{{name}}">
<label>{{name}}</label></li>
<li><input type="checkbox" name="develop" value="{{name}}" id="{{name}}">
<label>{{name}}</label></li>
{% endfor %}
</ul>
<br/>
<a href="#" id="adddevelop" class="lshare">Add to profile</a>
</div>
{% endblock %}
......
......@@ -18,6 +18,6 @@
<label for="slow">From time to time</label>
</div>
<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>
{% 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):
"""Return all Softwares Instances process Informations"""
result = Popen([config['supervisor'], config['configuration_file_path'],
'status']).communicate()[0]
regex = "(^unix:.+\.socket)|(^error:).*$"
regex = "(^unix:.+\.socket)|(^error:)|(^watchdog).*$"
supervisord = []
for item in result.split('\n'):
if item.strip() != "":
......@@ -623,10 +623,11 @@ def tail(f, lines=20):
block -= 1
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.
and the last position
limit = max number of caracter to read
"""
BUFSIZ = 1024
f.seek(0, 2)
......@@ -634,8 +635,8 @@ def readFileFrom(f, lastPosition):
block = -1
data = ""
length = bytes
if lastPosition <= 0 and length > 30000:
lastPosition = length-30000
if (lastPosition <= 0 and length > limit) or (length-lastPosition > limit):
lastPosition = length - limit
size = bytes - lastPosition
while bytes > lastPosition:
if abs(block*BUFSIZ) <= size:
......
......@@ -64,6 +64,11 @@ def before_request():
def home():
return render_template('index.html')
# general views
@login_required()
def browseWorkspace():
return render_template('workspace.html')
@app.route("/login")
def login():
return render_template('login.html')
......@@ -114,11 +119,6 @@ def editSoftwareProfile():
@login_required()
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/',
softwares=loadSoftwareRList(app.config))
......@@ -597,8 +597,8 @@ def fileBrowser():
except:
abort(404)
elif opt == 9:
truncateTo = int(request.form.get('truncate', '0')) # XXX not used??
result = file_request.readFile(dir, filename)
truncateTo = int(request.form.get('truncate', '0'))
result = file_request.readFile(dir, filename, truncateTo)
elif opt == 11:
#Upload file
result = file_request.uploadFile(dir, request.files)
......@@ -626,8 +626,7 @@ def editFile():
#Setup List of URLs
app.add_url_rule('/', 'home', home)
app.add_url_rule('/editSoftwareProfile', 'editSoftwareProfile',
editSoftwareProfile)
app.add_url_rule('/editSoftwareProfile', 'editSoftwareProfile', editSoftwareProfile)
app.add_url_rule('/inspectSoftware', 'inspectSoftware', inspectSoftware)
app.add_url_rule('/removeSoftware', 'removeSoftware', removeSoftware)
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