<commit_before><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
>
<f:view contentType="text/html">

    <h:head>
        <title><ui:insert name="title">BioBankCloud LIMS</ui:insert></title>
        <link rel="stylesheet" type="text/css" href="#{resource['/css/layout.css']}" />
        <link rel="stylesheet" type="text/css" href="#{resource['/css/security.css']}" />
        <link rel="stylesheet" type="text/css" href="#{resource['/css/userMgmt.css']}" />
        <link rel="stylesheet" type="text/css" href="#{resource['/css/lims.css']}" />
        <meta http-equiv="refresh" content="#{facesContext.externalContext.sessionMaxInactiveInterval};url=#{request.contextPath}/index.xhtml"/>
        <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"/>
    </h:head>

    <h:body>
        <ui:insert name="titleBar" >
            <ui:include src="/security/protected/admin/admintitleBar.xhtml" />
        </ui:insert>

        <p:layout id="UserMgmLayout" styleClass="BbcMainLayoutUser" rendered="#{roleEnforcementPoint.SYSAdmin}">

            <p:layoutUnit id="centerLayout" position="center">

                <div class="container" style="max-width: 1600px;">
                    <div align="left">
                        <h2>Project Administration</h2>
                    </div>

                    <div class="content">
                        <h:form id="projectmodifyForm" >
                            <p:growl id="msgs" showDetail="true"/>

                            <p:dataTable id="projectsTable" var="project"
                                         value="#{projectsmanagement.allProjects}"
                                         filteredValue="#{projectsmanagement.filteredProjects}"
                                         widgetVar="projectsTable"
                                         emptyMessage="No projects found with given criteria"
                                         rowKey="#{project.projectname}"
                                         style="table-layout: fixed"
                                         sortMode="multiple"
                                         editable="true"
                                         scrollable="false"
                                         rows="25"
                                         paginator="true"
                                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                                         rowsPerPageTemplate="15,25,35,45,55">

                                <p:ajax event="rowEdit"
                                        listener="#{projectsmanagement.onRowEdit}"
                                        update=":projectmodifyForm:msgs" />
                                <p:ajax event="rowEditCancel" update=":projectmodifyForm:msgs" />

                                <p:column id="projectNameColumn"
                                          filterBy="#{project.projectname}"
                                          sortBy="#{project.projectname}"
                                          filterMatchMode="contains"
                                          headerText="Project"
                                          style=" font-size: 12px; text-align: left;">
                                        <h:outputText value="#{project.projectname}" />
                                </p:column>

                                <p:column id="yarnquotaColumn"
                                          filterBy="#{project.yarnQuotaRemaining}"
                                          sortBy="#{project.yarnQuotaRemaining}"
                                          filterMatchMode="contains"
                                          headerText="CPU quota left"
                                          style=" font-size: 12px; text-align: center;">
                                    <p:cellEditor>
                                        <f:facet name="output">
                                          <h:outputText value="#{project.yarnQuotaRemaining}" />
                                        </f:facet>
                                        <f:facet name="input">
                                            <p:inputText value="#{project.yarnQuotaRemaining}" style="width:100%"/>
                                        </f:facet>
                                    </p:cellEditor>
                                </p:column>

                                <p:column id="yarntotalquotaColumn"
                                          filterBy="#{project.yarnQuotaTotal}"
                                          sortBy="#{project.yarnQuotaTotal}"
                                          filterMatchMode="contains"
                                          headerText="CPU to date"
                                          style=" font-size: 12px; text-align: center;">
                                    <h:outputText
                                        value="#{project.yarnQuotaTotal}" />
                                </p:column>

                                <p:column id="hdfsquotaColumn"
                                          filterBy="#{projectsmanagement.getHdfsQuota(project.projectname)}"
                                          sortBy="#{projectsmanagement.getHdfsQuota(project.projectname)}"
                                          filterMatchMode="contains"
                                          headerText="Disk quota"
                                          style=" font-size: 12px; text-align: center;">
                                    <p:cellEditor>
                                        <f:facet name="output">
                                            <h:outputText
                                                value="#{projectsmanagement.getHdfsQuota(project.projectname)}" />
                                        </f:facet>
                                        <f:facet name="input">
                                            <p:inputText
                                                value="#{projectsmanagement.hdfsquota}" style="width:100%"/>
                                        </f:facet>
                                    </p:cellEditor>
                                </p:column>

                                <p:column id="hdfstotalquotaColumn"
                                          filterBy="#{projectsmanagement.getHDFSUsedQuota(project.projectname)}"
                                          sortBy="#{projectsmanagement.getHDFSUsedQuota(project.projectname)}"
                                          filterMatchMode="contains"
                                          headerText="Disk used"
                                          style=" font-size: 12px; text-align: center;">
                                    <h:outputText value="#{projectsmanagement.getHDFSUsedQuota(project.projectname)}" />
                                </p:column>

                                <p:column id="useremailColumn"
                                          filterBy="#{project.username}"
                                          sortBy="#{project.username}"<commit_msg>Added ranged validation for the quota fields<commit_after><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
>
<f:view contentType="text/html">

    <h:head>
        <title><ui:insert name="title">BioBankCloud LIMS</ui:insert></title>
        <link rel="stylesheet" type="text/css" href="#{resource['/css/layout.css']}" />
        <link rel="stylesheet" type="text/css" href="#{resource['/css/security.css']}" />
        <link rel="stylesheet" type="text/css" href="#{resource['/css/userMgmt.css']}" />
        <link rel="stylesheet" type="text/css" href="#{resource['/css/lims.css']}" />
        <meta http-equiv="refresh" content="#{facesContext.externalContext.sessionMaxInactiveInterval};url=#{request.contextPath}/index.xhtml"/>
        <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"/>
    </h:head>

    <h:body>
        <ui:insert name="titleBar" >
            <ui:include src="/security/protected/admin/admintitleBar.xhtml" />
        </ui:insert>

        <p:layout id="UserMgmLayout" styleClass="BbcMainLayoutUser" rendered="#{roleEnforcementPoint.SYSAdmin}">

            <p:layoutUnit id="centerLayout" position="center">

                <div class="container" style="max-width: 1600px;">
                    <div align="left">
                        <h2>Project Administration</h2>
                    </div>

                    <div class="content">
                        <h:form id="projectmodifyForm" >
                            <p:growl id="msgs" showDetail="true"/>

                            <p:dataTable id="projectsTable" var="project"
                                         value="#{projectsmanagement.allProjects}"
                                         filteredValue="#{projectsmanagement.filteredProjects}"
                                         widgetVar="projectsTable"
                                         emptyMessage="No projects found with given criteria"
                                         rowKey="#{project.projectname}"
                                         style="table-layout: fixed"
                                         sortMode="multiple"
                                         editable="true"
                                         scrollable="false"
                                         rows="25"
                                         paginator="true"
                                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                                         rowsPerPageTemplate="15,25,35,45,55">

                                <p:ajax event="rowEdit"
                                        listener="#{projectsmanagement.onRowEdit}"
                                        update=":projectmodifyForm:msgs" />
                                <p:ajax event="rowEditCancel" update=":projectmodifyForm:msgs" />

                                <p:column id="projectNameColumn"
                                          filterBy="#{project.projectname}"
                                          sortBy="#{project.projectname}"
                                          filterMatchMode="contains"
                                          headerText="Project"
                                          style=" font-size: 12px; text-align: left;">
                                        <h:outputText value="#{project.projectname}" />
                                </p:column>

                                <p:column id="yarnquotaColumn"
                                          filterBy="#{project.yarnQuotaRemaining}"
                                          sortBy="#{project.yarnQuotaRemaining}"
                                          filterMatchMode="contains"
                                          headerText="CPU quota left"
                                          style=" font-size: 12px; text-align: center;">
                                    <p:cellEditor>
                                        <f:facet name="output">
                                          <h:outputText value="#{project.yarnQuotaRemaining}" />
                                        </f:facet>
                                        <f:facet name="input">
                                            <p:inputText value="#{project.yarnQuotaRemaining}" style="width:100%">
                                                <f:validateLongRange
                                                        maximum="100000"
                                                        minimum="1" />
                                            </p:inputText>
                                        </f:facet>
                                    </p:cellEditor>
                                </p:column>

                                <p:column id="yarntotalquotaColumn"
                                          filterBy="#{project.yarnQuotaTotal}"
                                          sortBy="#{project.yarnQuotaTotal}"
                                          filterMatchMode="contains"
                                          headerText="CPU to date"
                                          style=" font-size: 12px; text-align: center;">
                                    <h:outputText
                                        value="#{project.yarnQuotaTotal}" />
                                </p:column>

                                <p:column id="hdfsquotaColumn"
                                          filterBy="#{projectsmanagement.getHdfsQuota(project.projectname)}"
                                          sortBy="#{projectsmanagement.getHdfsQuota(project.projectname)}"
                                          filterMatchMode="contains"
                                          headerText="Disk quota"
                                          style=" font-size: 12px; text-align: center;">
                                    <p:cellEditor>
                                        <f:facet name="output">
                                            <h:outputText
                                                value="#{projectsmanagement.getHdfsQuota(project.projectname)}" />
                                        </f:facet>
                                        <f:facet name="input">
                                            <p:inputText
                                                value="#{projectsmanagement.hdfsquota}" style="width:100%">
                                                <f:validateLongRange
                                                    maximum="100000"
                                                    minimum="1" />
                                            </p:inputText>
                                        </f:facet>
                                    </p:cellEditor>
                                </p:column>

                                <p:column id="hdfstotalquotaColumn"
                                          filterBy="#{projectsmanagement.getHDFSUsedQuota(project.projectname)}"
                                          sortBy="#{projectsmanagement.getHDFSUsedQuota(project.projectname)}"
                                          filterMatchMode="contains"
                                          headerText="Disk used"
                                          style=" font-size: 12px; text-align: center;">
                                    <h:outputText value="#{projectsmanagement.getHDFSUsedQuota(project.projectname)}" />
                                </p:column>

                                <p:column id="useremailColumn"
                                          filterBy="#{project.username}"
                                          sortBy="#{project.username}"
{'fraction_non_alphanumeric': 0.10816287758849978, 'fraction_numerical': 0.0073459565575327715, 'mean_word_length': 0.9772129710780018, 'pattern_counts': {'":': 4, '<': 133, '<?xml version=': 2, '>': 131, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 12}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 236, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2496755', 'n_tokens_mistral': 3341, 'n_tokens_neox': 3134, 'n_words': 437}