Skip to content

Commit

Permalink
FuntionalityChange
Browse files Browse the repository at this point in the history
  • Loading branch information
anovoa-ldr committed Jul 7, 2023
1 parent f25f66e commit 54de5bb
Show file tree
Hide file tree
Showing 18 changed files with 51 additions and 108 deletions.
2 changes: 1 addition & 1 deletion Dependency-Graph/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "3c9a4c22-42f6-4e8f-8b96-744c7fef331f",
"name": "Dependency-Graph",
"publisher": "ANJ",
"version": "3.6.0.0",
"version": "3.8.0.3",
"brief": "App to generate the dependency tree",
"description": "App to generate the dependency tree of the extensions we have installed.",
"privacyStatement": "https://github.com/NovoaDev/Dependency-Graph-BCExt",
Expand Down
3 changes: 2 additions & 1 deletion Dependency-Graph/src/Base/MarkdownFactboxANJ.Page.al
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ page 80805 MarkdownFactbox_ANJ
Caption = 'Markdown Text', comment = 'ESP="Texto Markdown"';
Editable = false;
PageType = CardPart;
UsageCategory = Administration;
UsageCategory = None;

layout
{
area(Content)
{
field(MarkdownText; MarkdownText)
{
Editable = false;
MultiLine = true;
ShowCaption = false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
/// </summary>
controladdin MarkdownViewer_ANJ
{
HorizontalStretch = true;
HorizontalShrink = true;
RequestedHeight = 600;
RequestedWidth = 650;
Scripts = 'src\ControlAddinViewer\Scripts.js', 'https://cdnjs.cloudflare.com/ajax/libs/mermaid/9.3.0/mermaid.min.js';
StartupScript = 'src\ControlAddinViewer\Start.js';
VerticalStretch = true;

StyleSheets = 'src\ControlAddinViewer\Style.css';
VerticalShrink = true;

/// <summary>
/// Ready.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/// <summary>
/// ControlAddIn "MarkdownViewer_ANJ._ANJ"
/// </summary>
controladdin MarkdownViewerFS_ANJ
{
HorizontalStretch = true;
Scripts = 'src\ControlAddinViewer\Scripts.js', 'https://cdnjs.cloudflare.com/ajax/libs/mermaid/9.3.0/mermaid.min.js';
StartupScript = 'src\ControlAddinViewer\Start.js';
VerticalStretch = true;


/// <summary>
/// Ready.
/// </summary>
event Ready();

/// <summary>
/// Draw.
/// </summary>
/// <param name="Markdown">Text.</param>
procedure Draw(Markdown: Text);
}
2 changes: 1 addition & 1 deletion Dependency-Graph/src/ControlAddinViewer/Scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ https://www.hougaard.com/
function Draw(Markdown) {
try {
const insertSvg = function (svgCode, bindFunctions) {
document.getElementById('controlAddIn').innerHTML = svgCode;
document.getElementById('controlAddIn').innerHTML = '<div class=\'MermaidDiv\'>' + svgCode + '</div>';
};
mermaid.mermaidAPI.render('chart', Markdown, insertSvg);
}
Expand Down
11 changes: 11 additions & 0 deletions Dependency-Graph/src/ControlAddinViewer/Style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
iframe {
margin: 0 auto;
}

.MermaidDiv {
width: 100%;
height: auto;
word-wrap: break-word;
padding-left: 1%;
padding-right: 1;
}
3 changes: 2 additions & 1 deletion Dependency-Graph/src/Markdown/MarkdownViewerANJ.Page.al
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ page 80804 MarkdownViewer_ANJ
begin
CurrPage.MarkdownViewer_ANJ.Draw(Markdown);
end;

/// <summary>
/// Draw.
/// SetMarkdown.
/// </summary>
/// <param name="AuxMarkdown">Text.</param>
internal procedure SetMarkdown(AuxMarkdown: Text)
Expand Down
4 changes: 2 additions & 2 deletions Dependency-Graph/src/Markdown/MarkdownViewerFullANJ.Page.al
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ page 80806 MarkdownViewerFull_ANJ
{
area(Content)
{
usercontrol(MarkdownViewer_ANJ; MarkdownViewer_ANJ)
usercontrol(MarkdownViewerFS_ANJ; MarkdownViewerFS_ANJ)
{
}
}
Expand All @@ -23,7 +23,7 @@ page 80806 MarkdownViewerFull_ANJ
MarkdownMermaidFieldID: Integer;
begin
MarkdownMermaidFieldID := 15;
CurrPage.MarkdownViewer_ANJ.Draw(MarkdownMgmt.GetMarkdown(MarkdownMermaidFieldID));
CurrPage.MarkdownViewerFS_ANJ.Draw(MarkdownMgmt.GetMarkdown(MarkdownMermaidFieldID));
end;

var
Expand Down
72 changes: 0 additions & 72 deletions README.es-ES.md

This file was deleted.

32 changes: 5 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Dependency Graph
[![in](https://img.shields.io/badge/lang-en-pink.svg)](https://github.com/NovoaDev/Dependency-Graph-BCExt/blob/main/README.md)
[![en](https://img.shields.io/badge/lang-es-black.svg)](https://github.com/NovoaDev/Dependency-Graph-BCExt/blob/main/README.es-ES.md)

Small tool designed to create a graph showing installed extensions and their respective dependencies, all from the **Business Central** environment in which the extension is running. In addition, it allows you to preview and download the generated text to easily add it to the client's documentation in Markdown format. <br> <br>
**PS:** <br>
Although there are numerous more advanced tools available, this one has been created for the simple purpose of practice, but it could prove useful for other users.

## Prerequisites
## Usage
![Usage.gif](/res/Usage.gif.png)

## Previous configuration
### Azure
#### Create App registrations
**Supported account types:** <br>
Expand Down Expand Up @@ -48,26 +48,4 @@ Features to include for chart generation: <br>
Historical.

- Dependency graph <br>
Action to access the data generation page for the graph.

## Show in dependency graph page
![3ShowInDG](/res/3ShowInDG.png)
### Extensions subpage
List of installed extensions. We can modify the field **Display name** and **Show in chart**. Every time we uncheck the **Show in graph** option of an extension with dependencies, we will have to generate the data from the relationship table again. This is done by the action on the subpage named **Update Relationship Table**.

### Relationships subpage
List of relationships between extensions. We can modify the **Link text** field to add a text between dependencies and **Show in graphic**.

### Actions
#### Generate data
The button generates the data in the intermediate tables that are related to the subpages corresponding to the **extensions** and **relationships** sections. These tables are the ones we will use to customize the graph.
### Display dependency graph
The button will open a new page where we can see the graph as a draft.
![4DGV.png](/res/4DGV.png)

### Download Markdown as a .md
The button will download an .md file with the content of the chart, which you can easily add to any document.
![5DPDownload](/res/5DPDownload.png)

**Note:** <br>
Both for the action of viewing and downloading the graph, it will be generated using the data found in the extensions and relationships subpages, which must be marked with the Show in graph option.
Action to access the data generation page for the graph.
Binary file removed res/3ShowInDG.png
Binary file not shown.
Binary file removed res/3ShowInDGes-ES.png
Binary file not shown.
Binary file removed res/4DGV.png
Binary file not shown.
Binary file removed res/5DPDownload.png
Binary file not shown.
Binary file removed res/PortalAzure001es-ES.png
Binary file not shown.
Binary file removed res/PortalAzure002es-ES.png
Binary file not shown.
Binary file removed res/PortalAzure003es-ES.png
Binary file not shown.
Binary file added res/Usage.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 54de5bb

Please sign in to comment.