Skip to content
Snippets Groups Projects
Commit 0180cf15 authored by hahn's avatar hahn
Browse files

- project overview page:

  - scrolling
  - no detail button
  - smaller folder image
- Scroll to top of page
- delete project: red button
- removed builld and cleanup from menu
- Action-Log with AJAX request and form class
parent ba54ba30
No related branches found
No related tags found
No related merge requests found
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
"menu-overview": "zur Übersicht", "menu-overview": "zur Übersicht",
"menu-projects": "Projekte", "menu-projects": "Projekte",
"menu-settings": "Einstellungen", "menu-settings": "Einstellungen",
"menu-logs": "Logs",
"menu-new-project": "Neues Projekt anlegen", "menu-new-project": "Neues Projekt anlegen",
"menu-project-home": "Projekt Home", "menu-project-home": "Projekt Home",
"menu-project-actions": "Aktionen", "menu-project-actions": "Aktionen",
...@@ -31,6 +32,12 @@ ...@@ -31,6 +32,12 @@
"class-actionlog-title": "Action-Log", "class-actionlog-title": "Action-Log",
"class-actionlog-filter": "Filter", "class-actionlog-filter": "Filter",
"class-actionlog-nolog": "Hinweis: Es wurden keine Logeinträge gefunden.", "class-actionlog-nolog": "Hinweis: Es wurden keine Logeinträge gefunden.",
"class-actionlog-time": "Zeitfenster",
"class-actionlog-time-today": "heute",
"class-actionlog-time-since-yesterday": "seit gestern",
"class-actionlog-time-for-1-week": "seit 1 Woche",
"class-actionlog-time-for-n-weeks": "seit %s Wochen",
"class-actionlog-count": "Anzahl",
"class-pl-error-no-project": "<strong>Hinweis</strong><br>Es wurde noch kein Projekt eingerichtet.", "class-pl-error-no-project": "<strong>Hinweis</strong><br>Es wurde noch kein Projekt eingerichtet.",
...@@ -244,6 +251,7 @@ ...@@ -244,6 +251,7 @@
"setup-hint": "Einstellungen &auml;ndern/ anpassen", "setup-hint": "Einstellungen &auml;ndern/ anpassen",
"setup-metadata": "Allgemeine Metadaten", "setup-metadata": "Allgemeine Metadaten",
"setup-hint-build": "Einstellungen zum Erstellen eines neuen Builds. Es werden Zugriffsdaten auf das Repository benötigt.<br>Der Fileprefix bestimmt einen Teil des Dateinamens und wird auch in Puppet konfiguriert. Er darf nach eingerichtetem Deployment nicht mehr geändert werden.", "setup-hint-build": "Einstellungen zum Erstellen eines neuen Builds. Es werden Zugriffsdaten auf das Repository benötigt.<br>Der Fileprefix bestimmt einen Teil des Dateinamens und wird auch in Puppet konfiguriert. Er darf nach eingerichtetem Deployment nicht mehr geändert werden.",
"show all": "alle anzeigen",
"skip": "SKIP", "skip": "SKIP",
"starting": "Starte", "starting": "Starte",
"success": "OK", "success": "OK",
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
"menu-overview": "back to overview", "menu-overview": "back to overview",
"menu-projects": "Projects", "menu-projects": "Projects",
"menu-settings": "Settings", "menu-settings": "Settings",
"menu-logs": "Logs",
"menu-new-project": "Create new project", "menu-new-project": "Create new project",
"menu-project-home": "Project home", "menu-project-home": "Project home",
"menu-project-actions": "Actions", "menu-project-actions": "Actions",
...@@ -30,6 +31,12 @@ ...@@ -30,6 +31,12 @@
"class-actionlog-title": "Action-Log", "class-actionlog-title": "Action-Log",
"class-actionlog-filter": "Filter", "class-actionlog-filter": "Filter",
"class-actionlog-nolog": "Remark: There was no logentry found.", "class-actionlog-nolog": "Remark: There was no logentry found.",
"class-actionlog-time": "time",
"class-actionlog-time-today": "today",
"class-actionlog-time-since-yesterday": "since yesterday",
"class-actionlog-time-for-1-week": "for 1 week",
"class-actionlog-time-for-n-weeks": "for %s weeks",
"class-actionlog-count": "count",
"class-pl-error-no-project": "<strong>Remark</strong><br>No data. No project was created yet.", "class-pl-error-no-project": "<strong>Remark</strong><br>No data. No project was created yet.",
...@@ -246,6 +253,7 @@ ...@@ -246,6 +253,7 @@
"setup-hint": "Change settings", "setup-hint": "Change settings",
"setup-metadata": "General metadata", "setup-metadata": "General metadata",
"setup-hint-build": "Settings to create a new build. You will need credentials to access the repository.<br>The file prefix defines a part of the package name and must be configured in the puppet manifest. After the setup of the deployment or first build it cannot be changed anymore.", "setup-hint-build": "Settings to create a new build. You will need credentials to access the repository.<br>The file prefix defines a part of the package name and must be configured in the puppet manifest. After the setup of the deployment or first build it cannot be changed anymore.",
"show all": "show all",
"skip": "SKIP", "skip": "SKIP",
"starting": "Starting", "starting": "Starting",
"success": "OK", "success": "OK",
......
...@@ -168,10 +168,12 @@ class Actionlog { ...@@ -168,10 +168,12 @@ class Actionlog {
''=>array('label'=>t("all")), ''=>array('label'=>t("all")),
); );
$aTimes=array( $aTimes=array(
">'".date("Y-m-d", date("U"))."'"=>array('label'=>t("class-actionlog-time-today")),
">'".date("Y-m-d", date("U") - 60*60*24*1)."'"=>array('label'=>t("class-actionlog-time-since-yesterday")),
">'".date("Y-m-d", date("U") - 60*60*24*7)."'"=>array('label'=>t("class-actionlog-time-for-1-week")),
">'".date("Y-m-d", date("U") - 60*60*24*7*2)."'"=>array('label'=>sprintf(t("class-actionlog-time-for-n-weeks"), "2")),
">'".date("Y-m-d", date("U") - 60*60*24*7*4)."'"=>array('label'=>sprintf(t("class-actionlog-time-for-n-weeks"), "4")),
''=>array('label'=>t("all")), ''=>array('label'=>t("all")),
">'".date("Y-m-d", date("U"))."'"=>array('label'=>'heute'),
">'".date("Y-m-d", date("U") - 60*60*24*1)."'"=>array('label'=>'seit gestern'),
">'".date("Y-m-d", date("U") - 60*60*24*7)."'"=>array('label'=>'seit 1 Woche'),
); );
$aForms = array( $aForms = array(
...@@ -179,21 +181,31 @@ class Actionlog { ...@@ -179,21 +181,31 @@ class Actionlog {
'meta' => array( 'meta' => array(
'method' => 'GET', 'method' => 'GET',
'action' => '?', 'action' => '?',
'class' => 'form-inline',
), ),
'validate' => array(), 'validate' => array(),
'form' => array( 'form' => array(),
),
)); ));
// generate filter for log table
// $bIsFullsearch: true = show all inputs; false: no interactive search
if ($bIsFullsearch){ if ($bIsFullsearch){
$aForms["filter"]["form"]['label'] = array(
'type' => 'markup',
'value' => '<h3>' . t("class-actionlog-title") . ' :: '.t("class-actionlog-filter").'</h3>',
);
// --- list of all projects in log // --- list of all projects in log
$sSql='SELECT DISTINCT(project) from `logs`'; $sSql='SELECT DISTINCT(project) from `logs`';
$aForms["filter"]["form"]['selectproject'] = array( $aForms["filter"]["form"]['selectproject'] = array(
'type' => 'select', 'type' => 'select',
'name' => 'selectproject', 'name' => 'selectproject',
'label' => '<i class="icon-tag"></i> ' . t('project'), 'label' => '<i class="icon-tag"></i> ' . t('project'),
'class' => 'span2',
'onchange'=>'updateActionlog();', 'onchange'=>'updateActionlog();',
'inline' => true,
); );
$aForms["filter"]["form"]['selectproject']['options']['']=array('label'=>t("all")); $aForms["filter"]["form"]['selectproject']['options']['']=array('label'=>t("all"));
foreach ($this->_makeQuery($sSql) as $row) { foreach ($this->_makeQuery($sSql) as $row) {
...@@ -204,16 +216,20 @@ class Actionlog { ...@@ -204,16 +216,20 @@ class Actionlog {
$aForms["filter"]["form"]['selectWheretime'] = array( $aForms["filter"]["form"]['selectWheretime'] = array(
'type' => 'select', 'type' => 'select',
'name' => 'selectWheretime', 'name' => 'selectWheretime',
'label' => '<i class="icon-calendar"></i> time', 'label' => '<i class="icon-calendar"></i> '.t("class-actionlog-time"),
'class' => 'span2',
'onchange'=>'updateActionlog();', 'onchange'=>'updateActionlog();',
'options' => $aTimes 'options' => $aTimes,
'inline' => true,
); );
$aForms["filter"]["form"]['selectlimit'] = array( $aForms["filter"]["form"]['selectlimit'] = array(
'type' => 'select', 'type' => 'select',
'name' => 'selectlimit', 'name' => 'selectlimit',
'label' => '<i class="icon-list"></i> limit', 'label' => '<i class="icon-list"></i> '.t("class-actionlog-count"),
'class' => 'span1',
'onchange'=>'updateActionlog();', 'onchange'=>'updateActionlog();',
'options' => $aLimits 'options' => $aLimits,
'inline' => true,
); );
$aForms["filter"]["form"]['line'] = array( $aForms["filter"]["form"]['line'] = array(
'type' => 'markup', 'type' => 'markup',
...@@ -236,31 +252,37 @@ class Actionlog { ...@@ -236,31 +252,37 @@ class Actionlog {
'value' => $aFilter["limit"] 'value' => $aFilter["limit"]
); );
} }
$aForms["filter"]["form"]['btnalllogs'] = array(
'type' => 'button',
'label' => '<i class="icon-list-alt"></i> ' . t('all'),
'value' => t('all'),
'href'=>'/deployment/all/setup/actionlog/',
'onclick'=>'location.href=\'/deployment/all/setup/actionlog/\'; return false;',
);
} }
$aForms["filter"]["form"]['efilterlogs'] = array( $aForms["filter"]["form"]['efilterlogs'] = array(
'type' => 'text', 'type' => 'text',
'name' => 'efilterlogs', 'name' => 'efilterlogs',
'label' => '<i class="icon-filter"></i>' . t("overview-textsearch"), 'label' => '<i class="icon-filter"></i>' . t("overview-textsearch"),
'class' => 'span2',
'inline'=> true,
'onkeyup' => 'filterLogTable();', 'onkeyup' => 'filterLogTable();',
'onkeypress' => 'filterLogTable();', 'onkeypress' => 'filterLogTable();',
'onchange' => 'filterLogTable();', 'onchange' => 'filterLogTable();',
'size' => 10, 'size' => 10,
); );
if (!$bIsFullsearch){
$aForms["filter"]["form"]['btnalllogs'] = array(
'type' => 'button',
'value' => t('show all'),
'href'=>'/deployment/all/setup/actionlog/',
'onclick'=>'location.href=\'/deployment/all/setup/actionlog/\'; return false;',
);
}
// generate html output
$oForm = new formgen($aForms); $oForm = new formgen($aForms);
$sReturn = '<br>'.$oForm->renderHtml("filter").' $sReturn = '<div id="divActionlogs">'.$oForm->renderHtml("filter").'
<div id="tableLogactions"> <div id="tableLogactions">
<table class="table">' . $sReturn . '</table> <table class="table">' . $sReturn . '</table>
</div>'; </div></div>';
if (!$bIsFullsearch){
$sReturn= '<strong>' $sReturn= '<strong>'
. '<button onclick="setLogVisibility(\'block\');" id="btnShowLogs" class="btnLogs"><b class="icon-chevron-right"></b> </button>' . '<button onclick="setLogVisibility(\'block\');" id="btnShowLogs" class="btnLogs"><b class="icon-chevron-right"></b> </button>'
...@@ -268,10 +290,10 @@ class Actionlog { ...@@ -268,10 +290,10 @@ class Actionlog {
. ' ' . t("class-actionlog-title") . ' ' . t("class-actionlog-title")
. '</strong>' . '</strong>'
. '<div id="divActionlogs">' . $sReturn;
. $sReturn }
. '</div> $sReturn.='<script>
<script> var sMsgNolog="'.t("class-actionlog-nolog").'";
function getLogVisibility(){ function getLogVisibility(){
var sReturn=localStorage.getItem("bActionlogsVisible"); var sReturn=localStorage.getItem("bActionlogsVisible");
sReturn=(sReturn=="block")?"block":"none"; sReturn=(sReturn=="block")?"block":"none";
......
...@@ -52,7 +52,7 @@ class formgen { ...@@ -52,7 +52,7 @@ class formgen {
} }
$sReturn.='<form '; $sReturn.='<form ';
if (array_key_exists("meta", $this->aForm[$sFormId])) { if (array_key_exists("meta", $this->aForm[$sFormId])) {
foreach (array("method", "action", "target", "accept-charset") as $sAttr) { foreach (array("method", "action", "target", "accept-charset", "class") as $sAttr) {
if (array_key_exists($sAttr, $this->aForm[$sFormId]["meta"])) { if (array_key_exists($sAttr, $this->aForm[$sFormId]["meta"])) {
$sReturn.=$sAttr . '="' . $this->aForm[$sFormId]["meta"][$sAttr] . '" '; $sReturn.=$sAttr . '="' . $this->aForm[$sFormId]["meta"][$sAttr] . '" ';
} }
...@@ -206,7 +206,6 @@ class formgen { ...@@ -206,7 +206,6 @@ class formgen {
// HINWEIS optgroups werden nicht unterstuezt - nur einfache Listen // HINWEIS optgroups werden nicht unterstuezt - nur einfache Listen
$this->_checkReqiredKeys($elementData, array("name")); $this->_checkReqiredKeys($elementData, array("name"));
$sFormElement.='<select id="' . $sId . '" '; $sFormElement.='<select id="' . $sId . '" ';
;
$sFormElement.=$this->_addHtmlAtrributes(explode(",", "$sDefaultAttributes,name,onchange"), $elementData); $sFormElement.=$this->_addHtmlAtrributes(explode(",", "$sDefaultAttributes,name,onchange"), $elementData);
$sFormElement.=">\n"; $sFormElement.=">\n";
foreach ($elementData["options"] as $idOption => $aOptionData) { foreach ($elementData["options"] as $idOption => $aOptionData) {
...@@ -220,7 +219,8 @@ class formgen { ...@@ -220,7 +219,8 @@ class formgen {
if ($sLabelText) { if ($sLabelText) {
// $sLabelElement.='<span class="help-block">' . $sLabelText . '</span>' . "\n"; // $sLabelElement.='<span class="help-block">' . $sLabelText . '</span>' . "\n";
$sLabelElement = $this->_addLabel($sLabelText, $sId, "control-label"); $sLabelClass=(array_key_exists("inline", $elementData) && $elementData["inline"])?"":"control-label";
$sLabelElement = $this->_addLabel($sLabelText, $sId, $sLabelClass);
} }
$sHtmlTable = '<td>' . $sLabelText . '</td><td>' . $sFormElement . '</td>'; $sHtmlTable = '<td>' . $sLabelText . '</td><td>' . $sFormElement . '</td>';
...@@ -255,9 +255,14 @@ class formgen { ...@@ -255,9 +255,14 @@ class formgen {
$sFormElement.=' />'; $sFormElement.=' />';
$sFormElement.="\n"; $sFormElement.="\n";
if (array_key_exists("inline", $elementData) && $elementData["inline"]){
$sLabelElement = $this->_addLabel($sLabelText, $sId, "");
$sHtmlDefault = $sLabelElement . "\n" . $sFormElement . "\n";
} else {
$sLabelElement = $this->_addLabel($sLabelText, $sId, "control-label"); $sLabelElement = $this->_addLabel($sLabelText, $sId, "control-label");
$sHtmlDefault = $sLabelElement . '<div class="controls">' . "\n" . $sFormElement . '</div>' . "\n"; $sHtmlDefault = $sLabelElement . '<div class="controls">' . "\n" . $sFormElement . '</div>' . "\n";
}
$sHtmlTable = '<td>' . $sLabelText . '</td><td>' . $sFormElement . '</td>'; $sHtmlTable = '<td>' . $sLabelText . '</td><td>' . $sFormElement . '</td>';
break; break;
...@@ -288,9 +293,11 @@ class formgen { ...@@ -288,9 +293,11 @@ class formgen {
$sHtmlDefault = $sHtmlTable; $sHtmlDefault = $sHtmlTable;
} else { } else {
if ($elementData["type"] != "button" && $elementData["type"] != "fieldset" && $elementData["type"] != "markup") { if ($elementData["type"] != "button" && $elementData["type"] != "fieldset" && $elementData["type"] != "markup") {
if (!array_key_exists("inline", $elementData) || !$elementData["inline"]){
$sHtmlDefault = "<fieldset>" . $sHtmlDefault . "</fieldset>\n"; $sHtmlDefault = "<fieldset>" . $sHtmlDefault . "</fieldset>\n";
} }
} }
}
$sReturn.="<!-- " . $elementData["type"] . " -->\n"; $sReturn.="<!-- " . $elementData["type"] . " -->\n";
$sReturn.=$sHtmlDefault . "\n"; $sReturn.=$sHtmlDefault . "\n";
......
...@@ -142,6 +142,7 @@ function getTopArea() { ...@@ -142,6 +142,7 @@ function getTopArea() {
$sReturn.='">' . str_replace('</a>', ' <b class="caret"></b></a>', aHome("")) . ' $sReturn.='">' . str_replace('</a>', ' <b class="caret"></b></a>', aHome("")) . '
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li><a href="' . $sBaseUrl . 'all/setup/">' . t("menu-settings") . '</a></li> <li><a href="' . $sBaseUrl . 'all/setup/">' . t("menu-settings") . '</a></li>
<li><a href="' . $sBaseUrl . 'all/setup/actionlog/">' . t("menu-logs") . '</a></li>
<li><a href="' . $sBaseUrl . 'all/setup/new/">' . t("menu-new-project") . '</a></li> <li><a href="' . $sBaseUrl . 'all/setup/new/">' . t("menu-new-project") . '</a></li>
</ul> </ul>
</li> </li>
......
...@@ -77,7 +77,7 @@ function updateActionlog(){ ...@@ -77,7 +77,7 @@ function updateActionlog(){
} }
if (!sHtml){ if (!sHtml){
sHtml='ERROR: no data '; sHtml=sMsgNolog; // variable is set in actionlog.class.php
} else { } else {
sHead=''; sHead='';
for (j=0; j<aTableitems.length; j++){ for (j=0; j<aTableitems.length; j++){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment