From db1c209b78e9cc5f9c249896b3765bb26461edac Mon Sep 17 00:00:00 2001 From: n313893254 Date: Tue, 8 May 2018 10:34:03 +0800 Subject: [PATCH 1/3] Incorrect heading - Not in a project https://github.com/rancher/rancher/issues/13195 --- 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 8d1433d75..31cabf12e 100644 --- a/translations/en-us.yaml +++ b/translations/en-us.yaml @@ -4252,7 +4252,7 @@ modalWelcome: namespaceGroup: label: "Namespace: {name}" none: Pod - project: Not in a project + project: "Namespace: All" nodeGroup: label: "Node: {name}" From fdc8a7a46c55a35d8b30d5f410328ac0898f3cba Mon Sep 17 00:00:00 2001 From: n313893254 Date: Tue, 8 May 2018 11:08:21 +0800 Subject: [PATCH 2/3] Elasticsearch Endpoint should use default protocol ports when port is not given https://github.com/rancher/rancher/issues/13114 --- .../components/logging/new-edit/component.js | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/lib/logging/addon/components/logging/new-edit/component.js b/lib/logging/addon/components/logging/new-edit/component.js index 615fa4768..3651daa1f 100644 --- a/lib/logging/addon/components/logging/new-edit/component.js +++ b/lib/logging/addon/components/logging/new-edit/component.js @@ -3,6 +3,7 @@ import { inject as service } from '@ember/service'; import { get, set } from '@ember/object'; import { reads } from '@ember/object/computed'; import NewOrEdit from 'ui/mixins/new-or-edit'; +import parseUri from 'shared/utils/parse-uri'; export default Ember.Component.extend(NewOrEdit, { scope: service(), @@ -36,6 +37,19 @@ export default Ember.Component.extend(NewOrEdit, { && get(this, 'targetType') === 'none'; }.property('originalModel.{id,targetType}', 'targetType'), + formatUrl: function(url) { + const urlParser = parseUri(url) || {} + if (!urlParser.port) { + if (urlParser.protocol === 'http') { + return `${urlParser.protocol}://${urlParser.host}:80` + } + if (urlParser.protocol === 'https') { + return `${urlParser.protocol}://${urlParser.host}:443` + } + } + return url + }, + actions: { save(cb) { const targetType = get(this, 'targetType'); @@ -91,7 +105,13 @@ export default Ember.Component.extend(NewOrEdit, { } set(model, 'outputFlushInterval', get(model, `${targetType}.outputFlushInterval`)); set(model, 'outputTags', get(model, `${targetType}.outputTags`)); - set(model, `${targetType}Config`, get(model, `${targetType}.config`)); + + const formatConfig = get(model, `${targetType}.config`) + if (targetType === 'elasticsearch') { + Object.assign(formatConfig, {endpoint: this.formatUrl(formatConfig.endpoint)}) + } + + set(model, `${targetType}Config`, formatConfig); this._super(cb); }, }, From f9419850adfa6a4f5ca5a768cba552665b953d32 Mon Sep 17 00:00:00 2001 From: n313893254 Date: Tue, 8 May 2018 14:37:45 +0800 Subject: [PATCH 3/3] Make Repository the default field when I get into Add Pipeline https://github.com/rancher/rancher/issues/13287 --- lib/pipeline/addon/components/step-scm/component.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/pipeline/addon/components/step-scm/component.js b/lib/pipeline/addon/components/step-scm/component.js index eadc651e9..2df41e9c6 100644 --- a/lib/pipeline/addon/components/step-scm/component.js +++ b/lib/pipeline/addon/components/step-scm/component.js @@ -73,6 +73,9 @@ export default Component.extend({ let repositories = get(this, 'modalOpts.routeState.repositories'); set(this, 'repositories', repositories); set(this, 'statusFetching',false); + + const initUrl = repositories.content && repositories.content[0] && repositories.content[0].url + set(this, 'selectedModel.sourceCodeConfig.url', initUrl) this.urlObserve(); }, urlObserve: function(){