Project Portal Readme
This document will help during Christopher's parental leave. It covers all possible scenarios, although we hope they won't happen.
Application Onboarding
There are various methods for onboarding applications, and the following documents will describe these processes.
This describes the onboarding possess Project Portal after release of v3.0.0
- Activate Application
- Make Global Application
- Onboard Application
- Onboard Context
- Onboard Context Application
If new landing page
If a new landing page is requested the how this should or could be implemented can be read here. New Landing Page
General
- For anything related to service messages in the project portal please contact
Fusion Core
. - Context Selection, se context section or contact
Fusion Core
. - Navigation / Routing refer to context and portal by configuration in this doc site. Any changes done to navigation should be discussed wth
Fusion Core
andTDI Architects
sins it may impact many. - Application loading. se application loading section, but should all be handled by
Fusion Core
- Portal Extensions / Actions, this will be revisited by UX and handled by core, but if there are bugs they should be handled.
- Bookmarks
- Service message
- Help Service
- My Tasks
- Notifications
- My Account
- Portal Pages
- Landing Page, can be handled by anyone.
- Project Page, can be handled by anyone.
- Facility Page, can be handled by anyone.
The following repos of their packages should not be used in the Project Portal
at all. if code is need
form the it should be extracted and rewritten, pleas contact fusion core if this is needed.
Repo | Summary | Area |
---|---|---|
fusion-api | depricated? | frontend |
fusion-components | depricated? | frontend |
There are reason to look in to fusion-api but this mainly applies when working on the legacyAppLoader.
Context Selection
The portal is set up to be context fist, by this i mean that the user will need to select a context before any applications are available. this has been described numerous times and i will no do in thi great detail here. for mor information read the context section under framework.
Any work needed on this should be consulted with lead developer at fusion core Odin Rochmann
Application loading
This section is explained more under the Application section. Applications are loaded in 2 different ways. this is to support the older fusion applications.
Any work needed on this should be a handled by some one in Fusion Core of the person working on it should consulting lead developer at fusion core Odin Rochmann
The new way of loading is heavily inspired by the application loading section that is done by the new Fusion CLI, that can be found here AppLoader.tsx
all code for app loading can be found under client/packages/core/app
the app loading in project portal has been structures a little different and all has been converted to hooks. main hook is use-app-loader.ts
Fusion core is working on new App Management. when this is going live, the project portal may need some changes. This should
mainly be web-server changes for proxy enjoins fore loading application bundles, but may need some changes in the app client.
found oin the app-configurator.ts
file.
const manifestMapper =
(basePath: string) =>
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(value: any): AppManifest => {
const { appKey, appInformation, isLegacy } = value;
return { ...appInformation, entry: `${basePath}/api/bundles/${appKey}`, isLegacy };
};
const manifestMappers =
(basePath: string) =>
(value: any): AppManifest => {
const { key, name, version } = value;
return { ...value, key, name, version, entry: `${basePath}/api/bundles/${key}` };
};
export const appConfigurator =
(client: Client): AppConfigBuilderCallback =>
async (builder) => {
const serviceDiscovery = await builder.requireInstance('serviceDiscovery');
const http = await builder.requireInstance('http');
const portal = await serviceDiscovery.createClient('portal');
const portalClient = await http.createClient('portal-client');
builder.setAppClient({
getAppManifest: (query) => {
return portalClient.json$(`/api/onboarded-apps/${query.appKey}`, {
selector: async (res) => manifestMapper(client.baseUri)(await res.json()),
});
},
getAppManifests: () =>
portalClient.json$(`/api/fusion/apps`, {
selector: async (res) => (await res.json()).map(manifestMappers(client.baseUri)),
}),
getAppConfig: (query) => portal.json$(`/api/apps/${query.appKey}/config`),
});
};
application loading will need update. In the legacyAppLoader applications, in the LegacyAppContainer.ts
file, in the #loadScript
function.
async #loadScript(appKey: string): Promise<void> {
return new Promise((resolve, reject) => {
const script = document.createElement("script");
script.async = true;
script.id = appKey;
document.head.appendChild(script);
script.addEventListener("load", () => resolve());
script.addEventListener("abort", () => reject());
script.addEventListener("error", () => reject());
// This url may / should change and yes i know its hack :P
script.src = `${window["clientBaseUri"]}/api/bundles/${appKey}.js`;
});
}
Landing pages
Landing pages code can be found under:
client/packages/portal-pages
The project portal has 3 pages, project-portal
, project
or facility
. If any changes are needed here it should be straight forward to do any changes.
Core Components
When the the portal started supporting multiple contexts the two need module where introduced these can bee read more about under Fusion Framework custom modules. There are tree custom modules at the moment.
- Menu
- Portal Config
- Telemetry
The modules are made for future concepts to be applied.
Portal Management
After some delays, reevaluating our portal administration approach has proven beneficial given changing requirements. Now, it's time to prioritize developing an effective portal administration tool.
The portal administration tool will be clearly outlined, detailing all its features and including user stories in its dedicated section.
Web Server
The project portal team handles all tasks related to the web server. Its primary responsibility is to host the HTML files for the website to be mounted on and manage the environment configuration for the portal. Additionally, the server facilitates proxy calls as necessary.