Name: origin-web-console
Owner: OpenShift
Description: Web Console for the OpenShift Application Platform
Created: 2016-05-10 19:31:50.0
Updated: 2018-05-16 13:43:51.0
Pushed: 2018-05-24 12:20:30.0
Homepage: https://www.openshift.org/
Size: 75561
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
The management console for OpenShift Origin.
Be sure to have a development environment running for OpenShift. See the contributing doc, we recommend the use of oc cluster up
.
Install grunt-cli and bower by running npm install -g grunt-cli bower
(may need to be run with sudo)
Install dev dependencies by running hack/install-deps.sh
Launch the console and start watching for asset changes by running grunt serve
. This should open https://localhost:9000/ in your default browser.
Note: If you see an ENOSPC error, you may need to increase the number of files your user can watch by running this command:
fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
Accept the self-signed certificate for the web console. (For Chrome on OS X, import server.crt
into Keychain Access or accept the web console certificate in Safari.)
Debug logging can be enabled by opening your browser's JavaScript console, running the commands below, and then refreshing the page.
lStorage["OpenShiftLogLevel.main"] = "<log level>";
lStorage["OpenShiftLogLevel.auth"] = "<log level>";
Loggers:
OpenShiftLogLevel.main
- default logger for OpenShiftOpenShiftLogLevel.auth
- auth specific logger, this includes login, logout, and oauthThe supported log levels are:
Note: currently most of our logging either goes to INFO or ERROR
app/config.js
is the default configuration file for web console
development. If you need to change the configuration, for example, to point to
a different API server, copy app/config.js
to
app/config.local.js
and edit the copy. app/config.local.js
is
not tracked and will be used instead if it exists.
Please configure your editor to use the following settings to avoid common code inconsistencies and dirty diffs:
Or configure your editor to
utilize .editorconfig
,
which will apply these settings automatically.
Then:
grunt build
to update the files under the dist directorygrunt test
grunt test-integration
Note: in order to run the end to end tests you must have Firefox installed.
hack/install-deps.sh
grunt build
hack/build-go.sh
The assets served by the OpenShift all-in-one server will now be up to date. By default the assets are served from http://localhost:8091
If Jenkins complains that the built dist files are different than the committed version, ensure the committed version is correct:
hack/clean-deps.sh
hack/install-deps.sh
grunt build
The web console is currently split into three repositories. The two dependency repos are
origin-web-common and
origin-web-catalog.
To make changes to one of these repositories while working in the web console, it is recommended that you clone down the
repository and create a bower link
. The following example assumes you clone your forks to ~/git-repos
:
rk the origin-web-console & clone:
~/git-repos
t clone git@github.com:<your-fork>/origin-web-console.git
rk origin-web-common & clone:
~/git-repos
t clone git@github.com:<your-fork>/origin-web-common.git
rk origin-web-catalog & clone:
~/git-repos
t clone git@github.com:<your-fork>/origin-web-catalog.git
w, using bower link you can:
~/git-repos/origin-web-common
wer link
~/git-repos/origin-web-catalog
wer link
~/git-repos/origin-web-console
wer link origin-web-common
wer link origin-web-catalog
TE:
en you make changes in the linked repos you will need to rebuild
origin-web-console pulls from the /dist. `grunt build` or `grunt watch`
ould take care of this.
When finished, be sure to hack/clean-deps.sh
and hack/install-deps.sh
to remove
the links & avoid having issues with /dist
conflicts the next time you build.
The OpenShift v3 web console is based on AngularJS and Hawt.io
The v3 console supports a custom context root. When running as part of the openshift start
command the console's context root is injected into the <base>
tag of the index.html file. In order to support custom context roots, all console URLs must be relative, so they should not contain a leading “/” character.
For example if you want to specify a URL directly in an HTML template to go to the project overview it would look like
ref="project/foo/overview">
and would actually resolve to be /contextroot/project/foo/overview
by the browser. Similarly, if you want to use JavaScript to change the current page location, you should use the $location service from angular like
ation.url("project/foo/overview")
Finally, if you want to reference the root of the web console use the path ./
There are two main ways to extend the v3 OpenShift console.
We rely on hawtio-core-navigation to build the primary/secondary nav that appears once you are in a project. We have customized the rendering of the tabs, so refer to app/scripts/app.js to see how we register our out of the box tabs.
We include the hawtio-extension-service. Currently we do not render any extension points, but if there are any locations where you would like to see customizable content, this is how we will add a hook to do that. As hooks are added we will provide a list of them here.