Using ArchiTool HTML Report - but no intranet - Azure AD?

Started by JelleEA, April 08, 2021, 12:11:49 PM

Previous topic - Next topic

JelleEA

Did anyone found a way to encapsulate the HTML Report output with an Azure AD or other identity provisioning service?

Thomas Rischbeck (ITMC.ch)

Hi Jelle - yes, i did - although it's a bit "manual": We've created a Web Application in Visual Studio, placed the HTML export in their and deployed to Azure. You can then limit access to your domains' AD users. See https://docs.microsoft.com/en-us/azure/static-web-apps/getting-started?tabs=vanilla-javascript for more info.
ITMC AG • Bahnhofstrasse 10 • CH-8001 Zürich
Dr. Thomas Rischbeck
PhD in Computer Science
Managing Partner   
rischbeck@itmc.ch
www.itmc.ch

carld

I'm doing something like this using Azure app services. To create a static site resource on the Azure CLI:


cd /tmp/ArchiHTML  # the directory the HTML report was exported to
az login
az webapp up -n archihtml -g RG-P-ArchiWeb -l australiasoutheast --html


And then enable authentication for that service in the Azure portal, to use Azure Active Directory authentication.

When running report from Archi again, the site can be updated from the CLI with:


cd /tmp/ArchiHTML  # the directory the HTML report was exported to
az login
az webapp up --location australiasoutheast --name archihtml --html


This could be done in a pipeline - I never got that far, but there's a docker image for Archi which could run Archi in CLI mode:


./archi --html.createReport /tmp/ArchiHTML


The docker image is here  https://github.com/fauberso/dockerimg-archi

In case it helps, I got this far with the yml file for the pipeline


# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml

trigger:
- master

pool:
  vmImage: 'carldouglas/home:latest'

steps:
- script: ./archi --html.createReport /tmp/html
  displayName: 'Render HTML'


LapizLazuli

Quote from: JelleEA on April 08, 2021, 12:11:49 PMDid anyone found a way to encapsulate the HTML Report output with an Azure AD or other identity provisioning service?

If you have an MS Sharepoint or OneDrive or Teams shared space, an easy way is to use their "Synchronize" feature. It seamlessly mirrors locally on the user's laptop the files in the Cloud.
So just store the HTML files in a given folder in the Cloud, and ask any authorised user to synchronize locally this folder. They will then be able to read the HTML files locally, as if they had downloaded them themselves. They will benefit transparently of any updates made to the source files.

David.Low

Quote from: LapizLazuli on April 06, 2022, 15:30:31 PM
Quote from: JelleEA on April 08, 2021, 12:11:49 PMDid anyone found a way to encapsulate the HTML Report output with an Azure AD or other identity provisioning service?

If you have an MS Sharepoint or OneDrive or Teams shared space, an easy way is to use their "Synchronize" feature. It seamlessly mirrors locally on the user's laptop the files in the Cloud.
So just store the HTML files in a given folder in the Cloud, and ask any authorised user to synchronize locally this folder. They will then be able to read the HTML files locally, as if they had downloaded them themselves. They will benefit transparently of any updates made to the source files.

While true it would be good to host the HTML viewer within a SharePoint page. Looks to get tripped up on HTML vs ASPX so I would be interested if there is another way to generate the HTML to be SharePoint friendly.

Jean-Baptiste Sarrodie

Hi,

Quote from: David.Low on June 17, 2022, 02:12:35 AMWhile true it would be good to host the HTML viewer within a SharePoint page. Looks to get tripped up on HTML vs ASPX so I would be interested if there is another way to generate the HTML to be SharePoint friendly.

I'm trying to achieve this these days, but still face some issues.

Here's what I found so far:
- If you use Windows and are able to set you SharePoint site in your (internet explorer) intranet security zone, then it is possible to use the URL of your SharePoint to map it as a network drive. This let you access the "SitePages" folder to upload an Archi HTML export. This can be really long to upload but it works and then let you access the export from any browser. No need to rename files to .aspx
- If you are able to overcome the common authentication issues, you can use SharePoint Designer to bulk upload Archi HTML export and then access it from everywhere. No need to rename files to .Aspx

Unfortunately from me, none of this work on my current environment. So I'm desperately trying to find a way to bulk load into SitePages Library from the web UI. I've read some solution requiring SharePoint admin to change some configuration which is of course impossible in any medium-to-big organizations like mine.

My latest experiment is through Power Automate which should make it possible to move a folder from a Document Library to a SitePages Library. Unfortunately it still doesn't work for me because of some metadata that should move with the folder's content but are not defined in the SitePages Library.

So I have the deep conviction that it is possible in some ways, but still haven't find how.

Regards,

JB
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

David.Low

Quote from: Jean-Baptiste Sarrodie on June 17, 2022, 20:11:19 PMSo I have the deep conviction that it is possible in some ways, but still haven't find how.

Regards,

JB

Many thanks JB for having a look, I'll keep playing in this space with the SitePages library and see what damage I can do. Happy to provide an 'Enterprise' SharePoint test area to try anything you want.

David

David.Low

Quote from: Jean-Baptiste Sarrodie on June 17, 2022, 20:11:19 PMHi,

Quote from: David.Low on June 17, 2022, 02:12:35 AMWhile true it would be good to host the HTML viewer within a SharePoint page. Looks to get tripped up on HTML vs ASPX so I would be interested if there is another way to generate the HTML to be SharePoint friendly.

I'm trying to achieve this these days, but still face some issues.

Here's what I found so far:
- If you use Windows and are able to set you SharePoint site in your (internet explorer) intranet security zone, then it is possible to use the URL of your SharePoint to map it as a network drive. This let you access the "SitePages" folder to upload an Archi HTML export. This can be really long to upload but it works and then let you access the export from any browser. No need to rename files to .aspx
- If you are able to overcome the common authentication issues, you can use SharePoint Designer to bulk upload Archi HTML export and then access it from everywhere. No need to rename files to .Aspx

Unfortunately from me, none of this work on my current environment. So I'm desperately trying to find a way to bulk load into SitePages Library from the web UI. I've read some solution requiring SharePoint admin to change some configuration which is of course impossible in any medium-to-big organizations like mine.

My latest experiment is through Power Automate which should make it possible to move a folder from a Document Library to a SitePages Library. Unfortunately it still doesn't work for me because of some metadata that should move with the folder's content but are not defined in the SitePages Library.

So I have the deep conviction that it is possible in some ways, but still haven't find how.

Regards,

JB

I have played around with renaming the .HTML files to .ASPX and it does start working but eventually gets tripped up on some reference I have missed. Obviously this is unworkable for large models with the number of pages and references but does show that it is compatible using aspx instead of html if that can be generated by the export.

Jean-Baptiste Sarrodie

Hi,

Quote from: David.Low on July 18, 2022, 02:42:03 AMObviously this is unworkable for large models with the number of pages and references but does show that it is compatible using aspx instead of html if that can be generated by the export.

Did you test in a DOcument Library or a Site Pages Library?

For me the issue is that .aspx or .html react the same: they both get interpreted, but
1. In a Document Library, references to JS and CSS ressources are not seen through the right path and cannot be found, leading to an unusable report.
2. In a Site Pages Library, everything works fine, but its impossible to bulk load all the pages.

If generating .aspx files instead of .html ones works for enough people, it should be fairly easy to make this somewhat configurable in Archi.

Regards,

JB
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

David.Low

Quote from: Jean-Baptiste Sarrodie on July 18, 2022, 17:36:36 PMHi,

Quote from: David.Low on July 18, 2022, 02:42:03 AMObviously this is unworkable for large models with the number of pages and references but does show that it is compatible using aspx instead of html if that can be generated by the export.

Did you test in a DOcument Library or a Site Pages Library?

For me the issue is that .aspx or .html react the same: they both get interpreted, but
1. In a Document Library, references to JS and CSS ressources are not seen through the right path and cannot be found, leading to an unusable report.
2. In a Site Pages Library, everything works fine, but its impossible to bulk load all the pages.

If generating .aspx files instead of .html ones works for enough people, it should be fairly easy to make this somewhat configurable in Archi.

Regards,

JB

Hi JB,

Finally back to it and after some playing around with others input I have got it to work.

1. From Archi, run the Report in HTML
2. I use PowerToys to do a Power Rename of all files from .html to .aspx
3. Use FART.exe to do a rename of all occurrences in the files from .html to .aspx
4. Upload to SharePoint and then selecting the index.aspx it now works. Can even be embedded.

David

Jean-Baptiste Sarrodie

Hi,

Quote from: David.Low on December 19, 2022, 04:46:33 AMFinally back to it and after some playing around with others input I have got it to work.

1. From Archi, run the Report in HTML
2. I use PowerToys to do a Power Rename of all files from .html to .aspx
3. Use FART.exe to do a rename of all occurrences in the files from .html to .aspx
4. Upload to SharePoint and then selecting the index.aspx it now works. Can even be embedded

Could you please provide more informations about your SharePoint instance (SP Online, i.e. 365, or on premise, and in this case which version) ?

In fact, most of the time the issue is not on HTML vs ASPX (unless you use a really old version). The issue lies in BrowserFileHandling which should be set to "Permissive" at the application level to allow serving of HTML/JS/CSS files instead of forcing download, and the experience which should be switched on "Classic" (serve real file content) instead of "Modern" (serve a preview of the file) on your document library.

Unfortunately, none of this is possible in my corporate setup.

Regards,

JB
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Phil Beauvoir

Would it help to have an option to export to .aspx files instead of .html?
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

David.Low

Quote from: Jean-Baptiste Sarrodie on December 19, 2022, 10:09:09 AMHi,

Quote from: David.Low on December 19, 2022, 04:46:33 AMFinally back to it and after some playing around with others input I have got it to work.

1. From Archi, run the Report in HTML
2. I use PowerToys to do a Power Rename of all files from .html to .aspx
3. Use FART.exe to do a rename of all occurrences in the files from .html to .aspx
4. Upload to SharePoint and then selecting the index.aspx it now works. Can even be embedded

Could you please provide more informations about your SharePoint instance (SP Online, i.e. 365, or on premise, and in this case which version) ?

In fact, most of the time the issue is not on HTML vs ASPX (unless you use a really old version). The issue lies in BrowserFileHandling which should be set to "Permissive" at the application level to allow serving of HTML/JS/CSS files instead of forcing download, and the experience which should be switched on "Classic" (serve real file content) instead of "Modern" (serve a preview of the file) on your document library.

Unfortunately, none of this is possible in my corporate setup.

Regards,

JB

Same for me in that we are running SharePoint Online in our Corporate Tenant. With Microsoft's push for everything going modern then I suspect we will have to work within that, but the testing with aspx instead of html does indicate a solution is close.

The only issue I have seen after doing the convert is not having the Zoom control on the diagrams so not sure where that comes from.

David.Low

Quote from: Phil Beauvoir on December 19, 2022, 10:12:54 AMWould it help to have an option to export to .aspx files instead of .html?

I think so but that is probably just me being overly simplistic and very much appreciate the efforts and feedback on here on the topic.

As I said on an earlier reply, the only issue I have found so far is the lack of the Zoom control on the diagram window. Happy to test more if someone can point me as to where that comes from.

David

David.Low

Quote from: Jean-Baptiste Sarrodie on December 19, 2022, 10:09:09 AMHi,

Quote from: David.Low on December 19, 2022, 04:46:33 AMFinally back to it and after some playing around with others input I have got it to work.

1. From Archi, run the Report in HTML
2. I use PowerToys to do a Power Rename of all files from .html to .aspx
3. Use FART.exe to do a rename of all occurrences in the files from .html to .aspx
4. Upload to SharePoint and then selecting the index.aspx it now works. Can even be embedded

Could you please provide more informations about your SharePoint instance (SP Online, i.e. 365, or on premise, and in this case which version) ?

In fact, most of the time the issue is not on HTML vs ASPX (unless you use a really old version). The issue lies in BrowserFileHandling which should be set to "Permissive" at the application level to allow serving of HTML/JS/CSS files instead of forcing download, and the experience which should be switched on "Classic" (serve real file content) instead of "Modern" (serve a preview of the file) on your document library.

Unfortunately, none of this is possible in my corporate setup.

Regards,

JB

Screenshot is my Archi model embedded in a SharePoint Page after the aspx conversion I outlined earlier.Archi-SPO 2022-12-20.png