Skip to content
Open
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
pgdata
dist
node_modules/
history
history
package-lock.json
18 changes: 9 additions & 9 deletions api/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ services:
# HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
# HASURA_GRAPHQL_ADMIN_SECRET: ${HASURA_ADMIN_PASS}

templater:
image: sha256:a8e39ea135548eacb2d6277d6a67d9e36d0da2d1130042bc6eff6646e7e1854b
ports:
- '3007:3000'
depends_on:
- templaterDb
restart: always
environment:
DATABASE_URL: ${DATABASE_URL}
# templater:
# image: sha256:a8e39ea135548eacb2d6277d6a67d9e36d0da2d1130042bc6eff6646e7e1854b
# ports:
# - '3007:3000'
# depends_on:
# - templaterDb
# restart: always
# environment:
# DATABASE_URL: ${DATABASE_URL}
5 changes: 3 additions & 2 deletions api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,17 @@
"@nestjs/platform-express": "^8.0.0",
"@nestjs/platform-fastify": "^8.2.6",
"@nestjs/swagger": "^5.1.5",
"@prisma/client": "3.5.0",
"@prisma/client": "4.3.1",
"@types/nunjucks": "^3.2.1",
"ejs": "^3.1.6",
"fastify-cors": "^6.0.3",
"fastify-swagger": "^4.15.0",
"json-bigint": "^1.0.0",
"nunjucks": "^3.2.3",
"parse-json": "^6.0.2",
"passport-google-oauth20": "^2.0.0",
"passport-jwt": "^4.0.0",
"prisma": "3.5.0",
"prisma": "4.3.1",
"reflect-metadata": "^0.1.13",
"rimraf": "^3.0.2",
"rxjs": "^7.2.0",
Expand Down
23 changes: 22 additions & 1 deletion ui/src/layouts/template.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import AceEditor, { IAceOptions } from 'react-ace';
import 'ace-builds/src-noconflict/mode-json';
import 'ace-builds/src-noconflict/theme-github';
import 'ace-builds/webpack-resolver';
import { Box, SimpleGrid } from '@chakra-ui/react';
import { QueryClient, QueryClientProvider, useQuery } from 'react-query';
import axios, { AxiosResponse } from 'axios';
Expand Down Expand Up @@ -34,6 +37,7 @@ export function BodyEditor(props: any) {
enableSnippets: false,
showLineNumbers: true,
tabSize: 2,
useWorker: false,
}}
name="UNIQUE_ID_OF_DIV"
value={props.bodyValue}
Expand Down Expand Up @@ -77,6 +81,9 @@ export function RenderedTemplate(props: any) {
readOnly={true}
name="RENDERED_TEMPLATE"
editorProps={{ $blockScrolling: true }}
setOptions={{
useWorker: false,
}}
/>
</Box>
);
Expand All @@ -92,6 +99,9 @@ export function RenderedTemplate(props: any) {
readOnly={true}
name="RENDERED_TEMPLATE"
editorProps={{ $blockScrolling: true }}
setOptions={{
useWorker: false,
}}
/>
</Box>
);
Expand All @@ -106,6 +116,9 @@ export function RenderedTemplate(props: any) {
readOnly={true}
name="RENDERED_TEMPLATE"
editorProps={{ $blockScrolling: true }}
setOptions={{
useWorker: false,
}}
/>
</Box>
);
Expand All @@ -119,9 +132,17 @@ export function DataEditor(props: any) {
mode="json"
theme="monokai"
name="JSON_EDITOR"
showGutter={true}
value={props.dataValue}
onValidate={() => {
console.log('An error has occured');
}}
onChange={(val) => {
console.log({ val });
// try {
// let myResponse = JSON.parse(val);
// } catch (e) {
console.log(val);
// }
props.setDataValue(val);
}}
editorProps={{ $blockScrolling: true }}
Expand Down
4 changes: 4 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this file empty?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file was added while updating packages. Should have added to git ignore