Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Clowder V2 (In Development - Alpha Release)
# Clowder V2 (In Active Development)

*For the previous version of Clowder, please see [Clowder V1](https://github.com/clowder-framework/clowder).*

Expand Down
1 change: 1 addition & 0 deletions backend/app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class Settings(BaseSettings):
API_V2_STR: str = "/api/v2"
admin_email: str = "[email protected]"
frontend_url: str = "http://localhost:3000"
version: str = "2.0.0-beta.1"

# Unique secret for hashing API keys. Generate with `openssl rand -hex 32`
local_auth_secret = "clowder_secret_key"
Expand Down
15 changes: 13 additions & 2 deletions backend/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from app.models.users import UserDB, UserAPIKeyDB, ListenerAPIKeyDB
from app.models.visualization_config import VisualizationConfigDB
from app.models.visualization_data import VisualizationDataDB
from app.routers import folders, groups
from app.routers import folders, groups, status
from app.routers import (
users,
authorization,
Expand All @@ -57,7 +57,17 @@
logger = logging.getLogger(__name__)

app = FastAPI(
title=settings.APP_NAME, openapi_url=f"{settings.API_V2_STR}/openapi.json"
title=settings.APP_NAME,
openapi_url=f"{settings.API_V2_STR}/openapi.json",
description="A cloud native data management framework to support any research domain. Clowder was "
"developed to help researchers and scientists in data intensive domains manage raw data, complex "
"metadata, and automatic data pipelines. ",
version="2.0.0-beta.1",
contact={"name": "Clowder", "url": "https://clowderframework.org/"},
license_info={
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html",
},
)
BaseConfig.arbitrary_types_allowed = True

Expand Down Expand Up @@ -181,6 +191,7 @@
tags=["thumbnails"],
dependencies=[Depends(get_current_username)],
)
api_router.include_router(status.router, prefix="/status", tags=["status"])
api_router.include_router(keycloak.router, prefix="/auth", tags=["auth"])
app.include_router(api_router, prefix=settings.API_V2_STR)

Expand Down
7 changes: 7 additions & 0 deletions backend/app/models/status.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from pydantic import BaseModel

from app.config import settings


class Status(BaseModel):
version: str = settings.version
12 changes: 12 additions & 0 deletions backend/app/routers/status.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from fastapi import APIRouter
from fastapi.security import HTTPBearer

from app.models.status import Status

router = APIRouter()
security = HTTPBearer()


@router.get("", response_model=Status)
async def get_status():
return Status()
16 changes: 13 additions & 3 deletions frontend/src/components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { useEffect } from "react";
import { styled, useTheme } from "@mui/material/styles";
import Box from "@mui/material/Box";
import Drawer from "@mui/material/Drawer";
import CssBaseline from "@mui/material/CssBaseline";
import MuiAppBar, { AppBarProps as MuiAppBarProps } from "@mui/material/AppBar";
import Toolbar from "@mui/material/Toolbar";
import List from "@mui/material/List";
Expand All @@ -17,7 +16,7 @@ import ListItem from "@mui/material/ListItem";
import ListItemButton from "@mui/material/ListItemButton";
import ListItemIcon from "@mui/material/ListItemIcon";
import ListItemText from "@mui/material/ListItemText";
import { Link, Menu, MenuItem, MenuList } from "@mui/material";
import { Link, Menu, MenuItem, MenuList, Typography } from "@mui/material";
import { Link as RouterLink, useLocation } from "react-router-dom";
import { useSelector } from "react-redux";
import { RootState } from "../types/data";
Expand Down Expand Up @@ -136,7 +135,6 @@ export default function PersistentDrawerLeft(props) {
// @ts-ignore
return (
<Box sx={{ display: "flex" }}>
<CssBaseline />
<AppBar position="fixed" open={open}>
<Toolbar>
<IconButton
Expand Down Expand Up @@ -327,6 +325,18 @@ export default function PersistentDrawerLeft(props) {
<Main open={open}>
<DrawerHeader />
{children}
<Box
sx={{
position: "fixed",
bottom: "0px",
minHeight: "30px",
width: "100%",
}}
>
<Typography variant="body2" color="primary.light">
v2.0.0-beta.1
</Typography>
</Box>
</Main>
</Box>
);
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/openapi/v2/core/OpenAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type Config = {

export const OpenAPI: Config = {
BASE: '',
VERSION: '0.1.0',
VERSION: '2.0.0-beta.1',
WITH_CREDENTIALS: false,
CREDENTIALS: 'include',
TOKEN: undefined,
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/openapi/v2/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export type { Repository } from './models/Repository';
export { RoleType } from './models/RoleType';
export type { SearchCriteria } from './models/SearchCriteria';
export type { SearchObject } from './models/SearchObject';
export type { Status } from './models/Status';
export type { ThumbnailOut } from './models/ThumbnailOut';
export type { UserAndRole } from './models/UserAndRole';
export type { UserAPIKeyOut } from './models/UserAPIKeyOut';
Expand All @@ -81,6 +82,7 @@ export { ListenersService } from './services/ListenersService';
export { LoginService } from './services/LoginService';
export { MetadataService } from './services/MetadataService';
export { ServiceService } from './services/ServiceService';
export { StatusService } from './services/StatusService';
export { ThumbnailsService } from './services/ThumbnailsService';
export { UsersService } from './services/UsersService';
export { VisualizationsService } from './services/VisualizationsService';
7 changes: 7 additions & 0 deletions frontend/src/openapi/v2/models/Status.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

export type Status = {
version?: string;
}
22 changes: 22 additions & 0 deletions frontend/src/openapi/v2/services/StatusService.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { Status } from '../models/Status';
import type { CancelablePromise } from '../core/CancelablePromise';
import { request as __request } from '../core/request';

export class StatusService {

/**
* Get Status
* @returns Status Successful Response
* @throws ApiError
*/
public static getStatusApiV2StatusGet(): CancelablePromise<Status> {
return __request({
method: 'GET',
path: `/api/v2/status`,
});
}

}