|
@@ -336,14 +336,14 @@ const appJobs = baseApi<
|
|
|
`/api/projects/${project_id}/clusters/${cluster_id}/apps/${porter_app_name}/jobs`
|
|
`/api/projects/${project_id}/clusters/${cluster_id}/apps/${porter_app_name}/jobs`
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
-const appPodStatus = baseApi<
|
|
|
|
|
|
|
+const appServiceStatus = baseApi<
|
|
|
{
|
|
{
|
|
|
deployment_target_id: string;
|
|
deployment_target_id: string;
|
|
|
service: string;
|
|
service: string;
|
|
|
},
|
|
},
|
|
|
{ project_id: number; cluster_id: number; app_name: string }
|
|
{ project_id: number; cluster_id: number; app_name: string }
|
|
|
>("GET", ({ project_id, cluster_id, app_name }) => {
|
|
>("GET", ({ project_id, cluster_id, app_name }) => {
|
|
|
- return `/api/projects/${project_id}/clusters/${cluster_id}/apps/${app_name}/pods`;
|
|
|
|
|
|
|
+ return `/api/projects/${project_id}/clusters/${cluster_id}/apps/${app_name}/service_status`;
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
const appEvents = baseApi<
|
|
const appEvents = baseApi<
|
|
@@ -371,8 +371,9 @@ const getFeedEvents = baseApi<
|
|
|
}
|
|
}
|
|
|
>("GET", (pathParams) => {
|
|
>("GET", (pathParams) => {
|
|
|
const { project_id, cluster_id, stack_name, page } = pathParams;
|
|
const { 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<
|
|
const createEnvironment = baseApi<
|
|
@@ -797,9 +798,11 @@ const detectBuildpack = baseApi<
|
|
|
branch: string;
|
|
branch: string;
|
|
|
}
|
|
}
|
|
|
>("GET", (pathParams) => {
|
|
>("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<
|
|
const detectGitlabBuildpack = baseApi<
|
|
@@ -830,9 +833,11 @@ const getBranchContents = baseApi<
|
|
|
branch: string;
|
|
branch: string;
|
|
|
}
|
|
}
|
|
|
>("GET", (pathParams) => {
|
|
>("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<
|
|
const getProcfileContents = baseApi<
|
|
@@ -848,9 +853,11 @@ const getProcfileContents = baseApi<
|
|
|
branch: string;
|
|
branch: string;
|
|
|
}
|
|
}
|
|
|
>("GET", (pathParams) => {
|
|
>("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<
|
|
const getPorterYamlContents = baseApi<
|
|
@@ -866,9 +873,11 @@ const getPorterYamlContents = baseApi<
|
|
|
branch: string;
|
|
branch: string;
|
|
|
}
|
|
}
|
|
|
>("GET", (pathParams) => {
|
|
>("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<
|
|
const parsePorterYaml = baseApi<
|
|
@@ -916,9 +925,11 @@ const getBranchHead = baseApi<
|
|
|
branch: string;
|
|
branch: string;
|
|
|
}
|
|
}
|
|
|
>("GET", (pathParams) => {
|
|
>("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<
|
|
const validatePorterApp = baseApi<
|
|
@@ -950,23 +961,23 @@ const validatePorterApp = baseApi<
|
|
|
|
|
|
|
|
const createApp = baseApi<
|
|
const createApp = baseApi<
|
|
|
| {
|
|
| {
|
|
|
- name: string;
|
|
|
|
|
- deployment_target_id: string;
|
|
|
|
|
- type: "github";
|
|
|
|
|
- git_repo_id: number;
|
|
|
|
|
- git_branch: string;
|
|
|
|
|
- git_repo_name: string;
|
|
|
|
|
- porter_yaml_path: string;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ name: string;
|
|
|
|
|
+ deployment_target_id: string;
|
|
|
|
|
+ type: "github";
|
|
|
|
|
+ git_repo_id: number;
|
|
|
|
|
+ git_branch: string;
|
|
|
|
|
+ git_repo_name: string;
|
|
|
|
|
+ porter_yaml_path: string;
|
|
|
|
|
+ }
|
|
|
| {
|
|
| {
|
|
|
- name: string;
|
|
|
|
|
- deployment_target_id: string;
|
|
|
|
|
- type: "docker-registry";
|
|
|
|
|
- image: {
|
|
|
|
|
- repository: string;
|
|
|
|
|
- tag: string;
|
|
|
|
|
- };
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ name: string;
|
|
|
|
|
+ deployment_target_id: string;
|
|
|
|
|
+ type: "docker-registry";
|
|
|
|
|
+ image: {
|
|
|
|
|
+ repository: string;
|
|
|
|
|
+ tag: string;
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
{
|
|
{
|
|
|
project_id: number;
|
|
project_id: number;
|
|
|
cluster_id: number;
|
|
cluster_id: number;
|
|
@@ -985,7 +996,7 @@ const createAppTemplate = baseApi<
|
|
|
base64_addon: string;
|
|
base64_addon: string;
|
|
|
variables: Record<string, string>;
|
|
variables: Record<string, string>;
|
|
|
secrets: Record<string, string>;
|
|
secrets: Record<string, string>;
|
|
|
- }>
|
|
|
|
|
|
|
+ }>;
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
project_id: number;
|
|
project_id: number;
|
|
@@ -1200,16 +1211,16 @@ const listDeploymentTargets = baseApi<
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
const createDeploymentTarget = baseApi<
|
|
const createDeploymentTarget = baseApi<
|
|
|
- {
|
|
|
|
|
- name: string;
|
|
|
|
|
- preview: boolean;
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- project_id: number;
|
|
|
|
|
- cluster_id: number;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ {
|
|
|
|
|
+ name: string;
|
|
|
|
|
+ preview: boolean;
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ project_id: number;
|
|
|
|
|
+ cluster_id: number;
|
|
|
|
|
+ }
|
|
|
>("POST", ({ project_id, cluster_id }) => {
|
|
>("POST", ({ project_id, cluster_id }) => {
|
|
|
- return `/api/projects/${project_id}/clusters/${cluster_id}/deployment-targets`;
|
|
|
|
|
|
|
+ return `/api/projects/${project_id}/clusters/${cluster_id}/deployment-targets`;
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
const getDeploymentTarget = baseApi<
|
|
const getDeploymentTarget = baseApi<
|
|
@@ -1904,12 +1915,11 @@ const updateDatabaseStatus = baseApi<
|
|
|
const getDatabaseStatus = baseApi<
|
|
const getDatabaseStatus = baseApi<
|
|
|
{
|
|
{
|
|
|
name: string;
|
|
name: string;
|
|
|
- type: string
|
|
|
|
|
|
|
+ type: string;
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
project_id: number;
|
|
project_id: number;
|
|
|
cluster_id: number;
|
|
cluster_id: number;
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
>("GET", (pathParams) => {
|
|
>("GET", (pathParams) => {
|
|
|
return `/api/projects/${pathParams.project_id}/clusters/${pathParams.cluster_id}/datastore/status`;
|
|
return `/api/projects/${pathParams.project_id}/clusters/${pathParams.cluster_id}/datastore/status`;
|
|
@@ -2175,9 +2185,11 @@ const getEnvGroup = baseApi<
|
|
|
version?: number;
|
|
version?: number;
|
|
|
}
|
|
}
|
|
|
>("GET", (pathParams) => {
|
|
>("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<
|
|
const getConfigMap = baseApi<
|
|
@@ -3258,7 +3270,7 @@ const removeStackEnvGroup = baseApi<
|
|
|
`/api/v1/projects/${project_id}/clusters/${cluster_id}/namespaces/${namespace}/stacks/${stack_id}/remove_env_group/${env_group_name}`
|
|
`/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<
|
|
const createSecretAndOpenGitHubPullRequest = baseApi<
|
|
|
{
|
|
{
|
|
@@ -3331,7 +3343,7 @@ export default {
|
|
|
appLogs,
|
|
appLogs,
|
|
|
appJobs,
|
|
appJobs,
|
|
|
appEvents,
|
|
appEvents,
|
|
|
- appPodStatus,
|
|
|
|
|
|
|
+ appServiceStatus,
|
|
|
getFeedEvents,
|
|
getFeedEvents,
|
|
|
updateStackStep,
|
|
updateStackStep,
|
|
|
porterYamlFromRevision,
|
|
porterYamlFromRevision,
|
|
@@ -3559,5 +3571,5 @@ export default {
|
|
|
|
|
|
|
|
// STATUS
|
|
// STATUS
|
|
|
getGithubStatus,
|
|
getGithubStatus,
|
|
|
- getDatabaseStatus
|
|
|
|
|
|
|
+ getDatabaseStatus,
|
|
|
};
|
|
};
|