From 459190805a5b5d8fbb7fcb5daad7ac6ddcd151ef Mon Sep 17 00:00:00 2001 From: loganhz Date: Wed, 8 Aug 2018 13:19:46 +0800 Subject: [PATCH 1/5] Show proper error message in login page if server is unreachable https://github.com/rancher/rancher/issues/14360 --- lib/shared/addon/access/service.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/shared/addon/access/service.js b/lib/shared/addon/access/service.js index c901a4165..b349ef1f6 100644 --- a/lib/shared/addon/access/service.js +++ b/lib/shared/addon/access/service.js @@ -86,7 +86,7 @@ export default Service.extend({ return this.loadMe(); }).catch((err) => { next(() => { - set(this, 'app.initError', err); + set(this, 'app.initError', ( err && err.message ) ? err : { message: 'No response received' } ); }); set(this, 'providers', []); }); From f59193a9013de4ab0bf440713b8371defc262866 Mon Sep 17 00:00:00 2001 From: Vincent Fiduccia Date: Thu, 9 Aug 2018 13:09:14 -0700 Subject: [PATCH 2/5] opt out dev, replace clusters --- README.md | 11 +++++------ app/update-password/route.js | 2 +- lib/shared/addon/components/cru-cluster/component.js | 7 +++++++ package.json | 4 ++-- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 205daf925..d49116624 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,6 @@ Rancher UI Perhaps you like managing Cattle. -[![Build Status](https://drone.rancher.io/api/badges/rancher/ui/status.svg)](https://drone.rancher.io/rancher/ui) - ## Usage Prerequisites: @@ -69,9 +67,10 @@ Rancher UI supports localization via translations files. You can swap translatio 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` +- 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 @@ -98,7 +97,7 @@ Or just [click here](//github.com/rancher/rancher/issues/new?title=%5BUI%5D%20) License ======= -Copyright (c) 2014-2016 [Rancher Labs, Inc.](http://rancher.com) +Copyright (c) 2014-2018 [Rancher Labs, Inc.](http://rancher.com) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/app/update-password/route.js b/app/update-password/route.js index b576df09c..881724ca8 100644 --- a/app/update-password/route.js +++ b/app/update-password/route.js @@ -25,7 +25,7 @@ export default Route.extend({ const version = get(this, `settings.${ C.SETTING.VERSION_RANCHER }`); let optIn; - if ( version && version !== 'master' ) { + if ( version && !['dev','master'].includes(version) ) { // For releases, default to opt in optIn = (cur !== 'out'); } else { diff --git a/lib/shared/addon/components/cru-cluster/component.js b/lib/shared/addon/components/cru-cluster/component.js index edec45087..a648dbe35 100644 --- a/lib/shared/addon/components/cru-cluster/component.js +++ b/lib/shared/addon/components/cru-cluster/component.js @@ -193,6 +193,13 @@ export default Component.extend(ViewNewEdit, ChildHook, { } }), + doSave(opt) { + opt = opt || {}; + opt.qp = { '_replace': 'true' }; + + return this._super(opt); + }, + didSave() { const originalCluster = get(this, 'cluster'); diff --git a/package.json b/package.json index e61c0d6f4..9767cd75d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ui", - "version": "2.0.64", + "version": "2.0.65", "private": true, "directories": { "doc": "doc", @@ -29,7 +29,7 @@ "card": "2.4.0", "d3": "3.5.17", "dotenv": "^4.0.0", - "ember-api-store": "2.6.12", + "ember-api-store": "2.6.13", "ember-assign-helper": "^0.1.2", "ember-basic-dropdown": "^1.0.0", "ember-browserify": "^1.2.0", From 3b581c5e8979710936dd39584b6f635edf628c17 Mon Sep 17 00:00:00 2001 From: Chris Kim Date: Thu, 9 Aug 2018 16:20:39 -0700 Subject: [PATCH 3/5] Change suported -> supported --- translations/en-us.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translations/en-us.yaml b/translations/en-us.yaml index 1b5330f26..7084b5376 100644 --- a/translations/en-us.yaml +++ b/translations/en-us.yaml @@ -2876,7 +2876,7 @@ dangerZone: 'engine-install-url': 'Default Docker engine installation URL (for most node drivers)' 'engine-iso-url': 'Default OS installation URL (for vSphere driver)' 'engine-newest-version': 'The newest supported version of Docker at the time of this release. A Docker version that does not satisfy supported docker range but is newer than this will be marked as untested' - 'engine-supported-range': 'Semver range for suported Docker engine versions. Versions which do not satisfy this range will be marked unsupported in the UI' + 'engine-supported-range': 'Semver range for supported Docker engine versions. Versions which do not satisfy this range will be marked unsupported in the UI' 'ingress-ip-domain': 'Wildcard DNS domain to use for automatically generated Ingress hostnames. .. will be added to the domain.' 'server-url': 'Default {appName} install url. Must be HTTPS. All nodes in your cluster must be able to reach this.' 'system-default-registry': 'Private registry to be used for all system Docker images' From e6334d48ad7d8462bc9c5d49225ab66b21ea5e53 Mon Sep 17 00:00:00 2001 From: Vincent Fiduccia Date: Thu, 9 Aug 2018 16:55:22 -0700 Subject: [PATCH 4/5] Bump yarn --- yarn.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yarn.lock b/yarn.lock index 41e3ace41..c014087f0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2604,9 +2604,9 @@ elliptic@^6.0.0: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.0" -ember-api-store@2.6.12: - version "2.6.12" - resolved "https://registry.yarnpkg.com/ember-api-store/-/ember-api-store-2.6.12.tgz#c60638ecc53af22c128bfd710e171c098c7483db" +ember-api-store@2.6.13: + version "2.6.13" + resolved "https://registry.yarnpkg.com/ember-api-store/-/ember-api-store-2.6.13.tgz#49b0a8bbd4741619651f3e28999814d199352a11" dependencies: broccoli-file-creator "^1.1.1" ember-cli-babel "^6.8.2" @@ -8551,4 +8551,4 @@ yargs@~3.10.0: yeast@0.1.2: version "0.1.2" - resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419" \ No newline at end of file + resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419" From cfa6d817d1a3c3c79497bb1174da9b156cfa0a5e Mon Sep 17 00:00:00 2001 From: Vincent Fiduccia Date: Thu, 9 Aug 2018 20:45:48 -0700 Subject: [PATCH 5/5] lint --- app/update-password/route.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/update-password/route.js b/app/update-password/route.js index 881724ca8..aa83af1e8 100644 --- a/app/update-password/route.js +++ b/app/update-password/route.js @@ -25,7 +25,7 @@ export default Route.extend({ const version = get(this, `settings.${ C.SETTING.VERSION_RANCHER }`); let optIn; - if ( version && !['dev','master'].includes(version) ) { + if ( version && !['dev', 'master'].includes(version) ) { // For releases, default to opt in optIn = (cur !== 'out'); } else {