Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External file for mapping machines to their position on the labmap #6

Open
raymondnumbergenerator opened this issue Feb 6, 2019 · 6 comments
Labels
good first issue Good for newcomers

Comments

@raymondnumbergenerator
Copy link
Member

Right now the positions of the machines are hardcoded in the typescript file.

It would be nice if we could read the mapping off some other file and maybe also have a way of indicating if a machine is out of service there.

I don't know how we do it now but @dongkyunc used to manually edit the page if a machine was broken.

@dkess
Copy link
Member

dkess commented Feb 6, 2019

This is a good fit for the github.com/ocf/etc repo

@dkess dkess added the good first issue Good for newcomers label Feb 6, 2019
@TonyLianLong
Copy link
Member

Shall we accomplish this with a Docker volume mapping and a simple nginx configuration (with AJAX)?

@dkess
Copy link
Member

dkess commented Mar 2, 2019

I was imagining doing this by creating a new ocfweb API function that returns the list of desktops (just like how we have an API function for returning lab hours). However, I suppose baking this information into the Docker container could work, in that case we wouldn't use AJAX but instead probably generate a Javascript file that assigns the mapping dictionary, which would then be run by the page. That file could be generated by a Python script during the build step.

Either way, we would first need to make a YAML config file in https://github.com/ocf/etc and then make ocflib functions to parse the file, just like what we do for lab hours.

@TonyLianLong
Copy link
Member

So every time there is a desktop change we need to re-build the container for lab map?

@dkess
Copy link
Member

dkess commented Mar 2, 2019

If we implemented it that way then yes

@raymondnumbergenerator
Copy link
Member Author

This is mentioned in the comments for updateMap but I still think there should be also be an api function that returns all available public desktops (the list of all desktops minus the ones we mark as not being publicly available minus the ones currently in use).

This solves the problem we're discussing here and also simplifies updateMap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants