Filter:

Submit Search

## Adding the plugin

The Comsof Fiber Integration Module module includes a number of user interface components. These need to be loaded as part of your Network Manager Telecom application.

Edit the main.mywcom.js file and add the following lines:

>     // -------------------------

>     //  Configure Comsof Module

>     // -------------------------

>     import ComsofPlugin from 'modules/comsof/js';

>     import ComsofFeatureModelLoaderPlugin from 'modules/comsof/js/models/comsofFeatureModelLoaderPlugin';

>     import ComsofLayersControl from 'modules/comsof/js/models/comsofLayersControl';

>     import ComsofCreateFeaturePlugin from 'modules/comsof/js/plugins/comsofCreateFeaturePlugin';

>     // -------------------

>     //  Configure Plugins

>     // -------------------

>     const plugins = myw.applicationDefinition.plugins;

>     plugins['comsof'] = ComsofPlugin;

>     plugins['comsofFeatureModelLoader'] = ComsofFeatureModelLoaderPlugin;

>     // Comms plugin override

>     plugins['createFeature'] = ComsofCreateFeaturePlugin;

>     // ---------------

>     //  Configure GUI

>     // ---------------

>     const desktopLayoutDef = myw.applicationDefinition.layouts.desktop;

>     // Register the workspace list so that it appears in the details panel but only

>     // for connected application

>     if (!myw.isNativeApp) {

>     const detailsControl = desktopLayoutDef.controls.tabControl[1].tabs.find(

>     x => x.id === 'details'

>     ).control[1];

>     detailsControl.pluginIds.splice(2, 0, 'comsof'); // Assumes owner has design toolbar

>     }

>     // Add the customised comsof layer control

>     desktopLayoutDef.controls.tabControl[1].tabs[1].control[0] = ComsofLayersControl;

>     const detailsControl = desktopLayoutDef.controls.tabControl[1].tabs.find(x => x.id === 'details')

>     .control[1];

>     detailsControl.resultsButtons.splice(7, 0, 'comsof.lockSelection');

>     detailsControl.resultsButtons.splice(8, 0, 'comsof.unlockSelection');

>     // Add link to user guide

>     const helpPanelControl = desktopLayoutDef.controls.tabControl[1].tabs[2].control[1];

>     helpPanelControl['user_guides'].push([

>     'comsof_guide',

>     '/modules/comsof/doc/ComsofModule/index.html'

>     ]);

>     helpPanelControl['user_guides'].push(['comsof_manual', '/modules/comsof/comsof_manual']);

Now rebuild your JavaScript applications library:

>     myw_product build applications

You may also want to adjust the configuration for your default users, to make these layers visible by default, in the application’s layer list. It is recommended that most workspace layers are set unchecked, by default. (This prevents unnecessary server requests when a workspace is opened).