Removed no more useful pages.
This commit is contained in:
parent
879a006c6d
commit
dacc75e05e
4 changed files with 0 additions and 265 deletions
|
@ -1,106 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2020 Christian Pierre MOMON <christian.momon@devinsy.fr>
|
|
||||||
*
|
|
||||||
* This file is part of AgirStatool, simple key value database.
|
|
||||||
*
|
|
||||||
* AgirStatool is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* AgirStatool is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with AgirStatool. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package org.april.agirstatool.core.pages;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringEscapeUtils;
|
|
||||||
import org.april.agirstatool.core.AgirStatoolException;
|
|
||||||
import org.april.agirstatool.core.AgirStatoolUtils;
|
|
||||||
import org.april.agirstatool.core.Project;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import fr.devinsy.xidyn.XidynException;
|
|
||||||
import fr.devinsy.xidyn.data.TagDataManager;
|
|
||||||
import fr.devinsy.xidyn.presenters.PresenterUtils;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The class AgirStatool.
|
|
||||||
*
|
|
||||||
* @author Christian Pierre MOMON
|
|
||||||
*/
|
|
||||||
public class ProjectsGroupedPage
|
|
||||||
{
|
|
||||||
private static Logger logger = LoggerFactory.getLogger(ProjectsGroupedPage.class);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Builds the.
|
|
||||||
*
|
|
||||||
* @param projects
|
|
||||||
* the projects
|
|
||||||
* @return the string
|
|
||||||
* @throws AgirStatoolException
|
|
||||||
* the agir statool exception
|
|
||||||
*/
|
|
||||||
public static String build(final Project root) throws AgirStatoolException
|
|
||||||
{
|
|
||||||
String result;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
System.out.println("Building ProjectsGrouped page…");
|
|
||||||
|
|
||||||
TagDataManager data = new TagDataManager();
|
|
||||||
String projectsView = ProjectsGroupedView.build(root);
|
|
||||||
data.setContent("projectsView", projectsView);
|
|
||||||
|
|
||||||
result = PresenterUtils.dynamize("/org/april/agirstatool/core/pages/projectsGroupedPage.xhtml", data).toString();
|
|
||||||
}
|
|
||||||
catch (XidynException exception)
|
|
||||||
{
|
|
||||||
throw new AgirStatoolException("Error building ProjectsGrouped page: " + exception.getMessage(), exception);
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Fill line.
|
|
||||||
*
|
|
||||||
* @param data
|
|
||||||
* the data
|
|
||||||
* @param index
|
|
||||||
* the index
|
|
||||||
* @param project
|
|
||||||
* the project
|
|
||||||
*/
|
|
||||||
public static void fillLine(final TagDataManager data, final int index, final Project project)
|
|
||||||
{
|
|
||||||
data.setContent("projectLine", index, "projectId", project.getId());
|
|
||||||
if (project.getParentId() != null)
|
|
||||||
{
|
|
||||||
data.setAttribute("projectLine", index, "projectName", "style", "padding-left: 25px;");
|
|
||||||
}
|
|
||||||
data.setAttribute("projectLine", index, "projectNameLink", "href", project.getPath());
|
|
||||||
data.setContent("projectLine", index, "projectNameLink", StringEscapeUtils.escapeXml(project.getName()));
|
|
||||||
data.setContent("projectLine", index, "childCount", project.getChildCount());
|
|
||||||
data.setContent("projectLine", index, "issueCount", project.issueStats().getCount());
|
|
||||||
data.setContent("projectLine", index, "activeIssueCount", project.issueStats().getActiveCount());
|
|
||||||
data.setContent("projectLine", index, "maybeIssueCount", project.issueStats().getMaybeCount());
|
|
||||||
data.setContent("projectLine", index, "resolvedIssueCount", project.issueStats().getResolvedCount());
|
|
||||||
data.setContent("projectLine", index, "concludedIssueCount", project.issueStats().getConcludedCount());
|
|
||||||
data.setContent("projectLine", index, "unassignedIssueCount", project.issueStats().getUnassignedCount());
|
|
||||||
data.setContent("projectLine", index, "unassignedNewIssueCount", project.issueStats().getUnassignedNewCount());
|
|
||||||
data.setContent("projectLine", index, "unassignedStartedIssueCount", project.issueStats().getUnassignedStartedCount());
|
|
||||||
data.setContent("projectLine", index, "unassignedResolvedIssueCount", project.issueStats().getUnassignedResolvedCount());
|
|
||||||
data.setContent("projectLine", index, "unassignedConcludedIssueCount", project.issueStats().getUnassignedConcludedCount());
|
|
||||||
data.setContent("projectLine", index, "lastUpdate", AgirStatoolUtils.toHumanShort(project.getLastUpdate(), "n/a"));
|
|
||||||
data.setAttribute("projectLine", index, "lastUpdate", "title", AgirStatoolUtils.toHumanLong(project.getLastUpdate(), "n/a"));
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,113 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2020 Christian Pierre MOMON <christian.momon@devinsy.fr>
|
|
||||||
*
|
|
||||||
* This file is part of AgirStatool, simple key value database.
|
|
||||||
*
|
|
||||||
* AgirStatool is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* AgirStatool is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with AgirStatool. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package org.april.agirstatool.core.pages;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringEscapeUtils;
|
|
||||||
import org.april.agirstatool.core.AgirStatoolException;
|
|
||||||
import org.april.agirstatool.core.AgirStatoolUtils;
|
|
||||||
import org.april.agirstatool.core.Project;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import fr.devinsy.xidyn.XidynException;
|
|
||||||
import fr.devinsy.xidyn.data.TagDataManager;
|
|
||||||
import fr.devinsy.xidyn.presenters.PresenterUtils;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The Class projectsRawPageBuilder.
|
|
||||||
*/
|
|
||||||
public class ProjectsRawPage
|
|
||||||
{
|
|
||||||
private static Logger logger = LoggerFactory.getLogger(ProjectsRawPage.class);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Builds the.
|
|
||||||
*
|
|
||||||
* @param projects
|
|
||||||
* the projects
|
|
||||||
* @return the string
|
|
||||||
* @throws AgirStatoolException
|
|
||||||
* the agir statool exception
|
|
||||||
*/
|
|
||||||
public static String build(final Project root) throws AgirStatoolException
|
|
||||||
{
|
|
||||||
String result;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
System.out.println("Building ProjectsRaw page…");
|
|
||||||
|
|
||||||
TagDataManager data = new TagDataManager();
|
|
||||||
|
|
||||||
String projectsView = ProjectsRawView.build(root);
|
|
||||||
data.setContent("projectsView", projectsView);
|
|
||||||
|
|
||||||
result = PresenterUtils.dynamize("/org/april/agirstatool/core/pages/projectsRawPage.xhtml", data).toString();
|
|
||||||
}
|
|
||||||
catch (XidynException exception)
|
|
||||||
{
|
|
||||||
throw new AgirStatoolException("Error building ProjectsRaw page: " + exception.getMessage(), exception);
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Fill line.
|
|
||||||
*
|
|
||||||
* @param data
|
|
||||||
* the data
|
|
||||||
* @param index
|
|
||||||
* the index
|
|
||||||
* @param project
|
|
||||||
* the project
|
|
||||||
*/
|
|
||||||
private static void fillLine(final TagDataManager data, final int index, final Project project)
|
|
||||||
{
|
|
||||||
data.setContent("projectLine", index, "projectId", project.getId());
|
|
||||||
if (project.getParentId() != null)
|
|
||||||
{
|
|
||||||
data.setAttribute("projectLine", index, "projectName", "style", "padding-left: 25px;");
|
|
||||||
}
|
|
||||||
data.setAttribute("projectLine", index, "projectNameLink", "href", project.getPath());
|
|
||||||
data.setContent("projectLine", index, "projectNameLink", StringEscapeUtils.escapeXml(project.getName()));
|
|
||||||
data.setContent("projectLine", index, "childCount", project.getChildCount());
|
|
||||||
data.setContent("projectLine", index, "issueCount", project.issueStats().getCount());
|
|
||||||
data.setContent("projectLine", index, "newIssueCount", project.issueStats().getNewCount());
|
|
||||||
data.setContent("projectLine", index, "confirmedIssueCount", project.issueStats().getConfirmedCount());
|
|
||||||
data.setContent("projectLine", index, "ongoingIssueCount", project.issueStats().getOngoingCount());
|
|
||||||
data.setContent("projectLine", index, "waitingIssueCount", project.issueStats().getWaitingCount());
|
|
||||||
data.setContent("projectLine", index, "maybeIssueCount", project.issueStats().getMaybeCount());
|
|
||||||
data.setContent("projectLine", index, "resolvedIssueCount", project.issueStats().getResolvedCount());
|
|
||||||
data.setContent("projectLine", index, "rejectedIssueCount", project.issueStats().getRejectedCount());
|
|
||||||
data.setContent("projectLine", index, "closedIssueCount", project.issueStats().getClosedCount());
|
|
||||||
data.setContent("projectLine", index, "unassignedIssueCount", project.issueStats().getUnassignedCount());
|
|
||||||
data.setContent("projectLine", index, "unassignedNewIssueCount", project.issueStats().getUnassignedNewCount());
|
|
||||||
data.setContent("projectLine", index, "unassignedConfirmedIssueCount", project.issueStats().getUnassignedConfirmedCount());
|
|
||||||
data.setContent("projectLine", index, "unassignedOngoingIssueCount", project.issueStats().getUnassignedOngoingCount());
|
|
||||||
data.setContent("projectLine", index, "unassignedWaitingIssueCount", project.issueStats().getUnassignedWaitingCount());
|
|
||||||
data.setContent("projectLine", index, "unassignedMaybeIssueCount", project.issueStats().getUnassignedMaybeCount());
|
|
||||||
data.setContent("projectLine", index, "unassignedResolvedIssueCount", project.issueStats().getUnassignedResolvedCount());
|
|
||||||
data.setContent("projectLine", index, "unassignedRejectedIssueCount", project.issueStats().getUnassignedRejectedCount());
|
|
||||||
data.setContent("projectLine", index, "unassignedClosedIssueCount", project.issueStats().getUnassignedClosedCount());
|
|
||||||
data.setContent("projectLine", index, "lastUpdate", AgirStatoolUtils.toHumanShort(project.issueStats().getLastUpdate(), "n/a"));
|
|
||||||
data.setAttribute("projectLine", index, "lastUpdate", "title", AgirStatoolUtils.toHumanLong(project.issueStats().getLastUpdate(), "n/a"));
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,23 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
|
||||||
<title>Agir Statool</title>
|
|
||||||
<meta charset="UTF-8" />
|
|
||||||
<meta content="April" name="keywords" />
|
|
||||||
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="agirstatool.css" />
|
|
||||||
<script src="/commons/sorttable.js" />
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div style="margin: 10px;">
|
|
||||||
<h1><a href="index.xhtml">Agir Statool</a> – Project list</h1>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<a href="index.xhtml">Raw stats</a> – <span class="italic">Grouped stats</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="projectsView">VIEW PLACE</div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,23 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
|
||||||
<title>Agir Statool</title>
|
|
||||||
<meta charset="UTF-8" />
|
|
||||||
<meta content="April" name="keywords" />
|
|
||||||
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="agirstatool.css" />
|
|
||||||
<script src="/commons/sorttable.js" />
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div style="margin: 10px;">
|
|
||||||
<h1><a href="index.xhtml">Agir Statool</a> – Project list</h1>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<span class="italic">Raw stats</span> – <a href="index2.xhtml">Grouped stats</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="projectsView">VIEW PLACE</div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Loading…
Reference in a new issue