Where do people sit in the offices of Blue Jeans Network? What's that person's name, whose face I remember but never really met? I've heard of this person, but I don't know their face. Where are the different teams grouped? What is A2's email address?
Clone the GitHub repository
git clone https://github.com/Aldaviva/floorplan.git
cd floorplan
Install dependencies
make install-deps
This installs Graphicsmagick and several NPM modules.
Set permissions so the server can write to the directories where CSS stylesheets and people's photos are saved
chmod +rwx public/styles data/photos
Create a configuration file based on the example
cp config.example.json config.json
You may edit the configuration file and change any settings you want, although the server will run with the default settings.
wwwPort
is the TCP port on which the Floorplan HTTP server listens. Useful if you want the server to listen on a different port, like 80
or 8080
. With the default value of 3000
, you can access the Floorplan web interface by going to http://127.0.0.1:3000/
.dbHost
is the host on which the MongoDB server runs. Useful if you have a MongoDB server on a different computer. With the default value of "127.0.0.1"
, the MongoDB server is on the same computer as Floorplan.dbPort
is the TCP port on which the MongoDB server listens. Useful if you have a non-default MongoDB configuration. With the default value of 27017
, Floorplan will connect to a MongoDB server with a default configuration.dbName
is the name of the MongoDB database that will be used to store people added to Floorplan. Useful if you want to run multiple different Floorplan instances on the same MongoDB server. With the default value of "floorplan"
, people documents will be stored in the people
collection of the floorplan
database in your MongoDB server.
If you want to connect to the database yourself, you can run
mongo floorplan
> db.people.find()
mountPoint
is the HTTP path under which the Floorplan web interface will be served. Useful if you want to reverse-proxy the Floorplan server through another HTTP server like Apache or Nginx due to TLS or a desire to serve multiple services on port 80. With the default value of "/"
, you can access the Floorplan web interface by going to http://127.0.0.1:3000/
, but if you changed mountPoint
to /floorplan
, you would have to go to http://127.0.0.1:3000/floorplan
.node index.js
Use Ctrl+C
to stop.
Go to http://127.0.0.1:3000
in your web browser. You should see a blue page that says "MV" in the top left.
Go to http://127.0.0.1:3000/admin/` in your web browser. You should see a white page that says "add person" in the top left.
Fill in the person's full name and any other details you want to set, then click the blue Save button.
Now when you view the Floorplan, the new person should appear in the list to the left and, if you assigned an office and seat, their photo will appear in their seating position.
views/maps
directory./svg/@viewBox
attribute (minX
, minY
, width
, height
). (0,0) is the top-left corner of the SVG canvas.minX
, minY
) using the JavaScript <script>
elemnent to define this.SEATS.mv.iconSize
and this.SEATS.mv.seatPositions
. If you change the name of the office from "mv"
, make sure you change it here too.polygon.background
element is the shape of the office footprint, which turns white in the Admin UI's seat choosing interface so the page isn't visible through the walls.g.walls
and child g.innerWalls
groups are the shapes that define where the walls of the office are, with differing stylesg.roomNames
group shows text on the Floorplan. Multiline text uses tspan
elements for positioning. g.room
groups optionally shows detailed conference room information, some of which (endpoint:id
, .statusBadge
) rely on external systems to work.g.seats
and g.photos
are always empty, and will be populated by the client-side presentation layer to show where people sit..arrow
links in some maps are used to navigate between offices that are spatially local to each other.public/styles/Map.less
, including the way walls and text are rendered.public/scripts/IntroView.js
.public/scripts/ListPane.js
.
public/styles/definitions.less
.public/styles/ListPane.less
.views/admin.hbs
.I find that the easiest way to generate the SVG files is to
viewBox
attribute value's top left position, width, and height to be the same as the Illustrator artboard.g.walls
and g.innerWalls
groups into my SVGCopy the rect
elements you made for the seating positions into a text editor, preferrably one with column editing like Sublime Text, and convert their x
and y
attributes into a JavaScript array of [x, y]
pairs:
Temporary SVG code generated by Illustrator for seat rectangles
<g class="seats">
<rect width="20" height="20" x="146.363" y="927.371" />
<rect width="20" height="20" x="847.134" y="813.174" />
</g>
JavaScript seats object array
this.SEATS.mv = {
iconSize: 20,
seatPositions: [
[146.363, 927.371],
[847.134, 813.174]
]
};
g.room .roomArea
to be the room area shapes you made.g.roomNames
text, restart the server, and line up the text coordinates using your browser's Developer Tools for fine positioning.