diff --git a/.gitignore b/.gitignore index f84cda7d51..6919e54ba1 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,8 @@ docs/_build/** docs/cli-help-output.txt docs/config-options.rst mock.*.egg +web_test_*.csv +.eggs/ dist/** .idea/** *.iml diff --git a/locust/env.py b/locust/env.py index 15770d4a4b..63b2e048ef 100644 --- a/locust/env.py +++ b/locust/env.py @@ -80,6 +80,7 @@ def __init__( user_classes=None, shape_class=None, tags=None, + locustfile=None, exclude_tags=None, events=None, host=None, @@ -93,6 +94,7 @@ def __init__( else: self.events = Events() + self.locustfile = locustfile self.user_classes = user_classes or [] self.shape_class = shape_class self.tags = tags diff --git a/locust/main.py b/locust/main.py index bbd6222972..c4ffd97199 100644 --- a/locust/main.py +++ b/locust/main.py @@ -99,11 +99,12 @@ def load_locustfile(path): return imported.__doc__, user_classes, shape_class -def create_environment(user_classes, options, events=None, shape_class=None): +def create_environment(user_classes, options, events=None, shape_class=None, locustfile=None): """ Create an Environment instance from options """ return Environment( + locustfile=locustfile, user_classes=user_classes, shape_class=shape_class, tags=options.tags, @@ -204,7 +205,9 @@ def main(): ) # create locust Environment - environment = create_environment(user_classes, options, events=locust.events, shape_class=shape_class) + environment = create_environment( + user_classes, options, events=locust.events, shape_class=shape_class, locustfile=os.path.basename(locustfile) + ) if shape_class and (options.num_users or options.spawn_rate): logger.warning( @@ -476,6 +479,7 @@ def timelimit_stop(): else: logger.info("No run time limit set, use CTRL+C to interrupt") + logger.info(f"user_classes {environment.user_classes}") main_greenlet.join() if options.html_file: html_report = get_html_report(environment, show_download_link=False) diff --git a/locust/static/css/application.css b/locust/static/css/application.css index bff123eca0..793dd170c8 100644 --- a/locust/static/css/application.css +++ b/locust/static/css/application.css @@ -1,5 +1,6 @@ html { - height: 100%; } + height: 100%; +} body { background: #173529; @@ -13,71 +14,95 @@ body { position: relative; box-sizing: border-box; min-height: 100%; - -webkit-font-smoothing: antialiased; } + -webkit-font-smoothing: antialiased; +} ul { margin: 0; padding: 0; - list-style: none; } + list-style: none; +} a { color: #2be6a4; - text-decoration: none; } - a:hover { - color: #4ff9bd; } + text-decoration: none; +} +a:hover { + color: #4ff9bd; +} table.stats { width: 100%; border-radius: 3px; border: 2px solid #11251c; border-spacing: 0; - margin-bottom: 30px; } - table.stats thead { - padding: 0; - margin: 0; - color: #a9c5ba; } - table.stats thead tr { - background: #11251c; } - table.stats thead tr:nth-child(even) { - background: #11251c; } - table.stats thead tr:hover { - background: #11251c; } - table.stats thead th { - font-weight: bold; - cursor: default; } - table.stats thead th.nowrap { - white-space: nowrap; } - table.stats thead th[data-sortkey] { - cursor: pointer; } - table.stats tr:hover { - background: #1d4434; } - table.stats tr td, table.stats tr th { - padding: 10px; - margin: 0; - text-align: left; } - table.stats tr td:first-child, table.stats tr th:first-child { - padding-left: 16px; } - table.stats tr td:last-child, table.stats tr th:last-child { - padding-right: 16px; } - table.stats tr td.numeric, table.stats tr th.numeric { - text-align: right; } + margin-bottom: 30px; +} +table.stats thead { + padding: 0; + margin: 0; + color: #a9c5ba; +} +table.stats thead tr { + background: #11251c; +} +table.stats thead tr:nth-child(even) { + background: #11251c; +} +table.stats thead tr:hover { + background: #11251c; +} +table.stats thead th { + font-weight: bold; + cursor: default; +} +table.stats thead th.nowrap { + white-space: nowrap; +} +table.stats thead th[data-sortkey] { + cursor: pointer; +} +table.stats tr:hover { + background: #1d4434; +} +table.stats tr td, table.stats tr th { + padding: 10px; + margin: 0; + text-align: left; +} +table.stats tr td:first-child, table.stats tr th:first-child { + padding-left: 16px; +} +table.stats tr td:last-child, table.stats tr th:last-child { + padding-right: 16px; +} +table.stats tr td.numeric, table.stats tr th.numeric { + text-align: right; +} +table.stats tr td { + max-width: 450px; + overflow: hidden; + word-wrap: break-word; + white-space: no-wrap; + text-overflow: ellipsis; +} +@media (max-width: 1100px) { table.stats tr td { - max-width: 450px; - overflow: hidden; - word-wrap: break-word; - white-space: no-wrap; - text-overflow: ellipsis; } - @media (max-width: 1100px) { - table.stats tr td { - max-width: 350px; } } - table.stats tr:nth-child(even) { - background: #153126; } - table.stats tr:nth-child(even):hover { - background: #1d4434; } - table.stats tr.total { - background: #11251c; } - table.stats tr.total td { - font-weight: bold; } + max-width: 350px; + } +} +table.stats tr:nth-child(even) { + background: #153126; +} +table.stats tr:nth-child(even):hover { + background: #1d4434; +} +table.stats tr.total { + background: #11251c; +} +table.stats tr.total td { + font-weight: bold; +} .top { background: linear-gradient(to bottom, #ffffff 0%, #e7e7e7 100%); @@ -87,96 +112,122 @@ table.stats { position: fixed; top: 0px; left: 0px; - z-index: 2; } - .top a { - color: #308dbf; } - .top .top-content { - padding-top: 20px; } - .top .top-content .logo { - float: left; - width: 200px; - height: 48px; - margin-top: 2px; } - .top .top-content .boxes { - float: right; } - .top .top-content .boxes .box_running { - display: none; } - body.spawning .top .top-content .boxes .box_running, body.running .top .top-content .boxes .box_running { - display: block; } - body.stopped .top .top-content .boxes .box_running, body.stopping .top .top-content .boxes .box_running { - display: block; } - body.stopped .top .top-content .boxes .box_stop, body.stopping .top .top-content .boxes .box_stop { - display: none; } - .top .top-content .boxes .top_box { - float: left; - border-left: 1px solid #d9d9d9; - padding-left: 20px; - padding-right: 20px; - height: 53px; } - .top .top-content .boxes .top_box:first-child { - border: none; } - .top .top-content .boxes .top_box .label { - color: #7a7a7a; - font-size: 11px; - font-weight: bold; } - .top .top-content .boxes .top_box .value { - color: #000; - font-size: 16px; - font-weight: bold; - max-width: 165px; - word-wrap: break-word; } - .top .top-content .boxes .top_box.box_url .value { - font-size: 14px; - font-weight: normal; } - .top .top-content .boxes .top_box.box_rps .value, .top .top-content .boxes .top_box.box_workers .value { - font-size: 32px; } - .top .top-content .boxes .top_box.box_fail .value { - font-size: 22px; } - .top .top-content .boxes .top_box.box_status .value { - text-transform: uppercase; } - .top .top-content .boxes .top_box.box_status .new-test { - display: none; } - body.stopped .top .top-content .boxes .top_box.box_status .new-test, body.stopping .top .top-content .boxes .top_box.box_status .new-test { - display: block; } - .top .top-content .boxes .top_box.box_status .edit-test { - display: none; } - body.running .top .top-content .boxes .top_box.box_status .edit-test, body.spawning .top .top-content .boxes .top_box.box_status .edit-test { - display: inline; } - .top .top-content .boxes .top_box .stop-button { - display: block; - float: left; - background: #d81212; - border-radius: 5px; - color: #fff; - padding: 9px 18px; - text-align: center; - font-size: 11px; - font-weight: bold; - margin-right: 12px; } - .top .top-content .boxes .top_box .stop-button:hover { - background: #c80202; } - .top .top-content .boxes .top_box .stop-button i { - display: block; - background: #fff; - width: 17px; - height: 17px; - margin-left: auto; - margin-right: auto; - margin-bottom: 7px; - box-shadow: 0 0 20px rgba(255, 255, 255, 0.5); } - .top .top-content .boxes .top_box .reset-button { - display: block; - float: left; - background: #5a4b4b; - border-radius: 5px; - color: #fff; - padding: 11px 16px; - line-height: 1.5em; - text-align: center; - font-size: 11px; - font-weight: bold; } - .top .top-content .boxes .top_box .reset-button:hover { - background: #4e4141; } + z-index: 2; +} +.top a { + color: #308dbf; +} +.top .top-content { + padding-top: 20px; +} +.top .top-content .logo { + float: left; + width: 200px; + height: 48px; + margin-top: 2px; +} +.top .top-content .boxes { + float: right; +} +.top .top-content .boxes .box_running { + display: none; +} +body.spawning .top .top-content .boxes .box_running, body.running .top .top-content .boxes .box_running { + display: block; +} +body.stopped .top .top-content .boxes .box_running, body.stopping .top .top-content .boxes .box_running { + display: block; +} +body.stopped .top .top-content .boxes .box_stop, body.stopping .top .top-content .boxes .box_stop { + display: none; +} +.top .top-content .boxes .top_box { + float: left; + border-left: 1px solid #d9d9d9; + padding-left: 20px; + padding-right: 20px; + height: 53px; +} +.top .top-content .boxes .top_box:first-child { + border: none; +} +.top .top-content .boxes .top_box .label { + color: #7a7a7a; + font-size: 11px; + font-weight: bold; +} +.top .top-content .boxes .top_box .value { + color: #000; + font-size: 16px; + font-weight: bold; + max-width: 165px; + word-wrap: break-word; +} +.top .top-content .boxes .top_box.box_url .value { + font-size: 14px; + font-weight: normal; +} +.top .top-content .boxes .top_box.box_rps .value, .top .top-content .boxes .top_box.box_workers .value { + font-size: 32px; +} +.top .top-content .boxes .top_box.box_fail .value { + font-size: 22px; +} +.top .top-content .boxes .top_box.box_status .value { + text-transform: uppercase; +} +.top .top-content .boxes .top_box.box_status .new-test { + display: none; +} +body.stopped .top .top-content .boxes .top_box.box_status .new-test, body.stopping .top .top-content .boxes .top_box.box_status .new-test { + display: block; +} +.top .top-content .boxes .top_box.box_status .edit-test { + display: none; +} +body.running .top .top-content .boxes .top_box.box_status .edit-test, body.spawning .top .top-content .boxes .top_box.box_status .edit-test { + display: inline; +} +.top .top-content .boxes .top_box .stop-button { + display: block; + float: left; + background: #d81212; + border-radius: 5px; + color: #fff; + padding: 9px 18px; + text-align: center; + font-size: 11px; + font-weight: bold; + margin-right: 12px; +} +.top .top-content .boxes .top_box .stop-button:hover { + background: #c80202; +} +.top .top-content .boxes .top_box .stop-button i { + display: block; + background: #fff; + width: 17px; + height: 17px; + margin-left: auto; + margin-right: auto; + margin-bottom: 7px; + box-shadow: 0 0 20px rgba(255, 255, 255, 0.5); +} +.top .top-content .boxes .top_box .reset-button { + display: block; + float: left; + background: #5a4b4b; + border-radius: 5px; + color: #fff; + padding: 11px 16px; + line-height: 1.5em; + text-align: center; + font-size: 11px; + font-weight: bold; +} +.top .top-content .boxes .top_box .reset-button:hover { + background: #4e4141; +} .container { max-width: 1800px; @@ -185,150 +236,187 @@ table.stats { margin-right: auto; box-sizing: border-box; padding-left: 10px; - padding-right: 10px; } + padding-right: 10px; +} .dialogs { - position: relative; } - .dialogs .dialog { - width: 398px; - position: absolute; - left: 50%; - top: 60px; - margin-left: -169px; - z-index: 1; } - .dialogs .dialog .padder { - padding: 30px; - padding-top: 0px; } - .dialogs .dialog h2 { - color: #addf82; - font-size: 26px; - font-weight: bold; } - .dialogs .dialog label { - display: block; - margin-bottom: 10px; - margin-top: 20px; - font-size: 16px; } - .dialogs .dialog input.val { - border: none; - background: #fff; - height: 52px; - width: 328px; - font-size: 24px; - padding-left: 10px; } - .dialogs .dialog input.val_disabled { - border: none; - background: #cccccc; - height: 52px; - width: 328px; - font-size: 24px; - padding-left: 10px; } - .dialogs .dialog button { - margin-top: 20px; - float: right; - font-size: 16px; - font-weight: bold; - background: #8adaba; - padding: 14px 30px; - border-style: none; - border-radius: 5px; - cursor: pointer; } - .dialogs .dialog button:hover { - background: #74b99d; } - body.ready .dialogs .start { - display: block; } - body.ready .dialogs .start .close_link { - display: none; } - body.stopped .dialogs .start, body.stopping .dialogs .start { - display: none; - border-radius: 5px; - -moz-border-radius: 5px; - -webkit-border-radisu: 5px; - border: 3px solid #eee; - background: #132b21; - box-shadow: 0 0 60px rgba(0, 0, 0, 0.3); } - body.running .dialogs .start, body.spawning .dialogs .start { - display: none; } - body.ready .dialogs .edit { - display: none; } - body.stopped .dialogs .edit, body.stopping .dialogs .edit { - display: none; } - body.running .dialogs .edit, body.spawning .dialogs .edit { - display: none; - border-radius: 5px; - -moz-border-radius: 5px; - -webkit-border-radisu: 5px; - border: 3px solid #eee; - background: #132b21; - box-shadow: 0 0 60px rgba(0, 0, 0, 0.3); } + position: relative; +} +.dialogs .dialog { + width: 398px; + position: absolute; + left: 50%; + top: 60px; + margin-left: -169px; + z-index: 1; +} +.dialogs .dialog .padder { + padding: 30px; + padding-top: 0px; +} +.dialogs .dialog h2 { + color: #addf82; + font-size: 26px; + font-weight: bold; +} +.dialogs .dialog label { + display: block; + margin-bottom: 10px; + margin-top: 20px; + font-size: 16px; +} +.dialogs .dialog input.val { + border: none; + background: #fff; + height: 52px; + width: 328px; + font-size: 24px; + padding-left: 10px; +} +.dialogs .dialog input.val_disabled { + border: none; + background: #cccccc; + height: 52px; + width: 328px; + font-size: 24px; + padding-left: 10px; +} +.dialogs .dialog button { + margin-top: 20px; + float: right; + font-size: 16px; + font-weight: bold; + background: #8adaba; + padding: 14px 30px; + border-style: none; + border-radius: 5px; + cursor: pointer; +} +.dialogs .dialog button:hover { + background: #74b99d; +} +body.ready .dialogs .start { + display: block; +} +body.ready .dialogs .start .close_link { + display: none; +} +body.stopped .dialogs .start, body.stopping .dialogs .start { + display: none; + border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radisu: 5px; + border: 3px solid #eee; + background: #132b21; + box-shadow: 0 0 60px rgba(0, 0, 0, 0.3); +} +body.running .dialogs .start, body.spawning .dialogs .start { + display: none; +} +body.ready .dialogs .edit { + display: none; +} +body.stopped .dialogs .edit, body.stopping .dialogs .edit { + display: none; +} +body.running .dialogs .edit, body.spawning .dialogs .edit { + display: none; + border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radisu: 5px; + border: 3px solid #eee; + background: #132b21; + box-shadow: 0 0 60px rgba(0, 0, 0, 0.3); +} .main { position: relative; - display: block; } - body.ready .main { - display: none; } - .main nav.menu { - background: #132b21; } - .main nav.menu ul.tabs { - overflow: hidden; } - .main nav.menu ul.tabs > li { - display: block; - float: left; - font-size: 16px; } - .main nav.menu ul.tabs > li a { - padding: 14px 10px; - display: inline-block; - color: #b3c3bc; - position: relative; - font-weight: 600; - font-size: 14px; } - .main nav.menu ul.tabs > li a:hover { - background: #10211a; } - .main nav.menu ul.tabs > li a.current { - color: #fff; } - .main nav.menu ul.tabs > li a.current:after { - content: ""; - display: block; - position: absolute; - left: 0; - bottom: 0; - right: 0; - height: 3px; - background: #fff; } - .main .panes { - margin-top: 30px; } - .main .panes > div { - overflow: hidden; } - .main #errors td, .main #errors th { - text-align: left; } - .main #errors td th.error_count, .main #errors th th.error_count { - width: 70px; } - .main #exceptions th.exception_occurrences { - width: 110px; - text-align: center; } - .main #exceptions th.exception_traceback { - text-align: left; } - .main #exceptions td.occurrences { - text-align: center; } - .main #exceptions td.traceback { - font-size: 12px; - line-height: 18px; - font-family: monospace; - white-space: pre; } - .main #charts { - width: 100%; } - .main #charts .chart { - height: 350px; - margin-bottom: 30px; - box-sizing: border-box; - border: 1px solid #11271e; - border-radius: 3px; } - .main #charts .note { - color: #b3c3bc; - margin-bottom: 30px; - border-radius: 3px; - background: #132b21; - padding: 10px; - display: inline-block; } + display: block; +} +body.ready .main { + display: none; +} +.main nav.menu { + background: #132b21; +} +.main nav.menu ul.tabs { + overflow: hidden; +} +.main nav.menu ul.tabs > li { + display: block; + float: left; + font-size: 16px; +} +.main nav.menu ul.tabs > li a { + padding: 14px 10px; + display: inline-block; + color: #b3c3bc; + position: relative; + font-weight: 600; + font-size: 14px; +} +.main nav.menu ul.tabs > li a:hover { + background: #10211a; +} +.main nav.menu ul.tabs > li a.current { + color: #fff; +} +.main nav.menu ul.tabs > li a.current:after { + content: ""; + display: block; + position: absolute; + left: 0; + bottom: 0; + right: 0; + height: 3px; + background: #fff; +} +.main .panes { + margin-top: 30px; +} +.main .panes > div { + overflow: hidden; +} +.main #errors td, .main #errors th { + text-align: left; +} +.main #errors td th.error_count, .main #errors th th.error_count { + width: 70px; +} +.main #exceptions th.exception_occurrences { + width: 110px; + text-align: center; +} +.main #exceptions th.exception_traceback { + text-align: left; +} +.main #exceptions td.occurrences { + text-align: center; +} +.main #exceptions td.traceback { + font-size: 12px; + line-height: 18px; + font-family: monospace; + white-space: pre; +} +.main #charts { + width: 100%; +} +.main #charts .chart { + height: 350px; + margin-bottom: 30px; + box-sizing: border-box; + border: 1px solid #11271e; + border-radius: 3px; +} +.main #charts .note { + color: #b3c3bc; + margin-bottom: 30px; + border-radius: 3px; + background: #132b21; + padding: 10px; + display: inline-block; +} .about { width: 398px; @@ -342,14 +430,21 @@ table.stats { border: 3px solid #eee; background: #132b21; box-shadow: 0 0 60px rgba(0, 0, 0, 0.3); - z-index: 1; } - .about a.close_link { - position: absolute; - right: 10px; - top: 10px; } - .about .padder { - padding: 30px; - padding-top: 0px; } + z-index: 1; +} +.about a.close_link { + position: absolute; + right: 10px; + top: 10px; +} +.about .padder { + padding: 30px; + padding-top: 0px; +} + +.tasks ul { + padding-left: 10px; +} .footer { position: absolute; @@ -359,9 +454,11 @@ table.stats { width: 100%; text-align: right; box-sizing: border-box; - height: 40px; } - .footer a { - margin-right: 10px; - color: #48a584; } + height: 40px; +} +.footer a { + margin-right: 10px; + color: #48a584; +} /*# sourceMappingURL=application.css.map */ diff --git a/locust/static/css/application.css.map b/locust/static/css/application.css.map index 2b48d0cc1a..dad16b4821 100644 --- a/locust/static/css/application.css.map +++ b/locust/static/css/application.css.map @@ -1,7 +1 @@ -{ -"version": 3, -"mappings": "AAAA,IAAI;EACA,MAAM,EAAE,IAAI;;AAEhB,IAAI;EACA,UAAU,EAAE,OAAO;EACnB,OAAO,EAAE,CAAC;EACV,MAAM,EAAE,CAAC;EACT,WAAW,EAAE,4BAA4B;EACzC,SAAS,EAAE,IAAI;EACf,KAAK,EAAE,IAAI;EACX,cAAc,EAAE,IAAI;EACpB,WAAW,EAAE,IAAI;EACjB,QAAQ,EAAE,QAAQ;EAClB,UAAU,EAAE,UAAU;EACtB,UAAU,EAAE,IAAI;EAChB,sBAAsB,EAAE,WAAW;;AAEvC,EAAE;EACE,MAAM,EAAE,CAAC;EACT,OAAO,EAAE,CAAC;EACV,UAAU,EAAE,IAAI;;AAEpB,CAAC;EACG,KAAK,EAAE,OAAO;EACd,eAAe,EAAE,IAAI;EACrB,OAAO;IACH,KAAK,EAAE,OAAO;;ACxBtB,WAAW;EACP,KAAK,EAAE,IAAI;EACX,aAAa,EAAE,GAAG;EAClB,MAAM,EAAE,iBAAiB;EACzB,cAAc,EAAE,CAAC;EACjB,aAAa,EAAE,IAAI;EAEnB,iBAAK;IAED,OAAO,EAAE,CAAC;IACV,MAAM,EAAE,CAAC;IACT,KAAK,EAAE,OAAO;IAEd,oBAAE;MACE,UAAU,EAAE,OAAO;MACnB,oCAAiB;QACb,UAAU,EAAE,OAAO;MACvB,0BAAO;QACH,UAAU,EAAE,OAAO;IAC3B,oBAAE;MACE,WAAW,EAAE,IAAI;MACjB,MAAM,EAAE,OAAO;MACf,2BAAQ;QACJ,WAAW,EAAE,MAAM;MACvB,kCAAe;QACX,MAAM,EAAE,OAAO;EAEvB,oBAAO;IACH,UAAU,EAAE,OAAO;EAEv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O;IACH,OAAO,EAAE,IAAI;IACb,WAAW,EAAE,GAAG;;AAExB,OAAO;EACH,QAAQ,EAAE,QAAQ;EAClB,MAAM,EAAE,CAAC;EACT,OAAO,EAAE,MAAM;EACf,UAAU,EAAE,OAAO;EACnB,KAAK,EAAE,IAAI;EACX,UAAU,EAAE,KAAK;EACjB,UAAU,EAAE,UAAU;EACtB,MAAM,EAAE,IAAI;EAEZ,SAAC;IACG,YAAY,EAAE,IAAI;IAClB,KAAK,EAAE,OAAO", -"sources": ["../sass/_base.sass","../sass/tables.sass","../sass/_mixins.sass","../sass/application.sass"], -"names": [], -"file": "application.css" -} \ No newline at end of file +{"version":3,"sourceRoot":"","sources":["../sass/_base.sass","../sass/tables.sass","../sass/_mixins.sass","../sass/application.sass"],"names":[],"mappings":"AAAA;EACI;;;AAEJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEJ;EACI;EACA;EACA;;;AAEJ;EACI;EACA;;AACA;EACI;;;ACxBR;EACI;EACA;EACA;EACA;EACA;;AAEA;EAEI;EACA;EACA;;AAEA;EACI;;AACA;EACI;;AACJ;EACI;;AACR;EACI;EACA;;AACA;EACI;;AACJ;EACI;;AAER;EACI;;AAEJ;EACI;EACA;EACA;;AAEA;EACI;;AACJ;EACI;;AAEJ;EACI;;AACR;EACI;EACA;EACA;EACA;EACA;;AChDV;ED2CM;IAOQ;;;AAER;EACI;;AACA;EACI;;AACR;EACI;;AACA;EACI;;;AExDhB;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACI;;AACJ;EACI;;AAEA;EACI;EACA;EACA;EACA;;AAEJ;EACI;;AACA;EACI;;AACA;EACI;;AACJ;EACI;;AAEJ;EACI;;AACR;EACI;EACA;EACA;EACA;EACA;;AACA;EACI;;AACJ;EACI;EACA;EACA;;AACJ;EACI;EACA;EACA;EACA;EACA;;AACJ;EACI;EACA;;AACJ;EACI;;AACJ;EACI;;AAEA;EACI;;AACJ;EACI;;AACA;EACI;;AACR;EACI;;AACA;EACI;;AACZ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACI;;AACJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACR;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACI;;;AAExB;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEJ;EACI;;AACA;EACI;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI;EACA;;AAEJ;EACI;EACA;EACA;;AAEJ;EACI;EACA;EACA;EACA;;AAGA;EACI;EACA;EACA;EACA;EACA;EACA;;AACJ;EACI;EACA;EACA;EACA;EACA;EACA;;AAER;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACI;;AAGR;EACI;;AACA;EACI;;AACR;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;AACJ;EACI;;AAEJ;EACI;;AACJ;EACI;;AACJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEZ;EACI;EACA;;AACA;EACI;;AACJ;EACI;;AAEA;EACI;;AAEA;EACI;EACA;EACA;;AAEA;EACI;EACA;EACA;EACA;EACA;EACA;;AACA;EACI;;AACJ;EACI;;AACA;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAExB;EACI;;AACA;EACI;;AAER;EACI;;AACA;EACI;;AAGJ;EACI;EACA;;AACJ;EACI;;AACJ;EACI;;AACJ;EACI;EACA;EACA;EACA;;AAER;EACI;;AACA;EACI;EACA;EACA;EACA;EACA;;AAEJ;EACI;EACA;EACA;EACA;EACA;EACA;;;AAEZ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI;EACA;EACA;;AACJ;EACI;EACA;;;AAGJ;EACI;;;AAER;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI;EACA","file":"application.css"} \ No newline at end of file diff --git a/locust/static/css/tables.css b/locust/static/css/tables.css index 37756c68d2..2ed8841fe4 100644 --- a/locust/static/css/tables.css +++ b/locust/static/css/tables.css @@ -3,52 +3,72 @@ table.stats { border-radius: 3px; border: 2px solid #11251c; border-spacing: 0; - margin-bottom: 30px; } - table.stats thead { - padding: 0; - margin: 0; - color: #a9c5ba; } - table.stats thead tr { - background: #11251c; } - table.stats thead tr:nth-child(even) { - background: #11251c; } - table.stats thead tr:hover { - background: #11251c; } - table.stats thead th { - font-weight: bold; - cursor: default; } - table.stats thead th.nowrap { - white-space: nowrap; } - table.stats thead th[data-sortkey] { - cursor: pointer; } - table.stats tr:hover { - background: #1d4434; } - table.stats tr td, table.stats tr th { - padding: 10px; - margin: 0; - text-align: left; } - table.stats tr td:first-child, table.stats tr th:first-child { - padding-left: 16px; } - table.stats tr td:last-child, table.stats tr th:last-child { - padding-right: 16px; } - table.stats tr td.numeric, table.stats tr th.numeric { - text-align: right; } + margin-bottom: 30px; +} +table.stats thead { + padding: 0; + margin: 0; + color: #a9c5ba; +} +table.stats thead tr { + background: #11251c; +} +table.stats thead tr:nth-child(even) { + background: #11251c; +} +table.stats thead tr:hover { + background: #11251c; +} +table.stats thead th { + font-weight: bold; + cursor: default; +} +table.stats thead th.nowrap { + white-space: nowrap; +} +table.stats thead th[data-sortkey] { + cursor: pointer; +} +table.stats tr:hover { + background: #1d4434; +} +table.stats tr td, table.stats tr th { + padding: 10px; + margin: 0; + text-align: left; +} +table.stats tr td:first-child, table.stats tr th:first-child { + padding-left: 16px; +} +table.stats tr td:last-child, table.stats tr th:last-child { + padding-right: 16px; +} +table.stats tr td.numeric, table.stats tr th.numeric { + text-align: right; +} +table.stats tr td { + max-width: 450px; + overflow: hidden; + word-wrap: break-word; + white-space: no-wrap; + text-overflow: ellipsis; +} +@media (max-width: 1100px) { table.stats tr td { - max-width: 450px; - overflow: hidden; - word-wrap: break-word; - white-space: no-wrap; - text-overflow: ellipsis; } - @media (max-width: 1100px) { - table.stats tr td { - max-width: 350px; } } - table.stats tr:nth-child(even) { - background: #153126; } - table.stats tr:nth-child(even):hover { - background: #1d4434; } - table.stats tr.total { - background: #11251c; } - table.stats tr.total td { - font-weight: bold; } + max-width: 350px; + } +} +table.stats tr:nth-child(even) { + background: #153126; +} +table.stats tr:nth-child(even):hover { + background: #1d4434; +} +table.stats tr.total { + background: #11251c; +} +table.stats tr.total td { + font-weight: bold; +} /*# sourceMappingURL=tables.css.map */ diff --git a/locust/static/css/tables.css.map b/locust/static/css/tables.css.map index d5b2e28e40..df486774aa 100644 --- a/locust/static/css/tables.css.map +++ b/locust/static/css/tables.css.map @@ -1,7 +1 @@ -{ -"version": 3, -"mappings": "AAEA,WAAW;EACP,KAAK,EAAE,IAAI;EACX,aAAa,EAAE,GAAG;EAClB,MAAM,EAAE,iBAAiB;EACzB,cAAc,EAAE,CAAC;EACjB,aAAa,EAAE,IAAI;EAEnB,iBAAK;IAED,OAAO,EAAE,CAAC;IACV,MAAM,EAAE,CAAC;IACT,KAAK,EAAE,OAAO;IAEd,oBAAE;MACE,UAAU,EAAE,OAAO;MACnB,oCAAiB;QACb,UAAU,EAAE,OAAO;MACvB,0BAAO;QACH,UAAU,EAAE,OAAO;IAC3B,oBAAE;MACE,WAAW,EAAE,IAAI;MACjB,MAAM,EAAE,OAAO;MACf,2BAAQ;QACJ,WAAW,EAAE,MAAM;MACvB,kCAAe;QACX,MAAM,EAAE,OAAO;EAEvB,oBAAO;IACH,UAAU,EAAE,OAAO;EAEvB,oCAAM;IACF,OAAO,EAAE,IAAI;IACb,MAAM,EAAE,CAAC;IACT,UAAU,EAAE,IAAI;IAEhB,4DAAa;MACT,YAAY,EAAE,IAAI;IACtB,0DAAY;MACR,aAAa,EAAE,IAAI;IAEvB,oDAAS;MACL,UAAU,EAAE,KAAK;EACzB,iBAAE;IACE,SAAS,EAAE,KAAK;IAChB,QAAQ,EAAE,MAAM;IAChB,SAAS,EAAE,UAAU;IACrB,WAAW,EAAE,OAAO;IACpB,aAAa,EAAE,QAAQ;IChDjC,0BAA8B;MD2CxB,iBAAE;QAOM,SAAS,EAAE,KAAK;EAExB,8BAAiB;IACb,UAAU,EAAE,OAAO;IACnB,oCAAO;MACH,UAAU,EAAE,OAAO;EAC3B,oBAAO;IACH,UAAU,EAAE,OAAO;IACnB,uBAAE;MACE,WAAW,EAAE,IAAI", -"sources": ["../sass/tables.sass","../sass/_mixins.sass"], -"names": [], -"file": "tables.css" -} \ No newline at end of file +{"version":3,"sourceRoot":"","sources":["../sass/tables.sass","../sass/_mixins.sass"],"names":[],"mappings":"AAEA;EACI;EACA;EACA;EACA;EACA;;AAEA;EAEI;EACA;EACA;;AAEA;EACI;;AACA;EACI;;AACJ;EACI;;AACR;EACI;EACA;;AACA;EACI;;AACJ;EACI;;AAER;EACI;;AAEJ;EACI;EACA;EACA;;AAEA;EACI;;AACJ;EACI;;AAEJ;EACI;;AACR;EACI;EACA;EACA;EACA;EACA;;AChDV;ED2CM;IAOQ;;;AAER;EACI;;AACA;EACI;;AACR;EACI;;AACA;EACI","file":"tables.css"} \ No newline at end of file diff --git a/locust/static/locust.js b/locust/static/locust.js index a4fc9af84a..fff5efcd8b 100644 --- a/locust/static/locust.js +++ b/locust/static/locust.js @@ -63,6 +63,44 @@ var errors_tpl = $('#errors-template'); var exceptions_tpl = $('#exceptions-template'); var workers_tpl = $('#worker-template'); +function getRatioPercent(ratio) { + return (ratio * 100).toFixed(1) + "%"; +} +function _initTasks_sub(li, tasks) { + if (tasks) { + var ul = $('