Giter Site home page Giter Site logo

linkedin / oncall Goto Github PK

View Code? Open in Web Editor NEW
1.1K 41.0 224.0 5.62 MB

Oncall is a calendar tool designed for scheduling and managing on-call shifts. It can be used as source of dynamic ownership info for paging systems like http://iris.claims.

Home Page: http://oncall.tools

License: BSD 2-Clause "Simplified" License

Makefile 0.04% Python 44.66% CSS 5.11% JavaScript 40.00% HTML 9.84% Shell 0.14% Dockerfile 0.14% Smarty 0.06% Procfile 0.02%
oncall calendar scheduling

oncall's Introduction

Oncall Gitter chat Build Status

See admin docs for information on how to run and manage Oncall.

Development setup

Local machine

See instructions for setting up Oncall on your local machine

Prerequisites

  • Debian/Ubuntu - sudo apt-get install libsasl2-dev python3-dev libldap2-dev libssl-dev python-pip python-setuptools mysql-server mysql-client

Install

python setup.py develop
pip install -e '.[dev]'

Setup mysql schema:

mysql -u root -p < ./db/schema.v0.sql

Setup app config by editing configs/config.yaml.

Optionally, you can import dummy data for testing:

mysql -u root -p -o oncall < ./db/dummy_data.sql

Run

One of the following commands:

  • goreman start
  • procman start
  • make serve
  • oncall-dev ./configs/config.yaml

Test

make test

Docker compose

See instructions for using docker compose

Running

make compose

or running docker compose directly:

docker compose up --build

Limitations

  • Doesn't currently provide a mechanism for running tests
  • Requires rebuilding to apply code changes
  • Doesn't tail Python logs to stdout

Contributing

Check out https://github.com/linkedin/oncall/issues for a list of outstanding issues, and tackle any one that catches your interest. Contributions are expected to be tested thoroughly and submitted with unit/end-to-end tests; look in the e2e directory for our suite of end-to-end tests.

oncall's People

Contributors

adszm avatar ahm3djafri avatar billyab avatar chriscarini avatar colinxy avatar ddurruty-li avatar dependabot[bot] avatar diegocepedaw avatar dnozay avatar dwang159 avatar fellyns avatar houqp avatar jensenja avatar jeremybender-work avatar jkrauska avatar jordo1138 avatar jrgp avatar jwon avatar lukdz avatar lyveng avatar manufacturedba avatar mighq avatar nickeidler avatar p6knewman avatar roock avatar shoxv avatar tbrockman avatar timfreund avatar tkahnoski avatar wleese avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

oncall's Issues

Add Note to Install OpenLDAP

Received the following error when running python setup.py develop

    In file included from Modules/LDAPObject.c:9:0:
    Modules/errors.h:8:18: fatal error: lber.h: No such file or directory
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

Should save a few minutes by specifying it's a prerequisite. Maybe provide platform specific instruction? apt-get install libldap2-dev ?

Getting error while installing oncall (pip install -e '.[dev]')

Hi Team,

We are trying oncall in our infrastructure, I am getting the below error while installing "pip install -e '.[dev]'". Please help to fix it.

(oncall) root@iris2:~/oncall# python --version
Python 2.7.6

(oncall) root@iris2:~/oncall# pip --version
pip 18.0 from /root/oncall/local/lib/python2.7/site-packages/pip (python 2.7)

Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-ptgnVW/tornado/setup.py", line 146, in
raise ImportError("Tornado requires an up-to-date SSL module. This means "
ImportError: Tornado requires an up-to-date SSL module. This means Python 2.7.9+ or 3.4+ (although some distributions have backported the necessary changes to older versions).

user and password to portal?

hello, what is the easiest way to create user/pass in the portal?

i had to load the dummy_data.sql and then login using root/root. any other password would not work? and i did not see the password defined in the sql file.

once i login, i don't see a way to create additional users? do i have to insert into database or is there a simpler way to add users?

Add better default authentication module

Currently, authentication is handled externally (LDAP at LinkedIn), and only a debug auth module is provided to open source users. Add auth that lives inside of Oncall's database for users who might not have an LDAP server.

Expose scheduler start time in frontend

Let people move the scheduler start time forward if they want to. Backwards should not be allowed; instead use Populate button. This should let people manually fill in events for a bit, then resume scheduling.

Login info

I have installed everything and it works, but I can not find any username and password to use for login via the web page. Is there a default admin user or how should I make a new one?

Need clear instructions on installing from scratch

Hi,

I'm having trouble installing oncall in our linux environment using the instructions given.

Here is one of the errors while running "python setup.py develop" :
I have a venv set up with python 3.6.3

Processing dependencies for oncall==1.1.0 Searching for slackclient Reading https://pypi.python.org/simple/slackclient/ Downloading https://files.pythonhosted.org/packages/1f/9e/dd5bb327786be753e5d8de976082eb714cb83abeb00f67f0646ba2e166ad/slackclient-1.2.1.tar.gz#sha256=e9de0c893e8c5473107f5927ae1e543d35246f0c834f5e86470b22b762211577 error: Download error for https://files.pythonhosted.org/packages/1f/9e/dd5bb327786be753e5d8de976082eb714cb83abeb00f67f0646ba2e166ad/slackclient-1.2.1.tar.gz#sha256=e9de0c893e8c5473107f5927ae1e543d35246f0c834f5e86470b22b762211577: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)

  1. Can we have clear step by step instructions to download and install oncall for both development and separately for production use ? Please note that not everyone uses Docker.

  2. Is it possible to package oncall so we can start it easily ? i.e. minimum run. For example in a VM or as a single zip file ?

Thanks

LDAPS enforcement

I created #171 for this, but a user should be allowed to speak ldap:// to an LDAP/AD server and simply omit the ldap_cert_path key in config.yaml.

Javascript error: Moment Timezone has no data for Europe/Amsterdam

It seems that a minimal version of timezone data is included (js/moment-tz-data.js) rather than the full version js/moment-tz-data-full.js.

This results in an error when using timezones outset of the smaller subset. Not sure how to proceed. It's rather unfriendly to ask users to patch the timezone data. But I can imagine including the full dataset is rather heavy (175kb vs 9kb).

That said, perhaps this is just unavoidable when gaining wider exposure.

Add LDAP bind account with DN lookup support

Often LDAP authentication is done by:

  • bind using a low privileged account
  • look up the user's DN based on username
  • binding as that DN

I believe this is common enough to warrant the ldap_example.py to provide such an 'example' implementation.

how to run e2e tests

Hello!

I am currently testing the oncall system in this repo and found it very good to use.
I ran the automatic tests but I was constantly getting 403 status code, which failed every e2e test.


For example :
โ–ถ pytest e2e/test_audit.py
=================================== test session starts ===================================
platform linux2 -- Python 2.7.14, pytest-3.5.0, py-1.5.3, pluggy-0.6.0
rootdir: /home/sensetime/workspace/oncall-dev, inifile:
plugins: mock-1.8.0
collected 1 item

e2e/test_audit.py E [100%]

========================================= ERRORS ==========================================
______________________________ ERROR at setup of test_audit _______________________________

@pytest.fixture(scope="session", autouse=True)
def require_test_user():
    re = requests.post(api_v0('users'), json={'name': 'test_user'})
  assert re.status_code in [422, 201]

E assert 403 in [422, 201]
E + where 403 = <Response [403]>.status_code

e2e/conftest.py:27: AssertionError
================================= 1 error in 0.06 seconds =================================


Should I set up something before testing? Any help will be appreciated.

Show all modes on User Settings page

When adding a new mode to Oncall, for example Hipchat, we'd like the "id" to be visible on the User Settings page.

Perhaps this should be adopted in the calendar and team info pages.

ldap_sync.py Breaks when 0 Users Currently Exist

Hi all,

First off, I love this project. Big time user first time caller.

Quick bug report that ldap_sync.py doesn't seem to work if there are currently 0 users in the oncall database. The relevant section of code is below:

159  	    oncall_users = {}
160  	    users_query = '''SELECT `user`.`name` as `name`, `contact_mode`.`name` as `mode`, `user_contact`.`destination`,
161  	                            `user`.`full_name`, `user`.`photo_url`
162  	                     FROM `user`
163  	                     LEFT OUTER JOIN `user_contact` ON `user`.`id` = `user_contact`.`user_id`
164  	                     LEFT OUTER JOIN `contact_mode` ON `user_contact`.`mode_id` = `contact_mode`.`id`
165  	                     ORDER BY `user`.`name`'''
(Pdb) 
166  	    for row in engine.execute(users_query):
167  	        contacts = oncall_users.setdefault(row.name, {})
168  	        if row.mode is None or row.destination is None:
169  	            continue
170  	        contacts[row.mode] = row.destination
171  	        contacts['full_name'] = row.full_name
172  	        contacts['photo_url'] = row.photo_url
173  	
174  	    oncall_usernames = set(oncall_users)
175  	
176  	    # users from ldap and config file
(Pdb) 
177  	    ldap_users = fetch_ldap()
178  	    stats['ldap_found'] += len(ldap_users)
179  	    ldap_users.update(get_predefined_users(config))
180  	    ldap_usernames = set(ldap_users)
181  	
182  	    # set of ldap users not in oncall
183  	    users_to_insert = ldap_usernames - oncall_usernames
184  	    # set of existing oncall users that are in ldap
185  	    users_to_update = oncall_usernames & ldap_usernames
186  	    # set of users in oncall but not ldap, assumed to be inactive
187  	    inactive_users = oncall_usernames - ldap_usernames
(Pdb) 
188  	    # users who need to be deactivated
189  	    rows = engine.execute('SELECT name FROM user WHERE active = TRUE AND name IN %s', inactive_users)

When executing against a DB with 0 users, this happens:

  File "ldap_sync.py", line 309, in <module>
    main(config)
  File "ldap_sync.py", line 300, in main
    sync(config, engine)
  File "ldap_sync.py", line 189, in sync
    rows = engine.execute('SELECT name FROM user WHERE active = TRUE AND name IN %s', inactive_users)
  File "/alldata/home/iris/env/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1991, in execute
    return connection.execute(statement, *multiparams, **params)
  File "/alldata/home/iris/env/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 906, in execute
    return self._execute_text(object, multiparams, params)
  File "/alldata/home/iris/env/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1054, in _execute_text
    statement, parameters
  File "/alldata/home/iris/env/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
    context)
  File "/alldata/home/iris/env/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
    exc_info
  File "/alldata/home/iris/env/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb)
  File "/alldata/home/iris/env/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
    context)
  File "/alldata/home/iris/env/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 450, in do_execute
    cursor.execute(statement, parameters)
  File "/alldata/home/iris/env/local/lib/python2.7/site-packages/pymysql/cursors.py", line 158, in execute
    result = self._query(query)
  File "/alldata/home/iris/env/local/lib/python2.7/site-packages/pymysql/cursors.py", line 308, in _query
    conn.query(q)
  File "/alldata/home/iris/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 820, in query
    self._affected_rows = self._read_query_result(unbuffered=unbuffered)
  File "/alldata/home/iris/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 1002, in _read_query_result
    result.read()
  File "/alldata/home/iris/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 1285, in read
    first_packet = self.connection._read_packet()
  File "/alldata/home/iris/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 966, in _read_packet
    packet.check_error()
  File "/alldata/home/iris/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 394, in check_error
    err.raise_mysql_exception(self._data)
  File "/alldata/home/iris/env/local/lib/python2.7/site-packages/pymysql/err.py", line 120, in raise_mysql_exception
    _check_mysql_exception(errinfo)
  File "/alldata/home/iris/env/local/lib/python2.7/site-packages/pymysql/err.py", line 112, in _check_mysql_exception
    raise errorclass(errno, errorvalue)
sqlalchemy.exc.ProgrammingError: (pymysql.err.ProgrammingError) (1064, u"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1") [SQL: 'SELECT name FROM user WHERE active = TRUE AND name IN %s'] [parameters: (set([]),)]

I got around it in the meantime by just using oncall-admin to create a temporary user.

Attempt to delete/recreate a team fails: team exists

This is my first go with oncall. The system was installed by another person, so I'm working with an existing environment.

I created a team named 'tools', played around a bit and decided to recreate it, based on what I had learned. So I used the option to "Delete team", found in the "Team Info" page.

All references to the team in the web UI disappeared, as expected.

Attempting to create a "new" team using the name "tools" fails, with the error 'Failed: team name "Tools" already exists'.

This is not what I would expect. And is there a way to do the above that I missed, or is this a bug?

Unable to run oncall - throws ModuleNotFoundError

Hi,

I followed the instructions given to install and run oncall but ran into this issue :
Note - python version is 3.6.3, using virtualenv , OS is linux SLES11.

(venv) $ make serve oncall-dev ./configs/config.yaml Traceback (most recent call last): File "/nfs/user1/workspace/oncall/venv/bin/oncall-dev", line 11, in <module> load_entry_point('oncall', 'console_scripts', 'oncall-dev')() File "/nfs/user1/workspace/oncall/venv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 565, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/nfs/user1/workspace/oncall/venv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2631, in load_entry_point return ep.load() File "/nfs/user1/workspace/oncall/venv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2291, in load return self.resolve() File "/nfs/user1/workspace/oncall/venv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2297, in resolve module = __import__(self.module_name, fromlist=['__name__'], level=0) File "/nfs/user1/workspace/oncall/src/oncall/bin/run_server.py", line 11, in <module> import oncall.utils File "/nfs/user1/workspace/oncall/src/oncall/utils.py", line 13, in <module> from constants import ONCALL_REMINDER ModuleNotFoundError: No module named 'constants' make: *** [serve] Error 1

I tried adding the local directory to the PATH variable, but receive the same error.
Can someone please advise ?

libldap2-dev

Dear Maintainer,

I'm maybe stupid but I'm not able to install the app. Any of Linux distro I get the same error massage:

The following packages have unmet dependencies:
libldap2-dev : Depends: libldap-2.4-2 (= 2.4.40+dfsg-1+deb8u3) but 2.4.44+dfsg-5+deb9u1~bpo8+1 is to be installed
E: Unable to correct problems, you have held broken packages.

Please help me overcome!

Many thanks!
Zoltan

prometheus_client is not installed

When running oncall with metrics: prometheus, the oncall-notifier fails, because prometheus_client is not installed in setup.py:

Traceback (most recent call last):
  File "/home/oncall/env/bin/oncall-notifier", line 9, in <module>
    load_entry_point('oncall', 'console_scripts', 'oncall-notifier')()
  File "/home/oncall/source/src/oncall/bin/notifier.py", line 146, in main
    metrics.init(config, 'oncall-notifier', {'message_blackhole_cnt': 0, 'message_sent_cnt': 0, 'message_fail_cnt': 0})
  File "/home/oncall/source/src/oncall/metrics/__init__.py", line 33, in init
    metrics_provider = get_metrics_provider(config, app_name)
  File "/home/oncall/source/src/oncall/metrics/__init__.py", line 22, in get_metrics_provider
    config['metrics'])(config, app_name)
  File "/home/oncall/source/src/oncall/utils.py", line 132, in import_custom_module
    return getattr(import_module(module_path), module)
  File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/oncall/source/src/oncall/metrics/prometheus.py", line 7, in <module>
    from prometheus_client import Gauge, start_http_server
ImportError: No module named prometheus_client

Allow Users to Edit their Contact Info

I currently use user_sync.py via ldap_sync.py to pull down all users' contact information from LDAP, but many users either do not want their full contact info published in LDAP or want different contact info used for Oncall. This leaves us with a "hybrid" source of user attributes.

I've been using oncall-admin as a stopgap to edit user contact info that differs from LDAP, but are there any plans/features underway to integrate the same functionality into the user's respective Settings page?

I would be happy to write such functionality into Oncall if I have your support for the feature.

Warn users deleting scheduler events

Pop up a modal warning users that the scheduler does not backfill without a manually triggered "Populate" action when deleting an event with a schedule id.

Add UI for team subscription

As mentioned in linkedin/iris#330

We actually have a feature in-flight for this kind of use-case in Oncall. We call it "team subscription", which lets a team in Oncall borrow another team's events and put them onto its calendar. This lets you have TeamA "subscribe" to TeamB's primary events, and have them appear on TeamA's calendar. Then, when you query Oncall for TeamA's current primary, TeamB's primary will appear.

The main thing missing there is UI support; there's not yet a way to add them in the frontend. I think the calendar display for subscribed events is a little rough around the edges as well, but I haven't been able to get the time to throw that together. I think I'll check in with our web dev and our designer at LinkedIn and see what they're thinking about it.

After careful consideration, we'd not only like to use this feature, but also want to expose it to our users.

Add UI to change scheduler

We're trying to solve various scheduling concerns by implementing new behavior in an Iris lookup plugin.

For example, we'd like teams to optionally take national holidays into consideration, to avoid teams doing limited shifts, say workdays 08:00-18:00, to get alerts on holidays. In an Iris lookup plugin, we simply do the usual oncall lookup as usual, except on these special days, we return zero hits.

Also, for these teams, considering their limited workhours, we painstakingly craft their schedule template (mon: 10 hours, tues: 10 hours, wed: 10 hours, etc).

Then there's the confusion in #112 - something we're sure to run into once a team determines they want to change the person on duty daily, rather than per X weeks.

All this could be improved by exposing a dropdown in the schedule template builder, to select the scheduler, with some (inline) documentation and the mention of the ability to implement your own schedulers.

Full support of timezone

Hi, could you add a full support of the timezones
Found in the code many partial timezone definition.
Thanks

error while creating new team

i am facing 404 error while creating a new team from oncall interface. Also, i could see that so many options are not available on the interface.

oncall error

Support for locales / translations

Hi,
are there any plans to translate in other languages and/or use locales?

Especially, the support for locales are very interesting, because the display of the calendar
and the dates are different i.e. in Germany where weeks starts at Monday, instead of Sunday
and the date is in format of Day.Month.Year instead of Month/Day/Year.

The date format can confuse users in Germany, because 2/11/2018 (February, 11 2018) can be
interpret to 2nd of November 2018 very fast.

Thanks for attentions.
Bjoern (from Germany)

Gui checkbox & global flag not working

Sooo, I won't lie and say I'm a JS expert, but I have a pretty good understanding of what's going on in oncall.js. But for the life of me, I can't get a checkbox I've added to Browse Teams to work. I need the renderTeams function to be able to interrogate the value of a gui checkbox. So I tried adding a checkbox to index.html. I tacked on a change event and it wouldn't fire unless I put it in a window.onload event. But it worked. Then I tried setting a global flag based on the checkbox and I can't get the renderdata function to read it properly. Sooo I need some help here. What is the recommended way to add a checkbox element onto the browse teams page : and how do I get it's change event to be read.

KeyError: 'image_url' when trying to run oncall-user-sync

When trying to run oncall-user-sync I ran into an issue trying to perform an LDAP sync with my local Active Directory user OU.

Note: OnCall binaries are installed to /usr/bin/oncall
Copy of error:

$ /usr/bin/oncall-user-sync /home/oncall/configs/config.yaml
2017-08-02 15:05:17,596 INFO oncall.metrics Loaded metrics handler dummy
2017-08-02 15:05:17,596 INFO oncall.metrics Loaded metrics handler dummy
2017-08-02 15:05:17,597 INFO root Starting user sync loop at 1501700717.6
2017-08-02 15:05:17,597 INFO root Starting user sync loop at 1501700717.6
2017-08-02 15:05:17,890 INFO root Loaded 300 entries from ldap.
2017-08-02 15:05:17,890 INFO root Loaded 300 entries from ldap.
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/gevent-1.2.2-py2.7-linux-x86_64.egg/gevent/greenlet.py", line 536, in run
    result = self._run(*self.args, **self.kwargs)
  File "/home/oncall/src/oncall/user_sync/ldap_sync.py", line 300, in main
    sync(config, engine)
  File "/home/oncall/src/oncall/user_sync/ldap_sync.py", line 207, in sync
    user_id = engine.execute(user_add_sql, (username, full_name, LDAP_SETTINGS['image_url'] % username)).lastrowid
KeyError: 'image_url'
Wed Aug  2 15:05:17 2017 <Greenlet at 0x3112eb0: main({'user_sync': {'activated': True, 'module': 'oncal)> failed with KeyError

As a workaround I modified line 209 in ldap_sync.py from this:

user_id = engine.execute(user_add_sql, (username, full_name, LDAP_SETTINGS['image_url'] % username)).lastrowid

To this....

user_id = engine.execute(user_add_sql, (username, full_name)).lastrowid

At the very least this allowed me to perform and initial sync of my Active Directory user data for the first time. I'm not concerned yet with needing to keep in constant sync as I'm testing this tool right now so I don't yet know if keeping the sync process running 24/7 will have any other errors. I'll report other errors as seen.

*From what I can tell, it looks like the ldap_sync.py script is expecting an LDAP attribute to exist called "image_url" for each object. I recommend to remove "image_url" as a requirement as not everyone will have this for their user accounts in their own LDAP/AD environments. I can create an enhancement request for this if needed.

ldap_sync and User Editable Contact Info

Related to #114

I really do like how users can edit their own contact info now. Makes the process a lot less painful than having to update Active Directory every time they want to change phone numbers.

However, we're running up against an issue where ldap_sync syncs down an empty call/sms contact_mode to the user, overwriting any contact info they already had in the DB. Furthermore, the User Settings page does not allow a user to add their phone number if they don't already have that contact mode -- the field simply isn't shown.

I'm fixing this in our environment with two changes:

  1. ldap_sync will never sync down a blank contact field to overwrite a populated field. This is just destroying data.
  2. If ldap_sync sees call and SMS in LDAP, it will at least sync down a blank string so the user can add in a phone number in their Settings page a later date.

How do you feel about fixing it this way? If this is acceptable I can have a PR sent over in a few mins. Thanks!

Unclear how to use Advanced Schedules

I'm unclear how to create advanced schedules. For sake of easy input, let's say I have two shifts that I want to rotate among my roster, All day Sunday and All day Tuesday. No matter what I do, I end up with the same schedule.

  • 1st Sunday - User A
  • 1st Tuesday - User A
  • 2nd Sunday - User B
  • 2nd Tuesday - User B
  • etc.

My first approach was to create a schedule with multiple rows.

My second approach was to create multiple schedules, one with the Sunday shift, One with the Tuesday shift, and populate them one after another.

falcon_cors:Aborting response due to origin not allowed

I encounter this error during login
Aborting response due to origin not allowed INFO:falcon_cors:Aborting response due to origin not allowed 2018-08-16 18:05:37,764 INFO falcon_cors Aborting response due to origin not allowed 2018-08-16 18:05:37,764 falcon_cors INFO Aborting response due to origin not allowed 192.168.1.5 - - [16/Aug/2018:18:05:37 +0800] "POST /login HTTP/1.1" 400 84 "http://192.168.1.7:8080/" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36"

Editing a Schedule Template changes duration when it shouldn't

I've seen this a few times.
We have relatively complicated time windows set up in Schedule Templates.

Interestingly, when I provision some default templates through the DB and then jump into the UI to make an edit, the schedule event duration will be changed, even if I never touched those fields.

So, I start with:

INSERT INTO `schedule_event` (`id`, `schedule_id`, `start`, `duration`) VALUES
(1579,	358,	28800,	59400),
(1580,	358,	115200,	59400),
(1581,	358,	201600,	59400),
(1582,	358,	288000,	59400),
(1583,	358,	374400,	59400),
(1584,	358,	460800,	59400),
(1585,	358,	547200,	59400);

then I use the UI to for example, change the roster being used. Then this is what gets saved to the DB:

INSERT INTO `schedule_event` (`id`, `schedule_id`, `start`, `duration`) VALUES
(1572,	357,	28800,	59616),
(1573,	357,	115200,	59616),
(1574,	357,	201600,	59616),
(1575,	357,	288000,	59616),
(1576,	357,	374400,	59616),
(1577,	357,	460800,	59616),
(1578,	357,	547200,	59616);

I've seen this happen even when using the UI exclusively. This is likely related to some limitations being imposed through the UI? I'd say so because of the suspicious 'this is not a valid value' warning when using Advanced and then inputting e.g. 270 minutes as a duration (https://imgur.com/R7Sm9pn) "This is not a valid value. The two nearest valid values are 269.19 and 270.19".

This is very awkward, because I insert the proper values into the DB. A User goes in a changes their schedule template a little and suddenly all the duration values are rounded up or down to some incomprehensible value. Or they get an error message which doesn't make sense to them.

Haven't had time to look into this myself just yet.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.