Currently, HCC UI deployment is running in "hybrid mode". Some UIs are leveraging the new frontend operator and some are still using the legacy pipeline. Because in FEO all cloud services config files are handled by the chrome deployment pipeline, none of the files are deployed when a PR is merged inside the GH repository.
The modules and navigation files have been temporarily moved over to the Chrome service API to ensure normal updates. Once HCC is out of the "hybrid mode" (all UIs are using FEO), all navigation and module files will be defined in frontend.yml
embedded within the UI codebase.
The env branches do not exist in this repository (and were annoying). Each environment has its own directory.
Any changes made to prod-stable
or prod-beta
will not be deployed after merge. The chrome service image has to be bumped in app-interface
. Prod env is not fully onboarded for CI/CD.
This API is not running on qaprodauth
and can cause issues in these environments.
This is also a legacy file. We will work on adding support for main.yml
or an alternative to keep the API docs component up to date.
The routes
attribute defined in fed-modules.json
can no longer be a simple array of strings.
- "routes": ["/foo/bar"]
+ "routes": [{"pathname": "/foo/bar"}]
Apart from the routes
attribute, the format has stayed the same. The only difference is the file locations and the environments.
All CSC files are located under the /static
directory. Based on the required environment, you can choose which files to change.
Modules
/static/stable/prod/modules/fed-modules.json
for prod-stable/static/stable/stage/modules/fed-modules.json
for stage-stable/static/beta/prod/modules/fed-modules.json
for prod-beta/static/beta/stage/modules/fed-modules.json
for stage-beta
Navigation files
/static/stable/prod/navigation/*.-navigation.json
for prod-stable/static/stable/stage/navigation/*.-navigation.json
for stage-stable/static/beta/prod/navigation/*.-navigation.json
for prod-beta/static/beta/stage/navigation/*.-navigation.json
for stage-beta
Services
/static/stable/prod/services/services.json
for prod-stable/static/stable/stage/services/services.json
for stage-stable/static/beta/prod/services/services.json
for prod-beta/static/beta/stage/services/services.json
for stage-beta
There are two options to start an asset server for local development
routes: {
"/api/chrome-service/v1/static": {
host: "http://localhost:<port>"
}
}
If your machine has golang setup, you can run the following command:
dev-static
This command will start dev server on http://localhost:8000
You can adjust the server port by adding port argument:
make dev-static port=9999
This command will start dev server on http://localhost:9999
If your machine does not have golang or you don't want to use golang, there is an alternative using nodejs:
make dev-static-node
This command will start dev server on http://localhost:8000
You can adjust the server port by adding port argument:
make dev-static-node port=9999
This command will start dev server on http://localhost:9999
You can use the CSC documentation for reference.
Left navigation now supports extra nesting level. To add additional level to your navigation, add expandable navigation partial instead of leaf link to a nav array in a navigation file:
// Navigation file of a bundle
{
"id": "navSection",
"title": "My nav",
"navItems": [
{
// regular level of nesting
"title": "Normal expandable item",
"expandable": true,
"routes": [
{
// extra nested links
"title": "Deeply expandable item",
"expandable": true,
// regular routes definition
"routes": [
{
"id": "linkId",
"appId": "uiModuleId",
"title": "Deep link",
"href": "/path/to/screen",
"description": "Description for all services"
},
]
}
]
}
]
}
There is a new schema that controls which items will be display in the all services dropdown and pages.
The data is store in service.json
files within static
directory. Each environment has its own definition file. For example, for stage-beta
environment, the file is located at /static/beta/stage/services/services.json
In order for a link to be eligible to display in the all services dropdown it must have following attributes inside the -navigation.json file:
id
: a bundle unique id of a linkdescription
: short description of the page the link leads tohref
: pathname to be used
To add a link to services.json
follow these steps:
- Find relevant
services.json
based on environment. - Find relevant section (item in the top level array).
- (optional) Find a relevant group within a section.
- Add new link ID into the
links
array. The id must be in following format<navigation file prefix>.<link id>
Note: the navigation file prefix means the a part of the navigation file name before the
-navigation.json
string. For example prefix foransible-navigation.json
isansible
. In this case, valid id would beansible.linkId
.
If your link does not fit into any existing section and you need a new one, follow these steps.
- Make sure the section is both UX and PM approved.
- Find relevant
services.json
based on environment. - Based on your title, insert a new empty at a correct place inside the services array. The order is sorted alphabetically based on the title.
- Add all required data into the object (example bellow).
- (optional) Segment your section into groups (example bellow).
- Add all required links into the
links
array.
Basic section object
{
id: string; // unique section id
title: string; // title of a section
icon: "CloudUploadAltIcon" | "AutomationIcon" | "DatabaseIcon" | "RocketIcon" | "UsersIcon" | "InfrastructureIcon" | "BellIcon" | "ChartLineIcon" | "CloudSecurityIcon" | "CreditCardIcon" | "CogIcon" | "ShoppingCartIcon"; // icon representing section
description: string; // short section description
links: string[] // list of links
}
If you require a new icon, contact the platform experience team. Only PF svg icons are available for use!
Section with grouped links
If you require links to be divided into groups, yse the same for as for basic section with different links array format.
{
links: {
id: string // group id
isGroup: true // mark item as group
title: string // group title
links: string[] // array of link ids
}[]
}
Basic section links and grouped section links can't be mixed!