CN115686547A - Front-end page management method, device, equipment and medium - Google Patents

Front-end page management method, device, equipment and medium Download PDF

Info

Publication number
CN115686547A
CN115686547A CN202211347559.2A CN202211347559A CN115686547A CN 115686547 A CN115686547 A CN 115686547A CN 202211347559 A CN202211347559 A CN 202211347559A CN 115686547 A CN115686547 A CN 115686547A
Authority
CN
China
Prior art keywords
preset
application
container
end page
life cycle
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.)
Pending
Application number
CN202211347559.2A
Other languages
Chinese (zh)
Inventor
唐晓东
蔡卫卫
黄启庆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Cloud Information Technology Co Ltd
Original Assignee
Inspur Cloud Information Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Inspur Cloud Information Technology Co Ltd filed Critical Inspur Cloud Information Technology Co Ltd
Priority to CN202211347559.2A priority Critical patent/CN115686547A/en
Publication of CN115686547A publication Critical patent/CN115686547A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a front-end page management method, device, equipment and medium, relating to the technical field of computers and comprising the following steps: constructing a target overall framework based on a Kubernets container organizer, a preset resource container and a preset application container; acquiring declarative metadata of front-end page application, and storing the declarative metadata into the preset application container of the target overall framework; monitoring whether a first life cycle operation of an acoustic front-end page resource exists in the preset resource container, if so, controlling the preset application container to execute a second life cycle operation corresponding to the first life cycle operation, and generating a corresponding life cycle operation record; and sending the life cycle operation record to a preset public front-end application so that the preset public front-end application loads a corresponding front-end page based on the life cycle operation record. By the scheme, the number of front-end pages to be maintained is reduced, and the front-end pages are updated in time.

Description

Front-end page management method, device, equipment and medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a front-end page management method, apparatus, device, and medium.
Background
Most public clouds and products such as private cloud all can provide a large amount of service products at present, every service product all has the front end page of oneself, when these front end pages are developed together in same project, can have the problem that is difficult to the iteration version, every service product all has the version issue plan of oneself, when the version need be issued after the front end page test of oneself passes through, other service product has not yet researched and developed the completion, do not influence each other in order to guarantee service product version and research and development process, it is usually that each service product has independent front end project, the version issue is mutually independent. Based on the research and development thought, a deployment mode of the micro-service framework is derived, each service product starts the front-end application of the service product, and the whole front-end access system depends on the routing capability of the micro-service framework and forwards the request to each front-end application. However, the mode also brings new problems, a large number of front-end applications are deployed, more runtime resources are occupied, and meanwhile, the management mode needs to develop a corresponding deployment script for each front-end application, so that the maintenance amount is large, and the management is difficult to unify; when front-end development is carried out, each front-end application refers to some universal packages to realize a unified style sheet, various public method contents and the like, and when the versions of the referenced universal packages are not unified, the problem of difference during integration test is caused, so that when a new version is released by each universal package, all the front-end applications need to be updated to reload a new universal package; a large amount of front-end applications have no intuitive display and management capability, and the state and version information of the front-end applications running in the current environment cannot be checked in real time.
In summary, how to reduce the number of front end pages to be maintained and update the front end pages in time is a problem to be solved in the field.
Disclosure of Invention
In view of the above, the present invention provides a front-end page management method, apparatus, device and medium, which reduces the number of front-end pages to be maintained and updates the front-end pages in time. The specific scheme is as follows:
in a first aspect, the present application discloses a front-end page management method, including:
constructing a target overall framework based on a Kubernetes container organizer, a preset resource container and a preset application container;
acquiring declarative metadata of front-end page application, and storing the declarative metadata into the preset application container of the target overall framework;
monitoring whether a first life cycle operation of an acoustic front-end page resource exists in the preset resource container, if so, controlling the preset application container to execute a second life cycle operation corresponding to the first life cycle operation, and generating a corresponding life cycle operation record;
and sending the life cycle operation record to a preset public front-end application so that the preset public front-end application loads a corresponding front-end page based on the life cycle operation record.
Optionally, the monitoring whether there is a first life cycle operation of an declared front-end page resource in the preset resource container includes:
and monitoring whether any first life cycle operation of a preset creating operation, a preset updating operation and a preset deleting operation of the declarative front-end page resource exists in the preset resource container.
Optionally, if the application container exists, controlling the preset application container to execute a second lifecycle operation corresponding to the first lifecycle operation, and generating a corresponding lifecycle operation record, includes:
if the preset creating operation exists, reading attribute information of the creating operation, and determining corresponding target front-end page application and corresponding storage information of the front-end page by using the attribute information;
controlling the preset application container to create declarative metadata of the target front-end page application and generate a corresponding life cycle operation record;
correspondingly, the sending the life cycle operation record to a preset public front-end application so that the preset public front-end application loads a corresponding front-end page based on the life cycle operation record includes:
and copying the front-end page to a corresponding public directory in a preset public front-end application based on the storage information, and sending the life cycle operation record to the preset public front-end application so that the preset public front-end application loads the corresponding front-end page based on the life cycle operation record.
Optionally, if the first lifecycle operation exists, controlling the preset application container to execute a second lifecycle operation corresponding to the first lifecycle operation, and generating a corresponding lifecycle operation record, where the method includes:
if the preset updating operation exists, determining a storage directory of a front-end page corresponding to the updating operation, and screening out a directory to be deleted from a public directory based on the storage directory;
and controlling the preset application container to enable the declarative metadata in the directory to be deleted to be generated into a corresponding life cycle operation record.
Optionally, if the first lifecycle operation exists, controlling the preset application container to execute a second lifecycle operation corresponding to the first lifecycle operation, and generating a corresponding lifecycle operation record, where the method includes:
if the preset deleting operation exists, determining a front-end page corresponding to the deleting operation, and deleting a directory corresponding to the front-end page from the public directory to obtain an updated public directory;
and controlling the preset application container to update the related configuration and the declarative metadata based on the updated public directory and generate a corresponding life cycle operation record.
Optionally, before deleting the directory corresponding to the front-end page from the public directory, the method further includes:
and establishing a public directory so that the preset application container and the preset resource container can inquire the public directory.
Optionally, after the target overall framework is constructed based on the kubernets container organizer, the preset resource container, and the preset application container, the method further includes:
a container mirror is created to store the front-end page, version number, CSS, and picture in the container mirror.
In a second aspect, the present application discloses a front-end page management apparatus, comprising:
the framework construction module is used for constructing a target overall framework by applying a Kubernetes container organizer, a preset resource container and a preset application container;
the storage module is used for acquiring declarative metadata of front-end page application by an application and storing the declarative metadata into the preset application container of the target overall framework;
the record generation module monitors whether a first life cycle operation of the acoustic front-end page resource exists in the preset resource container of the target overall framework or not by an application, and if so, controls the preset application container to execute a second life cycle operation corresponding to the first life cycle operation and generates a corresponding life cycle operation record;
and the page loading module is used for sending the life cycle operation record to a preset public front-end application by the application so that the preset public front-end application can load a corresponding front-end page based on the life cycle operation record.
In a third aspect, the present application discloses an electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the steps of the front end page management method disclosed in the foregoing.
In a fourth aspect, the present application discloses a computer readable storage medium for storing a computer program; wherein the computer program realizes the steps of the front end page management method disclosed in the foregoing when executed by a processor.
Therefore, the target overall framework is constructed on the basis of the Kubernets container organizer, the preset resource container and the preset application container; acquiring declarative metadata of front-end page application, and storing the declarative metadata into the preset application container of the target overall framework; monitoring whether a first life cycle operation of an acoustic front-end page resource exists in the preset resource container, if so, controlling the preset application container to execute a second life cycle operation corresponding to the first life cycle operation, and generating a corresponding life cycle operation record; and sending the life cycle operation record to a preset public front-end application so that the preset public front-end application loads a corresponding front-end page based on the life cycle operation record. Therefore, after the target overall framework is constructed, the declarative metadata of the front-end page application are obtained, when a first lifecycle operation of the declarative front-end page resource exists in the preset resource container, the preset application container executes a second lifecycle operation corresponding to the first lifecycle operation, namely the declarative metadata is updated in time, the preset public front-end application loads the corresponding front-end page based on the lifecycle operation records, and then a plurality of front-end pages do not need to be maintained, only one front-end page needs to be maintained, and the maintenance difficulty is greatly reduced.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flow chart of a front end page management method disclosed herein;
FIG. 2 is a general block diagram of a specific object disclosed herein;
FIG. 3 is a schematic diagram of a specific common front end application disclosed herein;
FIG. 4 is a flow chart of a particular front end page management method disclosed herein;
FIG. 5 is a flow chart of a particular front end page management method disclosed herein;
FIG. 6 is a schematic diagram of a front end page management apparatus according to the present disclosure;
fig. 7 is a block diagram of an electronic device disclosed in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Most public cloud and products such as private cloud all can provide a large amount of service products at present, every service product all has the front end page of oneself, when these front end pages are developed together in same project, can have the problem that is difficult to the iteration version, every service product all has the version release plan of oneself, when the version need be released after the front end page test of oneself passes through, other service product has not researched and developed the completion yet, do not influence each other in order to guarantee service product version and research and development process, it is usually that each service product has independent front end project, the version is released mutually independently. Based on the research and development thought, a deployment mode of the micro-service framework is derived, each service product starts the front-end application of the service product, and the whole front-end access system depends on the routing capability of the micro-service framework and forwards the request to each front-end application. However, the mode also brings new problems, a large number of front-end applications are deployed, more runtime resources are occupied, and meanwhile, the management mode needs to develop a corresponding deployment script for each front-end application, so that the maintenance amount is large, and the management is difficult to unify; when front-end development is carried out, each front-end application refers to some universal packages to realize a unified style sheet, various public method contents and the like, and when the versions of the referenced universal packages are not unified, the problem of difference during integration test is caused, so that when a new version is released by each universal package, all the front-end applications need to be updated to reload a new universal package; a large number of front-end applications have no visual display and management capability, and the state and version information of the front-end applications running in the current environment cannot be checked in real time.
Therefore, the front-end page management scheme is correspondingly provided, the number of front-end pages to be maintained is reduced, and the front-end pages are updated in time.
Referring to fig. 1, an embodiment of the present application discloses a front-end page management method, including:
step S11: and constructing a target overall framework based on the Kubernetes container organizer, the preset resource container and the preset application container.
In this embodiment, as shown in a specific target overall framework schematic diagram shown in fig. 2, a target overall framework based on a kubernets container organizer (K8S) includes a preset public front-end application, and the preset public front-end application may monitor any one first lifecycle operation period of a preset creation operation of a cloud hard disk front-end page application resource CR, a preset update operation of the cloud host front-end page application resource CR, and a preset deletion operation of a virtual private network front-end page application resource CR, so as to perform a corresponding second lifecycle operation based on the first lifecycle operation, such as updating a cloud host service page, newly creating a cloud hard disk page file, and deleting a virtual private network page file. Based on the characteristic, a preset public front-end application POD is designed, the POD comprises two containers which are respectively a preset resource container and a preset application container, the preset application container provides html exposure service, the preset resource container is a declarative resource controller-container and can provide management capability of declarative resources, and the POD also comprises a shared directory, namely the public directory and a shared disk directory which are used for the preset resource container and the preset application container to be used together, so that the requirement that two application programs operate front-end page files simultaneously is met.
Step S12: and acquiring declarative metadata of the front-end page application, and storing the declarative metadata into the preset application container of the target overall framework.
In this embodiment, when the front-end page application is written as the declarative metadata, it needs to be based on a preset metadata writing standard, each service product may define its own front-end page resource, and create corresponding declarative metadata, where relevant information of the front-end page resource file and application information corresponding to the information are to be described in the declarative metadata, and the following data are "front-end application information description of cloud host service product" theme reference declarative data:
Figure BDA0003918781890000061
Figure BDA0003918781890000071
the data attribute description may be as shown in the following table:
watch 1
Figure BDA0003918781890000072
Step S13: monitoring whether a first life cycle operation of the acoustic front-end page resource exists in the preset resource container, if so, controlling the preset application container to execute a second life cycle operation corresponding to the first life cycle operation, and generating a corresponding life cycle operation record.
In this embodiment, as shown in fig. 3, in a specific schematic diagram of a public front-end application, a public front-end application includes a preset resource container and a preset application container, a public directory is created in advance, so that the preset resource container and the preset application container use the public directory together, and when it is monitored that the preset resource container updates file content in the public directory empty dir { }, that is, when it is monitored that a first life cycle operation of the preset resource container exists, the preset application container performs a corresponding second life cycle operation. The preset application container is a container in a POD (personal digital assistant) running on a K8S (K8S), a public directory path needs to be configured during starting, page files such as front-end html (hypertext markup language) and the like under the public directory are loaded after starting, the publishing capability of the front-end page files is realized, and the http service is exposed to the outside. The preset application container can dynamically monitor the change condition of the public directory, realize the real-time loading and updating of operations such as addition, change, deletion and the like of files, and correctly return the content installation routing rule requested by the browser.
Step S14: and sending the life cycle operation record to a preset public front-end application so that the preset public front-end application loads a corresponding front-end page based on the life cycle operation record.
It should be noted that, in this embodiment, the public front-end application is designed and implemented to dynamically load the updated html page according to the standard rule, so as to implement real-time refreshing of the front-end application page file; providing standard routing rule definition, and solving the problem of access address conflict among multiple front-end applications; common front-end resource package definitions are supported, and front-end applications can reference and use the common front-end resource packages according to standards. All front-end application pages are exposed through a unified public front-end service, N running PODs of K8S are reduced to one running POD, and occupied CPU (central processing unit) and memory resources are greatly reduced. All front-end application pages are exposed through the unified public front-end service, only one unified public front-end service deployment script needs to be maintained, the number of the maintained application deployment scripts is reduced from N to 1, and the maintenance difficulty of the front-end application is greatly reduced. All front-end application pages are exposed through the unified public front-end service, so that trial updating automatic loading of the front-end application can be realized, and the newly updated front-end page can be refreshed in the browser without restarting the front-end application. All front-end application pages are exposed through the unified public front-end service, so that the unified maintenance of the public package can be realized, the front-end applications do not need to refer to the public package respectively, and the error probability is reduced.
Therefore, the target overall framework is constructed on the basis of the Kubernets container organizer, the preset resource container and the preset application container; acquiring declarative metadata of front-end page application, and storing the declarative metadata into the preset application container of the target overall framework; monitoring whether a first life cycle operation of an acoustic front-end page resource exists in the preset resource container, if so, controlling the preset application container to execute a second life cycle operation corresponding to the first life cycle operation, and generating a corresponding life cycle operation record; and sending the life cycle operation record to a preset public front-end application so that the preset public front-end application loads a corresponding front-end page based on the life cycle operation record. Therefore, after the target overall framework is constructed, the declarative metadata of the front-end page application are obtained, when a first lifecycle operation of the declarative front-end page resource exists in the preset resource container, the preset application container executes a second lifecycle operation corresponding to the first lifecycle operation, namely the declarative metadata is updated in time, the preset public front-end application loads the corresponding front-end page based on the lifecycle operation records, and then a plurality of front-end pages do not need to be maintained, only one front-end page needs to be maintained, and the maintenance difficulty is greatly reduced.
Referring to fig. 4, an embodiment of the present application discloses a specific front-end page management method, including:
step S21: and constructing a target overall framework based on the Kubernetes container organizer, the preset resource container and the preset application container.
Step S22: and acquiring declarative metadata of the front-end page application, and storing the declarative metadata into the preset application container of the target overall framework.
Step S23: monitoring whether any first life cycle operation of a preset creating operation, a preset updating operation and a preset deleting operation of the declarative front-end page resource exists in the preset resource container, if so, controlling the preset application container to execute a second life cycle operation corresponding to the first life cycle operation, and generating a corresponding life cycle operation record.
In a first specific embodiment, if the preset creating operation exists, reading attribute information of the creating operation, and determining a corresponding target front-end page application and storage information of a corresponding front-end page by using the attribute information; and controlling the preset application container to create the declarative metadata of the target front-end page application and generate a corresponding life cycle operation record. When receiving a newly-built front-end page resource, the controller firstly reads all attributes of the resource to obtain application information corresponding to the front-end page and container mirror image information for storing html, and starts a page copy logic as follows:
1) The container mirror is started as a container.
2) And finding a storage directory of contents such as html and the like described in the resource as a source directory, copying files such as html and the like in the source directory to a specified public directory by using a copying command, wherein the target directory is a directory with the same application name.
3) Files such as html and the like under the public directory are dynamically loaded by the preset public front-end application, and automatic release of the files such as the html and the like of the front-end application is achieved.
In a second specific embodiment, if the preset updating operation exists, determining a storage directory of a front-end page corresponding to the updating operation, and screening out a directory to be deleted from a public directory based on the storage directory; and controlling the preset application container to enable the declarative metadata in the catalog to be deleted to be generated, and generating a corresponding life cycle operation record. When receiving updated front-end page resources, the controller firstly reads all the attributes of the resources to obtain application information corresponding to the front-end pages and container mirror image information for storing html, and starts page copy logic as follows:
1) The container mirror is started as a container.
2) And finding a storage directory of contents such as html and the like described in the resource as a source directory, copying files such as html and the like in the source directory to a specified public directory by using a copy command, wherein the target directory is a directory with the same name as the application name.
3) And creating indexes for front-end page files such as html and the like in the source directory, and deleting files which do not exist in the source directory by comparing the front-end page files such as html and the like currently stored in the public directory.
4) And presetting files such as an update html and the like under the public directory, and dynamically loading the files such as the update html and the like by the public front-end application to realize the automatic release of the files such as the html and the like by the front-end application.
In a third specific embodiment, if the preset deleting operation exists, determining a front-end page corresponding to the deleting operation, and deleting a directory corresponding to the front-end page from the public directory to obtain an updated public directory; and controlling the preset application container to update the related configuration and the declarative metadata based on the updated public directory and generate a corresponding life cycle operation record. When the deleted front-end page resource is received, the controller firstly reads all the attributes of the resource to obtain the application information corresponding to the front-end page, and starts a page deletion logic as follows:
1) And deleting the directory with the same name as the application name under the public directory.
2) And the preset application container dynamically updates the configuration and removes the deleted front-end page.
In this embodiment, before deleting the directory corresponding to the front-end page from the public directory, the method further includes: and establishing a public directory so that the preset application container and the preset resource container can inquire the public directory.
Step S24: and sending the life cycle operation record to a preset public front-end application so that the preset public front-end application loads a corresponding front-end page based on the life cycle operation record.
In this embodiment, if the preset creation operation exists, the front-end page needs to be copied to a corresponding public directory in a preset public front-end application based on the storage information, and the life cycle operation record is sent to the preset public front-end application, so that the preset public front-end application loads the corresponding front-end page based on the life cycle operation record.
In this embodiment, if the preset deletion operation exists, after the directory corresponding to the front-end page is deleted from the public directory, the preset public front-end application dynamically updates the configuration, and removes the deleted front-end page.
Therefore, the front-end application page is managed in a declarative resource management mode, the lifecycle-type front-end application management capability can be achieved, and the creation, updating and deleting operations of the front-end application can be directly achieved through creation, updating and deleting operations of declarative resources in K8S.
Referring to fig. 5, an embodiment of the present application discloses a specific front-end page management method, including:
step S31: and constructing a target overall framework based on the Kubernets container composer, the preset resource container and the preset application container, and creating a container mirror image so as to store the front-end page, the version number, the CSS and the picture into the container mirror image.
In this embodiment, a container mirror image is created so as to store the front-end page, the version number, the CSS, and the picture in the container mirror image, it can be understood that a standard manner is required to store files such as the front-end page, the version number, the CSS, and the picture, in order to match a common mode of current microservice + containerization deployment, the container mirror image is used as a storage medium, the container mirror image has a standard version management system and can be stored in a container mirror image warehouse, and a tar package can be exported for storage, so that the management and the use are easy. Selecting a minimum common container mirror image as a basic mirror image, adding a front-end html (hypertext markup language) and other related files on the mirror image, storing the manufactured container mirror image into a container mirror image warehouse, and setting tag of the mirror image as a version number applied by the front end. The method can realize the version management of the file content of the application front end, and can directly check the currently deployed front end application list, the state and the version information of the front end application list through a k8s command. The reference to the content of the Dockerfile file for making the container image is as follows:
FROM registry.test.com:5000/library/base/alpine:3.6
COPY ecs/html/
step S32: and acquiring declarative metadata of the front-end page application, and storing the declarative metadata into the preset application container of the target overall framework.
Step S33: monitoring whether a first life cycle operation of the declarative front-end page resource exists in the preset resource container, if so, controlling the preset application container to execute a second life cycle operation corresponding to the first life cycle operation, and generating a corresponding life cycle operation record.
Step S34: and sending the life cycle operation record to a preset public front-end application so that the preset public front-end application loads the corresponding front-end page based on the life cycle operation record.
Therefore, the front-end page file is stored through the container mirror image, and the version management capability of matching the code output with the application version can be provided through the tag characteristic of the container mirror image.
Referring to fig. 6, an embodiment of the present application discloses a front-end page management apparatus, including:
the framework construction module 11 is used for constructing a target overall framework by applying a Kubernetes container-based organizer, a preset resource container and a preset application container;
the storage module 12 is used for acquiring declarative metadata of the front-end page application by the application and storing the declarative metadata into the preset application container of the target overall framework;
a record generating module 13, configured to monitor whether a first lifecycle operation of an declarative front-end page resource exists in the preset resource container of the target overall framework, and if so, control the preset application container to execute a second lifecycle operation corresponding to the first lifecycle operation, and generate a corresponding lifecycle operation record;
the page loading module 14 sends the life cycle operation record to a preset public front-end application, so that the preset public front-end application loads a corresponding front-end page based on the life cycle operation record.
Therefore, the target overall framework is constructed on the basis of the Kubernets container organizer, the preset resource container and the preset application container; acquiring declarative metadata of front-end page application, and storing the declarative metadata into the preset application container of the target overall framework; monitoring whether a first life cycle operation of an acoustic front-end page resource exists in the preset resource container, if so, controlling the preset application container to execute a second life cycle operation corresponding to the first life cycle operation, and generating a corresponding life cycle operation record; and sending the life cycle operation record to a preset public front-end application so that the preset public front-end application loads a corresponding front-end page based on the life cycle operation record. Therefore, after the target overall framework is constructed, the declarative metadata of the front-end page application is obtained, when a first lifecycle operation of the declarative front-end page resource exists in a preset resource container, the preset application container executes a second lifecycle operation corresponding to the first lifecycle operation, namely the declarative metadata is updated in time, the preset public front-end application loads the corresponding front-end page based on the lifecycle operation record, and then a plurality of front-end pages are not required to be maintained, only one front-end page needs to be maintained, and the maintenance difficulty is greatly reduced.
Further, the embodiment of the application also provides electronic equipment. FIG. 7 is a block diagram illustrating an electronic device 20 according to an exemplary embodiment, and the contents of the diagram should not be construed as limiting the scope of use of the present application in any way.
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application. The method specifically comprises the following steps: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input output interface 25, and a communication bus 26. Wherein the memory 22 is adapted to store a computer program, which is loaded and executed by the processor 21, to implement the steps of:
constructing a target overall framework based on a Kubernets container organizer, a preset resource container and a preset application container;
acquiring declarative metadata of front-end page application, and storing the declarative metadata into the preset application container of the target overall framework;
monitoring whether a first life cycle operation of an acoustic front-end page resource exists in the preset resource container, if so, controlling the preset application container to execute a second life cycle operation corresponding to the first life cycle operation, and generating a corresponding life cycle operation record;
and sending the life cycle operation record to a preset public front-end application so that the preset public front-end application loads a corresponding front-end page based on the life cycle operation record.
In some embodiments, the processor may specifically implement the following steps by executing the computer program stored in the memory:
and monitoring whether any first life cycle operation of a preset creating operation, a preset updating operation and a preset deleting operation of the declarative front-end page resource exists in the preset resource container.
In some embodiments, the processor, by executing the computer program stored in the memory, may specifically implement the following steps:
if the preset creating operation exists, reading attribute information of the creating operation, and determining corresponding target front-end page application and storage information of a corresponding front-end page by using the attribute information;
controlling the preset application container to create declarative metadata of the target front-end page application and generate a corresponding life cycle operation record;
correspondingly, the sending the life cycle operation record to a preset public front-end application so that the preset public front-end application loads a corresponding front-end page based on the life cycle operation record includes:
and copying the front-end page to a corresponding public directory in a preset public front-end application based on the storage information, and sending the life cycle operation record to the preset public front-end application so that the preset public front-end application loads the corresponding front-end page based on the life cycle operation record.
In some embodiments, the processor, by executing the computer program stored in the memory, may specifically implement the following steps:
if the preset updating operation exists, determining a storage directory of a front-end page corresponding to the updating operation, and screening out a directory to be deleted from a public directory based on the storage directory;
and controlling the preset application container to enable the declarative metadata in the catalog to be deleted to be generated, and generating a corresponding life cycle operation record.
In some embodiments, the processor, by executing the computer program stored in the memory, may specifically implement the following steps:
if the preset deleting operation exists, determining a front-end page corresponding to the deleting operation, and deleting a directory corresponding to the front-end page from the public directory to obtain an updated public directory;
and controlling the preset application container to update the related configuration and the declarative metadata based on the updated public directory and generate a corresponding life cycle operation record.
In some embodiments, the processor may specifically implement the following steps by executing the computer program stored in the memory:
and establishing a public directory so that the preset application container and the preset resource container query the public directory.
In some embodiments, the processor, by executing the computer program stored in the memory, may further include:
a container mirror is created to store the front-end page, version number, CSS, and picture in the container mirror.
In this embodiment, the power supply 23 is configured to provide a working voltage for each hardware device on the electronic device; the communication interface 24 can create a data transmission channel between the electronic device and an external device, and a communication protocol followed by the communication interface is any communication protocol applicable to the technical solution of the present application, and is not specifically limited herein; the input/output interface 25 is configured to acquire external input data or output data to the outside, and a specific interface type thereof may be selected according to specific application requirements, which is not specifically limited herein.
The processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 21 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, the processor 21 may further include an AI (Artificial Intelligence) processor for processing a calculation operation related to machine learning.
In addition, the storage 22 is used as a carrier for storing resources, and may be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., the resources stored thereon include an operating system 221, a computer program 222, data 223, etc., and the storage mode may be a transient storage mode or a permanent storage mode.
The operating system 221 is used for managing and controlling hardware devices and computer programs 222 on the electronic device, so as to implement operations and processing of the mass data 223 in the memory 22 by the processor 21, and may be Windows, unix, linux, or the like. The computer program 222 may further include a computer program that can be used to perform other specific tasks in addition to the computer program that can be used to perform the front-end page management method performed by the electronic device disclosed in any of the foregoing embodiments. The data 223 may include data received by the electronic device and transmitted from an external device, or may include data collected by the input/output interface 25 itself.
Further, an embodiment of the present application further discloses a computer-readable storage medium, where a computer program is stored in the storage medium, and when the computer program is loaded and executed by a processor, the method steps executed in the front-end page management process disclosed in any of the foregoing embodiments are implemented.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
The foregoing describes in detail a method, an apparatus, a device, and a medium for front-end page management provided by the present invention, and specific examples are applied herein to explain the principles and embodiments of the present invention, and the descriptions of the foregoing examples are only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A front-end page management method, comprising:
constructing a target overall framework based on a Kubernetes container organizer, a preset resource container and a preset application container;
acquiring declarative metadata of front-end page application, and storing the declarative metadata into the preset application container of the target overall framework;
monitoring whether a first life cycle operation of an acoustic front-end page resource exists in the preset resource container, if so, controlling the preset application container to execute a second life cycle operation corresponding to the first life cycle operation, and generating a corresponding life cycle operation record;
and sending the life cycle operation record to a preset public front-end application so that the preset public front-end application loads a corresponding front-end page based on the life cycle operation record.
2. The front-end page management method of claim 1, wherein the first life cycle operation of monitoring the presence of an declared front-end page resource in the preset resource container comprises:
and monitoring whether any first life cycle operation of a preset creating operation, a preset updating operation and a preset deleting operation of the declarative front-end page resource exists in the preset resource container.
3. The front-end page management method of claim 2, wherein the controlling the preset application container to perform a second lifecycle operation corresponding to the first lifecycle operation and generate a corresponding lifecycle operation record if present comprises:
if the preset creating operation exists, reading attribute information of the creating operation, and determining corresponding target front-end page application and corresponding storage information of the front-end page by using the attribute information;
controlling the preset application container to create declarative metadata of the target front-end page application and generate a corresponding life cycle operation record;
correspondingly, the sending the life cycle operation record to a preset public front-end application so that the preset public front-end application loads a corresponding front-end page based on the life cycle operation record includes:
and copying the front-end page to a corresponding public directory in a preset public front-end application based on the storage information, and sending the life cycle operation record to the preset public front-end application so that the preset public front-end application loads the corresponding front-end page based on the life cycle operation record.
4. The front-end page management method of claim 2, wherein the controlling the default application container, if any, to perform a second lifecycle operation corresponding to the first lifecycle operation and generate a corresponding lifecycle operation record comprises:
if the preset updating operation exists, determining a storage directory of a front-end page corresponding to the updating operation, and screening out a directory to be deleted from a public directory based on the storage directory;
and controlling the preset application container to enable the declarative metadata in the directory to be deleted to be generated into a corresponding life cycle operation record.
5. The front-end page management method of claim 4, wherein the controlling the preset application container to perform a second lifecycle operation corresponding to the first lifecycle operation and generate a corresponding lifecycle operation record if present comprises:
if the preset deleting operation exists, determining a front-end page corresponding to the deleting operation, and deleting a directory corresponding to the front-end page from the public directory to obtain an updated public directory;
and controlling the preset application container to update the related configuration and the declarative metadata based on the updated public directory and generate a corresponding life cycle operation record.
6. The front-end page management method of claim 5, wherein before deleting the directory corresponding to the front-end page from the public directory, further comprising:
and establishing a public directory so that the preset application container and the preset resource container can inquire the public directory.
7. The front-end page management method according to any one of claims 1 to 6, wherein after constructing the target overall framework based on the Kubernets container organizer, the preset resource container and the preset application container, the method further comprises:
a container image is created to store the front end page, version number, CSS and pictures into the container image.
8. A front-end page management apparatus, comprising:
the framework construction module is used for constructing a target overall framework by applying a Kubernetes container organizer, a preset resource container and a preset application container;
the storage module is used for acquiring declarative metadata of front-end page application by an application and storing the declarative metadata into the preset application container of the target overall framework;
the record generation module is used for monitoring whether a first life cycle operation of the declarative front-end page resource exists in the preset resource container of the target overall framework or not, if so, controlling the preset application container to execute a second life cycle operation corresponding to the first life cycle operation, and generating a corresponding life cycle operation record;
and the page loading module is used for sending the life cycle operation record to a preset public front-end application by the application so that the preset public front-end application loads a corresponding front-end page based on the life cycle operation record.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the steps of the front end page management method of any of claims 1 to 7.
10. A computer-readable storage medium for storing a computer program; wherein the computer program when executed by a processor implements the steps of the front-end page management method of any of claims 1 to 7.
CN202211347559.2A 2022-10-31 2022-10-31 Front-end page management method, device, equipment and medium Pending CN115686547A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211347559.2A CN115686547A (en) 2022-10-31 2022-10-31 Front-end page management method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211347559.2A CN115686547A (en) 2022-10-31 2022-10-31 Front-end page management method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN115686547A true CN115686547A (en) 2023-02-03

Family

ID=85046928

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211347559.2A Pending CN115686547A (en) 2022-10-31 2022-10-31 Front-end page management method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN115686547A (en)

Similar Documents

Publication Publication Date Title
EP3428811B1 (en) Database interface agent for a tenant-based upgrade system
CN108984170B (en) H5 page multi-language rendering method and device
US10291704B2 (en) Networked solutions integration using a cloud business object broker
US9652220B2 (en) Zero down-time deployment of new application versions
JP2003528391A (en) Method and apparatus for storing changes to file attributes without having to store additional copies of file contents
US11762654B2 (en) Processing framework for in-system programming in a containerized environment
CN112698921B (en) Logic code operation method, device, computer equipment and storage medium
CN106257418B (en) Techniques for evaluating an application by using an auxiliary application
CN110688174A (en) Container starting method, storage medium and electronic device
CN112486552A (en) Server hot update method, device, equipment and storage medium
CN115480801A (en) Multi-project development, deployment and operation method and system based on Vue framework
CN116339756A (en) Application program mounting method, device, equipment and storage medium
US11656864B2 (en) Automatic application of software updates to container images based on dependencies
CN113391875A (en) Container deployment method and device
CN113127430B (en) Mirror image information processing method, mirror image information processing device, computer readable medium and electronic equipment
US9690753B1 (en) Caching of a site model in a hierarchical modeling system for network sites
CN111459619A (en) Method and device for realizing service based on cloud platform
CN116432624A (en) Micro-service API document generation method, device, equipment and storage medium
CN115686547A (en) Front-end page management method, device, equipment and medium
CN112597408A (en) System fusion method, device, equipment and storage medium
CN111858234A (en) Task execution method, device, equipment and medium
CN113791819A (en) Interface document generation method and device, storage medium and electronic equipment
US11966723B2 (en) Automatic management of applications in a containerized environment
CN111638903B (en) Method and device for generating difference information of different software versions
US8868578B2 (en) Building information technology services from a library of elements

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