Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging 1.6-dev version #14

Open
wants to merge 336 commits into
base: production
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
336 commits
Select commit Hold shift + click to select a range
cde2cec
fix bug of https://github.com/rancher/rancher/issues/9575
Aug 23, 2017
3364084
Merge pull request #1319 from orangedeng/bugfix-9575
vincent99 Aug 23, 2017
4ca2f04
Fix encoding on secrets - Backport rancher/rancher#7670
westlywright Aug 23, 2017
1456d5d
Fix bug with edit ad text
westlywright Aug 23, 2017
e0031d0
Merge pull request #1320 from westlywright/1.6-dev
vincent99 Aug 23, 2017
aa4259d
UI tweaks from QA
westlywright Aug 23, 2017
2b1dbb2
Expose connection timeout for ldap auth services
westlywright Aug 23, 2017
e5539b3
Version bump
westlywright Aug 23, 2017
e4a6223
Merge pull request #1322 from westlywright/1.6-dev
vincent99 Aug 24, 2017
bd56eb3
17.06 option
vincent99 Aug 23, 2017
108dbda
Merge pull request #1324 from vincent99/1.6-dev
vincent99 Aug 24, 2017
ea0f590
bump version
vincent99 Aug 28, 2017
38ccc1a
Merge pull request #1328 from vincent99/1.6-dev
vincent99 Aug 28, 2017
223949c
Update translation for Japanese (#1338)
go Sep 5, 2017
1bf0456
Fix tests for port parsing
vincent99 Sep 8, 2017
4400a5d
Merge pull request #1346 from vincent99/1.6-dev
vincent99 Sep 8, 2017
3fba31c
add Alibaba Cloud Docker Hub webhook support in service upgrade
Sep 12, 2017
7ddd85e
Merge pull request #1350 from loganhz/1.6-dev
vincent99 Sep 15, 2017
fb9095d
Add tsystems driver to ui
westlywright Jan 10, 2017
6c47480
Add driver icon for admin
westlywright Mar 6, 2017
730c2bc
Change route for flavors
westlywright Mar 10, 2017
d88a878
rename hwclouds -> otc
westlywright Mar 31, 2017
98af83a
Remove vpc param from sec groups call
westlywright Apr 6, 2017
bd2ad0c
Modify the vpc calls to call the vpc endpoint
westlywright May 1, 2017
e390ddc
Fixes for t-systems
westlywright Sep 19, 2017
29270ea
fix text error
westlywright Sep 19, 2017
37d7d51
Merge pull request #987 from westlywright/hwclouds-driver
vincent99 Sep 19, 2017
65c44a5
Add parameters validation for the Aliyunecs machine driver.
Sep 8, 2017
5586de8
Make docker install and rancher agent install more quickly when using…
Sep 14, 2017
3ce9741
Add enhancement for the ioOptimized option in the Aliyunecs machine d…
Sep 14, 2017
228fc5a
Add i18n support for aliyunecs machine driver's error.
Sep 15, 2017
96c7a96
Merge pull request #1345 from orangedeng/1.6-dev
vincent99 Oct 4, 2017
e6a4616
Fix bug with error message from OTC driver
westlywright Oct 6, 2017
e9f70eb
Prism theme
vincent99 Oct 6, 2017
11ad9bc
Merge pull request #1389 from westlywright/1.6-dev
vincent99 Oct 6, 2017
d2e9a7a
Watch IP address on ports
vincent99 Oct 7, 2017
a077796
Merge pull request #1390 from vincent99/1.6-dev
vincent99 Oct 7, 2017
d72230e
Bump version
vincent99 Oct 9, 2017
8397941
Merge pull request #1392 from vincent99/1.6-dev
vincent99 Oct 9, 2017
d19aa85
Fix bug with error page from Up to date button https://github.com/ran…
n313893254 Oct 11, 2017
c1a6b7f
Merge pull request #1394 from n313893254/work1
vincent99 Oct 11, 2017
7c34b02
Clear selected template Url when catalog changed
Oct 12, 2017
d2de26a
Select the first available zone which has at least one subnet.
Oct 13, 2017
4878528
Merge pull request #1399 from loganhz/catalog
vincent99 Oct 13, 2017
fba9524
Merge pull request #1402 from loganhz/aws-vpc-1.6
vincent99 Oct 13, 2017
116a2f6
Fix login issue
Oct 16, 2017
7ca3bc7
Update environment value for AzureUSGovernmentCloud
Oct 16, 2017
54b7c7c
Merge pull request #1405 from loganhz/auth-issue
vincent99 Oct 16, 2017
aaaa415
Show proper error message for fields in ldap auth setup page
Oct 17, 2017
7e6d6fa
Merge pull request #1412 from loganhz/ldap-1.6
vincent99 Oct 17, 2017
e30fe9a
Make per-host-subnet as readonly label on edit host page
Oct 18, 2017
430eb89
Bump version
Oct 18, 2017
9110a3b
Merge pull request #1415 from loganhz/per-hot-subnet
vincent99 Oct 18, 2017
e4c3072
Fix flash issue when switch catalog through drop-down
Oct 19, 2017
fddcef3
Merge pull request #1418 from loganhz/catalog
vincent99 Oct 19, 2017
7e0ef6d
Hostname Validation Change for Aliyun Machine Driver
Oct 13, 2017
81481e8
Merge pull request #1403 from orangedeng/new-fix-9770
vincent99 Oct 23, 2017
eb0c8c0
bump version
vincent99 Oct 23, 2017
c51cea3
Merge pull request #1422 from vincent99/1.6-dev
vincent99 Oct 23, 2017
0b4389c
Fix the issue that cancel button text can not be translated in Chines…
Oct 28, 2017
d0e3082
Support drain timeout during service creation and upgrade
Oct 30, 2017
0d5bd1b
Update the Chinese translation for driverCustom.step1
Oct 30, 2017
a26cea9
Move drain timeout from upgrade section to command section when upgra…
Oct 31, 2017
2e5c4a3
Fix github enterprise auth issue
Oct 31, 2017
bdbc251
Merge pull request #1428 from loganhz/github-enterprise
vincent99 Oct 31, 2017
b22428a
Merge pull request #1425 from loganhz/drain
vincent99 Oct 31, 2017
92ac589
Send empty username for password test
vincent99 Oct 31, 2017
fec07ea
Merge pull request #1429 from vincent99/1.6-dev
vincent99 Oct 31, 2017
cf4bee5
Upgrade lacsso
Nov 1, 2017
98fdb7e
Fix the select render issue in Firefox
Nov 1, 2017
7634d4d
Merge pull request #1426 from loganhz/firefox
vincent99 Nov 6, 2017
21b9e25
Merge pull request #1427 from loganhz/modal
vincent99 Nov 6, 2017
1098a8e
Bump version
vincent99 Nov 6, 2017
dc62104
Merge pull request #1431 from vincent99/1.6-dev
vincent99 Nov 6, 2017
ccf6a90
Upgrade xterm and make container shell resizable
Nov 9, 2017
13e9d46
Add an option for networkMode if the current value is missing
vincent99 Nov 9, 2017
7db43ed
Merge pull request #1436 from vincent99/1.6-dev
vincent99 Nov 9, 2017
0cb897b
Merge pull request #1435 from loganhz/shell
vincent99 Nov 10, 2017
e2f8ba5
Fix shell selecting lines issue
Nov 10, 2017
bbc3b3d
Explicit port 80 in kubectl config
superseb Nov 10, 2017
795cd69
Merge pull request #1438 from superseb/kubectl_port
vincent99 Nov 10, 2017
b37fe00
Merge pull request #1437 from loganhz/shell-fix
vincent99 Nov 10, 2017
171c3a7
Bump version
vincent99 Nov 10, 2017
de56cec
Merge pull request #1440 from vincent99/1.6-dev
vincent99 Nov 10, 2017
a39c79f
Fix the issue that cross environment links break UI
Nov 13, 2017
853c3f0
Merge pull request #1442 from loganhz/region
vincent99 Nov 13, 2017
f563d13
Pass focus argument to xterm for avoiding the warning message
Nov 13, 2017
29a07bf
Support region options in lb
Nov 13, 2017
307bdf3
Remove region service
Nov 14, 2017
694f573
Make JSHint happy
Nov 14, 2017
222ffbb
Add custom option to input-service
Nov 14, 2017
a2c17ee
Show custom option in service link for region
Nov 14, 2017
835b223
Remove support for service based LB rule
Nov 14, 2017
26ac8f7
Fix the service links issue
Nov 14, 2017
9777711
Merge pull request #1441 from loganhz/lb-region
vincent99 Nov 17, 2017
4b0d5f9
Add new tab as service access point to Rancher UI 1.6
Nov 30, 2017
cc8064c
Merge pull request #1460 from biblesyme/1.6-dev-serviceUI
vincent99 Dec 3, 2017
bc448e9
Fix the issue that it shows region label even user doesn't have any i…
Dec 5, 2017
2d8fd8f
Load regions if region API exist
Dec 5, 2017
edc1b0b
Merge pull request #1469 from loganhz/region
vincent99 Dec 5, 2017
7fe3c39
Change placeholder for env in LB rules
Dec 7, 2017
a3b3274
Change placeholder for custom dropdown in Service links
Dec 7, 2017
bc9b489
Use Ember.includes instead of Ember.contains
Dec 7, 2017
db4ee8a
Enable required entry for selected orchestration
Dec 7, 2017
5a63f07
Filter driver `forwardPost` of webhook-service in UI
Dec 6, 2017
3c130cd
Merge pull request #1472 from biblesyme/1.6-dev-webhookService
vincent99 Dec 8, 2017
8a7157e
Fix the issue that region links break the link tab
Dec 8, 2017
cbdd495
Fix issues https://github.com/rancher/rancher/issues/10492
Dec 8, 2017
1f0fa9f
Fix the issue that region links break the stack graph page
Dec 8, 2017
5b44e18
Merge pull request #1476 from biblesyme/1.6-dev-serviceUI-fix
vincent99 Dec 8, 2017
252de5d
Merge pull request #1474 from loganhz/region
vincent99 Dec 8, 2017
1456214
Enhance Windows Environment Experience
Dec 7, 2017
2553081
Merge pull request #1475 from orangedeng/windows
vincent99 Dec 9, 2017
0a21fcb
Bump version
vincent99 Dec 9, 2017
82faea0
Merge pull request #1478 from vincent99/1.6-dev
vincent99 Dec 9, 2017
2ae1262
Remove ds_store files
vincent99 Dec 9, 2017
d24266e
Merge pull request #1479 from vincent99/1.6-dev
vincent99 Dec 9, 2017
ed61365
Fix the issue that it shows invalid weight when it is not a region rule
Dec 12, 2017
67bb1d5
Update the placeholder for environment field
Dec 12, 2017
4f017ec
Fix add labels problem when adding host in Windows environment
Dec 13, 2017
f3b786f
Bug fix for machine driver
Dec 13, 2017
ce1fe2d
Merge pull request #1480 from loganhz/region
vincent99 Dec 13, 2017
fa0c13a
Merge pull request #1482 from orangedeng/bug-fix-for-10521
vincent99 Dec 13, 2017
59d2000
Bump version
vincent99 Dec 13, 2017
fbf1264
Merge pull request #1483 from vincent99/1.6-dev
vincent99 Dec 13, 2017
d089871
Fix typo
Dec 14, 2017
f56e480
Only show supported catalog entries in windows env
Dec 15, 2017
0c1cd66
Managed network option should not be seen in windows
Dec 15, 2017
3aa0b5e
Disable all networking options after clicking on the Windows orchestr…
Dec 17, 2017
e3df0d3
Remove the Windows Host text.
Dec 17, 2017
f0f0937
Refer to the latest supported versions of Docker
Dec 17, 2017
bb4b259
Update windows custom host setup notes.
Dec 17, 2017
0b3764f
Merge pull request #1488 from loganhz/fix
vincent99 Dec 18, 2017
2294f1b
Merge pull request #1496 from orangedeng/bug-fix-for-windows
vincent99 Dec 18, 2017
0c06368
Bump version
vincent99 Dec 18, 2017
4b26b28
Merge pull request #1499 from vincent99/1.6-dev
vincent99 Dec 18, 2017
0728bb0
Force IPsec to be enabled when clicking back from windows onto the ot…
Dec 19, 2017
793b243
Merge pull request #1500 from loganhz/fix
vincent99 Dec 19, 2017
05fe3e0
Bump version
vincent99 Dec 19, 2017
7943d11
Merge pull request #1502 from vincent99/1.6-dev
vincent99 Dec 19, 2017
f0373f2
Show full service name when hover on service label in stack graph
Dec 19, 2017
e3ce641
Add Chinese translation for some AD auth fields
Dec 20, 2017
47f71ab
Increase the width of port protocol field
Dec 26, 2017
6d60b97
Fix the issue that shell collapses in Firefox sometime
Dec 27, 2017
442003a
Add support for m5 EC2 instances
billinghamj Jan 3, 2018
3989a0b
Merge pull request #1522 from billinghamj/patch-1
vincent99 Jan 4, 2018
a09114e
Update docker install url
Jan 5, 2018
b6f0860
Change the default value of non-region port rule from 0 to 1
Jan 8, 2018
0234adf
Merge pull request #1510 from loganhz/fix
vincent99 Jan 8, 2018
1d49f32
Merge pull request #1526 from loganhz/docker-install
vincent99 Jan 8, 2018
b5c02d7
Merge pull request #1532 from loganhz/region
vincent99 Jan 8, 2018
5456e33
bump
vincent99 Jan 8, 2018
9c1dc6a
Merge pull request #1534 from vincent99/1.6-dev
vincent99 Jan 8, 2018
6d54350
Remove all .DS_Store files
vincent99 Jan 8, 2018
813dbc3
Set weight only for region rule
Jan 10, 2018
a066261
Bump version
Jan 10, 2018
7d96ae3
Merge pull request #1538 from loganhz/region
vincent99 Jan 10, 2018
7ed01e2
Fix kubectl shell issue
Jan 11, 2018
5ed567f
Bump the version
Jan 11, 2018
cfc450c
Merge pull request #1542 from loganhz/shell
vincent99 Jan 11, 2018
65c1f69
Fix aliyun dockerhub webhook issue
Dec 26, 2017
4524a0c
Add translation for azure container registry
Dec 26, 2017
c1b65cb
Make region field optional
Jan 12, 2018
d5a636e
Bump version
Jan 13, 2018
a06e9d4
Merge pull request #1547 from loganhz/webhhook
vincent99 Jan 13, 2018
f0f73a7
Merge pull request #1550 from loganhz/region
vincent99 Jan 13, 2018
c2a4e15
bump node sass
westlywright Nov 2, 2017
ff65d3f
fix some issues with content being undefined
westlywright Jan 12, 2018
b3e072b
Webhook for Windows environment
Jan 18, 2018
503e3d6
Update azure regions
Jan 19, 2018
bf8fea6
Merge pull request #1576 from loganhz/azure
vincent99 Jan 25, 2018
02dd3ed
Merge pull request #1557 from westlywright/1.6-dev
vincent99 Jan 25, 2018
3599dfd
Merge pull request #1571 from orangedeng/windows
vincent99 Jan 25, 2018
4ee350a
Bump
vincent99 Jan 25, 2018
ae78762
Merge pull request #1604 from vincent99/1.6-dev
vincent99 Jan 25, 2018
832a860
Fix region issue
Jan 30, 2018
849ba5e
Bump version
Jan 30, 2018
a129961
Merge pull request #1611 from loganhz/region
vincent99 Jan 31, 2018
82ee598
Amazon C5 instances
vincent99 Feb 6, 2018
f41261f
exoscale: adding support for zones and templates
Feb 2, 2018
abd06f7
exoscale: add new strings in french
Feb 8, 2018
ee3a264
exoscale: jshint
Feb 8, 2018
1b6b71e
Merge pull request #1629 from exoscale/zones-and-templates
vincent99 Feb 8, 2018
51c45e2
Fix a catalog question issue
Feb 9, 2018
824a548
Bump version
Feb 9, 2018
916e0af
Merge pull request #1630 from loganhz/fix
vincent99 Feb 12, 2018
f601736
exoscale: arbitrary disk size + new logo
Feb 22, 2018
8990b80
Add AWS eu-west-3 region
Mar 8, 2018
1f45eaa
Hide hostname field for host network
Mar 8, 2018
9b9af02
Show create time in container detail page
Mar 8, 2018
9949811
Show stack name in load balancer target
Mar 8, 2018
f95c11a
Fix the bug that network issues cause empty error message
Mar 8, 2018
8b3916e
Add a tooltip on container image
Mar 8, 2018
a7e0b0b
Fix device binding permission issue
Mar 8, 2018
54219c4
Fix the issue that regular users cannot filter by stack label
Mar 8, 2018
c28f478
Bump version
Mar 8, 2018
7d447d6
Merge pull request #1724 from loganhz/region
vincent99 Mar 12, 2018
01308cd
Merge pull request #1704 from greut/exoscale-arbitrary-size
vincent99 Mar 12, 2018
d114dbe
DO Tags
Apr 9, 2018
5bc1260
Merge pull request #1806 from loganhz/1.6
vincent99 Apr 9, 2018
be3b545
Add docker 18.03
Apr 11, 2018
80f29b0
Bump version
Apr 11, 2018
15c04ad
Merge pull request #1811 from loganhz/1.6
vincent99 Apr 11, 2018
40e579b
Remove beta next to Rancher CLI in download link
May 8, 2018
7cfdcd2
Update azure vm sizes
May 8, 2018
63305a2
Bump version
May 15, 2018
7b3448c
Merge pull request #1887 from loganhz/1.6
vincent99 May 15, 2018
b6c60d3
Add deprecated next to rancher compose cli
May 15, 2018
4f2cc96
Bump the version
May 15, 2018
fd16683
Merge pull request #1909 from loganhz/1.6
vincent99 May 16, 2018
4764aaf
Reset keys in local storage if it doesn't exist
May 23, 2018
8d2ea72
Fix eslint issue
May 23, 2018
20b59ff
Merge pull request #1929 from loganhz/1.6
vincent99 May 24, 2018
cb63261
Remove admin credentials field from Azure AD
Jul 8, 2018
c491d7e
Bump version
Jul 9, 2018
3cc16df
Merge pull request #2047 from loganhz/ad
vincent99 Jul 9, 2018
30028b6
Expect 1.6-dev branch
vincent99 Jul 9, 2018
09b1428
Fixed: New subnet API does not return availability_zone anymore
janeczku Aug 13, 2018
02ba738
Merge pull request #2151 from janeczku/otc-subnet-fix
westlywright Aug 14, 2018
19674cc
Fix the issue that stack page breaks sometimes
Aug 20, 2018
9c3365c
Fix scheduling display issue
Aug 20, 2018
a8f453b
Fix the issue that navigation menu closes constantly sometimes
Aug 20, 2018
f88abad
Merge pull request #2160 from loganhz/catalog-1.6-fix
westlywright Aug 20, 2018
4a72df2
Merge pull request #2161 from loganhz/schedulaer-1.6-fix
westlywright Aug 20, 2018
4c9419e
Merge pull request #2162 from loganhz/menu-1.6-fix
westlywright Aug 20, 2018
444bd80
Bump package & add package-lock to ignore
westlywright Aug 27, 2018
3ebe777
Update AWS instance types
Sep 12, 2018
d7e196f
Merge pull request #2249 from loganhz/aws-1.6
westlywright Sep 12, 2018
4d227f0
Bump package
westlywright Sep 18, 2018
f9d88c7
Add setting to whitelist redirect domains for auth
mrajashree Oct 31, 2018
744c842
Merge pull request #2370 from mrajashree/patch-1
westlywright Nov 2, 2018
eba02c7
bump package
westlywright Nov 2, 2018
5a83a4b
Add case 403 and 422 for shibboleth auth
westlywright Nov 12, 2018
3b71541
Merge pull request #2385 from westlywright/1.6-dev
westlywright Nov 12, 2018
27d5128
bump package
westlywright Nov 12, 2018
87bef64
drone 1.x syntax
drpebcak Mar 21, 2019
3ff07dd
Merge pull request #2787 from drpebcak/drone-1-update-syntax-1.6
westlywright Mar 21, 2019
4acba4c
add docker 18.09 to the list of engines
westlywright Apr 8, 2019
82c8e18
Merge pull request #2867 from westlywright/1.6-dock-18-09
westlywright Apr 8, 2019
7116aee
bump package
westlywright Apr 8, 2019
5c5605b
#19826 - Add AWS t3a instances
krumware Apr 25, 2019
84825a4
Add R5a, R5ad, M5a, M5ad instance types
krumware Apr 29, 2019
bf5800b
Update casing to lowercase to match AWS naming
krumware Apr 29, 2019
b0bcf9e
update sort order for consistency, and add missing m5'ad' designation
krumware Apr 29, 2019
5709e99
clean up whitespace
krumware May 23, 2019
7b3b782
Merge pull request #2926 from krumware/patch-1
vincent99 May 23, 2019
cbd73c9
Bump
vincent99 Sep 23, 2019
0ff06cb
additional config options for ember-cli-sass update (v10)
westlywright Sep 24, 2019
8c738a4
Add docker 19.03 to supported engines
westlywright Sep 24, 2019
60188e2
bump package
westlywright Sep 24, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 16 additions & 28 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,19 @@
---
pipeline:
build:
privileged: true
image: rancher/dind:v0.3.0
commands:
- ENABLE_DOCKER=true UPLOAD_LATEST=true ./scripts/ci
when:
branch: "master"
event:
exclude: [pull_request]
kind: pipeline
name: default

build:
privileged: true
image: rancher/dind:v0.3.0
commands:
- ENABLE_DOCKER=true ./scripts/ci
when:
branch:
exclude: ["master"]
platform:
os: linux
arch: amd64

# Needs envvar SLACK_TOKEN
# slack_blame:
# image: plugins/slack-blame
# channel: ui
# success_template: |
# {{repo.owner}}/{{repo.name}} branch: {{build.branch}} commit: {{build.commit}} by {{build.author}} <{{build.email}}> - {{commit.message}} - {{build.link}}
# failure_template: |
# {{repo.owner}}/{{repo.name}} branch: {{build.branch}} commit: {{build.commit}} by {{build.author}} <{{build.email}}> - {{commit.message}} - {{build.link}}
# when:
# status: [ success, failure ]
steps:
- name: build
pull: default
image: rancher/dind:v0.3.0
commands:
- ENABLE_DOCKER=true ./scripts/ci
privileged: true
when:
branch:
exclude:
- master
1 change: 0 additions & 1 deletion .drone.yml.sig

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
/coverage/*
/libpeerconnection.log
npm-debug.log
package-lock.json
testem.log
.DS_Store
.tern-port
Expand Down
159 changes: 117 additions & 42 deletions app/admin-tab/auth/activedirectory/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,81 +3,154 @@ import Errors from 'ui/utils/errors';
import C from 'ui/utils/constants';

var PLAIN_PORT = 389;
var TLS_PORT = 636;
var TLS_PORT = 636;

export default Ember.Controller.extend({
access: Ember.inject.service(),
settings: Ember.inject.service(),
access: Ember.inject.service(),
settings: Ember.inject.service(),

confirmDisable: false,
errors: null,
testing: false,
errors: null,
testing: false,

providerName: 'ldap.providerName.ad',
userType: C.PROJECT.TYPE_LDAP_USER,
groupType: C.PROJECT.TYPE_LDAP_GROUP,
providerName: 'ldap.providerName.ad',
userType: C.PROJECT.TYPE_LDAP_USER,
groupType: C.PROJECT.TYPE_LDAP_GROUP,
ldapConfig: Ember.computed.alias('model.ldapConfig'),

addUserInput: '',
addOrgInput: '',
addUserInput: '',
addOrgInput: '',

username: '',
password: '',
username: '',
password: '',
editing: false,
advancedOpen: false,

createDisabled: function() {
createDisabled: Ember.computed('username.length','password.length', function() {
return !this.get('username.length') || !this.get('password.length');
}.property('username.length','password.length'),
}),

numUsers: function() {
numUsers: Ember.computed('[email protected]','userType','groupType', function() {
return (this.get('model.allowedIdentities')||[]).filterBy('externalIdType', this.get('userType')).get('length');
}.property('[email protected]','userType','groupType'),
}),

numGroups: function() {
numGroups: Ember.computed('[email protected]','userType','groupType', function() {
return (this.get('model.allowedIdentities')||[]).filterBy('externalIdType', this.get('groupType')).get('length');
}.property('[email protected]','userType','groupType'),
}),

tlsChanged: function() {
var on = this.get('model.tls');
var port = parseInt(this.get('model.port'),10);
canEdit: Ember.computed('access.enabled', 'editing', function() {
var isEnabled = this.get('access.enabled');
var editing = this.get('editing');

if (( isEnabled && editing ) || !isEnabled) {
return true;
} else if (isEnabled && !editing) {
return false;
}

}),

tlsChanged: Ember.observer('ldapConfig.tls', function() {
var on = this.get('ldapConfig.tls');
var port = parseInt(this.get('ldapConfig.port'),10);

if ( on && port === PLAIN_PORT )
{
this.set('model.port', TLS_PORT);
this.set('ldapConfig.port', TLS_PORT);
}
else if ( !on && port === TLS_PORT )
{
this.set('model.port', PLAIN_PORT);
this.set('ldapConfig.port', PLAIN_PORT);
}
}.observes('model.tls'),
}),

testConfig: function(data) {
return this.get('authStore').request({
url: 'testlogin',
method: 'POST',
data: data,
});
},


actions: {
showAdvanced: function() {
let open = this.get('advancedOpen');

if (open) {
Ember.$('.custom-schema').hide();
this.set('advancedOpen', false);
} else {
Ember.$('.custom-schema').show();
this.set('advancedOpen', true);
}

},
edit: function() {
this.toggleProperty('editing');
this.set('originalModel', this.get('model').clone());
this.set('username', this.get('model.identity.login'));
},
cancel: function() {
this.send('clearError');
this.set('editing', false);
this.set('model', this.get('originalModel'));
},
test: function() {
this.send('clearError');

var model = this.get('model');
model.setProperties({
enabled: false,
'accessMode': 'unrestricted',
});
let model = this.get('model');
let editing = this.get('editing');

if (!editing) {
model.setProperties({
'provider' : 'ldapconfig',
'enabled' : false, // It should already be, but just in case..
'accessMode' : 'unrestricted',
'allowedIdentities' : [],
});
}

var errors = model.validationErrors();
if ( errors.get('length') )
{


let data = {
type: 'testAuthConfig',
authConfig: model,
code: `:${this.get('password')}`,
};

if ( errors.get('length') ) {
this.set('errors', errors);
}
else
{
} else {
this.set('testing', true);
model.save().then(() => {
this.send('authenticate');
}).catch(err => {
this.send('gotError', err);
});

if (editing) {
this.testConfig(data).then(() => {
model.save().then(() => {
this.send('waitAndRefresh');
}).catch((err) => {
this.send('gotError', err);
});
}).catch((err) => {
this.send('gotError', err);
});
} else {
this.set('testing', true);
model.save().then(() => {
this.send('authenticate');
}).catch(err => {
this.send('gotError', err);
});
}
}
},

authenticate: function() {
this.send('clearError');
var code = this.get('username')+':'+this.get('password');

var code = `${this.get('username')}:${this.get('password')}`;

this.get('access').login(code).then(res => {
this.send('authenticationSucceeded', res.body);
}).catch(err => {
Expand All @@ -93,9 +166,10 @@ export default Ember.Controller.extend({
this.set('access.enabled', true);

var model = this.get('model');

model.setProperties({
'enabled': true,
'accessMode': 'unrestricted',
'enabled': true,
'accessMode': 'unrestricted',
'allowedIdentities': [auth.userIdentity],
});

Expand All @@ -109,6 +183,7 @@ export default Ember.Controller.extend({

waitAndRefresh: function(url) {
$('#loading-underlay, #loading-overlay').removeClass('hide').show();

setTimeout(function() {
window.location.href = url || window.location.href;
}, 1000);
Expand Down
42 changes: 24 additions & 18 deletions app/admin-tab/auth/activedirectory/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,39 @@ import Ember from 'ember';

export default Ember.Route.extend({
resourceType: 'ldapconfig',
access: Ember.inject.service(),

model: function() {
model: function () {
return this.get('authStore').find('config', null, {
forceReload: true
}).then((collection) => {

return this.get('userStore').find(this.get('resourceType'), null, {forceReload: true}).then((collection) => {
var existing = collection.get('firstObject');
if (!collection.enabled) {
let existing = this.get('authStore').createRecord(collection.ldapConfig, {type: 'ldapconfig'});
let defaults = this.get('authStore').getById('schema', this.get('resourceType')).get('resourceFields');

// On install the initial ldapconfig is empty. For any fields that are empty, fill in the default from the schema.
var defaults = this.get('userStore').getById('schema',this.get('resourceType')).get('resourceFields');
Object.keys(defaults).forEach((key) => {
var field = defaults[key];
if ( field && field.default && !existing.get(key) )
{
existing.set(key, field.default);
}
});
Object.keys(defaults).forEach((key) => {
var field = defaults[key];
if (field && field.default && !existing.get(key)) {
existing.set(key, field.default);
}
});

return existing;
collection.ldapConfig = existing;
} else {
collection.identity = this.get('access.identity');
}
return collection;
});
},

setupController: function(controller, model) {
setupController: function (controller, model) {
controller.setProperties({
model: model,
model: model,
confirmDisable: false,
testing: false,
organizations: this.get('session.orgs')||[],
errors: null,
testing: false,
organizations: this.get('session.orgs') || [],
errors: null,
});
}
});
16 changes: 0 additions & 16 deletions app/admin-tab/auth/azuread/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -57,22 +57,6 @@
</div>
</div>
</div>

<div class="row">
<div class="col-md-6">
<div class="form-group">
<label>{{t 'authPage.azuread.configure.adminAccountUsername.label'}}*</label>
{{input type="text" value=model.adminAccountUsername placeholder=(t 'authPage.azuread.configure.adminAccountUsername.placeholder') classNames="form-control"}}
<p class="help-block">{{t 'authPage.azuread.configure.adminAccountUsername.help'}}</p>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>{{t 'authPage.azuread.configure.adminAccountPassword.label'}}*</label>
{{input type="password" value=model.adminAccountPassword classNames="form-control"}}
</div>
</div>
</div>
</section>

<section class="well">
Expand Down
3 changes: 2 additions & 1 deletion app/admin-tab/auth/github/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ export default Ember.Route.extend({
testing: false,
organizations: this.get('session.orgs')||[],
errors: null,
isEnterprise: (model.get('hostname') ? true : false),
isEnterprise: (model.get('githubConfig.hostname') ? true : false),
secure: model.get('githubConfig.scheme') === 'https://'
});

controller.set('saved',true);
Expand Down
Loading