@@ -6570,6 +6570,16 @@ details:e
6570
6570
}, v = function() {
6571
6571
d.disableAddForm = !1, d.newBinding.name = "", d.newBinding.namespace = o, d.newBinding.newRole = null;
6572
6572
}, w = function(a) {
6573
+ i.list("serviceaccounts", a).then(function(a) {
6574
+ var b = _.keys(a.by("metadata.name")).sort();
6575
+ angular.extend(d, {
6576
+ serviceAccounts:b,
6577
+ refreshServiceAccounts:function(a) {
6578
+ a && !_.includes(d.serviceAccounts, a) ? d.serviceAccounts = [ a ].concat(b) :d.serviceAccounts = b;
6579
+ }
6580
+ });
6581
+ });
6582
+ }, x = function(a) {
6573
6583
i.list("rolebindings", n, null, {
6574
6584
errorNotification:!1
6575
6585
}).then(function(a) {
@@ -6581,9 +6591,9 @@ subjectKindsForUI:k.mapRolebindingsForUI(a.by("metadata.name"), s)
6581
6591
}, function() {
6582
6592
a && (d.roleBindings[a.metadata.name] = a, d.subjectKindsForUI = k.mapRolebindingsForUI(d.roleBindings, s)), v();
6583
6593
});
6584
- }, x = function(b, c) {
6594
+ }, y = function(b, c) {
6585
6595
d.disableAddForm = !0, l.create(b, c, o, n).then(function() {
6586
- w (), u("rolebindingCreate", "success", t.update.subject.success({
6596
+ x (), u("rolebindingCreate", "success", t.update.subject.success({
6587
6597
roleName:b.metadata.name,
6588
6598
subjectName:c.name
6589
6599
}));
@@ -6595,9 +6605,9 @@ subjectName:c.name
6595
6605
httpErr:a("getErrorDetails")(d)
6596
6606
}));
6597
6607
});
6598
- }, y = function(b, c, e) {
6608
+ }, z = function(b, c, e) {
6599
6609
d.disableAddForm = !0, l.addSubject(b, c, e, n).then(function() {
6600
- w (), u("rolebindingUpdate", "success", t.update.subject.success({
6610
+ x (), u("rolebindingUpdate", "success", t.update.subject.success({
6601
6611
roleName:b.roleRef.name,
6602
6612
subjectName:c.name
6603
6613
}));
@@ -6609,16 +6619,16 @@ subjectName:c.name
6609
6619
httpErr:a("getErrorDetails")(d)
6610
6620
}));
6611
6621
});
6612
- }, z = {};
6613
- c.tab && (z [c.tab] = !0);
6614
- var A = k.getSubjectKinds();
6622
+ }, A = {};
6623
+ c.tab && (A [c.tab] = !0);
6624
+ var B = k.getSubjectKinds();
6615
6625
angular.extend(d, {
6616
- selectedTab:z ,
6626
+ selectedTab:A ,
6617
6627
projectName:o,
6618
6628
alerts:{},
6619
6629
forms:{},
6620
6630
emptyMessage:"Loading...",
6621
- subjectKinds:A ,
6631
+ subjectKinds:B ,
6622
6632
newBinding:{
6623
6633
role:"",
6624
6634
kind:c.tab || "User",
@@ -6631,7 +6641,7 @@ mode:{
6631
6641
edit:!1
6632
6642
},
6633
6643
selectTab:function(a) {
6634
- d.newBinding.kind = a;
6644
+ d.newBinding.kind = a, d.newBinding.name = "" ;
6635
6645
}
6636
6646
}), angular.extend(d, {
6637
6647
excludeExistingRoles:function(a) {
@@ -6651,7 +6661,7 @@ return a ? e + (q(a, "description") || b) :b;
6651
6661
}
6652
6662
}
6653
6663
});
6654
- var B = function(a, b, c, e) {
6664
+ var C = function(a, b, c, e) {
6655
6665
var f = {
6656
6666
alerts:{},
6657
6667
detailsMarkup:t.remove.areYouSure.html.subject({
@@ -6673,22 +6683,25 @@ roleName:c
6673
6683
g.withUser().then(function(a) {
6674
6684
d.user = a;
6675
6685
}), i.list("projects", {}).then(function(a) {
6676
- var b = _.map(a.by("metadata.name"), function(a) {
6677
- return a.metadata.name;
6678
- });
6686
+ var b = _.keys(a.by("metadata.name")).sort();
6679
6687
angular.extend(d, {
6680
6688
projects:b,
6689
+ selectProject:function(a) {
6690
+ d.newBinding.name = "", w({
6691
+ namespace:a
6692
+ });
6693
+ },
6681
6694
refreshProjects:function(a) {
6682
6695
a && !_.includes(d.projects, a) ? d.projects = [ a ].concat(b) :d.projects = b;
6683
6696
}
6684
6697
});
6685
6698
}), j.get(c.project).then(_.spread(function(c, e) {
6686
- n = e, w( ), angular.extend(d, {
6699
+ n = e, x(), w(n ), angular.extend(d, {
6687
6700
project:c,
6688
- subjectKinds:A ,
6701
+ subjectKinds:B ,
6689
6702
canUpdateRolebindings:r("rolebindings", "update", o),
6690
6703
confirmRemove:function(c, e, g) {
6691
- var i = null, j = B (c, e, g, d.user.metadata.name);
6704
+ var i = null, j = C (c, e, g, d.user.metadata.name);
6692
6705
_.isEqual(c, d.user.metadata.name) && k.isLastRole(d.user.metadata.name, d.roleBindings) && (i = !0), f.open({
6693
6706
animation:!0,
6694
6707
templateUrl:"views/modals/confirm.html",
@@ -6701,7 +6714,7 @@ return j;
6701
6714
}).result.then(function() {
6702
6715
l.removeSubject(c, g, d.roleBindings, n).then(function(a) {
6703
6716
i ? b.url("./") :(h.getProjectRules(o, !0).then(function() {
6704
- w (a[0]);
6717
+ x (a[0]);
6705
6718
var b = r("rolebindings", "update", o);
6706
6719
angular.extend(d, {
6707
6720
canUpdateRolebindings:b,
@@ -6738,7 +6751,7 @@ name:a
6738
6751
}) ? u("rolebindingUpdate", "info", t.update.subject.exists({
6739
6752
roleName:c.metadata.name,
6740
6753
subjectName:a
6741
- })) :g ? y (g, f, e) :x (c, f, e);
6754
+ })) :g ? z (g, f, e) :y (c, f, e);
6742
6755
}
6743
6756
}), m.listAllRoles(n, {
6744
6757
errorNotification:!1
@@ -6751,7 +6764,7 @@ name:a
6751
6764
}
6752
6765
});
6753
6766
};
6754
- w (), angular.extend(d, {
6767
+ x (), angular.extend(d, {
6755
6768
toggle:{
6756
6769
roles:!1
6757
6770
},
@@ -26781,35 +26794,38 @@ var _scriptsTemplatesJs = []byte(`angular.module('openshiftConsoleTemplates', []
26781
26794
"</div>\n" +
26782
26795
"<ng-form class=\"new-binding\" novalidate name=\"forms.newBindingForm\" ng-if=\"newBinding\">\n" +
26783
26796
"<div ng-if=\"mode.edit\" class=\"item-row form-new-role\" row mobile=\"column\">\n" +
26784
- "<div class=\"col-name\" column>\n" +
26797
+ "<div class=\"col-name pad-bottom-none \" row mobile=\" column\" tablet=\"column\" >\n" +
26785
26798
"<label ng-attr-for=\"newBindingName\" class=\"sr-only\">\n" +
26786
26799
"Name\n" +
26787
26800
"</label>\n" +
26788
- "<input type=\"text\" class=\"form-control input-name\" placeholder=\"Name\" ng-model=\"newBinding.name\" autocorrect=\"off\" autocapitalize=\"off\" spellcheck=\"false\">\n" +
26789
- "<div ng-if=\"newBinding.kind === 'ServiceAccount'\" class=\"service-account-namespace hidden-sm hidden-md hidden-lg\" aria-hidden=\"true\">\n" +
26790
- "<ui-select ng-model=\"newBinding.namespace\" theme=\"bootstrap\" search-enabled=\"true\" title=\"Select a project\" class=\"select-role\">\n" +
26801
+ "\n" +
26802
+ "<input ng-if=\"newBinding.kind !== 'ServiceAccount'\" type=\"text\" class=\"form-control input-name\" placeholder=\"Name\" ng-model=\"newBinding.name\" autocorrect=\"off\" autocapitalize=\"off\" spellcheck=\"false\">\n" +
26803
+ "\n" +
26804
+ "<div ng-if=\"newBinding.kind === 'ServiceAccount'\" class=\"service-account-namespace\" aria-hidden=\"true\">\n" +
26805
+ "<ui-select ng-model=\"newBinding.namespace\" on-select=\"selectProject($item, $model)\" theme=\"bootstrap\" search-enabled=\"true\" title=\"Select a project\" class=\"select-role pad-bottom-sm\">\n" +
26791
26806
"<ui-select-match placeholder=\"Select a project\">\n" +
26792
- "<span ng-bind=\" newBinding.namespace\"> </span>\n" +
26807
+ "<span>{{ newBinding.namespace}} </span>\n" +
26793
26808
"</ui-select-match>\n" +
26794
26809
"<ui-select-choices repeat=\"projectName in projects | filter: $select.search\" refresh=\"refreshProjects($select.search)\" refresh-delay=\"200\">\n" +
26795
- "<div>{{ projectName}} </div>\n" +
26810
+ "<div ng-bind-html=\" projectName | highlight : $select.search\"> </div>\n" +
26796
26811
"</ui-select-choices>\n" +
26797
26812
"</ui-select>\n" +
26798
26813
"</div>\n" +
26799
- "</div>\n" +
26800
- "<div class=\"action-set\" flex row tablet=\"column\" mobile=\"column\">\n" +
26801
- "<div class=\"col-roles\" row tablet=\"column\" flex wrap axis=\"start\">\n" +
26802
- "<div ng-if=\"newBinding.kind === 'ServiceAccount'\" class=\"service-account-namespace hidden-xs\">\n" +
26803
- "<ui-select ng-model=\"newBinding.namespace\" theme=\"bootstrap\" search-enabled=\"true\" title=\"Select a project\" class=\"select-project\">\n" +
26804
- "<ui-select-match placeholder=\"Select a project\">\n" +
26805
- "<span ng-bind=\"newBinding.namespace\"></span>\n" +
26814
+ "<span ng-if=\"newBinding.kind === 'ServiceAccount'\" class=\"mar-left-md mar-right-md hidden-xs\">/</span>\n" +
26815
+ "\n" +
26816
+ "<div ng-if=\"newBinding.kind === 'ServiceAccount'\" class=\"service-account-name\">\n" +
26817
+ "<ui-select ng-model=\"newBinding.name\" theme=\"bootstrap\" search-enabled=\"true\" title=\"Select a service account\" class=\"select-role\">\n" +
26818
+ "<ui-select-match placeholder=\"Service account\">\n" +
26819
+ "<span>{{newBinding.name}}</span>\n" +
26806
26820
"</ui-select-match>\n" +
26807
- "<ui-select-choices repeat=\"projectName in projects | filter: $select.search\" refresh=\"refreshProjects ($select.search)\" refresh-delay=\"200\">\n" +
26808
- "<div>{{projectName}} </div>\n" +
26821
+ "<ui-select-choices repeat=\"saName in serviceAccounts | filter: $select.search\" refresh=\"refreshServiceAccounts ($select.search)\" refresh-delay=\"200\">\n" +
26822
+ "<div ng-bind-html=\"saName | highlight : $select.search\"> </div>\n" +
26809
26823
"</ui-select-choices>\n" +
26810
26824
"</ui-select>\n" +
26811
26825
"</div>\n" +
26812
26826
"</div>\n" +
26827
+ "<div class=\"action-set\" flex row tablet=\"column\" mobile=\"column\">\n" +
26828
+ "<div class=\"col-roles\" flex row tablet=\"column\"> </div>\n" +
26813
26829
"<div class=\"col-add-role\">\n" +
26814
26830
"<div ng-show=\"mode.edit\" row>\n" +
26815
26831
"<ui-select ng-if=\"filteredRoles.length\" ng-model=\"newBinding.newRole\" theme=\"bootstrap\" search-enabled=\"true\" title=\"new {{subjectKind.name}} role\" class=\"select-role\" flex>\n" +
@@ -116260,13 +116276,13 @@ a.subtle-link:active,a.subtle-link:focus,a.subtle-link:hover{color:#00659c;borde
116260
116276
.membership .content-pane .col-heading h3,.membership .content-pane .item-row h3{margin:0}
116261
116277
.membership .content-pane .item-row{padding:5px 10px 5px 5px;margin-bottom:20px}
116262
116278
.membership .content-pane .col-heading{margin-bottom:20px}
116263
- .membership .content-pane .col-name{word-break:break-all;word-break:break-word;overflow-wrap:break-word;min- width:225px;max-width:30 %;padding:0 5px 10px 0}
116279
+ .membership .content-pane .col-name{word-break:break-all;word-break:break-word;overflow-wrap:break-word;width:100 %;padding:0 0px 10px 0}
116264
116280
.membership .content-pane .col-name.half-width{min-width:50%}
116265
116281
.membership .content-pane .col-name input{max-width:150px}
116266
116282
.membership .content-pane .col-name .new-project{margin-top:2px}
116267
116283
.membership .content-pane .content-serviceaccount .form-new-role .col-roles{display:block}
116268
116284
.membership .content-pane .input-name{width:150px;margin-bottom:5px}
116269
- .membership .content-pane .select-project,.membership .content-pane .select-role {width:150px}
116285
+ .membership .content-pane .select-project{width:150px}
116270
116286
.membership .content-pane .select-role small{color:#999}
116271
116287
.membership .content-pane .select-role .active small{color:#c0e0f0}
116272
116288
.membership .content-pane .col-add-role,.membership .content-pane .col-heading,.membership .content-pane .col-name,.membership .content-pane .col-roles,.membership .content-pane .item-row,.membership .content-pane [flex-collapse-fix],.membership .content-pane [flex]{flex-shrink:0;flex-basis:auto}
@@ -116275,8 +116291,9 @@ a.subtle-link:active,a.subtle-link:focus,a.subtle-link:hover{color:#00659c;borde
116275
116291
.membership .content-pane .col-heading,.membership .content-pane .item-row{border-bottom:none;margin-bottom:none}
116276
116292
.membership .content-pane .item-row.highlight-hover:hover{background-color:#fafafa}
116277
116293
.membership .content-pane .col-heading .col-add-role a{display:block;padding-left:10px}
116278
- .membership .content-pane .col-name{width:30%}
116294
+ .membership .content-pane .col-name{min- width:225px;max-width: 30%;padding:0 5px 10px 0 }
116279
116295
.membership .content-pane .col-name input{max-width:175px}
116296
+ .membership .content-pane .select-role{width:150px}
116280
116297
}
116281
116298
.action-chip{margin:0 5px 2px 0;font-size:12px;display:flex;flex-direction:row}
116282
116299
.action-chip .item{padding:.2em .6em .3em}
0 commit comments