Exolain js code // bridges prepares and returns Bridges data fieldset export const…
- User
Exolain js code // bridges prepares and returns Bridges data fieldset export const bridges = (object => {
//bridge fieldset const bridge = createFieldset.call({ legend: 'Bridge Configuration Data', class: 'common', }) //create port fieldset const port = { legend: 'Choose TnPort', class: 'common', name: 'port', default: object.TnPort, rows: object.Ports, display: 'grid', width: '50%', }.createFieldsetSelect() const selector = port.querySelector('select') selector.addEventListener('change', (evnt) => { object.TnPort = evnt.target.value }) //create checkbox const box = { id: 'bridge', legend: 'Choose required bridges', class: 'common', name: 'bridge', rows: Object.keys(object.Vlans), display: 'grid' }.createFieldsetCheckbox() const checks = box.querySelectorAll('input[type="checkbox"]') checks.forEach(check => { check.addEventListener('change', (evnt) => { const key = evnt.target.value const row = box.querySelector(`#${key}`) let input = row.querySelector('input[type="text"]') if (input != undefined) { object.Vlans[key]['Vlan'] = '' input.remove() return box } input = { name: key, maxLen: 4, size: 4, pattern: '[0-9]+', placeholder: '3-4 digits Vlan number', title: '3-4 digits Vlan number required', }.createInputText() input.classList.add('pop-up') input.addEventListener('change', (evnt) => { object.Vlans[key]['Vlan'] = parseInt(evnt.target.value) }) row.appendChild(input) }) }) //return bridge.appendChild(box) bridge.appendChild(port) return bridge})
// integrGNodeB prepares and returns Integration GNodeB Job fieldsets export const integrGNodeB = (object => { return { legend: 'GNodeB Integration Job', class: getClass(object), data: object, fields: [ ['Connect', 'AutoIntegration'], ['Log', 'Prepare', 'Alarm'], ['Naming', 'Ntp', 'Lccl', 'Lm'], ['Nr', 'Ptp', 'Qos', 'NodeSupport'], ['CUCP', 'CUUP', 'DU'], ['Sector', 'NRCells'], ['Sharing', 'Gps', 'NRRan'], ['GURan', 'NrOnLte', 'FinalizeJob'], ], display: 'grid', }.createScriptsFS() })
// integrGNodeBAnchor prepares and returns Integration GNodeB Anchor Job fieldsets export const integrGNodeBAnchor = (object => { return { legend: 'Run on Lte Nodes: GNodeB Anchor Integration Job', class: getClass(object), data: object, fields: [ ['Connect', 'AutoIntegration'], ['ConnectAndIntegrate'], ['Log', 'Prepare', 'Ptp'], ['GURan', 'NrOnLte', 'FinalizeJob'], ], display: 'grid', }.createScriptsFS() })
- Assistant
This JavaScript code defines two functions,
bridgesandintegrGNodeB.The
bridgesfunction takes anobjectas a parameter and returns a Bridges data fieldset. This fieldset includes a port selection field and a checkbox group for selecting required bridges. When a checkbox is checked, a corresponding input field is added for entering a VLAN number. The selected port value and VLAN numbers are stored in theobjectparameter.The
integrGNodeBfunction takes anobjectas a parameter and returns an Integration GNodeB Job fieldset. This fieldset includes multiple checkboxes for configuring different aspects of the GNodeB integration job. The selected options are stored in theobjectparameter.The
integrGNodeBAnchorfunction is similar tointegrGNodeB, but it returns a fieldset specifically for running the integration job on Lte Nodes with a GNodeB Anchor.The code uses custom methods to create and manipulate DOM elements, such as
createFieldset,createFieldsetSelect,createFieldsetCheckbox,createInputText, andcreateScriptsFS.