Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Add Upload Files Api On The Front End #118

Merged
merged 1 commit into from
Jun 5, 2024
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
10 changes: 0 additions & 10 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ services:
- ./redis-data:/data

zookeeper:
image: "confluentinc/cp-zookeeper:latest"
image: "confluentinc/cp-zookeeper:latest"
ports:
- "2181:2181"
Expand All @@ -39,21 +38,14 @@ services:
- ZOOKEEPER_TICK_TIME=2000
volumes:
- ./log4j.properties:/opt/bitnami/zookeeper/conf/log4j.properties
- ZOOKEEPER_CLIENT_PORT=2181
- ZOOKEEPER_TICK_TIME=2000
volumes:
- ./log4j.properties:/opt/bitnami/zookeeper/conf/log4j.properties

kafka:
image: confluentinc/cp-kafka:latest
image: confluentinc/cp-kafka:latest
user: root
ports:
- "9092:9092"
depends_on:
- zookeeper
depends_on:
- zookeeper
environment:
- KAFKA_BROKER_ID=1
- KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1
Expand All @@ -62,11 +54,9 @@ services:
- KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_LOG4J_LOGGERS=org.apache.zookeeper=ERROR,org.apache.kafka=ERROR,kafka=ERROR,kafka.cluster=ERROR,kafka.controller=ERROR,kafka.coordinator=ERROR,kafka.log=ERROR,kafka.server=ERROR,kafka.zookeeper=ERROR,state.change.logger=ERROR
- KAFKA_LOG4J_LOGGERS=org.apache.zookeeper=ERROR,org.apache.kafka=ERROR,kafka=ERROR,kafka.cluster=ERROR,kafka.controller=ERROR,kafka.coordinator=ERROR,kafka.log=ERROR,kafka.server=ERROR,kafka.zookeeper=ERROR,state.change.logger=ERROR
volumes:
- ./Kafka:/bitnami/kafka
- ./log4j.properties:/etc/kafka/log4j.properties
- ./log4j.properties:/etc/kafka/log4j.properties

ocular-db:
image: postgres:14-alpine
Expand Down
10 changes: 10 additions & 0 deletions packages/ocular-ui/services/admin-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@ export default {
return ocularRequest('GET', path);
},
},
files: {
upload(files) {
const formData = new FormData()
for (const f of files) {
formData.append("files", f)
}
const path = `/admin/files`;
return ocularRequest('POST', path,formData);
},
},
organisation: {
retrive(id, search = {}) {
const params = Object.keys(search)
Expand Down
11 changes: 0 additions & 11 deletions packages/ocular/core-config-dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,6 @@ module.exports = {
redis_url: process.env.REDIS_URL,
kafka_url: process.env.KAFKA_URL,
ui_cors: UI_CORS,
azure_open_ai_options: {
apiKey: process.env.AZURE_OPENAI_API_KEY,
serviceName: process.env.AZURE_OPEN_AI_SERVICE_NAME,
apiVersion: process.env.AZURE_OPENAI_API_VERSION,
deploymentName: process.env.AZURE_OPENAI_DEPLOYMENT_NAME,
openAIModel: "gpt-4",
},
},
apps: [
{
Expand All @@ -60,12 +53,10 @@ module.exports = {
scope: "openid email profile",
redirect_uri: `${UI_CORS}/dashboard/marketplace/asana`,
auth_strategy: AppAuthStrategy.OAUTH_TOKEN_STRATEGY,
auth_strategy: AppAuthStrategy.OAUTH_TOKEN_STRATEGY,
rate_limiter_opts: {
requests: 1500, // Number of Requests
interval: 60, // Interval in Seconds
},
auth_strategy: AppAuthStrategy.OAUTH_TOKEN_STRATEGY,
},
},
{
Expand Down Expand Up @@ -148,12 +139,10 @@ module.exports = {
client_secret: process.env.GOOGLE_CLIENT_SECRET,
redirect_uri: `${UI_CORS}/dashboard/marketplace/google-drive`,
auth_strategy: AppAuthStrategy.OAUTH_TOKEN_STRATEGY,
auth_strategy: AppAuthStrategy.OAUTH_TOKEN_STRATEGY,
rate_limiter_opts: {
requests: 60, // Number of Requests
interval: 60, // Interval in Seconds
},
auth_strategy: AppAuthStrategy.OAUTH_TOKEN_STRATEGY,
},
},
{
Expand Down
2 changes: 1 addition & 1 deletion turbo.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://turbo.build/schema.json",
"pipeline": {
"tasks": {
"build": {
"dependsOn": ["^build"],
"outputs": [".next/**", "!.next/cache/**"]
Expand Down