netbox icon indicating copy to clipboard operation
netbox copied to clipboard

script page elements are duplicated when log output is paginated and browsed

Open FliesLikeABrick opened this issue 1 year ago • 0 comments

Deployment Type

Self-hosted

NetBox Version

4.0.5

Python Version

3.11

Steps to Reproduce

Create a custom script that logs at least 500 messages, such as the attached:

from extras.scripts import *
class CreateMessagesScript(Script):
    class Meta:
        name = "Show Message Pagination"
        description = "Generate over 500 messages"
    def run(self, data, commit):
        for i in range(1,555):
            self.log_success(i)
        output=[]
        return '\n'.join(output)

Execute the script

Page through the output. For each page that is viewed, rendered page elements around the log table are duplicated.

Expected Behavior

Paging through logs should not impact static page elements surrounding the output table

Observed Behavior

The "output" box is duplicated

image

and so are elements above the log table, such as the script status, runtime, etc image

FliesLikeABrick avatar Jun 27 '24 21:06 FliesLikeABrick