Skip to content

Commit

Permalink
Merge branch 'dev' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
nathandf committed Apr 25, 2024
2 parents f33e38a + 65ce8c8 commit a431ee6
Show file tree
Hide file tree
Showing 210 changed files with 10,241 additions and 707 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Client_Side_Unit_Tests:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Setup Node.js for use with actions
Expand All @@ -36,7 +36,7 @@ jobs:
# run: bash <(curl -s https://codecov.io/bash) -Z -t ${{ secrets.CODECOV_TOKEN }} -cF javascript

Client_Side_Linting:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Setup Node.js for use with actions
Expand Down
885 changes: 720 additions & 165 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"@fortawesome/react-fontawesome": "^0.1.8",
"@material-ui/core": "^4.12.3",
"@reduxjs/toolkit": "^1.5.1",
"@tapis/tapis-typescript": "^0.0.20",
"@tapis/tapis-typescript": "^0.0.27",
"@uiw/react-codemirror": "^4.19.7",
"@uiw/react-textarea-code-editor": "^2.0.6",
"axios": "^0.21.4",
Expand All @@ -31,7 +31,7 @@
"react-query": "^3.19.2",
"react-resize-detector": "^6.1.0",
"react-router-dom": "^5.2.0",
"react-scripts": "4.0.3",
"react-scripts": "^4.0.3",
"react-step-wizard": "^5.3.9",
"react-table": "^7.0.5",
"react-transition-group": "^4.4.1",
Expand Down
50 changes: 50 additions & 0 deletions src/fixtures/pods.fixtures.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
export const tapisPod = {
pod_id: 'testpod2',
pod_template: 'template/postgres',
description: 'Test pod fixture for testing',
command: undefined,
environment_variables: {},
data_requests: [],
roles_required: [],
status_requested: 'ON',
volume_mounts: {
test4: {
type: 'tapisvolume',
mount_path: '/var/lib/postgresql/data',
sub_path: '',
},
},
time_to_stop_default: -1,
time_to_stop_instance: undefined,
networking: {
default: {
protocol: 'postgres',
port: 5432,
url: 'test4.pods.tacc.develop.tapis.io',
},
},
resources: {
cpu_request: 250,
cpu_limit: 2000,
mem_request: 256,
mem_limit: 3072,
gpus: 0,
},
time_to_stop_ts: null,
status: 'AVAILABLE',
status_container: {
phase: 'Running',
start_time: '2024-02-13T20:58:32.000000',
message: 'Pod is running.',
},
data_attached: [],
roles_inherited: [],
creation_ts: '2024-02-13T20:58:31.358557',
update_ts: '2024-02-13T20:58:31.358649',
start_instance_ts: '2024-02-13T20:59:08.175504',
action_logs: [
"24/02/13 20:58: Pod object created by 'cgarcia'",
'24/02/13 20:58: spawner set status to CREATING',
'24/02/13 20:59: health set status to AVAILABLE',
],
};
4 changes: 2 additions & 2 deletions src/fixtures/systems.fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ export const singularityRuntime: Systems.JobRuntime = {
version: '0.0.1',
};

export const jobRuntimes: Set<Systems.JobRuntime> = new Set([
export const jobRuntimes: Array<Systems.JobRuntime> = [
{ ...dockerRuntime },
{ ...singularityRuntime },
]);
];

export const tapisSystem: Systems.TapisSystem = {
tenant: 'tacc',
Expand Down
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { HashRouter as Router } from 'react-router-dom';
import App from 'tapis-app';
import TapisProvider from 'tapis-hooks/provider';
import 'tapis-ui/index.css';
import { resolveBasePath } from 'utils/resloveBasePath';
import { resolveBasePath } from 'utils/resolveBasePath';
import reportWebVitals from './reportWebVitals';

ReactDOM.render(
Expand Down
20 changes: 20 additions & 0 deletions src/tapis-api/apps/createApp.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { Apps } from '@tapis/tapis-typescript';
import { apiGenerator, errorDecoder } from 'tapis-api/utils';

const createApp = (
createAppVersionRequest: Apps.CreateAppVersionRequest,
basepath: string,
jwt: string
) => {
const api: Apps.ApplicationsApi = apiGenerator<Apps.ApplicationsApi>(
Apps,
Apps.ApplicationsApi,
basepath,
jwt
);
return errorDecoder<Apps.RespBasic>(() =>
api.createAppVersion(createAppVersionRequest)
);
};

export default createApp;
1 change: 1 addition & 0 deletions src/tapis-api/apps/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export { default as list } from './list';
export { default as detail } from './detail';
export { default as createApp } from './createApp';
18 changes: 18 additions & 0 deletions src/tapis-api/jobs/cancel.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Jobs } from '@tapis/tapis-typescript';
import { apiGenerator, errorDecoder } from 'tapis-api/utils';

export const cancel = (
jobCancelReq: Jobs.CancelJobRequest,
basePath: string,
jwt: string
) => {
const api: Jobs.JobsApi = apiGenerator<Jobs.JobsApi>(
Jobs,
Jobs.JobsApi,
basePath,
jwt
);
return errorDecoder<Jobs.RespCancelJob>(() => api.cancelJob(jobCancelReq));
};

export default cancel;
14 changes: 14 additions & 0 deletions src/tapis-api/jobs/hideJob.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Jobs } from '@tapis/tapis-typescript';
import { apiGenerator, errorDecoder } from 'tapis-api/utils';

const hideJob = (jobUuid: string, basePath: string, jwt: string) => {
const api: Jobs.JobsApi = apiGenerator<Jobs.JobsApi>(
Jobs,
Jobs.JobsApi,
basePath,
jwt
);
return errorDecoder<Jobs.RespHideJob>(() => api.hideJob({ jobUuid }));
};

export default hideJob;
3 changes: 3 additions & 0 deletions src/tapis-api/jobs/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
export { default as list } from './list';
export { default as details } from './details';
export { default as submit } from './submit';
export { default as cancel } from './cancel';
export { default as hideJob } from './hideJob';
export { default as unhideJob } from './unhideJob';
14 changes: 14 additions & 0 deletions src/tapis-api/jobs/unhideJob.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Jobs } from '@tapis/tapis-typescript';
import { apiGenerator, errorDecoder } from 'tapis-api/utils';

const unhideJob = (jobUuid: string, basePath: string, jwt: string) => {
const api: Jobs.JobsApi = apiGenerator<Jobs.JobsApi>(
Jobs,
Jobs.JobsApi,
basePath,
jwt
);
return errorDecoder<Jobs.RespHideJob>(() => api.unhideJob({ jobUuid }));
};

export default unhideJob;
14 changes: 14 additions & 0 deletions src/tapis-api/pods/deletePod.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Pods } from '@tapis/tapis-typescript';
import { apiGenerator, errorDecoder } from 'tapis-api/utils';

const deletePod = (podId: string, basePath: string, jwt: string) => {
const api: Pods.PodsApi = apiGenerator<Pods.PodsApi>(
Pods,
Pods.PodsApi,
basePath,
jwt
);
return errorDecoder<Pods.DeletePodResponse>(() => api.deletePod({ podId }));
};

export default deletePod;
14 changes: 14 additions & 0 deletions src/tapis-api/pods/details.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Pods } from '@tapis/tapis-typescript';
import { apiGenerator, errorDecoder } from 'tapis-api/utils';

const details = (params: Pods.GetPodRequest, basePath: string, jwt: string) => {
const api: Pods.PodsApi = apiGenerator<Pods.PodsApi>(
Pods,
Pods.PodsApi,
basePath,
jwt
);
return errorDecoder<Pods.PodResponse>(() => api.getPod(params));
};

export default details;
8 changes: 8 additions & 0 deletions src/tapis-api/pods/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export { default as list } from './list';
export { default as logs } from './logs';
export { default as details } from './details';
export { default as makeNewPod } from './makeNewPod';
export { default as deletePod } from './deletePod';
export { default as startPod } from './startPod';
export { default as restartPod } from './restartPod';
export { default as stopPod } from './stopPod';
14 changes: 14 additions & 0 deletions src/tapis-api/pods/list.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Pods } from '@tapis/tapis-typescript';
import { apiGenerator, errorDecoder } from 'tapis-api/utils';

const list = (params: {}, basePath: string, jwt: string) => {
const api: Pods.PodsApi = apiGenerator<Pods.PodsApi>(
Pods,
Pods.PodsApi,
basePath,
jwt
);
return errorDecoder<Pods.PodsResponse>(() => api.getPods());
};

export default list;
18 changes: 18 additions & 0 deletions src/tapis-api/pods/logs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Pods } from '@tapis/tapis-typescript';
import { apiGenerator, errorDecoder } from 'tapis-api/utils';

const logs = (
params: Pods.GetPodLogsRequest,
basePath: string,
jwt: string
) => {
const api: Pods.LogsApi = apiGenerator<Pods.LogsApi>(
Pods,
Pods.LogsApi,
basePath,
jwt
);
return errorDecoder<Pods.PodLogsResponse>(() => api.getPodLogs(params));
};

export default logs;
18 changes: 18 additions & 0 deletions src/tapis-api/pods/makeNewPod.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Pods } from '@tapis/tapis-typescript';
import { apiGenerator, errorDecoder } from 'tapis-api/utils';

const makeNewPod = (
reqCreatePod: Pods.CreatePodRequest,
basePath: string,
jwt: string
) => {
const api: Pods.PodsApi = apiGenerator<Pods.PodsApi>(
Pods,
Pods.PodsApi,
basePath,
jwt
);
return errorDecoder<Pods.PodResponse>(() => api.createPod(reqCreatePod));
};

export default makeNewPod;
14 changes: 14 additions & 0 deletions src/tapis-api/pods/restartPod.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Pods } from '@tapis/tapis-typescript';
import { apiGenerator, errorDecoder } from 'tapis-api/utils';

const restartPod = (podId: string, basePath: string, jwt: string) => {
const api: Pods.PodsApi = apiGenerator<Pods.PodsApi>(
Pods,
Pods.PodsApi,
basePath,
jwt
);
return errorDecoder<Pods.PodResponse>(() => api.restartPod({ podId }));
};

export default restartPod;
14 changes: 14 additions & 0 deletions src/tapis-api/pods/startPod.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Pods } from '@tapis/tapis-typescript';
import { apiGenerator, errorDecoder } from 'tapis-api/utils';

const startPod = (podId: string, basePath: string, jwt: string) => {
const api: Pods.PodsApi = apiGenerator<Pods.PodsApi>(
Pods,
Pods.PodsApi,
basePath,
jwt
);
return errorDecoder<Pods.PodResponse>(() => api.startPod({ podId }));
};

export default startPod;
14 changes: 14 additions & 0 deletions src/tapis-api/pods/stopPod.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Pods } from '@tapis/tapis-typescript';
import { apiGenerator, errorDecoder } from 'tapis-api/utils';

const stopPod = (podId: string, basePath: string, jwt: string) => {
const api: Pods.PodsApi = apiGenerator<Pods.PodsApi>(
Pods,
Pods.PodsApi,
basePath,
jwt
);
return errorDecoder<Pods.PodResponse>(() => api.stopPod({ podId }));
};

export default stopPod;
21 changes: 21 additions & 0 deletions src/tapis-api/systems/createChildSystem.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { Systems } from '@tapis/tapis-typescript';
import { apiGenerator, errorDecoder } from 'tapis-api/utils';

const createChildSystem = (
reqPostChildSystem: Systems.ReqPostChildSystem,
parentId: string,
basePath: string,
jwt: string
) => {
const api: Systems.ChildSystemsApi = apiGenerator<Systems.ChildSystemsApi>(
Systems,
Systems.ChildSystemsApi,
basePath,
jwt
);
return errorDecoder<Systems.RespBasic>(() =>
api.createChildSystem({ reqPostChildSystem, parentId })
);
};

export default createChildSystem;
14 changes: 14 additions & 0 deletions src/tapis-api/systems/deleteSystem.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Systems } from '@tapis/tapis-typescript';
import { apiGenerator, errorDecoder } from 'tapis-api/utils';

const deleteSystem = (systemId: string, basePath: string, jwt: string) => {
const api: Systems.SystemsApi = apiGenerator<Systems.SystemsApi>(
Systems,
Systems.SystemsApi,
basePath,
jwt
);
return errorDecoder<Systems.RespBasic>(() => api.deleteSystem({ systemId }));
};

export default deleteSystem;
6 changes: 6 additions & 0 deletions src/tapis-api/systems/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
export { default as list } from './list';
export { default as details } from './details';
export { default as listSchedulerProfiles } from './schedulerProfiles';
export { default as makeNewSystem } from './makeNewSystem';
export { default as deleteSystem } from './deleteSystem';
export { default as undeleteSystem } from './undeleteSystem';
export { default as shareSystemPublic } from './shareSystemPublic';
export { default as unShareSystemPublic } from './unShareSystemPublic';
export { default as createChildSystem } from './createChildSystem';
20 changes: 20 additions & 0 deletions src/tapis-api/systems/makeNewSystem.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { Systems } from '@tapis/tapis-typescript';
import { apiGenerator, errorDecoder } from 'tapis-api/utils';

const makeNewSystem = (
reqCreateSystem: Systems.CreateSystemRequest,
basePath: string,
jwt: string
) => {
const api: Systems.SystemsApi = apiGenerator<Systems.SystemsApi>(
Systems,
Systems.SystemsApi,
basePath,
jwt
);
return errorDecoder<Systems.RespBasic>(() =>
api.createSystem(reqCreateSystem)
);
};

export default makeNewSystem;
Loading

0 comments on commit a431ee6

Please sign in to comment.