Rancher UI
westlywright Merge pull request #2301 from westlywright/ns-quota-tweak
Tweak colors and fix bug in ns resource prog bar
Latest commit 9b07471 Sep 20, 2018
Permalink
Failed to load latest commit information.
.github Update Pull Request template Sep 19, 2018
app Tweak colors and fix bug in ns resource prog bar Sep 20, 2018
blueprints move node drivers to engine Aug 15, 2018
config Missed what seemed to be a critical update to the testem.js file 3.3 Aug 16, 2018
lib change Recipients -> Notifiers Sep 20, 2018
public Remove embedded and add fluentd target Sep 10, 2018
scripts Upload latest on commit Sep 13, 2018
server Telemetry Jul 30, 2018
ssl Update local cert CN & expiry Jul 15, 2016
tests removed unused component Aug 28, 2018
translations update zh-hans Sep 20, 2018
vendor New EKS fields Jul 30, 2018
.ackrc Catalog support Dec 12, 2017
.bowerrc Initial Import Dec 17, 2014
.dockerignore Dockerfile Feb 11, 2017
.drone.yml No upload for PRs Sep 17, 2018
.drone.yml.sig Change Drone YAML for Drone 0.5 (#828) Sep 2, 2016
.editorconfig Ember 1.12 updates Jun 26, 2015
.ember-cli Add selfsigned SSL for local devlopment Feb 1, 2016
.eslintignore Update drone Apr 25, 2018
.eslintrc.js WIP - Azure Driver Changes Sep 6, 2018
.gitignore Update gitignore Apr 18, 2018
.gitmodules term.js -> xterm.js (rancher/rancher#5049) Jul 8, 2016
.travis.yml Update to 2.16.2 from beta branch for fixes Nov 8, 2017
.watchmanconfig Webhooks (#954) Dec 27, 2016
Dockerfile remove bower dependecies May 9, 2018
LICENSE Remove notice from license Feb 25, 2015
README.md opt out dev, replace clusters Aug 9, 2018
crowdin.yml Add the script for updating i18n files Oct 13, 2017
ember-cli-build.js error handling azure aks Sep 6, 2018
jsconfig.json Add Conatiner Cloud user registration system Feb 11, 2017
package.json bump package Sep 19, 2018
testem.js Missed what seemed to be a critical update to the testem.js file 3.3 Aug 16, 2018
yarn.lock yarn lock Sep 13, 2018

README.md

Rancher UI

Perhaps you like managing Cattle.

Usage

Prerequisites:

If you're on a Mac and use Homebrew, you can follow these steps:

  brew install node watchman yarn

Setup:

  git clone 'https://github.com/rancher/ui'
  cd 'ui'
  ./scripts/update-dependencies

Run development server:

  yarn start

Connect to UI at https://localhost:8000/ . The server automatically picks up file changes, restarts itself, and reloads the web browser. This is intended only for development, see below for distributing customizations.

Run development server pointed at another instance of the Rancher API

  RANCHER="http://rancher:8080/" yarn start

and/or pointed at another instance of the Catalog API

  CATALOG="http://catalog:8088/" yarn start

RANCHER and CATALOG can also be hostname[:port] or ip[:port].

Compiling for distribution

Rancher releases include a static copy of the UI passed in during build as a tarball. To generate that, run:

  ./scripts/build-static

Customizing

We highly suggest making customizations as an ember-cli addon rather than forking this repo, making a bunch of changes and then fighting conflicts to keep it up to date with upstream forever. ui-example-addon-machine is an example addon that adds a custom screen for a docker-machine driver. If there is no way for you to get to what you want to change from an addon, PRs to this repo that add generalized hooks so that you can are accepted.

Translations

Rancher UI supports localization via translations files. You can swap translations live by utilizing the Language Picker located in the footer. If you would like to add your own translations files follow the directions below.

  • Fork the Rancher UI repo
  • Copy the en-us.yaml file located in /translations folder and rename using the <language-code>/<country-code>.yaml format (Supported Locales)
  • Replace the values on each key with you're new values corresponding to your language
  • Ensure you replace the languageName value as this is what will be displayed in the language picker in the UI
  • While developing you can use SHFT + L when not focused in an input or text area to toggle the languages between your currently selected language and a special none language to see what key values are missing
  • When you've finished you're translations issue a pull request back to the Rancher UI repo to have your translation included

Hosting remotely

If you want to customize the UI, re-packaging all of Rancher to distribute the UI is possible but not terribly convenient. Instead you can change Cattle to load the UI source from a remote web server:

  • Build with ./scripts/build-static -l -c 'your-server.com'
  • Upload ./dist/static/latest2 so that it's available at https://your-server.com/latest2
    • It must be available over HTTPS.
    • You can rename the "latest2" part with the -v flag
  • Change the value of http[s]://your-rancher:8080/v3/settings/ui-index to the same https://yourserver.com/latest2 URL

Running Tests

  yarn global add ember-cli
  • ember test
  • ember test --server

Bugs & Issues

Please submit bugs and issues to rancher/rancher with a title starting with [UI].

Or just click here to create a new issue.

Useful links

License

Copyright (c) 2014-2018 Rancher Labs, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.