You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
aggregation-platform/dist/hawtio-kubernetes.js

20398 lines
3.1 MiB

9 years ago
/// <reference path="../libs/hawtio-forms/defs.d.ts"/>
/// <reference path="../libs/hawtio-kubernetes-api/defs.d.ts"/>
/// <reference path="../libs/hawtio-oauth/defs.d.ts"/>
/// <reference path="../libs/hawtio-ui/defs.d.ts"/>
/// <reference path="../libs/hawtio-utilities/defs.d.ts"/>
/// <reference path="../../includes.ts"/>
var Configs;
(function (Configs) {
Configs.pluginName = "Configs";
Configs.context = "/config";
Configs.pluginPath = 'plugins/configs/';
Configs.templatePath = Configs.pluginPath + 'html/';
Configs._module = angular.module(Configs.pluginName, ['hawtio-core', 'hawtio-ui', 'ui.codemirror', 'nvd3', 'ngTable', 'ngDialog']);
Configs.route = PluginHelpers.createRoutingFunction(Configs.templatePath);
Configs.controller = PluginHelpers.createControllerFunction(Configs._module, Configs.pluginName);
Configs._module.config(['$provide', '$routeProvider', function ($provide, $routeProvider) {
$routeProvider.when(UrlHelpers.join(Configs.context, 'gluster-fs/setting'), Configs.route('glusterfsSetting.html', false))
.when(UrlHelpers.join(Configs.context, 'kube-cluster/setting'), Configs.route('kubeClusterSetting.html', false))
.when(Configs.context, { redirectTo: UrlHelpers.join(Configs.context, '/kube-cluster/setting') });
}]);
Configs._module.run(['viewRegistry', '$templateCache', 'HawtioExtension', '$compile', function (viewRegistry, $templateCache, ext, $compile) {
ext.add('config-setting', function ($scope) {
var template = $templateCache.get(UrlHelpers.join(Configs.templatePath, "configMenuItem.html"));
return $compile(template)($scope);
});
viewRegistry['config'] = Configs.templatePath + "shareLayout.html";
}]);
Configs._module.directive('gfsConfigTable', [function () {
return {
restrict: 'AE',
replace: true,
scope: {
tableTitle: '=',
tableContent: '='
},
template: "<table class=\"table table-hover\">\n <tr>\n <th ng-repeat=\"column in tableTitle.column\" class=\"no-fade table-header\">\n \t<span class=\"{{column.class}}\">{{column.title}}</span>\n </th> \n </tr>\n <tr ng-repeat = \"row in tableContent\" class=\"row.class\">\n \t<td ng-repeat=\"col in row\" class=\"col.class\">\n \t\t<span class=\"col.class\">{{col.title}}</span>\n \t</td>\n </tr> \n </table> \n ",
link: function (scope, element, attr) {
}
};
}]);
hawtioPluginLoader.addModule(Configs.pluginName);
})(Configs || (Configs = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="configPlugin.ts"/>
var Configs;
(function (Configs) {
//字节大小转换成字符大小
function getStringSize(size) {
var result = size;
var suffix = ["B", "KB", "MB", "GB", "TB", "PB"];
var count = 1;
while (result >= 1024) {
result = result / 1024;
count++;
}
return result.toFixed(2) + suffix[count];
}
function formatVolume(volume) {
volume["formatTotalSize"] = getStringSize(volume.allSize);
volume["formatUsedSize"] = getStringSize(volume.usedSize);
volume["editable"] = false;
angular.forEach(volume.brick, function (brock) {
brock["formatUsedSize"] = getStringSize(brock.usedSize);
brock["formatAllSize"] = getStringSize(brock.availableSize);
brock["editable"] = false;
});
}
function formatVolumes(volumes) {
angular.forEach(volumes, function (volume) {
formatVolume(volume);
});
}
Configs.formatVolumes = formatVolumes;
function IsBrockEquals(brock1, brock2) {
return brock1.ip == brock2.ip && brock1.path == brock2.path;
}
/**
刪除volume中指定的brock
*/
function deleteBrock(volume, brock) {
for (var i = 0; i < volume.brick.length; i++) {
var brick = volume.brick[i];
if (IsBrockEquals(brick, brock)) {
volume.brick.splice(i, 1);
break;
}
}
}
Configs.deleteBrock = deleteBrock;
/**
volume添加brock
*/
function addBrock(volume, brock) {
if (brock != null && brock != undefined)
volume.brick.push(brock);
}
Configs.addBrock = addBrock;
var ConfigsModelService = (function () {
function ConfigsModelService() {
this.cluster = [];
this.oracleParam = [];
this.systemInfo = [];
this.regionalismInfo = [];
this.updateAllData();
}
ConfigsModelService.prototype.updateAllData = function () {
this.updateVolumeData();
this.updateOracleParam();
//this.updateCodeInfo();
};
ConfigsModelService.prototype.updateVolumeData = function () {
var result = null;
$.ajax({
async: false,
type: "POST",
url: "/java/console/api/volume/list",
success: function (data) {
if (data) {
result = data;
}
}
});
this.cluster = JSON.parse(result);
formatVolumes(this.cluster);
};
/*public updateCodeInfo(){
var result=null;
$.ajax({
async: false,
type : "POST",
url : "/java/console/api/code/list",
success : function(data) {
if(data){
result = data;
}
}
});
this.regionalismInfo = result.regionalism;
this.systemInfo = result.system;
}*/
ConfigsModelService.prototype.updateOracleParam = function () {
var result = null;
$.ajax({
async: false,
type: "POST",
url: "/java/console/api/oracle/list",
success: function (data) {
if (data) {
result = data;
}
}
});
this.oracleParam = result;
};
ConfigsModelService.prototype.getFolderByVolumeName = function (name) {
if (this.cluster === null)
return null;
for (var i = 0; i < this.cluster.length; i++) {
if (this.cluster[i].name === name)
return this.cluster[i].folder;
}
};
return ConfigsModelService;
}());
Configs.ConfigsModelService = ConfigsModelService;
Configs._module.factory('ConfigsModel', ['$rootScope', '$http', '$location', '$resource', function ($rootScope, $http, $location, $resource) {
var $scope = new ConfigsModelService();
return $scope;
}]);
})(Configs || (Configs = {}));
/// <reference path="../../includes.ts"/>
var Developer;
(function (Developer) {
var log = Logger.get('developer-navigation');
function developBreadcrumb() {
return {
href: UrlHelpers.join(HawtioCore.documentBase(), "/workspaces"),
label: "Teams",
title: "View all the available teams",
isActive: function (subTab, path) { return false; }
};
}
function operateBreadcrumb() {
return {
href: UrlHelpers.join(HawtioCore.documentBase(), "/namespaces"),
label: "Manage",
title: "Manage the projects and resources inside them"
};
}
function workspaceLink() {
return UrlHelpers.join(HawtioCore.documentBase(), "/workspaces", Kubernetes.currentKubernetesNamespace());
}
Developer.workspaceLink = workspaceLink;
function projectLink(projectId) {
var link = workspaceLink();
if (projectId) {
return UrlHelpers.join(link, "/projects", projectId);
}
else {
return link;
}
}
Developer.projectLink = projectLink;
function createWorkspacesBreadcrumbs(developPerspective) {
return [developBreadcrumb()];
}
Developer.createWorkspacesBreadcrumbs = createWorkspacesBreadcrumbs;
function createWorkspacesSubNavBars(developPerspective) {
return activateCurrent([
developBreadcrumb(),
operateBreadcrumb()
]);
}
Developer.createWorkspacesSubNavBars = createWorkspacesSubNavBars;
function createWorkspaceBreadcrumbs(children, workspaceName) {
if (children === void 0) { children = null; }
if (workspaceName === void 0) { workspaceName = null; }
var answer = createWorkspacesBreadcrumbs(true);
if (!workspaceName) {
workspaceName = Kubernetes.currentKubernetesNamespace();
}
if (workspaceName) {
answer.push({
href: UrlHelpers.join(HawtioCore.documentBase(), "/workspaces/", workspaceName),
label: workspaceName,
title: "View the project: " + workspaceName,
isActive: function (subTab, path) { return false; }
});
return processChildren(answer, children);
9 years ago
}
return answer;
}
Developer.createWorkspaceBreadcrumbs = createWorkspaceBreadcrumbs;
function createEnvironmentBreadcrumbs($scope, $location, $routeParams) {
var ns = Kubernetes.currentKubernetesNamespace();
var namespacesLink = UrlHelpers.join(HawtioCore.documentBase(), "/kubernetes/namespace");
var workspaceName = $routeParams.workspace;
var project = $routeParams.project;
var environment = $routeParams.namespace;
if (workspaceName && project) {
var projectLink = UrlHelpers.join(HawtioCore.documentBase(), "/workspaces", workspaceName, "projects", project);
$scope.$projectLink = projectLink;
$scope.$projectNamespaceLink = UrlHelpers.join(projectLink, "namespace", ns);
namespacesLink = UrlHelpers.join(projectLink, "namespace");
var children = [
{
href: UrlHelpers.join(projectLink, "environments"),
label: "Environments",
title: "View the environments for this project"
},
{
href: UrlHelpers.join(namespacesLink, ns, "apps"),
label: function () { return environmentName(workspaceName, ns); },
title: "View the runtime of the workspace: " + ns
}
];
return createProjectBreadcrumbs(project, children, workspaceName);
9 years ago
}
else if (workspaceName && environment && workspaceName != environment) {
// find label for namespace environment
var children = [
{
href: environmentsLink(workspaceName),
label: "Environments",
title: "View the environments for this project"
},
{
href: environmentLink(workspaceName, environment),
label: function () { return environmentName(workspaceName, environment); },
title: "View this environment"
}
];
return createProjectBreadcrumbs(project, children, workspaceName);
9 years ago
}
else if (!workspaceName) {
workspaceName = Kubernetes.currentKubernetesNamespace();
9 years ago
}
var answer = createWorkspaceBreadcrumbs(workspaceName);
answer.push({
href: UrlHelpers.join(HawtioCore.documentBase(), "workspaces", workspaceName, "namespace", ns, "apps"),
label: 'Runtime',
title: "View the runtime of the workspace: " + ns
});
return activateCurrent(answer);
9 years ago
}
Developer.createEnvironmentBreadcrumbs = createEnvironmentBreadcrumbs;
9 years ago
/**
* Returns the name of the given environment namespace
9 years ago
*/
function environmentName(workspaceName, environment) {
/*var model = Kubernetes.getKubernetesModel();
if (model) {
return model.environmentName(workspaceName, environment);
}*/
return environment;
}
function createProjectBreadcrumbs(projectName, children, workspaceName) {
if (projectName === void 0) { projectName = null; }
if (children === void 0) { children = null; }
if (workspaceName === void 0) { workspaceName = null; }
if (!workspaceName) {
workspaceName = Kubernetes.currentKubernetesNamespace();
}
var answer = createWorkspaceBreadcrumbs(null, workspaceName);
if (workspaceName) {
if (projectName) {
answer.push({
href: UrlHelpers.join(HawtioCore.documentBase(), "/workspaces", workspaceName, "projects"),
label: "Apps",
title: "View all the apps in this project"
});
answer.push({
href: UrlHelpers.join(HawtioCore.documentBase(), "/workspaces", workspaceName, "projects", projectName),
label: projectName,
title: "View the project: " + projectName
});
9 years ago
}
return processChildren(answer, children);
9 years ago
}
return answer;
9 years ago
}
Developer.createProjectBreadcrumbs = createProjectBreadcrumbs;
function createProjectSettingsBreadcrumbs(projectName, workspaceName) {
if (workspaceName === void 0) { workspaceName = null; }
var children = [];
if (!projectName) {
children = [{
label: "New App",
title: "Lets make a new app"
}];
9 years ago
}
return createProjectBreadcrumbs(projectName, children, workspaceName);
9 years ago
}
Developer.createProjectSettingsBreadcrumbs = createProjectSettingsBreadcrumbs;
function createWorkspaceSubNavBars() {
var workspaceName = Kubernetes.currentKubernetesNamespace();
return activateCurrent([
{
href: UrlHelpers.join(HawtioCore.documentBase(), "/workspaces", workspaceName),
label: "Dashboard",
class: "fa fa-tachometer",
title: "View the dashboard for the apps, environments and pipelines in this project"
},
{
href: UrlHelpers.join(HawtioCore.documentBase(), "/workspaces", workspaceName, "apps"),
label: "Apps",
class: "fa fa-rocket",
title: "View the apps in this project"
},
{
isValid: function () { return Developer.jenkinsLink(); },
href: UrlHelpers.join(HawtioCore.documentBase(), "/workspaces", workspaceName, "jenkinsJob"),
label: "Builds",
class: "fa fa-code",
title: "View the builds in this project"
},
{
href: environmentsLink(),
label: "Environments",
class: "fa fa-cubes",
title: "View the environments for this project"
},
{
href: namespaceRuntimeLink(workspaceName),
label: "Runtime",
class: "fa fa-cube",
title: "View the Runtime perspective for this project"
9 years ago
}
]);
9 years ago
}
Developer.createWorkspaceSubNavBars = createWorkspaceSubNavBars;
function namespaceRuntimeLink(workspaceName) {
if (workspaceName === void 0) { workspaceName = null; }
if (!workspaceName) {
workspaceName = Kubernetes.currentKubernetesNamespace();
9 years ago
}
return UrlHelpers.join(HawtioCore.documentBase(), "workspaces", workspaceName, "namespace", workspaceName, "apps");
9 years ago
}
Developer.namespaceRuntimeLink = namespaceRuntimeLink;
function createBuildsLink(workspaceName, projectName, jenkinsJobId) {
workspaceName = workspaceName || Kubernetes.currentKubernetesNamespace();
return UrlHelpers.join(HawtioCore.documentBase(), "/workspaces", workspaceName, "projects", projectName, "jenkinsJob", jenkinsJobId);
9 years ago
}
/**
* Creates a routing function that loads a template and inject the needed directives to properly
* display/update the Developer module managed tabs and bread crumbs for when the route is active.
*
* Example Usage:
*
* var route = Developer.createTabRoutingFunction("/app/somedir");
* $routeProvider.when('/profiles', route('view.html', false, [{
* label: "Profiles",
* title: "Browse the profiles of this project"
* }]
* ));
*
* @param baseURL
* @returns {function(string, boolean=, Array<Developer.BreadcrumbConfig>=): {template: string, reloadOnSearch: boolean, controller: string|string|(function(any, ng.route.IRouteParamsService): undefined)[]}}
9 years ago
*/
function createTabRoutingFunction(baseURL) {
return function (templateName, reloadOnSearch, children) {
if (reloadOnSearch === void 0) { reloadOnSearch = true; }
return {
template: "<div hawtio-breadcrumbs></div><div hawtio-tabs></div><ng-include src='contentTemplateUrl'></ng-include>",
reloadOnSearch: reloadOnSearch,
controller: ["$scope", "$routeParams", function ($scope, $routeParams) {
if ($routeParams["namespace"] == null) {
log.error("The :namespace route parameter was not defined for the route.");
9 years ago
}
if ($routeParams["projectId"] == null) {
log.error("The :projectId route parameter was not defined for the route.");
9 years ago
}
$scope.namespace = $routeParams["namespace"];
$scope.projectId = $routeParams["projectId"];
$scope.contentTemplateUrl = UrlHelpers.join(baseURL, templateName);
$scope.breadcrumbConfig = Developer.createProjectBreadcrumbs($scope.projectId, children);
$scope.subTabConfig = Developer.createProjectSubNavBars($scope.projectId);
}]
};
};
9 years ago
}
Developer.createTabRoutingFunction = createTabRoutingFunction;
function createProjectSubNavBars(projectName, jenkinsJobId, $scope) {
if (jenkinsJobId === void 0) { jenkinsJobId = null; }
if ($scope === void 0) { $scope = null; }
var workspaceName = Kubernetes.currentKubernetesNamespace();
var projectLink = UrlHelpers.join(HawtioCore.documentBase(), "/workspaces", workspaceName, "projects", projectName);
var buildsLink = UrlHelpers.join(projectLink, "builds");
if (!jenkinsJobId) {
jenkinsJobId = projectName;
9 years ago
}
var jenkinsBuildLink = null;
var pipelinesLink = null;
if (projectName && jenkinsJobId) {
jenkinsBuildLink = createBuildsLink(workspaceName, projectName, jenkinsJobId);
pipelinesLink = UrlHelpers.join(jenkinsBuildLink, "pipelines");
9 years ago
}
function isJenkinsBuild() {
var answer = Developer.jenkinsLink() && jenkinsBuildLink;
if (answer && $scope) {
var entity = Developer.projectForScope($scope);
if (entity) {
return answer && entity.$jenkinsJob;
9 years ago
}
}
return answer;
9 years ago
}
var answer = [
/*
{
href: UrlHelpers.join(HawtioCore.documentBase(), "/workspaces", workspaceName),
label: "All Apps",
class: 'fa fa-angle-double-left',
title: "View the apps in this project"
},
{
template: `<div ng-include="'plugins/developer/html/projectSelector.html'"></div>`
},
*/
{
href: UrlHelpers.join(HawtioCore.documentBase(), "/workspaces", workspaceName, "projects", projectName, "environments"),
isActive: function (subTab, path) {
var href = normalizeHref(subTab.href);
//console.log("subTab: ", subTab, " path: ", path);
if (path === href) {
return true;
}
var rootPath = href.replace(/\/environments/, '');
if (path === rootPath) {
return true;
}
return false;
},
//href: UrlHelpers.join(HawtioCore.documentBase(), "/workspaces", workspaceName, "projects", projectName),
label: "Dashboard",
class: "fa fa-tachometer",
title: "View the app dashboard for the activity, environments and pipelines"
},
{
isValid: function () { return isJenkinsBuild() && pipelinesLink; },
id: "pipelines",
href: pipelinesLink,
label: "Pipelines",
class: "fa fa-ellipsis-h",
title: "View the pipeline builds for this app"
},
{
isValid: function () { return !isJenkinsBuild(); },
href: buildsLink,
label: "Builds",
class: "fa fa-bars",
title: "View the builds for this app"
},
{
isValid: function () { return isJenkinsBuild(); },
isActive: function (item, path) {
if (path.indexOf('/log/') > 0) {
return false;
}
if (path.indexOf('/jenkinsJob/') > 0) {
return true;
}
return false;
},
id: "builds",
href: jenkinsBuildLink,
label: "Builds",
class: "fa fa-bars",
title: "View the Jenkins builds for this app"
},
{
isValid: function () { return isJenkinsBuild(); },
href: UrlHelpers.join(HawtioCore.documentBase(), "/workspaces", workspaceName, "projects", projectName, "jenkinsJob", jenkinsJobId, "metrics"),
label: "Metrics",
class: "fa fa-bar-chart",
title: "View the metrics for this project"
},
/*
{
href: UrlHelpers.join(HawtioCore.documentBase(), "/workspaces", workspaceName, "projects", projectName, "tools"),
label: "Tools",
title: "View the tools for this project"
},
*/
{
href: UrlHelpers.join(HawtioCore.documentBase(), "/workspaces", workspaceName, "projects", projectName, "buildConfigEdit"),
label: "Settings",
class: "fa fa-cog",
title: "View the app configuration",
isActive: function (subTab, path) {
if (_.endsWith(path, '/buildConfigEdit')) {
return true;
}
if (_.endsWith(path, '/forge/secrets')) {
return true;
}
if (_.endsWith(path, '/forge/command/devops-edit')) {
return true;
}
return false;
9 years ago
}
}
];
var context = {
workspaceName: workspaceName,
projectName: projectName,
projectLink: projectLink,
jenkinsJobId: jenkinsJobId,
$scope: $scope
};
angular.forEach(Developer.customProjectSubTabFactories, function (fn) {
if (angular.isFunction(fn)) {
var subtab = fn(context);
if (subtab) {
if (angular.isArray(subtab)) {
angular.forEach(subtab, function (t) {
answer.push(t);
});
9 years ago
}
else {
answer.push(subtab);
}
}
9 years ago
}
});
return activateCurrent(answer);
9 years ago
}
Developer.createProjectSubNavBars = createProjectSubNavBars;
function createProjectSettingsSubNavBars(projectName, jenkinsJobId) {
if (jenkinsJobId === void 0) { jenkinsJobId = null; }
if (!projectName) {
return [];
}
var workspaceName = Kubernetes.currentKubernetesNamespace();
var projectLink = UrlHelpers.join(HawtioCore.documentBase(), "/workspaces", workspaceName, "projects", projectName);
if (!jenkinsJobId) {
jenkinsJobId = projectName;
}
var answer = [
{
href: UrlHelpers.join(HawtioCore.documentBase(), "/workspaces", workspaceName, "projects", projectName, "buildConfigEdit"),
label: "Core",
title: "View the core build configuration"
},
{
href: projectSecretsLink(workspaceName, projectName),
label: "Secrets",
title: "View or change the secrets used to edit source code in the source control system"
},
{
href: editPipelineLink(workspaceName, projectName),
label: "Pipeline",
title: "View the DevOps and pipeline configuration"
},
{
isValid: function () { return forgeProjectHasBuilder("maven"); },
href: editMavenBuildLink(workspaceName, projectName),
label: "Maven",
title: "View the Maven build configuration"
9 years ago
}
];
return activateCurrent(answer);
}
Developer.createProjectSettingsSubNavBars = createProjectSettingsSubNavBars;
function forgeProjectHasBuilder(name) {
var forgeProject = Kubernetes.inject("ForgeProject");
if (forgeProject) {
return forgeProject.hasBuilder(name);
9 years ago
}
return false;
9 years ago
}
Developer.forgeProjectHasBuilder = forgeProjectHasBuilder;
function forgeProjectHasPerspective(name) {
var forgeProject = Kubernetes.inject("ForgeProject");
if (forgeProject) {
return forgeProject.hasPerspective(name);
}
return false;
9 years ago
}
Developer.forgeProjectHasPerspective = forgeProjectHasPerspective;
function editPipelineLinkScope($scope) {
return editPipelineLink($scope.namespace, $scope.projectId || $scope.projectName || $scope.project);
}
Developer.editPipelineLinkScope = editPipelineLinkScope;
function createProjectLink(workspaceName) {
if (workspaceName === void 0) { workspaceName = null; }
if (!workspaceName) {
workspaceName = Kubernetes.currentKubernetesNamespace();
}
return UrlHelpers.join(HawtioCore.documentBase(), "/workspaces", workspaceName, "/forge/createProject");
}
Developer.createProjectLink = createProjectLink;
function editPipelineLink(workspaceName, projectName) {
return projectWorkspaceLink(workspaceName, projectName, "forge/command/devops-edit");
}
Developer.editPipelineLink = editPipelineLink;
function editMavenBuildLink(workspaceName, projectName) {
return projectWorkspaceLink(workspaceName, projectName, "forge/command/fabric8-setup");
}
Developer.editMavenBuildLink = editMavenBuildLink;
function projectSecretsLink(workspaceName, projectName) {
return projectWorkspaceLink(workspaceName, projectName, "forge/secrets", false);
}
Developer.projectSecretsLink = projectSecretsLink;
function secretsNamespaceLink(workspaceName, projectName, secretsNamespace) {
var prefix = projectWorkspaceLink(workspaceName, projectName, "") || "kubernetes";
return UrlHelpers.join(prefix, "namespace", secretsNamespace, "secrets");
}
Developer.secretsNamespaceLink = secretsNamespaceLink;
function projectWorkspaceLink(workspaceName, projectName, path, ignoreBlankProject) {
if (ignoreBlankProject === void 0) { ignoreBlankProject = true; }
if (ignoreBlankProject && !projectName) {
return "";
}
if (!workspaceName) {
workspaceName = Kubernetes.currentKubernetesNamespace();
}
return UrlHelpers.join(HawtioCore.documentBase(), "/workspaces", workspaceName, "projects", projectName, path);
}
Developer.projectWorkspaceLink = projectWorkspaceLink;
function environmentsLink(workspaceName) {
if (workspaceName === void 0) { workspaceName = null; }
if (!workspaceName) {
workspaceName = Kubernetes.currentKubernetesNamespace();
}
return UrlHelpers.join(HawtioCore.documentBase(), "/workspaces", workspaceName, "environments");
}
Developer.environmentsLink = environmentsLink;
function environmentLink(workspaceName, environmentNamespace, path, ignoreBlankProject) {
if (path === void 0) { path = ""; }
if (ignoreBlankProject === void 0) { ignoreBlankProject = true; }
if (ignoreBlankProject && !environmentNamespace) {
return "";
}
if (!workspaceName) {
workspaceName = Kubernetes.currentKubernetesNamespace();
}
return UrlHelpers.join(HawtioCore.documentBase(), "/workspaces", workspaceName, "namespace", environmentNamespace, path);
}
Developer.environmentLink = environmentLink;
Developer.customProjectSubTabFactories = [];
function createJenkinsBreadcrumbs(projectName, jobId, buildId) {
var workspaceName = Kubernetes.currentKubernetesNamespace();
var children = [
{
id: "builds",
href: createBuildsLink(workspaceName, projectName, jobId),
label: "Builds",
title: "View the builds for this app"
9 years ago
}
];
if (buildId) {
children.push({
id: "",
href: "",
label: "#" + buildId,
title: "Build #" + buildId
});
}
return createProjectBreadcrumbs(projectName, children);
}
Developer.createJenkinsBreadcrumbs = createJenkinsBreadcrumbs;
function createJenkinsSubNavBars(projectName, jenkinsJobId, buildId, extraOption) {
if (extraOption === void 0) { extraOption = null; }
var answer = createProjectSubNavBars(projectName, jenkinsJobId);
if (extraOption) {
// extraOption.active = true;
answer.push(extraOption);
}
9 years ago
return answer;
}
Developer.createJenkinsSubNavBars = createJenkinsSubNavBars;
function createEnvironmentSubNavBars($scope, $location, $routeParams) {
var ns = Kubernetes.currentKubernetesNamespace();
var workspaceName = $routeParams.workspace;
var project = $routeParams.project;
var environment = $routeParams.namespace;
var projectLink = UrlHelpers.join(HawtioCore.documentBase(), "/kubernetes");
/*console.log("=====================")
console.log(projectLink);
if (workspaceName && project) {
projectLink = UrlHelpers.join(HawtioCore.documentBase(), "/kubernetes", workspaceName, "projects", project);
} else {
projectLink = UrlHelpers.join(HawtioCore.documentBase(), "/kubernetes", workspaceName || ns);
}*/
var namespacesLink = UrlHelpers.join(projectLink, "namespace");
return activateCurrent([
{
href: UrlHelpers.join(namespacesLink, ns, "replicationControllers"),
label: "服务管理",
class: "fa fa-clone",
title: "View the Replicas for this project"
},
]);
9 years ago
}
Developer.createEnvironmentSubNavBars = createEnvironmentSubNavBars;
function environmentInstanceLink(env, projectName) {
if (projectName === void 0) { projectName = null; }
if (env) {
var envNamespace = env["namespace"];
if (envNamespace) {
if (projectName) {
return UrlHelpers.join(HawtioCore.documentBase(), "/workspaces", Kubernetes.currentKubernetesNamespace(), "projects", projectName, "namespace", envNamespace);
}
else {
return UrlHelpers.join(HawtioCore.documentBase(), "/workspaces", Kubernetes.currentKubernetesNamespace(), "namespace", envNamespace);
9 years ago
}
}
}
return "";
9 years ago
}
Developer.environmentInstanceLink = environmentInstanceLink;
function namespaceLink($scope, $routeParams, path) {
if (path === void 0) { path = null; }
var ns = Kubernetes.currentKubernetesNamespace();
var workspaceName = $routeParams.workspace;
var project = $routeParams.project;
var projectLink = UrlHelpers.join(HawtioCore.documentBase(), "/kubernetes");
if (workspaceName && project) {
projectLink = UrlHelpers.join(HawtioCore.documentBase(), "/workspaces", workspaceName, "projects", project);
}
return UrlHelpers.join(projectLink, "namespace", ns, path);
}
Developer.namespaceLink = namespaceLink;
9 years ago
/**
* Removes the URL query string if its inside the given text
9 years ago
*/
function trimQuery(text) {
if (text) {
var idx = text.indexOf("?");
if (idx >= 0) {
return text.substring(0, idx);
}
}
return text;
9 years ago
}
// Cater for the app running at some weird document base
function normalizeHref(href) {
if (!href) {
return null;
}
var regex = new RegExp('^' + HawtioCore.documentBase().replace('/', '\\/'));
return href.replace(regex, '/');
9 years ago
}
Developer.normalizeHref = normalizeHref;
function activateCurrent(navBarItems) {
navBarItems = _.compact(navBarItems);
var injector = HawtioCore.injector;
var $location = injector ? injector.get("$location") : null;
if ($location) {
var path = normalizeHref(trimQuery($location.path()));
var found = false;
function makeActive(item) {
item.active = true;
8 years ago
found = true;
}
function getHref(item) {
var href = item.href;
var trimHref = trimQuery(href);
return normalizeHref(trimHref);
}
angular.forEach(navBarItems, function (item) {
if (!found && item) {
if (angular.isFunction(item.isActive)) {
if (item.isActive(item, path)) {
makeActive(item);
}
}
else {
8 years ago
var trimHref = getHref(item);
if (!trimHref) {
return;
}
if (trimHref === path) {
makeActive(item);
}
}
}
});
// Maybe it's a sub-item of a tab, let's fall back to that maybe
if (!found) {
angular.forEach(navBarItems, function (item) {
if (!found) {
if (!angular.isFunction(item.isActive)) {
var trimHref = getHref(item);
if (!trimHref) {
return;
}
if (_.startsWith(path, trimHref)) {
makeActive(item);
}
}
}
});
}
// still not found, let's log it
if (!found) {
log.debug("No navigation tab found for path:", path);
}
}
return navBarItems;
}
Developer.activateCurrent = activateCurrent;
function processChildren(answer, children) {
if (children) {
if (angular.isArray(children)) {
answer = answer.concat(children);
}
else {
answer.push(children);
}
}
activateCurrent(answer);
return answer;
}
})(Developer || (Developer = {}));
8 years ago
var Kubernetes;
(function (Kubernetes) {
var consts = (function () {
function consts() {
}
Object.defineProperty(consts.prototype, "NAMESPACE_STORAGE_KEY", {
get: function () { return "k8sSelectedNamespace"; },
enumerable: true,
configurable: true
});
return consts;
}());
Kubernetes.consts = consts;
Kubernetes.Constants = new consts();
var WatchTypes = (function () {
function WatchTypes() {
}
Object.defineProperty(WatchTypes, "ENDPOINTS", {
get: function () { return "endpoints"; },
enumerable: true,
configurable: true
});
Object.defineProperty(WatchTypes, "EVENTS", {
get: function () { return "events"; },
enumerable: true,
configurable: true
});
Object.defineProperty(WatchTypes, "NAMESPACES", {
get: function () { return "namespaces"; },
enumerable: true,
configurable: true
});
Object.defineProperty(WatchTypes, "NODES", {
get: function () { return "nodes"; },
enumerable: true,
configurable: true
});
Object.defineProperty(WatchTypes, "PERSISTENT_VOLUMES", {
get: function () { return "persistentvolumes"; },
enumerable: true,
configurable: true
});
Object.defineProperty(WatchTypes, "PERSISTENT_VOLUME_CLAIMS", {
get: function () { return "persistentvolumeclaims"; },
enumerable: true,
configurable: true
});
Object.defineProperty(WatchTypes, "PODS", {
get: function () { return "pods"; },
enumerable: true,
configurable: true
});
Object.defineProperty(WatchTypes, "REPLICATION_CONTROLLERS", {
get: function () { return "replicationcontrollers"; },
enumerable: true,
configurable: true
});
Object.defineProperty(WatchTypes, "RESOURCE_QUOTAS", {
get: function () { return "resourcequotas"; },
enumerable: true,
configurable: true
});
Object.defineProperty(WatchTypes, "OAUTH_CLIENTS", {
get: function () { return "oauthclients"; },
enumerable: true,
configurable: true
});
Object.defineProperty(WatchTypes, "SECRETS", {
get: function () { return "secrets"; },
enumerable: true,
configurable: true
});
Object.defineProperty(WatchTypes, "SERVICES", {
get: function () { return "services"; },
enumerable: true,
configurable: true
});
Object.defineProperty(WatchTypes, "SERVICE_ACCOUNTS", {
get: function () { return "serviceaccounts"; },
enumerable: true,
configurable: true
});
Object.defineProperty(WatchTypes, "TEMPLATES", {
get: function () { return "templates"; },
enumerable: true,
configurable: true
});
Object.defineProperty(WatchTypes, "ROUTES", {
get: function () { return "routes"; },
enumerable: true,
configurable: true
});
Object.defineProperty(WatchTypes, "BUILD_CONFIGS", {
get: function () { return "buildconfigs"; },
enumerable: true,
configurable: true
});
Object.defineProperty(WatchTypes, "BUILDS", {
get: function () { return "builds"; },
enumerable: true,
configurable: true
});
Object.defineProperty(WatchTypes, "DEPLOYMENT_CONFIGS", {
get: function () { return "deploymentconfigs"; },
enumerable: true,
configurable: true
});
Object.defineProperty(WatchTypes, "IMAGE_STREAMS", {
get: function () { return "imagestreams"; },
enumerable: true,
configurable: true
});
Object.defineProperty(WatchTypes, "POLICIES", {
get: function () { return "policies"; },
enumerable: true,
configurable: true
});
Object.defineProperty(WatchTypes, "POLICY_BINDINGS", {
get: function () { return "policybindings"; },
enumerable: true,
configurable: true
});
Object.defineProperty(WatchTypes, "PROJECTS", {
get: function () { return "projects"; },
enumerable: true,
configurable: true
});
Object.defineProperty(WatchTypes, "ROLE_BINDINGS", {
get: function () { return "rolebindings"; },
enumerable: true,
configurable: true
});
Object.defineProperty(WatchTypes, "ROLES", {
get: function () { return "roles"; },
enumerable: true,
configurable: true
});
return WatchTypes;
}());
Kubernetes.WatchTypes = WatchTypes;
var NamespacedTypes = (function () {
function NamespacedTypes() {
}
Object.defineProperty(NamespacedTypes, "k8sTypes", {
get: function () {
return [
WatchTypes.ENDPOINTS,
WatchTypes.EVENTS,
WatchTypes.NODES,
WatchTypes.PERSISTENT_VOLUMES,
WatchTypes.PERSISTENT_VOLUME_CLAIMS,
WatchTypes.PODS,
WatchTypes.REPLICATION_CONTROLLERS,
WatchTypes.RESOURCE_QUOTAS,
WatchTypes.PERSISTENT_VOLUMES,
WatchTypes.SECRETS,
WatchTypes.SERVICES,
WatchTypes.SERVICE_ACCOUNTS
];
},
8 years ago
enumerable: true,
configurable: true
});
Object.defineProperty(NamespacedTypes, "osTypes", {
get: function () {
return [
WatchTypes.TEMPLATES,
WatchTypes.BUILD_CONFIGS,
WatchTypes.ROUTES,
WatchTypes.BUILDS,
WatchTypes.BUILD_CONFIGS,
WatchTypes.DEPLOYMENT_CONFIGS,
WatchTypes.IMAGE_STREAMS,
WatchTypes.OAUTH_CLIENTS,
WatchTypes.POLICIES,
WatchTypes.POLICY_BINDINGS,
WatchTypes.PROJECTS,
];
},
8 years ago
enumerable: true,
configurable: true
});
return NamespacedTypes;
}());
Kubernetes.NamespacedTypes = NamespacedTypes;
var WatchActions = (function () {
function WatchActions() {
}
Object.defineProperty(WatchActions, "ANY", {
get: function () { return "*"; },
enumerable: true,
configurable: true
});
Object.defineProperty(WatchActions, "ADDED", {
get: function () { return "ADDED"; },
enumerable: true,
configurable: true
});
Object.defineProperty(WatchActions, "MODIFIED", {
get: function () { return "MODIFIED"; },
enumerable: true,
configurable: true
});
Object.defineProperty(WatchActions, "DELETED", {
get: function () { return "DELETED"; },
enumerable: true,
configurable: true
});
return WatchActions;
}());
Kubernetes.WatchActions = WatchActions;
})(Kubernetes || (Kubernetes = {}));
/// <reference path="../../includes.ts"/>
8 years ago
/// <reference path="./kubernetesHelpers.ts"/>
8 years ago
var Kubernetes;
(function (Kubernetes) {
Kubernetes.hostPorts = [];
/**
* Sorts the the ip field
*
* @param ip the ip such as '10.1.2.13'
* @returns {any}
*/
function sortByPodIp(ip) {
// i guess there is maybe nicer ways of sort this without parsing and slicing
var regex = /(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/;
var groups = regex.exec(ip);
if (angular.isDefined(groups)) {
var g1 = ("00" + groups[1]).slice(-3);
var g2 = ("00" + groups[2]).slice(-3);
var g3 = ("00" + groups[3]).slice(-3);
var g4 = ("00" + groups[4]).slice(-3);
var answer = g1 + g2 + g3 + g4;
return answer;
}
else {
return 0;
}
}
Kubernetes.sortByPodIp = sortByPodIp;
function ramdomPort() {
var hostPort = Math.floor(30000 + Math.random() * (65535 - 30000));
while (Kubernetes.hostPorts.indexOf(hostPort) === 0) {
hostPort = Math.floor(30000 + Math.random() * (65535 - 30000));
}
Kubernetes.hostPorts.push(hostPort);
return hostPort;
}
Kubernetes.ramdomPort = ramdomPort;
function getRandomString(len) {
len = len || 32;
var $chars = 'abcdefhijkmnprstwxyz'; // 默认去掉了容易混淆的字符oOLl,9gq,Vv,Uu,I1
var maxPos = $chars.length;
var pwd = '';
for (var i = 0; i < len; i++) {
pwd += $chars.charAt(Math.floor(Math.random() * maxPos));
}
return pwd;
}
Kubernetes.getRandomString = getRandomString;
var resourceRCTemplate = (function () {
function resourceRCTemplate() {
this.image = "oracle:utf8";
this.names = ["oradata"];
8 years ago
}
resourceRCTemplate.prototype.createRC = function (Obj) {
var labels = {
"style": "oracle",
"status": "0",
"isExtract": Obj.isExtract + "" || "0",
8 years ago
"isTarget": Obj.isTarget
};
for (var item in Obj.labels)
labels[item] = Obj.labels[item];
return {
"apiVersion": Kubernetes.defaultApiVersion,
"kind": "ReplicationController",
"metadata": {
"name": Obj.name,
"labels": labels,
"annotations": Obj.annotations
},
"spec": {
replicas: Obj.replicas || 1,
"template": this.createTemplate(Obj)
}
};
};
resourceRCTemplate.prototype.createVolumeMounts = function () {
var volumeMounts = [];
for (var item in this.names) {
if (this.names[item] === 'flash-recovery-area')
volumeMounts.push({
"name": this.names[item],
"mountPath": "/opt/oracle/app/flash_recovery_area"
});
else
volumeMounts.push({
"name": this.names[item],
"mountPath": "/opt/oracle/app/" + this.names[item]
});
}
return volumeMounts;
};
resourceRCTemplate.prototype.createVolumes = function (rootPath) {
var volumes = [];
for (var item in this.names) {
if (this.names[item] === 'flash-recovery-area')
volumes.push({
"name": this.names[item],
"hostPath": {
"path": rootPath + "flash_recovery_area"
}
});
else
volumes.push({
"name": this.names[item],
"hostPath": {
"path": rootPath + this.names[item]
}
});
}
return volumes;
};
resourceRCTemplate.prototype.createContainers = function (Obj) {
var containers = [];
containers.push({
"name": "oracle",
"image": this.image,
"imagePullPolicy": "IfNotPresent",
"command": ["/assets/entrypoint.sh"],
"ports": [
{
"containerPort": 1521,
"hostPort": Obj.port || ramdomPort()
}],
"volumeMounts": this.createVolumeMounts()
});
return containers;
};
resourceRCTemplate.prototype.createTemplate = function (Obj) {
return {
"metadata": {
//"name": Obj.name,
"labels": Obj.labels
},
"spec": {
"terminationGracePeriodSeconds": 0,
"containers": this.createContainers(Obj),
"volumes": this.createVolumes(Obj.path)
}
};
};
return resourceRCTemplate;
}());
Kubernetes.resourceRCTemplate = resourceRCTemplate;
function labelToChinese(labels) {
var answer = {};
angular.forEach(labels, function (value, key) {
answer[key] = labelChangeToChines(value, key);
});
return answer;
}
Kubernetes.labelToChinese = labelToChinese;
function findSameNameReplicationControllers(replicationControllers, name) {
var names = [];
replicationControllers.forEach(function (rc) {
var rcName = Kubernetes.getName(rc);
if (rcName.indexof(name) !== -1)
names.push(rcName);
});
if (names.length === 0) {
return name + "_1";
}
else {
var max = 0;
names.forEach(function (value) {
var answer = value.split("_");
var key = parseInt(answer[1]);
if (max < key)
max = key;
});
return name + (max + 1);
}
}
Kubernetes.findSameNameReplicationControllers = findSameNameReplicationControllers;
function isFilterRC(rc) {
var answer = false;
angular.forEach(Core.pathGet(rc, ["metadata", "labels"]), function (value, key) {
if (key === 'isTarget' && value === 'true') {
answer = true;
}
});
return answer;
}
Kubernetes.isFilterRC = isFilterRC;
function isInclude(rcs, rc) {
for (var i in rcs) {
if (Kubernetes.getName(rcs[i]) === Kubernetes.getName(rc))
return true;
}
return false;
}
Kubernetes.isInclude = isInclude;
function labelChangeToChines(value, key) {
var trueValue = '';
switch (key) {
case 'type':
if (value === '01')
trueValue = '财政';
else if (value === '02')
trueValue = '社保';
else
trueValue = value;
break;
case 'batch':
if (value === 'A')
trueValue = '批次A';
else if (value === 'B')
trueValue = '批次B';
else
trueValue = value;
break;
case 'region':
trueValue = Kubernetes.getCountyByCode(value);
break;
case 'system':
trueValue = Kubernetes.getSystemNameById(value);
break;
case 'version':
var reg = new RegExp('^[0-9]$').exec(value);
if (reg)
trueValue = '版本' + reg[0];
else
trueValue = value;
break;
case 'isTarget':
if (value === 'true')
trueValue = '汇总数据库';
else
trueValue = value;
break;
default:
trueValue = value;
}
return trueValue;
}
Kubernetes.labelChangeToChines = labelChangeToChines;
8 years ago
/*
检查迁移,是否有已启动的oracle
8 years ago
export function checkForMigration(replicationControllers:Array<KubePod>, selectItem:Array<any>){
var result = [];
angular.forEach(selectItem, (item) => {
if(checkForExit(replicationControllers, item))
result.push(item);
});
return result;
} */
8 years ago
function checkForExit(replicationControllers, selectItem) {
for (var index in replicationControllers) {
var replicas = replicationControllers[index];
if (Kubernetes.getName(replicas) == selectItem._key && getAnnotationValueBykey(replicas, "year") == selectItem["year"])
return true;
}
return false;
}
Kubernetes.checkForExit = checkForExit;
8 years ago
function getAnnotationValueBykey(replicationController, key) {
var annotations = Kubernetes.getAnnotations(replicationController);
if (annotations && annotations != undefined) {
return annotations[key];
}
}
/*
启动oracle时检查是否正在迁移
*/
function checkForCreateOracle(transferTasks, selectItems) {
var result = [];
angular.forEach(selectItems, function (item) {
if (checkForExitTask(transferTasks, item))
result.push(item);
});
return result;
}
Kubernetes.checkForCreateOracle = checkForCreateOracle;
function checkForExitTask(transferTasks, selectItem) {
for (var index in transferTasks) {
var task = transferTasks[index];
if (task["_key"] == selectItem["_key"] && (task["status"] == "1" || task["status"] == "0") && selectItem["year"] == task.labels.dataYear) {
return true;
}
}
return false;
}
/**
**/
function checkForExtract(replicationControllers) {
var result = [];
angular.forEach(replicationControllers, function (replicas) {
var labels = Kubernetes.getLabels(replicas);
if (labels["isExtract"] == "1")
result.push(replicas);
});
return result;
}
Kubernetes.checkForExtract = checkForExtract;
function checkIsStartSuccess(replicationControllers) {
var result = [];
angular.forEach(replicationControllers, function (replicas) {
var labels = Kubernetes.getLabels(replicas);
if (labels["status"] != "2")
result.push(replicas);
});
return result;
}
Kubernetes.checkIsStartSuccess = checkIsStartSuccess;
8 years ago
;
/*
检查数据否已挂载使用或正在迁移
*/
function checkForMigration(replicationControllers, transferTasks, selectItem) {
var message = "";
for (var index in selectItem) {
var item = selectItem[index];
/*
检查迁移文件是否已挂载使用
*/
for (var i in replicationControllers) {
var labels = Kubernetes.getLabels(replicationControllers[i]);
if (Kubernetes.getName(replicationControllers[i]) == item._key && getAnnotationValueBykey(replicationControllers[i], "year") == item["year"] && labels.version == item.labels.version) {
message = "数据正在使用";
return message;
}
}
/*
检查迁移文件是否正在迁移
*/
for (i in transferTasks) {
if (transferTasks[i]["_key"] == item["_key"] && (transferTasks[i]["status"] == "1" || transferTasks[i]["status"] == "0") && item["year"] == transferTasks[i].labels.dataYear && item.labels.version == transferTasks[i].labels.dataVersion) {
message = "数据正在迁移";
return message;
}
}
}
return message;
}
Kubernetes.checkForMigration = checkForMigration;
function eliminateChechBoxClick() {
console.log($("#tableConfig > thead > tr input:checkbox").is(':checked'));
if ($("#tableConfig > thead > tr input:checkbox").is(':checked')) {
8 years ago
}
}
Kubernetes.eliminateChechBoxClick = eliminateChechBoxClick;
/*
是否已存在当前
*/
function alreadyExitInFolder(selectedItems, selectNode) {
var childNodes = selectNode.childNodes;
for (var i in selectedItems) {
var itemName = selectedItems[i].regionalismCode + "_" + selectedItems[i].systemCode;
for (var j in childNodes) {
if (childNodes[j].name == itemName) {
var childrens = childNodes[j].childNodes;
for (var k in childrens)
if (childrens[k].name == selectedItems[i].dataVersion)
return true;
}
}
}
return false;
}
Kubernetes.alreadyExitInFolder = alreadyExitInFolder;
8 years ago
})(Kubernetes || (Kubernetes = {}));
/// <reference path="../../includes.ts"/>
var Configs;
(function (Configs) {
function customAlert(title, content, func, cancel, focus, icon) {
/*
自定义 alert框
title :
text :
func :
cancel:
focus :
icon :
*/
icon = "../../../new/images/msgbox_" + icon + ".png";
create_mask();
var temp = "<div class=\"custom-alert\" >"
+ "<div class=\"custom-alert-title\">" + title + "</div>"
+ "<table class=\"custom-alert-body\"><tr><td class=\"custom-alert-td\"><img src=\""
+ icon + "\" class=\"custom-alert-img\"></td>"
+ "<td ><div calss=\"custom-alert-content\">"
+ content + "</div></td></tr></table>"
+ "<div class=\"custom-alert-bottom\"><input type='button' "
+ " class=\"custom-alert-ok\" value='确认' id=\"msgconfirmb\" onclick=\"Configs.remove();"
+ func + ";\">";
if (null != cancel) {
temp += "&nbsp;&nbsp;&nbsp;<input type='button' class=\"custom-alert-cancel\" onClick='Configs.remove()'>";
}
temp += "</div></div>";
create_msgbox(400, 200, temp);
if (focus == 0 || focus == "0" || null == focus) {
document.getElementById("msgconfirmb").focus();
}
else if (focus == 1 || focus == "1") {
document.getElementById("msgcancelb").focus();
}
}
Configs.customAlert = customAlert;
function get_width() {
return (document.body.clientWidth + document.body.scrollLeft);
}
function get_height() {
return (document.body.clientHeight + document.body.scrollTop);
}
function get_left(w) {
var bw = document.body.clientWidth;
var bh = document.body.clientHeight;
w = parseFloat(w);
return (bw / 2 - w / 2 + document.body.scrollLeft);
}
function get_top(h) {
var bw = document.body.clientWidth;
var bh = document.body.clientHeight;
h = parseFloat(h);
return (bh / 2 - h / 2 + document.body.scrollTop);
}
function create_mask() {
var mask = document.createElement("div");
mask.id = "mask";
mask.style.position = "absolute";
mask.style.filter = "progid:DXImageTransform.Microsoft.Alpha(style=4,opacity=25)";
mask.style.opacity = "0.4";
mask.style.background = "black";
mask.style.top = "0px";
mask.style.left = "0px";
mask.style.width = get_width() + "px";
mask.style.height = get_height() + "px";
mask.style.zIndex = "1000000000";
document.body.appendChild(mask);
}
Configs.create_mask = create_mask;
function create_msgbox(w, h, t) {
var box = document.createElement("div");
box.id = "msgbox";
box.style.position = "absolute";
box.style.width = w + "px";
box.style.height = h + "px";
box.style.overflow = "visible";
box.innerHTML = t;
box.style.zIndex = "1000000001";
document.body.appendChild(box);
re_pos();
}
function re_mask() {
var mask = document.getElementById("mask");
if (null == mask)
return;
mask.style.width = get_width() + "px";
mask.style.height = get_height() + "px";
}
function re_pos() {
var box = document.getElementById("msgbox");
if (null != box) {
var w = box.style.width;
var h = box.style.height;
box.style.left = get_left(w) + "px";
box.style.top = get_top(h) + "px";
}
}
function remove() {
var mask = document.getElementById("mask");
var msgbox = document.getElementById("msgbox");
if (null == mask && null == msgbox)
return;
document.body.removeChild(mask);
document.body.removeChild(msgbox);
}
Configs.remove = remove;
function re_show() {
re_pos();
re_mask();
}
function load_func() {
window.onresize = re_show;
window.onscroll = re_show;
}
})(Configs || (Configs = {}));
8 years ago
/*
read a object from jiangsu province , such as nanjing with some information
读取江苏的某个地区的信息以及系统信息
*/
var Kubernetes;
(function (Kubernetes) {
Kubernetes.system_arr = [{ "sys_name": "部门预算", "sys_id": "1" }, { "sys_name": "非税收入收缴管理系统", "sys_id": "2" },
{ "sys_name": "预算执行系统", "sys_id": "3" }, { "sys_name": "资产管理系统", "sys_id": "4" }, { "sys_name": "用友财政综合管理信息系统", "sys_id": "5" },
{ "sys_name": "用友A++", "sys_id": "6" }, { "sys_name": "浦口财政一体化", "sys_id": "7" }, { "sys_name": "栖霞区财政业务信息管理系统", "sys_id": "8" },
{ "sys_name": "一体化系统", "sys_id": "9" }, { "sys_name": "财政管理一体化系统", "sys_id": "10" }, { "sys_name": "滨江开发区财政分局", "sys_id": "11" },
{ "sys_name": "江宁经济技术开发区财政分局", "sys_id": "12" }, { "sys_name": "江宁科学园财政分局", "sys_id": "13" }, { "sys_name": "财政一体化系统", "sys_id": "14" },
{ "sys_name": "A++财政一体化平台", "sys_id": "15" }, { "sys_name": "非税系统", "sys_id": "16" }, { "sys_name": "一体化预算执行系统", "sys_id": "17" },
{ "sys_name": "一体化", "sys_id": "18" }, { "sys_name": "国库集中支付管理信息系统", "sys_id": "19" }, { "sys_name": "国库集中支付", "sys_id": "20" },
{ "sys_name": "财政专户核算及非税系统", "sys_id": "21" }, { "sys_name": "集中支付系统", "sys_id": "22" }, { "sys_name": "财政专户核算系统", "sys_id": "23" },
{ "sys_name": "非税收缴系统", "sys_id": "24" }, { "sys_name": "财政一体化平台", "sys_id": "25" }, { "sys_name": "富深预算执行", "sys_id": "26" },
{ "sys_name": "用友非税及票据", "sys_id": "27" }, { "sys_name": "用友预算执行", "sys_id": "28" }, { "sys_name": "江苏省财政预算执行系统", "sys_id": "29" },
{ "sys_name": "用友通用软件", "sys_id": "30" }, { "sys_name": "联友软件/通用财务", "sys_id": "31" }, { "sys_name": "用友GRPG-U8R10财政管理软件", "sys_id": "32" },
{ "sys_name": "用友GPP-R10财政管理软件", "sys_id": "33" }, { "sys_name": "富深协通财政一体化管理信息系统", "sys_id": "34" }, { "sys_name": "财务统一核算系统", "sys_id": "35" },
{ "sys_name": "公共财政管理软件", "sys_id": "36" }, { "sys_name": "A++财政一体化信息平台", "sys_id": "37" }, { "sys_name": "新中大公共财务管理软件", "sys_id": "38" },
{ "sys_name": "富深财政一体化管理系统", "sys_id": "39" }, { "sys_name": "新中大公共财政管理系统", "sys_id": "40" }, { "sys_name": "富深协通财政一体化业务管理系统软件", "sys_id": "41" },
{ "sys_name": "新中大公共财政管理软件Gsoft", "sys_id": "42" }, { "sys_name": "财政一体化业务系统", "sys_id": "43" }, { "sys_name": "财政一体化软件", "sys_id": "44" },
{ "sys_name": "非税收入系统", "sys_id": "45" }, { "sys_name": "总预算系统", "sys_id": "46" }, { "sys_name": "国库集中支付系统", "sys_id": "47" }, { "sys_name": "用款计划系统", "sys_id": "48" },
{ "sys_name": "指标管理系统", "sys_id": "49" }, { "sys_name": "财政综合业务管理平台", "sys_id": "50" }, { "sys_name": "财政一体化管理信息系统", "sys_id": "51" }, { "sys_name": "工资统发", "sys_id": "52" },
{ "sys_name": "国有资产", "sys_id": "53" }, { "sys_name": "乡镇非税收入", "sys_id": "54" }, { "sys_name": "乡镇集中支付", "sys_id": "55" }, { "sys_name": "非税征缴系统", "sys_id": "56" },
{ "sys_name": "预算编制与执行系统", "sys_id": "57" }, { "sys_name": "预算管理综合业务平台", "sys_id": "58" }, { "sys_name": "u8管理软件", "sys_id": "59" }, { "sys_name": "财政指标管理系统", "sys_id": "60" },
{ "sys_name": "用友GRP-R9财务管理软件", "sys_id": "61" }, { "sys_name": "用友GRP-U8财政管理软件", "sys_id": "62" }, { "sys_name": "账务处理系统", "sys_id": "63" }, { "sys_name": "R9i财政管理软件", "sys_id": "64" },
{ "sys_name": "u8财政管理软件", "sys_id": "65" }, { "sys_name": "相城区财政综合管理信息系统", "sys_id": "66" }, { "sys_name": "财政非税综合管理系统", "sys_id": "67" }, { "sys_name": "财政综合管理平台", "sys_id": "68" },
{ "sys_name": "吴江区财政一体化", "sys_id": "69" }, { "sys_name": "用友R9", "sys_id": "70" }, { "sys_name": "财政公共应用服务平台", "sys_id": "71" }, { "sys_name": "金蝶K/3创新管理平台", "sys_id": "72" }, { "sys_name": "账务数据系统", "sys_id": "73" },
{ "sys_name": "公共财政服务平台", "sys_id": "74" }, { "sys_name": "会计核算系统", "sys_id": "75" }, { "sys_name": "项目库", "sys_id": "76" }, { "sys_name": "财政总预算(外)专户管理系统", "sys_id": "77" },
{ "sys_name": "城建资金专户管理系统", "sys_id": "78" }, { "sys_name": "农保专户管理系统", "sys_id": "79" }, { "sys_name": "农业发展基金专户管理系统", "sys_id": "80" },
{ "sys_name": "失地农民保障资金专户", "sys_id": "81" }, { "sys_name": "非税收入征管系统", "sys_id": "82" }, { "sys_name": "工资统发人员信息", "sys_id": "83" },
{ "sys_name": "预算指标-国库集中支付系统", "sys_id": "84" }, { "sys_name": "总预算会计核算系统", "sys_id": "85" }, { "sys_name": "部门预算编审系统", "sys_id": "86" },
{ "sys_name": "公务消费管理系统", "sys_id": "87" }, { "sys_name": "国有资产管理系统", "sys_id": "88" }, { "sys_name": "区镇财政管理“一体化”系统", "sys_id": "89" },
{ "sys_name": "县本级财政管理“一体化”系统", "sys_id": "90" }, { "sys_name": "用友政务", "sys_id": "91" }, { "sys_name": "财政专户核算(行政口专项资金)", "sys_id": "92" },
{ "sys_name": "财政专户核算(经建口专项资金)", "sys_id": "93" }, { "sys_name": "财政专户核算(农业保险专账)", "sys_id": "94" }, { "sys_name": "财政专户核算(农业综合开发专账)", "sys_id": "95" },
{ "sys_name": "财政专户核算(社保资金专账)", "sys_id": "96" }, { "sys_name": "财政专户核算(土地出让专账)", "sys_id": "97" }, { "sys_name": "财政专户核算(综合口专项资金)", "sys_id": "98" },
{ "sys_name": "非税收入管理系统", "sys_id": "99" }, { "sys_name": "农业专向及农业发展基金专项", "sys_id": "100" }, { "sys_name": "总预算会计核算", "sys_id": "101" }, { "sys_name": "金财工程一体化支撑平台", "sys_id": "102" },
{ "sys_name": "非税收缴", "sys_id": "103" }, { "sys_name": "学校预算执行", "sys_id": "104" }, { "sys_name": "预算执行", "sys_id": "105" }, { "sys_name": "专项资金", "sys_id": "106" },
{ "sys_name": "总预算", "sys_id": "107" }, { "sys_name": "部门预算系统", "sys_id": "108" }, { "sys_name": "财政专户核算", "sys_id": "109" }, { "sys_name": "财政专户账务系统", "sys_id": "110" },
{ "sys_name": "富深财政一体化业务管理系统", "sys_id": "111" }, { "sys_name": "国有资产系统", "sys_id": "112" }, { "sys_name": "国库专项资金管理系统", "sys_id": "113" },
{ "sys_name": "非税收缴管理系统", "sys_id": "114" }, { "sys_name": "财政管理系统(新农保)", "sys_id": "115" }, { "sys_name": "财政管理系统(城市居民医疗统筹)", "sys_id": "116" },
{ "sys_name": "财政管理系统(集中支付中心)", "sys_id": "117" }, { "sys_name": "财政管理系统(解困金)", "sys_id": "118" }, { "sys_name": "财政管理系统(旧城改造)", "sys_id": "119" },
{ "sys_name": "财政管理系统(社保资金账户)", "sys_id": "120" }, { "sys_name": "财政管理系统(土地出让专帐)", "sys_id": "121" }, { "sys_name": "财政管理系统(预拨及非集中支付中心)", "sys_id": "122" },
{ "sys_name": "财政管理系统(预算外资金)", "sys_id": "123" }, { "sys_name": "总预算会计", "sys_id": "124" }, { "sys_name": "财务核算系统", "sys_id": "125" }, { "sys_name": "工资统发系统", "sys_id": "126" },
{ "sys_name": "预算编审系统", "sys_id": "127" }, { "sys_name": "预算管理系统", "sys_id": "128" }, { "sys_name": "预算外资金(从联网审计中取数)", "sys_id": "129" },
{ "sys_name": "G6-E财务管理系统", "sys_id": "130" }, { "sys_name": "新中大公共财政管理软件", "sys_id": "131" }, { "sys_name": "用友GRP/R9财政管理软件", "sys_id": "132" },
{ "sys_name": "用友GRP-U8R10", "sys_id": "133" }, { "sys_name": "财政一体化管理系统(基建户)", "sys_id": "134" }, { "sys_name": "财政一体化管理系统(集中支付中心)", "sys_id": "135" },
{ "sys_name": "财政一体化管理系统(农业综合开发)", "sys_id": "136" }, { "sys_name": "财政一体化管理系统(预算外资金)", "sys_id": "137" }, { "sys_name": "财政一体化管理系统(支农专户)", "sys_id": "138" },
{ "sys_name": "财政一体化管理系统(总预算)", "sys_id": "139" }, { "sys_name": "国资管理系统", "sys_id": "140" }, { "sys_name": "乡财县管系统", "sys_id": "141" }, { "sys_name": "预算编制管理系统", "sys_id": "142" },
{ "sys_name": "盐城市_市本级_部门预算", "sys_id": "143" }, { "sys_name": "盐城市_市本级_非税收管理系统", "sys_id": "144" }, { "sys_name": "盐城市_市本级_预算执行系统", "sys_id": "145" },
{ "sys_name": "盐城市_亭湖区_财政专户", "sys_id": "146" }, { "sys_name": "盐城市_亭湖区_非税收入管理", "sys_id": "147" }, { "sys_name": "盐城市_亭湖区_国库集中支付管理", "sys_id": "148" },
{ "sys_name": "盐城市_亭湖区_预算指标管理", "sys_id": "149" }, { "sys_name": "盐城市_亭湖区_总预算会计核算", "sys_id": "150" }, { "sys_name": "盐城市_盐都区_财政专户核算系统", "sys_id": "151" },
{ "sys_name": "盐城市_盐都区_非税收入管理系统", "sys_id": "152" }, { "sys_name": "盐城市_盐都区_国库集中支付系统", "sys_id": "153" }, { "sys_name": "盐城市_盐都区_总预算会计核算系统", "sys_id": "154" },
{ "sys_name": "盐城市_响水县_部门预算管理系统", "sys_id": "155" }, { "sys_name": "盐城市_响水县_财政一体化信息系统", "sys_id": "156" }, { "sys_name": "盐城市_响水县_非税收入收缴管理系统", "sys_id": "157" },
{ "sys_name": "盐城市_滨海县财政一体化", "sys_id": "158" }, { "sys_name": "盐城市_阜宁县_财政管理软件", "sys_id": "159" }, { "sys_name": "盐城市_阜宁县_财政管理软件用友U8", "sys_id": "160" },
{ "sys_name": "盐城市_射阳县_财政预算执行一体化系统", "sys_id": "161" }, { "sys_name": "盐城市_建湖县_非税收缴", "sys_id": "162" },
{ "sys_name": "盐城市_建湖县_财政一体化", "sys_id": "163" }, { "sys_name": "盐城市_建湖县_国库集中支付", "sys_id": "164" },
{ "sys_name": "盐城市_东台市_部门预算编审系统", "sys_id": "165" }, { "sys_name": "盐城市_东台市_财政一体化信息系统", "sys_id": "166" },
{ "sys_name": "盐城市_东台市_财政专户核算系统", "sys_id": "167" }, { "sys_name": "盐城市_东台市_非税收入收缴管理系统", "sys_id": "168" },
{ "sys_name": "盐城市_东台市_总预算会计核算系统", "sys_id": "169" }, { "sys_name": "盐城市_大丰区_部门预算系统", "sys_id": "170" },
{ "sys_name": "盐城市_大丰区_财政一体化", "sys_id": "171" }, { "sys_name": "盐城市_大丰区_总预算会计核算财务软件", "sys_id": "172" },
{ "sys_name": "盐城市_经济技术开发区_部门预算软件", "sys_id": "173" }, { "sys_name": "盐城市_经济技术开发区_国库集中支付", "sys_id": "174" },
{ "sys_name": "老非税收入征缴系统", "sys_id": "175" }, { "sys_name": "扬州财政一体化信息管理系统", "sys_id": "176" }, { "sys_name": "非税收入征收", "sys_id": "177" },
{ "sys_name": "部门预算编制", "sys_id": "178" }, { "sys_name": "非税收入收缴", "sys_id": "179" }, { "sys_name": "行政事业性单位国有资产管理", "sys_id": "180" },
{ "sys_name": "财政业务系统", "sys_id": "181" }, { "sys_name": "财政业务综合系统", "sys_id": "182" }, { "sys_name": "江都开发区预算执行系统", "sys_id": "183" },
{ "sys_name": "财政一体化", "sys_id": "184" }, { "sys_name": "富深协通财政一体化业务管理系统", "sys_id": "185" }, { "sys_name": "富深协通非税收缴系统", "sys_id": "186" },
{ "sys_name": "富深协通工资统发系统", "sys_id": "187" }, { "sys_name": "非税收入", "sys_id": "188" }, { "sys_name": "财政综合业务系统", "sys_id": "189" },
{ "sys_name": "泰州市_市本级_部门预算系统", "sys_id": "190" }, { "sys_name": "泰州市_市本级_非税收入系统", "sys_id": "191" }, { "sys_name": "泰州市_市本级_绩效管理系统", "sys_id": "192" },
{ "sys_name": "泰州市_市本级_预算执行系统", "sys_id": "193" }, { "sys_name": "泰州市_市本级_综合治税系统", "sys_id": "194" }, { "sys_name": "泰州市_海陵区_部门预算编制系统", "sys_id": "195" },
{ "sys_name": "泰州市_海陵区_县区财政一体化", "sys_id": "196" }, { "sys_name": "泰州市_高港区_预算执行系统", "sys_id": "197" },
{ "sys_name": "泰州市_姜堰区_部门预算系统", "sys_id": "198" }, { "sys_name": "泰州市_姜堰区_财政一体化系统", "sys_id": "199" },
{ "sys_name": "泰州市_姜堰区_非税收缴系统", "sys_id": "200" }, { "sys_name": "泰州市_姜堰区_预算执行系统", "sys_id": "201" },
{ "sys_name": "泰州市_医药高新区_财政一体化系统", "sys_id": "202" }, { "sys_name": "泰州市_兴化市_部门预算", "sys_id": "203" },
{ "sys_name": "泰州市_兴化市_非税收缴", "sys_id": "204" }, { "sys_name": "泰州市_兴化市_国库集中支付", "sys_id": "205" },
{ "sys_name": "泰州市_靖江市_预算执行系统", "sys_id": "206" }, { "sys_name": "泰州市_靖江市_非税收入收缴", "sys_id": "207" },
{ "sys_name": "泰州市_靖江市_部门预算编审系统", "sys_id": "208" }, { "sys_name": "泰州市_泰兴市_部门预算系统", "sys_id": "209" },
{ "sys_name": "泰州市_泰兴市_非税收入管理系统", "sys_id": "210" }, { "sys_name": "泰州市_泰兴市_预算执行系统", "sys_id": "211" },
{ "sys_name": "部门预算管理系统", "sys_id": "212" }, { "sys_name": "财政一体化平台及国库集中支付系统", "sys_id": "213" },
{ "sys_name": "新中大非税收入管理", "sys_id": "214" }, { "sys_name": "联友财务管理系统", "sys_id": "215" }, { "sys_name": "国库集中支付、指标管理系统", "sys_id": "216" },
{ "sys_name": "开发区总预算系统", "sys_id": "217" }, { "sys_name": "国库账务系统", "sys_id": "218" }, { "sys_name": "化学工业园区非税收入管理系统", "sys_id": "219" },
{ "sys_name": "非税收入账套", "sys_id": "220" }, { "sys_name": "化学工业园区预算执行系统", "sys_id": "221" }, { "sys_name": "会计核算", "sys_id": "222" },
{ "sys_name": "总预算会计账", "sys_id": "223" }, { "sys_name": "预算内外收支核算系统", "sys_id": "224" }, { "sys_name": "账户核算系统", "sys_id": "225" },
{ "sys_name": "总预算核算系统", "sys_id": "226" }, { "sys_name": "账务处理系统(收支分类改革升级版)", "sys_id": "227" }, { "sys_name": "财政预算外业务", "sys_id": "228" },
{ "sys_name": "用友U8R10财政一体化平台", "sys_id": "229" }, { "sys_name": "开发区财政系统", "sys_id": "230" }, { "sys_name": "高新区总预算系统", "sys_id": "231" },
{ "sys_name": "开发区公共财政服务平台", "sys_id": "232" }, { "sys_name": "用友GRP-U8管理软件", "sys_id": "233" }, { "sys_name": "盐城市_城南新区_国库集中支付系统", "sys_id": "234" },
{ "sys_name": "盐城市_城南新区_总预算账务处理系统", "sys_id": "235" }, { "sys_name": "财政预算指标管理", "sys_id": "236" }, { "sys_name": "泰州市_市本级_行政管理系统", "sys_id": "237" },
{ "sys_name": "新中大财务软件", "sys_id": "238" }, { "sys_name": "开发区新中大财务核算系统", "sys_id": "239" }, { "sys_name": "开发区账务系统", "sys_id": "240" }];
Kubernetes.origin_place_arr = [{ "city_code": "3201", "city": "南京市", "county": "市本级", "county_code": "320100", "sys_name": "部门预算", "sys_code": "BMYS" },
{ "city_code": "3201", "city": "南京市", "county": "市本级", "county_code": "320100", "sys_name": "非税收入收缴管理系统", "sys_code": "FSSR" },
{ "city_code": "3201", "city": "南京市", "county": "市本级", "county_code": "320100", "sys_name": "预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3201", "city": "南京市", "county": "市本级", "county_code": "320100", "sys_name": "资产管理系统", "sys_code": "ZCGL" },
{ "city_code": "3201", "city": "南京市", "county": "玄武区", "county_code": "320102", "sys_name": "预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3201", "city": "南京市", "county": "秦淮区", "county_code": "320104", "sys_name": "用友财政综合管理信息系统", "sys_code": "YTH" },
{ "city_code": "3201", "city": "南京市", "county": "建邺区", "county_code": "320105", "sys_name": "预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3201", "city": "南京市", "county": "鼓楼区", "county_code": "320106", "sys_name": "用友A++", "sys_code": "YTH" },
{ "city_code": "3201", "city": "南京市", "county": "浦口区", "county_code": "320111", "sys_name": "浦口财政一体化", "sys_code": "YTH" },
{ "city_code": "3201", "city": "南京市", "county": "栖霞区", "county_code": "320113", "sys_name": "栖霞区财政业务信息管理系统", "sys_code": "YTH" },
{ "city_code": "3201", "city": "南京市", "county": "雨花台区", "county_code": "320114", "sys_name": "一体化系统", "sys_code": "YTH" },
{ "city_code": "3201", "city": "南京市", "county": "江宁区", "county_code": "320115", "sys_name": "财政管理一体化系统", "sys_code": "YTH" },
{ "city_code": "3201", "city": "南京市", "county": "江宁区", "county_code": "320115", "sys_name": "滨江开发区财政分局", "sys_code": "YTH" },
{ "city_code": "3201", "city": "南京市", "county": "江宁区", "county_code": "320115", "sys_name": "江宁经济技术开发区财政分局", "sys_code": "YTH" },
{ "city_code": "3201", "city": "南京市", "county": "江宁区", "county_code": "320115", "sys_name": "江宁科学园财政分局", "sys_code": "YTH" },
{ "city_code": "3201", "city": "南京市", "county": "六合区", "county_code": "320116", "sys_name": "一体化系统", "sys_code": "YTH" },
{ "city_code": "3201", "city": "南京市", "county": "高淳区", "county_code": "320118", "sys_name": "财政一体化系统", "sys_code": "YTH" },
{ "city_code": "3201", "city": "南京市", "county": "溧水区", "county_code": "320124", "sys_name": "A++财政一体化平台", "sys_code": "YTH" },
{ "city_code": "3202", "city": "无锡市", "county": "市本级", "county_code": "320200", "sys_name": "财政一体化系统", "sys_code": "YTH" },
{ "city_code": "3202", "city": "无锡市", "county": "市本级", "county_code": "320200", "sys_name": "非税收入收缴管理系统", "sys_code": "FSSR" },
{ "city_code": "3202", "city": "无锡市", "county": "崇安区", "county_code": "320202", "sys_name": "非税系统", "sys_code": "FSSR" },
{ "city_code": "3202", "city": "无锡市", "county": "崇安区", "county_code": "320202", "sys_name": "一体化预算执行系统", "sys_code": "YTH" },
{ "city_code": "3202", "city": "无锡市", "county": "南长区", "county_code": "320203", "sys_name": "非税系统", "sys_code": "FSSR" },
{ "city_code": "3202", "city": "无锡市", "county": "南长区", "county_code": "320203", "sys_name": "一体化", "sys_code": "YTH" },
{ "city_code": "3202", "city": "无锡市", "county": "北塘区", "county_code": "320204", "sys_name": "国库集中支付管理信息系统", "sys_code": "GKZF" },
{ "city_code": "3202", "city": "无锡市", "county": "锡山区", "county_code": "320205", "sys_name": "国库集中支付", "sys_code": "GKZF" },
{ "city_code": "3202", "city": "无锡市", "county": "锡山区", "county_code": "320205", "sys_name": "财政专户核算及非税系统", "sys_code": "ZHHS_FSSR" },
{ "city_code": "3202", "city": "无锡市", "county": "惠山区", "county_code": "320206", "sys_name": "财政一体化系统", "sys_code": "YTH" },
{ "city_code": "3202", "city": "无锡市", "county": "滨湖区", "county_code": "320211", "sys_name": "集中支付系统", "sys_code": "GKZF" },
{ "city_code": "3202", "city": "无锡市", "county": "滨湖区", "county_code": "320211", "sys_name": "非税系统", "sys_code": "FSSR" },
{ "city_code": "3202", "city": "无锡市", "county": "滨湖区", "county_code": "320211", "sys_name": "财政专户核算系统", "sys_code": "ZHHS" },
{ "city_code": "3202", "city": "无锡市", "county": "新区", "county_code": "320214", "sys_name": "预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3202", "city": "无锡市", "county": "新区", "county_code": "320214", "sys_name": "非税收缴系统", "sys_code": "FSSR" },
{ "city_code": "3202", "city": "无锡市", "county": "新区", "county_code": "320214", "sys_name": "财政专户核算系统", "sys_code": "ZHHS" },
{ "city_code": "3202", "city": "无锡市", "county": "江阴市", "county_code": "320281", "sys_name": "财政一体化平台", "sys_code": "YTH" },
{ "city_code": "3202", "city": "无锡市", "county": "宜兴市", "county_code": "320282", "sys_name": "非税收缴系统", "sys_code": "FSSR" },
{ "city_code": "3202", "city": "无锡市", "county": "宜兴市", "county_code": "320282", "sys_name": "财政一体化平台", "sys_code": "YTH" },
{ "city_code": "3203", "city": "徐州市", "county": "市本级", "county_code": "320300", "sys_name": "富深预算执行", "sys_code": "YSZX" },
{ "city_code": "3203", "city": "徐州市", "county": "市本级", "county_code": "320300", "sys_name": "用友非税及票据", "sys_code": "FSSR" },
{ "city_code": "3203", "city": "徐州市", "county": "市本级", "county_code": "320300", "sys_name": "用友预算执行", "sys_code": "YSZX" },
{ "city_code": "3203", "city": "徐州市", "county": "鼓楼区", "county_code": "320302", "sys_name": "江苏省财政预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3203", "city": "徐州市", "county": "鼓楼区", "county_code": "320302", "sys_name": "用友通用软件", "sys_code": "KJHS" },
{ "city_code": "3203", "city": "徐州市", "county": "云龙区", "county_code": "320303", "sys_name": "江苏省财政预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3203", "city": "徐州市", "county": "云龙区", "county_code": "320303", "sys_name": "联友软件/通用财务", "sys_code": "KJHS" },
{ "city_code": "3203", "city": "徐州市", "county": "云龙区", "county_code": "320303", "sys_name": "用友GRPG-U8R10财政管理软件", "sys_code": "YSZX" },
{ "city_code": "3203", "city": "徐州市", "county": "贾汪区", "county_code": "320305", "sys_name": "用友GPP-R10财政管理软件", "sys_code": "KJHS" },
{ "city_code": "3203", "city": "徐州市", "county": "泉山区", "county_code": "320311", "sys_name": "富深协通财政一体化管理信息系统", "sys_code": "YTH" },
{ "city_code": "3203", "city": "徐州市", "county": "铜山区", "county_code": "320312", "sys_name": "财务统一核算系统", "sys_code": "KJHS" },
{ "city_code": "3203", "city": "徐州市", "county": "铜山区", "county_code": "320312", "sys_name": "非税收入收缴管理系统", "sys_code": "FSSR" },
{ "city_code": "3203", "city": "徐州市", "county": "铜山区", "county_code": "320312", "sys_name": "公共财政管理软件", "sys_code": "YSZX" },
{ "city_code": "3203", "city": "徐州市", "county": "丰县", "county_code": "320321", "sys_name": "A++财政一体化信息平台", "sys_code": "YTH" },
{ "city_code": "3203", "city": "徐州市", "county": "丰县", "county_code": "320321", "sys_name": "新中大公共财务管理软件", "sys_code": "KJHS" },
{ "city_code": "3203", "city": "徐州市", "county": "沛县", "county_code": "320322", "sys_name": "富深财政一体化管理系统", "sys_code": "YTH" },
{ "city_code": "3203", "city": "徐州市", "county": "沛县", "county_code": "320322", "sys_name": "新中大公共财政管理系统", "sys_code": "KJHS" },
{ "city_code": "3203", "city": "徐州市", "county": "睢宁县", "county_code": "320324", "sys_name": "富深协通财政一体化业务管理系统软件", "sys_code": "YTH" },
{ "city_code": "3203", "city": "徐州市", "county": "睢宁县", "county_code": "320324", "sys_name": "新中大公共财政管理软件Gsoft", "sys_code": "KJHS" },
{ "city_code": "3203", "city": "徐州市", "county": "新沂市", "county_code": "320381", "sys_name": "江苏省财政预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3203", "city": "徐州市", "county": "邳州", "county_code": "320382", "sys_name": "财政一体化系统", "sys_code": "YTH" },
{ "city_code": "3204", "city": "常州市", "county": "本级", "county_code": "320400", "sys_name": "财政一体化业务系统", "sys_code": "YTH" },
{ "city_code": "3204", "city": "常州市", "county": "天宁区", "county_code": "320402", "sys_name": "财政一体化软件", "sys_code": "YTH" },
{ "city_code": "3204", "city": "常州市", "county": "天宁区", "county_code": "320402", "sys_name": "非税收入系统", "sys_code": "FSSR" },
{ "city_code": "3204", "city": "常州市", "county": "天宁区", "county_code": "320402", "sys_name": "总预算系统", "sys_code": "YSZX" },
{ "city_code": "3204", "city": "常州市", "county": "钟楼区", "county_code": "320404", "sys_name": "非税收入系统", "sys_code": "FSSR" },
{ "city_code": "3204", "city": "常州市", "county": "钟楼区", "county_code": "320404", "sys_name": "国库集中支付系统", "sys_code": "GKZF" },
{ "city_code": "3204", "city": "常州市", "county": "钟楼区", "county_code": "320404", "sys_name": "用款计划系统", "sys_code": "JHGL" },
{ "city_code": "3204", "city": "常州市", "county": "钟楼区", "county_code": "320404", "sys_name": "指标管理系统", "sys_code": "ZBGL" },
{ "city_code": "3204", "city": "常州市", "county": "钟楼区", "county_code": "320404", "sys_name": "总预算系统", "sys_code": "ZYS" },
{ "city_code": "3204", "city": "常州市", "county": "新北区", "county_code": "320411", "sys_name": "财政综合业务管理平台", "sys_code": "YTH" },
{ "city_code": "3204", "city": "常州市", "county": "武进区", "county_code": "320412", "sys_name": "财政一体化管理信息系统", "sys_code": "YTH" },
{ "city_code": "3204", "city": "常州市", "county": "溧阳市", "county_code": "320481", "sys_name": "部门预算", "sys_code": "BMYS" },
{ "city_code": "3204", "city": "常州市", "county": "溧阳市", "county_code": "320481", "sys_name": "工资统发", "sys_code": "GZTF" },
{ "city_code": "3204", "city": "常州市", "county": "溧阳市", "county_code": "320481", "sys_name": "国有资产", "sys_code": "ZCGL" },
{ "city_code": "3204", "city": "常州市", "county": "溧阳市", "county_code": "320481", "sys_name": "乡镇非税收入", "sys_code": "XZFS" },
{ "city_code": "3204", "city": "常州市", "county": "溧阳市", "county_code": "320481", "sys_name": "乡镇集中支付", "sys_code": "XZGK" },
{ "city_code": "3204", "city": "常州市", "county": "金坛区", "county_code": "320482", "sys_name": "预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3205", "city": "苏州市", "county": "市本级", "county_code": "320500", "sys_name": "非税征缴系统", "sys_code": "FSSR" },
{ "city_code": "3205", "city": "苏州市", "county": "市本级", "county_code": "320500", "sys_name": "预算编制与执行系统", "sys_code": "YSZX" },
{ "city_code": "3205", "city": "苏州市", "county": "工业园区", "county_code": "320501", "sys_name": "预算管理综合业务平台", "sys_code": "YSGL" },
{ "city_code": "3205", "city": "苏州市", "county": "虎丘区", "county_code": "320505", "sys_name": "u8管理软件", "sys_code": "CZGL" },
{ "city_code": "3205", "city": "苏州市", "county": "虎丘区", "county_code": "320505", "sys_name": "财政指标管理系统", "sys_code": "ZBGL" },
{ "city_code": "3205", "city": "苏州市", "county": "虎丘区", "county_code": "320505", "sys_name": "国库集中支付系统", "sys_code": "GKZF" },
{ "city_code": "3205", "city": "苏州市", "county": "虎丘区", "county_code": "320505", "sys_name": "用友GRP-R9财务管理软件", "sys_code": "CWGL" },
{ "city_code": "3205", "city": "苏州市", "county": "虎丘区", "county_code": "320505", "sys_name": "用友GRP-U8财政管理软件", "sys_code": "CWGL" },
{ "city_code": "3205", "city": "苏州市", "county": "虎丘区", "county_code": "320505", "sys_name": "账务处理系统", "sys_code": "ZWCL" },
{ "city_code": "3205", "city": "苏州市", "county": "吴中区", "county_code": "320506", "sys_name": "R9i财政管理软件", "sys_code": "CZGL" },
{ "city_code": "3205", "city": "苏州市", "county": "吴中区", "county_code": "320506", "sys_name": "部门预算", "sys_code": "BMYS" },
{ "city_code": "3205", "city": "苏州市", "county": "吴中区", "county_code": "320506", "sys_name": "财政一体化平台", "sys_code": "YTH" },
{ "city_code": "3205", "city": "苏州市", "county": "吴中区", "county_code": "320506", "sys_name": "非税系统", "sys_code": "FSSR" },
{ "city_code": "3205", "city": "苏州市", "county": "相城区", "county_code": "320507", "sys_name": "u8财政管理软件", "sys_code": "CZGL" },
{ "city_code": "3205", "city": "苏州市", "county": "相城区", "county_code": "320507", "sys_name": "相城区财政综合管理信息系统", "sys_code": "YTH" },
{ "city_code": "3205", "city": "苏州市", "county": "姑苏区", "county_code": "320508", "sys_name": "财政非税综合管理系统", "sys_code": "FSSR" },
{ "city_code": "3205", "city": "苏州市", "county": "姑苏区", "county_code": "320508", "sys_name": "财政综合管理平台", "sys_code": "YTH" },
{ "city_code": "3205", "city": "苏州市", "county": "吴江区", "county_code": "320509", "sys_name": "吴江区财政一体化", "sys_code": "YTH" },
{ "city_code": "3205", "city": "苏州市", "county": "常熟市", "county_code": "320581", "sys_name": "非税收入收缴管理系统", "sys_code": "FSSR" },
{ "city_code": "3205", "city": "苏州市", "county": "常熟市", "county_code": "320581", "sys_name": "用友R9", "sys_code": "KJHS" },
{ "city_code": "3205", "city": "苏州市", "county": "常熟市", "county_code": "320581", "sys_name": "预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3205", "city": "苏州市", "county": "张家港市", "county_code": "320582", "sys_name": "财政公共应用服务平台", "sys_code": "GGFW" },
{ "city_code": "3205", "city": "苏州市", "county": "张家港市", "county_code": "320582", "sys_name": "金蝶K/3创新管理平台", "sys_code": "CZGL" },
{ "city_code": "3205", "city": "苏州市", "county": "张家港市", "county_code": "320582", "sys_name": "账务数据系统", "sys_code": "KJHS" },
{ "city_code": "3205", "city": "苏州市", "county": "昆山市", "county_code": "320583", "sys_name": "非税收入收缴管理系统", "sys_code": "FSSR" },
{ "city_code": "3205", "city": "苏州市", "county": "昆山市", "county_code": "320583", "sys_name": "公共财政服务平台", "sys_code": "GGFW" },
{ "city_code": "3205", "city": "苏州市", "county": "昆山市", "county_code": "320583", "sys_name": "国库集中支付系统", "sys_code": "GKZF" },
{ "city_code": "3205", "city": "苏州市", "county": "太仓市", "county_code": "320585", "sys_name": "非税收入系统", "sys_code": "FSSR" },
{ "city_code": "3205", "city": "苏州市", "county": "太仓市", "county_code": "320585", "sys_name": "会计核算系统", "sys_code": "KJHS" },
{ "city_code": "3205", "city": "苏州市", "county": "太仓市", "county_code": "320585", "sys_name": "项目库", "sys_code": "XMK" },
{ "city_code": "3205", "city": "苏州市", "county": "太仓市", "county_code": "320585", "sys_name": "预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3206", "city": "南通市", "county": "本级", "county_code": "320600", "sys_name": "预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3206", "city": "南通市", "county": "崇川区", "county_code": "320602", "sys_name": "预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3206", "city": "南通市", "county": "港闸区", "county_code": "320611", "sys_name": "财政总预算(外)专户管理系统", "sys_code": "YSWZH" },
{ "city_code": "3206", "city": "南通市", "county": "港闸区", "county_code": "320611", "sys_name": "城建资金专户管理系统", "sys_code": "CJZH" },
{ "city_code": "3206", "city": "南通市", "county": "港闸区", "county_code": "320611", "sys_name": "农保专户管理系统", "sys_code": "NBZH" },
{ "city_code": "3206", "city": "南通市", "county": "港闸区", "county_code": "320611", "sys_name": "农业发展基金专户管理系统", "sys_code": "NFJJ" },
{ "city_code": "3206", "city": "南通市", "county": "港闸区", "county_code": "320611", "sys_name": "失地农民保障资金专户", "sys_code": "SDNM" },
{ "city_code": "3206", "city": "南通市", "county": "港闸区", "county_code": "320611", "sys_name": "预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3206", "city": "南通市", "county": "通州区", "county_code": "320612", "sys_name": "非税收入征管系统", "sys_code": "FSSR" },
{ "city_code": "3206", "city": "南通市", "county": "通州区", "county_code": "320612", "sys_name": "工资统发人员信息", "sys_code": "GZTF" },
{ "city_code": "3206", "city": "南通市", "county": "通州区", "county_code": "320612", "sys_name": "预算指标-国库集中支付系统", "sys_code": "YSZX" },
{ "city_code": "3206", "city": "南通市", "county": "通州区", "county_code": "320612", "sys_name": "总预算会计核算系统", "sys_code": "KJHS" },
{ "city_code": "3206", "city": "南通市", "county": "海安县", "county_code": "320621", "sys_name": "部门预算编审系统", "sys_code": "BMYS" },
{ "city_code": "3206", "city": "南通市", "county": "海安县", "county_code": "320621", "sys_name": "公务消费管理系统", "sys_code": "GWXF" },
{ "city_code": "3206", "city": "南通市", "county": "海安县", "county_code": "320621", "sys_name": "国有资产管理系统", "sys_code": "ZCGL" },
{ "city_code": "3206", "city": "南通市", "county": "海安县", "county_code": "320621", "sys_name": "区镇财政管理“一体化”系统", "sys_code": "XZYTH" },
{ "city_code": "3206", "city": "南通市", "county": "海安县", "county_code": "320621", "sys_name": "县本级财政管理“一体化”系统", "sys_code": "YTH" },
{ "city_code": "3206", "city": "南通市", "county": "如东县", "county_code": "320623", "sys_name": "用友政务", "sys_code": "YTH" },
{ "city_code": "3206", "city": "南通市", "county": "启东市", "county_code": "320681", "sys_name": "财政专户核算(行政口专项资金)", "sys_code": "ZHXZ" },
{ "city_code": "3206", "city": "南通市", "county": "启东市", "county_code": "320681", "sys_name": "财政专户核算(经建口专项资金)", "sys_code": "ZHJJ" },
{ "city_code": "3206", "city": "南通市", "county": "启东市", "county_code": "320681", "sys_name": "财政专户核算(农业保险专账)", "sys_code": "ZHNB" },
{ "city_code": "3206", "city": "南通市", "county": "启东市", "county_code": "320681", "sys_name": "财政专户核算(农业综合开发专账)", "sys_code": "ZHNF" },
{ "city_code": "3206", "city": "南通市", "county": "启东市", "county_code": "320681", "sys_name": "财政专户核算(社保资金专账)", "sys_code": "ZHSB" },
{ "city_code": "3206", "city": "南通市", "county": "启东市", "county_code": "320681", "sys_name": "财政专户核算(土地出让专账)", "sys_code": "ZHTD" },
{ "city_code": "3206", "city": "南通市", "county": "启东市", "county_code": "320681", "sys_name": "财政专户核算(综合口专项资金)", "sys_code": "ZHZH" },
{ "city_code": "3206", "city": "南通市", "county": "启东市", "county_code": "320681", "sys_name": "非税收入管理系统", "sys_code": "FSSR" },
{ "city_code": "3206", "city": "南通市", "county": "启东市", "county_code": "320681", "sys_name": "农业专向及农业发展基金专项", "sys_code": "NFZX" },
{ "city_code": "3206", "city": "南通市", "county": "启东市", "county_code": "320681", "sys_name": "预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3206", "city": "南通市", "county": "启东市", "county_code": "320681", "sys_name": "总预算会计核算", "sys_code": "KJHS" },
{ "city_code": "3206", "city": "南通市", "county": "如皋市", "county_code": "320682", "sys_name": "金财工程一体化支撑平台", "sys_code": "YTH" },
{ "city_code": "3206", "city": "南通市", "county": "海门市", "county_code": "320684", "sys_name": "非税收缴", "sys_code": "FSSR" },
{ "city_code": "3206", "city": "南通市", "county": "海门市", "county_code": "320684", "sys_name": "学校预算执行", "sys_code": "YSZXXX" },
{ "city_code": "3206", "city": "南通市", "county": "海门市", "county_code": "320684", "sys_name": "预算执行", "sys_code": "YSZX" },
{ "city_code": "3206", "city": "南通市", "county": "海门市", "county_code": "320684", "sys_name": "预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3206", "city": "南通市", "county": "海门市", "county_code": "320684", "sys_name": "专项资金", "sys_code": "ZXZJ" },
{ "city_code": "3206", "city": "南通市", "county": "海门市", "county_code": "320684", "sys_name": "总预算", "sys_code": "ZYS" },
{ "city_code": "3207", "city": "连云港市", "county": "市本级", "county_code": "320700", "sys_name": "部门预算系统", "sys_code": "BMYS" },
{ "city_code": "3207", "city": "连云港市", "county": "市本级", "county_code": "320700", "sys_name": "财政专户核算", "sys_code": "ZHHS" },
{ "city_code": "3207", "city": "连云港市", "county": "市本级", "county_code": "320700", "sys_name": "非税收入系统", "sys_code": "FSSR" },
{ "city_code": "3207", "city": "连云港市", "county": "市本级", "county_code": "320700", "sys_name": "预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3207", "city": "连云港市", "county": "连云区", "county_code": "320703", "sys_name": "财政专户账务系统", "sys_code": "ZHHS" },
{ "city_code": "3207", "city": "连云港市", "county": "连云区", "county_code": "320703", "sys_name": "富深财政一体化管理系统", "sys_code": "YTH" },
{ "city_code": "3207", "city": "连云港市", "county": "海州区", "county_code": "320706", "sys_name": "富深财政一体化业务管理系统", "sys_code": "" },
{ "city_code": "3207", "city": "连云港市", "county": "海州区", "county_code": "320706", "sys_name": "新中大公共财政管理系统", "sys_code": "" },
{ "city_code": "3207", "city": "连云港市", "county": "赣榆区", "county_code": "320721", "sys_name": "财政一体化平台", "sys_code": "YTH" },
{ "city_code": "3207", "city": "连云港市", "county": "赣榆区", "county_code": "320721", "sys_name": "国有资产系统", "sys_code": "CZGL" },
{ "city_code": "3207", "city": "连云港市", "county": "东海县", "county_code": "320722", "sys_name": "部门预算系统", "sys_code": "BMYS" },
{ "city_code": "3207", "city": "连云港市", "county": "东海县", "county_code": "320722", "sys_name": "国库专项资金管理系统", "sys_code": "ZXZJ" },
{ "city_code": "3207", "city": "连云港市", "county": "东海县", "county_code": "320722", "sys_name": "国有资产管理系统", "sys_code": "ZCGL" },
{ "city_code": "3207", "city": "连云港市", "county": "东海县", "county_code": "320722", "sys_name": "预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3207", "city": "连云港市", "county": "灌云县", "county_code": "320723", "sys_name": "财政一体化平台", "sys_code": "YTH" },
{ "city_code": "3207", "city": "连云港市", "county": "灌南县", "county_code": "320724", "sys_name": "非税系统", "sys_code": "FSSR" },
{ "city_code": "3207", "city": "连云港市", "county": "灌南县", "county_code": "320724", "sys_name": "预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3208", "city": "淮安市", "county": "市本级", "county_code": "320800", "sys_name": "非税收缴管理系统", "sys_code": "FSSR" },
{ "city_code": "3208", "city": "淮安市", "county": "市本级", "county_code": "320800", "sys_name": "预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3208", "city": "淮安市", "county": "清河区", "county_code": "320802", "sys_name": "财政管理系统(新农保)", "sys_code": "ZHNB" },
{ "city_code": "3208", "city": "淮安市", "county": "清河区", "county_code": "320802", "sys_name": "财政管理系统(城市居民医疗统筹)", "sys_code": "ZHYB" },
{ "city_code": "3208", "city": "淮安市", "county": "清河区", "county_code": "320802", "sys_name": "财政管理系统(集中支付中心)", "sys_code": "GKZF" },
{ "city_code": "3208", "city": "淮安市", "county": "清河区", "county_code": "320802", "sys_name": "财政管理系统(解困金)", "sys_code": "ZHJK" },
{ "city_code": "3208", "city": "淮安市", "county": "清河区", "county_code": "320802", "sys_name": "财政管理系统(旧城改造)", "sys_code": "ZHCG" },
{ "city_code": "3208", "city": "淮安市", "county": "清河区", "county_code": "320802", "sys_name": "财政管理系统(社保资金账户)", "sys_code": "ZHSB" },
{ "city_code": "3208", "city": "淮安市", "county": "清河区", "county_code": "320802", "sys_name": "财政管理系统(土地出让专帐)", "sys_code": "ZHTD" },
{ "city_code": "3208", "city": "淮安市", "county": "清河区", "county_code": "320802", "sys_name": "财政管理系统(预拨及非集中支付中心)", "sys_code": "ZHYB" },
{ "city_code": "3208", "city": "淮安市", "county": "清河区", "county_code": "320802", "sys_name": "财政管理系统(预算外资金)", "sys_code": "YSW" },
{ "city_code": "3208", "city": "淮安市", "county": "清河区", "county_code": "320802", "sys_name": "总预算会计", "sys_code": "KJHS" },
{ "city_code": "3208", "city": "淮安市", "county": "淮安区", "county_code": "320803", "sys_name": "财务核算系统", "sys_code": "KJHS" },
{ "city_code": "3208", "city": "淮安市", "county": "淮安区", "county_code": "320803", "sys_name": "非税收入管理系统", "sys_code": "FSSR" },
{ "city_code": "3208", "city": "淮安市", "county": "淮安区", "county_code": "320803", "sys_name": "工资统发系统", "sys_code": "GZTF" },
{ "city_code": "3208", "city": "淮安市", "county": "淮安区", "county_code": "320803", "sys_name": "用友政务", "sys_code": "YYZW" },
{ "city_code": "3208", "city": "淮安市", "county": "淮安区", "county_code": "320803", "sys_name": "预算编审系统", "sys_code": "BMYS" },
{ "city_code": "3208", "city": "淮安市", "county": "淮安区", "county_code": "320803", "sys_name": "预算管理系统", "sys_code": "YSGL" },
{ "city_code": "3208", "city": "淮安市", "county": "淮安区", "county_code": "320803", "sys_name": "预算外资金(从联网审计中取数)", "sys_code": "YSW" },
{ "city_code": "3208", "city": "淮安市", "county": "淮安区", "county_code": "320803", "sys_name": "预算编审系统", "sys_code": "YSBS" },
{ "city_code": "3208", "city": "淮安市", "county": "淮阴区", "county_code": "320804", "sys_name": "G6-E财务管理系统", "sys_code": "CWGL" },
{ "city_code": "3208", "city": "淮安市", "county": "淮阴区", "county_code": "320804", "sys_name": "江苏省财政预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3208", "city": "淮安市", "county": "淮阴区", "county_code": "320804", "sys_name": "新中大公共财政管理软件", "sys_code": "CZGL" },
{ "city_code": "3208", "city": "淮安市", "county": "淮阴区", "county_code": "320804", "sys_name": "用友GRP/R9财政管理软件", "sys_code": "CZGL" },
{ "city_code": "3208", "city": "淮安市", "county": "淮阴区", "county_code": "320804", "sys_name": "用友GRP-U8R10", "sys_code": "CWGL" },
{ "city_code": "3208", "city": "淮安市", "county": "淮安区", "county_code": "320803", "sys_name": "预算编审系统", "sys_code": "YSBS" },
{ "city_code": "3208", "city": "淮安市", "county": "清浦区", "county_code": "320811", "sys_name": "财政一体化管理系统(基建户)", "sys_code": "ZHJJ" },
{ "city_code": "3208", "city": "淮安市", "county": "清浦区", "county_code": "320811", "sys_name": "财政一体化管理系统(集中支付中心)", "sys_code": "GKZF" },
{ "city_code": "3208", "city": "淮安市", "county": "清浦区", "county_code": "320811", "sys_name": "财政一体化管理系统(农业综合开发)", "sys_code": "ZHNF" },
{ "city_code": "3208", "city": "淮安市", "county": "清浦区", "county_code": "320811", "sys_name": "财政一体化管理系统(预算外资金)", "sys_code": "YSW" },
{ "city_code": "3208", "city": "淮安市", "county": "清浦区", "county_code": "320811", "sys_name": "财政一体化管理系统(支农专户)", "sys_code": "ZHZN" },
{ "city_code": "3208", "city": "淮安市", "county": "清浦区", "county_code": "320811", "sys_name": "财政一体化管理系统(总预算)", "sys_code": "KJHS" },
{ "city_code": "3208", "city": "淮安市", "county": "涟水县", "county_code": "320826", "sys_name": "非税征缴系统", "sys_code": "FSSR" },
{ "city_code": "3208", "city": "淮安市", "county": "涟水县", "county_code": "320826", "sys_name": "国资管理系统", "sys_code": "ZCGL" },
{ "city_code": "3208", "city": "淮安市", "county": "涟水县", "county_code": "320826", "sys_name": "乡财县管系统", "sys_code": "XCXG" },
{ "city_code": "3208", "city": "淮安市", "county": "涟水县", "county_code": "320826", "sys_name": "乡财县管系统", "sys_code": "XCXG" },
{ "city_code": "3208", "city": "淮安市", "county": "涟水县", "county_code": "320826", "sys_name": "预算编制管理系统", "sys_code": "YSBS" },
{ "city_code": "3208", "city": "淮安市", "county": "涟水县", "county_code": "320826", "sys_name": "预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3208", "city": "淮安市", "county": "洪泽县", "county_code": "320829", "sys_name": "非税收入管理系统", "sys_code": "FSSR" },
{ "city_code": "3208", "city": "淮安市", "county": "洪泽县", "county_code": "320829", "sys_name": "预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3208", "city": "淮安市", "county": "盱眙县", "county_code": "320830", "sys_name": "财政一体化平台", "sys_code": "YTH" },
{ "city_code": "3208", "city": "淮安市", "county": "金湖县", "county_code": "320831", "sys_name": "预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3209", "city": "盐城市", "county": "市本级", "county_code": "320900", "sys_name": "盐城市_市本级_部门预算", "sys_code": "BMYS" },
{ "city_code": "3209", "city": "盐城市", "county": "市本级", "county_code": "320900", "sys_name": "盐城市_市本级_非税收管理系统", "sys_code": "FSSR" },
{ "city_code": "3209", "city": "盐城市", "county": "市本级", "county_code": "320900", "sys_name": "盐城市_市本级_预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3209", "city": "盐城市", "county": "亭湖区", "county_code": "320902", "sys_name": "盐城市_亭湖区_财政专户", "sys_code": "ZHHS" },
{ "city_code": "3209", "city": "盐城市", "county": "亭湖区", "county_code": "320902", "sys_name": "盐城市_亭湖区_非税收入管理", "sys_code": "FSSR" },
{ "city_code": "3209", "city": "盐城市", "county": "亭湖区", "county_code": "320902", "sys_name": "盐城市_亭湖区_国库集中支付管理", "sys_code": "GKZF" },
{ "city_code": "3209", "city": "盐城市", "county": "亭湖区", "county_code": "320902", "sys_name": "盐城市_亭湖区_预算指标管理", "sys_code": "ZBGL" },
{ "city_code": "3209", "city": "盐城市", "county": "亭湖区", "county_code": "320902", "sys_name": "盐城市_亭湖区_总预算会计核算", "sys_code": "KJHS" },
{ "city_code": "3209", "city": "盐城市", "county": "盐都区", "county_code": "320903", "sys_name": "盐城市_盐都区_财政专户核算系统", "sys_code": "ZHHS" },
{ "city_code": "3209", "city": "盐城市", "county": "盐都区", "county_code": "320903", "sys_name": "盐城市_盐都区_非税收入管理系统", "sys_code": "FSSR" },
{ "city_code": "3209", "city": "盐城市", "county": "盐都区", "county_code": "320903", "sys_name": "盐城市_盐都区_国库集中支付系统", "sys_code": "GKZF" },
{ "city_code": "3209", "city": "盐城市", "county": "盐都区", "county_code": "320903", "sys_name": "盐城市_盐都区_总预算会计核算系统", "sys_code": "KJHS" },
{ "city_code": "3209", "city": "盐城市", "county": "响水县", "county_code": "320921", "sys_name": "盐城市_响水县_部门预算管理系统", "sys_code": "BMYS" },
{ "city_code": "3209", "city": "盐城市", "county": "响水县", "county_code": "320921", "sys_name": "盐城市_响水县_财政一体化信息系统", "sys_code": "YTH" },
{ "city_code": "3209", "city": "盐城市", "county": "响水县", "county_code": "320921", "sys_name": "盐城市_响水县_非税收入收缴管理系统", "sys_code": "FSSR" },
{ "city_code": "3209", "city": "盐城市", "county": "滨海县", "county_code": "320922", "sys_name": "盐城市_滨海县财政一体化", "sys_code": "YTH" },
{ "city_code": "3209", "city": "盐城市", "county": "阜宁县", "county_code": "320923", "sys_name": "盐城市_阜宁县_财政管理软件", "sys_code": "CZGL" },
{ "city_code": "3209", "city": "盐城市", "county": "阜宁县", "county_code": "320923", "sys_name": "盐城市_阜宁县_财政管理软件用友U8", "sys_code": "YYZW" },
{ "city_code": "3209", "city": "盐城市", "county": "射阳县", "county_code": "320924", "sys_name": "盐城市_射阳县_财政预算执行一体化系统", "sys_code": "YTH" },
{ "city_code": "3209", "city": "盐城市", "county": "建湖县", "county_code": "320925", "sys_name": "盐城市_建湖县_非税收缴", "sys_code": "FSSR" },
{ "city_code": "3209", "city": "盐城市", "county": "建湖县", "county_code": "320925", "sys_name": "盐城市_建湖县_财政一体化", "sys_code": "YTH" },
{ "city_code": "3209", "city": "盐城市", "county": "建湖县", "county_code": "320925", "sys_name": "盐城市_建湖县_国库集中支付", "sys_code": "GKZF" },
{ "city_code": "3209", "city": "盐城市", "county": "东台市", "county_code": "320981", "sys_name": "盐城市_东台市_部门预算编审系统", "sys_code": "BMYS" },
{ "city_code": "3209", "city": "盐城市", "county": "东台市", "county_code": "320981", "sys_name": "盐城市_东台市_财政一体化信息系统", "sys_code": "YTH" },
{ "city_code": "3209", "city": "盐城市", "county": "东台市", "county_code": "320981", "sys_name": "盐城市_东台市_财政专户核算系统", "sys_code": "ZHHS" },
{ "city_code": "3209", "city": "盐城市", "county": "东台市", "county_code": "320981", "sys_name": "盐城市_东台市_非税收入收缴管理系统", "sys_code": "FSSR" },
{ "city_code": "3209", "city": "盐城市", "county": "东台市", "county_code": "320981", "sys_name": "盐城市_东台市_总预算会计核算系统", "sys_code": "KJHS" },
{ "city_code": "3209", "city": "盐城市", "county": "大丰区", "county_code": "320982", "sys_name": "盐城市_大丰区_部门预算系统", "sys_code": "BMYS" },
{ "city_code": "3209", "city": "盐城市", "county": "大丰区", "county_code": "320982", "sys_name": "盐城市_大丰区_财政一体化", "sys_code": "YTH" },
{ "city_code": "3209", "city": "盐城市", "county": "大丰区", "county_code": "320982", "sys_name": "盐城市_大丰区_总预算会计核算财务软件", "sys_code": "KJHS" },
{ "city_code": "3209", "city": "盐城市", "county": "经济技术开发区", "county_code": "320991", "sys_name": "盐城市_经济技术开发区_部门预算软件", "sys_code": "BMYS" },
{ "city_code": "3209", "city": "盐城市", "county": "经济技术开发区", "county_code": "320991", "sys_name": "盐城市_经济技术开发区_国库集中支付", "sys_code": "GKZF" },
{ "city_code": "3210", "city": "扬州市", "county": "市本级", "county_code": "321000", "sys_name": "财政专户核算", "sys_code": "ZHHS" },
{ "city_code": "3210", "city": "扬州市", "county": "市本级", "county_code": "321000", "sys_name": "老非税收入征缴系统", "sys_code": "FSSR" },
{ "city_code": "3210", "city": "扬州市", "county": "市本级", "county_code": "321000", "sys_name": "扬州财政一体化信息管理系统", "sys_code": "YTH" },
{ "city_code": "3210", "city": "扬州市", "county": "广陵区", "county_code": "321002", "sys_name": "财政一体化系统", "sys_code": "YTH" },
{ "city_code": "3210", "city": "扬州市", "county": "广陵区", "county_code": "321002", "sys_name": "非税收入管理系统", "sys_code": "FSSR" },
{ "city_code": "3210", "city": "扬州市", "county": "邗江区", "county_code": "321003", "sys_name": "财政一体化系统", "sys_code": "YTH" },
{ "city_code": "3210", "city": "扬州市", "county": "邗江区", "county_code": "321003", "sys_name": "非税系统", "sys_code": "FSSR" },
{ "city_code": "3210", "city": "扬州市", "county": "邗江区", "county_code": "321003", "sys_name": "预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3210", "city": "扬州市", "county": "宝应县", "county_code": "321023", "sys_name": "非税收入征收", "sys_code": "FSSR" },
{ "city_code": "3210", "city": "扬州市", "county": "宝应县", "county_code": "321023", "sys_name": "预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3210", "city": "扬州市", "county": "仪征市", "county_code": "321081", "sys_name": "部门预算编制", "sys_code": "BMYS" },
{ "city_code": "3210", "city": "扬州市", "county": "仪征市", "county_code": "321081", "sys_name": "非税收入收缴", "sys_code": "FSSR" },
{ "city_code": "3210", "city": "扬州市", "county": "仪征市", "county_code": "321081", "sys_name": "行政事业性单位国有资产管理", "sys_code": "ZCGL" },
{ "city_code": "3210", "city": "扬州市", "county": "仪征市", "county_code": "321081", "sys_name": "预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3210", "city": "扬州市", "county": "高邮市", "county_code": "321084", "sys_name": "财政业务系统", "sys_code": "YTH" },
{ "city_code": "3210", "city": "扬州市", "county": "江都区", "county_code": "321088", "sys_name": "财政业务综合系统", "sys_code": "ZHYW" },
{ "city_code": "3210", "city": "扬州市", "county": "江都区", "county_code": "321088", "sys_name": "江都开发区预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3211", "city": "镇江市", "county": "市本级", "county_code": "321100", "sys_name": "财政一体化", "sys_code": "YTH" },
{ "city_code": "3211", "city": "镇江市", "county": "京口区", "county_code": "321102", "sys_name": "富深协通财政一体化业务管理系统", "sys_code": "YTH" },
{ "city_code": "3211", "city": "镇江市", "county": "京口区", "county_code": "321102", "sys_name": "富深协通非税收缴系统", "sys_code": "FSSR" },
{ "city_code": "3211", "city": "镇江市", "county": "京口区", "county_code": "321102", "sys_name": "富深协通工资统发系统", "sys_code": "GZTF" },
{ "city_code": "3211", "city": "镇江市", "county": "润州区", "county_code": "321111", "sys_name": "部门预算系统", "sys_code": "BMYS" },
{ "city_code": "3211", "city": "镇江市", "county": "润州区", "county_code": "321111", "sys_name": "财政一体化", "sys_code": "YTH" },
{ "city_code": "3211", "city": "镇江市", "county": "润州区", "county_code": "321111", "sys_name": "非税收入", "sys_code": "FSSR" },
{ "city_code": "3211", "city": "镇江市", "county": "丹徒区", "county_code": "321112", "sys_name": "财政综合业务系统", "sys_code": "YTH" },
{ "city_code": "3211", "city": "镇江市", "county": "丹阳市", "county_code": "321181", "sys_name": "部门预算系统", "sys_code": "BMYS" },
{ "city_code": "3211", "city": "镇江市", "county": "丹阳市", "county_code": "321181", "sys_name": "预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3211", "city": "镇江市", "county": "扬中市", "county_code": "321182", "sys_name": "部门预算系统", "sys_code": "BMYS" },
{ "city_code": "3211", "city": "镇江市", "county": "扬中市", "county_code": "321182", "sys_name": "预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3211", "city": "镇江市", "county": "句容市", "county_code": "321183", "sys_name": "非税收入", "sys_code": "FSSR" },
{ "city_code": "3211", "city": "镇江市", "county": "句容市", "county_code": "321183", "sys_name": "预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3212", "city": "泰州市", "county": "市本级", "county_code": "321200", "sys_name": "泰州市_市本级_部门预算系统", "sys_code": "BMYS" },
{ "city_code": "3212", "city": "泰州市", "county": "市本级", "county_code": "321200", "sys_name": "泰州市_市本级_非税收入系统", "sys_code": "FSSR" },
{ "city_code": "3212", "city": "泰州市", "county": "市本级", "county_code": "321200", "sys_name": "泰州市_市本级_绩效管理系统", "sys_code": "JXGL" },
{ "city_code": "3212", "city": "泰州市", "county": "市本级", "county_code": "321200", "sys_name": "泰州市_市本级_预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3212", "city": "泰州市", "county": "市本级", "county_code": "321200", "sys_name": "泰州市_市本级_综合治税系统", "sys_code": "ZHZS" },
{ "city_code": "3212", "city": "泰州市", "county": "海陵区", "county_code": "321202", "sys_name": "泰州市_海陵区_部门预算编制系统", "sys_code": "BMYS" },
{ "city_code": "3212", "city": "泰州市", "county": "海陵区", "county_code": "321202", "sys_name": "泰州市_海陵区_县区财政一体化", "sys_code": "YTH" },
{ "city_code": "3212", "city": "泰州市", "county": "高港区", "county_code": "321203", "sys_name": "泰州市_高港区_预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3212", "city": "泰州市", "county": "姜堰区", "county_code": "321204", "sys_name": "泰州市_姜堰区_部门预算系统", "sys_code": "BMYS" },
{ "city_code": "3212", "city": "泰州市", "county": "姜堰区", "county_code": "321204", "sys_name": "泰州市_姜堰区_财政一体化系统", "sys_code": "YTH" },
{ "city_code": "3212", "city": "泰州市", "county": "姜堰区", "county_code": "321204", "sys_name": "泰州市_姜堰区_非税收缴系统", "sys_code": "FSSR" },
{ "city_code": "3212", "city": "泰州市", "county": "姜堰区", "county_code": "321204", "sys_name": "泰州市_姜堰区_预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3212", "city": "泰州市", "county": "医药高新区", "county_code": "321205", "sys_name": "泰州市_医药高新区_财政一体化系统", "sys_code": "YTH" },
{ "city_code": "3212", "city": "泰州市", "county": "兴化市", "county_code": "321281", "sys_name": "泰州市_兴化市_部门预算", "sys_code": "BMYS" },
{ "city_code": "3212", "city": "泰州市", "county": "兴化市", "county_code": "321281", "sys_name": "泰州市_兴化市_非税收缴", "sys_code": "FSSR" },
{ "city_code": "3212", "city": "泰州市", "county": "兴化市", "county_code": "321281", "sys_name": "泰州市_兴化市_国库集中支付", "sys_code": "GKZF" },
{ "city_code": "3212", "city": "泰州市", "county": "靖江市", "county_code": "321282", "sys_name": "泰州市_靖江市_预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3212", "city": "泰州市", "county": "靖江市", "county_code": "321282", "sys_name": "泰州市_靖江市_非税收入收缴", "sys_code": "FSSR" },
{ "city_code": "3212", "city": "泰州市", "county": "靖江市", "county_code": "321282", "sys_name": "泰州市_靖江市_部门预算编审系统", "sys_code": "BMYS" },
{ "city_code": "3212", "city": "泰州市", "county": "泰兴市", "county_code": "321283", "sys_name": "泰州市_泰兴市_部门预算系统", "sys_code": "BMYS" },
{ "city_code": "3212", "city": "泰州市", "county": "泰兴市", "county_code": "321283", "sys_name": "泰州市_泰兴市_非税收入管理系统", "sys_code": "FSSR" },
{ "city_code": "3212", "city": "泰州市", "county": "泰兴市", "county_code": "321283", "sys_name": "泰州市_泰兴市_预算执行系统", "sys_code": "BMYS" },
{ "city_code": "3213", "city": "宿迁市", "county": "市本级", "county_code": "321300", "sys_name": "部门预算管理系统", "sys_code": "BMYS" },
{ "city_code": "3213", "city": "宿迁市", "county": "市本级", "county_code": "321300", "sys_name": "非税收入管理系统", "sys_code": "FSSR" },
{ "city_code": "3213", "city": "宿迁市", "county": "市本级", "county_code": "321300", "sys_name": "预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3213", "city": "宿迁市", "county": "宿城区", "county_code": "321302", "sys_name": "财政一体化平台及国库集中支付系统", "sys_code": "GKZF" },
{ "city_code": "3213", "city": "宿迁市", "county": "宿城区", "county_code": "321302", "sys_name": "新中大非税收入管理", "sys_code": "FSSR" },
{ "city_code": "3213", "city": "宿迁市", "county": "宿城区", "county_code": "321302", "sys_name": "总预算会计核算系统", "sys_code": "KJHS" },
{ "city_code": "3213", "city": "宿迁市", "county": "宿豫区", "county_code": "321311", "sys_name": "非税收缴管理系统", "sys_code": "FSSR" },
{ "city_code": "3213", "city": "宿迁市", "county": "宿豫区", "county_code": "321311", "sys_name": "联友财务管理系统", "sys_code": "CWGL" },
{ "city_code": "3213", "city": "宿迁市", "county": "宿豫区", "county_code": "321311", "sys_name": "预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3213", "city": "宿迁市", "county": "沭阳县", "county_code": "321322", "sys_name": "非税收入管理系统", "sys_code": "FSSR" },
{ "city_code": "3213", "city": "宿迁市", "county": "沭阳县", "county_code": "321322", "sys_name": "国库集中支付、指标管理系统", "sys_code": "YSZX" },
{ "city_code": "3213", "city": "宿迁市", "county": "沭阳县", "county_code": "321322", "sys_name": "开发区总预算系统", "sys_code": "BMYS" },
{ "city_code": "3213", "city": "宿迁市", "county": "沭阳县", "county_code": "321322", "sys_name": "总预算会计核算", "sys_code": "KJHS" },
{ "city_code": "3213", "city": "宿迁市", "county": "泗阳县", "county_code": "321323", "sys_name": "预算执行", "sys_code": "YSZX" },
{ "city_code": "3213", "city": "宿迁市", "county": "泗洪县", "county_code": "321324", "sys_name": "部门预算系统", "sys_code": "BMYS" },
{ "city_code": "3213", "city": "宿迁市", "county": "泗洪县", "county_code": "321324", "sys_name": "非税收入管理系统", "sys_code": "FSSR" },
{ "city_code": "3213", "city": "宿迁市", "county": "泗洪县", "county_code": "321324", "sys_name": "国库集中支付系统", "sys_code": "GKZF" },
{ "city_code": "3213", "city": "宿迁市", "county": "泗洪县", "county_code": "321324", "sys_name": "国库账务系统", "sys_code": "KJHS" },
{ "city_code": "3201", "city": "南京市", "county": "高新区", "county_code": "320100GXQ", "sys_name": "预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3201", "city": "南京市", "county": "化工园区", "county_code": "320100HGY", "sys_name": "化学工业园区非税收入管理系统", "sys_code": "FSSR" },
{ "city_code": "3201", "city": "南京市", "county": "经济技术开发区", "county_code": "320100JKQ", "sys_name": "非税收入账套", "sys_code": "FSZT" },
{ "city_code": "3201", "city": "南京市", "county": "化工园区", "county_code": "320101HGY", "sys_name": "化学工业园区预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3201", "city": "南京市", "county": "经济技术开发区", "county_code": "320101JKQ", "sys_name": "预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3201", "city": "南京市", "county": "化工园区", "county_code": "320102HGY", "sys_name": "会计核算", "sys_code": "KYHS" },
{ "city_code": "3201", "city": "南京市", "county": "经济技术开发区", "county_code": "320102JKQ", "sys_name": "总预算会计账", "sys_code": "KJHS" },
{ "city_code": "3202", "city": "无锡市", "county": "锡山开发区", "county_code": "320205KFQ", "sys_name": "预算内外收支核算系统", "sys_code": "KJHS" },
{ "city_code": "3202", "city": "无锡市", "county": "滨湖区马山开发区", "county_code": "320211KFQ", "sys_name": "账户核算系统", "sys_code": "ZHHS" },
{ "city_code": "3202", "city": "无锡市", "county": "江阴开发区", "county_code": "320281kfq", "sys_name": "财政一体化平台", "sys_code": "YTH" },
{ "city_code": "3202", "city": "无锡市", "county": "江阴开发区", "county_code": "320281kfq", "sys_name": "账户核算系统", "sys_code": "ZHHS" },
{ "city_code": "3202", "city": "无锡市", "county": "宜兴环科园", "county_code": "320282KFQ", "sys_name": "财务核算系统", "sys_code": "ZHHS" },
{ "city_code": "3202", "city": "无锡市", "county": "宜兴开发区", "county_code": "320282KFQ", "sys_name": "总预算核算系统", "sys_code": "ZHHS" },
{ "city_code": "3203", "city": "徐州市", "county": "经济技术开发区", "county_code": "320300JKQ", "sys_name": "富深协通财政一体化业务管理系统软件", "sys_code": "YTH" },
{ "city_code": "3203", "city": "徐州市", "county": "经济技术开发区", "county_code": "320300JKQ", "sys_name": "账务处理系统(收支分类改革升级版)", "sys_code": "KJHS" },
{ "city_code": "3204", "city": "常州市", "county": "天宁经开区", "county_code": "320402JKQ", "sys_name": "账务处理系统", "sys_code": "KJHS" },
{ "city_code": "3204", "city": "常州市", "county": "钟楼区开发区", "county_code": "320404KFQ", "sys_name": "国库集中支付系统", "sys_code": "GKZF" },
{ "city_code": "3204", "city": "常州市", "county": "钟楼区开发区", "county_code": "320405KFQ", "sys_name": "用款计划系统", "sys_code": "JHGL" },
{ "city_code": "3204", "city": "常州市", "county": "钟楼区开发区", "county_code": "320406KFQ", "sys_name": "指标管理系统", "sys_code": "ZBGL" },
{ "city_code": "3204", "city": "常州市", "county": "钟楼区开发区", "county_code": "320407KFQ", "sys_name": "总预算系统", "sys_code": "ZYS" },
{ "city_code": "3204", "city": "常州市", "county": "经开区", "county_code": "320412JKQ", "sys_name": "财政预算外业务", "sys_code": "YSW" },
{ "city_code": "3204", "city": "常州市", "county": "经开区", "county_code": "320412JKQ", "sys_name": "非税收缴系统", "sys_code": "FSSR" },
{ "city_code": "3204", "city": "常州市", "county": "经开区", "county_code": "320412JKQ", "sys_name": "预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3204", "city": "常州市", "county": "武进高新区", "county_code": "320413GXQ", "sys_name": "财政一体化管理信息系统", "sys_code": "YTH" },
{ "city_code": "3204", "city": "常州市", "county": "溧阳中关村", "county_code": "320481ZGC", "sys_name": "用友U8R10财政一体化平台", "sys_code": "YTH" },
{ "city_code": "3204", "city": "常州市", "county": "溧阳中关村开发区", "county_code": "320481ZGCKF", "sys_name": "用友U8R10财政一体化平台", "sys_code": "YTH" },
{ "city_code": "3205", "city": "苏州市", "county": "相城区开发区", "county_code": "320507KFQ", "sys_name": "开发区财政系统", "sys_code": "YTH" },
{ "city_code": "3205", "city": "苏州市", "county": "常熟市高新区", "county_code": "320581GXQ", "sys_name": "高新区总预算系统", "sys_code": "ZYS" },
{ "city_code": "3205", "city": "苏州市", "county": "昆山市开发区", "county_code": "320583KFQ", "sys_name": "开发区公共财政服务平台", "sys_code": "YTH" },
{ "city_code": "3205", "city": "苏州市", "county": "太仓市新区", "county_code": "320585XQ", "sys_name": "非税收入系统", "sys_code": "FSSR" },
{ "city_code": "3205", "city": "苏州市", "county": "太仓市新区", "county_code": "320586XQ", "sys_name": "会计核算系统", "sys_code": "KJHS" },
{ "city_code": "3205", "city": "苏州市", "county": "太仓市新区", "county_code": "320587XQ", "sys_name": "预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3206", "city": "南通市", "county": "开发区", "county_code": "320600KFQ", "sys_name": "预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3206", "city": "南通市", "county": "苏通园区", "county_code": "320600STY", "sys_name": "预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3206", "city": "南通市", "county": "通州湾示范区", "county_code": "320600TZW", "sys_name": "预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3207", "city": "连云港市", "county": "开发区", "county_code": "320701KFQ", "sys_name": "非税收入", "sys_code": "FSSR" },
{ "city_code": "3208", "city": "淮安市", "county": "开发区", "county_code": "320800KFQ", "sys_name": "用友GRP-U8管理软件", "sys_code": "YTH" },
{ "city_code": "3209", "city": "盐城市", "county": "城南新区", "county_code": "320900CZXQ", "sys_name": "盐城市_城南新区_国库集中支付系统", "sys_code": "GKZF" },
{ "city_code": "3209", "city": "盐城市", "county": "城南新区", "county_code": "320901CZXQ", "sys_name": "盐城市_城南新区_总预算账务处理系统", "sys_code": "KJHS" },
{ "city_code": "3210", "city": "扬州市", "county": "化工园区", "county_code": "321000HGY", "sys_name": "预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3210", "city": "扬州市", "county": "开发区", "county_code": "321000KFQ", "sys_name": "非税收入收缴", "sys_code": "FSSR" },
{ "city_code": "3210", "city": "扬州市", "county": "科技新城", "county_code": "321000KJC", "sys_name": "预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3210", "city": "扬州市", "county": "蜀冈-瘦西湖风景名胜区", "county_code": "321000SXH", "sys_name": "财政预算指标管理", "sys_code": "ZBGL" },
{ "city_code": "3210", "city": "扬州市", "county": "蜀冈-瘦西湖风景名胜区", "county_code": "321000SXH", "sys_name": "总预算会计核算", "sys_code": "KJHS" },
{ "city_code": "3210", "city": "扬州市", "county": "开发区", "county_code": "321001KFQ", "sys_name": "一体化系统", "sys_code": "YTH" },
{ "city_code": "3210", "city": "扬州市", "county": "开发区", "county_code": "321002KFQ", "sys_name": "预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3210", "city": "扬州市", "county": "高邮开发区", "county_code": "321084KFQ", "sys_name": "财政业务系统", "sys_code": "YTH" },
{ "city_code": "3211", "city": "镇江市", "county": "新区", "county_code": "321100XQ", "sys_name": "财政一体化", "sys_code": "YTH" },
{ "city_code": "3212", "city": "泰州市", "county": "市本级", "county_code": "321200", "sys_name": "泰州市_市本级_行政管理系统", "sys_code": "XZGL" },
{ "city_code": "3213", "city": "宿迁市", "county": "湖滨新城", "county_code": "321300HBXC", "sys_name": "新中大财务软件", "sys_code": "KJHS" },
{ "city_code": "3213", "city": "宿迁市", "county": "经开区", "county_code": "321300JKQ", "sys_name": "新中大公共财政管理软件", "sys_code": "YTH" },
{ "city_code": "3213", "city": "宿迁市", "county": "洋河新区", "county_code": "321300YHXQ", "sys_name": "预算执行系统", "sys_code": "YSZX" },
{ "city_code": "3213", "city": "宿迁市", "county": "宿豫区开发区", "county_code": "321311KFQ", "sys_name": "开发区新中大财务核算系统", "sys_code": "KJHS" },
{ "city_code": "3213", "city": "宿迁市", "county": "泗洪县开发区", "county_code": "321324KFQ", "sys_name": "开发区账务系统", "sys_code": "KJHS" }];
function getCountyByCode(code) {
//var jsobj = JSON.parse(origin_place_arr);
var jsobj = Kubernetes.origin_place_arr;
var jsonlength = jsobj.length;
for (var i = 0; i < jsonlength; i++) {
if (jsobj[i].county_code == code) {
return jsobj[i].city + jsobj[i].county;
}
}
return code;
}
Kubernetes.getCountyByCode = getCountyByCode;
function getCodeByCounty(place) {
place = place.replace(/\s*\t*/gim, "");
//var jsobj = JSON.parse(origin_place_arr);
var jsobj = Kubernetes.origin_place_arr;
var jsonlength = jsobj.length;
for (var i = 0; i < jsonlength; i++) {
if (jsobj[i].city === "" || jsobj[i].city == undefined)
continue;
if (jsobj[i].county === "" || jsobj[i].county == undefined)
continue;
if ((place.indexOf(jsobj[i].city) != -1) && (place.indexOf(jsobj[i].county) != -1)) {
return jsobj[i].county_code;
}
}
return place;
}
Kubernetes.getCodeByCounty = getCodeByCounty;
function getSystemNameById(id) {
var temJson = Kubernetes.system_arr;
var sys_size = temJson.length;
for (var i = 0; i < sys_size; i++) {
if (temJson[i].sys_id == id) {
return temJson[i].sys_name;
}
}
return id;
}
Kubernetes.getSystemNameById = getSystemNameById;
function getIdBySystemName(name) {
var temJson = Kubernetes.system_arr;
var sys_size = temJson.length;
for (var i = 0; i < sys_size; i++) {
if (temJson[i].sys_name == name) {
return temJson[i].sys_id;
}
}
return name;
}
Kubernetes.getIdBySystemName = getIdBySystemName;
function getCodeBySystemName(name) {
var jsobj = Kubernetes.origin_place_arr;
var jsonlength = jsobj.length;
for (var i = 0; i < jsonlength; i++) {
if (jsobj[i].sys_name == name) {
return jsobj[i].sys_code;
}
}
return name;
}
Kubernetes.getCodeBySystemName = getCodeBySystemName;
})(Kubernetes || (Kubernetes = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="kubernetesInterfaces.ts"/>
/// <reference path="utilHelpers.ts"/>
/// <reference path="../../configs/ts/customAlert.ts"/>
/// <reference path="readPlacedivision.ts"/>
/// <reference path="../../configs/ts/ConfigsHelper.ts"/>
var Kubernetes;
(function (Kubernetes) {
Kubernetes.context = '/kubernetes';
Kubernetes.hash = '#' + Kubernetes.context;
Kubernetes.defaultRoute = Kubernetes.hash + '/apps';
Kubernetes.pluginName = 'Kubernetes';
Kubernetes.pluginPath = 'plugins/kubernetes/';
Kubernetes.templatePath = Kubernetes.pluginPath + 'html/';
Kubernetes.log = Logger.get(Kubernetes.pluginName);
Kubernetes.keepPollingModel = true;
Kubernetes.defaultIconUrl = Core.url("/img/kubernetes.svg");
Kubernetes.hostIconUrl = Core.url("/img/host.svg");
// this gets set as a pre-bootstrap task
Kubernetes.osConfig = undefined;
Kubernetes.masterUrl = "";
Kubernetes.defaultApiVersion = "v1";
Kubernetes.defaultOSApiVersion = "v1";
Kubernetes.labelFilterTextSeparator = ",";
Kubernetes.defaultNamespace = "default";
Kubernetes.appSuffix = ".app";
// kubernetes service names
Kubernetes.kibanaServiceName = "kibana";
Kubernetes.fabric8ForgeServiceName = "fabric8-forge";
Kubernetes.gogsServiceName = "gogs";
Kubernetes.jenkinsServiceName = "jenkins";
Kubernetes.apimanServiceName = 'apiman';
Kubernetes.isOpenShift = true;
Kubernetes.sshSecretDataKeys = ["ssh-key", "ssh-key.pub"];
Kubernetes.httpsSecretDataKeys = ["username", "password"];
function kubernetesNamespacePath() {
var ns = currentKubernetesNamespace();
if (ns) {
return "/namespaces/" + ns;
}
else {
return "";
8 years ago
}
}
Kubernetes.kubernetesNamespacePath = kubernetesNamespacePath;
function apiPrefix() {
var prefix = Core.pathGet(Kubernetes.osConfig, ['api', 'k8s', 'prefix']);
if (!prefix) {
prefix = 'api';
}
return Core.trimLeading(prefix, '/');
}
Kubernetes.apiPrefix = apiPrefix;
function osApiPrefix() {
var prefix = Core.pathGet(Kubernetes.osConfig, ['api', 'openshift', 'prefix']);
if (!prefix) {
prefix = 'oapi';
}
var answer = Core.trimLeading(prefix, '/');
if (!Kubernetes.isOpenShift) {
return UrlHelpers.join(apiPrefix(), Kubernetes.defaultOSApiVersion, "proxy", kubernetesNamespacePath(), "services/templates", answer);
}
return answer;
}
Kubernetes.osApiPrefix = osApiPrefix;
function masterApiUrl() {
return Kubernetes.masterUrl || "";
8 years ago
}
Kubernetes.masterApiUrl = masterApiUrl;
/** WARNING - this excludes the host name - you probably want to use: kubernetesApiUrl() instead!! */
function kubernetesApiPrefix() {
return UrlHelpers.join(apiPrefix(), Kubernetes.defaultApiVersion);
8 years ago
}
Kubernetes.kubernetesApiPrefix = kubernetesApiPrefix;
function openshiftApiPrefix() {
return UrlHelpers.join(osApiPrefix(), Kubernetes.defaultOSApiVersion);
8 years ago
}
Kubernetes.openshiftApiPrefix = openshiftApiPrefix;
function prefixForType(type) {
if (type === Kubernetes.WatchTypes.NAMESPACES) {
return kubernetesApiPrefix();
8 years ago
}
if (_.any(Kubernetes.NamespacedTypes.k8sTypes, function (t) { return t === type; })) {
return kubernetesApiPrefix();
8 years ago
}
if (_.any(Kubernetes.NamespacedTypes.osTypes, function (t) { return t === type; })) {
return openshiftApiPrefix();
8 years ago
}
// lets assume its an OpenShift extension type
return openshiftApiPrefix();
8 years ago
}
Kubernetes.prefixForType = prefixForType;
function kubernetesApiUrl() {
return UrlHelpers.join(masterApiUrl(), kubernetesApiPrefix());
8 years ago
}
Kubernetes.kubernetesApiUrl = kubernetesApiUrl;
function openshiftApiUrl() {
return UrlHelpers.join(masterApiUrl(), openshiftApiPrefix());
8 years ago
}
Kubernetes.openshiftApiUrl = openshiftApiUrl;
function resourcesUriForKind(type, ns) {
if (ns === void 0) { ns = null; }
if (!ns) {
ns = currentKubernetesNamespace();
8 years ago
}
8 years ago
return UrlHelpers.join(masterApiUrl(), prefixForType(type), namespacePathForKind(type, ns));
}
Kubernetes.resourcesUriForKind = resourcesUriForKind;
function uriTemplateForKubernetesKind(type) {
var urlTemplate = '';
switch (type) {
case Kubernetes.WatchTypes.NAMESPACES:
case "Namespaces":
urlTemplate = UrlHelpers.join('namespaces');
break;
case Kubernetes.WatchTypes.OAUTH_CLIENTS:
case "OAuthClients":
case "OAuthClient":
return UrlHelpers.join('oauthclients');
case Kubernetes.WatchTypes.PROJECTS:
case "Projects":
urlTemplate = UrlHelpers.join('projects');
break;
default:
urlTemplate = UrlHelpers.join('namespaces/:namespace', type, ':id');
8 years ago
}
8 years ago
return urlTemplate;
}
Kubernetes.uriTemplateForKubernetesKind = uriTemplateForKubernetesKind;
function namespacePathForKind(type, ns) {
var urlTemplate = '';
switch (type) {
case Kubernetes.WatchTypes.NAMESPACES:
case "Namespaces":
case "Namespace":
return UrlHelpers.join('namespaces');
case Kubernetes.WatchTypes.NODES:
case "Nodes":
case "node":
return UrlHelpers.join('nodes');
case Kubernetes.WatchTypes.PROJECTS:
case "Projects":
case "Project":
return UrlHelpers.join('projects');
case Kubernetes.WatchTypes.OAUTH_CLIENTS:
case "OAuthClients":
case "OAuthClient":
return UrlHelpers.join('oauthclients');
case Kubernetes.WatchTypes.PERSISTENT_VOLUMES:
case "PersistentVolumes":
case "PersistentVolume":
return UrlHelpers.join('persistentvolumes');
default:
return UrlHelpers.join('namespaces', ns, type);
8 years ago
}
}
8 years ago
Kubernetes.namespacePathForKind = namespacePathForKind;
8 years ago
/**
8 years ago
* Returns thevalue from the injector if its available or null
8 years ago
*/
8 years ago
function inject(name) {
var injector = HawtioCore.injector;
return injector ? injector.get(name) : null;
}
Kubernetes.inject = inject;
function createResource(thing, urlTemplate, $resource, KubernetesModel) {
var prefix = prefixForType(thing);
if (!prefix) {
Kubernetes.log.debug("Invalid type given: ", thing);
return null;
8 years ago
}
8 years ago
var params = {
namespace: currentKubernetesNamespace
};
switch (thing) {
case Kubernetes.WatchTypes.NAMESPACES:
case Kubernetes.WatchTypes.OAUTH_CLIENTS:
case Kubernetes.WatchTypes.NODES:
case Kubernetes.WatchTypes.PROJECTS:
case Kubernetes.WatchTypes.OAUTH_CLIENTS:
case Kubernetes.WatchTypes.PERSISTENT_VOLUMES:
params = {};
8 years ago
}
8 years ago
var url = UrlHelpers.join(masterApiUrl(), prefix, urlTemplate);
Kubernetes.log.debug("Url for ", thing, ": ", url);
var resource = $resource(url, null, {
query: { method: 'GET', isArray: false, params: params },
create: { method: 'POST', params: params },
save: { method: 'PUT', params: params },
delete: { method: 'DELETE', params: _.extend({
id: '@id'
}, params) }
});
return resource;
8 years ago
}
8 years ago
Kubernetes.createResource = createResource;
function imageRepositoriesRestURL() {
return UrlHelpers.join(openshiftApiUrl(), kubernetesNamespacePath(), "/imagestreams");
8 years ago
}
8 years ago
Kubernetes.imageRepositoriesRestURL = imageRepositoriesRestURL;
function deploymentConfigsRestURL() {
return UrlHelpers.join(openshiftApiUrl(), kubernetesNamespacePath(), "/deploymentconfigs");
8 years ago
}
8 years ago
Kubernetes.deploymentConfigsRestURL = deploymentConfigsRestURL;
function buildsRestURL() {
return UrlHelpers.join(openshiftApiUrl(), kubernetesNamespacePath(), "/builds");
8 years ago
}
8 years ago
Kubernetes.buildsRestURL = buildsRestURL;
function buildConfigHooksRestURL() {
return UrlHelpers.join(openshiftApiUrl(), kubernetesNamespacePath(), "/buildconfighooks");
8 years ago
}
8 years ago
Kubernetes.buildConfigHooksRestURL = buildConfigHooksRestURL;
function buildConfigsRestURL() {
return UrlHelpers.join(openshiftApiUrl(), kubernetesNamespacePath(), "/buildconfigs");
8 years ago
}
8 years ago
Kubernetes.buildConfigsRestURL = buildConfigsRestURL;
function routesRestURL() {
return UrlHelpers.join(openshiftApiUrl(), kubernetesNamespacePath(), "/routes");
8 years ago
}
8 years ago
Kubernetes.routesRestURL = routesRestURL;
function templatesRestURL() {
return UrlHelpers.join(openshiftApiUrl(), kubernetesNamespacePath(), "/templates");
}
Kubernetes.templatesRestURL = templatesRestURL;
function getNamespace(entity) {
var answer = Core.pathGet(entity, ["metadata", "namespace"]);
return answer ? answer : currentKubernetesNamespace();
}
Kubernetes.getNamespace = getNamespace;
function getLabels(entity) {
var answer = Core.pathGet(entity, ["metadata", "labels"]);
return answer ? answer : {};
}
Kubernetes.getLabels = getLabels;
function getName(entity) {
if (angular.isString(entity)) {
return entity;
8 years ago
}
8 years ago
return Core.pathGet(entity, ["metadata", "name"]) || Core.pathGet(entity, "name") || Core.pathGet(entity, "id");
8 years ago
}
8 years ago
Kubernetes.getName = getName;
function getKind(entity) {
return Core.pathGet(entity, ["metadata", "kind"]) || Core.pathGet(entity, "kind");
8 years ago
}
8 years ago
Kubernetes.getKind = getKind;
function getSelector(entity) {
return Core.pathGet(entity, ["spec", "selector"]);
8 years ago
}
8 years ago
Kubernetes.getSelector = getSelector;
function getHost(pod) {
return Core.pathGet(pod, ["spec", "host"]) || Core.pathGet(pod, ["spec", "nodeName"]) || Core.pathGet(pod, ["status", "hostIP"]);
8 years ago
}
8 years ago
Kubernetes.getHost = getHost;
function getStatus(pod) {
return Core.pathGet(pod, ["status", "phase"]);
8 years ago
}
8 years ago
Kubernetes.getStatus = getStatus;
function getPorts(service) {
return Core.pathGet(service, ["spec", "ports"]);
8 years ago
}
8 years ago
Kubernetes.getPorts = getPorts;
function getCreationTimestamp(entity) {
return Core.pathGet(entity, ["metadata", "creationTimestamp"]);
8 years ago
}
8 years ago
Kubernetes.getCreationTimestamp = getCreationTimestamp;
;
function getAnnotations(entity) {
return Core.pathGet(entity, ["metadata", "annotations"]);
}
Kubernetes.getAnnotations = getAnnotations;
//var fabricDomain = Fabric.jmxDomain;
var fabricDomain = "io.fabric8";
Kubernetes.mbean = fabricDomain + ":type=Kubernetes";
Kubernetes.managerMBean = fabricDomain + ":type=KubernetesManager";
Kubernetes.appViewMBean = fabricDomain + ":type=AppView";
function isKubernetes(workspace) {
// return workspace.treeContainsDomainAndProperties(fabricDomain, {type: "Kubernetes"});
return true;
}
Kubernetes.isKubernetes = isKubernetes;
function isKubernetesTemplateManager(workspace) {
// return workspace.treeContainsDomainAndProperties(fabricDomain, {type: "KubernetesTemplateManager"});
return true;
}
Kubernetes.isKubernetesTemplateManager = isKubernetesTemplateManager;
function isAppView(workspace) {
// return workspace.treeContainsDomainAndProperties(fabricDomain, {type: "AppView"});
return true;
}
Kubernetes.isAppView = isAppView;
function getStrippedPathName() {
var pathName = Core.trimLeading((this.$location.path() || '/'), "#");
pathName = pathName.replace(/^\//, '');
return pathName;
}
Kubernetes.getStrippedPathName = getStrippedPathName;
function linkContains() {
var words = [];
for (var _i = 0; _i < arguments.length; _i++) {
words[_i - 0] = arguments[_i];
8 years ago
}
8 years ago
var pathName = this.getStrippedPathName();
return _.every(words, function (word) { return pathName.indexOf(word) !== 0; });
8 years ago
}
8 years ago
Kubernetes.linkContains = linkContains;
8 years ago
/**
8 years ago
* Returns true if the given link is active. The link can omit the leading # or / if necessary.
* The query parameters of the URL are ignored in the comparison.
* @method isLinkActive
* @param {String} href
* @return {Boolean} true if the given link is active
8 years ago
*/
8 years ago
function isLinkActive(href) {
// lets trim the leading slash
var pathName = getStrippedPathName();
var link = Core.trimLeading(href, "#");
link = link.replace(/^\//, '');
// strip any query arguments
var idx = link.indexOf('?');
if (idx >= 0) {
link = link.substring(0, idx);
}
if (!pathName.length) {
return link === pathName;
8 years ago
}
else {
8 years ago
return _.startsWith(pathName, link);
8 years ago
}
}
8 years ago
Kubernetes.isLinkActive = isLinkActive;
function setJson($scope, id, collection) {
$scope.id = id;
if (!$scope.fetched) {
return;
}
if (!id) {
$scope.json = '';
return;
}
if (!collection) {
return;
}
var item = collection.find(function (item) { return getName(item) === id; });
if (item) {
$scope.json = angular.toJson(item, true);
$scope.item = item;
8 years ago
}
else {
8 years ago
$scope.id = undefined;
$scope.json = '';
$scope.item = undefined;
8 years ago
}
}
8 years ago
Kubernetes.setJson = setJson;
8 years ago
/**
8 years ago
* Returns the labels text string using the <code>key1=value1,key2=value2,....</code> format
8 years ago
*/
8 years ago
function labelsToString(labels, seperatorText) {
if (seperatorText === void 0) { seperatorText = Kubernetes.labelFilterTextSeparator; }
var answer = "";
angular.forEach(labels, function (value, key) {
var separator = answer ? seperatorText : "";
answer += separator + key + "=" + value;
});
return answer;
8 years ago
}
8 years ago
Kubernetes.labelsToString = labelsToString;
function labelsFormat(replicas) {
var annotion = getAnnotations(replicas);
var lables = getLabels(replicas);
var hasChineseVersion = lables["version"].indexOf("版本") == -1 ? "版本" + lables["version"] : lables["version"];
return {
isExtract: lables["isExtract"],
isTarget: lables["isTarget"],
status: lables["status"],
style: lables["style"],
cityName: annotion["cityName"],
districtName: annotion["districtName"],
systemName: annotion["systemName"],
year: annotion["year"],
version: hasChineseVersion
};
8 years ago
}
8 years ago
Kubernetes.labelsFormat = labelsFormat;
function initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL) {
$scope.baseUri = Core.trimTrailing(Core.url("/") || "", "/") || "";
var injector = HawtioCore.injector;
function hasService(name) {
if (injector) {
var ServiceRegistry = injector.get("ServiceRegistry");
if (ServiceRegistry) {
return ServiceRegistry.hasService(name);
8 years ago
}
}
8 years ago
return false;
8 years ago
}
8 years ago
$scope.hasServiceKibana = function () { return hasService(Kubernetes.kibanaServiceName); };
$scope.hasServiceGogs = function () { return hasService(Kubernetes.gogsServiceName); };
$scope.hasServiceForge = function () { return hasService(Kubernetes.fabric8ForgeServiceName); };
$scope.hasServiceApiman = function () { return hasService(Kubernetes.apimanServiceName); };
$scope.viewTemplates = function () {
var returnTo = $location.url();
$location.path('/kubernetes/templates').search({ 'returnTo': returnTo });
};
$scope.namespace = $routeParams.namespace || $scope.namespace || KubernetesState.selectedNamespace || Kubernetes.defaultNamespace;
if ($scope.namespace != KubernetesState.selectedNamespace) {
KubernetesState.selectedNamespace = $scope.namespace;
// lets show page is going to reload
if ($scope.model) {
$scope.model.fetched = false;
8 years ago
}
}
8 years ago
Kubernetes.setCurrentKubernetesNamespace($scope.namespace);
$scope.forgeEnabled = isForgeEnabled();
$scope.projectId = $routeParams["project"] || $scope.projectId || $scope.id;
var showProjectNavBars = false;
if ($scope.projectId && showProjectNavBars) {
$scope.breadcrumbConfig = Developer.createProjectBreadcrumbs($scope.projectId);
$scope.subTabConfig = Developer.createProjectSubNavBars($scope.projectId, null, $scope);
}
else {
$scope.breadcrumbConfig = Developer.createEnvironmentBreadcrumbs($scope, $location, $routeParams);
$scope.subTabConfig = Developer.createEnvironmentSubNavBars($scope, $location, $routeParams);
}
if ($scope.projectId) {
$scope.$projectLink = Developer.projectLink($scope.projectId);
}
$scope.link = function (href) {
if (!href) {
return href;
8 years ago
}
8 years ago
if ($scope.$projectLink) {
return Developer.namespaceLink($scope, $routeParams, href.replace(/^\/kubernetes/, ''));
8 years ago
}
8 years ago
else {
return href;
8 years ago
}
8 years ago
};
$scope.codeMirrorOptions = {
lineWrapping: true,
lineNumbers: true,
readOnly: 'nocursor',
mode: { name: "javascript", json: true }
};
$scope.resizeDialog = {
controller: null,
newReplicas: 0,
dialog: new UI.Dialog(),
onOk: function () {
var resizeDialog = $scope.resizeDialog;
resizeDialog.dialog.close();
resizeController($http, KubernetesApiURL, resizeDialog.controller, resizeDialog.newReplicas, function () { Kubernetes.log.debug("updated number of replicas"); });
},
open: function (controller) {
var resizeDialog = $scope.resizeDialog;
resizeDialog.controller = controller;
resizeDialog.newReplicas = Core.pathGet(controller, ["status", "replicas"]);
resizeDialog.dialog.open();
$timeout(function () {
$('#replicas').focus();
}, 50);
},
close: function () {
$scope.resizeDialog.dialog.close();
8 years ago
}
8 years ago
};
$scope.triggerBuild = function (buildConfig) {
var url = buildConfig.$triggerUrl;
console.log("triggering build at url: " + url);
if (url) {
//var data = {};
var data = null;
var config = {
headers: {
'Content-Type': "application/json"
}
};
var name = Core.pathGet(buildConfig, ["metadata", "name"]);
Core.notification('info', "Triggering build " + name);
$http.post(url, data, config).
success(function (data, status, headers, config) {
console.log("trigger worked! got data " + angular.toJson(data, true));
// TODO should we show some link to the build
Core.notification('info', "Building " + name);
}).
error(function (data, status, headers, config) {
Kubernetes.log.warn("Failed to load " + url + " " + data + " " + status);
Core.notification('error', "Failed to trigger build for " + name + ". Returned code: " + status + " " + data);
});
8 years ago
}
8 years ago
;
};
// update the URL if the filter is changed
$scope.$watch("tableConfig.filterOptions.filterText", function (text) {
//var filterText = Kubernetes.findValeOfLabels(text);
$location.search("q", text);
});
$scope.$on("labelFilterUpdate", function ($event, text) {
var filterOptions = ($scope.tableConfig || {}).filterOptions || {};
var currentFilter = filterOptions.filterText;
if (Core.isBlank(currentFilter)) {
filterOptions.filterText = text;
}
else {
var expressions = currentFilter.split(/\s+/);
if (expressions.indexOf(text) !== -1) {
// lets exclude this filter expression
expressions = expressions.remove(text);
filterOptions.filterText = expressions.join(" ");
}
else {
filterOptions.filterText = currentFilter + " " + text;
8 years ago
}
}
8 years ago
$scope.id = undefined;
8 years ago
});
}
8 years ago
Kubernetes.initShared = initShared;
/**
* Returns the number of pods that are ready
*/
function readyPodCount(service) {
var count = 0;
angular.forEach((service || {}).$pods, function (pod) {
if (pod.$ready) {
count++;
8 years ago
}
});
8 years ago
return count;
8 years ago
}
8 years ago
Kubernetes.readyPodCount = readyPodCount;
8 years ago
/**
8 years ago
* Returns the service link URL for either the service name or the service object
8 years ago
*/
8 years ago
function serviceLinkUrl(service, httpOnly) {
if (httpOnly === void 0) { httpOnly = false; }
if (angular.isObject(service)) {
var portalIP = service.$host;
// lets assume no custom port for now for external routes
var port = null;
var protocol = "http://";
var spec = service.spec;
if (spec) {
if (!portalIP) {
portalIP = spec.portalIP;
8 years ago
}
8 years ago
var hasHttps = false;
var hasHttp = false;
angular.forEach(spec.ports, function (portSpec) {
var p = portSpec.port;
if (p) {
if (p === 443) {
hasHttps = true;
}
else if (p === 80) {
hasHttp = true;
}
if (!port) {
port = p;
8 years ago
}
}
});
8 years ago
if (!hasHttps && !hasHttp && port) {
// lets treat 8080 as http which is a common service to export
if (port === 8080) {
hasHttp = true;
}
else if (port === 8443) {
hasHttps = true;
8 years ago
}
}
}
8 years ago
if (portalIP) {
if (hasHttps) {
return "https://" + portalIP;
8 years ago
}
8 years ago
else if (hasHttp) {
return "http://" + portalIP;
8 years ago
}
8 years ago
else if (!httpOnly) {
if (port) {
return protocol + portalIP + ":" + port + "/";
}
else {
return protocol + portalIP;
}
8 years ago
}
}
8 years ago
}
else if (service) {
var serviceId = service.toString();
if (serviceId) {
var ServiceRegistry = getServiceRegistry();
if (ServiceRegistry) {
return ServiceRegistry.serviceLink(serviceId) || "";
8 years ago
}
}
8 years ago
}
return "";
}
Kubernetes.serviceLinkUrl = serviceLinkUrl;
/**
* Returns the total number of counters for the podCounters object
*/
function podCounterTotal($podCounters) {
var answer = 0;
if ($podCounters) {
angular.forEach(["ready", "valid", "waiting", "error"], function (name) {
var value = $podCounters[name] || 0;
answer += value;
8 years ago
});
}
8 years ago
return answer;
8 years ago
}
8 years ago
Kubernetes.podCounterTotal = podCounterTotal;
/**
* Given the list of pods lets iterate through them and find all pods matching the selector
* and return counters based on the status of the pod
*/
function createPodCounters(selector, pods, outputPods, podLinkQuery, podLinkUrl) {
if (outputPods === void 0) { outputPods = []; }
if (podLinkQuery === void 0) { podLinkQuery = null; }
if (podLinkUrl === void 0) { podLinkUrl = null; }
if (!podLinkUrl) {
podLinkUrl = "/kubernetes/pods";
}
8 years ago
var filterFn;
if (angular.isFunction(selector)) {
filterFn = selector;
}
8 years ago
else {
filterFn = function (pod) { return selectorMatches(selector, getLabels(pod)); };
}
8 years ago
var answer = {
podsLink: "",
ready: 0,
valid: 0,
waiting: 0,
error: 0
};
if (selector) {
if (!podLinkQuery) {
podLinkQuery = Kubernetes.labelsToString(selector, " ");
}
8 years ago
answer.podsLink = podLinkUrl + "?q=" + encodeURIComponent(podLinkQuery);
angular.forEach(pods, function (pod) {
if (filterFn(pod)) {
outputPods.push(pod);
var status = getStatus(pod);
if (status) {
var lower = status.toLowerCase();
if (lower.startsWith("run")) {
if (isReady(pod)) {
answer.ready += 1;
}
else {
answer.valid += 1;
}
}
else if (lower.startsWith("wait") || lower.startsWith("pend")) {
answer.waiting += 1;
}
else if (lower.startsWith("term") || lower.startsWith("error") || lower.startsWith("fail")) {
answer.error += 1;
}
}
8 years ago
else {
answer.error += 1;
}
}
});
}
8 years ago
return answer;
}
8 years ago
Kubernetes.createPodCounters = createPodCounters;
/**
* Converts the given json into an array of items. If the json contains a nested set of items then that is sorted; so that services
* are processed first; then turned into an array. Otherwise the json is put into an array so it can be processed polymorphically
*/
function convertKubernetesJsonToItems(json) {
var items = json.items;
if (angular.isArray(items)) {
// TODO we could check for List or Config types here and warn if not
// sort the services first
var answer = [];
items.forEach(function (item) {
if (item.kind === "Service") {
answer.push(item);
}
});
items.forEach(function (item) {
if (item.kind !== "Service") {
answer.push(item);
}
});
return answer;
}
8 years ago
else {
return [json];
}
}
8 years ago
Kubernetes.convertKubernetesJsonToItems = convertKubernetesJsonToItems;
function isV1beta1Or2() {
return Kubernetes.defaultApiVersion === "v1beta1" || Kubernetes.defaultApiVersion === "v1beta2";
}
8 years ago
Kubernetes.isV1beta1Or2 = isV1beta1Or2;
/**
8 years ago
* Returns a link to the detail page for the given entity
*/
8 years ago
function entityPageLink(obj) {
if (obj) {
function getLink(entity) {
var viewLink = entity["$viewLink"];
if (viewLink) {
return viewLink;
}
var id = getName(entity);
var kind = getKind(entity);
if (kind && id) {
var path = kind.substring(0, 1).toLowerCase() + kind.substring(1) + "s";
var namespace = getNamespace(entity);
if (namespace && !isIgnoreNamespaceKind(kind)) {
return Core.url(UrlHelpers.join('/kubernetes/namespace', namespace, path, id));
}
else {
return Core.url(UrlHelpers.join('/kubernetes', path, id));
}
}
}
var baseLink = getLink(obj);
if (!HawtioCore.injector || !baseLink) {
return baseLink;
}
var $routeParams = HawtioCore.injector.get('$routeParams');
var projectId = $routeParams['project'] || $routeParams['project'];
if (!projectId) {
return baseLink;
}
return UrlHelpers.join(Developer.projectLink(projectId), baseLink.replace(/^\/kubernetes\//, ''));
}
8 years ago
return null;
}
8 years ago
Kubernetes.entityPageLink = entityPageLink;
function resourceKindToUriPath(kind) {
var kindPath = kind.toLowerCase() + "s";
if (kindPath === "replicationControllers" && !isV1beta1Or2()) {
kindPath = "replicationcontrollers";
}
8 years ago
return kindPath;
}
8 years ago
Kubernetes.resourceKindToUriPath = resourceKindToUriPath;
function isIgnoreNamespaceKind(kind) {
return kind === "Host" || kind === "Minion";
}
/**
8 years ago
* Returns the root URL for the kind
*/
8 years ago
function kubernetesUrlForKind(KubernetesApiURL, kind, namespace, path) {
if (namespace === void 0) { namespace = null; }
if (path === void 0) { path = null; }
var pathSegment = "";
if (path) {
pathSegment = "/" + Core.trimLeading(path, "/");
}
var kindPath = resourceKindToUriPath(kind);
var ignoreNamespace = isIgnoreNamespaceKind(kind);
if (isV1beta1Or2() || ignoreNamespace) {
var postfix = "";
if (namespace && !ignoreNamespace) {
postfix = "?namespace=" + namespace;
}
8 years ago
return UrlHelpers.join(KubernetesApiURL, kindPath, pathSegment, postfix);
}
else {
return UrlHelpers.join(KubernetesApiURL, "/namespaces/", namespace, kindPath, pathSegment);
}
}
8 years ago
Kubernetes.kubernetesUrlForKind = kubernetesUrlForKind;
;
/**
8 years ago
* Returns the base URL for the kind of kubernetes resource or null if it cannot be found
*/
8 years ago
function kubernetesUrlForItemKind(KubernetesApiURL, json) {
var kind = json.kind;
if (kind) {
return kubernetesUrlForKind(KubernetesApiURL, kind, json.namespace);
}
8 years ago
else {
Kubernetes.log.warn("Ignoring missing kind " + kind + " for kubernetes json: " + angular.toJson(json));
return null;
}
8 years ago
}
8 years ago
Kubernetes.kubernetesUrlForItemKind = kubernetesUrlForItemKind;
function kubernetesProxyUrlForService(KubernetesApiURL, service, path) {
if (path === void 0) { path = null; }
var pathSegment = "";
if (path) {
pathSegment = "/" + Core.trimLeading(path, "/");
}
8 years ago
else {
pathSegment = "/";
}
8 years ago
var namespace = getNamespace(service);
if (isV1beta1Or2()) {
var postfix = "?namespace=" + namespace;
return UrlHelpers.join(KubernetesApiURL, "/proxy", kubernetesNamespacePath(), "/services/" + getName(service) + pathSegment + postfix);
}
else {
return UrlHelpers.join(KubernetesApiURL, "/proxy/namespaces/", namespace, "/services/" + getName(service) + pathSegment);
8 years ago
}
}
8 years ago
Kubernetes.kubernetesProxyUrlForService = kubernetesProxyUrlForService;
function kubernetesProxyUrlForServiceCurrentNamespace(service, path) {
if (path === void 0) { path = null; }
var apiPrefix = UrlHelpers.join(kubernetesApiUrl());
return kubernetesProxyUrlForService(apiPrefix, service, path);
8 years ago
}
8 years ago
Kubernetes.kubernetesProxyUrlForServiceCurrentNamespace = kubernetesProxyUrlForServiceCurrentNamespace;
function buildConfigRestUrl(id) {
return UrlHelpers.join(buildConfigsRestURL(), id);
}
8 years ago
Kubernetes.buildConfigRestUrl = buildConfigRestUrl;
function deploymentConfigRestUrl(id) {
return UrlHelpers.join(deploymentConfigsRestURL(), id);
}
Kubernetes.deploymentConfigRestUrl = deploymentConfigRestUrl;
function imageRepositoryRestUrl(id) {
return UrlHelpers.join(imageRepositoriesRestURL(), id);
}
Kubernetes.imageRepositoryRestUrl = imageRepositoryRestUrl;
function buildRestUrl(id) {
return UrlHelpers.join(buildsRestURL(), id);
}
Kubernetes.buildRestUrl = buildRestUrl;
function buildLogsRestUrl(id) {
return UrlHelpers.join(buildsRestURL(), id, "log");
}
Kubernetes.buildLogsRestUrl = buildLogsRestUrl;
/**
* Runs the given application JSON
*/
function runApp($location, $scope, $http, KubernetesApiURL, json, name, onSuccessFn, namespace, onCompleteFn) {
if (name === void 0) { name = "App"; }
if (onSuccessFn === void 0) { onSuccessFn = null; }
if (namespace === void 0) { namespace = null; }
if (onCompleteFn === void 0) { onCompleteFn = null; }
if (json) {
if (angular.isString(json)) {
json = angular.fromJson(json);
8 years ago
}
8 years ago
name = name || "App";
var postfix = namespace ? " in namespace " + namespace : "";
Core.notification('info', "Running " + name + postfix);
var items = convertKubernetesJsonToItems(json);
angular.forEach(items, function (item) {
var url = kubernetesUrlForItemKind(KubernetesApiURL, item);
if (url) {
$http.post(url, item).
success(function (data, status, headers, config) {
Kubernetes.log.debug("Got status: " + status + " on url: " + url + " data: " + data + " after posting: " + angular.toJson(item));
if (angular.isFunction(onCompleteFn)) {
onCompleteFn();
}
Core.$apply($scope);
}).
error(function (data, status, headers, config) {
var message = null;
if (angular.isObject(data)) {
message = data.message;
var reason = data.reason;
if (reason === "AlreadyExists") {
// lets ignore duplicates
Kubernetes.log.debug("entity already exists at " + url);
return;
}
}
if (!message) {
message = "Failed to POST to " + url + " got status: " + status;
}
Kubernetes.log.warn("Failed to save " + url + " status: " + status + " response: " + angular.toJson(data, true));
Core.notification('error', message);
});
}
});
8 years ago
}
}
8 years ago
Kubernetes.runApp = runApp;
/**
* Returns true if the current status of the pod is running
*/
function isRunning(podCurrentState) {
var status = (podCurrentState || {}).phase;
if (status) {
var lower = status.toLowerCase();
return lower.startsWith("run");
}
else {
8 years ago
return false;
8 years ago
}
}
8 years ago
Kubernetes.isRunning = isRunning;
/**
* Returns true if the labels object has all of the key/value pairs from the selector
*/
function selectorMatches(selector, labels) {
if (angular.isObject(labels)) {
var answer = true;
var count = 0;
angular.forEach(selector, function (value, key) {
count++;
if (answer && labels[key] !== value) {
answer = false;
}
});
8 years ago
return answer && count > 0;
}
else {
8 years ago
return false;
}
8 years ago
}
8 years ago
Kubernetes.selectorMatches = selectorMatches;
/**
* Returns the service registry
*/
function getServiceRegistry() {
var injector = HawtioCore.injector;
return injector ? injector.get("ServiceRegistry") : null;
}
Kubernetes.getServiceRegistry = getServiceRegistry;
/**
* Returns a link to the kibana logs web application
*/
function kibanaLogsLink(ServiceRegistry) {
var link = ServiceRegistry.serviceLink(Kubernetes.kibanaServiceName);
if (link) {
if (!link.endsWith("/")) {
link += "/";
}
return link + "#/dashboard/Fabric8";
}
else {
8 years ago
return null;
8 years ago
}
}
8 years ago
Kubernetes.kibanaLogsLink = kibanaLogsLink;
function openLogsForPods(ServiceRegistry, $window, namespace, pods) {
var link = kibanaLogsLink(ServiceRegistry);
if (link) {
var query = "";
var count = 0;
angular.forEach(pods, function (item) {
var id = getName(item);
if (id) {
var space = query ? " OR " : "";
count++;
query += space + '"' + id + '"';
}
8 years ago
});
if (query) {
if (count > 1) {
query = "(" + query + ")";
}
query = 'kubernetes.namespace_name:"' + namespace + '" AND kubernetes.pod_name:' + query;
link += "?_a=(query:(query_string:(query:'" + query + "')))";
var newWindow = $window.open(link, "viewLogs");
}
}
}
8 years ago
Kubernetes.openLogsForPods = openLogsForPods;
function resizeController($http, KubernetesApiURL, replicationController, newReplicas, onCompleteFn) {
if (onCompleteFn === void 0) { onCompleteFn = null; }
var id = getName(replicationController);
var namespace = getNamespace(replicationController) || "";
var url = kubernetesUrlForKind(KubernetesApiURL, "ReplicationController", namespace, id);
$http.get(url).
success(function (data, status, headers, config) {
if (data) {
var desiredState = data.spec;
if (!desiredState) {
desiredState = {};
data.spec = desiredState;
}
desiredState.replicas = newReplicas;
$http.put(url, data).
success(function (data, status, headers, config) {
Kubernetes.log.debug("updated controller " + url);
if (angular.isFunction(onCompleteFn)) {
onCompleteFn();
}
}).
error(function (data, status, headers, config) {
Kubernetes.log.warn("Failed to save " + url + " " + data + " " + status);
});
}
}).
error(function (data, status, headers, config) {
Kubernetes.log.warn("Failed to load " + url + " " + data + " " + status);
});
}
8 years ago
Kubernetes.resizeController = resizeController;
function statusTextToCssClass(text, ready) {
if (ready === void 0) { ready = false; }
if (text) {
var lower = text.toLowerCase();
if (lower.startsWith("run") || lower.startsWith("ok")) {
if (!ready) {
return "fa fa-spinner fa-spin green";
}
return 'fa fa-play-circle green';
}
else if (lower.startsWith("wait") || lower.startsWith("pend")) {
return 'fa fa-download';
}
else if (lower.startsWith("term") || lower.startsWith("error") || lower.startsWith("fail")) {
return 'fa fa-off orange';
}
else if (lower.startsWith("succeeded")) {
return 'fa fa-check-circle-o green';
}
}
8 years ago
return 'fa fa-question red';
8 years ago
}
8 years ago
Kubernetes.statusTextToCssClass = statusTextToCssClass;
function podStatus(pod) {
return getStatus(pod);
}
Kubernetes.podStatus = podStatus;
function isReady(pod) {
var status = pod.status || {};
var answer = false;
angular.forEach(status.conditions, function (condition) {
var t = condition.type;
if (t && t === "Ready") {
var status = condition.status;
if (status === "True") {
answer = true;
}
}
});
return answer;
}
Kubernetes.isReady = isReady;
function createAppViewPodCounters(appView) {
var array = [];
var map = {};
var pods = appView.pods;
var lowestDate = null;
angular.forEach(pods, function (pod) {
var selector = getLabels(pod);
var selectorText = Kubernetes.labelsToString(selector, " ");
var answer = map[selector];
if (!answer) {
answer = {
labelText: selectorText,
podsLink: UrlHelpers.join("/kubernetes/namespace/", pod.metadata.namespace, "pods?q=" + encodeURIComponent(selectorText)),
valid: 0,
waiting: 0,
error: 0
};
map[selector] = answer;
array.push(answer);
}
var status = (podStatus(pod) || "Error").toLowerCase();
if (status.startsWith("run") || status.startsWith("ok")) {
answer.valid += 1;
}
else if (status.startsWith("wait") || status.startsWith("pwnd")) {
answer.waiting += 1;
}
else {
answer.error += 1;
}
var creationTimestamp = getCreationTimestamp(pod);
if (creationTimestamp) {
var d = new Date(creationTimestamp);
if (!lowestDate || d < lowestDate) {
lowestDate = d;
}
}
});
appView.$creationDate = lowestDate;
return array;
}
Kubernetes.createAppViewPodCounters = createAppViewPodCounters;
function createAppViewServiceViews(appView) {
var array = [];
var pods = appView.pods;
angular.forEach(pods, function (pod) {
var id = getName(pod);
if (id) {
var abbrev = id;
var idx = id.indexOf("-");
if (idx > 1) {
abbrev = id.substring(0, idx);
}
pod.idAbbrev = abbrev;
}
pod.statusClass = statusTextToCssClass(podStatus(pod), isReady(pod));
});
var services = appView.services || [];
var replicationControllers = appView.replicationControllers || [];
var size = Math.max(services.length, replicationControllers.length, 1);
var appName = appView.$info.name;
for (var i = 0; i < size; i++) {
var service = services[i];
var replicationController = replicationControllers[i];
var controllerId = getName(replicationController);
var name = getName(service) || controllerId;
var address = Core.pathGet(service, ["spec", "portalIP"]);
if (!name && pods.length) {
name = pods[0].idAbbrev;
}
if (!appView.$info.name) {
appView.$info.name = name;
}
if (!appView.id && pods.length) {
appView.id = getName(pods[0]);
}
if (i > 0) {
appName = name;
}
var podCount = pods.length;
var podCountText = podCount + " pod" + (podCount > 1 ? "s" : "");
var view = {
appName: appName || name,
name: name,
createdDate: appView.$creationDate,
podCount: podCount,
podCountText: podCountText,
address: address,
controllerId: controllerId,
service: service,
replicationController: replicationController,
pods: pods
};
array.push(view);
8 years ago
}
8 years ago
return array;
8 years ago
}
8 years ago
Kubernetes.createAppViewServiceViews = createAppViewServiceViews;
8 years ago
/**
8 years ago
* converts a git path into an accessible URL for the browser
8 years ago
*/
8 years ago
function gitPathToUrl(iconPath, branch) {
if (branch === void 0) { branch = "master"; }
return (HawtioCore.injector.get('AppLibraryURL') || '') + "/git/" + branch + iconPath;
}
Kubernetes.gitPathToUrl = gitPathToUrl;
function asDate(value) {
return value ? new Date(value) : null;
}
function enrichBuildConfig(buildConfig, sortedBuilds) {
if (buildConfig) {
var triggerUrl = null;
var metadata = buildConfig.metadata || {};
var name = metadata.name;
buildConfig.$name = name;
var projectLink = Developer.projectLink(name);
var ns = metadata.namespace || currentKubernetesNamespace();
buildConfig.$namespace = ns;
buildConfig.environments = [];
buildConfig.$creationDate = asDate(Kubernetes.getCreationTimestamp(buildConfig));
buildConfig.$labelsText = Kubernetes.labelsToString(getLabels(buildConfig));
if (name) {
buildConfig.$viewLink = UrlHelpers.join("workspaces", ns, "projects", name, "environments");
buildConfig.$editLink = UrlHelpers.join("workspaces", ns, "projects", name, "buildConfigEdit");
angular.forEach([false, true], function (flag) {
angular.forEach(buildConfig.triggers, function (trigger) {
if (!triggerUrl) {
var type = trigger.type;
if (type === "generic" || flag) {
var generic = trigger[type];
if (type && generic) {
var secret = generic.secret;
if (secret) {
triggerUrl = UrlHelpers.join(buildConfigHooksRestURL(), name, secret, type);
buildConfig.$triggerUrl = triggerUrl;
}
}
}
}
});
8 years ago
});
8 years ago
// lets find the latest build...
if (sortedBuilds) {
buildConfig.$lastBuild = _.find(sortedBuilds, {
metadata: {
labels: {
buildconfig: name
}
}
});
}
8 years ago
}
8 years ago
var $fabric8Views = {};
function defaultPropertiesIfNotExist(name, object, autoCreate) {
if (autoCreate === void 0) { autoCreate = false; }
var view = $fabric8Views[name];
if (autoCreate && !view) {
view = {};
$fabric8Views[name] = view;
}
if (view) {
angular.forEach(object, function (value, property) {
var current = view[property];
if (!current) {
view[property] = value;
}
});
}
}
8 years ago
function defaultPropertiesIfNotExistStartsWith(prefix, object, autoCreate) {
if (autoCreate === void 0) { autoCreate = false; }
angular.forEach($fabric8Views, function (view, name) {
if (view && name.startsWith(prefix)) {
angular.forEach(object, function (value, property) {
var current = view[property];
if (!current) {
view[property] = value;
}
});
}
});
}
8 years ago
var labels = metadata.labels || {};
var annotations = metadata.annotations || {};
// lets default the repo and user
buildConfig.$user = annotations["fabric8.jenkins/user"] || labels["user"];
buildConfig.$repo = annotations["fabric8.jenkins/repo"] || labels["repo"];
angular.forEach(annotations, function (value, key) {
var parts = key.split('/', 2);
if (parts.length > 1) {
var linkId = parts[0];
var property = parts[1];
if (linkId && property && linkId.startsWith("fabric8.link")) {
var link = $fabric8Views[linkId];
if (!link) {
link = {
class: linkId
};
$fabric8Views[linkId] = link;
}
link[property] = value;
}
}
});
if (buildConfig.$user && buildConfig.$repo) {
// browse gogs repo view
var gogsUrl = serviceLinkUrl(Kubernetes.gogsServiceName);
if (gogsUrl) {
defaultPropertiesIfNotExist("fabric8.link.browseGogs.view", {
label: "Browse...",
url: UrlHelpers.join(gogsUrl, buildConfig.$user, buildConfig.$repo),
description: "Browse the source code of this repository",
iconClass: "fa fa-external-link"
}, true);
}
// run forge commands view
defaultPropertiesIfNotExist("fabric8.link.forgeCommand.view", {
label: "Command...",
url: UrlHelpers.join(projectLink, "/forge/commands/user", buildConfig.$user, buildConfig.$repo),
description: "Perform an action on this project",
iconClass: "fa fa-play-circle"
}, true);
// configure devops view
defaultPropertiesIfNotExist("fabric8.link.forgeCommand.devops.settings", {
label: "Settings",
url: UrlHelpers.join(projectLink, "/forge/command/devops-edit/user", buildConfig.$user, buildConfig.$repo),
description: "Configure the DevOps settings for this project",
iconClass: "fa fa-pencil-square-o"
}, true);
}
// add some icons and descriptions
defaultPropertiesIfNotExist("fabric8.link.repository.browse", {
label: "Browse...",
description: "Browse the source code of this repository",
iconClass: "fa fa-external-link"
});
defaultPropertiesIfNotExist("fabric8.link.jenkins.job", {
iconClass: "fa fa-tasks",
description: "View the Jenkins Job for this build"
});
defaultPropertiesIfNotExist("fabric8.link.jenkins.monitor", {
iconClass: "fa fa-tachometer",
description: "View the Jenkins Monitor dashboard for this project"
});
defaultPropertiesIfNotExist("fabric8.link.jenkins.pipeline", {
iconClass: "fa fa-arrow-circle-o-right",
description: "View the Jenkins Pipeline for this project"
});
defaultPropertiesIfNotExist("fabric8.link.letschat.room", {
iconClass: "fa fa-comment",
description: "Chat room for this project"
});
defaultPropertiesIfNotExist("fabric8.link.letschat.room", {
iconClass: "fa fa-comment",
description: "Chat room for this project"
});
defaultPropertiesIfNotExist("fabric8.link.taiga", {
iconClass: "fa fa-check-square-o",
description: "Issue tracker for this project"
});
defaultPropertiesIfNotExist("fabric8.link.issues", {
iconClass: "fa fa-check-square-o",
description: "Issues for this project"
});
defaultPropertiesIfNotExist("fabric8.link.releases", {
iconClass: "fa fa-tag",
description: "Issues for this project"
});
defaultPropertiesIfNotExist("fabric8.link.taiga.team", {
iconClass: "fa fa-users",
description: "Team members for this project"
});
defaultPropertiesIfNotExist("fabric8.link.team", {
iconClass: "fa fa-users",
description: "Team members for this project"
});
defaultPropertiesIfNotExistStartsWith("fabric8.link.environment.", {
iconClass: "fa fa-cloud",
description: "The kubernetes namespace for this environment"
});
// lets put the views into sections...
var $fabric8CodeViews = {};
var $fabric8BuildViews = {};
var $fabric8TeamViews = {};
var $fabric8EnvironmentViews = {};
angular.forEach($fabric8Views, function (value, key) {
var view;
if (key.indexOf("taiga") > 0 || key.indexOf(".issue") > 0 || key.indexOf("letschat") > 0 || key.indexOf(".team") > 0) {
view = $fabric8TeamViews;
}
else if (key.indexOf("jenkins") > 0) {
view = $fabric8BuildViews;
}
else if (key.indexOf(".environment.") > 0) {
view = $fabric8EnvironmentViews;
}
else {
view = $fabric8CodeViews;
}
view[key] = value;
});
buildConfig.$fabric8Views = $fabric8Views;
buildConfig.$fabric8CodeViews = $fabric8CodeViews;
buildConfig.$fabric8BuildViews = $fabric8BuildViews;
buildConfig.$fabric8EnvironmentViews = $fabric8EnvironmentViews;
buildConfig.$fabric8TeamViews = $fabric8TeamViews;
var $jenkinsJob = annotations["fabric8.io/jenkins-job"];
if (!$jenkinsJob && $fabric8Views["fabric8.link.jenkins.job"]) {
$jenkinsJob = name;
}
buildConfig.$jenkinsJob = $jenkinsJob;
angular.forEach($fabric8EnvironmentViews, function (env) {
var c = env.class;
var prefix = "fabric8.link.environment.";
if (c && c.startsWith(prefix)) {
var ens = c.substring(prefix.length);
env.namespace = ens;
env.url = UrlHelpers.join("/workspaces", ns, "projects", name, "namespace", ens);
}
buildConfig.environments.push(env);
});
if (!buildConfig.environments.length) {
// lets create a single environment
var ens = ns;
var env = {
namespace: ens,
label: "Current",
description: "The environemnt that this project is built and run inside",
iconClass: "fa fa-cloud",
url: UrlHelpers.join("/workspaces", ns, "projects", name, "namespace", ens)
};
buildConfig.environments.push(env);
}
buildConfig.environments = buildConfig.environments.reverse();
buildConfig.tools = [];
angular.forEach($fabric8CodeViews, function (env) {
buildConfig.tools.push(env);
});
angular.forEach($fabric8TeamViews, function (env) {
buildConfig.tools.push(env);
});
8 years ago
}
}
8 years ago
Kubernetes.enrichBuildConfig = enrichBuildConfig;
function enrichBuildConfigs(buildConfigs, sortedBuilds) {
if (sortedBuilds === void 0) { sortedBuilds = null; }
angular.forEach(buildConfigs, function (buildConfig) {
enrichBuildConfig(buildConfig, sortedBuilds);
8 years ago
});
8 years ago
return buildConfigs;
}
8 years ago
Kubernetes.enrichBuildConfigs = enrichBuildConfigs;
function enrichBuilds(builds) {
angular.forEach(builds, function (build) {
enrichBuild(build);
});
return _.sortBy(builds, "$creationDate").reverse();
8 years ago
}
8 years ago
Kubernetes.enrichBuilds = enrichBuilds;
function enrichBuild(build) {
if (build) {
var metadata = build.metadata || {};
var annotations = metadata.annotations || {};
var name = getName(build);
var namespace = getNamespace(build);
build.$name = name;
build.$namespace = namespace;
var nameArray = name.split("-");
var nameArrayLength = nameArray.length;
build.$shortName = (nameArrayLength > 4) ? nameArray.slice(0, nameArrayLength - 4).join("-") : name.substring(0, 30);
var labels = getLabels(build);
var configId = labels.buildconfig;
build.$configId = configId;
if (configId) {
//build.$configLink = UrlHelpers.join("kubernetes/buildConfigs", configId);
build.$configLink = UrlHelpers.join("workspaces", currentKubernetesNamespace(), "projects", configId);
}
var creationTimestamp = getCreationTimestamp(build);
if (creationTimestamp) {
var d = new Date(creationTimestamp);
build.$creationDate = d;
}
if (name) {
//build.$viewLink = UrlHelpers.join("kubernetes/builds", name);
var projectLink = UrlHelpers.join("workspaces", currentKubernetesNamespace(), "projects", configId);
build.$viewLink = UrlHelpers.join(projectLink, "builds", name);
//build.$logsLink = UrlHelpers.join("kubernetes/buildLogs", name);
build.$logsLink = UrlHelpers.join(projectLink, "buildLogs", name);
}
build.podName = build.podName || annotations["openshift.io/build.pod-name"];
var podName = build.podName;
if (podName && namespace) {
var podNameArray = podName.split("-");
var podNameArrayLength = podNameArray.length;
build.$podShortName = (podNameArrayLength > 5) ? podNameArray[podNameArrayLength - 5] : podName.substring(0, 30);
build.$podLink = UrlHelpers.join("kubernetes/namespace", namespace, "pods", podName);
}
}
8 years ago
return build;
}
Kubernetes.enrichBuild = enrichBuild;
function enrichDeploymentConfig(deploymentConfig) {
if (deploymentConfig) {
var triggerUrl = null;
var name = Core.pathGet(deploymentConfig, ["metadata", "name"]);
deploymentConfig.$name = name;
var found = false;
angular.forEach(deploymentConfig.triggers, function (trigger) {
var type = trigger.type;
if (!deploymentConfig.$imageChangeParams && type === "ImageChange") {
var imageChangeParams = trigger.imageChangeParams;
if (imageChangeParams) {
var containerNames = imageChangeParams.containerNames || [];
imageChangeParams.$containerNames = containerNames.join(" ");
deploymentConfig.$imageChangeParams = imageChangeParams;
}
}
});
8 years ago
}
}
8 years ago
Kubernetes.enrichDeploymentConfig = enrichDeploymentConfig;
function enrichDeploymentConfigs(deploymentConfigs) {
angular.forEach(deploymentConfigs, function (deploymentConfig) {
enrichDeploymentConfig(deploymentConfig);
8 years ago
});
8 years ago
return deploymentConfigs;
}
8 years ago
Kubernetes.enrichDeploymentConfigs = enrichDeploymentConfigs;
function enrichEvent(event) {
if (event) {
var metadata = event.metadata || {};
var firstTimestamp = event.firstTimestamp;
if (firstTimestamp) {
var d = new Date(firstTimestamp);
event.$firstTimestamp = d;
}
8 years ago
var lastTimestamp = event.lastTimestamp;
if (lastTimestamp) {
var d = new Date(lastTimestamp);
event.$lastTimestamp = d;
}
var labels = angular.copy(event.source || {});
var involvedObject = event.involvedObject || {};
var name = involvedObject.name;
var kind = involvedObject.kind;
if (name) {
labels['name'] = name;
}
if (kind) {
labels['kind'] = kind;
}
event.$labelsText = Kubernetes.labelsToString(labels);
}
}
8 years ago
Kubernetes.enrichEvent = enrichEvent;
function enrichEvents(events, model) {
if (model === void 0) { model = null; }
angular.forEach(events, function (event) {
enrichEvent(event);
8 years ago
});
8 years ago
// lets update links to the events for each pod and RC
if (model) {
function clearEvents(entity) {
entity.$events = [];
entity.$eventsLink = null;
entity.$eventCount = 0;
}
function updateEvent(entity, event) {
if (entity) {
entity.$events.push(event);
if (!entity.$eventsLink) {
entity.$eventsLink = UrlHelpers.join("/kubernetes/namespace/", currentKubernetesNamespace(), "events") + "?q=kind%3D" + entity.kind + "%20name%3D" + entity.metadata.name;
}
entity.$eventCount = entity.$events.length;
}
}
var pods = model.pods || [];
var rcs = model.replicationControllers || [];
angular.forEach(pods, clearEvents);
angular.forEach(rcs, clearEvents);
angular.forEach(events, function (event) {
var involvedObject = event.involvedObject || {};
var name = involvedObject.name;
var kind = involvedObject.kind;
var ns = model.currentNamespace();
if (name && kind && ns) {
var entity = null;
if (kind === "ReplicationController") {
entity = model.getReplicationController(ns, name);
}
else if (kind === "Pod") {
entity = model.getPod(ns, name);
}
if (entity) {
updateEvent(entity, event);
}
}
});
}
return events;
8 years ago
}
8 years ago
Kubernetes.enrichEvents = enrichEvents;
function enrichImageRepository(imageRepository) {
if (imageRepository) {
var triggerUrl = null;
var name = Core.pathGet(imageRepository, ["metadata", "name"]);
imageRepository.$name = name;
}
}
Kubernetes.enrichImageRepository = enrichImageRepository;
function enrichImageRepositories(imageRepositories) {
angular.forEach(imageRepositories, function (imageRepository) {
enrichImageRepository(imageRepository);
8 years ago
});
8 years ago
return imageRepositories;
8 years ago
}
8 years ago
Kubernetes.enrichImageRepositories = enrichImageRepositories;
var labelColors = {
'region': 'k8s-badge-region',
'system': 'k8s-badge-system',
'isTarget': 'k8s-badge-target',
};
function containerLabelClass(labelType) {
if (!(labelType in labelColors)) {
return 'mouse-pointer';
}
8 years ago
else
return labelColors[labelType] + ' mouse-pointer';
}
Kubernetes.containerLabelClass = containerLabelClass;
/**
* Returns true if the fabric8 forge plugin is enabled
*/
function isForgeEnabled() {
// TODO should return true if the service "fabric8-forge" is valid
return true;
}
Kubernetes.isForgeEnabled = isForgeEnabled;
/**
* Returns the current kubernetes selected namespace or the default one
*/
function currentKubernetesNamespace() {
var injector = HawtioCore.injector;
if (injector) {
var KubernetesState = injector.get("KubernetesState") || {};
return KubernetesState.selectedNamespace || Kubernetes.defaultNamespace;
}
return Kubernetes.defaultNamespace;
}
Kubernetes.currentKubernetesNamespace = currentKubernetesNamespace;
function setCurrentKubernetesNamespace(ns) {
if (ns) {
var KubernetesState = inject("KubernetesState") || {};
KubernetesState.selectedNamespace = ns;
}
}
Kubernetes.setCurrentKubernetesNamespace = setCurrentKubernetesNamespace;
/**
* Configures the json schema
*/
function configureSchema() {
angular.forEach(Kubernetes.schema.definitions, function (definition, name) {
var properties = definition.properties;
if (properties) {
var hideProperties = ["creationTimestamp", "kind", "apiVersion", "annotations", "additionalProperties", "namespace", "resourceVersion", "selfLink", "uid"];
angular.forEach(hideProperties, function (propertyName) {
var property = properties[propertyName];
if (property) {
property["hidden"] = true;
}
});
angular.forEach(properties, function (property, propertyName) {
var ref = property["$ref"];
var type = property["type"];
if (ref && (!type || type === "object")) {
property["type"] = ref;
}
if (type === "array") {
var items = property["items"];
if (items) {
var ref = items["$ref"];
var type = items["type"];
if (ref && (!type || type === "object")) {
items["type"] = ref;
}
}
}
});
}
8 years ago
Kubernetes.schema.definitions.os_build_WebHookTrigger.properties.secret.type = "password";
});
}
8 years ago
Kubernetes.configureSchema = configureSchema;
/**
* Lets remove any enriched data to leave the original json intact
*/
function unenrich(item) {
var o = _.cloneDeep(item);
angular.forEach(o, function (value, key) {
if (key.startsWith("$") || key.startsWith("_")) {
delete o[key];
}
8 years ago
});
8 years ago
delete o['connectTo'];
return o;
8 years ago
}
8 years ago
Kubernetes.unenrich = unenrich;
8 years ago
/**
8 years ago
* Returns the unenriched JSON representation of an object
*/
function toRawJson(item) {
var o = unenrich(item);
return JSON.stringify(o, null, 2); // spacing level = 2
}
Kubernetes.toRawJson = toRawJson;
/**
* Returns the unenriched YAML representation of an object
*/
function toRawYaml(item) {
var o = unenrich(item);
return jsyaml.dump(o, { indent: 2 });
}
Kubernetes.toRawYaml = toRawYaml;
function watch($scope, $element, kind, ns, fn, labelSelector) {
if (labelSelector === void 0) { labelSelector = null; }
var connection = KubernetesAPI.watch({
kind: kind,
namespace: ns,
labelSelector: labelSelector,
success: function (objects) {
fn(objects);
Core.$apply($scope);
8 years ago
}
8 years ago
});
$element.on('$destroy', function () {
console.log("Static controller[" + kind + ", " + ns + "] element destroyed");
$scope.$destroy();
});
$scope.$on('$destroy', function () {
console.log("Static controller[" + kind + ", " + ns + "] scope destroyed");
connection.disconnect();
});
var oldDeleteScopeFn = $scope.deleteScope;
$scope.deleteScope = function () {
$element.remove();
if (angular.isFunction(oldDeleteScopeFn)) {
oldDeleteScopeFn();
8 years ago
}
};
8 years ago
}
Kubernetes.watch = watch;
function createKubernetesClient(kind, ns) {
if (ns === void 0) { ns = null; }
var K8SClientFactory = inject("K8SClientFactory");
if (!K8SClientFactory) {
Kubernetes.log.warn("Could not find injected K8SClientFactory!");
return null;
}
if (kind === "projects" || kind === "namespaces") {
ns = null;
}
else if (!ns) {
ns = Kubernetes.currentKubernetesNamespace();
}
return K8SClientFactory.create(kind, ns);
}
Kubernetes.createKubernetesClient = createKubernetesClient;
function currentUserName() {
var userDetails = HawtioOAuth.getUserProfile();
var answer = null;
if (userDetails) {
answer = getName(userDetails);
}
return answer || "admin";
}
Kubernetes.currentUserName = currentUserName;
function createNamespace(ns, client) {
if (!client) {
client = Kubernetes.isOpenShift ? Kubernetes.createKubernetesClient('projects') : Kubernetes.createKubernetesClient('namespaces');
}
if (ns && ns !== currentKubernetesNamespace()) {
var object = {
apiVersion: Kubernetes.defaultApiVersion,
kind: Kubernetes.isOpenShift ? 'Project' : 'Namespace',
metadata: {
name: ns,
labels: {}
8 years ago
}
8 years ago
};
client.put(object, function (data) {
Kubernetes.log.info("Created namespace: " + ns);
}, function (err) {
Kubernetes.log.warn("Failed to create namespace: " + ns + ": " + angular.toJson(err));
});
8 years ago
}
}
Kubernetes.createNamespace = createNamespace;
function createRC(obj, onCompleteFn) {
if (onCompleteFn === void 0) { onCompleteFn = null; }
var client = Kubernetes.createKubernetesClient('replicationcontrollers', 'default');
var RCTemplate = new Kubernetes.resourceRCTemplate();
var rcTemplate = RCTemplate.createRC(obj);
client.put(rcTemplate, function (obj) {
if (angular.isFunction(onCompleteFn)) {
onCompleteFn(obj);
}
}, function (err) {
console.log(err);
});
}
Kubernetes.createRC = createRC;
function connectOracle($http, $timeout, url, operation, replicas, delayTime) {
$timeout(function () {
$http({
url: url,
method: 'POST',
params: { oracleName: getName(replicas), operation: operation },
}).success(function (data, header, config, status) {
console.log("success");
}).error(function (data, header, config, status) {
//log.warn("Failed to connect " + connectParam + " " + data + " " + status);
});
}, delayTime);
}
Kubernetes.connectOracle = connectOracle;
function getOracleStatus(labels) {
var answer = -1;
if (typeof (labels) === 'object' && labels.hasOwnProperty("status")) {
switch (labels.status) {
case '0':
answer = 0;
break;
case '1':
answer = 1;
break;
case '2':
answer = 2;
break;
default:
answer = -1;
}
}
return answer;
}
Kubernetes.getOracleStatus = getOracleStatus;
function getExtractStatus(labels) {
if (labels.isTarget === 'false') {
return parseInt(labels.isExtract);
}
else {
return 10;
}
}
Kubernetes.getExtractStatus = getExtractStatus;
function getOracleName(replicas) {
var annotation = getAnnotations(replicas);
return annotation["cityName"] + "-" + annotation["districtName"] + "-" + annotation["systemName"];
}
Kubernetes.getOracleName = getOracleName;
function extractDataToOracle($http, selectedReplicationControllers, targetOracle, fn) {
//console.log(targetReplicationController.length);
var answer = targetOracle && true;
var inneedOracle = [];
selectedReplicationControllers.forEach(function (rc) {
var annotations = getAnnotations(rc);
answer = answer && checkoutOracleIsRunning(rc);
inneedOracle.push({
"name": getName(rc),
"ip": getHost(rc.$pods[0]),
"port": rc.$pods[0].spec.containers[0].ports[0].hostPort,
"dataId": annotations["id"]
});
});
if (answer) {
var data = { "name": targetOracle.id, "target": targetOracle, "inneed": inneedOracle };
var spinner;
$.ajax({
type: "POST",
url: UrlHelpers.join("/java/console/api/oracle", targetOracle.id + "", "extract"),
timeout: 8000,
dataType: 'json',
//async: false,
data: JSON.stringify(data),
contentType: "application/json; charset=utf-8",
beforeSend: function () {
Configs.create_mask(); //创建遮罩层
create_locadEffect("正在验证汇总库配置信息,请稍等!"); //创建数据加载效果层
var target = document.getElementById('loading');
spinner = new Spinner(loadConfigs()).spin(target);
},
complete: function (XMLHttpRequest, textStatus) {
if (XMLHttpRequest.status == 200) {
//spinner.spin();
Kubernetes.createSuccessInfo("succes", "连接汇总库成功,即将执行汇总操作!");
setTimeout("Kubernetes.removeMask()", 1500);
}
8 years ago
else {
//spinner.spin();
Kubernetes.createSuccessInfo("error", "连接汇总库失败,请检查服务集群中的汇总库配置是否正确!");
setTimeout("Kubernetes.removeMask()", 1500);
}
}
});
8 years ago
}
8 years ago
else {
//alert("您选择的汇总数据库或需要汇总的数据库中存在未启动成功的数据库,导致汇总操作失败,请重新选择!");
Configs.customAlert("提示", "操作失败:需要汇总的数据库中存在未启动成功的数据库!", '', null, 0, "error");
}
}
Kubernetes.extractDataToOracle = extractDataToOracle;
function checkoutOracleIsRunning(rc) {
if (rc.$podCounters.ready && rc.$oracleStatus == 2) {
return true;
}
else {
return false;
}
}
Kubernetes.checkoutOracleIsRunning = checkoutOracleIsRunning;
function replicasIsCreated(replicationcontrollers, name) {
var result = false;
if (replicationcontrollers != null || replicationcontrollers.length <= 0) {
for (var i = 0; i < replicationcontrollers.length; i++) {
if (getName(replicationcontrollers[i]) === name) {
result = true;
break;
}
}
}
return result;
}
Kubernetes.replicasIsCreated = replicasIsCreated;
function loadConfigs() {
return {
lines: 9,
length: 0,
width: 13,
radius: 38,
scale: 1,
corners: 1,
color: '#ffffff',
opacity: 0,
rotate: 90,
direction: 1,
speed: 0.5,
trail: 50,
zIndex: 1000000002,
className: 'spinner',
top: '40%',
left: '50%',
shadow: false,
hwaccel: false,
position: 'absolute'
};
}
Kubernetes.loadConfigs = loadConfigs;
/*
创建加载效果层
*/
function create_locadEffect(msg) {
var tmp = "<div id=\"loading\"></div>"
+ "<span>" + msg + "</span>";
var load = document.createElement("div");
load.id = "load";
load.innerHTML = tmp;
document.body.appendChild(load);
$("#load").addClass("load-effect-msg");
}
Kubernetes.create_locadEffect = create_locadEffect;
function createSuccessInfo(icon, msg) {
$("#load").remove();
Configs.customAlert("提示", msg, '', null, 0, icon);
/*var tmp = "<div class=\"load-result\" ><img src=\""
+ icon + "\" class=\"custom-alert-img\"></div>"
+ "<span class=\"load-result-msg\">" + msg +"</span>";
var result = document.createElement("div");
result.id = "exe_result";
result.innerHTML = tmp;
document.body.appendChild(result);*/
}
Kubernetes.createSuccessInfo = createSuccessInfo;
function removeMask() {
var mask = document.getElementById("mask");
//var result = document.getElementById("exe_result");
if (null == mask)
return;
document.body.removeChild(mask);
//document.body.removeChild(result);
}
Kubernetes.removeMask = removeMask;
})(Kubernetes || (Kubernetes = {}));
8 years ago
/// <reference path="../../includes.ts"/>
/// <reference path="../../kubernetes/ts/kubernetesHelpers.ts" />
var Developer;
(function (Developer) {
Developer.context = '/workspaces';
Developer.hash = '#' + Developer.context;
Developer.pluginName = 'Developer';
Developer.pluginPath = 'plugins/developer/';
Developer.templatePath = Developer.pluginPath + 'html/';
Developer.log = Logger.get(Developer.pluginName);
Developer.jenkinsServiceName = "jenkins";
Developer.jenkinsServiceNameAndPort = Developer.jenkinsServiceName + ":http";
Developer.jenkinsHttpConfig = {
headers: {
Accept: "application/json, text/x-json, text/plain"
}
8 years ago
};
8 years ago
/**
* Returns true if the value hasn't changed from the last cached JSON version of this object
*/
function hasObjectChanged(value, state) {
var json = angular.toJson(value || "");
var oldJson = state.json;
state.json = json;
return !oldJson || json !== oldJson;
}
Developer.hasObjectChanged = hasObjectChanged;
function projectForScope($scope) {
if ($scope) {
return $scope.buildConfig || $scope.entity || ($scope.model || {}).project;
}
return null;
}
Developer.projectForScope = projectForScope;
/**
* Lets load the project versions for the given namespace
*/
function loadProjectVersions($scope, $element, project, env, ns, answer, caches) {
var projectAnnotation = "project";
var versionAnnotation = "version";
var projectNamespace = project.$namespace;
var projectName = project.$name;
var cache = caches[ns];
if (!cache) {
cache = {};
caches[ns] = cache;
}
var status = {
rcs: [],
pods: [],
routes: [],
services: []
};
var imageStreamTags = [];
function updateModel() {
var projectInfos = {};
var model = $scope.model || {};
angular.forEach(status.rcs, function (item) {
var metadata = item.metadata || {};
var name = metadata.name;
var labels = metadata.labels || {};
var annotations = metadata.annotations || {};
var spec = item.spec || {};
var selector = spec.selector;
var project = labels[projectAnnotation];
var version = labels[versionAnnotation];
// lets try the S2I defaults...
if (!project) {
project = labels["app"];
}
if (!version) {
version = annotations["openshift.io/deployment-config.latest-version"];
}
if (project && version && project === projectName) {
var projects = projectInfos[project];
if (!projects) {
projects = {
project: project,
versions: {}
};
projectInfos[project] = projects;
}
8 years ago
var versionInfo = projects.versions[version];
if (!versionInfo) {
versionInfo = {
replicationControllers: {}
};
projects.versions[version] = versionInfo;
8 years ago
}
8 years ago
if (name) {
versionInfo.replicationControllers[name] = item;
item.$name = name;
if (projectNamespace && projectName) {
item.$viewLink = UrlHelpers.join("/workspaces/", projectNamespace, "projects", projectName, "namespace", ns, "replicationControllers", name);
}
else {
Developer.log.warn("Missing project data! " + projectNamespace + " name " + projectName);
}
item.$services = [];
var rcLink = null;
status.services.forEach(function (service) {
var repSelector = Kubernetes.getSelector(item);
var serviceSelector = Kubernetes.getSelector(service);
if (serviceSelector && repSelector &&
Kubernetes.selectorMatches(serviceSelector, repSelector) &&
Kubernetes.getNamespace(service) === Kubernetes.getNamespace(item)) {
status.routes.forEach(function (route) {
var serviceName = Kubernetes.getName(service);
if (serviceName === Kubernetes.getName(route)) {
service["$route"] = route;
service["$host"] = Core.pathGet(route, ["spec", "host"]);
item.$services.push(service);
if (!rcLink) {
var url = Kubernetes.serviceLinkUrl(service, true);
if (url) {
// TODO find icon etc?
rcLink = {
name: serviceName,
href: url
};
}
}
}
});
}
});
item["$serviceLink"] = rcLink;
}
item.$buildId = annotations["fabric8.io/build-id"] || item.$buildId;
item.$buildUrl = annotations["fabric8.io/build-url"] || item.$buildUrl;
item.$gitCommit = annotations["fabric8.io/git-commit"] || item.$gitCommit;
item.$gitUrl = annotations["fabric8.io/git-url"] || item.$gitUrl;
item.$gitBranch = annotations["fabric8.io/git-branch"] || item.$gitBranch;
if (!item.$gitCommit) {
var image = getImage(item);
if (image) {
if (!$scope.$isWatchImages) {
$scope.$isWatchImages = true;
Kubernetes.watch($scope, $element, "images", null, function (data) {
imageStreamTags = data;
checkForMissingMetadata();
});
}
else {
checkForMissingMetadata();
}
}
function getImage(item) {
var image = "";
// lets see if we can find the commit id from a S2I image name
// TODO needs this issue fixed to find it via an OpenShift annotation:
// https://github.com/openshift/origin/issues/6241
var containers = Core.pathGet(item, ["spec", "template", "spec", "containers"]);
if (containers && containers.length) {
var container = containers[0];
if (container) {
image = container.image;
}
8 years ago
}
return image;
}
function checkForMissingMetadata() {
angular.forEach(projects.versions, function (vi) {
angular.forEach(vi.replicationControllers, function (item, name) {
if (!item.$gitCommit) {
var image = getImage(item);
if (image) {
angular.forEach(imageStreamTags, function (imageStreamTag) {
var imageName = imageStreamTag.dockerImageReference;
if (imageName && imageName === image) {
var foundISTag = imageStreamTag;
var manifestJSON = imageStreamTag.dockerImageManifest;
if (manifestJSON) {
var manifest = angular.fromJson(manifestJSON) || {};
var history = manifest.history;
if (history && history.length) {
var v1 = history[0].v1Compatibility;
if (v1) {
var data = angular.fromJson(v1);
var env = Core.pathGet(data, ["config", "Env"]);
angular.forEach(env, function (envExp) {
if (envExp) {
var values = envExp.split("=");
if (values.length === 2 && values[0] == "OPENSHIFT_BUILD_NAME") {
var buildName = values[1];
if (buildName) {
item.$buildId = buildName;
item.$buildUrl = Developer.projectWorkspaceLink(ns, projectName, "buildLogs/" + buildName);
}
}
}
});
var labels = Core.pathGet(data, ["config", "Labels"]);
if (labels) {
item.$gitCommit = labels["io.openshift.build.commit.id"] || item.$gitCommit;
item.$gitCommitAuthor = labels["io.openshift.build.commit.author"] || item.$gitCommitAuthor;
item.$gitCommitDate = labels["io.openshift.build.commit.date"] || item.$gitCommitDate;
item.$gitCommitMessage = labels["io.openshift.build.commit.message"] || item.$gitCommitMessage;
item.$gitBranch = labels["io.openshift.build.commit.ref"] || item.$gitBranch;
if (!item.$gitUrl && item.$gitCommit) {
item.$gitUrl = Developer.projectWorkspaceLink(ns, projectName, "wiki/commitDetail///" + item.$gitCommit);
}
}
}
}
}
}
});
}
}
});
});
}
8 years ago
}
8 years ago
if (selector) {
var selectorText = Kubernetes.labelsToString(selector, ",");
var podLinkUrl = UrlHelpers.join(Developer.projectLink(projectName), "namespace", ns, "pods");
item.pods = [];
item.$podCounters = Kubernetes.createPodCounters(selector, status.pods, item.pods, selectorText, podLinkUrl);
}
8 years ago
}
});
8 years ago
// lets check for a project name if we have lots of RCs with no pods, lets remove them!
angular.forEach(projectInfos, function (project, projectName) {
var rcsNoPods = [];
var rcsWithPods = [];
angular.forEach(project.versions, function (versionInfo) {
var rcs = versionInfo.replicationControllers;
angular.forEach(rcs, function (item, name) {
var count = Kubernetes.podCounterTotal(item.$podCounters);
if (count) {
rcsWithPods.push(name);
8 years ago
}
8 years ago
else {
rcsNoPods.push(function () {
delete rcs[name];
8 years ago
});
}
8 years ago
});
8 years ago
});
8 years ago
if (rcsWithPods.length) {
// lets remove all the empty RCs
angular.forEach(rcsNoPods, function (fn) {
fn();
});
}
});
if (hasObjectChanged(projectInfos, cache)) {
Developer.log.debug("project versions has changed!");
answer[ns] = projectInfos;
}
8 years ago
}
8 years ago
Kubernetes.watch($scope, $element, "replicationcontrollers", ns, function (data) {
if (data) {
status.rcs = data;
updateModel();
}
});
Kubernetes.watch($scope, $element, "services", ns, function (data) {
if (data) {
status.services = data;
updateModel();
}
});
Kubernetes.watch($scope, $element, "routes", ns, function (data) {
if (data) {
status.routes = data;
updateModel();
}
});
Kubernetes.watch($scope, $element, "pods", ns, function (data) {
if (data) {
status.pods = data;
updateModel();
}
});
}
Developer.loadProjectVersions = loadProjectVersions;
})(Developer || (Developer = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="developerNavigation.ts"/>
/// <reference path="developerHelpers.ts"/>
var Developer;
(function (Developer) {
var log = Logger.get('developer-navigation');
function createCurrentSubNavBar($scope, $location, $routeParams) {
return Developer.activateCurrent([
{
href: UrlHelpers.join(Developer.context, "Overview", "cold/data-type/all"),
label: "冷区数据管理",
title: "数据汇总任务",
items: [{
href: UrlHelpers.join(Developer.context, "Overview", "cold/data-type/all"),
label: "全部",
title: "全部数据"
},
{
href: UrlHelpers.join(Developer.context, "Overview", "cold/data-type/financial"),
label: "财政",
title: "财政数据"
},
{
href: UrlHelpers.join(Developer.context, "Overview/", "cold/data-type/social-security"),
label: "社保",
title: "社保数据"
}]
},
{
href: UrlHelpers.join(Developer.context, "Overview", "hot/data-type/all"),
label: "热区数据管理",
title: "查看所有数据",
items: [{
href: UrlHelpers.join(Developer.context, "Overview", "hot/data-type/all"),
label: "全部",
title: "全部数据"
},
{
href: UrlHelpers.join(Developer.context, "Overview", "hot/data-type/financial"),
label: "财政",
title: "财政数据"
},
{
href: UrlHelpers.join(Developer.context, "Overview/", "hot/data-type/social-security"),
label: "社保",
title: "社保数据"
}]
},
{
href: UrlHelpers.join(Developer.context, "Overview/", "task"),
label: "任务",
title: "任务查看"
},
]);
}
Developer.createCurrentSubNavBar = createCurrentSubNavBar;
})(Developer || (Developer = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="configPlugin.ts"/>
/// <reference path="configsDataService.ts"/>
/// <reference path="../../developer/ts/developerNavigation.ts"/>
/// <reference path="../../developer/ts/dataManagerHelper.ts"/>
var Configs;
(function (Configs) {
var OperateType = (function () {
function OperateType() {
8 years ago
}
Object.defineProperty(OperateType, "DELETE", {
get: function () { return "delete"; },
enumerable: true,
configurable: true
});
Object.defineProperty(OperateType, "UPDATE", {
get: function () { return "update"; },
enumerable: true,
configurable: true
});
Object.defineProperty(OperateType, "PUT", {
get: function () { return "put"; },
enumerable: true,
configurable: true
});
Object.defineProperty(OperateType, "MOVE", {
get: function () { return "move"; },
enumerable: true,
configurable: true
});
Object.defineProperty(OperateType, "EXTRACT", {
get: function () { return "extract"; },
enumerable: true,
configurable: true
});
return OperateType;
8 years ago
}());
Configs.OperateType = OperateType;
Configs._module.controller('Configs.MenuItemController', ['$scope', '$location', function ($scope, $location) {
$scope.menuItem = [{
icon: "glyphicon glyphicon-cloud-upload",
label: "数据管理配置",
title: "配置数据存储信息",
href: UrlHelpers.join(Configs.context, "/gluster-fs/setting")
},
{
icon: "glyphicon glyphicon-th-list",
label: "服务集群配置",
title: "配置服务集群信息",
href: UrlHelpers.join(Configs.context, "/kube-cluster/setting")
}];
}]);
function createConfigBreadcrumbs($scope, $location, $routeParams) {
var url = $location.url();
var label, title;
switch (url) {
case "/config/gluster-fs/setting":
label = "数据管理配置";
title = "配置数据存储信息";
break;
case "/config/kube-cluster/setting":
label = "服务集群配置";
title = "配置服务集群信息";
break;
default:
break;
}
return Developer.activateCurrent([{
href: url,
label: label,
title: title //item.title
}]);
8 years ago
}
function createOracleInfo(array, id) {
var result = { "id": id };
angular.forEach(array, function (arr) {
result[arr.field] = arr.value;
});
8 years ago
return result;
}
Configs.createOracleInfo = createOracleInfo;
function shareInit($scope, $location, $routeParams) {
$scope.subTabConfig = Developer.createCurrentSubNavBar($scope, $location, $routeParams);
$scope.mask = true;
/**
创建全屏遮挡
*/
$("#mask").css("position", "absolute");
$("#mask").css("background", "black");
$("#mask").css("opacity", 0.4);
$("#mask").css("filter", "progid:DXImageTransform.Microsoft.Alpha(style=4,opacity=25)");
$("#mask").css("top", "0px");
$("#mask").css("left", "0px");
$("#mask").css("width", document.body.clientWidth + document.body.scrollLeft);
$("#mask").css("height", document.body.clientHeight + document.body.scrollTop);
$("#mask").css("zIndex", 1000);
8 years ago
}
Configs.shareInit = shareInit;
function createNewObejct(array, obj) {
8 years ago
var result = [];
if (obj) {
angular.forEach(array, function (arr) {
result.push({
field: arr.field,
name: arr.displayName,
value: obj[arr.field]
});
});
}
else {
angular.forEach(array, function (arr) {
result.push({
field: arr.field,
name: arr.displayName,
value: null
});
});
}
8 years ago
return result;
}
Configs.createNewObejct = createNewObejct;
function oracleInfoOperate($http, url, operate, resource, fn) {
if (resource === null)
throw "不能操作空资源对象";
var id = resource["id"] || resource["name"] || resource["_id"] || resource["_key"];
var RESTfulUrl = url;
if (id == "undefined") {
RESTfulUrl = UrlHelpers.join(url, operate);
}
else {
RESTfulUrl = UrlHelpers.join(url, id + "", operate);
}
$http({
method: "POST",
dataType: 'json',
url: RESTfulUrl,
data: JSON.stringify(resource),
}).success(function (data, header, config, status) {
if (angular.isFunction(fn))
fn(data, header);
}).error(function (data, header, config, status) {
if (angular.isFunction(fn))
fn(data, header);
8 years ago
});
}
Configs.oracleInfoOperate = oracleInfoOperate;
function createConfigHelperNavBar($scope, $location, $routeParams) {
return Developer.activateCurrent([
{
href: UrlHelpers.join(Configs.context, "regionalism-code/searching"),
label: "行政区划检索",
title: "检索行政区划代码"
},
{
href: UrlHelpers.join(Configs.context, "system-code/searching"),
label: "系统编码检索",
title: "检索系统编码"
}
]);
8 years ago
}
Configs.createConfigHelperNavBar = createConfigHelperNavBar;
function formatVolume(volume) {
var brick = [];
angular.forEach(volume.brick, function (block) {
brick.push({
ip: block.ip.split("."),
status: block.status,
path: block.path,
editable: block.editable || false
});
8 years ago
});
return {
name: volume.name,
path: volume.path,
brick: brick,
status: volume.status,
editable: volume.editable || false
};
8 years ago
}
Configs.formatVolume = formatVolume;
function volumesFormat(volumes) {
8 years ago
var result = [];
angular.forEach(volumes, function (volume) {
result.push(formatVolume(volume));
8 years ago
});
return result;
}
Configs.volumesFormat = volumesFormat;
})(Configs || (Configs = {}));
/// <reference path="../../includes.ts"/>
var Configs;
(function (Configs) {
function removeElementByValue(array, value, key) {
if (key) {
for (var i = 0; i < array.length; i++) {
if (array[i][key] === value) {
array.splice(i, 1);
break;
}
}
8 years ago
}
else {
for (var i = 0; i < array.length; i++) {
if (array[i] === value) {
array.splice(i, 1);
break;
8 years ago
}
}
8 years ago
}
}
Configs.removeElementByValue = removeElementByValue;
function removeElementsByValue(array, elements) {
angular.forEach(elements, function (element) {
removeElementByValue(array, element.value, element.key);
});
8 years ago
}
Configs.removeElementsByValue = removeElementsByValue;
/**
对象的深拷贝
*/
function deepCopy(object) {
var n, i;
if (object instanceof Array) {
n = [];
for (i = 0; i < object.length; ++i) {
n[i] = deepCopy(object[i]);
8 years ago
}
return n;
8 years ago
}
else if (object instanceof Object) {
n = {};
for (i in object) {
n[i] = deepCopy(object[i]);
8 years ago
}
return n;
8 years ago
}
else {
return object;
8 years ago
}
}
Configs.deepCopy = deepCopy;
})(Configs || (Configs = {}));
8 years ago
/// <reference path="../../includes.ts"/>
/// <reference path="kubernetesHelpers.ts"/>
var Kubernetes;
(function (Kubernetes) {
Kubernetes._module = angular.module(Kubernetes.pluginName, ['hawtio-core', 'hawtio-ui', 'ui.codemirror', 'ui.validate', 'kubernetesUI']);
Kubernetes.controller = PluginHelpers.createControllerFunction(Kubernetes._module, Kubernetes.pluginName);
Kubernetes.route = PluginHelpers.createRoutingFunction(Kubernetes.templatePath);
Kubernetes._module.config(['$routeProvider', function ($routeProvider) {
$routeProvider
.when(UrlHelpers.join(Kubernetes.context, '/pods'), Kubernetes.route('pods.html', false))
.when(UrlHelpers.join(Kubernetes.context, 'replicationControllers'), Kubernetes.route('replicationControllers.html', false))
.when(UrlHelpers.join(Kubernetes.context, 'services'), Kubernetes.route('services.html', false))
.when(UrlHelpers.join(Kubernetes.context, 'events'), Kubernetes.route('events.html', false))
.when(UrlHelpers.join(Kubernetes.context, 'apps'), Kubernetes.route('apps.html', false))
.when(UrlHelpers.join(Kubernetes.context, 'apps/:namespace'), Kubernetes.route('apps.html', false))
.when(UrlHelpers.join(Kubernetes.context, 'templates'), Kubernetes.route('templates.html', false))
.when(UrlHelpers.join(Kubernetes.context, 'hosts'), Kubernetes.route('hosts.html', false))
.when(UrlHelpers.join(Kubernetes.context, 'hosts/:id'), Kubernetes.route('host.html', true))
.when(UrlHelpers.join(Kubernetes.context, 'pipelines'), Kubernetes.route('pipelines.html', false))
.when(UrlHelpers.join(Kubernetes.context, 'overview'), Kubernetes.route('overview.html', true))
.when(Kubernetes.context, { redirectTo: UrlHelpers.join(Kubernetes.context, 'replicationControllers') });
angular.forEach([Kubernetes.context, "/workspaces/:workspace/projects/:project"], function (context) {
$routeProvider
.when(UrlHelpers.join(context, '/namespace/:namespace/podCreate'), Kubernetes.route('podCreate.html', false))
.when(UrlHelpers.join(context, '/namespace/:namespace/podEdit/:id'), Kubernetes.route('podEdit.html', false))
.when(UrlHelpers.join(context, '/namespace/:namespace/pods'), Kubernetes.route('pods.html', false))
.when(UrlHelpers.join(context, '/namespace/:namespace/pods/:id'), Kubernetes.route('pod.html', false))
.when(UrlHelpers.join(context, '/namespace/:namespace/replicationControllers'), Kubernetes.route('replicationControllers.html', false))
.when(UrlHelpers.join(context, '/namespace/:namespace/replicationControllers/:id'), Kubernetes.route('replicationController.html', false))
.when(UrlHelpers.join(context, '/namespace/:namespace/replicationControllerCreate'), Kubernetes.route('replicationControllerCreate.html', false))
.when(UrlHelpers.join(context, '/namespace/:namespace/replicationControllerEdit/:id'), Kubernetes.route('replicationControllerEdit.html', false))
.when(UrlHelpers.join(context, '/namespace/:namespace/secrets'), Kubernetes.route('secrets.html', false))
.when(UrlHelpers.join(context, '/namespace/:namespace/secrets/:id'), Kubernetes.route('secret.html', false))
.when(UrlHelpers.join(context, '/namespace/:namespace/secretCreate'), Kubernetes.route('secret.html', false))
.when(UrlHelpers.join(context, '/namespace/:namespace/services'), Kubernetes.route('services.html', false))
.when(UrlHelpers.join(context, '/namespace/:namespace/services/:id'), Kubernetes.route('service.html', false))
.when(UrlHelpers.join(context, '/namespace/:namespace/serviceCreate'), Kubernetes.route('serviceCreate.html', false))
.when(UrlHelpers.join(context, '/namespace/:namespace/serviceEdit/:id'), Kubernetes.route('serviceEdit.html', false))
.when(UrlHelpers.join(context, '/namespace/:namespace/events'), Kubernetes.route('events.html', false))
.when(UrlHelpers.join(context, '/namespace/:namespace/apps'), Kubernetes.route('apps.html', false))
.when(UrlHelpers.join(context, '/namespace/:namespace/overview'), Kubernetes.route('overview.html', true))
.when(UrlHelpers.join(context, '/namespace/:namespace/templates/:targetNamespace'), Kubernetes.route('templates.html', false))
.when(UrlHelpers.join(context, '/namespace/:namespace'), Kubernetes.route('apps.html', false))
.when(UrlHelpers.join(context, 'builds'), Kubernetes.route('builds.html', false))
.when(UrlHelpers.join(context, 'builds/:id'), Kubernetes.route('build.html', true))
.when(UrlHelpers.join(context, 'buildLogs/:id'), Kubernetes.route('buildLogs.html', true))
.when(UrlHelpers.join(context, 'buildConfigs'), Kubernetes.route('buildConfigs.html', false))
.when(UrlHelpers.join(context, 'buildConfigs/:id'), Kubernetes.route('buildConfig.html', true))
.when(UrlHelpers.join(context, 'buildConfigEdit/:id'), Kubernetes.route('buildConfigEdit.html', true))
.when(UrlHelpers.join(context, 'deploymentConfigs'), Kubernetes.route('deploymentConfigs.html', false))
.when(UrlHelpers.join(context, 'deploymentConfigs/:id'), Kubernetes.route('deploymentConfig.html', true))
.when(UrlHelpers.join(context, 'imageRepositories'), Kubernetes.route('imageRepositories.html', false));
});
angular.forEach([Kubernetes.context, "/workspaces/:workspace", "/workspaces/:workspace/projects/:project"], function (context) {
$routeProvider
.when(UrlHelpers.join(context, 'buildConfigEdit'), Kubernetes.route('buildConfigEdit.html', true))
.when(UrlHelpers.join(context, 'buildConfigEdit/:id'), Kubernetes.route('buildConfigEdit.html', true))
.when(UrlHelpers.join(context, 'importProject'), Kubernetes.route('importProject.html', true));
});
}]);
Kubernetes._module.factory('AppLibraryURL', ['$rootScope', function ($rootScope) {
return UrlHelpers.join(Kubernetes.kubernetesApiUrl(), "/proxy", Kubernetes.kubernetesNamespacePath(), "/services/app-library");
}]);
Kubernetes._module.factory('WikiGitUrlPrefix', function () {
return UrlHelpers.join(Kubernetes.kubernetesApiUrl(), "/proxy", Kubernetes.kubernetesNamespacePath(), "services/app-library");
});
Kubernetes._module.factory('wikiRepository', ["$location", "localStorage", function ($location, localStorage) {
return false;
}]);
Kubernetes._module.factory('ConnectDialogService', ['$rootScope', function ($rootScope) {
return {
dialog: new UI.Dialog(),
saveCredentials: false,
userName: null,
password: null,
jolokiaUrl: null,
containerName: null,
view: null
};
8 years ago
}]);
Kubernetes._module.filter('kubernetesPageLink', function () { return Kubernetes.entityPageLink; });
Kubernetes._module.filter('relativeTime', function () {
return function (date) {
return humandate.relativeTime(date);
};
});
Kubernetes._module.run(['viewRegistry', 'ServiceRegistry', 'HawtioNav', 'KubernetesModel', '$templateCache', function (viewRegistry, ServiceRegistry, HawtioNav, KubernetesModel, $templateCache) {
Kubernetes.log.debug("Running");
viewRegistry['kubernetes'] = Kubernetes.templatePath + 'layoutKubernetes.html';
//viewRegistry['kubernetes'] = Configs.templatePath + 'shareLayout.html';
var builder = HawtioNav.builder();
var apps = builder.id('kube-apps')
.href(function () { return UrlHelpers.join(Kubernetes.context, 'apps'); })
.title(function () { return 'Apps'; })
.build();
var services = builder.id('kube-services')
.href(function () { return UrlHelpers.join(Kubernetes.context, 'services'); })
.title(function () { return 'Services'; })
.build();
var controllers = builder.id('kube-controllers')
.href(function () { return UrlHelpers.join(Kubernetes.context, 'replicationControllers'); })
.title(function () { return 'oracle服务'; })
.build();
var pods = builder.id('kube-pods')
.href(function () { return UrlHelpers.join(Kubernetes.context, 'pods'); })
.title(function () { return '测试页面'; })
.build();
var events = builder.id('kube-events')
.href(function () { return UrlHelpers.join(Kubernetes.context, 'events'); })
.title(function () { return '服务启动日志'; })
.build();
var hosts = builder.id('kube-hosts')
.href(function () { return UrlHelpers.join(Kubernetes.context, 'hosts'); })
.title(function () { return '集群节点'; })
.build();
var overview = builder.id('kube-overview')
.href(function () { return UrlHelpers.join(Kubernetes.context, 'overview'); })
.title(function () { return 'Diagram'; })
.build();
var builds = builder.id('kube-builds')
.href(function () { return UrlHelpers.join(Kubernetes.context, 'builds'); })
.title(function () { return 'Builds'; })
.build();
var buildConfigs = builder.id('kube-buildConfigs')
.href(function () { return UrlHelpers.join(Kubernetes.context, 'buildConfigs'); })
.title(function () { return 'Build Configs'; })
.build();
var deploys = builder.id('kube-deploys')
.href(function () { return UrlHelpers.join(Kubernetes.context, 'deploymentConfigs'); })
.title(function () { return 'Deploys'; })
.build();
var imageRepositories = builder.id('kube-imageRepositories')
.href(function () { return UrlHelpers.join(Kubernetes.context, 'imageRepositories'); })
.title(function () { return 'Registries'; })
.build();
var pipelines = builder.id('kube-pipelines')
.href(function () { return UrlHelpers.join(Kubernetes.context, 'pipelines'); })
.title(function () { return 'Pipelines'; })
.build();
var repos = builder.id('kube-repos')
.href(function () { return "/forge/repos"; })
.isValid(function () { return ServiceRegistry.hasService(Kubernetes.fabric8ForgeServiceName) && ServiceRegistry.hasService(Kubernetes.gogsServiceName); })
.title(function () { return 'Repositories'; })
.build();
var mainTab = builder.id('kubernetes')
.rank(100)
.defaultPage({
rank: 20,
isValid: function (yes, no) {
yes();
}
})
.href(function () { return UrlHelpers.join(Kubernetes.context, "/namespace/default/replicationControllers"); })
.title(function () { return '服务集群'; })
.tabs(controllers, pods, events)
.build();
HawtioNav.add(mainTab);
/* testKubernetesModel
HawtioNav.add({
id: 'k8sAppSwitcher',
title: () => '', // not used as 'template' below overrides this
isValid: () => KubernetesModel.serviceApps.length > 0,
context: true,
template: () => $templateCache.get(UrlHelpers.join(templatePath, 'serviceApps.html'))
});
*/
var projectsTab = builder.id('openshift')
.rank(100)
.href(function () { return UrlHelpers.join(Kubernetes.context, 'buildConfigs') + '?sub-tab=kube-buildConfigs'; })
.title(function () { return 'Projects'; })
.tabs(repos, buildConfigs, builds, deploys, imageRepositories)
.build();
//HawtioNav.add(projectsTab);
}]);
hawtioPluginLoader.registerPreBootstrapTask({
name: 'KubernetesInit',
task: function (next) {
$.getScript('osconsole/config.js')
.done(function (script, textStatus) {
var config = Kubernetes.osConfig = window['OPENSHIFT_CONFIG'];
Kubernetes.log.debug("Fetched OAuth config: ", config);
var master = config.master_uri;
if (!master && config.api && config.api.k8s) {
var masterUri = new URI().host(config.api.k8s.hostPort).path("").query("");
if (config.api.k8s.proto) {
masterUri.protocol(config.api.k8s.proto);
}
master = masterUri.toString();
}
OSOAuthConfig = config.openshift;
GoogleOAuthConfig = config.google;
KeycloakConfig = config.keycloak;
if (OSOAuthConfig && !master) {
// TODO auth.master_uri no longer used right?
// master = OSOAuthConfig.master_uri;
if (!master) {
var oauth_authorize_uri = OSOAuthConfig.oauth_authorize_uri;
if (oauth_authorize_uri) {
var text = oauth_authorize_uri;
var idx = text.indexOf("://");
if (idx > 0) {
idx += 3;
idx = text.indexOf("/", idx);
if (idx > 0) {
master = text.substring(0, ++idx);
}
}
}
}
}
if ((!Kubernetes.masterUrl || Kubernetes.masterUrl === "/") && (!master || master === "/")) {
// lets default the master to the current protocol and host/port
// in case the master url is "/" and we are
// serving up static content from inside /api/v1/namespaces/default/services/fabric8 or something like that
var href = location.href;
if (href) {
master = new URI(href).query("").path("").toString();
}
}
if (master) {
Kubernetes.masterUrl = master;
next();
return;
}
})
.fail(function (response) {
Kubernetes.log.debug("Error fetching OAUTH config: ", response);
})
.always(function () {
next();
});
}
}, true);
hawtioPluginLoader.addModule('ngResource');
hawtioPluginLoader.addModule(Kubernetes.pluginName);
})(Kubernetes || (Kubernetes = {}));
/// <reference path="kubernetesPlugin.ts"/>
var Kubernetes;
(function (Kubernetes) {
var log = Logger.get('kubernetes-watcher');
var k8sTypes = KubernetesAPI.NamespacedTypes.k8sTypes;
var osTypes = KubernetesAPI.NamespacedTypes.osTypes;
var self = {};
var updateFunction = function () {
log.debug("Objects changed, firing listeners");
var objects = {};
_.forEach(self.getTypes(), function (type) {
objects[type] = self.getObjects(type);
});
_.forEach(self.listeners, function (listener) {
listener(objects);
});
};
var debouncedUpdate = _.debounce(updateFunction, 75, { trailing: true });
var namespaceWatch = {
selected: undefined,
watch: undefined,
objects: [],
objectMap: {},
watches: {}
};
hawtioPluginLoader.registerPreBootstrapTask({
name: 'KubernetesWatcherInit',
depends: ['KubernetesApiDiscovery'],
task: function (next) {
var booted = false;
if (Kubernetes.isOpenShift) {
log.info("Backend is an Openshift instance");
}
else {
log.info("Backend is a vanilla Kubernetes instance");
}
namespaceWatch.watch = KubernetesAPI.watch({
kind: KubernetesAPI.WatchTypes.NAMESPACES,
success: function (objects) {
namespaceWatch.objects = objects;
if (!booted) {
booted = true;
self.setNamespace(localStorage[Kubernetes.Constants.NAMESPACE_STORAGE_KEY] || Kubernetes.defaultNamespace);
next();
}
log.debug("Got namespaces: ", namespaceWatch.objects);
}, error: function (error) {
log.warn("Error fetching namespaces: ", error);
// TODO is this necessary?
//HawtioOAuth.doLogout();
if (!booted) {
booted = true;
next();
}
}
8 years ago
});
}
});
8 years ago
hawtioPluginLoader.registerPreBootstrapTask({
name: 'KubernetesApiDiscovery',
depends: ['hawtio-oauth'],
8 years ago
task: function (next) {
Kubernetes.isOpenShift = false;
var userProfile = HawtioOAuth.getUserProfile();
log.debug("User profile: ", userProfile);
if (userProfile && userProfile.provider === "hawtio-google-oauth") {
log.debug("Possibly running on GCE");
// api master is on GCE
$.ajax({
url: UrlHelpers.join(Kubernetes.masterApiUrl(), 'api', 'v1', 'namespaces'),
complete: function (jqXHR, textStatus) {
if (textStatus === "success") {
log.debug("jqXHR: ", jqXHR);
userProfile.oldToken = userProfile.token;
userProfile.token = undefined;
$.ajaxSetup({
beforeSend: function (request) {
}
});
}
next();
},
beforeSend: function (request) {
8 years ago
}
});
}
else {
log.debug("Not running on GCE");
// double-check if we're on vanilla k8s or openshift
var rootUri = new URI(Kubernetes.masterApiUrl()).path("/oapi").query("").toString();
log.debug("Checking for an openshift backend");
HawtioOAuth.authenticatedHttpRequest({
url: rootUri,
success: function (data) {
if (data) {
Kubernetes.isOpenShift = true;
}
next();
},
error: function (jqXHR, textStatus, errorThrown) {
var error = KubernetesAPI.getErrorObject(jqXHR);
if (!error) {
log.debug("Failed to find root paths: ", textStatus, ": ", errorThrown);
}
else {
log.debug("Failed to find root paths: ", error);
}
Kubernetes.isOpenShift = false;
next();
}
});
}
}
});
var customUrlHandlers = {};
self.setNamespace = function (namespace) {
if (namespace === namespaceWatch.selected) {
return;
}
if (namespaceWatch.selected) {
log.debug("Stopping current watches");
_.forOwn(namespaceWatch.watches, function (watch, key) {
if (!KubernetesAPI.namespaced(key)) {
return;
8 years ago
}
log.debug("Disconnecting watch: ", key);
watch.disconnect();
});
_.forEach(_.keys(namespaceWatch.watches), function (key) {
if (!KubernetesAPI.namespaced(key)) {
return;
}
log.debug("Deleting kind: ", key);
delete namespaceWatch.watches[key];
});
}
namespaceWatch.selected = namespace;
if (namespace) {
_.forEach(self.getTypes(), function (kind) {
if (kind === KubernetesAPI.WatchTypes.NAMESPACES) {
return;
}
if (!namespaceWatch.watches[kind]) {
log.debug("Creating watch for kind: ", kind);
var config = {
kind: kind,
namespace: KubernetesAPI.namespaced(kind) ? namespace : undefined,
success: function (objects) {
watch.objects = objects;
debouncedUpdate();
}
};
if (kind in customUrlHandlers) {
config.urlFunction = customUrlHandlers[kind];
}
var watch = KubernetesAPI.watch(config);
watch.config = config;
namespaceWatch.watches[kind] = watch;
}
});
}
};
self.hasWebSocket = true;
self.getNamespace = function () { return namespaceWatch.selected; };
self.registerCustomUrlFunction = function (kind, url) {
customUrlHandlers[kind] = url;
if (kind in namespaceWatch.watches) {
var watch = namespaceWatch.watches[kind];
var config = watch.config;
config.urlFunction = url;
watch.disconnect();
delete namespaceWatch.watches[kind];
config.success = function (objects) {
watch.objects = objects;
debouncedUpdate();
};
watch = KubernetesAPI.watch(config);
watch.config = config;
namespaceWatch.watches[kind] = watch;
}
};
self.getTypes = function () {
var filter = function (kind) {
// filter out stuff we don't care about yet
switch (kind) {
case KubernetesAPI.WatchTypes.OAUTH_CLIENTS:
case KubernetesAPI.WatchTypes.IMAGE_STREAMS:
case KubernetesAPI.WatchTypes.POLICIES:
case KubernetesAPI.WatchTypes.ROLES:
case KubernetesAPI.WatchTypes.ROLE_BINDINGS:
case KubernetesAPI.WatchTypes.POLICY_BINDINGS:
case KubernetesAPI.WatchTypes.PERSISTENT_VOLUME_CLAIMS:
case KubernetesAPI.WatchTypes.PERSISTENT_VOLUMES:
case KubernetesAPI.WatchTypes.ENDPOINTS:
case KubernetesAPI.WatchTypes.RESOURCE_QUOTAS:
case KubernetesAPI.WatchTypes.SERVICE_ACCOUNTS:
return false;
default:
return true;
}
};
var answer = k8sTypes.concat([Kubernetes.WatchTypes.NAMESPACES]);
if (Kubernetes.isOpenShift) {
answer = answer.concat(osTypes);
}
else {
answer = answer.concat(KubernetesAPI.WatchTypes.TEMPLATES);
answer = answer.concat(KubernetesAPI.WatchTypes.BUILD_CONFIGS);
}
return _.filter(answer, filter);
};
self.getObjects = function (kind) {
if (kind === Kubernetes.WatchTypes.NAMESPACES) {
return namespaceWatch.objects;
}
if (kind in namespaceWatch.watches) {
return namespaceWatch.watches[kind].objects;
}
else {
return undefined;
}
};
self.listeners = [];
// listener gets notified after a bunch of changes have occurred
self.registerListener = function (fn) {
self.listeners.push(fn);
};
var projectsHandle = undefined;
// kick off the project watcher a bit sooner also
hawtioPluginLoader.registerPreBootstrapTask({
name: 'ProjectsWatcher',
depends: ['KubernetesApiDiscovery'],
task: function (next) {
if (Kubernetes.isOpenShift) {
projectsHandle = KubernetesAPI.watch({
kind: KubernetesAPI.WatchTypes.PROJECTS,
namespace: undefined,
success: function (objects) {
if (self.listeners && self.listeners.length) {
log.debug("got projects: ", objects);
_.forEach(self.listeners, function (listener) {
listener({
projects: objects
});
});
8 years ago
}
8 years ago
}
});
}
next();
8 years ago
}
});
Kubernetes._module.service('WatcherService', ['userDetails', '$rootScope', '$timeout', function (userDetails, $rootScope, $timeout) {
return self;
}]);
8 years ago
})(Kubernetes || (Kubernetes = {}));
8 years ago
8 years ago
/// <reference path="kubernetesPlugin.ts"/>
/// <reference path="watcher.ts"/>
8 years ago
var Kubernetes;
(function (Kubernetes) {
var log = Logger.get("kubernetes-term-windows");
Kubernetes._module.config(["kubernetesContainerSocketProvider", function (kubernetesContainerSocketProvider) {
kubernetesContainerSocketProvider.WebSocketFactory = "CustomWebSockets";
}]);
Kubernetes._module.factory('CustomWebSockets', ["userDetails", function (userDetails) {
return function CustomWebSocket(url, protocols) {
var paths = url.split('?');
if (!_.startsWith(paths[0], Kubernetes.masterApiUrl())) {
paths[0] = UrlHelpers.join(Kubernetes.masterApiUrl(), paths[0]);
8 years ago
}
url = KubernetesAPI.wsUrl(paths[0]);
url.search(paths[1] + '&access_token=' + userDetails.token);
log.debug("Using ws url: ", url.toString());
return new WebSocket(url.toString(), protocols);
};
}]);
Kubernetes._module.service('TerminalService', ["$rootScope", "$document", "$compile", "$interval", "$templateCache", function ($rootScope, $document, $compile, $interval, $templateCache) {
var body = $document.find('body');
function positionTerminals(terminals) {
var total = _.keys(terminals).length;
var dist = (body.width() - 225) / total;
var position = 5;
angular.forEach(terminals, function (value, key) {
if (!value.scope.docked) {
return;
}
value.el.css('left', position + 'px');
position = position + dist;
});
}
var defaultTemplate = $templateCache.get(UrlHelpers.join(Kubernetes.templatePath, 'termShell.html'));
var self = {
positionTerminals: function () {
positionTerminals(self.terminals);
8 years ago
},
terminals: {},
httpTask: {},
newTerminal: function ($interval, podLink, containerName, entity, template) {
if (template === void 0) { template = defaultTemplate; }
var terminalId = UrlHelpers.join(podLink, containerName);
if (terminalId in self.terminals) {
log.debug("Already a terminal with id: ", terminalId);
self.raiseTerminal(terminalId);
return terminalId;
}
var scope = $rootScope.$new();
getLogs(entity, scope);
scope.podLink = podLink;
scope.containerName = containerName;
scope.id = terminalId;
scope.docked = true;
if (terminalId in self.httpTask) {
self.raiseTerminal(terminalId);
return terminalId;
}
else {
self.httpTask[terminalId] = $interval(function () {
getLogs(entity, scope);
}, 2000);
}
var el = $($compile(template)(scope));
var term = {
scope: scope,
el: el
};
body.append(el);
self.terminals[terminalId] = term;
positionTerminals(self.terminals);
return terminalId;
8 years ago
},
closeTerminal: function (id) {
var term = self.terminals[id];
var timer = self.httpTask[id];
if (timer) {
$interval.cancel(timer);
delete self.httpTask[id];
}
if (term) {
term.el.remove();
delete self.terminals[id];
positionTerminals(self.terminals);
}
},
raiseTerminal: function (id) {
angular.forEach(self.terminals, function (value, key) {
if (key === id) {
value.el.css('z-index', '4000');
value.el.find('.terminal').focus();
8 years ago
}
else {
value.el.css('z-index', '3000');
8 years ago
}
});
}
};
return self;
}]);
function addWindowActions(scope, element, TerminalService) {
var moved = false;
var lastX = 0;
var lastY = 0;
var header = element.find('.terminal-title');
var body = element.find('.terminal-body');
element.on('$destroy', function () {
$('#main').css({ display: 'inherit' });
8 years ago
});
var HEIGHT = 348;
var WIDTH = 600;
var TITLE_HEIGHT = 35;
var NAV_OFFSET = 46;
element.css({
height: HEIGHT,
width: WIDTH
});
header.css({
height: TITLE_HEIGHT
8 years ago
});
body.css({
position: 'absolute',
top: 35,
left: 0,
right: 0,
bottom: 0
});
scope.close = function () {
TerminalService.closeTerminal(scope.id);
8 years ago
};
scope.raise = function () {
TerminalService.raiseTerminal(scope.id);
8 years ago
};
scope.$watch('docked', function (docked) {
if (docked) {
element.width(WIDTH);
if (!element.hasClass('minimized')) {
element.height(HEIGHT);
}
}
});
scope.startResize = function (e) {
e.preventDefault();
log.debug("Start resize");
scope.resizing = true;
element.on('mouseup', scope.stopResize);
$(document).on('mousemove', scope.doResize);
$(document).on('mouseleave', scope.stopResize);
8 years ago
};
scope.doResize = function (e) {
if (scope.resizing) {
log.debug("Resizing, e: ", e);
if (!moved) {
lastX = e.clientX;
lastY = e.clientY;
moved = true;
return;
}
var height = element.height();
var width = element.width();
var deltaX = e.clientX - lastX;
var deltaY = e.clientY - lastY;
var newHeight = height + deltaY;
var newWidth = width + deltaX;
if (newHeight > 35 && newWidth > 80) {
element.height(height + deltaY);
element.width(width + deltaX);
}
lastX = e.clientX;
lastY = e.clientY;
}
8 years ago
};
scope.stopResize = function (e) {
scope.resizing = false;
moved = false;
element.off('mouseup', scope.stopResize);
$(document).off('mousemove', scope.doResize);
$(document).off('mouseleave', scope.stopResize);
8 years ago
};
scope.mouseDown = function (e) {
e.preventDefault();
if (element.hasClass('minimized') || element.hasClass('maximized')) {
return;
}
scope.dragging = true;
element.on('mouseup', scope.mouseUp);
$(document).on('mousemove', scope.mouseMove);
$(document).on('mouseleave', scope.mouseUp);
8 years ago
};
scope.mouseUp = function (e) {
e.preventDefault();
scope.dragging = false;
moved = false;
var height = element.height();
var offset = element.offset();
var winHeight = $(window).height();
if (offset.top > (winHeight - height - 20)) {
element.css({ top: "inherit", left: "inherit" });
scope.docked = true;
TerminalService.positionTerminals();
8 years ago
}
else {
scope.docked = false;
}
element.off('mouseup', scope.mouseUp);
$(document).off('mousemove', scope.mouseMove);
$(document).off('mouseleave', scope.mouseUp);
8 years ago
};
scope.mouseMove = function (e) {
if (scope.dragging) {
if (!moved) {
lastX = e.clientX;
lastY = e.clientY;
moved = true;
return;
8 years ago
}
var deltaX = e.clientX - lastX;
var deltaY = e.clientY - lastY;
var elOffset = element.offset();
element.offset({ top: elOffset.top + deltaY, left: elOffset.left + deltaX });
lastX = e.clientX;
lastY = e.clientY;
}
8 years ago
};
function restoreWindow(scope, element) {
if (scope.offset) {
element.offset(scope.offset);
scope.docked = false;
8 years ago
}
if (scope.height) {
element.height(scope.height);
}
if (scope.width) {
element.width(scope.width);
}
}
function saveWindow(scope, element) {
scope.offset = element.offset();
scope.height = element.height();
scope.width = element.width();
}
scope.maximized = function () {
return element.hasClass('maximized');
8 years ago
};
scope.maximize = function ($e) {
$e.preventDefault();
if (element.hasClass('minimized')) {
scope.minimize();
}
if (element.hasClass('maximized')) {
restoreWindow(scope, element);
$('#main').css({ display: 'inherit' });
8 years ago
}
else {
saveWindow(scope, element);
$('#main').css({ display: 'none' });
element.css({
height: 'inherit',
bottom: 0,
width: '100%',
top: NAV_OFFSET,
left: 0
});
8 years ago
}
element.toggleClass('maximized');
};
scope.minimize = function ($e) {
$e.preventDefault();
if (element.hasClass('maximized')) {
scope.maximize();
}
if (element.hasClass('minimized')) {
restoreWindow(scope, element);
}
else {
saveWindow(scope, element);
scope.docked = true;
element.css({ height: TITLE_HEIGHT, top: "inherit", left: "inherit" });
TerminalService.positionTerminals();
}
element.toggleClass('minimized');
};
}
Kubernetes.addWindowActions = addWindowActions;
Kubernetes._module.directive('terminalWindow', ["$compile", "TerminalService", function ($compile, TerminalService) {
return {
restrict: 'A',
scope: false,
link: function (scope, element, attr) {
addWindowActions(scope, element, TerminalService);
var body = element.find('.terminal-body');
body.append($compile('<kubernetes-container-terminal pod="podLink" container="containerName" command="bash"></kubernetes-container-terminal>')(scope));
}
};
}]);
function getLogs(rc, scope) {
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
if (xhr.status == 200) {
if (xhr.responseText != "" && xhr.responseText != null) {
var logObject = JSON.parse(xhr.responseText);
scope.logs = logObject[Kubernetes.getName(rc)];
}
else {
scope.logs = "当前没有可以查看的日志信息";
8 years ago
}
8 years ago
}
else {
8 years ago
}
}
};
xhr.open("POST", "/java/console/api/oracle/extract/log?rcName=" + Kubernetes.getName(rc), false);
xhr.send(null);
}
})(Kubernetes || (Kubernetes = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="configPlugin.ts"/>
/// <reference path="configsDataService.ts"/>
var Configs;
(function (Configs) {
Configs.TableEdit = Configs.controller('TableEdit', ['$scope', function ($scope) {
$scope.editRow = function (entity) {
$scope.$emit('editRow', entity);
};
$scope.deleteRowOne = {
show: false,
item: null,
open: function (entity) {
var deleteRowOne = $scope.deleteRowOne;
deleteRowOne.show = true;
deleteRowOne.item = entity;
},
onOk: function () {
var deleteRowOne = $scope.deleteRowOne;
$scope.$emit('deleteRow', deleteRowOne.item);
},
onCancel: function () {
var deleteRowOne = $scope.deleteRowOne;
deleteRowOne.show = false;
deleteRowOne.item = null;
8 years ago
}
};
}]);
Configs.VolumeController = Configs.controller('VolumeController', ['$scope', '$http', function ($scope, $http) {
$scope.submitted = false;
$scope.status = $scope.ngDialogData.status;
$scope.cancel = function () {
$scope.closeThisDialog();
$scope.submitted = false;
};
$scope.deleteBrock = function (volume, brock) {
if (volume.brick.length > 1)
Configs.deleteBrock(volume, brock);
else
$scope.showMessage = true;
};
$scope.addBrock = function (volume) {
var block = {
ip: "",
path: "",
status: false,
editable: true
};
Configs.addBrock(volume, block);
$scope.showMessage = false;
};
$scope.stopVolume = function (volume) {
volume.status = false;
};
$scope.startVolume = function (volume) {
volume.status = true;
};
$scope.onSubmit = function (entity) {
if ($scope.volumeForm.$valid) {
$scope.$emit('update', entity);
$scope.closeThisDialog();
8 years ago
}
else {
$scope.submitted = true;
8 years ago
}
};
}]);
Configs.SystemInfoController = Configs.controller('SystemInfoController', ['$scope', function ($scope) {
}]);
})(Configs || (Configs = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="configPlugin.ts"/>
/// <reference path="configsHelper.ts"/>
/// <reference path="configsUtils.ts"/>
/// <reference path="configsDataService.ts"/>
/// <reference path="../../kubernetes/ts/term.ts"/>
/// <reference path="../../kubernetes/ts/kubernetesHelpers.ts"/>
/// <reference path="shareController.ts"/>
var Configs;
(function (Configs) {
Configs.GfsController = Configs.controller('GfsController', ["$scope", "$templateCache", "$location", "$routeParams", "$http", "$timeout", 'ConfigsModel', 'ngDialog',
function ($scope, $templateCache, $location, $routeParams, $http, $timeout, ConfigsModel, ngDialog) {
$scope.model = ConfigsModel;
$scope.volumes = ConfigsModel.cluster;
Configs.shareInit($scope, $location, $routeParams);
$scope.createGfs = function () {
ngDialog.open({
template: 'newDialog.html',
controller: 'Configs.VolumeController',
width: 1005,
scope: $scope,
closeByDocument: false,
data: {
name: '',
path: '',
status: true,
brick: [{
ip: ["0", "0", "0", "0"],
path: '',
status: false,
editable: true
}],
editable: true
},
className: 'ngdialog-theme-default'
8 years ago
});
};
$scope.editRow = function (volume) {
var fVolume = Configs.formatVolume(volume);
ngDialog.open({
template: 'newDialog.html',
width: 1005,
data: fVolume,
scope: $scope,
className: 'ngdialog-theme-default',
controller: 'Configs.VolumeController',
closeByDocument: false
8 years ago
});
};
$scope.showDeleteVolume = {
show: false,
item: null,
open: function (entity) {
var showDeleteVolume = $scope.showDeleteVolume;
showDeleteVolume.show = true;
showDeleteVolume.item = entity;
},
onOk: function () {
var showDeleteVolume = $scope.showDeleteVolume;
$timeout(function () {
console.log(showDeleteVolume.item);
var spinner;
$.ajax({
type: "POST",
url: "/java/console/api/volume/delete",
timeout: 8000,
dataType: 'json',
//async: false,
data: JSON.stringify(showDeleteVolume.item),
contentType: "application/json; charset=utf-8",
beforeSend: function () {
Configs.create_mask(); //创建遮罩层
Kubernetes.create_locadEffect("正在更新云盘信息,请稍等!"); //创建数据加载效果层
var target = document.getElementById('loading');
spinner = new Spinner(Kubernetes.loadConfigs()).spin(target);
8 years ago
},
complete: function (XMLHttpRequest, textStatus) {
if (XMLHttpRequest.status == 200) {
Kubernetes.createSuccessInfo("success", "更新成功!");
setTimeout("Kubernetes.removeMask()", 1500);
}
else {
Kubernetes.createSuccessInfo("error", "更新失败!");
setTimeout("Kubernetes.removeMask()", 1500);
}
},
success: function (data) {
if (data) {
ConfigsModel.cluster = data;
Configs.formatVolumes(ConfigsModel.cluster);
$scope.$apply(function () {
$scope.volumes = ConfigsModel.cluster;
});
}
}
8 years ago
});
/*$http({
url: "/java/console/api/volume/delete",
method: 'POST',
data: showDeleteVolume.item
}).success(function(data,header,config,status){
/*
更新volume信息
*/
/*$scope.model.updateVolumeData();
}).error(function(data,header,config,status){
Configs.customAlert("提示", "删除Volume失败", '',null, 0, "error");
});*/
}, 100);
},
onCancel: function () {
var showDeleteVolume = $scope.showDeleteVolume;
showDeleteVolume.show = false;
showDeleteVolume.item = null;
}
};
$scope.$on('update', function (event, data) {
angular.forEach(data["brick"], function (brick) {
var ip = [];
if (brick["ip"] instanceof Object) {
for (var key in brick["ip"])
ip.push(brick["ip"][key]);
brick["ip"] = ip.join("\.");
8 years ago
}
});
var spinner;
$.ajax({
type: "POST",
url: "/java/console/api/volume/update",
timeout: 5000,
dataType: 'json',
//async: false,
data: JSON.stringify(data),
contentType: "application/json; charset=utf-8",
beforeSend: function () {
Configs.create_mask(); //创建遮罩层
Kubernetes.create_locadEffect("正在更新云盘信息,请稍等!"); //创建数据加载效果层
var target = document.getElementById('loading');
spinner = new Spinner(Kubernetes.loadConfigs()).spin(target);
},
complete: function (XMLHttpRequest, textStatus) {
if (XMLHttpRequest.status == 200) {
Kubernetes.createSuccessInfo("success", "更新成功!");
setTimeout("Kubernetes.removeMask()", 1500);
8 years ago
}
else {
Kubernetes.createSuccessInfo("error", "更新失败!");
setTimeout("Kubernetes.removeMask()", 1500);
}
},
success: function (data) {
if (data) {
ConfigsModel.cluster = data;
Configs.formatVolumes(ConfigsModel.cluster);
$scope.$apply(function () {
$scope.volumes = ConfigsModel.cluster;
});
8 years ago
}
}
});
/*$http({
url: "/java/console/api/volume/update",
method: 'POST',
data: data
}).success(function(data,header,config,status){
$scope.model.updateVolumeData();
}).error(function(data,header,config,status){
});*/
});
}]);
})(Configs || (Configs = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="configPlugin.ts"/>
/// <reference path="configsHelper.ts"/>
/// <reference path="configsUtils.ts"/>
var Configs;
(function (Configs) {
Configs.KubeController = Configs.controller('KubeController', ["$scope", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "ConfigsModel",
function ($scope, $templateCache, $location, $routeParams, $http, $timeout, ConfigsModel) {
$scope.model = ConfigsModel;
$scope.model.updateOracleParam();
$scope.submitted = false;
$scope.tableConfig = {
data: 'model.oracleParam',
selectedItems: [],
columnDefs: [{
field: "name",
displayName: "名称"
},
{
field: "ip",
displayName: "IP"
},
{
field: "port",
displayName: "端口号"
},
{
field: "user",
displayName: "用户名"
},
{
field: "password",
displayName: "密码"
},
{
field: "databaseName",
displayName: "服务名"
},
{
field: "tableName",
displayName: "表空间名"
},
{
field: "suffix",
displayName: "表后缀"
},
{
field: "entity",
displayName: "操作",
cellTemplate: $templateCache.get("tableEdit.html")
}],
enableRowClickSelection: false,
showSelectionCheckbox: false,
multiSelect: false,
sortInfo: {
sortBy: "name",
ascending: true
}
};
Configs.shareInit($scope, $location, $routeParams);
$scope.create = function () {
$scope.submitted = false;
$scope.add = true;
$scope.edit = false;
$scope.tableForm = {};
$scope.tableForm["id"] = 0;
};
$scope.cancel = function () {
$scope.tableForm = null;
$scope.add = false;
$scope.edit = false;
$scope.submitted = false;
};
$scope.onSubmit = function (oracle) {
if ($scope.validForm.$valid && $scope.validForm.$dirty) {
$scope.edit = false;
$scope.add = false;
Configs.oracleInfoOperate($http, "/java/console/api/oracle", Configs.OperateType.UPDATE, oracle, function (result, status) {
if (status === 200) {
$scope.model.updateOracleParam();
8 years ago
}
else {
throw "资源请求失败";
8 years ago
}
});
}
else {
$scope.submitted = true;
}
};
$scope.$on("editRow", function (event, data) {
$scope.submitted = false;
$scope.tableForm = Configs.deepCopy(data);
$scope.edit = true;
$scope.add = false;
//$scope.rowId = data.id
//createNewObejct($scope.tableConfig.columnDefs, data);
//removeElementsByValue($scope.tableForm, [{key: "name", value: "序号"},{key: "name", value: "连接状态"},{key: "name", value: "操作"}]);
});
$scope.$on("deleteRow", function (event, data) {
Configs.oracleInfoOperate($http, "/java/console/api/oracle", Configs.OperateType.DELETE, data, function (result, status) {
if (status === 200) {
console.log("准备更新");
$scope.model.updateOracleParam();
}
else {
throw "资源请求失败";
}
});
//removeElementByValue($scope.model, data._id, "_id");
});
}]);
})(Configs || (Configs = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="developerHelpers.ts"/>
/// <reference path="../../kubernetes/ts/kubernetesHelpers.ts"/>
var Developer;
(function (Developer) {
Developer._module = angular.module(Developer.pluginName, ['hawtio-core', 'hawtio-ui', 'ui.codemirror', 'nvd3', 'treeControl', 'ngDialog']);
Developer.controller = PluginHelpers.createControllerFunction(Developer._module, Developer.pluginName);
Developer.route = PluginHelpers.createRoutingFunction(Developer.templatePath);
Developer._module.config(['$routeProvider', function ($routeProvider) {
$routeProvider.when(Developer.context, Developer.route('workspaces.html', false))
.when("/data-manager", Developer.route('workspaces.html', false))
.when(UrlHelpers.join(Developer.context, 'Overview/:type/data-type/all'), Developer.route('workspaces.html', false))
.when(UrlHelpers.join(Developer.context, 'Overview/:type/data-type/financial'), Developer.route('workspaces.html', false))
.when(UrlHelpers.join(Developer.context, 'Overview/:type/data-type/social-security'), Developer.route('workspaces.html', false))
.when(UrlHelpers.join(Developer.context, 'Overview/task'), Developer.route('fileMigrationTask.html', false))
.otherwise(Developer.context);
}]);
Developer._module.run(['viewRegistry', 'ServiceRegistry', 'HawtioNav', 'KubernetesModel', '$templateCache', function (viewRegistry, ServiceRegistry, HawtioNav, KubernetesModel, $templateCache) {
Developer.log.debug("Running");
viewRegistry['workspaces'] = Kubernetes.templatePath + 'layoutKubernetes.html';
viewRegistry['namespaces'] = Kubernetes.templatePath + 'layoutKubernetes.html';
// viewRegistry['workspaces'] = Configs.templatePath + 'shareLayout.html';
var builder = HawtioNav.builder();
var dmanagerTab = builder.id('dmanager')
.rank(200)
.href(function () { return Developer.context; })
.title(function () { return '数据管理'; })
.build();
HawtioNav.add(dmanagerTab);
}]);
Developer._module.filter('asTrustedHtml', ['$sce', function ($sce) {
return function (text) {
return $sce.trustAsHtml(text);
};
}]);
hawtioPluginLoader.addModule(Developer.pluginName);
// for scroll-glue directive
hawtioPluginLoader.addModule('luegg.directives');
})(Developer || (Developer = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="developerPlugin.ts"/>
var Developer;
(function (Developer) {
var OptionsParams = (function () {
function OptionsParams() {
this.pagerSizeOption = [20, 50, 100];
this.dataType = null;
this.currentTableSize = 20;
this.dataBatch = null;
this.labels = {};
this.currentPageNum = 1;
this.totalSize = null;
this.priorTableSize = 20;
this.keyQuery = null;
this.volumeType = 1;
}
OptionsParams.prototype.createParamData = function () {
var extendValue = ["cityName", "districtName", "dataVersion", "systemName", "dataYear"];
var result = {
currentPageNum: this.currentPageNum,
dataType: this.dataType,
submittedBatch: this.dataBatch,
limit: this.currentTableSize,
priorTableSize: this.priorTableSize,
keyQuery: this.keyQuery,
volumeType: this.volumeType
};
angular.forEach(this.labels, function (value, key) {
if (extendValue.indexOf(key))
result[key] = value;
});
return result;
8 years ago
};
OptionsParams.prototype.getPageSizeNum = function () {
var num = Math.ceil(this.totalSize / this.currentTableSize);
if (num < this.currentPageNum)
num = this.currentPageNum;
return num;
8 years ago
};
return OptionsParams;
8 years ago
}());
Developer.OptionsParams = OptionsParams;
function createLabel(cityName, districtName, systemName, version, year) {
return {
cityName: cityName,
districtName: districtName,
systemName: systemName,
version: "版本" + version,
year: year
};
8 years ago
}
function createKey(regionalismCode, systemId, version) {
return regionalismCode + "-" + systemId + "-" + version;
}
function populateKey(item) {
var result = item;
result["_key"] = createKey(item.regionalismCode, item.systemCode, item.dataVersion);
return result;
}
function populateLabel(item) {
var result = item;
result["labels"] = createLabel(item.cityName, item.districtName, item.systemName, item.dataVersion, item.year);
return result;
}
function populateLabels(items) {
var result = [];
angular.forEach(items, function (item) {
result.push(populateLabel(item));
});
return result;
}
function populateKeys(items) {
var result = [];
angular.forEach(items, function (item) {
result.push(populateKey(item));
});
return result;
}
function createName(cityName, districtName) {
return cityName + "-" + districtName;
}
function populateName(item) {
var result = item;
result["name"] = createName(item.cityName, item.districtName);
return result;
}
function populateNames(items) {
var result = [];
angular.forEach(items, function (item) {
result.push(populateName(item));
});
return result;
}
function createParamData(options) {
return options.createParamData();
}
function formatTask(items) {
var result = [];
angular.forEach(items, function (item) {
result.push({
id: item.id,
_key: item.regionalismCode + "-" + item.systemCode + "-" + item.dataVersion,
name: item.cityName + "-" + item.districtName,
systemName: item.systemName,
status: item.completeStatus,
process: item.rate,
from: item.dataPath,
to: item.dstPath,
labels: {
dataType: item.dataType,
batch: "批次" + item.submittedBatch,
dataVersion: "版本" + item.dataVersion,
dataYear: item.year
}
});
});
return result;
}
var DataModelService = (function () {
function DataModelService() {
this.data = [];
this.paramOptions = new OptionsParams();
this.transferTasks = [];
this.updateModel();
}
//更新数据模型
DataModelService.prototype.getDataModel = function (paramOptions) {
var result;
$.ajax({
async: false,
type: "POST",
url: "/java/console/api/data.json",
dataType: 'json',
data: createParamData(paramOptions),
success: function (data) {
result = data.data;
paramOptions.totalSize = data.length;
}
});
return result;
};
DataModelService.prototype.initParamOptions = function () {
this.paramOptions = new OptionsParams();
};
DataModelService.prototype.updateModel = function () {
this.data = this.getDataModel(this.paramOptions);
this.maybeFormat();
};
//格式数据模型中的每个单条记录
DataModelService.prototype.maybeFormat = function () {
this.data = populateKeys(this.data);
this.data = populateNames(this.data);
this.data = populateLabels(this.data);
};
//更新用户选择参数
DataModelService.prototype.updateParamOption = function (option, value) {
this.paramOptions[option] = value;
};
//根据key获取用户选择参数
DataModelService.prototype.getParamOption = function (key) {
return this.paramOptions[key];
};
DataModelService.prototype.startIntervalTask = function ($interval, $http) {
var _this = this;
var result;
var timer = $interval(function () {
$.ajax({
async: false,
type: "POST",
url: "/java/console/api/task/transfer/list",
success: function (data) {
if (data) {
result = data;
}
8 years ago
}
});
_this.transferTasks = formatTask(result);
}, 1500);
timer.then(function () {
console.log("Done!");
}, function () {
console.log("error");
}, function () {
console.log("每次都更新");
8 years ago
});
};
return DataModelService;
}());
Developer.DataModelService = DataModelService;
//创建数据模型服务
Developer._module.factory("DataModel", ['$rootScope', '$http', '$interval', '$location', '$resource', function ($rootScope, $http, $interval, $location, $resource) {
var $scope = new DataModelService();
$scope.startIntervalTask($interval, $http);
8 years ago
return $scope;
8 years ago
}]);
})(Developer || (Developer = {}));
/// <reference path="../../includes.ts"/>
8 years ago
var Developer;
(function (Developer) {
function enrichWorkspaces(projects) {
angular.forEach(projects, function (project) {
enrichWorkspace(project);
8 years ago
});
return projects;
}
Developer.enrichWorkspaces = enrichWorkspaces;
function enrichWorkspace(build) {
if (build) {
var name = Kubernetes.getName(build);
build.$name = name;
build.$sortOrder = 0 - build.number;
var nameArray = name.split("-");
var nameArrayLength = nameArray.length;
build.$shortName = (nameArrayLength > 4) ? nameArray.slice(0, nameArrayLength - 4).join("-") : name.substring(0, 30);
var labels = Kubernetes.getLabels(build);
build.$creationDate = asDate(Kubernetes.getCreationTimestamp(build));
build.$labelsText = Kubernetes.labelsToString(labels);
if (name) {
build.$projectsLink = UrlHelpers.join("workspaces", name);
build.$runtimeLink = UrlHelpers.join("kubernetes/namespace/", name, "/apps");
build.$viewLink = build.$projectsLink;
}
}
return build;
}
Developer.enrichWorkspace = enrichWorkspace;
function asDate(value) {
return value ? new Date(value) : null;
}
Developer.asDate = asDate;
function enrichJenkinsJobs(jobsData, projectId, jobName) {
if (jobsData) {
angular.forEach(jobsData.jobs, function (job) {
enrichJenkinsJob(job, projectId, jobName);
});
}
return jobsData;
}
Developer.enrichJenkinsJobs = enrichJenkinsJobs;
function enrichJenkinsJob(job, projectId, jobName) {
if (job) {
jobName = jobName || job.name || projectId;
job.$jobId = jobName;
job.$project = projectId || jobName;
var lastBuild = job.lastBuild;
var lastBuildResult = lastBuild ? lastBuild.result : "NOT_STARTED";
var $iconClass = createBuildStatusIconClass(lastBuildResult);
job.$lastBuildNumber = enrichJenkinsBuild(job, lastBuild);
job.$lastSuccessfulBuildNumber = enrichJenkinsBuild(job, job.lastSuccessfulBuild);
job.$lastFailedlBuildNumber = enrichJenkinsBuild(job, job.lastFailedlBuild);
if (lastBuild) {
job.$duration = lastBuild.duration;
job.$timestamp = asDate(lastBuild.timestamp);
}
var jobUrl = (job || {}).url;
if (!jobUrl || !jobUrl.startsWith("http")) {
var jenkinsUrl = jenkinsLink();
if (jenkinsUrl) {
jobUrl = UrlHelpers.join(jenkinsUrl, "job", jobName);
}
8 years ago
}
if (jobUrl) {
job.$jobLink = jobUrl;
var workspaceName = Kubernetes.currentKubernetesNamespace();
job.$pipelinesLink = UrlHelpers.join("/workspaces", workspaceName, "projects", job.$project, "jenkinsJob", jobName, "pipelines");
job.$buildsLink = UrlHelpers.join("/workspaces", workspaceName, "projects", job.$project, "jenkinsJob", jobName);
8 years ago
}
job.$iconClass = $iconClass;
angular.forEach(job.builds, function (build) {
enrichJenkinsBuild(job, build);
});
8 years ago
}
return job;
}
Developer.enrichJenkinsJob = enrichJenkinsJob;
function createBuildStatusIconClass(result) {
var $iconClass = "fa fa-spinner fa-spin";
if (result) {
if (result === "FAILURE" || result === "FAILED") {
// TODO not available yet
$iconClass = "fa fa-exclamation-circle red";
8 years ago
}
else if (result === "ABORTED" || result === "INTERUPTED") {
$iconClass = "fa fa-circle grey";
}
else if (result === "SUCCESS" || result === "COMPLETE" || result === "COMPLETED") {
$iconClass = "fa fa-check-circle green";
}
else if (result === "NOT_STARTED") {
$iconClass = "fa fa-circle-thin grey";
}
}
return $iconClass;
}
Developer.createBuildStatusIconClass = createBuildStatusIconClass;
function createBuildStatusBackgroundClass(result) {
var $iconClass = "build-pending";
if (result) {
if (result === "FAILURE" || result === "FAILED") {
$iconClass = "build-fail";
}
else if (result === "ABORTED" || result === "INTERUPTED") {
$iconClass = "build-aborted";
}
else if (result === "SUCCESS" || result === "COMPLETE" || result === "COMPLETED") {
$iconClass = "build-success";
}
else if (result === "NOT_STARTED") {
$iconClass = "build-not-started";
}
}
return $iconClass;
}
Developer.createBuildStatusBackgroundClass = createBuildStatusBackgroundClass;
function enrichJenkinsBuild(job, build) {
var number = null;
if (build) {
build.$duration = build.duration;
build.$timestamp = asDate(build.timestamp);
var projectId = job.$project;
var jobName = job.$jobId || projectId;
var buildId = build.id;
number = build.number;
var workspaceName = Kubernetes.currentKubernetesNamespace();
var $iconClass = createBuildStatusIconClass(build.result);
var jobUrl = (job || {}).url;
if (!jobUrl || !jobUrl.startsWith("http")) {
var jenkinsUrl = jenkinsLink();
if (jenkinsUrl) {
jobUrl = UrlHelpers.join(jenkinsUrl, "job", jobName);
8 years ago
}
}
if (jobUrl) {
build.$jobLink = jobUrl;
if (buildId) {
//build.$logsLink = UrlHelpers.join(build.$buildLink, "console");
build.$logsLink = UrlHelpers.join("/workspaces", workspaceName, "projects", projectId, "jenkinsJob", jobName, "log", buildId);
build.$pipelineLink = UrlHelpers.join("/workspaces", workspaceName, "projects", projectId, "jenkinsJob", jobName, "pipeline", buildId);
build.$buildsLink = UrlHelpers.join("/workspaces", workspaceName, "projects", projectId, "jenkinsJob", jobName);
//build.$buildLink = UrlHelpers.join(jobUrl, build.id);
build.$buildLink = build.$logsLink;
8 years ago
}
}
build.$iconClass = $iconClass;
}
return number;
}
Developer.enrichJenkinsBuild = enrichJenkinsBuild;
function jenkinsLink() {
var ServiceRegistry = Kubernetes.inject("ServiceRegistry");
if (ServiceRegistry) {
return ServiceRegistry.serviceLink(Developer.jenkinsServiceName);
}
return null;
}
Developer.jenkinsLink = jenkinsLink;
function forgeReadyLink() {
var ServiceRegistry = Kubernetes.inject("ServiceRegistry");
if (ServiceRegistry) {
return ServiceRegistry.serviceReadyLink(Kubernetes.fabric8ForgeServiceName);
}
return null;
}
Developer.forgeReadyLink = forgeReadyLink;
function enrichJenkinsPipelineJob(job, projectId, jobId) {
if (job) {
job.$project = projectId;
job.$jobId = jobId;
angular.forEach(job.builds, function (build) {
enrichJenkinsStages(build, projectId, jobId);
});
}
}
Developer.enrichJenkinsPipelineJob = enrichJenkinsPipelineJob;
function enrichJenkinsStages(build, projectId, jobName) {
if (build) {
build.$project = projectId;
build.$jobId = jobName;
build.$timestamp = asDate(build.timeInMillis);
build.$iconClass = createBuildStatusIconClass(build.result || "NOT_STARTED");
var workspaceName = Kubernetes.currentKubernetesNamespace();
var parameters = build.parameters;
var $parameterCount = 0;
var $parameterText = "No parameters";
if (parameters) {
$parameterCount = _.keys(parameters).length || 0;
$parameterText = Kubernetes.labelsToString(parameters, " ");
}
build.$parameterCount = $parameterCount;
build.$parameterText = $parameterText;
var jenkinsUrl = jenkinsLink();
if (jenkinsUrl) {
var url = build.url;
if (url) {
}
}
build.$logLink = UrlHelpers.join("/workspaces", workspaceName, "projects", projectId, "jenkinsJob", jobName, "log", build.id);
build.$viewLink = build.$logLink;
angular.forEach(build.stages, function (stage) {
enrichJenkinsStage(stage, build);
8 years ago
});
}
return build;
}
Developer.enrichJenkinsStages = enrichJenkinsStages;
function enrichJenkinsStage(stage, build) {
if (build === void 0) { build = null; }
if (stage) {
if (build) {
stage.$buildId = build.id;
stage.$project = build.$project;
}
var projectId = build.$project;
var jobName = build.$jobId || projectId;
var buildId = build.id;
var workspaceName = Kubernetes.currentKubernetesNamespace();
stage.$backgroundClass = createBuildStatusBackgroundClass(stage.status);
stage.$iconClass = createBuildStatusIconClass(stage.status);
stage.$startTime = asDate(stage.startTime);
if (!stage.duration) {
stage.duration = 0;
}
var jenkinsUrl = jenkinsLink();
if (jenkinsUrl) {
var url = stage.url;
if (url) {
stage.$viewLink = UrlHelpers.join(jenkinsUrl, url);
stage.$logLink = UrlHelpers.join(stage.$viewLink, "log");
if (projectId && buildId) {
stage.$logLink = UrlHelpers.join("/workspaces", workspaceName, "projects", projectId, "jenkinsJob", jobName, "log", buildId);
}
}
}
8 years ago
}
}
Developer.enrichJenkinsStage = enrichJenkinsStage;
})(Developer || (Developer = {}));
/// <reference path="developerPlugin.ts"/>
var Developer;
(function (Developer) {
Developer._module.controller('Developer.EnvironmentPanelController', ["$scope", "$element", "$location", "$routeParams", "KubernetesModel", "$http", "$timeout", "KubernetesState", "KubernetesApiURL", function ($scope, $element, $location, $routeParams, KubernetesModel, $http, $timeout, KubernetesState, KubernetesApiURL) {
$scope.envVersions = {};
$scope.model = KubernetesModel;
$scope.env = $scope.$eval('env');
$scope.buildConfig = $scope.$eval('entity');
$scope.open = true;
$scope.toggle = function () { return $scope.open = !$scope.open; };
var caches = {};
Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
Developer.loadProjectVersions($scope, $element, $scope.buildConfig, $scope.env, $scope.env.namespace, $scope.envVersions, caches);
8 years ago
}]);
})(Developer || (Developer = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="developerPlugin.ts"/>
/// <reference path="dataManagerModel.ts"/>
/// <reference path="dataManagerHelper.ts"/>
/// <reference path="../../configs/ts/ConfigsHelper.ts"/>
8 years ago
var Developer;
(function (Developer) {
Developer.KubeTaskController = Developer.controller("KubeTaskController", ["$scope", "$http", "$location", "$routeParams", "DataModel", "$templateCache", function ($scope, $http, $location, $routeParams, DataModel, $templateCache) {
$scope.model = DataModel;
$scope.subTabConfig = Developer.createCurrentSubNavBar($scope, $location, $routeParams);
$scope.tableConfig = {
data: 'model.transferTasks',
showSelectionCheckbox: false,
enableRowClickSelection: false,
multiSelect: true,
selectedItems: [],
filterOptions: {
filterText: $location.search()["q"] || ''
},
columnDefs: [{
field: "_key",
displayName: '编码',
customSortField: function (field) {
return field.id;
}
8 years ago
},
{
field: "name",
displayName: '市-区/县'
8 years ago
},
{
field: "systemName",
displayName: '系统名称'
8 years ago
},
{
field: "labels",
displayName: '数据标签',
cellTemplate: $templateCache.get("dataLabelsTemplate.html")
8 years ago
},
{
field: "from",
displayName: '源集群',
},
{
field: "to",
displayName: '目的集群',
},
{
field: "status",
displayName: '迁移状态',
cellTemplate: $templateCache.get("taskStatus.html")
},
{
field: "process",
displayName: '迁移进度',
cellTemplate: $templateCache.get("taskProcess.html")
},
{
field: "entity",
displayName: '操作',
cellTemplate: $templateCache.get("taskEdit.html")
}
] };
$scope.$on("deleteRow", function (event, data) {
Configs.oracleInfoOperate($http, "/java/console/api/task/transfer", Configs.OperateType.DELETE, data, function (data, status) {
if (status === 200)
console.log("删除成功");
});
});
8 years ago
}]);
})(Developer || (Developer = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="../../kubernetes/ts/kubernetesHelpers.ts"/>
/// <reference path="developerEnrichers.ts"/>
/// <reference path="developerHelpers.ts"/>
/// <reference path="developerNavigation.ts"/>
var Developer;
(function (Developer) {
Developer.HomeController = Developer.controller("HomeController", ["$scope", "KubernetesModel", "KubernetesState", "KubernetesSchema", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL",
function ($scope, KubernetesModel, KubernetesState, KubernetesSchema, $templateCache, $location, $routeParams, $http, $timeout, KubernetesApiURL) {
$scope.namespace = Kubernetes.currentKubernetesNamespace();
8 years ago
}]);
})(Developer || (Developer = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="../../kubernetes/ts/kubernetesHelpers.ts"/>
/// <reference path="developerEnrichers.ts"/>
/// <reference path="developerHelpers.ts"/>
/// <reference path="developerNavigation.ts"/>
var Developer;
(function (Developer) {
Developer.JenkinsJobController = Developer.controller("JenkinsJobController", ["$scope", "KubernetesModel", "KubernetesState", "KubernetesSchema", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL", "ServiceRegistry",
8 years ago
function ($scope, KubernetesModel, KubernetesState, KubernetesSchema, $templateCache, $location, $routeParams, $http, $timeout, KubernetesApiURL, ServiceRegistry) {
$scope.kubernetes = KubernetesState;
$scope.model = KubernetesModel;
8 years ago
$scope.id = $routeParams["id"];
$scope.jobId = $routeParams["job"];
$scope.schema = KubernetesSchema;
$scope.entityChangedCache = {};
Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
$scope.breadcrumbConfig = Developer.createProjectBreadcrumbs($scope.id);
$scope.subTabConfig = Developer.createProjectSubNavBars($scope.id, $scope.jobId);
$scope.$on('kubernetesModelUpdated', function () {
updateData();
});
8 years ago
$scope.$on('$routeUpdate', function ($event) {
updateData();
});
$scope.tableConfig = {
data: 'job.builds',
showSelectionCheckbox: true,
enableRowClickSelection: false,
multiSelect: true,
selectedItems: [],
filterOptions: {
filterText: $location.search()["q"] || ''
},
columnDefs: [
{
field: '$sortOrder',
displayName: 'Name',
cellTemplate: $templateCache.get("jenkinsBuildIdTemplate.html")
},
{
field: '$buildLink',
displayName: 'Views',
cellTemplate: $templateCache.get("jenkinsBuildButtonsTemplate.html")
},
{
field: '$duration',
displayName: 'Duration',
cellTemplate: $templateCache.get("jenkinsBuildDurationTemplate.html")
},
{
field: '$timestamp',
displayName: 'Time Started',
cellTemplate: $templateCache.get("jenkinsBuildTimestampTemplate.html")
}
]
};
8 years ago
updateData();
function updateData() {
if ($scope.jobId) {
var url = Kubernetes.kubernetesProxyUrlForServiceCurrentNamespace(Developer.jenkinsServiceNameAndPort, UrlHelpers.join("job", $scope.jobId, "api/json?depth=1"));
if (url && (!$scope.job || Kubernetes.keepPollingModel)) {
8 years ago
$http.get(url).
success(function (data, status, headers, config) {
if (data) {
Developer.enrichJenkinsJob(data, $scope.id, $scope.jobId);
if (Developer.hasObjectChanged(data, $scope.entityChangedCache)) {
Developer.log.info("entity has changed!");
$scope.job = data;
}
}
$scope.model.fetched = true;
Core.$apply($scope);
}).
error(function (data, status, headers, config) {
Developer.log.warn("Failed to load " + url + " " + data + " " + status);
8 years ago
});
}
}
else {
8 years ago
$scope.model.fetched = true;
Core.$apply($scope);
}
}
}]);
8 years ago
})(Developer || (Developer = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="../../kubernetes/ts/kubernetesHelpers.ts"/>
/// <reference path="developerEnrichers.ts"/>
/// <reference path="developerHelpers.ts"/>
/// <reference path="developerNavigation.ts"/>
var Developer;
(function (Developer) {
Developer.JenkinsJobsController = Developer.controller("JenkinsJobsController", ["$scope", "KubernetesModel", "KubernetesState", "KubernetesSchema", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL", "ServiceRegistry",
function ($scope, KubernetesModel, KubernetesState, KubernetesSchema, $templateCache, $location, $routeParams, $http, $timeout, KubernetesApiURL, ServiceRegistry) {
8 years ago
$scope.kubernetes = KubernetesState;
$scope.model = KubernetesModel;
$scope.id = $routeParams["id"];
$scope.schema = KubernetesSchema;
$scope.jenkins = null;
8 years ago
$scope.entityChangedCache = {};
Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
$scope.breadcrumbConfig = Developer.createProjectBreadcrumbs();
$scope.subTabConfig = Developer.createWorkspaceSubNavBars();
$scope.$on('kubernetesModelUpdated', function () {
updateData();
});
$scope.$on('$routeUpdate', function ($event) {
updateData();
8 years ago
});
$scope.tableConfig = {
data: 'jenkins.jobs',
8 years ago
showSelectionCheckbox: true,
enableRowClickSelection: false,
multiSelect: true,
selectedItems: [],
filterOptions: {
filterText: $location.search()["q"] || ''
},
columnDefs: [
{
field: 'name',
8 years ago
displayName: 'Name',
cellTemplate: $templateCache.get("jenkinsJobNameTemplate.html")
8 years ago
},
{
field: '$buildLink',
displayName: 'Views',
cellTemplate: $templateCache.get("jenkinsJobButtonsTemplate.html")
8 years ago
},
{
field: '$lastSuccessfulBuildNumber',
displayName: 'Last Success',
cellTemplate: $templateCache.get("jenkinsLastSuccessTemplate.html")
8 years ago
},
{
field: '$lastFailedlBuildNumber',
displayName: 'Last Failure',
cellTemplate: $templateCache.get("jenkinsLastFailureTemplate.html")
8 years ago
},
{
field: '$duration',
displayName: 'Last Duration',
cellTemplate: $templateCache.get("jenkinsBuildDurationTemplate.html")
},
{
field: '$timestamp',
displayName: 'Time Started',
cellTemplate: $templateCache.get("jenkinsBuildTimestampTemplate.html")
}
8 years ago
]
};
updateData();
function updateData() {
// TODO only need depth 2 to be able to fetch the lastBuild
var url = Kubernetes.kubernetesProxyUrlForServiceCurrentNamespace(Developer.jenkinsServiceNameAndPort, "api/json?depth=2");
Developer.log.info("");
if (url && (!$scope.jenkins || Kubernetes.keepPollingModel)) {
$http.get(url, Developer.jenkinsHttpConfig).
8 years ago
success(function (data, status, headers, config) {
if (data) {
Developer.enrichJenkinsJobs(data, $scope.id, $scope.id);
if (Developer.hasObjectChanged(data, $scope.entityChangedCache)) {
Developer.log.info("entity has changed!");
$scope.jenkins = data;
}
}
$scope.model.fetched = true;
Core.$apply($scope);
8 years ago
}).
error(function (data, status, headers, config) {
Developer.log.warn("Failed to load " + url + " " + data + " " + status);
8 years ago
});
}
}
}]);
})(Developer || (Developer = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="kubernetesPlugin.ts"/>
var Kubernetes;
(function (Kubernetes) {
Kubernetes.FABRIC8_PROJECT_JSON = "fabric8ProjectJson";
function byId(thing) {
return thing.id;
}
function createKey(namespace, id, kind) {
return (namespace || "") + "-" + (kind || 'undefined').toLowerCase() + '-' + (id || 'undefined').replace(/\./g, '-');
}
function populateKey(item) {
var result = item;
result['_key'] = createKey(Kubernetes.getNamespace(item), Kubernetes.getName(item), Kubernetes.getKind(item));
return result;
}
function populateKeys(items) {
var result = [];
angular.forEach(items, function (item) {
result.push(populateKey(item));
});
return result;
}
function selectPods(pods, namespace, labels) {
return pods.filter(function (pod) {
return Kubernetes.getNamespace(pod) === namespace && Kubernetes.selectorMatches(labels, Kubernetes.getLabels(pod));
});
}
/**
* The object which keeps track of all the pods, replication controllers, services and their associations
*/
var KubernetesModelService = (function () {
function KubernetesModelService() {
this.kubernetes = null;
this.apps = [];
this.services = [];
this.replicationcontrollers = [];
this.filterReplicationcontrollers = [];
this.pods = [];
this.hosts = [];
//public namespaces = [];
this.routes = [];
this.templates = [];
this.redraw = false;
this.resourceVersions = {};
// various views on the data
this.podsByHost = {};
this.servicesByKey = {};
this.replicationControllersByKey = {};
this.podsByKey = {};
this.appInfos = [];
this.appViews = [];
this.appFolders = [];
this.fetched = false;
this.buildconfigs = [];
this.events = [];
this.workspaces = [];
this.projects = [];
this.project = null;
}
Object.defineProperty(KubernetesModelService.prototype, "replicationControllers", {
/*public get filterReplicationcontrollers():Array<any> {
return this.filterReplicationcontrollers;
}
public set filterReplicationcontrollers(filterReplicationcontrollers:Array<any>) {
this.filterReplicationcontrollers = filterReplicationcontrollers;
}*/
get: function () {
return this.replicationcontrollers;
},
set: function (replicationControllers) {
this.replicationcontrollers = replicationControllers;
},
enumerable: true,
configurable: true
});
Object.defineProperty(KubernetesModelService.prototype, "namespaces", {
get: function () {
return this.kubernetes.namespaces;
},
enumerable: true,
configurable: true
});
Object.defineProperty(KubernetesModelService.prototype, "showRunButton", {
get: function () {
if (Kubernetes.isOpenShift) {
return true;
}
return _.any(this.services, function (service) {
var name = Kubernetes.getName(service);
if (name === "templates") {
var podCounters = service.$podCounters;
return podCounters && (podCounters.valid || podCounters.ready);
}
else {
return false;
}
});
},
enumerable: true,
configurable: true
});
Object.defineProperty(KubernetesModelService.prototype, "serviceApps", {
get: function () {
return _.filter(this.services, function (s) {
return s.$host && s.$serviceUrl && s.$podCount;
});
},
enumerable: true,
configurable: true
});
KubernetesModelService.prototype.$keepPolling = function () {
return Kubernetes.keepPollingModel;
};
KubernetesModelService.prototype.orRedraw = function (flag) {
this.redraw = this.redraw || flag;
};
KubernetesModelService.prototype.getService = function (namespace, id) {
return this.servicesByKey[createKey(namespace, id, 'service')];
};
KubernetesModelService.prototype.getReplicationController = function (namespace, id) {
return this.replicationControllersByKey[createKey(namespace, id, 'replicationController')];
};
KubernetesModelService.prototype.getPod = function (namespace, id) {
return this.podsByKey[createKey(namespace, id, 'pod')];
};
KubernetesModelService.prototype.podsForNamespace = function (namespace) {
if (namespace === void 0) { namespace = this.currentNamespace(); }
return _.filter(this.pods, { namespace: namespace });
};
KubernetesModelService.prototype.getBuildConfig = function (name) {
return _.find(this.buildconfigs, { $name: name });
};
KubernetesModelService.prototype.getProject = function (name, ns) {
if (ns === void 0) { ns = this.currentNamespace(); }
var buildConfig = this.project;
if (!buildConfig) {
var text = localStorage[Kubernetes.FABRIC8_PROJECT_JSON];
if (text) {
try {
buildConfig = angular.fromJson(text);
}
catch (e) {
Kubernetes.log.warn("Could not parse json for " + Kubernetes.FABRIC8_PROJECT_JSON + ". Was: " + text + ". " + e, e);
}
}
}
if (buildConfig && ns != Kubernetes.getNamespace(buildConfig) && name != buildConfig.$name) {
buildConfig = this.getBuildConfig(name);
}
return buildConfig;
};
KubernetesModelService.prototype.setProject = function (buildConfig) {
this.project = buildConfig;
if (buildConfig) {
// lets store in local storage
var localStorage = Kubernetes.inject("localStorage");
if (localStorage) {
localStorage[Kubernetes.FABRIC8_PROJECT_JSON] = angular.toJson(buildConfig);
}
}
};
/**
* Returns the current selected namespace or the default namespace
*/
KubernetesModelService.prototype.currentNamespace = function () {
var answer = null;
if (this.kubernetes) {
answer = this.kubernetes.selectedNamespace;
}
return answer || Kubernetes.defaultNamespace;
};
KubernetesModelService.prototype.updateIconUrlAndAppInfo = function (entity, nameField) {
var answer = null;
var id = Kubernetes.getName(entity);
entity.$iconUrl = Core.pathGet(entity, ['metadata', 'annotations', 'fabric8.' + id + '/iconUrl']);
entity.$info = Core.pathGet(entity, ['metadata', 'annotations', 'fabric8.' + id + '/summary']);
if (entity.$iconUrl) {
return;
}
if (id && nameField) {
(this.templates || []).forEach(function (template) {
var metadata = template.metadata;
if (metadata) {
var annotations = metadata.annotations || {};
var iconUrl = annotations["fabric8." + id + "/iconUrl"] || annotations["fabric8/iconUrl"];
if (iconUrl) {
(template.objects || []).forEach(function (item) {
var entityName = Kubernetes.getName(item);
if (id === entityName) {
entity.$iconUrl = iconUrl;
}
});
}
}
});
(this.appInfos || []).forEach(function (appInfo) {
var iconPath = appInfo.iconPath;
if (iconPath && !answer && iconPath !== "null") {
var iconUrl = Kubernetes.gitPathToUrl(iconPath);
var ids = Core.pathGet(appInfo, ["names", nameField]);
angular.forEach(ids, function (appId) {
if (appId === id) {
entity.$iconUrl = iconUrl;
entity.appPath = appInfo.appPath;
entity.$info = appInfo;
}
});
}
});
}
if (!entity.$iconUrl) {
entity.$iconUrl = Kubernetes.defaultIconUrl;
}
};
KubernetesModelService.prototype.maybeInit = function () {
var _this = this;
this.fetched = true;
this.servicesByKey = {};
this.podsByKey = {};
this.replicationControllersByKey = {};
this.pods.forEach(function (pod) {
if (!pod.kind)
pod.kind = "Pod";
_this.podsByKey[pod._key] = pod;
var host = Kubernetes.getHost(pod);
pod.$labelsText = Kubernetes.labelsToString(Kubernetes.getLabels(pod));
if (host) {
pod.$labelsText += Kubernetes.labelFilterTextSeparator + "host=" + host;
8 years ago
}
pod.$iconUrl = Kubernetes.defaultIconUrl;
_this.discoverPodConnections(pod);
pod.$containerPorts = [];
var podStatus = pod.status || {};
var startTime = podStatus.startTime;
pod.$startTime = null;
if (startTime) {
pod.$startTime = new Date(startTime);
8 years ago
}
var createdTime = Kubernetes.getCreationTimestamp(pod);
pod.$createdTime = null;
pod.$age = null;
if (createdTime) {
pod.$createdTime = new Date(createdTime);
pod.$age = humandate.relativeTime(pod.$createdTime);
8 years ago
}
var ready = Kubernetes.isReady(pod);
pod.$ready = ready;
pod.$statusCss = Kubernetes.statusTextToCssClass(podStatus.phase, ready);
var maxRestartCount = 0;
angular.forEach(Core.pathGet(pod, ["status", "containerStatuses"]), function (status) {
var restartCount = status.restartCount;
if (restartCount) {
if (restartCount > maxRestartCount) {
maxRestartCount = restartCount;
}
}
});
if (maxRestartCount) {
pod.$restartCount = maxRestartCount;
8 years ago
}
var imageNames = "";
angular.forEach(Core.pathGet(pod, ["spec", "containers"]), function (container) {
var image = container.image;
if (image) {
if (!imageNames) {
imageNames = image;
}
else {
imageNames = imageNames + " " + image;
}
var idx = image.lastIndexOf(":");
if (idx > 0) {
image = image.substring(0, idx);
}
var paths = image.split("/", 3);
if (paths.length) {
var answer = null;
if (paths.length == 3) {
answer = paths[1] + "/" + paths[2];
}
else if (paths.length == 2) {
answer = paths[0] + "/" + paths[1];
}
else {
answer = paths[0] + "/" + paths[1];
}
container.$imageLink = UrlHelpers.join("https://registry.hub.docker.com/u/", answer);
}
}
angular.forEach(container.ports, function (port) {
var containerPort = port.containerPort;
if (containerPort) {
pod.$containerPorts.push(containerPort);
}
});
8 years ago
});
pod.$imageNames = imageNames;
var podStatus = podStatus;
var podSpec = (pod.spec || {});
pod.$podIP = podStatus.podIP;
pod.$host = podSpec.host || podSpec.nodeName || podStatus.hostIP;
});
this.services.forEach(function (service) {
if (!service.kind)
service.kind = "Service";
_this.servicesByKey[service._key] = service;
var selector = Kubernetes.getSelector(service);
service.$pods = [];
if (!service.$podCounters) {
service.$podCounters = {};
}
var podLinkUrl = UrlHelpers.join("/kubernetes/namespace", service.metadata.namespace, "pods");
_.assign(service.$podCounters, selector ? Kubernetes.createPodCounters(selector, _this.pods, service.$pods, Kubernetes.labelsToString(selector, ","), podLinkUrl) : {});
service.$podCount = service.$pods.length;
var selectedPods = service.$pods;
service.connectTo = selectedPods.map(function (pod) {
return pod._key;
}).join(',');
service.$labelsText = Kubernetes.labelsToString(Kubernetes.getLabels(service));
_this.updateIconUrlAndAppInfo(service, "serviceNames");
var spec = service.spec || {};
service.$portalIP = spec.portalIP;
service.$selectorText = Kubernetes.labelsToString(spec.selector);
var ports = _.map(spec.ports || [], "port");
service.$ports = ports;
service.$portsText = ports.join(", ");
var iconUrl = service.$iconUrl;
if (iconUrl && selectedPods) {
selectedPods.forEach(function (pod) {
pod.$iconUrl = iconUrl;
});
}
service.$serviceUrl = Kubernetes.serviceLinkUrl(service);
});
this.replicationControllers.forEach(function (replicationController) {
if (!replicationController.kind)
replicationController.kind = "ReplicationController";
_this.replicationControllersByKey[replicationController._key] = replicationController;
var selector = Kubernetes.getSelector(replicationController);
replicationController.$pods = [];
if (Kubernetes.isFilterRC(replicationController) && !Kubernetes.isInclude(_this.filterReplicationcontrollers, replicationController))
_this.filterReplicationcontrollers.push(replicationController);
replicationController.$podCounters = selector ? Kubernetes.createPodCounters(selector, _this.pods, replicationController.$pods) : null;
replicationController.$podCount = replicationController.$pods.length;
replicationController.$replicas = (replicationController.spec || {}).replicas;
replicationController.$oracleName = Kubernetes.getOracleName(replicationController);
//console.log(getName(replicationController));
replicationController.$oracleStatus = Kubernetes.getOracleStatus(Kubernetes.getLabels(replicationController));
replicationController.$extractStatus = Kubernetes.getExtractStatus(Kubernetes.getLabels(replicationController));
var selectedPods = replicationController.$pods;
replicationController.connectTo = selectedPods.map(function (pod) {
return pod._key;
}).join(',');
//console.log(getLabels(replicationController));
replicationController.$labelsText = Kubernetes.labelsToString(Kubernetes.getLabels(replicationController));
replicationController.metadata.labels = Kubernetes.labelsFormat(replicationController);
_this.updateIconUrlAndAppInfo(replicationController, "replicationControllerNames");
var iconUrl = replicationController.$iconUrl;
if (iconUrl && selectedPods) {
selectedPods.forEach(function (pod) {
pod.$iconUrl = iconUrl;
});
8 years ago
}
});
// services may not map to an icon but their pods may do via the RC
// so lets default it...
this.services.forEach(function (service) {
var iconUrl = service.$iconUrl;
var selectedPods = service.$pods;
if (selectedPods) {
if (!iconUrl || iconUrl === Kubernetes.defaultIconUrl) {
iconUrl = null;
selectedPods.forEach(function (pod) {
if (!iconUrl) {
iconUrl = pod.$iconUrl;
if (iconUrl) {
service.$iconUrl = iconUrl;
}
}
});
}
8 years ago
}
});
this.updateApps();
var podsByHost = {};
this.pods.forEach(function (pod) {
var host = Kubernetes.getHost(pod);
var podsForHost = podsByHost[host];
if (!podsForHost) {
podsForHost = [];
podsByHost[host] = podsForHost;
8 years ago
}
podsForHost.push(pod);
});
this.podsByHost = podsByHost;
var tmpHosts = [];
for (var hostKey in podsByHost) {
var hostPods = [];
var podCounters = Kubernetes.createPodCounters(function (pod) { return Kubernetes.getHost(pod) === hostKey; }, this.pods, hostPods, "host=" + hostKey);
var hostIP = null;
if (hostPods.length) {
var pod = hostPods[0];
var currentState = pod.status;
if (currentState) {
hostIP = currentState.hostIP;
}
8 years ago
}
var hostDetails = {
name: hostKey,
id: hostKey,
elementId: hostKey.replace(/\./g, '_'),
hostIP: hostIP,
pods: hostPods,
kind: "Host",
$podCounters: podCounters,
$iconUrl: Kubernetes.hostIconUrl
};
tmpHosts.push(hostDetails);
}
this.hosts = tmpHosts;
Kubernetes.enrichBuildConfigs(this.buildconfigs);
Kubernetes.enrichEvents(this.events, this);
};
KubernetesModelService.prototype.updateApps = function () {
var _this = this;
try {
// lets create the app views by trying to join controllers / services / pods that are related
var appViews = [];
this.replicationControllers.forEach(function (replicationController) {
var name = Kubernetes.getName(replicationController);
var $iconUrl = replicationController.$iconUrl;
appViews.push({
appPath: "/dummyPath/" + name,
$name: name,
$info: {
$iconUrl: $iconUrl
},
$iconUrl: $iconUrl,
replicationControllers: [replicationController],
pods: replicationController.$pods || [],
services: []
});
});
var noMatches = [];
this.services.forEach(function (service) {
// now lets see if we can find an app with an RC of the same selector
var matchesApp = null;
appViews.forEach(function (appView) {
appView.replicationControllers.forEach(function (replicationController) {
var repSelector = Kubernetes.getSelector(replicationController);
if (repSelector &&
Kubernetes.selectorMatches(repSelector, Kubernetes.getSelector(service)) &&
Kubernetes.getNamespace(service) === Kubernetes.getNamespace(replicationController)) {
matchesApp = appView;
}
});
});
if (matchesApp) {
matchesApp.services.push(service);
}
else {
noMatches.push(service);
}
});
Kubernetes.log.debug("no matches: ", noMatches);
noMatches.forEach(function (service) {
var appView = _.find(appViews, function (appView) {
return _.any(appView.replicationControllers, function (rc) {
return _.startsWith(Kubernetes.getName(rc), Kubernetes.getName(service));
});
8 years ago
});
if (appView) {
appView.services.push(service);
}
else {
var $iconUrl = service.$iconUrl;
appViews.push({
appPath: "/dummyPath/" + name,
$name: name,
$info: {
$iconUrl: $iconUrl
},
$iconUrl: $iconUrl,
replicationControllers: [],
pods: service.$pods || [],
services: [service]
});
}
});
angular.forEach(this.routes, function (route) {
var metadata = route.metadata || {};
var spec = route.spec || {};
var serviceName = Core.pathGet(spec, ["to", "name"]);
var host = spec.host;
var namespace = Kubernetes.getNamespace(route);
if (serviceName && host) {
var service = _this.getService(namespace, serviceName);
if (service) {
service.$host = host;
// TODO we could use some annotations / metadata to deduce what URL we should use to open this
// service in the console. For now just assume its http:
if (host) {
var hostUrl = host;
if (hostUrl.indexOf("://") < 0) {
hostUrl = "http://" + host;
}
service.$connectUrl = UrlHelpers.join(hostUrl, "/");
}
// TODO definitely need that annotation, temp hack for apiman link
if (Kubernetes.getName(service) === 'apiman' && host) {
service.$connectUrl = new URI().host(service.$host)
.path('apimanui/index.html')
.query({})
.hash(URI.encode(angular.toJson({
backTo: new URI().toString(),
token: HawtioOAuth.getOAuthToken()
}))).toString();
}
}
else {
Kubernetes.log.debug("Could not find service " + serviceName + " namespace " + namespace + " for route: " + metadata.name);
}
}
});
appViews = _.sortBy(populateKeys(appViews), function (appView) { return appView._key; });
ArrayHelpers.sync(this.appViews, appViews, '$name');
if (this.appInfos && this.appViews) {
var folderMap = {};
var folders = [];
var appMap = {};
angular.forEach(this.appInfos, function (appInfo) {
if (!appInfo.$iconUrl && appInfo.iconPath && appInfo.iconPath !== "null") {
appInfo.$iconUrl = Kubernetes.gitPathToUrl(appInfo.iconPath);
}
var appPath = appInfo.appPath;
if (appPath) {
appMap[appPath] = appInfo;
var idx = appPath.lastIndexOf("/");
var folderPath = "";
if (idx >= 0) {
folderPath = appPath.substring(0, idx);
}
folderPath = Core.trimLeading(folderPath, "/");
var folder = folderMap[folderPath];
if (!folder) {
folder = {
path: folderPath,
expanded: true,
apps: []
};
folders.push(folder);
folderMap[folderPath] = folder;
}
folder.apps.push(appInfo);
8 years ago
}
});
this.appFolders = _.sortBy(folders, "path");
var apps = [];
var defaultInfo = {
$iconUrl: Kubernetes.defaultIconUrl
};
angular.forEach(this.appViews, function (appView) {
try {
var appPath = appView.appPath;
/*
TODO
appView.$select = () => {
Kubernetes.setJson($scope, appView.id, $scope.model.apps);
};
*/
var appInfo = angular.copy(defaultInfo);
if (appPath) {
appInfo = appMap[appPath] || appInfo;
}
if (!appView.$info) {
appView.$info = defaultInfo;
appView.$info = appInfo;
}
appView.id = appPath;
if (!appView.$name) {
appView.$name = appInfo.name || appView.$name;
}
if (!appView.$iconUrl) {
appView.$iconUrl = appInfo.$iconUrl;
}
apps.push(appView);
appView.$podCounters = Kubernetes.createAppViewPodCounters(appView);
appView.$podCount = (appView.pods || []).length;
appView.$replicationControllersText = (appView.replicationControllers || []).map(function (i) { return i["_key"]; }).join(" ");
appView.$servicesText = (appView.services || []).map(function (i) { return i["_key"]; }).join(" ");
appView.$serviceViews = Kubernetes.createAppViewServiceViews(appView);
}
catch (e) {
Kubernetes.log.warn("Failed to update appViews: " + e);
}
8 years ago
});
//this.apps = apps;
this.apps = this.appViews;
8 years ago
}
8 years ago
}
catch (e) {
Kubernetes.log.warn("Caught error: " + e);
8 years ago
}
};
KubernetesModelService.prototype.discoverPodConnections = function (entity) {
var info = Core.pathGet(entity, ["status", "info"]);
var hostPort = null;
var currentState = entity.status || {};
var desiredState = entity.spec || {};
var podId = Kubernetes.getName(entity);
var host = currentState["hostIP"];
var podIP = currentState["podIP"];
var hasDocker = false;
var foundContainerPort = null;
if (desiredState) {
var containers = desiredState.containers;
angular.forEach(containers, function (container) {
if (!hostPort) {
var ports = container.ports;
angular.forEach(ports, function (port) {
if (!hostPort) {
var containerPort = port.containerPort;
var portName = port.name;
var containerHostPort = port.hostPort;
if (containerPort === 8778 || "jolokia" === portName) {
if (containerPort) {
if (podIP) {
foundContainerPort = containerPort;
}
if (containerHostPort) {
hostPort = containerHostPort;
}
}
}
}
});
}
});
8 years ago
}
if (foundContainerPort && podId && Kubernetes.isRunning(currentState)) {
if (!Kubernetes.isOpenShift) {
// TODO temp workaround for k8s on GKE https://github.com/kubernetes/kubernetes/issues/17172
entity.$jolokiaUrl = UrlHelpers.join(Kubernetes.masterApiUrl(), "api", Kubernetes.defaultApiVersion, "proxy", "namespaces", entity.metadata.namespace, "pods",
//"https:" + podId + ":" + foundContainerPort,
podId + ":" + foundContainerPort, "jolokia/");
}
else {
entity.$jolokiaUrl = UrlHelpers.join(Kubernetes.masterApiUrl(), "api", Kubernetes.defaultApiVersion, "namespaces", entity.metadata.namespace, "pods", "https:" + podId + ":" + foundContainerPort, "proxy/jolokia/");
8 years ago
}
}
};
return KubernetesModelService;
}());
Kubernetes.KubernetesModelService = KubernetesModelService;
function getTemplateService(model) {
var key = createKey('default', 'templates', 'service');
var answer = model.servicesByKey[key];
Kubernetes.log.debug("found template service: ", answer);
return answer;
8 years ago
}
/**
* Creates a model service which keeps track of all the pods, replication controllers and services along
* with their associations and status
*/
Kubernetes._module.factory('KubernetesModel', ['$rootScope', '$http', 'KubernetesApiURL', 'KubernetesState', 'WatcherService', '$location', '$resource', function ($rootScope, $http, AppLibraryURL, KubernetesState, watcher, $location, $resource) {
var $scope = new KubernetesModelService();
$scope.kubernetes = KubernetesState;
// create all of our resource classes
var typeNames = watcher.getTypes();
_.forEach(typeNames, function (type) {
var urlTemplate = Kubernetes.uriTemplateForKubernetesKind(type);
$scope[type + 'Resource'] = Kubernetes.createResource(type, urlTemplate, $resource, $scope);
});
if (!Kubernetes.isOpenShift) {
// register custom URL factories for templates/projects
watcher.registerCustomUrlFunction(KubernetesAPI.WatchTypes.BUILD_CONFIGS, function (options) {
var templateService = getTemplateService($scope);
if (templateService) {
return UrlHelpers.join(templateService.proxyUrl, '/oapi/v1/namespaces/default/buildconfigs/');
}
return null;
});
// register custom URL factories for templates/projects
watcher.registerCustomUrlFunction(KubernetesAPI.WatchTypes.TEMPLATES, function (options) {
var templateService = getTemplateService($scope);
if (templateService) {
return UrlHelpers.join(templateService.proxyUrl, '/oapi/v1/namespaces/default/templates/');
}
return null;
});
8 years ago
}
// register for all updates on objects
watcher.registerListener(function (objects) {
var types = watcher.getTypes();
_.forEach(types, function (type) {
switch (type) {
case Kubernetes.WatchTypes.SERVICES:
var items = populateKeys(objects[type]);
angular.forEach(items, function (item) {
item.proxyUrl = Kubernetes.kubernetesProxyUrlForService(Kubernetes.kubernetesApiUrl(), item);
});
$scope[type] = items;
break;
case Kubernetes.WatchTypes.TEMPLATES:
case Kubernetes.WatchTypes.ROUTES:
case Kubernetes.WatchTypes.BUILDS:
case Kubernetes.WatchTypes.BUILD_CONFIGS:
case Kubernetes.WatchTypes.IMAGE_STREAMS:
// don't put a break here :-)
default:
$scope[type] = populateKeys(objects[type]);
}
Kubernetes.log.debug("Type: ", type, " object: ", $scope[type]);
});
$scope.maybeInit();
$rootScope.$broadcast('kubernetesModelUpdated', $scope);
Core.$apply($rootScope);
});
// set the selected namespace if set in the location bar
// otherwise use whatever previously selected namespace is
// available
var search = $location.search();
if ('namespace' in search) {
watcher.setNamespace(search['namespace']);
8 years ago
}
function selectPods(pods, namespace, labels) {
return pods.filter(function (pod) {
return Kubernetes.getNamespace(pod) === namespace && Kubernetes.selectorMatches(labels, Kubernetes.getLabels(pod));
});
}
return $scope;
}]);
})(Kubernetes || (Kubernetes = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="../../kubernetes/ts/kubernetesHelpers.ts"/>
/// <reference path="../../kubernetes/ts/kubernetesInterfaces.ts"/>
/// <reference path="../../kubernetes/ts/kubernetesModel.ts"/>
/// <reference path="developerPlugin.ts"/>
/// <reference path="developerEnrichers.ts"/>
/// <reference path="developerHelpers.ts"/>
/// <reference path="developerNavigation.ts"/>
var Developer;
(function (Developer) {
function clickApprove(element, url) {
var $scope = angular.element(element).scope();
if ($scope) {
$scope.approve(url, element.text);
8 years ago
}
}
Developer.clickApprove = clickApprove;
Developer.JenkinsLogController = Developer._module.controller("Developer.JenkinsLogController", ["$scope", "KubernetesModel", "KubernetesState", "KubernetesSchema", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "$modal", "KubernetesApiURL", "ServiceRegistry", "$element", function ($scope, KubernetesModel, KubernetesState, KubernetesSchema, $templateCache, $location, $routeParams, $http, $timeout, $modal, KubernetesApiURL, ServiceRegistry, $element) {
$scope.kubernetes = KubernetesState;
$scope.model = KubernetesModel;
$scope.selectedBuild = $scope.$eval('build') || $scope.$eval('selectedBuild');
$scope.id = $scope.$eval('build.id') || $routeParams["id"];
$scope.schema = KubernetesSchema;
$scope.entityChangedCache = {};
$element.on('$destroy', function () {
$scope.$destroy();
8 years ago
});
$scope.log = {
html: "",
start: 0,
firstIdx: null
};
$scope.$on('kubernetesModelUpdated', function () {
updateJenkinsLink();
Core.$apply($scope);
8 years ago
});
$scope.$on('jenkinsSelectedBuild', function (event, build) {
Developer.log.info("==== jenkins build selected! " + build.id + " " + build.$jobId);
$scope.selectedBuild = build;
});
$scope.$watch('selectedBuild', function (selectedBuild) {
Developer.log.info("Selected build updated: ", selectedBuild);
$scope.fetch();
});
Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
$scope.breadcrumbConfig = Developer.createJenkinsBreadcrumbs($scope.id, getJobId(), getBuildId());
$scope.subTabConfig = Developer.createJenkinsSubNavBars($scope.id, getJobId(), getBuildId(), {
label: "Log",
title: "Views the logs of this build"
});
function getJobId() {
// lets allow the parent scope to be used too for when this is used as a panel
return $routeParams["job"] || ($scope.selectedBuild || {}).$jobId;
}
$scope.getJobId = getJobId;
function getBuildId() {
// lets allow the parent scope to be used too for when this is used as a panel
return $routeParams["build"] || ($scope.selectedBuild || {}).id;
}
$scope.getBuildId = getBuildId;
function updateJenkinsLink() {
var jenkinsUrl = Developer.jenkinsLink();
if (jenkinsUrl) {
$scope.$viewJenkinsBuildLink = UrlHelpers.join(jenkinsUrl, "job", getJobId(), getBuildId());
$scope.$viewJenkinsLogLink = UrlHelpers.join($scope.$viewJenkinsBuildLink, "console");
}
}
var querySize = 50000;
$scope.approve = function (url, operation) {
var modal = $modal.open({
templateUrl: UrlHelpers.join(Developer.templatePath, 'jenkinsApproveModal.html'),
controller: ['$scope', '$modalInstance', function ($scope, $modalInstance) {
$scope.operation = operation;
$scope.header = operation + "?";
$scope.ok = function () {
modal.close();
postToJenkins(url, operation);
};
$scope.cancel = function () {
modal.dismiss();
};
}]
});
};
function postToJenkins(uri, operation) {
var url = Kubernetes.kubernetesProxyUrlForServiceCurrentNamespace(Developer.jenkinsServiceNameAndPort, uri);
if (url) {
var body = null;
var config = {
headers: {}
};
Developer.log.info("posting to jenkinsUrl: " + url);
$http.post(url, body, config).
success(function (data, status, headers, config) {
Developer.log.info("Managed to " + operation + " at " + url);
}).
error(function (data, status, headers, config) {
Developer.log.warn("Failed " + operation + " job at " + url + " " + data + " " + status);
});
8 years ago
}
8 years ago
else {
Developer.log.warn("Cannot post to jenkins URI: " + uri + " as no jenkins found!");
8 years ago
}
8 years ago
}
$scope.$keepPolling = function () { return Kubernetes.keepPollingModel; };
$scope.fetch = PollHelpers.setupPolling($scope, function (next) {
if ($scope.$eval('hideLogs && !build.building')) {
Developer.log.debug("Log hidden, not fetching logs");
return;
8 years ago
}
8 years ago
else {
Developer.log.debug("Fetching logs for build: ", $scope.$eval('build'));
}
var buildId = getBuildId();
var jobId = getJobId();
//log.info("=== jenkins log querying job " + jobId + " build " + buildId + " selected build " + $scope.selectedBuild);
if (jobId && buildId) {
if ($scope.buildId !== buildId || $scope.jobId !== jobId) {
// lets clear the query
$scope.log = {
html: "",
start: 0,
firstIdx: null
};
}
$scope.buildId = buildId;
$scope.jobId = jobId;
var url = Kubernetes.kubernetesProxyUrlForServiceCurrentNamespace(Developer.jenkinsServiceNameAndPort, UrlHelpers.join("job", jobId, buildId, "fabric8/logHtml?tail=1&start=" + $scope.log.start + "&size=" + querySize));
if ($scope.log.firstIdx !== null) {
url += "&first=" + $scope.log.firstIdx;
}
if (url && (!$scope.log.fetched || Kubernetes.keepPollingModel)) {
$http.get(url).
success(function (data, status, headers, config) {
8 years ago
if (data) {
var replaceClusterIPsInHtml = replaceClusterIpFunction();
if (!$scope.log.logs) {
$scope.log.logs = [];
}
var lines = data.lines;
var returnedLength = data.returnedLength;
var logLength = data.logLength;
var returnedStart = data.start;
var earlierLog = false;
if (angular.isDefined(returnedStart)) {
earlierLog = returnedStart < $scope.log.start;
}
var lineSplit = data.lineSplit;
// log.info("start was: " + $scope.log.start + " first: " + $scope.log.firstIdx + " => returnedLength: " + returnedLength + " logLength: " + logLength + " returnedStart: " + returnedStart + " earlierLog: " + earlierLog + " lineSplit: " + lineSplit);
if (lines) {
var currentLogs = $scope.log.logs;
// lets re-join split lines
if (lineSplit && currentLogs.length) {
var lastIndex;
var restOfLine;
if (earlierLog) {
lastIndex = 0;
restOfLine = lines.pop();
if (restOfLine) {
currentLogs[lastIndex] = replaceClusterIPsInHtml(restOfLine + currentLogs[lastIndex]);
}
}
else {
lastIndex = currentLogs.length - 1;
restOfLine = lines.shift();
if (restOfLine) {
currentLogs[lastIndex] = replaceClusterIPsInHtml(currentLogs[lastIndex] + restOfLine);
}
}
}
for (var i = 0; i < lines.length; i++) {
lines[i] = replaceClusterIPsInHtml(lines[i]);
}
if (earlierLog) {
$scope.log.logs = lines.concat(currentLogs);
}
else {
$scope.log.logs = currentLogs.concat(lines);
}
}
var moveForward = true;
if (angular.isDefined(returnedStart)) {
if (returnedStart > $scope.log.start && $scope.log.start === 0) {
// we've jumped to the end of the file to read the tail of it
$scope.log.start = returnedStart;
$scope.log.firstIdx = returnedStart;
}
else if ($scope.log.firstIdx === null) {
// lets remember where the first request started
$scope.log.firstIdx = returnedStart;
}
else if (returnedStart < $scope.log.firstIdx) {
// we've got an earlier bit of the log
// after starting at the tail
// so lets move firstIdx backwards and leave start as it is (at the end of the file)
$scope.log.firstIdx = returnedStart;
moveForward = false;
}
}
if (moveForward && returnedLength && !earlierLog) {
$scope.log.start += returnedLength;
if (logLength && $scope.log.start > logLength) {
$scope.log.start = logLength;
}
}
updateJenkinsLink();
}
$scope.log.fetched = true;
// Core.$apply($scope);
8 years ago
next();
}).
error(function (data, status, headers, config) {
Developer.log.warn("Failed to load " + url + " " + data + " " + status);
8 years ago
next();
});
}
8 years ago
}
else {
$scope.log.fetched = true;
Core.$apply($scope);
next();
}
});
if (angular.isFunction($scope.fetch)) {
$scope.fetch();
8 years ago
}
function replaceClusterIpFunction() {
function createReplaceFunction(from, to) {
return function (text) { return replaceText(text, from, to); };
}
var replacements = [];
angular.forEach($scope.model.services, function (service) {
var $portalIP = service.$portalIP;
var $serviceUrl = service.$serviceUrl;
var $portsText = service.$portsText;
if ($portalIP && $serviceUrl) {
var idx = $serviceUrl.indexOf("://");
if (idx > 0) {
var replaceWith = $serviceUrl.substring(idx, $serviceUrl.length);
if (!replaceWith.endsWith("/")) {
replaceWith += "/";
}
if (replaceWith.length > 4) {
replacements.push(createReplaceFunction("://" + $portalIP + "/", replaceWith));
if ($portsText) {
var suffix = ":" + $portsText;
var serviceWithPort = replaceWith.substring(0, replaceWith.length - 1);
if (!serviceWithPort.endsWith(suffix)) {
serviceWithPort += suffix;
}
serviceWithPort += "/";
replacements.push(createReplaceFunction("://" + $portalIP + ":" + $portsText + "/", serviceWithPort));
}
}
}
8 years ago
}
});
function addReplaceFn(from, to) {
replacements.push(function (text) {
return replaceText(text, from, to);
});
}
addReplaceFn("[INFO]", "<span class='log-success'>[INFO]</span>");
addReplaceFn("[WARN]", "<span class='log-warn'>[WARN]</span>");
addReplaceFn("[WARNING]", "<span class='log-warn'>[WARNING]</span>");
addReplaceFn("[ERROR]", "<span class='log-error'>[ERROR]</span>");
addReplaceFn("FAILURE", "<span class='log-error'>FAILURE</span>");
addReplaceFn("SUCCESS", "<span class='log-success'>SUCCESS</span>");
// lets try convert the Proceed / Abort links
replacements.push(function (text) {
var prefix = "<a href='#' onclick=\"new Ajax.Request('";
var idx = 0;
while (idx >= 0) {
idx = text.indexOf(prefix, idx);
if (idx >= 0) {
var start = idx + prefix.length;
var endQuote = text.indexOf("'", start + 1);
if (endQuote <= 0) {
break;
}
var endDoubleQuote = text.indexOf('"', endQuote + 1);
if (endDoubleQuote <= 0) {
break;
}
var url = text.substring(start, endQuote);
// TODO using $compile is a tad complex, for now lets cheat with a little onclick ;)
//text = text.substring(0, idx) + "<a class='btn btn-default btn-lg' ng-click=\"approve('" + url + "')\"" + text.substring(endDoubleQuote + 1);
text = text.substring(0, idx) + "<a class='btn btn-default btn-lg' onclick=\"Developer.clickApprove(this, '" + url + "')\"" + text.substring(endDoubleQuote + 1);
}
8 years ago
}
return text;
8 years ago
});
return function (text) {
var answer = text;
angular.forEach(replacements, function (fn) {
answer = fn(answer);
});
return answer;
8 years ago
};
}
function replaceText(text, from, to) {
if (from && to && text) {
//log.info("Replacing '" + from + "' => '" + to + "'");
var idx = 0;
while (true) {
idx = text.indexOf(from, idx);
if (idx >= 0) {
text = text.substring(0, idx) + to + text.substring(idx + from.length);
idx += to.length;
8 years ago
}
else {
break;
}
}
8 years ago
}
return text;
8 years ago
}
}]);
})(Developer || (Developer = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="../../kubernetes/ts/kubernetesHelpers.ts"/>
/// <reference path="developerEnrichers.ts"/>
/// <reference path="developerHelpers.ts"/>
/// <reference path="developerNavigation.ts"/>
var Developer;
(function (Developer) {
Developer.JenkinsMetricsController = Developer.controller("JenkinsMetricsController", ["$scope", "KubernetesModel", "KubernetesState", "KubernetesSchema", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL", "ServiceRegistry",
function ($scope, KubernetesModel, KubernetesState, KubernetesSchema, $templateCache, $location, $routeParams, $http, $timeout, KubernetesApiURL, ServiceRegistry) {
$scope.kubernetes = KubernetesState;
$scope.model = KubernetesModel;
$scope.id = $routeParams["id"];
$scope.jobId = $routeParams["job"];
$scope.schema = KubernetesSchema;
$scope.jenkins = null;
$scope.entityChangedCache = {};
Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
$scope.breadcrumbConfig = Developer.createProjectBreadcrumbs($scope.id);
$scope.subTabConfig = Developer.createProjectSubNavBars($scope.id, $scope.jobId);
$scope.$on('kubernetesModelUpdated', function () {
updateData();
8 years ago
});
$scope.$on('$routeUpdate', function ($event) {
updateData();
});
$scope.options = {
chart: {
type: 'discreteBarChart',
autorefresh: false,
height: 450,
margin: {
top: 20,
right: 20,
bottom: 60,
left: 45
},
clipEdge: true,
staggerLabels: false,
transitionDuration: 500,
stacked: false,
interactive: true,
tooltip: {
enabled: true,
contentGenerator: function (args) {
var data = args.data || {};
return data.tooltip;
},
},
color: function (d, i) {
return d.color;
},
xAxis: {
axisLabel: 'Builds',
showMaxMin: false,
tickFormat: function (d) {
return "#" + d;
}
},
yAxis: {
axisLabel: 'Build Duration (seconds)',
tickFormat: function (d) {
return d3.format(',.1f')(d);
}
}
8 years ago
}
};
$scope.data = [];
updateData();
function barColourForBuildResult(result) {
if (result) {
if (result === "FAILURE" || result === "FAILED") {
return "red";
}
else if (result === "ABORTED" || result === "INTERUPTED") {
return "tan";
}
else if (result === "SUCCESS") {
return "green";
}
else if (result === "NOT_STARTED") {
return "lightgrey";
}
8 years ago
}
return "darkgrey";
}
function updateChartData() {
var useSingleSet = true;
var buildsSucceeded = [];
var buildsFailed = [];
var successBuildKey = "Succeeded builds";
var failedBuildKey = "Failed builds";
if (useSingleSet) {
successBuildKey = "Builds";
8 years ago
}
var count = 0;
var builds = _.sortBy($scope.metrics.builds || [], "number");
angular.forEach(builds, function (build) {
var x = build.number;
var y = build.duration / 1000;
var date = Developer.asDate(build.timeInMillis);
var result = build.result || "NOT_STARTED";
var color = barColourForBuildResult(result);
var iconClass = Developer.createBuildStatusIconClass(result);
var tooltip = '<h3><i class="' + iconClass + '"></i> ' + build.displayName + '</h3>' +
'<p>duration: <b>' + y + '</b> seconds</p>';
if (date) {
tooltip += '<p>started: <b>' + date + '</b></p>';
}
if (result) {
tooltip += '<p>result: <b>' + result + '</b></p>';
}
if (x) {
var data = buildsSucceeded;
var key = successBuildKey;
if (!successBuildKey && (!result || !result.startsWith("SUCC"))) {
data = buildsFailed;
key = failedBuildKey;
}
data.push({
tooltip: tooltip,
color: color,
x: x, y: y });
}
8 years ago
});
$scope.data = [];
if (buildsSucceeded.length) {
$scope.data.push({
key: successBuildKey,
values: buildsSucceeded
});
}
if (buildsFailed.length) {
$scope.data.push({
key: failedBuildKey,
values: buildsFailed
});
}
$scope.api.updateWithData($scope.data);
$timeout(function () {
$scope.api.update();
}, 50);
8 years ago
}
function updateData() {
var metricsPath = $scope.jobId ? UrlHelpers.join("job", $scope.jobId, "fabric8/metrics") : "fabric8/metrics";
var url = Kubernetes.kubernetesProxyUrlForServiceCurrentNamespace(Developer.jenkinsServiceNameAndPort, metricsPath);
Developer.log.info("");
if (url && (!$scope.jenkins || Kubernetes.keepPollingModel)) {
$http.get(url, Developer.jenkinsHttpConfig).
success(function (data, status, headers, config) {
if (data) {
if (Developer.hasObjectChanged(data, $scope.entityChangedCache)) {
Developer.log.info("entity has changed!");
$scope.metrics = data;
updateChartData();
}
}
$scope.model.fetched = true;
Core.$apply($scope);
}).
error(function (data, status, headers, config) {
Developer.log.warn("Failed to load " + url + " " + data + " " + status);
});
8 years ago
}
8 years ago
}
}]);
})(Developer || (Developer = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="../../kubernetes/ts/kubernetesHelpers.ts"/>
/// <reference path="developerEnrichers.ts"/>
/// <reference path="developerHelpers.ts"/>
/// <reference path="developerNavigation.ts"/>
var Developer;
(function (Developer) {
Developer.NavBarController = Developer.controller("NavBarController", ["$scope", "$location", "$routeParams", "$timeout", "KubernetesApiURL",
function ($scope, $location, $routeParams, $timeout) {
$scope.isValid = function (item) {
if (item) {
var value = item.isValid;
if (angular.isFunction(value)) {
return value(item);
}
else {
return angular.isUndefined(value) || value;
}
}
return false;
};
}]);
})(Developer || (Developer = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="../../kubernetes/ts/kubernetesHelpers.ts"/>
/// <reference path="developerEnrichers.ts"/>
/// <reference path="developerHelpers.ts"/>
/// <reference path="developerNavigation.ts"/>
var Developer;
(function (Developer) {
Developer.PipelineController = Developer.controller("PipelineController", ["$scope", "KubernetesModel", "KubernetesState", "KubernetesSchema", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL", "ServiceRegistry",
function ($scope, KubernetesModel, KubernetesState, KubernetesSchema, $templateCache, $location, $routeParams, $http, $timeout, KubernetesApiURL, ServiceRegistry) {
$scope.kubernetes = KubernetesState;
$scope.kubeModel = KubernetesModel;
$scope.id = $routeParams["id"];
$scope.jobId = $routeParams["job"];
$scope.buildId = $routeParams["build"];
$scope.schema = KubernetesSchema;
$scope.entityChangedCache = {};
$scope.model = {
stages: null
};
Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
$scope.breadcrumbConfig = Developer.createProjectBreadcrumbs($scope.id);
$scope.subTabConfig = Developer.createProjectSubNavBars($scope.id, $scope.jobId);
$scope.$on('kubernetesModelUpdated', function () {
updateData();
});
$scope.$on('$routeUpdate', function ($event) {
updateData();
});
updateData();
function updateData() {
if ($scope.jobId) {
var url = Kubernetes.kubernetesProxyUrlForServiceCurrentNamespace(Developer.jenkinsServiceNameAndPort, UrlHelpers.join("job", $scope.jobId, $scope.buildId, "fabric8/stages/"));
if (url && (!$scope.model.stages || Kubernetes.keepPollingModel)) {
$http.get(url).
success(function (data, status, headers, config) {
if (data) {
Developer.enrichJenkinsStages(data, $scope.id, $scope.jobId);
if (Developer.hasObjectChanged(data, $scope.entityChangedCache)) {
Developer.log.info("entity has changed!");
$scope.build = data;
$scope.model.stages = data.stages;
}
}
$scope.model.fetched = true;
Core.$apply($scope);
}).
error(function (data, status, headers, config) {
Developer.log.warn("Failed to load " + url + " " + data + " " + status);
$scope.model.fetched = true;
});
}
8 years ago
}
else {
$scope.model.fetched = true;
Core.$apply($scope);
8 years ago
}
8 years ago
}
}]);
})(Developer || (Developer = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="../../kubernetes/ts/kubernetesHelpers.ts"/>
/// <reference path="developerEnrichers.ts"/>
/// <reference path="developerHelpers.ts"/>
/// <reference path="developerNavigation.ts"/>
var Developer;
(function (Developer) {
Developer._module.directive("pipelineView", function () {
return {
templateUrl: Developer.templatePath + 'pipelineView.html'
8 years ago
};
});
})(Developer || (Developer = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="../../kubernetes/ts/kubernetesHelpers.ts"/>
/// <reference path="developerPlugin.ts"/>
/// <reference path="developerEnrichers.ts"/>
/// <reference path="developerHelpers.ts"/>
/// <reference path="developerNavigation.ts"/>
var Developer;
(function (Developer) {
Developer.PipelinesController = Developer._module.controller("Developer.PipelinesController", ["$scope", "KubernetesModel", "KubernetesState", "KubernetesSchema", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL", "ServiceRegistry", "$element", function ($scope, KubernetesModel, KubernetesState, KubernetesSchema, $templateCache, $location, $routeParams, $http, $timeout, KubernetesApiURL, ServiceRegistry, $element) {
$scope.kubernetes = KubernetesState;
$scope.kubeModel = KubernetesModel;
$scope.id = $routeParams["id"];
$scope.jobId = $scope.jobId || $routeParams["job"];
$scope.schema = KubernetesSchema;
$scope.entityChangedCache = {};
$element.on('$destroy', function () {
$scope.$destroy();
});
$scope.model = {
job: null,
pendingOnly: $scope.pendingPipelinesOnly
8 years ago
};
Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
$scope.breadcrumbConfig = Developer.createProjectBreadcrumbs($scope.id);
$scope.subTabConfig = Developer.createProjectSubNavBars($scope.id, $scope.jobId);
$scope.$on('kubernetesModelUpdated', function () {
updateData();
});
$scope.$on('$routeUpdate', function ($event) {
updateData();
});
$scope.$watch('model.pendingOnly', function ($event) {
updateData();
});
$scope.selectBuild = function (build) {
var id = build.id;
if (id) {
if (id !== $scope.selectedBuildId) {
$scope.selectedBuildId = id;
$scope.$broadcast("jenkinsSelectedBuild", build);
8 years ago
}
8 years ago
}
};
var updateData = _.debounce(function () {
var entity = $scope.entity;
if ($scope.jobId) {
if ((!entity || entity.$jenkinsJob)) {
var queryPath = "fabric8/stages/";
if ($scope.model.pendingOnly) {
queryPath = "fabric8/pendingStages/";
}
var url = Kubernetes.kubernetesProxyUrlForServiceCurrentNamespace(Developer.jenkinsServiceNameAndPort, UrlHelpers.join("job", $scope.jobId, queryPath));
if (url && (!$scope.model.job || Kubernetes.keepPollingModel)) {
$http.get(url).
success(function (data, status, headers, config) {
if (data) {
Developer.enrichJenkinsPipelineJob(data, $scope.id, $scope.jobId);
if (Developer.hasObjectChanged(data, $scope.entityChangedCache)) {
Developer.log.info("entity has changed!");
$scope.model.job = data;
var builds = data.builds;
if (builds && builds.length) {
$scope.selectBuild(builds[0]);
}
}
}
$scope.model.fetched = true;
Core.$apply($scope);
}).
error(function (data, status, headers, config) {
Developer.log.warn("Failed to load " + url + " " + data + " " + status);
$scope.model.fetched = true;
});
}
}
else {
if ($scope.model) {
Kubernetes.enrichBuilds($scope.kubeModel.builds);
var builds = [];
angular.forEach($scope.kubeModel.builds, function (build) {
var labels = Kubernetes.getLabels(build);
var app = labels["app"];
if (app === $scope.projectId) {
builds.push(build);
}
});
builds = _.sortBy(builds, "$creationDate").reverse();
var allBuilds = builds;
if (allBuilds.length > 1) {
builds = _.filter(allBuilds, function (b) { return !b.$creationDate; });
if (!builds.length) {
builds = [allBuilds[0]];
}
}
var pipelines = [];
angular.forEach(builds, function (build) {
var buildStatus = build.status || {};
var result = buildStatus.phase || "";
var resultUpperCase = result.toUpperCase();
var description = "";
var $viewLink = build.$viewLink;
var $logLink = build.$logsLink;
var $timestamp = build.$creationDate;
var duration = buildStatus.duration;
if (duration) {
// 17s = 17,000,000,000 on openshift
duration = duration / 1000000;
}
var displayName = Kubernetes.getName(build);
var $iconClass = Developer.createBuildStatusIconClass(resultUpperCase);
var $backgroundClass = Developer.createBuildStatusBackgroundClass(resultUpperCase);
var stage = {
stageName: "OpenShift Build",
$viewLink: $viewLink,
$logLink: $logLink,
$startTime: $timestamp,
duration: duration,
status: result,
$iconClass: $iconClass,
$backgroundClass: $backgroundClass
};
var pipeline = {
description: description,
displayName: displayName,
$viewLink: $viewLink,
$logLink: $logLink,
$timestamp: $timestamp,
duration: duration,
stages: [stage]
};
pipelines.push(pipeline);
});
// lets filter the OpenShift builds and make a pipeline from that
$scope.model.job = {
$jobId: $scope.jobId,
$project: $scope.projectId,
builds: pipelines
};
}
$scope.model.fetched = true;
Core.$apply($scope);
}
8 years ago
}
else {
$scope.model.fetched = true;
Core.$apply($scope);
8 years ago
}
}, 50);
updateData();
8 years ago
}]);
})(Developer || (Developer = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="../../kubernetes/ts/kubernetesHelpers.ts"/>
/// <reference path="developerEnrichers.ts"/>
/// <reference path="developerHelpers.ts"/>
/// <reference path="developerNavigation.ts"/>
var Developer;
(function (Developer) {
Developer.ProjectController = Developer.controller("ProjectController", ["$scope", "$element", "KubernetesModel", "KubernetesState", "KubernetesSchema", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL",
function ($scope, $element, KubernetesModel, KubernetesState, KubernetesSchema, $templateCache, $location, $routeParams, $http, $timeout, KubernetesApiURL) {
$scope.kubernetes = KubernetesState;
$scope.model = KubernetesModel;
$scope.id = $routeParams["id"];
$scope.schema = KubernetesSchema;
$scope.config = KubernetesSchema.definitions.os_build_BuildConfig;
$scope.entityChangedCache = {};
$scope.envVersionsCache = {};
$scope.envNSCaches = {};
$scope.envVersions = {};
Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
$scope.breadcrumbConfig = []; //Developer.createProjectBreadcrumbs($scope.id);
updateTabs();
// this is used for the pendingPipelines view
$scope.jobId = $scope.id;
$scope.pendingPipelinesOnly = true;
$scope.$on('jenkinsSelectedBuild', function (event, build) {
$scope.selectedBuild = build;
});
// TODO this should be unnecessary but seems sometiems this watch doesn't always trigger unless you hit reload on this page
if ($scope.model.buildconfigs) {
onBuildConfigs($scope.model.buildconfigs);
}
Kubernetes.watch($scope, $element, "buildconfigs", $scope.namespace, onBuildConfigs);
function onBuildConfigs(buildConfigs) {
angular.forEach(buildConfigs, function (data) {
var name = Kubernetes.getName(data);
if (name === $scope.id) {
var sortedBuilds = null;
Kubernetes.enrichBuildConfig(data, sortedBuilds);
if (Developer.hasObjectChanged(data, $scope.entityChangedCache)) {
Developer.log.info("entity has changed!");
$scope.entity = data;
$scope.entity.$build = (data.$fabric8CodeViews || {})['fabric8.link.browseGogs.view'];
$scope.model.setProject($scope.entity);
}
updateEnvironmentWatch();
updateTabs();
8 years ago
}
});
$scope.model.fetched = true;
Core.$apply($scope);
}
/**
* We have updated the entity so lets make sure we are watching all the environments to find
* the project versions for each namespace
*/
function updateEnvironmentWatch() {
var project = $scope.entity;
if (project) {
var jenkinsJob = project.$jenkinsJob;
if (jenkinsJob) {
var buildsTab = _.find($scope.subTabConfig, { id: "builds" });
if (buildsTab) {
buildsTab["href"] = UrlHelpers.join("/workspaces", Kubernetes.currentKubernetesNamespace(), "projects", $scope.id, "jenkinsJob", jenkinsJob);
}
}
angular.forEach(project.environments, function (env) {
var ns = env.namespace;
var caches = $scope.envNSCaches[ns];
if (!caches) {
caches = {};
$scope.envNSCaches[ns] = caches;
Developer.loadProjectVersions($scope, $element, project, env, ns, $scope.envVersions, caches);
}
});
8 years ago
}
}
function updateTabs() {
$scope.subTabConfig = Developer.createProjectSubNavBars($scope.id, null, $scope);
}
8 years ago
}]);
})(Developer || (Developer = {}));
8 years ago
/// <reference path="developerPlugin.ts"/>
var Developer;
(function (Developer) {
Developer._module.controller('Developer.ProjectSelector', ['$scope', '$routeParams', 'KubernetesModel', function ($scope, $routeParams, KubernetesModel) {
var projectId = $routeParams['projectId'] || $routeParams['project'] || $routeParams['id'];
if (projectId) {
$scope.projectId = projectId;
$scope.model = KubernetesModel;
$scope.$watch('model.buildconfigs', function (buildconfigs) {
$scope.projects = buildconfigs;
8 years ago
});
}
else {
Developer.log.info("no project ID in routeParams: ", $routeParams);
}
}]);
})(Developer || (Developer = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="../../kubernetes/ts/kubernetesHelpers.ts"/>
/// <reference path="developerEnrichers.ts"/>
/// <reference path="developerHelpers.ts"/>
/// <reference path="developerNavigation.ts"/>
var Developer;
(function (Developer) {
Developer.ProjectsController = Developer.controller("ProjectsController", ["$scope", "KubernetesModel", "KubernetesState", "$dialog", "$window", "$templateCache", "$routeParams", "$location", "localStorage", "$http", "$timeout", "KubernetesApiURL",
function ($scope, KubernetesModel, KubernetesState, $dialog, $window, $templateCache, $routeParams, $location, localStorage, $http, $timeout, KubernetesApiURL) {
$scope.kubernetes = KubernetesState;
$scope.model = KubernetesModel;
$scope.tableConfig = {
data: 'model.buildconfigs',
showSelectionCheckbox: true,
enableRowClickSelection: false,
multiSelect: true,
selectedItems: [],
filterOptions: {
filterText: $location.search()["q"] || ''
8 years ago
},
columnDefs: [
{
field: '$name',
displayName: 'Name',
cellTemplate: $templateCache.get("idTemplate.html")
},
/*
{
field: 'spec.source.type',
displayName: 'Source'
},
*/
{
field: 'spec.source.git.uri',
displayName: 'Repository'
},
/*
{
field: 'spec.strategy.type',
displayName: 'Strategy'
},
{
field: 'spec.strategy.stiStrategy.image',
displayName: 'Source Image'
},
{
field: 'spec.output.imageTag',
displayName: 'Output Image'
},
*/
{
field: 'metadata.description',
displayName: 'Description'
},
{
field: '$creationDate',
displayName: 'Created',
cellTemplate: $templateCache.get("creationTimeTemplate.html")
},
{
field: '$labelsText',
displayName: 'Labels',
cellTemplate: $templateCache.get("labelTemplate.html")
}
]
};
Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
$scope.breadcrumbConfig = Developer.createProjectBreadcrumbs();
$scope.subTabConfig = Developer.createWorkspaceSubNavBars();
// TODO
//$scope.isLoggedIntoGogs = Forge.isLoggedIntoGogs;
$scope.deletePrompt = function (selected) {
UI.multiItemConfirmActionDialog({
collection: selected,
index: '$name',
onClose: function (result) {
if (result) {
function deleteSelected(selected, next) {
if (next) {
deleteEntity(next, function () {
deleteSelected(selected, selected.shift());
});
8 years ago
}
else {
}
}
deleteSelected(selected, selected.shift());
}
8 years ago
},
title: 'Delete Apps',
action: 'The following Apps will be deleted:',
okText: 'Delete',
okClass: 'btn-danger',
custom: "This operation is permanent once completed!",
customClass: "alert alert-warning"
}).open();
};
function deleteEntity(selection, nextCallback) {
var name = (selection || {}).$name;
var jenkinsJob = selection.$jenkinsJob;
var publicJenkinsUrl = Developer.jenkinsLink();
//var jenkinsUrl = Core.pathGet(selection, ["$fabric8Views", "fabric8.link.jenkins.job", "url"]);
if (name) {
console.log("About to delete build config: " + name);
var url = Kubernetes.buildConfigRestUrl(name);
$http.delete(url).
success(function (data, status, headers, config) {
nextCallback();
}).
error(function (data, status, headers, config) {
Developer.log.warn("Failed to delete build config on " + url + " " + data + " " + status);
nextCallback();
});
}
else {
console.log("warning: no name for selection: " + angular.toJson(selection));
}
if (jenkinsJob && publicJenkinsUrl) {
var url = Kubernetes.kubernetesProxyUrlForServiceCurrentNamespace(Developer.jenkinsServiceNameAndPort, UrlHelpers.join("job", jenkinsJob, "doDelete"));
var body = "";
var config = {
headers: {
'Content-Type': "text/plain"
8 years ago
}
};
Developer.log.info("posting to jenkinsUrl: " + url);
$http.post(url, body, config).
success(function (data, status, headers, config) {
Developer.log.info("Managed to delete " + url);
}).
error(function (data, status, headers, config) {
Developer.log.warn("Failed to delete jenkins job at " + url + " " + data + " " + status);
});
}
}
/*
$scope.$keepPolling = () => Kubernetes.keepPollingModel;
$scope.fetch = PollHelpers.setupPolling($scope, (next:() => void) => {
var url = Kubernetes.buildConfigsRestURL();
$http.get(url).
success(function (data, status, headers, config) {
if (data) {
//console.log("got data " + angular.toJson(data, true));
var sortedBuilds = null;
$scope.buildConfigs = Kubernetes.enrichBuildConfigs(data.items, sortedBuilds);
$scope.model.fetched = true;
Core.$apply($scope);
next();
8 years ago
}
}).
error(function (data, status, headers, config) {
log.warn("Failed to load " + url + " " + data + " " + status);
next();
});
});
$scope.fetch();
*/
}]);
})(Developer || (Developer = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="../../kubernetes/ts/kubernetesHelpers.ts"/>
/// <reference path="developerEnrichers.ts"/>
/// <reference path="developerHelpers.ts"/>
/// <reference path="developerNavigation.ts"/>
var Developer;
(function (Developer) {
Developer.WorkspaceController = Developer.controller("WorkspaceController", ["$scope", "KubernetesModel", "KubernetesState", "KubernetesSchema", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL",
function ($scope, KubernetesModel, KubernetesState, KubernetesSchema, $templateCache, $location, $routeParams, $http, $timeout, KubernetesApiURL) {
$scope.kubernetes = KubernetesState;
$scope.model = KubernetesModel;
$scope.id = $routeParams["namespace"];
$scope.schema = KubernetesSchema;
$scope.config = KubernetesSchema.definitions.kubernetes_Namespace;
Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
$scope.breadcrumbConfig = Developer.createWorkspaceBreadcrumbs();
$scope.subTabConfig = Developer.createWorkspaceSubNavBars();
$scope.$keepPolling = function () { return Kubernetes.keepPollingModel; };
$scope.fetch = PollHelpers.setupPolling($scope, function (next) {
$scope.item = null;
if ($scope.id) {
var url = UrlHelpers.join(Kubernetes.resourcesUriForKind("Projects"), $scope.id);
Developer.log.info("Loading url: " + url);
$http.get(url).
success(function (data, status, headers, config) {
8 years ago
if (data) {
$scope.entity = Developer.enrichWorkspace(data);
8 years ago
}
$scope.model.fetched = true;
Core.$apply($scope);
next();
}).
error(function (data, status, headers, config) {
Developer.log.warn("Failed to load " + url + " " + data + " " + status);
next();
});
}
else {
$scope.model.fetched = true;
Core.$apply($scope);
next();
}
8 years ago
});
$scope.fetch();
8 years ago
}]);
})(Developer || (Developer = {}));
8 years ago
/// <reference path="../../includes.ts"/>
/// <reference path="../../kubernetes/ts/kubernetesHelpers.ts"/>
/// <reference path="../../kubernetes/ts/kubernetesModel.ts"/>
/// <reference path="../../configs/ts/configsDataService.ts"/>
/// <reference path="developerEnrichers.ts"/>
/// <reference path="developerHelpers.ts"/>
/// <reference path="dataManagerHelper.ts"/>
/// <reference path="dataManagerModel.ts"/>
/// <reference path="../../configs/ts/configsHelper.ts"/>
/// <reference path="../../configs/ts/customAlert.ts"/>
var Developer;
(function (Developer) {
Developer.WorkspacesController = Developer.controller("WorkspacesController", ["$scope", "KubernetesModel", "DataModel", "ConfigsModel", "KubernetesState", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL", "$element", "ngDialog",
function ($scope, KubernetesModel, DataModel, ConfigsModel, KubernetesState, $templateCache, $location, $routeParams, $http, $timeout, KubernetesApiURL, $element, ngDialog) {
$scope.model = DataModel;
$scope.replicasModel = KubernetesModel;
init($scope, $location, $routeParams);
$scope.options = DataModel.paramOptions;
$scope.pageSizeChoses = DataModel.paramOptions.pagerSizeOption;
var result = getDataType($location);
$scope.options.dataType = result["dataType"];
$scope.options.volumeType = result["volumeType"];
$scope.treeOptions = {
nodeChildren: "childNodes",
dirSelectable: true,
injectClasses: {
ul: "a1",
li: "a2",
liSelected: "a7",
iExpanded: "a3",
iCollapsed: "a4",
iLeaf: "a5",
label: "a6",
labelSelected: "a8"
}
};
//配置数据表格需要显示的内容及显示格式
8 years ago
$scope.tableConfig = {
data: 'model.data',
showSelectionCheckbox: true,
enableRowClickSelection: false,
multiSelect: true,
8 years ago
selectedItems: [],
filterOptions: {
filterText: $location.search()["q"] || ''
},
columnDefs: [
8 years ago
{
field: "_key",
displayName: '编码'
8 years ago
},
{
field: "name",
displayName: '市-区/县',
customSortField: function (field) {
return field.regionalismCode;
}
},
8 years ago
{
field: "systemName",
displayName: '系统名称',
customSortField: function (field) {
return field.systemCode;
}
},
8 years ago
{
field: "labels",
displayName: '数据标签',
cellTemplate: $templateCache.get("dataLabelsTemplate.html")
},
8 years ago
{
field: "year",
displayName: '年度',
},
8 years ago
{
field: "collectingTime",
displayName: '采集时间'
},
8 years ago
{
field: "extractStatus",
displayName: '汇总状态',
cellTemplate: $templateCache.get("dataExtractTemplate.html")
}
],
sortInfo: {
sortBy: "_key",
ascending: true
}
};
$scope.$on("dataLabelFilterUpdate", function ($event, text, key) {
$scope.keyQuery += " " + text;
8 years ago
});
$scope.selectBatchItem = function (item) {
$scope.navbarItems.forEach(function (nav) {
nav.class = "";
8 years ago
});
item.class = "active";
$scope.model.updateParamOption("keyQuery", $scope.keyQuery);
$scope.model.updateParamOption("dataBatch", item.alias);
8 years ago
};
$scope.isEmptyOrFirst = function () {
var idx = $scope.model.getParamOption("currentPageNum");
var length = $scope.options.getPageSizeNum();
return length <= 0 || idx <= 1;
};
$scope.isEmptyOrLast = function () {
var idx = $scope.model.getParamOption("currentPageNum");
var length = $scope.options.getPageSizeNum();
return length < 1 || idx >= length;
};
$scope.first = function () {
var idx = $scope.model.getParamOption("currentPageNum");
if (idx > 1) {
$scope.model.updateParamOption("currentPageNum", 1);
8 years ago
}
8 years ago
};
$scope.last = function () {
var idx = $scope.model.getParamOption("currentPageNum");
var length = $scope.options.getPageSizeNum();
if (idx < length)
$scope.model.updateParamOption("currentPageNum", length);
};
$scope.previous = function () {
var idx = $scope.model.getParamOption("currentPageNum");
var length = $scope.options.getPageSizeNum();
if (idx > 1)
$scope.model.updateParamOption("currentPageNum", idx - 1);
};
$scope.next = function () {
var length = $scope.options.getPageSizeNum();
var idx = $scope.model.getParamOption("currentPageNum");
if (idx < length) {
Kubernetes.eliminateChechBoxClick();
$scope.model.updateParamOption("currentPageNum", idx + 1);
8 years ago
}
};
$scope.$watch('options', function (newValue, oldValue) {
if (newValue) {
if (newValue.currentTableSize !== oldValue.currentTableSize)
$scope.options.priorTableSize = oldValue.currentTableSize;
else
$scope.options.priorTableSize = newValue.currentTableSize;
DataModel.updateModel();
8 years ago
}
}, true);
$scope.search = function () {
$scope.model.updateParamOption("keyQuery", $scope.keyQuery);
8 years ago
};
$scope.deletePrompt = function (selected) {
if (angular.isString(selected)) {
selected = [{
id: selected
}];
}
/*
判断数据是否已挂载使用和正在迁移
*/
var message = Kubernetes.checkForMigration($scope.replicasModel.replicationControllers, $scope.model.transferTasks, $scope.tableConfig.selectedItems);
if (message != "") {
Configs.customAlert("提示", "操作失败:" + message + ",不能删除!", '', null, 0, "error");
return;
}
UI.multiItemConfirmActionDialog({
collection: selected,
index: 'id',
onClose: function (result) {
var idColl = [];
if (result) {
angular.forEach(selected, function (select) {
idColl.push(select.id);
});
$http({
method: "POST",
url: "/java/console/api/delete/data",
params: { "data": idColl }
}).success(function (data, status, headers, config) {
//成功之后做一些事情
DataModel.updateModel();
}).error(function (data, status, headers, config) {
});
8 years ago
}
},
title: '是否需要删除采集数据?',
action: '以下采集数据文件将会被删除:',
okText: '删除',
okClass: 'btn-danger sj_btn_cir',
custom: "该删除操作将会彻底删除数据文件,是否删除,请确认!",
customClass: "alert alert-warning sj_alert-warning",
cancelText: "取消",
cancelClass: 'sj_btn_grey'
}).open();
};
$scope.migrationClick = {
items: null,
selectedItem: { "name": "当前没有可以迁移的集群" },
dialog: new UI.Dialog(),
onOk: function () {
var migrationClick = $scope.migrationClick;
/*
向后台发生数据迁移请求,$http:发生http异步请求第二个参数请求url;第三个参数请求操作类型第四个参数请求携带的数据第五个参数
一个回调函数请求响应后的回调函数
*/
if (Kubernetes.alreadyExitInFolder($scope.tableConfig.selectedItems, $scope.selectNode)) {
migrationClick.close();
Configs.customAlert("提示", "操作失败:" + "数据已在当前目录!", '', null, 0, "error");
return;
}
;
Configs.oracleInfoOperate($http, "/java/console/api/volume", Configs.OperateType.MOVE, {
"name": migrationClick.selectedItem.name,
"selectItems": $scope.tableConfig.selectedItems,
"selectNode": $scope.selectNode
}, function (result, status) {
if (status === 200) {
8 years ago
}
else
throw "资源请求失败";
8 years ago
});
/*
页面跳转
*/
$timeout(function () {
$location.path("/workspaces/Overview/task");
}, 250);
migrationClick.close();
},
open: function (selected) {
var migrationClick = $scope.migrationClick;
/*
判断数据是否已挂载使用和正在迁移
*/
var message = Kubernetes.checkForMigration($scope.replicasModel.replicationControllers, $scope.model.transferTasks, $scope.tableConfig.selectedItems);
if (message == "") {
if ($scope.volumes && $scope.volumes instanceof Array && $scope.volumes.length > 0)
migrationClick.selectedItem = $scope.volumes[0];
migrationClick.dialog.open();
}
else {
Configs.customAlert("提示", "操作失败:" + message + ", 不能迁移!", '', null, 0, "error");
}
},
close: function () {
$scope.migrationClick.selectedItem = { "name": "当前没有可以迁移的集群" };
$scope.migrationClick.dialog.close();
8 years ago
}
};
$scope.createOracleService = function (items) {
var exitedItems = Kubernetes.checkForCreateOracle($scope.model.transferTasks, items);
if (exitedItems.length == 0) {
angular.forEach(items, function (item) {
var isExited = Kubernetes.checkForExit($scope.replicasModel.replicationControllers, item);
if (!isExited) {
Kubernetes.createRC({
name: item._key,
labels: {
system: item.systemCode.toString(),
version: item.dataVersion.toString(),
region: item.regionalismCode.toString()
},
annotations: {
cityName: item.cityName,
districtName: item.districtName,
systemName: item.systemName,
id: item.id + "",
year: item.year
},
path: item.dataPath + "app/",
isTarget: "false",
isExtract: item.extractStatus
}, function (rc) {
Kubernetes.connectOracle($http, $timeout, "/java/console/api/connectOracle", "create", rc, 0);
});
8 years ago
}
});
$timeout(function () {
$location.path('/kubernetes/namespace/default/replicationControllers');
}, 200);
}
else {
var name = "";
angular.forEach(exitedItems, function (item) {
name += item.name + "-" + item.systemName + ",";
8 years ago
});
Configs.customAlert("提示", "操作失败: 正在迁移的数据不能被启动!", '', null, 0, "error");
8 years ago
}
8 years ago
};
function init($scope, $location, $routeParams) {
//$scope.model.updateModel();
$scope.keyQuery = "";
$scope.model.updateParamOption("keyQuery", $scope.keyQuery);
if (ConfigsModel.cluster != null)
$scope.volumes = ConfigsModel.cluster;
//创建二级菜单
$scope.subTabConfig = Developer.createCurrentSubNavBar($scope, $location, $routeParams);
$scope.navbarItems = [{
herf: "",
label: "全部",
title: "查看全部数据",
class: "active",
alias: null
8 years ago
},
{
herf: "",
label: "批次A",
title: "查看批次A的数据",
class: "",
alias: "A"
},
{
herf: "",
label: "批次B",
title: "查看批次B的数据",
class: "",
alias: "B"
}];
}
function getDataType($location) {
var path = $location.path();
var dataType;
var volumeType;
var subPath = path.split("/");
switch (subPath[subPath.length - 1]) {
case "financial":
dataType = "财政";
break;
case "social-security":
dataType = "社保";
break;
default:
dataType = null;
break;
}
;
switch (subPath[3]) {
case "hot":
volumeType = 0;
break;
default:
volumeType = 1;
}
return {
"dataType": dataType,
"volumeType": volumeType
};
}
8 years ago
}]);
})(Developer || (Developer = {}));
8 years ago
/// <reference path="../../includes.ts"/>
/// <reference path="kubernetesPlugin.ts"/>
var Kubernetes;
(function (Kubernetes) {
Kubernetes.Apps = Kubernetes.controller("Apps", ["$scope", "KubernetesModel", "KubernetesServices", "KubernetesReplicationControllers", "KubernetesPods", "KubernetesState", "KubernetesApiURL", "$templateCache", "$location", "$routeParams", "$http", "$dialog", "$timeout",
function ($scope, KubernetesModel, KubernetesServices, KubernetesReplicationControllers, KubernetesPods, KubernetesState, KubernetesApiURL, $templateCache, $location, $routeParams, $http, $dialog, $timeout) {
$scope.model = KubernetesModel;
$scope.apps = [];
$scope.allApps = [];
$scope.kubernetes = KubernetesState;
$scope.fetched = false;
$scope.json = '';
ControllerHelpers.bindModelToSearchParam($scope, $location, 'id', '_id', undefined);
ControllerHelpers.bindModelToSearchParam($scope, $location, 'appSelectorShow', 'openApp', undefined);
ControllerHelpers.bindModelToSearchParam($scope, $location, 'mode', 'mode', 'detail');
var branch = $scope.branch || "master";
var namespace = null;
function appMatches(app) {
var filterText = $scope.appSelector.filterText;
if (filterText) {
return Core.matchFilterIgnoreCase(app.groupId, filterText) ||
Core.matchFilterIgnoreCase(app.artifactId, filterText) ||
Core.matchFilterIgnoreCase(app.name, filterText) ||
Core.matchFilterIgnoreCase(app.description, filterText);
}
else {
return true;
}
}
function appRunning(app) {
return $scope.model.apps.any(function (running) { return running.appPath === app.appPath; });
}
$scope.tableConfig = {
data: 'model.apps',
showSelectionCheckbox: true,
enableRowClickSelection: false,
multiSelect: true,
selectedItems: [],
filterOptions: {
filterText: $location.search()["q"] || ''
},
8 years ago
columnDefs: [
{ field: '$name', displayName: 'App', cellTemplate: $templateCache.get(UrlHelpers.join(Kubernetes.templatePath, "appIconTemlate.html")) },
{ field: '$servicesText', displayName: 'Services', cellTemplate: $templateCache.get(UrlHelpers.join(Kubernetes.templatePath, "appServicesTemplate.html")) },
{ field: '$replicationControllersText', displayName: 'Controllers', cellTemplate: $templateCache.get(UrlHelpers.join(Kubernetes.templatePath, "appReplicationControllerTemplate.html")) },
{ field: '$podCount', displayName: 'Pods', cellTemplate: $templateCache.get(UrlHelpers.join(Kubernetes.templatePath, "appPodCountsAndLinkTemplate.html")) },
{ field: '$creationDate', displayName: 'Deployed', cellTemplate: $templateCache.get(UrlHelpers.join(Kubernetes.templatePath, "appDeployedTemplate.html")) }
]
};
Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
$scope.expandedPods = [];
$scope.$on('do-resize', function ($event, controller) {
$scope.resizeDialog.open(controller);
});
$scope.podExpanded = function (pod) {
var id = Kubernetes.getName(pod);
return id && ($scope.expandedPods || []).indexOf(id) >= 0;
};
$scope.expandPod = function (pod) {
var id = Kubernetes.getName(pod);
if (id) {
$scope.expandedPods.push(id);
}
};
$scope.collapsePod = function (pod) {
var id = Kubernetes.getName(pod);
if (id) {
_.remove($scope.expandedPods, function (v) { return id === v; });
}
};
$scope.$on('$routeUpdate', function ($event) {
Kubernetes.setJson($scope, $location.search()['_id'], $scope.model.apps);
});
function deleteApp(app, onCompleteFn) {
function deleteServices(services, service, onCompletedFn) {
if (!service || !services) {
return onCompletedFn();
}
8 years ago
var id = Kubernetes.getName(service);
if (!id) {
Kubernetes.log.warn("No ID for service " + angular.toJson(service));
}
8 years ago
else {
KubernetesServices.delete({
id: id
}, undefined, function () {
Kubernetes.log.debug("Deleted service: ", id);
deleteServices(services, services.shift(), onCompletedFn);
}, function (error) {
Kubernetes.log.debug("Error deleting service: ", error);
deleteServices(services, services.shift(), onCompletedFn);
});
}
8 years ago
}
function deleteReplicationControllers(replicationControllers, replicationController, onCompletedFn) {
if (!replicationController || !replicationControllers) {
return onCompletedFn();
}
8 years ago
var id = Kubernetes.getName(replicationController);
if (!id) {
Kubernetes.log.warn("No ID for replicationController " + angular.toJson(replicationController));
}
8 years ago
else {
KubernetesReplicationControllers.delete({
id: id
}, undefined, function () {
Kubernetes.log.debug("Deleted replicationController: ", id);
deleteReplicationControllers(replicationControllers, replicationControllers.shift(), onCompletedFn);
}, function (error) {
Kubernetes.log.debug("Error deleting replicationController: ", error);
deleteReplicationControllers(replicationControllers, replicationControllers.shift(), onCompletedFn);
});
8 years ago
}
8 years ago
}
function deletePods(pods, pod, onCompletedFn) {
if (!pod || !pods) {
return onCompletedFn();
8 years ago
}
8 years ago
var id = Kubernetes.getName(pod);
if (!id) {
Kubernetes.log.warn("No ID for pod " + angular.toJson(pod));
}
else {
KubernetesPods.delete({
id: id
}, undefined, function () {
Kubernetes.log.debug("Deleted pod: ", id);
deletePods(pods, pods.shift(), onCompletedFn);
}, function (error) {
Kubernetes.log.debug("Error deleting pod: ", error);
deletePods(pods, pods.shift(), onCompletedFn);
});
}
}
var services = [].concat(app.services);
deleteServices(services, services.shift(), function () {
var replicationControllers = [].concat(app.replicationControllers);
deleteReplicationControllers(replicationControllers, replicationControllers.shift(), function () {
var pods = [].concat(app.pods);
deletePods(pods, pods.shift(), onCompleteFn);
});
});
}
$scope.deleteSingleApp = function (app) {
$scope.deletePrompt([app]);
};
$scope.deletePrompt = function (selected) {
if (angular.isString(selected)) {
selected = [{
id: selected
}];
}
UI.multiItemConfirmActionDialog({
collection: selected,
index: '$name',
onClose: function (result) {
if (result) {
function deleteSelected(selected, next) {
if (next) {
var id = next.name;
Kubernetes.log.debug("deleting: ", id);
deleteApp(next, function () {
Kubernetes.log.debug("deleted: ", id);
deleteSelected(selected, selected.shift());
});
}
}
deleteSelected(selected, selected.shift());
}
8 years ago
},
title: 'Delete Apps?',
action: 'The following Apps will be deleted:',
okText: 'Delete',
okClass: 'btn-danger',
custom: "This operation is permanent once completed!",
customClass: "alert alert-warning"
}).open();
};
$scope.appSelector = {
filterText: "",
folders: [],
selectedApps: [],
isOpen: function (folder) {
if ($scope.appSelector.filterText !== '' || folder.expanded) {
return "opened";
}
8 years ago
return "closed";
},
8 years ago
getSelectedClass: function (app) {
if (app.abstract) {
return "abstract";
}
8 years ago
if (app.selected) {
return "selected";
8 years ago
}
8 years ago
return "";
8 years ago
},
8 years ago
showApp: function (app) {
return appMatches(app) && !appRunning(app);
},
8 years ago
showFolder: function (folder) {
return !$scope.appSelector.filterText || folder.apps.some(function (app) { return appMatches(app) && !appRunning(app); });
},
8 years ago
clearSelected: function () {
angular.forEach($scope.model.appFolders, function (folder) {
angular.forEach(folder.apps, function (app) {
app.selected = false;
});
});
$scope.appSelector.selectedApps = [];
Core.$apply($scope);
8 years ago
},
8 years ago
updateSelected: function () {
// lets update the selected apps
var selectedApps = [];
angular.forEach($scope.model.appFolders, function (folder) {
var apps = folder.apps.filter(function (app) { return app.selected; });
if (apps) {
selectedApps = selectedApps.concat(apps);
8 years ago
}
8 years ago
});
$scope.appSelector.selectedApps = _.sortBy(selectedApps, "name");
8 years ago
},
8 years ago
select: function (app, flag) {
app.selected = flag;
$scope.appSelector.updateSelected();
8 years ago
},
8 years ago
hasSelection: function () {
return $scope.model.appFolders.any(function (folder) { return folder.apps.any(function (app) { return app.selected; }); });
},
8 years ago
runSelectedApps: function () {
// lets run all the selected apps
angular.forEach($scope.appSelector.selectedApps, function (app) {
var name = app.name;
var metadataPath = app.metadataPath;
if (metadataPath) {
// lets load the json/yaml
//var url = gitPathToUrl(Wiki.gitRelativeURL(branch, metadataPath));
var url = Kubernetes.gitPathToUrl(metadataPath, branch);
if (url) {
$http.get(url).
success(function (data, status, headers, config) {
if (data) {
// lets convert the json object structure into a string
var json = angular.toJson(data);
var fn = function () { };
Kubernetes.runApp($location, $scope, $http, KubernetesApiURL, json, name, fn, namespace);
}
}).
error(function (data, status, headers, config) {
$scope.summaryHtml = null;
Kubernetes.log.warn("Failed to load " + url + " " + data + " " + status);
});
}
8 years ago
}
8 years ago
});
// lets go back to the apps view
$scope.appSelector.clearSelected();
$scope.appSelectorShow = false;
}
};
}]);
})(Kubernetes || (Kubernetes = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="kubernetesHelpers.ts"/>
/// <reference path="kubernetesPlugin.ts"/>
var Kubernetes;
(function (Kubernetes) {
Kubernetes._module.directive("hawtioBreadcrumbs", ['HawtioBreadcrumbs', function (HawtioBreadcrumbs) {
return {
/*
templateUrl: Kubernetes.templatePath + 'breadcrumbs.html'
*/
link: function (scope, element, attrs) {
HawtioBreadcrumbs.apply(scope.$eval('breadcrumbConfig'));
}
};
}]);
})(Kubernetes || (Kubernetes = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="kubernetesHelpers.ts"/>
/// <reference path="kubernetesPlugin.ts"/>
var Kubernetes;
(function (Kubernetes) {
Kubernetes.BuildController = Kubernetes.controller("BuildController", ["$scope", "KubernetesModel", "KubernetesState", "KubernetesSchema", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL",
function ($scope, KubernetesModel, KubernetesState, KubernetesSchema, $templateCache, $location, $routeParams, $http, $timeout, KubernetesApiURL) {
$scope.kubernetes = KubernetesState;
$scope.model = KubernetesModel;
$scope.id = $routeParams["id"];
$scope.schema = KubernetesSchema;
$scope.config = KubernetesSchema.definitions.os_build_Build;
Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
$scope.breadcrumbConfig = Developer.createProjectBreadcrumbs($scope.id);
$scope.subTabConfig = Developer.createProjectSubNavBars($scope.id, null, $scope);
$scope.$on('kubernetesModelUpdated', function () {
updateData();
});
$scope.$on('$routeUpdate', function ($event) {
updateData();
});
updateData();
function updateData() {
$scope.item = null;
if ($scope.id) {
var url = Kubernetes.buildRestUrl($scope.id);
$http.get(url).
success(function (data, status, headers, config) {
if (data) {
$scope.entity = Kubernetes.enrichBuild(data);
}
$scope.fetched = true;
Core.$apply($scope);
}).
error(function (data, status, headers, config) {
Kubernetes.log.warn("Failed to load " + url + " " + data + " " + status);
});
}
else {
$scope.fetched = true;
Core.$apply($scope);
}
}
}]);
})(Kubernetes || (Kubernetes = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="kubernetesHelpers.ts"/>
/// <reference path="kubernetesPlugin.ts"/>
var Kubernetes;
(function (Kubernetes) {
Kubernetes.BuildConfigController = Kubernetes.controller("BuildConfigController", ["$scope", "KubernetesModel", "KubernetesState", "KubernetesSchema", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL",
function ($scope, KubernetesModel, KubernetesState, KubernetesSchema, $templateCache, $location, $routeParams, $http, $timeout, KubernetesApiURL) {
$scope.kubernetes = KubernetesState;
$scope.model = KubernetesModel;
$scope.id = $routeParams["id"];
$scope.schema = KubernetesSchema;
$scope.config = KubernetesSchema.definitions.os_build_BuildConfig;
Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
$scope.breadcrumbConfig = Developer.createProjectBreadcrumbs($scope.id);
$scope.subTabConfig = Developer.createProjectSubNavBars($scope.id);
$scope.$on('kubernetesModelUpdated', function () {
updateData();
});
$scope.$on('$routeUpdate', function ($event) {
updateData();
});
updateData();
function updateData() {
$scope.item = null;
if ($scope.id) {
var url = Kubernetes.buildConfigRestUrl($scope.id);
$http.get(url).
success(function (data, status, headers, config) {
if (data) {
$scope.entity = data;
var sortedBuilds = null;
Kubernetes.enrichBuildConfig(data, sortedBuilds);
$scope.model.setProject($scope.entity);
}
$scope.fetched = true;
Core.$apply($scope);
}).
error(function (data, status, headers, config) {
Kubernetes.log.warn("Failed to load " + url + " " + data + " " + status);
});
}
else {
$scope.fetched = true;
Core.$apply($scope);
}
}
}]);
})(Kubernetes || (Kubernetes = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="kubernetesHelpers.ts"/>
/// <reference path="kubernetesPlugin.ts"/>
var Kubernetes;
(function (Kubernetes) {
Kubernetes.BuildConfigEditController = Kubernetes._module.controller("Kubernetes.BuildConfigEditController", ["$scope", "$element", "KubernetesModel", "KubernetesState", "KubernetesSchema", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL", "K8SClientFactory", "SchemaRegistry", function ($scope, $element, KubernetesModel, KubernetesState, KubernetesSchema, $templateCache, $location, $routeParams, $http, $timeout, KubernetesApiURL, K8SClientFactory, SchemaRegistry) {
$scope.kubernetes = KubernetesState;
$scope.model = KubernetesModel;
$scope.id = $routeParams["project"] || $routeParams["id"];
$scope.schema = KubernetesSchema;
var mode = $scope.$eval('mode') || 'edit';
Kubernetes.log.debug("Mode: ", mode);
var specConfig = SchemaRegistry.getSchema('io.fabric8.openshift.api.model.BuildConfigSpec');
var gitBuildSource = SchemaRegistry.getSchema('io.fabric8.openshift.api.model.GitBuildSource');
var buildSource = SchemaRegistry.getSchema('io.fabric8.openshift.api.model.BuildSource');
var buildOutput = SchemaRegistry.getSchema('io.fabric8.openshift.api.model.BuildOutput');
var resources = SchemaRegistry.getSchema('io.fabric8.kubernetes.api.model.ResourceRequirements');
var revision = SchemaRegistry.getSchema('io.fabric8.openshift.api.model.SourceRevision');
var strategy = SchemaRegistry.getSchema('io.fabric8.openshift.api.model.BuildStrategy');
var customStrategy = SchemaRegistry.getSchema('io.fabric8.openshift.api.model.CustomBuildStrategy');
var buildTriggerPolicy = SchemaRegistry.getSchema('io.fabric8.openshift.api.model.BuildTriggerPolicy');
var getSecrets = function () {
return $scope.secrets;
};
var secretSchemaType = "fabric8_SecretReference";
var secretSchemaRef = "#/definitions/" + secretSchemaType;
var secretSchemaJavaType = "io.fabric8.console.SecretReference";
var secretNameElement = {
"type": "string",
"enum": getSecrets,
required: true
};
var secretSchema = {
"type": "object",
properties: {
"name": secretNameElement
},
8 years ago
javaType: secretSchemaJavaType
};
SchemaRegistry.addSchema(secretSchemaType, secretSchema);
// lets switch to the new secrets types:
var sourceSecretProperty = Core.pathGet(buildSource, ["properties", "sourceSecret"]);
angular.forEach([
Core.pathGet(customStrategy, ["properties", "pullSecret"]),
sourceSecretProperty,
], function (schemaType) {
if (schemaType) {
schemaType["type"] = secretSchemaType;
schemaType["$ref"] = secretSchemaRef;
schemaType["javaType"] = secretSchemaJavaType;
}
});
// lets try make the buildSource's sourceSecret mandatory
//schemaSetRequired(customStrategy, 'pullSecret');
Kubernetes.schemaSetRequired(buildSource, 'sourceSecret');
if (sourceSecretProperty) {
Core.pathSet(sourceSecretProperty, ['properties', 'required'], true);
Core.pathSet(sourceSecretProperty, ['properties', 'input-attributes', 'required'], true);
}
$scope.customStrategy = customStrategy;
$scope.buildSource = buildSource;
$scope.secrets = [];
// $scope.config = KubernetesSchema.definitions.os_build_BuildConfig;
//$scope.specConfig = KubernetesSchema.definitions.os_build_BuildConfigSpec;
//
specConfig.style = HawtioForms.FormStyle.STANDARD;
specConfig.properties['triggers']['label-attributes'] = {
style: 'display: none;'
};
gitBuildSource.controls = ['uri', 'ref', '*'];
buildSource.properties['type'].type = 'hidden';
buildSource.properties['type']['default'] = 'Git';
buildSource.controls = ['git', 'contextDir', 'sourceSecret', '*'];
gitBuildSource['hideLegend'] = true;
buildSource['hideLegend'] = true;
buildOutput['hideLegend'] = true;
resources['hideLegend'] = true;
revision['hideLegend'] = true;
strategy['hideLegend'] = true;
strategy.controls = ['type', '*'];
strategy.properties['type'] = {
type: 'text',
enum: [{
'value': 'Custom',
'label': 'Custom'
}, {
'value': 'Docker',
'label': 'Docker'
}, {
'value': 'Source',
'label': 'Source'
}]
};
customStrategy['control-group-attributes'] = {
'ng-show': "entity.type == 'Custom'"
};
strategy.properties['dockerStrategy']['control-group-attributes'] = {
'ng-show': "entity.type == 'Docker'"
};
strategy.properties['sourceStrategy']['control-group-attributes'] = {
'ng-show': "entity.type == 'Source'"
};
buildTriggerPolicy.controls = ['type', '*'];
buildTriggerPolicy.properties['type'] = {
type: 'string',
enum: [{
'value': 'Github',
'label': 'Github'
}, {
'value': 'ImageChange',
'label': 'Image Change'
}, {
'value': 'Generic',
'label': 'Generic'
}]
};
buildTriggerPolicy.properties['generic']['control-group-attributes'] = {
'ng-show': "entity.type == 'Generic'"
};
buildTriggerPolicy.properties['github']['control-group-attributes'] = {
'ng-show': "entity.type == 'Github'"
};
buildTriggerPolicy.properties['imageChange']['control-group-attributes'] = {
'ng-show': "entity.type == 'ImageChange'"
};
// re-arranging the controls
//specConfig.controls = ['source', '*'];
// tabs
specConfig.tabs = {
"Source": ["source"],
"Revision": ["revision"],
"Output": ["output"],
"Resources": ["resources"],
"Strategy": ["strategy"],
"Triggers": ["triggers"],
"Service Account": ["serviceAccount"]
};
/*
* wizard, needs an 'onFinish' function in the scope
specConfig.wizard = <any>{
pages: {
Source: {
controls: ["source"]
},
8 years ago
Revision: {
controls: ["revision"]
8 years ago
},
8 years ago
Output: {
controls: ["output"]
8 years ago
},
8 years ago
Resources: {
controls: ["resources"]
8 years ago
},
8 years ago
Strategy: {
controls: ["strategy"]
8 years ago
},
8 years ago
Triggers: {
controls: ["triggers"]
8 years ago
},
8 years ago
"Service Account": {
controls: ["serviceAccount"]
}
}
};
*/
$scope.entity = {
"apiVersion": "v1",
"kind": "BuildConfig",
"metadata": {
"name": "",
"labels": {}
},
8 years ago
"spec": {
"source": {
"type": "Git"
},
8 years ago
"strategy": {
"type": "Custom",
"customStrategy": {
"from": {
"kind": "DockerImage",
"name": "fabric8/openshift-s2i-jenkins-trigger"
},
"env": [
{
"name": "BASE_URI",
"value": jenkinsUrl
},
{
"name": "JOB_NAME",
"value": jobName
}
]
}
8 years ago
}
}
};
$scope.$watch('entity.spec.source.git.uri', function (val) {
if (!val) {
return;
}
var lastBit = val.match(/[^\/]+$/)[0];
if (lastBit) {
var name = lastBit.replace(/\.git$/, '');
Kubernetes.log.debug("name: ", name);
if (!Core.isBlank(name)
&& Core.isBlank(Core.pathGet($scope.entity, ['metadata', 'name']))) {
Core.pathSet($scope.entity, ['metadata', 'name'], name);
}
}
});
Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
$scope.breadcrumbConfig = Developer.createProjectSettingsBreadcrumbs($scope.projectId);
$scope.subTabConfig = Developer.createProjectSubNavBars($scope.projectId);
$scope.tabs = Developer.createProjectSettingsSubNavBars($scope.projectId);
Kubernetes.watch($scope, $element, "secrets", $scope.namespace, onSecrets);
$scope.buildConfigClient = K8SClientFactory.create("buildconfigs", $scope.namespace);
$element.on('$destroy', function () {
$scope.$destroy();
});
$scope.$on('$destroy', function () {
K8SClientFactory.destroy($scope.buildConfigClient);
});
/*
$scope.$on('kubernetesModelUpdated', function () {
updateData();
});
*/
$scope.$on('$routeUpdate', function ($event) {
updateData();
});
$scope.save = function () {
Kubernetes.log.info("Saving!");
var entity = $scope.entity;
var spec = (entity || {}).spec || {};
// TODO update the jenkins job name!
// lets delete lots of cruft
var strategy = spec.strategy || {};
delete strategy["dockerStrategy"];
delete strategy["sourceStrategy"];
delete spec["revision"];
delete spec["output"];
delete spec["resources"];
var strategyPullSecretName = Core.pathGet(spec, ["strategy", "customStrategy", "pullSecret", "name"]);
var sourceSecretName = Core.pathGet(spec, ["source", "sourceSecret", "name"]);
Kubernetes.log.info("sourceSecretName: " + sourceSecretName);
Kubernetes.log.info("strategyPullSecretName: " + strategyPullSecretName);
if (!strategyPullSecretName && sourceSecretName) {
Core.pathSet(spec, ["strategy", "customStrategy", "pullSecret", "name"], sourceSecretName);
}
/*
// TODO hack until the put deals with updates
var metadata = entity.metadata;
if (metadata) {
delete metadata["resourceVersion"];
}
*/
Kubernetes.log.info(angular.toJson(entity, true));
$scope.buildConfigClient.put(entity, function (obj) {
Kubernetes.log.info("build config created!");
var link = Developer.projectSecretsLink($scope.namespace, Kubernetes.getName(entity));
if (link) {
Kubernetes.log.info("Navigating to: " + link);
$location.path(link);
}
else {
Kubernetes.log.warn("Could not find the edit pipeline link!");
}
});
};
updateData();
var jenkinsUrl = Developer.jenkinsLink();
var jobName = "";
function updateData() {
$scope.item = null;
if ($scope.id) {
var url = Kubernetes.buildConfigRestUrl($scope.id);
$http.get(url).
success(function (data, status, headers, config) {
if (data) {
$scope.entity = data;
var buildConfig = angular.copy(data);
var sortedBuilds = null;
Kubernetes.enrichBuildConfig(buildConfig, sortedBuilds);
$scope.buildConfig = buildConfig;
}
8 years ago
$scope.spec = ($scope.entity || {}).spec || {};
$scope.fetched = true;
// lets update the tabs
$scope.subTabConfig = Developer.createProjectSubNavBars($scope.projectId, null, $scope);
Core.$apply($scope);
}).
error(function (data, status, headers, config) {
Kubernetes.log.warn("Failed to load " + url + " " + data + " " + status);
});
}
else {
$scope.fetched = true;
$scope.spec = $scope.entity.spec;
Core.$apply($scope);
}
}
function onSecrets(secrets) {
var array = [];
angular.forEach(secrets, function (secret) {
var name = Kubernetes.getName(secret);
if (name) {
array.push({
label: name,
value: name,
"attributes": {
"title": name
},
$secret: secret
});
}
});
$scope.secrets = _.sortBy(array, "label");
var specSourceSecretNamePath = ['spec', 'source', 'sourceSecret', 'name'];
if ($scope.entity && !Core.pathGet($scope.entity, specSourceSecretNamePath)) {
var defaultSecretName = findDefaultImportSecretName(secrets);
Core.pathSet($scope.entity, specSourceSecretNamePath, defaultSecretName);
}
}
function findDefaultImportSecretName(secrets) {
var answer = null;
angular.forEach(secrets, function (secret) {
var name = Kubernetes.getName(secret);
if (!answer && name && name.startsWith("jenkins-login")) {
answer = name;
}
});
if (!answer) {
angular.forEach(secrets, function (secret) {
var name = Kubernetes.getName(secret);
if (!answer && name && name.startsWith("jenkins-token")) {
answer = name;
}
8 years ago
});
}
return answer;
}
switch (mode) {
case 'create':
delete specConfig.tabs;
_.forIn(buildSource.properties, function (property, name) {
if (name !== 'git') {
Kubernetes.log.info("Hiding property: ", name);
property.hidden = true;
}
8 years ago
});
_.forIn(gitBuildSource.properties, function (property, name) {
if (name !== 'uri') {
Kubernetes.log.info("Hiding property: ", name);
property.hidden = true;
}
8 years ago
else {
property.label = "Git URL";
property['input-attributes'] = {
'required': true
};
}
});
_.forIn(specConfig.properties, function (property, name) {
if (name !== 'source') {
Kubernetes.log.info("Hiding property: ", name);
property.hidden = true;
}
8 years ago
});
break;
case 'edit':
default:
}
$scope.specConfig = specConfig;
}]);
})(Kubernetes || (Kubernetes = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="kubernetesPlugin.ts"/>
var Kubernetes;
(function (Kubernetes) {
Kubernetes.BuildConfigsController = Kubernetes.controller("BuildConfigsController", ["$scope", "KubernetesModel", "KubernetesState", "$dialog", "$window", "$templateCache", "$routeParams", "$location", "localStorage", "$http", "$timeout", "KubernetesApiURL",
function ($scope, KubernetesModel, KubernetesState, $dialog, $window, $templateCache, $routeParams, $location, localStorage, $http, $timeout, KubernetesApiURL) {
$scope.kubernetes = KubernetesState;
$scope.model = KubernetesModel;
$scope.tableConfig = {
data: 'model.buildconfigs',
showSelectionCheckbox: true,
enableRowClickSelection: false,
multiSelect: true,
selectedItems: [],
filterOptions: {
filterText: $location.search()["q"] || ''
},
8 years ago
columnDefs: [
{
field: 'metadata.name',
displayName: 'Name',
cellTemplate: $templateCache.get("buildConfigLinkTemplate.html")
},
8 years ago
/*
{
field: 'spec.source.type',
displayName: 'Source'
},
*/
{
field: 'spec.source.git.uri',
displayName: 'Repository'
},
8 years ago
/*
{
field: 'spec.strategy.type',
displayName: 'Strategy'
},
{
field: 'spec.strategy.stiStrategy.image',
displayName: 'Source Image'
},
{
field: 'spec.output.imageTag',
displayName: 'Output Image'
},
*/
{
field: '$fabric8CodeViews',
displayName: 'Code',
width: "***",
minWidth: 500,
cellTemplate: $templateCache.get("buildConfigCodeViewsTemplate.html")
8 years ago
},
8 years ago
{
field: '$fabric8BuildViews',
displayName: 'Builds',
width: "***",
minWidth: 500,
cellTemplate: $templateCache.get("buildConfigBuildViewsTemplate.html")
8 years ago
},
8 years ago
{
field: '$fabric8EnvironmentViews',
displayName: 'Environments',
width: "***",
minWidth: 500,
cellTemplate: $templateCache.get("buildConfigEnvironmentViewsTemplate.html")
},
8 years ago
{
field: '$fabric8TeamViews',
displayName: 'People',
width: "***",
minWidth: 500,
cellTemplate: $templateCache.get("buildConfigTeamViewsTemplate.html")
}
]
};
Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
// TODO
// $scope.isLoggedIntoGogs = Forge.isLoggedIntoGogs;
$scope.deletePrompt = function (selected) {
UI.multiItemConfirmActionDialog({
collection: selected,
index: '$name',
onClose: function (result) {
if (result) {
function deleteSelected(selected, next) {
if (next) {
deleteEntity(next, function () {
deleteSelected(selected, selected.shift());
});
}
else {
updateData();
}
}
deleteSelected(selected, selected.shift());
}
8 years ago
},
8 years ago
title: 'Delete Build Configs?',
action: 'The following Build Configs will be deleted:',
okText: 'Delete',
okClass: 'btn-danger',
custom: "This operation is permanent once completed!",
customClass: "alert alert-warning"
}).open();
};
function deleteEntity(selection, nextCallback) {
var name = (selection || {}).$name;
if (name) {
console.log("About to delete build config: " + name);
var url = Kubernetes.buildConfigRestUrl(name);
$http.delete(url).
success(function (data, status, headers, config) {
nextCallback();
}).
error(function (data, status, headers, config) {
Kubernetes.log.warn("Failed to delete build config on " + url + " " + data + " " + status);
});
}
else {
console.log("warning: no name for selection: " + angular.toJson(selection));
}
}
function updateData() {
}
updateData();
}]);
})(Kubernetes || (Kubernetes = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="kubernetesHelpers.ts"/>
/// <reference path="kubernetesPlugin.ts"/>
var Kubernetes;
(function (Kubernetes) {
Kubernetes.BuildLogsController = Kubernetes.controller("BuildLogsController", ["$scope", "KubernetesModel", "KubernetesState", "KubernetesSchema", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL",
function ($scope, KubernetesModel, KubernetesState, KubernetesSchema, $templateCache, $location, $routeParams, $http, $timeout, KubernetesApiURL) {
$scope.kubernetes = KubernetesState;
$scope.model = KubernetesModel;
$scope.id = $routeParams["id"];
$scope.schema = KubernetesSchema;
$scope.config = KubernetesSchema.definitions.os_build_Build;
Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
$scope.$on('kubernetesModelUpdated', function () {
updateData();
});
$scope.$on('$routeUpdate', function ($event) {
updateData();
});
$scope.logsText = "Loading logs...";
updateData();
function updateData() {
$scope.item = null;
if ($scope.id) {
var url = Kubernetes.buildRestUrl($scope.id);
$http.get(url).
success(function (data, status, headers, config) {
if (data) {
$scope.entity = Kubernetes.enrichBuild(data);
}
8 years ago
$scope.fetched = true;
Core.$apply($scope);
}).
error(function (data, status, headers, config) {
Kubernetes.log.warn("Failed to load " + url + " " + data + " " + status);
});
url = Kubernetes.buildLogsRestUrl($scope.id);
$http.get(url).
success(function (data, status) {
$scope.logsText = data;
Core.$apply($scope);
}).
error(function (data, status) {
$scope.logsText = "Failed to load logs from: " + url + " " + data + " status: " + status;
Core.$apply($scope);
}).
catch(function (error) {
$scope.logsText = "Failed to load logs: " + angular.toJson(error, true);
Core.$apply($scope);
});
}
else {
$scope.fetched = true;
Core.$apply($scope);
}
}
}]);
})(Kubernetes || (Kubernetes = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="kubernetesPlugin.ts"/>
var Kubernetes;
(function (Kubernetes) {
Kubernetes.BuildsController = Kubernetes.controller("BuildsController", ["$scope", "KubernetesModel", "KubernetesState", "$dialog", "$window", "$templateCache", "$routeParams", "$location", "localStorage", "$http", "$timeout", "KubernetesApiURL",
function ($scope, KubernetesModel, KubernetesState, $dialog, $window, $templateCache, $routeParams, $location, localStorage, $http, $timeout, KubernetesApiURL) {
$scope.kubernetes = KubernetesState;
$scope.model = KubernetesModel;
$scope.buildConfigId = $routeParams["id"];
$scope.$on('kubernetesModelUpdated', function () {
Core.$apply($scope);
});
$scope.tableConfig = {
data: 'model.builds',
showSelectionCheckbox: true,
enableRowClickSelection: false,
multiSelect: true,
selectedItems: [],
filterOptions: {
filterText: $location.search()["q"] || ''
8 years ago
},
8 years ago
columnDefs: [
{
field: 'metadata.name',
displayName: 'Name',
cellTemplate: $templateCache.get("buildLinkTemplate.html")
8 years ago
},
8 years ago
{
field: '$creationDate',
displayName: 'Time',
defaultSort: true,
cellTemplate: $templateCache.get("buildTimeTemplate.html")
8 years ago
},
8 years ago
{
field: 'status',
displayName: 'Status',
cellTemplate: $templateCache.get("buildStatusTemplate.html")
},
8 years ago
{
field: '$logsLink',
displayName: 'Logs',
cellTemplate: $templateCache.get("buildLogsTemplate.html")
},
8 years ago
{
field: '$podLink',
displayName: 'Build Pod',
cellTemplate: $templateCache.get("buildPodTemplate.html")
},
8 years ago
/*
{
field: 'parameters.source.type',
displayName: 'Source'
},
*/
{
field: 'spec.source.git.uri',
displayName: 'Repository',
cellTemplate: $templateCache.get("buildRepositoryTemplate.html")
8 years ago
},
8 years ago
{
field: 'spec.strategy.type',
displayName: 'Strategy'
8 years ago
},
8 years ago
{
field: 'spec.strategy.sourceStrategy.from.name',
displayName: 'Source Image'
},
8 years ago
{
field: 'spec.output.to.name',
displayName: 'Output Image'
}]
};
Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
$scope.breadcrumbConfig = Developer.createProjectBreadcrumbs($scope.buildConfigId);
$scope.subTabConfig = Developer.createProjectSubNavBars($scope.buildConfigId, null, $scope);
$scope.$on('kubernetesModelUpdated', function () {
updateData();
});
function updateData() {
if ($scope.model) {
var builds = $scope.model.builds;
var buildConfigId = $scope.buildConfigId;
Kubernetes.enrichBuilds(builds);
$scope.fetched = true;
if (buildConfigId) {
$scope.buildConfig = $scope.model.getBuildConfig(buildConfigId);
8 years ago
}
8 years ago
}
}
updateData();
/*
$scope.$keepPolling = () => keepPollingModel;
$scope.fetch = PollHelpers.setupPolling($scope, (next:() => void) => {
var url = buildsRestURL();
$http.get(url).
success(function (data, status, headers, config) {
if (data) {
//console.log("got data " + angular.toJson(data, true));
$scope.builds = enrichBuilds(data.items);
$scope.fetched = true;
if ($scope.model) {
$scope.buildConfig = $scope.model.getBuildConfig($scope.buildConfigId);
}
8 years ago
}
Core.$apply($scope);
next();
}).
error(function (data, status, headers, config) {
log.warn("Failed to load " + url + " " + data + " " + status);
Core.$apply($scope);
next();
});
});
$scope.fetch();
*/
}]);
})(Kubernetes || (Kubernetes = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="kubernetesHelpers.ts"/>
/// <reference path="kubernetesPlugin.ts"/>
var Kubernetes;
(function (Kubernetes) {
// controller for connecting to a remote container via jolokia
Kubernetes.ConnectController = Kubernetes.controller("ConnectController", [
"$scope", "localStorage", "userDetails", "ConnectDialogService", "$browser",
function ($scope, localStorage, userDetails, ConnectDialogService, $browser) {
$scope.doConnect = function (entity) {
var connectUrl = new URI().path(UrlHelpers.join(HawtioCore.documentBase(), '/java/index.html'));
var returnTo = new URI().toString();
var title = entity.metadata.name || 'Untitled Container';
var token = userDetails.token || '';
connectUrl.hash(token).query({
jolokiaUrl: entity.$jolokiaUrl,
title: title,
returnTo: returnTo
});
Kubernetes.log.debug("Connect URI: ", connectUrl.toString());
window.open(connectUrl.toString());
};
}]);
})(Kubernetes || (Kubernetes = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="kubernetesHelpers.ts"/>
/// <reference path="kubernetesPlugin.ts"/>
var Kubernetes;
(function (Kubernetes) {
Kubernetes.DeploymentConfigController = Kubernetes.controller("DeploymentConfigController", ["$scope", "KubernetesModel", "KubernetesState", "KubernetesSchema", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL",
function ($scope, KubernetesModel, KubernetesState, KubernetesSchema, $templateCache, $location, $routeParams, $http, $timeout, KubernetesApiURL) {
$scope.kubernetes = KubernetesState;
$scope.model = KubernetesModel;
$scope.id = $routeParams["id"];
$scope.schema = KubernetesSchema;
$scope.config = KubernetesSchema.definitions.os_deploy_DeploymentConfig;
Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
$scope.$on('kubernetesModelUpdated', function () {
updateData();
});
$scope.$on('$routeUpdate', function ($event) {
updateData();
});
updateData();
function updateData() {
$scope.item = null;
if ($scope.id) {
var url = Kubernetes.deploymentConfigRestUrl($scope.id);
$http.get(url).
success(function (data, status, headers, config) {
if (data) {
$scope.entity = data;
Kubernetes.enrichDeploymentConfig(data);
}
8 years ago
$scope.fetched = true;
Core.$apply($scope);
}).
error(function (data, status, headers, config) {
Kubernetes.log.warn("Failed to load " + url + " " + data + " " + status);
});
}
else {
$scope.fetched = true;
Core.$apply($scope);
}
}
}]);
})(Kubernetes || (Kubernetes = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="kubernetesPlugin.ts"/>
var Kubernetes;
(function (Kubernetes) {
Kubernetes.DeploymentConfigsController = Kubernetes.controller("DeploymentConfigsController", ["$scope", "KubernetesModel", "KubernetesState", "$dialog", "$window", "$templateCache", "$routeParams", "$location", "localStorage", "$http", "$timeout", "KubernetesApiURL",
function ($scope, KubernetesModel, KubernetesState, $dialog, $window, $templateCache, $routeParams, $location, localStorage, $http, $timeout, KubernetesApiURL) {
$scope.kubernetes = KubernetesState;
$scope.model = KubernetesModel;
$scope.$on('kubernetesModelUpdated', function () {
Core.$apply($scope);
});
$scope.labelClass = Kubernetes.containerLabelClass;
$scope.tableConfig = {
data: 'deploymentConfigs',
showSelectionCheckbox: true,
enableRowClickSelection: false,
multiSelect: true,
selectedItems: [],
filterOptions: {
filterText: $location.search()["q"] || ''
},
8 years ago
columnDefs: [
{
field: 'metadata.name',
displayName: 'Name',
cellTemplate: $templateCache.get("deploymentConfigLinkTemplate.html")
},
8 years ago
{
field: 'metadata.namespace',
displayName: 'Namespace'
},
8 years ago
{
field: '$imageChangeParams.automatic',
displayName: 'Automatic'
},
8 years ago
{
field: '$imageChangeParams.$containerNames',
displayName: 'Container Names'
},
8 years ago
{
field: '$imageChangeParams.from.name',
displayName: 'From image'
},
8 years ago
{
field: '$imageChangeParams.tag',
displayName: 'Tag'
},
8 years ago
{
field: 'template.controllerTemplate.podTemplate.tags',
displayName: 'Labels',
cellTemplate: $templateCache.get("deploymentConfigLabelTemplate.html")
8 years ago
}
]
8 years ago
};
Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
$scope.deletePrompt = function (selected) {
UI.multiItemConfirmActionDialog({
collection: selected,
index: '$name',
onClose: function (result) {
if (result) {
function deleteSelected(selected, next) {
if (next) {
deleteEntity(next, function () {
deleteSelected(selected, selected.shift());
});
}
else {
updateData();
}
}
deleteSelected(selected, selected.shift());
8 years ago
}
},
8 years ago
title: 'Delete Deployment?',
action: 'The following Deployments will be deleted:',
okText: 'Delete',
okClass: 'btn-danger',
custom: "This operation is permanent once completed!",
customClass: "alert alert-warning"
}).open();
};
function deleteEntity(selection, nextCallback) {
var name = (selection || {}).$name;
if (name) {
console.log("About to delete deployment config: " + name);
var url = Kubernetes.deploymentConfigRestUrl(name);
$http.delete(url).
success(function (data, status, headers, config) {
nextCallback();
}).
error(function (data, status, headers, config) {
Kubernetes.log.warn("Failed to delete deployment config on " + url + " " + data + " " + status);
});
}
else {
console.log("warning: no name for selection: " + angular.toJson(selection));
}
}
function updateData() {
var url = Kubernetes.deploymentConfigsRestURL();
$http.get(url).
success(function (data, status, headers, config) {
if (data) {
//console.log("got data " + angular.toJson(data, true));
$scope.deploymentConfigs = Kubernetes.enrichDeploymentConfigs(data.items);
$scope.fetched = true;
Core.$apply($scope);
8 years ago
}
8 years ago
}).
error(function (data, status, headers, config) {
Kubernetes.log.warn("Failed to load " + url + " " + data + " " + status);
});
}
updateData();
}]);
})(Kubernetes || (Kubernetes = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="kubernetesHelpers.ts"/>
/// <reference path="kubernetesPlugin.ts"/>
var Kubernetes;
(function (Kubernetes) {
Kubernetes.EventsController = Kubernetes.controller("EventsController", ["$scope", "KubernetesModel", "KubernetesServices", "KubernetesPods", "KubernetesState", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL",
function ($scope, KubernetesModel, KubernetesServices, KubernetesPods, KubernetesState, $templateCache, $location, $routeParams, $http, $timeout, KubernetesApiURL) {
$scope.kubernetes = KubernetesState;
$scope.model = KubernetesModel;
ControllerHelpers.bindModelToSearchParam($scope, $location, 'mode', 'mode', 'list');
$scope.tableConfig = {
data: 'model.events',
showSelectionCheckbox: true,
enableRowClickSelection: false,
multiSelect: true,
selectedItems: [],
filterOptions: {
filterText: $location.search()["q"] || ''
8 years ago
},
8 years ago
columnDefs: [
{ field: '$firstTimestamp',
displayName: 'First Seen',
cellTemplate: $templateCache.get("firstTimestampTemplate.html")
},
8 years ago
{ field: '$lastTimestamp',
displayName: 'Last Seen',
cellTemplate: $templateCache.get("lastTimestampTemplate.html")
},
8 years ago
{ field: 'count',
displayName: 'Count'
},
8 years ago
{ field: 'involvedObject.name',
displayName: 'Name',
cellTemplate: $templateCache.get("eventNameTemplate.html")
},
8 years ago
{ field: 'involvedObject.kind',
displayName: 'Kind',
cellTemplate: $templateCache.get("eventKindTemplate.html")
},
8 years ago
{ field: 'involvedObject.fieldPath',
displayName: 'Subject'
},
8 years ago
{ field: 'reason',
displayName: 'Reason'
},
8 years ago
{ field: 'source',
displayName: 'Source',
cellTemplate: $templateCache.get("eventSourceTemplate.html")
},
8 years ago
{ field: 'message',
displayName: 'Message'
}
8 years ago
]
};
Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
}]);
})(Kubernetes || (Kubernetes = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="kubernetesHelpers.ts"/>
/// <reference path="kubernetesPlugin.ts"/>
/// <reference path="kubernetesModel.ts"/>
var Kubernetes;
(function (Kubernetes) {
Kubernetes.HostController = Kubernetes.controller("HostController", ["$scope", "KubernetesModel", "KubernetesState", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL",
function ($scope, KubernetesModel, KubernetesState, $templateCache, $location, $routeParams, $http, $timeout, KubernetesApiURL) {
$scope.kubernetes = KubernetesState;
$scope.model = KubernetesModel;
$scope.rawModel = null;
$scope.itemConfig = {
properties: {}
};
Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
$scope.$on('kubernetesModelUpdated', function () {
updateData();
});
$scope.$on('$routeUpdate', function ($event) {
updateData();
});
$scope.flipRaw = function () {
$scope.rawMode = !$scope.rawMode;
Core.$apply($scope);
};
updateData();
function updateData() {
$scope.id = $routeParams["id"];
$scope.item = null;
if ($scope.id) {
var url = UrlHelpers.join(KubernetesApiURL, "nodes", $scope.id);
$http.get(url).
success(function (data, status, headers, config) {
if (data) {
$scope.item = data;
}
if ($scope.item) {
$scope.rawModel = Kubernetes.toRawYaml($scope.item);
}
}).
error(function (data, status, headers, config) {
Kubernetes.log.warn("Failed to load " + url + " " + data + " " + status);
});
}
else {
$scope.rawModel = null;
Core.$apply($scope);
}
}
}]);
})(Kubernetes || (Kubernetes = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="kubernetesPlugin.ts"/>
/// <reference path="kubernetesModel.ts"/>
/// <reference path="utilHelpers.ts"/>
var Kubernetes;
(function (Kubernetes) {
Kubernetes.HostsController = Kubernetes.controller("HostsController", ["$scope", "KubernetesModel", "KubernetesPods", "KubernetesState", "ServiceRegistry", "$dialog", "$window", "$templateCache", "$routeParams", "$location", "localStorage", "$http", "$timeout", "KubernetesApiURL",
function ($scope, KubernetesModel, KubernetesPods, KubernetesState, ServiceRegistry, $dialog, $window, $templateCache, $routeParams, $location, localStorage, $http, $timeout, KubernetesApiURL) {
$scope.kubernetes = KubernetesState;
$scope.model = KubernetesModel;
$scope.$on('kubernetesModelUpdated', function () {
Core.$apply($scope);
});
$scope.tableConfig = {
data: 'model.hosts',
showSelectionCheckbox: false,
enableRowClickSelection: false,
multiSelect: false,
selectedItems: [],
filterOptions: {
filterText: $location.search()["q"] || ''
},
8 years ago
columnDefs: [
{
field: 'id',
displayName: 'Name',
defaultSort: true,
cellTemplate: $templateCache.get("idTemplate.html")
8 years ago
},
8 years ago
{
field: 'hostIP',
displayName: 'IP',
customSortField: function (field) {
// use a custom sort to sort ip address
return Kubernetes.sortByPodIp(field.hostIP);
}
},
{ field: '$podsLink',
displayName: 'Pods',
cellTemplate: $templateCache.get("podCountsAndLinkTemplate.html"),
customSortField: function (field) {
// need to concat all the pod counters
var ready = field.$podCounters.ready || 0;
var valid = field.$podCounters.valid || 0;
var waiting = field.$podCounters.waiting || 0;
var error = field.$podCounters.error || 0;
return ready + valid + waiting + error;
}
}
]
8 years ago
};
Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
}]);
})(Kubernetes || (Kubernetes = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="kubernetesPlugin.ts"/>
var Kubernetes;
(function (Kubernetes) {
Kubernetes.ImageRepositoriesController = Kubernetes.controller("ImageRepositoriesController", ["$scope", "KubernetesModel", "KubernetesState", "$dialog", "$window", "$templateCache", "$routeParams", "$location", "localStorage", "$http", "$timeout", "KubernetesApiURL",
function ($scope, KubernetesModel, KubernetesState, $dialog, $window, $templateCache, $routeParams, $location, localStorage, $http, $timeout, KubernetesApiURL) {
$scope.kubernetes = KubernetesState;
$scope.model = KubernetesModel;
$scope.$on('kubernetesModelUpdated', function () {
Core.$apply($scope);
});
$scope.tableConfig = {
data: 'imageRepositories',
showSelectionCheckbox: true,
enableRowClickSelection: false,
multiSelect: true,
selectedItems: [],
filterOptions: {
filterText: $location.search()["q"] || ''
},
columnDefs: [
{
field: 'metadata.name',
displayName: 'Name'
},
8 years ago
{
field: 'metadata.namespace',
displayName: 'Namespace'
},
8 years ago
{
field: 'status.dockerImageRepository',
displayName: 'Docker Registry'
},
8 years ago
{
field: 'tags',
displayName: 'Tags',
cellTemplate: $templateCache.get('imageRegistryLabelTemplate.html')
}
]
8 years ago
};
var labelColors = {
'prod': 'background-blue',
'valid': 'background-light-green',
'test': 'background-light-grey'
};
$scope.labelClass = function (labelType) {
if (!(labelType in labelColors)) {
return 'mouse-pointer';
}
else
return labelColors[labelType] + ' mouse-pointer';
};
Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
$scope.deletePrompt = function (selected) {
UI.multiItemConfirmActionDialog({
collection: selected,
index: '$name',
onClose: function (result) {
if (result) {
function deleteSelected(selected, next) {
if (next) {
deleteEntity(next, function () {
deleteSelected(selected, selected.shift());
});
}
else {
updateData();
}
}
deleteSelected(selected, selected.shift());
}
},
title: 'Delete Image Repository?',
action: 'The following Image Repositories will be deleted:',
okText: 'Delete',
okClass: 'btn-danger',
custom: "This operation is permanent once completed!",
customClass: "alert alert-warning"
}).open();
};
function deleteEntity(selection, nextCallback) {
var name = (selection || {}).$name;
if (name) {
console.log("About to delete image repository: " + name);
var url = Kubernetes.imageRepositoryRestUrl(name);
$http.delete(url).
success(function (data, status, headers, config) {
nextCallback();
}).
error(function (data, status, headers, config) {
Kubernetes.log.warn("Failed to delete image repository on " + url + " " + data + " " + status);
});
}
else {
console.log("warning: no name for selection: " + angular.toJson(selection));
}
}
function updateData() {
var url = Kubernetes.imageRepositoriesRestURL();
$http.get(url).
success(function (data, status, headers, config) {
if (data) {
//console.log("got data " + angular.toJson(data, true));
$scope.imageRepositories = Kubernetes.enrichImageRepositories(data.items);
$scope.fetched = true;
Core.$apply($scope);
}
}).
error(function (data, status, headers, config) {
Kubernetes.log.warn("Failed to load " + url + " " + data + " " + status);
});
}
updateData();
}]);
})(Kubernetes || (Kubernetes = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="kubernetesHelpers.ts"/>
var Kubernetes;
(function (Kubernetes) {
function selectSubNavBar($scope, tabName, newSubTabLabel) {
var foundTab = null;
angular.forEach($scope.subTabConfig, function (tab) {
if (tabName === tab.label || tabName === tab.id) {
foundTab = tab;
}
});
var breadcrumbConfig = $scope.breadcrumbConfig;
if (foundTab && breadcrumbConfig) {
breadcrumbConfig.push(foundTab);
$scope.subTabConfig = [
{
label: newSubTabLabel
}
];
}
}
Kubernetes.selectSubNavBar = selectSubNavBar;
})(Kubernetes || (Kubernetes = {}));
/// <reference path="../../includes.ts"/>
var Kubernetes;
(function (Kubernetes) {
Kubernetes.schema = {
"id": "http://fabric8.io/fabric8/v2/Schema#",
"$schema": "http://json-schema.org/schema#",
"definitions": {
"api_RootPaths": {
"type": "object",
"description": "",
"properties": {
8 years ago
"paths": {
8 years ago
"type": "array",
8 years ago
"description": "",
8 years ago
"items": {
8 years ago
"type": "string",
"description": ""
8 years ago
}
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.RootPaths"
8 years ago
},
8 years ago
"kubernetes_AWSElasticBlockStoreVolumeSource": {
"type": "object",
"description": "",
"properties": {
8 years ago
"fsType": {
"type": "string",
8 years ago
"description": "file system type to mount"
},
8 years ago
"partition": {
"type": "integer",
"description": "partition on the disk to mount (e.g."
},
8 years ago
"readOnly": {
"type": "boolean",
"description": "read-only if true"
},
8 years ago
"volumeID": {
"type": "string",
"description": "unique id of the PD resource in AWS; see http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#awselasticblockstore"
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.AWSElasticBlockStoreVolumeSource"
8 years ago
},
8 years ago
"kubernetes_Capabilities": {
"type": "object",
"description": "",
"properties": {
8 years ago
"add": {
"type": "array",
8 years ago
"description": "added capabilities",
"items": {
"type": "string",
8 years ago
"description": "added capabilities"
}
},
8 years ago
"drop": {
"type": "array",
8 years ago
"description": "droped capabilities",
"items": {
"type": "string",
8 years ago
"description": "droped capabilities"
}
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.Capabilities"
},
8 years ago
"kubernetes_CephFSVolumeSource": {
"type": "object",
"description": "",
"properties": {
8 years ago
"monitors": {
"type": "array",
"description": "a collection of Ceph monitors",
"items": {
"type": "string",
"description": "a collection of Ceph monitors"
}
},
8 years ago
"readOnly": {
"type": "boolean",
"description": "Ceph fs to be mounted with read-only permissions"
},
"secretFile": {
"type": "string",
8 years ago
"description": "path to secret for rados user; default is /etc/ceph/user.secret; optional"
},
8 years ago
"secretRef": {
"$ref": "#/definitions/kubernetes_LocalObjectReference",
"javaType": "io.fabric8.kubernetes.api.model.LocalObjectReference"
},
8 years ago
"user": {
"type": "string",
"description": "rados user name; default is admin; optional"
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.CephFSVolumeSource"
8 years ago
},
8 years ago
"kubernetes_Container": {
"type": "object",
"description": "",
"properties": {
8 years ago
"args": {
"type": "array",
"description": "command array; the docker image's cmd is used if this is not provided; arguments to the entrypoint; cannot be updated; variable references $(VAR_NAME) are expanded using the container's environment variables; if a variable cannot be resolved",
"items": {
"type": "string",
"description": "command array; the docker image's cmd is used if this is not provided; arguments to the entrypoint; cannot be updated; variable references $(VAR_NAME) are expanded using the container's environment variables; if a variable cannot be resolved"
}
},
8 years ago
"command": {
"type": "array",
8 years ago
"description": "entrypoint array; not executed within a shell; the docker image's entrypoint is used if this is not provided; cannot be updated; variable references $(VAR_NAME) are expanded using the container's environment variables; if a variable cannot be resolved",
"items": {
"type": "string",
8 years ago
"description": "entrypoint array; not executed within a shell; the docker image's entrypoint is used if this is not provided; cannot be updated; variable references $(VAR_NAME) are expanded using the container's environment variables; if a variable cannot be resolved"
}
},
8 years ago
"env": {
"type": "array",
"description": "list of environment variables to set in the container; cannot be updated",
"items": {
"$ref": "#/definitions/kubernetes_EnvVar",
"javaType": "io.fabric8.kubernetes.api.model.EnvVar"
}
},
"image": {
"type": "string",
8 years ago
"description": "Docker image name; see http://releases.k8s.io/HEAD/docs/user-guide/images.md"
},
8 years ago
"imagePullPolicy": {
"type": "string",
"description": "image pull policy; one of Always"
},
8 years ago
"lifecycle": {
"$ref": "#/definitions/kubernetes_Lifecycle",
"javaType": "io.fabric8.kubernetes.api.model.Lifecycle"
},
8 years ago
"livenessProbe": {
"$ref": "#/definitions/kubernetes_Probe",
"javaType": "io.fabric8.kubernetes.api.model.Probe"
},
"name": {
"type": "string",
"description": "name of the container; must be a DNS_LABEL and unique within the pod; cannot be updated",
"maxLength": 63,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
},
"ports": {
"type": "array",
8 years ago
"description": "list of ports to expose from the container; cannot be updated",
"items": {
8 years ago
"$ref": "#/definitions/kubernetes_ContainerPort",
"javaType": "io.fabric8.kubernetes.api.model.ContainerPort"
}
},
8 years ago
"readinessProbe": {
"$ref": "#/definitions/kubernetes_Probe",
"javaType": "io.fabric8.kubernetes.api.model.Probe"
},
"resources": {
"$ref": "#/definitions/kubernetes_ResourceRequirements",
"javaType": "io.fabric8.kubernetes.api.model.ResourceRequirements"
},
"securityContext": {
"$ref": "#/definitions/kubernetes_SecurityContext",
"javaType": "io.fabric8.kubernetes.api.model.SecurityContext"
},
"stdin": {
"type": "boolean",
"description": "Whether this container should allocate a buffer for stdin in the container runtime; default is false"
},
"terminationMessagePath": {
"type": "string",
"description": "path at which the file to which the container's termination message will be written is mounted into the container's filesystem; message written is intended to be brief final status"
},
"tty": {
"type": "boolean",
"description": "Whether this container should allocate a TTY for itself"
},
"volumeMounts": {
"type": "array",
8 years ago
"description": "pod volumes to mount into the container's filesyste; cannot be updated",
"items": {
8 years ago
"$ref": "#/definitions/kubernetes_VolumeMount",
"javaType": "io.fabric8.kubernetes.api.model.VolumeMount"
}
8 years ago
},
"workingDir": {
"type": "string",
"description": "container's working directory; defaults to image's default; cannot be updated"
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.Container"
8 years ago
},
8 years ago
"kubernetes_ContainerPort": {
"type": "object",
"description": "",
"properties": {
8 years ago
"containerPort": {
"type": "integer",
"description": "number of port to expose on the pod's IP address"
},
"hostIP": {
"type": "string",
8 years ago
"description": "host IP to bind the port to"
},
8 years ago
"hostPort": {
"type": "integer",
"description": "number of port to expose on the host; most containers do not need this"
},
8 years ago
"name": {
"type": "string",
8 years ago
"description": "name for the port that can be referred to by services; must be an IANA_SVC_NAME and unique within the pod"
},
8 years ago
"protocol": {
"type": "string",
"description": "protocol for port; must be UDP or TCP; TCP if unspecified"
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.ContainerPort"
8 years ago
},
8 years ago
"kubernetes_ContainerState": {
"type": "object",
"description": "",
"properties": {
8 years ago
"running": {
"$ref": "#/definitions/kubernetes_ContainerStateRunning",
"javaType": "io.fabric8.kubernetes.api.model.ContainerStateRunning"
},
8 years ago
"terminated": {
"$ref": "#/definitions/kubernetes_ContainerStateTerminated",
"javaType": "io.fabric8.kubernetes.api.model.ContainerStateTerminated"
},
8 years ago
"waiting": {
"$ref": "#/definitions/kubernetes_ContainerStateWaiting",
"javaType": "io.fabric8.kubernetes.api.model.ContainerStateWaiting"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.ContainerState"
},
"kubernetes_ContainerStateRunning": {
"type": "object",
"description": "",
"properties": {
"startedAt": {
"type": "string",
8 years ago
"description": "time at which the container was last (re-)started"
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.ContainerStateRunning"
8 years ago
},
8 years ago
"kubernetes_ContainerStateTerminated": {
"type": "object",
"description": "",
"properties": {
8 years ago
"containerID": {
8 years ago
"type": "string",
8 years ago
"description": "container's ID in the format 'docker://\u003ccontainer_id\u003e'"
},
8 years ago
"exitCode": {
"type": "integer",
"description": "exit status from the last termination of the container"
},
8 years ago
"finishedAt": {
"type": "string",
8 years ago
"description": "time at which the container last terminated"
},
8 years ago
"message": {
"type": "string",
8 years ago
"description": "message regarding the last termination of the container"
8 years ago
},
8 years ago
"reason": {
"type": "string",
8 years ago
"description": "(brief) reason from the last termination of the container"
8 years ago
},
8 years ago
"signal": {
"type": "integer",
"description": "signal from the last termination of the container"
8 years ago
},
8 years ago
"startedAt": {
8 years ago
"type": "string",
8 years ago
"description": "time at which previous execution of the container started"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.ContainerStateTerminated"
},
"kubernetes_ContainerStateWaiting": {
"type": "object",
"description": "",
"properties": {
"reason": {
"type": "string",
8 years ago
"description": "(brief) reason the container is not yet running"
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.ContainerStateWaiting"
8 years ago
},
8 years ago
"kubernetes_ContainerStatus": {
"type": "object",
"description": "",
"properties": {
8 years ago
"containerID": {
"type": "string",
"description": "container's ID in the format 'docker://\u003ccontainer_id\u003e'; see http://releases.k8s.io/HEAD/docs/user-guide/container-environment.md#container-information"
},
8 years ago
"image": {
"type": "string",
8 years ago
"description": "image of the container; see http://releases.k8s.io/HEAD/docs/user-guide/images.md"
},
8 years ago
"imageID": {
"type": "string",
8 years ago
"description": "ID of the container's image"
},
8 years ago
"lastState": {
"$ref": "#/definitions/kubernetes_ContainerState",
"javaType": "io.fabric8.kubernetes.api.model.ContainerState"
},
"name": {
8 years ago
"type": "string",
8 years ago
"description": "name of the container; must be a DNS_LABEL and unique within the pod; cannot be updated",
"maxLength": 63,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
8 years ago
},
8 years ago
"ready": {
"type": "boolean",
"description": "specifies whether the container has passed its readiness probe"
},
"restartCount": {
"type": "integer",
"description": "the number of times the container has been restarted"
},
"state": {
"$ref": "#/definitions/kubernetes_ContainerState",
"javaType": "io.fabric8.kubernetes.api.model.ContainerState"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.ContainerStatus"
},
"kubernetes_EmptyDirVolumeSource": {
"type": "object",
"description": "",
"properties": {
"medium": {
8 years ago
"type": "string",
8 years ago
"description": "type of storage used to back the volume; must be an empty string (default) or Memory; see http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#emptydir"
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.EmptyDirVolumeSource"
8 years ago
},
8 years ago
"kubernetes_EndpointAddress": {
"type": "object",
"description": "",
"properties": {
8 years ago
"ip": {
8 years ago
"type": "string",
8 years ago
"description": "IP address of the endpoint"
8 years ago
},
8 years ago
"targetRef": {
"$ref": "#/definitions/kubernetes_ObjectReference",
"javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.EndpointAddress"
},
"kubernetes_EndpointPort": {
"type": "object",
"description": "",
"properties": {
"name": {
8 years ago
"type": "string",
8 years ago
"description": "name of this port",
"maxLength": 63,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
},
8 years ago
"port": {
"type": "integer",
"description": "port number of the endpoint"
},
8 years ago
"protocol": {
"type": "string",
"description": "protocol for this port; must be UDP or TCP; TCP if unspecified"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.EndpointPort"
},
"kubernetes_EndpointSubset": {
"type": "object",
"description": "",
"properties": {
"addresses": {
"type": "array",
"description": "IP addresses which offer the related ports",
"items": {
"$ref": "#/definitions/kubernetes_EndpointAddress",
"javaType": "io.fabric8.kubernetes.api.model.EndpointAddress"
}
},
"ports": {
"type": "array",
"description": "port numbers available on the related IP addresses",
"items": {
"$ref": "#/definitions/kubernetes_EndpointPort",
"javaType": "io.fabric8.kubernetes.api.model.EndpointPort"
}
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.EndpointSubset"
8 years ago
},
8 years ago
"kubernetes_Endpoints": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
8 years ago
},
"kind": {
"type": "string",
"description": "",
8 years ago
"default": "Endpoints",
"required": true
8 years ago
},
"metadata": {
"$ref": "#/definitions/kubernetes_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
8 years ago
},
8 years ago
"subsets": {
"type": "array",
"description": "sets of addresses and ports that comprise a service",
"items": {
"$ref": "#/definitions/kubernetes_EndpointSubset",
"javaType": "io.fabric8.kubernetes.api.model.EndpointSubset"
}
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.Endpoints",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.HasMetadata"
]
8 years ago
},
8 years ago
"kubernetes_EndpointsList": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"items": {
"type": "array",
8 years ago
"description": "list of endpoints",
"items": {
8 years ago
"$ref": "#/definitions/kubernetes_Endpoints",
"javaType": "io.fabric8.kubernetes.api.model.Endpoints"
}
},
"kind": {
"type": "string",
"description": "",
8 years ago
"default": "EndpointsList",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ListMeta",
"javaType": "io.fabric8.kubernetes.api.model.ListMeta"
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.EndpointsList",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.KubernetesResource",
"io.fabric8.kubernetes.api.model.KubernetesResourceList"
]
8 years ago
},
8 years ago
"kubernetes_EnvVar": {
"type": "object",
"description": "",
"properties": {
8 years ago
"name": {
"type": "string",
8 years ago
"description": "name of the environment variable; must be a C_IDENTIFIER",
"pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
8 years ago
},
8 years ago
"value": {
"type": "string",
"description": "value of the environment variable; defaults to empty string; variable references $(VAR_NAME) are expanded using the previously defined environment varibles in the container and any service environment variables; if a variable cannot be resolved"
8 years ago
},
8 years ago
"valueFrom": {
"$ref": "#/definitions/kubernetes_EnvVarSource",
"javaType": "io.fabric8.kubernetes.api.model.EnvVarSource"
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.EnvVar"
8 years ago
},
8 years ago
"kubernetes_EnvVarSource": {
"type": "object",
"description": "",
"properties": {
8 years ago
"fieldRef": {
"$ref": "#/definitions/kubernetes_ObjectFieldSelector",
"javaType": "io.fabric8.kubernetes.api.model.ObjectFieldSelector"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.EnvVarSource"
},
"kubernetes_Event": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"count": {
"type": "integer",
8 years ago
"description": "the number of times this event has occurred"
},
"firstTimestamp": {
"type": "string",
"description": "the time at which the event was first recorded"
},
"involvedObject": {
"$ref": "#/definitions/kubernetes_ObjectReference",
"javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
},
"kind": {
"type": "string",
"description": "",
"default": "Event",
"required": true
},
"lastTimestamp": {
"type": "string",
"description": "the time at which the most recent occurrence of this event was recorded"
},
"message": {
"type": "string",
"description": "human-readable description of the status of this operation"
},
"metadata": {
"$ref": "#/definitions/kubernetes_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
},
"reason": {
"type": "string",
"description": "short"
},
"source": {
"$ref": "#/definitions/kubernetes_EventSource",
"javaType": "io.fabric8.kubernetes.api.model.EventSource"
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.Event",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.HasMetadata"
]
},
8 years ago
"kubernetes_EventList": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"items": {
"type": "array",
8 years ago
"description": "list of events",
"items": {
8 years ago
"$ref": "#/definitions/kubernetes_Event",
"javaType": "io.fabric8.kubernetes.api.model.Event"
}
},
"kind": {
"type": "string",
"description": "",
8 years ago
"default": "EventList",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ListMeta",
"javaType": "io.fabric8.kubernetes.api.model.ListMeta"
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.EventList",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.KubernetesResource",
"io.fabric8.kubernetes.api.model.KubernetesResourceList"
]
8 years ago
},
8 years ago
"kubernetes_EventSource": {
"type": "object",
"description": "",
"properties": {
8 years ago
"component": {
"type": "string",
"description": "component that generated the event"
8 years ago
},
8 years ago
"host": {
"type": "string",
"description": "name of the host where the event is generated"
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.EventSource"
8 years ago
},
8 years ago
"kubernetes_ExecAction": {
"type": "object",
"description": "",
"properties": {
8 years ago
"command": {
"type": "array",
"description": "command line to execute inside the container; working directory for the command is root ('/') in the container's file system; the command is exec'd",
"items": {
"type": "string",
"description": "command line to execute inside the container; working directory for the command is root ('/') in the container's file system; the command is exec'd"
}
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.ExecAction"
},
"kubernetes_GCEPersistentDiskVolumeSource": {
"type": "object",
"description": "",
"properties": {
"fsType": {
8 years ago
"type": "string",
8 years ago
"description": "file system type to mount"
},
8 years ago
"partition": {
"type": "integer",
8 years ago
"description": "partition on the disk to mount (e.g."
8 years ago
},
8 years ago
"pdName": {
"type": "string",
"description": "unique name of the PD resource in GCE; see http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#gcepersistentdisk"
},
8 years ago
"readOnly": {
"type": "boolean",
"description": "read-only if true"
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.GCEPersistentDiskVolumeSource"
8 years ago
},
8 years ago
"kubernetes_GitRepoVolumeSource": {
"type": "object",
"description": "",
"properties": {
8 years ago
"repository": {
8 years ago
"type": "string",
8 years ago
"description": "repository URL"
},
8 years ago
"revision": {
8 years ago
"type": "string",
8 years ago
"description": "commit hash for the specified revision"
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.GitRepoVolumeSource"
8 years ago
},
8 years ago
"kubernetes_GlusterfsVolumeSource": {
"type": "object",
"description": "",
"properties": {
8 years ago
"endpoints": {
8 years ago
"type": "string",
8 years ago
"description": "gluster hosts endpoints name; see http://releases.k8s.io/HEAD/examples/glusterfs/README.md#create-a-pod"
8 years ago
},
8 years ago
"path": {
"type": "string",
"description": "path to gluster volume; see http://releases.k8s.io/HEAD/examples/glusterfs/README.md#create-a-pod"
},
8 years ago
"readOnly": {
"type": "boolean",
"description": "glusterfs volume to be mounted with read-only permissions; see http://releases.k8s.io/HEAD/examples/glusterfs/README.md#create-a-pod"
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.GlusterfsVolumeSource"
8 years ago
},
8 years ago
"kubernetes_HTTPGetAction": {
"type": "object",
"description": "",
"properties": {
8 years ago
"host": {
"type": "string",
8 years ago
"description": "hostname to connect to; defaults to pod IP"
},
8 years ago
"path": {
"type": "string",
8 years ago
"description": "path to access on the HTTP server"
},
8 years ago
"port": {
"$ref": "#/definitions/kubernetes_util_IntOrString",
"javaType": "io.fabric8.kubernetes.api.model.IntOrString"
},
8 years ago
"scheme": {
"type": "string",
8 years ago
"description": "scheme to connect with"
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.HTTPGetAction"
},
8 years ago
"kubernetes_Handler": {
"type": "object",
"description": "",
"properties": {
8 years ago
"exec": {
"$ref": "#/definitions/kubernetes_ExecAction",
"javaType": "io.fabric8.kubernetes.api.model.ExecAction"
},
8 years ago
"httpGet": {
"$ref": "#/definitions/kubernetes_HTTPGetAction",
"javaType": "io.fabric8.kubernetes.api.model.HTTPGetAction"
},
8 years ago
"tcpSocket": {
"$ref": "#/definitions/kubernetes_TCPSocketAction",
"javaType": "io.fabric8.kubernetes.api.model.TCPSocketAction"
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.Handler"
8 years ago
},
8 years ago
"kubernetes_HostPathVolumeSource": {
8 years ago
"type": "object",
"description": "",
"properties": {
8 years ago
"path": {
"type": "string",
8 years ago
"description": "path of the directory on the host; see http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#hostpath"
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.HostPathVolumeSource"
8 years ago
},
8 years ago
"kubernetes_ISCSIVolumeSource": {
8 years ago
"type": "object",
"description": "",
"properties": {
8 years ago
"fsType": {
"type": "string",
"description": "file system type to mount"
},
8 years ago
"iqn": {
"type": "string",
"description": "iSCSI Qualified Name"
},
8 years ago
"lun": {
"type": "integer",
"description": "iscsi target lun number"
},
"readOnly": {
"type": "boolean",
8 years ago
"description": "read-only if true"
},
8 years ago
"targetPortal": {
"type": "string",
"description": "iSCSI target portal"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.ISCSIVolumeSource"
},
"kubernetes_Lifecycle": {
"type": "object",
"description": "",
"properties": {
"postStart": {
"$ref": "#/definitions/kubernetes_Handler",
"javaType": "io.fabric8.kubernetes.api.model.Handler"
},
8 years ago
"preStop": {
"$ref": "#/definitions/kubernetes_Handler",
"javaType": "io.fabric8.kubernetes.api.model.Handler"
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.Lifecycle"
8 years ago
},
8 years ago
"kubernetes_List": {
8 years ago
"type": "object",
"description": "",
"properties": {
8 years ago
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"items": {
"type": "array",
8 years ago
"description": "list of objects",
"items": {
8 years ago
"$ref": "#/definitions/kubernetes_runtime_RawExtension",
"javaType": "io.fabric8.kubernetes.api.model.HasMetadata"
}
},
8 years ago
"kind": {
"type": "string",
"description": "",
"default": "List",
"required": true
},
8 years ago
"metadata": {
"$ref": "#/definitions/kubernetes_ListMeta",
"javaType": "io.fabric8.kubernetes.api.model.ListMeta"
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.BaseKubernetesList",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.KubernetesResource",
"io.fabric8.kubernetes.api.model.KubernetesResourceList"
]
},
8 years ago
"kubernetes_ListMeta": {
"type": "object",
"description": "",
"properties": {
8 years ago
"resourceVersion": {
"type": "string",
8 years ago
"description": "string that identifies the internal version of this object that can be used by clients to determine when objects have changed; populated by the system"
},
8 years ago
"selfLink": {
"type": "string",
8 years ago
"description": "URL for the object; populated by the system"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.ListMeta"
},
"kubernetes_LoadBalancerIngress": {
"type": "object",
"description": "",
"properties": {
"hostname": {
"type": "string",
8 years ago
"description": "hostname of ingress point"
},
8 years ago
"ip": {
"type": "string",
8 years ago
"description": "IP address of ingress point"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.LoadBalancerIngress"
},
"kubernetes_LoadBalancerStatus": {
"type": "object",
"description": "",
"properties": {
"ingress": {
"type": "array",
"description": "load-balancer ingress points",
"items": {
"$ref": "#/definitions/kubernetes_LoadBalancerIngress",
"javaType": "io.fabric8.kubernetes.api.model.LoadBalancerIngress"
}
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.LoadBalancerStatus"
8 years ago
},
8 years ago
"kubernetes_LocalObjectReference": {
8 years ago
"type": "object",
"description": "",
"properties": {
8 years ago
"name": {
"type": "string",
8 years ago
"description": "name of the referent; see http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names"
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.LocalObjectReference"
8 years ago
},
8 years ago
"kubernetes_MetadataFile": {
8 years ago
"type": "object",
"description": "",
"properties": {
8 years ago
"fieldRef": {
"$ref": "#/definitions/kubernetes_ObjectFieldSelector",
"javaType": "io.fabric8.kubernetes.api.model.ObjectFieldSelector"
},
8 years ago
"name": {
8 years ago
"type": "string",
8 years ago
"description": "the name of the file to be created"
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.MetadataFile"
8 years ago
},
8 years ago
"kubernetes_MetadataVolumeSource": {
8 years ago
"type": "object",
"description": "",
"properties": {
8 years ago
"items": {
"type": "array",
8 years ago
"description": "list of metadata files",
"items": {
8 years ago
"$ref": "#/definitions/kubernetes_MetadataFile",
"javaType": "io.fabric8.kubernetes.api.model.MetadataFile"
}
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.MetadataVolumeSource"
},
8 years ago
"kubernetes_NFSVolumeSource": {
8 years ago
"type": "object",
"description": "",
"properties": {
8 years ago
"path": {
"type": "string",
8 years ago
"description": "the path that is exported by the NFS server; see http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#nfs"
8 years ago
},
8 years ago
"readOnly": {
"type": "boolean",
"description": "forces the NFS export to be mounted with read-only permissions; see http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#nfs"
},
"server": {
8 years ago
"type": "string",
8 years ago
"description": "the hostname or IP address of the NFS server; see http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#nfs"
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.NFSVolumeSource"
8 years ago
},
8 years ago
"kubernetes_Namespace": {
8 years ago
"type": "object",
"description": "",
"properties": {
8 years ago
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
8 years ago
},
8 years ago
"kind": {
8 years ago
"type": "string",
8 years ago
"description": "",
"default": "Namespace",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
},
"spec": {
"$ref": "#/definitions/kubernetes_NamespaceSpec",
"javaType": "io.fabric8.kubernetes.api.model.NamespaceSpec"
},
"status": {
"$ref": "#/definitions/kubernetes_NamespaceStatus",
"javaType": "io.fabric8.kubernetes.api.model.NamespaceStatus"
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.Namespace",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.HasMetadata"
]
8 years ago
},
8 years ago
"kubernetes_NamespaceList": {
"type": "object",
"description": "",
"properties": {
8 years ago
"apiVersion": {
"type": "string",
8 years ago
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
8 years ago
},
8 years ago
"items": {
8 years ago
"type": "array",
8 years ago
"description": "items is the list of Namespace objects in the list; see http://releases.k8s.io/HEAD/docs/user-guide/namespaces.md",
8 years ago
"items": {
8 years ago
"$ref": "#/definitions/kubernetes_Namespace",
"javaType": "io.fabric8.kubernetes.api.model.Namespace"
8 years ago
}
},
8 years ago
"kind": {
"type": "string",
8 years ago
"description": "",
"default": "NamespaceList",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ListMeta",
"javaType": "io.fabric8.kubernetes.api.model.ListMeta"
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.NamespaceList",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.KubernetesResource",
"io.fabric8.kubernetes.api.model.KubernetesResourceList"
]
},
8 years ago
"kubernetes_NamespaceSpec": {
"type": "object",
"description": "",
8 years ago
"properties": {
8 years ago
"finalizers": {
"type": "array",
"description": "an opaque list of values that must be empty to permanently remove object from storage; see http://releases.k8s.io/HEAD/docs/design/namespaces.md#finalizers",
"items": {
"type": "string",
"description": "an opaque list of values that must be empty to permanently remove object from storage; see http://releases.k8s.io/HEAD/docs/design/namespaces.md#finalizers"
}
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.NamespaceSpec"
},
8 years ago
"kubernetes_NamespaceStatus": {
8 years ago
"type": "object",
"description": "",
"properties": {
8 years ago
"phase": {
"type": "string",
"description": "phase is the current lifecycle phase of the namespace; see http://releases.k8s.io/HEAD/docs/design/namespaces.md#phases"
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.NamespaceStatus"
},
8 years ago
"kubernetes_Node": {
8 years ago
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"kind": {
"type": "string",
"description": "",
8 years ago
"default": "Node",
8 years ago
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
},
8 years ago
"spec": {
"$ref": "#/definitions/kubernetes_NodeSpec",
"javaType": "io.fabric8.kubernetes.api.model.NodeSpec"
},
"status": {
"$ref": "#/definitions/kubernetes_NodeStatus",
"javaType": "io.fabric8.kubernetes.api.model.NodeStatus"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.Node",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.HasMetadata"
]
},
"kubernetes_NodeAddress": {
"type": "object",
"description": "",
"properties": {
"address": {
"type": "string",
"description": "the node address"
},
"type": {
"type": "string",
"description": "node address type"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.NodeAddress"
},
"kubernetes_NodeCondition": {
"type": "object",
"description": "",
"properties": {
"lastHeartbeatTime": {
"type": "string",
"description": "last time we got an update on a given condition"
},
"lastTransitionTime": {
"type": "string",
"description": "last time the condition transit from one status to another"
},
"message": {
"type": "string",
"description": "human readable message indicating details about last transition"
},
"reason": {
"type": "string",
"description": "(brief) reason for the condition's last transition"
8 years ago
},
"status": {
8 years ago
"type": "string",
"description": "status of the condition"
},
"type": {
"type": "string",
"description": "type of node condition"
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.NodeCondition"
},
8 years ago
"kubernetes_NodeList": {
8 years ago
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"items": {
"type": "array",
8 years ago
"description": "list of nodes",
8 years ago
"items": {
8 years ago
"$ref": "#/definitions/kubernetes_Node",
"javaType": "io.fabric8.kubernetes.api.model.Node"
8 years ago
}
},
"kind": {
"type": "string",
"description": "",
8 years ago
"default": "NodeList",
8 years ago
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ListMeta",
"javaType": "io.fabric8.kubernetes.api.model.ListMeta"
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.NodeList",
8 years ago
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.KubernetesResource",
"io.fabric8.kubernetes.api.model.KubernetesResourceList"
]
},
8 years ago
"kubernetes_NodeSpec": {
8 years ago
"type": "object",
"description": "",
"properties": {
8 years ago
"externalID": {
"type": "string",
"description": "deprecated. External ID assigned to the node by some machine database (e.g. a cloud provider). Defaults to node name when empty."
8 years ago
},
8 years ago
"podCIDR": {
"type": "string",
"description": "pod IP range assigned to the node"
},
"providerID": {
"type": "string",
"description": "ID of the node assigned by the cloud provider in the format: \u003cProviderName\u003e://\u003cProviderSpecificNodeID\u003e"
},
"unschedulable": {
"type": "boolean",
"description": "disable pod scheduling on the node; see http://releases.k8s.io/HEAD/docs/admin/node.md#manual-node-administration"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.NodeSpec"
},
"kubernetes_NodeStatus": {
"type": "object",
"description": "",
"properties": {
"addresses": {
"type": "array",
"description": "list of addresses reachable to the node; see http://releases.k8s.io/HEAD/docs/admin/node.md#node-addresses",
"items": {
"$ref": "#/definitions/kubernetes_NodeAddress",
"javaType": "io.fabric8.kubernetes.api.model.NodeAddress"
}
},
"capacity": {
"type": "object",
8 years ago
"description": "compute resource capacity of the node; see http://releases.k8s.io/HEAD/docs/user-guide/compute-resources.md",
"additionalProperties": {
8 years ago
"$ref": "#/definitions/kubernetes_resource_Quantity",
"javaType": "io.fabric8.kubernetes.api.model.Quantity"
},
8 years ago
"javaType": "java.util.Map\u003cString,io.fabric8.kubernetes.api.model.Quantity\u003e"
8 years ago
},
8 years ago
"conditions": {
"type": "array",
8 years ago
"description": "list of node conditions observed; see http://releases.k8s.io/HEAD/docs/admin/node.md#node-condition",
"items": {
8 years ago
"$ref": "#/definitions/kubernetes_NodeCondition",
"javaType": "io.fabric8.kubernetes.api.model.NodeCondition"
}
8 years ago
},
"nodeInfo": {
"$ref": "#/definitions/kubernetes_NodeSystemInfo",
"javaType": "io.fabric8.kubernetes.api.model.NodeSystemInfo"
},
"phase": {
"type": "string",
"description": "most recently observed lifecycle phase of the node; see http://releases.k8s.io/HEAD/docs/admin/node.md#node-phase"
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.NodeStatus"
},
8 years ago
"kubernetes_NodeSystemInfo": {
"type": "object",
"description": "",
"properties": {
8 years ago
"bootID": {
"type": "string",
"description": "boot id is the boot-id reported by the node"
8 years ago
},
8 years ago
"containerRuntimeVersion": {
"type": "string",
"description": "Container runtime version reported by the node through runtime remote API (e.g. docker://1.5.0)"
},
"kernelVersion": {
"type": "string",
"description": "Kernel version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64)"
},
"kubeProxyVersion": {
"type": "string",
"description": "Kube-proxy version reported by the node"
},
"kubeletVersion": {
"type": "string",
"description": "Kubelet version reported by the node"
},
"machineID": {
"type": "string",
"description": "machine-id reported by the node"
},
"osImage": {
"type": "string",
"description": "OS image used reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy))"
},
"systemUUID": {
"type": "string",
"description": "system-uuid reported by the node"
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.NodeSystemInfo"
},
8 years ago
"kubernetes_ObjectFieldSelector": {
"type": "object",
"description": "",
"properties": {
8 years ago
"apiVersion": {
"type": "string",
"description": "version of the schema that fieldPath is written in terms of; defaults to v1"
},
8 years ago
"fieldPath": {
8 years ago
"type": "string",
8 years ago
"description": "path of the field to select in the specified API version"
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.ObjectFieldSelector"
},
8 years ago
"kubernetes_ObjectMeta": {
"type": "object",
"description": "",
"properties": {
8 years ago
"annotations": {
"type": "object",
"description": "map of string keys and values that can be used by external tooling to store and retrieve arbitrary metadata about objects; see http://releases.k8s.io/HEAD/docs/user-guide/annotations.md",
"additionalProperties": {
"type": "string",
"description": "map of string keys and values that can be used by external tooling to store and retrieve arbitrary metadata about objects; see http://releases.k8s.io/HEAD/docs/user-guide/annotations.md"
},
"javaType": "java.util.Map\u003cString,String\u003e"
8 years ago
},
8 years ago
"creationTimestamp": {
"type": "string",
"description": "RFC 3339 date and time at which the object was created; populated by the system"
},
8 years ago
"deletionTimestamp": {
"type": "string",
"description": "RFC 3339 date and time at which the object will be deleted; populated by the system when a graceful deletion is requested"
},
"generateName": {
"type": "string",
"description": "an optional prefix to use to generate a unique name; has the same validation rules as name; optional"
},
"generation": {
"type": "integer",
"description": "a sequence number representing a specific generation of the desired state; populated by the system; read-only",
"javaType": "Long"
},
"labels": {
"type": "object",
"description": "map of string keys and values that can be used to organize and categorize objects; may match selectors of replication controllers and services; see http://releases.k8s.io/HEAD/docs/user-guide/labels.md",
"additionalProperties": {
"type": "string",
"description": "map of string keys and values that can be used to organize and categorize objects; may match selectors of replication controllers and services; see http://releases.k8s.io/HEAD/docs/user-guide/labels.md"
},
"javaType": "java.util.Map\u003cString,String\u003e"
},
"name": {
"type": "string",
"description": "string that identifies an object. Must be unique within a namespace; cannot be updated; see http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names",
"maxLength": 63,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
},
"namespace": {
"type": "string",
"description": "namespace of the object; must be a DNS_LABEL; cannot be updated; see http://releases.k8s.io/HEAD/docs/user-guide/namespaces.md",
"maxLength": 253,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$"
},
"resourceVersion": {
"type": "string",
"description": "string that identifies the internal version of this object that can be used by clients to determine when objects have changed; populated by the system"
},
"selfLink": {
"type": "string",
"description": "URL for the object; populated by the system"
},
"uid": {
"type": "string",
"description": "unique UUID across space and time; populated by the system; read-only; see http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#uids"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
},
"kubernetes_ObjectReference": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "API version of the referent"
},
"fieldPath": {
"type": "string",
"description": "if referring to a piece of an object instead of an entire object"
},
"kind": {
"type": "string",
"description": "kind of the referent; see http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds"
},
"name": {
"type": "string",
"description": "name of the referent; see http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names"
},
"namespace": {
"type": "string",
"description": "namespace of the referent; see http://releases.k8s.io/HEAD/docs/user-guide/namespaces.md"
},
8 years ago
"resourceVersion": {
"type": "string",
"description": "specific resourceVersion to which this reference is made"
},
8 years ago
"uid": {
8 years ago
"type": "string",
8 years ago
"description": "uid of the referent; see http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#uids"
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
},
8 years ago
"kubernetes_PersistentVolume": {
8 years ago
"type": "object",
"description": "",
"properties": {
8 years ago
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
8 years ago
"kind": {
"type": "string",
"description": "",
"default": "PersistentVolume",
"required": true
},
8 years ago
"metadata": {
"$ref": "#/definitions/kubernetes_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
},
8 years ago
"spec": {
"$ref": "#/definitions/kubernetes_PersistentVolumeSpec",
"javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeSpec"
},
"status": {
"$ref": "#/definitions/kubernetes_PersistentVolumeStatus",
"javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeStatus"
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.PersistentVolume",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.HasMetadata"
]
},
8 years ago
"kubernetes_PersistentVolumeClaim": {
"type": "object",
"description": "",
"properties": {
8 years ago
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
8 years ago
},
8 years ago
"kind": {
"type": "string",
8 years ago
"description": "",
"default": "PersistentVolumeClaim",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
},
"spec": {
"$ref": "#/definitions/kubernetes_PersistentVolumeClaimSpec",
"javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeClaimSpec"
},
"status": {
"$ref": "#/definitions/kubernetes_PersistentVolumeClaimStatus",
"javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeClaimStatus"
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeClaim",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.HasMetadata"
]
},
8 years ago
"kubernetes_PersistentVolumeClaimList": {
8 years ago
"type": "object",
"description": "",
"properties": {
8 years ago
"apiVersion": {
8 years ago
"type": "string",
8 years ago
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
8 years ago
},
8 years ago
"items": {
"type": "array",
8 years ago
"description": "a list of persistent volume claims; see http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#persistentvolumeclaims",
"items": {
8 years ago
"$ref": "#/definitions/kubernetes_PersistentVolumeClaim",
"javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeClaim"
}
},
8 years ago
"kind": {
8 years ago
"type": "string",
8 years ago
"description": "",
"default": "PersistentVolumeClaimList",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ListMeta",
"javaType": "io.fabric8.kubernetes.api.model.ListMeta"
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeClaimList",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.KubernetesResource",
"io.fabric8.kubernetes.api.model.KubernetesResourceList"
]
},
8 years ago
"kubernetes_PersistentVolumeClaimSpec": {
"type": "object",
"description": "",
"properties": {
8 years ago
"accessModes": {
"type": "array",
"description": "the desired access modes the volume should have; see http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#access-modes-1",
"items": {
"type": "string",
"description": "the desired access modes the volume should have; see http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#access-modes-1"
}
8 years ago
},
8 years ago
"resources": {
"$ref": "#/definitions/kubernetes_ResourceRequirements",
"javaType": "io.fabric8.kubernetes.api.model.ResourceRequirements"
},
"volumeName": {
"type": "string",
"description": "the binding reference to the persistent volume backing this claim"
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeClaimSpec"
},
8 years ago
"kubernetes_PersistentVolumeClaimStatus": {
8 years ago
"type": "object",
"description": "",
"properties": {
8 years ago
"accessModes": {
"type": "array",
"description": "the actual access modes the volume has; see http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#access-modes-1",
"items": {
"type": "string",
"description": "the actual access modes the volume has; see http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#access-modes-1"
}
},
8 years ago
"capacity": {
"type": "object",
"description": "the actual resources the volume has",
"additionalProperties": {
"$ref": "#/definitions/kubernetes_resource_Quantity",
"javaType": "io.fabric8.kubernetes.api.model.Quantity"
},
"javaType": "java.util.Map\u003cString,io.fabric8.kubernetes.api.model.Quantity\u003e"
},
8 years ago
"phase": {
"type": "string",
"description": "the current phase of the claim"
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeClaimStatus"
},
8 years ago
"kubernetes_PersistentVolumeClaimVolumeSource": {
8 years ago
"type": "object",
"description": "",
"properties": {
8 years ago
"claimName": {
8 years ago
"type": "string",
8 years ago
"description": "the name of the claim in the same namespace to be mounted as a volume; see http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#persistentvolumeclaims"
},
"readOnly": {
"type": "boolean",
"description": "mount volume as read-only when true; default false"
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeClaimVolumeSource"
},
8 years ago
"kubernetes_PersistentVolumeList": {
8 years ago
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"items": {
"type": "array",
8 years ago
"description": "list of persistent volumes; see http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md",
"items": {
8 years ago
"$ref": "#/definitions/kubernetes_PersistentVolume",
"javaType": "io.fabric8.kubernetes.api.model.PersistentVolume"
}
},
8 years ago
"kind": {
"type": "string",
"description": "",
8 years ago
"default": "PersistentVolumeList",
8 years ago
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ListMeta",
"javaType": "io.fabric8.kubernetes.api.model.ListMeta"
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeList",
8 years ago
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.KubernetesResource",
"io.fabric8.kubernetes.api.model.KubernetesResourceList"
8 years ago
]
},
8 years ago
"kubernetes_PersistentVolumeSource": {
"type": "object",
"description": "",
"properties": {
"awsElasticBlockStore": {
"$ref": "#/definitions/kubernetes_AWSElasticBlockStoreVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.AWSElasticBlockStoreVolumeSource"
},
"cephfs": {
"$ref": "#/definitions/kubernetes_CephFSVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.CephFSVolumeSource"
},
"gcePersistentDisk": {
"$ref": "#/definitions/kubernetes_GCEPersistentDiskVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.GCEPersistentDiskVolumeSource"
},
"glusterfs": {
"$ref": "#/definitions/kubernetes_GlusterfsVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.GlusterfsVolumeSource"
},
"hostPath": {
"$ref": "#/definitions/kubernetes_HostPathVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.HostPathVolumeSource"
},
"iscsi": {
"$ref": "#/definitions/kubernetes_ISCSIVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.ISCSIVolumeSource"
},
"nfs": {
"$ref": "#/definitions/kubernetes_NFSVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.NFSVolumeSource"
},
"rbd": {
"$ref": "#/definitions/kubernetes_RBDVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.RBDVolumeSource"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeSource"
},
"kubernetes_PersistentVolumeSpec": {
"type": "object",
"description": "",
"properties": {
"accessModes": {
"type": "array",
"description": "all ways the volume can be mounted; see http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#access-modes",
"items": {
"type": "string",
"description": "all ways the volume can be mounted; see http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#access-modes"
}
},
"awsElasticBlockStore": {
"$ref": "#/definitions/kubernetes_AWSElasticBlockStoreVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.AWSElasticBlockStoreVolumeSource"
},
"capacity": {
"type": "object",
"description": "a description of the persistent volume's resources and capacityr; see http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#capacity",
"additionalProperties": {
"$ref": "#/definitions/kubernetes_resource_Quantity",
"javaType": "io.fabric8.kubernetes.api.model.Quantity"
},
"javaType": "java.util.Map\u003cString,io.fabric8.kubernetes.api.model.Quantity\u003e"
},
"cephfs": {
"$ref": "#/definitions/kubernetes_CephFSVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.CephFSVolumeSource"
},
"claimRef": {
"$ref": "#/definitions/kubernetes_ObjectReference",
"javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
},
"gcePersistentDisk": {
"$ref": "#/definitions/kubernetes_GCEPersistentDiskVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.GCEPersistentDiskVolumeSource"
},
"glusterfs": {
"$ref": "#/definitions/kubernetes_GlusterfsVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.GlusterfsVolumeSource"
},
"hostPath": {
"$ref": "#/definitions/kubernetes_HostPathVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.HostPathVolumeSource"
},
"iscsi": {
"$ref": "#/definitions/kubernetes_ISCSIVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.ISCSIVolumeSource"
},
"nfs": {
"$ref": "#/definitions/kubernetes_NFSVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.NFSVolumeSource"
},
"persistentVolumeReclaimPolicy": {
"type": "string",
"description": "what happens to a volume when released from its claim; Valid options are Retain (default) and Recycle. Recyling must be supported by the volume plugin underlying this persistent volume. See http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#recycling-policy"
},
"rbd": {
"$ref": "#/definitions/kubernetes_RBDVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.RBDVolumeSource"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeSpec"
},
"kubernetes_PersistentVolumeStatus": {
"type": "object",
"description": "",
"properties": {
"message": {
"type": "string",
"description": "human-readable message indicating details about why the volume is in this state"
},
"phase": {
"type": "string",
"description": "the current phase of a persistent volume; see http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#phase"
},
"reason": {
"type": "string",
"description": "(brief) reason the volume is not is not available"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeStatus"
},
"kubernetes_Pod": {
8 years ago
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"kind": {
"type": "string",
"description": "",
8 years ago
"default": "Pod",
8 years ago
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
},
"spec": {
8 years ago
"$ref": "#/definitions/kubernetes_PodSpec",
"javaType": "io.fabric8.kubernetes.api.model.PodSpec"
},
"status": {
8 years ago
"$ref": "#/definitions/kubernetes_PodStatus",
"javaType": "io.fabric8.kubernetes.api.model.PodStatus"
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.Pod",
8 years ago
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.HasMetadata"
8 years ago
]
},
8 years ago
"kubernetes_PodCondition": {
"type": "object",
"description": "",
"properties": {
"status": {
"type": "string",
"description": "status of the condition"
},
"type": {
"type": "string",
"description": "kind of the condition"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.PodCondition"
},
"kubernetes_PodList": {
8 years ago
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"items": {
"type": "array",
8 years ago
"description": "list of pods; see http://releases.k8s.io/HEAD/docs/user-guide/pods.md",
8 years ago
"items": {
8 years ago
"$ref": "#/definitions/kubernetes_Pod",
"javaType": "io.fabric8.kubernetes.api.model.Pod"
8 years ago
}
},
"kind": {
"type": "string",
"description": "",
8 years ago
"default": "PodList",
8 years ago
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ListMeta",
"javaType": "io.fabric8.kubernetes.api.model.ListMeta"
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.PodList",
8 years ago
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.KubernetesResource",
"io.fabric8.kubernetes.api.model.KubernetesResourceList"
]
},
8 years ago
"kubernetes_PodSpec": {
8 years ago
"type": "object",
"description": "",
"properties": {
8 years ago
"activeDeadlineSeconds": {
"type": "integer",
"description": "",
"javaType": "Long"
},
"containers": {
"type": "array",
"description": "list of containers belonging to the pod; cannot be updated; containers cannot currently be added or removed; there must be at least one container in a Pod; see http://releases.k8s.io/HEAD/docs/user-guide/containers.md",
"items": {
"$ref": "#/definitions/kubernetes_Container",
"javaType": "io.fabric8.kubernetes.api.model.Container"
}
},
"dnsPolicy": {
"type": "string",
8 years ago
"description": "DNS policy for containers within the pod; one of 'ClusterFirst' or 'Default'"
8 years ago
},
8 years ago
"host": {
"type": "string",
"description": "deprecated"
},
"hostNetwork": {
"type": "boolean",
"description": "host networking requested for this pod"
},
"imagePullSecrets": {
8 years ago
"type": "array",
8 years ago
"description": "list of references to secrets in the same namespace available for pulling the container images; see http://releases.k8s.io/HEAD/docs/user-guide/images.md#specifying-imagepullsecrets-on-a-pod",
8 years ago
"items": {
8 years ago
"$ref": "#/definitions/kubernetes_LocalObjectReference",
"javaType": "io.fabric8.kubernetes.api.model.LocalObjectReference"
8 years ago
}
8 years ago
},
"nodeName": {
"type": "string",
"description": "node requested for this pod"
},
"nodeSelector": {
"type": "object",
"description": "selector which must match a node's labels for the pod to be scheduled on that node; see http://releases.k8s.io/HEAD/docs/user-guide/node-selection/README.md",
"additionalProperties": {
"type": "string",
"description": "selector which must match a node's labels for the pod to be scheduled on that node; see http://releases.k8s.io/HEAD/docs/user-guide/node-selection/README.md"
},
"javaType": "java.util.Map\u003cString,String\u003e"
},
"restartPolicy": {
"type": "string",
"description": "restart policy for all containers within the pod; one of Always"
},
"serviceAccount": {
"type": "string",
"description": "deprecated; use serviceAccountName instead"
},
"serviceAccountName": {
"type": "string",
8 years ago
"description": "name of the ServiceAccount to use to run this pod; see http://releases.k8s.io/HEAD/docs/design/service_accounts.md"
8 years ago
},
8 years ago
"terminationGracePeriodSeconds": {
"type": "integer",
"description": "optional duration in seconds the pod needs to terminate gracefully; may be decreased in delete request; value must be non-negative integer; the value zero indicates delete immediately; if this value is not set",
"javaType": "Long"
},
"volumes": {
8 years ago
"type": "array",
8 years ago
"description": "list of volumes that can be mounted by containers belonging to the pod; see http://releases.k8s.io/HEAD/docs/user-guide/volumes.md",
8 years ago
"items": {
8 years ago
"$ref": "#/definitions/kubernetes_Volume",
"javaType": "io.fabric8.kubernetes.api.model.Volume"
8 years ago
}
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.PodSpec"
},
8 years ago
"kubernetes_PodStatus": {
"type": "object",
"description": "",
"properties": {
8 years ago
"conditions": {
8 years ago
"type": "array",
8 years ago
"description": "current service state of pod; see http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#pod-conditions",
8 years ago
"items": {
8 years ago
"$ref": "#/definitions/kubernetes_PodCondition",
"javaType": "io.fabric8.kubernetes.api.model.PodCondition"
8 years ago
}
},
8 years ago
"containerStatuses": {
"type": "array",
"description": "list of container statuses; see http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#container-statuses",
"items": {
"$ref": "#/definitions/kubernetes_ContainerStatus",
"javaType": "io.fabric8.kubernetes.api.model.ContainerStatus"
}
},
"hostIP": {
"type": "string",
8 years ago
"description": "IP address of the host to which the pod is assigned; empty if not yet scheduled"
},
"message": {
"type": "string",
"description": "human readable message indicating details about why the pod is in this condition"
},
"phase": {
"type": "string",
"description": "current condition of the pod; see http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#pod-phase"
},
"podIP": {
"type": "string",
"description": "IP address allocated to the pod; routable at least within the cluster; empty if not yet allocated"
},
"reason": {
"type": "string",
"description": "(brief-CamelCase) reason indicating details about why the pod is in this condition"
},
"startTime": {
"type": "string",
"description": "RFC 3339 date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) for the pod."
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.PodStatus"
},
8 years ago
"kubernetes_PodTemplateSpec": {
"type": "object",
"description": "",
"properties": {
8 years ago
"metadata": {
"$ref": "#/definitions/kubernetes_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
},
8 years ago
"spec": {
"$ref": "#/definitions/kubernetes_PodSpec",
"javaType": "io.fabric8.kubernetes.api.model.PodSpec"
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.PodTemplateSpec"
},
8 years ago
"kubernetes_Probe": {
"type": "object",
"description": "",
"properties": {
8 years ago
"exec": {
"$ref": "#/definitions/kubernetes_ExecAction",
"javaType": "io.fabric8.kubernetes.api.model.ExecAction"
},
8 years ago
"httpGet": {
"$ref": "#/definitions/kubernetes_HTTPGetAction",
"javaType": "io.fabric8.kubernetes.api.model.HTTPGetAction"
},
8 years ago
"initialDelaySeconds": {
"type": "integer",
"description": "number of seconds after the container has started before liveness probes are initiated; see http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#container-probes",
"javaType": "Long"
},
"tcpSocket": {
"$ref": "#/definitions/kubernetes_TCPSocketAction",
"javaType": "io.fabric8.kubernetes.api.model.TCPSocketAction"
},
"timeoutSeconds": {
"type": "integer",
"description": "number of seconds after which liveness probes timeout; defaults to 1 second; see http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#container-probes",
"javaType": "Long"
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.Probe"
},
8 years ago
"kubernetes_RBDVolumeSource": {
8 years ago
"type": "object",
"description": "",
"properties": {
8 years ago
"fsType": {
8 years ago
"type": "string",
8 years ago
"description": "file system type to mount"
8 years ago
},
8 years ago
"image": {
"type": "string",
8 years ago
"description": "rados image name; see http://releases.k8s.io/HEAD/examples/rbd/README.md#how-to-use-it"
},
8 years ago
"keyring": {
"type": "string",
8 years ago
"description": "keyring is the path to key ring for rados user; default is /etc/ceph/keyring; optional; see http://releases.k8s.io/HEAD/examples/rbd/README.md#how-to-use-it"
},
8 years ago
"monitors": {
8 years ago
"type": "array",
8 years ago
"description": "a collection of Ceph monitors; see http://releases.k8s.io/HEAD/examples/rbd/README.md#how-to-use-it",
8 years ago
"items": {
"type": "string",
8 years ago
"description": "a collection of Ceph monitors; see http://releases.k8s.io/HEAD/examples/rbd/README.md#how-to-use-it"
8 years ago
}
},
8 years ago
"pool": {
"type": "string",
8 years ago
"description": "rados pool name; default is rbd; optional; see http://releases.k8s.io/HEAD/examples/rbd/README.md#how-to-use-it"
},
8 years ago
"readOnly": {
"type": "boolean",
"description": "rbd volume to be mounted with read-only permissions; see http://releases.k8s.io/HEAD/examples/rbd/README.md#how-to-use-it"
8 years ago
},
8 years ago
"secretRef": {
"$ref": "#/definitions/kubernetes_LocalObjectReference",
"javaType": "io.fabric8.kubernetes.api.model.LocalObjectReference"
8 years ago
},
8 years ago
"user": {
8 years ago
"type": "string",
8 years ago
"description": "rados user name; default is admin; optional; see http://releases.k8s.io/HEAD/examples/rbd/README.md#how-to-use-it"
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.RBDVolumeSource"
},
8 years ago
"kubernetes_ReplicationController": {
8 years ago
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"kind": {
"type": "string",
"description": "",
8 years ago
"default": "ReplicationController",
8 years ago
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
},
8 years ago
"spec": {
"$ref": "#/definitions/kubernetes_ReplicationControllerSpec",
"javaType": "io.fabric8.kubernetes.api.model.ReplicationControllerSpec"
},
8 years ago
"status": {
"$ref": "#/definitions/kubernetes_ReplicationControllerStatus",
"javaType": "io.fabric8.kubernetes.api.model.ReplicationControllerStatus"
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.ReplicationController",
8 years ago
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.HasMetadata"
8 years ago
]
},
8 years ago
"kubernetes_ReplicationControllerList": {
8 years ago
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"items": {
"type": "array",
8 years ago
"description": "list of replication controllers; see http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md",
8 years ago
"items": {
8 years ago
"$ref": "#/definitions/kubernetes_ReplicationController",
"javaType": "io.fabric8.kubernetes.api.model.ReplicationController"
8 years ago
}
},
"kind": {
"type": "string",
"description": "",
8 years ago
"default": "ReplicationControllerList",
8 years ago
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ListMeta",
"javaType": "io.fabric8.kubernetes.api.model.ListMeta"
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.ReplicationControllerList",
8 years ago
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.KubernetesResource",
"io.fabric8.kubernetes.api.model.KubernetesResourceList"
]
},
8 years ago
"kubernetes_ReplicationControllerSpec": {
"type": "object",
"description": "",
"properties": {
"replicas": {
"type": "integer",
"description": "number of replicas desired; defaults to 1; see http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#what-is-a-replication-controller"
},
"selector": {
"type": "object",
"description": "label keys and values that must match in order to be controlled by this replication controller",
"additionalProperties": {
"type": "string",
"description": "label keys and values that must match in order to be controlled by this replication controller"
},
"javaType": "java.util.Map\u003cString,String\u003e"
},
"template": {
"$ref": "#/definitions/kubernetes_PodTemplateSpec",
"javaType": "io.fabric8.kubernetes.api.model.PodTemplateSpec"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.ReplicationControllerSpec"
},
"kubernetes_ReplicationControllerStatus": {
"type": "object",
"description": "",
"properties": {
"observedGeneration": {
"type": "integer",
"description": "reflects the generation of the most recently observed replication controller",
"javaType": "Long"
},
"replicas": {
"type": "integer",
"description": "most recently oberved number of replicas; see http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#what-is-a-replication-controller"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.ReplicationControllerStatus"
},
"kubernetes_ResourceQuota": {
8 years ago
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"kind": {
"type": "string",
"description": "",
8 years ago
"default": "ResourceQuota",
"required": true
8 years ago
},
"metadata": {
"$ref": "#/definitions/kubernetes_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
},
8 years ago
"spec": {
"$ref": "#/definitions/kubernetes_ResourceQuotaSpec",
"javaType": "io.fabric8.kubernetes.api.model.ResourceQuotaSpec"
},
8 years ago
"status": {
"$ref": "#/definitions/kubernetes_ResourceQuotaStatus",
"javaType": "io.fabric8.kubernetes.api.model.ResourceQuotaStatus"
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.ResourceQuota",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.HasMetadata"
]
},
8 years ago
"kubernetes_ResourceQuotaList": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
8 years ago
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
8 years ago
},
8 years ago
"items": {
"type": "array",
"description": "items is a list of ResourceQuota objects; see http://releases.k8s.io/HEAD/docs/design/admission_control_resource_quota.md#admissioncontrol-plugin-resourcequota",
"items": {
"$ref": "#/definitions/kubernetes_ResourceQuota",
"javaType": "io.fabric8.kubernetes.api.model.ResourceQuota"
}
8 years ago
},
"kind": {
8 years ago
"type": "string",
"description": "",
8 years ago
"default": "ResourceQuotaList",
"required": true
8 years ago
},
"metadata": {
8 years ago
"$ref": "#/definitions/kubernetes_ListMeta",
"javaType": "io.fabric8.kubernetes.api.model.ListMeta"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.ResourceQuotaList",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.KubernetesResource",
"io.fabric8.kubernetes.api.model.KubernetesResourceList"
]
},
"kubernetes_ResourceQuotaSpec": {
"type": "object",
"description": "",
"properties": {
"hard": {
"type": "object",
"description": "hard is the set of desired hard limits for each named resource; see http://releases.k8s.io/HEAD/docs/design/admission_control_resource_quota.md#admissioncontrol-plugin-resourcequota",
"additionalProperties": {
"$ref": "#/definitions/kubernetes_resource_Quantity",
"javaType": "io.fabric8.kubernetes.api.model.Quantity"
},
"javaType": "java.util.Map\u003cString,io.fabric8.kubernetes.api.model.Quantity\u003e"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.ResourceQuotaSpec"
},
"kubernetes_ResourceQuotaStatus": {
"type": "object",
"description": "",
"properties": {
"hard": {
"type": "object",
"description": "hard is the set of enforced hard limits for each named resource; see http://releases.k8s.io/HEAD/docs/design/admission_control_resource_quota.md#admissioncontrol-plugin-resourcequota",
"additionalProperties": {
"$ref": "#/definitions/kubernetes_resource_Quantity",
"javaType": "io.fabric8.kubernetes.api.model.Quantity"
},
"javaType": "java.util.Map\u003cString,io.fabric8.kubernetes.api.model.Quantity\u003e"
8 years ago
},
8 years ago
"used": {
"type": "object",
"description": "used is the current observed total usage of the resource in the namespace",
"additionalProperties": {
"$ref": "#/definitions/kubernetes_resource_Quantity",
"javaType": "io.fabric8.kubernetes.api.model.Quantity"
},
"javaType": "java.util.Map\u003cString,io.fabric8.kubernetes.api.model.Quantity\u003e"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.ResourceQuotaStatus"
},
"kubernetes_ResourceRequirements": {
"type": "object",
"description": "",
"properties": {
"limits": {
"type": "object",
"description": "Maximum amount of compute resources allowed; see http://releases.k8s.io/HEAD/docs/design/resources.md#resource-specifications",
"additionalProperties": {
"$ref": "#/definitions/kubernetes_resource_Quantity",
"javaType": "io.fabric8.kubernetes.api.model.Quantity"
},
"javaType": "java.util.Map\u003cString,io.fabric8.kubernetes.api.model.Quantity\u003e"
},
8 years ago
"requests": {
"type": "object",
"description": "Minimum amount of resources requested; if Requests is omitted for a container",
"additionalProperties": {
"$ref": "#/definitions/kubernetes_resource_Quantity",
"javaType": "io.fabric8.kubernetes.api.model.Quantity"
},
"javaType": "java.util.Map\u003cString,io.fabric8.kubernetes.api.model.Quantity\u003e"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.ResourceRequirements"
},
"kubernetes_RunAsUserStrategyOptions": {
"type": "object",
"description": "",
"properties": {
"type": {
8 years ago
"type": "string",
8 years ago
"description": "strategy used to generate RunAsUser"
8 years ago
},
8 years ago
"uid": {
"type": "integer",
"description": "the uid to always run as; required for MustRunAs",
"javaType": "Long"
},
"uidRangeMax": {
"type": "integer",
"description": "max value for range based allocators",
"javaType": "Long"
},
"uidRangeMin": {
"type": "integer",
"description": "min value for range based allocators",
"javaType": "Long"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.RunAsUserStrategyOptions"
},
"kubernetes_SELinuxContextStrategyOptions": {
"type": "object",
"description": "",
"properties": {
"seLinuxOptions": {
"$ref": "#/definitions/kubernetes_SELinuxOptions",
"javaType": "io.fabric8.kubernetes.api.model.SELinuxOptions"
},
"type": {
8 years ago
"type": "string",
8 years ago
"description": "strategy used to generate the SELinux context"
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.SELinuxContextStrategyOptions"
},
"kubernetes_SELinuxOptions": {
"type": "object",
"description": "",
"properties": {
"level": {
"type": "string",
"description": "the level label to apply to the container; see http://releases.k8s.io/HEAD/docs/user-guide/labels.md"
},
"role": {
"type": "string",
"description": "the role label to apply to the container; see http://releases.k8s.io/HEAD/docs/user-guide/labels.md"
},
"type": {
"type": "string",
"description": "the type label to apply to the container; see http://releases.k8s.io/HEAD/docs/user-guide/labels.md"
},
"user": {
"type": "string",
"description": "the user label to apply to the container; see http://releases.k8s.io/HEAD/docs/user-guide/labels.md"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.SELinuxOptions"
},
8 years ago
"kubernetes_Secret": {
8 years ago
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
8 years ago
"data": {
"type": "object",
"description": "data contains the secret data. Each key must be a valid DNS_SUBDOMAIN or leading dot followed by valid DNS_SUBDOMAIN. Each value must be a base64 encoded string as described in https://tools.ietf.org/html/rfc4648#section-4",
"additionalProperties": {
"type": "string",
"description": "data contains the secret data. Each key must be a valid DNS_SUBDOMAIN or leading dot followed by valid DNS_SUBDOMAIN. Each value must be a base64 encoded string as described in https://tools.ietf.org/html/rfc4648#section-4"
},
"javaType": "java.util.Map\u003cString,String\u003e"
},
8 years ago
"kind": {
"type": "string",
"description": "",
8 years ago
"default": "Secret",
8 years ago
"required": true
},
"metadata": {
8 years ago
"$ref": "#/definitions/kubernetes_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
},
"type": {
"type": "string",
"description": "type facilitates programmatic handling of secret data"
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.Secret",
"javaInterfaces": [
8 years ago
"io.fabric8.kubernetes.api.model.HasMetadata"
]
},
8 years ago
"kubernetes_SecretList": {
8 years ago
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"items": {
"type": "array",
8 years ago
"description": "items is a list of secret objects; see http://releases.k8s.io/HEAD/docs/user-guide/secrets.md",
"items": {
8 years ago
"$ref": "#/definitions/kubernetes_Secret",
"javaType": "io.fabric8.kubernetes.api.model.Secret"
}
},
8 years ago
"kind": {
"type": "string",
"description": "",
8 years ago
"default": "SecretList",
8 years ago
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ListMeta",
"javaType": "io.fabric8.kubernetes.api.model.ListMeta"
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.SecretList",
8 years ago
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.KubernetesResource",
"io.fabric8.kubernetes.api.model.KubernetesResourceList"
8 years ago
]
},
8 years ago
"kubernetes_SecretVolumeSource": {
"type": "object",
"description": "",
"properties": {
"secretName": {
"type": "string",
"description": "secretName is the name of a secret in the pod's namespace; see http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#secrets"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.SecretVolumeSource"
},
"kubernetes_SecurityContext": {
"type": "object",
"description": "",
"properties": {
"capabilities": {
"$ref": "#/definitions/kubernetes_Capabilities",
"javaType": "io.fabric8.kubernetes.api.model.Capabilities"
},
"privileged": {
"type": "boolean",
"description": "run the container in privileged mode; see http://releases.k8s.io/HEAD/docs/design/security_context.md#security-context"
},
"runAsNonRoot": {
"type": "boolean",
"description": "indicates the container must be run as a non-root user either by specifying the runAsUser or in the image specification"
},
"runAsUser": {
"type": "integer",
"description": "the user id that runs the first process in the container; see http://releases.k8s.io/HEAD/docs/design/security_context.md#security-context",
"javaType": "Long"
},
"seLinuxOptions": {
"$ref": "#/definitions/kubernetes_SELinuxOptions",
"javaType": "io.fabric8.kubernetes.api.model.SELinuxOptions"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.SecurityContext"
},
"kubernetes_SecurityContextConstraints": {
8 years ago
"type": "object",
"description": "",
"properties": {
8 years ago
"allowHostDirVolumePlugin": {
"type": "boolean",
"description": "allow the use of the host dir volume plugin"
},
"allowHostNetwork": {
"type": "boolean",
"description": "allow the use of the hostNetwork in the pod spec"
},
"allowHostPorts": {
"type": "boolean",
"description": "allow the use of the host ports in the containers"
},
"allowPrivilegedContainer": {
"type": "boolean",
"description": "allow containers to run as privileged"
},
"allowedCapabilities": {
"type": "array",
"description": "capabilities that are allowed to be added",
"items": {
"type": "string",
"description": "capabilities that are allowed to be added"
}
},
8 years ago
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
8 years ago
"groups": {
"type": "array",
"description": "groups allowed to use this SecurityContextConstraints",
"items": {
"type": "string",
"description": "groups allowed to use this SecurityContextConstraints"
}
},
8 years ago
"kind": {
"type": "string",
"description": "",
8 years ago
"default": "SecurityContextConstraints",
8 years ago
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
},
8 years ago
"runAsUser": {
"$ref": "#/definitions/kubernetes_RunAsUserStrategyOptions",
"javaType": "io.fabric8.kubernetes.api.model.RunAsUserStrategyOptions"
8 years ago
},
8 years ago
"seLinuxContext": {
"$ref": "#/definitions/kubernetes_SELinuxContextStrategyOptions",
"javaType": "io.fabric8.kubernetes.api.model.SELinuxContextStrategyOptions"
},
"users": {
"type": "array",
"description": "users allowed to use this SecurityContextConstraints",
"items": {
"type": "string",
"description": "users allowed to use this SecurityContextConstraints"
}
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.SecurityContextConstraints",
8 years ago
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.HasMetadata"
]
},
8 years ago
"kubernetes_SecurityContextConstraintsList": {
8 years ago
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"items": {
"type": "array",
8 years ago
"description": "",
8 years ago
"items": {
8 years ago
"$ref": "#/definitions/kubernetes_SecurityContextConstraints",
"javaType": "io.fabric8.kubernetes.api.model.SecurityContextConstraints"
8 years ago
}
},
"kind": {
"type": "string",
"description": "",
8 years ago
"default": "SecurityContextConstraintsList",
8 years ago
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ListMeta",
"javaType": "io.fabric8.kubernetes.api.model.ListMeta"
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.SecurityContextConstraintsList",
8 years ago
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.KubernetesResource",
"io.fabric8.kubernetes.api.model.KubernetesResourceList"
]
},
8 years ago
"kubernetes_Service": {
8 years ago
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
8 years ago
},
"kind": {
"type": "string",
"description": "",
8 years ago
"default": "Service",
"required": true
8 years ago
},
"metadata": {
"$ref": "#/definitions/kubernetes_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
8 years ago
},
"spec": {
"$ref": "#/definitions/kubernetes_ServiceSpec",
"javaType": "io.fabric8.kubernetes.api.model.ServiceSpec"
},
"status": {
"$ref": "#/definitions/kubernetes_ServiceStatus",
"javaType": "io.fabric8.kubernetes.api.model.ServiceStatus"
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.Service",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.HasMetadata"
]
},
8 years ago
"kubernetes_ServiceAccount": {
"type": "object",
"description": "",
"properties": {
8 years ago
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"imagePullSecrets": {
8 years ago
"type": "array",
8 years ago
"description": "list of references to secrets in the same namespace available for pulling container images; see http://releases.k8s.io/HEAD/docs/user-guide/secrets.md#manually-specifying-an-imagepullsecret",
8 years ago
"items": {
8 years ago
"$ref": "#/definitions/kubernetes_LocalObjectReference",
"javaType": "io.fabric8.kubernetes.api.model.LocalObjectReference"
8 years ago
}
8 years ago
},
"kind": {
"type": "string",
8 years ago
"description": "",
"default": "ServiceAccount",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
},
"secrets": {
"type": "array",
"description": "list of secrets that can be used by pods running as this service account; see http://releases.k8s.io/HEAD/docs/user-guide/secrets.md",
"items": {
"$ref": "#/definitions/kubernetes_ObjectReference",
"javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
}
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.ServiceAccount",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.HasMetadata"
]
},
8 years ago
"kubernetes_ServiceAccountList": {
8 years ago
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
8 years ago
"items": {
"type": "array",
"description": "list of ServiceAccounts; see http://releases.k8s.io/HEAD/docs/design/service_accounts.md#service-accounts",
"items": {
"$ref": "#/definitions/kubernetes_ServiceAccount",
"javaType": "io.fabric8.kubernetes.api.model.ServiceAccount"
}
},
8 years ago
"kind": {
"type": "string",
"description": "",
8 years ago
"default": "ServiceAccountList",
8 years ago
"required": true
},
"metadata": {
8 years ago
"$ref": "#/definitions/kubernetes_ListMeta",
"javaType": "io.fabric8.kubernetes.api.model.ListMeta"
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.ServiceAccountList",
8 years ago
"javaInterfaces": [
8 years ago
"io.fabric8.kubernetes.api.model.KubernetesResource",
"io.fabric8.kubernetes.api.model.KubernetesResourceList"
8 years ago
]
},
8 years ago
"kubernetes_ServiceList": {
8 years ago
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"items": {
"type": "array",
8 years ago
"description": "list of services",
"items": {
8 years ago
"$ref": "#/definitions/kubernetes_Service",
"javaType": "io.fabric8.kubernetes.api.model.Service"
}
8 years ago
},
"kind": {
"type": "string",
"description": "",
8 years ago
"default": "ServiceList",
8 years ago
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ListMeta",
"javaType": "io.fabric8.kubernetes.api.model.ListMeta"
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.ServiceList",
8 years ago
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.KubernetesResource",
"io.fabric8.kubernetes.api.model.KubernetesResourceList"
8 years ago
]
},
8 years ago
"kubernetes_ServicePort": {
8 years ago
"type": "object",
"description": "",
"properties": {
8 years ago
"name": {
8 years ago
"type": "string",
8 years ago
"description": "the name of this port; optional if only one port is defined",
"maxLength": 63,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
8 years ago
},
8 years ago
"nodePort": {
"type": "integer",
"description": "the port on each node on which this service is exposed when type=NodePort or LoadBalancer; usually assigned by the system; if specified"
8 years ago
},
8 years ago
"port": {
"type": "integer",
"description": "the port number that is exposed"
8 years ago
},
8 years ago
"protocol": {
"type": "string",
"description": "the protocol used by this port; must be UDP or TCP; TCP if unspecified"
},
"targetPort": {
"$ref": "#/definitions/kubernetes_util_IntOrString",
"javaType": "io.fabric8.kubernetes.api.model.IntOrString"
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.ServicePort"
},
8 years ago
"kubernetes_ServiceSpec": {
8 years ago
"type": "object",
"description": "",
"properties": {
8 years ago
"clusterIP": {
"type": "string",
8 years ago
"description": "IP address of the service; usually assigned by the system; if specified"
8 years ago
},
8 years ago
"deprecatedPublicIPs": {
"type": "array",
"description": "deprecated. externally visible IPs (e.g. load balancers) that should be proxied to this service",
"items": {
"type": "string",
"description": "deprecated. externally visible IPs (e.g. load balancers) that should be proxied to this service"
}
8 years ago
},
8 years ago
"portalIP": {
8 years ago
"type": "string",
8 years ago
"description": "deprecated"
8 years ago
},
8 years ago
"ports": {
"type": "array",
"description": "ports exposed by the service; see http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies",
"items": {
"$ref": "#/definitions/kubernetes_ServicePort",
"javaType": "io.fabric8.kubernetes.api.model.ServicePort"
}
},
"selector": {
"type": "object",
"description": "label keys and values that must match in order to receive traffic for this service; if empty",
"additionalProperties": {
"type": "string",
"description": "label keys and values that must match in order to receive traffic for this service; if empty"
},
"javaType": "java.util.Map\u003cString,String\u003e"
},
"sessionAffinity": {
"type": "string",
8 years ago
"description": "enable client IP based session affinity; must be ClientIP or None; defaults to None; see http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies"
8 years ago
},
8 years ago
"type": {
"type": "string",
8 years ago
"description": "type of this service; must be ClusterIP"
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.ServiceSpec"
},
8 years ago
"kubernetes_ServiceStatus": {
8 years ago
"type": "object",
"description": "",
"properties": {
8 years ago
"loadBalancer": {
"$ref": "#/definitions/kubernetes_LoadBalancerStatus",
"javaType": "io.fabric8.kubernetes.api.model.LoadBalancerStatus"
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.ServiceStatus"
},
8 years ago
"kubernetes_Status": {
8 years ago
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
8 years ago
},
8 years ago
"code": {
"type": "integer",
"description": "suggested HTTP return code for this status; 0 if not set"
},
"details": {
"$ref": "#/definitions/kubernetes_StatusDetails",
"javaType": "io.fabric8.kubernetes.api.model.StatusDetails"
},
"kind": {
"type": "string",
"description": "",
8 years ago
"default": "Status",
"required": true
8 years ago
},
8 years ago
"message": {
"type": "string",
"description": "human-readable description of the status of this operation"
8 years ago
},
"metadata": {
8 years ago
"$ref": "#/definitions/kubernetes_ListMeta",
"javaType": "io.fabric8.kubernetes.api.model.ListMeta"
},
8 years ago
"reason": {
"type": "string",
"description": "machine-readable description of why this operation is in the 'Failure' status; if this value is empty there is no information available; a reason clarifies an HTTP status code but does not override it"
},
8 years ago
"status": {
"type": "string",
"description": "status of the operation; either Success"
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.Status"
},
8 years ago
"kubernetes_StatusCause": {
8 years ago
"type": "object",
"description": "",
"properties": {
8 years ago
"field": {
"type": "string",
8 years ago
"description": "field of the resource that has caused this error"
8 years ago
},
8 years ago
"message": {
8 years ago
"type": "string",
8 years ago
"description": "human-readable description of the cause of the error; this field may be presented as-is to a reader"
},
8 years ago
"reason": {
"type": "string",
"description": "machine-readable description of the cause of the error; if this value is empty there is no information available"
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.StatusCause"
},
8 years ago
"kubernetes_StatusDetails": {
8 years ago
"type": "object",
"description": "",
"properties": {
8 years ago
"causes": {
"type": "array",
"description": "the Causes array includes more details associated with the StatusReason failure; not all StatusReasons may provide detailed causes",
"items": {
"$ref": "#/definitions/kubernetes_StatusCause",
"javaType": "io.fabric8.kubernetes.api.model.StatusCause"
}
8 years ago
},
"kind": {
"type": "string",
8 years ago
"description": "the kind attribute of the resource associated with the status StatusReason; on some operations may differ from the requested resource Kind; see http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds"
8 years ago
},
8 years ago
"name": {
"type": "string",
"description": "the name attribute of the resource associated with the status StatusReason (when there is a single name which can be described)"
8 years ago
},
8 years ago
"retryAfterSeconds": {
"type": "integer",
"description": "the number of seconds before the client should attempt to retry this operation"
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.StatusDetails"
},
8 years ago
"kubernetes_TCPSocketAction": {
"type": "object",
"description": "",
"properties": {
"port": {
"$ref": "#/definitions/kubernetes_util_IntOrString",
"javaType": "io.fabric8.kubernetes.api.model.IntOrString"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.TCPSocketAction"
},
"kubernetes_TypeMeta": {
8 years ago
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
8 years ago
"description": "version of the schema the object should have; see http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources"
8 years ago
},
"kind": {
"type": "string",
8 years ago
"description": "kind of object"
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.TypeMeta"
},
8 years ago
"kubernetes_Volume": {
8 years ago
"type": "object",
"description": "",
"properties": {
8 years ago
"awsElasticBlockStore": {
"$ref": "#/definitions/kubernetes_AWSElasticBlockStoreVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.AWSElasticBlockStoreVolumeSource"
8 years ago
},
8 years ago
"cephfs": {
"$ref": "#/definitions/kubernetes_CephFSVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.CephFSVolumeSource"
},
8 years ago
"emptyDir": {
"$ref": "#/definitions/kubernetes_EmptyDirVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.EmptyDirVolumeSource"
},
"gcePersistentDisk": {
"$ref": "#/definitions/kubernetes_GCEPersistentDiskVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.GCEPersistentDiskVolumeSource"
},
"gitRepo": {
"$ref": "#/definitions/kubernetes_GitRepoVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.GitRepoVolumeSource"
},
"glusterfs": {
"$ref": "#/definitions/kubernetes_GlusterfsVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.GlusterfsVolumeSource"
},
"hostPath": {
"$ref": "#/definitions/kubernetes_HostPathVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.HostPathVolumeSource"
},
"iscsi": {
"$ref": "#/definitions/kubernetes_ISCSIVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.ISCSIVolumeSource"
8 years ago
},
"metadata": {
8 years ago
"$ref": "#/definitions/kubernetes_MetadataVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.MetadataVolumeSource"
},
8 years ago
"name": {
8 years ago
"type": "string",
8 years ago
"description": "volume name; must be a DNS_LABEL and unique within the pod; see http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names",
"maxLength": 63,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
8 years ago
},
8 years ago
"nfs": {
"$ref": "#/definitions/kubernetes_NFSVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.NFSVolumeSource"
},
8 years ago
"persistentVolumeClaim": {
"$ref": "#/definitions/kubernetes_PersistentVolumeClaimVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeClaimVolumeSource"
},
"rbd": {
"$ref": "#/definitions/kubernetes_RBDVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.RBDVolumeSource"
},
"secret": {
"$ref": "#/definitions/kubernetes_SecretVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.SecretVolumeSource"
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.Volume"
},
8 years ago
"kubernetes_VolumeMount": {
8 years ago
"type": "object",
"description": "",
"properties": {
8 years ago
"mountPath": {
8 years ago
"type": "string",
8 years ago
"description": "path within the container at which the volume should be mounted"
8 years ago
},
8 years ago
"name": {
8 years ago
"type": "string",
8 years ago
"description": "name of the volume to mount"
},
"readOnly": {
"type": "boolean",
"description": "mounted read-only if true"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.VolumeMount"
},
"kubernetes_VolumeSource": {
"type": "object",
"description": "",
"properties": {
"awsElasticBlockStore": {
"$ref": "#/definitions/kubernetes_AWSElasticBlockStoreVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.AWSElasticBlockStoreVolumeSource"
},
"cephfs": {
"$ref": "#/definitions/kubernetes_CephFSVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.CephFSVolumeSource"
},
"emptyDir": {
"$ref": "#/definitions/kubernetes_EmptyDirVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.EmptyDirVolumeSource"
},
"gcePersistentDisk": {
"$ref": "#/definitions/kubernetes_GCEPersistentDiskVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.GCEPersistentDiskVolumeSource"
},
"gitRepo": {
"$ref": "#/definitions/kubernetes_GitRepoVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.GitRepoVolumeSource"
},
"glusterfs": {
"$ref": "#/definitions/kubernetes_GlusterfsVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.GlusterfsVolumeSource"
},
"hostPath": {
"$ref": "#/definitions/kubernetes_HostPathVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.HostPathVolumeSource"
},
"iscsi": {
"$ref": "#/definitions/kubernetes_ISCSIVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.ISCSIVolumeSource"
},
"metadata": {
8 years ago
"$ref": "#/definitions/kubernetes_MetadataVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.MetadataVolumeSource"
},
"nfs": {
"$ref": "#/definitions/kubernetes_NFSVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.NFSVolumeSource"
},
"persistentVolumeClaim": {
"$ref": "#/definitions/kubernetes_PersistentVolumeClaimVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeClaimVolumeSource"
},
"rbd": {
"$ref": "#/definitions/kubernetes_RBDVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.RBDVolumeSource"
},
"secret": {
"$ref": "#/definitions/kubernetes_SecretVolumeSource",
"javaType": "io.fabric8.kubernetes.api.model.SecretVolumeSource"
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.VolumeSource"
},
8 years ago
"kubernetes_config_AuthInfo": {
8 years ago
"type": "object",
"description": "",
"properties": {
8 years ago
"client-certificate": {
8 years ago
"type": "string",
8 years ago
"description": ""
8 years ago
},
8 years ago
"client-certificate-data": {
8 years ago
"type": "string",
8 years ago
"description": ""
8 years ago
},
8 years ago
"client-key": {
"type": "string",
"description": ""
8 years ago
},
8 years ago
"client-key-data": {
"type": "string",
"description": ""
},
"extensions": {
8 years ago
"type": "array",
8 years ago
"description": "",
8 years ago
"items": {
8 years ago
"$ref": "#/definitions/kubernetes_config_NamedExtension",
"javaType": "io.fabric8.kubernetes.api.model.NamedExtension"
8 years ago
}
},
8 years ago
"password": {
8 years ago
"type": "string",
8 years ago
"description": ""
8 years ago
},
8 years ago
"token": {
"type": "string",
"description": ""
},
"username": {
"type": "string",
"description": ""
8 years ago
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.AuthInfo"
},
8 years ago
"kubernetes_config_Cluster": {
8 years ago
"type": "object",
"description": "",
"properties": {
8 years ago
"api-version": {
8 years ago
"type": "string",
8 years ago
"description": ""
8 years ago
},
8 years ago
"certificate-authority": {
"type": "string",
"description": ""
},
"certificate-authority-data": {
"type": "string",
"description": ""
},
"extensions": {
8 years ago
"type": "array",
8 years ago
"description": "",
8 years ago
"items": {
8 years ago
"$ref": "#/definitions/kubernetes_config_NamedExtension",
"javaType": "io.fabric8.kubernetes.api.model.NamedExtension"
8 years ago
}
},
8 years ago
"insecure-skip-tls-verify": {
"type": "boolean",
"description": ""
8 years ago
},
8 years ago
"server": {
"type": "string",
"description": ""
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.Cluster"
8 years ago
},
8 years ago
"kubernetes_config_Config": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": ""
},
"clusters": {
"type": "array",
"description": "",
"items": {
"$ref": "#/definitions/kubernetes_config_NamedCluster",
"javaType": "io.fabric8.kubernetes.api.model.NamedCluster"
}
},
"contexts": {
"type": "array",
"description": "",
"items": {
"$ref": "#/definitions/kubernetes_config_NamedContext",
"javaType": "io.fabric8.kubernetes.api.model.NamedContext"
}
},
"current-context": {
"type": "string",
"description": ""
},
"extensions": {
"type": "array",
"description": "",
"items": {
"$ref": "#/definitions/kubernetes_config_NamedExtension",
"javaType": "io.fabric8.kubernetes.api.model.NamedExtension"
}
},
"kind": {
"type": "string",
"description": ""
},
"preferences": {
"$ref": "#/definitions/kubernetes_config_Preferences",
"javaType": "io.fabric8.kubernetes.api.model.Preferences"
},
"users": {
"type": "array",
"description": "",
"items": {
"$ref": "#/definitions/kubernetes_config_NamedAuthInfo",
"javaType": "io.fabric8.kubernetes.api.model.NamedAuthInfo"
}
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.Config"
8 years ago
},
8 years ago
"kubernetes_config_Context": {
"type": "object",
"description": "",
"properties": {
"cluster": {
"type": "string",
"description": ""
},
"extensions": {
"type": "array",
"description": "",
"items": {
"$ref": "#/definitions/kubernetes_config_NamedExtension",
"javaType": "io.fabric8.kubernetes.api.model.NamedExtension"
}
},
"namespace": {
"type": "string",
"description": ""
},
"user": {
"type": "string",
"description": ""
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.Context"
8 years ago
},
8 years ago
"kubernetes_config_NamedAuthInfo": {
"type": "object",
"description": "",
"properties": {
"name": {
"type": "string",
"description": ""
},
"user": {
"$ref": "#/definitions/kubernetes_config_AuthInfo",
"javaType": "io.fabric8.kubernetes.api.model.AuthInfo"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.NamedAuthInfo"
8 years ago
},
8 years ago
"kubernetes_config_NamedCluster": {
"type": "object",
"description": "",
"properties": {
"cluster": {
"$ref": "#/definitions/kubernetes_config_Cluster",
"javaType": "io.fabric8.kubernetes.api.model.Cluster"
},
"name": {
"type": "string",
"description": ""
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.NamedCluster"
8 years ago
},
8 years ago
"kubernetes_config_NamedContext": {
"type": "object",
"description": "",
"properties": {
"context": {
"$ref": "#/definitions/kubernetes_config_Context",
"javaType": "io.fabric8.kubernetes.api.model.Context"
},
"name": {
"type": "string",
"description": ""
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.NamedContext"
8 years ago
},
8 years ago
"kubernetes_config_NamedExtension": {
"type": "object",
"description": "",
"properties": {
"extension": {
"$ref": "#/definitions/kubernetes_runtime_RawExtension",
"javaType": "io.fabric8.kubernetes.api.model.HasMetadata"
},
"name": {
"type": "string",
"description": ""
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.NamedExtension"
8 years ago
},
8 years ago
"kubernetes_config_Preferences": {
"type": "object",
"description": "",
"properties": {
"colors": {
"type": "boolean",
"description": ""
},
"extensions": {
"type": "array",
"description": "",
"items": {
"$ref": "#/definitions/kubernetes_config_NamedExtension",
"javaType": "io.fabric8.kubernetes.api.model.NamedExtension"
}
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.Preferences"
8 years ago
},
8 years ago
"kubernetes_resource_Quantity": {
"type": "object",
"description": "",
"properties": {
"Amount": {
"$ref": "#/definitions/speter_inf_Dec",
"javaType": "io.fabric8.openshift.api.model.Dec"
},
"Format": {
"type": "string",
"description": ""
}
},
"additionalProperties": true,
8 years ago
"javaType": "io.fabric8.kubernetes.api.model.Quantity"
},
8 years ago
"kubernetes_runtime_RawExtension": {
"type": "object",
"description": "",
"properties": {
"RawJSON": {
"type": "string",
"description": ""
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.HasMetadata"
8 years ago
},
8 years ago
"kubernetes_util_IntOrString": {
"type": "object",
"description": "",
"properties": {
"IntVal": {
"type": "integer",
"description": ""
},
"Kind": {
"type": "integer",
"description": ""
},
"StrVal": {
"type": "string",
"description": ""
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.IntOrString"
8 years ago
},
8 years ago
"kubernetes_watch_WatchEvent": {
"type": "object",
"description": "",
"properties": {
"object": {
"$ref": "#/definitions/kubernetes_runtime_RawExtension",
"javaType": "io.fabric8.kubernetes.api.model.HasMetadata"
},
"type": {
"type": "string",
"description": "the type of watch event; may be ADDED"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.WatchEvent"
8 years ago
},
8 years ago
"os_authorization_AuthorizationAttributes": {
"type": "object",
"description": "",
"properties": {
"content": {
"$ref": "#/definitions/kubernetes_runtime_RawExtension",
"javaType": "io.fabric8.kubernetes.api.model.HasMetadata"
},
"namespace": {
"type": "string",
"description": "namespace of the action being requested"
},
"resource": {
"type": "string",
"description": "one of the existing resource types"
},
"resourceName": {
"type": "string",
"description": "name of the resource being requested for a get or delete"
},
"verb": {
"type": "string",
"description": "one of get"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.AuthorizationAttributes"
8 years ago
},
8 years ago
"os_authorization_ClusterPolicy": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"kind": {
"type": "string",
"description": "",
"default": "ClusterPolicy",
"required": true
},
"lastModified": {
"type": "string",
"description": "last time any part of the object was created"
},
"metadata": {
"$ref": "#/definitions/kubernetes_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
},
"roles": {
"type": "array",
"description": "all the roles held by this policy",
"items": {
"$ref": "#/definitions/os_authorization_NamedClusterRole",
"javaType": "io.fabric8.openshift.api.model.NamedClusterRole"
}
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.ClusterPolicy",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.HasMetadata"
]
8 years ago
},
8 years ago
"os_authorization_ClusterPolicyBinding": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"kind": {
"type": "string",
"description": "",
"default": "ClusterPolicyBinding",
"required": true
},
"lastModified": {
"type": "string",
"description": "last time any part of the object was created"
},
"metadata": {
"$ref": "#/definitions/kubernetes_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
},
"policyRef": {
"$ref": "#/definitions/kubernetes_ObjectReference",
"javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
},
"roleBindings": {
"type": "array",
"description": "all the role bindings held by this policy",
"items": {
"$ref": "#/definitions/os_authorization_NamedClusterRoleBinding",
"javaType": "io.fabric8.openshift.api.model.NamedClusterRoleBinding"
}
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.ClusterPolicyBinding",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.HasMetadata"
]
8 years ago
},
8 years ago
"os_authorization_ClusterPolicyBindingList": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"items": {
"type": "array",
"description": "list of cluster policy bindings",
"items": {
"$ref": "#/definitions/os_authorization_ClusterPolicyBinding",
"javaType": "io.fabric8.openshift.api.model.ClusterPolicyBinding"
}
},
"kind": {
"type": "string",
"description": "",
"default": "ClusterPolicyBindingList",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ListMeta",
"javaType": "io.fabric8.kubernetes.api.model.ListMeta"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.ClusterPolicyBindingList",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.KubernetesResource",
"io.fabric8.kubernetes.api.model.KubernetesResourceList"
]
8 years ago
},
8 years ago
"os_authorization_ClusterPolicyList": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"items": {
"type": "array",
"description": "list of cluster policies",
"items": {
"$ref": "#/definitions/os_authorization_ClusterPolicy",
"javaType": "io.fabric8.openshift.api.model.ClusterPolicy"
}
},
"kind": {
"type": "string",
"description": "",
"default": "ClusterPolicyList",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ListMeta",
"javaType": "io.fabric8.kubernetes.api.model.ListMeta"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.ClusterPolicyList",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.KubernetesResource",
"io.fabric8.kubernetes.api.model.KubernetesResourceList"
]
8 years ago
},
8 years ago
"os_authorization_ClusterRole": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"kind": {
"type": "string",
"description": "",
"default": "ClusterRole",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
},
"rules": {
"type": "array",
"description": "list of policy rules",
"items": {
"$ref": "#/definitions/os_authorization_PolicyRule",
"javaType": "io.fabric8.openshift.api.model.PolicyRule"
}
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.ClusterRole",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.HasMetadata"
]
8 years ago
},
8 years ago
"os_authorization_ClusterRoleBinding": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"groupNames": {
"type": "array",
"description": "all the groups directly bound to the role",
"items": {
"type": "string",
"description": "all the groups directly bound to the role"
}
},
"kind": {
"type": "string",
"description": "",
"default": "ClusterRoleBinding",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
},
"roleRef": {
"$ref": "#/definitions/kubernetes_ObjectReference",
"javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
},
"subjects": {
"type": "array",
"description": "references to subjects bound to the role. Only User",
"items": {
"$ref": "#/definitions/kubernetes_ObjectReference",
"javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
}
},
"userNames": {
"type": "array",
"description": "all user names directly bound to the role",
"items": {
"type": "string",
"description": "all user names directly bound to the role"
}
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.ClusterRoleBinding",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.HasMetadata"
]
8 years ago
},
8 years ago
"os_authorization_ClusterRoleBindingList": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"items": {
"type": "array",
"description": "list of cluster role bindings",
"items": {
"$ref": "#/definitions/os_authorization_ClusterRoleBinding",
"javaType": "io.fabric8.openshift.api.model.ClusterRoleBinding"
}
},
"kind": {
"type": "string",
"description": "",
"default": "ClusterRoleBindingList",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ListMeta",
"javaType": "io.fabric8.kubernetes.api.model.ListMeta"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.ClusterRoleBindingList",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.KubernetesResource",
"io.fabric8.kubernetes.api.model.KubernetesResourceList"
]
8 years ago
},
8 years ago
"os_authorization_LocalSubjectAccessReview": {
"type": "object",
"description": "",
"properties": {
"TypeMeta": {
"$ref": "#/definitions/kubernetes_TypeMeta",
"javaType": "io.fabric8.kubernetes.api.model.TypeMeta"
},
"content": {
"$ref": "#/definitions/kubernetes_runtime_RawExtension",
"javaType": "io.fabric8.kubernetes.api.model.HasMetadata"
},
"groups": {
"type": "array",
"description": "optional",
"items": {
"type": "string",
"description": "optional"
}
},
"namespace": {
"type": "string",
"description": "namespace of the action being requested"
},
"resource": {
"type": "string",
"description": "one of the existing resource types"
},
"resourceName": {
"type": "string",
"description": "name of the resource being requested for a get or delete"
},
"user": {
"type": "string",
"description": "optional"
},
"verb": {
"type": "string",
"description": "one of get"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.LocalSubjectAccessReview"
8 years ago
},
8 years ago
"os_authorization_NamedClusterRole": {
"type": "object",
"description": "",
"properties": {
"name": {
"type": "string",
"description": "name of the cluster role"
},
"role": {
"$ref": "#/definitions/os_authorization_ClusterRole",
"javaType": "io.fabric8.openshift.api.model.ClusterRole"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.NamedClusterRole"
8 years ago
},
8 years ago
"os_authorization_NamedClusterRoleBinding": {
"type": "object",
"description": "",
"properties": {
"name": {
"type": "string",
"description": "name of the cluster role binding"
},
"roleBinding": {
"$ref": "#/definitions/os_authorization_ClusterRoleBinding",
"javaType": "io.fabric8.openshift.api.model.ClusterRoleBinding"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.NamedClusterRoleBinding"
8 years ago
},
8 years ago
"os_authorization_NamedRole": {
"type": "object",
"description": "",
"properties": {
"name": {
"type": "string",
"description": "name of the role"
},
"role": {
"$ref": "#/definitions/os_authorization_Role",
"javaType": "io.fabric8.openshift.api.model.Role"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.NamedRole"
8 years ago
},
8 years ago
"os_authorization_NamedRoleBinding": {
"type": "object",
"description": "",
"properties": {
"name": {
"type": "string",
"description": "name of the roleBinding"
},
"roleBinding": {
"$ref": "#/definitions/os_authorization_RoleBinding",
"javaType": "io.fabric8.openshift.api.model.RoleBinding"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.NamedRoleBinding"
8 years ago
},
8 years ago
"os_authorization_Policy": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"kind": {
"type": "string",
"description": "",
"default": "Policy",
"required": true
},
"lastModified": {
"type": "string",
"description": "last time that any part of the policy was created"
},
"metadata": {
"$ref": "#/definitions/kubernetes_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
},
"roles": {
"type": "array",
"description": "roles held by this policy",
"items": {
"$ref": "#/definitions/os_authorization_NamedRole",
"javaType": "io.fabric8.openshift.api.model.NamedRole"
}
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.Policy",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.HasMetadata"
]
8 years ago
},
8 years ago
"os_authorization_PolicyBinding": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"kind": {
"type": "string",
"description": "",
"default": "PolicyBinding",
"required": true
},
"lastModified": {
"type": "string",
"description": "last time that any part of the object was created"
},
"metadata": {
"$ref": "#/definitions/kubernetes_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
},
"policyRef": {
"$ref": "#/definitions/kubernetes_ObjectReference",
"javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
},
"roleBindings": {
"type": "array",
"description": "all roleBindings held by this policyBinding",
"items": {
"$ref": "#/definitions/os_authorization_NamedRoleBinding",
"javaType": "io.fabric8.openshift.api.model.NamedRoleBinding"
}
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.PolicyBinding",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.HasMetadata"
]
8 years ago
},
8 years ago
"os_authorization_PolicyBindingList": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"items": {
"type": "array",
"description": "list of policy bindings",
"items": {
"$ref": "#/definitions/os_authorization_PolicyBinding",
"javaType": "io.fabric8.openshift.api.model.PolicyBinding"
}
},
"kind": {
"type": "string",
"description": "",
"default": "PolicyBindingList",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ListMeta",
"javaType": "io.fabric8.kubernetes.api.model.ListMeta"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.PolicyBindingList",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.KubernetesResource",
"io.fabric8.kubernetes.api.model.KubernetesResourceList"
]
8 years ago
},
8 years ago
"os_authorization_PolicyList": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"items": {
"type": "array",
"description": "list of policies",
"items": {
"$ref": "#/definitions/os_authorization_Policy",
"javaType": "io.fabric8.openshift.api.model.Policy"
}
},
"kind": {
"type": "string",
"description": "",
"default": "PolicyList",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ListMeta",
"javaType": "io.fabric8.kubernetes.api.model.ListMeta"
}
8 years ago
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.PolicyList",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.KubernetesResource",
"io.fabric8.kubernetes.api.model.KubernetesResourceList"
]
},
8 years ago
"os_authorization_PolicyRule": {
"type": "object",
"description": "",
"properties": {
"attributeRestrictions": {
"$ref": "#/definitions/kubernetes_runtime_RawExtension",
"javaType": "io.fabric8.kubernetes.api.model.HasMetadata"
},
"nonResourceURLs": {
"type": "array",
"description": "set of partial urls that a user should have access to. *s are allowed",
"items": {
"type": "string",
"description": "set of partial urls that a user should have access to. *s are allowed"
}
},
"resourceNames": {
"type": "array",
"description": "optional white list of names that the rule applies to. An empty set means that everything is allowed.",
"items": {
"type": "string",
"description": "optional white list of names that the rule applies to. An empty set means that everything is allowed."
}
},
"resources": {
"type": "array",
"description": "list of resources this rule applies to. * represents all resources.",
"items": {
"type": "string",
"description": "list of resources this rule applies to. * represents all resources."
}
},
"verbs": {
"type": "array",
"description": "list of verbs that apply to ALL the resourceKinds and attributeRestrictions contained in this rule. The verb * represents all kinds.",
"items": {
"type": "string",
"description": "list of verbs that apply to ALL the resourceKinds and attributeRestrictions contained in this rule. The verb * represents all kinds."
}
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.PolicyRule"
},
8 years ago
"os_authorization_Role": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"kind": {
"type": "string",
"description": "",
"default": "Role",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
},
"rules": {
"type": "array",
"description": "all the rules for this role",
"items": {
"$ref": "#/definitions/os_authorization_PolicyRule",
"javaType": "io.fabric8.openshift.api.model.PolicyRule"
}
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.Role",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.HasMetadata"
]
},
8 years ago
"os_authorization_RoleBinding": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"groupNames": {
"type": "array",
"description": "all the groups directly bound to the role",
"items": {
"type": "string",
"description": "all the groups directly bound to the role"
}
8 years ago
},
"kind": {
"type": "string",
"description": "",
"default": "RoleBinding",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
},
"roleRef": {
"$ref": "#/definitions/kubernetes_ObjectReference",
"javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
},
"subjects": {
"type": "array",
"description": "references to subjects bound to the role. Only User",
"items": {
"$ref": "#/definitions/kubernetes_ObjectReference",
"javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
}
8 years ago
},
"userNames": {
"type": "array",
"description": "all the usernames directly bound to the role",
"items": {
"type": "string",
"description": "all the usernames directly bound to the role"
}
8 years ago
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.RoleBinding",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.HasMetadata"
]
},
"os_authorization_RoleBindingList": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"items": {
"type": "array",
"description": "list of role bindings",
"items": {
"$ref": "#/definitions/os_authorization_RoleBinding",
"javaType": "io.fabric8.openshift.api.model.RoleBinding"
}
},
"kind": {
"type": "string",
"description": "",
"default": "RoleBindingList",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ListMeta",
"javaType": "io.fabric8.kubernetes.api.model.ListMeta"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.RoleBindingList",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.KubernetesResource",
"io.fabric8.kubernetes.api.model.KubernetesResourceList"
]
},
"os_authorization_RoleList": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"items": {
"type": "array",
"description": "list of roles",
"items": {
"$ref": "#/definitions/os_authorization_Role",
"javaType": "io.fabric8.openshift.api.model.Role"
}
},
"kind": {
"type": "string",
"description": "",
"default": "RoleList",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ListMeta",
"javaType": "io.fabric8.kubernetes.api.model.ListMeta"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.RoleList",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.KubernetesResource",
"io.fabric8.kubernetes.api.model.KubernetesResourceList"
]
},
"os_authorization_SubjectAccessReview": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"content": {
"$ref": "#/definitions/kubernetes_runtime_RawExtension",
"javaType": "io.fabric8.kubernetes.api.model.HasMetadata"
},
"groups": {
"type": "array",
"description": "optional",
"items": {
"type": "string",
"description": "optional"
}
8 years ago
},
"kind": {
"type": "string",
"description": "",
"default": "SubjectAccessReview",
"required": true
},
"namespace": {
"type": "string",
"description": "namespace of the action being requested"
},
"resource": {
"type": "string",
"description": "one of the existing resource types"
},
"resourceName": {
"type": "string",
"description": "name of the resource being requested for a get or delete"
},
"user": {
"type": "string",
"description": "optional"
},
"verb": {
"type": "string",
"description": "one of get"
}
8 years ago
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.SubjectAccessReview"
},
"os_authorization_SubjectAccessReviewResponse": {
"type": "object",
"description": "",
"properties": {
"allowed": {
"type": "boolean",
"description": "true if the action would be allowed"
},
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"kind": {
"type": "string",
"description": "",
"default": "SubjectAccessReviewResponse",
"required": true
},
"namespace": {
"type": "string",
"description": "the namespace used for the access review"
},
"reason": {
"type": "string",
"description": "reason is optional"
}
8 years ago
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.SubjectAccessReviewResponse"
},
"os_build_Build": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"kind": {
"type": "string",
"description": "",
"default": "Build",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
},
"spec": {
"$ref": "#/definitions/os_build_BuildSpec",
"javaType": "io.fabric8.openshift.api.model.BuildSpec"
},
"status": {
"$ref": "#/definitions/os_build_BuildStatus",
"javaType": "io.fabric8.openshift.api.model.BuildStatus"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.Build",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.HasMetadata"
]
},
"os_build_BuildConfig": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"kind": {
"type": "string",
"description": "",
"default": "BuildConfig",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
},
"spec": {
"$ref": "#/definitions/os_build_BuildConfigSpec",
"javaType": "io.fabric8.openshift.api.model.BuildConfigSpec"
},
"status": {
"$ref": "#/definitions/os_build_BuildConfigStatus",
"javaType": "io.fabric8.openshift.api.model.BuildConfigStatus"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.BuildConfig",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.HasMetadata"
]
},
"os_build_BuildConfigList": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
8 years ago
"items": {
"type": "array",
"description": "list of build configs",
"items": {
"$ref": "#/definitions/os_build_BuildConfig",
"javaType": "io.fabric8.openshift.api.model.BuildConfig"
}
8 years ago
},
"kind": {
"type": "string",
"description": "",
"default": "BuildConfigList",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ListMeta",
"javaType": "io.fabric8.kubernetes.api.model.ListMeta"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.BuildConfigList",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.KubernetesResource",
"io.fabric8.kubernetes.api.model.KubernetesResourceList"
]
},
"os_build_BuildConfigSpec": {
"type": "object",
"description": "",
"properties": {
"output": {
"$ref": "#/definitions/os_build_BuildOutput",
"javaType": "io.fabric8.openshift.api.model.BuildOutput"
},
"resources": {
"$ref": "#/definitions/kubernetes_ResourceRequirements",
"javaType": "io.fabric8.kubernetes.api.model.ResourceRequirements"
},
"revision": {
"$ref": "#/definitions/os_build_SourceRevision",
"javaType": "io.fabric8.openshift.api.model.SourceRevision"
},
"serviceAccount": {
"type": "string",
"description": "the name of the service account to use to run pods created by the build"
},
"source": {
"$ref": "#/definitions/os_build_BuildSource",
"javaType": "io.fabric8.openshift.api.model.BuildSource"
},
"strategy": {
"$ref": "#/definitions/os_build_BuildStrategy",
"javaType": "io.fabric8.openshift.api.model.BuildStrategy"
},
"triggers": {
"type": "array",
"description": "determines how new builds can be launched from a build config. if no triggers are defined",
"items": {
"$ref": "#/definitions/os_build_BuildTriggerPolicy",
"javaType": "io.fabric8.openshift.api.model.BuildTriggerPolicy"
}
}
8 years ago
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.BuildConfigSpec"
},
"os_build_BuildConfigStatus": {
"type": "object",
"description": "",
"properties": {
"lastVersion": {
"type": "integer",
"description": "used to inform about number of last triggered build"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.BuildConfigStatus"
},
"os_build_BuildList": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"items": {
"type": "array",
"description": "list of builds",
"items": {
"$ref": "#/definitions/os_build_Build",
"javaType": "io.fabric8.openshift.api.model.Build"
}
},
"kind": {
"type": "string",
"description": "",
"default": "BuildList",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ListMeta",
"javaType": "io.fabric8.kubernetes.api.model.ListMeta"
}
8 years ago
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.BuildList",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.KubernetesResource",
"io.fabric8.kubernetes.api.model.KubernetesResourceList"
]
},
"os_build_BuildOutput": {
"type": "object",
"description": "",
"properties": {
"pushSecret": {
"$ref": "#/definitions/kubernetes_LocalObjectReference",
"javaType": "io.fabric8.kubernetes.api.model.LocalObjectReference"
},
"to": {
"$ref": "#/definitions/kubernetes_ObjectReference",
"javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
}
8 years ago
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.BuildOutput"
},
"os_build_BuildRequest": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"from": {
"$ref": "#/definitions/kubernetes_ObjectReference",
"javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
},
"kind": {
"type": "string",
"description": "",
"default": "BuildRequest",
"required": true
},
"lastVersion": {
"type": "integer",
"description": "LastVersion of the BuildConfig that triggered this build"
},
"metadata": {
"$ref": "#/definitions/kubernetes_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
},
"revision": {
"$ref": "#/definitions/os_build_SourceRevision",
"javaType": "io.fabric8.openshift.api.model.SourceRevision"
},
"triggeredByImage": {
"$ref": "#/definitions/kubernetes_ObjectReference",
"javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
}
8 years ago
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.BuildRequest",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.HasMetadata"
]
},
"os_build_BuildSource": {
"type": "object",
"description": "",
"properties": {
"contextDir": {
"type": "string",
"description": "specifies sub-directory where the source code for the application exists"
},
"git": {
"$ref": "#/definitions/os_build_GitBuildSource",
"javaType": "io.fabric8.openshift.api.model.GitBuildSource"
},
"sourceSecret": {
"$ref": "#/definitions/kubernetes_LocalObjectReference",
"javaType": "io.fabric8.kubernetes.api.model.LocalObjectReference"
},
"type": {
"type": "string",
"description": "type of source control management system"
}
8 years ago
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.BuildSource"
},
"os_build_BuildSpec": {
"type": "object",
"description": "",
"properties": {
"output": {
"$ref": "#/definitions/os_build_BuildOutput",
"javaType": "io.fabric8.openshift.api.model.BuildOutput"
},
"resources": {
"$ref": "#/definitions/kubernetes_ResourceRequirements",
"javaType": "io.fabric8.kubernetes.api.model.ResourceRequirements"
},
"revision": {
"$ref": "#/definitions/os_build_SourceRevision",
"javaType": "io.fabric8.openshift.api.model.SourceRevision"
},
"serviceAccount": {
"type": "string",
"description": "the name of the service account to use to run pods created by the build"
},
"source": {
"$ref": "#/definitions/os_build_BuildSource",
"javaType": "io.fabric8.openshift.api.model.BuildSource"
},
"strategy": {
"$ref": "#/definitions/os_build_BuildStrategy",
"javaType": "io.fabric8.openshift.api.model.BuildStrategy"
}
8 years ago
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.BuildSpec"
},
"os_build_BuildStatus": {
"type": "object",
"description": "",
"properties": {
"cancelled": {
"type": "boolean",
"description": "describes if a canceling event was triggered for the build"
},
"completionTimestamp": {
"type": "string",
"description": "server time when the pod running this build stopped running"
},
"config": {
"$ref": "#/definitions/kubernetes_ObjectReference",
"javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
},
"duration": {
"type": "integer",
"description": "amount of time the build has been running",
"javaType": "Long"
},
"message": {
"type": "string",
"description": "human-readable message indicating details about why the build has this status"
},
"phase": {
"type": "string",
"description": "observed point in the build lifecycle"
},
"startTimestamp": {
"type": "string",
"description": "server time when this build started running in a pod"
}
8 years ago
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.BuildStatus"
},
"os_build_BuildStrategy": {
"type": "object",
"description": "",
"properties": {
"customStrategy": {
"$ref": "#/definitions/os_build_CustomBuildStrategy",
"javaType": "io.fabric8.openshift.api.model.CustomBuildStrategy"
},
"dockerStrategy": {
"$ref": "#/definitions/os_build_DockerBuildStrategy",
"javaType": "io.fabric8.openshift.api.model.DockerBuildStrategy"
},
"sourceStrategy": {
"$ref": "#/definitions/os_build_SourceBuildStrategy",
"javaType": "io.fabric8.openshift.api.model.SourceBuildStrategy"
},
"type": {
"type": "string",
"description": "identifies the type of build strategy"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.BuildStrategy"
},
"os_build_BuildTriggerPolicy": {
"type": "object",
"description": "",
"properties": {
"generic": {
"$ref": "#/definitions/os_build_WebHookTrigger",
"javaType": "io.fabric8.openshift.api.model.WebHookTrigger"
},
"github": {
"$ref": "#/definitions/os_build_WebHookTrigger",
"javaType": "io.fabric8.openshift.api.model.WebHookTrigger"
},
"imageChange": {
"$ref": "#/definitions/os_build_ImageChangeTrigger",
"javaType": "io.fabric8.openshift.api.model.ImageChangeTrigger"
},
"type": {
"type": "string",
"description": "type of build trigger"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.BuildTriggerPolicy"
},
"os_build_CustomBuildStrategy": {
"type": "object",
"description": "",
"properties": {
"env": {
"type": "array",
"description": "additional environment variables you want to pass into a builder container",
"items": {
"$ref": "#/definitions/kubernetes_EnvVar",
"javaType": "io.fabric8.kubernetes.api.model.EnvVar"
}
8 years ago
},
"exposeDockerSocket": {
"type": "boolean",
"description": "allow running Docker commands (and build Docker images) from inside the container"
},
"forcePull": {
"type": "boolean",
"description": "forces pulling of builder image from remote registry if true"
},
"from": {
"$ref": "#/definitions/kubernetes_ObjectReference",
"javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
},
"pullSecret": {
"$ref": "#/definitions/kubernetes_LocalObjectReference",
"javaType": "io.fabric8.kubernetes.api.model.LocalObjectReference"
}
8 years ago
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.CustomBuildStrategy"
},
"os_build_DockerBuildStrategy": {
"type": "object",
"description": "",
"properties": {
"env": {
"type": "array",
"description": "additional environment variables you want to pass into a builder container",
"items": {
"$ref": "#/definitions/kubernetes_EnvVar",
"javaType": "io.fabric8.kubernetes.api.model.EnvVar"
}
8 years ago
},
"forcePull": {
"type": "boolean",
"description": "forces the source build to pull the image if true"
},
"from": {
"$ref": "#/definitions/kubernetes_ObjectReference",
"javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
},
"noCache": {
"type": "boolean",
"description": "if true"
},
"pullSecret": {
"$ref": "#/definitions/kubernetes_LocalObjectReference",
"javaType": "io.fabric8.kubernetes.api.model.LocalObjectReference"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.DockerBuildStrategy"
},
"os_build_GitBuildSource": {
"type": "object",
"description": "",
"properties": {
"httpProxy": {
"type": "string",
"description": "specifies a http proxy to be used during git clone operations"
},
"httpsProxy": {
"type": "string",
"description": "specifies a https proxy to be used during git clone operations"
},
"ref": {
"type": "string",
"description": "identifies the branch/tag/ref to build"
},
"uri": {
"type": "string",
"description": "points to the source that will be built"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.GitBuildSource"
},
"os_build_GitSourceRevision": {
"type": "object",
"description": "",
"properties": {
"author": {
"$ref": "#/definitions/os_build_SourceControlUser",
"javaType": "io.fabric8.openshift.api.model.SourceControlUser"
},
"commit": {
"type": "string",
"description": "hash identifying a specific commit"
},
"committer": {
"$ref": "#/definitions/os_build_SourceControlUser",
"javaType": "io.fabric8.openshift.api.model.SourceControlUser"
},
"message": {
"type": "string",
"description": "description of a specific commit"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.GitSourceRevision"
},
"os_build_ImageChangeTrigger": {
"type": "object",
"description": "",
"properties": {
"from": {
"$ref": "#/definitions/kubernetes_ObjectReference",
"javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
},
"lastTriggeredImageID": {
"type": "string",
"description": "used internally to save last used image ID for build"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.ImageChangeTrigger"
},
"os_build_SourceBuildStrategy": {
"type": "object",
"description": "",
"properties": {
"env": {
"type": "array",
"description": "additional environment variables you want to pass into a builder container",
"items": {
"$ref": "#/definitions/kubernetes_EnvVar",
"javaType": "io.fabric8.kubernetes.api.model.EnvVar"
}
8 years ago
},
"forcePull": {
"type": "boolean",
"description": "forces the source build to pull the image if true"
},
"from": {
"$ref": "#/definitions/kubernetes_ObjectReference",
"javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
},
"incremental": {
"type": "boolean",
"description": "forces the source build to do incremental builds if true"
},
"pullSecret": {
"$ref": "#/definitions/kubernetes_LocalObjectReference",
"javaType": "io.fabric8.kubernetes.api.model.LocalObjectReference"
},
"scripts": {
"type": "string",
"description": "location of the source scripts"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.SourceBuildStrategy"
},
"os_build_SourceControlUser": {
"type": "object",
"description": "",
"properties": {
"email": {
"type": "string",
"description": "e-mail of the source control user"
},
"name": {
"type": "string",
"description": "name of the source control user"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.SourceControlUser"
},
"os_build_SourceRevision": {
"type": "object",
"description": "",
"properties": {
"git": {
"$ref": "#/definitions/os_build_GitSourceRevision",
"javaType": "io.fabric8.openshift.api.model.GitSourceRevision"
},
"type": {
"type": "string",
"description": "type of the build source"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.SourceRevision"
},
"os_build_WebHookTrigger": {
"type": "object",
"description": "",
"properties": {
"secret": {
"type": "string",
"description": "secret used to validate requests"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.WebHookTrigger"
},
"os_deploy_CustomDeploymentStrategyParams": {
"type": "object",
"description": "",
"properties": {
"command": {
"type": "array",
"description": "optionally overrides the container command (default is specified by the image)",
"items": {
"type": "string",
"description": "optionally overrides the container command (default is specified by the image)"
}
8 years ago
},
"environment": {
"type": "array",
"description": "environment variables provided to the deployment process container",
"items": {
"$ref": "#/definitions/kubernetes_EnvVar",
"javaType": "io.fabric8.kubernetes.api.model.EnvVar"
}
8 years ago
},
"image": {
"type": "string",
"description": "a Docker image which can carry out a deployment"
}
8 years ago
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.CustomDeploymentStrategyParams"
},
"os_deploy_DeploymentCause": {
"type": "object",
"description": "",
"properties": {
"imageTrigger": {
"$ref": "#/definitions/os_deploy_DeploymentCauseImageTrigger",
"javaType": "io.fabric8.openshift.api.model.DeploymentCauseImageTrigger"
},
"type": {
"type": "string",
"description": "the type of trigger that resulted in a new deployment"
}
8 years ago
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.DeploymentCause"
},
"os_deploy_DeploymentCauseImageTrigger": {
"type": "object",
"description": "",
"properties": {
"from": {
"$ref": "#/definitions/kubernetes_ObjectReference",
"javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
}
8 years ago
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.DeploymentCauseImageTrigger"
},
"os_deploy_DeploymentConfig": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
8 years ago
"kind": {
"type": "string",
"description": "",
"default": "DeploymentConfig",
"required": true
},
8 years ago
"metadata": {
"$ref": "#/definitions/kubernetes_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
},
8 years ago
"spec": {
"$ref": "#/definitions/os_deploy_DeploymentConfigSpec",
"javaType": "io.fabric8.openshift.api.model.DeploymentConfigSpec"
},
8 years ago
"status": {
"$ref": "#/definitions/os_deploy_DeploymentConfigStatus",
"javaType": "io.fabric8.openshift.api.model.DeploymentConfigStatus"
}
8 years ago
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.DeploymentConfig",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.HasMetadata"
]
},
"os_deploy_DeploymentConfigList": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"items": {
"type": "array",
"description": "a list of deployment configs",
"items": {
"$ref": "#/definitions/os_deploy_DeploymentConfig",
"javaType": "io.fabric8.openshift.api.model.DeploymentConfig"
}
8 years ago
},
"kind": {
"type": "string",
"description": "",
"default": "DeploymentConfigList",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ListMeta",
"javaType": "io.fabric8.kubernetes.api.model.ListMeta"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.DeploymentConfigList",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.KubernetesResource",
"io.fabric8.kubernetes.api.model.KubernetesResourceList"
]
},
"os_deploy_DeploymentConfigSpec": {
"type": "object",
"description": "",
"properties": {
"replicas": {
"type": "integer",
"description": "the desired number of replicas"
},
"selector": {
"type": "object",
"description": "a label query over pods that should match the replicas count",
"additionalProperties": {
"type": "string",
"description": "a label query over pods that should match the replicas count"
},
"javaType": "java.util.Map\u003cString,String\u003e"
},
"strategy": {
"$ref": "#/definitions/os_deploy_DeploymentStrategy",
"javaType": "io.fabric8.openshift.api.model.DeploymentStrategy"
},
"template": {
"$ref": "#/definitions/kubernetes_PodTemplateSpec",
"javaType": "io.fabric8.kubernetes.api.model.PodTemplateSpec"
},
"triggers": {
"type": "array",
"description": "how new deployments are triggered",
"items": {
"$ref": "#/definitions/os_deploy_DeploymentTriggerPolicy",
"javaType": "io.fabric8.openshift.api.model.DeploymentTriggerPolicy"
}
8 years ago
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.DeploymentConfigSpec"
},
"os_deploy_DeploymentConfigStatus": {
"type": "object",
"description": "",
"properties": {
"details": {
"$ref": "#/definitions/os_deploy_DeploymentDetails",
"javaType": "io.fabric8.openshift.api.model.DeploymentDetails"
},
"latestVersion": {
"type": "integer",
"description": "used to determine whether the current deployment is out of sync"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.DeploymentConfigStatus"
},
"os_deploy_DeploymentDetails": {
"type": "object",
"description": "",
"properties": {
"causes": {
"type": "array",
"description": "extended data associated with all the causes for creating a new deployment",
"items": {
"$ref": "#/definitions/os_deploy_DeploymentCause",
"javaType": "io.fabric8.openshift.api.model.DeploymentCause"
}
8 years ago
},
"message": {
"type": "string",
"description": "a user specified change message"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.DeploymentDetails"
},
"os_deploy_DeploymentStrategy": {
"type": "object",
"description": "",
"properties": {
"customParams": {
"$ref": "#/definitions/os_deploy_CustomDeploymentStrategyParams",
"javaType": "io.fabric8.openshift.api.model.CustomDeploymentStrategyParams"
},
"recreateParams": {
"$ref": "#/definitions/os_deploy_RecreateDeploymentStrategyParams",
"javaType": "io.fabric8.openshift.api.model.RecreateDeploymentStrategyParams"
},
"resources": {
"$ref": "#/definitions/kubernetes_ResourceRequirements",
"javaType": "io.fabric8.kubernetes.api.model.ResourceRequirements"
},
"rollingParams": {
"$ref": "#/definitions/os_deploy_RollingDeploymentStrategyParams",
"javaType": "io.fabric8.openshift.api.model.RollingDeploymentStrategyParams"
},
"type": {
"type": "string",
"description": "the name of a deployment strategy"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.DeploymentStrategy"
},
"os_deploy_DeploymentTriggerImageChangeParams": {
"type": "object",
"description": "",
"properties": {
"automatic": {
"type": "boolean",
"description": "whether detection of a new tag value should trigger a deployment"
},
"containerNames": {
"type": "array",
"description": "restricts tag updates to a set of container names in the pod",
"items": {
"type": "string",
"description": "restricts tag updates to a set of container names in the pod"
}
8 years ago
},
"from": {
"$ref": "#/definitions/kubernetes_ObjectReference",
"javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
},
"lastTriggeredImage": {
"type": "string",
"description": "the last image to be triggered"
}
8 years ago
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.DeploymentTriggerImageChangeParams"
},
"os_deploy_DeploymentTriggerPolicy": {
"type": "object",
"description": "",
"properties": {
"imageChangeParams": {
"$ref": "#/definitions/os_deploy_DeploymentTriggerImageChangeParams",
"javaType": "io.fabric8.openshift.api.model.DeploymentTriggerImageChangeParams"
},
"type": {
"type": "string",
"description": "the type of the trigger"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.DeploymentTriggerPolicy"
},
"os_deploy_ExecNewPodHook": {
"type": "object",
"description": "",
"properties": {
"command": {
"type": "array",
"description": "the hook command and its arguments",
"items": {
"type": "string",
"description": "the hook command and its arguments"
}
8 years ago
},
"containerName": {
"type": "string",
"description": "the name of a container from the pod template whose image will be used for the hook container"
},
"env": {
"type": "array",
"description": "environment variables provided to the hook container",
"items": {
"$ref": "#/definitions/kubernetes_EnvVar",
"javaType": "io.fabric8.kubernetes.api.model.EnvVar"
}
}
},
8 years ago
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.ExecNewPodHook"
},
"os_deploy_LifecycleHook": {
"type": "object",
"description": "",
"properties": {
"execNewPod": {
"$ref": "#/definitions/os_deploy_ExecNewPodHook",
"javaType": "io.fabric8.openshift.api.model.ExecNewPodHook"
},
"failurePolicy": {
"type": "string",
"description": "what action to take if the hook fails"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.LifecycleHook"
},
"os_deploy_RecreateDeploymentStrategyParams": {
"type": "object",
"description": "",
"properties": {
"post": {
"$ref": "#/definitions/os_deploy_LifecycleHook",
"javaType": "io.fabric8.openshift.api.model.LifecycleHook"
},
"pre": {
"$ref": "#/definitions/os_deploy_LifecycleHook",
"javaType": "io.fabric8.openshift.api.model.LifecycleHook"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.RecreateDeploymentStrategyParams"
},
"os_deploy_RollingDeploymentStrategyParams": {
"type": "object",
"description": "",
"properties": {
"intervalSeconds": {
"type": "integer",
"description": "the time to wait between polling deployment status after update",
"javaType": "Long"
},
8 years ago
"post": {
"$ref": "#/definitions/os_deploy_LifecycleHook",
"javaType": "io.fabric8.openshift.api.model.LifecycleHook"
},
8 years ago
"pre": {
"$ref": "#/definitions/os_deploy_LifecycleHook",
"javaType": "io.fabric8.openshift.api.model.LifecycleHook"
},
8 years ago
"timeoutSeconds": {
"type": "integer",
"description": "the time to wait for updates before giving up",
"javaType": "Long"
},
8 years ago
"updatePercent": {
"type": "integer",
"description": "the percentage of replicas to scale up or down each interval (negative value switches scale order to down/up instead of up/down)"
},
8 years ago
"updatePeriodSeconds": {
"type": "integer",
"description": "the time to wait between individual pod updates",
"javaType": "Long"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.RollingDeploymentStrategyParams"
},
"os_image_Image": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
8 years ago
"dockerImageManifest": {
"type": "string",
"description": "raw JSON of the manifest"
},
8 years ago
"dockerImageMetadata": {
"$ref": "#/definitions/kubernetes_runtime_RawExtension",
"javaType": "io.fabric8.kubernetes.api.model.HasMetadata"
},
8 years ago
"dockerImageMetadataVersion": {
"type": "string",
"description": "conveys version of the object"
},
"dockerImageReference": {
"type": "string",
"description": "string that can be used to pull this image"
},
"kind": {
"type": "string",
"description": "",
"default": "Image",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.Image",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.HasMetadata"
]
},
"os_image_ImageList": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"items": {
"type": "array",
"description": "list of image objects",
"items": {
"$ref": "#/definitions/os_image_Image",
"javaType": "io.fabric8.openshift.api.model.Image"
}
8 years ago
},
"kind": {
"type": "string",
"description": "",
"default": "ImageList",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ListMeta",
"javaType": "io.fabric8.kubernetes.api.model.ListMeta"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.ImageList",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.KubernetesResource",
"io.fabric8.kubernetes.api.model.KubernetesResourceList"
]
},
"os_image_ImageStream": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"kind": {
"type": "string",
"description": "",
"default": "ImageStream",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
},
"spec": {
"$ref": "#/definitions/os_image_ImageStreamSpec",
"javaType": "io.fabric8.openshift.api.model.ImageStreamSpec"
},
"status": {
"$ref": "#/definitions/os_image_ImageStreamStatus",
"javaType": "io.fabric8.openshift.api.model.ImageStreamStatus"
}
8 years ago
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.ImageStream",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.HasMetadata"
]
8 years ago
},
"os_image_ImageStreamList": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"items": {
"type": "array",
"description": "list of image stream objects",
"items": {
"$ref": "#/definitions/os_image_ImageStream",
"javaType": "io.fabric8.openshift.api.model.ImageStream"
}
8 years ago
},
"kind": {
"type": "string",
"description": "",
"default": "ImageStreamList",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ListMeta",
"javaType": "io.fabric8.kubernetes.api.model.ListMeta"
}
8 years ago
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.ImageStreamList",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.KubernetesResource",
"io.fabric8.kubernetes.api.model.KubernetesResourceList"
]
},
"os_image_ImageStreamSpec": {
"type": "object",
"description": "",
"properties": {
"dockerImageRepository": {
"type": "string",
"description": "optional field if specified this stream is backed by a Docker repository on this server"
},
"tags": {
"type": "array",
"description": "map arbitrary string values to specific image locators",
"items": {
"$ref": "#/definitions/os_image_NamedTagReference",
"javaType": "io.fabric8.openshift.api.model.NamedTagReference"
}
8 years ago
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.ImageStreamSpec"
},
"os_image_ImageStreamStatus": {
"type": "object",
"description": "",
"properties": {
"dockerImageRepository": {
"type": "string",
"description": "represents the effective location this stream may be accessed at"
},
8 years ago
"tags": {
"type": "array",
"description": "historical record of images associated with each tag",
"items": {
"$ref": "#/definitions/os_image_NamedTagEventList",
"javaType": "io.fabric8.openshift.api.model.NamedTagEventList"
}
8 years ago
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.ImageStreamStatus"
},
"os_image_NamedTagEventList": {
"type": "object",
"description": "",
"properties": {
"items": {
"type": "array",
"description": "list of tag events related to the tag",
"items": {
"$ref": "#/definitions/os_image_TagEvent",
"javaType": "io.fabric8.openshift.api.model.TagEvent"
}
8 years ago
},
"tag": {
"type": "string",
"description": "the tag"
}
8 years ago
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.NamedTagEventList"
},
"os_image_NamedTagReference": {
"type": "object",
"description": "",
"properties": {
"annotations": {
"type": "object",
"description": "annotations associated with images using this tag",
"additionalProperties": {
"type": "string",
"description": "annotations associated with images using this tag"
},
"javaType": "java.util.Map\u003cString,String\u003e"
},
"from": {
"$ref": "#/definitions/kubernetes_ObjectReference",
"javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
},
"name": {
"type": "string",
"description": "name of tag"
8 years ago
}
},
8 years ago
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.NamedTagReference"
},
"os_image_TagEvent": {
"type": "object",
"description": "",
"properties": {
"created": {
"type": "string",
"description": "when the event was created"
},
"dockerImageReference": {
"type": "string",
"description": "the string that can be used to pull this image"
},
"image": {
"type": "string",
"description": "the image"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.TagEvent"
},
"os_oauth_OAuthAccessToken": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"authorizeToken": {
"type": "string",
"description": "contains the token that authorized this token"
},
"clientName": {
"type": "string",
"description": "references the client that created this token"
},
"expiresIn": {
"type": "integer",
"description": "is the seconds from creation time before this token expires",
"javaType": "Long"
},
"kind": {
"type": "string",
"description": "",
"default": "OAuthAccessToken",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
},
8 years ago
"redirectURI": {
"type": "string",
"description": "redirection URI associated with the token"
},
8 years ago
"refreshToken": {
"type": "string",
"description": "optional value by which this token can be renewed"
},
8 years ago
"scopes": {
"type": "array",
"description": "list of requested scopes",
"items": {
"type": "string",
"description": "list of requested scopes"
}
},
8 years ago
"userName": {
"type": "string",
"description": "user name associated with this token"
},
"userUID": {
"type": "string",
"description": "unique UID associated with this token"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.OAuthAccessToken",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.HasMetadata"
]
},
"os_oauth_OAuthAccessTokenList": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"items": {
"type": "array",
"description": "list of oauth access tokens",
"items": {
"$ref": "#/definitions/os_oauth_OAuthAccessToken",
"javaType": "io.fabric8.openshift.api.model.OAuthAccessToken"
}
},
8 years ago
"kind": {
"type": "string",
"description": "",
"default": "OAuthAccessTokenList",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ListMeta",
"javaType": "io.fabric8.kubernetes.api.model.ListMeta"
8 years ago
}
8 years ago
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.OAuthAccessTokenList",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.KubernetesResource",
"io.fabric8.kubernetes.api.model.KubernetesResourceList"
]
8 years ago
},
"os_oauth_OAuthAuthorizeToken": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"clientName": {
"type": "string",
"description": "references the client that created this token"
},
"expiresIn": {
"type": "integer",
"description": "seconds from creation time before this token expires",
"javaType": "Long"
},
"kind": {
"type": "string",
"description": "",
"default": "OAuthAuthorizeToken",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
},
"redirectURI": {
"type": "string",
"description": "redirection URI associated with the token"
},
"scopes": {
"type": "array",
"description": "list of requested scopes",
"items": {
"type": "string",
"description": "list of requested scopes"
}
},
"state": {
"type": "string",
"description": "state data from request"
},
"userName": {
"type": "string",
"description": "user name associated with this token"
},
"userUID": {
"type": "string",
"description": "unique UID associated with this token. userUID and userName must both match for this token to be valid"
8 years ago
}
},
8 years ago
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.OAuthAuthorizeToken",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.HasMetadata"
]
},
"os_oauth_OAuthAuthorizeTokenList": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"items": {
"type": "array",
"description": "list of oauth authorization tokens",
"items": {
"$ref": "#/definitions/os_oauth_OAuthAuthorizeToken",
"javaType": "io.fabric8.openshift.api.model.OAuthAuthorizeToken"
}
},
"kind": {
"type": "string",
"description": "",
"default": "OAuthAuthorizeTokenList",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ListMeta",
"javaType": "io.fabric8.kubernetes.api.model.ListMeta"
}
},
8 years ago
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.OAuthAuthorizeTokenList",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.KubernetesResource",
"io.fabric8.kubernetes.api.model.KubernetesResourceList"
]
},
"os_oauth_OAuthClient": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"kind": {
"type": "string",
"description": "",
"default": "OAuthClient",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
},
"redirectURIs": {
"type": "array",
"description": "valid redirection URIs associated with a client",
"items": {
"type": "string",
"description": "valid redirection URIs associated with a client"
}
},
"respondWithChallenges": {
"type": "boolean",
"description": "indicates whether the client wants authentication needed responses made in the form of challenges instead of redirects"
},
"secret": {
"type": "string",
"description": "unique secret associated with a client"
}
8 years ago
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.OAuthClient",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.HasMetadata"
]
},
"os_oauth_OAuthClientAuthorization": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"clientName": {
"type": "string",
"description": "references the client that created this authorization"
},
"kind": {
"type": "string",
"description": "",
"default": "OAuthClientAuthorization",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
},
"scopes": {
"type": "array",
"description": "list of granted scopes",
"items": {
"type": "string",
"description": "list of granted scopes"
}
},
"userName": {
"type": "string",
"description": "user name that authorized this client"
},
"userUID": {
"type": "string",
"description": "unique UID associated with this authorization. userUID and userName must both match for this authorization to be valid"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.OAuthClientAuthorization",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.HasMetadata"
]
},
"os_oauth_OAuthClientAuthorizationList": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"items": {
"type": "array",
"description": "list of oauth client authorizations",
"items": {
"$ref": "#/definitions/os_oauth_OAuthClientAuthorization",
"javaType": "io.fabric8.openshift.api.model.OAuthClientAuthorization"
}
},
"kind": {
"type": "string",
"description": "",
"default": "OAuthClientAuthorizationList",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ListMeta",
"javaType": "io.fabric8.kubernetes.api.model.ListMeta"
8 years ago
}
8 years ago
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.OAuthClientAuthorizationList",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.KubernetesResource",
"io.fabric8.kubernetes.api.model.KubernetesResourceList"
]
},
"os_oauth_OAuthClientList": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"items": {
"type": "array",
"description": "list of oauth clients",
"items": {
"$ref": "#/definitions/os_oauth_OAuthClient",
"javaType": "io.fabric8.openshift.api.model.OAuthClient"
}
},
"kind": {
"type": "string",
"description": "",
"default": "OAuthClientList",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ListMeta",
"javaType": "io.fabric8.kubernetes.api.model.ListMeta"
}
},
8 years ago
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.OAuthClientList",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.KubernetesResource",
"io.fabric8.kubernetes.api.model.KubernetesResourceList"
]
},
"os_project_Project": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"kind": {
"type": "string",
"description": "",
"default": "Project",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
},
"spec": {
"$ref": "#/definitions/os_project_ProjectSpec",
"javaType": "io.fabric8.openshift.api.model.ProjectSpec"
},
"status": {
"$ref": "#/definitions/os_project_ProjectStatus",
"javaType": "io.fabric8.openshift.api.model.ProjectStatus"
}
},
8 years ago
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.Project",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.HasMetadata"
]
},
"os_project_ProjectList": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"items": {
"type": "array",
"description": "list of projects",
"items": {
"$ref": "#/definitions/os_project_Project",
"javaType": "io.fabric8.openshift.api.model.Project"
}
},
"kind": {
"type": "string",
"description": "",
"default": "ProjectList",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ListMeta",
"javaType": "io.fabric8.kubernetes.api.model.ListMeta"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.ProjectList",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.KubernetesResource",
"io.fabric8.kubernetes.api.model.KubernetesResourceList"
]
},
"os_project_ProjectRequest": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"description": {
"type": "string",
"description": "description to apply to a project"
},
"displayName": {
"type": "string",
"description": "display name to apply to a project"
},
"kind": {
"type": "string",
"description": "",
"default": "ProjectRequest",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
}
8 years ago
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.ProjectRequest",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.HasMetadata"
]
},
"os_project_ProjectSpec": {
"type": "object",
"description": "",
"properties": {
"finalizers": {
"type": "array",
"description": "an opaque list of values that must be empty to permanently remove object from storage",
"items": {
"type": "string",
"description": "an opaque list of values that must be empty to permanently remove object from storage"
8 years ago
}
}
8 years ago
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.ProjectSpec"
},
"os_project_ProjectStatus": {
"type": "object",
"description": "",
"properties": {
"phase": {
"type": "string",
"description": "phase is the current lifecycle phase of the project"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.ProjectStatus"
},
"os_route_Route": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"kind": {
"type": "string",
"description": "",
"default": "Route",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
},
"spec": {
"$ref": "#/definitions/os_route_RouteSpec",
"javaType": "io.fabric8.openshift.api.model.RouteSpec"
},
"status": {
"$ref": "#/definitions/os_route_RouteStatus",
"javaType": "io.fabric8.openshift.api.model.RouteStatus"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.Route",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.HasMetadata"
]
},
"os_route_RouteList": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"items": {
"type": "array",
"description": "list of routes",
"items": {
"$ref": "#/definitions/os_route_Route",
"javaType": "io.fabric8.openshift.api.model.Route"
}
8 years ago
},
"kind": {
"type": "string",
"description": "",
"default": "RouteList",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ListMeta",
"javaType": "io.fabric8.kubernetes.api.model.ListMeta"
}
8 years ago
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.RouteList",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.KubernetesResource",
"io.fabric8.kubernetes.api.model.KubernetesResourceList"
]
},
"os_route_RouteSpec": {
"type": "object",
"description": "",
"properties": {
"host": {
"type": "string",
"description": "optional: alias/dns that points to the service"
},
"path": {
"type": "string",
"description": "optional: path that the router watches to route traffic to the service"
},
"tls": {
"$ref": "#/definitions/os_route_TLSConfig",
"javaType": "io.fabric8.openshift.api.model.TLSConfig"
},
"to": {
"$ref": "#/definitions/kubernetes_ObjectReference",
"javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
}
},
8 years ago
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.RouteSpec"
},
"os_route_RouteStatus": {
"type": "object",
"description": "",
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.RouteStatus"
},
"os_route_TLSConfig": {
"type": "object",
"description": "",
"properties": {
"caCertificate": {
"type": "string",
"description": "provides the cert authority certificate contents"
},
8 years ago
"certificate": {
"type": "string",
"description": "provides certificate contents"
},
8 years ago
"destinationCACertificate": {
"type": "string",
"description": "provides the contents of the ca certificate of the final destination. When using re-encrypt termination this file should be provided in order to have routers use it for health checks on the secure connection"
},
8 years ago
"key": {
"type": "string",
"description": "provides key file contents"
},
"termination": {
"type": "string",
"description": "indicates termination type. if not set"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.TLSConfig"
},
"os_template_Parameter": {
"type": "object",
"description": "",
"properties": {
"description": {
"type": "string",
"description": "optional: describes the parameter"
},
"from": {
"type": "string",
"description": "input value for the generator"
},
"generate": {
"type": "string",
"description": "optional: generate specifies the generator to be used to generate random string from an input value specified by the from field. the result string is stored in the value field. if not specified"
},
"name": {
"type": "string",
"description": "name of the parameter"
},
"required": {
"type": "boolean",
"description": "indicates the parameter must have a non-empty value or be generated"
},
"value": {
"type": "string",
"description": "optional: holds the parameter data. if specified"
}
},
8 years ago
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.Parameter"
},
"os_template_Template": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
8 years ago
},
8 years ago
"kind": {
"type": "string",
"description": "",
"default": "Template",
"required": true
8 years ago
},
8 years ago
"labels": {
"type": "object",
"description": "optional: list of lables that are applied to every object during the template to config transformation",
"additionalProperties": {
"type": "string",
"description": "optional: list of lables that are applied to every object during the template to config transformation"
},
"javaType": "java.util.Map\u003cString,String\u003e"
8 years ago
},
8 years ago
"metadata": {
"$ref": "#/definitions/kubernetes_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
8 years ago
},
8 years ago
"objects": {
"type": "array",
"description": "list of objects to include in the template",
"items": {
"$ref": "#/definitions/kubernetes_runtime_RawExtension",
"javaType": "io.fabric8.kubernetes.api.model.HasMetadata"
}
},
8 years ago
"parameters": {
"type": "array",
"description": "optional: list of parameters used during template to config transformation",
"items": {
"$ref": "#/definitions/os_template_Parameter",
"javaType": "io.fabric8.openshift.api.model.Parameter"
}
8 years ago
}
},
8 years ago
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.Template",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.HasMetadata"
]
},
"os_template_TemplateList": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"items": {
"type": "array",
"description": "list of templates",
"items": {
"$ref": "#/definitions/os_template_Template",
"javaType": "io.fabric8.openshift.api.model.Template"
}
},
"kind": {
"type": "string",
"description": "",
"default": "TemplateList",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ListMeta",
"javaType": "io.fabric8.kubernetes.api.model.ListMeta"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.TemplateList",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.KubernetesResource",
"io.fabric8.kubernetes.api.model.KubernetesResourceList"
]
},
"os_user_Group": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"kind": {
"type": "string",
"description": "",
"default": "Group",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
},
"users": {
"type": "array",
"description": "list of users in this group",
"items": {
"type": "string",
"description": "list of users in this group"
}
}
8 years ago
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.Group",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.HasMetadata"
]
},
"os_user_GroupList": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"items": {
"type": "array",
"description": "list of groups",
"items": {
"$ref": "#/definitions/os_user_Group",
"javaType": "io.fabric8.openshift.api.model.Group"
8 years ago
}
8 years ago
},
"kind": {
"type": "string",
"description": "",
"default": "GroupList",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ListMeta",
"javaType": "io.fabric8.kubernetes.api.model.ListMeta"
8 years ago
}
8 years ago
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.GroupList",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.KubernetesResource",
"io.fabric8.kubernetes.api.model.KubernetesResourceList"
]
},
"os_user_Identity": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"extra": {
"type": "object",
"description": "extra information for this identity",
"additionalProperties": {
"type": "string",
"description": "extra information for this identity"
},
"javaType": "java.util.Map\u003cString,String\u003e"
},
"kind": {
"type": "string",
"description": "",
"default": "Identity",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
},
"providerName": {
"type": "string",
"description": "source of identity information"
},
"providerUserName": {
"type": "string",
"description": "uniquely represents this identity in the scope of the provider"
},
"user": {
"$ref": "#/definitions/kubernetes_ObjectReference",
"javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
8 years ago
}
8 years ago
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.Identity",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.HasMetadata"
]
},
"os_user_IdentityList": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"items": {
"type": "array",
"description": "list of identities",
"items": {
"$ref": "#/definitions/os_user_Identity",
"javaType": "io.fabric8.openshift.api.model.Identity"
}
8 years ago
},
"kind": {
"type": "string",
"description": "",
"default": "IdentityList",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ListMeta",
"javaType": "io.fabric8.kubernetes.api.model.ListMeta"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.IdentityList",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.KubernetesResource",
"io.fabric8.kubernetes.api.model.KubernetesResourceList"
]
},
"os_user_User": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"fullName": {
"type": "string",
"description": "full name of user"
},
"groups": {
"type": "array",
"description": "list of groups",
"items": {
"type": "string",
"description": "list of groups"
8 years ago
}
8 years ago
},
"identities": {
"type": "array",
"description": "list of identities",
"items": {
"type": "string",
"description": "list of identities"
8 years ago
}
8 years ago
},
"kind": {
"type": "string",
"description": "",
"default": "User",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
8 years ago
}
8 years ago
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.User",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.HasMetadata"
]
},
"os_user_UserList": {
"type": "object",
"description": "",
"properties": {
"apiVersion": {
"type": "string",
"description": "",
"default": "v1",
"required": true,
"enum": [
"v1"
]
},
"items": {
"type": "array",
"description": "list of users",
"items": {
"$ref": "#/definitions/os_user_User",
"javaType": "io.fabric8.openshift.api.model.User"
}
8 years ago
},
8 years ago
"kind": {
"type": "string",
"description": "",
"default": "UserList",
"required": true
},
"metadata": {
"$ref": "#/definitions/kubernetes_ListMeta",
"javaType": "io.fabric8.kubernetes.api.model.ListMeta"
}
},
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.UserList",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.KubernetesResource",
"io.fabric8.kubernetes.api.model.KubernetesResourceList"
]
},
"speter_inf_Dec": {
"type": "object",
"description": "",
"additionalProperties": true,
"javaType": "io.fabric8.openshift.api.model.Dec"
}
},
"type": "object",
"properties": {
"BaseKubernetesList": {
"$ref": "#/definitions/kubernetes_List",
"javaType": "io.fabric8.kubernetes.api.model.BaseKubernetesList"
},
"BuildConfigList": {
"$ref": "#/definitions/os_build_BuildConfigList",
"javaType": "io.fabric8.openshift.api.model.BuildConfigList"
},
"BuildList": {
"$ref": "#/definitions/os_build_BuildList",
"javaType": "io.fabric8.openshift.api.model.BuildList"
},
"BuildRequest": {
"$ref": "#/definitions/os_build_BuildRequest",
"javaType": "io.fabric8.openshift.api.model.BuildRequest"
},
"ClusterPolicy": {
"$ref": "#/definitions/os_authorization_ClusterPolicy",
"javaType": "io.fabric8.openshift.api.model.ClusterPolicy"
},
"ClusterPolicyBinding": {
"$ref": "#/definitions/os_authorization_ClusterPolicyBinding",
"javaType": "io.fabric8.openshift.api.model.ClusterPolicyBinding"
},
"ClusterPolicyBindingList": {
"$ref": "#/definitions/os_authorization_ClusterPolicyBindingList",
"javaType": "io.fabric8.openshift.api.model.ClusterPolicyBindingList"
},
"ClusterPolicyList": {
"$ref": "#/definitions/os_authorization_ClusterPolicyList",
"javaType": "io.fabric8.openshift.api.model.ClusterPolicyList"
},
"ClusterRoleBinding": {
"$ref": "#/definitions/os_authorization_ClusterRoleBinding",
"javaType": "io.fabric8.openshift.api.model.ClusterRoleBinding"
},
"ClusterRoleBindingList": {
"$ref": "#/definitions/os_authorization_ClusterRoleBindingList",
"javaType": "io.fabric8.openshift.api.model.ClusterRoleBindingList"
},
"Config": {
"$ref": "#/definitions/kubernetes_config_Config",
"javaType": "io.fabric8.kubernetes.api.model.Config"
},
"ContainerStatus": {
"$ref": "#/definitions/kubernetes_ContainerStatus",
"javaType": "io.fabric8.kubernetes.api.model.ContainerStatus"
},
"DeploymentConfigList": {
"$ref": "#/definitions/os_deploy_DeploymentConfigList",
"javaType": "io.fabric8.openshift.api.model.DeploymentConfigList"
},
"Endpoints": {
"$ref": "#/definitions/kubernetes_Endpoints",
"javaType": "io.fabric8.kubernetes.api.model.Endpoints"
},
"EndpointsList": {
"$ref": "#/definitions/kubernetes_EndpointsList",
"javaType": "io.fabric8.kubernetes.api.model.EndpointsList"
},
"EnvVar": {
"$ref": "#/definitions/kubernetes_EnvVar",
"javaType": "io.fabric8.kubernetes.api.model.EnvVar"
},
"EventList": {
"$ref": "#/definitions/kubernetes_EventList",
"javaType": "io.fabric8.kubernetes.api.model.EventList"
},
"Group": {
"$ref": "#/definitions/os_user_Group",
"javaType": "io.fabric8.openshift.api.model.Group"
},
"GroupList": {
"$ref": "#/definitions/os_user_GroupList",
"javaType": "io.fabric8.openshift.api.model.GroupList"
},
"Identity": {
"$ref": "#/definitions/os_user_Identity",
"javaType": "io.fabric8.openshift.api.model.Identity"
},
"IdentityList": {
"$ref": "#/definitions/os_user_IdentityList",
"javaType": "io.fabric8.openshift.api.model.IdentityList"
},
"ImageList": {
"$ref": "#/definitions/os_image_ImageList",
"javaType": "io.fabric8.openshift.api.model.ImageList"
},
"ImageStreamList": {
"$ref": "#/definitions/os_image_ImageStreamList",
"javaType": "io.fabric8.openshift.api.model.ImageStreamList"
},
"LocalSubjectAccessReview": {
"$ref": "#/definitions/os_authorization_LocalSubjectAccessReview",
"javaType": "io.fabric8.openshift.api.model.LocalSubjectAccessReview"
},
"Namespace": {
"$ref": "#/definitions/kubernetes_Namespace",
"javaType": "io.fabric8.kubernetes.api.model.Namespace"
},
"NamespaceList": {
"$ref": "#/definitions/kubernetes_NamespaceList",
"javaType": "io.fabric8.kubernetes.api.model.NamespaceList"
},
"Node": {
"$ref": "#/definitions/kubernetes_Node",
"javaType": "io.fabric8.kubernetes.api.model.Node"
},
"NodeList": {
"$ref": "#/definitions/kubernetes_NodeList",
"javaType": "io.fabric8.kubernetes.api.model.NodeList"
},
"OAuthAccessToken": {
"$ref": "#/definitions/os_oauth_OAuthAccessToken",
"javaType": "io.fabric8.openshift.api.model.OAuthAccessToken"
},
"OAuthAccessTokenList": {
"$ref": "#/definitions/os_oauth_OAuthAccessTokenList",
"javaType": "io.fabric8.openshift.api.model.OAuthAccessTokenList"
},
"OAuthAuthorizeToken": {
"$ref": "#/definitions/os_oauth_OAuthAuthorizeToken",
"javaType": "io.fabric8.openshift.api.model.OAuthAuthorizeToken"
},
"OAuthAuthorizeTokenList": {
"$ref": "#/definitions/os_oauth_OAuthAuthorizeTokenList",
"javaType": "io.fabric8.openshift.api.model.OAuthAuthorizeTokenList"
},
"OAuthClient": {
"$ref": "#/definitions/os_oauth_OAuthClient",
"javaType": "io.fabric8.openshift.api.model.OAuthClient"
},
"OAuthClientAuthorization": {
"$ref": "#/definitions/os_oauth_OAuthClientAuthorization",
"javaType": "io.fabric8.openshift.api.model.OAuthClientAuthorization"
},
"OAuthClientAuthorizationList": {
"$ref": "#/definitions/os_oauth_OAuthClientAuthorizationList",
"javaType": "io.fabric8.openshift.api.model.OAuthClientAuthorizationList"
},
"OAuthClientList": {
"$ref": "#/definitions/os_oauth_OAuthClientList",
"javaType": "io.fabric8.openshift.api.model.OAuthClientList"
},
"ObjectMeta": {
"$ref": "#/definitions/kubernetes_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
},
"PersistentVolume": {
"$ref": "#/definitions/kubernetes_PersistentVolume",
"javaType": "io.fabric8.kubernetes.api.model.PersistentVolume"
},
8 years ago
"PersistentVolumeClaim": {
"$ref": "#/definitions/kubernetes_PersistentVolumeClaim",
"javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeClaim"
},
8 years ago
"PersistentVolumeClaimList": {
"$ref": "#/definitions/kubernetes_PersistentVolumeClaimList",
"javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeClaimList"
},
"PersistentVolumeList": {
"$ref": "#/definitions/kubernetes_PersistentVolumeList",
"javaType": "io.fabric8.kubernetes.api.model.PersistentVolumeList"
},
"PodList": {
"$ref": "#/definitions/kubernetes_PodList",
"javaType": "io.fabric8.kubernetes.api.model.PodList"
},
"Policy": {
"$ref": "#/definitions/os_authorization_Policy",
"javaType": "io.fabric8.openshift.api.model.Policy"
},
"PolicyBinding": {
"$ref": "#/definitions/os_authorization_PolicyBinding",
"javaType": "io.fabric8.openshift.api.model.PolicyBinding"
},
"PolicyBindingList": {
"$ref": "#/definitions/os_authorization_PolicyBindingList",
"javaType": "io.fabric8.openshift.api.model.PolicyBindingList"
},
"PolicyList": {
"$ref": "#/definitions/os_authorization_PolicyList",
"javaType": "io.fabric8.openshift.api.model.PolicyList"
},
"Project": {
"$ref": "#/definitions/os_project_Project",
"javaType": "io.fabric8.openshift.api.model.Project"
},
"ProjectList": {
"$ref": "#/definitions/os_project_ProjectList",
"javaType": "io.fabric8.openshift.api.model.ProjectList"
},
"ProjectRequest": {
"$ref": "#/definitions/os_project_ProjectRequest",
"javaType": "io.fabric8.openshift.api.model.ProjectRequest"
},
"Quantity": {
"$ref": "#/definitions/kubernetes_resource_Quantity",
"javaType": "io.fabric8.kubernetes.api.model.Quantity"
},
"ReplicationControllerList": {
"$ref": "#/definitions/kubernetes_ReplicationControllerList",
"javaType": "io.fabric8.kubernetes.api.model.ReplicationControllerList"
},
"ResourceQuota": {
"$ref": "#/definitions/kubernetes_ResourceQuota",
"javaType": "io.fabric8.kubernetes.api.model.ResourceQuota"
},
"ResourceQuotaList": {
"$ref": "#/definitions/kubernetes_ResourceQuotaList",
"javaType": "io.fabric8.kubernetes.api.model.ResourceQuotaList"
},
"Role": {
"$ref": "#/definitions/os_authorization_Role",
"javaType": "io.fabric8.openshift.api.model.Role"
},
"RoleBinding": {
"$ref": "#/definitions/os_authorization_RoleBinding",
"javaType": "io.fabric8.openshift.api.model.RoleBinding"
},
"RoleBindingList": {
"$ref": "#/definitions/os_authorization_RoleBindingList",
"javaType": "io.fabric8.openshift.api.model.RoleBindingList"
},
"RoleList": {
"$ref": "#/definitions/os_authorization_RoleList",
"javaType": "io.fabric8.openshift.api.model.RoleList"
},
"RootPaths": {
"$ref": "#/definitions/api_RootPaths",
"javaType": "io.fabric8.kubernetes.api.model.RootPaths"
},
"RouteList": {
"$ref": "#/definitions/os_route_RouteList",
"javaType": "io.fabric8.openshift.api.model.RouteList"
},
"Secret": {
"$ref": "#/definitions/kubernetes_Secret",
"javaType": "io.fabric8.kubernetes.api.model.Secret"
},
"SecretList": {
"$ref": "#/definitions/kubernetes_SecretList",
"javaType": "io.fabric8.kubernetes.api.model.SecretList"
},
"SecurityContextConstraints": {
"$ref": "#/definitions/kubernetes_SecurityContextConstraints",
"javaType": "io.fabric8.kubernetes.api.model.SecurityContextConstraints"
},
"SecurityContextConstraintsList": {
"$ref": "#/definitions/kubernetes_SecurityContextConstraintsList",
"javaType": "io.fabric8.kubernetes.api.model.SecurityContextConstraintsList"
},
"ServiceAccount": {
"$ref": "#/definitions/kubernetes_ServiceAccount",
"javaType": "io.fabric8.kubernetes.api.model.ServiceAccount"
},
"ServiceAccountList": {
"$ref": "#/definitions/kubernetes_ServiceAccountList",
"javaType": "io.fabric8.kubernetes.api.model.ServiceAccountList"
},
"ServiceList": {
"$ref": "#/definitions/kubernetes_ServiceList",
"javaType": "io.fabric8.kubernetes.api.model.ServiceList"
},
"Status": {
"$ref": "#/definitions/kubernetes_Status",
"javaType": "io.fabric8.kubernetes.api.model.Status"
},
"SubjectAccessReview": {
"$ref": "#/definitions/os_authorization_SubjectAccessReview",
"javaType": "io.fabric8.openshift.api.model.SubjectAccessReview"
},
"SubjectAccessReviewResponse": {
"$ref": "#/definitions/os_authorization_SubjectAccessReviewResponse",
"javaType": "io.fabric8.openshift.api.model.SubjectAccessReviewResponse"
},
"TagEvent": {
"$ref": "#/definitions/os_image_TagEvent",
"javaType": "io.fabric8.openshift.api.model.TagEvent"
},
"Template": {
"$ref": "#/definitions/os_template_Template",
"javaType": "io.fabric8.openshift.api.model.Template"
},
"TemplateList": {
"$ref": "#/definitions/os_template_TemplateList",
"javaType": "io.fabric8.openshift.api.model.TemplateList"
},
"User": {
"$ref": "#/definitions/os_user_User",
"javaType": "io.fabric8.openshift.api.model.User"
},
"UserList": {
"$ref": "#/definitions/os_user_UserList",
"javaType": "io.fabric8.openshift.api.model.UserList"
},
"WatchEvent": {
"$ref": "#/definitions/kubernetes_watch_WatchEvent",
"javaType": "io.fabric8.kubernetes.api.model.WatchEvent"
}
8 years ago
},
"additionalProperties": true
};
})(Kubernetes || (Kubernetes = {}));
/// <reference path="schema.ts"/>
/// <reference path="kubernetesPlugin.ts"/>
var Kubernetes;
(function (Kubernetes) {
var hiddenProperties = ['status', 'deletionTimestamp'];
function withProperty(schema, name, action) {
if (schema.properties[name]) {
action(schema.properties[name]);
}
}
function hideProperties(schema) {
_.forEach(hiddenProperties, function (property) {
withProperty(schema, property, function (property) {
property.hidden = true;
});
});
}
Kubernetes._module.factory('KubernetesSchema', ['SchemaRegistry', function (schemas) {
Kubernetes.configureSchema();
schemas.addListener("k8s schema customizer", function (name, schema) {
if (schema.properties) {
if (schema.properties.name) {
schema.controls = ['name', '*'];
8 years ago
}
8 years ago
withProperty(schema, 'portalIP', function (property) {
property.label = "Portal IP";
});
8 years ago
withProperty(schema, 'publicIPs', function (property) {
property.label = "Public IPs";
});
8 years ago
withProperty(schema, 'Spec', function (property) {
property.label = 'false';
});
8 years ago
withProperty(schema, 'Metadata', function (property) {
property.label = 'false';
});
8 years ago
hideProperties(schema);
}
8 years ago
if (_.endsWith(name, "ServiceSpec")) {
schema.controls = ["portalIP", "createExternalLoadBalancer", "sessionAffinity", "publicIPs", "ports", "selector", "*"];
withProperty(schema, 'sessionAffinity', function (property) {
Kubernetes.log.debug("Schema: ", schema);
property.enum = ['None', 'ClientIP'];
property.default = 'None';
});
}
8 years ago
if (_.endsWith(name, "Service")) {
schema.controls = undefined;
schema.tabs = {
'Basic Information': ['metadata'],
'Details': ['*']
};
Kubernetes.log.debug("Name: ", name, " Schema: ", schema);
}
});
8 years ago
schemas.addSchema('kubernetes', Kubernetes.schema);
// now lets iterate and add all the definitions too
angular.forEach(Kubernetes.schema.definitions, function (definition, typeName) {
//schemas.addSchema(typeName, definition);
schemas.addSchema("#/definitions/" + typeName, definition);
});
8 years ago
return Kubernetes.schema;
}]);
})(Kubernetes || (Kubernetes = {}));
/// <reference path="kubernetesPlugin.ts"/>
var Kubernetes;
(function (Kubernetes) {
// facade this to the watcher service
var KubernetesStateImpl = (function () {
function KubernetesStateImpl(watcher) {
this.watcher = watcher;
}
Object.defineProperty(KubernetesStateImpl.prototype, "namespaces", {
get: function () {
return _.map(this.watcher.getObjects(Kubernetes.WatchTypes.NAMESPACES), function (namespace) {
return namespace.metadata.name;
});
8 years ago
},
enumerable: true,
configurable: true
});
Object.defineProperty(KubernetesStateImpl.prototype, "selectedNamespace", {
get: function () {
return this.watcher.getNamespace();
},
set: function (namespace) {
this.watcher.setNamespace(namespace);
},
enumerable: true,
configurable: true
});
return KubernetesStateImpl;
}());
8 years ago
Kubernetes._module.factory('KubernetesState', ['WatcherService', function (watcher) {
return new KubernetesStateImpl(watcher);
}]);
8 years ago
// TODO this doesn't need to be a service really
Kubernetes._module.factory('KubernetesApiURL', function () { return Kubernetes.kubernetesApiUrl(); });
// TODO we'll get rid of this...
Kubernetes._module.factory('KubernetesVersion', [function () {
return {
query: function () { return null; }
};
}]);
// TODO let's move these into KubernetesModel so controllers don't have to inject them separately
Kubernetes._module.factory('KubernetesPods', ['KubernetesModel', function (KubernetesModel) {
return KubernetesModel['podsResource'];
}]);
Kubernetes._module.factory('KubernetesReplicationControllers', ['KubernetesModel', function (KubernetesModel) {
return KubernetesModel['replicationcontrollersResource'];
}]);
Kubernetes._module.factory('KubernetesServices', ['KubernetesModel', function (KubernetesModel) {
return KubernetesModel['servicesResource'];
}]);
})(Kubernetes || (Kubernetes = {}));
/// <reference path="../../includes.ts"/>
8 years ago
/// <reference path="kubernetesHelpers.ts"/>
/// <reference path="kubernetesPlugin.ts"/>
/// <reference path="kubernetesModel.ts"/>
///
var Kubernetes;
(function (Kubernetes) {
Kubernetes.FileDropController = Kubernetes.controller("FileDropController", ["$scope", "KubernetesModel", "FileUploader", '$http', function ($scope, model, FileUploader, $http) {
var log = Logger.get('kubernetes-file-uploader');
var uploader = $scope.uploader = new FileUploader({
autoUpload: false,
removeAfterUpload: true,
url: Kubernetes.kubernetesApiUrl()
8 years ago
});
8 years ago
$scope.uploader.onAfterAddingFile = function (file) {
var reader = new FileReader();
reader.onload = function () {
if (reader.readyState === 2) {
log.debug("File added: ", file);
var data = reader.result;
var obj = null;
if (_.endsWith(file._file.name, '.json')) {
log.debug("Parsing JSON file");
try {
obj = angular.fromJson(data);
}
catch (err) {
log.debug("Failed to read dropped file ", file._file.name, ": ", err);
return;
}
}
else if (_.endsWith(file._file.name, '.yaml')) {
log.debug("Parsing YAML file");
try {
obj = jsyaml.load(data);
}
catch (err) {
log.debug("Failed to read dropped file ", file._file.name, ": ", err);
return;
}
}
else {
log.debug("Unknown file type for file: ", file._file.name);
return;
}
log.debug("Dropped object: ", obj);
if (!KubernetesAPI.getNamespace(obj)) {
obj.metadata.namespace = model.currentNamespace();
}
KubernetesAPI.put({
object: obj,
success: function (data) {
Core.notification("success", "Applied " + file._file.name);
},
error: function (err) {
log.info("Got error applying", file._file.name, ": ", err);
Core.notification("warning", "Failed to apply " + file._file.name + ", error: " + err.message);
}
});
}
};
reader.readAsText(file._file);
};
$scope.uploader.onBeforeUploadItem = function (item) {
log.debug("Uploading: ", item);
//Core.notification('info', 'Uploading ' + item);
};
$scope.uploader.onSuccessItem = function (item) {
log.debug("onSuccessItem: ", item);
};
$scope.uploader.onErrorItem = function (item, response, status) {
log.debug("Failed to apply, response: ", response, " status: ", status);
};
}]);
Kubernetes.NamespaceController = Kubernetes.controller('NamespaceController', ['$scope', 'WatcherService', function ($scope, watcher) {
$scope.namespaces = watcher.getObjects('namespaces');
$scope.$watchCollection('namespaces', function (newValue, oldValue) {
if (newValue !== oldValue) {
$scope.namespace = watcher.getNamespace();
}
8 years ago
});
8 years ago
$scope.$watch('namespace', function (newValue, oldValue) {
if (newValue !== oldValue) {
if (newValue !== oldValue) {
watcher.setNamespace(newValue);
}
8 years ago
}
});
8 years ago
}]);
Kubernetes.TopLevel = Kubernetes.controller("TopLevel", ["$scope", "KubernetesVersion", "KubernetesState", function ($scope, KubernetesVersion, KubernetesState) {
$scope.version = undefined;
$scope.showAppView = Kubernetes.isAppView();
$scope.isActive = function (href) {
return Kubernetes.isLinkActive(href);
};
$scope.mode = 'yaml';
$scope.rawMode = true;
$scope.dirty = false;
$scope.readOnly = true;
$scope.rawModel = null;
$scope.$on('hawtioEditor_default_dirty', function ($event, dirty) {
$scope.dirty = dirty;
});
8 years ago
$scope.save = function (rawModel) {
var obj = null;
var str = rawModel.replace(/\t/g, " ");
try {
obj = jsyaml.load(str);
8 years ago
}
8 years ago
catch (err) {
Core.notification("warning", "Failed to save object, error: \"" + err + "\"");
}
if (!obj) {
return;
}
$scope.readOnly = true;
KubernetesAPI.put({
object: obj,
success: function (data) {
$scope.dirty = false;
Core.notification("success", "Saved object " + Kubernetes.getName(obj));
Core.$apply($scope);
},
error: function (err) {
console.log("Got error: ", err);
Core.notification("warning", "Failed to save object, error: \"" + err.message + "\"");
$scope.dirty = false;
Core.$apply($scope);
}
});
};
$scope.kubernetes = KubernetesState;
KubernetesVersion.query(function (response) {
$scope.version = response;
});
}]);
})(Kubernetes || (Kubernetes = {}));
8 years ago
/// <reference path="kubernetesPlugin.ts"/>
var Kubernetes;
(function (Kubernetes) {
Kubernetes.NamespaceController = Kubernetes.controller("NamespaceController", ["$scope", "WatcherService", function ($scope, watcher) {
$scope.watcher = watcher;
$scope.namespaceObjects = watcher.getObjects('namespaces');
$scope.namespace = watcher.getNamespace();
$scope.namespaces = [];
$scope.$watch('namespace', function (newValue, oldValue) {
if (newValue !== oldValue) {
watcher.setNamespace(newValue);
}
});
$scope.$watch('watcher.getNamespace()', function (newValue, oldValue) {
if (newValue !== oldValue) {
$scope.namespace = newValue;
}
});
$scope.$watchCollection('namespaceObjects', function (namespaceObjects) {
$scope.namespaces = _.map(namespaceObjects, function (namespace) { return namespace.metadata.name; });
});
}]);
})(Kubernetes || (Kubernetes = {}));
/// <reference path="../../includes.ts"/>
8 years ago
/// <reference path="kubernetesHelpers.ts"/>
/// <reference path="kubernetesPlugin.ts"/>
var Kubernetes;
(function (Kubernetes) {
var OverviewDirective = Kubernetes._module.directive("kubernetesOverview", ["$templateCache", "$compile", "$interpolate", "$timeout", "$window", "KubernetesState", 'KubernetesModel', function ($templateCache, $compile, $interpolate, $timeout, $window, KubernetesState, KubernetesModel) {
var log = Logger.get('kubernetes-overview');
var model = KubernetesModel;
var state = KubernetesState;
return {
restrict: 'E',
replace: true,
link: function (scope, element, attr) {
scope.model = model;
element.css({ visibility: 'hidden' });
scope.getEntity = function (type, key) {
switch (type) {
case 'host':
return model.podsByHost[key];
case 'pod':
return model.podsByKey[key];
case 'replicationController':
return model.replicationControllersByKey[key];
case 'service':
return model.servicesByKey[key];
default:
return undefined;
}
};
scope.kubernetes = state;
scope.customizeDefaultOptions = function (options) {
options.Endpoint = ['Blank', {}];
};
scope.mouseEnter = function ($event) {
if (scope.jsPlumb) {
angular.element($event.currentTarget).addClass("hovered");
scope.jsPlumb.getEndpoints($event.currentTarget).forEach(function (endpoint) {
endpoint.connections.forEach(function (connection) {
if (!connection.isHover()) {
connection.setHover(true);
connection.endpoints.forEach(function (e) {
scope.mouseEnter({
currentTarget: e.element
});
});
}
});
});
}
};
scope.mouseLeave = function ($event) {
if (scope.jsPlumb) {
angular.element($event.currentTarget).removeClass("hovered");
scope.jsPlumb.getEndpoints($event.currentTarget).forEach(function (endpoint) {
endpoint.connections.forEach(function (connection) {
if (connection.isHover()) {
connection.setHover(false);
connection.endpoints.forEach(function (e) {
scope.mouseLeave({
currentTarget: e.element
});
});
}
});
});
}
};
/*
scope.customizeEndpointOptions = (jsPlumb, node, options) => {
var type = node.el.attr('data-type');
// log.debug("endpoint type: ", type);
switch (type) {
case 'pod':
break;
case 'service':
break;
case 'replicationController':
break;
}
};
*/
scope.customizeConnectionOptions = function (jsPlumb, edge, params, options) {
var type = edge.source.el.attr('data-type');
options.connector = ["Bezier", { curviness: 50, stub: 25, alwaysRespectStubs: true }];
params.paintStyle = {
lineWidth: 2,
strokeStyle: '#5555cc'
};
switch (type) {
case 'pod':
break;
case 'service':
params.anchors = [
["Continuous", { faces: ["right"] }],
["Continuous", { faces: ["left"] }]
];
break;
case 'replicationController':
params.anchors = [
["Perimeter", { shape: "Circle" }],
["Continuous", { faces: ["right"] }]
];
break;
}
//log.debug("connection source type: ", type);
return options;
};
function interpolate(template, config) {
return $interpolate(template)(config);
}
function createElement(template, thingName, thing) {
var config = {};
config[thingName] = thing;
return interpolate(template, config);
}
function createElements(template, thingName, things) {
return things.map(function (thing) {
return createElement(template, thingName, thing);
});
}
function appendNewElements(parentEl, template, thingName, things) {
things.forEach(function (thing) {
var key = thing['_key'] || thing['elementId'] || thing['id'];
var existing = parentEl.find("#" + key);
if (!existing.length) {
log.debug("existing: ", existing, " key: ", key);
parentEl.append($compile(createElement(template, thingName, thing))(scope));
}
});
}
function namespaceFilter(item) {
return Kubernetes.getNamespace(item) === scope.kubernetes.selectedNamespace;
}
function firstDraw() {
log.debug("First draw");
element.empty();
var services = model.services;
var replicationControllers = model.replicationControllers;
var pods = model.pods;
var hosts = model.hosts;
// log.debug("hosts: ", model.hosts);
var parentEl = angular.element($templateCache.get("overviewTemplate.html"));
var servicesEl = parentEl.find(".services");
var hostsEl = parentEl.find(".hosts");
var replicationControllersEl = parentEl.find(".replicationControllers");
servicesEl.append(createElements($templateCache.get("serviceTemplate.html"), 'service', services.filter(namespaceFilter)));
replicationControllersEl.append(createElements($templateCache.get("replicationControllerTemplate.html"), 'replicationController', replicationControllers.filter(namespaceFilter)));
hosts.forEach(function (host) {
var hostEl = angular.element(createElement($templateCache.get("overviewHostTemplate.html"), 'host', host));
var podContainer = angular.element(hostEl.find('.pod-container'));
podContainer.append(createElements($templateCache.get("podTemplate.html"), "pod", host.pods));
hostsEl.append(hostEl);
});
//parentEl.append(createElements($templateCache.get("podTemplate.html"), 'pod', pods));
element.append($compile(parentEl)(scope));
$timeout(function () { element.css({ visibility: 'visible' }); }, 250);
}
function update() {
scope.$emit('jsplumbDoWhileSuspended', function () {
log.debug("Update");
var services = model.services;
var replicationControllers = model.replicationControllers;
var pods = model.pods;
var hosts = model.hosts;
var parentEl = element.find('[hawtio-jsplumb]');
var children = parentEl.find('.jsplumb-node');
children.each(function (index, c) {
var child = angular.element(c);
var key = child.attr('id');
log.debug('key: ', key);
if (Core.isBlank(key)) {
return;
}
var type = child.attr('data-type');
switch (type) {
case 'host':
if (key in model.podsByHost) {
return;
}
break;
case 'service':
if (key in model.servicesByKey && Kubernetes.getNamespace(model.servicesByKey[key]) == scope.kubernetes.selectedNamespace) {
var service = model.servicesByKey[key];
child.attr('connect-to', service.connectTo);
return;
}
break;
case 'pod':
/*
if (hasId(pods, id)) {
return;
}
*/
if (key in model.podsByKey) {
return;
}
break;
case 'replicationController':
if (key in model.replicationControllersByKey) {
var replicationController = model.replicationControllersByKey[key];
child.attr('connect-to', replicationController.connectTo);
return;
}
break;
default:
log.debug("Ignoring element with unknown type");
return;
}
log.debug("Removing: ", key);
child.remove();
});
var servicesEl = element.find(".services");
var replicationControllersEl = element.find(".replicationControllers");
var hostsEl = element.find(".hosts");
appendNewElements(servicesEl, $templateCache.get("serviceTemplate.html"), "service", services);
appendNewElements(replicationControllersEl, $templateCache.get("replicationControllerTemplate.html"), "replicationController", replicationControllers);
appendNewElements(hostsEl, $templateCache.get("overviewHostTemplate.html"), "host", hosts);
hosts.forEach(function (host) {
var hostEl = angular.element(hostsEl.find("#" + host.elementId));
var podContainer = angular.element(hostEl.find('.pod-container'));
appendNewElements(podContainer, $templateCache.get("podTemplate.html"), "pod", host.pods);
});
});
}
function refreshDrawing() {
log.debug("Refreshing drawing");
if (element.children().length === 0) {
firstDraw();
}
8 years ago
else {
update();
}
Core.$apply(scope);
}
8 years ago
scope.$on('kubernetesModelUpdated', _.debounce(refreshDrawing, 500, { trailing: true }));
setTimeout(refreshDrawing, 100);
}
};
8 years ago
}]);
8 years ago
var OverviewBoxController = Kubernetes.controller("OverviewBoxController", ["$scope", "$location", function ($scope, $location) {
$scope.viewDetails = function (entity, path) {
if (entity) {
var namespace = Kubernetes.getNamespace(entity);
var id = Kubernetes.getName(entity);
$location.path(UrlHelpers.join('/kubernetes/namespace', namespace, path, id));
}
else {
Kubernetes.log.warn("No entity for viewDetails!");
}
};
}]);
8 years ago
var scopeName = "OverviewController";
var OverviewController = Kubernetes.controller(scopeName, ["$scope", "$location", "$http", "$timeout", "$routeParams", "KubernetesModel", "KubernetesState", "KubernetesApiURL", function ($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL) {
$scope.name = scopeName;
$scope.kubernetes = KubernetesState;
$scope.model = KubernetesModel;
Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
//$scope.subTabConfig = [];
}]);
})(Kubernetes || (Kubernetes = {}));
/// <reference path="../../includes.ts"/>
8 years ago
/// <reference path="kubernetesPlugin.ts"/>
var Kubernetes;
(function (Kubernetes) {
Kubernetes.PipelinesController = Kubernetes.controller("PipelinesController", ["$scope", "KubernetesModel", "KubernetesState", "$dialog", "$window", "$templateCache", "$routeParams", "$location", "localStorage", "$http", "$timeout", "KubernetesApiURL",
function ($scope, KubernetesModel, KubernetesState, $dialog, $window, $templateCache, $routeParams, $location, localStorage, $http, $timeout, KubernetesApiURL) {
8 years ago
$scope.kubernetes = KubernetesState;
$scope.model = KubernetesModel;
Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
8 years ago
/**
* Lets update the various data to join them together to a pipeline model
*/
function updateData() {
8 years ago
var pipelineSteps = {};
if ($scope.buildConfigs && $scope.builds && $scope.deploymentConfigs) {
Kubernetes.enrichBuildConfigs($scope.buildConfigs, $scope.builds);
$scope.fetched = true;
angular.forEach($scope.buildConfigs, function (buildConfig) {
var pipelineKey = createPipelineKey(buildConfig);
if (pipelineKey) {
pipelineSteps[pipelineKey] = {
buildConfig: buildConfig,
builds: [],
triggeredBy: null,
triggersSteps: [],
$class: 'pipeline-build'
};
}
});
angular.forEach($scope.builds, function (build) {
var pipelineKey = createPipelineKey(build);
if (pipelineKey) {
var pipeline = pipelineSteps[pipelineKey];
if (!pipeline) {
//console.log("warning no pipeline generated for buildConfig for key " + pipelineKey + " for build " + angular.toJson(build, true));
console.log("warning no pipeline generated for buildConfig for key " + pipelineKey + " for build " + build.$name);
}
else {
pipeline.builds.push(build);
}
}
});
// TODO now we need to look at the triggers to figure out which pipelineSteps triggers each pipelineStep
// now lets create an array of all pipelines, starting from the first known step with a list of the steps
var pipelines = [];
angular.forEach(pipelineSteps, function (pipelineStep, key) {
if (!pipelineStep.triggeredBy) {
// we are a root step....
pipelines.push(pipelineStep);
// now lets add all the steps for this key...
pipelineStep.triggersSteps.push(pipelineStep);
angular.forEach(pipelineSteps, function (step) {
if (step.triggeredBy === key) {
pipelineStep.triggersSteps.push(step);
}
});
}
});
angular.forEach($scope.deploymentConfigs, function (deploymentConfig) {
if (!deploymentConfig.kind) {
deploymentConfig.kind = "DeploymentConfig";
}
angular.forEach(deploymentConfig.triggers, function (trigger) {
var type = trigger.type;
var imageChangeParams = trigger.imageChangeParams;
if (imageChangeParams && type === "ImageChange") {
var from = imageChangeParams.from;
if (from) {
var name = from.name;
if (from.kind === "ImageRepository") {
var tag = imageChangeParams.tag || "latest";
if (name) {
// now lets find a pipeline step which fires from this
angular.forEach(pipelineSteps, function (pipelineStep, key) {
var to = Core.pathGet(pipelineStep, ["buildConfig", "parameters", "output", "to"]);
if (to && (to.kind === "ImageRepository" || to.kind === "ImageStream")) {
var toName = to.name;
if (toName === name) {
var selector = Core.pathGet(deploymentConfig, ["template", "controllerTemplate", "selector"]);
var pods = [];
var $podCounters = selector ? Kubernetes.createPodCounters(selector, KubernetesModel.podsForNamespace(), pods) : null;
var deployPipelineStep = {
buildConfig: deploymentConfig,
$class: 'pipeline-deploy',
$podCounters: $podCounters,
$pods: pods
};
pipelineStep.triggersSteps.push(deployPipelineStep);
}
}
});
}
}
}
}
});
8 years ago
});
$scope.pipelines = pipelines;
8 years ago
}
}
8 years ago
/**
* Lets create a unique key for build / config we can use to do linking of builds / configs / triggers
*/
function createPipelineKey(buildConfig) {
return Core.pathGet(buildConfig, ["parameters", "source", "git", "uri"]);
}
$scope.$keepPolling = function () { return Kubernetes.keepPollingModel; };
$scope.fetch = PollHelpers.setupPolling($scope, function (next) {
var ready = 0;
var numServices = 3;
function maybeNext() {
if (++ready >= numServices) {
next();
}
}
var url = Kubernetes.buildsRestURL();
$http.get(url).
success(function (data, status, headers, config) {
if (data) {
$scope.builds = Kubernetes.enrichBuilds(data.items);
updateData();
}
maybeNext();
}).
error(function (data, status, headers, config) {
Kubernetes.log.warn("Failed to load " + url + " " + data + " " + status);
maybeNext();
});
url = Kubernetes.buildConfigsRestURL();
$http.get(url).
success(function (data, status, headers, config) {
if (data) {
$scope.buildConfigs = data.items;
updateData();
}
maybeNext();
}).
error(function (data, status, headers, config) {
Kubernetes.log.warn("Failed to load " + url + " " + data + " " + status);
maybeNext();
});
url = Kubernetes.deploymentConfigsRestURL();
$http.get(url).
success(function (data, status, headers, config) {
if (data) {
$scope.deploymentConfigs = data.items;
updateData();
}
maybeNext();
}).
error(function (data, status, headers, config) {
Kubernetes.log.warn("Failed to load " + url + " " + data + " " + status);
maybeNext();
});
});
$scope.fetch();
}]);
8 years ago
})(Kubernetes || (Kubernetes = {}));
/// <reference path="../../includes.ts"/>
8 years ago
/// <reference path="kubernetesHelpers.ts"/>
/// <reference path="kubernetesPlugin.ts"/>
var Kubernetes;
(function (Kubernetes) {
Kubernetes.PodController = Kubernetes.controller("PodController", ["$scope", "KubernetesModel", "KubernetesState", "ServiceRegistry", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "$window", "KubernetesApiURL",
function ($scope, KubernetesModel, KubernetesState, ServiceRegistry, $templateCache, $location, $routeParams, $http, $timeout, $window, KubernetesApiURL) {
$scope.kubernetes = KubernetesState;
$scope.model = KubernetesModel;
8 years ago
$scope.rawModel = null;
$scope.itemConfig = {
properties: {
'containers/image$': {
template: $templateCache.get('imageTemplate.html')
},
8 years ago
'status/phase': {
template: $templateCache.get('statusTemplate.html')
},
8 years ago
'\\/Env\\/': {
template: $templateCache.get('envItemTemplate.html')
},
8 years ago
'^\\/labels$': {
template: $templateCache.get('labelTemplate.html')
},
8 years ago
'\\/env\\/key$': {
hidden: true
}
8 years ago
}
8 years ago
};
Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
$scope.$on('kubernetesModelUpdated', function () {
updateData();
});
$scope.$on('$routeUpdate', function ($event) {
updateData();
});
8 years ago
$scope.$watch('model.pods', function (newValue, oldValue) {
updateData();
}, true);
$scope.flipRaw = function () {
$scope.rawMode = !$scope.rawMode;
Core.$apply($scope);
};
$scope.openLogs = function () {
var pods = [$scope.item];
Kubernetes.openLogsForPods(ServiceRegistry, $window, KubernetesModel.currentNamespace(), pods);
};
updateData();
function updateData() {
$scope.id = $routeParams["id"];
$scope.item = $scope.model.getPod(KubernetesState.selectedNamespace, $scope.id);
if ($scope.item) {
$scope.rawModel = Kubernetes.toRawYaml($scope.item);
}
Core.$apply($scope);
}
8 years ago
}]);
})(Kubernetes || (Kubernetes = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="kubernetesHelpers.ts"/>
/// <reference path="kubernetesPlugin.ts"/>
var Kubernetes;
(function (Kubernetes) {
Kubernetes.PodEditController = Kubernetes.controller("PodEditController", ["$scope", "KubernetesModel", "KubernetesState", "KubernetesSchema", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL", "SchemaRegistry",
function ($scope, KubernetesModel, KubernetesState, KubernetesSchema, $templateCache, $location, $routeParams, $http, $timeout, KubernetesApiURL, schemas) {
$scope.kubernetes = KubernetesState;
$scope.model = KubernetesModel;
$scope.id = $routeParams["id"];
$scope.schema = KubernetesSchema;
$scope.config = schemas.cloneSchema("io.fabric8.kubernetes.api.model.Pod");
//$scope.config = KubernetesSchema.definitions.kubernetes_v1beta2_Pod;
Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
$scope.$on('$routeUpdate', function ($event) {
updateData();
});
updateData();
function updateData() {
if ($scope.id) {
$scope.entity = $scope.model.getPod(KubernetesState.selectedNamespace, $scope.id);
Core.$apply($scope);
$scope.fetched = true;
}
else {
$scope.fetched = true;
}
}
8 years ago
$scope.save = function () {
console.log($scope.entity);
};
}]);
})(Kubernetes || (Kubernetes = {}));
/// <reference path="kubernetesPlugin.ts"/>
/// <reference path="term.ts"/>
var Kubernetes;
(function (Kubernetes) {
var log = Logger.get("kubernetes-pod-logs");
Kubernetes._module.service("PodLogReplacements", function () {
return [];
});
Kubernetes._module.run(["PodLogReplacements", function (PodLogReplacements) {
var log = Logger.get("pod-log-replacers");
// Add ANSI escape character replacer
// adapted from https://github.com/mmalecki/ansispan
var colors = {
'30': 'black',
'31': 'red',
'32': 'green',
'33': 'yellow',
'34': 'blue',
'35': 'purple',
'36': 'cyan',
'37': 'white'
};
PodLogReplacements.push(function (msg) {
if (!msg) {
return msg;
}
8 years ago
var end = "</span>";
_.forOwn(colors, function (color, code) {
var start = "<span class=\"" + color + "\">";
msg = msg.replace(new RegExp('\033\\[' + code + 'm', 'g'), start);
msg = msg.replace(new RegExp('\033\\[0;' + code + 'm', 'g'), start);
});
msg = msg.replace(/\033\[1m/g, '<b>').replace(/\033\[22m/g, '</b>');
msg = msg.replace(/\033\[3m/g, '<i>').replace(/\033\[23m/g, '</i>');
msg = msg.replace(/\033\[m/g, end);
msg = msg.replace(/\033\[0m/g, end);
msg = msg.replace(/\033\[39m/g, end);
msg = msg.replace(/\033\[2m/g, '<span>');
msg = msg.replace(/\033\[0;39m/g, end);
log.debug("Running replacement on message: ", msg);
return msg;
});
}]);
Kubernetes._module.controller("Kubernetes.PodLogLinkController", ["$scope", "$interval", "TerminalService", "$templateCache", function ($scope, $interval, TerminalService, $templateCache) {
$scope.openLogs = function (entity) {
log.debug("Open logs: ", entity);
TerminalService.newTerminal($interval, entity.metadata.selfLink, entity.$oracleName, entity, $templateCache.get(UrlHelpers.join(Kubernetes.templatePath, 'logShell.html')));
};
}]);
Kubernetes._module.directive('podLogDisplay', ["userDetails", "PodLogReplacements", function (userDetails, PodLogReplacements) {
return {
restrict: 'E',
template: "\n <div class=\"pod-log-lines\">\n <p ng-hide=\"fetched\">Please wait, fetching logs...</p>\n <p ng-hide=\"messages.length || previous\">View <a href=\"\" ng-click=\"previous=!previous\">previous container logs</a>?</p>\n <p ng-repeat=\"message in messages track by $index\" ng-bind-html=\"message\"></p>\n </div>\n ",
link: function (scope, element, attr) {
var link = scope.$eval('podLink');
var name = scope.$eval('containerName');
if (!link) {
return;
8 years ago
}
8 years ago
scope.fetched = false;
scope.previous = false;
scope.messages = [];
link = UrlHelpers.join(Kubernetes.masterApiUrl(), link, 'log');
link = KubernetesAPI.wsUrl(link);
link.search({
follow: true,
tailLines: 1000,
access_token: userDetails.token
});
var messages = [];
var pullMessages = _.debounce(function () {
scope.messages = scope.messages.concat(_.remove(messages, function () { return true; }).map(function (msg) {
PodLogReplacements.forEach(function (replFunc) {
if (angular.isFunction(replFunc)) {
msg = replFunc(msg);
}
8 years ago
});
return msg;
}));
if (!scope.fetched) {
scope.fetched = true;
}
Core.$apply(scope);
}, 1000);
function initSocket(link) {
scope.fetched = false;
messages.length = 0;
scope.messages.length = 0;
var ws = new WebSocket(link.toString(), 'base64.binary.k8s.io');
ws.onmessage = function (event) {
try {
var message = window.atob(event.data);
messages.push(message);
pullMessages();
}
8 years ago
catch (err) {
}
};
return ws;
8 years ago
}
8 years ago
var ws = initSocket(link);
scope.$watch('previous', function (value, old) {
if (value !== old) {
if (link.hasSearch('previous')) {
link.removeSearch('previous').addSearch('previous', scope.previous);
}
else {
link.addSearch('previous', scope.previous);
}
ws.close();
ws = initSocket(link);
}
});
element.on('$destroy', function () {
if (ws) {
try {
ws.close();
}
catch (err) {
}
delete ws;
}
});
}
8 years ago
};
}]);
Kubernetes._module.directive('podLogWindow', ["$compile", "TerminalService", function ($compile, TerminalService) {
return {
restrict: 'A',
scope: false,
link: function (scope, element, attr) {
Kubernetes.addWindowActions(scope, element, TerminalService);
scope.atBottom = true;
scope.$watch('atBottom', function (val) {
});
}
8 years ago
};
}]);
})(Kubernetes || (Kubernetes = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="kubernetesPlugin.ts"/>
/// <reference path="utilHelpers.ts"/>
var Kubernetes;
(function (Kubernetes) {
Kubernetes.EnvItem = Kubernetes.controller("EnvItem", ["$scope", function ($scope) {
var parts = $scope.data.split('=');
$scope.key = parts.shift();
$scope.value = parts.join('=');
}]);
// main controller for the page
Kubernetes.Pods = Kubernetes.controller("Pods", ["$scope", "KubernetesModel", "KubernetesPods", "KubernetesState", "ServiceRegistry", "$dialog", "$window", "$templateCache", "$routeParams", "$location", "localStorage", "$http", "$timeout", "KubernetesApiURL",
function ($scope, KubernetesModel, KubernetesPods, KubernetesState, ServiceRegistry, $dialog, $window, $templateCache, $routeParams, $location, localStorage, $http, $timeout, KubernetesApiURL) {
$scope.kubernetes = KubernetesState;
$scope.model = KubernetesModel;
$scope.$on('kubernetesModelUpdated', function () {
Core.$apply($scope);
});
$scope.itemSchema = Forms.createFormConfiguration();
$scope.tableConfig = {
data: 'model.pods',
showSelectionCheckbox: true,
enableRowClickSelection: false,
multiSelect: true,
selectedItems: [],
filterOptions: {
filterText: $location.search()["q"] || ''
},
columnDefs: [
{
field: '_key',
displayName: 'Name',
defaultSort: true,
cellTemplate: $templateCache.get("idTemplate.html")
},
{
field: '$statusCss',
displayName: 'Status',
cellTemplate: $templateCache.get("statusTemplate.html")
},
{ field: '$eventCount',
displayName: 'Events',
cellTemplate: $templateCache.get("eventSummaryTemplate.html")
},
{
field: '$restartCount',
displayName: 'Restarts'
},
{
field: '$createdTime',
displayName: 'Age',
cellTemplate: $templateCache.get("ageTemplate.html")
},
{
field: '$imageNames',
displayName: 'Images',
cellTemplate: $templateCache.get("imageTemplate.html")
},
{
field: '$host',
displayName: 'Host',
cellTemplate: $templateCache.get("hostTemplate.html")
},
{
field: '$labelsText',
displayName: 'Labels',
cellTemplate: $templateCache.get("labelTemplate.html")
},
{
field: '$podIP',
displayName: 'Pod IP',
customSortField: function (field) {
return Kubernetes.sortByPodIp(field.$podIP);
}
8 years ago
}
]
};
$scope.openLogs = function () {
var pods = $scope.tableConfig.selectedItems;
if (!pods || !pods.length) {
if ($scope.id) {
var item = $scope.item;
if (item) {
pods = [item];
8 years ago
}
}
}
8 years ago
Kubernetes.openLogsForPods(ServiceRegistry, $window, KubernetesModel.currentNamespace(), pods);
};
Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
$scope.deletePrompt = function (selected) {
if (angular.isString(selected)) {
selected = [{
id: selected
}];
}
UI.multiItemConfirmActionDialog({
collection: selected,
index: 'metadata.name',
onClose: function (result) {
if (result) {
function deleteSelected(selected, next) {
if (next) {
Kubernetes.log.debug("deleting: ", Kubernetes.getName(next));
KubernetesPods.delete({
id: Kubernetes.getName(next)
}, undefined, function () {
Kubernetes.log.debug("deleted: ", Kubernetes.getName(next));
deleteSelected(selected, selected.shift());
}, function (error) {
Kubernetes.log.debug("Error deleting: ", error);
deleteSelected(selected, selected.shift());
});
}
}
deleteSelected(selected, selected.shift());
}
8 years ago
},
title: 'Delete pods?',
action: 'The following pods will be deleted:',
okText: 'Delete',
okClass: 'btn-danger',
custom: "This operation is permanent once completed!",
customClass: "alert alert-warning"
}).open();
};
$scope.createPods = function () {
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
if (xhr.status == 200) {
var obj = JSON.parse(xhr.responseText);
var object = {
"name": "newpod",
"labels": {
"aim": "test",
"app": "oracle"
},
"path": '/home/',
"port": 1525
};
Kubernetes.createRC(object);
}
else {
}
8 years ago
}
};
xhr.open("POST", "/oracleAppPath", false); //与服务器连接并发送
xhr.send(null);
};
}]);
})(Kubernetes || (Kubernetes = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="kubernetesHelpers.ts"/>
/// <reference path="kubernetesPlugin.ts"/>
var Kubernetes;
(function (Kubernetes) {
Kubernetes.ReplicationControllerController = Kubernetes.controller("ReplicationControllerController", ["$scope", "KubernetesModel", "KubernetesState", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL",
function ($scope, KubernetesModel, KubernetesState, $templateCache, $location, $routeParams, $http, $timeout, KubernetesApiURL) {
$scope.kubernetes = KubernetesState;
$scope.model = KubernetesModel;
$scope.rawModel = null;
Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
$scope.itemConfig = {
properties: {
'^\\/labels$': {
template: $templateCache.get('labelTemplate.html')
}
}
8 years ago
};
$scope.$on('kubernetesModelUpdated', function () {
updateData();
});
8 years ago
$scope.$on('$routeUpdate', function ($event) {
updateData();
});
$scope.$watch('model.pods', function (newValue, oldValue) {
updateData();
}, true);
$scope.flipRaw = function () {
$scope.rawMode = !$scope.rawMode;
Core.$apply($scope);
8 years ago
};
8 years ago
updateData();
function updateData() {
if ($scope.dirty) {
return;
}
$scope.id = $routeParams["id"];
$scope.item = $scope.model.getReplicationController(KubernetesState.selectedNamespace, $scope.id);
if ($scope.item) {
$scope.rawModel = Kubernetes.toRawYaml($scope.item);
}
8 years ago
Core.$apply($scope);
}
8 years ago
}]);
})(Kubernetes || (Kubernetes = {}));
8 years ago
/// <reference path="../../includes.ts"/>
8 years ago
/// <reference path="kubernetesHelpers.ts"/>
/// <reference path="kubernetesPlugin.ts"/>
var Kubernetes;
(function (Kubernetes) {
Kubernetes.ReplicationControllerEditController = Kubernetes.controller("ReplicationControllerEditController", ["$scope", "KubernetesModel", "KubernetesState", "KubernetesSchema", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL", "SchemaRegistry",
function ($scope, KubernetesModel, KubernetesState, KubernetesSchema, $templateCache, $location, $routeParams, $http, $timeout, KubernetesApiURL, schemas) {
8 years ago
$scope.kubernetes = KubernetesState;
$scope.model = KubernetesModel;
$scope.id = $routeParams["id"];
$scope.schema = KubernetesSchema;
8 years ago
Kubernetes.log.debug("Schema: ", $scope.schema);
$scope.config = schemas.cloneSchema("io.fabric8.kubernetes.api.model.ReplicationController");
//$$scope.config = KubernetesSchema.definitions.kubernetes_v1beta3_ReplicationController;
8 years ago
Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
$scope.$on('$routeUpdate', function ($event) {
updateData();
});
8 years ago
updateData();
function updateData() {
if ($scope.id) {
$scope.entity = $scope.model.getReplicationController(KubernetesState.selectedNamespace, $scope.id);
Core.$apply($scope);
$scope.fetched = true;
}
else {
$scope.fetched = true;
}
}
}]);
})(Kubernetes || (Kubernetes = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="kubernetesHelpers.ts"/>
/// <reference path="kubernetesPlugin.ts"/>
/// <reference path="kubernetesModel.ts"/>
/// <reference path="../../configs/ts/customAlert.ts"/>
8 years ago
var Kubernetes;
(function (Kubernetes) {
Kubernetes.ReplicationControllers = Kubernetes.controller("ReplicationControllers", ["$scope", "KubernetesModel", "KubernetesReplicationControllers", "KubernetesPods", "ConfigsModel", "KubernetesState", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL",
function ($scope, KubernetesModel, KubernetesReplicationControllers, KubernetesPods, ConfigsModel, KubernetesState, $templateCache, $location, $routeParams, $http, $timeout, KubernetesApiURL) {
$scope.kubernetes = KubernetesState;
$scope.configs = ConfigsModel;
$scope.model = KubernetesModel;
$scope.tableConfig = {
data: 'model.replicationControllers',
showSelectionCheckbox: true,
enableRowClickSelection: false,
multiSelect: true,
selectedItems: [],
filterOptions: {
filterText: $location.search()["q"] || ''
},
columnDefs: [
{ field: '$oracleName',
displayName: '服务名称',
cellTemplate: $templateCache.get("idTemplate.html"),
customSortField: function (field) {
return field;
}
},
8 years ago
//{ field: '$replicas',
// displayName: 'Scale',
// cellTemplate:$templateCache.get("desiredReplicas.html")
//},
{ field: '$pods.age',
displayName: '启动时间',
cellTemplate: $templateCache.get("ageTemplate.html")
},
8 years ago
{ field: '$labelsText',
displayName: '数据标签',
cellTemplate: $templateCache.get("labelTemplate.html")
},
8 years ago
{ field: '$pods',
displayName: '连接参数',
cellTemplate: $templateCache.get("connectParamTemplate.html")
},
8 years ago
{ field: '$podCounters',
displayName: '服务状态',
cellTemplate: $templateCache.get("podCountsAndLinkTemplate.html"),
customSortField: function (field) {
8 years ago
console.log(field);
8 years ago
if (field.$podCounters.ready) {
return 3;
}
else if (field.$podCounters.valid || field.$podCounters.waiting) {
return 2;
}
else if (field.$podCounters.error) {
return 0;
}
else {
return 1;
}
}
8 years ago
},
{ field: '$extractStatus',
displayName: '数据汇总状态',
cellTemplate: $templateCache.get("dataSummaryTemplate.html")
}
],
sortInfo: {
sortBy: "$oracleName",
ascending: false
}
8 years ago
};
Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
$scope.deletePrompt = function (selected) {
if (angular.isString(selected)) {
selected = [{
id: selected
}];
}
8 years ago
var extractItems = Kubernetes.checkForExtract(selected);
if (extractItems.length == 0) {
UI.multiItemConfirmActionDialog({
collection: selected,
index: 'metadata.name',
onClose: function (result) {
if (result) {
function deleteSelected(selected, next) {
if (next) {
Kubernetes.resizeController($http, KubernetesApiURL, next, 0, function () {
KubernetesReplicationControllers.delete({
id: Kubernetes.getName(next)
}, undefined, function () {
if (next.metadata.labels.style === "oracle") {
Kubernetes.connectOracle($http, $timeout, "/java/console/api/cancelOracleConection", "delete", next, 0);
}
deleteSelected(selected, selected.shift());
}, function (error) {
Kubernetes.log.debug("Error deleting: ", error);
deleteSelected(selected, selected.shift());
});
});
}
}
deleteSelected(selected, selected.shift());
}
},
title: '是否需要删除oracle服务',
action: '以下的oracle服务将会被删除:',
okText: '删除',
okClass: 'btn-danger sj_btn_cir',
custom: "该服务删除后将会清除oracle对应服务的端口等资源占用但不删除数据文件是否删除请确认",
customClass: "alert alert-warning sj_alert-warning",
cancelText: "取消",
cancelClass: 'sj_btn_grey'
}).open();
}
else {
var name = "";
angular.forEach(extractItems, function (item) {
name += item.$oracleName + ",";
});
//alert("删除服务失败:" + name + "服务正在执行汇总操作,不能被删除");
Configs.customAlert("提示", "操作失败:正在执行汇总操作的服务不能被删除!", '', null, 0, "error");
}
8 years ago
};
$scope.createRCs = function () {
$http({
url: '/java/console/api/cancelOracleConection',
dataType: 'json',
method: 'POST',
params: { param: "data" }
}).success(function (data, header, config, status) {
console.log("success");
}).error(function (data, header, config, status) {
//log.warn("Failed to connect " + connectParam + " " + data + " " + status);
});
};
$scope.stopPrompt = function (selected) {
if (angular.isString(selected)) {
selected = [{
id: selected
}];
}
var extractItems = Kubernetes.checkForExtract(selected);
if (extractItems.length == 0) {
UI.multiItemConfirmActionDialog({
collection: selected,
index: 'metadata.name',
onClose: function (result) {
if (result) {
function stopSelected(selected, next) {
if (next) {
Kubernetes.resizeController($http, KubernetesApiURL, next, 0, function () {
if (next.metadata.labels.style === "oracle") {
Kubernetes.connectOracle($http, $timeout, "/java/console/api/cancelOracleConection", "stop", next, 0);
}
stopSelected(selected, selected.shift());
});
}
}
stopSelected(selected, selected.shift());
}
8 years ago
},
title: '是否需要停止oracle服务',
action: '以下的oracle服务将会被停止:',
okText: '停止',
okClass: 'btn-danger sj_btn_cir',
custom: "该服务停止后将无法继续提供连接访问服务,但可通过启动按钮重新启动该服务以进行访问。是否停止,请确认",
customClass: "alert alert-warning sj_alert-warning",
cancelText: "取消",
cancelClass: 'sj_btn_grey'
}).open();
}
else {
var name = "";
angular.forEach(extractItems, function (item) {
name += item.$oracleName + ",";
});
//alert("停止服务失败:" + name + "服务正在执行汇总操作,不能停止");
Configs.customAlert("提示", "操作失败:正在执行汇总操作的服务不能被停止!", '', null, 0, "error");
8 years ago
}
8 years ago
};
$scope.reStartPrompt = function (selected) {
function startSelected(selected, next) {
if (next) {
console.log(Kubernetes.getLabels(next).status);
if (next.$replicas === 0) {
8 years ago
Kubernetes.resizeController($http, KubernetesApiURL, next, 1, function () {
Kubernetes.connectOracle($http, $timeout, "/java/console/api/connectOracle", "reStart", next, 200);
startSelected(selected, selected.shift());
});
}
else {
if (Kubernetes.getLabels(next).status == "1")
Kubernetes.connectOracle($http, $timeout, "/java/console/api/connectOracle", "reStart", next, 200);
startSelected(selected, selected.shift());
}
8 years ago
}
}
startSelected(selected, selected.shift());
};
$scope.extractClick = {
items: null,
selectedItem: { name: "当前没有可用的汇总库" },
dialog: new UI.Dialog(),
onOk: function () {
var extractClick = $scope.extractClick;
extractClick.items = $scope.tableConfig.selectedItems;
Kubernetes.extractDataToOracle($http, extractClick.items, extractClick.selectedItem);
//extractClick.selectedItem = $scope.filterReplicationControllers[0] || "";
extractClick.dialog.close();
},
open: function (selected) {
var extractClick = $scope.extractClick;
if ($scope.configs && $scope.configs.oracleParam instanceof Array && $scope.configs.oracleParam.length > 0)
extractClick.selectedItem = $scope.configs.oracleParam[0];
var result = Kubernetes.checkIsStartSuccess($scope.tableConfig.selectedItems);
if (result.length > 0) {
Configs.customAlert("提示", "操作失败:选择服务中存在未启动的数据,请先启动服务", '', null, 0, "error");
return;
}
8 years ago
extractClick.dialog.open();
/*extractData.selectedItem = $scope.filterReplicationControllers[0] || "";
extractData.items = selected;*/
$timeout(function () {
$('#newDataName').focus();
}, 50);
},
close: function () {
$scope.extractClick.selectedItem = { name: "当前没有可用的汇总库" };
$scope.extractClick.dialog.close();
}
};
8 years ago
}]);
8 years ago
})(Kubernetes || (Kubernetes = {}));
/// <reference path="../../includes.ts"/>
8 years ago
/// <reference path="kubernetesInterfaces.ts"/>
var Kubernetes;
(function (Kubernetes) {
function schemaSetRequired(schema, propertyName, isRequired) {
if (isRequired === void 0) { isRequired = true; }
if (schema && propertyName) {
var required = schema.required;
if (isRequired) {
if (!required) {
required = [];
schema.required = required;
}
if (!_.contains(required, propertyName)) {
required.push(propertyName);
}
}
else {
if (required) {
var idx = required.indexOf(propertyName);
if (idx >= 0) {
required.splice(idx, 1);
}
}
8 years ago
}
}
}
Kubernetes.schemaSetRequired = schemaSetRequired;
})(Kubernetes || (Kubernetes = {}));
/// <reference path="../../includes.ts"/>
8 years ago
/// <reference path="kubernetesHelpers.ts"/>
/// <reference path="kubernetesPlugin.ts"/>
var Kubernetes;
(function (Kubernetes) {
Kubernetes.SecretController = Kubernetes.controller("SecretController", ["$scope", "KubernetesModel", "KubernetesState", "KubernetesSchema", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL", "K8SClientFactory",
function ($scope, KubernetesModel, KubernetesState, KubernetesSchema, $templateCache, $location, $routeParams, $http, $timeout, KubernetesApiURL, K8SClientFactory) {
$scope.kubernetes = KubernetesState;
$scope.model = KubernetesModel;
$scope.id = $routeParams["id"];
Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
8 years ago
Kubernetes.selectSubNavBar($scope, "Secrets", $scope.id ? "Edit Secret: " + $scope.id : "Create Secret");
var kubeClient = Kubernetes.createKubernetesClient("secrets");
var onSaveUrl = $location.search()["savedUrl"];
var createKind = $location.search()["kind"];
$scope.sshKeys = Kubernetes.sshSecretDataKeys;
$scope.httpsKeys = Kubernetes.httpsSecretDataKeys;
var secretLabels = {
"ssh-key": "SSH private key",
"ssh-key.pub": "SSH public key",
"ca.crt": "CA Certificate",
".dockercfg": "Docker config",
"username": "User name"
};
var secretTooltips = {
"ssh-key": "SSH private key text contents",
"ca.crt": "Certificate Authority (CA) Certificate",
".dockercfg": "Docker configuration token"
};
$scope.$on('kubernetesModelUpdated', function () {
8 years ago
if ($scope.id && !$scope.secret) {
updateData();
}
});
8 years ago
$scope.$on('$routeUpdate', function ($event) {
updateData();
});
8 years ago
$scope.propertyKeys = function () {
return _.keys(secretLabels);
};
$scope.checkNameUnique = function (value) {
var answer = true;
angular.forEach($scope.model.secrets, function (secret) {
var name = Kubernetes.getName(secret);
if (value === name) {
answer = false;
}
});
return answer;
};
$scope.checkFieldUnique = function (key) {
return $scope.entity.properties[key] ? false : true;
};
$scope.hasAllKeys = function (keys) {
var answer = keys && keys.length;
angular.forEach(keys, function (key) {
if (!$scope.entity.properties[key]) {
answer = false;
}
8 years ago
});
return answer;
};
$scope.addFieldDialog = {
controller: null,
newReplicas: 0,
dialog: new UI.Dialog(),
onOk: function () {
$scope.addFieldDialog.dialog.close();
$scope.addDataField();
},
open: function (controller) {
var addFieldDialog = $scope.addFieldDialog;
addFieldDialog.dialog.open();
$timeout(function () {
$('#newDataName').focus();
}, 50);
},
close: function () {
$scope.addFieldDialog.dialog.close();
8 years ago
}
8 years ago
};
$scope.entityChanged = function () {
$scope.changed = true;
};
$scope.addFields = function (keys) {
angular.forEach(keys, function (key) { return addField(key); });
Core.$apply($scope);
};
function addField(key) {
var property = createProperty(key, "");
$scope.entity.properties[key] = property;
$scope.entity.newDataKey = "";
$scope.showAddDataFieldForm = false;
$scope.entityChanged();
}
$scope.addDataField = function () {
var key = $scope.entity.newDataKey;
if (key) {
addField(key);
Core.$apply($scope);
8 years ago
}
8 years ago
};
$scope.deleteProperty = function (key) {
if (key) {
delete $scope.entity.properties[key];
$scope.entityChanged();
Core.$apply($scope);
}
8 years ago
};
$scope.cancel = function () {
updateData();
};
$scope.save = function () {
var entity = $scope.entity || {};
var name = entity.name;
if (name) {
if (!$scope.secret) {
$scope.secret = {
apiVersion: Kubernetes.defaultApiVersion,
kind: "Secret",
metadata: {
name: ""
},
data: {}
};
}
8 years ago
var data = {};
angular.forEach(entity.properties, function (property) {
var key = property.key;
var value = property.value || "";
if (key) {
data[key] = window.btoa(value);
}
});
$scope.secret.metadata.name = name;
$scope.secret.data = data;
Core.notification('info', "Saving secret " + name);
kubeClient.put($scope.secret, function (data) {
var secretsLink = onSaveUrl || Developer.namespaceLink($scope, $routeParams, "secrets");
var params = {};
if (onSaveUrl) {
params['secret'] = name;
}
$location.path(secretsLink);
$location.search(params);
Kubernetes.log.info("navigating to URL: " + secretsLink + " with params " + angular.toJson($location.search()));
}, function (err) {
Core.notification('error', "Failed to secret " + name + "\n" + err);
});
}
};
updateData();
function createProperty(key, text) {
var label = secretLabels[key] || Core.humanizeValue(key);
var tooltip = secretTooltips[key] || "Value of the " + label;
var rows = 5;
var lines = text.split("\n").length + 1;
if (lines > rows) {
rows = lines;
}
var type = "textarea";
if (key === "username") {
type = "text";
if (!text) {
text = Kubernetes.currentUserName();
}
}
else if (key === "password") {
type = "password";
}
var property = {
key: key,
label: label,
tooltip: tooltip,
rows: rows,
value: text,
type: type
};
return property;
}
function updateData() {
$scope.item = null;
$scope.changed = false;
$scope.entity = {
name: $scope.id,
properties: {}
};
if ($scope.id) {
angular.forEach($scope.model.secrets, function (secret) {
var name = Kubernetes.getName(secret);
if (name === $scope.id) {
$scope.secret = secret;
angular.forEach(secret.data, function (value, key) {
var text = "";
if (angular.isString(value) && value) {
text = window.atob(value);
}
var property = createProperty(key, text);
$scope.entity.properties[key] = property;
});
$scope.fetched = true;
Core.$apply($scope);
}
});
}
else {
if (createKind === "ssh") {
$scope.addFields($scope.sshKeys);
}
else if (createKind === "https") {
$scope.addFields($scope.httpsKeys);
}
$scope.fetched = true;
Core.$apply($scope);
}
}
}]);
})(Kubernetes || (Kubernetes = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="kubernetesPlugin.ts"/>
/// <reference path="kubernetesModel.ts"/>
/// <reference path="utilHelpers.ts"/>
var Kubernetes;
(function (Kubernetes) {
Kubernetes.SecretsController = Kubernetes.controller("SecretsController", ["$scope", "KubernetesModel", "KubernetesState", "ServiceRegistry", "$dialog", "$window", "$templateCache", "$routeParams", "$location", "localStorage", "$http", "$timeout", "KubernetesApiURL",
function ($scope, KubernetesModel, KubernetesState, ServiceRegistry, $dialog, $window, $templateCache, $routeParams, $location, localStorage, $http, $timeout, KubernetesApiURL) {
$scope.kubernetes = KubernetesState;
$scope.model = KubernetesModel;
$scope.$on('kubernetesModelUpdated', function () {
Core.$apply($scope);
});
$scope.$createSecretLink = Developer.namespaceLink($scope, $routeParams, "secretCreate");
var kubeClient = Kubernetes.createKubernetesClient("secrets");
$scope.tableConfig = {
data: 'model.secrets',
showSelectionCheckbox: true,
enableRowClickSelection: false,
multiSelect: true,
selectedItems: [],
filterOptions: {
filterText: $location.search()["q"] || ''
},
columnDefs: [
{
field: '_key',
displayName: 'Name',
defaultSort: true,
cellTemplate: $templateCache.get("idTemplate.html")
},
{
field: '$labelsText',
displayName: 'Labels',
cellTemplate: $templateCache.get("labelTemplate.html")
},
]
};
$scope.deletePrompt = function (selected) {
UI.multiItemConfirmActionDialog({
collection: selected,
index: 'metadata.name',
onClose: function (result) {
if (result) {
function deleteSelected(selected, next) {
if (next) {
kubeClient.delete(next, function () {
deleteSelected(selected, selected.shift());
});
}
else {
}
}
deleteSelected(selected, selected.shift());
}
},
title: 'Delete Secrets',
action: 'The following Secrets will be deleted:',
okText: 'Delete',
okClass: 'btn-danger',
custom: "This operation is permanent once completed!",
customClass: "alert alert-warning"
}).open();
};
Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
}]);
})(Kubernetes || (Kubernetes = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="kubernetesHelpers.ts"/>
/// <reference path="kubernetesPlugin.ts"/>
var Kubernetes;
(function (Kubernetes) {
Kubernetes.ServiceController = Kubernetes.controller("ServiceController", ["$scope", "KubernetesModel", "KubernetesState", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL",
function ($scope, KubernetesModel, KubernetesState, $templateCache, $location, $routeParams, $http, $timeout, KubernetesApiURL) {
$scope.kubernetes = KubernetesState;
$scope.model = KubernetesModel;
$scope.rawModel = null;
Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
$scope.itemConfig = {
properties: {
'^\\/labels$': {
template: $templateCache.get('labelTemplate.html')
}
}
};
$scope.$on('kubernetesModelUpdated', function () {
updateData();
});
$scope.$watch('model.services', function (newValue, oldValue) {
updateData();
}, true);
$scope.$on('$routeUpdate', function ($event) {
updateData();
});
$scope.flipRaw = function () {
$scope.rawMode = !$scope.rawMode;
Core.$apply($scope);
};
updateData();
function updateData() {
$scope.id = $routeParams["id"];
$scope.namespace = $routeParams["namespace"] || KubernetesState.selectedNamespace;
$scope.item = $scope.model.getService($scope.namespace, $scope.id);
if ($scope.item) {
$scope.rawModel = Kubernetes.toRawYaml($scope.item);
}
Core.$apply($scope);
}
}]);
})(Kubernetes || (Kubernetes = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="kubernetesHelpers.ts"/>
/// <reference path="kubernetesPlugin.ts"/>
var Kubernetes;
(function (Kubernetes) {
Kubernetes.ServiceEditController = Kubernetes.controller("ServiceEditController", ["$scope", "KubernetesModel", "KubernetesState", "KubernetesSchema", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL", "SchemaRegistry",
function ($scope, KubernetesModel, KubernetesState, KubernetesSchema, $templateCache, $location, $routeParams, $http, $timeout, KubernetesApiURL, schemas) {
$scope.kubernetes = KubernetesState;
$scope.model = KubernetesModel;
$scope.id = $routeParams["id"];
$scope.schema = KubernetesSchema;
$scope.config = schemas.cloneSchema("io.fabric8.kubernetes.api.model.Service");
//$scope.config = KubernetesSchema.definitions.kubernetes_v1beta2_Service;
Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
$scope.$on('$routeUpdate', function ($event) {
updateData();
});
updateData();
function updateData() {
if ($scope.id) {
$scope.entity = $scope.model.getService(KubernetesState.selectedNamespace, $scope.id);
Core.$apply($scope);
$scope.fetched = true;
}
else {
$scope.fetched = true;
}
}
}]);
})(Kubernetes || (Kubernetes = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="kubernetesHelpers.ts"/>
/// <reference path="kubernetesPlugin.ts"/>
/// <reference path="kubernetesModel.ts"/>
var Kubernetes;
(function (Kubernetes) {
Kubernetes._module.factory('ServiceRegistry', [function () {
return new ServiceRegistryService();
}]);
/**
* Represents a simple interface to service discovery that can be used early on in the application lifecycle before the
* underlying model has been created via dependency injection
*/
var ServiceRegistryService = (function () {
function ServiceRegistryService() {
this.model = null;
}
/**
* Returns true if there is a service available for the given ID or false
*/
ServiceRegistryService.prototype.hasService = function (serviceName) {
return this.findService(serviceName) ? true : false;
};
/**
* Returns the service for the given service name (ID) or null if it cannot be found
*
* @param serviceName the name of the service to look for
* @return {null}
*/
ServiceRegistryService.prototype.findService = function (serviceName) {
var answer = null;
if (serviceName) {
var model = this.getModel();
if (model) {
var namespace = model.currentNamespace();
return model.getService(namespace, serviceName);
}
}
return answer;
};
/**
* Returns the service link for the given service name
*
* @param serviceName the name of the service
* @return {null}
*/
ServiceRegistryService.prototype.serviceLink = function (serviceName) {
var service = this.findService(serviceName);
return Kubernetes.serviceLinkUrl(service);
};
/**
* Returns the service link for the given service name if its ready (has at least one ready pod)
*
* @param serviceName the name of the service
* @return {null}
*/
ServiceRegistryService.prototype.serviceReadyLink = function (serviceName) {
var service = this.findService(serviceName);
if (Kubernetes.readyPodCount(service)) {
return Kubernetes.serviceLinkUrl(service);
}
else {
return null;
}
};
ServiceRegistryService.prototype.getModel = function () {
var answer = this.model;
// lets allow lazy load so we can be invoked before the injector has been created
if (!answer) {
var injector = HawtioCore.injector;
if (injector) {
this.model = injector.get('KubernetesModel');
8 years ago
}
}
answer = this.model;
return answer;
};
return ServiceRegistryService;
}());
Kubernetes.ServiceRegistryService = ServiceRegistryService;
8 years ago
})(Kubernetes || (Kubernetes = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="kubernetesHelpers.ts"/>
8 years ago
/// <reference path="kubernetesPlugin.ts"/>
var Kubernetes;
(function (Kubernetes) {
Kubernetes.ServiceApps = Kubernetes._module.controller('Kubernetes.ServiceApps', ["$scope", "KubernetesModel", function ($scope, KubernetesModel) {
$scope.model = KubernetesModel;
}]);
Kubernetes.Services = Kubernetes.controller("Services", ["$scope", "KubernetesModel", "KubernetesServices", "KubernetesPods", "KubernetesState", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL",
function ($scope, KubernetesModel, KubernetesServices, KubernetesPods, KubernetesState, $templateCache, $location, $routeParams, $http, $timeout, KubernetesApiURL) {
$scope.kubernetes = KubernetesState;
$scope.model = KubernetesModel;
ControllerHelpers.bindModelToSearchParam($scope, $location, 'mode', 'mode', 'list');
8 years ago
$scope.tableConfig = {
data: 'model.services',
8 years ago
showSelectionCheckbox: true,
enableRowClickSelection: false,
multiSelect: true,
selectedItems: [],
filterOptions: {
filterText: $location.search()["q"] || ''
},
columnDefs: [
{ field: '_key',
8 years ago
displayName: 'Name',
cellTemplate: $templateCache.get("idTemplate.html")
},
{ field: '$serviceUrl',
displayName: 'Address',
cellTemplate: $templateCache.get("portalAddress.html")
},
{ field: '$podCount',
displayName: 'Pods',
cellTemplate: $templateCache.get("podCountsAndLinkTemplate.html"),
customSortField: function (field) {
// need to concat all the pod counters
var ready = field.$podCounters.ready || 0;
var valid = field.$podCounters.valid || 0;
var waiting = field.$podCounters.waiting || 0;
var error = field.$podCounters.error || 0;
return ready + valid + waiting + error;
}
},
{ field: '$selectorText',
displayName: 'Selector',
cellTemplate: $templateCache.get("selectorTemplate.html")
},
{ field: '$labelsText',
8 years ago
displayName: 'Labels',
cellTemplate: $templateCache.get("labelTemplate.html")
}
8 years ago
]
};
Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
8 years ago
$scope.deletePrompt = function (selected) {
if (angular.isString(selected)) {
selected = [{
id: selected
}];
}
8 years ago
UI.multiItemConfirmActionDialog({
collection: selected,
index: 'metadata.name',
onClose: function (result) {
if (result) {
function deleteSelected(selected, next) {
if (next) {
Kubernetes.log.debug("deleting: ", Kubernetes.getName(next));
KubernetesServices.delete({
id: Kubernetes.getName(next)
}, undefined, function () {
Kubernetes.log.debug("deleted: ", Kubernetes.getName(next));
deleteSelected(selected, selected.shift());
}, function (error) {
Kubernetes.log.debug("Error deleting: ", error);
8 years ago
deleteSelected(selected, selected.shift());
});
}
}
deleteSelected(selected, selected.shift());
}
8 years ago
},
title: 'Delete services?',
action: 'The following services will be deleted:',
8 years ago
okText: 'Delete',
okClass: 'btn-danger',
custom: "This operation is permanent once completed!",
customClass: "alert alert-warning"
}).open();
};
}]);
})(Kubernetes || (Kubernetes = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="kubernetesHelpers.ts"/>
/// <reference path="kubernetesPlugin.ts"/>
var Kubernetes;
(function (Kubernetes) {
// controller for the status icon cell
Kubernetes.PodStatus = Kubernetes.controller("PodStatus", ["$scope", function ($scope) {
$scope.statusMapping = function (text) {
return Kubernetes.statusTextToCssClass(text);
};
}]);
Kubernetes._module.controller("Kubernetes.TermController", ["$scope", "TerminalService", function ($scope, TerminalService) {
$scope.canConnectTo = function (container) {
if (container.securityContext && container.securityContext.privileged) {
return false;
}
return true;
};
$scope.openTerminal = function (selfLink, containerName) {
var id = TerminalService.newTerminal(selfLink, containerName);
Kubernetes.log.debug("Created terminal, id: ", id);
};
}]);
Kubernetes.DataLabels = Kubernetes.controller("DataLabels", ['$scope', '$location', function ($scope, $location) {
$scope.labelClick = function (entity, key, value) {
$scope.$emit('dataLabelFilterUpdate', value, key);
};
$scope.labelClass = Kubernetes.containerLabelClass;
}]);
// controller that deals with the labels per pod
Kubernetes.Labels = Kubernetes.controller("Labels", ["$scope", "$location", function ($scope, $location) {
$scope.labels = [];
var labelKeyWeights = {
"cityName": 1,
"districtName": 2,
"systemName": 3,
"year": 4,
"version": 5
};
$scope.$watch('entity', function (newValue, oldValue) {
if (newValue) {
// log.debug("labels: ", newValue);
// massage the labels a bit
$scope.labels = [];
angular.forEach(Core.pathGet($scope.entity, ["metadata", "labels"]), function (value, key) {
if (key === 'fabric8' || key === 'style' || key === 'status' || (key === 'isTarget' && value === 'false') || key === 'isExtract' || key === 'name') {
// TODO not sure what this is for, the container type?
return;
}
$scope.labels.push({
key: key,
title: value
});
});
// lets sort by key but lets make sure that we weight certain labels so they are first
$scope.labels = $scope.labels.sort(function (a, b) {
function getWeight(key) {
return labelKeyWeights[key] || 0;
}
var n1 = a["key"];
var n2 = b["key"];
var w1 = getWeight(n1);
var w2 = getWeight(n2);
var diff = w1 - w2;
if (diff < 0) {
return -1;
}
else if (diff > 0) {
return 1;
}
if (n1 && n2) {
if (n1 > n2) {
return 1;
}
else if (n1 < n2) {
return -1;
}
else {
return 0;
}
}
else {
if (n1 === n2) {
return 0;
}
else if (n1) {
return 1;
}
else {
return -1;
}
}
});
}
});
$scope.handleClick = function (entity, labelType, value) {
// log.debug("handleClick, entity: ", entity, " key: ", labelType, " value: ", value);
$scope.$emit('labelFilterUpdate', value.title);
};
$scope.labelClass = Kubernetes.containerLabelClass;
}]);
//服务状态过滤
Kubernetes.Status = Kubernetes.controller('Status', ["$scope", "$http", "$interval", "$location", "KubernetesApiURL", function ($scope, $http, $interval, $location, KubernetesApiURL) {
/*$scope.$watch('entity', (newValue, oldValue) => {
if(newValue)
console.log(newValue);
},true);*/
}]);
Kubernetes.TaskEdit = Kubernetes.controller('TaskEdit', ['$scope', function ($scope) {
$scope.showDeleteOne = {
show: false,
item: null,
open: function (entity) {
if (entity.status == 1)
Configs.customAlert("提示", "操作失败: 正在迁移的任务,不能迁移!", '', null, 0, "error");
else {
var showDeleteOne = $scope.showDeleteOne;
showDeleteOne.show = true;
showDeleteOne.item = entity;
}
},
onOk: function () {
var showDeleteOne = $scope.showDeleteOne;
$scope.$emit('deleteRow', showDeleteOne.item);
},
onCancel: function () {
var showDeleteOne = $scope.showDeleteOne;
showDeleteOne.show = false;
showDeleteOne.item = null;
}
};
/*$scope.deleteRow = (entity) =>{
$scope.$emit('deleteRow', entity);
}*/
}]);
Kubernetes.LoadMask = Kubernetes.controller('LoadMask', ['$scope', function ($scope) {
}]);
})(Kubernetes || (Kubernetes = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="kubernetesHelpers.ts"/>
/// <reference path="kubernetesPlugin.ts"/>
var Kubernetes;
(function (Kubernetes) {
Kubernetes._module.directive("hawtioTabs", ['HawtioSubTabs', function (HawtioSubTabs) {
return {
link: function (scope, element, attrs) {
HawtioSubTabs.apply(scope.$eval('subTabConfig'));
8 years ago
}
8 years ago
};
}]);
})(Kubernetes || (Kubernetes = {}));
/// <reference path="kubernetesPlugin.ts"/>
var Kubernetes;
(function (Kubernetes) {
Kubernetes.TemplateController = Kubernetes.controller("TemplateController", [
"$scope", "$location", "$http", "$timeout", "$routeParams", "marked", "$templateCache", "$modal", "KubernetesModel", "KubernetesState", "KubernetesApiURL",
function ($scope, $location, $http, $timeout, $routeParams, marked, $templateCache, $modal, KubernetesModel, KubernetesState, KubernetesApiURL) {
var model = $scope.model = KubernetesModel;
$scope.filterText = $location.search()["q"];
$scope.targetNamespace = $routeParams.targetNamespace;
8 years ago
Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
$scope.$watchCollection('model.namespaces', function () {
if (!$scope.targetNamespace) {
$scope.targetNamespace = model.currentNamespace();
}
8 years ago
});
var returnTo = new URI($location.search()['returnTo'] || '/kubernetes/apps');
function goBack() {
$location.path(returnTo.path()).search(returnTo.query(true));
}
function getAnnotations(obj) {
return Core.pathGet(obj, ['metadata', 'annotations']);
}
function getValueFor(obj, key) {
var annotations = getAnnotations(obj);
if (!annotations) {
return "";
}
var name = Kubernetes.getName(obj);
if (name) {
var fullKey = "fabric8." + name + "/" + key;
var answer = annotations[fullKey];
if (answer) {
return answer;
}
}
var key = _.find(_.keys(annotations), function (k) { return _.endsWith(k, key); });
if (key) {
return annotations[key];
8 years ago
}
else {
return "";
8 years ago
}
}
$scope.cancel = function () {
if ($scope.formConfig) {
delete $scope.formConfig;
delete $scope.entity;
$scope.objects = undefined;
return;
}
goBack();
};
/*
$scope.$watch('model.templates.length', (newValue) => {
if (newValue === 0) {
goBack();
}
});
*/
$scope.filterTemplates = function (template) {
if (Core.isBlank($scope.filterText)) {
return true;
}
return _.contains(angular.toJson(template), $scope.filterText.toLowerCase());
};
$scope.openFullDescription = function (template) {
var text = marked(getValueFor(template, 'description') || 'No description');
var modal = $modal.open({
templateUrl: UrlHelpers.join(Kubernetes.templatePath, 'templateDescription.html'),
controller: ['$scope', '$modalInstance', function ($scope, $modalInstance) {
$scope.text = text,
$scope.ok = function () {
modal.close();
};
}]
});
};
$scope.getDescription = function (template) {
var answer = $(marked(getValueFor(template, 'description') || 'No description'));
var textDefault = answer.html();
var maxLength = 200;
if (textDefault.length > maxLength) {
var truncated = $.trim(textDefault).substring(0, maxLength).split(' ').slice(0, -1).join(' ');
answer.html(truncated + '...');
answer.append($templateCache.get('truncatedDescriptionTag.html'));
}
return answer.html();
};
$scope.getIconUrl = function (template) {
return getValueFor(template, 'iconUrl') || Kubernetes.defaultIconUrl;
};
$scope.deployTemplate = function (template) {
Kubernetes.log.debug("Template parameters: ", template.parameters);
Kubernetes.log.debug("Template objects: ", template.objects);
Kubernetes.log.debug("Template annotations: ", template.metadata.annotations);
var templateAnnotations = template.metadata.annotations;
if (templateAnnotations) {
_.forEach(template.objects, function (object) {
var annotations = object.metadata.annotations || {};
var name = Kubernetes.getName(object);
var matches = _.filter(_.keys(templateAnnotations), function (key) { return key.match('.' + name + '/'); });
matches.forEach(function (match) {
if (!(match in annotations)) {
annotations[match] = templateAnnotations[match];
}
});
object.metadata.annotations = annotations;
});
}
var routeServiceName = undefined;
var service = _.find(template.objects, function (obj) {
if (Kubernetes.getKind(obj) === "Service") {
var ports = Kubernetes.getPorts(obj);
if (ports && ports.length === 1) {
return true;
}
}
else {
return false;
}
});
if (service) {
routeServiceName = Kubernetes.getName(service);
}
Kubernetes.log.debug("Service: ", service);
if ((!routeServiceName || !Kubernetes.isOpenShift) && (!template.parameters || template.parameters.length === 0)) {
Kubernetes.log.debug("No parameters required, deploying objects");
applyObjects(template.objects);
return;
}
var formConfig = {
style: HawtioForms.FormStyle.STANDARD,
hideLegend: true,
properties: {}
};
var params = template.parameters;
_.forEach(params, function (param) {
var property = {};
property.label = _.startCase(param.name);
property.description = param.description;
property.default = param.value;
// TODO, do parameters support types?
property.type = 'string';
formConfig.properties[param.name] = property;
});
if (routeServiceName && Kubernetes.isOpenShift) {
formConfig.properties.createRoute = {
type: 'boolean',
default: true,
label: "Create Route"
};
/*
formConfig.properties.routeName = {
type: 'string',
label: 'Route Name',
default: routeServiceName,
'control-group-attributes': {
'ng-show': 'entity.createRoute'
}
};
*/
formConfig.properties.routeServiceName = {
type: 'hidden',
default: routeServiceName
};
var namespace = Kubernetes.currentKubernetesNamespace();
// TODO store this in localStorage!
var domain = "vagrant.f8";
var defaultRouteHostSuffix = '.' + (namespace === "default" ? "" : namespace + ".") + domain;
formConfig.properties.routeHostname = {
type: 'string',
default: defaultRouteHostSuffix,
label: "Route host name suffix",
'control-group-attributes': {
'ng-show': 'entity.createRoute'
}
};
8 years ago
}
$scope.entity = {};
$scope.formConfig = formConfig;
$scope.objects = template.objects;
Kubernetes.log.debug("Form config: ", formConfig);
};
function substitute(str, data) {
return str.replace(/\${\w*}/g, function (match) {
var key = match.replace(/\${/, '').replace(/}/, '').trim();
return data[key] || match;
});
8 years ago
}
;
$scope.substituteAndDeployTemplate = function () {
var objects = $scope.objects;
var objectsText = angular.toJson(objects, true);
// pull these out of the entity object so they're not used in substitutions
var createRoute = $scope.entity.createRoute;
var routeHostnameSuffix = $scope.entity.routeHostname || "";
var routeName = $scope.entity.routeName;
var routeServiceName = $scope.entity.routeServiceName;
delete $scope.entity.createRoute;
delete $scope.entity.routeHostname;
delete $scope.entity.routeName;
delete $scope.entity.routeServiceName;
objectsText = substitute(objectsText, $scope.entity);
objects = angular.fromJson(objectsText);
if (createRoute) {
var routes = [];
angular.forEach(objects, function (object) {
var kind = object.kind;
var name = Kubernetes.getName(object);
if (name && "Service" === kind) {
var routeHostname = name + routeHostnameSuffix;
var route = {
kind: "Route",
apiVersion: Kubernetes.defaultOSApiVersion,
metadata: {
name: name,
},
spec: {
host: routeHostname,
to: {
kind: "Service",
name: name
}
}
};
routes.push(route);
}
});
objects = objects.concat(routes);
8 years ago
}
if ($scope.targetNamespace !== model.currentNamespace()) {
$scope.$on('WatcherNamespaceChanged', function () {
Kubernetes.log.debug("Namespace changed");
setTimeout(function () {
applyObjects(objects);
Core.$apply($scope);
}, 500);
});
Core.notification('info', "Switching to namespace " + $scope.targetNamespace + " and deploying template");
model.kubernetes.selectedNamespace = $scope.targetNamespace;
}
else {
applyObjects(objects);
}
};
function applyObjects(objects) {
var projectClient = Kubernetes.createKubernetesClient("projects");
_.forEach(objects, function (object) {
Kubernetes.log.debug("Object: ", object);
var kind = Kubernetes.getKind(object);
var name = Kubernetes.getName(object);
var ns = Kubernetes.getNamespace(object);
if (kind && name) {
if (ns && ns !== Kubernetes.currentKubernetesNamespace()) {
var project = {
apiVersion: Kubernetes.defaultApiVersion,
kind: "Project",
metadata: {
name: ns,
labels: {}
}
};
projectClient.put(project, function (data) {
Kubernetes.log.info("Created namespace: " + ns);
}, function (err) {
Kubernetes.log.warn("Failed to create namespace: " + ns + ": " + angular.toJson(err));
});
8 years ago
}
var pluralKind = kind.toLowerCase() + "s";
var kubeClient = Kubernetes.createKubernetesClient(pluralKind, ns);
kubeClient.put(object, function (data) {
Kubernetes.log.info("updated " + kind + " name: " + name + (ns ? " ns: " + ns : ""));
}, function (err) {
Kubernetes.log.warn("Failed to update " + kind + " name: " + name + (ns ? " ns: " + ns : "") + " error: " + angular.toJson(err));
});
}
});
goBack();
}
$scope.deleteTemplate = function (template) {
UI.multiItemConfirmActionDialog({
collection: [template],
8 years ago
index: 'metadata.name',
onClose: function (result) {
if (result) {
KubernetesModel['templatesResource'].delete({
id: template.metadata.name
}, undefined, function () {
KubernetesModel['templatesResource'].query(function (data) {
KubernetesModel.templates = data.items;
});
}, function (error) {
Kubernetes.log.debug("Error deleting template: ", error);
});
8 years ago
}
},
title: 'Delete Template?',
action: 'The following template will be deleted:',
okText: 'Delete',
okClass: 'btn-danger',
custom: "This operation is permanent once completed!",
customClass: "alert alert-warning"
}).open();
8 years ago
};
}]);
})(Kubernetes || (Kubernetes = {}));
/// <reference path="../../includes.ts"/>
var Navigation;
(function (Navigation) {
Navigation.pluginName = 'hawtio-navigation';
Navigation.log = Logger.get(Navigation.pluginName);
Navigation._module = angular.module(Navigation.pluginName, []);
Navigation._module.run(function () {
});
Navigation._module.service('HawtioBreadcrumbs', function () {
var _config = [];
var self = {
apply: function (config) {
_config.length = 0;
_.forEach(config, function (crumb) {
_config.push(crumb);
});
},
get: function () {
return _config;
8 years ago
}
};
return self;
});
Navigation._module.service('HawtioSubTabs', function () {
var _config = [];
var self = {
apply: function (config) {
_config.length = 0;
_.forEach(config, function (crumb) {
_config.push(crumb);
});
},
get: function () {
return _config;
}
8 years ago
};
return self;
});
Navigation._module.directive('hawtioRelativeHref', ['$location', function ($location) {
return {
restrict: 'A',
link: function (scope, element, attr) {
var targetPath = attr['hawtioRelativeHref'];
var targetHref = new URI($location.url());
targetHref.segment(targetPath);
element.attr('href', targetHref.toString());
}
8 years ago
};
}]);
Navigation._module.directive('viewportHeight', ['$window', '$document', function ($window, $document) {
return {
restrict: 'A',
link: function (scope, element, attr) {
// log.debug("Window: ", $window);
// log.debug("element: ", element);
var win = $($window);
var resizeFunc = function () {
var viewportHeight = win.innerHeight();
// log.debug("Viewport height: ", viewportHeight);
var elTop = element.offset().top;
// log.debug("Element top: ", elTop);
var height = viewportHeight - elTop;
element.css('height', height);
};
win.on('resize', resizeFunc);
element.on('$destroy', function () {
win.off('resize', resizeFunc);
});
setTimeout(resizeFunc, 50);
}
8 years ago
};
}]);
Navigation._module.directive('hawtioMainOutlet', ['HawtioSubTabs', function (HawtioSubTabs) {
return {
restrict: 'A',
link: function (scope, element, attrs) {
scope.tabs = HawtioSubTabs;
scope.$watchCollection('tabs.get()', function (tabs) {
// log.debug("subTabConfig: ", subTabConfig);
if (tabs && tabs.length > 0) {
element.removeClass('hidden-nav');
element.css({ 'margin-left': '' });
}
else {
element.addClass('hidden-nav');
element.css({ 'margin-left': 'auto' });
8 years ago
}
});
}
};
}]);
Navigation._module.directive('hawtioTabsOutlet', ['HawtioSubTabs', function (HawtioSubTabs) {
var initialized = false;
return {
restrict: 'AE',
replace: true,
template: "\n <div class=\"nav-pf-vertical nav-pf-vertical-with-secondary-nav\" ng-controller=\"Developer.NavBarController\" ng-class=\"getClass()\">\n <div class=\"list-group\">\n <div ng-repeat=\"subTab in subTabConfig\" ng-show=\"true\"\n class=\"list-group-item {{subTab.active ? 'active' : ''}}\" >\n <a ng-hide=\"subTab.template\" href=\"{{subTab.href}}\">\n <span ng-show=\"subTab.class\" ng-class=\"subTab.class\"></span>\n <img ng-show=\"subTab.icon\" ng-src=\"{{subTab.icon}}\">\n {{subTab.label}}\n </a>\n <div ng-show=\"subTab.template\" compile=\"subTab.template\"></div>\n </div>\n </>\n </div>\n ",
link: function (scope, element, attrs) {
if (!initialized) {
try {
8 years ago
}
catch (err) {
8 years ago
}
initialized = true;
}
scope.HawtioSubTabs = HawtioSubTabs;
var collapsed = false;
scope.getClass = function () {
//log.debug("My class: ", element.attr('class'));
if (!scope.subTabConfig || !scope.subTabConfig.length) {
return 'hidden';
8 years ago
}
if (collapsed) {
return 'collapsed';
}
return '';
};
scope.$on('hawtioCollapseNav', function () {
collapsed = !collapsed;
});
scope.$watch('HawtioSubTabs.get()', function (subTabConfig) {
scope.subTabConfig = subTabConfig;
});
}
};
}]);
Navigation._module.directive('hawtioBreadcrumbsOutlet', ['HawtioBreadcrumbs', 'HawtioSubTabs', function (HawtioBreadcrumbs, HawtioSubTabs) {
return {
restrict: 'E',
scope: {},
template: "\n <div class=\"nav navbar-nav nav-breadcrumb nav-breadcrumbs\" ng-show=\"breadcrumbConfig\" ng-controller=\"Developer.NavBarController\">\n <ol class=\"breadcrumb\">\n <li ng-repeat=\"breadcrumb in breadcrumbConfig\" ng-show=\"isValid(breadcrumb) && label(breadcrumb)\"\n class=\"{{breadcrumb.active ? 'active' : ''}}\"\n ng-class=\"$last ? 'dropdown' : ''\"\n >\n <a ng-show=\"breadcrumb.href\" href=\"{{breadcrumb.href}}\">{{label(breadcrumb)}}</a>\n <span ng-hide=\"breadcrumb.href\">{{label(breadcrumb)}}</span>\n </li>\n <li ng-show=\"pageTitle\">\n <span ng-bind=\"pageTitle\"></span>\n </li>\n </ol>\n </div>\n ",
link: function (scope, element, attrs) {
scope.breadcrumbs = HawtioBreadcrumbs;
scope.tabs = HawtioSubTabs;
scope.$watchCollection('breadcrumbs.get()', function (breadcrumbConfig) {
scope.breadcrumbConfig = breadcrumbConfig;
});
scope.$watchCollection('tabs.get()', function (tabs) {
var active = _.find(tabs, function (tab) { return tab.active; });
if (active) {
scope.pageTitle = active.label;
8 years ago
}
else {
scope.pageTitle = undefined;
8 years ago
}
});
}
};
}]);
Navigation._module.directive('platformSubTabsOutlet', ['HawtioSubTabs', function (HawtioSubTabs) {
var initialized = false;
return {
restrict: 'AE',
replace: true,
template: "\n <div class=\"nav-pf-vertical nav-pf-vertical-with-secondary-nav sj_menu\" ng-controller=\"Developer.NavBarController\" ng-class=\"getClass()\">\n <ul class=\"navbar-lf-menu \" >\n <li ng-repeat=\"subTab in subTabConfig \" >\n <div class=\"expandable closed \" ng-show=\"subTab.items.length\" style=\" padding:0;\">\n <div class=\"title sj_menu_nav\" >\n <i class=\" sj_menu_01\" >{{subTab.label}}</i> \n </div>\n <ul class=\"expandable-body sj_menu_ul\" >\n <li ng-repeat=\"item in subTab.items\" >\n <a href=\"{{item.href}}\" >{{item.label}}</a>\n </li>\n </ul>\n </div>\n <div ng-hide=\"subTab.items.length\" class=\"sj_menu_nav\" >\n <i class=\" sj_menu_02\" ></i><a href=\"{{subTab.href}}\">{{subTab.label}}</a> \n </div>\n </li> \n </ul>\n </div> \n ",
link: function (scope, element, attrs) {
if (!initialized) {
try {
}
catch (err) {
}
initialized = true;
8 years ago
}
scope.HawtioSubTabs = HawtioSubTabs;
var collapsed = false;
scope.getClass = function () {
//log.debug("My class: ", element.attr('class'));
if (!scope.subTabConfig || !scope.subTabConfig.length) {
return 'hidden';
}
if (collapsed) {
return 'collapsed';
}
return '';
};
scope.$on('hawtioCollapseNav', function () {
collapsed = !collapsed;
});
scope.$watch('HawtioSubTabs.get()', function (subTabConfig) {
scope.subTabConfig = subTabConfig;
});
8 years ago
}
};
}]);
//hawtioPluginLoader.addModule('patternfly');
hawtioPluginLoader.addModule(Navigation.pluginName);
})(Navigation || (Navigation = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="../../developer/ts/developerNavigation.ts"/>
var System;
(function (System) {
System.pluginName = "System";
System.context = "/system";
System.pluginPath = "plugins/system/";
System.templatePath = System.pluginPath + 'html/';
function shareInit($scope) {
//创建二级子菜单
$scope.subTabConfig = Developer.activateCurrent([
{
href: UrlHelpers.join(System.context, 'system-list'),
label: '信息系统清单',
title: '查看信息系统清单'
},
{
href: UrlHelpers.join(System.context, 'system-verification'),
label: '信息系统校验',
title: '校验信息系统'
},
{
href: UrlHelpers.join(System.context, 'system-help'),
label: '帮助',
title: '行政区划代码或系统代码检索',
items: [{
href: UrlHelpers.join(System.context, 'system-help', 'regionalism-search'),
title: '行政区划代码检索',
label: '行政区划检索'
},
{
href: UrlHelpers.join(System.context, 'system-help', 'system-search'),
title: '系统代码检索',
label: '系统代码检索'
}]
}]);
}
System.shareInit = shareInit;
})(System || (System = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="systemHelpers.ts"/>
/// <reference path="../../configs/ts/configPlugin.ts"/>
var System;
(function (System) {
System._module = angular.module(System.pluginName, ['hawtio-core', 'hawtio-ui', 'ui.codemirror', 'ui.validate', 'kubernetesUI', 'ngFileUpload', 'ngDialog']);
System.controller = PluginHelpers.createControllerFunction(System._module, System.pluginName);
System.route = PluginHelpers.createRoutingFunction(System.templatePath);
/*
页面路由配置
*/
System._module.config(['$provide', '$routeProvider', function ($provide, $routeProvider) {
$routeProvider.when(UrlHelpers.join(System.context, '/'), System.route('systemList.html', false))
.when(UrlHelpers.join(System.context, 'system-list'), System.route('systemList.html', false))
.when(UrlHelpers.join(System.context, 'system-help'), System.route('regionalismCodeSearch.html', false))
.when(UrlHelpers.join(System.context, 'system-help', 'regionalism-search'), System.route('regionalismCodeSearch.html', false))
.when(UrlHelpers.join(System.context, 'system-help', 'system-search'), System.route('systemCodeSearch.html', false))
.when(UrlHelpers.join(System.context, 'system-verification'), System.route('systemVerification.html', false))
.when(System.context, { redirectTo: UrlHelpers.join(System.context, 'system-list') });
}]);
/*
模块加载后初始化配置
*/
System._module.run(['viewRegistry', '$templateCache', 'HawtioNav', '$compile', function (viewRegistry, $templateCache, HawtioNav, $compile) {
viewRegistry['system'] = Configs.templatePath + "shareLayout.html";
/*
信息系统一级菜单导航
*/
var builder = HawtioNav.builder();
var systemTab = builder.id('systemTab')
.rank(10)
.href(function () { return System.context; })
.title(function () { return '信息系统'; })
.build();
HawtioNav.add(systemTab);
}]);
// 加载模块
hawtioPluginLoader.addModule(System.pluginName);
})(System || (System = {}));
8 years ago
/// <reference path="../../includes.ts"/>
/// <reference path="systemPlugin.ts"/>
/// <reference path="systemHelpers.ts"/>\
/// <reference path="../../configs/ts/configsDataService.ts"/>
var System;
(function (System) {
System.RegionalismCodeController = System.controller('RegionalismCodeController', ["$scope", "$templateCache", "$location", "$routeParams", "$http", "$timeout", 'SystemModel', 'NgTableParams',
function ($scope, $templateCache, $location, $routeParams, $http, $timeout, SystemModel, NgTableParams) {
System.shareInit($scope);
$scope.model = SystemModel;
//console.log($scope.model.regionalismInfo);
$scope.tableParams = new NgTableParams({ count: 25 }, {
counts: [25, 50, 100],
dataset: $scope.model.regionalismInfo
});
8 years ago
}]);
})(System || (System = {}));
8 years ago
/// <reference path="../../includes.ts"/>
/// <reference path="systemPlugin.ts"/>
/// <reference path="systemHelpers.ts"/>
var System;
(function (System) {
System.SystemCodeController = System.controller('SystemCodeController', ["$scope", "$templateCache", "$location", "$routeParams", "$http", "$timeout", 'SystemModel', 'NgTableParams',
function ($scope, $templateCache, $location, $routeParams, $http, $timeout, SystemModel, NgTableParams) {
System.shareInit($scope);
$scope.model = SystemModel;
$scope.tableParams = new NgTableParams({ count: 25 }, {
counts: [25, 50, 100],
dataset: $scope.model.systemInfo
8 years ago
});
}]);
})(System || (System = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="systemPlugin.ts"/>
/// <reference path="systemHelpers.ts"/>
var System;
(function (System) {
System.SystemListController = System.controller('SystemListController', ['$scope', '$location', '$http', '$templateCache', 'Upload', 'NgTableParams', 'ngDialog', function ($scope, $location, $http, $templateCache, Upload, NgTableParams, ngDialog) {
System.shareInit($scope);
// 表头显示的信息
$scope.columns = [
{ field: 'id', title: '操作', show: true },
{ field: "object", title: "采集对象", filter: { object: "select" }, filterData: booleanChoose(), show: true },
{ field: "city", title: "市", filter: { city: 'text' }, show: true },
{ field: "county", title: "区/县", filter: { county: 'text' }, show: true },
{ field: "regionalismCode", title: "行政区划代码", filter: { regionalismCode: 'text' }, show: true },
{ field: "level", title: "级次", filter: { level: "select" }, filterData: levelType(), show: true },
{ field: "systemCode", title: "系统编码", filter: { systemCode: "text" }, show: true },
{ field: "systemName", title: "信息系统名称", filter: { systemName: "text" }, show: true },
{ field: "contactsPerson", title: "联系人", filter: { contactsPerson: "text" }, show: true },
{ field: "contactsMethod", title: "联系方式", filter: { contactsMethod: "text" }, show: true },
{ field: "databaseType", title: "数据库类型", filter: { databaseType: "select" }, filterData: databaseType(), show: true },
{ field: "userSql", title: "oracle用户名表空间", filter: { userSql: "select" }, filterData: booleanChoose(), show: true },
{ field: "checkSql", title: "支付信息标准表脚本", filter: { checkSql: "select" }, filterData: booleanChoose(), show: true },
{ field: "execSql", title: "可执行标准表脚本", filter: { execSql: "select" }, filterData: booleanChoose(), show: true },
];
$scope.model = [{
id: 1,
object: '是',
city: '南京市',
county: '玄武区',
regionalismCode: '321001',
level: '市级',
systemCode: '5',
systemName: '非税系统',
contactsPerson: '唐僧',
contactsMethod: '15575170786',
databaseType: 'oracle',
userSql: '是',
checkSql: '是',
execSql: '是'
},
{
id: 2,
object: '是',
city: '南京市',
county: '浦口区',
regionalismCode: '321011',
level: '市级',
systemCode: '5',
systemName: '预算执行',
contactsPerson: '唐僧',
contactsMethod: '15675170786',
databaseType: 'oracle',
userSql: '是',
checkSql: '是',
execSql: '是'
}];
// 点击查看按钮事件处理函数
$scope.viewClick = function (selected) {
ngDialog.open({
template: 'systemInfo.html',
controller: 'Configs.SystemInfoController',
width: 790,
closeByDocument: false,
data: selected,
className: 'ngdialog-theme-default'
});
8 years ago
};
// 表数据
$scope.tableParams = new NgTableParams({ count: 25 }, {
counts: [25, 50, 100],
dataset: $scope.model
8 years ago
});
// 文件上传
$scope.upLoadExcelFile = function (files) {
var r = new Resumable({
target: '/java/console/api/fileOperation/file/upload',
chunkSize: 1 * 1024 * 1024,
simultaneousUploads: 4,
testChunks: true,
throttleProgressCallbacks: 1,
method: "octet"
8 years ago
});
if (!r.support) {
throw "当前浏览器不支持Resumable.js文件上传";
}
else {
console.log(files);
angular.forEach(files, function (file) {
r.addFile(file);
});
r.on('fileAdded', function (file) {
console.log(file);
r.upload();
});
r.on('complete', function () {
// Hide pause/resume when the upload has completed
console.log("文件上传完毕");
});
r.on('fileProgress', function (file) {
// Handle progress for both the file and the overall upload
//$('.resumable-file-'+file.uniqueIdentifier+' .resumable-file-progress').html(Math.floor(file.progress()*100) + '%');
//$('.progress-bar').css({width:Math.floor(r.progress()*100) + '%'});
console.log(Math.floor(r.progress() * 100) + '%');
});
8 years ago
}
};
//excel下载
$scope.downLoadExcelFile = function () {
$http.get('/java/console/api/fileOperation/file/download', { responseType: 'arraybuffer' })
.success(function (data, status, headers) {
var octetStreamMime = 'application/octet-stream';
var success = false;
// Get the headers
headers = headers();
// Get the filename from the x-filename header or default to "服务列表"
var filename = headers['x-filename'] || '服务列表.xls';
// Determine the content type from the header or default to "application/octet-stream"
var contentType = headers['content-type'] || octetStreamMime;
try {
// Try using msSaveBlob if supported
console.log("Trying saveBlob method ...");
var blob = new Blob([data], { type: contentType });
if (navigator.msSaveBlob)
navigator.msSaveBlob(blob, filename);
else {
// Try using other saveBlob implementations, if available
var saveBlob = navigator["webkitSaveBlob"] || navigator["mozSaveBlob"] || navigator["saveBlob"];
if (saveBlob === undefined)
throw "Not supported";
saveBlob(blob, filename);
}
console.log("saveBlob succeeded");
success = true;
}
catch (ex) {
console.log("saveBlob method failed with the following exception:");
console.log(ex);
}
if (!success) {
// Get the blob url creator
var urlCreator = window.URL || window["webkitURL"] || window["mozURL"] || window["msURL"];
if (urlCreator) {
// Try to use a download link
var link = document.createElement('a');
if ('download' in link) {
// Try to simulate a click
try {
// Prepare a blob URL
console.log("Trying download link method with simulated click ...");
var blob = new Blob([data], { type: contentType });
var url = urlCreator.createObjectURL(blob);
link.setAttribute('href', url);
// Set the download attribute (Supported in Chrome 14+ / Firefox 20+)
link.setAttribute("download", filename);
// Simulate clicking the download link
var event = document.createEvent('MouseEvents');
event.initMouseEvent('click', true, true, window, 1, 0, 0, 0, 0, false, false, false, false, 0, null);
link.dispatchEvent(event);
console.log("Download link method with simulated click succeeded");
success = true;
}
catch (ex) {
console.log("Download link method with simulated click failed with the following exception:");
console.log(ex);
}
}
if (!success) {
// Fallback to window.location method
try {
// Prepare a blob URL
// Use application/octet-stream when using window.location to force download
console.log("Trying download link method with window.location ...");
var blob = new Blob([data], { type: octetStreamMime });
var url = urlCreator.createObjectURL(blob);
window.location = url;
console.log("Download link method with window.location succeeded");
success = true;
}
catch (ex) {
console.log("Download link method with window.location failed with the following exception:");
console.log(ex);
}
8 years ago
}
}
}
if (!success) {
// Fallback to window.open method
console.log("No methods worked for saving the arraybuffer, using last resort window.open");
window.open('_blank', '');
8 years ago
}
}).error(function (data, status) {
console.log("Request failed with status: " + status);
// Optionally write the error out to scope
$scope.errorDetails = "Request failed with status: " + status;
8 years ago
});
};
//boolean选择条件是/否
function booleanChoose() {
return [{ id: '是', title: '是' }, { id: '否', title: '否' }];
}
// 数据库类型选择条件oracle/sqlServer
function databaseType() {
return [{ id: 'oracle', title: 'Oracle' }, { id: 'sqlServer', title: 'sqlServer' }];
}
//level选择条件
function levelType() {
return [{ id: '省', title: '省' }, { id: '市', title: '市' }, { id: '县', title: '县' }];
}
}]);
})(System || (System = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="systemPlugin.ts"/>
var System;
(function (System) {
function classifyCity(regionalismInfo) {
var result = [];
angular.forEach(regionalismInfo, function (item) {
if (result.indexOf(item.cityName) == -1)
result.push(item.cityName);
});
return result;
}
System.classifyCity = classifyCity;
function classifyCountry(regionalismInfo, cityName) {
var result = [];
angular.forEach(regionalismInfo, function (item) {
if (item.cityName == cityName)
result.push({
name: item.districtName,
code: item.code
});
});
return result;
}
System.classifyCountry = classifyCountry;
var systemModelServices = (function () {
function systemModelServices() {
this.systemInfoList = [];
this.systemInfo = [];
this.regionalismInfo = [];
//this.updateSystemInfoList();
this.updateCodeInfo();
//console.log(classifyCountry(this.regionalismInfo, '南京市'));
}
//执行数据更新操作
systemModelServices.prototype.updateSystemInfoList = function () {
var result = [];
$.ajax({
type: 'POST',
url: '/java/console/api/system/infoList',
success: function (data) {
if (data)
result = data;
8 years ago
}
});
};
systemModelServices.prototype.updateCodeInfo = function () {
var result = null;
$.ajax({
async: false,
type: "POST",
url: "/java/console/api/code/list",
success: function (data) {
if (data) {
result = data;
}
8 years ago
}
});
this.regionalismInfo = result.regionalism;
this.systemInfo = result.system;
};
return systemModelServices;
}());
System._module.factory('SystemModel', ['$rootScope', '$http', function ($rootScope, $http) {
return new systemModelServices();
}]);
})(System || (System = {}));
/// <reference path="../../includes.ts"/>
/// <reference path="systemPlugin.ts"/>
/// <reference path="systemHelpers.ts"/>
/// <reference path="systemServices.ts"/>
var System;
(function (System) {
System.SystemVerificationController = System.controller('SystemVerificationController', ['$scope', '$location', '$templateCache', 'Upload', 'NgTableParams', 'ngDialog', 'SystemModel', function ($scope, $location, $templateCache, Upload, NgTableParams, ngDialog, SystemModel) {
System.shareInit($scope);
$scope.cities = System.classifyCity(SystemModel.regionalismInfo);
$scope.columns = [
{ field: "id", title: '序号', show: false },
{ field: "checkResult", title: "验证结果", show: true },
{ field: "hasCollect", title: "采集", show: true },
{ field: "hasCheckSql", title: "支付信息标准表", show: true },
{ field: "hasExecSql", title: "可执行标准表", show: true },
{ field: "city", title: "市", show: true },
{ field: "county", title: "区/县", show: true },
{ field: "regionalismCode", title: "行政区划代码", show: true },
{ field: "systemCode", title: "信息系统代码", show: true },
{ field: "contactsPerson", title: "联系人", show: true },
{ field: "contactsMethod", title: "联系方式", show: true },
{ field: "databaseType", title: "数据库类型", show: true }
];
$scope.model = [{
id: 1,
checkResult: '是',
hasCollect: '是',
hasCheckSql: '是',
hasExecSql: '是',
city: '南京市',
county: '玄武区',
regionalismCode: '320105',
systemCode: '2',
contactsPerson: '文豆豆',
contactsMethod: '15578203146',
databaseType: 'oracle'
},
{
id: 2,
checkResult: '否',
hasCollect: '是',
hasCheckSql: '否',
hasExecSql: '是',
city: '连云港市',
county: '浦口区',
regionalismCode: '320105',
systemCode: '6',
contactsPerson: '文豆豆',
contactsMethod: '15578203147',
databaseType: 'sqlServer'
}];
console.log($scope.model);
$scope.filterResult = $scope.model;
// 表数据
$scope.tableParams = new NgTableParams({ count: 25 }, {
counts: [25, 50, 100],
dataset: $scope.filterResult
});
$scope.citySelect = function (x) {
if (x != 'all') {
$scope.countries = System.classifyCountry(SystemModel.regionalismInfo, x);
$scope.filterResult = [];
angular.forEach($scope.model, function (item) {
if (item.city == x)
$scope.filterResult.push(item);
});
$scope.tableParams.settings({
dataset: $scope.filterResult
});
8 years ago
}
else {
$scope.filterResult = $scope.model;
$scope.tableParams.settings({
dataset: $scope.filterResult
8 years ago
});
}
};
$scope.countrySelect = function (y) {
if (y != 'all') {
var result = [];
angular.forEach($scope.filterResult, function (item) {
if (item.county == y)
result.push(item);
});
$scope.tableParams.settings({
dataset: result
8 years ago
});
}
else {
$scope.tableParams.settings({
dataset: $scope.filterResult
});
}
8 years ago
};
$scope.check = function () {
console.log($scope.tableParams.data[0]);
8 years ago
};
}]);
})(System || (System = {}));
8 years ago
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluY2x1ZGVzLnRzIiwiY29uZmlncy90cy9jb25maWdQbHVnaW4udHMiLCJjb25maWdzL3RzL2NvbmZpZ3NEYXRhU2VydmljZS50cyIsImRldmVsb3Blci90cy9kZXZlbG9wZXJOYXZpZ2F0aW9uLnRzIiwia3ViZXJuZXRlcy90cy9rdWJlcm5ldGVzSW50ZXJmYWNlcy50cyIsImt1YmVybmV0ZXMvdHMvdXRpbEhlbHBlcnMudHMiLCJjb25maWdzL3RzL2N1c3RvbUFsZXJ0LnRzIiwia3ViZXJuZXRlcy90cy9yZWFkUGxhY2VkaXZpc2lvbi50cyIsImt1YmVybmV0ZXMvdHMva3ViZXJuZXRlc0hlbHBlcnMudHMiLCJkZXZlbG9wZXIvdHMvZGV2ZWxvcGVySGVscGVycy50cyIsImRldmVsb3Blci90cy9kYXRhTWFuYWdlckhlbHBlci50cyIsImNvbmZpZ3MvdHMvQ29uZmlnc0hlbHBlci50cyIsImNvbmZpZ3MvdHMvY29uZmlnc1V0aWxzLnRzIiwia3ViZXJuZXRlcy90cy9rdWJlcm5ldGVzUGx1Z2luLnRzIiwia3ViZXJuZXRlcy90cy93YXRjaGVyLnRzIiwia3ViZXJuZXRlcy90cy90ZXJtLnRzIiwiY29uZmlncy90cy9zaGFyZUNvbnRyb2xsZXIudHMiLCJjb25maWdzL3RzL2dsdXN0ZXJmc1NldHRpbmcudHMiLCJjb25maWdzL3RzL2t1YmVDbHVzdGVyU2V0dGluZy50cyIsImRldmVsb3Blci90cy9kZXZlbG9wZXJQbHVnaW4udHMiLCJkZXZlbG9wZXIvdHMvZGF0YU1hbmFnZXJNb2RlbC50cyIsImRldmVsb3Blci90cy9kZXZlbG9wZXJFbnJpY2hlcnMudHMiLCJkZXZlbG9wZXIvdHMvZW52aXJvbm1lbnRQYW5lbC50cyIsImRldmVsb3Blci90cy9maWxlTWlncmF0aW9uVGFzay50cyIsImRldmVsb3Blci90cy9ob21lLnRzIiwiZGV2ZWxvcGVyL3RzL2plbmtpbnNKb2IudHMiLCJkZXZlbG9wZXIvdHMvamVua2luc0pvYnMudHMiLCJrdWJlcm5ldGVzL3RzL2t1YmVybmV0ZXNNb2RlbC50cyIsImRldmVsb3Blci90cy9qZW5raW5zTG9nLnRzIiwiZGV2ZWxvcGVyL3RzL2plbmtpbnNNZXRyaWNzLnRzIiwiZGV2ZWxvcGVyL3RzL25hdmJhci50cyIsImRldmVsb3Blci90cy9waXBlbGluZS50cyIsImRldmVsb3Blci90cy9waXBlbGluZURpcmVjdGl2ZS50cyIsImRldmVsb3Blci90cy9waXBlbGluZXMudHMiLCJkZXZlbG9wZXIvdHMvcHJvamVjdC50cyIsImRldmVsb3Blci90cy9wcm9qZWN0U2VsZWN0b3IudHMiLCJkZXZlbG9wZXIvdHMvcHJvamVjdHMudHMiLCJkZXZlbG9wZXIvdHMvd29ya3NwYWNlLnRzIiwiZGV2ZWxvcGVyL3RzL3dvcmtzcGFjZXMudHMiLCJrdWJlcm5ldGVzL3RzL2FwcHMudHMiLCJrdWJlcm5ldGVzL3RzL2JyZWFkY3J1bWJzLnRzIiwia3ViZXJuZXRlcy90cy9idWlsZC50cyIsImt1YmVybmV0ZXMvdHMvYnVpbGRDb25maWcudHMiLCJrdWJlcm5ldGVzL3RzL2J1aWxkQ29uZmlnRWRpdC50cyIsImt1YmVybmV0ZXMvdHMvYnVpbGRDb25maWdzLnRzIiwia3ViZXJuZXRlcy90cy9idWlsZExvZ3MudHMiLCJrdWJlcm5ldGVzL3RzL2J1aWxkcy50cyIsImt1YmVybmV0ZXMvdHMvY29ubmVjdC50cyIsImt1YmVybmV0ZXMvdHMvZGVwbG95bWVudENvbmZpZy50cyIsImt1YmVybmV0ZXMvdHMvZGVwbG95bWVudENvbmZpZ3MudHMiLCJrdWJlcm5ldGVzL3RzL2V2ZW50cy50cyIsImt1YmVybmV0ZXMvdHMvaG9zdC50cyIsImt1YmVybmV0ZXMvdHMvaG9zdHMudHMiLCJrdWJlcm5ldGVzL3RzL2ltYWdlUmVwb3NpdG9yaWVzLnRzIiwia3ViZXJuZXRlcy90cy9rdWJlcm5ldGVzTmF2aWdhdGlvbi50cyIsImt1YmVybmV0ZXMvdHMvc2NoZW1hLnRzIiwia3ViZXJuZXRlcy90cy9rdWJlcm5ldGVzU2NoZW1hLnRzIiwia3ViZXJuZXRlcy90cy9rdWJlcm5ldGVzU2VydmljZXMudHMiLCJrdWJlcm5ldGVzL3RzL2t1YmVybmV0ZXNUb3BMZXZlbC50cyIsImt1YmVybmV0ZXMvdHMvbmFtZXNwYWNlLnRzIiwia3ViZXJuZXRlcy90cy9vdmVydmlldy50cyIsImt1YmVybmV0ZXMvdHMvcGlwZWxpbmVzLnRzIiwia3ViZXJuZXRlcy90cy9wb2QudHMiLCJrdWJlcm5ldGVzL3RzL3BvZEVkaXQudHMiLCJrdWJlcm5ldGVzL3RzL3BvZExvZ3MudHMiLCJrdWJlcm5ldGVzL3RzL3BvZHMudHMiLCJrdWJlcm5ldGVzL3RzL3JlcGxpY2F0aW9uQ29udHJvbGxlci50cyIsImt1YmVybmV0ZXMvdHMvcmVwbGljYXRpb25Db250cm9sbGVyRWRpdC50cyIsImt1YmVybmV0ZXMvdHMvcmVwbGljYXRpb25Db250cm9sbGVycy50cyIsImt1YmVybmV0ZXMvdHMvc2NoZW1hSGVscGVycy50cyIsImt1YmVybmV0ZXMvdHMvc2VjcmV0LnRzIiwia3ViZXJuZXRlcy90cy9zZWNyZXRzLnRzIiwia3ViZXJuZXRlcy90cy9zZXJ2aWNlLnRzIiwia3ViZXJuZXRlcy90cy9zZXJ2aWNlRWRpdC50cyIsImt1YmVybmV0ZXMvdHMvc2VydmljZVJlZ2lzdHJ5LnRzIiwia3ViZXJuZXRlcy90cy9zZXJ2aWNlcy50cyIsImt1YmVybmV0ZXMvdHMvc2hhcmVkQ29udHJvbGxlcnMudHMiLCJrdWJlcm5ldGVzL3RzL3RhYnMudHMiLCJrdWJlcm5ldGVzL3RzL3RlbXBsYXRlcy50cyIsIm5hdmlnYXRpb24vdHMvbmF2aWdhdGlvblBsdWdpbi50cyIsInN5c3RlbS90cy9zeXN0ZW1IZWxwZXJzLnRzIiwic3lzdGVtL3RzL3N5c3RlbVBsdWdpbi50cyIsInN5c3RlbS90cy9yZWdpb25hbGlzbUNvZGVTZWFyY2gudHMiLCJzeXN0ZW0vdHMvc3lzdGVtQ29kZVNlYXJjaC50cyIsInN5c3RlbS90cy9zeXN0ZW1MaXN0LnRzIiwic3lzdGVtL3RzL3N5c3RlbVNlcnZpY2VzLnRzIiwic3lzdGVtL3RzL3N5c3RlbVZlcmlmaWNhdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxzREFBc0Q7QUFDdEQsK0RBQStEO0FBQy9ELHNEQUFzRDtBQUN0RCxtREFBbUQ7QUFDbkQsMERBQTBEOztBQ0oxRCx5Q0FBeUM7QUFFekMsSUFBTyxPQUFPLENBb0RiO0FBcERELFdBQU8sT0FBTyxFQUFDLENBQUM7SUFFSixrQkFBVSxHQUFHLFNBQVMsQ0FBQztJQUN2QixlQUFPLEdBQUcsU0FBUyxDQUFDO0lBQ3BCLGtCQUFVLEdBQUcsa0JBQWtCLENBQUM7SUFDN0Isb0JBQVksR0FBRyxrQkFBVSxHQUFHLE9BQU8sQ0FBQztJQUN2QyxlQUFPLEdBQUcsT0FBTyxDQUFDLE1BQU0sQ
9 years ago
angular.module("hawtio-kubernetes-templates", []).run(["$templateCache", function($templateCache) {$templateCache.put("plugins/developer/html/addDataFile.html","<div class=\"data_container\" ng-controller=\"Developer.DataOverView\">\r\n <header class=\"data_heaer\">\r\n <h2 >江苏省审计厅数据汇总平台</h2>\r\n </header>\r\n <div class=\"data_content\">\r\n <div class=\"data_leftside fl\">\r\n <h3 class=\"data_h3\">本地文件列表</h3>\r\n <ul class=\"fl data_leftside_files\">\r\n <li class=\" data_title\">文件名</li>\r\n <li><label class=\"fl date_label\">列表项1列表项1</label><input type=\"checkbox\" class=\"fr\"/></li>\r\n <li><label class=\"fl date_label\">列表项1列表项1列表项1列表项11列表项11列表项1</label><input type=\"checkbox\" class=\"fr\"/></li>\r\n <li><label class=\"fl date_label\">列表项1列表项1</label><input type=\"checkbox\" class=\"fr\"/></li>\r\n <li><label class=\"fl date_label\">列表项1列表项1列表项1列表项11列表项11列表项1</label><input type=\"checkbox\" class=\"fr\"/></li>\r\n <li><label class=\"fl date_label\">列表项1列表项1</label><input type=\"checkbox\" class=\"fr\"/></li>\r\n <li><label class=\"fl date_label\">列表项1列表项1列表项1列表项11列表项11列表项1</label><input type=\"checkbox\" class=\"fr\"/></li>\r\n </ul>\r\n <ul class=\"fl data_leftside_files data_leftside_shu\">\r\n <li class=\" data_title\">文件属性</li>\r\n <li><label class=\"fl date_label\">列表项1列表项1</label><input type=\"checkbox\" class=\"fr\"/></li>\r\n <li><label class=\"fl date_label\">列表项1列表项1列表项1列表项11列表项11列表项1</label><input type=\"checkbox\" class=\"fr\"/></li>\r\n </ul>\r\n <div class=\"cl\"></div>\r\n </div><!--data_leftside end-->\r\n <div class=\"data_conbar fl\">\r\n <div class=\"date_btns\">\r\n <a href=\"#\" class=\"data_file_btn\" >选择本地xml<input type=\"file\" /></a>\r\n <a href=\"#\" class=\"data_file_btn\" style=\"font-size:12px;\" >选择服务器端xml<input type=\"file\" /></a>\r\n </div>\r\n <div class=\"date_btns\">\r\n <a href=\"#\" class=\"data_file_btn\" >导入到服务器<input type=\"file\" /></a>\r\n <a href=\"#\" class=\"data_file_btn\" >导出到硬盘<input type=\"file\" /></a>\r\n </div>\r\n </div><!--data_conbar end-->\r\n <div class=\"data_rightside fr\">\r\n <h3 class=\"data_h3\">服务器文件列表</h3>\r\n <div class=\"data_rightside_tree fl\">\r\n <div treecontrol class=\"tree-classic\"\r\n tree-model=\"dataForTheTree\"\r\n options=\"treeOptions\"\r\n on-selection=\"showSelected(node)\"\r\n selected-node=\"node1\">\r\n employee: {{node.name}} age {{node.age}}\r\n </div>\r\n <!-- <div class=\"tree well\">\r\n <ul>\r\n <li >\r\n <p class=\"icon-plus-sign\" style=\"padding-left:20px;\"> 数据类型1</p>\r\n <ul>\r\n <li>\r\n <p> 1</p>\r\n <ul>\r\n <li>\r\n <p> 1</p>\r\n <ul>\r\n <li>\r\n <p>1</p>\r\n </li>\r\n <li>\r\n <p>
8 years ago
$templateCache.put("plugins/developer/html/code.html","<div ng-controller=\"Kubernetes.BuildConfigController\">\r\n <div class=\"row\">\r\n <div hawtio-breadcrumbs></div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div hawtio-tabs></div>\r\n </div>\r\n\r\n <div class=\"row filter-header\">\r\n <div class=\"col-md-12\" ng-show=\"model.tools.length\">\r\n <span ng-show=\"!id\">\r\n <hawtio-filter ng-model=\"tableConfig.filterOptions.filterText\"\r\n css-class=\"input-xxlarge\"\r\n placeholder=\"Filter tools...\"></hawtio-filter>\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div ng-hide=\"model.fetched\">\r\n <div class=\"align-center\">\r\n <i class=\"fa fa-spinner fa-spin\"></i>\r\n </div>\r\n </div>\r\n <div ng-show=\"model.fetched\">\r\n <div ng-hide=\"entity.tools.length\" class=\"align-center\">\r\n <p class=\"alert alert-info\">There are no tools currently available.</p>\r\n </div>\r\n <div ng-show=\"entity.tools.length\">\r\n <div ng-hide=\"entity.tools.length\" class=\"align-center\">\r\n <p class=\"alert alert-info\">There are no tools currently available.</p>\r\n </div>\r\n <div ng-repeat=\"env in entity.tools | filter:filterTemplates | orderBy:\'label\' track by $index\">\r\n <div class=\"row\"\r\n title=\"{{env.description}}\">\r\n <div class=\"col-md-9\">\r\n <a href=\"{{env.url}}\">\r\n <h3>\r\n <i class=\"{{env.iconClass}}\"></i>\r\n {{env.label}}\r\n </h3>\r\n </a>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n");
$templateCache.put("plugins/developer/html/environment.html","environment!!!!");
$templateCache.put("plugins/developer/html/environmentPanel.html","<div class=\"inline-block environment-row\" ng-controller=\"Developer.EnvironmentPanelController\">\r\n <div class=\"panel-group\">\r\n <div class=\"panel panel-default\">\r\n <div class=\"panel-heading\">\r\n <h2 class=\"panel-title inline-block\">\r\n <a href=\"{{env.url}}\" title=\"namespace: {{env.namespace}}\">\r\n <!-- <i class=\"{{env.iconClass}}\"></i>&nbsp; -->\r\n {{env.label}}\r\n </a>\r\n </h2>\r\n </div>\r\n\r\n <div class=\"panel-body\">\r\n <div class=\"environment-deploy-block\"\r\n ng-repeat=\"(project, versions) in envVersions[env.namespace] | orderBy:\'project\' track by $index\">\r\n <div ng-repeat=\"(version, versionInfo) in versions.versions | orderBy:\'version\' track by $index\">\r\n <div ng-repeat=\"(rcname, rc) in versionInfo.replicationControllers\">\r\n <div class=\"environment-deploy-version-and-pods\">\r\n <a href=\"{{rc.$viewLink}}\" ng-show=\"rc.$viewLink\"\r\n title=\"View the Replication Controller from project {{project}} of version {{version}}\">\r\n <i class=\"fa fa-cubes\"></i>\r\n {{rc.$name}}\r\n : {{version}}\r\n </a>\r\n <span ng-hide=\"rc.$viewLink\"\r\n title=\"View the Replication Controller from project {{project}} of version {{version}}\">\r\n <i class=\"fa fa-cubes\"></i>\r\n {{rc.$name}}\r\n : {{version}}\r\n </span>\r\n <span class=\"pull-right\" ng-show=\"rc.$serviceLink.href\">\r\n &nbsp;\r\n &nbsp;\r\n &nbsp;\r\n <a target=\"test-service\" href=\"{{rc.$serviceLink.href}}\" title=\"Open this service in a new tab\">\r\n <i class=\"fa fa-external-link\"></i>\r\n </a>\r\n </span>\r\n &nbsp;\r\n &nbsp;\r\n &nbsp;\r\n <span class=\"pull-right\">\r\n <a ng-show=\"rc.$podCounters.podsLink\" href=\"{{rc.$podCounters.podsLink}}\" title=\"View pods\">\r\n <span ng-show=\"rc.$podCounters.ready\"\r\n class=\"badge badge-success\">{{rc.$podCounters.ready}}</span>\r\n <span ng-show=\"rc.$podCounters.valid\"\r\n class=\"badge badge-info\">{{rc.$podCounters.valid}}</span>\r\n <span ng-show=\"rc.$podCounters.waiting\" class=\"badge\">{{rc.$podCounters.waiting}}</span>\r\n <span ng-show=\"rc.$podCounters.error\"\r\n class=\"badge badge-warning\">{{rc.$podCounters.error}}</span>\r\n </a>\r\n </span>\r\n </div>\r\n <div class=\"environment-deploy-build-info\">\r\n <a href=\"{{rc.$buildUrl}}\" target=\"builds\" ng-show=\"rc.$buildUrl && rc.$buildId\" class=\"=\"\r\n title=\"View the build which created this Replication Controller\">\r\n <i class=\"fa fa-tasks\"></i>\r\n Build #{{rc.$buildId}}\r\n </a>\r\n &nbsp;\r\n &nbsp;\r\n &nbsp;\r\n <a href=\"{{rc.$gitUrl}}\" target=\"git\" ng-show=\"rc.$gitUrl\" class=\"pull-right\"\r\n title=\"{{rc.$gitCommit}}\r\n {{rc.$gitCommitAuthor}}\r\n {{rc.$gitCommitDate}}\r\n {{rc.$gitCommitMessage}}\">\r\n <i class=\"fa fa-code-fork\"></i>\r\n Commit {{rc.$gitCommit | limitTo:7}}\r\n </a>\r\n <span ng-hide=\"rc.$gitUrl || !rc.$gitCommit\" class=\"pull-right\"\r\n title=\"{{rc.$gitCommit}}\r\n {{rc.$gitCommitAuthor}}\r\n {{rc.$gitCommitDate}}\r\n
$templateCache.put("plugins/developer/html/environments.html","<div class=\"project-dashboard\" ng-controller=\"Developer.ProjectController\" hawtio-card-bg>\r\n\r\n <div hawtio-breadcrumbs></div>\r\n <div hawtio-tabs></div>\r\n\r\n <!--\r\n <div class=\"row filter-header\">\r\n <div class=\"col-md-12\" ng-show=\"model.environments.length\">\r\n <span ng-show=\"!id\">\r\n <hawtio-filter ng-model=\"tableConfig.filterOptions.filterText\"\r\n css-class=\"input-xxlarge\"\r\n placeholder=\"Filter environments...\"></hawtio-filter>\r\n </span>\r\n </div>\r\n </div>\r\n -->\r\n\r\n <div ng-hide=\"model.fetched\">\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div class=\"align-center\">\r\n <div class=\"spinner spinner-lg\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div ng-show=\"model.fetched\" style=\"float: none; position: static;\">\r\n<!--\r\n <div class=\"row page-header-row\">\r\n <div class=\"col-md-12\">\r\n <h1 class=\"inline-block\">{{id}}</h1>\r\n </div>\r\n </div>\r\n-->\r\n\r\n <!--\r\n <div class=\"pull-right\">\r\n <a href=\"{{entity.$build.url}}\" class=\"btn btn-default\" target=\"browse\">\r\n <i class=\"{{entity.$build.iconClass}}\"></i>\r\n {{entity.$build.label}}\r\n </a>\r\n </div>\r\n -->\r\n\r\n <div class=\"row row-cards-pf\" title=\"{{env.description}}\">\r\n <div class=\"col-md-12 environment-rows\">\r\n <div class=\"card-pf\">\r\n <div class=\"card-pf-heading\">\r\n <h2 class=\"card-pf-title inline-block\">Environments Overview</h2>\r\n </div>\r\n <div class=\"card-pf-body\">\r\n <div ng-hide=\"entity.environments.length\">\r\n <div class=\"row\">\r\n <div class=\"col-md-12 align-center\">\r\n <h2>No Environment Available</h2>\r\n <p>Environment is a logical place where deployments happen which maps to a kubernetes / openshift namespace. You will see environments here after you add a build.</p>\r\n <a class=\"btn btn-primary\" ng-href=\"{{settingsLink}}\"><i class=\"fa fa-plus\"></i> New Build</a>\r\n </div>\r\n </div>\r\n </div>\r\n <div ng-show=\"entity.environments.length\">\r\n <div ng-repeat=\"env in entity.environments | filter:filterTemplates track by $index\"\r\n class=\"inline-block environment-block\" ng-include=\"\'plugins/developer/html/environmentPanel.html\'\">\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row row-cards-pf\">\r\n <div class=\"col-md-12\">\r\n <div class=\"card-pf pipeline\">\r\n <div class=\"card-pf-heading no-border\">\r\n <h2 class=\"card-pf-title inline-block\">Active Pipelines</h4>\r\n <a ng-href=\"{{$projectLink}}/jenkinsJob/{{jobId}}/pipelines\">View All Pipelines >></a>\r\n </div>\r\n <div class=\"card-pf-body no-top-margin\">\r\n <div class=\"full-card-width\" ng-controller=\"Developer.PipelinesController\" ng-include=\"\'plugins/kubernetes/html/pendingPipelines.html\'\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row row-cards-pf\">\r\n <div class=\"col-md-12\">\r\n <div class=\"card-pf\">\r\n <div class=\"card-pf-heading\">\r\n <h2 class=\"card-pf-title inline-block\">Commits</h2>\r\n <a ng-href=\"{{$projectLink}}/wiki/history//\">View All Commits >></a>\r\n </div>\r\n <div class=\"card-pf-body\">\r\n <div ng-include=\"\'plugins/wiki/html/projectCommitsPanel.html\'\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n</div>\r\n");
$templateCache.put("plugins/developer/html/fileMigrationTask.html","<div ng-controller=\"Developer.KubeTaskController\">\r\n <div class=\"row\">\r\n <div hawtio-breadcrumbs></div>\r\n </div>\r\n <div class=\"row\">\r\n <div hawtio-tabs></div>\r\n </div>\r\n <div class=\"container-content \">\r\n <div class=\"row align-center mb10\" ng-hide=\"model.transferTasks.length\">\r\n <p class=\"alert alert-info\">当前没有可以查看的任务列表!</p>\r\n </div>\r\n <div class=\"row mb10\" ng-show=\"model.transferTasks.length\">\r\n <table class=\"table table-bordered table-striped sj_content_table\" hawtio-simple-table=\"tableConfig\" />\r\n </div>\r\n </div>\r\n</div>\r\n");
8 years ago
$templateCache.put("plugins/developer/html/home.html","<div ng-controller=\"Developer.HomeController\">\r\n <div class=\"jumbotron\">\r\n <h1>Perspectives</h1>\r\n\r\n <p>\r\n Please choose the perspective you would like to use:\r\n </p>\r\n </div>\r\n <div class=\"row\">\r\n\r\n <div class=\"col-md-6\">\r\n <p class=\"text-center\">\r\n <a class=\"btn btn-lg btn-primary\" href=\"/workspaces\" role=\"button\"\r\n title=\"Create or work on Projects\">\r\n <i class=\"fa fa-tasks\"></i>\r\n &nbspDevelop »\r\n </a>\r\n </p>\r\n\r\n <p class=\"text-center\">\r\n Work on projects and source code\r\n </p>\r\n </div>\r\n <div class=\"col-md-6\">\r\n <p class=\"text-center\">\r\n <a class=\"btn btn-lg btn-primary\" href=\"/namespaces\" role=\"button\"\r\n title=\"Look around the various Namespaces at running Pods and Services\">\r\n <i class=\"fa fa-cubes\"></i>\r\n &nbsp;Operate »\r\n </a>\r\n </p>\r\n\r\n <p class=\"text-center\">\r\n Manage and run Pods and Services\r\n </p>\r\n </div>\r\n </div>\r\n</div>");
$templateCache.put("plugins/developer/html/jenkinsApproveModal.html","<div class=\"modal-header\">\r\n <h3 class=\"modal-title\">{{operation}}?</h3>\r\n</div>\r\n<div class=\"modal-body\">\r\n Are you sure you wish to {{operation}}?\r\n</div>\r\n<div class=\"modal-footer\">\r\n <button class=\"btn btn-primary\" ng-click=\"ok()\">{{operation}}</button>\r\n <button class=\"btn btn-warning\" ng-click=\"cancel()\">Cancel</button>\r\n</div>\r\n");
$templateCache.put("plugins/developer/html/jenkinsJob.html","<div class=\"row\" ng-controller=\"Developer.JenkinsJobController\">\r\n <script type=\"text/ng-template\" id=\"jenkinsBuildIdTemplate.html\">\r\n <div class=\"ngCellText\" title=\"{{row.entity.fullDisplayName}} {{row.entity.result}}\">\r\n <a href=\"{{row.entity.$logsLink}}\" title=\"View the build logs\">\r\n <i class=\"{{row.entity.$iconClass}}\"></i>&nbsp;&nbsp;{{row.entity.displayName}}\r\n </a>\r\n </div>\r\n </script>\r\n <script type=\"text/ng-template\" id=\"jenkinsBuildButtonsTemplate.html\">\r\n <div class=\"ngCellText\">\r\n <a class=\"btn btn-default\" href=\"{{row.entity.$pipelineLink}}\" ng-show=\"row.entity.$pipelineLink\" target=\"View the pipeline for this build\">\r\n <i class=\"fa fa-tasks\"></i> Pipeline\r\n </a>\r\n &nbsp;&nbsp;\r\n <a class=\"btn btn-default\" href=\"{{row.entity.$logsLink}}\" ng-show=\"row.entity.$logsLink\" title=\"View the build logs\">\r\n <i class=\"fa fa-tasks\"></i> Logs\r\n </a>\r\n </div>\r\n </script>\r\n <script type=\"text/ng-template\" id=\"jenkinsBuildTimestampTemplate.html\">\r\n <div class=\"ngCellText\" title=\"Build started at: {{row.entity.$timestamp}}\">\r\n {{row.entity.$timestamp.relative()}}\r\n </div>\r\n </script>\r\n <script type=\"text/ng-template\" id=\"jenkinsBuildDurationTemplate.html\">\r\n <div class=\"ngCellText\" title=\"Build took {{row.entity.$duration}} milliseconds\">\r\n {{row.entity.$duration.duration()}}\r\n </div>\r\n </script>\r\n\r\n\r\n <div class=\"row\">\r\n <div hawtio-breadcrumbs></div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div hawtio-tabs></div>\r\n </div>\r\n\r\n <div class=\"row filter-header\">\r\n <div class=\"col-md-12\">\r\n <span>\r\n <hawtio-filter ng-show=\"job.builds.length\"\r\n ng-model=\"tableConfig.filterOptions.filterText\"\r\n css-class=\"input-xxlarge\"\r\n placeholder=\"Filter builds...\"></hawtio-filter>\r\n </span>\r\n <button ng-show=\"fetched\"\r\n title=\"Delete this build history\"\r\n class=\"btn btn-danger pull-right\"\r\n ng-disabled=\"tableConfig.selectedItems.length == 0\"\r\n ng-click=\"deletePrompt(tableConfig.selectedItems)\">\r\n <i class=\"fa fa-remove\"></i> Delete\r\n </button>\r\n\r\n <a class=\"btn btn-primary pull-right\" ng-click=\"triggerBuild()\"\r\n title=\"Trigger this build\">\r\n <i class=\"fa fa-play-circle-o\"></i> Trigger</a>\r\n </a>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div ng-hide=\"model.fetched\">\r\n <div class=\"align-center\">\r\n <i class=\"fa fa-spinner fa-spin\"></i>\r\n </div>\r\n </div>\r\n <div ng-show=\"model.fetched\">\r\n <div ng-hide=\"job.builds.length\" class=\"align-center\">\r\n <p class=\"alert alert-info\">There are no builds in this job.</p>\r\n </div>\r\n <div ng-show=\"job.builds.length\">\r\n <table class=\"table table-bordered table-striped\" hawtio-simple-table=\"tableConfig\"></table>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n");
$templateCache.put("plugins/developer/html/jenkinsJobs.html","<div class=\"row\" ng-controller=\"Developer.JenkinsJobsController\">\r\n <script type=\"text/ng-template\" id=\"jenkinsJobNameTemplate.html\">\r\n <div class=\"ngCellText\" title=\"{{row.entity.fullDisplayName}} {{row.entity.result}}\">\r\n <a href=\"{{row.entity.$buildsLink}}\">\r\n <i class=\"{{row.entity.$iconClass}}\"></i>&nbsp;&nbsp;{{row.entity.displayName}}\r\n </a>\r\n </div>\r\n </script>\r\n <script type=\"text/ng-template\" id=\"jenkinsJobButtonsTemplate.html\">\r\n <div class=\"ngCellText\">\r\n <a class=\"btn btn-default\" href=\"{{row.entity.$pipelinesLink}}\" ng-show=\"row.entity.$pipelinesLink\" title=\"View the pipelines for this build\">\r\n <i class=\"fa fa-tasks\"></i> Pipelines\r\n </a>\r\n </div>\r\n </script>\r\n <script type=\"text/ng-template\" id=\"jenkinsBuildTimestampTemplate.html\">\r\n <div class=\"ngCellText\" title=\"Build started at: {{row.entity.$timestamp}}\">\r\n {{row.entity.$timestamp.relative()}}\r\n </div>\r\n </script>\r\n <script type=\"text/ng-template\" id=\"jenkinsBuildDurationTemplate.html\">\r\n <div class=\"ngCellText\" title=\"Build took {{row.entity.$duration}} milliseconds\">\r\n {{row.entity.$duration.duration()}}\r\n </div>\r\n </script>\r\n <script type=\"text/ng-template\" id=\"jenkinsLastSuccessTemplate.html\">\r\n <div class=\"ngCellText\" ng-init=\"success=row.entity.lastSuccessfulBuild\">\r\n <span title=\"Build took {{success.$duration.duration()}} milliseconds\">\r\n <span ng-show=\"success\">\r\n {{success.$timestamp.relative()}}\r\n </span>\r\n <span ng-show=\"success.$buildLink\">\r\n -\r\n <a href=\"{{success.$buildLink}}\" target=\"build\" title=\"View the builds\">\r\n {{success.displayName}}\r\n </a>\r\n </span>\r\n </span>\r\n </div>\r\n </script>\r\n <script type=\"text/ng-template\" id=\"jenkinsLastFailureTemplate.html\">\r\n <div class=\"ngCellText\" ng-init=\"fail=row.entity.lastFailedBuild\">\r\n <span title=\"Build took {{fail.$duration.duration()}} milliseconds\">\r\n <span ng-show=\"fail\">\r\n {{fail.$timestamp.relative()}}\r\n </span>\r\n <span ng-show=\"fail.$buildLink\">\r\n -\r\n <a href=\"{{fail.$buildLink}}\" target=\"build\" title=\"View the builds\">\r\n {{fail.displayName}}\r\n </a>\r\n </span>\r\n </span>\r\n </div>\r\n </script>\r\n\r\n\r\n <div class=\"row\">\r\n <div hawtio-breadcrumbs></div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div hawtio-tabs></div>\r\n </div>\r\n\r\n <div class=\"row filter-header\">\r\n <div class=\"col-md-12\">\r\n <span>\r\n <hawtio-filter ng-show=\"jenkins.jobs.length\"\r\n ng-model=\"tableConfig.filterOptions.filterText\"\r\n css-class=\"input-xxlarge\"\r\n placeholder=\"Filter jobs...\"></hawtio-filter>\r\n </span>\r\n <a class=\"btn btn-primary pull-right\" ng-click=\"triggerBuild()\"\r\n title=\"Trigger this build\">\r\n <i class=\"fa fa-play-circle-o\"></i> Trigger</a>\r\n </a>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div ng-hide=\"model.fetched\">\r\n <div class=\"align-center\">\r\n <i class=\"fa fa-spinner fa-spin\"></i>\r\n </div>\r\n </div>\r\n <div ng-show=\"model.fetched\">\r\n <div ng-hide=\"jenkins.jobs.length\" class=\"align-center\">\r\n <p class=\"alert alert-info\">There are no jobs in this jenkins.</p>\r\n </div>\r\n <div ng-show=\"jenkins.jobs.length\">\r\n <table class=\"table table-bordered table-striped\" hawtio-simple-table=\"tableConfig\"></table>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n");
$templateCache.put("plugins/developer/html/jenkinsLog.html","<div class=\"row\" ng-controller=\"Developer.JenkinsLogController\">\r\n <div class=\"row\">\r\n <div hawtio-breadcrumbs></div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div hawtio-tabs></div>\r\n </div>\r\n\r\n <div class=\"row filter-header\">\r\n <div class=\"col-md-12\">\r\n <span>\r\n <hawtio-filter ng-model=\"log.filterText\"\r\n css-class=\"input-xxlarge\"\r\n placeholder=\"Filter logs...\"></hawtio-filter>\r\n </span>\r\n <a class=\"btn btn-default pull-right\" target=\"jenkins\" href=\"{{$viewJenkinsLogLink}}\" ng-show=\"$viewJenkinsLogLink\"\r\n title=\"View this log inside Jenkins\">\r\n <i class=\"fa fa-external-link\"></i> Log in Jenkins</a>\r\n </a>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <a class=\"btn btn-default pull-right\" target=\"jenkins\" href=\"{{$viewJenkinsBuildLink}}\" ng-show=\"$viewJenkinsBuildLink\"\r\n title=\"View this build inside Jenkins\">\r\n <i class=\"fa fa-external-link\"></i> Build in Jenkins</a>\r\n </a>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div class=\"log-window\" viewport-height scroll-glue>\r\n <div class=\"log-window-inner\" >\r\n <p ng-repeat=\"log in log.logs | filter:log.filterText track by $index\" ng-bind-html=\"log | asTrustedHtml\"></p>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n</div>\r\n");
$templateCache.put("plugins/developer/html/jenkinsMetrics.html","<div class=\"row\" ng-controller=\"Developer.JenkinsMetricsController\">\r\n <div class=\"row\">\r\n <div hawtio-breadcrumbs></div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div hawtio-tabs></div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div ng-hide=\"model.fetched\">\r\n <div class=\"align-center\">\r\n <i class=\"fa fa-spinner fa-spin\"></i>\r\n </div>\r\n </div>\r\n <div ng-show=\"model.fetched\">\r\n <div ng-hide=\"metrics.builds.length\" class=\"align-center\">\r\n <p class=\"alert alert-info\">There are no completed builds in this job.</p>\r\n </div>\r\n <div ng-show=\"metrics.builds.length\">\r\n <nvd3 options=\"options\" data=\"data\" api=\"api\"></nvd3>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n");
$templateCache.put("plugins/developer/html/logPanel.html","<div class=\"log-panel\" ng-controller=\"Developer.JenkinsLogController\" scroll-glue>\r\n <div class=\"log-panel-inner\" style=\"height: 25px;\">\r\n <p ng-repeat=\"log in log.logs track by $index\" ng-bind-html=\"log | asTrustedHtml\"></p>\r\n </div>\r\n</div>\r\n\r\n\r\n");
$templateCache.put("plugins/developer/html/overview.html","");
$templateCache.put("plugins/developer/html/pipeline.html","<div class=\"row\" ng-controller=\"Developer.PipelineController\">\r\n <div class=\"row\">\r\n <div hawtio-breadcrumbs></div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div hawtio-tabs></div>\r\n </div>\r\n\r\n <div class=\"row filter-header\">\r\n <div class=\"col-md-12\">\r\n <span>\r\n <hawtio-filter ng-show=\"model.stages.length\"\r\n ng-model=\"model.filterText\"\r\n css-class=\"input-xxlarge\"\r\n placeholder=\"Filter pipeline...\"></hawtio-filter>\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div ng-hide=\"model.fetched\">\r\n <div class=\"align-center\">\r\n <i class=\"fa fa-spinner fa-spin\"></i>\r\n </div>\r\n </div>\r\n <div ng-show=\"model.fetched\">\r\n <div ng-hide=\"model.stages.length\" class=\"align-center\">\r\n <p class=\"alert alert-info\">There are no pipeline stages in this build.</p>\r\n </div>\r\n <div ng-show=\"model.stages.length\">\r\n\r\n <h2>Pipeline for {{jobId}}</h2>\r\n\r\n <div pipeline-view></div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n");
$templateCache.put("plugins/developer/html/pipelineView.html","<div class=\"panel-group\">\r\n <div class=\"panel panel-default\">\r\n <div class=\"panel-heading\">\r\n <h2 class=\"panel-title\">\r\n <a data-toggle=\"collapse\" data-parent=\".panel-group\" href=\"#build-{{build.id}}\">\r\n Build {{build.displayName}}\r\n </a>\r\n <span class=\"pull-right\" title=\"This build started at {{build.$timestamp}}\">\r\n started {{build.$timestamp.relative()}}\r\n </span>\r\n </h2>\r\n </div>\r\n\r\n <div id=\"build-{{build.id}}\" class=\"panel-collapse collapse in\">\r\n <div class=\"panel-body\">\r\n\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <!--\r\n <div class=\"pipeline-build inline-block\"\r\n title=\"{{build.description || \'Pipeline build number \' + build.displayName}}\">\r\n <div class=\"buildName\">\r\n <a href=\"{{build.$viewLink}}\" title=\"View the build details\">\r\n {{build.displayName}}\r\n </a>\r\n <span class=\"buildParameters pull-right\" ng-show=\"$parameterText\">\r\n <i class=\"fa fa-ellipsis-v\" title=\"build parameters: {{build.$parameterText}}\"></i>\r\n </span>\r\n </div>\r\n\r\n <div class=\"buildDuration text-center\">\r\n <a href=\"{{build.$logLink}}\" title=\"This build started at {{build.$timestamp}}\">\r\n started {{build.$timestamp.relative()}}\r\n </a>\r\n </div>\r\n </div>\r\n -->\r\n\r\n <div ng-repeat=\"stage in build.stages | filter:model.filterText track by $index\" class=\"inline-block\">\r\n <div class=\"pipeline-arrow inline-block\" ng-show=\"$index\">\r\n <i class=\"fa fa-angle-double-right\"></i>\r\n </div>\r\n <div class=\"pipeline-deploy {{stage.$backgroundClass}} inline-block\">\r\n <div class=\"text-center stageName\" title=\"{{stage.status}}\"><i class=\"{{stage.$iconClass}}\"></i>\r\n <a href=\"{{stage.$viewLink}}\" title=\"This stage started at {{stage.$startTime}}\" target=\"jenkins\">\r\n {{stage.stageName}}\r\n </a>\r\n </div>\r\n <div class=\"text-center stageStartTime\" title=\"Stage started at {{stage.$startTime}}\">\r\n <a href=\"{{stage.$logLink}}\" title=\"View the logs of this stage\">\r\n {{stage.duration.duration()}}\r\n </a>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n <div class=\"row\" ng-show=\"hideLogs && !build.building\">\r\n <div class=\"col-md-12\">\r\n <a href=\"{{build.$logLink}}\" class=\"pull-right\">View Full Log</a>\r\n </div>\r\n </div>\r\n <div class=\"row\" ng-hide=\"hideLogs && !build.building\">\r\n <div class=\"col-md-12\">\r\n <h4 class=\"inline-block\">Logs</h4>\r\n <a href=\"{{build.$logLink}}\" class=\"pull-right\">View Full Log</a>\r\n <div style=\"height: 250px;\" ng-include=\"\'plugins/developer/html/logPanel.html\'\"></div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n\r\n </div>\r\n</div>\r\n");
$templateCache.put("plugins/developer/html/pipelines.html","<div class=\"row\" ng-controller=\"Developer.PipelinesController\">\r\n <div hawtio-breadcrumbs></div>\r\n <div hawtio-tabs></div>\r\n\r\n <div class=\"row filter-header\">\r\n <div class=\"col-md-4\">\r\n <span>\r\n <hawtio-filter ng-show=\"model.job.builds.length\"\r\n ng-model=\"model.filterText\"\r\n css-class=\"input-xxlarge\"\r\n placeholder=\"Filter pipelines...\"></hawtio-filter>\r\n </span>\r\n </div>\r\n <div class=\"col-md-4\">\r\n <form class=\"form-inline\">\r\n <div class=\"checkbox\" title=\"Only show build pipelines which are pending\">\r\n <label>\r\n <input type=\"checkbox\" ng-model=\"model.pendingOnly\"> &nbsp;Only pending builds\r\n </label>\r\n </div>\r\n </form>\r\n\r\n </div>\r\n </div>\r\n <div class=\"row\" ng-init=\"hideLogs = true\">\r\n <div class=\"col-md-12\">\r\n <div ng-hide=\"model.fetched\">\r\n <div class=\"align-center\">\r\n <i class=\"fa fa-spinner fa-spin\"></i>\r\n </div>\r\n </div>\r\n <div ng-show=\"model.fetched\">\r\n <div ng-hide=\"model.job.builds.length\" class=\"align-center\">\r\n <p class=\"alert alert-info\">There are no pipelines for this job.</p>\r\n </div>\r\n <div ng-show=\"model.job.builds.length\">\r\n <div ng-repeat=\"build in model.job.builds | filter:model.filterText track by $index\">\r\n <div pipeline-view></div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n");
$templateCache.put("plugins/developer/html/projectDetail.html","<div ng-controller=\"Kubernetes.BuildConfigController\">\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <a class=\"btn btn-default pull-right\"\r\n href=\"{{baseUri}}/kubernetes/buildConfigs\"><i class=\"fa fa-list\"></i></a>\r\n <div class=\"pull-right\" ng-repeat=\"view in entity.$fabric8Views | orderBy:\'label\'\">\r\n <a title=\"{{view.description}}\" ng-show=\"view.url\" ng-href=\"{{view.url}}\" class=\"btn btn-default\">\r\n <i class=\"{{view.iconClass}}\" ng-show=\"view.iconClass\"></i>\r\n {{view.label}}\r\n </a>\r\n <span class=\"pull-right\" ng-show=\"view.url\" >&nbsp;</span>\r\n </div>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <button class=\"btn btn-primary pull-right\"\r\n title=\"Trigger this build\"\r\n ng-disabled=\"!entity.$triggerUrl\"\r\n ng-click=\"triggerBuild(entity)\"><i class=\"fa fa-play-circle-o\"></i> Trigger</button>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div hawtio-breadcrumbs></div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div ng-hide=\"model.fetched\">\r\n <div class=\"align-center\">\r\n <i class=\"fa fa-spinner fa-spin\"></i>\r\n </div>\r\n </div>\r\n <div ng-show=\"model.fetched\">\r\n <div hawtio-object=\"entity\" config=\"config\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n");
$templateCache.put("plugins/developer/html/projectSelector.html","<ul class=\"project-selector\" ng-controller=\"Developer.ProjectSelector\" ng-show=\'projectId\'>\r\n <li class=\"dropdown\">\r\n <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">\r\n <strong ng-bind=\"projectId\"></strong>\r\n <b class=\"caret\"></b>\r\n </a>\r\n <ul class=\"dropdown-menu\">\r\n <li ng-repeat=\'project in projects\'>\r\n <a ng-href=\"{{project.$viewLink}}\">{{project.$name}}</a>\r\n </li>\r\n </ul>\r\n </li>\r\n</ul>\r\n");
$templateCache.put("plugins/developer/html/projects.html","<div class=\"row\" ng-controller=\"Developer.ProjectsController\">\r\n <script type=\"text/ng-template\" id=\"buildConfigLinkTemplate.html\">\r\n <div class=\"ngCellText\">\r\n <a title=\"View details for this build configuration\"\r\n href=\"{{baseUri}}/kubernetes/buildConfigs/{{row.entity.metadata.name}}\">\r\n<!--\r\n <img class=\"app-icon-small\" ng-src=\"{{row.entity.$iconUrl}}\">\r\n-->\r\n {{row.entity.metadata.name}}</a>\r\n </div>\r\n </script>\r\n <script type=\"text/ng-template\" id=\"buildConfigViewsTemplate.html\">\r\n <div class=\"ngCellText\">\r\n <span ng-repeat=\"view in row.entity.$fabric8Views track by $index\">\r\n <a title=\"{{view.description}}\" ng-show=\"view.url\" ng-href=\"{{view.url}}\" class=\"btn btn-default\">\r\n <i class=\"{{view.iconClass}}\" ng-show=\"view.iconClass\"></i>\r\n {{view.label}}\r\n </a>\r\n </span>\r\n </div>\r\n </script>\r\n <script type=\"text/ng-template\" id=\"buildConfigCodeViewsTemplate.html\">\r\n <div class=\"ngCellText\">\r\n <span ng-repeat=\"view in row.entity.$fabric8CodeViews track by $index\">\r\n <a title=\"{{view.description}}\" ng-show=\"view.url\" ng-href=\"{{view.url}}\" class=\"btn btn-default\">\r\n <i class=\"{{view.iconClass}}\" ng-show=\"view.iconClass\"></i>\r\n {{view.label}}\r\n </a>\r\n </span>\r\n </div>\r\n </script>\r\n <script type=\"text/ng-template\" id=\"buildConfigBuildViewsTemplate.html\">\r\n <div class=\"ngCellText\">\r\n <span ng-repeat=\"view in row.entity.$fabric8BuildViews track by $index\">\r\n <a title=\"{{view.description}}\" ng-show=\"view.url\" ng-href=\"{{view.url}}\" class=\"btn btn-default\">\r\n <i class=\"{{view.iconClass}}\" ng-show=\"view.iconClass\"></i>\r\n {{view.label}}\r\n </a>\r\n </span>\r\n </div>\r\n </script>\r\n <script type=\"text/ng-template\" id=\"buildConfigEnvironmentViewsTemplate.html\">\r\n <div class=\"ngCellText\">\r\n <span ng-repeat=\"view in row.entity.$fabric8EnvironmentViews track by $index\">\r\n <a title=\"{{view.description}}\" ng-show=\"view.url\" ng-href=\"{{view.url}}\" class=\"btn btn-default\">\r\n <i class=\"{{view.iconClass}}\" ng-show=\"view.iconClass\"></i>\r\n {{view.label}}\r\n </a>\r\n </span>\r\n </div>\r\n </script>\r\n <script type=\"text/ng-template\" id=\"buildConfigTeamViewsTemplate.html\">\r\n <div class=\"ngCellText\">\r\n <span ng-repeat=\"view in row.entity.$fabric8TeamViews track by $index\">\r\n <a title=\"{{view.description}}\" ng-show=\"view.url\" ng-href=\"{{view.url}}\" class=\"btn btn-default\">\r\n <i class=\"{{view.iconClass}}\" ng-show=\"view.iconClass\"></i>\r\n {{view.label}}\r\n </a>\r\n </span>\r\n </div>\r\n </script>\r\n\r\n <div class=\"row\">\r\n <div hawtio-tabs></div>\r\n </div>\r\n\r\n <div class=\"row filter-header\">\r\n <div class=\"col-md-12\">\r\n <span>\r\n <hawtio-filter ng-show=\"model.buildconfigs.length\"\r\n ng-model=\"tableConfig.filterOptions.filterText\"\r\n css-class=\"input-xxlarge\"\r\n placeholder=\"Filter apps...\"></hawtio-filter>\r\n </span>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <button ng-show=\"fetched\"\r\n title=\"Delete the selected build configuration\"\r\n class=\"btn btn-danger pull-right\"\r\n ng-disabled=\"tableConfig.selectedItems.length == 0\"\r\n ng-click=\"deletePrompt(tableConfig.selectedItems)\">\r\n <i class=\"fa fa-remove\"></i> Delete\r\n </button>\r\n\r\n <button ng-show=\"model.fetched\"\r\n class=\"btn btn-danger pull-right\"\r\n ng-disabled=\"!id && tableConfig.selectedItems.length == 0\"\r\n ng-click=\"deletePrompt(id || tableConfig.selectedIte
$templateCache.put("plugins/developer/html/tools.html","<div ng-controller=\"Kubernetes.BuildConfigController\">\r\n <div class=\"row\">\r\n <div hawtio-breadcrumbs></div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div hawtio-tabs></div>\r\n </div>\r\n\r\n <div class=\"row filter-header\">\r\n <div class=\"col-md-12\" ng-show=\"model.tools.length\">\r\n <span ng-show=\"!id\">\r\n <hawtio-filter ng-model=\"tableConfig.filterOptions.filterText\"\r\n css-class=\"input-xxlarge\"\r\n placeholder=\"Filter tools...\"></hawtio-filter>\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div ng-hide=\"model.fetched\">\r\n <div class=\"align-center\">\r\n <i class=\"fa fa-spinner fa-spin\"></i>\r\n </div>\r\n </div>\r\n <div ng-show=\"model.fetched\">\r\n <div ng-hide=\"entity.tools.length\" class=\"align-center\">\r\n <p class=\"alert alert-info\">There are no tools currently available.</p>\r\n </div>\r\n <div ng-show=\"entity.tools.length\">\r\n <div ng-hide=\"entity.tools.length\" class=\"align-center\">\r\n <p class=\"alert alert-info\">There are no tools currently available.</p>\r\n </div>\r\n <div ng-repeat=\"env in entity.tools | filter:filterTemplates | orderBy:\'label\' track by $index\">\r\n <div class=\"row\"\r\n title=\"{{env.description}}\">\r\n <div class=\"col-md-9\">\r\n <a href=\"{{env.url}}\">\r\n <h3>\r\n <i class=\"{{env.iconClass}}\"></i>\r\n {{env.label}}\r\n </h3>\r\n </a>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n");
$templateCache.put("plugins/developer/html/workspace.html","<div ng-controller=\"Developer.WorkspaceController\">\r\n <div class=\"row\">\r\n <div hawtio-breadcrumbs></div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div hawtio-tabs></div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <a class=\"btn btn-default pull-right\"\r\n href=\"{{baseUri}}/kubernetes/workspaces\"><i class=\"fa fa-list\"></i></a>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <a class=\"btn btn-default pull-right\" ng-show=\"entity.$configLink\"\r\n title=\"View the workspace configuration\"\r\n href=\"{{entity.$configLink}}\">\r\n Configuration\r\n </a>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <a class=\"btn btn-default pull-right\" ng-show=\"entity.$podLink\"\r\n title=\"View the workspace pod\"\r\n href=\"{{entity.$podLink}}\">\r\n Pod\r\n </a>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <a class=\"btn btn-primary pull-right\" ng-show=\"entity.$logsLink\"\r\n title=\"View the workspace logs\"\r\n href=\"{{entity.$logsLink}}\">\r\n View Log\r\n </a>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div ng-hide=\"model.fetched\">\r\n <div class=\"align-center\">\r\n <i class=\"fa fa-spinner fa-spin\"></i>\r\n </div>\r\n </div>\r\n <div ng-show=\"model.fetched\">\r\n <div hawtio-object=\"entity\" config=\"config\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n");
8 years ago
$templateCache.put("plugins/developer/html/workspaces.html","<div ng-controller=\"Developer.WorkspacesController\" hawtio-card-bg>\r\n <div hawtio-breadcrumbs></div>\r\n <div hawtio-tabs></div>\r\n <div class=\"container-content \">\r\n <div class=\"container-fluid sj_fluid\">\r\n <div class=\"row nav-content mb10 clear \">\r\n <ul class=\"nav nav-tabs sj_nav_taps fl\" ng-show=\"navbarItems.length\">\r\n <li role=\"presentation\" ng-repeat=\"item in navbarItems\" class=\"{{item.class}}\"><a href=\"#\" ng-click=\"selectBatchItem(item)\">{{item.label}}</a></li>\r\n </ul>\r\n <div class=\"fr sj_searchbox\">\r\n <input type=\"text\" class=\"sj_search_input\" ng-model=\"keyQuery\" placeholder=\"请选择或输入关键字,多关键字请用空格隔开\" onkeydown=\"if(event.keyCode==13){searchButton.click()}\"/>\r\n <a href=\"#\" class=\"sj_search_btn\" id=\"searchButton\" ng-click=\"search()\"></a>\r\n </div>\r\n </div>\r\n <div ng-hide=\"model.data.length\" class=\"align-center\">\r\n <p class=\"alert alert-info\">当前没有可以查看的数据.</p>\r\n </div>\r\n <div ng-show=\"model.data.length\">\r\n <table class=\"table table-striped table-bordered sj_content_table\" hawtio-simple-table=\"tableConfig\" id=\"tableConfig\"></table>\r\n <div class=\"row clear\">\r\n <div class=\" fl\">\r\n <!--<input type=\"checkbox\" class=\"fl mr5 \" style=\"margin-top: 8px;\" />\r\n <label class=\"fl mr5 \" style=\"margin-top: 5px; font-style:nomal;\">全选</label>-->\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <button class=\"btn pull-right sj_btn_grey \" ng-disabled=\"!id && tableConfig.selectedItems.length == 0\" ng-click=\"deletePrompt(id || tableConfig.selectedItems)\">\r\n <i class=\"glyphicon glyphicon-trash\"></i> 删除\r\n </button>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <button class=\"btn pull-right sj_btn_grey \" ng-disabled=\"!id && tableConfig.selectedItems.length == 0\" ng-click=\"migrationClick.open(id || tableConfig.selectedItems)\">\r\n <i class=\"glyphicon glyphicon-export\"></i> 迁移\r\n </button>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <button class=\"btn pull-right sj_btn_grey \" ng-disabled=\"!id && tableConfig.selectedItems.length == 0\" ng-click=\"createOracleService(id || tableConfig.selectedItems)\">\r\n <i class=\"glyphicon glyphicon-play-circle\"></i> 启动\r\n </button>\r\n </div>\r\n <ul class=\"fr sj_table_bottom\">\r\n <li class=\"mr5 \">当前显示1~{{model.data.length}}行,共{{model.data.length}}行。</li>\r\n <li class=\"mr5 \">每页显示\r\n <select ng-options=\"value for value in pageSizeChoses\" ng-change=\"selectAction()\" ng-model=\"options.currentTableSize\"></select>行\r\n </li>\r\n <li class=\"mr5 \">当前页码</li>\r\n <li>\r\n <div class=\"hawtio-pager clearfix\">\r\n <label>{{options.currentPageNum}} / {{options.getPageSizeNum()}}</label>\r\n <div class=btn-group>\r\n <button class=\"btn sj_btn_grey\" ng-disabled=\"isEmptyOrFirst()\" ng-click=\"first()\"><i class=\"fa fa-fast-backward\"></i></button>\r\n <button class=\"btn sj_btn_grey\" ng-disabled=\"isEmptyOrFirst()\" ng-click=\"previous()\"><i class=\"fa fa-step-backward\"></i></button>\
$templateCache.put("plugins/configs/html/configMenuItem.html","<ul ng-controller=\"Configs.MenuItemController\" class=\"nav nav-pills\" role=\"tablist\">\r\n <li ng-repeat=\"item in menuItem\" role=\"presentation\">\r\n <a href=\"{{item.href}}\"><span class=\"{{item.icon}}\"></span> {{item.label}}</a>\r\n </li>\r\n</ul>\r\n");
$templateCache.put("plugins/configs/html/glusterfsSetting.html","<div ng-controller=\"Configs.GfsController\">\r\n <div class=\"row\">\r\n <div hawtio-breadcrumbs></div>\r\n </div>\r\n <div class=\"row\">\r\n <div hawtio-tabs></div>\r\n </div>\r\n \r\n <div class=\"container-content sj_content\" ng-model=\"volumes\">\r\n <div class=\"row\">\r\n <div class=\"mb10\">\r\n <button class=\"btn sj_btn_green\" style=\"color:#fff;\r\n \" ng-click=\"createGfs()\">\r\n <span class=\"glyphicon glyphicon-plus \"></span> 添加\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"row\" ng-repeat=\"volume in volumes\">\r\n <table class=\"table sj_content_table sj_table_border\">\r\n <thead class=\"no-scope\">\r\n <tr>\r\n <th ng-show=\"volume.status\" class=\"sj_c_green table-header sj_table_td00\">已启用</th>\r\n <th ng-hide=\"volume.status\" class=\"sj_c_green table-header sj_table_td00\">已停止</th>\r\n <th class=\"no-fade table-header sj_table_td06\">\r\n <span class=\"\">{{volume.name}}</span>\r\n </th>\r\n <th class=\"no-fade table-header sj_table_td02\">\r\n <span class=\"\">云路径:{{volume.path}}</span>\r\n </th>\r\n <th class=\"no-fade table-header sj_table_td02\">\r\n <span class=\"\"></span>\r\n </th>\r\n <th class=\"no-fade table-header\">\r\n <span class=\"\">已用&nbsp;{{volume.formatUsedSize}}&nbsp;&nbsp;/&nbsp;&nbsp;共&nbsp;{{volume.formatTotalSize}}</span>\r\n </th>\r\n <th class=\"no-fade table-header sj_table_td01\">\r\n <button class=\"btn sj_btn\" ng-click=\"editRow(volume)\">\r\n <span class=\"glyphicon glyphicon-pencil\"></span>&nbsp;&nbsp;编辑\r\n </button>\r\n <button class=\"btn sj_btn\" ng-click=\"showDeleteVolume.open(volume)\">\r\n <span class=\"glyphicon glyphicon-trash\"></span>&nbsp;&nbsp;刪除\r\n </button>\r\n </th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr ng-repeat=\"row in volume.brick track by $index\" class=\"row.class\">\r\n <td>\r\n <span ng-show=\"row.status\" class=\"glyphicon glyphicon-ok sj_c_green \"></span>\r\n <span ng-hide=\"row.status\" class=\"glyphicon glyphicon-remove sj_c_green \"></span>\r\n </td>\r\n <td>\r\n <span class=\"\">服务器{{$index+1}}</span>\r\n </td>\r\n <td>\r\n <span class=\"sj_table_td02\">{{row.ip}}</span>\r\n </td>\r\n <td>\r\n <span class=\"sj_table_td02\">存储路径:{{row.path}}</span>\r\n </td>\r\n <td>\r\n <span class=\"\">已用&nbsp;{{row.formatUsedSize}}&nbsp;&nbsp;/&nbsp;&nbsp;共&nbsp;{{row.formatAllSize}}</span>\r\n </td>\r\n <td></td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n <div hawtio-confirm-dialog=\"showDeleteVolume.show\" title=\"是否删除任务?\" ok-button-text=\"确认\" cancel-button-text=\"取消\" on-cancel=\"showDeleteVolume.onCancelled()\" on-ok=\"showDeleteVolume.onOk()\">\r\n <div class=\"dialog-body\">\r\n <p>\r\n
$templateCache.put("plugins/configs/html/kubeClusterSetting.html","<div ng-controller=\"Configs.KubeController\">\r\n <div class=\"row\">\r\n <div hawtio-breadcrumbs></div>\r\n </div>\r\n <div class=\"row\">\r\n <div hawtio-tabs></div>\r\n </div>\r\n \r\n <div class=\"container-content\">\r\n <div class=\"row align-center mb10\" ng-hide=\"model.oracleParam.length\">\r\n <p class=\"alert alert-info\">当前没有配置汇总库信息,请配置,否则汇总操作将不可用!</p>\r\n </div>\r\n <div class=\"row mb10\" ng-show=\"model.oracleParam.length\">\r\n <table class=\"table table-bordered table-striped sj_content_table\" hawtio-simple-table=\"tableConfig\" />\r\n </div>\r\n <div class=\"row\">\r\n <div>\r\n <button class=\"btn sj_btn_green mb10\" style=\"color:#fff;\" ng-click=\"create()\">\r\n <span class=\"glyphicon glyphicon-plus\"></span> 添加\r\n </button>\r\n </div>\r\n </div>\r\n <hr>\r\n <div class=\"row \" style=\"padding-top:10px;\" ng-show=\"tableForm && (edit || add)\">\r\n <h3 class=\"mb10\" ng-show=\"edit\">编辑汇总库连接信息:</h3>\r\n <h3 class=\"mb10\" ng-show=\"add\">添加汇总库信息:</h3>\r\n <div class=\"col-md-6 col-md-offset-1 \">\r\n <form class=\"form-horizontal\" novalidate=\"novalidate\" name=\"validForm\" ng-submit=\"onSubmit(tableForm)\">\r\n <div class=\"form-group\">\r\n <label class=\"col-sm-2 control-label\">名称</label>\r\n <div class=\"col-sm-10 sj_form_input\">\r\n <input class=\"form-control \" type=\"text\" ng-model=\"tableForm.name\" name=\"orcName\" ng-minlength=\"2\" ng-maxlength=\"20\" required=\"required\"/>\r\n <div class=\"form-error\" ng-show=\"validForm.orcName.$invalid && submitted\">\r\n <span class=\"alert alert-danger\" role=\"alert\" ng-show=\"validForm.orcName.$error.required\">名称不能为空</span> <span class=\"alert alert-danger\" role=\"alert\" ng-show=\"!validForm.orcName.$error.required && validForm.orcName.$invalid\">请输入输入2-20个字符的数据名称</span> \r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"form-group\">\r\n <label class=\"col-sm-2 control-label\">IP</label>\r\n <div class=\"col-sm-10 sj_form_input\">\r\n <input class=\"form-control\" type=\"text\" ng-model=\"tableForm.ip\" name=\"orcIP\" ng-pattern=\"/((?:(?:25[0-5]|2[0-4]\\d|((1\\d{2})|([1-9]?\\d)))\\.){3}(?:25[0-5]|2[0-4]\\d|((1\\d{2})|([1-9]?\\d))))/\" required=\"required\"/>\r\n <div class=\"form-error\" ng-show=\"validForm.orcIP.$invalid && submitted\">\r\n <span class=\"alert alert-danger\" role=\"alert\" ng-show=\"validForm.orcIP.$error.required\">IP不能为空</span>\r\n <span class=\"alert alert-danger\" role=\"alert\" ng-show=\"validForm.orcIP.$error.pattern\">请输入正确的IP地址</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"form-group\">\r\n <label class=\"col-sm-2 control-label\">端口号</label>\r\n <div class=\"col-sm-10 sj_form_input\">\r\n <input class=\"form-control\" type=\"text\" ng-model=\"tableForm.port\" name=\"orcPort\" ng-pattern=\"/^([0-9]|[1-9]\\d|[1-9]\\d{2}|[1-9]\\d{3}|[1-5]\\d{4}|6[0-4]\\d{3}|65[0-4]\\d{2}|655[0-2]\\d|6553[0-5])$/\" required=\"required\"/>\r\n <div class=\"form-error\" ng-show=\"validForm.orcPort.$invalid && submitted\">\r\n <span class=\"alert a
$templateCache.put("plugins/configs/html/shareLayout.html","<script type=\"text/ng-template\" id=\"tableEdit.html\">\r\n <div class=\"ngCellText\" ng-init=\"entity=row.entity\" ng-controller=\"Configs.TableEdit\">\r\n <button class=\"btn sj_btn\" ng-click=\"editRow(entity)\">\r\n <span class=\"glyphicon glyphicon-pencil\"></span>&nbsp;&nbsp;编辑\r\n </button>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <button class=\"btn sj_btn\" ng-click=\"deleteRowOne.open(entity)\">\r\n <span class=\"glyphicon glyphicon-trash\"></span>&nbsp;&nbsp;删除\r\n </button>\r\n <div hawtio-confirm-dialog=\"deleteRowOne.show\" title=\"是否删除任务?\" ok-button-text=\"确认\" cancel-button-text=\"取消\" on-cancel=\"deleteRowOne.onCancelled()\" on-ok=\"deleteRowOne.onOk()\">\r\n <div class=\"dialog-body\">\r\n <p>\r\n 是否删除:{{deleteRowOne.item.name}} 服务?\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n</script>\r\n\r\n<script type=\"text/ng-template\" id=\"connectStatus.html\">\r\n <div class=\"ngCellText\" ng-init=\"entity=row.entity\">\r\n <div ng-show=\"true\" title=\"汇总库的连接状态\">\r\n <span ng-show=\"entity.status== 0\" class=\"glyphicon glyphicon-minus\">&nbsp;未连接</span>\r\n <span ng-show=\"entity.status== 1\" class=\"glyphicon glyphicon-ok\">&nbsp;连接成功</span>\r\n <span ng-show=\"entity.status== 2\" class=\"glyphicon glyphicon-import\">&nbsp;使用中</span>\r\n <span ng-show=\"entity.status== 3\" class=\"glyphicon glyphicon-remove\">&nbsp;连接失败</span>\r\n </div>\r\n </div>\r\n</script>\r\n\r\n<script type=\"text/ng-template\" id=\"newDialog.html\">\r\n <div class=\"sj_new_box\">\r\n <form name=\"volumeForm\" class=\" mb10\" novalidate=\"novalidate\">\r\n <table class=\"sj_new_table clear\">\r\n <tbody>\r\n <tr>\r\n <th class=\"new_left\">云盘名</th>\r\n <th colspan=\"10\">\r\n <input type=\"text\" class=\"sj_txt_box03 mr10\" name=\"volumeName\" ng-model=\"ngDialogData.name \" ng-disabled=\"!{{ngDialogData.editable}}\" ng-pattern=\"/^\\w{2,15}$/\" required=\"required\" />\r\n </th>\r\n <th>云目录:</th>\r\n <th>\r\n <input type=\"text\" class=\"sj_txt_box02 mr5\" name=\"volumePath\" ng-model=\"ngDialogData.path\" ng-disabled=\"!{{ngDialogData.editable}}\" ng-pattern=\"/^(\\/[a-z0-9A-Z _\\-.%]+)+$/\" required=\"required\" />\r\n </th>\r\n <!--<th>\r\n <button ng-show=\"ngDialogData.status\" class=\"sj_btn_red fl\" ng-click=\"stopVolume(ngDialogData)\">停止</button>\r\n <button ng-hide=\"ngDialogData.status\" class=\"sj_btn_blue fl\" ng-click=\"startVolume(ngDialogData)\">启动</button>\r\n </th> -->\r\n </tr>\r\n <tr ng-repeat=\"row in ngDialogData.brick\">\r\n <th class=\"new_left\">\r\n <span ng-show=\"row.status\" class=\"sj_icon_ok\"></span>\r\n <span ng-hide=\"row.status\" class=\"sj_icon_warning\"></span>\r\n </th>\r\n <th colspan=\"3\">\r\n <input type=\"text\" class=\"sj_txt_box04 mr5\" value=\"服务器 {{$index + 1}} \" ng-disabled=\"true\" />\r\n </th>\r\n <th>\r\n <input type=\"text\" class=\"sj_txt_box05\" ng-model=\"row.ip[0]\" name=\"brickIp0\" ng-disabled=\"!{{row.editable}}\" ng-pattern=\"/^(([0-9]|([1-9]\\d)|(1\\d\\d)|(2([0-4]\\d|5[0-5]))))$/\" required=\"required\" />\r\n </th>\r\n <th>.</th>\r\n
$templateCache.put("plugins/kubernetes/html/appDeployedTemplate.html","<div class=\"ngCellText\" title=\"deployed at: {{row.entity.$creationDate | date:\'yyyy-MMM-dd HH:mm:ss Z\'}}\">\r\n {{row.entity.$creationDate ? (row.entity.$creationDate | relativeTime) : \'\'}}\r\n</div>\r\n");
$templateCache.put("plugins/kubernetes/html/appDetailTemplate.html","<div class=\"service-view-rectangle\" ng-repeat=\"view in item.$serviceViews\" ng-hide=\"view.appName === \'kubernetes\'\">\r\n <div class=\"service-view-header row\">\r\n <div class=\"col-md-4\">\r\n <span class=\"service-view-icon\">\r\n <a ng-href=\"{{view.service | kubernetesPageLink}}\" title=\"View the service detail page\">\r\n <img ng-show=\"item.$iconUrl\" ng-src=\"{{item.$iconUrl}}\">\r\n </a>\r\n </span>\r\n <span class=\"service-view-name\" title=\"{{view.name}}\">\r\n <a ng-href=\"{{view.service | kubernetesPageLink}}\" title=\"View the service detail page\">\r\n {{view.appName}}\r\n </a>\r\n </span>\r\n </div>\r\n <div class=\"col-md-6\">\r\n <span class=\"service-view-address\" title=\"The service address\">\r\n <a ng-show=\"view.service.$connectUrl\" target=\"_blank\" href=\"{{view.service.$connectUrl}}\" title=\"Connect to the service\">\r\n {{view.service.$host}}\r\n </a>\r\n <span ng-hide=\"view.service.$connectUrl\">{{view.service.$host}}</span>\r\n </span>\r\n </div>\r\n <div class=\"col-md-2 align-right\">\r\n <a class=\"service-view-header-delete\" href=\"\" ng-click=\"deleteSingleApp(item)\" title=\"Delete this app\"><i\r\n class=\"fa fa-remove red\"></i></a>\r\n </div>\r\n </div>\r\n\r\n <div class=\"service-view-detail-rectangle\">\r\n <div class=\"service-view-detail-header row\">\r\n <div class=\"col-md-3\">\r\n <div class=\"service-view-detail-deployed\" ng-show=\"view.createdDate\"\r\n title=\"deployed at: {{view.createdDate | date:\'yyyy-MMM-dd HH:mm:ss Z\'}}\">\r\n deployed:\r\n <span class=\"value\">{{view.createdDate | relativeTime}}</span>\r\n </div>\r\n <div class=\"service-view-detail-deployed\" ng-hide=\"view.createdDate\">\r\n not deployed\r\n </div>\r\n </div>\r\n <div class=\"col-md-6\">\r\n <div class=\"service-view-detail-pod-template\" ng-show=\"view.controllerId\">\r\n pod template:\r\n <span class=\"value\" title=\"Go to the replication controller detail page\"><a\r\n ng-href=\"{{view.replicationController | kubernetesPageLink}}\">{{view.controllerId}}</a></span>\r\n </div>\r\n <div class=\"service-view-detail-pod-template\" ng-hide=\"view.controllerId\">\r\n no pod template\r\n </div>\r\n </div>\r\n <div class=\"col-md-3 service-view-detail-pod-counts align-right\">\r\n <span>\r\n pods:\r\n <a href=\"\" ng-show=\"view.replicationController\" class=\"badge badge-success\"\r\n ng-click=\"resizeDialog.open(view.replicationController)\"\r\n title=\"Resize the number of pods\">\r\n {{view.podCount}}\r\n </a>\r\n <span ng-hide=\"view.replicationController\" class=\"badge badge-info\">\r\n {{view.podCount}}\r\n </span>\r\n </span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"service-view-detail-pod-box row\">\r\n <div class=\"col-md-12\">\r\n <div class=\"inline-block\" ng-repeat=\"pod in item.pods track by $index\">\r\n <div ng-show=\"podExpanded(pod)\" class=\"service-view-detail-pod-summary-expand\">\r\n <table>\r\n <tr>\r\n <td class=\"service-view-detail-pod-status\">\r\n <i ng-class=\"pod.statusClass\"></i>\r\n </td>\r\n <td class=\"service-view-detail-pod-connect\" ng-show=\"pod.$jolokiaUrl\"\r\n ng-controller=\"Kubernetes.ConnectController\">\r\n <a class=\"clickable\"\r\n ng-click=\"doConnect(pod)\"\r\n title=\"Open a new window and connect to this container\">\r\n <i class=\"fa fa-sign-in\"></i>\r\n </a>\r\n </td>\r\n <td>\r\n <div class=\"s
$templateCache.put("plugins/kubernetes/html/appIconTemplate.html","<div class=\"ngCellText\" title=\"{{row.entity.$info.description}}\">\r\n <a ng-href=\"row.entity.$appUrl\">\r\n <img ng-show=\"row.entity.$iconUrl\" class=\"app-icon-small\" ng-src=\"{{row.entity.$iconUrl}}\">\r\n </a>\r\n <span class=\"app-name\">\r\n <a ng-click=\"row.entity.$select()\">\r\n {{row.entity.$info.name}}\r\n </a>\r\n </span>\r\n</div>\r\n");
$templateCache.put("plugins/kubernetes/html/appPodCountsAndLinkTemplate.html","<div class=\"ngCellText\" title=\"Number of running pods for this controller\">\r\n <div ng-repeat=\"podCounters in row.entity.$podCounters track by $index\">\r\n <a ng-show=\"podCounters.podsLink\" href=\"{{podCounters.podsLink}}\" title=\"{{podCounters.labelText}}\">\r\n <span ng-show=\"podCounters.valid\" class=\"badge badge-success\">{{podCounters.valid}}</span>\r\n <span ng-show=\"podCounters.waiting\" class=\"badge\">{{podCounters.waiting}}</span>\r\n <span ng-show=\"podCounters.error\" class=\"badge badge-warning\">{{podCounters.error}}</span>\r\n </a>\r\n </div>\r\n</div>\r\n");
$templateCache.put("plugins/kubernetes/html/appReplicationControllerTemplate.html","<div class=\"ngCellText\">\r\n <span ng-repeat=\"controller in row.entity.replicationControllers\">\r\n <a ng-href=\"{{controller | kubernetesPageLink}}\"\r\n title=\"View controller details\">\r\n <span>{{controller.metadata.name || controller.id}}</span>\r\n </a>\r\n &nbsp;\r\n <span class=\"pull-right\">\r\n <a class=\"badge badge-info\" href=\"\" ng-click=\"$emit(\'do-resize\', controller)\"\r\n title=\"Resize the number of replicas of this controller\">\r\n {{controller.spec.replicas || 0}}</a>\r\n </span>\r\n </span>\r\n</div>\r\n");
$templateCache.put("plugins/kubernetes/html/appServicesTemplate.html","<div class=\"ngCellText\">\r\n <span ng-repeat=\"service in row.entity.services\">\r\n <a ng-href=\"{{service | kubernetesPageLink}}\"\r\n title=\"View service details\">\r\n <span>{{service.metadata.name ||service.name || service.id}}</span>\r\n </a>\r\n </span>\r\n</div>\r\n");
$templateCache.put("plugins/kubernetes/html/apps.html","<div ng-controller=\"Kubernetes.Apps\">\r\n\r\n <div class=\"row\">\r\n <div hawtio-breadcrumbs></div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div hawtio-tabs></div>\r\n </div>\r\n\r\n <div ng-hide=\"appSelectorShow\">\r\n <div class=\"row filter-header\">\r\n <div class=\"col-md-12\">\r\n <span ng-show=\"model.apps.length && !id\">\r\n <hawtio-filter ng-model=\"tableConfig.filterOptions.filterText\"\r\n css-class=\"input-xxlarge\"\r\n placeholder=\"Filter apps...\"></hawtio-filter>\r\n </span>\r\n <span ng-hide=\"id\" class=\"pull-right\">\r\n <div class=\"btn-group\">\r\n <a class=\"btn btn-default\" ng-disabled=\"mode == \'list\'\" href=\"\" ng-click=\"mode = \'list\'\">\r\n <i class=\"fa fa-list\"></i></a>\r\n <a class=\"btn btn-default\" ng-disabled=\"mode == \'detail\'\" href=\"\" ng-click=\"mode = \'detail\'\">\r\n <i class=\"fa fa-table\"></i></a>\r\n </div>\r\n </span>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <button ng-show=\"model.apps.length && mode == \'list\'\"\r\n class=\"btn btn-danger pull-right\"\r\n ng-disabled=\"!id && tableConfig.selectedItems.length == 0\"\r\n ng-click=\"deletePrompt(id || tableConfig.selectedItems)\">\r\n <i class=\"fa fa-remove\"></i> Delete\r\n </button>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n<!--\r\n <button ng-show=\"model.showRunButton\"\r\n class=\"btn btn-success pull-right\"\r\n ng-click=\"appSelectorShow = true\"\r\n title=\"Run an application\">\r\n <i class=\"fa fa-play-circle\"></i> Run ...\r\n </button>\r\n-->\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <span ng-include=\"\'runButton.html\'\"></span>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <button ng-show=\"id\"\r\n class=\"btn btn-primary pull-right\"\r\n ng-click=\"id = undefined\"><i class=\"fa fa-list\"></i></button>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div ng-hide=\"model.fetched\">\r\n <div class=\"align-center\">\r\n <i class=\"fa fa-spinner fa-spin\"></i>\r\n </div>\r\n </div>\r\n <div ng-show=\"model.fetched && !id\">\r\n <div ng-hide=\"model.apps.length\" class=\"align-center\">\r\n <p class=\"alert alert-info\">There are no apps currently available.</p>\r\n </div>\r\n <div ng-show=\"model.apps.length\">\r\n <div ng-show=\"mode == \'list\'\">\r\n <table class=\"table table-bordered table-striped\" hawtio-simple-table=\"tableConfig\"></table>\r\n </div>\r\n <div ng-show=\"mode == \'detail\'\">\r\n <div class=\"app-detail\" ng-repeat=\"item in model.apps | filter:tableConfig.filterOptions.filterText | orderBy:\'$name\' track by $index\">\r\n <ng-include src=\"\'plugins/kubernetes/html/appDetailTemplate.html\'\"/>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div ng-show=\"model.fetched && id\">\r\n <div class=\"app-detail\">\r\n <ng-include src=\"\'plugins/kubernetes/html/appDetailTemplate.html\'\"/>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n <div ng-show=\"appSelectorShow\">\r\n <div class=\"col-md-7\">\r\n <div class=\"row\">\r\n <hawtio-filter ng-model=\"appSelector.filterText\"\r\n css-class=\"input-xxlarge\"\r\n placeholder=\"Filter apps...\"></hawtio-filter>\r\n </div>\r\n <div class=\"row\">\r\n <ul>\r\n <li class=\"no-list profile-selector-folder\" ng-repeat=\"folder in model.appFolders\"\r\n ng-show=\"appSelector.
$templateCache.put("plugins/kubernetes/html/breadcrumbs.html","<div ng-show=\"breadcrumbConfig\" ng-init=\"breadcrumbConfig = $parent.breadcrumbConfig\"\r\n ng-controller=\"Developer.NavBarController\">\r\n <ol class=\"breadcrumb\">\r\n <li ng-repeat=\"breadcrumb in breadcrumbConfig\" ng-show=\"isValid(breadcrumb)\"\r\n class=\"{{breadcrumb.active ? \'active\' : \'\'}}\"\r\n title=\"{{breadcrumb.title}}\">\r\n <a ng-show=\"breadcrumb.href && !breadcrumb.active\" href=\"{{breadcrumb.href}}\">{{breadcrumb.label}}</a>\r\n <span ng-hide=\"breadcrumb.href && !breadcrumb.active\">{{breadcrumb.label}}</span>\r\n </ol>\r\n</div>\r\n");
$templateCache.put("plugins/kubernetes/html/build.html","<div ng-controller=\"Kubernetes.BuildController\">\r\n <div class=\"row\">\r\n <div hawtio-breadcrumbs></div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div hawtio-tabs></div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <a class=\"btn btn-default pull-right\"\r\n href=\"{{baseUri}}/kubernetes/builds\"><i class=\"fa fa-list\"></i></a>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <a class=\"btn btn-default pull-right\" ng-show=\"entity.$configLink\"\r\n title=\"View the build configuration\"\r\n href=\"{{entity.$configLink}}\">\r\n Configuration\r\n </a>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <a class=\"btn btn-default pull-right\" ng-show=\"entity.$podLink\"\r\n title=\"View the build pod\"\r\n href=\"{{entity.$podLink}}\">\r\n Pod\r\n </a>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <a class=\"btn btn-primary pull-right\" ng-show=\"entity.$logsLink\"\r\n title=\"View the build logs\"\r\n href=\"{{entity.$logsLink}}\">\r\n View Log\r\n </a>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div ng-hide=\"fetched\">\r\n <div class=\"align-center\">\r\n <i class=\"fa fa-spinner fa-spin\"></i>\r\n </div>\r\n </div>\r\n <div ng-show=\"fetched\">\r\n <div hawtio-object=\"entity\" config=\"config\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n");
$templateCache.put("plugins/kubernetes/html/buildConfig.html","<div ng-controller=\"Kubernetes.BuildConfigController\">\r\n <div class=\"row\">\r\n <div hawtio-breadcrumbs></div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div hawtio-tabs></div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <a class=\"btn btn-default pull-right\" ng-show=\"entity.$editLink\" href=\"{{entity.$editLink}}\">\r\n <i class=\"fa fa-pencil-square-o\"></i> Edit\r\n </a>\r\n <div class=\"pull-right\" ng-repeat=\"view in entity.$fabric8Views | orderBy:\'label\'\">\r\n <a title=\"{{view.description}}\" ng-show=\"view.url\" ng-href=\"{{view.url}}\" class=\"btn btn-default\">\r\n <i class=\"{{view.iconClass}}\" ng-show=\"view.iconClass\"></i>\r\n {{view.label}}\r\n </a>\r\n <span class=\"pull-right\" ng-show=\"view.url\" >&nbsp;</span>\r\n </div>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <button class=\"btn btn-primary pull-right\"\r\n title=\"Trigger this build\"\r\n ng-disabled=\"!entity.$triggerUrl\"\r\n ng-click=\"triggerBuild(entity)\"><i class=\"fa fa-play-circle-o\"></i> Trigger</button>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div ng-hide=\"fetched\">\r\n <div class=\"align-center\">\r\n <i class=\"fa fa-spinner fa-spin\"></i>\r\n </div>\r\n </div>\r\n <div ng-show=\"fetched\">\r\n <div hawtio-object=\"entity\" config=\"config\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n");
$templateCache.put("plugins/kubernetes/html/buildConfigEdit.html","<div ng-init=\"mode=\'edit\'\">\r\n <div ng-controller=\"Kubernetes.BuildConfigEditController\">\r\n <div class=\"row\">\r\n <div hawtio-breadcrumbs></div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div hawtio-tabs></div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div ng-init=\"subTabConfig = tabs\" ng-include=\"\'plugins/kubernetes/html/tabs.html\'\"></div>\r\n <div>\r\n\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <button class=\"btn btn-primary pull-right\"\r\n title=\"Saves changes to this project configuration\"\r\n ng-disabled=\"!entity.metadata.name\"\r\n ng-click=\"save()\">\r\n Save Changes\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div ng-hide=\"fetched\">\r\n <div class=\"align-center\">\r\n <i class=\"fa fa-spinner fa-spin\"></i>\r\n </div>\r\n </div>\r\n <div ng-show=\"fetched\">\r\n\r\n <form name=\"nameForm\" ng-disabled=\"config.mode == 0\" class=\"form-horizontal\">\r\n <fieldset>\r\n <legend ng-show=\"config.label || config.description\" ng-hide=\"config.hideLegend\"\r\n class=\"ng-binding\"></legend>\r\n <div class=\"row\">\r\n <div class=\"clearfix col-md-12\">\r\n <div class=\"form-group\">\r\n <label class=\"control-label\">Name</label>\r\n <input type=\"text\" class=\"form-control\" placeholder=\"project name\" pattern=\"[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\" ng-model=\"entity.metadata.name\" required>\r\n\r\n <p class=\"form-warning bg-danger\" ng-show=\"nameForm.$error.pattern\">\r\n Project name must be a lower case DNS name with letters, numbers and dots or dashes such as `example.com`\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n </fieldset>\r\n </form>\r\n\r\n\r\n <!--\r\n <div hawtio-form-2=\"config\" entity=\"entity\"></div>\r\n -->\r\n <div hawtio-form-2=\"specConfig\" entity=\"spec\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n");
$templateCache.put("plugins/kubernetes/html/buildConfigs.html","<div class=\"row\" ng-controller=\"Kubernetes.BuildConfigsController\">\r\n <script type=\"text/ng-template\" id=\"buildConfigLinkTemplate.html\">\r\n <div class=\"ngCellText\">\r\n <a title=\"View details for this build configuration\"\r\n href=\"{{baseUri}}/kubernetes/buildConfigs/{{row.entity.metadata.name}}\">\r\n<!--\r\n <img class=\"app-icon-small\" ng-src=\"{{row.entity.$iconUrl}}\">\r\n-->\r\n {{row.entity.metadata.name}}</a>\r\n </div>\r\n </script>\r\n <script type=\"text/ng-template\" id=\"buildConfigViewsTemplate.html\">\r\n <div class=\"ngCellText\">\r\n <span ng-repeat=\"view in row.entity.$fabric8Views track by $index\">\r\n <a title=\"{{view.description}}\" ng-show=\"view.url\" ng-href=\"{{view.url}}\" class=\"btn btn-default\">\r\n <i class=\"{{view.iconClass}}\" ng-show=\"view.iconClass\"></i>\r\n {{view.label}}\r\n </a>\r\n </span>\r\n </div>\r\n </script>\r\n <script type=\"text/ng-template\" id=\"buildConfigCodeViewsTemplate.html\">\r\n <div class=\"ngCellText\">\r\n <span ng-repeat=\"view in row.entity.$fabric8CodeViews track by $index\">\r\n <a title=\"{{view.description}}\" ng-show=\"view.url\" ng-href=\"{{view.url}}\" class=\"btn btn-default\">\r\n <i class=\"{{view.iconClass}}\" ng-show=\"view.iconClass\"></i>\r\n {{view.label}}\r\n </a>\r\n </span>\r\n </div>\r\n </script>\r\n <script type=\"text/ng-template\" id=\"buildConfigBuildViewsTemplate.html\">\r\n <div class=\"ngCellText\">\r\n <span ng-repeat=\"view in row.entity.$fabric8BuildViews track by $index\">\r\n <a title=\"{{view.description}}\" ng-show=\"view.url\" ng-href=\"{{view.url}}\" class=\"btn btn-default\">\r\n <i class=\"{{view.iconClass}}\" ng-show=\"view.iconClass\"></i>\r\n {{view.label}}\r\n </a>\r\n </span>\r\n </div>\r\n </script>\r\n <script type=\"text/ng-template\" id=\"buildConfigEnvironmentViewsTemplate.html\">\r\n <div class=\"ngCellText\">\r\n <span ng-repeat=\"view in row.entity.$fabric8EnvironmentViews track by $index\">\r\n <a title=\"{{view.description}}\" ng-show=\"view.url\" ng-href=\"{{view.url}}\" class=\"btn btn-default\">\r\n <i class=\"{{view.iconClass}}\" ng-show=\"view.iconClass\"></i>\r\n {{view.label}}\r\n </a>\r\n </span>\r\n </div>\r\n </script>\r\n <script type=\"text/ng-template\" id=\"buildConfigTeamViewsTemplate.html\">\r\n <div class=\"ngCellText\">\r\n <span ng-repeat=\"view in row.entity.$fabric8TeamViews track by $index\">\r\n <a title=\"{{view.description}}\" ng-show=\"view.url\" ng-href=\"{{view.url}}\" class=\"btn btn-default\">\r\n <i class=\"{{view.iconClass}}\" ng-show=\"view.iconClass\"></i>\r\n {{view.label}}\r\n </a>\r\n </span>\r\n </div>\r\n </script>\r\n <div class=\"row filter-header\">\r\n <div class=\"col-md-12\">\r\n <span>\r\n <hawtio-filter ng-show=\"buildConfigs.length\"\r\n ng-model=\"tableConfig.filterOptions.filterText\"\r\n css-class=\"input-xxlarge\"\r\n placeholder=\"Filter build configurations...\"></hawtio-filter>\r\n </span>\r\n <button ng-show=\"fetched\"\r\n title=\"Delete the selected build configuration\"\r\n class=\"btn btn-danger pull-right\"\r\n ng-disabled=\"tableConfig.selectedItems.length == 0\"\r\n ng-click=\"deletePrompt(tableConfig.selectedItems)\">\r\n <i class=\"fa fa-remove\"></i> Delete\r\n </button>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <a class=\"btn btn-default pull-right\"\r\n title=\"Add a build configuration for an existing project\"\r\n href=\"{{baseUri}}/kubernetes/buildConfigCreate\"><i class=\"fa fa-wrench\"></i> Add Build</a>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n\r\n <a class=\"btn btn-
$templateCache.put("plugins/kubernetes/html/buildLogs.html","<div ng-controller=\"Kubernetes.BuildLogsController\">\r\n <div class=\"row\">\r\n <div hawtio-breadcrumbs></div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div hawtio-tabs></div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <a class=\"btn btn-default pull-right\" ng-show=\"entity.$viewLink\"\r\n title=\"View the build detail\"\r\n href=\"{{entity.$viewLink}}\">\r\n Build\r\n </a>\r\n <a class=\"btn btn-primary pull-right\" ng-show=\"entity.$configLink\"\r\n title=\"View the build configuration\"\r\n href=\"{{entity.$configLink}}\">\r\n Configuration\r\n </a>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div ng-hide=\"fetched\">\r\n <div class=\"align-center\">\r\n <i class=\"fa fa-spinner fa-spin\"></i>\r\n </div>\r\n </div>\r\n <div ng-show=\"fetched\">\r\n <h3>logs for {{entity.$configId}}</h3>\r\n\r\n <p>\r\n <pre>\r\n <code>\r\n {{logsText}}\r\n </code>\r\n </pre>\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n");
$templateCache.put("plugins/kubernetes/html/builds.html","<div class=\"row\" ng-controller=\"Kubernetes.BuildsController\">\r\n <script type=\"text/ng-template\" id=\"buildLinkTemplate.html\">\r\n <div class=\"ngCellText\">\r\n <a title=\"View details for this build: {{row.entity.$name}}\"\r\n href=\"{{row.entity.$viewLink}}\">\r\n <!--\r\n <img class=\"app-icon-small\" ng-src=\"{{row.entity.$iconUrl}}\">\r\n -->\r\n {{row.entity.$shortName}}\r\n </a>\r\n </div>\r\n </script>\r\n <script type=\"text/ng-template\" id=\"buildPodTemplate.html\">\r\n <div class=\"ngCellText\">\r\n <a title=\"View the pod for this build: {{row.entity.podName}}\" ng-show=\"row.entity.$podLink\"\r\n href=\"{{row.entity.$podLink}}\">\r\n {{row.entity.$podShortName}}</a>\r\n </div>\r\n </script>\r\n <script type=\"text/ng-template\" id=\"buildLogsTemplate.html\">\r\n <div class=\"ngCellText\">\r\n <a title=\"View the log for this build\" ng-show=\"row.entity.$logsLink\"\r\n href=\"{{row.entity.$logsLink}}\">\r\n <i class=\"fa fa-file-text-o\"></i> Logs\r\n </a>\r\n </div>\r\n </script>\r\n <script type=\"text/ng-template\" id=\"buildRepositoryTemplate.html\">\r\n <div class=\"ngCellText\">\r\n <a ng-show=\"row.entity.spec.source.git.uri\" target=\"gitRepository\"\r\n title=\"View the git based source repository\"\r\n href=\"{{row.entity.spec.source.git.uri}}\">\r\n {{row.entity.spec.source.git.uri}}\r\n </a>\r\n <span ng-hide=\"row.entity.spec.source.git.uri\">\r\n {{row.entity.spec.source.git.uri}}\r\n </span>\r\n </div>\r\n </script>\r\n <script type=\"text/ng-template\" id=\"buildStatusTemplate.html\">\r\n <div class=\"ngCellText\" ng-switch=\"row.entity.status.phase\">\r\n <span ng-switch-when=\"New\" class=\"text-primary\">\r\n <i class=\"fa fa-spin fa-spinner\"></i> New\r\n </span>\r\n <span ng-switch-when=\"Pending\" class=\"text-primary\">\r\n <i class=\"fa fa-spin fa-spinner\"></i> Pending\r\n </span>\r\n <span ng-switch-when=\"Running\" class=\"text-primary\">\r\n <i class=\"fa fa-spin fa-spinner\"></i> Running\r\n </span>\r\n <span ng-switch-when=\"Complete\" class=\"text-success\">\r\n <i class=\"fa fa-check-circle\"></i> Complete\r\n </span>\r\n <span ng-switch-when=\"Failed\" class=\"text-danger\">\r\n <i class=\"fa fa-exclamation-circle\"></i> Failed\r\n </span>\r\n <span ng-switch-default class=\"text-warning\">\r\n <i class=\"fa fa-exclamation-triangle\"></i> {{row.entity.status}}\r\n </span>\r\n </div>\r\n </script>\r\n <script type=\"text/ng-template\" id=\"buildTimeTemplate.html\">\r\n <div class=\"ngCellText\" title=\"built at: {{row.entity.$creationDate | date : \'h:mm:ss a, EEE MMM yyyy\'}}\">\r\n {{row.entity.$creationDate.relative()}}\r\n </div>\r\n </script>\r\n\r\n\r\n <div class=\"row\">\r\n <div hawtio-breadcrumbs></div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div hawtio-tabs></div>\r\n </div>\r\n\r\n <div class=\"row filter-header\">\r\n <div class=\"col-md-12\" >\r\n <span ng-show=\"!id\">\r\n <hawtio-filter ng-show=\"model.builds.length\"\r\n ng-model=\"tableConfig.filterOptions.filterText\"\r\n css-class=\"input-xxlarge\"\r\n placeholder=\"Filter builds...\"></hawtio-filter>\r\n </span>\r\n <div class=\"pull-right\" ng-repeat=\"view in buildConfig.$fabric8BuildViews | orderBy:\'label\'\">\r\n <a title=\"{{view.description}}\" ng-show=\"view.url\" ng-href=\"{{view.url}}\" class=\"btn btn-default\">\r\n <i class=\"{{view.iconClass}}\" ng-show=\"view.iconClass\"></i>\r\n {{view.label}}\r\n </a>\r\n <span class=\"pull-right\" ng-show=\"view.url\" >&nbsp;</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div ng
$templateCache.put("plugins/kubernetes/html/deploymentConfig.html","<div ng-controller=\"Kubernetes.DeploymentConfigController\">\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <a class=\"btn btn-default pull-right\"\r\n href=\"{{baseUri}}/kubernetes/deploymentConfigs\"><i class=\"fa fa-list\"></i></a>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div ng-hide=\"fetched\">\r\n <div class=\"align-center\">\r\n <i class=\"fa fa-spinner fa-spin\"></i>\r\n </div>\r\n </div>\r\n <div ng-show=\"fetched\">\r\n <div hawtio-object=\"entity\" config=\"config\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n");
$templateCache.put("plugins/kubernetes/html/deploymentConfigs.html","<div class=\"row\" ng-controller=\"Kubernetes.DeploymentConfigsController\">\r\n <script type=\"text/ng-template\" id=\"deploymentConfigLinkTemplate.html\">\r\n <div class=\"ngCellText\">\r\n <a title=\"View details for this build configuration\"\r\n href=\"{{baseUri}}/kubernetes/deploymentConfigs/{{row.entity.metadata.name}}\">\r\n<!--\r\n <img class=\"app-icon-small\" ng-src=\"{{row.entity.$iconUrl}}\">\r\n-->\r\n {{row.entity.metadata.name}}</a>\r\n </div>\r\n </script>\r\n <script type=\"text/ng-template\" id=\"deploymentConfigLabelTemplate.html\">\r\n <div class=\"ngCellText\">\r\n <span ng-repeat=\"(key, label) in row.entity.template.controllerTemplate.template.metadata.labels track by $index\"\r\n class=\"pod-label badge\"\r\n ng-class=\"labelClass(key)\"\r\n ng-click=\"clickTag(entity, key, label)\"\r\n title=\"{{key}}\">{{label}}</span>\r\n </div>\r\n </script>\r\n <div class=\"row filter-header\">\r\n <div class=\"col-md-12\">\r\n <span>\r\n <hawtio-filter ng-show=\"deploymentConfigs.length\"\r\n ng-model=\"tableConfig.filterOptions.filterText\"\r\n css-class=\"input-xxlarge\"\r\n placeholder=\"Filter deployment configurations...\"></hawtio-filter>\r\n </span>\r\n <button ng-show=\"fetched && deploymentConfigs.length\"\r\n title=\"Delete the selected build configuration\"\r\n class=\"btn btn-danger pull-right\"\r\n ng-disabled=\"tableConfig.selectedItems.length == 0\"\r\n ng-click=\"deletePrompt(tableConfig.selectedItems)\">\r\n <i class=\"fa fa-remove\"></i> Delete\r\n </button>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <a class=\"btn btn-default pull-right\"\r\n title=\"Create a new build configuration\"\r\n href=\"{{baseUri}}/kubernetes/buildConfigCreate\"><i class=\"fa fa-plus\"></i> Create</a>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <button class=\"btn btn-primary pull-right\"\r\n ng-show=\"fetched && deploymentConfigs.length\"\r\n title=\"Trigger the given build\"\r\n ng-disabled=\"tableConfig.selectedItems.length != 1 || !tableConfig.selectedItems[0].$triggerUrl\"\r\n ng-click=\"triggerBuild(tableConfig.selectedItems[0])\"><i class=\"fa fa-play-circle-o\"></i> Trigger</button>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div ng-hide=\"fetched\">\r\n <div class=\"align-center\">\r\n <i class=\"fa fa-spinner fa-spin\"></i>\r\n </div>\r\n </div>\r\n <div ng-show=\"fetched\">\r\n <div ng-hide=\"deploymentConfigs.length\" class=\"align-center\">\r\n <p class=\"alert alert-info\">There are no deployment configurations available.</p>\r\n <a class=\"btn btn-primary\" href=\"{{baseUri}}/kubernetes/deploymentConfigCreate\"><i class=\"fa fa-plus\"></i> Create Deployment Configuration</a>\r\n </div>\r\n <div ng-show=\"deploymentConfigs.length\">\r\n <table class=\"table table-bordered table-striped\" ui-if=\"kubernetes.selectedNamespace\"\r\n hawtio-simple-table=\"tableConfig\"></table>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n");
$templateCache.put("plugins/kubernetes/html/events.html","<div ng-controller=\"Kubernetes.EventsController\">\r\n\r\n <div class=\"row\">\r\n <div hawtio-breadcrumbs></div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div hawtio-tabs></div>\r\n </div>\r\n\r\n <div class=\"row filter-header\">\r\n <div class=\"col-md-12\" ng-show=\"model.events.length\">\r\n <span ng-show=\"!id\">\r\n <hawtio-filter ng-model=\"tableConfig.filterOptions.filterText\"\r\n css-class=\"input-xxlarge\"\r\n placeholder=\"筛选日志信息...\"></hawtio-filter>\r\n </span>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <button ng-show=\"id\"\r\n class=\"btn btn-primary pull-right\"\r\n ng-click=\"id = undefined\"><i class=\"fa fa-list\"></i></button>\r\n <span ng-include=\"\'runButton.html\'\"></span>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div ng-hide=\"model.fetched\">\r\n <div class=\"align-center\">\r\n <i class=\"fa fa-spinner fa-spin\"></i>\r\n </div>\r\n </div>\r\n <div ng-show=\"model.fetched\">\r\n <div ng-hide=\"model.events.length\" class=\"align-center\">\r\n <p class=\"alert alert-info\">There are no events currently available.</p>\r\n </div>\r\n <div ng-show=\"model.events.length\">\r\n <div ng-show=\"mode == \'list\'\">\r\n <table class=\"table table-bordered table-striped\" ui-if=\"kubernetes.selectedNamespace\"\r\n hawtio-simple-table=\"tableConfig\"></table>\r\n </div>\r\n\r\n <div ng-hide=\"mode == \'list\'\">\r\n <div class=\"column-box\"\r\n ng-repeat=\"service in model.serviceApps | filter:filterTemplates | orderBy:\'metadata.name\' track by $index\">\r\n <div class=\"row\">\r\n <div class=\"col-md-2\">\r\n <a href=\"{{service.$serviceUrl}}\"\r\n target=\"_blank\"\r\n title=\"Click to open this app\">\r\n <img style=\"width: 64px; height: 64px;\" ng-src=\"{{service.$iconUrl}}\">\r\n </a>\r\n </div>\r\n <div class=\"col-md-9\">\r\n <a href=\"{{service.$serviceUrl}}\"\r\n target=\"_blank\"\r\n title=\"Click to open this app\">\r\n <h3 ng-bind=\"service.metadata.name\"></h3>\r\n </a>\r\n </div>\r\n<!--\r\n <div class=\"col-md-1\">\r\n <a href=\"\" ng-click=\"deleteService(service)\"><i class=\"fa fa-remove red\"></i></a>\r\n </div>\r\n-->\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n");
$templateCache.put("plugins/kubernetes/html/host.html","<div ng-controller=\"Kubernetes.HostController\">\r\n <div class=\"row\">\r\n <div hawtio-breadcrumbs></div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div hawtio-tabs></div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <a class=\"btn btn-default pull-right\"\r\n href=\"{{baseUri}}/kubernetes/hosts\"><i class=\"fa fa-list\"></i></a>\r\n <a class=\"btn btn-default pull-right\"\r\n ng-click=\"flipRaw()\"\r\n title=\"{{rawMode ? \'Raw mode\' : \'Form mode\'}}\">{{rawMode ? \'Form\' : \'Raw\'}}</a>\r\n <a class=\"btn btn-default pull-right\" ng-show=\"rawMode\" ng-click=\"readOnly = !readOnly\" ng-class=\"!readOnly ? \'btn-primary\' : \'\'\">Edit</a>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n\r\n <a class=\"btn btn-success pull-right\" ng-show=\"dirty\" ng-click=\"save(rawModel)\">Save</a>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <a class=\"btn btn-primary pull-right\"\r\n title=\"View all the pods on this host\"\r\n href=\"{{baseUri}}/kubernetes/pods/?q=host={{item.id}}\">\r\n Pods\r\n </a>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div ng-hide=\"model.fetched\">\r\n <div class=\"align-center\">\r\n <i class=\"fa fa-spinner fa-spin\"></i>\r\n </div>\r\n </div>\r\n <div ng-show=\"model.fetched && !rawMode\">\r\n <div hawtio-object=\"item\" config=\"itemConfig\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"span12\">\r\n <div ng-hide=\"model.fetched\">\r\n <div class=\"align-center\">\r\n <i class=\"fa fa-spinner fa-spin\"></i>\r\n </div>\r\n </div>\r\n <div ng-show=\"model.fetched && rawMode\">\r\n <div class=\"row-fluid wiki-fixed form-horizontal\">\r\n <div class=\"control-group editor-autoresize\">\r\n <div hawtio-editor=\"rawModel\" mode=\"mode\" read-only=\"readOnly\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n</div>\r\n");
$templateCache.put("plugins/kubernetes/html/hosts.html","<div class=\"row\" ng-controller=\"Kubernetes.HostsController\">\r\n <script type=\"text/ng-template\" id=\"hostLinkTemplate.html\">\r\n <div class=\"ngCellText\">\r\n </div>\r\n </script>\r\n\r\n <div class=\"row\">\r\n <div hawtio-breadcrumbs></div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div hawtio-tabs></div>\r\n </div>\r\n\r\n <div class=\"row filter-header\">\r\n <div class=\"col-md-12\">\r\n <span ng-show=\"!id\">\r\n <hawtio-filter ng-show=\"model.hosts.length\"\r\n ng-model=\"tableConfig.filterOptions.filterText\"\r\n css-class=\"input-xxlarge\"\r\n placeholder=\"Filter hosts...\"></hawtio-filter>\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div ng-hide=\"model.fetched\">\r\n <div class=\"align-center\">\r\n <i class=\"fa fa-spinner fa-spin\"></i>\r\n </div>\r\n </div>\r\n <div ng-show=\"model.fetched\">\r\n <div ng-hide=\"model.hosts.length\" class=\"align-center\">\r\n <p class=\"alert alert-info\">There are no hosts currently running.</p>\r\n </div>\r\n <div ng-show=\"model.hosts.length\">\r\n <table class=\"table table-bordered table-striped\" ui-if=\"kubernetes.selectedNamespace\"\r\n hawtio-simple-table=\"tableConfig\"></table>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n");
$templateCache.put("plugins/kubernetes/html/imageRepositories.html","<div class=\"row\" ng-controller=\"Kubernetes.ImageRepositoriesController\">\r\n <script type=\"text/ng-template\" id=\"imageRegistryLabelTemplate.html\">\r\n <div class=\"ngCellText\">\r\n <span ng-repeat=\"(key, label) in row.entity.tags track by $index\"\r\n class=\"pod-label badge\"\r\n ng-class=\"labelClass(key)\"\r\n ng-click=\"clickTag(entity, key, label)\"\r\n title=\"{{key}}\">{{label}}</span>\r\n </div>\r\n </script>\r\n <div class=\"row filter-header\">\r\n <div class=\"col-md-12\">\r\n <span>\r\n <hawtio-filter ng-show=\"imageRepositories.length\"\r\n ng-model=\"tableConfig.filterOptions.filterText\"\r\n css-class=\"input-xxlarge\"\r\n placeholder=\"Filter image repositories...\"></hawtio-filter>\r\n </span>\r\n <button ng-show=\"fetched && imageRepositories.length\"\r\n title=\"Delete the selected build configuration\"\r\n class=\"btn btn-danger pull-right\"\r\n ng-disabled=\"tableConfig.selectedItems.length == 0\"\r\n ng-click=\"deletePrompt(tableConfig.selectedItems)\">\r\n <i class=\"fa fa-remove\"></i> Delete\r\n </button>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <a class=\"btn btn-default pull-right\"\r\n title=\"Create a new image repository\"\r\n href=\"{{baseUri}}/kubernetes/imageRepositoryCreate\"><i class=\"fa fa-plus\"></i> Create</a>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div ng-hide=\"fetched\">\r\n <div class=\"align-center\">\r\n <i class=\"fa fa-spinner fa-spin\"></i>\r\n </div>\r\n </div>\r\n <div ng-show=\"fetched\">\r\n <div ng-hide=\"imageRepositories.length\" class=\"align-center\">\r\n <p class=\"alert alert-info\">There are no image repositories available.</p>\r\n <a class=\"btn btn-primary\" href=\"{{baseUri}}/kubernetes/imageRepositoryCreate\"><i class=\"fa fa-plus\"></i> Create Image Repository</a>\r\n </div>\r\n <div ng-show=\"imageRepositories.length\">\r\n <table class=\"table table-bordered table-striped\" ui-if=\"kubernetes.selectedNamespace\"\r\n hawtio-simple-table=\"tableConfig\"></table>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n");
$templateCache.put("plugins/kubernetes/html/importProject.html","<div ng-init=\"mode=\'create\'\">\r\n <div ng-controller=\"Kubernetes.BuildConfigEditController\">\r\n <div class=\"row\">\r\n <div hawtio-breadcrumbs></div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div hawtio-tabs></div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <button class=\"btn btn-primary pull-right\"\r\n title=\"Saves changes to this project configuration\"\r\n ng-disabled=\"!entity.metadata.name\"\r\n ng-click=\"save()\">\r\n Save Changes\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div ng-hide=\"fetched\">\r\n <div class=\"align-center\">\r\n <i class=\"fa fa-spinner fa-spin\"></i>\r\n </div>\r\n </div>\r\n <div ng-show=\"fetched\">\r\n\r\n <p class=\"hero-unit\">\r\n Create a project by entering or copy/pasting the Git URL for a repository, and give the project a name. By default the name will be based on the repository name.\r\n </p>\r\n\r\n <div hawtio-form-2=\"specConfig\" entity=\"spec\"></div>\r\n\r\n <form name=\"nameForm\" ng-disabled=\"config.mode == 0\" class=\"form-horizontal\">\r\n <fieldset>\r\n <div class=\"row\">\r\n <div class=\"clearfix col-md-12\">\r\n <div class=\"form-group\">\r\n <label class=\"control-label\">Name</label>\r\n <input type=\"text\" class=\"form-control\" pattern=\"[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\" ng-model=\"entity.metadata.name\" required>\r\n\r\n <p class=\"form-warning bg-danger\" ng-show=\"nameForm.$error.pattern\">\r\n Project name must be a lower case DNS name with letters, numbers and dots or dashes such as `example.com`\r\n </p>\r\n <p class=\"help-block\">Name of this project</p>\r\n </div>\r\n </div>\r\n </div>\r\n </fieldset>\r\n </form>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n");
$templateCache.put("plugins/kubernetes/html/kubernetesJsonDirective.html","<div>\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div class=\"fabric-page-header row\">\r\n\r\n <div class=\"pull-left\" ng-show=\"iconURL\">\r\n <div class=\"app-logo\">\r\n <img ng-src=\"{{iconURL}}\">&nbsp;\r\n </div>\r\n </div>\r\n <div class=\"pull-left\">\r\n <h2 class=\"list-inline\"><span class=\"contained c-wide3\">&nbsp;{{displayName || appTitle}}</span></h2>\r\n </div>\r\n <div class=\"pull-right\">\r\n <button class=\"btn btn-success pull-right\"\r\n title=\"Run this application\"\r\n ng-disabled=\"!config || config.error\"\r\n ng-click=\"apply()\">\r\n <i class=\"fa fa-play-circle\"></i> Run\r\n </button>\r\n </div>\r\n <div class=\"pull-left col-md-10 profile-summary-wide\">\r\n <div\r\n ng-show=\"summaryHtml\"\r\n ng-bind-html-unsafe=\"summaryHtml\"></div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n</div>\r\n");
$templateCache.put("plugins/kubernetes/html/layoutKubernetes.html","<script type=\"text/ng-template\" id=\"runButton.html\">\r\n <button ng-show=\"model.showRunButton\" class=\"btn btn-success pull-right\" ng-click=\"viewTemplates()\" title=\"Run an application from a template\">\r\n <i class=\"fa fa-play-circle\"></i> Run ...\r\n </button>\r\n</script>\r\n<script type=\"text/ng-template\" id=\"idTemplate.html\">\r\n <div class=\"ngCellText nowrap\">\r\n <a href=\"\" title=\"View details for {{row.entity.metadata.name || row.entity.name}}\">\r\n <!--<img class=\"app-icon-small\" ng-src=\"{{row.entity.$iconUrl}}\" ng-show=\"row.entity.$iconUrl\">-->\r\n <strong>{{row.entity.$oracleName || row.entity.name}}</strong></a>\r\n </div>\r\n</script>\r\n<script type=\"text/ng-template\" id=\"selectorTemplate.html\">\r\n <div class=\"ngCellText\">\r\n <span ng-repeat=\"(name, value) in row.entity.spec.selector track by $index\">\r\n <strong>{{name}}</strong>: {{value}}\r\n </span>\r\n </div>\r\n</script>\r\n<script type=\"text/ng-template\" id=\"podCountsAndLinkTemplate.html\">\r\n <div class=\"ngCellText\" ng-init=\"entity=row.entity\" ng-controller=\"Kubernetes.Status\">\r\n <a ng-show=\"row.entity.$podCounters.podsLink\" title=\"pods status\">\r\n <span ng-show=\"row.entity.$podCounters.ready && (row.entity.$oracleStatus===2)\" class=\"badge badge-success\"> 启动</span>\r\n <span ng-show=\"row.entity.$podCounters.ready && (row.entity.$oracleStatus===0)\" class=\"badge badge-info\"> 等待</span>\r\n <span ng-show=\"row.entity.$podCounters.ready && (row.entity.$oracleStatus===1)\" class=\"badge badge-important \"> 失败</span>\r\n <span ng-show=\"row.entity.$podCounters.valid || row.entity.$podCounters.waiting\" class=\"badge badge-info\"> 等待</span>\r\n <span ng-show=\"!(row.entity.$podCounters.waiting || row.entity.$podCounters.ready || row.entity.$podCounters.valid || row.entity.$podCounters.error)\" class=\"badge\"> 停止</span>\r\n <span ng-show=\"row.entity.$podCounters.error\" class=\"badge badge-important\"> 失败</span>\r\n </a>\r\n </div>\r\n</script>\r\n<script type=\"text/ng-template\" id=\"dataSummaryTemplate.html\">\r\n <div class=\"ngCellText\" ng-init=\"entity=row.entity\">\r\n <a ng-show=\"row.entity.$podCounters.podsLink\" title=\"pods status\">\r\n <span ng-show=\"row.entity.$extractStatus === 0\" class=\"badge badge-info\"> 待汇总</span>\r\n <div ng-show=\"row.entity.$extractStatus === 1\">\r\n <span class=\"badge badge-success\" > 汇总中</span>\r\n <span ng-include=\"\'oracleLogTemplate.html\'\"></span>\r\n </div>\r\n <div ng-show=\"row.entity.$extractStatus === 2\">\r\n <span class=\"badge\" > 已完成</span>\r\n <span ng-include=\"\'oracleLogTemplate.html\'\"></span>\r\n </div> \r\n </a>\r\n </div>\r\n</script>\r\n<script type=\"text/ng-template\" id=\"labelTemplate.html\">\r\n <div class=\"ngCellText\" ng-init=\"entity=row.entity\" ng-controller=\"Kubernetes.Labels\">\r\n <p ng-show=\"data\"><strong>Labels</strong></p>\r\n <span ng-repeat=\"label in labels track by $index\" class=\"pod-label badge\" ng-class=\"labelClass(label.key)\" ng-click=\"handleClick(entity, label.key, label)\" title=\"{{label.key}}\"><span class=\"glyphicon glyphicon-tag\"/> {{label.title}}</span>\r\n </div>\r\n</script>\r\n<script type=\"text/ng-template\" id=\"eventSourceTemplate.html\">\r\n <div class=\"ngCellText\" ng-init=\"labels=row.entity.source\">\r\n <p ng-show=\"data\"><strong>Labels</strong></p>\r\n <span ng-repeat=\"(key, value) in labels track by $index\" class=\"pod-label badge\" class=\"background-light-grey mouse-pointer\" title=\"{{key}}\" ng-click=\"$emit(\'labelFilterUpdate\', key + \'=\' + value)\">{{value}}</span>\r\n </div>\r\n</script>\r\n<script type=\"text/n
$templateCache.put("plugins/kubernetes/html/logShell.html","<div class=\"terminal-window pod-log-window\" pod-log-window ng-mousedown=\"raise()\">\r\n <div class=\"resize-dot\" ng-mousedown=\"startResize($event)\" ng-hide=\"docked\"></div>\r\n <div class=\"centered scroll-indicator\" ng-hide=\"atBottom\" ng-click=\"atBottom = true\">\r\n <span class=\"fa fa-caret-down\"></span>\r\n </div>\r\n <div class=\"terminal-title\" ng-mousedown=\"mouseDown($event)\" ng-mouseup=\"mouseUp($event)\" ng-mousemove=\"mouseMove($event)\">\r\n <h5 class=\"top-bottom-middle\">{{containerName}}的汇总日志</h5>\r\n <i class=\"fa fa-remove pull-right clickable\" title=\"Close and exit this log\" ng-click=\"close()\"></i>\r\n <i class=\"fa fa-square-o pull-right clickable\" title=\"Maximize this log\" ng-click=\"maximize($event)\"></i>\r\n <i class=\"fa fa-sort-desc pull-right clickable\" ng-hide=\"maximized()\" title=\"Minimize this log\" ng-click=\"minimize($event)\"></i>\r\n </div>\r\n <!--<div class=\"terminal-body\" scroll-glue ng-model=\"atBottom\" style=\"overflow-y:hidden\"> -->\r\n <textarea style=\"height:100%; width:100%\" disabled=\"disabled\">{{logs}}</textarea>\r\n <!--</div>-->\r\n</div>\r\n");
$templateCache.put("plugins/kubernetes/html/overview.html","<div ng-controller=\"Kubernetes.OverviewController\">\r\n <script type=\"text/ng-template\" id=\"serviceBoxTemplate.html\">\r\n <div>\r\n <div class=\"align-left node-body\">{{entity.$portsText}}</div>\r\n <div class=\"align-right node-header\" title=\"{{entity.metadata.name}}\" ng-bind=\"entity.metadata.name\"></div>\r\n </div>\r\n </script>\r\n <script type=\"text/ng-template\" id=\"serviceTemplate.html\">\r\n <div class=\"kubernetes-overview-row\">\r\n <div class=\"kubernetes-overview-cell\">\r\n <div id=\"{{service._key}}\"\r\n namespace=\"{{service.metadata.namespace}}\"\r\n connect-to=\"{{service.connectTo}}\"\r\n data-type=\"service\"\r\n class=\"jsplumb-node kubernetes-node kubernetes-service-node\"\r\n ng-controller=\"Kubernetes.OverviewBoxController\"\r\n ng-init=\"entity=getEntity(\'service\', \'{{service._key}}\')\"\r\n ng-mouseenter=\"mouseEnter($event)\"\r\n ng-mouseleave=\"mouseLeave($event)\"\r\n ng-click=\"viewDetails(entity, \'services\')\">\r\n <div ng-init=\"entity=entity\" ng-include=\"\'serviceBoxTemplate.html\'\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n </script>\r\n <script type=\"text/ng-template\" id=\"overviewHostTemplate.html\">\r\n <div class=\"kubernetes-overview-row\">\r\n <div class=\"kubernetes-overview-cell\">\r\n <div id=\"{{host.elementId}}\"\r\n data-type=\"host\"\r\n class=\"kubernetes-host-container host\">\r\n <h5><img ng-src=\"{{host.$iconUrl}}\" style=\"width: 32px; height: 32px;\">\r\n <a ng-href=\"{{baseUri}}/kubernetes/hosts/{{host.id}}\">{{host.id}}</a>\r\n </h5>\r\n <div class=\"pod-container\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n </script>\r\n <script type=\"text/ng-template\" id=\"podTemplate.html\">\r\n <div id=\"{{pod._key}}\"\r\n data-type=\"pod\"\r\n title=\"Pod ID: {{pod.metadata.name}}\"\r\n class=\"jsplumb-node kubernetes-node kubernetes-pod-node\"\r\n ng-mouseenter=\"mouseEnter($event)\"\r\n ng-mouseleave=\"mouseLeave($event)\"\r\n ng-controller=\"Kubernetes.OverviewBoxController\"\r\n ng-init=\"entity=getEntity(\'pod\', \'{{pod._key}}\')\"\r\n ng-click=\"viewDetails(entity, \'pods\')\">\r\n <div class=\"css-table\">\r\n <div class=\"css-table-row\">\r\n <div class=\"pod-status-cell css-table-cell\">\r\n <span ng-init=\"row={ entity: entity }\" ng-include=\"\'statusTemplate.html\'\"></span>\r\n </div>\r\n <div class=\"pod-label-cell css-table-cell\">\r\n <span ng-init=\"row={ entity: entity }\" ng-include=\"\'labelTemplate.html\'\"></span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </script>\r\n <script type=\"text/ng-template\" id=\"replicationControllerTemplate.html\">\r\n <div class=\"kubernetes-overview-row\">\r\n <div class=\"kubernetes-overview-cell\">\r\n <div\r\n id=\"{{replicationController._key}}\"\r\n title=\"{{replicationController.id}}\"\r\n data-type=\"replicationController\"\r\n data-placement=\"top\"\r\n connect-to=\"{{replicationController.connectTo}}\"\r\n ng-mouseenter=\"mouseEnter($event)\"\r\n ng-mouseleave=\"mouseLeave($event)\"\r\n class=\"jsplumb-node kubernetes-replicationController-node kubernetes-node\"\r\n ng-controller=\"Kubernetes.OverviewBoxController\"\r\n ng-init=\"entity=getEntity(\'replicationController\', \'{{replicationController._key}}\')\"\r\n ng-click=\"viewDetails(entity, \'replicationControllers\')\">\r\n <img class=\"app-icon-medium\" ng-src=\"{{replicationController.$iconUrl}}\">\r\n </div>\r\n </div>\r\n </div>\r\n </script>\r\n <script type=\"text/ng-template\" id=\"o
$templateCache.put("plugins/kubernetes/html/pendingPipelines.html","<div class=\"pipeline-panel\">\r\n <div ng-hide=\"model.fetched\">\r\n <div class=\"align-center\">\r\n <div class=\"spinner spinner-lg\"></div>\r\n </div>\r\n </div>\r\n <div ng-show=\"model.fetched\">\r\n <div ng-hide=\"model.job.builds.length\" class=\"align-center\">\r\n <div>\r\n <h2>No Pipeline Available</h2>\r\n <p>Pipeline is a kind of build which uses Jenkins Workflow internally which has multiple Stages. You will see the active pipelines here after you add a build to this project</p>\r\n </div>\r\n </div>\r\n <div ng-show=\"model.job.builds.length\">\r\n <div ng-repeat=\"build in model.job.builds | filter:model.filterText track by $index\">\r\n <div pipeline-view></div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n");
$templateCache.put("plugins/kubernetes/html/pipelines.html","<div class=\"row\" ng-controller=\"Kubernetes.PipelinesController\">\r\n <script type=\"text/ng-template\" id=\"hostLinkTemplate.html\">\r\n <div class=\"ngCellText\">\r\n </div>\r\n </script>\r\n <div class=\"row filter-header\">\r\n <div class=\"col-md-12\">\r\n <span>\r\n <hawtio-filter ng-show=\"pipelines.length\"\r\n ng-model=\"filterText\"\r\n css-class=\"input-xxlarge\"\r\n placeholder=\"Filter builds...\"></hawtio-filter>\r\n </span>\r\n <a class=\"btn btn-default pull-right\"\r\n title=\"Create a new project\"\r\n ng-show=\"forgeEnabled\"\r\n href=\"/workspaces/{{namespace}}/forge/createProject\"><i class=\"fa fa-plus\"></i> Create Project</a>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div ng-hide=\"fetched\">\r\n <div class=\"align-center\">\r\n <i class=\"fa fa-spinner fa-spin\"></i>\r\n </div>\r\n </div>\r\n <div ng-show=\"fetched\">\r\n <div ng-hide=\"pipelines.length\" class=\"align-center\">\r\n <p class=\"alert alert-info\">There are no build pipelines available.</p>\r\n <a class=\"btn btn-primary\" href=\"{{baseUri}}/kubernetes/buildConfig\">Create Build Configuration</a>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div ng-show=\"fetched && pipelines.length\">\r\n <div ng-repeat=\"pipeline in pipelines | filter:filterText\">\r\n <div class=\"row\">\r\n\r\n <div class=\"pipeline-row\">\r\n <div ng-repeat=\"step in pipeline.triggersSteps\">\r\n <div ng-switch=\"step.buildConfig.kind\">\r\n <div ng-switch-default=\"\">\r\n <div class=\"col-md-1\" ng-hide=\"$first\">\r\n <div class=\"pipeline-arrow\">\r\n <i class=\"fa fa-long-arrow-right\"></i>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-md-2 pipeline-build\" title=\"Build configuration\">\r\n <span class=\"pipeline-build-details\">\r\n <a title=\"View details for this build configuration\"\r\n href=\"{{baseUri}}/kubernetes/buildConfigs/{{step.buildConfig.metadata.name}}\">\r\n <i class=\"fa fa-cog\"></i>\r\n {{step.buildConfig.metadata.name}}\r\n </a>\r\n </span>\r\n &nbsp;&nbsp;&nbsp;\r\n <span class=\"pipeline-last-build\" ng-show=\"step.buildConfig.$lastBuild\">\r\n <a href=\"{{step.buildConfig.$lastBuild.$viewLink}}\" title=\"view this build\">\r\n <i class=\"fa fa-info\"></i>\r\n build\r\n </a>\r\n </span>\r\n\r\n <div class=\"ngCellText\" class=\"pipeline-last-build-time\"\r\n title=\"last build was at: {{step.buildConfig.$lastBuild.$creationDate | date : \'h:mm:ss a, EEE MMM yyyy\'}}\">\r\n <div ng-switch=\"step.buildConfig.$lastBuild.status\">\r\n <span ng-switch-when=\"New\" class=\"text-primary\">\r\n <i class=\"fa fa-spin fa-spinner\"></i> new: {{step.buildConfig.$lastBuild.$creationDate.relative()}}\r\n </span>\r\n <span ng-switch-when=\"Pending\" class=\"text-primary\">\r\n <i class=\"fa fa-spin fa-spinner\"></i> pending: {{step.buildConfig.$lastBuild.$creationDate.relative()}}\r\n </span>\r\n <span ng-switch-when=\"Running\" class=\"text-primary\">\r\n <i class=\"fa fa-spin fa-spinner\"></i> running {{step.buildConfig.$lastBuild.$creationDate.relative()}}\r\n </span>\r\n <span ng-switch-when=\"Complete\" class=\"text-success\">\r\n
$templateCache.put("plugins/kubernetes/html/pod.html","<div ng-controller=\"Kubernetes.PodController\">\r\n\r\n <div class=\"row\">\r\n <div hawtio-breadcrumbs></div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div hawtio-tabs></div>\r\n </div>\r\n\r\n <div class=\"row row-header\">\r\n <div class=\"col-md-12\">\r\n <span ng-show=\"model.fetched && !rawMode\" class=\"icon-heading\">\r\n <i ng-show=\"item.$statusCss\" class=\"icon-selected-app fa {{item.$statusCss}}\"></i>\r\n\r\n <img ng-show=\"item.$iconUrl\" class=\"icon-selected-app\" ng-src=\"{{item.$iconUrl}}\">&nbsp;{{item.metadata.name}}\r\n </span>\r\n\r\n <button class=\"btn btn-danger pull-right\"\r\n title=\"Delete this Pod\"\r\n ng-click=\"deleteEntity()\">\r\n <i class=\"fa fa-remove\"></i> Delete\r\n </button>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n\r\n <a class=\"btn btn-default pull-right\"\r\n href=\"{{baseUri}}/kubernetes/pods?namespace={{item.metadata.namespace}}\"><i class=\"fa fa-list\"></i></a>\r\n <span ng-show=\"hasServiceKibana()\" class=\"pull-right\">&nbsp;</span>\r\n <button ng-show=\"hasServiceKibana()\"\r\n class=\"btn btn-default pull-right\"\r\n title=\"View the logs for this pod\"\r\n ng-click=\"openLogs()\">\r\n <i class=\"fa fa-file-text-o\"></i> Logs\r\n </button>\r\n\r\n <a class=\"btn btn-default pull-right\"\r\n ng-click=\"flipRaw()\"\r\n title=\"{{rawMode ? \'Raw mode\' : \'Form mode\'}}\">{{rawMode ? \'Form\' : \'Raw\'}}</a>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n\r\n <a class=\"btn btn-default pull-right\" ng-show=\"rawMode\" ng-click=\"readOnly = !readOnly\" ng-class=\"!readOnly ? \'btn-primary\' : \'\'\">Edit</a>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n\r\n <a class=\"btn btn-success pull-right\" ng-show=\"dirty\" ng-click=\"save(rawModel)\">Save</a>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n\r\n <a class=\"btn btn-primary pull-right\"\r\n href=\"/kubernetes/namespace/{{item.metadata.namespace}}/events?q=kind%3DPod%20name%3D{{item.metadata.name}}\"\r\n title=\"View the events for this Pod\">\r\n <i class=\"fa fa-ellipsis-v\"></i> Events\r\n </a>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n\r\n <div ng-show=\"item.$jolokiaUrl && item.$ready\" ng-controller=\"Kubernetes.ConnectController\" class=\"pull-right\">\r\n <span>&nbsp;</span>\r\n <a class=\"btn btn-default pull-right\"\r\n ng-click=\"doConnect(item)\"\r\n title=\"Open a new window and connect to this container\">\r\n <i class=\"fa fa-sign-in\"></i> Connect\r\n </a>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div ng-hide=\"model.fetched\">\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div class=\"align-center\">\r\n <i class=\"fa fa-spinner fa-spin\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div ng-show=\"model.fetched && !rawMode\">\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div hawtio-object=\"item\" config=\"itemConfig\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div ng-show=\"model.fetched && rawMode\">\r\n <div class=\"raw-json-view\">\r\n <div hawtio-editor=\"rawModel\" mode=\"mode\" read-only=\"readOnly\"></div>\r\n </div>\r\n </div>\r\n\r\n</div>\r\n");
$templateCache.put("plugins/kubernetes/html/podCreate.html","<div ng-controller=\"Kubernetes.PodEditController\">\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <a class=\"btn btn-default pull-right\"\r\n title=\"Go back to viewing all the pods\"\r\n href=\"{{baseUri}}/kubernetes/pods\"><i class=\"fa fa-list\"></i></a>\r\n <button class=\"btn btn-primary pull-right\"\r\n title=\"Create a new pod\"\r\n ng-click=\"save()\">\r\n Create Pod\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div ng-hide=\"fetched\">\r\n <div class=\"align-center\">\r\n <i class=\"fa fa-spinner fa-spin\"></i>\r\n </div>\r\n </div>\r\n <div ng-show=\"fetched\">\r\n <div hawtio-form-2=\"config\" entity=\"entity\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n");
$templateCache.put("plugins/kubernetes/html/podEdit.html","<div ng-controller=\"Kubernetes.PodEditController\">\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <a class=\"btn btn-default pull-right\"\r\n title=\"Go back to viewing all the pods\"\r\n href=\"{{baseUri}}/kubernetes/pods\"><i class=\"fa fa-list\"></i></a>\r\n <button class=\"btn btn-primary pull-right\"\r\n title=\"Saves changes to this pod\"\r\n ng-click=\"save()\">\r\n Save\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div ng-hide=\"fetched\">\r\n <div class=\"align-center\">\r\n <i class=\"fa fa-spinner fa-spin\"></i>\r\n </div>\r\n </div>\r\n <div ng-show=\"fetched\">\r\n <div hawtio-form-2=\"config\" entity=\"entity\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n");
$templateCache.put("plugins/kubernetes/html/pods.html","<div class=\"row\" ng-controller=\"Kubernetes.Pods\">\r\n <script type=\"text/ng-template\" id=\"imageTemplate.html\">\r\n <div class=\"ngCellText\">\r\n <!-- in table -->\r\n <span ng-hide=\"data\">\r\n <span ng-repeat=\"container in row.entity.spec.containers\">\r\n <span ng-hide=\"container.$imageLink\">{{container.image}}</span>\r\n <a ng-show=\"container.$imageLink\" target=\"dockerRegistry\" href=\"{{container.$imageLink}}\" title=\"{{container.name}}\">{{container.image}}</a>\r\n </span>\r\n </span>\r\n <!-- in detail view -->\r\n <span ng-show=\"data\">\r\n <a target=\"dockerRegistry\" ng-href=\"https://registry.hub.docker.com/u/{{data}}\" title=\"{{data}}\">{{data}}</a>\r\n </span>\r\n </div>\r\n </script>\r\n <script type=\"text/ng-template\" id=\"configDetail.html\">\r\n <pre>{{data}}</pre>\r\n </script>\r\n <script type=\"text/ng-template\" id=\"envItemTemplate.html\">\r\n <span ng-controller=\"Kubernetes.EnvItem\">\r\n <span class=\"blue\">{{key}}</span>=<span class=\"green\">{{value}}</span>\r\n </span>\r\n </script>\r\n\r\n\r\n <div class=\"row\">\r\n <div hawtio-breadcrumbs></div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div hawtio-tabs></div>\r\n </div>\r\n\r\n <div class=\"row filter-header\">\r\n <div class=\"col-md-12\" ng-show=\"true\">\r\n <span ng-show=\"!id\">\r\n <hawtio-filter ng-model=\"tableConfig.filterOptions.filterText\"\r\n css-class=\"input-xxlarge\"\r\n placeholder=\"Filter pods...\"></hawtio-filter>\r\n </span>\r\n <button ng-show=\"model.fetched\"\r\n class=\"btn btn-danger pull-right\"\r\n ng-disabled=\"!id && tableConfig.selectedItems.length == 0\"\r\n ng-click=\"deletePrompt(id || tableConfig.selectedItems)\">\r\n <i class=\"fa fa-remove\"></i> Delete\r\n </button>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <button ng-show=\"id\"\r\n class=\"btn btn-primary pull-right\"\r\n ng-click=\"id = undefined\"><i class=\"fa fa-list\"></i></button>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <button ng-show=\"hasServiceKibana()\"\r\n class=\"btn btn-primary pull-right\"\r\n title=\"View the logs for the selected pods\"\r\n ng-disabled=\"!id && tableConfig.selectedItems.length == 0\"\r\n ng-click=\"openLogs()\">\r\n <i class=\"fa fa-file-text-o\"></i> Logs\r\n </button>\r\n <span ng-show=\"hasServiceKibana()\" class=\"pull-right\">&nbsp;</span>\r\n <a class=\"btn btn-default pull-right\"\r\n title=\"Create a new pod\"\r\n ng-click=\"createPods()\"><i class=\"fa fa-plus\"></i> 创建新服务</a>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <span ng-include=\"\'runButton.html\'\"></span>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n\r\n <div ng-hide=\"model.fetched\">\r\n <div class=\"align-center\">\r\n <i class=\"fa fa-spinner fa-spin\"></i>\r\n </div>\r\n </div>\r\n <div ng-show=\"model.fetched\">\r\n <div ng-hide=\"model.pods.length\" class=\"align-center\">\r\n <p class=\"alert alert-info\">There are no pods currently running.</p>\r\n </div>\r\n <div ng-show=\"model.pods.length\">\r\n <table class=\"table table-striped table-bordered\" ui-if=\"kubernetes.selectedNamespace\"\r\n hawtio-simple-table=\"tableConfig\"></table>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n");
$templateCache.put("plugins/kubernetes/html/replicationController.html","<div ng-controller=\"Kubernetes.ReplicationControllerController\">\r\n\r\n <div class=\"row\">\r\n <div hawtio-breadcrumbs></div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div hawtio-tabs></div>\r\n </div>\r\n\r\n <div class=\"row row-header\">\r\n <div class=\"col-md-12\">\r\n <span ng-show=\"model.fetched && !rawMode\" class=\"icon-heading\">\r\n <img ng-show=\"item.$iconUrl\" class=\"icon-selected-app\" ng-src=\"{{item.$iconUrl}}\">&nbsp;{{item.metadata.name}}\r\n </span>\r\n\r\n <button class=\"btn btn-danger pull-right\"\r\n title=\"Delete this ReplicationController\"\r\n ng-click=\"deleteEntity()\">\r\n <i class=\"fa fa-remove\"></i> Delete\r\n </button>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n\r\n <a class=\"btn btn-default pull-right\"\r\n title=\"Return to table of controllers\"\r\n href=\"{{baseUri}}/kubernetes/replicationControllers?namespace={{item.metadata.namespace}}\"><i class=\"fa fa-list\"></i></a>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n\r\n <a class=\"btn btn-default pull-right\"\r\n ng-click=\"flipRaw()\"\r\n title=\"{{rawMode ? \'Raw mode\' : \'Form mode\'}}\">{{rawMode ? \'Form\' : \'Raw\'}}</a>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n\r\n <a class=\"btn btn-default pull-right\" ng-show=\"rawMode\" ng-click=\"readOnly = !readOnly\" ng-class=\"!readOnly ? \'btn-primary\' : \'\'\">Edit</a>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n\r\n <a class=\"btn btn-success pull-right\" ng-show=\"dirty\" ng-click=\"save(rawModel)\">Save</a>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n\r\n <a class=\"btn btn-default pull-right\"\r\n href=\"/kubernetes/namespace/{{item.metadata.namespace}}/events?q=kind%3DReplicationController%20name%3D{{item.metadata.name}}\"\r\n title=\"View the events for this Replication Controller\">\r\n <i class=\"fa fa-ellipsis-v\"></i> Events\r\n </a>\r\n\r\n <span class=\"pull-right\">&nbsp;&nbsp;&nbsp;</span>\r\n\r\n <a class=\"btn btn-default pull-right\"\r\n ng-click=\"resizeDialog.open(item)\"\r\n title=\"Scale this controller, changing the number of pods you wish to run\">\r\n <i class=\"fa fa-server\"></i> Scale\r\n </a>\r\n\r\n <span class=\"pull-right controller-pod-counts\" ng-show=\"item.$podCounters\">Pods:\r\n <a ng-show=\"item.$podCounters.podsLink\" href=\"{{link(item.$podCounters.podsLink)}}\" title=\"View pods\">\r\n <span ng-show=\"item.$podCounters.ready\" class=\"badge badge-success\">{{item.$podCounters.ready}}</span>\r\n <span ng-show=\"item.$podCounters.valid\" class=\"badge badge-info\">{{item.$podCounters.valid}}</span>\r\n <span ng-show=\"item.$podCounters.waiting\" class=\"badge\">{{item.$podCounters.waiting}}</span>\r\n <span ng-show=\"item.$podCounters.error\" class=\"badge badge-warning\">{{item.$podCounters.error}}</span>\r\n </a>\r\n </span>\r\n </div>\r\n </div>\r\n\r\n <div ng-hide=\"model.fetched\">\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div class=\"align-center\">\r\n <i class=\"fa fa-spinner fa-spin\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div ng-show=\"model.fetched && !rawMode\">\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div hawtio-object=\"item\" config=\"itemConfig\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div ng-show=\"model.fetched && rawMode\">\r\n <div class=\"raw-json-view\">\r\n <div hawtio-editor=\"rawModel\" mode=\"mode\" read-only=\"readOnly\"></div>\r\n </div>\r\n </div>\r\n\r\n <ng-include src=\"\'resizeDialog.html\'\"/>\r\n</div>\r\n");
$templateCache.put("plugins/kubernetes/html/replicationControllerCreate.html","<div ng-controller=\"Kubernetes.ReplicationControllerEditController\">\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <a class=\"btn btn-default pull-right\"\r\n title=\"Go back to viewing all the replication controllers\"\r\n href=\"{{baseUri}}/kubernetes/replicationControllers\"><i class=\"fa fa-list\"></i></a>\r\n <button class=\"btn btn-primary pull-right\"\r\n title=\"Create a new controller\"\r\n ng-click=\"save()\">\r\n Create Controller\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div ng-hide=\"fetched\">\r\n <div class=\"align-center\">\r\n <i class=\"fa fa-spinner fa-spin\"></i>\r\n </div>\r\n </div>\r\n <div ng-show=\"fetched\">\r\n <div hawtio-form-2=\"config\" entity=\"entity\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n");
$templateCache.put("plugins/kubernetes/html/replicationControllerEdit.html","<div ng-controller=\"Kubernetes.ReplicationControllerEditController\">\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <a class=\"btn btn-default pull-right\"\r\n title=\"Go back to viewing all the replication controllers\"\r\n href=\"{{baseUri}}/kubernetes/replicationControllers\"><i class=\"fa fa-list\"></i></a>\r\n <button class=\"btn btn-primary pull-right\"\r\n title=\"Saves changes to the controller\"\r\n ng-click=\"save()\">\r\n Save\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div ng-hide=\"fetched\">\r\n <div class=\"align-center\">\r\n <i class=\"fa fa-spinner fa-spin\"></i>\r\n </div>\r\n </div>\r\n <div ng-show=\"fetched\">\r\n <div hawtio-form-2=\"config\" entity=\"entity\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n");
$templateCache.put("plugins/kubernetes/html/replicationControllers.html","<div ng-controller=\"Kubernetes.ReplicationControllers\">\r\n <script type=\"text/ng-template\" id=\"currentReplicasTemplate.html\">\r\n <div class=\"ngCellText\" title=\"Number of running pods for this controller\">\r\n <a ng-show=\"row.entity.podsLink\" href=\"{{row.entity.podsLink}}\">\r\n <span class=\"badge {{row.entity.status.replicas > 0 ? \'badge-success\' : \'badge-warning\'}}\">{{row.entity.status.replicas}}</span>\r\n </a>\r\n <span ng-hide=\"row.entity.podsLink\" class=\"badge\">{{row.entity.status.replicas}}</span>\r\n </div>\r\n </script>\r\n <script type=\"text/ng-template\" id=\"desiredReplicas.html\">\r\n <div class=\"ngCellText\">\r\n <a href=\"\" class=\"badge badge-info\" \r\n ng-click=\"$parent.$parent.resizeDialog.open(row.entity)\" \r\n title=\"Edit the number of replicas of this controller\">{{row.entity.spec.replicas || 0}}</a>\r\n </div>\r\n </script>\r\n\r\n <div class=\"row\">\r\n <div hawtio-breadcrumbs></div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div hawtio-tabs></div>\r\n </div>\r\n\r\n <div class=\"row filter-header\">\r\n <div class=\"col-md-12 sj_fluid\" >\r\n <span ng-show=\"!id\">\r\n <hawtio-filter ng-model=\"tableConfig.filterOptions.filterText\"\r\n css-class=\"input-xxlarge sj_txt_box\"\r\n placeholder=\"通过数据标签筛选相应的oracle服务...\"\r\n save-as=\"kubernetes-replication-controllers-text-filter\"></hawtio-filter>\r\n </span>\r\n <button ng-show=\"model.fetched\"\r\n class=\"btn btn-danger pull-right sj_btn_grey \"\r\n ng-disabled=\"!id && tableConfig.selectedItems.length == 0\"\r\n ng-click=\"deletePrompt(id || tableConfig.selectedItems)\">\r\n <i class=\"glyphicon glyphicon-trash\"></i> 删除\r\n </button>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n\r\n <button ng-show=\"model.fetched\"\r\n class=\"btn btn-warning pull-right sj_btn_grey \"\r\n ng-disabled=\"!id && tableConfig.selectedItems.length == 0\"\r\n ng-click=\"stopPrompt(id || tableConfig.selectedItems)\">\r\n <i class=\"glyphicon glyphicon-off\"></i> 停止\r\n </button>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n\r\n <button ng-show=\"model.fetched\"\r\n class=\"btn btn-info pull-right sj_btn_grey\"\r\n ng-disabled=\"!id && tableConfig.selectedItems.length == 0\"\r\n ng-click=\"reStartPrompt(id || tableConfig.selectedItems)\">\r\n <i class=\"glyphicon glyphicon-play\"></i> 启动\r\n </button>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n\r\n <button ng-show=\"model.fetched\"\r\n ng-disabled=\"!id && tableConfig.selectedItems.length == 0\"\r\n class=\"btn btn-success pull-right sj_btn_grey\"\r\n ng-click=\"extractClick.open(id || tableConfig.selectedItems)\">\r\n <i class=\"glyphicon glyphicon-cloud-download\"></i> 汇总\r\n </button>\r\n <!--<span ng-include=\"\'runButton.html\'\"></span>-->\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-12 sj_fluid\">\r\n <div ng-hide=\"model.fetched\">\r\n <div class=\"align-center\">\r\n <i class=\"fa fa-spinner fa-spin\"></i>\r\n </div>\r\n </div>\r\n <div ng-show=\"model.fetched\">\r\n <div ng-hide=\"model.replicationControllers.length\" class=\"align-center\">\r\n <p class=\"alert alert-info\">当前没有正在运行的oracle服务.</p>\r\n </div>\r\n <div ng-show=\"model.replicationControllers.length\">\r\n <table class=\"table table-bordered table-striped sj_content_table\"\r\n hawtio-simple-table=\"tableConfig\" ></table>\r\n </div>\r\n </div>\r\n </div>\r\n </div> \r\n\r\n <div modal=\"extractClick.dialog.show\">\r\n <form name
$templateCache.put("plugins/kubernetes/html/secret.html","<div ng-controller=\"Kubernetes.SecretController\">\r\n <div class=\"row\">\r\n <div hawtio-breadcrumbs></div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div hawtio-tabs></div>\r\n </div>\r\n\r\n <div class=\"row filter-header\">\r\n <div class=\"col-md-12\">\r\n <button class=\"btn btn-default pull-right\"\r\n title=\"Cancel changes to this secret\"\r\n ng-click=\"cancel()\">\r\n Cancel\r\n </button>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <button class=\"btn btn-primary pull-right\"\r\n title=\"Saves changes to this secret\"\r\n ng-disabled=\"!entity.name || !changed\"\r\n ng-click=\"save()\">\r\n Save Changes\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <div ng-hide=\"fetched\">\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div class=\"align-center\">\r\n <i class=\"fa fa-spinner fa-spin\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div ng-show=\"fetched\">\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <form name=\"secretForm\" class=\"form-horizontal\">\r\n <div class=\"form-group\" ng-hide=\"id\" ng-class=\"{\'has-error\': secretForm.$error.validator}\">\r\n <label class=\"col-sm-2 control-label\" for=\"secretName\">\r\n Name\r\n <a tabindex=\"0\" role=\"button\" data-toggle=\"popover\" data-trigger=\"focus\" data-html=\"true\" title=\"\"\r\n data-content=\"name of the secret\" data-placement=\"top\" data-original-title=\"\">\r\n <span class=\"fa fa-info-circle\"></span>\r\n </a>\r\n </label>\r\n\r\n <div class=\"col-sm-10\">\r\n <input type=\"text\" id=\"secretName\" name=\"secretName\" ng-model=\"entity.name\" ng-change=\"entityChanged()\" class=\"form-control\"\r\n ui-validate=\"\'checkNameUnique($value)\'\"\r\n required=\"required\">\r\n <span class=\"help-block\" ng-show=\"secretForm.secretName.$error.validator\">\r\n There is already a secret with that name!\r\n </span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"form-group\" ng-repeat=\"property in entity.properties track by $index\">\r\n <label class=\"col-sm-2 control-label\" for=\"{{property.key}}\">\r\n {{property.label}}\r\n <a tabindex=\"0\" role=\"button\" data-toggle=\"popover\" data-trigger=\"focus\" data-html=\"true\" title=\"\"\r\n data-content=\"{{property.description}}\" data-placement=\"top\" data-original-title=\"\">\r\n <span class=\"fa fa-info-circle\"></span>\r\n </a>\r\n </label>\r\n\r\n <div class=\"col-sm-9\" ng-switch=\"property.type\">\r\n <textarea ng-switch-when=\"textarea\" class=\"form-control\" rows=\"{{property.rows}}\" id=\"{{property.key}}\" ng-change=\"entityChanged()\"\r\n ng-model=\"entity.properties[property.key].value\"></textarea>\r\n <input ng-switch-default=\"\" type=\"{{property.type}}\" class=\"form-control\" id=\"{{property.key}}\" ng-change=\"entityChanged()\"\r\n ng-model=\"entity.properties[property.key].value\">\r\n </div>\r\n\r\n <div class=\"col-sm-1\">\r\n <button class=\"btn btn-danger pull-right\" ng-click=\"deleteProperty(property.key)\"\r\n title=\"Remove this property from the secret\">\r\n <i class=\"fa fa-remove\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </form>\r\n\r\n\r\n <div class=\"form-group\" ng-show=\"entity.name\">\r\n <div class=\"col-sm-12\">\r\n <div class=\"text-center\">\r\n <button class=\"btn btn-default btn-padding\" ng-click=\"addFields(httpsKeys)\" ng
$templateCache.put("plugins/kubernetes/html/secrets.html","<div class=\"row\" ng-controller=\"Kubernetes.SecretsController\">\r\n <div class=\"row\">\r\n <div hawtio-breadcrumbs></div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div hawtio-tabs></div>\r\n </div>\r\n\r\n <div class=\"row filter-header\">\r\n <div class=\"col-md-12\">\r\n <span ng-show=\"!id\">\r\n <hawtio-filter ng-show=\"model.secrets.length\"\r\n ng-model=\"tableConfig.filterOptions.filterText\"\r\n save-as=\"kubernetes-secrets-text-filter\"\r\n css-class=\"input-xxlarge\"\r\n placeholder=\"Filter secrets...\"></hawtio-filter>\r\n\r\n <button class=\"btn btn-danger pull-right\"\r\n title=\"Deletes the selected secrets\"\r\n ng-disabled=\"!tableConfig.selectedItems.length\"\r\n ng-click=\"deletePrompt(tableConfig.selectedItems)\">\r\n <i class=\"fa fa-remove\"></i> Delete\r\n </button>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <a class=\"btn btn-primary pull-right\"\r\n title=\"Create a new secret\"\r\n ng-show=\"$createSecretLink\" href=\"{{$createSecretLink}}\">\r\n <i class=\"fa fa-plus\"></i> Create\r\n </a>\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div ng-hide=\"model.fetched\">\r\n <div class=\"align-center\">\r\n <i class=\"fa fa-spinner fa-spin\"></i>\r\n </div>\r\n </div>\r\n <div ng-show=\"model.fetched\">\r\n <div ng-hide=\"model.secrets.length\" class=\"align-center\">\r\n <p class=\"alert alert-info\">There are no secrets currently available.</p>\r\n </div>\r\n <div ng-show=\"model.secrets.length\">\r\n <table class=\"table table-bordered table-striped\" ui-if=\"kubernetes.selectedNamespace\"\r\n hawtio-simple-table=\"tableConfig\"></table>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n");
$templateCache.put("plugins/kubernetes/html/service.html","<div ng-controller=\"Kubernetes.ServiceController\">\r\n <div class=\"row\">\r\n <div hawtio-breadcrumbs></div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div hawtio-tabs></div>\r\n </div>\r\n\r\n <div class=\"row row-header\">\r\n <div class=\"col-md-12\">\r\n <span ng-show=\"model.fetched && !rawMode\" class=\"icon-heading\">\r\n <img ng-show=\"item.$iconUrl\" class=\"icon-selected-app\" ng-src=\"{{item.$iconUrl}}\">&nbsp;{{item.metadata.name}}\r\n </span>\r\n\r\n <button class=\"btn btn-danger pull-right\"\r\n title=\"Delete this Service\"\r\n ng-click=\"deleteEntity()\">\r\n <i class=\"fa fa-remove\"></i> Delete\r\n </button>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n\r\n <a class=\"btn btn-default pull-right\"\r\n href=\"{{baseUri}}/kubernetes/services?namespace={{item.metadata.namespace}}\"><i class=\"fa fa-list\"></i></a>\r\n\r\n <a class=\"btn btn-default pull-right\"\r\n ng-click=\"flipRaw()\"\r\n title=\"{{rawMode ? \'Raw mode\' : \'Form mode\'}}\">{{rawMode ? \'Form\' : \'Raw\'}}</a>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n\r\n <a class=\"btn btn-default pull-right\" ng-show=\"rawMode\" ng-click=\"readOnly = !readOnly\" ng-class=\"!readOnly ? \'btn-primary\' : \'\'\">Edit</a>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n\r\n <a class=\"btn btn-success pull-right\" ng-show=\"dirty\" ng-click=\"save(rawModel)\">Save</a>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n\r\n <a class=\"btn btn-primary pull-right\"\r\n title=\"Open this service in your browser\"\r\n ng-show=\"item.$connectUrl\" href=\"{{item.$connectUrl}}\">\r\n <i class=\"fa fa-sign-in\"></i> Connect\r\n </a>\r\n </div>\r\n </div>\r\n\r\n <div ng-hide=\"model.fetched\">\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div class=\"align-center\">\r\n <i class=\"fa fa-spinner fa-spin\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div ng-show=\"model.fetched && !rawMode\">\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div hawtio-object=\"item\" config=\"itemConfig\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div ng-show=\"model.fetched && rawMode\">\r\n <div class=\"raw-json-view\">\r\n <div hawtio-editor=\"rawModel\" mode=\"mode\" read-only=\"readOnly\"></div>\r\n </div>\r\n </div>\r\n\r\n</div>\r\n");
$templateCache.put("plugins/kubernetes/html/serviceApps.html","<div class=\"dropdown\" ng-controller=\"Kubernetes.ServiceApps\">\r\n <a href=\"\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">\r\n <i class=\"fa fa-ellipsis-v\" title=\"View the available tools\"></i>\r\n </a>\r\n <ul class=\"dropdown-menu right k8sServiceApp-menu\">\r\n <li class=\"k8sServiceApp\" \r\n ng-repeat=\"service in model.serviceApps | filter:filterTemplates | orderBy:\'metadata.name\' track by $index\">\r\n <a href=\"{{service.$connectUrl}}\"\r\n target=\"_blank\"\r\n title=\"Click to open this app\">\r\n <img style=\"width: 32px; height: 32px;\" ng-src=\"{{service.$iconUrl}}\">&nbsp;\r\n <span ng-bind=\"service.metadata.name\"></span>\r\n </a>\r\n </li>\r\n </ul>\r\n</div>\r\n");
$templateCache.put("plugins/kubernetes/html/serviceCreate.html","<div ng-controller=\"Kubernetes.ServiceEditController\">\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <a class=\"btn btn-default pull-right\"\r\n title=\"Go back to viewing all the services\"\r\n href=\"{{baseUri}}/kubernetes/services\"><i class=\"fa fa-list\"></i></a>\r\n <button class=\"btn btn-primary pull-right\"\r\n title=\"Create a new service\"\r\n ng-click=\"save()\">\r\n Create Service\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div ng-hide=\"fetched\">\r\n <div class=\"align-center\">\r\n <i class=\"fa fa-spinner fa-spin\"></i>\r\n </div>\r\n </div>\r\n <div ng-show=\"fetched\">\r\n <div hawtio-form-2=\"config\" entity=\"entity\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n");
$templateCache.put("plugins/kubernetes/html/serviceEdit.html","<div ng-controller=\"Kubernetes.ServiceEditController\">\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <a class=\"btn btn-default pull-right\"\r\n title=\"Go back to viewing all the services\"\r\n href=\"{{baseUri}}/kubernetes/services\"><i class=\"fa fa-list\"></i></a>\r\n <button class=\"btn btn-primary pull-right\"\r\n title=\"Save changes to this service\"\r\n ng-click=\"save()\">\r\n Save\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div ng-hide=\"fetched\">\r\n <div class=\"align-center\">\r\n <i class=\"fa fa-spinner fa-spin\"></i>\r\n </div>\r\n </div>\r\n <div ng-show=\"fetched\">\r\n <div hawtio-form-2=\"config\" entity=\"entity\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n");
$templateCache.put("plugins/kubernetes/html/services.html","<div ng-controller=\"Kubernetes.Services\">\r\n\r\n <div class=\"row\">\r\n <div hawtio-breadcrumbs></div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div hawtio-tabs></div>\r\n </div>\r\n\r\n <div class=\"row filter-header\">\r\n <div class=\"col-md-12\" ng-show=\"model.services.length\">\r\n <span ng-show=\"!id\">\r\n <hawtio-filter ng-model=\"tableConfig.filterOptions.filterText\"\r\n css-class=\"input-xxlarge\"\r\n placeholder=\"Filter services...\"\r\n save-as=\"kubernetes-services-text-filter\"></hawtio-filter>\r\n </span>\r\n <span ng-hide=\"id\" class=\"pull-right\">\r\n <div class=\"btn-group\">\r\n <a class=\"btn\" ng-disabled=\"mode == \'list\'\" href=\"\" ng-click=\"mode = \'list\'\">\r\n <i class=\"fa fa-list\"></i></a>\r\n <a class=\"btn\" ng-disabled=\"mode == \'icon\'\" href=\"\" ng-click=\"mode = \'icon\'\">\r\n <i class=\"fa fa-table\"></i></a>\r\n </div>\r\n </span>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <button ng-show=\"model.fetched\"\r\n class=\"btn btn-danger pull-right\"\r\n ng-disabled=\"!id && tableConfig.selectedItems.length == 0\"\r\n ng-click=\"deletePrompt(id || tableConfig.selectedItems)\">\r\n <i class=\"fa fa-remove\"></i> Delete\r\n </button>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <button ng-show=\"id\"\r\n class=\"btn btn-primary pull-right\"\r\n ng-click=\"id = undefined\"><i class=\"fa fa-list\"></i></button>\r\n <span ng-show=\"id\" class=\"pull-right\">&nbsp;</span>\r\n <a class=\"btn btn-default pull-right\"\r\n title=\"Create a new service\"\r\n href=\"{{baseUri}}/kubernetes/namespace/{{namespace}}/serviceCreate\"><i class=\"fa fa-plus\"></i> Create</a>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <span ng-include=\"\'runButton.html\'\"></span>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div ng-hide=\"model.fetched\">\r\n <div class=\"align-center\">\r\n <i class=\"fa fa-spinner fa-spin\"></i>\r\n </div>\r\n </div>\r\n <div ng-show=\"model.fetched\">\r\n <div ng-hide=\"model.services.length\" class=\"align-center\">\r\n <p class=\"alert alert-info\">There are no services currently available.</p>\r\n </div>\r\n <div ng-show=\"model.services.length\">\r\n <div ng-show=\"mode == \'list\'\">\r\n <table class=\"table table-bordered table-striped\" ui-if=\"kubernetes.selectedNamespace\"\r\n hawtio-simple-table=\"tableConfig\"></table>\r\n </div>\r\n\r\n <div ng-hide=\"mode == \'list\'\">\r\n <div class=\"column-box\"\r\n ng-repeat=\"service in model.serviceApps | filter:filterTemplates | orderBy:\'metadata.name\' track by $index\">\r\n <div class=\"row\">\r\n <div class=\"col-md-2\">\r\n <a href=\"{{service.$serviceUrl}}\"\r\n target=\"_blank\"\r\n title=\"Click to open this app\">\r\n <img style=\"width: 64px; height: 64px;\" ng-src=\"{{service.$iconUrl}}\">\r\n </a>\r\n </div>\r\n <div class=\"col-md-9\">\r\n <a href=\"{{service.$serviceUrl}}\"\r\n target=\"_blank\"\r\n title=\"Click to open this app\">\r\n <h3 ng-bind=\"service.metadata.name\"></h3>\r\n </a>\r\n </div>\r\n<!--\r\n <div class=\"col-md-1\">\r\n <a href=\"\" ng-click=\"deleteService(service)\"><i class=\"fa fa-remove red\"></i></a>\r\n </div>\r\n-->\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\
$templateCache.put("plugins/kubernetes/html/tabs.html","<div ng-show=\"subTabConfig\" ng-init=\"subTabConfig = $parent.subTabConfig\" class=\"breadcrumb-tabs\"\r\n ng-controller=\"Developer.NavBarController\">\r\n <ul class=\"nav nav-tabs\">\r\n <li ng-repeat=\"breadcrumb in subTabConfig\" ng-show=\"isValid(breadcrumb)\"\r\n class=\"{{breadcrumb.active ? \'active\' : \'\'}}\"\r\n title=\"{{breadcrumb.title}}\">\r\n <a href=\"{{breadcrumb.href}}\">{{breadcrumb.label}}</a>\r\n </li>\r\n </ul>\r\n<div class=\"pull-right inline-block\"\r\n ng-show=\"model.serviceApps && model.serviceApps.length\"\r\n ng-include=\"\'plugins/kubernetes/html/serviceApps.html\'\"></div>\r\n</div>\r\n");
$templateCache.put("plugins/kubernetes/html/templateDescription.html","<div class=\"modal-header\">\r\n <h3 class=\"modal-title\">Description</h3>\r\n</div>\r\n<div class=\"modal-body\">\r\n <div compile=\"text\"></div>\r\n</div>\r\n<div class=\"modal-footer\">\r\n <button class=\"btn btn-primary\" ng-click=\"ok()\">Close</button>\r\n</div>\r\n");
$templateCache.put("plugins/kubernetes/html/templates.html","<div ng-controller=\"Kubernetes.TemplateController\">\r\n <script type=\"text/ng-template\" id=\"truncatedDescriptionTag.html\">\r\n <a href=\"\" ng-click=\"openFullDescription(template)\">More...</a>\r\n </script>\r\n\r\n <div class=\"row\">\r\n <div hawtio-breadcrumbs></div>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div hawtio-tabs></div>\r\n </div>\r\n\r\n\r\n <div class=\"row filter-header\">\r\n <div class=\"col-md-12\">\r\n <span ng-show=\"model.templates.length && !formConfig\">\r\n <hawtio-filter ng-model=\"filterText\"\r\n css-class=\"input-xxlarge\"\r\n placeholder=\"Filter templates...\"></hawtio-filter>\r\n </span>\r\n\r\n <button ng-show=\"formConfig\" \r\n class=\"btn btn-success pull-right\"\r\n title=\"Click to deploy this app\" \r\n ng-click=\"substituteAndDeployTemplate()\">\r\n <i class=\"fa fa-play-circle\"></i> Run\r\n </button>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <button class=\"btn btn-info pull-right\"\r\n ng-click=\"cancel()\"\r\n title=\"Go back to app view\">\r\n Cancel\r\n </button>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <span class=\"pull-right\">\r\n Target namespace: <select ng-model=\"targetNamespace\" ng-options=\"namespace for namespace in model.namespaces\" title=\"Select the namespace to deploy these objects in\">\r\n </select>\r\n\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"row\" ng-hide=\"formConfig || model.templates.length != 0\">\r\n <div class=\"col-md-12\">\r\n <div class=\"alert alert-info centered\">\r\n There are no templates currently available. Add templates by dragging and dropping template files into this area.\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row\" ng-hide=\"formConfig\">\r\n <div class=\"col-md-12\">\r\n <div class=\"column-box\" \r\n ng-repeat=\"template in model.templates | filter:filterTemplates | orderBy:\'metadata.name\' track by $index\">\r\n <div class=\"row\">\r\n <div class=\"col-md-2\">\r\n <img style=\"width: 64px; height: 64px;\" ng-src=\"{{getIconUrl(template)}}\">\r\n </div>\r\n <div class=\"col-md-9\">\r\n <h3 ng-bind=\"template.metadata.name\"></h3>\r\n </div>\r\n <div class=\"col-md-1\">\r\n <a href=\"\" ng-click=\"deleteTemplate(template)\"><i class=\"fa fa-remove red\"></i></a>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-10\">\r\n <div compile=\"getDescription(template)\"></div>\r\n </div>\r\n <div class=\"col-md-2\">\r\n <a href=\"\" \r\n title=\"Click to deploy this app\" \r\n ng-click=\"deployTemplate(template)\">\r\n <i class=\"fa fa-play-circle green fa-3x\"></i>\r\n </a>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row\" ng-show=\"formConfig\">\r\n <div class=\"col-md-4\">\r\n </div>\r\n <div class=\"col-md-4\">\r\n <div hawtio-form-2=\"formConfig\" entity=\"entity\"></div>\r\n </div>\r\n <div class=\"col-md-4\">\r\n </div>\r\n\r\n </div>\r\n</div>\r\n");
8 years ago
$templateCache.put("plugins/kubernetes/html/termShell.html","<div class=\"terminal-window\" terminal-window ng-mousedown=\"raise()\">\r\n <div class=\"terminal-title\" ng-mousedown=\"mouseDown($event)\">\r\n <h5 ng-bind=\"containerName\"></h5>\r\n <i class=\"fa fa-remove pull-right clickable\" title=\"Close and exit this terminal\" ng-click=\"close()\"></i>\r\n <i class=\"fa fa-sort-desc pull-right clickable\" title=\"Minimize this terminal\" ng-click=\"minimize($event)\"></i>\r\n </div>\r\n <div class=\"terminal-body\">\r\n </div>\r\n</div>\r\n");
$templateCache.put("plugins/system/html/regionalismCodeSearch.html","<div ng-controller=\"System.RegionalismCodeController\">\r\n <div hawtio-breadcrumbs></div>\r\n <div hawtio-tabs></div>\r\n <div class=\"container-content \">\r\n <div class=\"container-fluid sj_fluid\"> \r\n <div ng-hide=\"model.regionalismInfo.length\" class=\"align-center\">\r\n <p class=\"alert alert-info\">当前没有可以查看的数据.</p>\r\n </div>\r\n <div ng-show=\"model.regionalismInfo.length\">\r\n <table ng-table=\"tableParams\" class=\"table table-condensed table-bordered table-striped\" show-filter=\"true\">\r\n <tr ng-repeat=\"row in $data\">\r\n <td title=\"\'行政区划代码\'\" filter=\"{ code: \'text\'}\" sortable=\"\'code\'\">\r\n {{row.code}}</td>\r\n <td title=\"\'市\'\" filter=\"{ cityName: \'text\'}\" sortable=\"\'cityName\'\">\r\n {{row.cityName}}</td>\r\n <td title=\"\'区县\'\" filter=\"{ districtName: \'text\'}\" sortable=\"\'districtName\'\">\r\n {{row.districtName}}</td>\r\n </tr>\r\n </table>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n");
$templateCache.put("plugins/system/html/systemCodeSearch.html","<div ng-controller=\"System.SystemCodeController\">\r\n <div hawtio-breadcrumbs></div>\r\n <div hawtio-tabs></div>\r\n <div class=\"container-content \">\r\n <div class=\"container-fluid sj_fluid\"> \r\n <div ng-hide=\"model.systemInfo.length\" class=\"align-center\">\r\n <p class=\"alert alert-info\">当前没有可以查看的数据.</p>\r\n </div>\r\n <div ng-show=\"model.systemInfo.length\">\r\n <table ng-table=\"tableParams\" class=\"table table-condensed table-bordered table-striped\" show-filter=\"true\">\r\n <tr ng-repeat=\"row in $data\">\r\n <td title=\"\'系统编码\'\" filter=\"{ code: \'text\'}\" sortable=\"\'code\'\">\r\n {{row.code}}</td>\r\n <td title=\"\'系统名称\'\" filter=\"{ systemName: \'text\'}\" sortable=\"\'systemName\'\">\r\n {{row.systemName}}</td> \r\n </tr>\r\n </table>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n");
$templateCache.put("plugins/system/html/systemList.html","<div ng-controller=\"System.SystemListController\">\r\n <div hawtio-tabs></div>\r\n <div class=\"container-content \">\r\n <div class=\"container-fluid sj_fluid\">\r\n <div class=\"row clear fl\"> \r\n <!--<input type=\"checkbox\" class=\"fl mr5 \" style=\"margin-top: 8px;\" />\r\n <label class=\"fl mr5 \" style=\"margin-top: 5px; font-style:nomal;\">全选</label>-->\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <button class=\"btn pull-right sj_btn_grey \" ng-disabled=\"!id && tableConfig.selectedItems.length == 0\" ng-click=\"deletePrompt(id || tableConfig.selectedItems)\">\r\n <i class=\"glyphicon glyphicon-open\"></i> 脚本上传\r\n </button>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <button class=\"btn pull-right sj_btn_grey \" ng-disabled=\"!id && tableConfig.selectedItems.length == 0\" ng-click=\"migrationClick.open(id || tableConfig.selectedItems)\">\r\n <i class=\"glyphicon glyphicon-save\"></i> 文件包导出\r\n </button>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <button class=\"btn pull-right sj_btn_grey \" ng-disabled=\"!id && tableConfig.selectedItems.length == 0\" ng-click=\"downLoadExcelFile()\">\r\n <i class=\"glyphicon glyphicon-export\"></i> Excel导出 \r\n </button>\r\n <span class=\"pull-right\">&nbsp;</span>\r\n <button class=\"btn pull-right sj_btn_grey \" ng-disabled=\"!id && tableConfig.selectedItems.length == 0\" ng-click=\"createOracleService(id || tableConfig.selectedItems)\">\r\n <i class=\"glyphicon glyphicon-import\"></i> Excel导入\r\n </button>\r\n <div class=\"btn pull-right sj_btn_grey \">\r\n <a class=\"data_file_btn fl\" >导入到服务器</a><input type=\"file\" name=\"file-upload[]\" id=\"file-uploads\" onchange=\"angular.element(this).scope().upLoadExcelFile(this.files)\" multiple /> \r\n </div> \r\n </div>\r\n <div ng-show=\"true\">\r\n <div class=\"col-md-12\" > \r\n <table ng-table-dynamic=\"tableParams with columns\" class=\"table table-condensed table-bordered table-striped\" > \r\n <tr ng-repeat=\"row in $data\"> \r\n <td ng-repeat=\"col in $columns\">\r\n <span ng-show=\"col.field != \'id\'\">{{row[col.field]}}</span>\r\n <button class=\"btn sj_btn\" ng-hide=\"col.field != \'id\'\" ng-click=\"viewClick(row)\">查看</button>\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>");
$templateCache.put("plugins/system/html/systemVerification.html","<div ng-controller=\"System.SystemVerificationController\">\r\n <div hawtio-tabs></div>\r\n <div class=\"container-content \">\r\n <div class=\"container-fluid sj_fluid\">\r\n <div class=\"row clear fl\">\r\n <label>行政区划代码</label>\r\n </div>\r\n <div class=\"row clear fl\">\r\n <select class=\"form-control\" ng-change=\"citySelect(x)\" ng-model=\"x\" ng-init=\"x=\'all\'\">\r\n <option value=\"all\">全部</option>\r\n <option ng-repeat=\"city in cities\">{{city}}</option>\r\n </select>\r\n </div>\r\n <div class=\"row clear fl\">\r\n <select class=\"form-control\" ng-change=\"countrySelect(y)\" ng-model=\"y\" ng-init=\"y=\'all\'\">\r\n <option value=\"all\">全部</option>\r\n <option ng-repeat=\"country in countries\">{{country.name}}</option>\r\n </select>\r\n </div>\r\n <div class=\"row clear fl\">\r\n <button class=\"btn pull-right sj_btn_grey \" ng-click=\"check()\">\r\n <i class=\"glyphicon glyphicon-save\"></i> 校验\r\n </button>\r\n </div>\r\n <div ng-show=\"true\">\r\n <div class=\"col-md-12\">\r\n <table ng-table-dynamic=\"tableParams with columns\" class=\"table table-condensed table-bordered table-striped\">\r\n <tr ng-repeat=\"row in $data\" ng-class=\"{\'danger\': row.checkResult = \'否\'}\">\r\n <td ng-repeat=\"col in $columns\">{{row[col.field]}}</td>\r\n {{row}}\r\n </tr>\r\n </table>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n");}]); hawtioPluginLoader.addModule("hawtio-kubernetes-templates");