CN108776593B - Method and equipment for template configuration in BIOS configuration - Google Patents
Method and equipment for template configuration in BIOS configuration Download PDFInfo
- Publication number
- CN108776593B CN108776593B CN201810608146.2A CN201810608146A CN108776593B CN 108776593 B CN108776593 B CN 108776593B CN 201810608146 A CN201810608146 A CN 201810608146A CN 108776593 B CN108776593 B CN 108776593B
- Authority
- CN
- China
- Prior art keywords
- configuration
- template
- json data
- bios
- variable value
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 41
- 238000004806 packaging method and process Methods 0.000 claims abstract description 22
- 230000006870 function Effects 0.000 claims description 40
- 238000004891 communication Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000004590 computer program Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005538 encapsulation Methods 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000007723 transport mechanism Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
- G06F9/4411—Configuring for operating with peripheral devices; Loading of device drivers
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a method and equipment for configuring a template in BIOS configuration, wherein the method comprises the following steps: acquiring json data containing server configuration information; setting an identifier ID corresponding to each configuration item in the BIOS configuration template in a jsp file or an HTML file, and setting each ID to be associated with a packaging function in a jQuery frame; and calling a packaging function corresponding to the ID to draw a tab label page, acquiring a variable value corresponding to each configuration item in the json data, and drawing the acquired variable value in the corresponding tab label page. The embodiment of the invention can effectively improve the readability and the usability of the code, and can also complete various template configuration items in the BIOS configuration of various types of machines, and meanwhile, the implementation method can effectively shorten the code amount of a jsp file or an HTML file, improve the running speed of the program and enable the program to run more smoothly.
Description
Technical Field
The present invention relates to the field of internet, and in particular, to a method and apparatus for template configuration in BIOS (Basic Input Output System) configuration.
Background
In the input Server Automation (wave Server management driver), in the template configuration in the BIOS configuration, template configuration items need to be displayed to a user for the user to select configuration related configuration items, and these configuration items need to be implemented by a huge amount of code in HTML (HyperText Markup Language) files and jsp (Java Server Pages) files. Thousands of lines of codes appear in an HTML file or a jsp file, so that the codes are tedious and not concise, and inconvenience is brought to a person who maintains the codes at a later stage, so that the codes become soft ribs of the template configuration items.
Disclosure of Invention
In order to solve the above technical problem, the present invention provides a method and an apparatus for template configuration in BIOS configuration, so as to solve the problem that a large amount of code is required in the template configuration in BIOS configuration.
In order to achieve the object of the present invention, an embodiment of the present invention provides a method for configuring a template in a BIOS configuration, including:
acquiring json data containing server configuration information;
setting an identifier ID corresponding to each configuration item in the BIOS configuration template in a jsp file or an HTML file, and setting each ID to be associated with a packaging function in a jQuery frame;
and calling a packaging function corresponding to the ID to draw a tab label page, acquiring a variable value corresponding to each configuration item in the json data, and drawing the acquired variable value in the corresponding tab label page.
Optionally, the acquiring json data including server configuration information includes:
and adopting JavaScript language to obtain the json data by calling a rear-end interface function.
Optionally, before drawing a tab page by calling a wrapper function corresponding to the ID, the method further includes: and defining the name of the configuration item in the BIOS configuration template and the variable value corresponding to the configuration item in the packaging function.
Optionally, the obtaining a variable value corresponding to each configuration item in the json data includes:
traversing the json data, and acquiring a variable value corresponding to each configuration item according to the name of the configuration item.
Optionally, after the step of calling the encapsulation function corresponding to the ID to draw the tab label page, obtaining a variable value corresponding to each configuration item in the json data, and drawing the obtained variable value in the corresponding tab label page, the method further includes:
and displaying the tab label page according to the model.
The embodiment of the present invention further provides a device for template configuration in BIOS configuration, including:
the first acquisition module is used for acquiring json data containing server configuration information;
the setting module is used for setting an identifier ID corresponding to each configuration item in the BIOS configuration template in a jsp file or an HTML file, and setting each ID to be associated with a packaging function in a jQuery frame;
and the second obtaining module is used for obtaining a variable value corresponding to each configuration item in the json data by calling a packaging function corresponding to the ID to draw a tab label page, and drawing the obtained variable value in the corresponding tab label page.
Optionally, the first obtaining module is configured to obtain the json data by calling a backend interface function using a JavaScript language.
Optionally, the apparatus further comprises:
and the pre-defining module is used for defining the names of the configuration items in the BIOS configuration template and the variable values corresponding to the configuration items in the packaging function.
Optionally, the second obtaining module is configured to traverse the json data, and obtain a variable value corresponding to each configuration item according to a name of the configuration item.
Optionally, the apparatus further comprises:
and the display module is used for displaying the tab label page according to the model.
The method for configuring the template in the BIOS configuration comprises the following steps: acquiring json data containing server configuration information; setting an identification ID corresponding to each configuration item in the BIOS configuration template in a jsp file or an HTML file, and setting each ID to be associated with a packaging function in a jQuery frame; and calling a packaging function corresponding to the ID to draw a tab label page, acquiring a variable value corresponding to each configuration item in the json data, and drawing the acquired variable value in the corresponding tab label page. The embodiment of the invention can effectively improve the readability and the usability of the code, and can also complete various template configuration items in the BIOS configuration of various types of machines, and meanwhile, the implementation method can effectively shorten the code amount of a jsp file or an HTML file, improve the running speed of the program and enable the program to run more smoothly.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the example serve to explain the principles of the invention and not to limit the invention.
FIG. 1 is a flow chart of a method for template configuration in BIOS configuration according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a device configured by a template in the BIOS configuration according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
The steps illustrated in the flow charts of the figures may be performed in a computer system such as a set of computer-executable instructions. Also, while a logical order is shown in the flow diagrams, in some cases, the steps shown or described may be performed in an order different than here.
The embodiment of the invention provides a method and equipment for template configuration in BIOS configuration.
In the embodiment of the invention, JavaScript high-level language can be adopted for coding, json data generated by Java language is called, and a packaged function method is called according to a unique ID through binding of an ID (Identification) in a jsp file or an HTML file, so that tab label pages are drawn to form template configuration items with various options.
As shown in fig. 1, a method for configuring a template in BIOS configuration according to an embodiment of the present invention includes:
the method of the embodiment of the invention can be realized by adopting a JavaScript language.
In one embodiment, JavaScript language is adopted, and the json data is acquired by calling a back-end interface function.
The json data is obtained, for example, by calling the dorestall function.
wherein each configuration item corresponds to a unique ID.
By setting each ID to be associated with a packaging function in the jQuery framework, different configuration items can be added according to a customized strategy.
In an embodiment, the method further comprises: and defining the name of the configuration item in the BIOS configuration template and the variable value corresponding to the configuration item in the packaging function.
In an embodiment, the obtaining a variable value corresponding to each configuration item in the json data includes: traversing the json data, and acquiring a variable value corresponding to each configuration item according to the name of the configuration item.
In an embodiment, after the step 103, the method may further include:
and displaying the tab label page according to the model.
The model refers to a model of a server.
The embodiment of the invention can be applied to different model configurations to realize different template configuration effects. The embodiment of the invention can effectively improve the readability and the usability of the code, and can also complete various template configuration items in the BIOS configuration of various types of machines, and meanwhile, the implementation method can effectively shorten the code amount of a jsp file or an HTML file, improve the running speed of the program and enable the program to run more smoothly.
The following describes the specific implementation process of the above method with reference to practical application. In the embodiment of the invention, JavaScript high-level language is adopted for coding, json data generated by Java language is called, coding is carried out in js file, the calling of tab label function method is completed, the obtained json data is analyzed, the function method is called by adopting a jQuery frame according to the analyzed data, the packaged function method is called by utilizing ID (identifier) in a jsp file or HTML file, tab label page is drawn in the function, template configuration items of various options are completed, and the tab label page is perfectly displayed in a program.
The method for configuring the template in the BIOS configuration mainly comprises the following steps:
(1) firstly, analyzing json data returned by an interface by using a dorestall method according to the interface generated by a rear-end Java language;
(2) writing simple codes in a jsp file or an HTML file through a jQuery framework, and setting a unique ID (identifier);
(3) in the packaged function method, defining the name of a configuration item in template configuration, configuring a value corresponding to the configuration item, and traversing analyzed json data by utilizing circulation;
(4) drawing a tab label page in the js file according to the ID (identifier);
(5) transmitting the traversed json data through the variable values of the configuration item names in the defined template configuration;
(6) embedding variables of the obtained values in a tab label page by drawing in a configuration template;
(7) completing tab label pages of BIOS configuration templates of different machine types;
(8) and running the program, and displaying template configuration item information of different BIOS configurations according to different models so as to enable a user to set different options.
In the embodiment of the invention, the template configuration in the BIOS configuration of different types can be designed according to different types, so that the realization of the configuration items of different templates is protected, and different configuration items can be added according to a self-defined strategy.
As shown in fig. 2, an embodiment of the present invention further provides an apparatus for configuring a template in a BIOS configuration, including:
a first obtaining module 21, configured to obtain json data including server configuration information;
the setting module 22 is configured to set an identifier ID corresponding to each configuration item in the BIOS configuration template in a jsp file or an HTML file, and set each ID to be associated with a package function in a jQuery framework;
the second obtaining module 23 is configured to obtain a variable value corresponding to each configuration item in the json data by calling a packaging function corresponding to the ID to draw a tab page, and draw the obtained variable value in the corresponding tab page.
In one implementation, the first obtaining module 21 is configured to obtain the json data by calling a backend interface function using a JavaScript language.
In one implementation, the apparatus further comprises:
and the pre-defining module is used for defining the names of the configuration items in the BIOS configuration template and the variable values corresponding to the configuration items in the packaging function.
In an implementation, the second obtaining module 23 is configured to traverse the json data, and obtain a variable value corresponding to each configuration item according to a name of the configuration item.
In one implementation, the apparatus further comprises:
and the display module is used for displaying the tab label page according to the model.
In summary, in the embodiments of the present invention, the core module is executed by the method and the device for configuring the template configuration items in the BIOS configuration, and then the encapsulated function method is called to draw different template configuration items in different BIOS configurations of different models, so that a high-efficiency compiling program can be performed through a jsp file or an HTML file, thereby increasing the compiling rate of the program. Compared with the previous method for writing a section of code by a configuration item, the method adopts the jQuery framework for coding, can effectively display the configuration items of different templates of different models, reduces the redundancy of the code, and can be used for various templates in various BIOS configurations needing installation.
The embodiment of the invention also provides equipment for configuring the template in the BIOS configuration, which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the method for configuring the template in the BIOS configuration when executing the program.
The embodiment of the present invention further provides a computer-readable storage medium, which stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the method for configuring a template in the BIOS configuration is implemented.
It will be understood by those of ordinary skill in the art that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.
Claims (8)
1. A method of template configuration in a BIOS configuration, comprising:
acquiring json data containing server configuration information;
setting an identifier ID corresponding to each configuration item in the BIOS configuration template in a jsp file or an HTML file, and setting each ID to be associated with a packaging function in a jQuery frame;
drawing a tab label page by calling a packaging function corresponding to the ID, acquiring a variable value corresponding to each configuration item in the json data, and drawing the acquired variable value in the corresponding tab label page;
and displaying the tab label page according to the model.
2. The method of claim 1, wherein obtaining json data containing server configuration information comprises:
and adopting JavaScript language to obtain the json data by calling a rear-end interface function.
3. The method of claim 1, wherein before drawing a tab label page by calling a wrapper function corresponding to the ID, the method further comprises: and defining the name of the configuration item in the BIOS configuration template and the variable value corresponding to the configuration item in the packaging function.
4. The method of claim 3, wherein obtaining a variable value corresponding to each configuration item in the json data comprises:
traversing the json data, and acquiring a variable value corresponding to each configuration item according to the name of the configuration item.
5. An apparatus for template configuration in a BIOS configuration, comprising:
the first acquisition module is used for acquiring json data containing server configuration information;
the setting module is used for setting an identifier ID corresponding to each configuration item in the BIOS configuration template in a jsp file or an HTML file, and setting each ID to be associated with a packaging function in a jQuery frame;
the second obtaining module is used for obtaining a variable value corresponding to each configuration item in the json data by calling a packaging function corresponding to the ID to draw a tab label page, and drawing the obtained variable value in the corresponding tab label page;
and the display module is used for displaying the tab label page according to the model.
6. The apparatus of claim 5,
the first obtaining module is used for obtaining the json data by calling a rear-end interface function by adopting a JavaScript language.
7. The apparatus of claim 5, further comprising:
and the pre-defining module is used for defining the names of the configuration items in the BIOS configuration template and the variable values corresponding to the configuration items in the packaging function.
8. The apparatus of claim 7,
and the second acquisition module is used for traversing the json data and acquiring the variable value corresponding to each configuration item according to the name of the configuration item.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810608146.2A CN108776593B (en) | 2018-06-13 | 2018-06-13 | Method and equipment for template configuration in BIOS configuration |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810608146.2A CN108776593B (en) | 2018-06-13 | 2018-06-13 | Method and equipment for template configuration in BIOS configuration |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108776593A CN108776593A (en) | 2018-11-09 |
CN108776593B true CN108776593B (en) | 2021-04-02 |
Family
ID=64025125
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810608146.2A Active CN108776593B (en) | 2018-06-13 | 2018-06-13 | Method and equipment for template configuration in BIOS configuration |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108776593B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109582392A (en) * | 2018-12-06 | 2019-04-05 | 浪潮电子信息产业股份有限公司 | BIOS configuration option configuration method, device, equipment and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104636173A (en) * | 2015-03-11 | 2015-05-20 | 浪潮集团有限公司 | Fast BIOS configuration method |
CN105426172A (en) * | 2015-10-30 | 2016-03-23 | 北京金海明天软件技术有限公司 | XML analysis technique and template language based dynamic WEB page generation method |
CN105426204A (en) * | 2015-11-05 | 2016-03-23 | 浪潮软件集团有限公司 | Web high-speed loading rendering method based on domestic CPU, operating system and browser |
CN105824642A (en) * | 2016-03-23 | 2016-08-03 | 浪潮软件集团有限公司 | JS component for rapidly developing mobile phone tax client declaration form |
CN106354430A (en) * | 2016-08-27 | 2017-01-25 | 浪潮(北京)电子信息产业有限公司 | Method and device for allocating RAID card based on BMC |
CN107273163A (en) * | 2017-06-14 | 2017-10-20 | 郑州云海信息技术有限公司 | A kind of parameter configuration management method and device based on graphic user interface |
-
2018
- 2018-06-13 CN CN201810608146.2A patent/CN108776593B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104636173A (en) * | 2015-03-11 | 2015-05-20 | 浪潮集团有限公司 | Fast BIOS configuration method |
CN105426172A (en) * | 2015-10-30 | 2016-03-23 | 北京金海明天软件技术有限公司 | XML analysis technique and template language based dynamic WEB page generation method |
CN105426204A (en) * | 2015-11-05 | 2016-03-23 | 浪潮软件集团有限公司 | Web high-speed loading rendering method based on domestic CPU, operating system and browser |
CN105824642A (en) * | 2016-03-23 | 2016-08-03 | 浪潮软件集团有限公司 | JS component for rapidly developing mobile phone tax client declaration form |
CN106354430A (en) * | 2016-08-27 | 2017-01-25 | 浪潮(北京)电子信息产业有限公司 | Method and device for allocating RAID card based on BMC |
CN107273163A (en) * | 2017-06-14 | 2017-10-20 | 郑州云海信息技术有限公司 | A kind of parameter configuration management method and device based on graphic user interface |
Also Published As
Publication number | Publication date |
---|---|
CN108776593A (en) | 2018-11-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6629848B2 (en) | Page processing for mobile applications | |
CN107656914B (en) | Configurable table generation method and device, terminal equipment and storage medium | |
CN106909361B (en) | Web development method and device based on template engine | |
CN106933887B (en) | Data visualization method and device | |
CN105630522B (en) | A kind of update method, the device and system of Web application | |
CN112068911B (en) | Electronic form generation method, device, system, equipment and medium | |
CN110263279B (en) | Page generation method and device, electronic equipment and computer readable storage medium | |
CN111260752A (en) | Flow chart drawing method, device and equipment and storage medium | |
CN112347404A (en) | SPA page rendering method, device and system and storage medium | |
CN111552463A (en) | Page jump method and device, computer equipment and storage medium | |
CN108776593B (en) | Method and equipment for template configuration in BIOS configuration | |
CN112632425B (en) | Method, device, equipment and storage medium for generating offline resource file | |
CN116301813B (en) | Low-code platform development method and system | |
CN106293862B (en) | A kind of analysis method and device of expandable mark language XML data | |
CN110162301B (en) | Form rendering method, form rendering device and storage medium | |
CN107391158B (en) | Method and equipment for realizing table drawing based on iDataTable packaging | |
CN116151199A (en) | Method, device and equipment for generating network-connected vehicle test report | |
CN114254229A (en) | Webpage rendering method and device | |
CN110968810A (en) | Webpage data processing method and device | |
CN113778820A (en) | Application program data export method, device, electronic device and storage medium | |
CN109726346B (en) | Page component processing method and device | |
CN112068828A (en) | Title control generation method, device, system, equipment and medium | |
CN114594945A (en) | Method, device, system, equipment and medium for generating advanced popup selection frame | |
CN111639030A (en) | Page testing method, device, equipment and storage medium | |
CN112068910B (en) | Method, device and system for generating accessory control with downloading function |
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 |