Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
07ed310
deploy grafana
leon-liang Jul 18, 2025
cedd128
deploy grafana
leon-liang Jul 18, 2025
49abb6e
deploy grafana
leon-liang Jul 18, 2025
31469c1
change chart
leon-liang Jul 18, 2025
7e0b848
add username password
leon-liang Jul 18, 2025
4adc86e
add prometheus
leon-liang Jul 18, 2025
31b1234
disable kube-state-metrics
leon-liang Jul 18, 2025
f23010e
disable prometheus-node-exporter
leon-liang Jul 18, 2025
8022ed3
add loki
leon-liang Jul 19, 2025
cdefd1f
enable minio
leon-liang Jul 19, 2025
f48cde8
configure schema config
leon-liang Jul 19, 2025
8a200d5
configure schema config
leon-liang Jul 19, 2025
119a8de
configure schema config
leon-liang Jul 19, 2025
2aa9337
configure schema config
leon-liang Jul 19, 2025
46d8a9d
configure loki
leon-liang Jul 19, 2025
2f1c90d
configure loki
leon-liang Jul 19, 2025
b312a53
rename to schemaConfig
leon-liang Jul 19, 2025
278e2a9
loki deployment
leon-liang Jul 19, 2025
0a8d65a
loki deployment
leon-liang Jul 19, 2025
f9aaf3c
loki deployment
leon-liang Jul 19, 2025
d080efb
loki deployment
leon-liang Jul 19, 2025
286bfc2
loki deployment
leon-liang Jul 19, 2025
24586ef
loki deployment
leon-liang Jul 19, 2025
10e2f60
loki deployment
leon-liang Jul 19, 2025
69965de
loki deployment
leon-liang Jul 19, 2025
71900d3
loki deployment
leon-liang Jul 19, 2025
a927572
loki deployment
leon-liang Jul 19, 2025
3700625
downgrade loki
leon-liang Jul 19, 2025
48e8b3f
loki deployment
leon-liang Jul 19, 2025
fbd3985
remove loki
leon-liang Jul 19, 2025
08baf92
çonfigure grafana and prometheus
leon-liang Jul 19, 2025
1c41667
çonfigure grafana and prometheus
leon-liang Jul 19, 2025
c703353
reduce helm chart size
leon-liang Jul 19, 2025
36934a2
add datasources
leon-liang Jul 19, 2025
2b5848c
add new helm chart
leon-liang Jul 19, 2025
72608cf
add new helm chart
leon-liang Jul 19, 2025
bcd4b4b
add new helm chart
leon-liang Jul 19, 2025
a1df2b6
cleanup
leon-liang Jul 19, 2025
50f3cd4
fix
leon-liang Jul 19, 2025
c682ebf
fix
leon-liang Jul 19, 2025
9e8b1b9
fix
leon-liang Jul 19, 2025
27f141f
fix
leon-liang Jul 19, 2025
7fb84ff
fix
leon-liang Jul 19, 2025
80ef5b0
fix
leon-liang Jul 19, 2025
8c01394
fix
leon-liang Jul 19, 2025
7decd52
fix
leon-liang Jul 19, 2025
b18eafe
fix
leon-liang Jul 19, 2025
d6db648
fix
leon-liang Jul 19, 2025
ce43865
fix
leon-liang Jul 19, 2025
3b10f7e
fix
leon-liang Jul 19, 2025
dbcae01
fix
leon-liang Jul 19, 2025
afabd8b
fix
leon-liang Jul 19, 2025
9e59316
fix
leon-liang Jul 19, 2025
eeb2081
fix
leon-liang Jul 19, 2025
b1e186a
fix
leon-liang Jul 19, 2025
c9a8498
fix
leon-liang Jul 19, 2025
1ce4d8b
fix
leon-liang Jul 19, 2025
7036747
fix
leon-liang Jul 19, 2025
c7bdb6b
fix
leon-liang Jul 19, 2025
b4b0846
fix
leon-liang Jul 19, 2025
aac3237
fix
leon-liang Jul 19, 2025
8138c7c
fix
leon-liang Jul 19, 2025
653ad91
fix
leon-liang Jul 19, 2025
282144b
fix
leon-liang Jul 19, 2025
019a953
fix
leon-liang Jul 19, 2025
4509d82
fix
leon-liang Jul 19, 2025
e01b5af
fix
leon-liang Jul 19, 2025
c860e7d
fix
leon-liang Jul 19, 2025
41ac1e4
fix
leon-liang Jul 19, 2025
839df43
fix
leon-liang Jul 19, 2025
b3727d6
fix
leon-liang Jul 19, 2025
3a34fcc
fix
leon-liang Jul 19, 2025
6e2fa64
fix
leon-liang Jul 19, 2025
a27bd3c
fix
leon-liang Jul 19, 2025
a39ff47
add genai dashboard
leon-liang Jul 19, 2025
bed51a0
Merge branch 'develop' into 89-deploy-observability-stack-to-k8s
leon-liang Jul 19, 2025
edfd87f
add genai dashboard
leon-liang Jul 19, 2025
7082d39
lint
leon-liang Jul 19, 2025
6e38d43
mount genai dashboard config
leon-liang Jul 20, 2025
0713636
fix
leon-liang Jul 20, 2025
d21d0b3
fix
leon-liang Jul 20, 2025
b4b6f4a
fix
leon-liang Jul 20, 2025
b5eaa2a
add metrics to realtime service, connect to prometheus
leon-liang Jul 20, 2025
3f0136d
add API token analytics to genai dashboard
leon-liang Jul 20, 2025
a4c7b76
fix generated client
leon-liang Jul 20, 2025
15e96c1
fix generated client
leon-liang Jul 20, 2025
133f79f
add mailhog
leon-liang Jul 20, 2025
34f8d5d
fix deployment
leon-liang Jul 20, 2025
e5cb9b3
add alertmanager
leon-liang Jul 20, 2025
e012d54
Merge branch 'develop' into 89-deploy-observability-stack-to-k8s
leon-liang Jul 20, 2025
8b336a8
fix
leon-liang Jul 20, 2025
90e8ff3
alerts
leon-liang Jul 20, 2025
a479dfe
remove tpl
leon-liang Jul 20, 2025
83f0710
fix
leon-liang Jul 20, 2025
f869a56
fix
leon-liang Jul 20, 2025
a5b2d13
fix rules files path
leon-liang Jul 20, 2025
2dc38b5
fix template
leon-liang Jul 20, 2025
0bbae45
fix template
leon-liang Jul 20, 2025
c26f270
create realtime grafana dashboard
Jul 20, 2025
f05e3c6
setup alertmanager locally
leon-liang Jul 20, 2025
2d3d6b4
Merge remote-tracking branch 'origin/89-deploy-observability-stack-to…
leon-liang Jul 20, 2025
0f7e95d
fix grafana dashboard
leon-liang Jul 20, 2025
91ade74
final commit
leon-liang Jul 20, 2025
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
3 changes: 0 additions & 3 deletions .github/workflows/client-linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,3 @@ jobs:
- name: Run Type Check
run: npx --package=typescript@latest -- tsc --build .
working-directory: client



26 changes: 24 additions & 2 deletions .github/workflows/deploy-to-k8s.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ jobs:
build-args: API_URL=${{ needs.setup.outputs.api_url }}
platforms: linux/amd64


deploy:
needs:
- build-client
Expand Down Expand Up @@ -248,6 +247,7 @@ jobs:
AUTH_URL=auth.whiteboard.student.k8s.aet.cit.tum.de
GENAI_URL=genai.whiteboard.student.k8s.aet.cit.tum.de
REALTIME_URL=realtime.whiteboard.student.k8s.aet.cit.tum.de
METRICS_URL=metrics.whiteboard.student.k8s.aet.cit.tum.de
echo "NAMESPACE=production" >> $GITHUB_ENV
echo "IMAGE_TAG=latest" >> $GITHUB_ENV
echo "VALUES_FILE=./infrastructure/whiteboard-app/production.values.yaml" >> $GITHUB_ENV
Expand All @@ -261,6 +261,7 @@ jobs:
AUTH_URL=staging.auth.whiteboard.student.k8s.aet.cit.tum.de
GENAI_URL=staging.genai.whiteboard.student.k8s.aet.cit.tum.de
REALTIME_URL=staging.realtime.whiteboard.student.k8s.aet.cit.tum.de
METRICS_URL=staging.metrics.whiteboard.student.k8s.aet.cit.tum.de
echo "NAMESPACE=staging" >> $GITHUB_ENV
echo "IMAGE_TAG=develop" >> $GITHUB_ENV
echo "VALUES_FILE=./infrastructure/whiteboard-app/staging.values.yaml" >> $GITHUB_ENV
Expand All @@ -275,6 +276,7 @@ jobs:
AUTH_URL=$BRANCH_SAFE.auth.whiteboard.student.k8s.aet.cit.tum.de
GENAI_URL=$BRANCH_SAFE.genai.whiteboard.student.k8s.aet.cit.tum.de
REALTIME_URL=$BRANCH_SAFE.realtime.whiteboard.student.k8s.aet.cit.tum.de
METRICS_URL=$BRANCH_SAFE.metrics.whiteboard.student.k8s.aet.cit.tum.de
echo "NAMESPACE=$BRANCH_SAFE" >> $GITHUB_ENV
echo "IMAGE_TAG=$BRANCH_SAFE" >> $GITHUB_ENV
echo "VALUES_FILE=./infrastructure/whiteboard-app/pullrequest.values.yaml" >> $GITHUB_ENV
Expand All @@ -290,6 +292,7 @@ jobs:
echo "GENAI_URL=$GENAI_URL" >> $GITHUB_ENV
echo "OPEN_WEB_UI_API_KEY=${{ secrets.OPEN_WEB_UI_API_KEY }}" >> $GITHUB_ENV
echo "REALTIME_URL=$REALTIME_URL" >> $GITHUB_ENV
echo "METRICS_URL=$METRICS_URL" >> $GITHUB_ENV
echo "KEYCLOAK_CLIENT_SECRET=$KEYCLOAK_CLIENT_SECRET" >> $GITHUB_ENV
echo "NEXTAUTH_SECRET=$NEXTAUTH_SECRET" >> $GITHUB_ENV
echo "POSTGRESQL_SECRET=$POSTGRESQL_SECRET" >> $GITHUB_ENV
Expand All @@ -313,15 +316,17 @@ jobs:

if [[ "$BRANCH" == "main" ]]; then
RELEASE_NAME="whiteboard-production"
OBSERVABILITY_RELEASE_NAME="whiteboard-observability-production"
elif [[ "$BRANCH" == "develop" ]]; then
RELEASE_NAME="whiteboard-staging"
OBSERVABILITY_RELEASE_NAME="whiteboard-observability-staging"
else
PR_NUMBER=${{ github.event.pull_request.number }}
RELEASE_NAME="whiteboard-pr-${PR_NUMBER}"
fi

echo "RELEASE_NAME=${RELEASE_NAME}" >> $GITHUB_ENV
echo "release-name=${RELEASE_NAME}" >> $GITHUB_OUTPUT
echo "OBSERVABILITY_RELEASE_NAME=${OBSERVABILITY_RELEASE_NAME}" >> $GITHUB_ENV

- name: Install Helm
uses: azure/setup-helm@v3
Expand Down Expand Up @@ -352,6 +357,23 @@ jobs:
--set keycloak.externalDatabase.password="${{ env.POSTGRESQL_SECRET }}" \
--set keycloak.auth.adminPassword="${{ env.KEYCLOAK_SECRET }}" \

- name: Deploy Observability Stack with Helm
if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main'
run: |
helm upgrade ${{ env.OBSERVABILITY_RELEASE_NAME }} ./infrastructure/whiteboard-observability/ \
-f ${{ env.VALUES_FILE }} \
-n tsd-${{ env.NAMESPACE }} \
--create-namespace \
--install \
--atomic \
--kubeconfig ${{ env.KUBECONFIG }} \
--set namespace="${{ env.NAMESPACE }}" \
--set client.url="${{ env.CLIENT_URL }}" \
--set server.url="${{ env.SERVER_URL }}" \
--set genai.url="${{ env.GENAI_URL }}" \
--set realtime.url="${{ env.REALTIME_URL }}" \
--set metrics.url="${{ env.METRICS_URL }}"

comment-pr:
needs: deploy
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/genai-linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
run: |
cd genai
ruff check .

- name: GenAI format (auto-fix)
run: |
cd genai
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/genai-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
uv pip install -r ./genai/requirements.txt --system

- name: GenAI tests
env:
env:
OPEN_WEB_UI_API_KEY: ${{ secrets.OPEN_WEB_UI_API_KEY }}
API_URL: ${{ vars.API_URL }}
run: |
Expand Down
93 changes: 91 additions & 2 deletions client/src/api/genai/generated/api.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 45 additions & 0 deletions client/src/api/genai/generated/docs/DefaultApi.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/src/api/genai/generated/docs/TextRequest.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions client/src/components/style-bar/StyleBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ const StyleBar = ({
let data;

if (action === "rephrase") {
data = await rephraseText({ user_text: [selectedNodeLabel] });
data = await rephraseText({ user_text: selectedNodeLabel });
} else if (action === "complete") {
data = await completeText({ user_text: [selectedNodeLabel] });
data = await completeText({ user_text: selectedNodeLabel });
} else {
data = await summarizedText({ user_text: [selectedNodeLabel] });
data = await summarizedText({ user_text: selectedNodeLabel });
}

const llmResponse = data.llm_response;
Expand Down
32 changes: 11 additions & 21 deletions client/src/components/text-node/TextNode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ import {
Position,
useReactFlow,
} from "@xyflow/react";
import { Eye, EyeOff } from "lucide-react";
import { Button } from "@/components/ui/button";
import {
getFontStyle,
handleStyle,
NodeProperties,
} from "@/types/NodeProperties";
import StyleBar from "@/components/style-bar/StyleBar";
import { updateNode } from "@/util/updateNode";
import { useAmIOwner } from "@/hooks/api/whiteboard.api";
import { useGetMe } from "@/hooks/api/account.api";
import { useParams } from "next/navigation";

interface TextNodeProps extends NodeProps {
id: string;
Expand All @@ -40,9 +41,14 @@ function hexToRgb(hex: string) {
export default function TextNode({ id, data, selected }: TextNodeProps) {
const [isEditing, setIsEditing] = useState(false);
const [text, setText] = useState<string>(data.label as string);
const [showStyleBar, setShowStyleBar] = useState(true);
const { setNodes } = useReactFlow();

const params = useParams();
const whiteboardId = Number(params.id);

const { data: user } = useGetMe();
const { data: isOwner } = useAmIOwner(whiteboardId, user?.id);

const { nodeProperties, label } = data;
const bgRgb = hexToRgb(nodeProperties.color);
const borderRgb = hexToRgb(nodeProperties.borderColor);
Expand All @@ -68,7 +74,7 @@ export default function TextNode({ id, data, selected }: TextNodeProps) {

return (
<>
{showStyleBar && (
{isOwner && (
<NodeToolbar isVisible={selected} position={Position.Top}>
<StyleBar
nodeProperties={nodeProperties}
Expand All @@ -83,29 +89,13 @@ export default function TextNode({ id, data, selected }: TextNodeProps) {
</NodeToolbar>
)}

<NodeToolbar position={Position.Right}>
<div className="mt-2">
<Button
variant="ghost"
size="sm"
onClick={() => setShowStyleBar(!showStyleBar)}
className="h-7 w-7 p-1"
>
{showStyleBar ? (
<Eye className="h-4 w-4" />
) : (
<EyeOff className="h-4 w-4" />
)}
</Button>
</div>
</NodeToolbar>

<NodeResizer
color="#3859ff"
isVisible={selected}
minWidth={100}
minHeight={50}
/>

<div className="h-full w-full">
<div
className="flex h-full w-full items-center justify-center p-4"
Expand Down
Loading
Loading