如何让用户定义自定义通知条件?

时间:2018-12-27 06:30:59

标签: javascript datatables user-defined-functions dsl usability

我正在开发一个Web应用,其中包含实时更新的数据表,例如:

+-------+--------+--------+-----+
| Event | Value1 | Value2 | ... |
+-------+--------+--------+-----+
| A     | 132.43 |   9431 | ... |
| B     |   0.00 | -34.00 | ... |
| C     |   0.32 |  12.00 | ... |
+-------+--------+--------+-----+

当某些数据模式出现时,用户应该能够收到通知。

什么是允许用户在用户希望接收有关特定事件的通知时指定用户定义策略的好方法?

例如:

Strategy 1:
Notify when Value1 == 0

Strategy 2: 
Notify when Value1 < 0 or Value2 < sqrt(Value1)

Strategy 3:
Notify when Sum of Value1, Value2, ValueN > 1000

Strategy 4:
Notify when Total := Value1 * 2 + 3^ValueN < 1234

如果有更好的方法,我不希望用户出于安全和可用性的原因而编写自定义JS代码。

使用预定义的html表单在没有非常复杂的情况下不会带来很大的灵活性。

已经有一种技术或框架可以解决我不知道的这类问题吗?

0 个答案:

没有答案
相关问题