├── README.md
├── kit.json
├── module.json
├── src
├── html
│ └── syslogView.html
├── js
│ └── syslogService.js
└── viewmodel
│ └── syslogViewModel.json
└── syslog.png
/README.md:
--------------------------------------------------------------------------------
1 | # showSyslog
2 | Show contents of syslog
3 |
4 | ## version
5 | Active Workspace 4.3
6 |
7 | ## build
8 | - Create a new folder under `stage/src`, called `showSyslog`.
9 |
10 | - Download the contents of this repository to the new folder
11 |
12 | - Use `awbuild` to build and publish to the file repo.
13 |
14 | ## usage
15 | After building and publishing the code, add a new page to a stylesheet.
16 |
17 | For instance, to add to User Profile edit *Awp0UserSummary* stylesheet, and add the snippet below:
18 |
19 |
20 |
21 |
22 |
23 | This will show an additional page on the User Profile, as shown below:
24 |
25 | 
26 |
--------------------------------------------------------------------------------
/kit.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "showSyslog",
3 | "level": 7,
4 | "kitDeps": [
5 | "tc-aw-solution"
6 | ],
7 | "modules": [
8 | "syslog"
9 | ]
10 | }
--------------------------------------------------------------------------------
/module.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "syslog",
3 | "desc": "This is the syslog module",
4 | "type": [
5 | "native"
6 | ],
7 | "skipTest": true
8 | }
--------------------------------------------------------------------------------
/src/html/syslogView.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/src/js/syslogService.js:
--------------------------------------------------------------------------------
1 | // @@
2 | // ==================================================
3 | // Copyright 2017.
4 | // Siemens Product Lifecycle Management Software Inc.
5 | // All Rights Reserved.
6 | // ==================================================
7 | // @@
8 |
9 | /*global
10 | define
11 | */
12 |
13 | /**
14 | * @module js/syslogService
15 | */
16 | define( [ 'app', 'js/eventBus', //
17 | 'js/popupService', 'js/appCtxService' ], //
18 | function( app, eventBus ) {
19 | 'use strict';
20 |
21 | var _syslogSvc = null;
22 | var _appCtxSvc = null;
23 | var exports = {};
24 |
25 |
26 | /**
27 | */
28 | exports.updateDisplay = function( data ) {
29 | data.box2.uiValue = _appCtxSvc.ctx.syslog;
30 | }
31 | /**
32 | * @memberof NgServices
33 | * @member createChangeService
34 | */
35 | app.factory( 'syslogService', //
36 | [ 'appCtxService', //
37 | function( appCtxSvc ) {
38 | _appCtxSvc = appCtxSvc;
39 | return exports;
40 | } ] );
41 |
42 | /**
43 | * Since this module can be loaded as a dependent DUI module we need to return an object indicating which service
44 | * should be injected to provide the API for this module.
45 | */
46 | return {
47 | moduleServiceNameToInject: 'syslogService'
48 | };
49 | } );
--------------------------------------------------------------------------------
/src/viewmodel/syslogViewModel.json:
--------------------------------------------------------------------------------
1 | {
2 | "schemaVersion": "1.0.0",
3 | "imports": [
4 | "js/aw-panel.directive",
5 | "js/aw-panel-body.directive",
6 | "js/aw-label.directive"
7 | ],
8 | "actions": {
9 | "reveal":
10 | {
11 | "actionType": "dataProvider",
12 | "method": "syslogProvider"
13 | },
14 | "activateshowSyslog": {
15 | "actionType": "TcSoaService",
16 | "serviceName": "Internal-DebugMonitor-2011-06-DebugLogging",
17 | "method": "getSyslogFile",
18 | "inputData":
19 | {
20 | "size": 150000
21 | },
22 | "outputData": {
23 | "ctx.syslog": "out"
24 | },
25 | "events":
26 | {
27 | "success":
28 | [
29 | {
30 | "name": "syslog.updateDisplay"
31 | }
32 | ]
33 | }
34 | },
35 | "updateDisplay": {
36 | "actionType": "JSFunction",
37 | "method": "updateDisplay",
38 | "inputData": {
39 | "data": "{{data}}"
40 | },
41 | "deps": "js/syslogService"
42 | }
43 | },
44 | "data": {
45 | "box2": {
46 | "displayName": "Syslog Contents",
47 | "type": "STRING",
48 | "isRequired": "false",
49 | "isEditable": "false",
50 | "dbValue": "dbValue",
51 | "dispValue": "{{ctx.syslog}}",
52 | "uiValue":"{{ctx.syslog}}"
53 | }
54 | },
55 | "onEvent": [{
56 | "eventId": "awPanel.reveal",
57 | "criteria": {
58 | "panelId": "syslog"
59 | },
60 | "action": "syslogProvider"
61 | },
62 | {
63 | "eventId": "syslog.updateDisplay",
64 | "action": "updateDisplay"
65 | }],
66 | "dataProviders":
67 | {
68 | "syslogProvider":
69 | {
70 | "action": "activateshowSyslog",
71 | "data.box2.uiValue":"{{ctx.syslog}}"
72 | }
73 | }
74 | }
--------------------------------------------------------------------------------
/syslog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ActiveWorkspaceExtensions/showSyslog/5c48a5d9153b7bc2b2c04e392380e4eee2b83e07/syslog.png
--------------------------------------------------------------------------------