aggregation-platform/d.ts/developer/ts/developerNavigation.d.ts

65 lines
3.7 KiB
TypeScript
Raw Permalink Normal View History

2016-06-28 10:22:53 +08:00
/// <reference path="../../includes.d.ts" />
declare module Developer {
2016-09-03 15:03:40 +08:00
type LabelResolver = () => string;
interface BreadcrumbConfig {
href?: string;
label?: string | LabelResolver;
title?: string;
class?: string;
isValid?: () => boolean;
isActive?: (subTab, path) => boolean;
}
2016-06-28 10:22:53 +08:00
function workspaceLink(): string;
function projectLink(projectId: any): string;
2016-09-03 15:03:40 +08:00
function createWorkspacesBreadcrumbs(developPerspective?: any): BreadcrumbConfig[];
2016-06-28 10:22:53 +08:00
function createWorkspacesSubNavBars(developPerspective: any): any;
function createWorkspaceBreadcrumbs(children?: any, workspaceName?: any): any;
function createEnvironmentBreadcrumbs($scope: any, $location: any, $routeParams: any): any;
2016-09-03 15:03:40 +08:00
function createProjectBreadcrumbs(projectName?: any, children?: Array<BreadcrumbConfig>, workspaceName?: any): any;
2016-06-28 10:22:53 +08:00
function createProjectSettingsBreadcrumbs(projectName: any, workspaceName?: any): any;
function createWorkspaceSubNavBars(): any;
2016-09-03 15:03:40 +08:00
function namespaceRuntimeLink(workspaceName?: any): string;
/**
* 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)[]}}
*/
function createTabRoutingFunction(baseURL: string): (templateName: string, reloadOnSearch?: boolean, children?: BreadcrumbConfig[]) => {
template: string;
reloadOnSearch: boolean;
controller: (string | (($scope: any, $routeParams: ng.route.IRouteParamsService) => void))[];
};
2016-06-28 10:22:53 +08:00
function createProjectSubNavBars(projectName: any, jenkinsJobId?: any, $scope?: any): any;
function createProjectSettingsSubNavBars(projectName: any, jenkinsJobId?: any): any;
function forgeProjectHasBuilder(name: any): any;
function forgeProjectHasPerspective(name: any): any;
function editPipelineLinkScope($scope: any): string;
function createProjectLink(workspaceName?: any): string;
function editPipelineLink(workspaceName: any, projectName: any): string;
function editMavenBuildLink(workspaceName: any, projectName: any): string;
function projectSecretsLink(workspaceName: any, projectName: any): string;
function secretsNamespaceLink(workspaceName: any, projectName: any, secretsNamespace: any): string;
function projectWorkspaceLink(workspaceName: any, projectName: any, path: any, ignoreBlankProject?: boolean): string;
2016-09-03 15:03:40 +08:00
function environmentsLink(workspaceName?: any): string;
function environmentLink(workspaceName: any, environmentNamespace: any, path?: string, ignoreBlankProject?: boolean): string;
2016-06-28 10:22:53 +08:00
var customProjectSubTabFactories: any[];
function createJenkinsBreadcrumbs(projectName: any, jobId: any, buildId: any): any;
function createJenkinsSubNavBars(projectName: any, jenkinsJobId: any, buildId: any, extraOption?: any): any;
function createEnvironmentSubNavBars($scope: any, $location: any, $routeParams: any): any;
2016-09-03 15:03:40 +08:00
function environmentInstanceLink(env: any, projectName?: any): string;
2016-06-28 10:22:53 +08:00
function namespaceLink($scope: any, $routeParams: any, path?: any): string;
2016-09-03 15:03:40 +08:00
function normalizeHref(href: string): string;
2016-09-08 22:56:43 +08:00
function activateCurrent(navBarItems: any): any;
2016-06-28 10:22:53 +08:00
}