Open Aldaviva opened 9 years ago
How do you insert users (employees) on this script? I can't seem to fix this.
@RubenAmaroPT You can go to /admin/
in a web browser, which will show a form where you can type an employee's name, title, and other information, then click Save.
@Aldaviva Thank you for replying, however I didn't type correctly what was my problem, the problem is that when I entered the admin page, It would just show me a blank screen with a add button on the left.
I guess I'm going to try creating the server on linux and see the results. If the error mantains I will reply back. Thank you.
Ah ok. You should be able to click Add and several form fields appear on the right side of the screen, along with a Save button.
Are you seeing an error where the form doesn't appear when you click Add? If so, can you let me know what browser version you are using and any log messages you see in the console log?
Well I tried to open the server again (still in Windows) and go to admin page and it shows me this: http://prntscr.com/f8siok
This is what shows to me when I click add new person. Any idea how can I fix this?
EDIT: Using Chrome Version 58.0.3029.110 (64-bit)
Thanks for the screenshot.
Looks like a bug in this project. Will open a separate issue to track it.
Thank you for having the time to fix this. Good luck on finding and fixing that issue!
Oh, by the way, I have my server already open in linux, is there any way of inserting users already? Because it isn't generating any database in my mongodb. Image: http://prntscr.com/f8xtim
You can manually insert a person into the people
collection in the floorplan
Mongo database. Here is an example document.
{
"fullname": "Ben Hutchison",
"desk": 71,
"office": "mv3",
"email": "ben",
"title": "Sr. Software Engineer",
"tags": [
"eng"
],
"linkedInId": "in/aldaviva",
"mobilePhone": "123-456-7890",
"workPhone": "098-765-4321"
}
Maybe I'm dumb but I just did what you tell me and gives me no results when I refresh the database. Am I doing right? Have I misplaced something?
Image: http://prntscr.com/fan46z
It looks like the document did get inserted. Can you click the ›
to expand the row that says
(1) ObjectId("59229ba…
You should see all the field values of the object you passed to the insert
command.
I'm experiencing the same issue. Per the advice in this thread, I manually entered an employee into the "people" collection in the "floorplan" database, but I am still unable to see the employee by going to the website containing the map of the user's location, or have the option to add an employee on the admin site.
When I run "node index.js" from the server, it connects to the database successfully and is listening on the configured HTTP port.
I verified the manually entered user is present in the database: use floorplan db.getCollection('people').find({})
{ "_id" : ObjectId("59c4274b0a36d57c640b9bd2"), "fullname" : "Firstname Lastname", "desk" : 71,
"office" : "mv3", "email" : "firstname", "title" : "Position", "tags" : { "eng" ], "linkedInId" : "in/siteurl",
"mobilePhone" : "123-456-7890", "workPhone" : "098-765-4321" }
I don't know if it's related to why I'm not seeing anything other than the map of each location on the main pages, or why I can't see the manually entered user on the admin page, but I'm seeing some issues resolving "http://people" and "http://endpoints". Taking a quick look through some of the code (full disclosure: I am not a web dev and am not familiar with JavaScript), it looks like it's choosing these paths because it's pulling "url: config.MountPoint + '/people' " and "url: config.MountPoint + '/endpoints' ". Since, inside my config.json file, my mountPoint is "/", then I assume the url becomes "//people" and "//endpoints", which then gets resolved as HTTP sites.
Based on the code, should I have directories on my server for "people" and "endpoints"? Or should these be pointing to the mongodb database?
Here's what I see when looking at the site with the OC map: https://prnt.sc/gobzdv
Here's what I see when looking at the admin site then trying to select "add person": https://prnt.sc/goc66k
I appreciate any guidance.
Thanks @bdws, you've found a bug with the default mountPoint
setting getting turned into //
. This is the same as #34. I'm working on a fix now.
See #34 for the mountPoint
fix.
@Aldaviva Thanks for the quick fix and all of the work you've done for this project. Everything looks good for me now.