...
|
...
|
@@ -11146,7 +11146,7 @@ label:"Redirect"
|
11146
|
11146
|
} ];
|
11147
|
11147
|
} ],
|
11148
|
11148
|
link:function(b, c, d, e) {
|
11149
|
|
-b.form = e, b.disableWildcards = a.DISABLE_WILDCARD_ROUTES, b.disableWildcards ? b.hostnamePattern = /^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$/ :b.hostnamePattern = /^(\*(\.[a-z0-9]([-a-z0-9]*[a-z0-9]))+|[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)$/;
|
|
11149
|
+b.form = e, b.controls = {}, b.disableWildcards = a.DISABLE_WILDCARD_ROUTES, b.disableWildcards ? b.hostnamePattern = /^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$/ :b.hostnamePattern = /^(\*(\.[a-z0-9]([-a-z0-9]*[a-z0-9]))+|[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)$/;
|
11150
|
11150
|
var f = function(a) {
|
11151
|
11151
|
a && (b.unnamedServicePort = 1 === a.spec.ports.length && !a.spec.ports[0].name, a.spec.ports.length && !b.unnamedServicePort ? b.route.portOptions = _.map(a.spec.ports, function(a) {
|
11152
|
11152
|
return {
|
...
|
...
|
@@ -11185,9 +11185,20 @@ service:a
|
11185
|
11185
|
});
|
11186
|
11186
|
});
|
11187
|
11187
|
b.route.alternateServices.push({
|
11188
|
|
-service:a
|
|
11188
|
+service:a,
|
|
11189
|
+weight:1
|
|
11190
|
+}), _.has(b, "route.to.weight") || _.set(b, "route.to.weight", 1);
|
|
11191
|
+}, b.weightAsPercentage = function(a) {
|
|
11192
|
+a = a || 0;
|
|
11193
|
+var c = _.get(b, "route.to.weight", 0);
|
|
11194
|
+if (_.each(b.route.alternateServices, function(a) {
|
|
11195
|
+c += _.get(a, "weight", 0);
|
|
11196
|
+}), !c) return "";
|
|
11197
|
+var d = a / c * 100;
|
|
11198
|
+return d3.round(d, 1) + "%";
|
|
11199
|
+}, b.$watch("controls.rangeSlider", function(a, c) {
|
|
11200
|
+a !== c && (a = parseInt(a, 10), _.set(b, "route.to.weight", a), _.set(b, "route.alternateServices[0].weight", 100 - a));
|
11189
|
11201
|
});
|
11190
|
|
-};
|
11191
|
11202
|
}
|
11192
|
11203
|
};
|
11193
|
11204
|
} ]).directive("oscRoutingService", function() {
|
...
|
...
|
@@ -23613,7 +23624,7 @@ var _scriptsTemplatesJs = []byte(`angular.module('openshiftConsoleTemplates', []
|
23613
|
23613
|
"</div>\n" +
|
23614
|
23614
|
"\n" +
|
23615
|
23615
|
"<div ng-if=\"services\">\n" +
|
23616
|
|
- "<osc-routing-service model=\"route.to\" services=\"services\" show-weight=\"route.alternateServices.length\">\n" +
|
|
23616
|
+ "<osc-routing-service model=\"route.to\" services=\"services\" show-weight=\"route.alternateServices.length > 1 || (controls.hideSlider && route.alternateServices.length)\">\n" +
|
23617
|
23617
|
"</osc-routing-service>\n" +
|
23618
|
23618
|
"</div>\n" +
|
23619
|
23619
|
"<div ng-if=\"alternateServiceOptions.length && !route.alternateServices.length\" class=\"form-group\">\n" +
|
...
|
...
|
@@ -23638,7 +23649,7 @@ var _scriptsTemplatesJs = []byte(`angular.module('openshiftConsoleTemplates', []
|
23638
|
23638
|
"<div ng-if=\"route.alternateServices.length\">\n" +
|
23639
|
23639
|
"<h3>Alternate Services</h3>\n" +
|
23640
|
23640
|
"<div ng-repeat=\"alternate in route.alternateServices\" class=\"form-group\">\n" +
|
23641
|
|
- "<osc-routing-service model=\"alternate\" services=\"alternateServiceOptions\" is-alternate=\"true\" show-weight=\"true\">\n" +
|
|
23641
|
+ "<osc-routing-service model=\"alternate\" services=\"alternateServiceOptions\" is-alternate=\"true\" show-weight=\"route.alternateServices.length > 1 || controls.hideSlider\">\n" +
|
23642
|
23642
|
"</osc-routing-service>\n" +
|
23643
|
23643
|
"<a href=\"\" ng-click=\"route.alternateServices.splice($index, 1)\">Remove Service</a>\n" +
|
23644
|
23644
|
"<span ng-if=\"$last && route.alternateServices.length < alternateServiceOptions.length\">\n" +
|
...
|
...
|
@@ -23652,6 +23663,36 @@ var _scriptsTemplatesJs = []byte(`angular.module('openshiftConsoleTemplates', []
|
23652
|
23652
|
"</span>\n" +
|
23653
|
23653
|
"</div>\n" +
|
23654
|
23654
|
"</div>\n" +
|
|
23655
|
+ "\n" +
|
|
23656
|
+ "<div ng-if=\"route.alternateServices.length === 1 && !controls.hideSlider\">\n" +
|
|
23657
|
+ "<h3>Service Weights</h3>\n" +
|
|
23658
|
+ "<div class=\"form-group\">\n" +
|
|
23659
|
+ "<div class=\"weight-slider-values\">\n" +
|
|
23660
|
+ "<div>\n" +
|
|
23661
|
+ "<span class=\"service-name\">{{route.to.service.metadata.name}}</span>\n" +
|
|
23662
|
+ "<span class=\"weight-percentage\">{{weightAsPercentage(route.to.weight)}}</span>\n" +
|
|
23663
|
+ "</div>\n" +
|
|
23664
|
+ "<div>\n" +
|
|
23665
|
+ "<span class=\"weight-percentage hidden-xs\">{{weightAsPercentage(route.alternateServices[0].weight)}}</span>\n" +
|
|
23666
|
+ "<span class=\"service-name\">{{route.alternateServices[0].service.metadata.name}}</span>\n" +
|
|
23667
|
+ "<span class=\"weight-percentage visible-xs-inline\">{{weightAsPercentage(route.alternateServices[0].weight)}}</span>\n" +
|
|
23668
|
+ "</div>\n" +
|
|
23669
|
+ "</div>\n" +
|
|
23670
|
+ "<label class=\"sr-only\" for=\"weight-slider\">Service {{route.to.service.metadata.name}} Weight</label>\n" +
|
|
23671
|
+ "<input id=\"weight-slider\" type=\"range\" min=\"0\" max=\"100\" step=\"1\" list=\"ticks\" ng-model=\"controls.rangeSlider\" aria-describedby=\"weight-slider-help\" class=\"mar-top-md\">\n" +
|
|
23672
|
+ "<datalist id=\"ticks\">\n" +
|
|
23673
|
+ "<option>0</option>\n" +
|
|
23674
|
+ "<option>25</option>\n" +
|
|
23675
|
+ "<option>50</option>\n" +
|
|
23676
|
+ "<option>75</option>\n" +
|
|
23677
|
+ "<option>100</option>\n" +
|
|
23678
|
+ "</datalist>\n" +
|
|
23679
|
+ "<div class=\"help-block\" id=\"weight-slider-help\">\n" +
|
|
23680
|
+ "Percentage of traffic sent to each service. Drag the slider to adjust the values or\n" +
|
|
23681
|
+ "<a href=\"\" ng-click=\"controls.hideSlider = true\">edit weights as integers</a>.\n" +
|
|
23682
|
+ "</div>\n" +
|
|
23683
|
+ "</div>\n" +
|
|
23684
|
+ "</div>\n" +
|
23655
|
23685
|
"<div class=\"checkbox\">\n" +
|
23656
|
23686
|
"<label>\n" +
|
23657
|
23687
|
"<input type=\"checkbox\" ng-model=\"secureRoute\" aria-describedby=\"secure-route-help\">\n" +
|
...
|
...
|
@@ -109241,8 +109282,7 @@ func stylesFontsOpenshiftLogosIconWoff() (*asset, error) {
|
109241
|
109241
|
return a, nil
|
109242
|
109242
|
}
|
109243
|
109243
|
|
109244
|
|
-var _stylesMainCss = []byte(`.ie9.layout-pf-alt-fixed .nav-pf-vertical-alt,.ie9.layout-pf-fixed .nav-pf-secondary-nav,.ie9.layout-pf-fixed .nav-pf-tertiary-nav,.ie9.layout-pf-fixed .nav-pf-vertical,hr{box-sizing:content-box}
|
109245
|
|
-div.code,pre,textarea{overflow:auto}
|
|
109244
|
+var _stylesMainCss = []byte(`div.code,pre,textarea{overflow:auto}
|
109246
|
109245
|
.text-left,caption,th{text-align:left}
|
109247
|
109246
|
.btn,.datepicker table{-webkit-user-select:none;-moz-user-select:none}
|
109248
|
109247
|
.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.pre-scrollable{max-height:340px}
|
...
|
...
|
@@ -109275,7 +109315,7 @@ sup{top:-.5em}
|
109275
|
109275
|
sub{bottom:-.25em}
|
109276
|
109276
|
img{border:0;vertical-align:middle}
|
109277
|
109277
|
svg:not(:root){overflow:hidden}
|
109278
|
|
-hr{height:0}
|
|
109278
|
+hr{box-sizing:content-box;height:0}
|
109279
|
109279
|
code,div.code,kbd,pre,samp{font-size:1em}
|
109280
|
109280
|
button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}
|
109281
|
109281
|
button{overflow:visible}
|
...
|
...
|
@@ -111671,6 +111711,7 @@ select.bs-select-hidden,select.selectpicker{display:none!important}
|
111671
|
111671
|
.c3 text,.log-line-number{-moz-user-select:none;-webkit-user-select:none}
|
111672
|
111672
|
.bootstrap-switch .bootstrap-switch-container{display:inline-block;top:0;border-radius:1px;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}
|
111673
|
111673
|
.bootstrap-switch .bootstrap-switch-handle-off,.bootstrap-switch .bootstrap-switch-handle-on,.bootstrap-switch .bootstrap-switch-label{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:inline-block!important;height:100%;padding:2px 6px;font-size:13px;line-height:21px}
|
|
111674
|
+.ie9.layout-pf-alt-fixed .nav-pf-vertical-alt,.ie9.layout-pf-fixed .nav-pf-secondary-nav,.ie9.layout-pf-fixed .nav-pf-tertiary-nav,.ie9.layout-pf-fixed .nav-pf-vertical{box-sizing:content-box}
|
111674
|
111675
|
.bootstrap-switch .bootstrap-switch-handle-off,.bootstrap-switch .bootstrap-switch-handle-on{text-align:center;z-index:1}
|
111675
|
111676
|
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary,.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary{color:#fff;background:#0088ce}
|
111676
|
111677
|
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info,.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info{color:#fff;background:#00659c}
|
...
|
...
|
@@ -112831,6 +112872,12 @@ to{transform:rotate(359deg)}
|
112831
|
112831
|
.compute-resource{margin-bottom:5px}
|
112832
|
112832
|
@media (max-width:767px){.compute-resource .inline-select{margin-top:5px}
|
112833
|
112833
|
}
|
|
112834
|
+.weight-slider-values{display:-webkit-flex;display:-moz-flex;display:-ms-flexbox;display:-ms-flex;display:flex;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;flex-direction:column}
|
|
112835
|
+.weight-slider-values .service-name{font-weight:600}
|
|
112836
|
+.weight-slider-values .weight-percentage{font-size:15px;margin-left:5px}
|
|
112837
|
+@media (min-width:768px){.weight-slider-values{-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;flex-direction:row;justify-content:space-between}
|
|
112838
|
+.weight-slider-values .weight-percentage{margin-right:5px}
|
|
112839
|
+}
|
112834
|
112840
|
.card-pf{box-shadow:0 3px 1px -2px rgba(0,0,0,.15),0 2px 2px 0 rgba(0,0,0,.1),0 1px 5px 0 rgba(0,0,0,.09)}
|
112835
|
112841
|
.card-pf .image-icon,.card-pf .template-icon{font-size:28px;line-height:1;margin-right:15px;opacity:.38}
|
112836
|
112842
|
.card-pf-badge{color:#999;font-size:11px;text-transform:uppercase}
|