Skip to content

Commit

Permalink
Added types for notebookimage and status (opendatahub-io#147)
Browse files Browse the repository at this point in the history
Updated with REST api notebook image endpoints and new notebook image types.
Updated REST API  (opendatahub-io#155)

* Updated with REST API design changes.

Fixed formatting error.

* Update backend/src/types.ts

Co-authored-by: Tom Coufal <[email protected]>

Co-authored-by: Tom Coufal <[email protected]>
Updated type.ts in front end with Succeeded
[byon] Implement backend (opendatahub-io#156)

* feat(byon): List all notebooks

Signed-off-by: Tomas Coufal <[email protected]>

* feat(byon): Get single notebook

Signed-off-by: Tomas Coufal <[email protected]>

* fix(byon): Update api spec to include software and id

Signed-off-by: Tomas Coufal <[email protected]>

* feat(byon): Schedule new notebook import

Signed-off-by: Tomas Coufal <[email protected]>

* feat(byon): Delete notebook

Signed-off-by: Tomas Coufal <[email protected]>

* feat(byon): Update notebook

Signed-off-by: Tomas Coufal <[email protected]>
Rebased BYON from master (opendatahub-io#162)

* Updated way that to detect an admin. (opendatahub-io#137)

Fixed linting error.

* Update backend port setting and makefile dev commands. (opendatahub-io#133)

* Update README.md (opendatahub-io#96)

Updated Readme to specify that a build is required prior to running the development server.

* Fix for input not allowing blank spaces.:

Fix to allow a user to enter an empty string.

Fixed with review comment.

* Add culler timeout settings feature (opendatahub-io#134)

* Added types for notebookimage and status (opendatahub-io#147)

Updated with REST api notebook image endpoints and new notebook image types.

* Updated REST API  (opendatahub-io#155)

* Updated with REST API design changes.

Fixed formatting error.

* Update backend/src/types.ts

Co-authored-by: Tom Coufal <[email protected]>

Co-authored-by: Tom Coufal <[email protected]>

* Updated type.ts in front end with Succeeded

* [byon] Implement backend (opendatahub-io#156)

* feat(byon): List all notebooks

Signed-off-by: Tomas Coufal <[email protected]>

* feat(byon): Get single notebook

Signed-off-by: Tomas Coufal <[email protected]>

* fix(byon): Update api spec to include software and id

Signed-off-by: Tomas Coufal <[email protected]>

* feat(byon): Schedule new notebook import

Signed-off-by: Tomas Coufal <[email protected]>

* feat(byon): Delete notebook

Signed-off-by: Tomas Coufal <[email protected]>

* feat(byon): Update notebook

Signed-off-by: Tomas Coufal <[email protected]>

Co-authored-by: Christopher Chase <[email protected]>
Co-authored-by: Chad Roberts <[email protected]>
Co-authored-by: Juntao Wang <[email protected]>
Co-authored-by: Tom Coufal <[email protected]>
fix(byon): Use notebook-image label for visibility toggle (opendatahub-io#169)

Signed-off-by: Tomas Coufal <[email protected]>
feat(byon): Feat add creator annotation (opendatahub-io#170)

Signed-off-by: Tomas Coufal <[email protected]>
feat(byon): Allow to patch name and description on notebook (opendatahub-io#172)

Signed-off-by: Tomas Coufal <[email protected]>
feat(byon): Allow python dependency visibility field changes (opendatahub-io#173)

Signed-off-by: Tomas Coufal <[email protected]>
Added code for importing byon image. (opendatahub-io#171)

Updated front end code with import and start of table.
Updated with byon changes

Updated code with byon ui changes.
Integrated import, delete, and get functionality for notebooks.

Added start of edit panel.

Updated build error fixes.

Updates to edit dialog and linting cleanup.

Added sort to table.

Added filtering.

Added failure warning to allow user to click

Add check disable enabling failed notebook images

Fixed with review comments.

Fixed time bug.

Removed admin
Update backend port setting and makefile dev commands. (opendatahub-io#133)
Use webpack dev server proxy instead of CORS utilities (opendatahub-io#127)


Fixed issues with cherry picks.
  • Loading branch information
dlabaj committed Apr 8, 2022
1 parent cf6e7d6 commit 8ffb829
Show file tree
Hide file tree
Showing 45 changed files with 1,497 additions and 212 deletions.
16 changes: 0 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,6 @@ reinstall: build push undeploy deploy

##################################

# DEV - run apps locally for development

.PHONY: dev-frontend
dev-frontend:
./install/dev-frontend.sh

.PHONY: dev-backend
dev-backend:
./install/dev-backend.sh

.PHONY: dev
dev:
./install/dev.sh

##################################

# BUILD - build image locally using s2i

.PHONY: build
Expand Down
8 changes: 0 additions & 8 deletions backend/src/routes/api/builds/index.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
import { KubeFastifyInstance } from '../../../types';
import { FastifyReply, FastifyRequest } from 'fastify';
import { DEV_MODE } from '../../../utils/constants';
import { addCORSHeader } from '../../../utils/responseUtils';
import { listBuilds } from './list';

module.exports = async (fastify: KubeFastifyInstance) => {
fastify.get('/', async (request: FastifyRequest, reply: FastifyReply) => {
return listBuilds()
.then((res) => {
if (DEV_MODE) {
addCORSHeader(request, reply);
}
return res;
})
.catch((res) => {
if (DEV_MODE) {
addCORSHeader(request, reply);
}
reply.send(res);
});
});
Expand Down
14 changes: 0 additions & 14 deletions backend/src/routes/api/cluster-settings/index.ts
Original file line number Diff line number Diff line change
@@ -1,37 +1,23 @@
import { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify';
import { DEV_MODE } from '../../../utils/constants';
import { addCORSHeader } from '../../../utils/responseUtils';
import { getClusterSettings, updateClusterSettings } from './clusterSettingsUtils';

export default async (fastify: FastifyInstance): Promise<void> => {
fastify.get('/', async (request: FastifyRequest, reply: FastifyReply) => {
return getClusterSettings(fastify)
.then((res) => {
if (DEV_MODE) {
addCORSHeader(request, reply);
}
return res;
})
.catch((res) => {
if (DEV_MODE) {
addCORSHeader(request, reply);
}
reply.send(res);
});
});

fastify.get('/update', async (request: FastifyRequest, reply: FastifyReply) => {
return updateClusterSettings(fastify, request)
.then((res) => {
if (DEV_MODE) {
addCORSHeader(request, reply);
}
return res;
})
.catch((res) => {
if (DEV_MODE) {
addCORSHeader(request, reply);
}
reply.send(res);
});
});
Expand Down
14 changes: 0 additions & 14 deletions backend/src/routes/api/components/index.ts
Original file line number Diff line number Diff line change
@@ -1,38 +1,24 @@
import { KubeFastifyInstance } from '../../../types';
import { FastifyReply, FastifyRequest } from 'fastify';
import { DEV_MODE } from '../../../utils/constants';
import { addCORSHeader } from '../../../utils/responseUtils';
import { listComponents, removeComponent } from './list';

module.exports = async (fastify: KubeFastifyInstance) => {
fastify.get('/', async (request: FastifyRequest, reply: FastifyReply) => {
return listComponents(fastify, request)
.then((res) => {
if (DEV_MODE) {
addCORSHeader(request, reply);
}
return res;
})
.catch((res) => {
if (DEV_MODE) {
addCORSHeader(request, reply);
}
reply.send(res);
});
});

fastify.get('/remove', async (request: FastifyRequest, reply: FastifyReply) => {
return removeComponent(fastify, request)
.then((res) => {
if (DEV_MODE) {
addCORSHeader(request, reply);
}
return res;
})
.catch((res) => {
if (DEV_MODE) {
addCORSHeader(request, reply);
}
reply.send(res);
});
});
Expand Down
5 changes: 0 additions & 5 deletions backend/src/routes/api/config/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
import { KubeFastifyInstance } from '../../../types';
import { FastifyReply, FastifyRequest } from 'fastify';
import { DEV_MODE } from '../../../utils/constants';
import { addCORSHeader } from '../../../utils/responseUtils';
import { getDashboardConfig } from '../../../utils/resourceUtils';

module.exports = async (fastify: KubeFastifyInstance) => {
fastify.get('/', async (request: FastifyRequest, reply: FastifyReply) => {
if (DEV_MODE) {
addCORSHeader(request, reply);
}
reply.send(getDashboardConfig());
});
};
8 changes: 0 additions & 8 deletions backend/src/routes/api/console-links/index.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
import { KubeFastifyInstance } from '../../../types';
import { FastifyReply, FastifyRequest } from 'fastify';
import { DEV_MODE } from '../../../utils/constants';
import { addCORSHeader } from '../../../utils/responseUtils';
import { listConsoleLinks } from './list';

module.exports = async (fastify: KubeFastifyInstance) => {
fastify.get('/', async (request: FastifyRequest, reply: FastifyReply) => {
return listConsoleLinks()
.then((res) => {
if (DEV_MODE) {
addCORSHeader(request, reply);
}
return res;
})
.catch((res) => {
if (DEV_MODE) {
addCORSHeader(request, reply);
}
reply.send(res);
});
});
Expand Down
8 changes: 0 additions & 8 deletions backend/src/routes/api/docs/index.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
import { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify';
import { DEV_MODE } from '../../../utils/constants';
import { addCORSHeader } from '../../../utils/responseUtils';
import { listDocs } from './list';

export default async (fastify: FastifyInstance): Promise<void> => {
fastify.get('/', async (request: FastifyRequest, reply: FastifyReply) => {
return listDocs(fastify, request)
.then((res) => {
if (DEV_MODE) {
addCORSHeader(request, reply);
}
return res;
})
.catch((res) => {
if (DEV_MODE) {
addCORSHeader(request, reply);
}
reply.send(res);
});
});
Expand Down
8 changes: 0 additions & 8 deletions backend/src/routes/api/getting-started/index.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
import { FastifyInstance } from 'fastify';
import { OdhGettingStarted } from '../../../types';
import { DEV_MODE } from '../../../utils/constants';
import { addCORSHeader } from '../../../utils/responseUtils';
import { listGettingStartedDocs } from './list';

export default async (fastify: FastifyInstance): Promise<void> => {
fastify.get('/', async (request, reply) => {
return listGettingStartedDocs(request)
.then((res: OdhGettingStarted[]) => {
if (DEV_MODE) {
addCORSHeader(request, reply);
}
return res;
})
.catch((res) => {
if (DEV_MODE) {
addCORSHeader(request, reply);
}
reply.send(res);
});
});
Expand Down
60 changes: 60 additions & 0 deletions backend/src/routes/api/notebook/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify';
import {
addNotebook,
deleteNotebook,
getNotebook,
getNotebooks,
updateNotebook,
} from './notebooksUtils';

export default async (fastify: FastifyInstance): Promise<void> => {
fastify.get('/', async (request: FastifyRequest, reply: FastifyReply) => {
return getNotebooks(fastify)
.then((res) => {
return res;
})
.catch((res) => {
reply.send(res);
});
});

fastify.get('/:notebook', async (request: FastifyRequest, reply: FastifyReply) => {
return getNotebook(fastify, request)
.then((res) => {
return res;
})
.catch((res) => {
reply.send(res);
});
});

fastify.delete('/:notebook', async (request: FastifyRequest, reply: FastifyReply) => {
return deleteNotebook(fastify, request)
.then((res) => {
return res;
})
.catch((res) => {
reply.send(res);
});
});

fastify.put('/:notebook', async (request: FastifyRequest, reply: FastifyReply) => {
return updateNotebook(fastify, request)
.then((res) => {
return res;
})
.catch((res) => {
reply.send(res);
});
});

fastify.post('/', async (request: FastifyRequest, reply: FastifyReply) => {
return addNotebook(fastify, request)
.then((res) => {
return res;
})
.catch((res) => {
reply.send(res);
});
});
};
Loading

0 comments on commit 8ffb829

Please sign in to comment.