CTT - Escalation
From PlcWiki
(Difference between revisions)
Pavel.kruzik (Talk | contribs) (→Žolíky) |
(→Příklad) |
||
Line 66: | Line 66: | ||
Logout:\t\t<%= Date.parse("yyyy-MM-dd'T'HH:mm:ss.SSS",ctt.record.data.serverEventTime).format('yyyy-MM-dd HH:mm:ss') %> (<%= Date.parse("yyyy-MM-dd'T'HH:mm:ss.SSSXXX",ctt.record.data.serverEventTime).format('yyyy-MM-dd HH:mm:ss') %> CET) | Logout:\t\t<%= Date.parse("yyyy-MM-dd'T'HH:mm:ss.SSS",ctt.record.data.serverEventTime).format('yyyy-MM-dd HH:mm:ss') %> (<%= Date.parse("yyyy-MM-dd'T'HH:mm:ss.SSSXXX",ctt.record.data.serverEventTime).format('yyyy-MM-dd HH:mm:ss') %> CET) | ||
Please, complete the reason on a form here: <%= ctt.config.server.publicAppUrl %>out.html?v=user_logout&id=<%= ctt.interval.uuid %> | Please, complete the reason on a form here: <%= ctt.config.server.publicAppUrl %>out.html?v=user_logout&id=<%= ctt.interval.uuid %> | ||
+ | |||
+ | ====Formátování data a času==== | ||
+ | |||
+ | ctt.record.data.firstSessionLoginTime = | ||
+ | <%= Date.parse("yyyy-MM-dd'T'HH:mm:ss.SSS",ctt.record.data.firstSessionLoginTime).format('yyyy-MM-dd HH:mm:ss') %> | ||
+ | <%= Date.parse("yyyy-MM-dd'T'HH:mm:ss.SSSXXX",ctt.record.data.firstSessionLoginTime).format('yyyy-MM-dd HH:mm:ss') %> CET | ||
+ | |||
+ | ctt.record.data.create = 1.619013617E12 | ||
+ | <%= new Date(ctt.record.data.created.toLong()).format("yyyy-MM-dd HH:mm:ss") %> |
Revision as of 14:55, 21 April 2021
Contents |
Žolíky
Zadáváme přímo do textu v této formě: User login on server <%= ctt.record.data.server %> was detected.
ctt.interval.
id uuid interval_definition_name start_event_id id_id value
ctt.sensor.
sender_id sensor_id sensor_type group_name group_order start_value sensor_name color machine workplace workplace_name line project place data
ctt.record.
id chart_time chart_value unit value_type sender_id sensor_id delivered_time subject_id subject_class_id subject_class_name author data
Klíč data obsahuje strukturu json dalších údajů, které nese event, který vyvolal změnu intervalu. Pro různé eventy se tento obsah liší. Pak použijeme například takto <%= ctt.record.data.server %>
ctt.definition.
timeout_days, timeout_sensor
ctt.config.server.
appUrl, publicAppUrl, sentEmailURI, sentSmsURI, cleaUrl, cttRecUrl, pathCtt
Příklad
Předmět zprávy:
User login (<%= ctt.record.data.loginName %> from <%= ctt.record.data.hostIp %>) on server <%= ctt.record.data.server %> - request for reason
Tělo zprávy:
User login on server <%= ctt.record.data.server %> was detected. User:\t\t<%= ctt.record.data.loginName %> Source IP:\t<%= ctt.record.data.hostIp %> Login:\t\t<%= Date.parse("yyyy-MM-dd'T'HH:mm:ss.SSS",ctt.record.data.firstSessionLoginTime).format('yyyy-MM-dd HH:mm:ss') %> (<%= Date.parse("yyyy-MM-dd'T'HH:mm:ss.SSSXXX",ctt.record.data.firstSessionLoginTime).format('yyyy-MM-dd HH:mm:ss') %> CET) Logout:\t\t<%= Date.parse("yyyy-MM-dd'T'HH:mm:ss.SSS",ctt.record.data.serverEventTime).format('yyyy-MM-dd HH:mm:ss') %> (<%= Date.parse("yyyy-MM-dd'T'HH:mm:ss.SSSXXX",ctt.record.data.serverEventTime).format('yyyy-MM-dd HH:mm:ss') %> CET) Please, complete the reason on a form here: <%= ctt.config.server.publicAppUrl %>out.html?v=user_logout&id=<%= ctt.interval.uuid %>
Formátování data a času
ctt.record.data.firstSessionLoginTime = <%= Date.parse("yyyy-MM-dd'T'HH:mm:ss.SSS",ctt.record.data.firstSessionLoginTime).format('yyyy-MM-dd HH:mm:ss') %> <%= Date.parse("yyyy-MM-dd'T'HH:mm:ss.SSSXXX",ctt.record.data.firstSessionLoginTime).format('yyyy-MM-dd HH:mm:ss') %> CET
ctt.record.data.create = 1.619013617E12 <%= new Date(ctt.record.data.created.toLong()).format("yyyy-MM-dd HH:mm:ss") %>