Загрузка данных


 rg --hidden "eth0" -C 20
classic/src/netInterfaces/widget/TypeColumn.js
74-
75-     updateFilterText: function(newValue, oldValue) {
76-             if ((newValue || oldValue) && newValue !== oldValue) {
77-                     this.updateName(this.getName());
78-                     this.updateType(this.getType());
79-             }
80-     },
81-
82-     updateName: function(value) {
83-             this.nameEl.setHtml(value ? Core.Common.highlightText(value, Ext.String.htmlEncode(this.getFilterText())) : '');
84-     },
85-
86-     updateType: function(newValue, oldValue) {
87-             const cls  = {
88-                             eth:   'icon-navigation-device-crypto',
89-                             wifi:  'icon-auxiliary-wifi-4',
90-                             modem: 'icon-auxiliary-cellular-4'
91-                     };
92-             let text = newValue ? lang.networkSettings.netInterfaces.grid.group[newValue] : '';
93-
94:             if(this.getName() === 'eth0' && App.getMainView().getViewModel().get('appName') === 'L2') {
95-                     text = lang.networkSettings.netInterfaces.grid.group['ethVirtual'];
96-             }
97-
98-             this.typeEl.setHtml(text ? Core.Common.highlightText(text, Ext.String.htmlEncode(this.getFilterText())) : '');
99-
100-            oldValue && this.typeIconEl.removeCls(cls[oldValue]);
101-            newValue && this.typeIconEl.addCls(cls[newValue]);
102-
103-    },
104-
105-    updateStatus: function(newValue, oldValue) {
106-            this.statusEl.removeCls(oldValue ? 'ok_icon_color' : Ext.baseCSSPrefix +'gray-text');
107-            this.statusEl.addCls(newValue ? 'ok_icon_color' : Ext.baseCSSPrefix +'gray-text');
108-    }
109-
110-});

classic/src/netInterfaces/details/ViewModel.js
81-             },
82-
83-             tooltipAliasEditButton: {
84-                     bind: {
85-                             bindTo: '{record}',
86-                             deep: true
87-                     },
88-                     get:  function (record) {
89-                             return record && record.modified && record.modified.hasOwnProperty('dhcp') ?
90-                                     lang.networkSettings.netInterfaces.label.saveIpBefore : false;
91-                     }
92-             },
93-
94-             hideAliasContainer: (get) => {
95-                     const app  = get('appName'),
96-                               id   = get('record.id'),
97-                               dhcp = get('cord.dhcp');
98-
99-                     switch (app) {
100-                            case 'HWRPI': return false;
101:                            case 'L2': return id === 'eth0';
102-                            default: return dhcp;
103-                    }
104-            },
105-
106-            defaultMetric: function(get) {
107-                    let metric = get('record.default_metric');
108-
109-                    metric = (metric && '(' + metric + ')') || '';
110-                    return Ext.String.format(lang.networkSettings.netInterfaces.label.defaultMetric, metric);
111-            },
112-
113-            dhcpLabel: function(get) {
114-                    switch(get('record.class')) {
115-                            case 'trunk':
116-                                    return lang.networkSettings.netInterfaces.label.trunkDhcp;
117-                            case 'slave':
118-                                    return lang.networkSettings.netInterfaces.label.slaveDhcp;
119-                            case 'access':
120-                                    return lang.networkSettings.netInterfaces.label.accessDhcp;
121-                            default:
--
135-                            arr.push(lang.networkSettings.netInterfaces.label.routes);
136-                    }
137-                    return arr.length ? arr.join(', ') : '';
138-            },
139-
140-            hasL2Crypto: function(get) {
141-                    return get('features')['l2crypto'] === 1;
142-            },
143-
144-            duplex: function(get) {
145-                    var value = get('record.duplex');
146-                    if (lang.networkSettings.netInterfaces.duplex.hasOwnProperty(value)) {
147-                            return lang.networkSettings.netInterfaces.duplex[value];
148-                    } else {
149-                            return '';
150-                    }
151-            },
152-
153-            subTitle: function(get) {
154-                    let type = get('record.type');
155:                    if(type && get('hasL2Crypto') && get('record.id') === 'eth0') {
156-                            type = 'ethVirtual';
157-                    }
158-                    return type ? lang.networkSettings.netInterfaces.grid.group[type] : ''
159-            },
160-
161-            readOnlyDetails: function(get) {
162-                    const editDisabled = get('editDisabled'),
163-                            readOnly = get('readOnly'),
164-                            crypto   = get('hasL2Crypto'),
165-                            id       = get('record.id');
166-
167:                    return editDisabled || readOnly || (crypto && id === 'eth0');
168-            },
169-
170-            readOnlyMtu: function(get) {
171-                    const type     = get('record.type'),
172-                            readOnly = get('readOnlyDetails'),
173-                            app      = get('appName'),
174-                            cls      = get('record.class');
175-
176-                    return readOnly || app === 'IG' || (type !== 'eth' && type !== 'bond') || cls === 'slave';
177-            },
178-
179-            readOnlyClass: function(get) {
180-                    const type     = get('record.type'),
181-                            readOnly = get('readOnlyDetails'),
182-                            cls      = get('record.class'),
183-                            parent   = get('record.parent_bond');
184-
185-                    return readOnly || type === 'vlan' || (cls === 'slave' && parent);
186-            },
187-

classic/src/netInterfaces/details/Eth.js
257-                            }
258-                    ]
259-            },{
260-                    xtype:   'fieldset',
261-                    itemId:  'dhcpContainer',
262-                    title:   lang.networkSettings.netInterfaces.label.dhcpFieldSet,
263-                    bind: {
264-                            hidden: '{record.class !== \'access\'}'
265-                    },
266-                    defaults: {
267-                            labelWidth: 170,
268-                            width:      390
269-                    },
270-                    items: [
271-                            {
272-                                    xtype:  'displayfield',
273-                                    itemId: 'noDhcpLabel',
274-                                    ui:     'compact',
275-                                    bind: {
276-                                            value:  '{dhcpLabel}',
277:                                            hidden: '{!readOnlyDetails || !record.dhcp || (appName === \'L2\' && record.id === \'eth0\')}'
278-                                    }
279-                            },{
280-                                    xtype:    'checkbox',
281-                                    itemId:   'dhcp',
282-                                    boxLabel: lang.networkSettings.netInterfaces.label.dhcpOn,
283-                                    bind: {
284-                                            value:  '{record.dhcp}',
285:                                            hidden: '{readOnlyDetails || record.class !== \'access\' || (appName === \'L2\' && record.id === \'eth0\')}'
286-                                    }
287-                            },{
288-                                    xtype:      'displayfield',
289-                                    fieldLabel: lang.networkSettings.netInterfaces.label.ip,
290-                                    itemId:     'addressText',
291-                                    ui:         'compact',
292-                                    bind: {
293-                                            value:  '{record.addressText}',
294-                                            hidden: '{!readOnlyNet}'
295-                                    }
296-                            },{
297-                                    xtype:           'textfield',
298-                                    itemId:          'address',
299-                                    fieldLabel:      lang.networkSettings.netInterfaces.label.ip,
300-                                    emptyText:       lang.notSpecified.male,
301-                                    modelValidation: true,
302-                                    maskRe:          /[\d.]/,
303-                                    bind: {
304-                                            value:    '{record.address}',
305-                                            hidden:   '{readOnlyNet}'