ocf / ocfweb Goto Github PK
View Code? Open in Web Editor NEWThe main ocf website
Home Page: https://www.ocf.berkeley.edu
License: Other
The main ocf website
Home Page: https://www.ocf.berkeley.edu
License: Other
Would be nice to just hit each page once and ensure it doesn't 500.
These should use markdown syntax instead
My thoughts for deploying right now:
Yet unanswered questions:
How do we serve static assets? Currently we deploy them to https://www.ocf.berkeley.edu/~ocfweb/static/ but it's not a great solution.
Right now I'm thinking package them and deploy them to some directory Apache serves at static.ocf.berkeley.edu
or similar.
How do we gracefully fall back to the old content? We can set up Apache to proxy if it doesn't match a userdir pattern, but this means old pages like /OCF/whatever
will be going to ocfweb, and it needs some way to handle them if it doesn't know about the page.
There aren't that many pages on our current site, maybe we can just hard-code them in the Apache config as we remove them one-by-one (so we never actually proxy to ocfweb for them). Here's a list of current pages: https://gist.github.com/chriskuehl/8be24760c01e76574dfd (some are not actual pages)
I can do this tonight if somebody doesn't grab it first.
The Google Map is duplicated and yucky right now because I copy-pasted it to support two locations. We should merge those back into a single location (we won't need to support two locations again in the near future).
Not as big a deal as the hosting badges page but it's large and messy right now, plus it gets updated regularly.
Also remove all the hideous logos...
https://www.ocf.berkeley.edu/images/hosted-logos/index.shtml
There are a couple quirks.
https://www.ocf.berkeley.edu/images/hosted-logos/
these are important not to break when we launch
This is a long-term goal and will take some work. Actually merging the code should be straightforward. The main concerns are deployment:
It would be cool if it could use GSSAPI for users in the lab (and e.g. feature their print quota on the home page).
It would link to the GitHub editor page.
The max-height for the navbar is slightly smaller than the height of all the menus added together. This allows a small confusing margin of scrolling of several pixels. By increasing it or removing the max-height, this can be solved.
Per first BoD discussion we don't want to launch this with the top bar links leading off-site.
Currently only "Join" (atool) and "About Us" (/OCF/
) lead off-site. Porting atool before launch is not practical, but porting at least the base /OCF/
probably is.
(There is still #2 for porting the rest of the /OCF/*
pages.)
imo these should exist in ocfweb, not in Apache
This means all our normal hours are visible on a normal week.
didn't investigate at all yet
A problem was encountered and reported via ocflib:
An exception occured in ocfweb:
Traceback (most recent call last):
File "/usr/share/python/ocfweb/lib/python3.4/site-packages/django/core/handlers/base.py", line 147, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/share/python/ocfweb/lib/python3.4/site-packages/ocfweb/main/home.py", line 24, in home
blog_posts = get_blog_posts()[:2]
TypeError: 'NoneType' object is not subscriptable
Request:
* Host: www.ocf.berkeley.edu
* Path: /
* Method: GET
* Secure: True
Request Headers:
{'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
'HTTP_CONNECTION': 'close',
'HTTP_HOST': 'www.ocf.berkeley.edu',
'HTTP_USER_AGENT': 'Rackspace Monitoring/1.1 '
'(https://monitoring.api.rackspacecloud.com)',
'HTTP_X_FORWARDED_FOR': '78.136.44.23, 169.229.226.23',
'HTTP_X_FORWARDED_HOST': 'www.ocf.berkeley.edu',
'HTTP_X_FORWARDED_PROTO': 'https',
'HTTP_X_FORWARDED_SERVER': 'www.ocf.berkeley.edu',
'PATH_INFO': '/',
'QUERY_STRING': '',
'RAW_URI': '/',
'REMOTE_ADDR': '127.0.0.1',
'REMOTE_PORT': '46784',
'REQUEST_METHOD': 'GET',
'SCRIPT_NAME': '',
'SERVER_NAME': '127.0.0.1',
'SERVER_PORT': '8000',
'SERVER_PROTOCOL': 'HTTP/1.0',
'SERVER_SOFTWARE': 'gunicorn/19.4.1',
'gunicorn.socket': <socket.socket fd=16, family=AddressFamily.AF_INET, type=SocketType.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 8000), raddr=('127.0.0.1', 46784)>,
'wsgi.errors': <gunicorn.http.wsgi.WSGIErrorsWrapper object at 0x7efe33be1908>,
'wsgi.file_wrapper': <class 'gunicorn.http.wsgi.FileWrapper'>,
'wsgi.input': <gunicorn.http.body.Body object at 0x7efe33be1208>,
'wsgi.multiprocess': True,
'wsgi.multithread': False,
'wsgi.run_once': False,
'wsgi.url_scheme': 'https',
'wsgi.version': (1, 0)}
Session:
{}
====
Hostname: coma.ocf.berkeley.edu
Callstack:
at /usr/share/python/ocfweb/lib/python3.4/site-packages/ocflib/misc/mail.py:59 (send_problem_report)
by /usr/share/python/ocfweb/lib/python3.4/site-packages/ocfweb/middleware/errors.py:47 (process_exception)
by /usr/share/python/ocfweb/lib/python3.4/site-packages/django/core/handlers/base.py:262 (process_exception_by_middleware)
by /usr/share/python/ocfweb/lib/python3.4/site-packages/django/core/handlers/base.py:149 (get_response)
by /usr/share/python/ocfweb/lib/python3.4/site-packages/django/core/handlers/wsgi.py:177 (__call__)
by /usr/share/python/ocfweb/lib/python3.4/site-packages/gunicorn/workers/sync.py:171 (handle_request)
by /usr/share/python/ocfweb/lib/python3.4/site-packages/gunicorn/workers/sync.py:130 (handle)
by /usr/share/python/ocfweb/lib/python3.4/site-packages/gunicorn/workers/sync.py:30 (accept)
by /usr/share/python/ocfweb/lib/python3.4/site-packages/gunicorn/workers/sync.py:66 (run_for_one)
by /usr/share/python/ocfweb/lib/python3.4/site-packages/gunicorn/workers/sync.py:119 (run)
by /usr/share/python/ocfweb/lib/python3.4/site-packages/gunicorn/workers/base.py:126 (init_process)
by /usr/share/python/ocfweb/lib/python3.4/site-packages/gunicorn/arbiter.py:515 (spawn_worker)
by /usr/share/python/ocfweb/lib/python3.4/site-packages/gunicorn/arbiter.py:548 (spawn_workers)
by /usr/share/python/ocfweb/lib/python3.4/site-packages/gunicorn/arbiter.py:482 (manage_workers)
by /usr/share/python/ocfweb/lib/python3.4/site-packages/gunicorn/arbiter.py:179 (run)
by /usr/share/python/ocfweb/lib/python3.4/site-packages/gunicorn/app/base.py:72 (run)
by /usr/share/python/ocfweb/lib/python3.4/site-packages/gunicorn/app/base.py:192 (run)
by /usr/share/python/ocfweb/lib/python3.4/site-packages/gunicorn/app/wsgiapp.py:74 (run)
by /usr/share/python/ocfweb/bin/gunicorn:11 (<module>)
There are a few seconds when the site is down when we deploy. Might be tricky to fix but would be a cool goal. Occasionally it triggers monitoring when the timing is unlucky.
https://www.ocf.berkeley.edu/OCF/ and other pages under that directory
When you hover over an h4 header in docs, the anchor link icon which appears is taller than the text, so the height increases causing the page to jitter a tiny bit. We should decrease the icon size or increase the text size or something since it's a little annoying.
Both links on this page are dead. Are we going to fix them or just delete the links?
How much toner is left in each printer? (expressed as approximate pages remaining over time)
How many pages has each printer printed? (expressed as total pages printed over time)
The link icon doesn't change size depending on the heading it's inside, and will make headings jumpy on hover.
This may or may not be tricky, but even getting only the headlines from the status blog would be really valuable. We want everyone to be well aware what's happening when there's a security alert or a service goes down.
Currently loading the "documentation" page results in every single wiki page being loaded from disk and Markdown-d. It's easy to cache this.
Additionally, the home page makes a bunch of LDAP calls which we can cache.
The Django cache didn't look very useful for function-level caching (which is what we want), maybe we want to use functools.lru_cache or something. Need to be a little careful about dev though.
I made it from the SVG directly (i.e. not resizing a raster), so not sure why. Probably needs some pixel love.
I just raised quotas to 5 GB, but can't find any mention anywhere of the old quota to update. We should probably mention it somewhere...
should be relatively straightforward, I already started
per @nattofriends
Might be able to just copy-paste almost the entire thing.
https://github.com/ocf/atool/blob/master/atool/middleware/errors.py
For example:
https://dev.ocf.berkeley.edu/docs/faq/
I think this is a side-effect of overreaching CSS rules intended for the link icons.
On the current website we sometimes post urgent messages like this:
It would be nice if we could do something similar on ocfweb, preferably reading from an external file so we don't have to push the site to update it.
It should also allow overriding the "is lab open" check (which currently is based on ocflib hours).
It really never should have been part of the wiki anyway. It's totally broken now.
A common question, brought up in rt#3973. Should probably distinguish free vs. proprietary software, off-site vs. on-site, web software versus web hosting service (and how the latter two are often intentionally muddled up). Also give a somewhat more complete list of available software.
Currently they are just constant True
, which is only ok for the "web" one.
We can change them by pushing the site, but ideally they'd do something smart (even pinging the relevant server would be OK).
It would be cool if they read a file in ~staff
so that we could update the status immediately.
Perhaps bootstrap-calendar or django-bootstrap-calendar.
from @daradib:
On the vhost banner page:
https://www.ocf.berkeley.edu/docs/services/vhost/badges/
The img src is broken for virtual hosts, unless you wish to include /hosted-logos in every vhost definition, which is not necessarily a bad idea.
Also please add a trailing slash to the href.
Much thanks.
Currently it's just a wiki page:
https://dev.ocf.berkeley.edu/docs/services/lab/
We have good support in ocflib for hours/holidays now (in use on the home page and the status bar), we should use it.
These pages are too short to be separate articles.
On small/narrow screens, the OCF sidebar goes to the bottom of the page. It would be a minor improvement to have the docs ToC in an expandable box near the top like Wikipedia.
http://supernova.ocf.berkeley.edu:8460/docs/faq/
It should probably just strip HTML tags.
Should be easy to do using https://developers.google.com/maps/documentation/static-maps/intro
Replaced by #19
It's ok now, it could use a few tweaks (e.g. ToC appears at the end, probably should just omit entirely)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.