FCLT#57005 Meer logfiles via interface opvragen

svn path=/Website/branches/v2019.1/; revision=41643
This commit is contained in:
Jos Groot Lipman
2019-03-18 18:02:44 +00:00
parent 2a8d998edb
commit 570bc28dc1
3 changed files with 52 additions and 4 deletions

View File

@@ -30,6 +30,10 @@
FcltMgr.openModalDetail(url, { titel: titel} );
}
</script>
<style>
li { cursor:pointer; }
li:hover { background-color:#ccf; }
</style>
</head>
<body class="modal" id="mod_bijlagen">
@@ -37,19 +41,20 @@
<% BLOCK_START("bijlagen",L("lcl_appendixes"));
var xfunc = user.func_enabled("*");
function bijlagen(autfunction, label, module)
function bijlagen(autfunction, label, module, reado)
{
if (xfunc.canWrite(autfunction))
{
var url = "../shared/BijlagenForm.asp?module=" + module;
if (reado)
url += "&reado=1";
var proturl = protectQS.create(url);
var tekst = "{0} ({1})".format(label, module);
CreateButton(tekst, "bl('" + safe.jsstring(proturl) + "', '" + safe.jsstring(tekst) + "')");
CreateButton(tekst, "bl('" + safe.jsstring(proturl) + "', '" + safe.jsstring(tekst) + "')", { "xclass": "details"});
}
}
// TODO: Authorisatie functies anders, lcl's??
bijlagen("WEB_PRSSYS", "Reservering foto's", "RESPH");
bijlagen("WEB_PRSSYS", "Reservering artikel foto's", "RESPHA");
bijlagen("WEB_PRSSYS", "Reservering voorziening foto's", "RESPHD");
@@ -63,7 +68,11 @@
bijlagen("WEB_PRSSYS", "Marktplaats foto's", "MRK");
bijlagen("WEB_PRSSYS", "Menu plaatjes", "MENU");
bijlagen("WEB_PRSSYS", "Opdrachtverstrekking bijlagen", "BDRADR");
bijlagen("WEB_FACFAC", custpath + "/xsl bestanden", "CUSTXSL");
Response.Write("<p/><p/>");
bijlagen("WEB_FACFAC", "(FACFAC) " + custpath + "/xsl bestanden", "CUSTXSL");
bijlagen("WEB_FACFAC", "(FACFAC) " + rooturl + '/temp/' + customerId + "_files logbestanden", "CUSTTEMP", true);
bijlagen("WEB_FACFAC", "(FACFAC) " + custpath + "/export bestanden", "CUSTEXP", true);
bijlagen("WEB_FACFAC", "(FACFAC) " + custpath + "/import bestanden", "CUSTIMP", true);
BLOCK_END();

View File

@@ -82,6 +82,9 @@ function MatchFile(fName)
if (fName.toLowerCase() == 'web.config') // die nooit tonen
return false;
if (!new RegExp(S("flexAllowedExt"), "ig").test(fName))
return;
if (showFilter=="")
return true;
@@ -91,6 +94,7 @@ function MatchFile(fName)
// TODO: flexProps met een { getFiles: true } komt volgens mij ook een heel eind?
var fileArray = []; // Array of file information
var tooManyFiles = false;
var fso = Server.CreateObject("Scripting.FileSystemObject")
if (fso.FolderExists(params.AttachPath))
{
@@ -105,6 +109,11 @@ if (fso.FolderExists(params.AttachPath))
for (; !fc.atEnd(); fc.moveNext())
{
if (fileArray.length > 1000)
{
tooManyFiles = true;
break;
}
fsoFile = fc.item();
if (!MatchFile(fsoFile.Name))
continue;
@@ -413,6 +422,8 @@ if (fso.FolderExists(params.AttachPath))
<input type="button" class='button' value="<%=L("lcl_search")%>" onClick="FindFile()">
</form>
<% }
if (tooManyFiles)
Response.Write("<p>Only 1000 files shown</p>");
%>
<FORM name="u2" method="post" enctype="multipart/form-data" target="hidFrameUpload">
<% BLOCK_START("bijlagen",L("lcl_appendixes"));

View File

@@ -344,6 +344,34 @@ function flexProps(pModule, pKey, pSubpath, pNiveau, params)
settings.overrule_setting("flexAllowedExt", "xsl"); // tijdelijk xsl toestaan
settings.overrule_setting("flexFilesOrdering", 0);
break;
case "CUSTIMP":
result.AttachRootPath = Server.MapPath(custpath + "/import");
result.AttachPath = result.AttachRootPath + "/";
result.multi = true;
result.extFilter = "log";
result.keephistory = true;
settings.overrule_setting("flexAllowedExt", "log"); // tijdelijk log toestaan
settings.overrule_setting("flexFilesOrdering", 0);
break;
case "CUSTEXP":
result.AttachRootPath = Server.MapPath(custpath + "/export");
result.AttachPath = result.AttachRootPath + "/";
result.multi = true;
result.extFilter = "log";
result.keephistory = true;
settings.overrule_setting("flexAllowedExt", "log"); // tijdelijk log toestaan
settings.overrule_setting("flexFilesOrdering", 0);
break;
case "CUSTTEMP":
result.AttachRootPath = Server.MapPath(rooturl + '/temp/' + customerId + "_FILES");
result.AttachPath = result.AttachRootPath + "/";
result.multi = true;
result.extFilter = "xml|json|txt|html";
settings.overrule_setting("flexAllowedExt", "xml|json|txt|html"); // tijdelijk xsl toestaan
settings.overrule_setting("flexFilesOrdering", 1); // nieuwste bovenaan. Ik weet dat putorders toevallig sorteerbare namen aanmaakt
result.searchfile = true;
result.maxfiles = 5;
break;
default:
INTERNAL_ERROR_MODULE;
}