Browse code

bump(github.com/openshift/origin-web-console): 2446d7f3b0e38786bb912c0a6ea978eacffd16f3

OpenShift Bot authored on 2016/12/15 01:40:13
Showing 1 changed files
... ...
@@ -5333,6 +5333,13 @@ animation:!0,
5333 5333
 templateUrl:"views/modals/jenkinsfile-examples-modal.html",
5334 5334
 controller:"JenkinsfileExamplesModalController"
5335 5335
 });
5336
+},
5337
+showComputeUnitsHelp:function() {
5338
+a.open({
5339
+animation:!0,
5340
+templateUrl:"views/modals/about-compute-units-modal.html",
5341
+controller:"AboutComputeUnitsModalController"
5342
+});
5336 5343
 }
5337 5344
 };
5338 5345
 } ]), angular.module("openshiftConsole").controller("ProjectsController", [ "$scope", "$filter", "$location", "$route", "$timeout", "AlertMessageService", "AuthService", "DataService", "KeywordService", "Logger", "ProjectsService", function(a, b, c, d, e, f, g, h, i, j, k) {
... ...
@@ -9928,6 +9935,10 @@ b.dismiss();
9928 9928
 a.ok = function() {
9929 9929
 b.close("ok");
9930 9930
 };
9931
+} ]), angular.module("openshiftConsole").controller("AboutComputeUnitsModalController", [ "$scope", "$uibModalInstance", function(a, b) {
9932
+a.ok = function() {
9933
+b.close("ok");
9934
+};
9931 9935
 } ]), angular.module("openshiftConsole").controller("AboutController", [ "$scope", "AuthService", "Constants", function(a, b, c) {
9932 9936
 b.withUser(), a.version = {
9933 9937
 master:{
... ...
@@ -12320,7 +12331,7 @@ b(c.resource, c.kind);
12320 12320
 }, b.prototype.removeResourceChangedCallback = function(a) {
12321 12321
 this.callbacks.remove(a);
12322 12322
 }, new b();
12323
-} ]), angular.module("openshiftConsole").directive("podMetrics", [ "$filter", "$interval", "$parse", "$timeout", "$q", "$rootScope", "ChartsService", "ConversionService", "MetricsCharts", "MetricsService", "usageValueFilter", function(a, b, c, d, e, f, g, h, i, j, k) {
12323
+} ]), angular.module("openshiftConsole").directive("podMetrics", [ "$filter", "$interval", "$parse", "$timeout", "$q", "$rootScope", "ChartsService", "ConversionService", "MetricsCharts", "MetricsService", "ModalsService", "usageValueFilter", function(a, b, c, d, e, f, g, h, i, j, k, l) {
12324 12324
 return {
12325 12325
 restrict:"E",
12326 12326
 scope:{
... ...
@@ -12330,23 +12341,23 @@ stackDonut:"=?",
12330 12330
 alerts:"=?"
12331 12331
 },
12332 12332
 templateUrl:"views/directives/pod-metrics.html",
12333
-link:function(l) {
12334
-function m(a) {
12335
-if (!l.pod) return null;
12336
-var b = l.options.selectedContainer;
12333
+link:function(m) {
12334
+function n(a) {
12335
+if (!m.pod) return null;
12336
+var b = m.options.selectedContainer;
12337 12337
 switch (a) {
12338 12338
 case "memory/usage":
12339
-var c = C(b);
12340
-if (c) return h.bytesToMiB(k(c));
12339
+var c = D(b);
12340
+if (c) return h.bytesToMiB(l(c));
12341 12341
 break;
12342 12342
 
12343 12343
 case "cpu/usage_rate":
12344
-var d = D(b);
12345
-if (d) return k(d);
12344
+var d = E(b);
12345
+if (d) return l(d);
12346 12346
 }
12347 12347
 return null;
12348 12348
 }
12349
-function n(a) {
12349
+function o(a) {
12350 12350
 var b = _.head(a.datasets);
12351 12351
 if (b.total) {
12352 12352
 var c, e = {
... ...
@@ -12357,12 +12368,12 @@ Used:b.available > 0 ? "#0088ce" :"#ec7a08",
12357 12357
 Available:"#d1d1d1"
12358 12358
 }
12359 12359
 };
12360
-A[b.id] ? A[b.id].load(e) :(c = H(a), c.data = e, d(function() {
12361
-F || (A[b.id] = c3.generate(c));
12360
+B[b.id] ? B[b.id].load(e) :(c = I(a), c.data = e, d(function() {
12361
+G || (B[b.id] = c3.generate(c));
12362 12362
 }));
12363 12363
 }
12364 12364
 }
12365
-function o(a) {
12365
+function p(a) {
12366 12366
 var b = _.some(a.datasets, function(a) {
12367 12367
 return !a.data;
12368 12368
 });
... ...
@@ -12372,106 +12383,106 @@ _.each(a.datasets, function(a) {
12372 12372
 c[a.id] = a.data;
12373 12373
 });
12374 12374
 var e, f = i.getSparklineData(c), g = a.chartPrefix + "sparkline";
12375
-B[g] ? B[g].load(f) :(e = I(a), e.data = f, a.chartDataColors && (e.color = {
12375
+C[g] ? C[g].load(f) :(e = J(a), e.data = f, a.chartDataColors && (e.color = {
12376 12376
 pattern:a.chartDataColors
12377 12377
 }), d(function() {
12378
-F || (B[g] = c3.generate(e));
12378
+G || (C[g] = c3.generate(e));
12379 12379
 }));
12380 12380
 }
12381 12381
 }
12382
-function p() {
12383
-return "-" + l.options.timeRange.value + "mn";
12384
-}
12385 12382
 function q() {
12386
-return 60 * l.options.timeRange.value * 1e3;
12383
+return "-" + m.options.timeRange.value + "mn";
12387 12384
 }
12388 12385
 function r() {
12389
-return Math.floor(q() / E) + "ms";
12386
+return 60 * m.options.timeRange.value * 1e3;
12390 12387
 }
12391
-function s(a, b, c) {
12388
+function s() {
12389
+return Math.floor(r() / F) + "ms";
12390
+}
12391
+function t(a, b, c) {
12392 12392
 var d, e = {
12393 12393
 metric:b.id,
12394
-bucketDuration:r()
12394
+bucketDuration:s()
12395 12395
 };
12396
-return b.data && b.data.length ? (d = _.last(b.data), e.start = d.end) :e.start = c, l.pod ? _.assign(e, {
12397
-namespace:l.pod.metadata.namespace,
12398
-pod:l.pod,
12399
-containerName:a.containerMetric ? l.options.selectedContainer.name :"pod"
12396
+return b.data && b.data.length ? (d = _.last(b.data), e.start = d.end) :e.start = c, m.pod ? _.assign(e, {
12397
+namespace:m.pod.metadata.namespace,
12398
+pod:m.pod,
12399
+containerName:a.containerMetric ? m.options.selectedContainer.name :"pod"
12400 12400
 }) :null;
12401 12401
 }
12402
-function t() {
12403
-J = 0, _.each(l.metrics, function(a) {
12404
-o(a), n(a);
12402
+function u() {
12403
+K = 0, _.each(m.metrics, function(a) {
12404
+p(a), o(a);
12405 12405
 });
12406 12406
 }
12407
-function u(a) {
12408
-if (!F) {
12409
-if (J++, l.noData) return void (l.metricsError = {
12407
+function v(a) {
12408
+if (!G) {
12409
+if (K++, m.noData) return void (m.metricsError = {
12410 12410
 status:_.get(a, "status", 0),
12411 12411
 details:_.get(a, "data.errorMsg") || _.get(a, "statusText") || "Status code " + _.get(a, "status", 0)
12412 12412
 });
12413
-if (!(J < 2)) {
12414
-var b = "metrics-failed-" + l.uniqueID;
12415
-l.alerts[b] = {
12413
+if (!(K < 2)) {
12414
+var b = "metrics-failed-" + m.uniqueID;
12415
+m.alerts[b] = {
12416 12416
 type:"error",
12417
-message:"An error occurred updating metrics for pod " + _.get(l, "pod.metadata.name", "<unknown>") + ".",
12417
+message:"An error occurred updating metrics for pod " + _.get(m, "pod.metadata.name", "<unknown>") + ".",
12418 12418
 links:[ {
12419 12419
 href:"",
12420 12420
 label:"Retry",
12421 12421
 onClick:function() {
12422
-delete l.alerts[b], J = 1, y();
12422
+delete m.alerts[b], K = 1, z();
12423 12423
 }
12424 12424
 } ]
12425 12425
 };
12426 12426
 }
12427 12427
 }
12428 12428
 }
12429
-function v() {
12430
-return !(l.metricsError || J > 1) && (l.pod && _.get(l, "options.selectedContainer"));
12429
+function w() {
12430
+return !(m.metricsError || K > 1) && (m.pod && _.get(m, "options.selectedContainer"));
12431 12431
 }
12432
-function w(a, b, c) {
12433
-b.total = m(b.id), b.total && (l.hasLimits = !0);
12432
+function x(a, b, c) {
12433
+b.total = n(b.id), b.total && (m.hasLimits = !0);
12434 12434
 var d = _.get(c, "usage.value");
12435 12435
 isNaN(d) && (d = 0), a.convert && (d = a.convert(d)), b.used = d3.round(d, a.usagePrecision), b.total && (b.available = d3.round(b.total - d, a.usagePrecision)), a.totalUsed += b.used;
12436 12436
 }
12437
-function x(a, b) {
12438
-l.noData = !1;
12437
+function y(a, b) {
12438
+m.noData = !1;
12439 12439
 var c = _.initial(b.data);
12440
-return a.data ? void (a.data = _.chain(a.data).takeRight(E).concat(c).value()) :void (a.data = c);
12440
+return a.data ? void (a.data = _.chain(a.data).takeRight(F).concat(c).value()) :void (a.data = c);
12441 12441
 }
12442
-function y() {
12443
-if (v()) {
12444
-var a = p(), b = [];
12445
-angular.forEach(l.metrics, function(c) {
12442
+function z() {
12443
+if (w()) {
12444
+var a = q(), b = [];
12445
+angular.forEach(m.metrics, function(c) {
12446 12446
 var d = [];
12447 12447
 c.totalUsed = 0, angular.forEach(c.datasets, function(e) {
12448
-var f = s(c, e, a);
12448
+var f = t(c, e, a);
12449 12449
 if (f) {
12450 12450
 var g = j.get(f);
12451 12451
 d.push(g);
12452
-var h = m(e.id);
12452
+var h = n(e.id);
12453 12453
 h && b.push(j.getCurrentUsage(f).then(function(a) {
12454
-w(c, e, a);
12454
+x(c, e, a);
12455 12455
 }));
12456 12456
 }
12457 12457
 }), b = b.concat(d), e.all(d).then(function(a) {
12458
-F || angular.forEach(a, function(a) {
12458
+G || angular.forEach(a, function(a) {
12459 12459
 if (a) {
12460 12460
 var b = _.find(c.datasets, {
12461 12461
 id:a.metricID
12462 12462
 });
12463
-x(b, a);
12463
+y(b, a);
12464 12464
 }
12465 12465
 });
12466 12466
 });
12467
-}), e.all(b).then(t, u)["finally"](function() {
12468
-l.loaded = !0;
12467
+}), e.all(b).then(u, v)["finally"](function() {
12468
+m.loaded = !0;
12469 12469
 });
12470 12470
 }
12471 12471
 }
12472
-l.includedMetrics = l.includedMetrics || [ "cpu", "memory", "network" ];
12473
-var z, A = {}, B = {}, C = c("resources.limits.memory"), D = c("resources.limits.cpu"), E = 30, F = !1;
12474
-l.uniqueID = i.uniqueID(), l.metrics = [], _.includes(l.includedMetrics, "memory") && l.metrics.push({
12472
+m.includedMetrics = m.includedMetrics || [ "cpu", "memory", "network" ];
12473
+var A, B = {}, C = {}, D = c("resources.limits.memory"), E = c("resources.limits.cpu"), F = 30, G = !1;
12474
+m.uniqueID = i.uniqueID(), m.metrics = [], _.includes(m.includedMetrics, "memory") && m.metrics.push({
12475 12475
 label:"Memory",
12476 12476
 units:"MiB",
12477 12477
 chartPrefix:"memory-",
... ...
@@ -12482,7 +12493,7 @@ id:"memory/usage",
12482 12482
 label:"Memory",
12483 12483
 data:[]
12484 12484
 } ]
12485
-}), _.includes(l.includedMetrics, "cpu") && l.metrics.push({
12485
+}), _.includes(m.includedMetrics, "cpu") && m.metrics.push({
12486 12486
 label:"CPU",
12487 12487
 units:"cores",
12488 12488
 chartPrefix:"cpu-",
... ...
@@ -12494,7 +12505,7 @@ id:"cpu/usage_rate",
12494 12494
 label:"CPU",
12495 12495
 data:[]
12496 12496
 } ]
12497
-}), _.includes(l.includedMetrics, "network") && l.metrics.push({
12497
+}), _.includes(m.includedMetrics, "network") && m.metrics.push({
12498 12498
 label:"Network",
12499 12499
 units:"KiB/s",
12500 12500
 chartPrefix:"network-",
... ...
@@ -12509,17 +12520,19 @@ id:"network/rx_rate",
12509 12509
 label:"Received",
12510 12510
 data:[]
12511 12511
 } ]
12512
-}), l.loaded = !1, l.noData = !0, j.getMetricsURL().then(function(a) {
12513
-l.metricsURL = a;
12514
-}), l.options = {
12512
+}), m.loaded = !1, m.noData = !0, m.showComputeUnitsHelp = function() {
12513
+k.showComputeUnitsHelp();
12514
+}, j.getMetricsURL().then(function(a) {
12515
+m.metricsURL = a;
12516
+}), m.options = {
12515 12517
 rangeOptions:i.getTimeRangeOptions()
12516
-}, l.options.timeRange = _.head(l.options.rangeOptions);
12517
-var G = a("upperFirst"), H = function(a) {
12518
-var b = "#" + a.chartPrefix + l.uniqueID + "-donut";
12518
+}, m.options.timeRange = _.head(m.options.rangeOptions);
12519
+var H = a("upperFirst"), I = function(a) {
12520
+var b = "#" + a.chartPrefix + m.uniqueID + "-donut";
12519 12521
 return {
12520 12522
 bindto:b,
12521 12523
 onrendered:function() {
12522
-g.updateDonutCenterText(b, a.datasets[0].used, G(a.units) + " Used");
12524
+g.updateDonutCenterText(b, a.datasets[0].used, H(a.units) + " Used");
12523 12525
 },
12524 12526
 donut:{
12525 12527
 label:{
... ...
@@ -12535,28 +12548,28 @@ height:175,
12535 12535
 widht:175
12536 12536
 }
12537 12537
 };
12538
-}, I = function(a) {
12539
-var b = a.chartPrefix + l.uniqueID + "-sparkline", c = i.getDefaultSparklineConfig(b, a.units);
12538
+}, J = function(a) {
12539
+var b = a.chartPrefix + m.uniqueID + "-sparkline", c = i.getDefaultSparklineConfig(b, a.units);
12540 12540
 return 1 === a.datasets.length && _.set(c, "legend.show", !1), c;
12541
-}, J = 0;
12542
-l.$watch("options", function() {
12543
-_.each(l.metrics, function(a) {
12541
+}, K = 0;
12542
+m.$watch("options", function() {
12543
+_.each(m.metrics, function(a) {
12544 12544
 _.each(a.datasets, function(a) {
12545 12545
 delete a.data;
12546 12546
 });
12547
-}), delete l.metricsError, y();
12548
-}, !0), z = b(y, i.getDefaultUpdateInterval(), !1), f.$on("metrics.charts.resize", function() {
12549
-i.redraw(A), i.redraw(B);
12550
-}), l.$on("$destroy", function() {
12551
-z && (b.cancel(z), z = null), angular.forEach(A, function(a) {
12547
+}), delete m.metricsError, z();
12548
+}, !0), A = b(z, i.getDefaultUpdateInterval(), !1), f.$on("metrics.charts.resize", function() {
12549
+i.redraw(B), i.redraw(C);
12550
+}), m.$on("$destroy", function() {
12551
+A && (b.cancel(A), A = null), angular.forEach(B, function(a) {
12552 12552
 a.destroy();
12553
-}), A = null, angular.forEach(B, function(a) {
12553
+}), B = null, angular.forEach(C, function(a) {
12554 12554
 a.destroy();
12555
-}), B = null, F = !0;
12555
+}), C = null, G = !0;
12556 12556
 });
12557 12557
 }
12558 12558
 };
12559
-} ]), angular.module("openshiftConsole").directive("deploymentMetrics", [ "$interval", "$parse", "$timeout", "$q", "$rootScope", "ChartsService", "ConversionService", "MetricsCharts", "MetricsService", function(a, b, c, d, e, f, g, h, i) {
12559
+} ]), angular.module("openshiftConsole").directive("deploymentMetrics", [ "$interval", "$parse", "$timeout", "$q", "$rootScope", "ChartsService", "ConversionService", "MetricsCharts", "MetricsService", "ModalsService", function(a, b, c, d, e, f, g, h, i, j) {
12560 12560
 return {
12561 12561
 restrict:"E",
12562 12562
 scope:{
... ...
@@ -12574,7 +12587,7 @@ return null === a.value || void 0 === a.value;
12574 12574
 }
12575 12575
 function d(a) {
12576 12576
 var b;
12577
-b = v ? a.compactDatasetLabel || a.label :"Average Usage";
12577
+b = w ? a.compactDatasetLabel || a.label :"Average Usage";
12578 12578
 var d = {}, e = [ "Date" ], f = [ b ], g = [ e, f ], h = function(a) {
12579 12579
 var b = "" + a.start;
12580 12580
 return d[b] || (d[b] = {
... ...
@@ -12582,10 +12595,10 @@ total:0,
12582 12582
 count:0
12583 12583
 }), d[b];
12584 12584
 };
12585
-return _.each(z[a.descriptor], function(a) {
12585
+return _.each(A[a.descriptor], function(a) {
12586 12586
 _.each(a, function(a) {
12587 12587
 var b = h(a);
12588
-(!x || x < a.end) && (x = a.end), c(a) || (b.total += a.value, b.count = b.count + 1);
12588
+(!y || y < a.end) && (y = a.end), c(a) || (b.total += a.value, b.count = b.count + 1);
12589 12589
 });
12590 12590
 }), _.each(d, function(b, c) {
12591 12591
 var d;
... ...
@@ -12597,14 +12610,14 @@ var f = [], g = {
12597 12597
 type:"spline"
12598 12598
 };
12599 12599
 return b.showAverage ? (_.each(a[e.descriptor], function(a, b) {
12600
-q(e.descriptor, b, a);
12601
-}), g.type = "area-spline", v && e.compactType && (g.type = e.compactType), g.x = "Date", g.columns = d(e), g) :(_.each(a[e.descriptor], function(a, b) {
12602
-q(e.descriptor, b, a);
12600
+r(e.descriptor, b, a);
12601
+}), g.type = "area-spline", w && e.compactType && (g.type = e.compactType), g.x = "Date", g.columns = d(e), g) :(_.each(a[e.descriptor], function(a, b) {
12602
+r(e.descriptor, b, a);
12603 12603
 var d = b + "-dates";
12604 12604
 _.set(g, [ "xs", b ], d);
12605 12605
 var h = [ d ], i = [ b ];
12606
-f.push(h), f.push(i), _.each(z[e.descriptor][b], function(a) {
12607
-if (h.push(a.start), (!x || x < a.end) && (x = a.end), c(a)) i.push(a.value); else {
12606
+f.push(h), f.push(i), _.each(A[e.descriptor][b], function(a) {
12607
+if (h.push(a.start), (!y || y < a.end) && (y = a.end), c(a)) i.push(a.value); else {
12608 12608
 var b = e.convert ? e.convert(a.value) :a.value;
12609 12609
 i.push(b);
12610 12610
 }
... ...
@@ -12613,40 +12626,40 @@ i.push(b);
12613 12613
 return a[0];
12614 12614
 }), g);
12615 12615
 }
12616
-function j(a) {
12617
-w || (D = 0, b.showAverage = _.size(b.pods) > 5 || v, _.each(b.metrics, function(c) {
12616
+function k(a) {
12617
+x || (E = 0, b.showAverage = _.size(b.pods) > 5 || w, _.each(b.metrics, function(c) {
12618 12618
 var d, e = f(a, c), g = c.descriptor;
12619
-v && c.compactCombineWith && (g = c.compactCombineWith, c.lastValue && (C[g].lastValue = (C[g].lastValue || 0) + c.lastValue)), t[g] ? (t[g].load(e), b.showAverage ? t[g].legend.hide() :t[g].legend.show()) :(d = E(c), d.data = e, t[g] = c3.generate(d));
12619
+w && c.compactCombineWith && (g = c.compactCombineWith, c.lastValue && (D[g].lastValue = (D[g].lastValue || 0) + c.lastValue)), u[g] ? (u[g].load(e), b.showAverage ? u[g].legend.hide() :u[g].legend.show()) :(d = F(c), d.data = e, u[g] = c3.generate(d));
12620 12620
 }));
12621 12621
 }
12622
-function k() {
12623
-return v ? "-15mn" :"-" + b.options.timeRange.value + "mn";
12624
-}
12625 12622
 function l() {
12626
-return 60 * b.options.timeRange.value * 1e3;
12623
+return w ? "-15mn" :"-" + b.options.timeRange.value + "mn";
12627 12624
 }
12628 12625
 function m() {
12629
-return v ? "1mn" :Math.floor(l() / u) + "ms";
12626
+return 60 * b.options.timeRange.value * 1e3;
12630 12627
 }
12631 12628
 function n() {
12629
+return w ? "1mn" :Math.floor(m() / v) + "ms";
12630
+}
12631
+function o() {
12632 12632
 var a = _.find(b.pods, "metadata.namespace");
12633 12633
 if (a) {
12634 12634
 var c = {
12635 12635
 pods:b.pods,
12636 12636
 containerName:b.options.selectedContainer.name,
12637 12637
 namespace:a.metadata.namespace,
12638
-bucketDuration:m()
12638
+bucketDuration:n()
12639 12639
 };
12640
-return x ? c.start = x :c.start = k(), c;
12640
+return y ? c.start = y :c.start = l(), c;
12641 12641
 }
12642 12642
 }
12643
-function o(a) {
12644
-if (!w) {
12645
-if (D++, b.noData) return void (b.metricsError = {
12643
+function p(a) {
12644
+if (!x) {
12645
+if (E++, b.noData) return void (b.metricsError = {
12646 12646
 status:_.get(a, "status", 0),
12647 12647
 details:_.get(a, "data.errorMsg") || _.get(a, "statusText") || "Status code " + _.get(a, "status", 0)
12648 12648
 });
12649
-if (!(D < 2)) {
12649
+if (!(E < 2)) {
12650 12650
 var c = "metrics-failed-" + b.uniqueID;
12651 12651
 b.alerts[c] = {
12652 12652
 type:"error",
... ...
@@ -12655,36 +12668,36 @@ links:[ {
12655 12655
 href:"",
12656 12656
 label:"Retry",
12657 12657
 onClick:function() {
12658
-delete b.alerts[c], D = 1, r();
12658
+delete b.alerts[c], E = 1, s();
12659 12659
 }
12660 12660
 } ]
12661 12661
 };
12662 12662
 }
12663 12663
 }
12664 12664
 }
12665
-function p() {
12665
+function q() {
12666 12666
 var a = _.isEmpty(b.pods);
12667
-return a ? (b.loaded = !0, !1) :!b.metricsError && D < 2;
12667
+return a ? (b.loaded = !0, !1) :!b.metricsError && E < 2;
12668 12668
 }
12669
-function q(a, c, d) {
12669
+function r(a, c, d) {
12670 12670
 b.noData = !1;
12671
-var e = _.initial(d), f = _.get(z, [ a, c ]);
12672
-if (!f) return void _.set(z, [ a, c ], e);
12673
-var g = _.takeRight(f.concat(e), u);
12674
-_.set(z, [ a, c ], g);
12671
+var e = _.initial(d), f = _.get(A, [ a, c ]);
12672
+if (!f) return void _.set(A, [ a, c ], e);
12673
+var g = _.takeRight(f.concat(e), v);
12674
+_.set(A, [ a, c ], g);
12675 12675
 }
12676
-function r() {
12677
-if (!A && p()) {
12678
-y = Date.now();
12679
-var a = n();
12680
-i.getPodMetrics(a).then(j, o)["finally"](function() {
12676
+function s() {
12677
+if (!B && q()) {
12678
+z = Date.now();
12679
+var a = o();
12680
+i.getPodMetrics(a).then(k, p)["finally"](function() {
12681 12681
 b.loaded = !0;
12682 12682
 });
12683 12683
 }
12684 12684
 }
12685
-var s, t = {}, u = 30, v = "compact" === b.profile, w = !1;
12685
+var t, u = {}, v = 30, w = "compact" === b.profile, x = !1;
12686 12686
 b.uniqueID = h.uniqueID();
12687
-var x, y, z = {}, A = v, B = function(a) {
12687
+var y, z, A = {}, B = w, C = function(a) {
12688 12688
 return a >= 1024;
12689 12689
 };
12690 12690
 b.metrics = [ {
... ...
@@ -12692,10 +12705,10 @@ label:"Memory",
12692 12692
 units:"MiB",
12693 12693
 convert:g.bytesToMiB,
12694 12694
 formatUsage:function(a) {
12695
-return B(a) && (a /= 1024), h.formatUsage(a);
12695
+return C(a) && (a /= 1024), h.formatUsage(a);
12696 12696
 },
12697 12697
 usageUnits:function(a) {
12698
-return B(a) ? "GiB" :"MiB";
12698
+return C(a) ? "GiB" :"MiB";
12699 12699
 },
12700 12700
 descriptor:"memory/usage",
12701 12701
 type:"pod_container",
... ...
@@ -12740,28 +12753,30 @@ compactDatasetLabel:"Received",
12740 12740
 compactType:"spline",
12741 12741
 chartID:"network-rx-" + b.uniqueID
12742 12742
 } ];
12743
-var C = _.indexBy(b.metrics, "descriptor");
12744
-b.loaded = !1, b.noData = !0;
12745
-var D = 0;
12743
+var D = _.indexBy(b.metrics, "descriptor");
12744
+b.loaded = !1, b.noData = !0, b.showComputeUnitsHelp = function() {
12745
+j.showComputeUnitsHelp();
12746
+};
12747
+var E = 0;
12746 12748
 i.getMetricsURL().then(function(a) {
12747 12749
 b.metricsURL = a;
12748 12750
 }), b.options = {
12749 12751
 rangeOptions:h.getTimeRangeOptions()
12750 12752
 }, b.options.timeRange = _.head(b.options.rangeOptions), b.options.selectedContainer = _.head(b.containers);
12751
-var E = function(a) {
12752
-var c = h.getDefaultSparklineConfig(a.chartID, a.units, v);
12753
-return _.set(c, "legend.show", !v && !b.showAverage), c;
12753
+var F = function(a) {
12754
+var c = h.getDefaultSparklineConfig(a.chartID, a.units, w);
12755
+return _.set(c, "legend.show", !w && !b.showAverage), c;
12754 12756
 };
12755 12757
 b.$watch("options", function() {
12756
-z = {}, x = null, delete b.metricsError, r();
12757
-}, !0), s = a(r, h.getDefaultUpdateInterval(), !1), b.updateInView = function(a) {
12758
-A = !a, a && (!y || Date.now() > y + h.getDefaultUpdateInterval()) && r();
12758
+A = {}, y = null, delete b.metricsError, s();
12759
+}, !0), t = a(s, h.getDefaultUpdateInterval(), !1), b.updateInView = function(a) {
12760
+B = !a, a && (!z || Date.now() > z + h.getDefaultUpdateInterval()) && s();
12759 12761
 }, e.$on("metrics.charts.resize", function() {
12760
-h.redraw(t);
12762
+h.redraw(u);
12761 12763
 }), b.$on("$destroy", function() {
12762
-s && (a.cancel(s), s = null), angular.forEach(t, function(a) {
12764
+t && (a.cancel(t), t = null), angular.forEach(u, function(a) {
12763 12765
 a.destroy();
12764
-}), t = null, w = !0;
12766
+}), u = null, x = !0;
12765 12767
 });
12766 12768
 }
12767 12769
 };
... ...
@@ -13537,7 +13552,7 @@ j(), k(), b.amount ? e.$setViewValue(b.amount + b.unit) :e.$setViewValue(void 0)
13537 13537
 }), b.$watchGroup([ "limitRangeMin", "limitRangeMax" ], j), b.$watch("request", k);
13538 13538
 }
13539 13539
 };
13540
-} ]).directive("editRequestLimit", [ "$filter", "LimitRangesService", function(a, b) {
13540
+} ]).directive("editRequestLimit", [ "$filter", "LimitRangesService", "ModalsService", function(a, b, c) {
13541 13541
 return {
13542 13542
 restrict:"E",
13543 13543
 scope:{
... ...
@@ -13548,7 +13563,9 @@ project:"="
13548 13548
 },
13549 13549
 templateUrl:"views/_edit-request-limit.html",
13550 13550
 link:function(a) {
13551
-a.$watch("limitRanges", function() {
13551
+a.showComputeUnitsHelp = function() {
13552
+c.showComputeUnitsHelp();
13553
+}, a.$watch("limitRanges", function() {
13552 13554
 a.limits = b.getEffectiveLimitRange(a.limitRanges, a.type, "Container", a.project), a.requestCalculated = b.isRequestCalculated(a.type, a.project), a.limitCalculated = b.isLimitCalculated(a.type, a.project);
13553 13555
 }, !0);
13554 13556
 }
... ...
@@ -15981,11 +15998,15 @@ var _scriptsTemplatesJs = []byte(`angular.module('openshiftConsoleTemplates', []
15981 15981
     "</small>\n" +
15982 15982
     "</h3>\n" +
15983 15983
     "\n" +
15984
-    "<compute-resource ng-model=\"resources.requests[type]\" type=\"{{type}}\" label=\"Request\" description=\"The amount of {{type | computeResourceLabel}} the container requests.\" default-value=\"limits.defaultRequest\" limit-range-min=\"limits.min\" limit-range-max=\"limits.max\" max-limit-request-ratio=\"limits.maxLimitRequestRatio\" ng-if=\"!requestCalculated\">\n" +
15984
+    "<compute-resource ng-model=\"resources.requests[type]\" type=\"{{type}}\" label=\"Request\" description=\"The minimum amount of {{type | computeResourceLabel}} the container is guaranteed.\" default-value=\"limits.defaultRequest\" limit-range-min=\"limits.min\" limit-range-max=\"limits.max\" max-limit-request-ratio=\"limits.maxLimitRequestRatio\" ng-if=\"!requestCalculated\">\n" +
15985 15985
     "</compute-resource>\n" +
15986 15986
     "\n" +
15987
-    "<compute-resource ng-model=\"resources.limits[type]\" type=\"{{type}}\" label=\"{{requestCalculated ? undefined : 'Limit'}}\" description=\"The amount of {{type | computeResourceLabel : true}} the container is limited to use.\" default-value=\"limits.defaultLimit\" limit-range-min=\"limits.min\" limit-range-max=\"limits.max\" request=\"requestCalculated ? undefined : resources.requests[type]\" max-limit-request-ratio=\"limits.maxLimitRequestRatio\" ng-if=\"!hideLimit\">\n" +
15987
+    "<compute-resource ng-model=\"resources.limits[type]\" type=\"{{type}}\" label=\"{{requestCalculated ? undefined : 'Limit'}}\" description=\"The maximum amount of {{type | computeResourceLabel}} the container is allowed to use when running.\" default-value=\"limits.defaultLimit\" limit-range-min=\"limits.min\" limit-range-max=\"limits.max\" request=\"requestCalculated ? undefined : resources.requests[type]\" max-limit-request-ratio=\"limits.maxLimitRequestRatio\" ng-if=\"!hideLimit\">\n" +
15988 15988
     "</compute-resource>\n" +
15989
+    "<div class=\"learn-more-block\">\n" +
15990
+    "<a href=\"\" ng-click=\"showComputeUnitsHelp()\">What are\n" +
15991
+    "<span ng-if=\"type === 'cpu'\">millicores</span><span ng-if=\"type === 'memory'\">MiB</span>?</a>\n" +
15992
+    "</div>\n" +
15989 15993
     "</ng-form>"
15990 15994
   );
15991 15995
 
... ...
@@ -22056,6 +22077,9 @@ var _scriptsTemplatesJs = []byte(`angular.module('openshiftConsoleTemplates', []
22056 22056
   $templateCache.put('views/directives/deployment-metrics.html',
22057 22057
     "<div class=\"metrics\">\n" +
22058 22058
     "<div ng-if=\"!metricsError\" class=\"metrics-options\">\n" +
22059
+    "<div class=\"pull-right learn-more-block hidden-xs\">\n" +
22060
+    "<a href=\"\" ng-click=\"showComputeUnitsHelp()\">About Compute Resources</a>\n" +
22061
+    "</div>\n" +
22059 22062
     "<div ng-if=\"containers.length\" class=\"form-group\">\n" +
22060 22063
     "<label for=\"selectContainer\">Container:</label>\n" +
22061 22064
     "<div class=\"select-container\">\n" +
... ...
@@ -23781,6 +23805,9 @@ var _scriptsTemplatesJs = []byte(`angular.module('openshiftConsoleTemplates', []
23781 23781
   $templateCache.put('views/directives/pod-metrics.html',
23782 23782
     "<div class=\"metrics mar-top-xl\" ng-if=\"pod || deployment\">\n" +
23783 23783
     "<div ng-show=\"!metricsError\" class=\"metrics-options\">\n" +
23784
+    "<div class=\"pull-right learn-more-block hidden-xs\">\n" +
23785
+    "<a href=\"\" ng-click=\"showComputeUnitsHelp()\">About Compute Resources</a>\n" +
23786
+    "</div>\n" +
23784 23787
     "\n" +
23785 23788
     "<div ng-if=\"pod.spec.containers.length\" class=\"form-group\">\n" +
23786 23789
     "<label for=\"selectContainer\">Container:</label>\n" +
... ...
@@ -25487,6 +25514,55 @@ var _scriptsTemplatesJs = []byte(`angular.module('openshiftConsoleTemplates', []
25487 25487
   );
25488 25488
 
25489 25489
 
25490
+  $templateCache.put('views/modals/about-compute-units-modal.html',
25491
+    "<div>\n" +
25492
+    "<div class=\"modal-body\">\n" +
25493
+    "<h2>\n" +
25494
+    "Compute Resources\n" +
25495
+    "<span class=\"page-header-link\">\n" +
25496
+    "<a href=\"{{'compute_resources' | helpLink}}\" target=\"_blank\">Learn More <i class=\"fa fa-external-link\" aria-hidden=\"true\"></i></a>\n" +
25497
+    "</span>\n" +
25498
+    "</h2>\n" +
25499
+    "<div>\n" +
25500
+    "Each container running on a node uses compute resources like CPU and memory. You can specify how much CPU and memory a container needs to improve scheduling and performance.\n" +
25501
+    "</div>\n" +
25502
+    "<h3>CPU</h3>\n" +
25503
+    "<p>\n" +
25504
+    "CPU is often measured in units called <var>millicores</var>. Each millicore is equivalent to <sup>1</sup>&frasl;<sub>1000</sub> of a CPU&nbsp;core.\n" +
25505
+    "</p>\n" +
25506
+    "<pre>\n" +
25507
+    "1000 millcores  =  1 core\n" +
25508
+    "</pre>\n" +
25509
+    "<h3>Memory</h3>\n" +
25510
+    "<p>\n" +
25511
+    "Memory is measured in binary units like <var>KiB</var>, <var>MiB</var>, and <var>GiB</var> or decimal units like <var>kB</var>, <var>MB</var>, and&nbsp;<var>GB</var>.\n" +
25512
+    "</p>\n" +
25513
+    "<div class=\"row\">\n" +
25514
+    "<div class=\"col-sm-6\">\n" +
25515
+    "<h4>Binary Units</h4>\n" +
25516
+    "<pre>\n" +
25517
+    "1024 bytes  =  1 KiB\n" +
25518
+    "1024 KiB    =  1 MiB\n" +
25519
+    "1024 MiB    =  1 GiB\n" +
25520
+    "</pre>\n" +
25521
+    "</div>\n" +
25522
+    "<div class=\"col-sm-6\">\n" +
25523
+    "<h4>Decimal Units</h4>\n" +
25524
+    "<pre>\n" +
25525
+    "1000 bytes  =  1 kB\n" +
25526
+    "1000 kB     =  1 MB\n" +
25527
+    "1000 MB     =  1 GB\n" +
25528
+    "</pre>\n" +
25529
+    "</div>\n" +
25530
+    "</div>\n" +
25531
+    "</div>\n" +
25532
+    "<div class=\"modal-footer\">\n" +
25533
+    "<button class=\"btn btn-lg btn-default\" type=\"button\" ng-click=\"ok()\">OK</button>\n" +
25534
+    "</div>\n" +
25535
+    "</div>"
25536
+  );
25537
+
25538
+
25490 25539
   $templateCache.put('views/modals/confirm-replace.html',
25491 25540
     "<div class=\"modal-resource-action\">\n" +
25492 25541
     "<div class=\"modal-body\">\n" +
... ...
@@ -112551,6 +112627,9 @@ to{transform:rotate(359deg)}
112551 112551
 .input-group-addon.wildcard-prefix{padding-left:10px}
112552 112552
 .editor-examples{padding:19px;margin-bottom:20px;border:1px solid #d1d1d1}
112553 112553
 .editor-examples .copy-to-clipboard{margin-top:3px}
112554
+.compute-resource{margin-bottom:5px}
112555
+@media (max-width:767px){.compute-resource .inline-select{margin-top:5px}
112556
+}
112554 112557
 .card-pf .image-icon,.card-pf .template-icon{font-size:28px;line-height:1;margin-right:15px;opacity:.38}
112555 112558
 .card-pf-badge{color:#999;font-size:11px;text-transform:uppercase}
112556 112559
 .card-pf-body{margin-bottom:0}
... ...
@@ -112829,8 +112908,6 @@ label.checkbox{font-weight:400}
112829 112829
 .osc-form .template-options .form-group .parameter-input-wrapper .resize-input .fa-compress,.osc-form .template-options .form-group .parameter-input-wrapper .resize-input .fa-expand{transform:rotate(90deg)}
112830 112830
 .osc-form .template-options .form-group .parameter-input-wrapper input,.osc-form .template-options .form-group .parameter-input-wrapper textarea{padding-right:20px}
112831 112831
 .osc-form .template-options .help-block{margin-bottom:5px}
112832
-@media (max-width:767px){.compute-resource .inline-select{margin-top:5px}
112833
-}
112834 112832
 .next-steps .tile{margin-bottom:0}
112835 112833
 .next-steps .tile.tile-status{margin-top:0}
112836 112834
 .command-args textarea{resize:none}
... ...
@@ -113948,13 +114025,12 @@ kubernetes-topology-graph{height:700px}
113948 113948
 .kube-topology line.DeploymentConfigReplicationController,.kube-topology line.ReplicationControllerPod,.kube-topology line.ServiceDeploymentConfig,.kube-topology line.ServiceReplicationController{stroke-dasharray:5,2;stroke-linecap:round}
113949 113949
 .console-os .page-header{border-color:#e4e4e4;padding-left:20px;padding-right:20px;margin:20px -20px 0}
113950 113950
 .console-os .page-header .actions{margin-top:0}
113951
-.console-os .page-header .page-header-link{display:inline-block;font-size:11px;font-weight:400;margin:0 10px;white-space:nowrap}
113951
+.console-os .page-header-link{display:inline-block;font-size:11px;font-weight:400;margin:0 10px;white-space:nowrap}
113952 113952
 @media (min-width:992px){.console-os .page-header.page-header-bleed-left{margin-left:-30px;padding-left:30px;margin-right:-30px;padding-right:30px}
113953 113953
 }
113954 113954
 .console-os .section-header{border-color:#e4e4e4;padding-left:20px;padding-right:20px;border-bottom:none;padding-bottom:10px;margin:20px -20px 0}
113955
-.console-os .section-header .actions{margin-top:0}
113956
-.console-os .section-header .page-header-link{display:inline-block;font-size:11px;font-weight:400;margin:0 10px;white-space:nowrap}
113957 113955
 .action-inline,.learn-more-inline{margin-left:5px;font-size:11px}
113956
+.console-os .section-header .actions{margin-top:0}
113958 113957
 .build-config-summary .meta,.deployment-config-summary .meta,h1 small.meta{font-size:12px}
113959 113958
 @media (max-width:480px){.build-config-summary .meta,.deployment-config-summary .meta,h1 small.meta{display:block;margin-top:5px}
113960 113959
 }