ForgeComponents
en

Components

j-Console

jComponent 20 · jcomponent@20 component Example loaded with jComponent 20
  • singleton
  • supports app tabs
  • supports dark mode

Configuration:

  • datasource {String} a path to data-source (learn from example)
  • NEW clear {String} clear logs, link to the function(source)

Good to know:

  • path can be {String} with the appid due to focusing logs

Use it with <ui-component name="console">. When the component is not loaded yet, jComponent downloads it on first use from the address in DEF.fallback (the Componentator CDN by default). Author: Peter Širka. Source: the Componentator components repository, MIT license.

example.html
<style>
	body { background-color: #D0D0D0; }
</style>

<ui-component name="console" path="visible" config="datasource:logs"></ui-component>

<script>

	var visible = true;
	var logs = {};

	logs['app1'] = { icon: 'cog', name: 'Settings', encode: false, items: [{ type: 'info', body: 'Lorem <b>ipsum</b> dolor sit amet, consectetur adipisicing elit. Soluta, ea.' }, { type: 'error', body: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Soluta, ea.' }] };
	logs['app2'] = { icon: 'cloud', items: [{ type: 'warning', body: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Soluta, ea.' }, { type: 'success', body: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Soluta, ea.' }] };

	// 2 seconds delay
	PUSH('logs.app1.items', { type: 'warning', body: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Hic, tempora.' }, 2000);

</script>