提交 b18fbdd1 编写于 作者: B bryk

Reformat code on new clang format release

上级 a5b3196b
......@@ -48,16 +48,15 @@ gulp.task('build-frontend', ['assets', 'index:prod', 'clean-dist'], function() {
let vendorCssFilter = gulpFilter('**/vendor.css', {restore: true});
let vendorJsFilter = gulpFilter('**/vendor.js', {restore: true});
let assetsFilter = gulpFilter(['**/*.js', '**/*.css'], {restore: true});
let searchPath = [
// To resolve local paths.
path.relative(conf.paths.base, conf.paths.prodTmp),
// To resolve bower_components/... paths.
path.relative(conf.paths.base, conf.paths.base),
];
return gulp.src(path.join(conf.paths.prodTmp, '*.html'))
.pipe(gulpUseref({
searchPath: [
// To resolve local paths.
path.relative(conf.paths.base, conf.paths.prodTmp),
// To resolve bower_components/... paths.
path.relative(conf.paths.base, conf.paths.base),
],
}))
.pipe(gulpUseref({searchPath: searchPath}))
.pipe(vendorCssFilter)
.pipe(gulpMinifyCss())
.pipe(vendorCssFilter.restore)
......@@ -67,7 +66,7 @@ gulp.task('build-frontend', ['assets', 'index:prod', 'clean-dist'], function() {
.pipe(assetsFilter)
.pipe(gulpRev())
.pipe(assetsFilter.restore)
.pipe(gulpUseref({searchPath: [conf.paths.prodTmp]}))
.pipe(gulpUseref({searchPath: searchPath}))
.pipe(gulpRevReplace())
.pipe(htmlFilter)
.pipe(gulpHtmlmin({
......
......@@ -51,7 +51,8 @@ gulp.task('lint', ['lint-javascript', 'check-javascript-format', 'lint-styles'])
* build scripts.
*/
gulp.task('lint-javascript', function() {
return gulp.src([path.join(conf.paths.src, '**/*.js'), path.join(conf.paths.build, '**/*.js')])
return gulp
.src([path.join(conf.paths.src, '**/*.js'), path.join(conf.paths.build, '**/*.js')])
// Attach lint output to the eslint property of the file.
.pipe(gulpEslint())
// Output the lint results to the console.
......@@ -82,9 +83,10 @@ gulp.task('check-javascript-format', function() {
* Formats all project's JavaScript files using clang-format.
*/
gulp.task('format-javascript', function() {
return gulp.src(
[path.join(conf.paths.src, '**/*.js'), path.join(conf.paths.build, '**/*.js')],
{base: conf.paths.base})
return gulp
.src(
[path.join(conf.paths.src, '**/*.js'), path.join(conf.paths.build, '**/*.js')],
{base: conf.paths.base})
.pipe(gulpClangFormat.format('file'))
.pipe(gulp.dest(conf.paths.base));
});
......@@ -68,8 +68,7 @@ function checkPrerequisites() {
function checkGo() {
let deferred = q.defer();
child.exec(
'which go',
{
'which go', {
env: env,
},
function(error, stdout, stderror) {
......@@ -92,8 +91,7 @@ function checkGo() {
function checkGoVersion() {
let deferred = q.defer();
child.exec(
'go version',
{
'go version', {
env: env,
},
function(error, stdout) {
......@@ -128,8 +126,7 @@ function checkGoVersion() {
function checkGodep() {
let deferred = q.defer();
child.exec(
'which godep',
{
'which godep', {
env: env,
},
function(error, stdout, stderror) {
......
......@@ -126,11 +126,8 @@ gulp.task('angular-templates', function() {
collapseWhitespace: true,
conservativeCollapse: true,
}))
.pipe(
gulpAngularTemplatecache(
'angular-templates.js',
{
module: conf.frontend.rootModuleName,
}))
.pipe(gulpAngularTemplatecache('angular-templates.js', {
module: conf.frontend.rootModuleName,
}))
.pipe(gulp.dest(conf.paths.partials));
});
......@@ -17,10 +17,11 @@ import chromeDirective from './chrome_directive';
/**
* Angular module containing navigation chrome for the application.
*/
export default angular.module(
'kubernetesDashboard.chrome',
[
'ngMaterial',
'ui.router',
])
export default angular
.module(
'kubernetesDashboard.chrome',
[
'ngMaterial',
'ui.router',
])
.directive('chrome', chromeDirective);
......@@ -17,9 +17,10 @@ import labelsDirective from './labels/labels_directive';
/**
* Module containing common components for the application.
*/
export default angular.module(
'kubernetesDashboard.common.components',
[
'ngMaterial',
])
export default angular
.module(
'kubernetesDashboard.common.components',
[
'ngMaterial',
])
.directive('kdLabels', labelsDirective);
......@@ -18,9 +18,10 @@ import errorDialogService from './errordialog_service';
/**
* Angular module containing navigation chrome for the application.
*/
export default angular.module(
'kubernetesDashboard.errorhandling',
[
'ngMaterial',
])
export default angular
.module(
'kubernetesDashboard.errorhandling',
[
'ngMaterial',
])
.service('errorDialog', errorDialogService);
......@@ -18,10 +18,11 @@ import relativeTimeFilter from './relativetime_filter';
/**
* Module containing common filters for the application.
*/
export default angular.module(
'kubernetesDashboard.common.filters',
[
'ngMaterial',
])
export default angular
.module(
'kubernetesDashboard.common.filters',
[
'ngMaterial',
])
.filter('middleEllipsis', middleEllipsisFilter)
.filter('relativeTime', relativeTimeFilter);
......@@ -29,15 +29,16 @@ import helpSectionModule from './helpsection/helpsection_module';
*
* The view allows for deploying applications to Kubernetes clusters.
*/
export default angular.module(
'kubernetesDashboard.deploy',
[
'ngMaterial',
'ngResource',
'ui.router',
helpSectionModule.name,
errorHandlingModule.name,
])
export default angular
.module(
'kubernetesDashboard.deploy',
[
'ngMaterial',
'ngResource',
'ui.router',
helpSectionModule.name,
errorHandlingModule.name,
])
.config(stateConfig)
.directive('deployFromSettings', deployFromSettingsDirective)
.directive('deployFromFile', deployFromFileDirective)
......
......@@ -221,7 +221,7 @@ export default class DeployFromSettingsController {
let name = this.form['name'];
return name.$error[uniqueNameValidationKey] ||
(name.$invalid && (name.$touched || this.form.$submitted));
(name.$invalid && (name.$touched || this.form.$submitted));
}
/**
......
......@@ -18,11 +18,12 @@ import stateConfig from './internalerror_stateconfig';
/**
* Angular module for error views.
*/
export default angular.module(
'kubernetesDashboard.error',
[
'ui.router',
])
export default angular
.module(
'kubernetesDashboard.error',
[
'ui.router',
])
.config(stateConfig)
.run(errorConfig);
......
......@@ -25,22 +25,23 @@ import logsModule from './logs/logs_module';
import replicaSetDetailModule from './replicasetdetail/replicasetdetail_module';
import replicaSetListModule from './replicasetlist/replicasetlist_module';
export default angular.module(
'kubernetesDashboard',
[
'ngAnimate',
'ngAria',
'ngMaterial',
'ngMessages',
'ngResource',
'ngSanitize',
'ui.router',
chromeModule.name,
deployModule.name,
errorModule.name,
logsModule.name,
replicaSetDetailModule.name,
replicaSetListModule.name,
])
export default angular
.module(
'kubernetesDashboard',
[
'ngAnimate',
'ngAria',
'ngMaterial',
'ngMessages',
'ngResource',
'ngSanitize',
'ui.router',
chromeModule.name,
deployModule.name,
errorModule.name,
logsModule.name,
replicaSetDetailModule.name,
replicaSetListModule.name,
])
.config(indexConfig)
.config(routeConfig);
......@@ -19,11 +19,12 @@ import {LogColorInversionService} from './logs_service';
* Angular module for the logs view.
*
*/
export default angular.module(
'kubernetesDashboard.logs',
[
'ngResource',
'ui.router',
])
export default angular
.module(
'kubernetesDashboard.logs',
[
'ngResource',
'ui.router',
])
.service('logsColorInversionService', LogColorInversionService)
.config(stateConfig);
......@@ -184,8 +184,8 @@ export default class ReplicaSetDetailController {
* @export
*/
handleDeleteReplicaSetDialog() {
this.kdReplicaSetService_.showDeleteDialog(
this.stateParams_.namespace, this.stateParams_.replicaSet)
this.kdReplicaSetService_
.showDeleteDialog(this.stateParams_.namespace, this.stateParams_.replicaSet)
.then(this.onReplicaSetDeleteSuccess_.bind(this), this.onReplicaSetDeleteError_.bind(this));
}
......
......@@ -25,16 +25,17 @@ import {ReplicaSetService} from './replicaset_service';
*
* The view shows detailed view of a Replica Sets.
*/
export default angular.module(
'kubernetesDashboard.replicaSetDetail',
[
'ngMaterial',
'ngResource',
'ui.router',
componentsModule.name,
filtersModule.name,
logsModule.name,
])
export default angular
.module(
'kubernetesDashboard.replicaSetDetail',
[
'ngMaterial',
'ngResource',
'ui.router',
componentsModule.name,
filtersModule.name,
logsModule.name,
])
.config(stateConfig)
.directive('kdServiceEndpoint', serviceEndpointDirective)
.directive('kdSortedHeader', sortedHeaderDirective)
......
......@@ -26,16 +26,17 @@ import replicaSetListContainer from './replicasetlistcontainer_directive';
*
* The view shows Replica Sets running in the cluster and allows to manage them.
*/
export default angular.module(
'kubernetesDashboard.replicaSetList',
[
'ngMaterial',
'ngResource',
'ui.router',
replicaSetDetailModule.name,
filtersModule.name,
componentsModule.name,
])
export default angular
.module(
'kubernetesDashboard.replicaSetList',
[
'ngMaterial',
'ngResource',
'ui.router',
replicaSetDetailModule.name,
filtersModule.name,
componentsModule.name,
])
.config(stateConfig)
.directive('logsMenu', logsMenuDirective)
.directive('kdReplicaSetListContainer', replicaSetListContainer)
......
......@@ -108,8 +108,9 @@ describe('Replica Set Detail controller', () => {
});
it('should create logs href', () => {
expect(ctrl.getPodLogsHref({name: 'foo-pod'}))
.toBe('#/logs/foo-namespace/foo-replicaset/foo-pod/');
expect(ctrl.getPodLogsHref({
name: 'foo-pod',
})).toBe('#/logs/foo-namespace/foo-replicaset/foo-pod/');
});
it('should show delete replicas dialog', () => {
......
......@@ -72,8 +72,8 @@ describe('Update Replicas controller', () => {
httpBackend.flush();
// then
expect(log.info)
.toHaveBeenCalledWith(`Successfully updated replicas number to ${replicaSpec.replicas}`);
expect(log.info).toHaveBeenCalledWith(
`Successfully updated replicas number to ${replicaSpec.replicas}`);
expect(state.reload).toHaveBeenCalled();
});
......
......@@ -47,8 +47,8 @@ describe('Replica set card menu controller', () => {
ctrl.viewDetails();
// then
expect(state.go)
.toHaveBeenCalledWith('replicasetdetail', new StateParams('foo-namespace', 'foo-name'));
expect(state.go).toHaveBeenCalledWith(
'replicasetdetail', new StateParams('foo-namespace', 'foo-name'));
});
it('should open the menu', () => {
......
......@@ -59,7 +59,7 @@ describe('Replica set list container', () => {
let actual = binarySearchOptimalHeight(heights, numColumns);
expect(actual).toBe(
expected, `Expected height to be ${expected} but was ${actual}. ` +
`Required number of columns: ${numColumns}, heights: [${heights}]`);
`Required number of columns: ${numColumns}, heights: [${heights}]`);
}
});
});
@import url(//fonts.googleapis.com/css?family=Roboto:300,400,500,700,400italic);@import url(//fonts.googleapis.com/icon?family=Material+Icons);a,a:visited{color:#326de6}.kd-toolbar-logo{height:42px;margin-right:1em;width:42px}.kd-toolbar{box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}body{background-color:#eee;height:100%}a{text-decoration:inherit}.kd-app-content-wrapper,.kd-toolbar-tools{margin:0 auto}.kd-app-content{position:relative}.kd-center-fixed{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;bottom:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;left:0;position:fixed;right:0;top:0}.kd-text-icon{font-size:inherit;height:inherit;vertical-align:middle}.kd-comma-separated-item:after{content:','}.kd-comma-separated-item:last-child:after{content:''}.kd-deploy-whiteframe{background:#fff;margin:1em;max-width:960px;min-width:600px}md-progress-linear.kd-deploy-form-progress{clear:left;height:2px;margin-bottom:-2px;overflow:hidden;top:-2px}.kd-deploy-input-row{margin:0 0 8px}.kd-upload-button{padding-left:0;padding-right:0}.kd-upload-label{cursor:inherit;display:inline-block;width:100%}.kd-error-view-icon{color:rgba(0,0,0,.54);font-size:112px}.kd-logs-text-color-invert{background-color:#000;color:#fff}.kd-logs-text-color{background-color:#fff;color:#000}.kd-logs-element{padding:0;word-wrap:break-word}.kd-replicasetdetail-app-name{color:rgba(0,0,0,.54);font-weight:400}.kd-replicasetdetail-sidebar{background-color:#fafafa;max-width:395px;min-width:315px}.kd-replicasetdetail-sidebar-item{padding-left:16px;padding-right:8px}.kd-replicasetdetail-table{width:100%}.kd-replicasetdetail-sidebar-header{height:48px}.kd-replicasetdetail-sidebar-header-wrapper{border-bottom:1px solid rgba(0,0,0,.12)}.kd-replicasetdetail-sidebar-title{font-size:16px;font-weight:500;padding-bottom:8px;padding-top:8px}.kd-replicasetdetail-sidebar-title.kd-replicasetdetail-sidebar-info{padding-bottom:0;padding-top:16px}.kd-replicasetdetail-sidebar-line{color:rgba(0,0,0,.54);display:block;font-size:14px;padding-bottom:8px}.kd-replicasetdetail-sidebar-subline{color:rgba(0,0,0,.87);display:block;font-size:14px;overflow:hidden;padding-bottom:8px;text-overflow:ellipsis}.kd-replicasetdetail-sidebar-subline.kd-has-labels{margin-bottom:-4px}.kd-replicasetdetail-warning-icon{color:orange;font-size:24px;padding:0 8px;vertical-align:middle}.kd-replicasetdetail-options{margin:16px}.kd-replicasetdetail-sidebar-info{padding-left:14px}.kd-replicasetdetail-option-picker{padding-right:16px;width:120px}.kd-replicasetdetail-table-cell,.kd-replicasetdetail-table-header{border-bottom:1px solid rgba(0,0,0,.12);font-size:14px;height:48px;padding:0 0 0 16px}.kd-replicasetdetail-table-header{color:rgba(0,0,0,.54);font-weight:400;text-align:left;white-space:nowrap}.kd-replicasetdetail-table-cell.kd-replicasetdetail-message-table-cell{white-space:normal;word-break:break-all}.kd-replicasetdetail-table-icon{font-size:inherit;vertical-align:top}.kd-replicasetdetail-help-icon{color:rgba(0,0,0,.54);cursor:default}.kd-replicaset-detail-table-header-button{background:inherit;border:0;color:inherit;padding:0}.kd-replicaset-detail-table-header-button:focus{outline:0}.kd-updatereplicas-pod-status{font-size:14px}.kd-replicaset-card{margin:8px;width:416px}.kd-replicaset-card-name{color:inherit;display:inline-block;font-weight:400;text-decoration:none}.kd-replicaset-card-name:visited{color:inherit}.kd-menu-logs-item-header,.kd-replicaset-card-section-title{color:rgba(0,0,0,.54)}.kd-replicaset-card-title{margin:0}.kd-replicaset-card-description{overflow:auto;white-space:pre-wrap}.kd-replicaset-card-title-row{margin-top:-10px}.kd-replicaset-card-divider{margin-top:8px}.md-button.kd-replicaset-card-logs-button{font-size:inherit;font-weight:inherit;line-height:0;margin:0;min-height:inherit;min-width:inherit;padding:8px 0;text-decoration:none;text-transform:inherit}.kd-menu-logs-item,.kd-menu-logs-item-header{box-sizing:inherit;font-size:14px;white-space:nowrap}.md-button.kd-replicaset-card-logs-button:after{content:' \25BE'}.kd-replicaset-card-section{margin-top:16px}.kd-replicaset-card-section-image{white-space:nowrap}.kd-replicaset-card-label{margin-right:16px}.kd-replicase-card-pods-stat{white-space:nowrap}.kd-menu-logs-item-pods,.kd-menu-logs-item-prior{width:80px}.kd-menu-logs-item-since{width:120px}.md-button.kd-replicaset-card-menu-button{margin:0;position:relative;right:-8px}.md-fab.kd-replicaset-deploy{position:absolute;right:0;top:-36px}.kd-replica-set-list-container{-webkit-align-content:center;-ms-flex-line-pack:center;align-content:center;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-flow:column wrap;-ms-flex-flow:column wrap;flex-flow:column wrap;-webkit-box-pack:top;-webkit-justify-content:top;-ms-flex-pack:top;justify-content:top}.kd-help-section>*{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;margin-bottom:20px;padding-right:50px}.kd-user-help *{color:#888}.kd-user-help a{color:#326de6;opacity:1;text-decoration:none}.kd-user-help a:hover{color:#1254df}.kd-user-help b{color:#000}.kd-logs-color-icon{background-color:#000;color:#fff}.kd-logs-color-icon-invert{background-color:#fff;color:#000}.kd-content,.kd-labels{background-color:#eee}md-toolbar md-icon.kd-logs-color-icon-invert{color:#000}.kd-logs-toolbar-text{font-size:16px}.kd-logs-toolbar-select{margin-bottom:16px;margin-left:auto}.kd-zerostate-content{height:90%;position:fixed;width:100%}.kd-zerostate-card-header{font-size:1em}.kd-zerostate-card-logo{height:80px;padding:0 0 0 15px;width:80px}.kd-zerostate-deploy-card{color:#fff;min-width:300px}.kd-zerostate-deploy-bt{font-size:12px;min-width:120px}.kd-zerostate-lm-list{margin-top:10px}.kd-zerostate-lm-list>.kd-zerostate-lm-list-item{color:#326de6;min-height:30px;padding:0}.kd-zerostate-ext-link-icon{font-size:1em}.kd-zerostate-lm-card{font-size:15px;min-width:200px}.kd-zerostate-lm-text{color:#888}.kd-labels{border-radius:8px;display:inline-block;font-size:inherit;margin:0 8px 4px 0;padding:2px 8px;vertical-align:middle}.kd-labels-content{background-color:inherit}
\ No newline at end of file
var g="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this;function h(){g.Symbol||(g.Symbol=aa);h=function(){}}var ba=0;function aa(a){return"jscomp_symbol_"+a+ba++}function l(){h();g.Symbol.iterator||(g.Symbol.iterator=g.Symbol("iterator"));l=function(){}}
function m(a){l();if(a[g.Symbol.iterator])return a[g.Symbol.iterator]();if(!(a instanceof Array||"string"==typeof a||a instanceof String))throw new TypeError(a+" is not iterable");var b=0;return{next:function(){return b==a.length?{done:!0}:{done:!1,value:a[b++]}}}}function n(a){var b=a.extendPalette("blue",{500:"326de6"});a.definePalette("kubernetesColorPalette",b);a.theme("default").primaryPalette("kubernetesColorPalette")}n.$inject=["$mdThemingProvider"];function q(a){a.otherwise("/replicasets")}q.$inject=["$urlRouterProvider"];function t(a,b,c,d){this.namespace=a;this.replicaSet=b;this.podId=c;this.container=d};function u(a,b,c){this.c=a;this.b=c;this.a=b}u.prototype.u=function(a,b){this.replicaSetPodsList&&(this.replicaSetPodsList=[]);ca(this);a(b)};u.prototype.openMenu=u.prototype.u;function ca(a){a.b("api/replicasets/pods/"+a.namespace+"/"+a.replicaSetName+"?limit=10").get(function(b){a.a.info("Successfully fetched Replica Set pods: ",b);a.replicaSetPodsList=b.pods},function(b){a.a.error("Error fetching Replica Set pods: ",b)})}
u.prototype.K=function(a){return this.c.href("logs",new t(this.namespace,this.replicaSetName,a))};u.prototype.getLogsHref=u.prototype.K;u.prototype.fa=function(a){return void 0===a.podContainers[0].name?!1:!0};u.prototype.podContainerExists=u.prototype.fa;u.prototype.ga=function(a){return a?0<a.totalRestartCount:!1};u.prototype.podContainersRestarted=u.prototype.ga;u.$inject=["$state","$log","$resource"];function v(a,b){this.namespace=a;this.replicaSet=b};function w(a){this.a=a}w.prototype.M=function(){return this.a.href("replicasetdetail",new v(this.replicaSet.namespace,this.replicaSet.name))};w.prototype.getReplicaSetDetailHref=w.prototype.M;w.$inject=["$state"];function x(a,b,c){this.b=a;this.c=b;this.a=c}x.prototype.u=function(a,b){a(b)};x.prototype.openMenu=x.prototype.u;x.prototype.la=function(){this.b.go("replicasetdetail",new v(this.replicaSet.namespace,this.replicaSet.name))};x.prototype.viewDetails=x.prototype.la;x.prototype.j=function(){var a=this;this.a.j(this.replicaSet.namespace,this.replicaSet.name).then(function(){return a.b.reload()},function(){return a.c.error("Error deleting replica set")})};x.prototype.showDeleteDialog=x.prototype.j;
x.prototype.l=function(){this.a.l(this.replicaSet.namespace,this.replicaSet.name,this.replicaSet.pods.current,this.replicaSet.pods.desired)};x.prototype.showUpdateReplicasDialog=x.prototype.l;x.$inject=["$state","$log","kdReplicaSetService"];function y(a,b){this.replicaSets=b.replicaSets;this.a=a}y.prototype.ha=function(){this.a.go("deploy")};y.prototype.redirectToDeployPage=y.prototype.ha;y.$inject=["$state","replicaSets"];function da(){this.learnMoreLinks=[{title:"Dashboard Tour",link:"#"},{title:"Deploying your App",link:"#"},{title:"Monitoring your App",link:"#"},{title:"Troubleshooting",link:"#"}]};function z(a){a.state("replicasets",{controller:y,controllerAs:"ctrl",url:"/replicasets",resolve:{replicaSets:B},templateUrl:"replicasetlist/replicasetlist.html",onEnter:C});a.state("replicasets.zero",{views:{"@":{controller:da,controllerAs:"ctrl",templateUrl:"replicasetlist/zerostate/zerostate.html"}},url:"/zerostate"})}z.$inject=["$stateProvider"];function C(a,b,c){0===c.replicaSets.length&&b(function(){a.go("replicasets.zero")})}C.$inject=["$state","$timeout","replicaSets"];
function B(a){return a("api/replicasets").get().$promise}B.$inject=["$resource"];function ea(a,b){var c=Array.prototype.map.call(a.children,function(a){return a.offsetHeight}),d=fa(b);return ga(c,d)}function fa(a){return a("gt-md")?3:a("md")?2:1}function ga(a,b){for(var c=0,d=0,e=Math.ceil(a.reduce(function(a,b){return a+b},0));;){var c=Math.floor((d+e)/2),k=m(ha(a,c-1,c)),f=k.next().value,k=k.next().value;if(f>b&&k<=b||d===e)break;else f>b?d=c+1:e=c}return c}
function ha(a,b,c){var d=0,e=0,k=!1,f=!1,p=0,A=0;a=m(a);for(var r=a.next();!r.done;r=a.next())r=r.value,r>b&&(k=!0),r>c&&(f=!0),e+r>b?(e=r,d+=1):e+=r,A+r>c?(A=r,p+=1):A+=r;0!==e&&(d+=1);0!==A&&(p+=1);k&&(d=Number.POSITIVE_INFINITY);f&&(p=Number.POSITIVE_INFINITY);return[d,p]};function D(a){return{scope:{},transclude:!0,link:function(b,c){var d=c[0].querySelector(".kd-replica-set-list-container");if(!d)throw Error("Required child element .kd-replica-set-list-container not found");b.$watch(function(){return ea(d,a)},function(a){d.style.height=a+"px"})},templateUrl:"replicasetlist/replicasetlistcontainer.html"}}D.$inject=["$mdMedia"];function E(){}E.prototype.G=function(){this.currentlySelectedOrder=this.currentlySelectedColumn===this.columnName?!this.currentlySelectedOrder:!1;this.currentlySelectedColumn=this.columnName};E.prototype.changeSorting=E.prototype.G;E.prototype.T=function(){return this.currentlySelectedColumn===this.columnName&&!1===this.currentlySelectedOrder};E.prototype.isArrowUp=E.prototype.T;E.prototype.S=function(){return this.currentlySelectedColumn===this.columnName&&!0===this.currentlySelectedOrder};
E.prototype.isArrowDown=E.prototype.S;E.prototype.$=function(){return void 0!==this.tooltip&&0<this.tooltip.length};E.prototype.isTooltipAvailable=E.prototype.$;function F(a,b,c,d,e,k,f,p){this.replicaSetDetail=k;this.replicaSetEvents=f;this.events=f.events;this.eventTypeFilter=["All","Warning"];this.eventType="All";this.eventSourceFilter=["All","User","System"];this.eventSource="All";this.a=b;this.f=c;this.c=e;this.b=p;this.sortPodsBy="name";this.podsOrder=!1;this.sortEventsBy="lastSeen";this.eventsOrder=!0}F.prototype.W=function(a){return"Warning"===a.type};F.prototype.isEventWarning=F.prototype.W;
F.prototype.O=function(){this.events=this.A(this.replicaSetEvents.events,this.eventType);this.events=this.w(this.events)};F.prototype.handleEventFiltering=F.prototype.O;F.prototype.L=function(a){return this.f.href("logs",new t(this.a.namespace,this.a.replicaSet,a.name))};F.prototype.getPodLogsHref=F.prototype.L;F.prototype.A=function(a,b){return"Warning"===b?a.filter(function(a){return"Warning"===a.type}):a};F.prototype.filterByType=F.prototype.A;F.prototype.w=function(a){return a};
F.prototype.filterBySource=F.prototype.w;F.prototype.R=function(){this.b.l(this.replicaSetDetail.namespace,this.replicaSetDetail.name,this.replicaSetDetail.podInfo.current,this.replicaSetDetail.podInfo.desired)};F.prototype.handleUpdateReplicasDialog=F.prototype.R;F.prototype.N=function(){this.b.j(this.a.namespace,this.a.replicaSet).then(this.h.bind(this),this.g.bind(this))};F.prototype.handleDeleteReplicaSetDialog=F.prototype.N;
F.prototype.h=function(){this.c.info("Replica set successfully deleted.");this.f.go("replicasets")};F.prototype.g=function(a){this.c.error(a)};F.$inject="$mdDialog $stateParams $state $resource $log replicaSetDetail replicaSetEvents kdReplicaSetService".split(" ");function G(a){a.state("replicasetdetail",{controller:F,controllerAs:"ctrl",url:"/replicasets/:namespace/:replicaSet",templateUrl:"replicasetdetail/replicasetdetail.html",resolve:{replicaSetSpecPodsResource:H,replicaSetDetailResource:I,replicaSetDetail:J,replicaSetEvents:K}})}G.$inject=["$stateProvider"];function I(a,b){return b("api/replicasets/"+a.namespace+"/"+a.replicaSet)}I.$inject=["$stateParams","$resource"];
function H(a,b){return b("api/replicasets/"+a.namespace+"/"+a.replicaSet+"/update/pods")}H.$inject=["$stateParams","$resource"];function J(a){return a.get().$promise}J.$inject=["replicaSetDetailResource"];function K(a,b){return b("api/events/"+a.namespace+"/"+a.replicaSet).get().$promise}K.$inject=["$stateParams","$resource"];function L(a,b,c,d,e,k,f,p,A){this.currentPods=p;this.desiredPods=A;this.replicaSet=f;this.c=k;this.a=a;this.b=b;this.g=c;this.f=d}L.prototype.ka=function(){H(new v(this.c,this.replicaSet),this.f).save({replicas:this.replicas},this.o.bind(this),this.h.bind(this))};L.prototype.updateReplicas=L.prototype.ka;L.prototype.cancel=function(){this.a.cancel()};L.prototype.cancel=L.prototype.cancel;L.prototype.o=function(a){this.b.info("Successfully updated replicas number to "+a.replicas);this.a.hide();this.g.reload()};
L.prototype.h=function(a){this.b.error(a);this.a.hide()};L.$inject="$mdDialog $log $state $resource $q namespace replicaSet currentPods desiredPods".split(" ");function M(a,b,c){this.a=a;this.c=b;this.b=c}M.prototype.j=function(a,b){var c=I(new v(a,b),this.c),d=this.b.defer();this.a.show(this.a.confirm().title("Delete Replica Set").textContent("Delete replica set "+b+" in namespace "+a+". Pods managed by the replica set will be also deleted. Are you sure?").ok("Ok").cancel("Cancel")).then(function(){c.remove(d.resolve,d.reject)});return d.promise};
M.prototype.l=function(a,b,c,d){return this.a.show({controller:L,controllerAs:"ctrl",clickOutsideToClose:!0,templateUrl:"replicasetdetail/updatereplicas.html",locals:{namespace:a,replicaSet:b,currentPods:c,desiredPods:d}})};M.$inject=["$mdDialog","$resource","$q"];function N(a,b){this.logsSet=a.logs;this.a=b}N.prototype.i=function(){return this.a.a};N.prototype.isTextColorInverted=N.prototype.i;N.prototype.m=function(){return this.i()?"kd-logs-text-color-invert":"kd-logs-text-color"};N.prototype.getStyleClass=N.prototype.m;N.$inject=["podLogs","logsColorInversionService"];function O(a,b,c,d,e){this.c=a;this.a=e;this.pods=c.pods;this.pod=ia(this.pods,b.podId);this.containers=this.pod.podContainers;this.container=ja(this.containers,d.container);this.podCreationTime=this.pod.startTime;this.b=b.namespace;this.f=b.replicaSet}O.prototype.i=function(){return this.a.a};O.prototype.isTextColorInverted=O.prototype.i;O.prototype.da=function(a){return this.c.transitionTo("logs",new t(this.b,this.f,a,this.container.name))};O.prototype.onPodChange=O.prototype.da;
O.prototype.ca=function(a){return this.c.transitionTo("logs",new t(this.b,this.f,this.pod.name,a))};O.prototype.onContainerChange=O.prototype.ca;O.prototype.m=function(){return this.i()?"kd-logs-color-icon-invert":"kd-logs-color-icon"};O.prototype.getStyleClass=O.prototype.m;O.prototype.ea=function(){var a=this.a;a.a=!a.a};O.prototype.onTextColorChange=O.prototype.ea;function ia(a,b){return a.find(function(a){return a.name===b})}
function ja(a,b){var c=a.find(function(a){return a.name===b});c||(c=a[0]);return c}O.$inject=["$state","$stateParams","replicaSetPods","podLogs","logsColorInversionService"];function P(a){var b={},b=(b[""]={templateUrl:"logs/logs.html",controller:N,controllerAs:"ctrl"},b.toolbar={templateUrl:"logs/logstoolbar/logstoolbar.html",controller:O,controllerAs:"ctrl"},b);a.state("logs",{url:"/logs/:namespace/:replicaSet/:podId/:container?",resolve:{replicaSetPods:ka,podLogs:la},views:b})}P.$inject=["$stateProvider"];function ka(a,b){return b("api/replicasets/pods/"+a.namespace+"/"+a.replicaSet).get().$promise}ka.$inject=["$stateParams","$resource"];
function la(a,b){return b("api/logs/"+a.namespace+"/"+a.podId+"/"+a.container).get().$promise}la.$inject=["$stateParams","$resource"];var ma=angular.module("kubernetesDashboard.logs",["ngResource","ui.router"]).service("logsColorInversionService",function(){this.a=!1}).config(P);function na(){};var oa=angular.module("kubernetesDashboard.common.components",["ngMaterial"]).directive("kdLabels",function(){return{controller:na,controllerAs:"labelsCtrl",templateUrl:"common/components/labels/labels.html",scope:{},bindToController:{labels:"="}}});var pa=["a second","seconds"],qa=["a minute","minutes"],ra=["an hour","hours"],sa=["a day","days"],ta=["a month","months"],ua=["a year","years"];function Q(a,b){return 1<a?a+" "+b[1]:b[0]};var va=angular.module("kubernetesDashboard.common.filters",["ngMaterial"]).filter("middleEllipsis",function(){return function(a,b){b=parseInt(b,10);return!b||!a||a.length<=b?a:1===b?a[0]+"...":a.substring(0,Math.floor(b/2+b%2))+"..."+a.slice(-Math.floor(b/2))}}).filter("relativeTime",function(){return function(a){a=(new Date).getTime()-(new Date(a)).getTime();var b=Math.floor(a/1E3),c=Math.floor(b/60),d=Math.floor(c/60),e=Math.floor(d/24),k=Math.floor(e/30),f=Math.floor(e/365);return 0>a?"didn't happen yet":
1>b?"just now":1>c?Q(b,pa):1>d?Q(c,qa):1>e?Q(d,ra):1>k?Q(e,sa):1>f?Q(k,ta):Q(f,ua)}});var wa=angular.module("kubernetesDashboard.replicaSetDetail",["ngMaterial","ngResource","ui.router",oa.name,va.name,ma.name]).config(G).directive("kdServiceEndpoint",function(){return{templateUrl:"replicasetdetail/serviceendpoint.html",scope:{endpoint:"="}}}).directive("kdSortedHeader",function(){return{controller:E,controllerAs:"sortCtrl",templateUrl:"replicasetdetail/sortedheader.html",scope:{},bindToController:{columnName:"@",tooltip:"@",currentlySelectedColumn:"=",currentlySelectedOrder:"="},
transclude:!0}}).service("kdReplicaSetService",M);var xa=angular.module("kubernetesDashboard.replicaSetList",["ngMaterial","ngResource","ui.router",wa.name,va.name,oa.name]).config(z).directive("logsMenu",function(){return{scope:{},bindToController:{namespace:"=",replicaSetName:"="},controller:u,controllerAs:"ctrl",templateUrl:"replicasetlist/logsmenu.html"}}).directive("kdReplicaSetListContainer",D).directive("kdReplicaSetCard",function(){return{scope:{},bindToController:{replicaSet:"="},controller:w,controllerAs:"ctrl",templateUrl:"replicasetlist/replicasetcard.html"}}).directive("kdReplicaSetCardMenu",
function(){return{scope:{},bindToController:{replicaSet:"="},controller:x,controllerAs:"ctrl",templateUrl:"replicasetlist/replicasetcardmenu.html"}});function R(){this.portMappings=[{port:null,targetPort:null,protocol:this.protocols[0]}]}R.prototype.D=function(){var a=this.portMappings[this.portMappings.length-1];a.port&&a.targetPort&&this.portMappings.push({port:null,targetPort:null,protocol:this.protocols[0]})};R.prototype.addProtocolIfNeeed=R.prototype.D;R.prototype.s=function(a){return a!==this.portMappings.length-1};R.prototype.isRemovable=R.prototype.s;R.prototype.remove=function(a){this.portMappings.splice(a,1)};R.prototype.remove=R.prototype.remove;function S(a,b,c,d,e){this.namespaces=d.namespaces;this.protocols=e.protocols;this.selection="Settings";this.b=c;this.a=!1}S.prototype.J=function(){if(this.deployForm.$valid){var a=this;this.a=!0;this.detail.v()["finally"](function(){a.a=!1})}};S.prototype.deployBySelection=S.prototype.J;S.prototype.U=function(){return this.a||!this.detail};S.prototype.isDeployDisabled=S.prototype.U;S.prototype.cancel=function(){this.b.go("replicasets")};S.prototype.cancel=S.prototype.cancel;
S.$inject=["$resource","$log","$state","namespaces","protocols"];function ya(a){a.state("deploy",{controller:S,controllerAs:"ctrl",url:"/deploy",resolve:{namespaces:za,protocolsResource:Aa,protocols:Ba},templateUrl:"deploy/deploy.html"})}ya.$inject=["$stateProvider"];function za(a){return a("api/namespaces").get().$promise}za.$inject=["$resource"];function Aa(a){return a("api/appdeployments/protocols")}Aa.$inject=["$resource"];function Ba(a){return a.get().$promise}Ba.$inject=["protocolsResource"];function Ca(a){return{restrict:"A",require:["^kdUpload","ngModel"],link:function(b,c,d,e){e[0].B(function(){return c[0].click()});c.bind("change",function(b){var c=b.target.files[0];if(c){var d=new FileReader;d.onload=function(){e[1].$setViewValue({name:c.name,content:d.result})};d.onerror=function(b){return a.error("Error reading file:",b)};d.readAsBinaryString(c)}else a.error("Error invalid file: ",c)})}}}Ca.$inject=["$log"];function Da(a,b){var c={};return{restrict:"A",require:"ngModel",scope:(c.namespace="=",c),link:function(c,e,k,f){c.$watch("namespace",function(){f.$validate()});f.$asyncValidators.uniqueName=function(e){return Ea(e,c.namespace,a,b)}}}}Da.$inject=["$resource","$q"];function Ea(a,b,c,d){var e=d.defer();c("api/appdeployments/validate/name").save({name:a,namespace:b},function(a){!0===a.valid?e.resolve():e.reject()},function(){e.reject()});return e.promise};function T(a,b,c,d,e){this.a=a;this.b=b;this.c=c;this.f=d;this.namespaces=e;this.namespace="";this.namespaceMaxLength=63;this.namespacePattern=/^[a-z0-9]([-a-z0-9]*[a-z0-9])?$/}T.prototype.V=function(){return 0<=this.namespaces.indexOf(this.namespace)};T.prototype.isDisabled=T.prototype.V;T.prototype.cancel=function(){this.a.cancel()};T.prototype.cancel=T.prototype.cancel;
T.prototype.H=function(){var a=this;if(this.namespaceForm.$valid){var b={name:this.namespace};this.c("api/namespaces").save(b,function(b){a.b.info("Successfully created namespace:",b);a.a.hide(a.namespace)},function(b){a.a.hide();a.f.open("Error creating namespace");a.b.info("Error creating namespace:",b)})}};T.prototype.createNamespace=T.prototype.H;T.$inject=["$mdDialog","$log","$resource","errorDialog","namespaces"];function U(a,b,c,d){this.editable=void 0===c?!0:c;this.key=void 0===a?"":a;this.b=void 0===b?"":b;this.a=d}U.prototype.value=function(a){if(void 0!==this.a){if(void 0!==a)throw Error("Can not set value of derived label.");return this.a(this.key)}return void 0!==a?this.b=a:this.b};U.prototype.value=U.prototype.value;U.prototype.C=function(){return{key:this.key,value:this.value()}};U.prototype.toBackendApi=U.prototype.C;function V(a,b,c,d,e){this.detail=this;this.a=!1;this.containerCommandArgs=this.containerCommand=this.containerImage="";this.replicas=1;this.description="";this.isExternal=!1;this.labels=[new U("app","",!1,this.ba.bind(this)),new U("version","",!1,this.aa.bind(this)),new U];this.name="";this.runAsPrivileged=!1;this.namespace=this.namespaces[0];this.memoryRequirement=this.cpuRequirement=null;this.f=d;this.g=c;this.b=a;this.h=b;this.c=e}
V.prototype.v=function(){var a=this,b={containerImage:this.containerImage,containerCommand:this.containerCommand?this.containerCommand:null,containerCommandArgs:this.containerCommandArgs?this.containerCommandArgs:null,isExternal:this.isExternal,name:this.name,description:this.description?this.description:null,portMappings:this.portMappings.filter(this.o),replicas:this.replicas,namespace:this.namespace,cpuRequirement:angular.isNumber(this.cpuRequirement)?this.cpuRequirement:null,memoryRequirement:angular.isNumber(this.memoryRequirement)?
this.memoryRequirement+"Mi":null,labels:Fa(this.labels),runAsPrivileged:this.runAsPrivileged},c=this.f.defer();this.g("api/appdeployments").save(b,function(b){c.resolve(b);a.b.info("Successfully deployed application: ",b);a.h.go("replicasets")},function(b){c.reject(b);a.b.error("Error deploying application:",b)});return c.promise};V.prototype.deploy=V.prototype.v;
V.prototype.P=function(a){var b=this;this.c.show({controller:T,controllerAs:"ctrl",clickOutsideToClose:!0,targetEvent:a,templateUrl:"deploy/createnamespace.html",locals:{namespaces:this.namespaces}}).then(function(a){a?(b.namespace=a,b.namespaces=b.namespaces.concat(a)):b.namespace=b.namespaces[0]},function(){b.namespace=b.namespaces[0]})};V.prototype.handleNamespaceDialog=V.prototype.P;V.prototype.Z=function(){var a=this.form.name;return a.$error.uniqueName||a.$invalid&&(a.$touched||this.form.$submitted)};
V.prototype.isNameError=V.prototype.Z;function Fa(a){return a.filter(function(a){return 0!==a.key.length&&0!==a.value().length}).map(function(a){return a.C()})}V.prototype.o=function(a){return!!a.port&&!!a.targetPort};V.prototype.aa=function(){var a=(this.containerImage||"").lastIndexOf(":");return-1<a?this.containerImage.substring(a+1):""};V.prototype.ba=function(){return this.name};V.prototype.Y=function(){return this.a};V.prototype.isMoreOptionsEnabled=V.prototype.Y;
V.prototype.ja=function(){this.detail.a=!this.detail.a};V.prototype.switchMoreOptions=V.prototype.ja;V.$inject=["$log","$state","$resource","$q","$mdDialog"];function W(){this.b=!1}W.prototype.B=function(a){this.b||(this.a=a,this.b=!0)};W.prototype.registerBrowseFileFunction=W.prototype.B;W.prototype.F=function(){this.a&&this.a()};W.prototype.browseFile=W.prototype.F;W.prototype.X=function(){var a=this.form.fileName;return this.form.$submitted&&a.$invalid};W.prototype.isFileNameError=W.prototype.X;function Ga(a,b){var c={};return{restrict:"A",require:"ngModel",scope:(c.isExternal="=",c),link:function(c,e,k,f){var p=!1;c.$watch("isExternal",function(a,b){p=a!==b;f.$validate()});f.$asyncValidators.validProtocol=function(e){return Ha(f,p,e,c.isExternal,a,b)}}}}Ga.$inject=["$resource","$q"];
function Ha(a,b,c,d,e,k){var f=k.defer();if(!a.$touched&&!b)return f.resolve(),f.promise;e("api/appdeployments/validate/protocol").save({protocol:c,isExternal:d},function(a){!0===a.valid?f.resolve():f.reject()},function(){f.reject()});return f.promise};var Ia=angular.module("kubernetesDashboard.helpsection",[]).directive("kdHelpSection",function(){return{scope:{},templateUrl:"deploy/helpsection/helpsection.html",transclude:!0}}).directive("kdUserHelp",function(){return{scope:{},templateUrl:"deploy/helpsection/userhelp.html",transclude:!0}});function X(a){this.a=a}X.prototype.open=function(a){var b=this.a.alert();b.title(a);b.ok("Close");this.a.show(b)};X.prototype.open=X.prototype.open;X.$inject=["$mdDialog"];var Ja=angular.module("kubernetesDashboard.errorhandling",["ngMaterial"]).service("errorDialog",X);function Y(){}Y.prototype.check=function(a){var b=this.labels[this.labels.length-1];0!==b.key.length&&0!==b.value().length&&this.labels.push(new U);angular.isDefined(a)&&(a=a.key,b=!Ka(this),a.$setValidity("unique",b))};Y.prototype.check=Y.prototype.check;Y.prototype.s=function(){var a=this.labels[this.labels.length-1];return!(!this.label.editable||this.label===a)};Y.prototype.isRemovable=Y.prototype.s;Y.prototype.I=function(){var a=this.labels.indexOf(this.label);-1<a&&this.labels.splice(a,1)};
Y.prototype.deleteLabel=Y.prototype.I;function Ka(a){var b=0;a.labels.forEach(function(c){0!==a.label.key.length&&c.key===a.label.key&&b++});return 1<b};function La(){this.detail=this;this.file={name:"",content:""}};var Ma=angular.module("kubernetesDashboard.deploy",["ngMaterial","ngResource","ui.router",Ia.name,Ja.name]).config(ya).directive("deployFromSettings",function(){return{scope:{},bindToController:{name:"=",namespaces:"=",detail:"=",form:"=",protocols:"="},controller:V,controllerAs:"ctrl",templateUrl:"deploy/deployfromsettings.html"}}).directive("deployFromFile",function(){return{scope:{},bindToController:{detail:"=",form:"="},controller:La,controllerAs:"ctrl",template:'<kd-upload file="ctrl.file" form="ctrl.form"></kd-upload>'}}).directive("kdUniqueName",
Da).directive("kdValidProtocol",Ga).directive("kdFileReader",Ca).directive("kdUpload",function(){return{scope:{},bindToController:{file:"=",form:"="},controller:W,controllerAs:"ctrl",templateUrl:"deploy/upload.html"}}).directive("kdPortMappings",function(){return{controller:R,controllerAs:"ctrl",templateUrl:"deploy/portmappings.html",scope:{},bindToController:{portMappings:"=",protocols:"=",isExternal:"="}}}).directive("kdDeployLabel",function(){return{controller:Y,controllerAs:"labelCtrl",templateUrl:"deploy/deploylabel.html",
scope:{},bindToController:{label:"=",labels:"="}}});function Na(){this.showLoadingSpinner=!0}function Oa(a,b){b.$on("$stateChangeStart",function(){a.showLoadingSpinner=!0});b.$on("$stateChangeError",a.a.bind(a));b.$on("$stateChangeSuccess",a.a.bind(a))}Na.prototype.a=function(){this.showLoadingSpinner=!1};var Pa=angular.module("kubernetesDashboard.chrome",["ngMaterial","ui.router"]).directive("chrome",function(){return{scope:{},bindToController:{},controller:Na,controllerAs:"ctrl",templateUrl:"chrome/chrome.html",transclude:!0,link:function(a,b,c,d){Oa(d,a)}}});function Z(a){this.error=a.error}Z.prototype.ia=function(){return angular.isNumber(this.error.status)&&0<this.error.status};Z.prototype.showStatus=Z.prototype.ia;Z.$inject=["$stateParams"];function Qa(a){this.error=a};function Ra(a){a.state("internalerror",{controller:Z,controllerAs:"ctrl",params:new Qa({}),templateUrl:"error/internalerror.html"})}Ra.$inject=["$stateProvider"];var Ta=angular.module("kubernetesDashboard.error",["ui.router"]).config(Ra).run(Sa);function Sa(a,b){var c=a.$on("$stateChangeError",function(a,c,k,f,p,A){a.preventDefault();b.go("internalerror",new Qa(A))});a.$on("$destroy",c)}Sa.$inject=["$rootScope","$state"];angular.module("kubernetesDashboard",["ngAnimate","ngAria","ngMaterial","ngMessages","ngResource","ngSanitize","ui.router",Pa.name,Ma.name,Ta.name,ma.name,wa.name,xa.name]).config(n).config(q);angular.module("kubernetesDashboard").run(["$templateCache",function(a){a.put("chrome/chrome.html",' <md-content class="kd-content"> <md-toolbar class="kd-toolbar"> <div class="md-toolbar-tools kd-toolbar-tools"> <a ui-sref="replicasets" ui-sref-opts="{ reload: true }"> <md-icon md-svg-icon="assets/images/kubernetes-logo.svg" class="kd-toolbar-logo"></md-icon> </a> <h2> <span>kubernetes</span> </h2> <div flex ui-view="toolbar"></div> </div> </md-toolbar> <div class="kd-app-content-wrapper" ng-switch="ctrl.showLoadingSpinner"> <div ng-switch-when="true" class="kd-center-fixed"> <md-progress-circular md-mode="indeterminate" md-diameter="96"> </md-progress-circular> </div> <div ng-switch-when="false" ng-transclude class="kd-app-content"></div> </div> </md-content>');
a.put("deploy/createnamespace.html",' <md-dialog aria-label="Create a new namespace" layout="column" layout-padding> <md-content layout-padding> <h4 class="md-title">Create a new namespace</h4> <p>The new namespace will be added to the cluster.</p> <form name="ctrl.namespaceForm" ng-submit="ctrl.createNamespace()" novalidate> <md-input-container class="md-block"> <label>Namespace name</label> <input name="namespace" ng-model="ctrl.namespace" md-maxlength="{{ctrl.namespaceMaxLength}}" ng-pattern="ctrl.namespacePattern" required> <div ng-messages="ctrl.namespaceForm.namespace.$error"> <div ng-message="pattern">Name must be alphanumeric and may contain dashes</div> <div ng-message="md-maxlength">Name is too long</div> <div ng-message="required">Name is required</div> </div> </md-input-container> <md-dialog-actions layout="row"> <md-button ng-disabled="ctrl.isDisabled()" class="md-primary" type="submit">OK</md-button> <md-button ng-click="ctrl.cancel()">Cancel</md-button> </md-dialog-actions> </form> </md-content> </md-dialog>');
a.put("deploy/deploy.html",' <div layout="column" layout-padding layout-align="center center"> <md-whiteframe class="kd-deploy-whiteframe md-whiteframe-5dp" flex flex-gt-md> <h3 class="md-headline">Deploy a Containerized App</h3> <form name="ctrl.deployForm" ng-submit="ctrl.deployBySelection()" novalidate> <kd-help-section> <md-radio-group ng-model="ctrl.selection"> <md-radio-button value="Settings" class="md-primary"> Specify app details below </md-radio-button> <md-radio-button value="File" class="md-primary"> Upload a YAML or JSON file </md-radio-button> </md-radio-group> </kd-help-section> <div ng-switch="ctrl.selection"> <deploy-from-settings ng-switch-when="Settings" name="ctrl.name" namespaces="ctrl.namespaces" detail="ctrl.detail" form="ctrl.deployForm" protocols="ctrl.protocols"> </deploy-from-settings> <deploy-from-file ng-switch-when="File" name="ctrl.name" detail="ctrl.detail" form="ctrl.deployForm"> </deploy-from-file> </div> <md-button class="md-raised md-primary" type="submit" ng-disabled="ctrl.isDeployDisabled()"> Deploy </md-button> <md-button class="md-raised" ng-click="ctrl.cancel()">Cancel</md-button> </form> </md-whiteframe> </div>');
a.put("deploy/deployfromsettings.html",' <kd-help-section> <md-input-container class="md-block" md-is-error="ctrl.isNameError()"> <label>App name</label> <input ng-model="ctrl.name" name="name" namespace="ctrl.namespace" required kd-unique-name ng-model-options="{ updateOn: \'default blur\', debounce: { \'default\': 500, \'blur\': 0 } }"> <md-progress-linear class="kd-deploy-form-progress" md-mode="indeterminate" ng-show="ctrl.form.name.$pending"> </md-progress-linear> <ng-messages for="ctrl.form.name.$error" role="alert" multiple="multiple"> <ng-message when="required">Application name is required.</ng-message> <ng-message when="uniqueName"> Application with this name already exists within namespace <i>{{ctrl.namespace}}</i>. </ng-message> </ng-messages> </md-input-container> <kd-user-help> An \'app\' label with this value will be added to the Replica Set and Service that get deployed. </kd-user-help> </kd-help-section> <kd-help-section> <md-input-container class="md-block"> <label>Container image</label> <input ng-model="ctrl.containerImage" name="containerImage" required> <ng-messages for="ctrl.form.containerImage.$error" role="alert" multiple="multiple"> <ng-message when="required">Container image is required.</ng-message> </ng-messages> </md-input-container> <kd-user-help> Enter the URL of a public image on any registry, or a private image hosted on Docker Hub or Google Container Registry. <a href="">Learn more</a> </kd-user-help> </kd-help-section> <kd-help-section> <md-input-container class="md-block"> <label>Number of pods</label> <input ng-model="ctrl.replicas" type="number" required min="1" name="replicas"> <ng-messages for="ctrl.form.replicas.$error" role="alert" multiple="multiple"> <ng-message when="number">Number of pods must be a positive integer.</ng-message> <ng-message when="min">Number of pods must be positive.</ng-message> </ng-messages> </md-input-container> <kd-user-help> A Replica Set will be created to maintain the desired number of pods across your cluster. <a href="">Learn more</a> </kd-user-help> </kd-help-section> <kd-help-section> <kd-port-mappings port-mappings="ctrl.portMappings" protocols="ctrl.protocols" is-external="ctrl.isExternal"> </kd-port-mappings> <kd-user-help> Ports are optional. If specified, a Service will be created mapping the Port (incoming) to a target Port seen by the container. <span ng-if="ctrl.name"> The internal DNS name for this Service will be: <b>{{ctrl.name}}</b>. </span> <a href="">Learn more</a> </kd-user-help> </kd-help-section> <kd-help-section> <md-switch ng-model="ctrl.isExternal" class="md-primary" ng-model-options="{ debounce: { \'default\': 500, \'blur\': 0 } }"> Expose service externally </md-switch> </kd-help-section> <div ng-show="ctrl.isMoreOptionsEnabled()"> <kd-help-section> <md-input-container> <label>Description</label> <textarea ng-model="ctrl.description"></textarea> </md-input-container> <kd-user-help> The description will be added as an annotation to the Replica Set and displayed in the application\'s details. </kd-user-help> </kd-help-section> <kd-help-section> <div> <div>Labels</div> <div layout="column"> <div layout="row"> <p flex>Key</p> <p flex>Value</p> </div> <div ng-repeat="label in ctrl.labels"> <kd-deploy-label layout="row" flex label="label" labels="ctrl.labels"></kd-deploy-label> </div> </div> </div> <kd-user-help> The specified labels will be applied to the created Replica Set, Service (if any) and Pods. Common labels include release, environment, tier, partition and track. <a href="">Learn more</a> </kd-user-help> </kd-help-section> <kd-help-section> <md-input-container class="md-block"> <label>Namespace</label> <md-select ng-model="ctrl.namespace" required> <md-option ng-repeat="namespace in ctrl.namespaces" ng-value="namespace"> {{namespace}} </md-option> <md-option ng-click="ctrl.handleNamespaceDialog($event)"> Create a new namespace... </md-option> </md-select> </md-input-container> <kd-user-help> Namespaces let you partition resources into logically named groups. <a href="">Learn more</a> </kd-user-help> </kd-help-section> <kd-help-section> <div layout="row"> <md-input-container flex> <label>CPU requirement (cores)</label> <input ng-model="ctrl.cpuRequirement" type="number" name="cpuRequirement" min="0"> <ng-messages for="ctrl.form.cpuRequirement.$error" role="alert" multiple="multiple"> <ng-message when="number">CPU requirement must be a valid number.</ng-message> <ng-message when="min">CPU requirement must be positive.</ng-message> </ng-messages> </md-input-container> <md-input-container flex> <label>Memory requirement (MiB)</label> <input ng-model="ctrl.memoryRequirement" type="number" name="memoryRequirement" min="0"> <ng-messages for="ctrl.form.memoryRequirement.$error" role="alert" multiple="multiple"> <ng-message when="number">Memory requirement must be a valid number.</ng-message> <ng-message when="min">Memory requirement must be positive.</ng-message> </ng-messages> </md-input-container> </div> <kd-user-help> You can specify minimum CPU and memory requirements for the container. <a href="">Learn more</a> </kd-user-help> </kd-help-section> <kd-help-section> <div> <md-input-container class="md-block"> <label>Run command</label> <input ng-model="ctrl.containerCommand"> </md-input-container> <md-input-container class="md-block"> <label>Run command arguments</label> <input ng-model="ctrl.containerCommandArgs"> </md-input-container> </div> <kd-user-help> By default, your containers run the selected image\'s default entrypoint command. You can use the command options to override the default. <a href="">Learn more</a> </kd-user-help> </kd-help-section> <kd-help-section> <md-switch ng-model="ctrl.runAsPrivileged" class="md-primary"> Run as privileged </md-switch> <kd-user-help> Processes in privileged containers are equivalent to be running as root on the host. </kd-user-help> </kd-help-section> </div> <md-button class="md-primary kd-deploy-moreoptions-button" type="button" ng-click="ctrl.switchMoreOptions()" ng-hide="ctrl.isMoreOptionsEnabled()"> <md-icon>arrow_drop_down</md-icon>More options </md-button> <md-button class="md-primary kd-deploy-moreoptions-button" type="button" ng-click="ctrl.switchMoreOptions()" ng-show="ctrl.isMoreOptionsEnabled()"> <md-icon>arrow_drop_up</md-icon>Less options </md-button>');
a.put("deploy/deploylabel.html",' <ng-form layout="row" flex name="labelForm"> <md-input-container md-no-float class="kd-deploy-input-row" flex="45"> <input name="key" ng-model="labelCtrl.label.key" ng-change="labelCtrl.check(labelForm)" placeholder="{{labelCtrl.label.key}}" ng-disabled="!labelCtrl.label.editable"> <ng-messages for="labelForm.key.$error" ng-if="labelForm.key.$invalid"> <ng-message when="unique">{{labelCtrl.label.key}} is not unique.</ng-message> </ng-messages> </md-input-container> <p flex="5"></p> <md-input-container md-no-float class="kd-deploy-input-row" flex="40"> <input ng-model="labelCtrl.label.value" ng-change="labelCtrl.check()" placeholder="{{labelCtrl.label.value}}" ng-disabled="!labelCtrl.label.editable" ng-model-options="{ getterSetter: true }"> <ng-messages ng-if="labelForm.key.$error.unique"></ng-messages> </md-input-container> <md-button type="button" ng-show="labelCtrl.isRemovable()" ng-click="labelCtrl.deleteLabel()" class="material-icons md-icon-button">delete </md-button> </ng-form>');
a.put("deploy/portmappings.html",' <div ng-repeat="portMapping in ctrl.portMappings"> <ng-form name="portMappingForm" layout="row"> <md-input-container flex class="kd-deploy-input-row"> <label>Port</label> <input ng-model="portMapping.port" ng-change="ctrl.addProtocolIfNeeed()" type="number" min="0" name="port"> <ng-messages for="portMappingForm.port.$error" role="alert" multiple="multiple"> <ng-message when="number">Port must be an integer.</ng-message> <ng-message when="min">Port must be non-negative.</ng-message> </ng-messages> </md-input-container> <md-input-container flex class="kd-deploy-input-row"> <label>Target port</label> <input ng-model="portMapping.targetPort" ng-change="ctrl.addProtocolIfNeeed()" type="number" min="0" name="targetPort"> <ng-messages for="portMappingForm.targetPort.$error" role="alert" multiple="multiple"> <ng-message when="number">Target port must be an integer.</ng-message> <ng-message when="min">Target port must be non-negative.</ng-message> </ng-messages> </md-input-container> <md-input-container flex="none" class="kd-deploy-input-row"> <label>Protocol</label> <md-select ng-model="portMapping.protocol" name="protocol" is-external="ctrl.isExternal" required kd-valid-protocol> <md-option ng-repeat="protocol in ctrl.protocols" ng-value="protocol"> {{protocol}} </md-option> </md-select> <md-progress-linear class="kd-deploy-form-progress" md-mode="indeterminate" ng-show="portMappingForm.protocol.$pending"> </md-progress-linear> <ng-messages for="portMappingForm.protocol.$error" role="alert" multiple="multiple"> <ng-message when="required">Protocol is required.</ng-message> <ng-message when="validProtocol">Invalid protocol.</ng-message> </ng-messages></md-input-container> <div flex="10"> <md-button type="button" ng-if="ctrl.isRemovable($index)" ng-click="ctrl.remove($index)" class="material-icons md-icon-button"> delete </md-button> </div> </ng-form> </div>');
a.put("deploy/upload.html",' <kd-help-section> <div layout="row" layout-align="space-between start"> <div flex> <md-input-container class="md-block" md-is-error="ctrl.isFileNameError()"> <label>YAML or JSON file</label> <input ng-model="ctrl.file.name" ng-focus="ctrl.browseFile()" ng-readonly="true" name="fileName" required> <ng-messages for="ctrl.form.fileName.$error" role="alert" multiple="multiple"> <ng-message when="required">File is required.</ng-message> </ng-messages> </md-input-container> </div> <md-button type="button" class="md-raised kd-upload-button" ng-click="ctrl.browseFile()"> <label class="kd-upload-label"> <md-icon> <i class="material-icons">more_horiz</i> </md-icon> </label> </md-button> <input type="file" style="display:none" kd-file-reader ng-model="ctrl.file"> </div> <kd-user-help> Select a YAML or JSON file, specifying the resources to deploy. <a href="">Learn more</a> </kd-user-help> </kd-help-section>');
a.put("error/internalerror.html",' <div class="kd-center-fixed"> <div layout="column" layout-align="center center"> <i flex class="material-icons kd-error-view-icon">error_outline</i> <div flex> <h2 class="md-headline"> <span ng-if="::ctrl.error.statusText"> {{ctrl.error.statusText}} </span> <span ng-if="::!ctrl.error.statusText"> Unknown Server Error </span> <span ng-if="::ctrl.showStatus()"> ({{ctrl.error.status}}) </span> </h2> <pre ng-if="::ctrl.error.data">{{ctrl.error.data}}</pre> </div> </div> </div>');
a.put("logs/logs.html",' <div layout="row" flex layout-fill> <md-content layout-padding flex layout-fill ng-class="ctrl.getStyleClass()"> <div ng-repeat="n in ctrl.logsSet" class="kd-logs-element"> <pre>{{n}}</pre> </div> </md-content> </div>');a.put("replicasetdetail/replicasetdetail.html",' <md-content layout="row" layout-fill flex> <div class="kd-replicasetdetail-sidebar" layout="column" flex="noshrink"> <div class="kd-replicasetdetail-sidebar-header-wrapper kd-replicasetdetail-sidebar-item" flex="nogrow"> <div class="kd-replicasetdetail-sidebar-header" layout-align="start center" layout="row"> <md-button class="md-icon-button" ui-sref="replicasets"> <md-icon md-font-library="material-icons">arrow_back</md-icon> </md-button> <h1 flex class="md-title kd-replicasetdetail-app-name"> {{::ctrl.replicaSetDetail.name}} </h1> </div> </div> <div flex layout="column" class="kd-replicasetdetail-sidebar-item"> <span class="kd-replicasetdetail-sidebar-title kd-replicasetdetail-sidebar-info"> Replica set </span> <div layout="row" flex="nogrow"> <md-button class="md-primary" ng-click="ctrl.handleDeleteReplicaSetDialog()"> <md-icon class="material-icons">delete</md-icon> DELETE </md-button> </div> <div flex layout="column" class="kd-replicasetdetail-sidebar-info"> <span class="kd-replicasetdetail-sidebar-line">Name</span> <span class="kd-replicasetdetail-sidebar-subline"> {{::ctrl.replicaSetDetail.name}} </span> <span class="kd-replicasetdetail-sidebar-line">Namespace</span> <span class="kd-replicasetdetail-sidebar-subline"> {{::ctrl.replicaSetDetail.namespace}} </span> <div layout="row" layout-align="start end"> <div flex="nogrow"> <span class="kd-replicasetdetail-sidebar-line">Pods</span> <span class="kd-replicasetdetail-sidebar-subline"> {{::ctrl.replicaSetDetail.podInfo.current}} created, {{::ctrl.replicaSetDetail.podInfo.desired}} desired </span> </div> <div flex="nogrow"> <md-button class="md-icon-button md-primary"> <md-icon class="material-icons" ng-click="ctrl.handleUpdateReplicasDialog()"> mode_edit </md-icon> </md-button> </div> </div> <span class="kd-replicasetdetail-sidebar-line">Pods status</span> <span class="kd-replicasetdetail-sidebar-subline"> <span ng-if="::ctrl.replicaSetDetail.podInfo.pending" class="kd-comma-separated-item"> {{::ctrl.replicaSetDetail.podInfo.pending}} pending</span> <span ng-if="::ctrl.replicaSetDetail.podInfo.failed" class="kd-comma-separated-item"> {{::ctrl.replicaSetDetail.podInfo.failed}} failed</span> <span ng-if="::ctrl.replicaSetDetail.podInfo.running" class="kd-comma-separated-item"> {{::ctrl.replicaSetDetail.podInfo.running}} running </span> </span> <span class="kd-replicasetdetail-sidebar-line">Label selector</span> <span class="kd-replicasetdetail-sidebar-subline kd-has-labels"> <kd-labels labels="::ctrl.replicaSetDetail.labelSelector"></kd-labels> </span> <span class="kd-replicasetdetail-sidebar-line">Labels</span> <span class="kd-replicasetdetail-sidebar-subline kd-has-labels"> <kd-labels labels="::ctrl.replicaSetDetail.labels"></kd-labels> </span> <span class="kd-replicasetdetail-sidebar-line">Images</span> <span class="kd-replicasetdetail-sidebar-subline" ng-repeat="image in ctrl.replicaSetDetail.containerImages"> {{image}} </span> <div ng-if="::ctrl.replicaSetDetail.services" layout="column"> <span class="kd-replicasetdetail-sidebar-title">Services</span> <div ng-repeat="service in ::ctrl.replicaSetDetail.services"> <span class="kd-replicasetdetail-sidebar-line">Name</span> <span class="kd-replicasetdetail-sidebar-subline"> {{::service.name}} </span> <span class="kd-replicasetdetail-sidebar-line">Label selector</span> <span class="kd-replicasetdetail-sidebar-subline kd-has-labels"> <kd-labels labels="::service.selector"></kd-labels> </span> <span class="kd-replicasetdetail-sidebar-line">Internal endpoint</span> <div class="kd-replicasetdetail-sidebar-subline"> <div ng-if="::service.internalEndpoint"> <kd-service-endpoint endpoint="::service.internalEndpoint"></kd-service-endpoint> </div> <span ng-hide="service.internalEndpoint">none</span> </div> <span class="kd-replicasetdetail-sidebar-line">External endpoint</span> <div class="kd-replicasetdetail-sidebar-subline"> <div ng-repeat="endpoint in service.externalEndpoints"> <kd-service-endpoint endpoint="::endpoint"></kd-service-endpoint> </div> <span class="kd-replicasetdetail-sidebar-subline" ng-hide="::service.externalEndpoints"> none </span> </div> </div> </div> </div> </div> </div> <md-tabs flex="grow" md-border-bottom md-dynamic-height> <md-tab label="Pods"> <md-content> <table class="kd-replicasetdetail-table" cellspacing="0"> <thead> <tr> <th class="kd-replicasetdetail-table-header"> <kd-sorted-header currently-selected-column="ctrl.sortPodsBy" currently-selected-order="ctrl.podsOrder" column-name="name"> Pod </kd-sorted-header> </th> <th class="kd-replicasetdetail-table-header"> <kd-sorted-header currently-selected-column="ctrl.sortPodsBy" currently-selected-order="ctrl.podsOrder" column-name="status" tooltip="Status of the pod"> Status </kd-sorted-header> </th> <th class="kd-replicasetdetail-table-header"> <kd-sorted-header currently-selected-column="ctrl.sortPodsBy" currently-selected-order="ctrl.podsOrder" column-name="restartCount" tooltip="Restarts count and last restart time of the pod"> Restarts </kd-sorted-header> </th> <th class="kd-replicasetdetail-table-header"> <kd-sorted-header currently-selected-column="ctrl.sortPodsBy" currently-selected-order="ctrl.podsOrder" column-name="startTime" tooltip="Age of the pod"> Age </kd-sorted-header> </th> <th class="kd-replicasetdetail-table-header"> <kd-sorted-header currently-selected-column="ctrl.sortPodsBy" currently-selected-order="ctrl.podsOrder" column-name="cpu" tooltip="CPU used by the pod"> CPU </kd-sorted-header> </th> <th class="kd-replicasetdetail-table-header"> <kd-sorted-header currently-selected-column="ctrl.sortPodsBy" currently-selected-order="ctrl.podsOrder" column-name="memory" tooltip="Memory used by the pod"> Memory </kd-sorted-header> </th> <th class="kd-replicasetdetail-table-header"> <kd-sorted-header currently-selected-column="ctrl.sortPodsBy" currently-selected-order="ctrl.podsOrder" column-name="podIP" tooltip="In cluster IP adress of the pod"> Cluster IP </kd-sorted-header> </th> <th class="kd-replicasetdetail-table-header"> <kd-sorted-header currently-selected-column="ctrl.sortPodsBy" currently-selected-order="ctrl.podsOrder" column-name="nodeName" tooltip="Name of the node, that the pod is running on"> Node </kd-sorted-header> </th> <th class="kd-replicasetdetail-table-header"> <span>Logs <i class="material-icons kd-text-icon"> help <md-tooltip>Logs from the pod</md-tooltip> </i> </span> </th> </tr> </thead> <tbody> <tr ng-repeat="pod in ctrl.replicaSetDetail.pods | orderBy:ctrl.sortPodsBy:ctrl.podsOrder"> <td class="kd-replicasetdetail-table-cell">{{pod.name}}</td> <td class="kd-replicasetdetail-table-cell"> {{::pod.podPhase}} </td> <td class="kd-replicasetdetail-table-cell"> {{::pod.restartCount}} </td> <td class="kd-replicasetdetail-table-cell"> <span ng-if="::pod.startTime"> {{::pod.startTime | relativeTime}} <md-tooltip>{{::(pod.startTime | date:\'short\')}}</md-tooltip> </span> <span ng-if="::!pod.startTime"> - </span> </td> <td class="kd-replicasetdetail-table-cell"> 0.4 CPU </td> <td class="kd-replicasetdetail-table-cell"> 12 MB </td> <td class="kd-replicasetdetail-table-cell"> <span ng-if="::pod.podIP"> {{::pod.podIP}} </span> <span ng-if="::!pod.podIP"> - </span> </td> <td class="kd-replicasetdetail-table-cell"> <span ng-if="::pod.nodeName"> {{::pod.nodeName}} </span> <span ng-if="::!pod.nodeName"> - </span> </td> <td class="kd-replicasetdetail-table-cell"> <span> <a ng-href="{{::ctrl.getPodLogsHref(pod)}}" class="md-primary"> Logs <i class="material-icons kd-text-icon">open_in_new</i> </a> </span> </td> </tr> </tbody> </table> </md-content> </md-tab> <md-tab label="Events"> <md-content flex> <div class="kd-replicasetdetail-options" layout="row"> <md-input-container class="kd-replicasetdetail-option-picker"> <label>Type</label> <md-select ng-model="ctrl.eventType" ng-change="ctrl.handleEventFiltering()" required> <md-option ng-repeat="type in ctrl.eventTypeFilter" ng-value="type"> {{type}} </md-option> </md-select> </md-input-container> <md-input-container class="kd-replicasetdetail-option-picker"> <label>Source</label> <md-select ng-model="ctrl.eventSource" ng-change="ctrl.handleEventFiltering()" required> <md-option ng-repeat="source in ctrl.eventSourceFilter" ng-value="source"> {{source}} </md-option> </md-select> </md-input-container> </div> <table class="kd-replicasetdetail-table" cellspacing="0" cellpadding="15"> <thead> <tr> <th class="kd-replicasetdetail-table-header"> <kd-sorted-header currently-selected-column="ctrl.sortEventsBy" currently-selected-order="ctrl.eventsOrder" column-name="message" tooltip="Event message"> Message </kd-sorted-header> </th> <th class="kd-replicasetdetail-table-header"> <kd-sorted-header currently-selected-column="ctrl.sortEventsBy" currently-selected-order="ctrl.eventsOrder" column-name="[\'sourceComponent\',\'sourceHost\']" tooltip="Source of the event, details of component and host"> Source </kd-sorted-header> </th> <th class="kd-replicasetdetail-table-header"> <kd-sorted-header currently-selected-column="ctrl.sortEventsBy" currently-selected-order="ctrl.eventsOrder" column-name="object" tooltip="Sub-object of the event"> Sub-object </kd-sorted-header> </th> <th class="kd-replicasetdetail-table-header"> <kd-sorted-header currently-selected-column="ctrl.sortEventsBy" currently-selected-order="ctrl.eventsOrder" column-name="count" tooltip="Number of times, that the event occured"> Count </kd-sorted-header> </th> <th class="kd-replicasetdetail-table-header"> <kd-sorted-header currently-selected-column="ctrl.sortEventsBy" currently-selected-order="ctrl.eventsOrder" column-name="firstSeen" tooltip="When the event was seen for the first time"> First seen </kd-sorted-header> </th> <th class="kd-replicasetdetail-table-header"> <kd-sorted-header currently-selected-column="ctrl.sortEventsBy" currently-selected-order="ctrl.eventsOrder" column-name="lastSeen" tooltip="When the event was seen for the last time"> Last seen </kd-sorted-header> </th> </tr> </thead> <tbody> <tr ng-repeat="event in ctrl.events | orderBy:ctrl.sortEventsBy:ctrl.eventsOrder"> <td class="kd-replicasetdetail-table-cell kd-replicasetdetail-message-table-cell"> <i ng-if="ctrl.isEventWarning(event)" class="material-icons kd-replicasetdetail-warning-icon">warning</i> {{event.message}} </td> <td class="kd-replicasetdetail-table-cell"> {{event.sourceComponent}} {{event.sourceHost}} </td> <td class="kd-replicasetdetail-table-cell">{{event.object}}</td> <td class="kd-replicasetdetail-table-cell">{{event.count}}</td> <td class="kd-replicasetdetail-table-cell">{{event.firstSeen | date:\'short\'}}</td> <td class="kd-replicasetdetail-table-cell">{{event.lastSeen | date:\'short\'}}</td> </tr> </tbody> </table> </md-content></md-tab> </md-tabs> </md-content>');
a.put("replicasetdetail/serviceendpoint.html",' <div> {{::endpoint.host}} <span ng-repeat="port in ::endpoint.ports"> {{::port.port}}/{{::port.protocol}}<span ng-if="::!$last">,</span> </span> </div>');a.put("replicasetdetail/sortedheader.html",' <button class="kd-replicaset-detail-table-header-button" ng-click="sortCtrl.changeSorting()"> <md-icon md-font-library="material-icons" ng-show="sortCtrl.isArrowDown()" class="kd-text-icon"> arrow_downward </md-icon> <md-icon md-font-library="material-icons" ng-show="sortCtrl.isArrowUp()" class="kd-text-icon"> arrow_upward </md-icon> <ng-transclude></ng-transclude> </button> <md-icon ng-show="sortCtrl.isTooltipAvailable()" md-font-library="material-icons" class="kd-replicasetdetail-help-icon kd-text-icon"> help <md-tooltip>{{sortCtrl.tooltip}}</md-tooltip> </md-icon>');
a.put("replicasetdetail/updatereplicas.html",' <md-dialog aria-label="Create a new namespace" layout="column" layout-padding> <md-content layout-padding> <h4 class="md-title">Set desired number of pods</h4> <p>Replica set {{ctrl.replicaSet}} will be updated to reflect the desired count. <br> <span class="kd-updatereplicas-pod-status"> Current status: {{ctrl.currentPods}} created, {{ctrl.desiredPods}} desired </span> </p> <form ng-submit="ctrl.updateReplicas()"> <md-input-container class="md-block"> <label>Number of pods</label> <input type="number" min="1" ng-model="ctrl.replicas" required> </md-input-container> <md-dialog-actions layout="row"> <md-button class="md-primary" ng-click="ctrl.cancel()">Cancel</md-button> <md-button class="md-primary" type="submit">OK</md-button> </md-dialog-actions> </form> </md-content> </md-dialog>');
a.put("replicasetlist/logsmenu.html",' <md-menu> <md-button ng-click="ctrl.openMenu($mdOpenMenu, $event)" class="kd-replicaset-card-logs-button">Logs</md-button> <md-menu-content> <md-menu-item class="kd-menu-logs-md-menu-item"> <div>Logs</div> </md-menu-item> <md-menu-item class="kd-menu-logs-md-menu-item"> <div class="kd-menu-logs-item-header kd-menu-logs-item-pods">Pod</div> <div class="kd-menu-logs-item-header kd-menu-logs-item-since">Running since</div> <div class="kd-menu-logs-item-header kd-menu-logs-item-prior">Prior restart</div> </md-menu-item> <md-menu-item ng-repeat="pod in ::ctrl.replicaSetPodsList" class="kd-menu-logs-md-menu-item"> <div class="kd-menu-logs-item kd-menu-logs-item-pods"> {{::(pod.name | middleEllipsis:10)}} </div> <div class="kd-menu-logs-item kd-menu-logs-item-since"> <a ng-href="{{::ctrl.getLogsHref(pod.name)}}" ng-if="::ctrl.podContainerExists(pod)"> <span ng-if="::pod.startTime"> {{pod.startTime | date:"short"}} </span> <span ng-if="::!pod.startTime"> Not running </span> <i class="material-icons kd-text-icon">open_in_new</i> </a> <span ng-if="::!ctrl.podContainerExists(pod)">-</span> </div> <div class="kd-menu-logs-item kd-menu-logs-item-prior"> <a ng-if="::ctrl.podContainersRestarted(pod)"> Logs <i class="material-icons kd-text-icon">open_in_new</i> </a> <span ng-if="::!ctrl.podContainersRestarted(pod)">-</span> </div> </md-menu-item> </md-menu-content> </md-menu>');
a.put("replicasetlist/replicasetcard.html",' <md-card class="kd-replicaset-card"> <md-card-content> <div layout="column"> <div flex layout="row" layout-align="space-between center" class="kd-replicaset-card-title-row"> <h3 class="md-title kd-replicaset-card-title"> <a ng-href="{{::ctrl.getReplicaSetDetailHref()}}" class="kd-replicaset-card-name" flex> {{::ctrl.replicaSet.name}} </a> </h3> <kd-replica-set-card-menu replica-set="::ctrl.replicaSet"></kd-replica-set-card-menu> </div> <div flex class="md-caption"> <kd-labels labels="::ctrl.replicaSet.labels"></kd-labels> </div> </div> <div class="md-caption"> <div layout="row" layout-align="center end"> <span flex="60"> <ng-pluralize class="kd-replicase-card-pods-stat" count="::ctrl.replicaSet.pods.running" when="{\'one\': \'1 pod running,\',\n \'other\': \'{} pods running,\'}"> </ng-pluralize> <span ng-if="::ctrl.replicaSet.pods.pending" class="kd-replicase-card-pods-stat kd-comma-separated-item"> {{::ctrl.replicaSet.pods.pending}} pending</span> <span ng-if="::ctrl.replicaSet.pods.failed" class="kd-replicase-card-pods-stat kd-comma-separated-item"> {{::ctrl.replicaSet.pods.failed}} failed</span> <span class="kd-replicase-card-pods-stat kd-comma-separated-item"> {{::ctrl.replicaSet.pods.desired}} desired </span> </span> <logs-menu flex="40" namespace="::ctrl.replicaSet.namespace" replica-set-name="::ctrl.replicaSet.name"> </logs-menu> </div> <md-divider class="kd-replicaset-card-divider"></md-divider> <div layout="row" layout-wrap> <div ng-if="::ctrl.replicaSet.description" flex="100" layout="column" class="kd-replicaset-card-section"> <span flex class="kd-replicaset-card-section-title">Description</span> <div flex class="kd-replicaset-card-description">{{::ctrl.replicaSet.description}}</div> </div> <div flex="60" layout="column" class="kd-replicaset-card-section"> <span flex class="kd-replicaset-card-section-title">Image</span> <div flex> <div ng-repeat="image in ::ctrl.replicaSet.containerImages track by $index" class="kd-replicaset-card-section-image"> <md-tooltip>{{::image}}</md-tooltip> {{::(image | middleEllipsis:32)}} </div> </div> </div> <div flex="40" layout="column" class="kd-replicaset-card-section"> <span flex="initial" class="kd-replicaset-card-section-title">Age</span> <span flex> {{::ctrl.replicaSet.creationTime | relativeTime}} <md-tooltip> {{::ctrl.replicaSet.creationTime | date:\'short\'}} </md-tooltip> </span> </div> <div flex="60" layout="column" class="kd-replicaset-card-section"> <span flex="initial" class="kd-replicaset-card-section-title">Internal Endpoint</span> <div flex> <div ng-repeat="endpoint in ::ctrl.replicaSet.internalEndpoints track by $index"> <kd-service-endpoint endpoint="::endpoint"></kd-service-endpoint> </div> <div ng-if="::!ctrl.replicaSet.internalEndpoints.length"> none </div> </div> </div> <div flex="40" layout="column" class="kd-replicaset-card-section"> <span flex="initial" class="kd-replicaset-card-section-title">External Endpoint</span> <div flex> <div ng-repeat="endpoint in ::ctrl.replicaSet.externalEndpoints track by $index"> <kd-service-endpoint endpoint="::endpoint"></kd-service-endpoint> </div> <div ng-if="::!ctrl.replicaSet.externalEndpoints.length"> none </div> </div> </div> </div> </div> </md-card-content> </md-card>');
a.put("replicasetlist/replicasetcardmenu.html",' <md-menu> <md-button ng-click="ctrl.openMenu($mdOpenMenu, $event)" class="md-icon-button kd-replicaset-card-menu-button"> <md-icon md-font-library="material-icons">more_vert</md-icon> </md-button> <md-menu-content width="3"> <md-menu-item> <md-button ng-click="ctrl.viewDetails()"> View details </md-button> </md-menu-item> <md-menu-item> <md-button ng-click="ctrl.showUpdateReplicasDialog()"> Edit pod count </md-button> </md-menu-item> <md-menu-item> <md-button ng-click="ctrl.showDeleteDialog()"> Delete </md-button> </md-menu-item> </md-menu-content> </md-menu>');
a.put("replicasetlist/replicasetlist.html",' <md-button class="md-fab kd-replicaset-deploy" ng-click="ctrl.redirectToDeployPage()"> <md-icon class="material-icons">add</md-icon> </md-button> <kd-replica-set-list-container> <kd-replica-set-card ng-repeat="replicaSet in ::ctrl.replicaSets" replica-set="::replicaSet"> </kd-replica-set-card> </kd-replica-set-list-container>');a.put("replicasetlist/replicasetlistcontainer.html",' <div class="kd-replica-set-list-container" ng-transclude></div>');a.put("deploy/helpsection/helpsection.html",
' <ng-transclude class="kd-help-section" layout="row" layout-xs="column" layout-sm="column"> </ng-transclude>');a.put("deploy/helpsection/userhelp.html",' <div ng-transclude class="kd-user-help" layout-align="start center"> </div>');a.put("logs/logstoolbar/logstoolbar.html",' <div layout="row" layout-wrap layout-margin layout-align="center center"> <span flex="10"></span> <div layout="row" layout-wrap layout-margin layout-align="center center"> <span class="kd-logs-toolbar-text">Logs from pod</span> <md-select class="kd-logs-toolbar-select" aria-label="Logs from pod" ng-model="ctrl.pod" md-on-close="ctrl.onPodChange(ctrl.pod.name)" required> <md-option ng-repeat="item in ctrl.pods" ng-value="item"> <span class="kd-logs-toolbar-text">{{item.name}}</span> </md-option> </md-select> <span class="kd-logs-toolbar-text">container</span> <md-select class="kd-logs-toolbar-select" aria-label="Containers" ng-model="ctrl.container" md-on-close="ctrl.onContainerChange(ctrl.container.name)" required> <md-option ng-repeat="item in ctrl.containers" ng-value="item"> <span class="kd-logs-toolbar-text">{{item.name}}</span> </md-option> </md-select> </div> <span class="kd-logs-toolbar-text" flex> <span ng-if="ctrl.podCreationTime"> Running since {{ctrl.podCreationTime | date:\'short\'}} </span> <span ng-if="!ctrl.podCreationTime"> Not running </span> </span> <span flex></span> <md-button class="kd-icon-button" id="colorText" ng-click="ctrl.onTextColorChange()"> <md-icon md-font-library="material-icons" ng-class="ctrl.getStyleClass()"> format_color_text </md-icon> </md-button> </div>');
a.put("replicasetlist/zerostate/zerostate.html",' <div layout="row" layout-align="center center" layout-padding class="kd-zerostate-content"> <md-content layout layout-align="center" class="kd-content"> <md-card flex="50" class="kd-zerostate-deploy-card"> <md-toolbar layout="row" class="md-primary kd-zerostate-card-header" layout-align="center center" flex> <md-icon md-svg-icon="assets/images/kubernetes-logo.svg" class="kd-zerostate-card-logo"></md-icon> <span class="md-padding" flex>The <b>Kubernetes Dashboard</b> lets you deploy, monitor and troubleshoot containerized apps and services</span> </md-toolbar> <md-card-content layout-align="center center"> <md-button ui-sref="deploy" class="md-raised md-primary kd-zerostate-deploy-bt">Deploy an app </md-button> </md-card-content> </md-card> <md-card flex="15" class="kd-zerostate-lm-card"> <md-card-content> <md-text-float class="kd-zerostate-lm-text"><b>Learn more</b></md-text-float> <md-list class="kd-zerostate-lm-list"> <md-list-item class="kd-zerostate-lm-list-item" ng-repeat="option in ctrl.learnMoreLinks"> <a ui-sref="{{option.link}}"> {{option.title}} <i class="material-icons kd-zerostate-ext-link-icon">open_in_new</i> </a> </md-list-item> </md-list> </md-card-content> </md-card> </md-content> </div>');
a.put("common/components/labels/labels.html",' <div class="kd-labels" ng-repeat="(key, value) in ::labelsCtrl.labels"> {{key}}={{value}} </div>')}]);
因为 它太大了无法显示 source diff 。你可以改为 查看blob
因为 它太大了无法显示 source diff 。你可以改为 查看blob
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册