├── .meteor
├── .gitignore
├── release
├── platforms
├── .id
├── .finished-upgraders
└── packages
├── imports
├── api
│ ├── nvcache
│ │ ├── methods.js
│ │ ├── server
│ │ │ └── publications.js
│ │ └── nvcache.js
│ ├── roles
│ │ └── server
│ │ │ └── publications.js
│ ├── reports
│ │ ├── server
│ │ │ └── publications.js
│ │ ├── reports.js
│ │ └── methods.js
│ ├── timer
│ │ ├── server
│ │ │ └── publications.js
│ │ └── timer.js
│ ├── restrictedRoutes
│ │ ├── server
│ │ │ ├── publications.js
│ │ │ └── publications.js.orig
│ │ ├── restrictedRoutes.js
│ │ ├── restrictedRoutes.js.orig
│ │ ├── methods.js
│ │ └── methods.js.orig
│ ├── user_segments
│ │ ├── server
│ │ │ └── publications.js
│ │ ├── methods.js
│ │ └── user_segments.js
│ ├── user_notify
│ │ ├── server
│ │ │ └── publications.js
│ │ └── user_notify.tests.js
│ ├── qnaire
│ │ ├── server
│ │ │ ├── publications.js
│ │ │ └── qnair.js
│ │ └── methods.js
│ ├── qnaire_data
│ │ ├── server
│ │ │ └── publications.js
│ │ └── methods.js
│ ├── queue
│ │ └── server
│ │ │ └── queue.js
│ ├── user_feedback
│ │ ├── methods.js
│ │ ├── server
│ │ │ └── publications.js
│ │ ├── user_feedback.js
│ │ └── user_feedback.tests.js
│ ├── teams
│ │ ├── methods.js
│ │ └── server
│ │ │ └── publications.js
│ ├── grf
│ │ └── methods.js
│ ├── learn_share
│ │ ├── server
│ │ │ └── publications.js
│ │ └── methods.js
│ ├── help
│ │ ├── helperPagesCached.js
│ │ └── helperPages.js
│ ├── users
│ │ └── server
│ │ │ └── publications.js
│ ├── airtable
│ │ └── at.js
│ ├── tsq
│ │ ├── TSQData.js
│ │ └── server
│ │ │ └── publications.js
│ ├── parse_range
│ │ └── parse_range.js
│ └── type_readings
│ │ └── methods.js
├── ui
│ ├── stylesheets
│ │ ├── ask_questions
│ │ ├── qnaire.less
│ │ ├── char_sheet.less
│ │ ├── qnaire_results.less
│ │ ├── team_icon.less
│ │ ├── mbti_char_report.less
│ │ ├── user_profile.less
│ │ ├── opposites.less
│ │ ├── behavior_pattern_area.less
│ │ ├── add_questions.less
│ │ ├── not-found.less
│ │ ├── select_feedback.less
│ │ ├── header.less
│ │ ├── mbti_graph.less
│ │ ├── user_dashboard.less
│ │ ├── tsq.less
│ │ └── admin_teams.less
│ ├── layouts
│ │ ├── body
│ │ │ ├── body.js
│ │ │ └── body.html
│ │ └── login
│ │ │ ├── login.js
│ │ │ └── login.html
│ ├── pages
│ │ ├── view_team
│ │ │ ├── view_team.js
│ │ │ └── view_team.html
│ │ ├── not-found
│ │ │ ├── not-found.js
│ │ │ └── not-found.html
│ │ ├── home
│ │ │ ├── home.js
│ │ │ └── home.html
│ │ ├── comment_report
│ │ │ ├── comment_report.html
│ │ │ └── comment_report.js
│ │ ├── admin_reports
│ │ │ ├── custom_report_triage
│ │ │ │ ├── custom_report_triage.html
│ │ │ │ └── custom_report_triage.js
│ │ │ ├── team_member_tsq
│ │ │ │ ├── team_member_tsq.html
│ │ │ │ └── team_member_tsq.js
│ │ │ └── report_default
│ │ │ │ └── report_default.html
│ │ ├── ask_questions
│ │ │ ├── ask_questions.html
│ │ │ └── ask_questions.js
│ │ ├── verify
│ │ │ ├── verify.html
│ │ │ └── verify.js
│ │ ├── qnaire_results
│ │ │ └── qnaire_results.html
│ │ ├── user_dashboard
│ │ │ ├── user_dashboard.html
│ │ │ └── user_dashboard.js
│ │ ├── admin_tools
│ │ │ ├── admin_tools.js
│ │ │ └── admin_tools.html
│ │ ├── mbti_roles
│ │ │ └── mbti_roles.html
│ │ ├── char_sheet
│ │ │ └── char_sheet.html
│ │ ├── tsq
│ │ │ ├── widget
│ │ │ │ └── widget.html
│ │ │ └── results_summary
│ │ │ │ └── results_summary.html
│ │ ├── mvp
│ │ │ ├── mvp.html
│ │ │ └── server
│ │ │ │ └── tmp_pp.js
│ │ ├── mbti_results
│ │ │ ├── mbti_results.js
│ │ │ └── mbti_results.html
│ │ ├── results_descriptions
│ │ │ └── results_descriptions.html
│ │ ├── qnaire
│ │ │ └── slider.html
│ │ ├── question_responses
│ │ │ ├── question_responses.test.js
│ │ │ └── question_responses.html
│ │ ├── weak_questions
│ │ │ └── weak_questions.html
│ │ ├── results
│ │ │ ├── results.html
│ │ │ └── results.js
│ │ ├── user_segments
│ │ │ ├── user_segments.html
│ │ │ └── user_segments.js
│ │ ├── qnaire_list
│ │ │ ├── qnaire_list.js
│ │ │ └── qnaire_list.html
│ │ ├── learn_share_list
│ │ │ └── learn_share_list.html
│ │ ├── dash_min
│ │ │ └── dash_min.html
│ │ └── team_dashboard
│ │ │ └── team_dashboard.html
│ ├── .DS_Store
│ └── components
│ │ ├── .DS_Store
│ │ ├── loading
│ │ └── loading.html
│ │ ├── mbtiGraph
│ │ ├── mbtiGraphRender.html
│ │ ├── mbtiGraphCall.js
│ │ ├── mbtiGraphRenderMulti.html
│ │ └── mbtiGraphCallMulti.js
│ │ ├── behavior_pattern_area
│ │ ├── behavior_pattern_area_render.html
│ │ └── behavior_pattern_area_call.js
│ │ ├── team_icon
│ │ └── team_icon.html
│ │ ├── label_list
│ │ ├── label_list.html
│ │ └── label_list.js
│ │ ├── begin
│ │ ├── begin.js
│ │ └── begin.html
│ │ ├── select_autocomplete
│ │ ├── select_autocomplete.html
│ │ └── select_autocomplete.js
│ │ ├── video_embed
│ │ ├── video_embed.html
│ │ └── video_embed.js
│ │ ├── dl_footer
│ │ ├── dl_footer.html
│ │ └── dl_footer.js
│ │ ├── timer
│ │ ├── timer.html
│ │ └── timer.js
│ │ ├── notification_list
│ │ └── notification_list.html
│ │ └── select_feedback
│ │ └── select_feedback.html
├── .DS_Store
├── client
│ ├── insertProdAnalytics.js
│ ├── insertDevAnalytics.js
│ ├── clientSideDbs.js
│ └── callWithPromise.js
└── startup
│ ├── both
│ ├── index.js
│ ├── defaults.js
│ └── at_config.tests.js
│ ├── client
│ ├── index.js
│ └── config.js
│ └── server
│ ├── defaults.js
│ ├── register-api.js
│ └── index.js
├── .DS_Store
├── public
└── img
│ ├── bell.png
│ ├── panda.png
│ ├── load-sm1.gif
│ ├── loading.gif
│ ├── mbtiBackground.png
│ ├── congruent_pentagon.png
│ ├── mbtiBackgroundTest.png
│ ├── DeveloperLevel_icon_bg.png
│ └── DevLevelLogoAndWordsWhite.5.25.png
├── .gitignore
├── Logo Pack
├── PNG
│ ├── White.png
│ ├── black.png
│ ├── color.png
│ ├── color-sm.png
│ ├── redcirclesm.png
│ ├── whiteandonly.png
│ ├── color-whitebg.png
│ ├── redcirclesm300x300.png
│ ├── white-circle-and-in.png
│ ├── blackandonwhitecircle.png
│ └── blackandonwhitecirclesm.png
└── NotP&A
│ ├── word.png
│ ├── hiring.PNG
│ ├── slack.png
│ ├── trello.jpg
│ ├── We're Hiring.PNG
│ ├── projectpadawan.PNG
│ └── developerlevelslack.PNG
├── docker
├── vagrant
│ ├── docker_ps.png
│ ├── entrypoint.sh
│ ├── docker-compose.yml
│ ├── Dockerfile
│ └── README.md
├── staging
│ ├── entrypoint.sh
│ ├── padawan-node-setup.sh
│ ├── docker-compose.yml
│ └── Dockerfile
├── production
│ ├── entrypoint.sh
│ ├── padawan-node-setup.sh
│ ├── Dockerfile
│ ├── docker-compose.yml
│ └── nginx.conf
└── dev
│ ├── entrypoint.sh
│ ├── docker-compose.yml
│ ├── Dockerfile
│ └── nginx.conf
├── vagrantDock.sh
├── padawan_workspace.code-workspace
├── client
├── main.js
├── head.html
└── main.less
├── entrypoint.sh
├── server
└── main.js
├── config
└── settings.json
├── private
├── README.md
└── html-email.html
├── .vagrant
└── rgloader
│ └── loader.rb
├── .vscode
└── launch.json
├── dump
└── onAnswered.js
├── utils
├── db_restore.sh
└── db_backup.sh
├── settings.staging.json
├── settings.dev-docker.json
├── settings.local.json
├── settings.prod.json
├── Vagrantfile
├── nightwatch.json
├── package.json
└── tests
└── changePassword.test.js
/.meteor/.gitignore:
--------------------------------------------------------------------------------
1 | local
2 |
--------------------------------------------------------------------------------
/.meteor/release:
--------------------------------------------------------------------------------
1 | METEOR@1.8.1
2 |
--------------------------------------------------------------------------------
/imports/api/nvcache/methods.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/imports/ui/stylesheets/ask_questions:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.meteor/platforms:
--------------------------------------------------------------------------------
1 | server
2 | browser
3 |
--------------------------------------------------------------------------------
/imports/api/nvcache/server/publications.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/imports/ui/layouts/body/body.js:
--------------------------------------------------------------------------------
1 | import './body.html';
2 |
--------------------------------------------------------------------------------
/imports/ui/pages/view_team/view_team.js:
--------------------------------------------------------------------------------
1 | import './view_team.html';
--------------------------------------------------------------------------------
/imports/ui/pages/not-found/not-found.js:
--------------------------------------------------------------------------------
1 | import './not-found.html';
2 |
--------------------------------------------------------------------------------
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paladinarcher/padawan/HEAD/.DS_Store
--------------------------------------------------------------------------------
/imports/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paladinarcher/padawan/HEAD/imports/.DS_Store
--------------------------------------------------------------------------------
/imports/ui/pages/view_team/view_team.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/imports/ui/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paladinarcher/padawan/HEAD/imports/ui/.DS_Store
--------------------------------------------------------------------------------
/public/img/bell.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paladinarcher/padawan/HEAD/public/img/bell.png
--------------------------------------------------------------------------------
/public/img/panda.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paladinarcher/padawan/HEAD/public/img/panda.png
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | *~
3 | *#
4 | bin/
5 | dump/
6 | /reports/
7 | .coverage
8 | .idea
9 |
--------------------------------------------------------------------------------
/Logo Pack/PNG/White.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paladinarcher/padawan/HEAD/Logo Pack/PNG/White.png
--------------------------------------------------------------------------------
/Logo Pack/PNG/black.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paladinarcher/padawan/HEAD/Logo Pack/PNG/black.png
--------------------------------------------------------------------------------
/Logo Pack/PNG/color.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paladinarcher/padawan/HEAD/Logo Pack/PNG/color.png
--------------------------------------------------------------------------------
/public/img/load-sm1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paladinarcher/padawan/HEAD/public/img/load-sm1.gif
--------------------------------------------------------------------------------
/public/img/loading.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paladinarcher/padawan/HEAD/public/img/loading.gif
--------------------------------------------------------------------------------
/Logo Pack/NotP&A/word.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paladinarcher/padawan/HEAD/Logo Pack/NotP&A/word.png
--------------------------------------------------------------------------------
/Logo Pack/NotP&A/hiring.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paladinarcher/padawan/HEAD/Logo Pack/NotP&A/hiring.PNG
--------------------------------------------------------------------------------
/Logo Pack/NotP&A/slack.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paladinarcher/padawan/HEAD/Logo Pack/NotP&A/slack.png
--------------------------------------------------------------------------------
/Logo Pack/NotP&A/trello.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paladinarcher/padawan/HEAD/Logo Pack/NotP&A/trello.jpg
--------------------------------------------------------------------------------
/Logo Pack/PNG/color-sm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paladinarcher/padawan/HEAD/Logo Pack/PNG/color-sm.png
--------------------------------------------------------------------------------
/docker/vagrant/docker_ps.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paladinarcher/padawan/HEAD/docker/vagrant/docker_ps.png
--------------------------------------------------------------------------------
/Logo Pack/PNG/redcirclesm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paladinarcher/padawan/HEAD/Logo Pack/PNG/redcirclesm.png
--------------------------------------------------------------------------------
/Logo Pack/PNG/whiteandonly.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paladinarcher/padawan/HEAD/Logo Pack/PNG/whiteandonly.png
--------------------------------------------------------------------------------
/public/img/mbtiBackground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paladinarcher/padawan/HEAD/public/img/mbtiBackground.png
--------------------------------------------------------------------------------
/vagrantDock.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | rm -rf .meteor/local
3 | dos2unix *
4 | dos2unix docker/vagrant/*
5 | vagrant up
6 |
--------------------------------------------------------------------------------
/Logo Pack/NotP&A/We're Hiring.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paladinarcher/padawan/HEAD/Logo Pack/NotP&A/We're Hiring.PNG
--------------------------------------------------------------------------------
/Logo Pack/PNG/color-whitebg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paladinarcher/padawan/HEAD/Logo Pack/PNG/color-whitebg.png
--------------------------------------------------------------------------------
/imports/ui/components/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paladinarcher/padawan/HEAD/imports/ui/components/.DS_Store
--------------------------------------------------------------------------------
/padawan_workspace.code-workspace:
--------------------------------------------------------------------------------
1 | {
2 | "folders": [
3 | {
4 | "path": "."
5 | }
6 | ],
7 | "settings": {}
8 | }
--------------------------------------------------------------------------------
/public/img/congruent_pentagon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paladinarcher/padawan/HEAD/public/img/congruent_pentagon.png
--------------------------------------------------------------------------------
/public/img/mbtiBackgroundTest.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paladinarcher/padawan/HEAD/public/img/mbtiBackgroundTest.png
--------------------------------------------------------------------------------
/Logo Pack/NotP&A/projectpadawan.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paladinarcher/padawan/HEAD/Logo Pack/NotP&A/projectpadawan.PNG
--------------------------------------------------------------------------------
/Logo Pack/PNG/redcirclesm300x300.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paladinarcher/padawan/HEAD/Logo Pack/PNG/redcirclesm300x300.png
--------------------------------------------------------------------------------
/Logo Pack/PNG/white-circle-and-in.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paladinarcher/padawan/HEAD/Logo Pack/PNG/white-circle-and-in.png
--------------------------------------------------------------------------------
/public/img/DeveloperLevel_icon_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paladinarcher/padawan/HEAD/public/img/DeveloperLevel_icon_bg.png
--------------------------------------------------------------------------------
/Logo Pack/NotP&A/developerlevelslack.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paladinarcher/padawan/HEAD/Logo Pack/NotP&A/developerlevelslack.PNG
--------------------------------------------------------------------------------
/Logo Pack/PNG/blackandonwhitecircle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paladinarcher/padawan/HEAD/Logo Pack/PNG/blackandonwhitecircle.png
--------------------------------------------------------------------------------
/Logo Pack/PNG/blackandonwhitecirclesm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paladinarcher/padawan/HEAD/Logo Pack/PNG/blackandonwhitecirclesm.png
--------------------------------------------------------------------------------
/client/main.js:
--------------------------------------------------------------------------------
1 | // Client entry point, imports all client code
2 |
3 | import '/imports/startup/both';
4 | import '/imports/startup/client';
5 |
--------------------------------------------------------------------------------
/entrypoint.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #/usr/local/bin/meteor update
3 | /usr/local/bin/meteor --allow-superuser --settings /app/settings.staging.json
4 |
--------------------------------------------------------------------------------
/public/img/DevLevelLogoAndWordsWhite.5.25.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paladinarcher/padawan/HEAD/public/img/DevLevelLogoAndWordsWhite.5.25.png
--------------------------------------------------------------------------------
/server/main.js:
--------------------------------------------------------------------------------
1 | // Server entry point, imports all server code
2 |
3 | import '/imports/startup/both';
4 | import '/imports/startup/server';
5 |
--------------------------------------------------------------------------------
/docker/staging/entrypoint.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | export METEOR_SETTINGS="$(cat settings.staging.json)"
4 | echo $METEOR_SETTINGS
5 | forever main.js
6 |
--------------------------------------------------------------------------------
/docker/production/entrypoint.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | export METEOR_SETTINGS="$(cat settings.prod.json)"
4 | echo $METEOR_SETTINGS
5 | forever main.js
6 |
--------------------------------------------------------------------------------
/config/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "public": {
3 | "persistent_session": {
4 | "default_method": "persistent"
5 | }
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/docker/vagrant/entrypoint.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | /usr/local/bin/meteor update
3 | /usr/local/bin/meteor npm install @babel/runtime@7.0.0-beta.55
4 | /usr/local/bin/meteor
5 |
--------------------------------------------------------------------------------
/imports/api/roles/server/publications.js:
--------------------------------------------------------------------------------
1 | import { Meteor } from 'meteor/meteor';
2 |
3 | Meteor.publish(null, function (){
4 | return Meteor.roles.find({})
5 | });
6 |
--------------------------------------------------------------------------------
/imports/ui/pages/home/home.js:
--------------------------------------------------------------------------------
1 | import './home.html';
2 |
3 | import '../../components/questions/questions.js';
4 | import '../../components/personality/personality.js';
5 |
--------------------------------------------------------------------------------
/imports/ui/components/loading/loading.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/imports/ui/components/mbtiGraph/mbtiGraphRender.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
![]()
4 |
5 |
6 |
--------------------------------------------------------------------------------
/imports/ui/pages/comment_report/comment_report.html:
--------------------------------------------------------------------------------
1 |
2 | Comment/Feedback Report
3 | {{ getReport }}
4 |
5 |
--------------------------------------------------------------------------------
/imports/client/insertProdAnalytics.js:
--------------------------------------------------------------------------------
1 |
2 | window.dataLayer = window.dataLayer || [];
3 | function gtag(){dataLayer.push(arguments);}
4 | gtag('js', new Date());
5 |
6 | gtag('config', 'UA-139764993-1');
--------------------------------------------------------------------------------
/imports/ui/layouts/body/body.html:
--------------------------------------------------------------------------------
1 |
2 | {{> Template.dynamic template=top}}
3 | {{> Template.dynamic template=main}}
4 | {{> Template.dynamic template=bottom}}
5 |
6 |
--------------------------------------------------------------------------------
/imports/client/insertDevAnalytics.js:
--------------------------------------------------------------------------------
1 |
2 | window.dataLayer = window.dataLayer || [];
3 | function gtag(){dataLayer.push(arguments);}
4 | gtag('js', new Date());
5 |
6 | gtag('config', 'UA-139764993-2');
7 |
--------------------------------------------------------------------------------
/imports/ui/components/behavior_pattern_area/behavior_pattern_area_render.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
![]()
4 |
5 |
6 |
--------------------------------------------------------------------------------
/imports/api/reports/server/publications.js:
--------------------------------------------------------------------------------
1 | import { Meteor } from 'meteor/meteor';
2 | import { Reports, Report } from '../reports.js';
3 |
4 | Meteor.publish('reports', function reportsPublication () {
5 | return Reports.find({})
6 | })
7 |
--------------------------------------------------------------------------------
/imports/ui/stylesheets/qnaire.less:
--------------------------------------------------------------------------------
1 | .qnaire {
2 | .qq-outer {
3 | margin-bottom: 15px;
4 | }
5 | }
6 | .assessment-heading {
7 | float: right;
8 | }
9 | .modal-content .qnaire {
10 | width: 100% !important;
11 | }
12 |
--------------------------------------------------------------------------------
/imports/api/timer/server/publications.js:
--------------------------------------------------------------------------------
1 | import { Meteor } from 'meteor/meteor';
2 | import { Timer } from '../timer.js';
3 |
4 |
5 | Meteor.publish('timersData', function ( lssid ) {
6 | return Timer.find({ learnShareSessionId:lssid });
7 | });
--------------------------------------------------------------------------------
/imports/startup/both/index.js:
--------------------------------------------------------------------------------
1 | // Import modules used by both client and server through a single index entry point
2 | // e.g. useraccounts configuration file.
3 | if(Meteor.isClient) { Session.setDefault('refreshQuestions', Math.random()); }
4 | import './at_config.js';
--------------------------------------------------------------------------------
/imports/ui/components/team_icon/team_icon.html:
--------------------------------------------------------------------------------
1 |
2 | {{#if team.Icon64}}
3 |
4 |
5 |
6 | {{/if}}
7 |
8 |
--------------------------------------------------------------------------------
/imports/ui/pages/admin_reports/custom_report_triage/custom_report_triage.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{#if titleIsQnaireMbti}}
4 | {{>qnaire_mbti_report}}
5 | {{else}}
6 | {{>mbti_report}}
7 | {{/if}}
8 |
9 |
--------------------------------------------------------------------------------
/imports/startup/client/index.js:
--------------------------------------------------------------------------------
1 | // Import client startup through a single index entry point
2 |
3 | import './config.js';
4 | import './routes.js';
5 | import './../../client/clientSideDbs'
6 | import './../../client/callWithPromise.js'
7 |
8 |
9 | $('html').attr('lang', 'en');
--------------------------------------------------------------------------------
/imports/api/restrictedRoutes/server/publications.js:
--------------------------------------------------------------------------------
1 | import { Meteor } from 'meteor/meteor';
2 | import { RestrictedRoutes } from '../restrictedRoutes.js';
3 |
4 | Meteor.publish('restrictedRouteData', function() {
5 | return RestrictedRoutes.find({}, { fields: { roleName:1, teamNames:1 } });
6 | });
--------------------------------------------------------------------------------
/imports/client/clientSideDbs.js:
--------------------------------------------------------------------------------
1 | const KeyData = new Mongo.Collection('tsqdata');
2 | const SkillsData = new Mongo.Collection('tsqskills');
3 | const HelpText = new Mongo.Collection('helperText');
4 |
5 | export { KeyData, SkillsData, HelpText }// NOTE: need this for holding the tsq api data on the client
--------------------------------------------------------------------------------
/imports/api/restrictedRoutes/server/publications.js.orig:
--------------------------------------------------------------------------------
1 | import { Meteor } from 'meteor/meteor';
2 | import { RestrictedRoutes } from '../restrictedRoutes.js';
3 |
4 | Meteor.publish('restrictedRouteData', function() {
5 | return RestrictedRoutes.find({}, { fields: { roleName:1, teamNames:1 } });
6 | });
--------------------------------------------------------------------------------
/imports/ui/components/label_list/label_list.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{#each item in items}}
4 |
{{item.text}}
5 | {{/each}}
6 |
7 |
8 |
--------------------------------------------------------------------------------
/imports/ui/stylesheets/char_sheet.less:
--------------------------------------------------------------------------------
1 | .char-sheet {
2 | &.container {
3 | position: relative;
4 | max-width: 400px;
5 | }
6 | // #btn-group {
7 | // display: none;
8 | // position: absolute;
9 | // top: 10px;
10 | // right: 10px;
11 | // z-index: 100;
12 | // }
13 | }
--------------------------------------------------------------------------------
/imports/ui/components/begin/begin.js:
--------------------------------------------------------------------------------
1 | import { Template } from 'meteor/templating';
2 | import './begin.html';
3 |
4 |
5 |
6 | Template.begin.helpers({
7 |
8 | assessment() {
9 | let assess = FlowRouter.getParam('id');
10 | console.log(assess);
11 | return (assess || "MBTI");
12 | }
13 |
14 | });
15 |
16 |
--------------------------------------------------------------------------------
/imports/ui/pages/ask_questions/ask_questions.html:
--------------------------------------------------------------------------------
1 |
2 | {{#if Template.subscriptionsReady}}
3 |
4 |
5 | {{> questions}}
6 |
7 | {{else}}
8 | {{> loading}}
9 | {{/if}}
10 |
11 |
--------------------------------------------------------------------------------
/.meteor/.id:
--------------------------------------------------------------------------------
1 | # This file contains a token that is unique to your project.
2 | # Check it into your repository along with the rest of this directory.
3 | # It can be used for purposes such as:
4 | # - ensuring you don't accidentally deploy one app on top of another
5 | # - providing package authors with aggregated statistics
6 |
7 | qcqgns92w0md.yphpdej9wth
8 |
--------------------------------------------------------------------------------
/imports/ui/stylesheets/qnaire_results.less:
--------------------------------------------------------------------------------
1 | table.result {
2 | font-family: arial, sans-serif;
3 | border-collapse: collapse;
4 | width: 100%;
5 | }
6 |
7 | td.result, th.result {
8 | border: 1px solid #000000;
9 | text-align: left;
10 | padding: 8px;
11 | }
12 |
13 | tr:nth-child(even).result {
14 | background-color: #dddddd;
15 | }
16 |
--------------------------------------------------------------------------------
/imports/ui/stylesheets/team_icon.less:
--------------------------------------------------------------------------------
1 | .team-icon img {
2 | width: 16px;
3 | height: 16px;
4 | border-radius: 3px;
5 | }
6 |
7 | h3 .team-icon img {
8 | width: 24px;
9 | height: 24px;
10 | margin-bottom: 3px;
11 | }
12 |
13 | h1 .team-icon img {
14 | width: 30px;
15 | height: 30px;
16 | margin-bottom: 8px;
17 | }
18 |
--------------------------------------------------------------------------------
/docker/dev/entrypoint.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | #/usr/local/bin/meteor update
4 | #/usr/local/bin/meteor npm install @babel/runtime@7.0.0-beta.55
5 | cat settings.dev-docker.json
6 | export METEOR_SETTINGS="$(cat settings.dev-docker.json)"
7 | echo $METEOR_SETTINGS
8 | /usr/local/bin/meteor npm i
9 | /usr/local/bin/meteor --settings settings.dev-docker.json
10 |
--------------------------------------------------------------------------------
/imports/api/user_segments/server/publications.js:
--------------------------------------------------------------------------------
1 | import { Meteor } from 'meteor/meteor';
2 | import { UserSegment } from '../user_segments.js';
3 |
4 | Meteor.publish('segmentList', function () {
5 | //if (Meteor.userId()) {
6 | return UserSegment.find();
7 | //} else {
8 | // this.stop();
9 | // return;
10 | //}
11 | });
12 |
--------------------------------------------------------------------------------
/private/README.md:
--------------------------------------------------------------------------------
1 | **private folder**
2 |
3 | All files inside a top-level directory called `private/` are only accessible from server code and can be loaded via the [`Assets`](http://docs.meteor.com/#/full/assets_getText) API. This can be used for private data files and any files that are in your project directory that you don't want to be accessible from the outside.
4 |
--------------------------------------------------------------------------------
/imports/api/user_notify/server/publications.js:
--------------------------------------------------------------------------------
1 | import { Meteor } from 'meteor/meteor';
2 | import { UserNotify } from '../user_notify.js';
3 |
4 | Meteor.publish('notificationList', function (userId) {
5 | if (this.userId == userId) {
6 | let un = UserNotify.find( {userId:this.userId} );
7 | return un;
8 | } else {
9 | return [];
10 | }
11 | });
12 |
--------------------------------------------------------------------------------
/imports/ui/pages/not-found/not-found.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |

5 |
6 |
7 |
Sorry, that page doesn't exist
8 |
Go to home
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/imports/ui/components/select_autocomplete/select_autocomplete.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Loading...
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/imports/api/qnaire/server/publications.js:
--------------------------------------------------------------------------------
1 | import { Qnaire } from '../qnaire.js';
2 |
3 | Meteor.publish('qnaire', function (qid) {
4 | if ("undefined" !== typeof qid && "" !== qid && null !== qid) {
5 | console.log("findone", qid);
6 | return Qnaire.find( {_id:qid} );
7 | } else {
8 | console.log("findall");
9 | return Qnaire.find();
10 | }
11 | });
12 |
--------------------------------------------------------------------------------
/imports/ui/pages/home/home.html:
--------------------------------------------------------------------------------
1 |
2 | {{#if Template.subscriptionsReady}}
3 |
4 |
5 | {{> select_feedback source='questions'}}
6 | {{> questions}}
7 |
8 |
9 | {{else}}
10 | {{> loading}}
11 | {{/if}}
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/.vagrant/rgloader/loader.rb:
--------------------------------------------------------------------------------
1 | # This file loads the proper rgloader/loader.rb file that comes packaged
2 | # with Vagrant so that encoded files can properly run with Vagrant.
3 |
4 | if ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"]
5 | require File.expand_path(
6 | "rgloader/loader", ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"])
7 | else
8 | raise "Encoded files can't be read outside of the Vagrant installer."
9 | end
10 |
--------------------------------------------------------------------------------
/imports/ui/components/video_embed/video_embed.html:
--------------------------------------------------------------------------------
1 |
2 | {{#if fileExists id}}
3 |
4 |
7 |
8 | {{/if}}
9 |
10 |
11 |
--------------------------------------------------------------------------------
/imports/api/qnaire_data/server/publications.js:
--------------------------------------------------------------------------------
1 | import { QRespondent } from '../qnaire_data.js';
2 |
3 | Meteor.publish('qnaireData', function (qid) {
4 | if ("undefined" !== typeof qid && "" !== qid && null !== qid) {
5 | console.log("findone", qid);
6 | return QRespondent.find( {qnrid:qid} );
7 | } else {
8 | console.log("findall");
9 | return QRespondent.find();
10 | }
11 | });
12 |
--------------------------------------------------------------------------------
/imports/api/queue/server/queue.js:
--------------------------------------------------------------------------------
1 | import { Meteor } from 'meteor/meteor';
2 | import { SrvDefaults } from '../../../startup/server/defaults.js';
3 | //import Bull from 'bull';
4 | var Bull = require('bull');
5 |
6 | const UserActivitiesQueue = new Bull('User Activities Processing', {
7 | limiter: Meteor.settings.private.Queue.Limiter,
8 | redis: Meteor.settings.private.Queue.Redis
9 | });
10 |
11 | export { UserActivitiesQueue };
--------------------------------------------------------------------------------
/docker/staging/padawan-node-setup.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | export PATH=/apps/node/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/bin
3 |
4 | yum -y install make gcc gcc-c++ && yum -y clean all
5 | mkdir /apps && cd /apps && curl -s -L -O https://nodejs.org/dist/${NODEJS_VERSION}/node-${NODEJS_VERSION}-linux-x64.tar.xz && tar xf node-${NODEJS_VERSION}-linux-x64.tar.xz && mv node-${NODEJS_VERSION}-linux-x64 node
6 |
7 | npm -g config set user root
8 |
--------------------------------------------------------------------------------
/imports/api/user_feedback/methods.js:
--------------------------------------------------------------------------------
1 | import { UserFeedback } from './user_feedback.js';
2 |
3 | Meteor.methods({
4 | 'feedback.createNewFeedback'(newFeedback) {
5 | if (!Meteor.userId()) {
6 | throw new Meteor.Error(403, "You are not authorized");
7 | }
8 |
9 | newFeedback.userId = Meteor.userId();
10 | let f = new UserFeedback(newFeedback);
11 | return f.save();
12 | }
13 | })
14 |
--------------------------------------------------------------------------------
/imports/ui/components/dl_footer/dl_footer.html:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/docker/production/padawan-node-setup.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | export PATH=/apps/node/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/bin
3 |
4 | yum -y install make gcc gcc-c++ && yum -y clean all
5 | mkdir /apps && cd /apps && curl -s -L -O https://nodejs.org/dist/${NODEJS_VERSION}/node-${NODEJS_VERSION}-linux-x64.tar.xz && tar xf node-${NODEJS_VERSION}-linux-x64.tar.xz && mv node-${NODEJS_VERSION}-linux-x64 node
6 |
7 | npm -g config set user root
8 |
--------------------------------------------------------------------------------
/imports/api/teams/methods.js:
--------------------------------------------------------------------------------
1 | import {Team } from './teams.js';
2 |
3 | Meteor.methods({
4 | 'team.createNewTeam'(newTeam) {
5 | if ( !Roles.userIsInRole(Meteor.userId(), ['admin'], Roles.GLOBAL_GROUP) ) {
6 | throw new Meteor.Error(403, "You are not authorized");
7 | }
8 |
9 | newTeam.CreatedBy = Meteor.userId();
10 | let t = new Team(newTeam);
11 | return t.save();
12 | }
13 | });
14 |
--------------------------------------------------------------------------------
/imports/client/callWithPromise.js:
--------------------------------------------------------------------------------
1 | import { Promise } from 'meteor/promise'
2 |
3 | /**
4 | *
5 | * Meteor promise handler - testing this
6 | */
7 |
8 | export const callWithPromise = (method, ...params) => {
9 | return new Promise((resolve, reject) => {
10 | Meteor.call(method, ...params, (error, result) => {
11 | // if (error) reject(error);
12 | if (error) resolve(error)
13 | else resolve(result);
14 | });
15 | });
16 | }
--------------------------------------------------------------------------------
/imports/ui/layouts/login/login.js:
--------------------------------------------------------------------------------
1 | import { Template } from 'meteor/templating';
2 | import './login.html';
3 |
4 |
5 | // Template.begin.helpers({
6 |
7 | // assessment() {
8 | // let login = FlowRouter.getRouteName;
9 | // let assess = FlowRouter.getParam('id');
10 | // if (login === assess) {
11 | // return assess;
12 | // } else {
13 | // return "MBTI";
14 | // }
15 | // },
16 |
--------------------------------------------------------------------------------
/imports/ui/pages/verify/verify.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Your email address must be verified before you can access the app.
5 | Click here to resend verification email from the profile page.
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/imports/ui/components/timer/timer.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{timeSinceLastPresenterSelectedMinutes}} :
4 | {{timeSinceLastPresenterSelectedSeconds}}
5 |
6 |
7 |
8 |
9 |
10 | {{timeSinceLastPresenterSelectedMinutes}} :
11 | {{timeSinceLastPresenterSelectedSeconds}}
12 |
13 |
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // Use IntelliSense to learn about possible Node.js debug attributes.
3 | // Hover to view descriptions of existing attributes.
4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5 | "version": "0.2.0",
6 | "configurations": [
7 | {
8 | "type": "node",
9 | "request": "launch",
10 | "name": "Launch Program",
11 | "program": "${file}"
12 | }
13 | ]
14 | }
--------------------------------------------------------------------------------
/imports/ui/pages/admin_reports/team_member_tsq/team_member_tsq.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{ #if Template.subscriptionsReady }}
4 | {{ #if isAdmin }}
5 |
{{ getCurrentUserDisplayed }}
6 | {{> tsq_char_report}}
7 | {{ else }}
8 | Only admins are authorized to access this page!
9 | {{ /if }}
10 | {{ /if }}
11 |
12 |
--------------------------------------------------------------------------------
/imports/ui/pages/qnaire_results/qnaire_results.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Questionaire Results
5 |
6 |
7 |
QnaireId: {{getQnaireId}}
8 |
9 |
QRespondentId: {{getQRespondentId}}
10 |
11 | {{{resultTable user}}}
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/docker/staging/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: '3'
2 | services:
3 | app:
4 | build: .
5 | ports:
6 | - "3000:3000"
7 | links:
8 | - database
9 | environment:
10 | - MONGO_URL=mongodb://database:27017/testing
11 | - ROOT_URL=http://18.221.137.142
12 | - PORT=3000
13 | database:
14 | image: mongo:3.4.1
15 | restart: always
16 | volumes:
17 | - "/home/ec2-user/stag_data:/data/db"
18 |
--------------------------------------------------------------------------------
/imports/ui/stylesheets/mbti_char_report.less:
--------------------------------------------------------------------------------
1 | #grfBehavior, #grfTraits {
2 | max-width: 100%;
3 | }
4 | .mbtiBarGraphDiv {
5 | padding: 10px;
6 | max-width: 100%;
7 | }
8 | #mbtiBarGraph {
9 | width: 400px;
10 | height: 200px;
11 | max-width: 100%;
12 | }
13 | #results_descriptions {
14 | width: 150px;
15 | height: 80px;
16 | }
17 |
18 | @media only screen and (max-width: 991px) {
19 | #grfBehavior, #grfTraits {
20 | width: 100%;
21 | height: auto;
22 | }
23 | }
--------------------------------------------------------------------------------
/private/html-email.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | HTML email test
6 |
7 |
8 |
9 |
10 | {{text}}
11 |
14 |
15 |
--------------------------------------------------------------------------------
/imports/api/user_segments/methods.js:
--------------------------------------------------------------------------------
1 | import { UserSegment } from './user_segments.js';
2 |
3 | Meteor.methods({
4 | 'segment.createNewSegment'(name, dscr) {
5 | if (!Roles.userIsInRole(Meteor.userId(), ['admin'], Roles.GLOBAL_GROUP)) {
6 | throw new Meteor.Error(403, "You are not authorized");
7 | } else {
8 | let s = new UserSegment({
9 | name: name,
10 | description: dscr
11 | });
12 | return s.save();
13 | }
14 | }
15 | });
16 |
--------------------------------------------------------------------------------
/imports/api/qnaire_data/methods.js:
--------------------------------------------------------------------------------
1 | import { QRespondent } from './qnaire_data.js';
2 |
3 | Meteor.methods({
4 | 'qnaire.createNewQnaireData'(qid) {
5 | console.log("createNewQnaireData ------------------------------");
6 | let qd = new QRespondent({
7 | qnrid: qid
8 | });
9 | return qd.save();
10 | },
11 | 'qnaireData.recordResponse'(qqlabel, val, finish, qid) {
12 | resp = QRespondent.findOne( {_id:qid} );
13 | resp.recordResponse(qqlabel, val, finish);
14 | }
15 | });
16 |
--------------------------------------------------------------------------------
/imports/ui/components/dl_footer/dl_footer.js:
--------------------------------------------------------------------------------
1 | import { Template } from 'meteor/templating';
2 | import './dl_footer.html';
3 | import { User } from '/imports/api/users/users.js';
4 |
5 | import '../../components/questions/questions.js';
6 | import '../../components/personality/personality.js';
7 | import '../../components/notification_list/notification_list.js';
8 |
9 | import { FlowRouter } from 'meteor/kadira:flow-router';
10 |
11 | Template.dl_footer.helpers({
12 | getYear() {
13 | return new Date().getFullYear();
14 | }
15 | });
16 |
--------------------------------------------------------------------------------
/imports/ui/components/video_embed/video_embed.js:
--------------------------------------------------------------------------------
1 | import './video_embed.html';
2 |
3 | Template.video_embed.onCreated(function () {
4 | this._fileExists = new ReactiveVar(false);
5 | console.log(this.data);
6 | this.autorun( () => {
7 | Meteor.call('learnshare.recordingExists',this.data.id, (err,rslt) => {
8 | this._fileExists.set(rslt);
9 | });
10 | });
11 | });
12 |
13 | Template.video_embed.helpers({
14 | fileExists(fname) {
15 | return Template.instance()._fileExists.get();
16 | }
17 | });
18 |
--------------------------------------------------------------------------------
/imports/api/user_feedback/server/publications.js:
--------------------------------------------------------------------------------
1 | import { Meteor } from "meteor/meteor";
2 | import { UserFeedback } from "../user_feedback.js";
3 |
4 | Meteor.publish("feedback.userComments", function() {
5 | if (this.userId) {
6 | return UserFeedback.find({ userId: Meteor.userId() });
7 | } else {
8 | return [];
9 | }
10 | });
11 |
12 | Meteor.publish("userFeedback", function() {
13 | if (Roles.userIsInRole(this.userId, ["admin"], Roles.GLOBAL_GROUP)) {
14 | return UserFeedback.find({});
15 | } else {
16 | return [];
17 | }
18 | });
19 |
--------------------------------------------------------------------------------
/imports/api/grf/methods.js:
--------------------------------------------------------------------------------
1 | import { Meteor } from 'meteor/meteor';
2 | import { HTTP } from 'meteor/http';
3 |
4 | // const GRF_URL = Meteor.settings.private.GRF_URL;
5 | const GRF_URL = Meteor.settings.public.GRF_URL;
6 |
7 | Meteor.methods({
8 | 'grf.getHealthCheck'() {
9 | let healthy = true;
10 | try {
11 | let apiUrl = GRF_URL + 'healthCheck/';
12 | let result = HTTP.get(apiUrl);
13 | if (result.statusCode !== 200) {
14 | healthy = false;
15 | }
16 | } catch (e) {
17 | healthy = false;
18 | }
19 | return healthy;
20 | }
21 | })
22 |
--------------------------------------------------------------------------------
/docker/vagrant/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: '3'
2 | services:
3 | app:
4 | build: .
5 | ports:
6 | - "3000:3000"
7 | links:
8 | - database
9 | environment:
10 | - MONGO_URL=mongodb://database:27017/testing
11 | - ROOT_URL=http://localhost
12 | - PORT=3000
13 | volumes:
14 | - "../..:/app"
15 | database:
16 | image: mongo:3.6
17 | restart: always
18 | ports:
19 | - "3001:27017"
20 | volumes:
21 | - "db-data:/data/db"
22 | volumes:
23 | db-data:
24 |
--------------------------------------------------------------------------------
/imports/api/learn_share/server/publications.js:
--------------------------------------------------------------------------------
1 | import { Meteor } from 'meteor/meteor';
2 | import { LearnShareSession } from '../learn_share.js';
3 |
4 | Meteor.publish('learnShareList', function() {
5 | if (this.userId) {
6 | return LearnShareSession.find( {}, {
7 | fields: { title: 1, teamId: 1 }
8 | });
9 | } else {
10 | return [ ];
11 | }
12 | });
13 |
14 | Meteor.publish('learnShareDetails', function(lssid) {
15 | //if (this.userId) {
16 | return LearnShareSession.find( {_id:lssid} );
17 | //} else {
18 | // return [ ];
19 | //}
20 | });
21 |
--------------------------------------------------------------------------------
/imports/ui/pages/user_dashboard/user_dashboard.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{#each pane in dashboardPanes}}
6 |
7 |
8 | {{pane.title}}
9 | {{> Template.dynamic template=pane.name data=pane.data}}
10 |
11 |
12 | {{/each}}
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/imports/api/user_segments/user_segments.js:
--------------------------------------------------------------------------------
1 | import { Meteor } from 'meteor/meteor';
2 | import { Mongo } from 'meteor/mongo';
3 | import { Class, Enum } from 'meteor/jagi:astronomy';
4 |
5 | const UserSegment = Class.create({
6 | name: 'UserSegment',
7 | collection: new Mongo.Collection('user_segments'),
8 | fields: {
9 | name: {
10 | type: String,
11 | default: 'Default user segment'
12 | },
13 | description: {
14 | type: String,
15 | default: 'The default user segment for relevant content'
16 | }
17 | }
18 | });
19 |
20 | export { UserSegment };
21 |
--------------------------------------------------------------------------------
/imports/ui/pages/ask_questions/ask_questions.js:
--------------------------------------------------------------------------------
1 | import { Question } from '/imports/api/questions/questions.js';
2 | import { User, Profile, UserType, MyersBriggs, Answer } from '/imports/api/users/users.js';
3 | import { Meteor } from 'meteor/meteor';
4 | import './ask_questions.html';
5 | import '../../components/questions/questions.js';
6 | import '../../components/personality/personality.js';
7 |
8 |
9 |
10 |
11 | Template.ask_questions.helpers({
12 | answeredQuestionsLength() {
13 | let u = User.findOne({_id:Template.instance().userId});
14 | return u.MyProfile.UserType.AnsweredQuestions.length;
15 | }
16 | });
17 |
--------------------------------------------------------------------------------
/.meteor/.finished-upgraders:
--------------------------------------------------------------------------------
1 | # This file contains information which helps Meteor properly upgrade your
2 | # app when you run 'meteor update'. You should check it into version control
3 | # with your project.
4 |
5 | notices-for-0.9.0
6 | notices-for-0.9.1
7 | 0.9.4-platform-file
8 | notices-for-facebook-graph-api-2
9 | 1.2.0-standard-minifiers-package
10 | 1.2.0-meteor-platform-split
11 | 1.2.0-cordova-changes
12 | 1.2.0-breaking-changes
13 | 1.3.0-split-minifiers-package
14 | 1.4.0-remove-old-dev-bundle-link
15 | 1.4.1-add-shell-server-package
16 | 1.4.3-split-account-service-packages
17 | 1.5-add-dynamic-import-package
18 | 1.7-split-underscore-from-meteor-base
19 |
--------------------------------------------------------------------------------
/dump/onAnswered.js:
--------------------------------------------------------------------------------
1 | /*
2 | if (qq.label[0] == 'q') {
3 | let categories = qq.list[2].split('|');
4 |
5 | let catLetters = ["IE", "NS", "TF", "JP"];
6 |
7 | for (let i = 0; i < categories.length; i++) {
8 | let totLbl = '_'+catLetters[categories[i]];
9 | console.log("typeof $a",typeof $a(totLbl));
10 | if ("undefined" === typeof $a(totLbl)) {
11 | $set(totLbl, 0);
12 | }
13 | if ("undefined" === typeof $a(totLbl+'_count')) {
14 | $set(totLbl+'_count', 0);
15 | }
16 | $set(totLbl+'_count', $a(totLbl+'_count')+1);
17 | $set(totLbl, $a(totLbl)+dbVal);
18 | }
19 | }
20 | */
21 |
--------------------------------------------------------------------------------
/imports/ui/stylesheets/user_profile.less:
--------------------------------------------------------------------------------
1 | .user-profile {
2 | &.container {
3 | position: relative;
4 | max-width: 400px;
5 | }
6 | #btn-group {
7 | display: none;
8 | position: absolute;
9 | top: 10px;
10 | right: 10px;
11 | z-index: 11;
12 | }
13 | }
14 | .right{
15 | float:right;
16 | }
17 | .left{
18 | float:left;
19 | }
20 | .btn-space{
21 | margin-left: 10px;
22 | }
23 | .alert-margin{
24 | margin-top: 5px;
25 | margin-bottom: 1px;
26 | height: 20px;
27 | line-height:20px;
28 | padding:0px 15px;
29 | }
30 | #verifyButton {
31 | position: absolute;
32 | left: 100px;
33 | }
34 |
--------------------------------------------------------------------------------
/imports/ui/stylesheets/opposites.less:
--------------------------------------------------------------------------------
1 | .title1 {
2 | color: black;
3 | font-size: 18px;
4 | text-align: center;
5 | padding: 5px;
6 | }
7 | .title2 {
8 | color: black;
9 | font-size: 14px;
10 | }
11 | .title3 {
12 | color: black;
13 | }
14 | .title4 {
15 | color: black;
16 | font-size: 16px;
17 | text-align: center;
18 | }
19 | .space {
20 | margin: 10px;
21 | padding: 5px;
22 | }
23 | .border {
24 | padding: 8px;
25 | line-height: 1.42857143;
26 | vertical-align: top;
27 | border-top: 1px solid #ddd;
28 | }
29 | // .position1 {
30 | // position: absolute;
31 | // margin-left: -235px;
32 | // }
33 | // .position2 {
34 |
35 | // }
--------------------------------------------------------------------------------
/imports/ui/stylesheets/behavior_pattern_area.less:
--------------------------------------------------------------------------------
1 | .behavior_pattern_area {
2 | width: 60%;
3 | background-image: url('/img/mbtiBackground.png');
4 | background-repeat: no-repeat;
5 | background-position: center center;
6 | background-size: 54%;
7 | }
8 | @media (max-width: 576px) {
9 | .behavior_pattern_area {
10 | width: 100%;
11 | }
12 | }
13 | @media (min-width: 576px) and (max-width: 768px) {
14 | .behavior_pattern_area {
15 | width: 95%;
16 | }
17 | }
18 | @media (min-width: 768px) and (max-width: 992px) {
19 | .behavior_pattern_area {
20 | width: 90%;
21 | }
22 | }
23 | @media (min-width: 992px) and (max-width: 1200px) {
24 | .behavior_pattern_area {
25 | width: 80%;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/docker/production/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM centos
2 | MAINTAINER Paladin and Archer
3 | #ENV NODEJS_VERSION=v8.7.0
4 | ENV NODEJS_VERSION=v10.15.0
5 | ENV PATH=/apps/node/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/bin
6 | ENV USER=root
7 | ENV HOME=/root/
8 |
9 | WORKDIR /root/
10 | COPY padawan-node-setup.sh /root/
11 | RUN chmod +x padawan-node-setup.sh
12 | RUN ./padawan-node-setup.sh
13 | ENV TAG_WORKAROUND=201711240332
14 | ADD ./padawan.tar.gz /var/www/padawan/
15 | WORKDIR /var/www/padawan/bundle/programs/server/
16 | RUN npm i && npm i forever -g && npm i forever
17 | WORKDIR /var/www/padawan/bundle/
18 | COPY entrypoint.sh .
19 | COPY settings.prod.json .
20 | RUN chmod +x entrypoint.sh
21 | ENTRYPOINT ["./entrypoint.sh"]
22 |
--------------------------------------------------------------------------------
/docker/staging/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM centos
2 | MAINTAINER Paladin and Archer
3 | #ENV NODEJS_VERSION=v8.7.0
4 | ENV NODEJS_VERSION=v10.15.0
5 | ENV PATH=/apps/node/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/bin
6 | ENV USER=root
7 | ENV HOME=/root/
8 |
9 | WORKDIR /root/
10 | COPY padawan-node-setup.sh /root/
11 | RUN chmod +x padawan-node-setup.sh
12 | RUN ./padawan-node-setup.sh
13 | ENV TAG_WORKAROUND=201711240332
14 | ADD ./padawan.tar.gz /var/www/padawan/
15 | WORKDIR /var/www/padawan/bundle/programs/server/
16 | RUN npm i && npm i forever -g && npm i forever
17 | WORKDIR /var/www/padawan/bundle/
18 | COPY entrypoint.sh .
19 | COPY settings.staging.json .
20 | RUN chmod +x entrypoint.sh
21 | ENTRYPOINT ["./entrypoint.sh"]
22 |
--------------------------------------------------------------------------------
/imports/ui/stylesheets/add_questions.less:
--------------------------------------------------------------------------------
1 | #newQuestion {
2 | .selectize-input {
3 | border-radius: 3px 0 0 3px;
4 | background-color: #5cb85c;
5 |
6 | ::-webkit-input-placeholder { /* Chrome/Opera/Safari */
7 | color: #eee;
8 | }
9 | ::-moz-placeholder { /* Firefox 19+ */
10 | color: #eee;
11 | }
12 | :-ms-input-placeholder { /* IE 10+ */
13 | color: #eee;
14 | }
15 | :-moz-placeholder { /* Firefox 18- */
16 | color: #eee;
17 | }
18 | }
19 | .selectize-control.multi .selectize-input > div {
20 | * margin-bottom: 0;
21 | }
22 | }
23 | .container.questions {
24 | margin-top: 50px;
25 | }
26 |
--------------------------------------------------------------------------------
/utils/db_restore.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | show_usage() {
3 | echo "USAGE: $0 DB_INSTANCE RESTORE_FROM"
4 | }
5 |
6 | BAK_PATH=~/bak
7 | if [[ "$2" == "" ]]; then
8 | show_usage
9 | exit 0
10 | else
11 | if [[ "$1" == "production_database_1" ]]; then
12 | DATA_PATH=~/prod_data
13 | elif [[ "$1" == "staging_database_1" ]]; then
14 | DATA_PATH=~/stag_data
15 | else
16 | echo "Invalid database instance. Valid values are:"
17 | echo "- production_database_1"
18 | echo "- staging_database_1"
19 | exit 0
20 | fi
21 | cp $BAK_PATH/$2 $DATA_PATH
22 | cd $DATA_PATH
23 | tar xzvf $2
24 | sudo docker exec $1 /bin/bash -c 'cd /data/db && mongorestore dump/'
25 | fi
26 |
--------------------------------------------------------------------------------
/imports/api/help/helperPagesCached.js:
--------------------------------------------------------------------------------
1 | import { Meteor } from 'meteor/meteor';
2 | import { HelperPages } from './helperPages.js';
3 | import { NVCache } from '../nvcache/nvcache.js';
4 |
5 | const HelperPagesCached = {
6 | getPageObjectBySlug(slug) {
7 | var ret = NVCache.findOne({name:slug});
8 | if(!ret) {
9 | ret = new NVCache();
10 | ret.name = slug;
11 | }
12 | if (ret.isExpired(Meteor.settings.public.Pages.Base.CacheTTL)) {
13 | ret.value = HelperPages.getPageObjectBySlug(slug);
14 | ret.save();
15 | }
16 | return ret.value;
17 | },
18 | getPageContentBySlug(slug) {
19 | var data= this.getPageObjectBySlug(slug).content.rendered;
20 | return data;
21 | }
22 | };
23 |
24 | export { HelperPagesCached };
--------------------------------------------------------------------------------
/imports/ui/layouts/login/login.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
12 |
13 |
14 |
15 |
16 |
17 | {{> atForm}}
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/docker/dev/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: '3'
2 | services:
3 | app:
4 | build: .
5 | ports:
6 | - "3000:3000"
7 | links:
8 | - database
9 | environment:
10 | - MONGO_URL=mongodb://database:27017/testing
11 | - ROOT_URL=http://localhost
12 | - PORT=3000
13 | - NODE_DEBUG=bull
14 | volumes:
15 | - "../..:/app"
16 | - "uploads:/uploads"
17 | extra_hosts:
18 | - 'tsqapp:172.17.0.1'
19 | database:
20 | image: mongo:3.6
21 | restart: always
22 | ports:
23 | - "3001:27017"
24 | volumes:
25 | - "db-data:/data/db"
26 | redis:
27 | image: redis
28 | restart: always
29 | volumes:
30 | - "redis-data:/data/redis"
31 | volumes:
32 | db-data:
33 | uploads:
34 | redis-data:
35 |
--------------------------------------------------------------------------------
/imports/ui/components/timer/timer.js:
--------------------------------------------------------------------------------
1 | import './timer.html';
2 | import { Timer } from '/imports/api/timer/timer.js';
3 |
4 | Template.timer.onCreated(function() {
5 | this.lssid = FlowRouter.getParam('lssid');
6 | this.subscribe('timersData', this.lssid);
7 | })
8 | Template.timer.helpers({
9 | timeSinceLastPresenterSelectedMinutes() {
10 | let timer = Timer.findOne( {presenterId:Template.instance().data.presenter.id} );
11 | if (!timer) {
12 | return null;
13 | }
14 | return ('0' + Math.floor(timer.time/60)).slice(-2);
15 | },
16 | timeSinceLastPresenterSelectedSeconds() {
17 | let timer = Timer.findOne( {presenterId:Template.instance().data.presenter.id} );
18 | if (!timer) {
19 | return null;
20 | }
21 | return ('0' + Math.floor(timer.time % 60)).slice(-2);
22 | },
23 | });
24 |
--------------------------------------------------------------------------------
/imports/ui/pages/verify/verify.js:
--------------------------------------------------------------------------------
1 | import { User } from '/imports/api/users/users.js';
2 | import './verify.html';
3 |
4 | Template.user_profile.onCreated(function () {
5 | this.autorun( () => {
6 | this.subscription = this.subscribe('userData', {
7 | onStop: function () {
8 | console.log("User profile subscription stopped! ", arguments, this);
9 | },
10 | onReady: function () {
11 | console.log("User profile subscription ready! ", arguments, this);
12 | }
13 | });
14 | });
15 | });
16 |
17 | Template.verify.events({
18 | 'click #resend-verify'(event, instance) {
19 | event.preventDefault();
20 | FlowRouter.redirect("/profile");
21 | // Meteor.call( 'user.sendVerificationEmail', () => {
22 | // console.log('resent');
23 | // });
24 | }
25 | });
26 |
--------------------------------------------------------------------------------
/imports/api/user_feedback/user_feedback.js:
--------------------------------------------------------------------------------
1 | import { Meteor } from 'meteor/meteor';
2 | import { Mongo } from 'meteor/mongo';
3 | import { Class, Enum } from 'meteor/jagi:astronomy';
4 |
5 | const UserFeedback = Class.create({
6 | name: 'UserFeedback',
7 | collection: new Mongo.Collection('user_feedback'),
8 | fields: {
9 | userId: {
10 | type: String,
11 | default: ''
12 | },
13 | source: {
14 | type: String,
15 | default: ''
16 | },
17 | context: {
18 | type: String,
19 | default: ''
20 | },
21 | comment: {
22 | type: String,
23 | default: ''
24 | },
25 | dateCreated: {
26 | type: Date,
27 | default: function() { return new Date(); }
28 | }
29 | }
30 | });
31 |
32 | export { UserFeedback };
33 |
--------------------------------------------------------------------------------
/imports/ui/stylesheets/not-found.less:
--------------------------------------------------------------------------------
1 | #not-found {
2 | width: 700px;
3 | margin: 0 auto;
4 | .not-found-image {
5 | width: 25%;
6 | float: left;
7 | }
8 | .not-found-title {
9 | width: 70%;
10 | float: right;
11 | background: url(/img/bg-footer.svg);
12 | background-repeat: no-repeat;
13 | background-position: center;
14 | background-size: contain;
15 | min-height: 400px;
16 | h1 {
17 | font-size: 30px;
18 | color: #1f2128;
19 | margin-bottom: 20px;
20 | margin-top: 155px;
21 | }
22 | a.gotohomepage {
23 | background-color: #de4f4f;
24 | color: #fff;
25 | width: 180px;
26 | line-height: 40px;
27 | display: block;
28 | text-align: center;
29 | font-size: 14px;
30 | text-decoration: none;
31 | text-transform: uppercase;
32 | height: 40px;
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/imports/api/users/server/publications.js:
--------------------------------------------------------------------------------
1 | // All users-related publications
2 |
3 | import { Meteor } from 'meteor/meteor';
4 | import { User } from '../users.js';
5 |
6 | Meteor.publish('userData', function () {
7 | if(this.userId) {
8 | return User.find({ _id: this.userId }, {
9 | fields: { roles: 1, MyProfile: 1 }
10 | });
11 | } else {
12 | return this.ready();
13 | }
14 | });
15 |
16 | Meteor.publish('userList', function () {
17 | if ( Roles.userIsInRole(this.userId, ['admin'], Roles.GLOBAL_GROUP ) ) {
18 | return User.find( {} );
19 | } else {
20 | return User.find( {}, {
21 | fields: { roles: 1, username: 1, MyProfile: 1 }
22 | } );
23 | }
24 | });
25 |
26 | Meteor.publish('tsqUserList', function () {
27 | return User.find( {}, {
28 | fields: { MyProfile: 1, createdAt: 1 }
29 | } );
30 | });
31 |
--------------------------------------------------------------------------------
/imports/ui/pages/admin_tools/admin_tools.js:
--------------------------------------------------------------------------------
1 | import './admin_tools.html';
2 |
3 | Template.admin_tools.onCreated(function () {
4 | this.autorun( () => {
5 | if (Roles.subscription.ready()) {
6 | if (!Roles.userIsInRole(Meteor.userId(),'admin',Roles.GLOBAL_GROUP)) {
7 | FlowRouter.redirect('/notfound');
8 | }
9 | }
10 | });
11 | });
12 |
13 | Template.admin_tools.events({
14 | 'click button.add_questions'(event, instance) {
15 | FlowRouter.go('/addQuestions/IE');
16 | },
17 | 'click button.reports'(event, instance) {
18 | FlowRouter.go('/tools/reports');
19 | },
20 | 'click button.add_descriptions'(event, instance) {
21 | FlowRouter.go('/addTraitDescriptions');
22 | },
23 | 'click button.user_management' (event, instance) {
24 | FlowRouter.go('/tools/userManagement')
25 | }
26 |
27 | });
28 |
--------------------------------------------------------------------------------
/docker/vagrant/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM centos
2 |
3 | MAINTAINER Paladin and Archer
4 |
5 | ARG APP_PACKAGES=curl\ gzip\ python\ build-essential\ git
6 | ARG APP_LOCALE=en_US
7 | ARG APP_CHARSET=UTF-8
8 | ARG APP_USER=app
9 | ARG APP_USER_DIR=/home/${APP_USER}
10 |
11 | ENV APP_PORT=${APP_PORT:-3000}
12 | ENV APP_ROOT=${APP_ROOT:-/app}
13 |
14 | EXPOSE $APP_PORT
15 | VOLUME $APP_ROOT
16 |
17 | RUN yum -y install which
18 | RUN yum install -y ${APP_PACKAGES}
19 | #RUN yum install curl gzip python
20 |
21 | RUN yum -y install bsdtar \
22 | && cp $(which tar) $(which tar)~ \
23 | && ln -sf $(which bsdtar) $(which tar)
24 |
25 | RUN curl https://install.meteor.com/ | sh
26 |
27 | RUN mv $(which tar)~ $(which tar)
28 |
29 | RUN useradd -mUd ${APP_USER_DIR} ${APP_USER}
30 | RUN chown -Rh ${APP_USER} /usr/local
31 | USER ${APP_USER}
32 |
33 | WORKDIR ${APP_ROOT}
34 |
35 | COPY entrypoint.sh /
36 |
37 | ENTRYPOINT [ "/entrypoint.sh" ]
--------------------------------------------------------------------------------
/imports/ui/components/label_list/label_list.js:
--------------------------------------------------------------------------------
1 | import './label_list.html';
2 |
3 | Template.label_list.onCreated(function () {
4 | //
5 | });
6 |
7 | Template.label_list.helpers({
8 | customClass(item) {
9 | if ("guest" === item.value.slice(0,5)) {
10 | return "guest";
11 | } else {
12 | return "";
13 | }
14 | }
15 | })
16 | Template.label_list.onRendered(function () {
17 | var self = this;
18 | self.autorun( function () {
19 | console.log("label_list autorun");
20 | var dat = Template.currentData();
21 | if (!dat.nextParticipant) {
22 | return;
23 | }
24 | $('.picking').removeClass('picking').css('background-color', '');
25 | $('.label[data-value="' + dat.nextParticipant + '"]').addClass('picking');
26 |
27 | $('.label[data-value="' + dat.nextParticipant + '"]').css('background-color', '#ffa07a');
28 | })
29 | })
--------------------------------------------------------------------------------
/imports/ui/pages/comment_report/comment_report.js:
--------------------------------------------------------------------------------
1 | import "./comment_report.html";
2 | import { Meteor } from "meteor/meteor";
3 | import { UserFeedback } from "../../../api/user_feedback/user_feedback.js";
4 |
5 | Template.comment_report.onCreated(function() {
6 | this.autorun(() => {
7 | console.log("autorunning comment_report...");
8 | this.subscription = this.subscribe("userFeedback", {
9 | onStop: function() {
10 | console.log("userFeedback subscription stopped: ", arguments, this);
11 | },
12 | onReady: function() {
13 | console.log("userFeedback subscription ready: ", arguments, this);
14 | }
15 | });
16 | console.log("userFeedback subscription: ", this.subscription);
17 | });
18 | });
19 |
20 | Template.comment_report.helpers({
21 | getReport() {
22 | userFeedback = UserFeedback.find().fetch();
23 | return JSON.stringify(userFeedback).slice(1, -1);
24 | }
25 | });
26 |
--------------------------------------------------------------------------------
/imports/api/airtable/at.js:
--------------------------------------------------------------------------------
1 | import {Meteor} from 'meteor/meteor'
2 | import { HTTP } from 'meteor/http';
3 |
4 | //var Airtable = require('airtable');
5 | //Airtable.configure({
6 | // endpointUrl: 'https://api.airtable.com',
7 | // apiKey: 'keynpUHJS7l5QFWfQ'
8 | //});
9 | //var base = Airtable.base('appXlqlAQhi8cedpP');
10 |
11 | // const AT_URL = "https://api.airtable.com/v0/appXlqlAQhi8cedpP/";
12 | // const AT_KEY = "keynpUHJS7l5QFWfQ";
13 |
14 | function auth(method, endpoint, request, params) {
15 | let h = {
16 | "Authorization" : "Bearer "+AT_KEY
17 | };
18 | if(method === 'PUT' || method === 'POST' || method === 'PATCH') {
19 | h = {
20 | "Authorization" : "Bearer "+AT_KEY,
21 | "Content-Type" : 'application/json'
22 | };
23 | }
24 | result = HTTP.call(method, AT_URL+endpoint, {
25 | headers: h,
26 | data: request,
27 | params: params
28 | });
29 | return result;
30 | }
31 |
32 | module.exports.getResult = auth;
--------------------------------------------------------------------------------
/imports/startup/both/defaults.js:
--------------------------------------------------------------------------------
1 | import { Meteor } from 'meteor/meteor';
2 |
3 | const Defaults = {
4 | 'user': {
5 | 'username': 'admin',
6 | 'email': 'admin@mydomain.com',
7 | 'isAdmin': true,
8 | 'profile': {
9 | 'first_name': 'Admin',
10 | 'last_name': 'Admin',
11 | 'gender': 'female'
12 | }
13 | },
14 | 'team': {
15 | 'Name': "No Team",
16 | 'Public': true,
17 | 'Members': [],
18 | 'Active': true,
19 | },
20 | 'role': {
21 | 'name': 'No-Permissions'
22 | },
23 | 'supportEmail': 'support@developerlevel.com'
24 | }
25 |
26 | if (typeof Meteor.settings.public == "undefined") {
27 | Meteor.settings.public = { };
28 | }
29 | if (typeof Meteor.settings.public.Pages == "undefined") {
30 | Meteor.settings.public.Pages = {
31 | Base: {
32 | URL: "http://developerlevel.com/wp-json/wp/v2/pages/",
33 | Password: "",
34 | Context: "view",
35 | CacheTTL: 3660
36 | },
37 | "GRF_URL" : "http://stage.developerlevel.com/grf/"
38 | };
39 | }
40 |
41 | export { Defaults };
42 |
--------------------------------------------------------------------------------
/imports/ui/pages/mbti_roles/mbti_roles.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{ #unless dataRetrieved }}
4 | {{ > loading }}
5 | {{ /unless }}
6 |
7 |
8 |
17 |
18 | {{#with curRole}}
19 |
{{name}}
20 |
21 |
22 | {{> mbtiGraphRenderMulti}}
23 |
24 | {{/with}}
25 |
26 |
27 |
--------------------------------------------------------------------------------
/imports/ui/pages/char_sheet/char_sheet.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{#if Template.subscriptionsReady}}
4 | {{#if authorizedAccess}}
5 |
6 |
7 | {{#if conMenuValue "traitSpectrum"}}
8 |
9 | {{> mbti_char_report}}
10 |
11 | {{/if}}
12 | {{#if onPandATeam}}
13 | {{#if conMenuValue "tsq"}}
14 |
15 | {{> tsq_char_report}}
16 |
17 | {{ #if tsqTeam }}
18 | {{> tsqByTeam_char_report}}
19 | {{ /if }}
20 |
21 | {{/if}}
22 | {{/if}}
23 |
24 |
25 | {{else}}
26 |
27 | {{/if}}
28 | {{else}}
29 | {{> loading}}
30 | {{/if}}
31 |
32 |
33 |
--------------------------------------------------------------------------------
/settings.staging.json:
--------------------------------------------------------------------------------
1 | {
2 | "public": {
3 | "GRF_URL": "http://stage.developerlevel.com/grf/",
4 | "Pages": {
5 | "Base": {
6 | "URL": "http://developerlevel.com/wp-json/wp/v2/pages/",
7 | "Password": "",
8 | "Context": "view",
9 | "CacheTTL": 15
10 | }
11 | }
12 | },
13 | "private": {
14 | "TSQ_URL": "http://tsqapp:4000/tsq/",
15 | "Pages": {
16 | "TSQ": {
17 | "Slug": {
18 | "Intro" : "technical-skills-questionnaire-introduction",
19 | "Instructions" : "technical-skills-questionnaire-instructions"
20 | }
21 | },
22 | "TraitSpectrum": {
23 | "Slug": {
24 | "Intro" : "trait-spectrum-introduction",
25 | "Instructions" : "trait-spectrum-instructions"
26 | }
27 | }
28 | }
29 | },
30 | "Queue": {
31 | "Redis": {
32 | "server": "redis",
33 | "port": 6379
34 | },
35 | "Limiter": {
36 | "max": 5,
37 | "duration": 5000,
38 | "bounceBack": true
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/docker/production/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: '3'
2 | services:
3 | app:
4 | build: .
5 | ports:
6 | - "3000:3000"
7 | links:
8 | - database
9 | environment:
10 | - MONGO_URL=mongodb://database:27017/testing
11 | - ROOT_URL=http://app.paladinarcher.com
12 | - PORT=3000
13 | networks:
14 | - proxy-net
15 | database:
16 | image: mongo:3.6
17 | restart: always
18 | ports:
19 | - "27017:27017"
20 | volumes:
21 | - "/home/ec2-user/prod_data:/data/db"
22 | networks:
23 | - proxy-net
24 | proxy:
25 | image: nginx
26 | volumes:
27 | - "./nginx.conf:/etc/nginx/nginx.conf"
28 | - "/var/log/nginx/access.log:/var/log/nginx/access.log"
29 | ports:
30 | - "80:3002"
31 | links:
32 | - app
33 | networks:
34 | - proxy-net
35 | networks:
36 | proxy-net:
37 | external:
38 | name: devlvl_net
39 |
--------------------------------------------------------------------------------
/settings.dev-docker.json:
--------------------------------------------------------------------------------
1 | {
2 | "public": {
3 | "GRF_URL": "http://stage.developerlevel.com/grf/",
4 | "Pages": {
5 | "Base": {
6 | "URL": "http://developerlevel.com/wp-json/wp/v2/pages/",
7 | "Password": "",
8 | "Context": "view",
9 | "CacheTTL": 3600
10 | }
11 | }
12 | },
13 | "private": {
14 | "TSQ_URL": "http://tsqapp:4000/tsq/",
15 | "Pages": {
16 | "TSQ": {
17 | "Slug": {
18 | "Intro" : "technical-skills-questionnaire-introduction",
19 | "Instructions" : "technical-skills-questionnaire-instructions"
20 | }
21 | },
22 | "TraitSpectrum": {
23 | "Slug": {
24 | "Intro" : "trait-spectrum-introduction",
25 | "Instructions" : "trait-spectrum-instructions"
26 | }
27 | }
28 | },
29 | "Queue": {
30 | "Redis": {
31 | "server": "redis",
32 | "port": 6379
33 | },
34 | "Limiter": {
35 | "max": 5,
36 | "duration": 5000,
37 | "bounceBack": true
38 | }
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/imports/api/timer/timer.js:
--------------------------------------------------------------------------------
1 | import { Class } from 'meteor/jagi:astronomy';
2 | import { Mongo } from 'meteor/mongo';
3 |
4 | const Timers = new Mongo.Collection('timers');
5 | const Timer = Class.create({
6 | name: 'Timer',
7 | collection:Timers,
8 | fields: {
9 | learnShareSessionId: {
10 | type: String
11 | },
12 | presenterId: {
13 | type: String
14 | },
15 | time: {
16 | type: Number,
17 | default: 0
18 | },
19 | duration: {
20 | type: Number
21 | },
22 | remainingTime: {
23 | type: String,
24 | default: '',
25 | resolve(doc) {
26 | const time = doc.time
27 | const min = Math.floor(time / 60)
28 | const aMin = ('0' + min).slice(-2);
29 | const sec = Math.floor(time - min * 60);
30 | const aSec = ('0' + sec).slice(-2);
31 | return `${aMin}:${aSec}`
32 | }
33 | }
34 | },
35 | });
36 |
37 | export { Timer };
38 |
--------------------------------------------------------------------------------
/imports/ui/components/notification_list/notification_list.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
17 |
18 |
--------------------------------------------------------------------------------
/settings.local.json:
--------------------------------------------------------------------------------
1 | {
2 | "public": {
3 | "GRF_URL": "http://localhost:3100/grf/",
4 | "Pages": {
5 | "Base": {
6 | "URL": "http://developerlevel.com/wp-json/wp/v2/pages/",
7 | "Password": "",
8 | "Context": "view",
9 | "CacheTTL": 1
10 | }
11 | }
12 | },
13 | "private": {
14 | "TSQ_URL": "http://localhost:4000/tsq/",
15 | "Pages": {
16 | "TSQ": {
17 | "Slug": {
18 | "Intro" : "technical-skills-questionnaire-introduction",
19 | "Instructions" : "technical-skills-questionnaire-instructions"
20 | }
21 | },
22 | "TraitSpectrum": {
23 | "Slug": {
24 | "Intro" : "trait-spectrum-introduction",
25 | "Instructions" : "trait-spectrum-instructions"
26 | }
27 | }
28 | }
29 | },
30 | "Queue": {
31 | "Redis": {
32 | "server": "localhost",
33 | "port": 6379
34 | },
35 | "Limiter": {
36 | "max": 5,
37 | "duration": 5000,
38 | "bounceBack": true
39 | }
40 | }
41 | }
--------------------------------------------------------------------------------
/settings.prod.json:
--------------------------------------------------------------------------------
1 | {
2 | "public": {
3 | "GRF_URL": "http://app.developerlevel.com/grf/",
4 | "Pages": {
5 | "Base": {
6 | "URL": "http://developerlevel.com/wp-json/wp/v2/pages/",
7 | "Password": "",
8 | "Context": "view",
9 | "CacheTTL": 1440
10 | }
11 | }
12 | },
13 | "private": {
14 | "TSQ_URL": "http://app.developerlevel.com/tsq/",
15 | "Pages": {
16 | "TSQ": {
17 | "Slug": {
18 | "Intro" : "technical-skills-questionnaire-introduction",
19 | "Instructions" : "technical-skills-questionnaire-instructions"
20 | }
21 | },
22 | "TraitSpectrum": {
23 | "Slug": {
24 | "Intro" : "trait-spectrum-introduction",
25 | "Instructions" : "trait-spectrum-instructions"
26 | }
27 | }
28 | }
29 | },
30 | "Queue": {
31 | "Redis": {
32 | "server": "redis",
33 | "port": 6379
34 | },
35 | "Limiter": {
36 | "max": 5,
37 | "duration": 5000,
38 | "bounceBack": true
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/imports/ui/pages/tsq/widget/widget.html:
--------------------------------------------------------------------------------
1 |
2 |
23 |
--------------------------------------------------------------------------------
/imports/startup/client/config.js:
--------------------------------------------------------------------------------
1 | Meteor.subscribe('userData');
2 | Meteor.subscribe('restrictedRoutes');
3 | global.Buffer = global.Buffer || require("buffer").Buffer;
4 | /*Meteor.subscribe('teamsData', Meteor.userId(), {
5 | onReady: function() {
6 | console.log("teamsData subscription ready");
7 | }
8 | }); */
9 |
10 | // Accounts.onEmailVerificationLink((token, done) => {
11 | // console.log("token: ", token);
12 | // Accounts.verifyEmail(token, (error) => {
13 | // if (error) {
14 | // console.log("Error: ", error);
15 | // } else {
16 | // console.log("Email is verified");
17 | //
18 | //
19 | //
20 | // // FlowRouter.redirect('/profile', {
21 | // // triggersEnter: [AccountsTemplates.ensureSignedIn,ensureEmailVerified],
22 | // // name: 'profile',
23 | // // action(params, queryParams) {
24 | // // BlazeLayout.render('App_body', { top: 'header', main: 'user_profile' });
25 | // // }
26 | // // });
27 | //
28 | // done();
29 | // }
30 | // });
31 | // });
32 |
--------------------------------------------------------------------------------
/Vagrantfile:
--------------------------------------------------------------------------------
1 | # -*- mode: ruby -*-
2 | # vi: set ft=ruby :
3 | Vagrant.configure("2") do |config|
4 | config.vbguest.iso_path = "D:/Programs/Oracle/VirtualBox/VBoxGuestAdditions.iso"
5 | config.vm.define "padawan", primary: true do |machine|
6 | machine.vm.box = "centos/7"
7 | machine.vm.box_version = "1811.02"
8 | machine.vm.hostname = "padawan"
9 |
10 | machine.vm.provider "virtualbox" do |vb, override|
11 | vb.memory = "8192"
12 | vb.cpus = "2"
13 | vb.gui = true
14 | machine.vm.synced_folder ".", "/u01/padawan", owner: "vagrant", group: "vagrant"
15 | end
16 | # machine.vm.provider "hyperv" do |hp, override|
17 | # hp.memory = "8192"
18 | # hp.cpus = "2"
19 | # machine.vm.synced_folder ".", "/u01/padawan", owner: "vagrant", group: "vagrant"
20 | ####problem - as it comes up it asks for username/password
21 | # end
22 |
23 | machine.vm.provision :docker
24 | machine.vm.provision :docker_compose, yml: "/u01/padawan/docker/vagrant/docker-compose.yml", run: "always"
25 | end
26 | config.vm.network "forwarded_port", guest: 3000, host: 3000, host_ip: "127.0.0.1"
27 | end
28 |
--------------------------------------------------------------------------------
/imports/ui/components/mbtiGraph/mbtiGraphCall.js:
--------------------------------------------------------------------------------
1 | import "./mbtiGraphRender.html";
2 | import { User } from "/imports/api/users/users.js";
3 | import { mbtiGraph } from "./mbtiGraph.js";
4 | import { Template } from "meteor/templating";
5 |
6 | Template.mbtiGraphRender.onCreated(function() {
7 | this.autorun(() => {
8 | this.subscription2 = this.subscribe("userList", this.userId, {
9 | onStop: function() {
10 | console.log("User List subscription stopped! ", arguments, this);
11 | },
12 | onReady: function() {
13 | console.log("User List subscription ready! ", arguments, this);
14 | }
15 | });
16 | });
17 | });
18 |
19 | Template.mbtiGraphRender.onRendered(function() {
20 | let userId = this.data.mbtiUID;
21 | let user = User.findOne({ _id: userId });
22 | let personality = user.MyProfile.UserType.Personality
23 |
24 | let valueIE = personality.IE.Value
25 | let valueNS = personality.NS.Value
26 | let valueTF = personality.TF.Value
27 | let valueJP = personality.JP.Value
28 | mbtiGraph(valueIE, valueNS, valueTF, valueJP, $("#grfTraits"), true, 50);
29 | // mbtiGraph(canvas, -50, 50, 20, -20);
30 | });
31 |
--------------------------------------------------------------------------------
/imports/api/nvcache/nvcache.js:
--------------------------------------------------------------------------------
1 | import { Meteor } from 'meteor/meteor';
2 | import { Mongo } from 'meteor/mongo';
3 | import { Class, Enum } from 'meteor/jagi:astronomy';
4 |
5 | const NVCache = Class.create({
6 | name: 'NVCache',
7 | collection: new Mongo.Collection('nvcache'),
8 | fields:{
9 | createdAt: Date,
10 | name: {
11 | type: String
12 | },
13 | value: {
14 | type: Object
15 | },
16 | updatedAt: Date
17 | },
18 | resolveError({ nestedName, validator }) {
19 | console.log(nestedName, validator);
20 | },
21 | events: {
22 | afterInit(e) {
23 | },
24 | beforeSave(e) {
25 | }
26 | },
27 | meteorMethods: {
28 | isExpired(ttl) {
29 | var date = new Date();
30 | //date.setDate(date.getDate() - 15);
31 | date.setMinutes(date.getMinutes() - ttl);
32 | return typeof this.updatedAt == "undefined" || date >= this.updatedAt;
33 | }
34 | },
35 | indexes: {
36 | name: {
37 | fields: {
38 | name: 1
39 | },
40 | options: {
41 | unique: true
42 | }
43 | }
44 | },
45 | behaviors: {
46 | timestamp: {}
47 | }
48 | });
49 |
50 | export { NVCache };
--------------------------------------------------------------------------------
/imports/ui/pages/admin_tools/admin_tools.html:
--------------------------------------------------------------------------------
1 |
2 | {{ #if isInRole 'admin' }}
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | {{ /if }}
31 |
--------------------------------------------------------------------------------
/imports/ui/components/mbtiGraph/mbtiGraphRenderMulti.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
33 |
34 |
35 |
![]()
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/imports/ui/pages/mvp/mvp.html:
--------------------------------------------------------------------------------
1 |
2 | {{#if is_logged_in}}
3 | {{trait_spectrum}}
4 | {{/if}}
5 |
6 |
11 |
12 |
13 |
14 |
15 |
16 |
22 |
23 | {{#if page}}
24 | {{> qnaire pg=page id=ts_id}}
25 | {{/if}}
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/imports/ui/stylesheets/select_feedback.less:
--------------------------------------------------------------------------------
1 | .feedback-box {
2 | position: fixed;
3 | top: 60px;
4 | right: 20px;
5 | width: 30%;
6 | background-color: #f0ad4e;
7 | color: #fff;
8 | z-index: 11;
9 | padding: 5px;
10 | border-radius: 3px;
11 | font-size: small;
12 | button {
13 | color: #000;
14 | }
15 | h3 {
16 | font-size: small;
17 | }
18 | .show-minimized {
19 | display: none;
20 | }
21 | .show-fullsize {
22 | display: block;
23 | }
24 | }
25 | .feedback-box.minimized {
26 | .show-minimized {
27 | display: block;
28 | }
29 | .show-fullsize {
30 | display: none;
31 | }
32 | }
33 | #personality-readings {
34 | .feedback-box {
35 | width: ~"calc(50% - 325px)";
36 | }
37 | .feedback-box.minimized {
38 | width: auto;
39 | right: 0px;
40 | }
41 | }
42 | .jumbotron {
43 | .feedback-box {
44 | width: ~"calc(30% - 225px)";
45 | }
46 | .feedback-box.minimized {
47 | width: auto;
48 | right: 0px;
49 | }
50 | }
51 | .sf-feedback-context {
52 | background-color: #D8BFD8;
53 | max-width: 100%;
54 | }
55 | .mytextarea {
56 | color: #000;
57 | width: 100%;
58 | height: 150px;
59 | }
60 |
--------------------------------------------------------------------------------
/imports/ui/pages/admin_reports/team_member_tsq/team_member_tsq.js:
--------------------------------------------------------------------------------
1 | import "./team_member_tsq.html";
2 | import { User } from '/imports/api/users/users.js';
3 |
4 | let currentUserDisplayed = new ReactiveVar();
5 |
6 | Template.team_member_tsq.onCreated(function () {
7 | this.autorun(() => {
8 | this.subscription = this.subscribe('userData', {
9 | onStop: function () {
10 | // console.log("User profile subscription stopped! ", arguments, this);
11 | },
12 | onReady: function () {
13 | // console.log("User profile subscription ready! ", arguments, this);
14 | let userId = FlowRouter.getParam('userId');
15 | let currentUser = User.findOne({ _id:userId })
16 | currentUserDisplayed.set(currentUser);
17 | }
18 | });
19 | });
20 | });
21 |
22 | Template.team_member_tsq.helpers({
23 | getCurrentUserDisplayed(){
24 | let currentUser = currentUserDisplayed.get();
25 | let result = `Currently viewing ${currentUser.MyProfile.firstName} ${currentUser.MyProfile.lastName}'s TSQ results`;
26 | return result;
27 | },
28 | isAdmin(){
29 | let isAdmin = Roles.userIsInRole(Meteor.userId(), 'admin', '__global_roles__');
30 | return isAdmin ? true : false;
31 | }
32 | });
33 |
--------------------------------------------------------------------------------
/imports/ui/pages/admin_reports/custom_report_triage/custom_report_triage.js:
--------------------------------------------------------------------------------
1 | import "./custom_report_triage.html";
2 | import { Template } from "meteor/templating";
3 | import { FlowRouter } from 'meteor/kadira:flow-router'
4 | import { Reports } from '/imports/api/reports/reports.js'
5 |
6 |
7 |
8 | //Template.custom_report_triage.onCreated(function () {
9 | // this.autorun(() => {
10 | // if (Roles.subscription.ready()) {
11 | // if (!Roles.userIsInRole(Meteor.userId(), 'admin', Roles.GLOBAL_GROUP)) {
12 | // FlowRouter.redirect('/notfound');
13 | // }
14 | // }
15 | // // sub to reports
16 | // reportSub(this)
17 | // this.reportTitle = FlowRouter.getParam("title")
18 | // // console.log(this.reportTitle)
19 | // this.getReport = (reportTitle) => Reports.findOne({ title: reportTitle })
20 | // this.report = this.getReport(this.reportTitle)
21 | // console.log(this.report)
22 | //
23 | // // Meteor.call('updateMBTIReport')
24 | // })
25 | //})
26 |
27 | Template.custom_report_triage.helpers({
28 | titleIsQnaireMbti () {
29 | isQnaireMbti = false;
30 | reportTitle = FlowRouter.getParam("title");
31 | if (reportTitle == 'Trait Spectrum') {
32 | isQnaireMbti = true;
33 | }
34 | return isQnaireMbti;
35 | }
36 | });
--------------------------------------------------------------------------------
/imports/api/tsq/TSQData.js:
--------------------------------------------------------------------------------
1 | const TSQ_DATA = [
2 | {
3 | scriptingLanguages: [
4 | { name: 'Python' },
5 | { name: 'Java' },
6 | { name: 'JavaScript' },
7 | { name: 'CSharp' },
8 | { name: 'C++' },
9 | { name: 'Visual Basic' },
10 | { name: 'PHP' },
11 | { name: 'Delphi/Object Pascal' },
12 | { name: 'Assembly' },
13 | { name: 'Ruby' },
14 | { name: 'R' },
15 | { name: 'Swift' },
16 | { name: 'Rust' },
17 | { name: 'C' }
18 | ]
19 | },
20 | {
21 | libraries: [
22 | { name: 'TypeScript' },
23 | { name: 'jQuery' },
24 | { name: 'Lodash' },
25 | { name: 'SASS' },
26 | { name: 'LESS' }
27 | ]
28 | },
29 | {
30 | markupLanguages: [
31 | { name: 'HTML' },
32 | { name: 'HTML5' },
33 | { name: 'CSS' },
34 | { name: 'CSS3' }
35 | ]
36 | },
37 | {
38 | frameworks: [
39 | { name: 'Nodejs' },
40 | { name: 'MEAN' },
41 | { name: 'MERN' },
42 | { name: 'Django' },
43 | { name: 'Flask' },
44 | { name: '.Net' },
45 | { name: 'WordPress' },
46 | { name: 'Drupal' },
47 | { name: 'October' },
48 | { name: 'Angular' },
49 | { name: 'React' },
50 | { name: 'Vue' },
51 | { name: 'Emberjs' }
52 | ]
53 | }
54 | ];
55 |
56 | export default TSQ_DATA;
57 |
--------------------------------------------------------------------------------
/imports/ui/stylesheets/header.less:
--------------------------------------------------------------------------------
1 | .navbar {
2 | margin-bottom: 0px;
3 | li.li-button {
4 | text-align: right;
5 | padding: 5px;
6 | }
7 | h4 {
8 | padding: 5px;
9 | }
10 | .brand > img {
11 | margin-top: -7px;
12 | }
13 | }
14 | .video-embed {
15 | border: 1px solid #CCC;
16 | border-radius: 3px;
17 | }
18 | .navbar-nav > li > a[name=profile] {
19 | padding: 10px 0;
20 | }
21 | .cat-pct {
22 | font-size: xx-small;
23 | text-align: center;
24 | padding: 5px 0;
25 | }
26 | .cat-disp {
27 | width: 19.5px;
28 | display: inline-block;
29 | }
30 | .cat-letter-rows {
31 | display: inline-block;
32 | }
33 | .nav {
34 | .personality-display {
35 | .cat-pct {
36 | display: none;
37 | }
38 | .img-circle {
39 | margin: -20px 0 -20px 0;
40 | }
41 | }
42 | }
43 | .personality-display {
44 | .img-circle {
45 | margin: -48px 0 -20px 0;
46 | }
47 | }
48 | .list-group-item-action:hover {
49 | background-color: #E5FFE5;
50 | }
51 | .list-group-item > label {
52 | width: 100%;
53 | }
54 | .dropdown:hover > .dropdown-menu {
55 | display: block;
56 | }
57 | .hide{
58 | display: none;
59 | }
60 | .first-name{
61 | color: rgb(169,169,169);
62 | margin-top: 15px;
63 | }
64 | #context-menu-div {
65 | display: none;
66 | }
--------------------------------------------------------------------------------
/imports/ui/stylesheets/mbti_graph.less:
--------------------------------------------------------------------------------
1 | .mbtiGraph {
2 | width: 60%;
3 | background-image: url('/img/mbtiBackground.png');
4 | background-repeat: no-repeat;
5 | background-position: center center;
6 | background-size: 54%;
7 | }
8 | .mbtiGraphMulti {
9 | width: 100%;
10 | background-image: url('/img/mbtiBackground.png');
11 | background-repeat: no-repeat;
12 | background-position: center center;
13 | background-size: 54%;
14 | }
15 | .is-visible {
16 | visibility: visible;
17 | }
18 | .not-visible {
19 | visibility: hidden;
20 | }
21 | .table-fixed-head {
22 | width:100%;
23 | overflow-y: auto;
24 | overflow-x: visible;
25 | height: 600px;
26 | }
27 |
28 | .table-fixed-head thead th {
29 | position: sticky;
30 | background-color: #ffffff;
31 | top: 0;
32 | }
33 | @media (max-width: 576px) {
34 | .mbtiGraph {
35 | width: 100%;
36 | }
37 | .table-fixed-head {
38 | height: 200px;
39 | }
40 | }
41 | @media (min-width: 576px) and (max-width: 768px) {
42 | .mbtiGraph {
43 | width: 95%;
44 | }
45 | .table-fixed-head {
46 | height: 200px;
47 | }
48 | }
49 | @media (min-width: 768px) and (max-width: 992px) {
50 | .mbtiGraph {
51 | width: 90%;
52 | }
53 | .table-fixed-head {
54 | height: 400px;
55 | }
56 | }
57 | @media (min-width: 992px) and (max-width: 1200px) {
58 | .mbtiGraph {
59 | width: 80%;
60 | }
61 | .table-fixed-head {
62 | height: 500px;
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/imports/ui/pages/mbti_results/mbti_results.js:
--------------------------------------------------------------------------------
1 | import './mbti_results.html';
2 | import { User } from '/imports/api/users/users.js';
3 | import { Meteor } from 'meteor/meteor';
4 |
5 | Template.mbti_results.onCreated(function () {
6 | this.autorun( () => {
7 | console.log("autorunning mbti_results...");
8 | this.subscription = this.subscribe('userList', Meteor.userId(), {
9 | onStop: function () {
10 | console.log("User List subscription stopped! ", arguments, this);
11 | },
12 | onReady: function () {
13 | console.log("User List subscription ready! ", arguments, this);
14 | }
15 | });
16 | console.log(this.subscription);
17 | });
18 | });
19 |
20 | Template.mbti_results.helpers({
21 | users() {
22 | let u = User.find().fetch();
23 | userData = [];
24 | u.forEach((m) => {
25 | let email = m.emails[0];
26 | if (typeof email == "undefined") { email = "NO EMAIL ADDRESS"; }
27 | else { email = email.address; }
28 | userData.push({
29 | _id: m._id,
30 | name: m.MyProfile.firstName + ' ' + m.MyProfile.lastName,
31 | pTypes: Object.keys(m.MyProfile.UserType.Personality),
32 | personality: m.MyProfile.UserType.Personality,
33 | email: email
34 | });
35 | });
36 |
37 | return userData;
38 | }
39 | });
--------------------------------------------------------------------------------
/imports/api/help/helperPages.js:
--------------------------------------------------------------------------------
1 | import { Meteor } from 'meteor/meteor';
2 | import { HTTP } from 'meteor/http';
3 |
4 | const helpBaseURL = Meteor.settings.public.Pages.Base.URL;
5 | const helpContext = Meteor.settings.public.Pages.Base.Context;
6 | const helpPassword= Meteor.settings.public.Pages.Base.Password;
7 |
8 | const HelperPages = {
9 | getPageBySlug(slug) {
10 | var url = this.getPageURL()+"&slug="+slug;
11 |
12 | // console.log('in helper:');
13 | // console.log('helpBaseURL: ', helpBaseURL);
14 | // console.log('helpContext: ', helpContext);
15 | // console.log('helpPassword: ', helpPassword);
16 |
17 | return url;
18 | },
19 | getPageURL() {
20 | let pass = Meteor.settings.public.Pages.Base.Password;
21 | var url= helpBaseURL+"?context="+helpContext+(pass != "" ? "&password="+pass : "");
22 | return url;
23 | },
24 | getPageObject(url) {
25 | console.log("Getting help page from "+url);
26 | const response = HTTP.get(url);
27 | return response.data;
28 | },
29 | getPageObjectBySlug(slug) {
30 | var obj = this.getPageObject(this.getPageBySlug(slug));
31 | if (Array.isArray(obj) && obj.length > 0) {
32 | var page = obj[0];
33 | return page;
34 | }
35 | return {content:{rendered:""}};
36 | },
37 | getPageContentBySlug(slug) {
38 | var data= this.getPageObjectBySlug(slug).content.rendered;
39 | //console.log(data);
40 | return data;
41 | }
42 | };
43 |
44 | export { HelperPages };
--------------------------------------------------------------------------------
/imports/api/parse_range/parse_range.js:
--------------------------------------------------------------------------------
1 | function parsePart(str) {
2 | // just a number
3 | if(/^-?\d+$/.test(str)) {
4 | return parseInt(str, 10);
5 | }
6 | var m;
7 | // 1-5 or 1..5 (equivilant) or 1...5 (doesn't include 5)
8 | if((m = str.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/))) {
9 | var lhs = m[1];
10 | var sep = m[2];
11 | var rhs = m[3];
12 | if(lhs && rhs) {
13 | lhs = parseInt(lhs);
14 | rhs = parseInt(rhs);
15 | var res = [];
16 | var incr = lhs < rhs ? 1 : -1;
17 |
18 | // Make it inclusive by moving the right 'stop-point' away by one.
19 | if(sep == '-' || sep == '..' || sep == '\u2025') {
20 | rhs += incr;
21 | }
22 |
23 | for(var i=lhs; i != rhs; i += incr) res.push(i);
24 | return res;
25 | }
26 | }
27 | return [];
28 | }
29 |
30 | const parseRange = function(str) {
31 | var parts = str.split(',');
32 |
33 | var toFlatten = parts.map(function(el) {
34 | return parsePart(el);
35 | });
36 |
37 | // reduce can't handle single element arrays
38 | if(toFlatten.length === 0) return [];
39 | if(toFlatten.length === 1) {
40 | if(Array.isArray(toFlatten[0]))
41 | return toFlatten[0];
42 | return toFlatten;
43 | }
44 |
45 | return toFlatten.reduce(function(lhs, rhs) {
46 | if(!Array.isArray(lhs)) lhs = [lhs];
47 | if(!Array.isArray(rhs)) rhs = [rhs];
48 | return lhs.concat(rhs);
49 | });
50 | };
51 |
52 | export { parseRange };
53 |
--------------------------------------------------------------------------------
/client/head.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Developer Level App
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/imports/ui/stylesheets/user_dashboard.less:
--------------------------------------------------------------------------------
1 | .user-dashboard {
2 | background-color: #CCC;
3 | width: 95%;
4 | height: 100%;
5 | padding: 5px 20px;
6 | border-radius: 6px;
7 | background: url(/img/congruent_pentagon.png);
8 |
9 | .dashboard-pane {
10 | background-color: rgba(255, 255, 255, 0.5);
11 | border: 1px solid #d0d0d0;
12 | border-radius: 6px;
13 | height: 400px;
14 | overflow: auto;
15 | box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px rgba(0, 0, 0, 0.6);
16 | padding: 5px;
17 | margin: 5px -10px;
18 | cursor: pointer;
19 |
20 | &:hover {
21 | box-shadow: 0 1px 1px rgba(255, 255, 255, 0.075) inset, 0 0 8px rgba(255, 255, 255, 0.6);
22 | background-color: rgba(255, 255, 255, 0.65);
23 | }
24 |
25 | .container {
26 | width: auto;
27 | }
28 | /* learn share session */
29 | .create-new-session {
30 | display: none;
31 | }
32 | .jumbotron {
33 | padding: 10px;
34 | margin-bottom: 10px;
35 | }
36 | /* team list */
37 | #form-new-team {
38 | display: none;
39 | }
40 | /* teams administration */
41 | .btn-expand,.btn-accept-join,.btn-decline-join {
42 | display: none;
43 | }
44 | /* questions */
45 | &.App_home .container {
46 | margin-top: 0px;
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/imports/ui/pages/results_descriptions/results_descriptions.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{> select_feedback source='results_descriptions'}}
4 |
7 | {{letterByCategory 0 user}}
10 |
11 | {{letterByCategory 1 user}}
14 |
15 | {{letterByCategory 2 user}}
18 |
19 | {{letterByCategory 3 user}}
22 |
23 |
24 |
25 |
26 | {{#each reading in readings}} {{> userReading reading=reading}} {{/each}}
27 |
28 |
29 |
30 |
31 |
32 | {{{getHSize reading}}}
33 |
34 | {{ reading.Body }}
35 |
36 |
37 |
--------------------------------------------------------------------------------
/utils/db_backup.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #cd /home/ec2-user/prod_data
3 | #sudo docker exec production_database_1 /bin/bash -c 'cd /data/db && mongodump'
4 | #bak_date=`date +"%Y_%m_%d"`
5 | #tar -zcvf prod_db_$bak_date.tar.gz dump
6 | #mv prod_db_$bak_date.tar.gz /home/ec2-user/bak
7 | #scp -i ~/.ssh/rigel-alpha.pem /home/ec2-user/bak/prod_db_$bak_date.tar.gz ec2-user@stage.developerlevel.com:/home/ec2-user/ext_bak/
8 |
9 |
10 | processLine() {
11 | line=$1
12 | dir_name="$(echo $line | sed 's/.\/\([^\/]*\)\/dump/\1/g')"
13 | bak_data=`date +"%Y_%m_%d"`
14 | file_name="$dir_name-$bak_data.tar.gz"
15 | echo "Processing $dir_name from $line to $file_name"
16 | pushd $line/..
17 | pwd
18 | tar -zcvf $file_name dump
19 | mv $file_name ~ec2-user/bak
20 | if [ "$HOSTNAME" = "stage.developerlevel.com" ]; then
21 | echo "On stage, not copying remotely"
22 | else
23 | echo "On $HOSTNAME, sending backup to stage"
24 | ssh -i ~ec2-user/.ssh/rigel-alpha.pem ec2-user@stage.developerlevel.com "mkdir -p ~ec2-user/ext_bak/$HOSTNAME"
25 | scp -i ~ec2-user/.ssh/rigel-alpha.pem ~ec2-user/bak/$file_name ec2-user@stage.developerlevel.com:/home/ec2-user/ext_bak/$HOSTNAME
26 | fi
27 | popd
28 | pwd
29 | }
30 | export -f processLine
31 | sudo docker container ls --format '{{.Names}}' | grep 'database' | xargs -I{} /bin/bash -c "echo {}; sudo docker exec {} /bin/bash -c 'cd /data/db && mongodump'"
32 | pushd ~ec2-user
33 | find . -type d | grep dump\$ | grep -v src | xargs -t -n1 -P1 bash -c 'processLine "$@"' _
34 | popd
--------------------------------------------------------------------------------
/docker/dev/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM debian:latest
2 |
3 | MAINTAINER Rick Golden "golden@golden-garage.net"
4 |
5 | # build arguments
6 | ARG APP_PACKAGES=curl\ gzip\ python\ build-essential\ git
7 | ARG APP_LOCALE=en_US
8 | ARG APP_CHARSET=UTF-8
9 | ARG APP_USER=app
10 | ARG APP_USER_DIR=/home/${APP_USER}
11 |
12 | # run environment
13 | ENV APP_PORT=${APP_PORT:-3000}
14 | ENV APP_ROOT=${APP_ROOT:-/app}
15 |
16 | # exposed ports and volumes
17 | EXPOSE $APP_PORT
18 | VOLUME $APP_ROOT
19 |
20 | # add packages for building NPM modules (required by Meteor)
21 | RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
22 | apt-get -y dist-upgrade && \
23 | apt-get install -y ${APP_PACKAGES} && \
24 | apt-get autoremove && \
25 | apt-get clean
26 |
27 | # set the locale (required by Meteor)
28 | #RUN localedef ${APP_LOCALE}.${APP_CHARSET} -i ${APP_LOCALE} -f ${APP_CHARSET}
29 |
30 | # create a non-root user that can write to /usr/local (suggested by Meteor)
31 | RUN useradd -mUd ${APP_USER_DIR} ${APP_USER}
32 | RUN chown -Rh ${APP_USER} /usr/local
33 |
34 | # meteor installer doesn't work with the default tar binary
35 | RUN apt-get install -y bsdtar \
36 | && cp $(which tar) $(which tar)~ \
37 | && ln -sf $(which bsdtar) $(which tar)
38 |
39 | # install Meteor
40 | RUN curl https://install.meteor.com/ | sh
41 |
42 | # put back the original tar
43 | RUN mv $(which tar)~ $(which tar)
44 |
45 | USER ${APP_USER}
46 |
47 | # run Meteor from the app directory
48 | WORKDIR ${APP_ROOT}
49 | COPY entrypoint.sh /
50 | #RUN /usr/local/bin/meteor update
51 |
52 | ENTRYPOINT [ "/entrypoint.sh" ]
53 |
--------------------------------------------------------------------------------
/imports/api/reports/reports.js:
--------------------------------------------------------------------------------
1 | import {Meteor} from 'meteor/meteor'
2 | import {Mongo} from 'meteor/mongo'
3 | import {Class} from 'meteor/jagi:astronomy'
4 |
5 | /**
6 | * Class to hold the report data
7 | * @param {Object} reportData - object containing the data for each report
8 | */
9 | const Report = Class.create({
10 | name: 'Report',
11 | fields: {
12 | reportData: {
13 | type: Object,
14 | }
15 | }
16 | })
17 |
18 |
19 | /**
20 | * Class to hold the report metadata and the report object
21 | * @param {String} reportTitle - report title information
22 | * @param {String} description - report description
23 | * @param {Report