The openshift/online-console-extensions repository contains CSS, JavaScript, and HTML files that extend the OpenShift Web Console specifically for OpenShift Online deployments. As a platform integration and web application extension project, it serves as a customization layer that enhances the user interface and dashboard capabilities of the Origin Web Console through targeted modifications and additions.
The repository is built and deployed within an Apache HTTP Server container, allowing it to be tested directly in an OpenShift cluster. Developers can deploy the extensions using the source-to-image approach with a simple command that pulls from this repository and creates a new application. Once deployed, the extension files become accessible through a web browser route at the /ui path, making them available to the console infrastructure.
A key architectural feature of this project involves the conversion of HTML templates into JavaScript modules to avoid CORS header requirements. Rather than serving HTML templates directly, the build process transforms them into JavaScript that injects the HTML content into pages dynamically. This approach simplifies deployment and integration with the main online extensions module. The build process uses Grunt and supports multiple environment configurations including free, paid, dedicated, and notifications variants. When developers modify HTML templates, they must regenerate the corresponding JavaScript files using the grunt build command with the appropriate environment flag, producing output files like templates.js that must be committed and included as extensionScripts in the openshift-web-console project.
The repository includes automated validation through Jenkins jobs that check whether generated templates have been properly updated when HTML files change. If template changes are committed without regenerating the JavaScript equivalents, the build fails with a specific error message. Developers can run the hack/check-generated-templates.sh script locally to identify which files need regeneration before submitting pull requests, streamlining the development workflow.
The project uses a custom builder image based on rhscl/httpd-24-rhel7 to ensure consistent URLs for hosted files across deployments. This builder image copies environment-specific files from either the free or paid directories into a common /ui directory structure, allowing the same deployment mechanism to serve different configurations. The source-to-image build process accepts a TARGET environment variable to specify which variant should be built, enabling flexible deployment across different OpenShift Online service tiers.
As a JavaScript-primary project classified within the OpenShift and Kubernetes ecosystem, this repository directly supports cloud-native application management and user experience improvements for OpenShift Online users. It bridges the gap between the core OpenShift Web Console and the specific requirements of the online service offering, providing customizations that would not be appropriate for the broader Origin project. The extension mechanism allows Red Hat to maintain a clean separation between generic console functionality and online-specific enhancements while keeping both codebases synchronized and maintainable.