Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 41 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,12 @@ jobs:
with:
cylc_flow: true
cylc_flow_opts: ''
# Required for coverage collection
editable_installations: true

- name: install cylc-uiserver
run: pip install -e .[all]
run: |
pip install -e .[all]

- name: Style test
if: startsWith(matrix.os, 'ubuntu')
Expand All @@ -76,8 +79,45 @@ jobs:
- name: Test
run: pytest

- name: Cylc Review tests
id: review_tests
run: |
CONF_PATH="$HOME/.cylc/flow/8"
mkdir -p "$CONF_PATH"
touch "$CONF_PATH/global.cylc"
ln -s "$CONF_PATH/global.cylc" "$CONF_PATH/global-tests.cylc"

cat >> "$CONF_PATH/global.cylc" <<__HERE__
[platforms]
[[_local_background_shared_tcp]]
hosts = localhost
install target = localhost
ssh command = ssh -oBatchMode=yes -oConnectTimeout=8 -oStrictHostKeyChecking=no
__HERE__

# Check that Cylc Review is installed!
# (We're only interested if it emits an error):
cylc review --help > /dev/null || exit 1

# Run tests on Cylc Review
export CYLC_COVERAGE=1
export CYLC_COVERAGE_BASE=$PWD
./etc/bin/run-functional-tests

- name: Debug
if: failure() && steps.review_tests.outcome == 'failure'
timeout-minutes: 1
run: |
find "$HOME/cylc-run" -name '*.err' -type f \
-exec echo \; -exec echo '====== {} ======' \; -exec cat '{}' \;
find "$HOME/cylc-run" -name '*.log' -type f \
-exec echo \; -exec echo '====== {} ======' \; -exec cat '{}' \;
find "${TMPDIR:-/tmp}/${USER}/cylctb-"* -type f \
-exec echo \; -exec echo '====== {} ======' \; -exec cat '{}' \;

- name: Coverage report
run: |
coverage combine .
coverage xml --ignore-errors
coverage report

Expand Down
1 change: 1 addition & 0 deletions changes.d/755.feat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Cylc Review converted to Python 3 and added to Cylc UIServer bundle.
12 changes: 12 additions & 0 deletions cylc/uiserver/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,18 @@
``c.CylcUIServer.site_authorization`` should be defined in
``/etc/cylc/uiserver/jupyter_config.py``, or, alternatively, via
the environment variable ``CYLC_SITE_CONF_PATH``.

Cylc Review Service
^^^^^^^^^^^^^^^^^^^

Cylc hub can be configured to automatically serve the Cylc Review static
log-file viewer. To enable Cylc Review, add the following to your
`jupyterhub_config.py`:

.. code-block:: python

c.JupyterHub.services = [get_review_service_config()]

"""

from concurrent.futures import ProcessPoolExecutor
Expand Down
5 changes: 5 additions & 0 deletions cylc/uiserver/cylc_review/static/css/bootstrap.min.css

Large diffs are not rendered by default.

120 changes: 120 additions & 0 deletions cylc/uiserver/cylc_review/static/css/cylc-review.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
pre {
white-space: pre;
}
.entry {
border-radius: 5px;
padding: 5px;
}
.even {
background: #eee;
}
.inline {
margin: 0;
}
.page-header {
padding-left: 10px;
padding-right: 10px;
}
.highlight {
background-color: yellow;
}
.line-number {
cursor: pointer;
}
.badge-label {
border-radius: 1em;
}


@media screen {
div.top_nav {
position: fixed;
bottom: 0;
background-color: lightgrey;
z-index: 10;
}
.next {
background: white
}
.previous {
background: white
}
.page_entries select {
width: 300px;
}
}


/* dropdown-submenu code from bootstrap v2.3.1 (removed in v3.x)
see boostrap v2.3.1 docs/assets/css/boostrap.css #3031->3075 */
.dropdown-submenu {
position: relative;
}

.dropdown-submenu > .dropdown-menu {
top: 0;
left: 100%;
margin-top: -6px;
margin-left: -1px;
-webkit-border-radius: 0 6px 6px 6px;
-moz-border-radius: 0 6px 6px 6px;
border-radius: 0 6px 6px 6px;
}

.dropdown-submenu:hover > .dropdown-menu {
display: block;
}

.dropup .dropdown-submenu > .dropdown-menu {
top: auto;
bottom: 0;
margin-top: 0;
margin-bottom: -2px;
-webkit-border-radius: 5px 5px 5px 0;
-moz-border-radius: 5px 5px 5px 0;
border-radius: 5px 5px 5px 0;
}

.dropdown-submenu > a:after {
display: block;
float: right;
width: 0;
height: 0;
margin-top: 5px;
margin-right: -10px;
border-color: transparent;
border-left-color: #cccccc;
border-style: solid;
border-width: 5px 0 5px 5px;
content: " ";
}

.dropdown-submenu:hover > a:after {
border-left-color: #222222; /* make the right arrow visible on hover */
}

.dropdown-submenu.pull-left {
float: none;
}

.dropdown-submenu.pull-left > .dropdown-menu {
left: -100%;
margin-left: 10px;
-webkit-border-radius: 6px 0 6px 6px;
-moz-border-radius: 6px 0 6px 6px;
border-radius: 6px 0 6px 6px;
}

@-moz-document url-prefix() {
fieldset { display: table-cell; }
}

th,
.livestamp {
white-space: nowrap;
}

.warning {
background-color: #FFBF00;
border-radius: 4px;
}
Loading
Loading