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

Merge release-2.8.patch1 into release-2.8 #11250

Closed
wants to merge 38 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
1924094
Add Last Login to users table
rak-phillip Mar 25, 2024
2bbd451
Add User Disabled In & Deleted In columns
rak-phillip Mar 25, 2024
abdbeef
Add translation strings for new user fields
rak-phillip Mar 25, 2024
5e32d83
Merge pull request #10653 from rak-phillip/feature/10642-last-login
rak-phillip Mar 26, 2024
c4659c8
Sort by raw value instead of string value
rak-phillip Apr 16, 2024
b8e537e
Add new fields to user details getter
rak-phillip Apr 16, 2024
5236f00
Merge pull request #10818 from rak-phillip/bugfix/login-sort
rak-phillip Apr 18, 2024
867bb11
Customize suffix for `userLastLogin`
rak-phillip Apr 19, 2024
4702807
Merge pull request #10817 from rak-phillip/feature/user-detail-dates
rak-phillip Apr 25, 2024
a3cf477
Update user Deleted/Disabled labels
rak-phillip May 8, 2024
f0d38ff
Merge pull request #10977 from rak-phillip/chore/update-text
rak-phillip May 10, 2024
67ee801
Stop displaying relative time when date has lapsed
rak-phillip May 20, 2024
537069b
Update user state display labels
rak-phillip May 20, 2024
8d88e46
Don't display a value for `Disable After` for disabled users
rak-phillip May 20, 2024
eb8372a
Add a suffix to Last Login
rak-phillip May 21, 2024
7ee8452
Update e2e tests to reflect state label changes
rak-phillip May 21, 2024
5b70c1b
Merge pull request #11078 from rak-phillip/bugfix/495-retention-date-…
rak-phillip May 22, 2024
4683645
Add Last Login to users table
rak-phillip Mar 25, 2024
686c096
Add User Disabled In & Deleted In columns
rak-phillip Mar 25, 2024
7f26e61
Add translation strings for new user fields
rak-phillip Mar 25, 2024
7d18953
Sort by raw value instead of string value
rak-phillip Apr 16, 2024
f1e1db9
Add new fields to user details getter
rak-phillip Apr 16, 2024
69095f0
Customize suffix for `userLastLogin`
rak-phillip Apr 19, 2024
5f9a92c
Update user Deleted/Disabled labels
rak-phillip May 8, 2024
eb38a7b
Stop displaying relative time when date has lapsed
rak-phillip May 20, 2024
e6195ad
Update user state display labels
rak-phillip May 20, 2024
f7763e9
Don't display a value for `Disable After` for disabled users
rak-phillip May 20, 2024
adae3f6
Add a suffix to Last Login
rak-phillip May 21, 2024
bb5c656
Update e2e tests to reflect state label changes
rak-phillip May 21, 2024
e5b8c61
Merge pull request #11093 from rak-phillip/chore/rebase/release-2.8.p…
rak-phillip May 22, 2024
6db56da
Merge pull request #11108 from richard-cox/codecov-2.8
richard-cox May 24, 2024
13afc45
Merge pull request #11118 from richard-cox/gh-actions-2.8.patch1
richard-cox May 30, 2024
a385fb7
Changes post cherry-pick
richard-cox May 20, 2024
7630039
WIP
richard-cox May 20, 2024
07c6da0
Remove e2e matrix (requires lots of tag updates)
richard-cox May 20, 2024
ee609e7
remove test triggers
richard-cox May 21, 2024
6cab40a
Fixes after merge
richard-cox May 30, 2024
060017e
Merge pull request #11054 from rancher/richard-cox-2.8.patch1-drone
richard-cox May 30, 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
3 changes: 1 addition & 2 deletions .github/workflows/build-and-upload-branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ name: Build Dashboard (Branch)
on:
push:
branches:
- 'release-2.8*'
- '*-dev'
- release-2.8.patch1

jobs:
build-validation:
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/build-extension-catalog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,6 @@ jobs:
with:
version: v3.8.0

- name: Setup yq
uses: chrisdickinson/[email protected]
with:
yq-version: v4.34.2

- name: Setup Nodejs and npm
uses: actions/setup-node@v3
with:
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/build-extension-charts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ jobs:
with:
version: v3.8.0

- name: Setup yq
uses: chrisdickinson/[email protected]
with:
yq-version: v4.34.2

- name: Setup Nodejs and npm
uses: actions/setup-node@v3
with:
Expand Down
42 changes: 26 additions & 16 deletions .github/workflows/docusaurus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:
branches:
- master
jobs:
deploy:
name: Publish Docusaurus
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -23,19 +23,29 @@ jobs:
- name: Build website
run: cd docusaurus/ && yarn build

# Popular action to deploy to GitHub Pages:
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
- name: Publish Docusaurus
uses: peaceiris/actions-gh-pages@v3
- name: Upload artifact
if: ${{ github.event_name == 'push' && github.repository_owner == 'rancher' }}
uses: actions/upload-pages-artifact@v3
with:
deploy_key: ${{ secrets.GH_PAGES_DEPLOY_KEY }}
# Build output to publish to the `gh-pages` branch:
publish_dir: ./docusaurus/build
# Remove .gitignore from excludes
exclude_assets: ''
# The following lines assign commit authorship to the official
# GH-Actions bot for deploys to `gh-pages` branch:
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com
path: ./docusaurus/build
retention-days: 10
compression-level: 9

# Seperate the deploy job to isolate write permissions
deploy:
name: Publish
if: ${{ github.event_name == 'push' && github.repository_owner == 'rancher' }}
runs-on: ubuntu-latest
needs: build

# This is required to avoid https://github.com/actions/deploy-pages/issues/271
environment:
name: github-pages

permissions:
pages: write
id-token: write

steps:
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
17 changes: 0 additions & 17 deletions .github/workflows/notify-docs-team.yml

This file was deleted.

31 changes: 3 additions & 28 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: Tests
on:
push:
branches:
- 'release-2.8*'
- release-2.8.patch1
pull_request:
branches:
- 'release-2.8*'
- release-2.8.patch1
workflow_dispatch:
inputs:
environment:
Expand Down Expand Up @@ -100,6 +100,7 @@ jobs:
with:
name: ${{ env.E2E_BUILD_DIST_NAME }}
path: ${{ env.E2E_BUILD_DIST_DIR }}

- name: Download e2e build ember
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -175,32 +176,6 @@ jobs:
- name: Run tests
uses: ./.github/actions/lint

coverage:
runs-on: ubuntu-latest
needs:
- unit-test
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1

- uses: actions/setup-node@v3
with:
node-version: '14.x'

- name: Download Coverage Artifacts
uses: actions/download-artifact@v3
with:
name: ${{github.run_number}}-${{github.run_attempt}}-coverage

- name: Upload unit test coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unit
files: ./coverage/coverage-unit.json
fail_ci_if_error: false

check-e2e-tags:
runs-on: ubuntu-latest
steps:
Expand Down
12 changes: 6 additions & 6 deletions cypress/e2e/tests/pages/users-and-auth/users.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,11 @@ describe('Users', { tags: ['@usersAndAuths', '@adminUser'] }, () => {
// Deactivate user and check state is Inactive
usersPo.goTo();
usersPo.list().clickRowActionMenuItem(standardUsername, 'Deactivate');
usersPo.list().details(standardUsername, 1).should('include.text', 'Inactive');
usersPo.list().details(standardUsername, 1).should('include.text', 'Disabled');

// Activate user and check state is Active
usersPo.list().clickRowActionMenuItem(standardUsername, 'Activate');
usersPo.list().details(standardUsername, 1).should('include.text', 'Active');
usersPo.list().details(standardUsername, 1).should('include.text', 'Enabled');
});

it('can Refresh Group Memberships', () => {
Expand Down Expand Up @@ -191,14 +191,14 @@ describe('Users', { tags: ['@usersAndAuths', '@adminUser'] }, () => {
usersPo.list().selectAll().set();
usersPo.list().deactivate().click();
cy.wait('@updateUsers');
cy.contains('Inactive');
usersPo.list().details('admin', 1).should('include.text', 'Active');
usersPo.list().details(userBaseUsername, 1).should('include.text', 'Inactive');
cy.contains('Disabled');
usersPo.list().details('admin', 1).should('include.text', 'Enabled');
usersPo.list().details(userBaseUsername, 1).should('include.text', 'Disabled');

// Activate user and check state is Active
usersPo.list().activate().click();
cy.wait('@updateUsers');
usersPo.list().details(userBaseUsername, 1).should('include.text', 'Active');
usersPo.list().details(userBaseUsername, 1).should('include.text', 'Enabled');
});

it('can Download YAML', () => {
Expand Down
12 changes: 10 additions & 2 deletions shell/assets/translations/en-us.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ suffix:
ib: iB
mib: MiB
gb: GB
ago: ago
revisions: |-
{count, plural,
=1 { Revision }
Expand Down Expand Up @@ -1903,8 +1904,8 @@ cluster:
toolTip: "This can be either a fixed number of nodes (e.g. 1) at a time or a percentage (e.g. 10%)"
drain:
label: Drain Nodes
toolTip: Draining preemptively removes the pods on each node so there are no running workloads on the nodes being upgraded. Upgrading without draining is faster and causes less shuffling around, but pods may still be restarted depending on the upgrade being performed.
deleteEmptyDir:
toolTip: Draining preemptively removes the pods on each node so there are no running workloads on the nodes being upgraded. Upgrading without draining is faster and causes less shuffling around, but pods may still be restarted depending on the upgrade being performed.
deleteEmptyDir:
warning: "By default, pods using emptyDir volumes will be deleted on upgrade. Operations reliant on emptyDir volumes persisting through the pod's lifecycle may be impacted."
label: Delete pods using emptyDir volumes
tooltip: emptyDir volumes are often used for ephemeral data, but the data will be permanently deleted. Draining will fail if this is not set and there are pods using emptyDir.
Expand Down Expand Up @@ -5568,6 +5569,9 @@ tableHeaders:
users: Users
userDisplayName: Display Name
userId: ID
userDeletedIn: Delete After
userDisabledIn: Disable After
userLastLogin: Last Login
userStatus: Status
username: Local Username
value: Value
Expand All @@ -5588,6 +5592,10 @@ target:
placeholder: Select a version

user:
state:
active: 'Enabled'
inactive: 'Disabled'
unknown: 'Unknown'
detail:
username: Username
globalPermissions:
Expand Down
16 changes: 16 additions & 0 deletions shell/components/formatter/LiveDate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ export default {
showTooltip: {
type: Boolean,
default: true
},

/**
* Determines if the live date should behave like a countdown by comparing
* the provided value and the current date. When the countdown reaches 0, a
* "-" is rendered.
*/
isCountdown: {
type: Boolean,
default: false,
}
},

Expand Down Expand Up @@ -104,6 +114,12 @@ export default {
return 300;
}

if (this.isCountdown && now.valueOf() > this.dayValue?.valueOf()) {
this.label = '-';

return 300;
}

const diff = diffFrom(this.dayValue, now);
const prefix = (diff.diff < 0 || !this.addPrefix ? '' : '-');

Expand Down
5 changes: 4 additions & 1 deletion shell/config/product/explorer.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
STATE, NAME as NAME_COL, NAMESPACE as NAMESPACE_COL, AGE, KEYS,
INGRESS_DEFAULT_BACKEND, INGRESS_TARGET, INGRESS_CLASS,
SPEC_TYPE, TARGET_PORT, SELECTOR, NODE as NODE_COL, TYPE, WORKLOAD_IMAGES, POD_IMAGES,
USER_ID, USERNAME, USER_DISPLAY_NAME, USER_PROVIDER, WORKLOAD_ENDPOINTS, STORAGE_CLASS_DEFAULT,
USER_ID, USERNAME, USER_DISPLAY_NAME, USER_PROVIDER, USER_LAST_LOGIN, USER_DISABLED_IN, USER_DELETED_IN, WORKLOAD_ENDPOINTS, STORAGE_CLASS_DEFAULT,
STORAGE_CLASS_PROVISIONER, PERSISTENT_VOLUME_SOURCE,
HPA_REFERENCE, MIN_REPLICA, MAX_REPLICA, CURRENT_REPLICA,
ACCESS_KEY, DESCRIPTION, EXPIRES, EXPIRY_STATE, SUB_TYPE, AGE_NORMAN, SCOPE_NORMAN, PERSISTENT_VOLUME_CLAIM, RECLAIM_POLICY, PV_REASON, WORKLOAD_HEALTH_SCALE, POD_RESTARTS,
Expand Down Expand Up @@ -259,6 +259,9 @@ export function init(store) {
USER_DISPLAY_NAME,
USER_PROVIDER,
USERNAME,
USER_LAST_LOGIN,
USER_DISABLED_IN,
USER_DELETED_IN,
AGE
]);

Expand Down
27 changes: 27 additions & 0 deletions shell/config/table-headers.js
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,33 @@ export const USER_PROVIDER = {
sort: 'providerDisplay',
};

export const USER_LAST_LOGIN = {
name: 'user-last-login',
labelKey: 'tableHeaders.userLastLogin',
value: 'userLastLogin',
formatter: 'LiveDate',
formatterOpts: { addSuffix: true },
sort: 'userLastLogin',
};

export const USER_DISABLED_IN = {
name: 'user-disabled-in',
labelKey: 'tableHeaders.userDisabledIn',
value: 'userDisabledInDisplay',
formatter: 'LiveDate',
formatterOpts: { isCountdown: true },
sort: 'userDisabledIn',
};

export const USER_DELETED_IN = {
name: 'user-deleted-in',
labelKey: 'tableHeaders.userDeletedIn',
value: 'userDeletedIn',
formatter: 'LiveDate',
formatterOpts: { isCountdown: true },
sort: 'userDeletedIn',
};

export const USER_ID = {
name: 'user-id',
labelKey: 'tableHeaders.userId',
Expand Down
Loading
Loading