Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
2c0671b
Initial section prototype
sphinxc0re Oct 25, 2020
515a169
Added styles to correct place
sphinxc0re Oct 25, 2020
f7cbdde
Initial Svelte setup for editor
sphinxc0re Oct 27, 2020
3f3476a
Remove test header
sphinxc0re Oct 27, 2020
d8b90bb
Added flex container
sphinxc0re Oct 27, 2020
3e437a0
Simplified section list
sphinxc0re Oct 28, 2020
c1a395c
Adjusted gitignore
sphinxc0re Oct 28, 2020
646543f
Updated entrypoint
sphinxc0re Oct 28, 2020
b6a3fc4
Updated rollup config
sphinxc0re Oct 28, 2020
7f6eb24
Adjusted spacing in entrypoint
sphinxc0re Oct 28, 2020
c185c2a
Added some styling
sphinxc0re Oct 28, 2020
6f6e009
Added empty lines to init script
sphinxc0re Oct 29, 2020
170cc88
Center icon
sphinxc0re Oct 29, 2020
bcde89a
Added basic DnD action
sphinxc0re Oct 29, 2020
1844c6b
Added type definitions for the questionaire object
sphinxc0re Oct 29, 2020
92e83ef
Added saving component
sphinxc0re Oct 29, 2020
a7d7f1e
Added ability to save changes
sphinxc0re Oct 29, 2020
d748982
Saving + loading works now
sphinxc0re Oct 30, 2020
259e221
Optimized key function
sphinxc0re Oct 30, 2020
6d5368e
Added key function to questionnaire object
sphinxc0re Oct 30, 2020
801e87e
Revert "Added key function to questionnaire object"
sphinxc0re Oct 30, 2020
06fd052
Updated tsconfig
sphinxc0re Oct 30, 2020
9ab1a89
Updated dependencies
sphinxc0re Oct 30, 2020
c5da7eb
Added missing extend
sphinxc0re Oct 30, 2020
288f4fa
Added a few basic Qobjects
sphinxc0re Oct 30, 2020
1586803
Added initial basic object factory
sphinxc0re Oct 30, 2020
6c81668
Added basic tools to toolbox
sphinxc0re Oct 30, 2020
9ea4114
Made preview textbox readonly
sphinxc0re Oct 31, 2020
4237ba3
Removed textbox
sphinxc0re Oct 31, 2020
52a8b1c
Added markgroup
sphinxc0re Nov 1, 2020
2fb8e0e
Updated qobject typings
sphinxc0re Nov 3, 2020
1f7d73b
Even stronger typings
sphinxc0re Nov 3, 2020
0fc4be0
sdaps_editor: Added bootstrap theme to qobjects
Nov 3, 2020
16e9910
Added conversion function for frontend and backend system
sphinxc0re Nov 4, 2020
31f30a1
Updated bootstrap to 4.5 and added sveltestrap
sphinxc0re Nov 4, 2020
dba11b9
Added Layout marker
sphinxc0re Nov 4, 2020
8149e34
Fixed Layout marker
sphinxc0re Nov 4, 2020
f33ba0b
Added mock choicequestion and choicegroup
sphinxc0re Nov 4, 2020
16a0563
Moved add and layout buttons to the side
sphinxc0re Nov 6, 2020
ea3a945
Updated styles
sphinxc0re Nov 6, 2020
dfff7f1
Implemented choicegroup
sphinxc0re Nov 8, 2020
3bdffb9
Added remove button
sphinxc0re Nov 8, 2020
3745d10
Added choicequestion
sphinxc0re Nov 8, 2020
5ce044d
Added danger to button
sphinxc0re Nov 8, 2020
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: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,13 @@ sdaps/
proj/
db/
.env

sdaps_ctl/static/sdaps_ctl/likert_editor.js
sdaps_ctl/static/sdaps_ctl/likert_editor.js.map

sdaps_ctl/static/sdaps_ctl/css/likert_editor.css
sdaps_ctl/static/sdaps_ctl/css/likert_editor.css.map

node_modules/

.DS_Store
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<center>

![](https://raw.githubusercontent.com/sdaps/sdaps-web/main/sdaps_ctl/static/sdaps_ctl/img/sdaps.png)

</center>

sdaps-web is a django application that can be used as a frontend for
[SDAPS](https://github.com/sdaps/sdaps) and is written in Python 3.

Expand Down
6 changes: 4 additions & 2 deletions easy/init
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,20 @@ mkdir node_modules db proj
echo "USERID=$(id -u)" > .env
echo "GROUPID=$(id -g)" >> .env

echo ""
echo "Building Docker image for sdaps_web"
sleep 1s

docker-compose build
docker-compose up -d

echo ""
echo "Running migrations"
sleep 1s
easy/exec wait-for-it -t 90 db:5432
easy/exec python manage.py migrate

echo "Please type in the new password for the sdaps 'admin' account"
echo ""
echo "Please type in the new password for the sdaps-web 'admin' account"
sleep 1s
easy/exec python manage.py createsuperuser --username "admin" --email "admin@sdaps.dev"

Expand Down
5 changes: 4 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@ rm -rf /tmp/logs && mkdir -p /tmp/logs

screen -L -Logfile /tmp/logs/celery.log -dmS celeryWorker bash -c "python -m celery -A sdaps_web worker -E"
screen -S celeryWorker -X colon "logfile flush 0^M"
# screen -L -Logfile /tmp/logs/svelte.log -dmS svelteBundler bash -c "yarn && yarn dev"

screen -L -Logfile /tmp/logs/svelte.log -dmS svelteBundler bash -c "yarn && yarn dev"
screen -S svelteBundler -X colon "logfile flush 0^M"

python manage.py runserver 0.0.0.0:8080
34 changes: 34 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"name": "svelte-app",
"version": "1.0.0",
"scripts": {
"build": "rollup -c",
"dev": "rollup -c -w",
"start": "sirv public",
"validate": "svelte-check"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^14.0.0",
"@rollup/plugin-node-resolve": "^8.0.0",
"@rollup/plugin-typescript": "^6.0.0",
"@tsconfig/svelte": "^1.0.0",
"@types/lodash": "^4.14.165",
"autoprefixer": "^10.0.1",
"lodash": "^4.17.20",
"postcss": "^8.1.4",
"rollup": "^2.3.4",
"rollup-plugin-livereload": "^2.0.0",
"rollup-plugin-svelte": "^6.0.0",
"rollup-plugin-terser": "^7.0.0",
"svelte": "^3.0.0",
"svelte-check": "^1.0.0",
"svelte-dnd-action": "^0.6.18",
"svelte-preprocess": "^4.0.0",
"sveltestrap": "^3.9.5",
"tslib": "^2.0.0",
"typescript": "^3.9.3"
},
"dependencies": {
"sirv-cli": "^1.0.0"
}
}
50 changes: 50 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import svelte from "rollup-plugin-svelte";
import resolve from "@rollup/plugin-node-resolve";
import commonjs from "@rollup/plugin-commonjs";
import { terser } from "rollup-plugin-terser";
import sveltePreprocess from "svelte-preprocess";
import typescript from "@rollup/plugin-typescript";

const production = !process.env.ROLLUP_WATCH;

export default {
input: "sdaps_editor/main.ts",
output: {
sourcemap: true,
format: "iife",
name: "app",
file: "sdaps_ctl/static/sdaps_ctl/likert_editor.js",
},
plugins: [
svelte({
// enable run-time checks when not in production
dev: !production,
// we'll extract any component CSS out into
// a separate file - better for performance
css: (css) => {
css.write("css/likert_editor.css");
},
preprocess: sveltePreprocess({
postcss: {
plugins: [require('autoprefixer')],
},
}),
}),
resolve({
browser: true,
dedupe: ["svelte"],
}),
commonjs(),
typescript({
sourceMap: !production,
inlineSources: !production,
}),

// If we're building for production (yarn build
// instead of yarn dev), minify
production && terser(),
],
watch: {
clearScreen: false,
},
};
Loading