Commit 3d3b9262 authored by remy's avatar remy Committed by jlopez
Browse files

-a

refactoring
parent 28bb7c97
<?php
function printPanel($name) {
echo '
<br/>
<label for="find'.$name.'Packages">Find packages with pattern :</label>
<input type="email" class="form-control" id="find'.$name.'Packages">
<div class="form-check">
<input type="checkbox" class="form-check-input" id="pattern'.$name.'Name" checked>
<label class="form-check-label" for="pattern'.$name.'Name">Pattern on name</label>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input" id="pattern'.$name.'Description" checked>
<label class="form-check-label" for="pattern'.$name.'Description">Pattern on description</label>
</div>
<br/>
<div class="form-group">
<label for="limit'.$name.'" class="font-check-label">Max found :</label>
<select class="custom-select" id="limit'.$name.'">
<option value="5">5</option>
<option value="10" selected="selected">10</option>
<option value="25">25</option>
<option value="50">50</option>
<option value="100">100</option>
<option value="100">200</option>
<option value="1000000000">all</option>
</select>
</div>
<br/>
<button type="button" class="btn btn-primary" onclick="showPackage(\''.$name.'\')">Search</button>
<br/><br/>
<div id="containPackages'.$name.'">
</div>
';
}
\ No newline at end of file
......@@ -13,6 +13,7 @@
session_start ();
require_once "./dao/DBquery.php";
require_once "./inc/php/printPanel.php";
$db = new DBquery();
......@@ -42,47 +43,6 @@ foreach ($db->getAllActiveSectionParent() as $s){
}
}
function printPanel($name) {
echo '
<br/>
<label for="find'.$name.'Packages">Find packages with pattern :</label>
<input type="email" class="form-control" id="find'.$name.'Packages">
<div class="form-check">
<input type="checkbox" class="form-check-input" id="pattern'.$name.'Name" checked>
<label class="form-check-label" for="pattern'.$name.'Name">Pattern on name</label>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input" id="pattern'.$name.'Description" checked>
<label class="form-check-label" for="pattern'.$name.'Description">Pattern on description</label>
</div>
<br/>
<div class="form-group">
<label for="limit'.$name.'" class="font-check-label">Max found :</label>
<select class="custom-select" id="limit'.$name.'">
<option value="5">5</option>
<option value="10" selected="selected">10</option>
<option value="25">25</option>
<option value="50">50</option>
<option value="100">100</option>
<option value="100">200</option>
<option value="1000000000">all</option>
</select>
</div>
<br/>
<button type="button" class="btn btn-primary" onclick="showPackage(\''.$name.'\')">Search</button>
<br/><br/>
<div id="containPackages'.$name.'">
</div>
';
}
?>
<!doctype html>
......@@ -95,7 +55,12 @@ function printPanel($name) {
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css" crossorigin="anonymous">
<link rel="stylesheet" href="./css/style.css">
<!-- local fallbacks -->
<!--link rel="stylesheet" href="./inc/css/bootstrap.min.css">
<link rel="stylesheet" href="./inc/css/jquery.dataTables.min.css" crossorigin="anonymous"-->
<link rel="stylesheet" href="./inc/css/style.css">
<title>wicopa</title>
......@@ -251,6 +216,24 @@ function printPanel($name) {
</div>
</div>
</div>
<br/>
<div class="col-12">
<div class="card border border-dark">
<div class="card-header bg-dark text-light">
Exec line (%Runscript / CMD) :
</div>
<div class="card-body">
<div class="form-group">
<label for="ExecLineInput" class="font-weight-bold">Exec Line :</label>
<input type="text" class="form-control" id="ExecLineInput" value='exec /bin/bash "$@"'>
</div>
</div>
</div>
</div>
</div>
<div class="col-8">
......@@ -300,8 +283,8 @@ function printPanel($name) {
<label for="selectedR" class="font-weight-bold">R version :</label>
<select class="custom-select" id="selectedR">
<option value="0" selected="selected">None</option>
<option value="3.5" >3.5</option>
<option value="0" >None</option>
<option value="3.5" selected="selected">3.5</option>
</select>
</div>
......@@ -470,7 +453,14 @@ function printPanel($name) {
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<script src="https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js" crossorigin="anonymous"></script>
<script src="./js/wicopa.js"></script>
<!-- local fallbacks -->
<!--script src="./inc/js/jquery-3.2.1.slim.min.js"></script>
<script src="./inc/js/popper.min.js"></script>
<script src="./inc/js/bootstrap.min.js"></script>
<script src="./inc/js/jquery.dataTables.min.js"></script-->
<script src="./inc/js/wicopa.js"></script>
<script>
$(function()
......@@ -487,7 +477,6 @@ function printPanel($name) {
echo '';
}
?>
hide_os_rows();
......@@ -495,28 +484,6 @@ function printPanel($name) {
});
function showFormContainer() {
if(PREVIEW !== "") {
var isSingularity = document.getElementById("singularityRadio").checked;
if(isSingularity) {
document.getElementById("typeContainer").value = "Singularity";
} else {
document.getElementById("typeContainer").value = "Docker";
}
document.getElementById("valueContainer").value = PREVIEW;
$('#modalSaveRecipe').modal();
} else {
alert("Generate once before publish file");
}
}
function hide_os_rows() {
var e = document.getElementById("selectedOS");
......@@ -558,7 +525,7 @@ function printPanel($name) {
SELECTED_PACKAGES["Distribution"] = [];
document.getElementById("containDistributionPackages").innerHTML = '';
//document.getElementById("containDistributionPackages").innerHTML = '';
gestionPackageSelected();
}
......
......@@ -20,7 +20,12 @@
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css" crossorigin="anonymous">
<link rel="stylesheet" href="./css/style.css">
<!-- local fallbacks -->
<!--link rel="stylesheet" href="./inc/css/bootstrap.min.css">
<link rel="stylesheet" href="./inc/css/jquery.dataTables.min.css"-->
<link rel="stylesheet" href="./inc/css/style.css">
<title>wicopa</title>
......@@ -89,9 +94,12 @@ echo '<!-- Page Content -->
';
//<!-- jQuery Version 1.11.1 -->
echo '<script src="http://code.jquery.com/jquery-latest.min.js"
type="text/javascript"></script>
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
';
\ No newline at end of file
echo '<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
';
/*echo '<!-- local fallbacks -->
<script src="inc/js/jquery-latest.min.js" type="text/javascript"></script>
<script src="inc/js/bootstrap.min.js" type="text/javascript"></script>
';*/
\ No newline at end of file
......@@ -59,8 +59,13 @@ foreach ($grades as $grade) {
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css" crossorigin="anonymous">
<link rel="stylesheet" href="./css/style.css">
<script src="./js/jscolor.js"></script>
<!-- local fallbacks -->
<!--link rel="stylesheet" href="./inc/css/bootstrap.min.css">
<link rel="stylesheet" href="./inc/css/jquery.dataTables.min.css"-->
<link rel="stylesheet" href="./inc/css/style.css">
<script src="./inc/js/jscolor.js"></script>
<title>wicopa</title>
</head>
......@@ -728,15 +733,13 @@ foreach ($grades as $grade) {
<!-- jQuery Version 1.11.1 -->
<script src="http://code.jquery.com/jquery-latest.min.js"
type="text/javascript"></script>
<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script >
</script>
<!-- local fallbaks -->
<!--script src="inc/js/jquery-latest.min.js" type="text/javascript"></script>
<script src="inc/js/bootstrap.min.js" type="text/javascript"></script-->
</body>
......
Supports Markdown
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