Skip to content
Merged
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
15 changes: 8 additions & 7 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,30 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- name: Checkout repository and submodules recursively
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: recursive
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache: 'yarn'
cache-dependency-path: static/src/yarn.lock
- name: Pre setup
run: |
npm cache clean --force
rm -rf ~/.npm
TASK_PRESENTER_VERSION=$(node -p "require('./package.json').dependencies['@dtwebservices/task-presenter-components']")
npm install https://s3.amazonaws.com/cf-s3uploads/pybv/${TASK_PRESENTER_VERSION}/task-presenter-components.tgz
working-directory: static/src
- run: yarn webpack
- name: Build (webpack)
env:
NODE_OPTIONS: --openssl-legacy-provider
run: yarn webpack
working-directory: static/src
- run: yarn test
working-directory: static/src
Expand Down
47 changes: 47 additions & 0 deletions templates/projects/tasks_browse.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@
</div>
<div id="tasksBrowseControls">
<ul class="pull-left">
{% if user_reports %}
<li>
<button id="btn-download-reports" class="btn btn-sm" type="button" data-target="#download-reports-modal" data-toggle="modal" title="Download Reports">
<i class="fa fa-download" aria-hidden="true"></i>
</button>
</li>
{% endif %}
<li>
<button id="btn-add-bookmark" class="btn btn-sm" type="button" data-target="#addBookmarkModal" data-toggle="modal" title="Save Filter">
<i class="fa fa-floppy-o" aria-hidden="true"></i>
Expand Down Expand Up @@ -531,6 +538,46 @@ <h4 class="modal-title" id="infoModalLabel">Saved Filters</h4>
</div>
</div>

<!-- Download Reports Modal -->
<div class="modal fade" id="download-reports-modal" tabindex="-1" role="dialog" aria-labelledby="downloadReportsModalLabel">
<div class="modal-dialog modal-md" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="infoModalLabel">Reports</h4>
</div>
<div class="modal-body">
<label for="sort-bookmarks">Available Reports For Download</label>
<span id="currentUsername" style="display:none">{{current_user.name}}</span>
<table id="bookmarksGrid" class="table table-sm table-striped table-hover border">
<thead>
<tr>
<th>Report</th>
<th class="col-md-1">Date</th>
</tr>
</thead>
<tbody>
<!-- user_reports is expected to be a list of (report_date, report_path) tuples -->
{% for report_date, report_name, report_path in user_reports %}
<tr>
<td>
<a href="{{ report_path }}" class="label label-info">{{ report_name }}</a>
</td>
<td>
<span>{{ report_date }}</span>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>

<!-- Date Modal -->
<div class="modal fade" id="dateModal" tabindex="-1" role="dialog" aria-labelledby="dateModalLabel">
<div class="modal-dialog modal-sm" role="document">
Expand Down
47 changes: 47 additions & 0 deletions templates/projects/tasks_browse.webpack.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@
</div>
<div id="tasksBrowseControls">
<ul class="pull-left">
{% if user_reports %}
<li>
<button id="btn-download-reports" class="btn btn-sm" type="button" data-target="#download-reports-modal" data-toggle="modal" title="Download Reports">
<i class="fa fa-download" aria-hidden="true"></i>
</button>
</li>
{% endif %}
<li>
<button id="btn-add-bookmark" class="btn btn-sm" type="button" data-target="#addBookmarkModal" data-toggle="modal" title="Save Filter">
<i class="fa fa-floppy-o" aria-hidden="true"></i>
Expand Down Expand Up @@ -531,6 +538,46 @@
</div>
</div>

<!-- Download Reports Modal -->
<div class="modal fade" id="download-reports-modal" tabindex="-1" role="dialog" aria-labelledby="downloadReportsModalLabel">
<div class="modal-dialog modal-md" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="infoModalLabel">Reports</h4>
</div>
<div class="modal-body">
<label for="sort-bookmarks">Available Reports For Download</label>
<span id="currentUsername" style="display:none">{{current_user.name}}</span>
<table id="bookmarksGrid" class="table table-sm table-striped table-hover border">
<thead>
<tr>
<th>Report</th>
<th class="col-md-1">Date</th>
</tr>
</thead>
<tbody>
<!-- user_reports is expected to be a list of (report_date, report_path) tuples -->
{% for report_date, report_name, report_path in user_reports %}
<tr>
<td>
<a href="{{ report_path }}" class="label label-info">{{ report_name }}</a>
</td>
<td>
<span>{{ report_date }}</span>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>

<!-- Date Modal -->
<div class="modal fade" id="dateModal" tabindex="-1" role="dialog" aria-labelledby="dateModalLabel">
<div class="modal-dialog modal-sm" role="document">
Expand Down
Loading