|
|
@@ -279,24 +279,25 @@ const getLogsWithinTimeRange = baseApi<
|
|
|
);
|
|
|
|
|
|
const appLogs = baseApi<
|
|
|
- {
|
|
|
- app_name: string;
|
|
|
- service_name: string;
|
|
|
- deployment_target_id: string;
|
|
|
- limit: number;
|
|
|
- start_range: string;
|
|
|
- end_range: string;
|
|
|
- search_param?: string;
|
|
|
- direction?: string;
|
|
|
- },
|
|
|
- {
|
|
|
- project_id: number;
|
|
|
- cluster_id: number;
|
|
|
- }
|
|
|
+ {
|
|
|
+ app_name: string;
|
|
|
+ service_name: string;
|
|
|
+ deployment_target_id: string;
|
|
|
+ limit: number;
|
|
|
+ start_range: string;
|
|
|
+ end_range: string;
|
|
|
+ search_param?: string;
|
|
|
+ direction?: string;
|
|
|
+ app_revision_id?: string;
|
|
|
+ },
|
|
|
+ {
|
|
|
+ project_id: number;
|
|
|
+ cluster_id: number;
|
|
|
+ }
|
|
|
>(
|
|
|
- "GET",
|
|
|
- ({ project_id, cluster_id }) =>
|
|
|
- `/api/projects/${project_id}/clusters/${cluster_id}/apps/logs`
|
|
|
+ "GET",
|
|
|
+ ({ project_id, cluster_id }) =>
|
|
|
+ `/api/projects/${project_id}/clusters/${cluster_id}/apps/logs`
|
|
|
);
|
|
|
|
|
|
const getFeedEvents = baseApi<
|
|
|
@@ -309,9 +310,8 @@ const getFeedEvents = baseApi<
|
|
|
}
|
|
|
>("GET", (pathParams) => {
|
|
|
let { project_id, cluster_id, stack_name, page } = pathParams;
|
|
|
- return `/api/projects/${project_id}/clusters/${cluster_id}/applications/${stack_name}/events?page=${
|
|
|
- page || 1
|
|
|
- }`;
|
|
|
+ return `/api/projects/${project_id}/clusters/${cluster_id}/applications/${stack_name}/events?page=${page || 1
|
|
|
+ }`;
|
|
|
});
|
|
|
|
|
|
const createEnvironment = baseApi<
|
|
|
@@ -736,11 +736,9 @@ const detectBuildpack = baseApi<
|
|
|
branch: string;
|
|
|
}
|
|
|
>("GET", (pathParams) => {
|
|
|
- return `/api/projects/${pathParams.project_id}/gitrepos/${
|
|
|
- pathParams.git_repo_id
|
|
|
- }/repos/${pathParams.kind}/${pathParams.owner}/${
|
|
|
- pathParams.name
|
|
|
- }/${encodeURIComponent(pathParams.branch)}/buildpack/detect`;
|
|
|
+ return `/api/projects/${pathParams.project_id}/gitrepos/${pathParams.git_repo_id
|
|
|
+ }/repos/${pathParams.kind}/${pathParams.owner}/${pathParams.name
|
|
|
+ }/${encodeURIComponent(pathParams.branch)}/buildpack/detect`;
|
|
|
});
|
|
|
|
|
|
const detectGitlabBuildpack = baseApi<
|
|
|
@@ -771,11 +769,9 @@ const getBranchContents = baseApi<
|
|
|
branch: string;
|
|
|
}
|
|
|
>("GET", (pathParams) => {
|
|
|
- return `/api/projects/${pathParams.project_id}/gitrepos/${
|
|
|
- pathParams.git_repo_id
|
|
|
- }/repos/${pathParams.kind}/${pathParams.owner}/${
|
|
|
- pathParams.name
|
|
|
- }/${encodeURIComponent(pathParams.branch)}/contents`;
|
|
|
+ return `/api/projects/${pathParams.project_id}/gitrepos/${pathParams.git_repo_id
|
|
|
+ }/repos/${pathParams.kind}/${pathParams.owner}/${pathParams.name
|
|
|
+ }/${encodeURIComponent(pathParams.branch)}/contents`;
|
|
|
});
|
|
|
|
|
|
const getProcfileContents = baseApi<
|
|
|
@@ -791,11 +787,9 @@ const getProcfileContents = baseApi<
|
|
|
branch: string;
|
|
|
}
|
|
|
>("GET", (pathParams) => {
|
|
|
- return `/api/projects/${pathParams.project_id}/gitrepos/${
|
|
|
- pathParams.git_repo_id
|
|
|
- }/repos/${pathParams.kind}/${pathParams.owner}/${
|
|
|
- pathParams.name
|
|
|
- }/${encodeURIComponent(pathParams.branch)}/procfile`;
|
|
|
+ return `/api/projects/${pathParams.project_id}/gitrepos/${pathParams.git_repo_id
|
|
|
+ }/repos/${pathParams.kind}/${pathParams.owner}/${pathParams.name
|
|
|
+ }/${encodeURIComponent(pathParams.branch)}/procfile`;
|
|
|
});
|
|
|
|
|
|
const getPorterYamlContents = baseApi<
|
|
|
@@ -811,11 +805,9 @@ const getPorterYamlContents = baseApi<
|
|
|
branch: string;
|
|
|
}
|
|
|
>("GET", (pathParams) => {
|
|
|
- return `/api/projects/${pathParams.project_id}/gitrepos/${
|
|
|
- pathParams.git_repo_id
|
|
|
- }/repos/${pathParams.kind}/${pathParams.owner}/${
|
|
|
- pathParams.name
|
|
|
- }/${encodeURIComponent(pathParams.branch)}/porteryaml`;
|
|
|
+ return `/api/projects/${pathParams.project_id}/gitrepos/${pathParams.git_repo_id
|
|
|
+ }/repos/${pathParams.kind}/${pathParams.owner}/${pathParams.name
|
|
|
+ }/${encodeURIComponent(pathParams.branch)}/porteryaml`;
|
|
|
});
|
|
|
|
|
|
const parsePorterYaml = baseApi<
|
|
|
@@ -851,11 +843,9 @@ const getBranchHead = baseApi<
|
|
|
branch: string;
|
|
|
}
|
|
|
>("GET", (pathParams) => {
|
|
|
- return `/api/projects/${pathParams.project_id}/gitrepos/${
|
|
|
- pathParams.git_repo_id
|
|
|
- }/repos/${pathParams.kind}/${pathParams.owner}/${
|
|
|
- pathParams.name
|
|
|
- }/${encodeURIComponent(pathParams.branch)}/head`;
|
|
|
+ return `/api/projects/${pathParams.project_id}/gitrepos/${pathParams.git_repo_id
|
|
|
+ }/repos/${pathParams.kind}/${pathParams.owner}/${pathParams.name
|
|
|
+ }/${encodeURIComponent(pathParams.branch)}/head`;
|
|
|
});
|
|
|
|
|
|
const validatePorterApp = baseApi<
|
|
|
@@ -878,21 +868,21 @@ const validatePorterApp = baseApi<
|
|
|
|
|
|
const createApp = baseApi<
|
|
|
| {
|
|
|
- name: string;
|
|
|
- type: "github";
|
|
|
- git_repo_id: number;
|
|
|
- git_branch: string;
|
|
|
- git_repo_name: string;
|
|
|
- porter_yaml_path: string;
|
|
|
- }
|
|
|
+ name: string;
|
|
|
+ type: "github";
|
|
|
+ git_repo_id: number;
|
|
|
+ git_branch: string;
|
|
|
+ git_repo_name: string;
|
|
|
+ porter_yaml_path: string;
|
|
|
+ }
|
|
|
| {
|
|
|
- name: string;
|
|
|
- type: "docker-registry";
|
|
|
- image: {
|
|
|
- repository: string;
|
|
|
- tag: string;
|
|
|
- };
|
|
|
- },
|
|
|
+ name: string;
|
|
|
+ type: "docker-registry";
|
|
|
+ image: {
|
|
|
+ repository: string;
|
|
|
+ tag: string;
|
|
|
+ };
|
|
|
+ },
|
|
|
{
|
|
|
project_id: number;
|
|
|
cluster_id: number;
|
|
|
@@ -1485,24 +1475,24 @@ const getMetrics = baseApi<
|
|
|
});
|
|
|
|
|
|
const appMetrics = baseApi<
|
|
|
- {
|
|
|
- metric: string;
|
|
|
- shouldsum: boolean;
|
|
|
- pods?: string[];
|
|
|
- kind?: string; // the controller kind
|
|
|
- name?: string;
|
|
|
- percentile?: number;
|
|
|
- deployment_target_id: string;
|
|
|
- startrange: number;
|
|
|
- endrange: number;
|
|
|
- resolution: string;
|
|
|
- },
|
|
|
- {
|
|
|
- id: number;
|
|
|
- cluster_id: number;
|
|
|
- }
|
|
|
+ {
|
|
|
+ metric: string;
|
|
|
+ shouldsum: boolean;
|
|
|
+ pods?: string[];
|
|
|
+ kind?: string; // the controller kind
|
|
|
+ name?: string;
|
|
|
+ percentile?: number;
|
|
|
+ deployment_target_id: string;
|
|
|
+ startrange: number;
|
|
|
+ endrange: number;
|
|
|
+ resolution: string;
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: number;
|
|
|
+ cluster_id: number;
|
|
|
+ }
|
|
|
>("GET", (pathParams) => {
|
|
|
- return `/api/projects/${pathParams.id}/clusters/${pathParams.cluster_id}/apps/metrics`;
|
|
|
+ return `/api/projects/${pathParams.id}/clusters/${pathParams.cluster_id}/apps/metrics`;
|
|
|
});
|
|
|
|
|
|
const getNamespaces = baseApi<
|
|
|
@@ -1836,11 +1826,9 @@ const getEnvGroup = baseApi<
|
|
|
version?: number;
|
|
|
}
|
|
|
>("GET", (pathParams) => {
|
|
|
- return `/api/projects/${pathParams.id}/clusters/${
|
|
|
- pathParams.cluster_id
|
|
|
- }/namespaces/${pathParams.namespace}/envgroup?name=${pathParams.name}${
|
|
|
- pathParams.version ? "&version=" + pathParams.version : ""
|
|
|
- }`;
|
|
|
+ return `/api/projects/${pathParams.id}/clusters/${pathParams.cluster_id
|
|
|
+ }/namespaces/${pathParams.namespace}/envgroup?name=${pathParams.name}${pathParams.version ? "&version=" + pathParams.version : ""
|
|
|
+ }`;
|
|
|
});
|
|
|
|
|
|
const getConfigMap = baseApi<
|
|
|
@@ -2897,7 +2885,7 @@ const removeStackEnvGroup = baseApi<
|
|
|
`/api/v1/projects/${project_id}/clusters/${cluster_id}/namespaces/${namespace}/stacks/${stack_id}/remove_env_group/${env_group_name}`
|
|
|
);
|
|
|
|
|
|
-const getGithubStatus = baseApi<{}, {}>("GET", ({}) => `/api/status/github`);
|
|
|
+const getGithubStatus = baseApi<{}, {}>("GET", ({ }) => `/api/status/github`);
|
|
|
|
|
|
const createSecretAndOpenGitHubPullRequest = baseApi<
|
|
|
{
|