Insights Logs
Browse logs of messages that passed through flows.
Last updated
Was this helpful?
Was this helpful?
const insightsLogs = appmixer.ui.InsightsLogs(config)
insightsLogs.set(key, value)
insightsLogs.get(key)insightsLogs.state(name, value)const insightsLogs = appmixer.ui.InsightsLogs({
state: { filterLayout: 'collapsed' }
});
insightsLogs.state('filterLayout', 'expanded');// Initial query: last 30 days
const insightsLogs = appmixer.ui.InsightsLogs({
state: {
query: {
query: {
range: {
from: {
endOf: null,
startOf: 'day',
subtract: [30, 'day']
}
}
}
}
}
});// Get the current query
const currentQuery = insightsLogs.state('query');
// Merge in new filter values
insightsLogs.state('query', {
...currentQuery, // keep existing top-level query state
query: {
...currentQuery.query, // keep existing nested filters
targets: {
// Keys are Flow IDs
// Values are optional arrays of component IDs
// (empty array = all components in that flow)
'8a47ab76-b90c...': ['component-1', 'component-2'],
'f0e1d2c3-b90c...': [] // no component filter
}
}
});insightsLogs.on('change:query', queryAfterUserInput => {
console.log(queryAfterUserInput);
});const currentFlowType = widget.state('query/flowType');
// flowType filter
widget.state('query/flowType', 'automation'); // single value
widget.state('query/flowType', [
'integration-test',
'integration-instance',
'automation'
]); // multiple values
// userId filter
widget.state('query/userId', 'A'); // single value
widget.state('query/userId', ['A', 'B']); // multiple valuesconst insightsLogs = appmixer.ui.InsightsLogs({
el: '#insights-logs'
})
insightsLogs.open()