Skip to content

Commit f0b99fa

Browse files
Miscellaneous updates
1 parent 0be4e77 commit f0b99fa

31 files changed

+975
-192
lines changed

.gitlab-ci.yml

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
include:
2+
- template: Code-Quality.gitlab-ci.yml
3+
4+
code_quality:
5+
before_script:
6+
- echo "nothing to do.."
7+
services: # Shut off Docker-in-Docker
8+
tags:
9+
- cq-sans-dind # Set this job to only run on our new specialized runner
10+
artifacts:
11+
paths: [gl-code-quality-report.json]
12+
13+
metrics:
14+
before_script:
15+
- echo "nothing to do.."
16+
script:
17+
- echo 'metric_name metric_value' > metrics.txt
18+
artifacts:
19+
reports:
20+
metrics: metrics.txt
21+
22+
stages:
23+
- test
24+
- build
25+
- publish
26+
27+
precommit:
28+
image: mcr.microsoft.com/dotnet/sdk:5.0-alpine
29+
stage: test
30+
except:
31+
- public
32+
before_script:
33+
- export PYTHONUNBUFFERED=1
34+
- apk add --no-cache git build-base python3 python3-dev wget bash nodejs nodejs-npm && ln -sf python3 /usr/bin/python
35+
- python3 -m ensurepip
36+
- pip3 install --no-cache --upgrade pip setuptools
37+
- python3 -m pip install pre-commit
38+
- rm package-lock.json
39+
- dotnet restore "web/web.csproj"
40+
- dotnet --version
41+
script:
42+
- export PATH="$PATH:/root/.dotnet/tools"
43+
- dotnet tool install -g dotnet-format
44+
- npm -g install
45+
# - pre-commit run dotnet-format --all-files
46+
- pre-commit run check-json --all-files
47+
- pre-commit run check-toml --all-files
48+
- pre-commit run check-yaml --all-files
49+
- pre-commit run end-of-file-fixer --all-files
50+
- pre-commit run isort --all-files
51+
- pre-commit run black --all-files
52+
- pre-commit run prettier --all-files
53+
- pre-commit run stylelint --all-files
54+
55+
build_web:
56+
image: mcr.microsoft.com/dotnet/sdk:5.0-alpine
57+
stage: build
58+
except:
59+
- public
60+
script:
61+
- cd "web"
62+
- dotnet publish -r win-x86 --self-contained false -c Release -o out
63+
artifacts:
64+
paths: ["/builds/atlas/web/atlas-dotnet/web/out/"]
65+
66+
pages:
67+
image: python:3.9
68+
stage: publish
69+
before_script:
70+
# need to do installs here cause we don't have a real python package
71+
- python -m pip install tox poetry Sphinx Pygments furo sphinx-copybutton sphinx-inline-tabs myst-parser colorama sphinx-panels git+https://github.com/sphinx-contrib/youtube.git
72+
script:
73+
- tox -e docs
74+
- mv docs/_build/ public/
75+
artifacts:
76+
paths:
77+
- public
78+
only:
79+
- master
80+
81+
deploy_test:
82+
image: alpine:latest
83+
stage: publish
84+
only:
85+
- master
86+
dependencies:
87+
- build_web
88+
needs: [build_web]
89+
before_script:
90+
- apk add --no-cache openssh
91+
- eval $(ssh-agent -s)
92+
- echo "$atlas_ssh_key" | ssh-add -
93+
- mkdir -p ~/.ssh
94+
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
95+
script:
96+
# empty folder
97+
- ssh $atlas_ssh_user@$atlas_server "cd C:\inetpub\wwwroot\atlas-test && DEL /Q . && for /d %x in (C:\inetpub\wwwroot\atlas-test\*) do @rd /s /q \"%x\""
98+
# load new site
99+
- scp -r /builds/atlas/web/atlas-dotnet/web/out/* $atlas_ssh_user@$atlas_server:/c:/inetpub/wwwroot/atlas-test/
100+
101+
102+
public:
103+
stage: publish
104+
image: python:3.9
105+
needs:
106+
- job: build_web
107+
artifacts: false
108+
only:
109+
- master
110+
except:
111+
- public
112+
before_script:
113+
- apt-get install -y git
114+
- 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )'
115+
- eval $(ssh-agent -s)
116+
- mkdir -p ~/.ssh
117+
- ssh-keyscan github.com >> ~/.ssh/known_hosts
118+
- echo "$github_priv_key" | tr -d '\r' | ssh-add -
119+
- git config --global user.email "$GITLAB_USER_EMAIL"
120+
- git config --global user.name "$GITLAB_USER_NAME"
121+
- shopt -s dotglob # include dotfiles in mv
122+
script:
123+
- cd public-publish && python build_public.py
124+
- cd $CI_PROJECT_DIR
125+
- git init
126+
- git remote add origin https://oauth2:${CI_PUSH_TOKEN}@$CI_SERVER_HOST/$CI_PROJECT_PATH.git || git remote set-url origin https://oauth2:${CI_PUSH_TOKEN}@$CI_SERVER_HOST/$CI_PROJECT_PATH.git
127+
- git config user.email "$GITLAB_USER_EMAIL"
128+
- git config user.name "$GITLAB_USER_NAME"
129+
- git add . && git commit -m '[skip ci] public update'
130+
# force to remove history on branch
131+
- export GIT_SSL_NO_VERIFY=1 && git push --force --follow-tags origin HEAD:public
132+
# list changes
133+
- cd ..; rm -rf pub; mkdir pub; cd pub && git init && git remote add origin [email protected]:Riverside-Healthcare/Atlas.git && git pull origin master
134+
- git rm -rf . ; git clean -fxd # remove pub files, except git
135+
- cd $CI_PROJECT_DIR && rm -rf .git
136+
- cd .. && cd pub && mv $CI_PROJECT_DIR/* .
137+
- git status
138+
139+
github:
140+
when: manual
141+
only:
142+
- public # public branch
143+
stage: publish
144+
image: python:3.9
145+
before_script:
146+
- 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )'
147+
- eval $(ssh-agent -s)
148+
- mkdir -p ~/.ssh
149+
- ssh-keyscan github.com >> ~/.ssh/known_hosts
150+
- echo "$github_priv_key" | tr -d '\r' | ssh-add -
151+
- git config --global user.email "$GITLAB_USER_EMAIL"
152+
- git config --global user.name "$GITLAB_USER_NAME"
153+
- shopt -s dotglob # include dotfiles in mv
154+
script:
155+
- cd ..; rm -rf pub; mkdir pub; cd pub && git init && git remote add origin [email protected]:Riverside-Healthcare/Atlas.git && git pull origin master
156+
- git rm -rf . ; git clean -fxd # remove pub files, except git
157+
- cd $CI_PROJECT_DIR && rm -rf .git
158+
- cd .. && cd pub && mv $CI_PROJECT_DIR/* .
159+
- git status
160+
- git add . && git commit -m "$MESSAGE"
161+
- git status
162+
- git push -u origin master

docs/atlas/updates/changelog.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,17 @@
1919
Changelog
2020
*********
2121

22+
Version 2021.04.1
23+
-----------------
24+
25+
- Updated project editor to be able to link multiple terms and reports at a time
26+
- Modified image loader size
27+
- Updated formatting for maintenance entries
28+
- Added hidden flag to data projects to hide from search
29+
- Updated search filters for metrics
30+
- Fixed report type tooltip
31+
- Added report certification title to favorites
32+
2233
Version 2021.03.1
2334
-----------------
2435

gl-code-quality-report.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

readme.rst

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
You should have received a copy of the GNU General Public License
1616
along with this program. If not, see <https://www.gnu.org/licenses/>.
1717

18-
|docs|
18+
|docs| |codacy| |codeql| |climate|
1919

2020
Atlas of Information Management
2121
===============================
@@ -73,7 +73,16 @@ Atlas was created by the Riverside Healthcare Analytics team -
7373

7474

7575

76-
77-
7876
.. |docs| image:: https://img.shields.io/badge/Atlas-Documentation-orange
7977
:target: https://riverside-healthcare.github.io/Atlas/
78+
79+
.. |codacy| image:: https://app.codacy.com/project/badge/Grade/5238d35fb338443fb784b852337fe75f
80+
:target: https://www.codacy.com/gh/Riverside-Healthcare/Atlas/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Riverside-Healthcare/Atlas&amp;utm_campaign=Badge_Grade
81+
82+
.. |codeql| image:: https://github.com/Riverside-Healthcare/extract_management/workflows/CodeQL/badge.svg
83+
:target: https://github.com/Riverside-Healthcare/extract_management/actions/workflows/codeql-analysis.yml
84+
:alt: CodeQL
85+
86+
.. |climate| image:: https://api.codeclimate.com/v1/badges/385f0450d811190e7e43/maintainability
87+
:target: https://codeclimate.com/github/Riverside-Healthcare/Atlas/maintainability
88+
:alt: Maintainability

web/Pages/Index/About.cshtml

Lines changed: 19 additions & 1 deletion
Large diffs are not rendered by default.

web/Pages/Projects/Details/_Details.cshtml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,11 @@
7474

7575
<span class="listDetails-title">Last Updated</span>
7676
<span>@Model.DataProject.UpdateDate</span>
77+
78+
@if (Model.DataProject.Hidden == "Y")
79+
{
80+
<span class="listDetails-title">Hidden?</span>
81+
<span>Yes</span>
82+
}
7783
</div>
7884
}

web/Pages/Projects/Details/_Links.cshtml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
@model Atlas_Web.Pages.Projects.IndexModel
2020

2121

22-
@if (Model.DataProject.RelatedReports.Count() > 0)
22+
@if (ViewBag.RelatedReports.Count > 0)
2323
{
2424
<h3>Linked Reports</h3>
25-
@foreach (var t in Model.DataProject.RelatedReports)
25+
@foreach (var t in ViewBag.RelatedReports)
2626
{
2727
<h4 class="drop" data-toggle="clps" data-target="collapse-report-@(t.Id)">@t.Name
2828
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path d="M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"/></svg>
@@ -40,10 +40,10 @@
4040
}
4141

4242

43-
@if (Model.DataProject.RelatedTerms.Count() > 0)
43+
@if (ViewBag.RelatedTerms.Count > 0)
4444
{
4545
<h3>Terms</h3>
46-
@foreach (var t in Model.DataProject.RelatedTerms)
46+
@foreach (var t in ViewBag.RelatedTerms)
4747
{
4848
<h4 class="drop" data-toggle="clps" data-target="collapse-term-@(t.Id)">@t.Name
4949
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path d="M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"/></svg>
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
@*
2+
Atlas of Information Management business intelligence library and documentation database.
3+
Copyright (C) 2020 Riverside Healthcare, Kankakee, IL
4+
5+
This program is free software: you can redistribute it and/or modify
6+
it under the terms of the GNU General Public License as published by
7+
the Free Software Foundation, either version 3 of the License, or
8+
(at your option) any later version.
9+
10+
This program is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
GNU General Public License for more details.
14+
15+
You should have received a copy of the GNU General Public License
16+
along with this program. If not, see <https://www.gnu.org/licenses/>.
17+
*@
18+
19+
@model Atlas_Web.Pages.Projects.IndexModel
20+
21+
@if(ViewBag.RelatedReports.Count> 0)
22+
{
23+
<h4>Existing Links</h4>
24+
25+
@foreach (var t in ViewBag.RelatedReports)
26+
{
27+
<h4 class="drop" data-toggle="clps" data-target="collapse-reportlink-@(t.Id)">Edit <span class="text-green">@t.Name</span> Link
28+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path d="M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"/></svg>
29+
</h4>
30+
31+
<div id="collapse-reportlink-@(t.Id)" class="clps">
32+
<div class="drop-box">
33+
<h5><a class="drop-link" href="[email protected]">Open This Report</a> / <a class="drop-link" href="/Projects?handler=DeleteLinkedReport&[email protected]" id="project-editor-remove-report-form">Delete This Link</a></h5>
34+
35+
<form action="/Projects?handler=EditLinkedReport" method="post" id="project-editor-edit-report-form">
36+
<input asp-for="DpReportAnnotation.ReportAnnotationId" value="@t.Id" type="hidden" />
37+
<input asp-for="DpReportAnnotation.DataProjectId" value="@t.DataProjectId" type="hidden" />
38+
39+
<div class="listDetails">
40+
<label>Rank</label>
41+
<input asp-for="DpReportAnnotation.Rank" type="number" value="@t.Rank" />
42+
</div>
43+
44+
<h3>Annotation</h3>
45+
<div class="editor" data-inputName="DpReportAnnotation.Annotation" data-inputId="DpReportAnnotation_Annotation"><textarea>@t.Annotation</textarea></div>
46+
47+
<h3><button class="editor-save" type="submit">Save</button></h3>
48+
</form>
49+
</div>
50+
</div>
51+
}
52+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
@*
2+
Atlas of Information Management business intelligence library and documentation database.
3+
Copyright (C) 2020 Riverside Healthcare, Kankakee, IL
4+
5+
This program is free software: you can redistribute it and/or modify
6+
it under the terms of the GNU General Public License as published by
7+
the Free Software Foundation, either version 3 of the License, or
8+
(at your option) any later version.
9+
10+
This program is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
GNU General Public License for more details.
14+
15+
You should have received a copy of the GNU General Public License
16+
along with this program. If not, see <https://www.gnu.org/licenses/>.
17+
*@
18+
19+
@model Atlas_Web.Pages.Projects.IndexModel
20+
21+
@if(ViewBag.RelatedTerms.Count> 0)
22+
{
23+
<h4>Existing Links</h4>
24+
25+
@foreach (var t in ViewBag.RelatedTerms)
26+
{
27+
<h4 class="drop" data-toggle="clps" data-target="collapse-termlink-@(t.Id)">Edit <span class="text-green">@t.Name</span> Link
28+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path d="M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"/></svg>
29+
</h4>
30+
31+
<div id="collapse-termlink-@(t.Id)" class="clps">
32+
<div class="drop-box">
33+
<h5><a class="drop-link" href="[email protected]">Open This Term</a> / <a class="drop-link" href="/Projects?handler=DeleteLinkedTerm&[email protected]" id="project-editor-remove-term-form">Delete This Link</a></h5>
34+
35+
<form action="/Projects?handler=EditLinkedTerm" method="post" id="project-editor-edit-term-form">
36+
<input asp-for="DpTermAnnotation.TermAnnotationId" value="@t.Id" type="hidden" />
37+
<input asp-for="DpTermAnnotation.DataProjectId" value="@t.DataProjectId" type="hidden" />
38+
39+
<div class="listDetails">
40+
<label>Rank</label>
41+
<input asp-for="DpTermAnnotation.Rank" type="number" value="@t.Rank" />
42+
</div>
43+
44+
<h3>Annotation</h3>
45+
<div class="editor" data-inputName="DpTermAnnotation.Annotation" data-inputId="DpTermAnnotation_Annotation"><textarea>@t.Annotation</textarea></div>
46+
47+
<h3><button class="editor-save" type="submit">Save</button></h3>
48+
</form>
49+
</div>
50+
</div>
51+
}
52+
}

web/Pages/Projects/Edit/_Details.cshtml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@
4343

4444
<label>Strategic Importance</label>
4545
<input type="dynamic-dropdown" asp-for="DpDataProject.StrategicImportance" search-area="strategic-importance" method="fullList" visible-value="@Model.DataProject.StrgImport" value="@Model.DataProject.StrgImportId" />
46+
47+
<label>Hide Report?</label>
48+
<div class='form-check' >
49+
<input type="checkbox" id="DoNotPurge" />
50+
<input type="hidden" asp-for="DpDataProject.Hidden" value="@Model.DataProject.Hidden">
51+
</div>
4652
</div>
4753

4854
<h3>Purpose</h3>

0 commit comments

Comments
 (0)