Commit a31123c1 authored by Gilles Mouchard's avatar Gilles Mouchard
Browse files

Fixed logs id in the GET endpoints of PKM REST API for the new and old projects.

parent 9cf8cc7b
Pipeline #19518 failed with stages
in 0 seconds
......@@ -61,7 +61,8 @@ function postprocess_logs(log_chunk_documents, options = {})
while(log_chunk_document.chunkId > chunks.length) chunks.push(undefined); // expand chunks array with holes (holes shall vanish before the end of the process)
}
chunks.push(log_chunk_document);
const id = log_chunk_document.hasOwnProperty('id') ? log_chunk_document.id : log_chunk_document._id; // uses _id instead of id for very old databases
const id = log_chunk_document.hasOwnProperty('id') ? log_chunk_document.id : (log_chunk_document.id = log_chunk_document._id.toHexString()); // uses _id instead of id for very old databases, and replicates it in id
delete log_chunk_document._id; // keep only id
chunks_per_id.set(id, chunks);
}
});
......
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="date" content='02/04/22'>
<meta name="date" content='02/07/22'>
<title>D1.5 Open source PKM server-side software</title>
<link rel="stylesheet" href='../style/style.css' type="text/css">
</head>
......@@ -44,7 +44,7 @@
<p>Chapter 2, which is intended for users and system administrators, presents the building, configuration, and installation process of the PKM and parsers. Chapters 3, 4, and 5, which are intended for developers, present the PKM implementation. Chapter 6 concludes this document. The appendix talks about the Javascript SDK of the PKM server, the generation flow of the REST servers and SDKs for the clients, and the test procedure that was implemented to automate the test of the PKM server and more generally the DECODER Project tool-chain.</p>
</div>
<div id="footer">
<span><a href="../index.html">D1.5 Open source PKM server-side software</a> - 02/04/22</span>
<span><a href="../index.html">D1.5 Open source PKM server-side software</a> - 02/07/22</span>
</div>
</body>
</html>
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="date" content='02/04/22'>
<meta name="date" content='02/07/22'>
<title>D1.5 Open source PKM server-side software</title>
<link rel="stylesheet" href='../style/style.css' type="text/css">
</head>
......@@ -162,7 +162,7 @@ Commands:
<pre><code>$ docker-compose up</code></pre>
</div>
<div id="footer">
<span><a href="../index.html">D1.5 Open source PKM server-side software</a> - 02/04/22</span>
<span><a href="../index.html">D1.5 Open source PKM server-side software</a> - 02/07/22</span>
</div>
</body>
</html>
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="date" content='02/04/22'>
<meta name="date" content='02/07/22'>
<title>D1.5 Open source PKM server-side software</title>
<link rel="stylesheet" href='../style/style.css' type="text/css">
</head>
......@@ -2086,7 +2086,7 @@ PKM.logout(key).then((pkm) =&gt;
<p>The <em>PKM REST API</em> provides access to the PKM over HTTP/HTTPS. The PKM has an <a href="https://www.openapis.org">OpenAPI</a> 3 specification available at <a href="https://gitlab.ow2.org/decoder/pkm-api/-/blob/master/api/pkm-openapi.yaml">https://gitlab.ow2.org/decoder/pkm-api/-/blob/master/api/pkm-openapi.yaml</a>, which enables to automatically generate the SDK for many programming languages, see Appendix A.2. Appendix A.2 contains detailed explanations about implementation design of the REST server, which provides front-ends and third party tools developers with the PKM REST API.</p>
</div>
<div id="footer">
<span><a href="../index.html">D1.5 Open source PKM server-side software</a> - 02/04/22</span>
<span><a href="../index.html">D1.5 Open source PKM server-side software</a> - 02/07/22</span>
</div>
</body>
</html>
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="date" content='02/04/22'>
<meta name="date" content='02/07/22'>
<title>D1.5 Open source PKM server-side software</title>
<link rel="stylesheet" href='../style/style.css' type="text/css">
</head>
......@@ -136,7 +136,7 @@ DELETE /git/working_trees/{dbName}/{gitWorkingTree}?dontDeletePkmFiles=…</code
<p>These operations allow deleting Git working trees created with <code>'clone'</code>. These operations can also delete the corresponding files in the PKM. There is no other way to delete Git working trees, and the only way to create a new Git working tree is to run a <code>clone</code> command.</p>
</div>
<div id="footer">
<span><a href="../index.html">D1.5 Open source PKM server-side software</a> - 02/04/22</span>
<span><a href="../index.html">D1.5 Open source PKM server-side software</a> - 02/07/22</span>
</div>
</body>
</html>
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="date" content='02/04/22'>
<meta name="date" content='02/07/22'>
<title>D1.5 Open source PKM server-side software</title>
<link rel="stylesheet" href='../style/style.css' type="text/css">
</head>
......@@ -86,7 +86,7 @@
<p>Appendix A.2 contains detailed explanations about implementation design of the REST server that provides developer with the REST API.</p>
</div>
<div id="footer">
<span><a href="../index.html">D1.5 Open source PKM server-side software</a> - 02/04/22</span>
<span><a href="../index.html">D1.5 Open source PKM server-side software</a> - 02/07/22</span>
</div>
</body>
</html>
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="date" content='02/04/22'>
<meta name="date" content='02/07/22'>
<title>D1.5 Open source PKM server-side software</title>
<link rel="stylesheet" href='../style/style.css' type="text/css">
</head>
......@@ -22,7 +22,7 @@
<p>The PKM server have also its own limitations that deserve attention in future developments. The PKM files, and more generally the artefacts in the PKM, have no revision numbers so that it is not easy to track progressive enhancement of the knowledge in the PKM. The PKM users management, especially concerning the user’s roles, is tightly geared to the MongoDB user’s management, which is database oriented, but it is not necessarily convenient for a SaaS approach. Direct upload (as attachment in a POST HTTP request) toward the database is unsupported due to the limitations of OpenAPI supporting tools.</p>
</div>
<div id="footer">
<span><a href="../index.html">D1.5 Open source PKM server-side software</a> - 02/04/22</span>
<span><a href="../index.html">D1.5 Open source PKM server-side software</a> - 02/07/22</span>
</div>
</body>
</html>
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="date" content='02/04/22'>
<meta name="date" content='02/07/22'>
<title>D1.5 Open source PKM server-side software</title>
<link rel="stylesheet" href='../style/style.css' type="text/css">
</head>
......@@ -73,7 +73,7 @@
<p>The tests use the popular <a href="https://curl.se/">cURL</a> program to communicate with the PKM and tools through their REST APIs.</p>
</div>
<div id="footer">
<span><a href="../index.html">D1.5 Open source PKM server-side software</a> - 02/04/22</span>
<span><a href="../index.html">D1.5 Open source PKM server-side software</a> - 02/07/22</span>
</div>
</body>
</html>
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="date" content='02/04/22'>
<meta name="date" content='02/07/22'>
<title>D1.5 Open source PKM server-side software</title>
<link rel="stylesheet" href='style/style.css' type="text/css">
</head>
......@@ -133,7 +133,7 @@
</ul>
</div>
<div id="footer">
<span><a href="index.html">D1.5 Open source PKM server-side software</a> - 02/04/22</span>
<span><a href="index.html">D1.5 Open source PKM server-side software</a> - 02/07/22</span>
</div>
</body>
</html>
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="date" content='02/04/22'>
<meta name="date" content='02/07/22'>
<title>D1.4 Open source client-side software</title>
<link rel="stylesheet" href='../style/style.css' type="text/css">
</head>
......@@ -65,7 +65,7 @@
<p>Figure 3 shows the logical organization of this document (chapter numbers are highlighted in blue circles), which follows the order of actions to use properly the PKM and the parsers. Chapter 2 shows how to get the general server information such as the version numbers. Chapter 3 presents the management of the user’s session and particularly the way to authenticate with the PKM. Chapters 4 and 5 present the administrative tasks such as the users and project management. Chapter 6 presents how to deal with Git repositories. Chapter 7 shows how to populate the PKM with artefacts. Chapter 8 presents how to invoke parser to generate new artefacts. Chapter 9 shows how to query artefacts of a project. Chapter 10 concludes this document. The Appendix details the REST APIs and the command line interface (CLI).</p>
</div>
<div id="footer">
<span><a href="../index.html">D1.4 Open source client-side software</a> - 02/04/22</span>
<span><a href="../index.html">D1.4 Open source client-side software</a> - 02/07/22</span>
</div>
</body>
</html>
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="date" content='02/04/22'>
<meta name="date" content='02/07/22'>
<title>D1.4 Open source client-side software</title>
<link rel="stylesheet" href='../style/style.css' type="text/css">
</head>
......@@ -20,7 +20,7 @@
<p>This document has described the PKM APIs: a command line interface (CLI) and REST APIs. While the command line interface has been historically the first PKM API available, the REST APIs made it obsolete because it was unsuitable for a SaaS deployment where the data and computing resources are deported in the cloud. Indeed, the REST APIs have allowed connecting the DECODER Project tools together over communication networks and creating a GUI front-end as a web application. Every components of the DECODER Project tool-chain, running on separate docker containers, are now able to exchange thanks to these REST APIs. Using the OpenAPI specifications made it easier to document REST APIs and write SDKs for PKM and parsers clients. The REST APIs will permit extending the DECODER Project tool-chain and connecting third party tools to the existing tool-chain. Hopefully, containerized tool-chain components and the REST APIs should enable a SaaS deployment in the future.</p>
</div>
<div id="footer">
<span><a href="../index.html">D1.4 Open source client-side software</a> - 02/04/22</span>
<span><a href="../index.html">D1.4 Open source client-side software</a> - 02/07/22</span>
</div>
</body>
</html>
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="date" content='02/04/22'>
<meta name="date" content='02/07/22'>
<title>D1.4 Open source client-side software</title>
<link rel="stylesheet" href='../style/style.css' type="text/css">
</head>
......@@ -66,7 +66,7 @@
}</code></pre>
</div>
<div id="footer">
<span><a href="../index.html">D1.4 Open source client-side software</a> - 02/04/22</span>
<span><a href="../index.html">D1.4 Open source client-side software</a> - 02/07/22</span>
</div>
</body>
</html>
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="date" content='02/04/22'>
<meta name="date" content='02/07/22'>
<title>D1.4 Open source client-side software</title>
<link rel="stylesheet" href='../style/style.css' type="text/css">
</head>
......@@ -37,7 +37,7 @@
<p>This operation creates another the user’s session, and returns a new PKM access key that identifies the new user’s session. The new user’s session is independent from the original user’s session which means that when the later ends, the former is still alive, and vice-versa.</p>
</div>
<div id="footer">
<span><a href="../index.html">D1.4 Open source client-side software</a> - 02/04/22</span>
<span><a href="../index.html">D1.4 Open source client-side software</a> - 02/07/22</span>
</div>
</body>
</html>
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="date" content='02/04/22'>
<meta name="date" content='02/07/22'>
<title>D1.4 Open source client-side software</title>
<link rel="stylesheet" href='../style/style.css' type="text/css">
</head>
......@@ -149,7 +149,7 @@
<p>The writer do not recommend the use of these legacy commands.</p>
</div>
<div id="footer">
<span><a href="../index.html">D1.4 Open source client-side software</a> - 02/04/22</span>
<span><a href="../index.html">D1.4 Open source client-side software</a> - 02/07/22</span>
</div>
</body>
</html>
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="date" content='02/04/22'>
<meta name="date" content='02/07/22'>
<title>D1.4 Open source client-side software</title>
<link rel="stylesheet" href='../style/style.css' type="text/css">
</head>
......@@ -134,7 +134,7 @@
<p>The writer do not recommend the use of these legacy commands.</p>
</div>
<div id="footer">
<span><a href="../index.html">D1.4 Open source client-side software</a> - 02/04/22</span>
<span><a href="../index.html">D1.4 Open source client-side software</a> - 02/07/22</span>
</div>
</body>
</html>
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="date" content='02/04/22'>
<meta name="date" content='02/07/22'>
<title>D1.4 Open source client-side software</title>
<link rel="stylesheet" href='../style/style.css' type="text/css">
</head>
......@@ -113,7 +113,7 @@
<p>Note that the default behavior of the PKM is to fully synchronize the PKM Files and the Git working trees before and after running a Git command sequence, and after when deleting some files in a Git working tree.</p>
</div>
<div id="footer">
<span><a href="../index.html">D1.4 Open source client-side software</a> - 02/04/22</span>
<span><a href="../index.html">D1.4 Open source client-side software</a> - 02/07/22</span>
</div>
</body>
</html>
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="date" content='02/04/22'>
<meta name="date" content='02/07/22'>
<title>D1.4 Open source client-side software</title>
<link rel="stylesheet" href='../style/style.css' type="text/css">
</head>
......@@ -1019,7 +1019,7 @@
<p>When the query part is missing, this deletes all the Methodology phases.</p>
</div>
<div id="footer">
<span><a href="../index.html">D1.4 Open source client-side software</a> - 02/04/22</span>
<span><a href="../index.html">D1.4 Open source client-side software</a> - 02/07/22</span>
</div>
</body>
</html>
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="date" content='02/04/22'>
<meta name="date" content='02/07/22'>
<title>D1.4 Open source client-side software</title>
<link rel="stylesheet" href='../style/style.css' type="text/css">
</head>
......@@ -187,7 +187,7 @@
<p>When an Excavator job is running asynchronously, this operation allows polling the Excavator job with the given identifier <code>{jobId}</code> until job completion. The job is dequeued when client polls a completed job (either finished or failed).</p>
</div>
<div id="footer">
<span><a href="../index.html">D1.4 Open source client-side software</a> - 02/04/22</span>
<span><a href="../index.html">D1.4 Open source client-side software</a> - 02/07/22</span>
</div>
</body>
</html>
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="date" content='02/04/22'>
<meta name="date" content='02/07/22'>
<title>D1.4 Open source client-side software</title>
<link rel="stylesheet" href='../style/style.css' type="text/css">
</head>
......@@ -452,7 +452,7 @@
<p>When the query part is missing, this returns all the Methodology phases.</p>
</div>
<div id="footer">
<span><a href="../index.html">D1.4 Open source client-side software</a> - 02/04/22</span>
<span><a href="../index.html">D1.4 Open source client-side software</a> - 02/07/22</span>
</div>
</body>
</html>
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="date" content='02/04/22'>
<meta name="date" content='02/07/22'>
<title>D1.4 Open source client-side software</title>
<link rel="stylesheet" href='../style/style.css' type="text/css">
</head>
......@@ -1634,7 +1634,7 @@ Examples:
update_user_role --admin=admin --db=mydb --role=Developer grant garfield</code></pre>
</div>
<div id="footer">
<span><a href="../index.html">D1.4 Open source client-side software</a> - 02/04/22</span>
<span><a href="../index.html">D1.4 Open source client-side software</a> - 02/07/22</span>
</div>
</body>
</html>
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