Skip to content

Commit f9f421e

Browse files
cemersozDerekTBrown
authored andcommitted
API changes for new infra, other changes (#210)
* issue 32 fixed * removed swp * fixed nconf issues * issue 82, 84 fixes * fixed #82 * isse #77 * fixed tests * fixed files * fixed tests master * fixed comment * moved validator * removed duplicate file * fixed tests, removed duplicate underscore, publish * changes * fixed methods.ts import * fixed issues w methods * fixes * minor fixes * A * api changes * fixed api * comments * minor changes * minor fixes * api changes (#126) * issue 32 fixed * removed swp * fixed nconf issues * issue 82, 84 fixes * fixed #82 * isse #77 * fixed tests * fixed files * fixed tests master * fixed comment * moved validator * removed duplicate file * fixed tests, removed duplicate underscore, publish * changes * fixed methods.ts import * fixed issues w methods * fixes * minor fixes * A * api changes * fixed api * comments * minor changes * minor fixes * method implementations * before merge * removed testing change * fixed typo * fixed prepareLab * removed test methods * fix prepareLab * methods changes * removed swap file * fixed merge * fixes * prepareLab WORKS * further fixes * merge * all works * deleted debug line * fixed minor excess code * minor indentation fix * reference fixes * fixes to nextTask * merged with master * minor changes * fixed merge problems * fixed md view and swithces * fixed error messages * removed debug code * removed swp * fixes * fixed typescript warning * added student object * changed function calls * deleted unnecessary files * updated api, added md feedback * fixed ts warn * fixed example_data and partially tests * update validator, merge * fixed indentation * changes * it's pretty now * what * fixes to api changes * fixed api, deleted swap * fixed etcd add * fixed #187, #188 * minor fixes * fixed indentation * added equal sign * updated example courses to match schema * added md parser * removed debug code * fixed debug, import * changed dockerode settings * implemented to-from json * from-to json * fixed etcd err * etcd cache changes * added env.util * multiple os support * minor changes * added -system- variable * added attempted field to course_records * fixed cache, Collections issues * fixed minor env errors * minor docker fixes, debug logs * minor change for timeout * env refactoring with system * #108 (#212) * Updated Schemas * Load Screen * Loading Screen * publish subscribe and dynamic explore page * deleted swap file * publish subscribe * template fixes * added start for reactive publication * template issue * . * . * course_records publish * course_records reactively publish * revert meteor update * publish subscribe and lineheight for searchpage icons * fixed indentation and removed test file * indentation * indentation * Accounts page and fixed random erro * toolbar for mobile devices * toolbar * account.html fixes * Toolbar made responsive * Responsive toolbar fixes * created userlist component * course_records course_id validation * indentation * markdown * import changes * validation addition * Forms Module Deprecated Warning. Issue #110 * indentation * Use routerLink * api changes (#126) * issue 32 fixed * removed swp * fixed nconf issues * issue 82, 84 fixes * fixed #82 * isse #77 * fixed tests * fixed files * fixed tests master * fixed comment * moved validator * removed duplicate file * fixed tests, removed duplicate underscore, publish * changes * fixed methods.ts import * fixed issues w methods * fixes * minor fixes * A * api changes * fixed api * comments * minor changes * minor fixes * method implementations (#127) * issue 32 fixed * removed swp * fixed nconf issues * issue 82, 84 fixes * fixed #82 * isse #77 * fixed tests * fixed files * fixed tests master * fixed comment * moved validator * removed duplicate file * fixed tests, removed duplicate underscore, publish * changes * fixed methods.ts import * fixed issues w methods * fixes * minor fixes * A * api changes * fixed api * comments * minor changes * minor fixes * method implementations * course pages now uses Child Routing * deleted LabData class * school name * search function * icon size and #136 * dashboard pull data from database * fix inappropriate file naming for gradelist and lablist * more templating issues * . * . * markdown default * lablist and gradelist * template changes * explore page changes * delete instructor page * user schema * indentation * indentation * explore publish and taskview sidenav * explore view links to course/courseId * taskview sidenav * taskview * taskview sidenav changes * Extend terminal on small width * . * . * Added UserList Component in Courses * Edit Course * . * course dashboard get courseid from url * delete userlist * input * delete userlist * publish for global admin * Fixed router params * Issue 161 fixed: instructor field in courses * . * fix nextButton * . * Issue #171 * Issue #168 * Issue 160: CourseList * Removed LabView * Enrollable field for buttons on explore pages * TaskView -> LabView * Fixed Gradelist, Lablist and styling issues * Issue #162 Completed * TaskView toolbar color darken * remove tests * Combine Subscriptions * Reactive Subscription for CourseList and GradeList * instructor view of course dashboard * Dashboard not logged in * markdown editor for labview * . * . * remove test * Syllabus update on course_dashboard for instructors works * onChange detect for mdeditor * fixed reversed md text editor * Disable links to non-accessible tasks for students * Fixed merge issues * markdown on explore * . * indentation * indentation * indentation * Course Permissions Editing functionality complete * course settings for instructors complete * #192 * . * Wed Aug 3 11:06:55 EDT 2016 * #208 * #211, #199 * api refactoring * api refactoring and fixes * some more refactoring. Removed debug code * updated readme * . * changes * wercks
1 parent ab5a60a commit f9f421e

File tree

13 files changed

+416
-145
lines changed

13 files changed

+416
-145
lines changed

client/imports/ui/pages/lab/labview.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ export default class LabView extends MeteorComponent {
7979
slf.labProgress = "0 / "+slf.tasks.length;
8080
slf.auth = {
8181
username: Meteor.user().profile.nickname,
82-
password: res.sshInfo.pass,
83-
domain: "10.100.1.11"
82+
password: res.system.password,
83+
domain: res.system.node_ip
8484
};
8585
slf.taskUpdates = res.taskUpdates;
8686

collections/README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,16 @@ The following document describes the MongoDB Schema used by the TuxLab app:
3636
message: 'Git Lab is due in 2 Weeks',
3737
link: 'course/1/lab/12'
3838
}
39+
],
40+
sessions: [
41+
{
42+
labId: "574467bc11091623418a429d",
43+
started: 1469648536858
44+
},
45+
{
46+
labId: "1346m2hjdj9f3kn003nbh93f",
47+
started: 1469348565858
48+
}
3949
]
4050
},
4151
{
@@ -145,9 +155,11 @@ The following document describes the MongoDB Schema used by the TuxLab app:
145155
grade: {16,100} // TUPLE
146156
data: {
147157
// INSTRUCTORS INJECT DATA
148-
}
158+
},
159+
attempted: [1467903228163, 1467905328235, 1467906228438]
149160
}
150-
]
161+
],
162+
attempted: [1467905208238, 1467905728238]
151163
}
152164
]
153165
}

collections/course_records.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ if(Meteor.isServer) {
5555
data: {
5656
type: Object,
5757
optional: true
58+
},
59+
attempted: {
60+
type: [Number]
5861
}
5962
});
6063
var labSchema = new SimpleSchema({
@@ -71,6 +74,9 @@ if(Meteor.isServer) {
7174
type: Object,
7275
optional: true
7376
},
77+
attempted: {
78+
type: [Number]
79+
},
7480
tasks: {
7581
type: [taskSchema]
7682
}

collections/users.ts

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,18 @@ if (Meteor.isServer){
7575
optional: true
7676
}
7777
})
78+
79+
var sessionSchema = new SimpleSchema({
80+
labId:{
81+
type: String
82+
},
83+
started:{
84+
type: Number,
85+
autoValue: function(){
86+
return Date.now();
87+
}
88+
}
89+
});
7890

7991
// Overall User Schema
8092
var userSchema = new SimpleSchema({
@@ -92,6 +104,9 @@ if (Meteor.isServer){
92104
announcements:{
93105
type: [announcementSchema],
94106
defaultValue: []
107+
},
108+
sessions:{
109+
type: sessionSchema
95110
}
96111
});
97112
(<any> Meteor.users).attachSchema(userSchema);
@@ -175,11 +190,11 @@ if(Meteor.isServer) {
175190
Meteor.startup(function() {
176191
Meteor.publish('userRoles', function() {
177192
this.autorun(function(computation) {
178-
return Meteor.users.find(this.userId, { fields: { "roles": 1} });
193+
return Meteor.users.find(this.userId, { fields: { "roles": 1, "sessions": 1} });
179194
});
180195
});
181196
});
182197
}
183198
if(Meteor.isClient) {
184199
Meteor.subscribe('userRoles');
185-
}
200+
}

private/settings.env.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
"key_ca" : "",
55
"swarm_node_ip" : "10.100.1.10",
66
"swarm_node_port" : "4000",
7+
"swarm_cert_dir" : "/etc/ssl/local",
78
"etcd_node_ip" : "10.100.1.10",
89
"etcd_node_port" : "2379",
910
"etcd_user" : "meteor",
10-
"etcd_pass" : "fff86d549374f03f4ba82bfe170b5018",
11+
"etcd_pass" : "6190f52cef3adb60598d6fdc8213bf9c",
1112
"default_image" : "alpine",
1213
"mongo_log_url" : "ds025792.mlab.com:25792/tuxlab",
1314
"mongo_log_collection" : "logs"

server/imports/api/env.os_families.js

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
//secure keys are not defined, but may be implemented
2+
3+
/** supported linux families for lab virtual machines
4+
* although instructors can pass system objects like the ones below,
5+
* no other os has been tested and may not function as expected
6+
* if the os_family field is not provided, all systems default to alpine
7+
*/
8+
var os_families = {
9+
//alpine defaults to the tuxlab_labvm image
10+
alpine: {
11+
username: "root",
12+
password: "",
13+
key: "",
14+
os_family: "alpine",
15+
image: "tuxlab_labvm",
16+
ssh_port: 22
17+
},
18+
19+
redhat: {
20+
username: "",
21+
password: "",
22+
key: "",
23+
os_family: "redhat",
24+
image: ""
25+
},
26+
27+
debian: {
28+
username: "",
29+
password: "",
30+
key: "",
31+
os_family: "debian",
32+
image: ""
33+
},
34+
35+
arch: {
36+
username: "",
37+
password: "",
38+
key: "",
39+
os_family: "arch",
40+
image: ""
41+
}
42+
}
43+
44+
module.exports = os_families;

0 commit comments

Comments
 (0)