Rancher UI
Go to file
loganhz a8af73be87 Add the script for updating i18n files
https://github.com/rancher/rancher/issues/10078
2017-10-13 20:38:04 +08:00
app Merge pull request #1398 from n313893254/work 2017-10-12 11:00:38 -07:00
blueprints more fixes for upgrade 2017-03-30 15:53:51 -07:00
config Remove baseURL 2017-10-11 01:01:08 -07:00
public k8s config fix 2017-10-02 16:20:02 -07:00
scripts Add the script for updating i18n files 2017-10-13 20:38:04 +08:00
server Kubernetes dashboard 2017-09-19 12:17:22 -07:00
ssl Update local cert CN & expiry 2016-07-15 14:14:15 -07:00
tests Stuff 2017-08-15 22:21:54 -07:00
translations Show proper growl when websocket connection failed. 2017-10-12 09:01:02 +08:00
vendor Better json sanitizing 2017-10-02 18:35:39 -07:00
.ackrc More accordions 2017-04-10 14:57:57 -07:00
.bowerrc Initial Import 2014-12-17 14:19:03 -07:00
.dockerignore Dockerfile 2017-02-11 00:50:06 -07:00
.drone.yml Bugs 2017-01-27 02:23:03 -07:00
.drone.yml.sig Change Drone YAML for Drone 0.5 (#828) 2016-09-02 01:03:56 -07:00
.editorconfig Ember 1.12 updates 2015-06-26 01:37:39 -07:00
.ember-cli Add selfsigned SSL for local devlopment 2016-02-01 13:11:46 -07:00
.eslintrc.js Service revision diff display 2017-09-06 11:29:20 -07:00
.gitignore Popout Kube shell 2017-10-04 17:00:34 -07:00
.gitmodules term.js -> xterm.js (rancher/rancher#5049) 2016-07-08 13:50:33 -07:00
.travis.yml Updates for ember 2.12 2017-03-29 19:03:45 -07:00
.watchmanconfig Webhooks (#954) 2016-12-27 16:33:04 -07:00
Dockerfile Ports 2017-04-05 15:52:57 -07:00
LICENSE Remove notice from license 2015-02-25 15:23:22 -07:00
README.md Nevermind. Decided to implment yarn. 2017-03-30 17:13:26 -07:00
bower.json Service revision diff display 2017-09-06 11:29:20 -07:00
crowdin.yml Add the script for updating i18n files 2017-10-13 20:38:04 +08:00
ember-cli-build.js Expose metadata field in add service and edit service pages 2017-09-28 16:42:41 +08:00
jsconfig.json Add Conatiner Cloud user registration system 2017-02-10 17:02:54 -07:00
package.json Remove bridged networking for k8s 2017-10-04 11:38:26 -07:00
testem.js more fixes for upgrade 2017-03-30 15:53:51 -07:00
testem.json Ember 1.12 updates 2015-06-26 01:37:39 -07:00
yarn.lock Update uglify 2017-09-18 19:25:28 -07:00

README.md

Rancher UI

Perhaps you like managing Cattle.

Build Status

Usage

Prerequisites:

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

  brew install node watchman yarn
  yarn global add bower

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/latest so that it's available at http://your-server.com/latest (you can rename the "latest" part with the -v flag)
  • If your Rancher is behind a SSL proxy, your-server must also respond to SSL requests
  • Change the value of http[s]://your-rancher:8080/v1/settings/api.ui.index to //yourserver.com/latest

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.

License

Copyright (c) 2014-2016 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.