CN113938380A - Network equipment and interface dynamic adaptation method thereof - Google Patents
Network equipment and interface dynamic adaptation method thereof Download PDFInfo
- Publication number
- CN113938380A CN113938380A CN202111176382.XA CN202111176382A CN113938380A CN 113938380 A CN113938380 A CN 113938380A CN 202111176382 A CN202111176382 A CN 202111176382A CN 113938380 A CN113938380 A CN 113938380A
- Authority
- CN
- China
- Prior art keywords
- network
- port
- parameter
- interface dynamic
- network device
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 18
- 230000006978 adaptation Effects 0.000 title claims abstract description 13
- 230000003068 static effect Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 3
- 230000003044 adaptive effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/36—Software reuse
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Small-Scale Networks (AREA)
Abstract
The invention discloses a network device and an interface dynamic adaptation method thereof, which comprises the following steps: step 1: firstly, loading an element set document; step 2: generating a main entry file in a root directory, and then creating a template according to functional requirements, wherein the template is provided with an independent controller; and step 3: finding out all element sets in the controller, and acquiring current state data of all network cards through communication with the middleware; and 4, step 4: then extracting classification independent from the total sequence according to the state data of all network cards; and 5: judging which kind of data application corresponding class according to the returned model; step 6: then according to the type and number of the network ports; and 7: and finally, adjusting the size of the wide and high pixels of the product panel according to the number of the net ports. The invention has the advantages of clearer logic, strong readability, clear division of labor for team development, easy control and full utilization of reusable codes; the module which can be used commonly is abstracted, the maintainability is strong, and the modules can be compatible with different types of hardware models.
Description
Technical Field
The invention relates to the technical field of network equipment interface adaptation, in particular to network equipment and an interface dynamic adaptation method thereof.
Background
Network equipment is provided with one or more network cards, an equipment network card communication schematic diagram is usually displayed in a pre-installed system of the equipment in real time and used for displaying information such as network IP, gateway information, interface name and flow, but many products relate to hardware configuration of a system which is suitable for different models and specifications, and therefore the phenomenon that a product system cannot be adapted to various types of hardware is caused, the phenomenon that a network interface is disordered when the system switches one product type is mainly reflected in a network interface display area.
However, in the prior art, it is common that a separate static dom template is allocated to a javascript controller according to different models, a complete element sequence is defined in the javascript controller file, the marked sequence is bound to a dom structure, and the displayed service requirements are adjusted according to the difference of acquired data, so that different static templates need to be customized each time, and series problems such as disorder in distribution occur.
Disclosure of Invention
1. Technical problem to be solved
The invention aims to solve the problems that different static templates are required to be customized and the distribution is disordered in the prior art, and provides a network device and an interface dynamic adaptation method thereof.
2. Technical scheme
In order to achieve the purpose, the invention adopts the following technical scheme:
a network device and its interface dynamic adaptation method includes the following steps:
step 1: firstly, loading an element set document;
step 2: generating a main entry file in a root directory, and then creating a template according to functional requirements, wherein the template is provided with an independent controller;
and step 3: finding out all element sets in the controller, and acquiring current state data of all network cards through communication with the middleware;
and 4, step 4: then extracting the classification according to the state data of all network cards, wherein the classification is independent of the existence of the total sequence, defining the data classes of different hardware models, and injecting the data returned by different hardware models into the defined classes;
and 5: judging which kind of data application corresponding class according to the returned model;
step 6: then, judging which type of the expansion card slot is according to the type and the number of the network ports;
and 7: finally, the width and height pixel size of the product panel is adjusted according to the number of the network ports, so that the product panel is suitable for the panel area of the homepage.
Preferably, in step 1, a jquery operation element object is adopted, and a compiling environment script configuration is defined.
Preferably, the main entry file in step 2 is created by html.
Preferably, in step 3, jquery is used to find all element collections.
Preferably, step 5 does not need to rely on the main module to run separately, and the management port and the expansion port are respectively placed under the mgmtinfo object attribute and are respectively defined as agl0 and ext.
Preferably, the mgmtinfo object attributes are respectively: parameter eth represents the port name, parameter IP-port binding IP address, parameter IP6 represents the port binding IPV6 address, parameter mac represents the port mac address, parameter mask represents the port binding subnet mask, and parameter state represents the port status.
Preferably, in the step 6, all the network ports in the whole expansion card slot are traversed, and the corresponding network card icons are respectively applied.
3. Advantageous effects
Compared with the prior art, the invention has the advantages that:
(1) the method comprises the steps of firstly establishing an html static module for independently storing a DOM set, separating an element set template from a controller, independently editing and operating, establishing an element set sequence in a root directory, binding different internet ports on corresponding sequences, defining requirements in a controller file, extracting the same grouping elements in the DOM set, defining different classes, then obtaining data classification of the product model through ajax, applying different classes to each product, and compiling and operating.
(2) In the invention, the realization logic is clearer, the readability is strong, the team development labor division is clear, the control is easy, and the reusable code is fully utilized; the module which can be used commonly is abstracted, the maintainability is strong, and the modules can be compatible with different types of hardware models.
Drawings
Fig. 1 is a schematic diagram illustrating an adaptation execution step of a multi-port module in a network device and an interface dynamic adaptation method thereof according to the present invention;
fig. 2 is a diagram of a device network port adaptation model in a network device and a method for dynamically adapting an interface thereof according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments.
Example 1:
referring to fig. 1-2, a network device and a method for dynamically adapting an interface thereof includes the following steps:
step 1: firstly, loading an element set document, adopting a jquery operation element object, and defining the configuration of a compiling environment script;
step 2: generating a main entry file in a root directory, wherein the file is created by html, and then creating a template according to functional requirements, wherein the template is provided with an independent controller;
and step 3: finding out all element collections by using jquery in the controller, and acquiring current state data of all network cards through communication with the middleware;
and 4, step 4: extracting classification according to the state data, wherein the classification is independent of the existence of the total sequence, defining data classes of different hardware models, and injecting data returned by different hardware models into the defined classes;
and 5: judging which kind of data application corresponding class according to the returned model, without depending on the independent operation of the main module, the management port and the expansion port are respectively placed under the mgmtinfo object attribute and defined as agl0 and ext, and the attributes of the agl0 and the ext are respectively:
1. the parameter eth: representing the port name;
2. and (3) parameter IP: binding an IP address by the network port;
3. parameter IP 6: the network port binds to the IPV6 address;
4. the parameter mac: a port mac address;
5. parameter mask: the net mouth binds the subnet mask;
6. and (3) parameter state: a network port state;
in the invention, the attribute slotinfo of the expansion port object respectively represents a pluggable expansion network card set of the current equipment, and respectively represents an expansion board card, and various types of network port integration can be generated in the expansion port object: a. four electrical ports, b, four electrical ports + four optical ports, c, eight electrical ports, etc., wherein, we take one of the network ports as an example, the following properties are respectively:
1. parameter content: the network interface is an array type, and the network interface comprises an IP address, a mac address and a gateway;
2. parameter num: the number of the network ports contained in the expansion board card;
3. parameter online: indicating whether the current internet access is online or not;
4. the slot parameter: the arrangement sequence of the network ports in the current plug-in and dial card;
step 6: judging the type of the expansion card slot according to the type and the number of the network ports, traversing all the network ports in the whole expansion card slot, and applying corresponding network card icons respectively;
and 7: and then the width and height pixel size of the product panel is adjusted according to the number of the network ports, so that the product panel is adaptive to the panel area of the homepage.
The method comprises the steps of firstly establishing an html static module for independently storing a DOM set, separating an element set template from a controller, independently editing and operating, establishing an element set sequence in a root directory, binding different internet ports on corresponding sequences, defining requirements in a controller file, extracting the same grouping elements in the DOM set, defining different classes, then obtaining data classification of the product model through ajax, applying different classes to each product, and compiling and operating.
In the invention, the realization logic is clearer, the readability is strong, the team development labor division is clear, the control is easy, and the reusable code is fully utilized; the module which can be used commonly is abstracted, the maintainability is strong, and the modules can be compatible with different types of hardware models.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art should be considered to be within the technical scope of the present invention, and the technical solutions and the inventive concepts thereof according to the present invention should be equivalent or changed within the scope of the present invention.
Claims (7)
1. A network device and its interface dynamic adaptation method, characterized by that, comprising the following steps:
step 1: firstly, loading an element set document;
step 2: generating a main entry file in a root directory, and then creating a template according to functional requirements, wherein the template is provided with an independent controller;
and step 3: finding out all element sets in the controller, and acquiring current state data of all network cards through communication with the middleware;
and 4, step 4: then extracting the classification according to the state data of all network cards, wherein the classification is independent of the existence of the total sequence, defining the data classes of different hardware models, and injecting the data returned by different hardware models into the defined classes;
and 5: judging which kind of data application corresponding class according to the returned model;
step 6: then, judging which type of the expansion card slot is according to the type and the number of the network ports;
and 7: finally, the width and height pixel size of the product panel is adjusted according to the number of the network ports, so that the product panel is suitable for the panel area of the homepage.
2. The method as claimed in claim 1, wherein step 1 employs jquery operation element objects to define the script configuration of the compiling environment.
3. A network device and its interface dynamic adaptation method as claimed in claim 1, wherein the main entry file in step 2 is to be created by html.
4. The network device and its interface dynamic adapting method of claim 1, wherein in step 3, jquery is used to find all element collections.
5. The network device and its interface dynamic adapting method according to claim 1, wherein said step 5 does not need to rely on main module to run separately, and the management port and the expansion port are respectively placed under the mgmtinfo object attribute and defined as agl0 and ext.
6. The network device and its interface dynamic adaptation method of claim 5, wherein the mgmtinfo object attributes are respectively: parameter eth represents the port name, parameter IP-port binding IP address, parameter IP6 represents the port binding IPV6 address, parameter mac represents the port mac address, parameter mask represents the port binding subnet mask, and parameter state represents the port status.
7. The method according to claim 1, wherein in step 6, corresponding network card icons are applied to all ports in the entire expansion card slot.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111176382.XA CN113938380B (en) | 2021-10-09 | 2021-10-09 | Dynamic adapting method for network equipment interface |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111176382.XA CN113938380B (en) | 2021-10-09 | 2021-10-09 | Dynamic adapting method for network equipment interface |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113938380A true CN113938380A (en) | 2022-01-14 |
CN113938380B CN113938380B (en) | 2024-03-29 |
Family
ID=79278346
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111176382.XA Active CN113938380B (en) | 2021-10-09 | 2021-10-09 | Dynamic adapting method for network equipment interface |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113938380B (en) |
Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050071853A1 (en) * | 2003-09-29 | 2005-03-31 | Jones Carol Ann | Methods, systems and computer program products for creating user interface to applications using generic user interface templates |
CN101273349A (en) * | 2005-09-30 | 2008-09-24 | 微软公司 | Template based management of services |
US7873908B1 (en) * | 2003-09-30 | 2011-01-18 | Cisco Technology, Inc. | Method and apparatus for generating consistent user interfaces |
US20110040390A1 (en) * | 2009-08-11 | 2011-02-17 | Fisher-Rosemount Systems, Inc. | System Configuration Using Templates |
US8191038B1 (en) * | 2007-10-09 | 2012-05-29 | Google Inc. | Using a templating language to produce a host language factory for a safe subset of a templated language |
US20150193090A1 (en) * | 2014-01-06 | 2015-07-09 | Ford Global Technologies, Llc | Method and system for application category user interface templates |
CN106130185A (en) * | 2016-07-18 | 2016-11-16 | 中国南方电网有限责任公司 | A kind of monitoring system of electric substation modeling method based on status monitoring information |
CN106302747A (en) * | 2016-08-17 | 2017-01-04 | 北京乐美无限科技有限公司 | A kind of business cloud platform of Internet WEB front-end exploitation |
CN107179753A (en) * | 2016-03-10 | 2017-09-19 | 霍尼韦尔国际公司 | Automation control system point configuration from director demon file |
US20180181556A1 (en) * | 2016-12-21 | 2018-06-28 | Open Text Corporation | Systems and methods for conversion of web content into reusable templates and components |
CN109426497A (en) * | 2017-08-18 | 2019-03-05 | 北京国双科技有限公司 | Data embedding method, device, system and storage medium |
CN110674441A (en) * | 2019-09-02 | 2020-01-10 | 中国平安财产保险股份有限公司 | Page template configuration control method and device, computer equipment and storage medium |
CN112579086A (en) * | 2020-12-24 | 2021-03-30 | 四川长虹电器股份有限公司 | Template construction method adaptive to multi-platform front-end View |
-
2021
- 2021-10-09 CN CN202111176382.XA patent/CN113938380B/en active Active
Patent Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050071853A1 (en) * | 2003-09-29 | 2005-03-31 | Jones Carol Ann | Methods, systems and computer program products for creating user interface to applications using generic user interface templates |
US7873908B1 (en) * | 2003-09-30 | 2011-01-18 | Cisco Technology, Inc. | Method and apparatus for generating consistent user interfaces |
CN101273349A (en) * | 2005-09-30 | 2008-09-24 | 微软公司 | Template based management of services |
US8191038B1 (en) * | 2007-10-09 | 2012-05-29 | Google Inc. | Using a templating language to produce a host language factory for a safe subset of a templated language |
US20110040390A1 (en) * | 2009-08-11 | 2011-02-17 | Fisher-Rosemount Systems, Inc. | System Configuration Using Templates |
US20150193090A1 (en) * | 2014-01-06 | 2015-07-09 | Ford Global Technologies, Llc | Method and system for application category user interface templates |
CN107179753A (en) * | 2016-03-10 | 2017-09-19 | 霍尼韦尔国际公司 | Automation control system point configuration from director demon file |
CN106130185A (en) * | 2016-07-18 | 2016-11-16 | 中国南方电网有限责任公司 | A kind of monitoring system of electric substation modeling method based on status monitoring information |
CN106302747A (en) * | 2016-08-17 | 2017-01-04 | 北京乐美无限科技有限公司 | A kind of business cloud platform of Internet WEB front-end exploitation |
US20180181556A1 (en) * | 2016-12-21 | 2018-06-28 | Open Text Corporation | Systems and methods for conversion of web content into reusable templates and components |
CN109426497A (en) * | 2017-08-18 | 2019-03-05 | 北京国双科技有限公司 | Data embedding method, device, system and storage medium |
CN110674441A (en) * | 2019-09-02 | 2020-01-10 | 中国平安财产保险股份有限公司 | Page template configuration control method and device, computer equipment and storage medium |
CN112579086A (en) * | 2020-12-24 | 2021-03-30 | 四川长虹电器股份有限公司 | Template construction method adaptive to multi-platform front-end View |
Non-Patent Citations (4)
Title |
---|
SU-BIN XIE: "A Direct Web Page Templates Detection Method", 《2011 INTERNATIONAL CONFERENCE ON INTERNET TECHNOLOGY AND APPLICATIONS》 * |
冯兴利;徐墨;锁志海;: "基于模板引擎Smarty的信息管理系统设计", 《现代电子技术》, no. 18 * |
菜鸟学院: "Web Components 系列教程", Retrieved from the Internet <URL:http://www.noobyard.com/article/p-qkchgtwq-e.html> * |
连允庆: "基于HTML5移动应用框架的研究及应用", 《万方》 * |
Also Published As
Publication number | Publication date |
---|---|
CN113938380B (en) | 2024-03-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108279932B (en) | Method and device for dynamically configuring user interface of mobile terminal | |
CN106339226B (en) | A kind of methods of exhibiting and page presentation device of Webpage | |
CN104820589B (en) | A kind of method and its device of dynamic adaptation webpage | |
CN106202006A (en) | Document generating method and device | |
CN105094775A (en) | Webpage generation method and apparatus | |
CN108052589A (en) | The method, apparatus and storage medium of a kind of text exhibition | |
CN106919406A (en) | A kind of desktop application component issue, update method and device | |
CN106156306A (en) | A kind of template rendering intent and device | |
CN112068911A (en) | Method, device, system, equipment and medium for generating electronic form | |
US8704852B2 (en) | Methods for generating one or more composite image maps and systems thereof | |
CN104965813B (en) | The treating method and apparatus of textual materials | |
CN109271160A (en) | Active rule construction method, device and computer system, medium | |
CN108984175A (en) | The power grid SVG line chart methods of exhibiting of object-oriented suitable for mobile device | |
CN112799670B (en) | Method and system for unified multi-terminal logic development | |
CN110708423A (en) | Message content display method and device and storage medium | |
CN105574114A (en) | On-line plotting method based on telecom resource management standard control library | |
CN108399156A (en) | The composition method and device of formula in a kind of pdf document | |
CN106708479A (en) | Page rendering method and device | |
CN113938380B (en) | Dynamic adapting method for network equipment interface | |
CN106293658A (en) | A kind of interface assembly generates method and equipment thereof | |
CN116450238A (en) | Vue interface rendering method and device, storage medium and electronic equipment | |
CN113495498B (en) | Simulation method, simulator, device and medium for hardware device | |
CN114185522A (en) | Page theme customizing method and device, electronic equipment and storage medium | |
CN109960553A (en) | A kind of more window context rendering methods and system | |
CN113778401A (en) | Page generation method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |