Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump pf #3

Closed
wants to merge 53 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
629cb61
:seedling: Refactor patternfly, i18n, and dayjs initialization (#1665)
sjd78 Jan 18, 2024
17e7eda
:bug: Handle wrap of long file paths (#1655)
ibolton336 Jan 18, 2024
cf27f14
:bug: fix typo (#1663)
abrugaro Jan 19, 2024
8f83736
:bug: Broken search string when navigating from deps page (#1662)
ibolton336 Jan 19, 2024
3cf032f
:bug: Exclude non-required questionnaires in assessed calculation (#1…
ibolton336 Jan 26, 2024
046ccf6
:seedling: reconcile github issue(-comment)s (#1679)
djzager Feb 9, 2024
6217116
:bug: Add excludeFor example for questionnaire (#1684)
ibolton336 Feb 14, 2024
9be2ac1
:bug: Fix wave subtable pagination (#1689)
ibolton336 Feb 16, 2024
8a630d9
:bug: Capitalize first letter of source names (#1686)
ibolton336 Feb 16, 2024
ea6e859
:sparkles: Improve documentation for source analysis mode (#1654)
ibolton336 Feb 19, 2024
9b8a0ff
:bug: Adding tooltip to PencilAltIcon (#1688)
mguetta1 Feb 19, 2024
423dbdd
:bug: Remove unneccessary metadata (#1683)
ibolton336 Feb 21, 2024
3de8f6b
:ghost: Convert single/multi filter toolbar controls to use pf5 selec…
ibolton336 Feb 21, 2024
388a442
:bug: Extend notification delay & fix broken delay customization (#1690)
ibolton336 Feb 21, 2024
ce3cab5
:bug: application can only have one review (#1693)
djzager Feb 22, 2024
4cdd553
:sparkles: Add app name filter to archetypes page & drawer link (#1673)
ibolton336 Feb 22, 2024
a302446
:bug: Show disabled tooltip for export when no apps available for exp…
ibolton336 Feb 22, 2024
81ad682
:bug: Reuse toggle component for apps table (#1692)
ibolton336 Feb 22, 2024
228abc4
:bug: Do not show the code viewer when no code snippet available (#1685)
ibolton336 Feb 26, 2024
d07b30d
:sparkles: Add url filter to drawer results for dependency apps (#1698)
ibolton336 Feb 26, 2024
2febd18
:bug: Add parser for custom rule file label title in manual upload fl…
ibolton336 Feb 27, 2024
59ad200
:bug: Handle case when application.archetypes is passed but null (#1707)
ibolton336 Feb 28, 2024
6040a5d
:bug: Add tooltip for migration wave delete option in app table (#1705)
ibolton336 Feb 28, 2024
5a30824
:bug: Address style issues on assessment summary / questionnaire view…
ibolton336 Feb 28, 2024
e9304fa
:bug: Optimize assessment fetching (#1716)
ibolton336 Feb 28, 2024
d346801
:bug: Load filter values for multiselect before input (#1713)
ibolton336 Feb 29, 2024
ccb8dfd
:bug: Adjust risk values displayed based on questionnaire filter (#1711)
ibolton336 Feb 29, 2024
cbd66f9
:sparkles: Reduce assessment calls in effort to reduce network overhe…
ibolton336 Feb 29, 2024
d77a79f
:bug: Adds spinner for isLoading prop in asessment status component (…
ibolton336 Mar 4, 2024
95b6ebc
:sparkles: Optimize polling to only occur when a task is active (#1715)
ibolton336 Mar 4, 2024
55fa631
:bug: Consider only inherited archetypes when computing status (#1733)
ibolton336 Mar 4, 2024
8870bf6
:seedling: Setup branding to be configurable during the build (#1664)
sjd78 Mar 5, 2024
4cdf7ca
:seedling: Swap to @rollup/wasm-node for multiarch builds (#1739)
sjd78 Mar 5, 2024
6bbca51
:bug: Remove unnecessary query invalidations for reviews (#1735)
ibolton336 Mar 5, 2024
ddcbccf
:seedling: Downgrade to rollup v3 for multiarch builds (#1742)
sjd78 Mar 5, 2024
8ec8083
:bug: Count custom rules imported from yaml file (#1748)
rszwajko Mar 6, 2024
3e3d690
:seedling: Increase ulimit nofiles on image-build.yaml (#1746)
sjd78 Mar 6, 2024
ad90cd5
:sparkles: Add deleteChipGroup handler (#1750)
rszwajko Mar 11, 2024
6b805b5
:book: Update developer documentation (#1726)
rszwajko Mar 11, 2024
333cc04
:seedling: Refactor `ReviewFields` (#1752)
sjd78 Mar 11, 2024
26955b1
:bug: Changed column name to 'Total Effort' (#1687)
mguetta1 Mar 11, 2024
c2ef03c
:seedling: use gh app for cherry pick (#1759)
djzager Mar 12, 2024
63f8501
:seedling: Use placeholder styling for 'No results' option (#1775)
rszwajko Mar 14, 2024
36ca738
:seedling: Use multi select filter for application names (#1771)
rszwajko Mar 14, 2024
161fba8
:sparkles: Add assessment/review status to archetype table (#1755)
rszwajko Mar 15, 2024
94a04a3
:seedling: Refactor CI github actions, Dockerfile (#1780)
sjd78 Mar 18, 2024
984fbca
:bug: sso-actions-toggle: Adding onBlur event (#1766)
mguetta1 Mar 19, 2024
ca0b8a4
:seedling: Upgrade to Patternfly 5.2
sjd78 Feb 8, 2024
6ef12e2
Bump from 5.2.0 to 5.2.1
sjd78 Mar 4, 2024
37f3f19
Bump @patternfly/react-charts to 7.2.2
sjd78 Mar 6, 2024
5fb8283
Bump packages to 5.2.2
sjd78 Mar 13, 2024
7f63636
Bump to most current z-stream versions
sjd78 Mar 19, 2024
55a739e
Convert from ^ versions to pinned versions
sjd78 Mar 19, 2024
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
78 changes: 0 additions & 78 deletions .github/workflows/ci-actions.yml

This file was deleted.

54 changes: 54 additions & 0 deletions .github/workflows/ci-global.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: CI (global konveyor CI)

on:
push:
branches:
- "main"
pull_request:
branches:
- "main"

###
# The global CI settings need to be adjusted for the `release-*`` branches such that:
# 1. The operator uses the correct `:release-*` images
# 2. The `*-tests_ref` use the correct branches
#
# on:
# push:
# branches:
# - 'main'
# - 'release-*'
# pull_request:
# branches:
# - 'main'
# - 'release-*'
##

concurrency:
group: ci-global-${{ github.ref }}
cancel-in-progress: true

jobs:
build-and-upload-for-global-ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: save tackle2-ui image
run: |
docker build . -t quay.io/konveyor/tackle2-ui:latest
docker save -o /tmp/tackle2-ui.tar quay.io/konveyor/tackle2-ui:latest

- name: Upload tackle2-ui image as artifact
uses: actions/upload-artifact@v3
with:
name: tackle2-ui
path: /tmp/tackle2-ui.tar
retention-days: 1

run-global-ci:
needs: build-and-upload-for-global-ci
uses: konveyor/ci/.github/workflows/global-ci.yml@main
with:
component_name: tackle2-ui
run_api_tests: false
55 changes: 55 additions & 0 deletions .github/workflows/ci-repo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: CI (repo level)

on:
push:
branches:
- "main"
- "release-*"
pull_request:
branches:
- "main"
- "release-*"

env:
# Note: This should match the node version(s) used in the base Dockerfile
node-version: "18"

jobs:
unit-test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Use Node.js (version "${{ env.node-version }}")
uses: actions/setup-node@v4
with:
node-version: ${{ env.node-version }}
cache: "npm"

- name: Verify package-lock.json
run: ./scripts/verify_lock.mjs

- name: Install
run: npm clean-install --ignore-scripts

- name: Lint sources
run: npm run lint

- name: Build
run: npm run build

- name: Test
run: npm run test -- --coverage --watchAll=false

- name: Upload to codecov (client)
uses: codecov/codecov-action@v4
with:
flags: client
directory: ./*/coverage

- name: Upload to codecov (server)
uses: codecov/codecov-action@v4
with:
flags: server
directory: ./*/coverage
1 change: 1 addition & 0 deletions .github/workflows/image-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
image_name: "tackle2-ui"
containerfile: "./Dockerfile"
architectures: '[ "amd64", "arm64", "ppc64le", "s390x" ]'
extra-args: "--ulimit nofile=4096:4096"
secrets:
registry_username: ${{ secrets.QUAY_PUBLISH_ROBOT }}
registry_password: ${{ secrets.QUAY_PUBLISH_TOKEN }}
30 changes: 30 additions & 0 deletions .github/workflows/issues.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Reconcile GitHub Issue (Comment)

on:
issues:
types:
- opened
- edited
- closed
- reopened
- labeled
- unlabeled
issue_comment:
types:
- created
- edited

concurrency:
group: reconcile-issue-${{ github.event.issue.number }}-${{ github.event_name }}
cancel-in-progress: true

jobs:
reconcile-issue:
if: github.event_name == 'issues' || github.event_name == 'pull_request'
secrets: inherit
uses: konveyor/release-tools/.github/workflows/reconcile-issue.yaml@main

reconcile-issue-comment:
if: github.event_name == 'issue_comment'
secrets: inherit
uses: konveyor/release-tools/.github/workflows/reconcile-issue-comment.yaml@main
1 change: 1 addition & 0 deletions .github/workflows/pr-closed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ jobs:
pull-requests: write
contents: write
if: github.event.pull_request.merged == true
secrets: inherit
uses: konveyor/release-tools/.github/workflows/cherry-pick.yml@main
151 changes: 151 additions & 0 deletions BRANDING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
# Branding

The UI supports static branding at build time. Dynamically switching brands is not
possible with the current implementation.

## Summary

Each of the project modules need to do some branding enablement.

- `@konveyor-ui/common` pulls in the branding assets and packages the configuration,
strings and assets within the common package. The other modules pull branding
from the common module.

- `@konveyor-ui/client` uses branding from the common package:

- The location of `favicon.ico`, `manifest.json` and any other branding
assets that may be referenced in the `brandingStrings` are sourced from the
common package.

- The `brandingStrings` are used by the dev-server runtime, to fill out the
`index.html` template.

- The about modal and application masthead components use the branding strings
provided by the common module to display brand appropriate logos, titles and
about information. Since the common module provides all the information, it
is packaged directly into the app at build time.

- `@konveyor-ui/server` uses the `brandingStrings` from the common package to fill
out the `index.html` template.

## Providing alternate branding

To provide an alternate branding to the build, specify the path to the branding assets
with the `BRANDING` environment variable. Relative paths in `BRANDING` are computed
from the project source root.

Each brand requires the presence of at least the following files:

- `strings.json`
- `favicon.ico`
- `manifest.json`

With a file path of `/alt/custom-branding`, a build that uses an alternate branding
is run as:

```sh
> BRANDING=/alt/custom-branding npm run build
```

The dev server can also be run this way. Since file watching of the branding assets
is not implemented in the common module's build watch mode, it may be necessary to
manually build the common module before running the dev server. When working on a
brand, it is useful to run the dev server like this:

```sh
> export BRANDING=/alt/custom-branding
> npm run build -w common
> npm run start:dev
> unset BRANDING # when you don't want to use the custom branding path anymore
```

### File details

#### strings.json

The expected shape of `strings.json` is defined in [branding.ts](./common/src/branding.ts).

The default version of the file is [branding/strings.json](./branding/strings.json).

A minimal viable example of the file is:

```json
{
"application": {
"title": "Konveyor"
},
"about": {
"displayName": "Konveyor"
},
"masthead": {}
}
```

At build time, the json file is processed as an [ejs](https://ejs.co/) template. The
variable `brandingRoot` is provided as the relative root of the branding
assets within the build of the common module. Consider the location of `strings.json`
in your branding directory as the base `brandingRoot` when creating a new brand.

For example, to properly reference a logo within this branding structure:

```
special-brand/
images/
masthead-logo.svg
about-logo.svg
strings.json
```

Use a url string like this:

```json
{
"about": {
"imageSrc": "<%= brandingRoot %>/images/about-logo.svg"
}
}
```

and in the output of `BRANDING=special-brand npm run build -w common`, the `imageSrc`
will be `branding/images/about-logo.svg` with all of the files in `special-branding/*`
copied to and available to the client and server modules from
`@konveyor-ui/common/branding/*`.

#### favicon.ico

A standard favorite icon file `favicon.ico` is required to be in the same directory
as `strings.json`

#### manifest.json

A standard [web app manifest](https://developer.mozilla.org/en-US/docs/Web/Manifest)
file `manifest.json` is required to be in the same directory as `strings.json`.

## Technical details

All branding strings and assets are pulled in to the common module. The client and
server modules access the branding from the common module build.

The `common` module relies on rollup packaging to embed all of the brand for easy
use. The use of branding strings in `client` and `server` modules is straight forward.
Pulling in `strings.json` and providing the base path to the brand assets is a
more complicated.

The `common` module provides the `brandingAssetPath()` function to let the build time
code find the root path to all brand assets. Webpack configuration files use this
function to source the favicon.ico, manifest.json and other brand assets to be copied
to the application bundle.

The `brandingStrings` is typed and sourced from a json file. To pass typescript builds,
a stub json file needs to be available at transpile time. By using a typescript paths
of `@branding/strings.json`, the stub json is found at transpile time. The generated
javascript will still import the path alias. The
[virtual rollup plugin](https://github.com/rollup/plugins/tree/master/packages/virtual)
further transform the javascript output by replacing the `@branding/strings.json` import
with a dynamically built module containing the contents of the brand's `strings.json`.
The brand json becomes a virtual module embedded in the common module.

A build for a custom brand will fail (1) if the expected files cannot be read, or (2)
if `strings.json` is not a valid JSON file. **Note:** The context of `stings.json` is
not currently validated. If something is missing or a url is malformed, it will only
be visible as a runtime error.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM registry.access.redhat.com/ubi9/nodejs-18:latest as builder

USER 1001
COPY --chown=1001 . .
RUN npm clean-install && npm run build && npm run dist
RUN npm clean-install --ignore-scripts && npm run build && npm run dist

# Runner image
FROM registry.access.redhat.com/ubi9/nodejs-18-minimal:latest
Expand Down
Loading
Loading