我正在开发一个具有实时更新数据表的网络应用程序,例如:
+-------+--------+--------+-----+
| 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 表单不会带来很大的灵活性,而且不会非常复杂。
是否已经有解决这种我不知道的问题的技术或框架?