Moonshine-IDE / Super.Human.Portal

Portal interface to show documentation for DominoVagrant and Super.Human.Installer
Other
0 stars 1 forks source link

Genesis Application List and Installation #10

Closed JoelProminic closed 1 year ago

JoelProminic commented 1 year ago

We would like to add a interface to list and install applications from Genesis, similar to what we have in MyAccount: image

This requires a couple agents that can be adapted from MyAccount

We don't need to select the server - it should only install on the local server

We would like to improve the UI so that it is displayed more like a datagrid (or similar), so that we can display a brief description along with the entry.

JoelProminic commented 1 year ago

Ideally, we would like to update the interface with new tabs or links to let the user access features associated with that Genesis application.

Some applications can be launched with NomadWeb (if the user installed it).

To handle this, I think we would need a separate configuration structure to show which applications have been installed. This could be tracked at the agent side. We could also read it from the Genesis addin directory.

JoelProminic commented 1 year ago

We can detect the installed Genesis applications from the JavaAddins directory using a command like this:

ls  | grep -v Genesis | xargs -I {} echo {}

However, this doesn't handle every installable application, so we'll discuss a better solution with Dmytro.

JoelProminic commented 1 year ago

Clarification from Dmytro:

All installed application will have own folder (folder = application name), in example below you can see 4 applications installed: DbSigner, DominoMeter, Genesis, tilecms.

Each application folder contains config.txt file (and could have more files like JAR, LOG etc)

config.txt from folder DbSigner:

Wed Nov 02 21:46:55 CET 2022

version=0.5.0 runjava=DbSigner active=0

"version" is a version, used by Genesis to detect a version of addin and update run update process if a new version is detected. "runjava" is used for runjava application. This is how Genesis will run it. "active" is a flag that indicate state of application (should Genesis run it or not), values 1 or 0

It may still be useful to track the installations on the install agent as well:

JoelProminic commented 1 year ago

I added an agent to return the Genesis application list: /SuperHumanPortal.nsf/GenesisRead?OpenAgent

The format is based on what we did in MyAccount

{
  ... standard properties ...
  "apps": [
    {
      "AppID": "javaaddindemo",
      "DetailsURL": "https://genesis.directory/apps/javaaddindemo",
      "Installed": false,
      "Label": "JavaAddin - Demo",
      "InstallCommand": "install javaaddindemo"
    },
Property Description
AppID the key to to identify the app. This will match the key from the deep link, and should be passed as the key to the other agent.
Label A short label to display for the app
DetailsURL A link to the GenesisCatalog entry for this application. This will let us keep most of the details for the applications in one place.
InstallCommand The Genesis install command. This will be automatically used by the upcoming GenesisInstall agent, so you can ignore this for the UI for now.
Installed NEW. 'true' if the application is installed, false otherwise. This will always be false for now.

You can deploy the new agents by opening the new "Super.Human.Portal_Agents" project and running Project > Run on Vagrant. I'll need to supply a new full database once I add the configuration required for #13.

JoelProminic commented 1 year ago

I added the GenesisInstall agent to install a selected application: /SuperHumanPortal.nsf/GenesisInstall?OpenAgent&AppID=javaaddindemo

There is only one parameter, AppID, which should be the AppID for an application found with the GenesisRead agent.

The result is indicated by the ErrorMessage and successMessage properties. As usual, if ErrorMessage is not empty, report the provided message and don't display successMessage.

Note that this agent does not confirm that the installation was successful.

TODO: I was planning to add a document to the database to indicate that the application was installed. I may instead have a scheduled agent that checks and updates the installed applications.

piotrzarzycki21 commented 1 year ago

This has been implemented and pushed to main.

piotrzarzycki21 commented 1 year ago

I added the GenesisInstall agent to install a selected application: /SuperHumanPortal.nsf/GenesisInstall?OpenAgent&AppID=javaaddindemo

There is only one parameter, AppID, which should be the AppID for an application found with the GenesisRead agent.

The result is indicated by the ErrorMessage and successMessage properties. As usual, if ErrorMessage is not empty, report the provided message and don't display successMessage.

Note that this agent does not confirm that the installation was successful.

TODO: I was planning to add a document to the database to indicate that the application was installed. I may instead have a scheduled agent that checks and updates the installed applications.

This has been implemented as well and pushed to main.

JoelProminic commented 1 year ago

I see the application list is populated now. The checkboxes are very hard to see by default: image

It looks better when the boxes are checked, but I still see a faint outline of the checkbox control: image

JoelProminic commented 1 year ago

The install action works. I think there may be issues on the agent side, but I can fix those later.

piotrzarzycki21 commented 1 year ago

I have improved checkboxes visibility. I have used Jewel checkboxes. In the screenshot you can see non-selected and one selected.

Screenshot 2023-02-09 at 11 27 37
JoelProminic commented 1 year ago

Some more updates for this interface from today's meeting:

piotrzarzycki21 commented 1 year ago

Some more updates for this interface from today's meeting:

  • Installed checkbox should not be visible if app is not installed. Right now this looks like an editable checkbox
  • Application table should be resized to fit the screen
  • Update application name in top section as a row is selected

    • In header, change "Select application to install: " so that it displays "Select an application" if no application is selected, and the application name otherwise
    • Move "See more details" to be next to the other buttons

@JoelProminic I just pushed changes. The only thing which left is issue with resize - I will work on that tomorrow morning my time. You can find for now development artifact -> https://github.com/Moonshine-IDE/Super.Human.Portal/actions/runs/4737367944 Once I finish sizing issue I will prepare release.

piotrzarzycki21 commented 1 year ago
  • Application table should be resized to fit the screen

@JoelProminic This has been fixed. If you could deploy development version and test. I'm not sure if it's working correctly on other screen. We have been trying test with @Aszusz this on his machine but it failed with agent deployment. Once you confirm that is working I can release version 1.1.0

JoelProminic commented 1 year ago

I'm seeing that the pagination is hidden behind the footer with if the windows height is low: image

If I reduce the height of the frame below 800px, the pagination is no longer visible and I can't scroll: image

piotrzarzycki21 commented 1 year ago

If I reduce the height of the frame below 800px, the pagination is no longer visible and I can't scroll:

Now the question what should be the minimum ?

piotrzarzycki21 commented 1 year ago

I have made some adjustment to sizes. Once we release final version it will be there. Currently dev build will have changes. I will be online for like 1-2h more in case of update from your sight.

JoelProminic commented 1 year ago

I tested this development build.

With this update, I found that the datagrid had a fixed height of ~620px. With the rest of the UI, I had to have my browser window at maximum height in order to see the pagination buttons.

piotrzarzycki21 commented 1 year ago

I tested this development build.

With this update, I found that the datagrid had a fixed height of ~620px. With the rest of the UI, I had to have my browser window at maximum height in order to see the pagination buttons.

I think I need to calculate something in CSS. I will try to look into that tomorrow. If I won't figure out we should leave it as is for now.

JoelProminic commented 1 year ago

I added code to detect the installed addins based on the directory names in %datadir%/JavaAddins. This worked for the netmonitor and superhumanportal addins. @dpastov, let me know if there are special cases I need to account for here.

@piotrzarzycki21, if you want to test this, you'll need need to import the agents

piotrzarzycki21 commented 1 year ago

@JoelProminic It's working nicely. User need to refresh manually list to see the results since installation takes some time, but checkboxes are appearing with check marks. We can debate after this release what to do to have some live updates.

dpastov commented 1 year ago

@JoelProminic

I added code to detect the installed addins based on the directory names in %datadir%/JavaAddins.

A note: on Linix it is %datadir%\JavaAddin while on Windows it's under binary/execution folder (i.e. \IBM\Domino\JavaAddin)

JoelProminic commented 1 year ago

This is working like I expect for now, so I'm closing this for v0.1.4.

For now, this is only expected to run on a Linux server, but I'll create an issue for supporting the Windows addin path for more robustness.