Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 946dd17c authored by Harald Martini's avatar Harald Martini
Browse files

added parameter documentation

parent 2a243b57
No related branches found
No related tags found
No related merge requests found
...@@ -172,10 +172,15 @@ ...@@ -172,10 +172,15 @@
<VectoXMLExamples Include="$(SolutionDir)VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\*-sample.xml"/> <VectoXMLExamples Include="$(SolutionDir)VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\*-sample.xml"/>
<UserManual Include="$(SolutionDir)Documentation\User Manual\help.html"/> <UserManual Include="$(SolutionDir)Documentation\User Manual\help.html"/>
<UserManual Include="$(SolutionDir)Documentation\VectoHashingTool\HashingToolHelp.html"/> <UserManual Include="$(SolutionDir)Documentation\VectoHashingTool\HashingToolHelp.html"/>
<!-- <ParameterDocu Include="$(SolutionDir)Documentation\ParameterDocumentation\VectoParameterDocumentation.html"/> -->
<UserManual Include="$(SolutionDir)Documentation\XML\*.png"/> <UserManual Include="$(SolutionDir)Documentation\XML\*.png"/>
<UserManual Include="$(SolutionDir)Documentation\XML\VectoParameters.html"/> <!-- <UserManual Include="$(SolutionDir)Documentation\XML\VectoParameters.html"/> -->
<UserManual Include="$(SolutionDir)Documentation\User Manual Source\JIRA Quick Start Guide.pdf"/> <UserManual Include="$(SolutionDir)Documentation\User Manual Source\JIRA Quick Start Guide.pdf"/>
<UserManual Include="$(SolutionDir)Documentation\Cdv_Generator_VECTO3.2.xlsx"/> <UserManual Include="$(SolutionDir)Documentation\Cdv_Generator_VECTO3.2.xlsx"/>
<UserManual Include="$(SolutionDir)Documentation\XML\Documentation_OfficialResults_2ndAmendment_20230425.xlsx"/>
<ParameterDocu Include="$(SolutionDir)Documentation\XML\ParameterDocumentation\*.*"/>
<ParameterDocuStyle Include="$(SolutionDir)Documentation\XML\ParameterDocumentation\HTML\css\*.*"/>
<ReleaseNotes Include="$(SolutionDir)Documentation\User Manual Source\Release Notes Vecto3.x.pdf"/> <ReleaseNotes Include="$(SolutionDir)Documentation\User Manual Source\Release Notes Vecto3.x.pdf"/>
</ItemGroup> </ItemGroup>
<Copy SourceFiles="@(GenericVehicles)" DestinationFiles="@(GenericVehicles->'$(DeployPath)Generic Vehicles\%(RecursiveDir)%(Filename)%(Extension)')" /> <Copy SourceFiles="@(GenericVehicles)" DestinationFiles="@(GenericVehicles->'$(DeployPath)Generic Vehicles\%(RecursiveDir)%(Filename)%(Extension)')" />
...@@ -189,7 +194,13 @@ ...@@ -189,7 +194,13 @@
<Copy SourceFiles="@(VectoConfigurationSample)" DestinationFolder="$(DeployPath)"/> <Copy SourceFiles="@(VectoConfigurationSample)" DestinationFolder="$(DeployPath)"/>
<Copy SourceFiles="$(SolutionDir)\Documentation\User Manual Source\README for Mission Profiles Directory.txt" DestinationFiles="$(DeployPath)Mission Profiles\!! README !!.TXT"/> <Copy SourceFiles="$(SolutionDir)\Documentation\User Manual Source\README for Mission Profiles Directory.txt" DestinationFiles="$(DeployPath)Mission Profiles\!! README !!.TXT"/>
<Copy SourceFiles="$(SolutionDir)\Documentation\User Manual Source\README for Declaration Directory.txt" DestinationFiles="$(DeployPath)Declaration\!! README !!.TXT"/> <Copy SourceFiles="$(SolutionDir)\Documentation\User Manual Source\README for Declaration Directory.txt" DestinationFiles="$(DeployPath)Declaration\!! README !!.TXT"/>
<Copy SourceFiles="@(ParameterDocu)" DestinationFolder="$(DeployPath)User Manual\ParameterDocumentation"/>
<Copy SourceFiles="@(ParameterDocuStyle)" DestinationFolder="$(DeployPath)User Manual\ParameterDocumentation\HTML\css"/>
<!-- <Copy SourceFiles="$(ParameterDocuStyle)" DestinationFolder="$(DeployPath)User Manual\Parameter Documentation\HTML\css"/> -->
<!-- NuGet Files--> <!-- NuGet Files-->
<ItemGroup Condition="'$(Configuration)'=='Deploy'"> <ItemGroup Condition="'$(Configuration)'=='Deploy'">
<VectoNuget Include ="$(SolutionDir)VectoCore\VectoCore\bin\Release\*.nupkg" /> <VectoNuget Include ="$(SolutionDir)VectoCore\VectoCore\bin\Release\*.nupkg" />
......
File added
.tabcontent {
display: none;
border-top: none;
width:100%;
}
.tooltip-wide .tooltip.bottom, .tooltip-inner {
max-width: none;
}
.tab-content .wide>.active{
display: inline-block;
}
.path-div {
text-align: left;
margin-bottom: 10px;
}
.path-div div{
display: inline-block;
}
.bg-green {
background-color: #7bfac1;
}
.bg-yellow {
background-color:#fff3cd;
}
.bg-blue {
background-color:#cff4fc;
}
.bg-red {
background-color:#f8d7da;
}
.bg-white {
background-color: #ffffff;
}
.table-green {
--bs-table-bg: #7bfac1;
--bs-table-striped-bg: #81ce6a;
--bs-table-striped-color: #000;
--bs-table-active-bg: #bcd0c7;
--bs-table-active-color: #000;
--bs-table-hover-bg: #c1d6cc;
--bs-table-hover-color: #000;
color: #000;
border-color: #bcd0c7;
}
.table-blue {
--bs-table-bg: #cff4fc;
--bs-table-striped-bg: #c5e8ef;
--bs-table-striped-color: #000;
--bs-table-active-bg: #badce3;
--bs-table-active-color: #000;
--bs-table-hover-bg: #bfe2e9;
--bs-table-hover-color: #000;
color: #000;
border-color: #badce3;
}
.table-yellow {
--bs-table-bg: #fff3cd;
--bs-table-striped-bg: #f2e7c3;
--bs-table-striped-color: #000;
--bs-table-active-bg: #e6dbb9;
--bs-table-active-color: #000;
--bs-table-hover-bg: #ece1be;
--bs-table-hover-color: #000;
color: #000;
border-color: #e6dbb9;
}
.table-red {
--bs-table-bg: #f8d7da;
--bs-table-striped-bg: #eccccf;
--bs-table-striped-color: #000;
--bs-table-active-bg: #dfc2c4;
--bs-table-active-color: #000;
--bs-table-hover-bg: #e5c7ca;
--bs-table-hover-color: #000;
color: #000;
border-color: #dfc2c4;
}
.detail-div {
padding-top: 2%;
padding-right: 2%;
padding-bottom: 2%;
padding-left: 2%;
}
\ No newline at end of file
<!doctype html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Vecto Parameter Documentation</title>
<!-- Online resources -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css" integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous">
<link rel="stylesheet" href="https://unpkg.com/bootstrap-table@1.18.3/dist/bootstrap-table.min.css">
<link rel="stylesheet" href="https://unpkg.com/bootstrap-table@1.18.3/dist/bootstrap-table.min.css">
<link href="https://unpkg.com/bootstrap-table@1.18.3/dist/extensions/sticky-header/bootstrap-table-sticky-header.css" rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
<!-- Local Resources -->
<link rel="stylesheet" href="HTML/css/styles.css">
</head>
<body>
<header>
<h1 class="header">Vecto Parameter Documentation</h1>
</header>
<div id=topContainer class="container-fluid sticky-top bg-white">
<div class="container-fluid bg-secondary" style="padding:10px">
<button type="button" id="btn_parameter"
class="btn btn-info active tablinks" onclick="openTab(event, 'Parameter')">
Parameter
</button>
<button id="btn_anon"
class="btn btn-info tablinks"
onclick="openTab(event, 'AnonymousTypes')">
Anonymous Types
</button>
<button if="btn_missing"
class="btn btn-info tablinks"
onclick="openTab(event, 'MissingTypes')">
Missing Types
</button>
</div>
<!-- Tab content -->
<div class="container-fluid">
<div class="row">
<div class="col bg-green text-center">
Declaration Mode
</div>
<div class="col bg-blue text-center">
Declaration and Engineering Mode
</div>
<div class="col bg-yellow text-center">
Engineering Mode
</div>
</div>
<div class="row">
<div class="col text-center">
* indicates an optional component
</div>
<div class="col text-center">
@ indicates an attribute
</div>
<div class="col text-center">
ℹ hover for type information
</div>
</div>
</div>
</div>
<div id="Parameter" class="tabcontent" style="display: inline-block">
<table id=parameterTable1 class="table table-striped table-hover">
<thead>
</thead>
<tbody>
</tbody>
</table>
</div>
<div id="AnonymousTypes" class="tabcontent">
<table id=anonymousTypesTable class="table table-striped table-hover hidden">
<thead>
</thead>
<tbody>
</tbody>
</table>
</div>
<div id="MissingTypes" class="tabcontent">
<table id=missingTypesTable class="table table-striped table-hover hidden">
<thead>
</thead>
<tbody>
</tbody>
</table>
</div>
<script>
function openTab(evt, tabName) {
// Declare all variables
var i, tabcontent, tablinks;
// Get all elements with class="tabcontent" and hide them
tabcontent = document.getElementsByClassName("tabcontent");
for (i = 0; i < tabcontent.length; i++) {
tabcontent[i].style.display = "none";
}
// Get all elements with class="tablinks" and remove the class "active"
tablinks = document.getElementsByClassName("tablinks");
for (i = 0; i < tablinks.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" active", "");
}
// Show the current tab, and add an "active" class to the button that opened the tab
document.getElementById(tabName).style.display = "inline-block";
evt.currentTarget.className += " active";
}
</script>
<!-- <table id=parameterTable1 class="table table-striped table-hover">
<thead>
</thead>
<tbody>
</tbody>
</table> -->
<!-- <table id=anonymousTypesTable class="table table-striped table-hover hidden">
<thead>
</thead>
<tbody>
</tbody>
</table> -->
<script type="text/javascript" src="https://code.jquery.com/jquery-latest.js"></script>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-Piv4xVNRyMGpqkS2by6br4gNJ7DXjqk09RmUpJ8jgGtD7zP9yug3goQfGII0yAns" crossorigin="anonymous"></script>
<script type="text/javascript" src="https://unpkg.com/bootstrap-table@1.18.3/dist/bootstrap-table.min.js"></script>
<script src="https://unpkg.com/bootstrap-table@1.18.3/dist/extensions/sticky-header/bootstrap-table-sticky-header.min.js"></script>
<script src="https://unpkg.com/bootstrap-table@1.18.3/dist/extensions/filter-control/bootstrap-table-filter-control.js"></script>
<script src="https://unpkg.com/bootstrap-table@1.18.3/dist/extensions/print/bootstrap-table-print.min.js"></script>
<script type="text/javascript" src="data.js"></script>
<script type="text/javascript">
const mergedTypesData = mergedTypes;
const anonymousTypesData = anonymousTypes;
const missingTypesData = missingTypes;
var topBarHeight = 0;
</script>
<script>
$( document ).ready(function() {
console.log( "ready!" );
console.log( "Init tables!");
topBarHeight = $( "#topContainer" ).outerHeight();
console.log(topBarHeight);
initTables();
});
function initTables(){
$('#parameterTable1').bootstrapTable({
showPrint: true,
showButtonIcons: true,
data: mergedTypesData,
search: true,
showColumns: true,
sortReset: true,
stickyHeader: true,
stickyHeaderOffsetY: topBarHeight,
detailView: true,
showPaginationSwitch: true,
filterControl: true,
searchHighlight: true,
detailViewByClick: true,
detailFormatter: parameterDetailFormatter,
columns: [{
field: 'ParamIdString',
title: 'Parameter ID',
valign: 'middle',
sortable: true,
cellStyle: cellStyle,
filterControl: 'input',
filterControlPlaceholder: 'Filter'
},{
field: 'Component',
title: 'Component',
valign: 'middle',
sortable: true,
filterControl: 'input',
filterControlPlaceholder: 'Filter',
},{
field: 'ElementName',
title: 'Name',
valign: 'middle',
sortable: true,
},{
field: 'Type',
title: 'Type',
valign: 'middle',
switchable: true,
},{
field: 'XmlTypesWithVersion',
title: 'XML-Types',
valign: 'middle',
sortable: true,
formatter: xmlTypeFormatter
}],
// onExpandRow:function(index, row, $detail){
// expandTable($detail, row)
// }
})
$('#anonymousTypesTable').bootstrapTable({
showPrint: true,
data: anonymousTypesData,
search: true,
showColumns: true,
sortReset: true,
stickyHeader: true,
stickyHeaderOffsetY: topBarHeight,
detailView: true,
showPaginationSwitch: true,
filterControl: true,
searchHighlight: true,
detailViewByClick: true,
detailFormatter: anonymousTypesDetailFormatter,
columns: [{
field: 'ParamIdString',
title: 'Parameter Id',
valign: 'middle',
sortable: true,
//cellStyle: cellStyle,
filterControl: 'input',
filterControlPlaceholder: 'Filter'
},{
field: 'Component',
title: 'Component',
valign: 'middle',
sortable: true,
cellStyle: cellStyle,
filterControl: 'input',
filterControlPlaceholder: 'Filter'
},{
field: 'ElementName',
title: 'Name',
valign: 'middle',
sortable: true,
filterControl: 'input',
filterControlPlaceholder: 'Filter'
},{
field: 'Type',
title: 'Type',
valign: 'middle',
sortable: true,
switchable: true,
},{
field: 'Restrictions',
title: 'Restrictions',
valign: 'middle',
switchable: true,
formatter: restrictionFormatter1,
}],
})
$('#missingTypesTable').bootstrapTable({
showPrint: true,
data: missingTypesData,
search: true,
showColumns: true,
sortReset: true,
stickyHeader: true,
stickyHeaderOffsetY: topBarHeight,
showPaginationSwitch: true,
filterControl: true,
searchHighlight: true,
columns: [{
field: 'QualifiedName',
title: 'Name',
valign: 'middle',
sortable: true,
//cellStyle: cellStyle,
filterControl: 'input',
filterControlPlaceholder: 'Filter'
},{
field: 'SourceUri',
title: 'File',
valign: 'middle',
sortable: true,
filterControl: 'input',
filterControlPlaceholder: 'Filter'
},{
field: 'LineNumber',
title: 'Line',
valign: 'middle',
switchable: true,
}],
})
}
function xmlTypeFormatter(value, row, index, field) {
return value.join('<br>');
}
function restrictionFormatter1(value, row, index, field){
var result = restrictionFormatter(index, row.Restrictions);
return result.html();
}
function commentFormatter(value, row, index, field){
return value + (row.Deprecated ? 'Deprecated' : '');
}
function nameFormatter(value, row, index, field){
return row.Deprecated ? 'Deprecated' : value;
}
function cellStyle(value, row, index, field) {
return getTableBackgroundClass(row.Mode);
}
function getTableBackgroundClass(modeEnum){
return {
classes: getBackgroundClass(modeEnum)
}
}
function getBackgroundClass(modeEnum){
var classes = [
'bg-green', //Declaration
'bg-yellow', //Engineering
'bg-blue', //Declaration and Engineering
'bg-red', //undefined
]
return classes[modeEnum]
}
function anonymousTypesDetailFormatter(index, row, $element){
// console.log("AnonymousTypesDetailsFormatter");
// console.log(row);
var $detailDiv = $('<div>').addClass('detail-div');
$detailDiv.append(xmlPathsFormatter(row.XmlPaths));
return $detailDiv;
}
function parameterDetailFormatter(index, row, $element)
{
console.log('Details opened!')
console.log(row);
var $detailDiv = $('<div>').addClass('detail-div');
// create table
var $table = $('<table>').addClass('table');
// caption
var $thead = $table.append('<thead />').children('thead');
$thead.append($('<tr>')
.append(createTableHeader("Restrictions").attr('width', '25%'))
.append(createTableHeader("XML Path").attr('width', '50%'))
.append(createTableHeader("Comment").attr('width', '25%'))
);
//tbody
var $tbody = $table.append('<tbody />').children('tbody');
$tbody.append($('<tr />')
.append(createTableData(restrictionFormatter(index, row.Restrictions)))
.append(createTableData(xmlPathsFormatter(row.XmlPaths)))
.append(createTableData(commentFormatter(index, row.Comment)))
);
$detailDiv.append($table);
return $detailDiv;
}
function createTableHeader(value){
return $('<th>').html(value);
}
function createTableData(value){
return $('<td>').html(value);
}
function commentFormatter(index, comment){
return comment.replace('\n', '<br>');
}
function restrictionFormatter(index, restrictions){
var parentDiv = $('<div>');
console.log('Restrictionformatter');
console.log(restrictions);
restrictions.forEach(restriction => {
parentDiv.append(createToolTipDiv(restriction.RestrictionDescription.replace('--', '&#9642;'),
('defined in: ' + restriction.Versions.join(',')), 'right'))
})
return parentDiv;
}
function createToolTipDiv(text, tooltiptext, placement = 'top'){
console.log(arguments)
var result = $('<div>').
attr('data-toggle', 'tooltip').
attr('data-placement', placement).
attr('data-html', true).
attr('title', tooltiptext).
attr('data-bs-custom', 'tooltip-wide').
html(text);
try{
result.tooltip();
}catch(e){
console.log(e);
}
finally{
return result;
}
//result.tooltip();
}
function getVersion(qualifiedName){
return qualifiedName.match('((DEV|dev):)?v[0-9]+.[0-9]+')?.[0];
}
function xmlPathsFormatter(paths){
console.log('xmlPathsFormatter');
console.log(typeof(paths));
console.log(paths);
var parentDiv = $('<div>');
paths.forEach(path => parentDiv.append(xmlPathFormatter(path)));
return parentDiv;
}
function xmlPathFormatter(xmlPath){
console.log('xmlPathFormatter')
console.log(xmlPath);
var parentDiv = $('<div>').addClass('path-div').addClass(getBackgroundClass(xmlPath.Mode));
parentDiv.append($('<div>')
.html(xmlPath.RootNodeType.substring(0,3))
.append(createToolTipDiv("&#8505;", xmlPath.RootNodeVersion))
);
xmlPath.PathElements.forEach(pathElement => parentDiv.append(pathElementFormatter(pathElement)));
return parentDiv;
}
function pathElementFormatter(pathElement){
console.log(pathElement);
var pathName = " /";
if(pathElement.IsAttribute){
pathName += '@';
}
pathName += pathElement.ElementName;
if(pathElement.IsOptional){
pathName += '*';
}
console.log(pathName);
var resultDiv = $('<div>').html(pathName);
resultDiv.append(
createToolTipDiv("&#8505;",
createTooltipTextFromSchemaTypes(pathElement.SchemaTypeNames, ' <br> ')));
return resultDiv;
}
function createTooltipTextFromSchemaTypes(schemaTypeNames, seperator){
console.log(schemaTypeNames);
var result = "";
schemaTypeNames.forEach((schemaTypeName) => {
var version = getVersion(schemaTypeName.Namespace);
version = version === undefined ? "" : version;
result += version + '&nbsp;' + schemaTypeName.Name + seperator}
)
return result;
}
</script>
<script>
$(document.body).tooltip({
selector: "[data-toggle='tooltip']",
trigger: "hover"
});
</script>
</body>
</html>
\ No newline at end of file
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment