Skip to content

Commit 587dec6

Browse files
committed
[PLAT-12059][PLAT-12060][PLAT-12061][PLAT-12062][PLAT-12250]: Create new releases page with mock data
Summary: Created new releases page with mock data 1. Added a runtime config for new releases page - 'yb.ui.feature_flags.releases_redesign'. This is under BETA flag. 2. Added a new route for this releases which is under /releases_list Created the following components 1. Releases List page which displays the list of releases. Actions possible are a. Add a new release b. Edit existing architecture c. Disable Release d. Delete Release e. Edit Release tag Functionalities in this page includes 1. Search versions by version number 2. Display only ACTIVE releases 3. Refresh to view the latest releases 4. Double clicking on each row will open a side panel. 2. Release Details page which opens a side panel on double click of each row. This will show existing architectures,corresponding release metadata, actions to disble/delete release add new architecture. User will be able to view the universes being used the release. 3. Created following modal dialogs a. Delete Release b. Disable Release c. Edit Release Tag d. Edit existing architecture e. Add a new release 4. Add a new release modal and Edit architecture modal will allow customer to import release via the following manner a. URL b. File Upload 5. Wrote a new component for File Upload Test Plan: Please refer to FIGMA link and API document links in the comments below **Things are subjected to change when I work on API integration story and all of the above is written based on mock data (based on expected API response) Note: There are lots of TODO sections that I have written, these will act as notes to ensure I know what API to plugin once the APIs are ready. Note: There is a followup story to develop with respect to API integration which will be started in 2 weeks** Please refer to the video {F142592} Reviewers: jmak, dshubin Reviewed By: jmak Subscribers: jmak, yugaware Differential Revision: https://phorge.dev.yugabyte.com/D31699
1 parent 920bb31 commit 587dec6

File tree

34 files changed

+3238
-14
lines changed

34 files changed

+3238
-14
lines changed

managed/src/main/java/com/yugabyte/yw/common/config/GlobalConfKeys.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,6 +1134,14 @@ public class GlobalConfKeys extends RuntimeConfigKeysModule {
11341134
"Allows user to enter postgres hba rules and ident map rules in multiple rows",
11351135
ConfDataType.BooleanType,
11361136
ImmutableList.of(ConfKeyTags.PUBLIC));
1137+
public static final ConfKeyInfo<Boolean> releasesRedesign =
1138+
new ConfKeyInfo<>(
1139+
"yb.ui.feature_flags.releases_redesign",
1140+
ScopeType.GLOBAL,
1141+
"Enable the option to view new releases page",
1142+
"Enable the option to view new releases page",
1143+
ConfDataType.BooleanType,
1144+
ImmutableList.of(ConfKeyTags.BETA));
11371145
public static final ConfKeyInfo<Boolean> haDisableCertValidation =
11381146
new ConfKeyInfo<>(
11391147
"yb.ha.ws.ssl.loose.acceptAnyCertificate",

managed/src/main/resources/reference.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ yb {
171171
edit_in_use_provider=false
172172
disaster_recovery=false
173173
gflag_multiline_conf=true
174+
releases_redesign=false
174175
}
175176

176177
xcluster {

managed/ui/src/components/advanced/ConfigData.tsx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ import { RunTimeConfigData, RunTimeConfigScope } from '../../redesign/utils/dtos
1212
import { getPromiseState } from '../../utils/PromiseUtils';
1313
import { isNonEmptyArray } from '../../utils/ObjectUtils';
1414

15-
import { RbacValidator, hasNecessaryPerm } from '../../redesign/features/rbac/common/RbacApiPermValidator';
15+
import {
16+
RbacValidator,
17+
hasNecessaryPerm
18+
} from '../../redesign/features/rbac/common/RbacApiPermValidator';
1619

1720
import { ApiPermissionMap } from '../../redesign/features/rbac/ApiAndUserPermMapping';
1821
import { Action } from '../../redesign/features/rbac';
@@ -155,9 +158,9 @@ export const ConfigData: FC<GlobalConfigProps> = ({
155158
>
156159
<RbacValidator
157160
customValidateFunction={(userPerm) =>
158-
scope === RunTimeConfigScope.GLOBAL ?
159-
find(userPerm, { actions: [Action.SUPER_ADMIN_ACTIONS] }) !== undefined :
160-
hasNecessaryPerm(ApiPermissionMap.MODIFY_RUNTIME_CONFIG_BY_KEY)
161+
scope === RunTimeConfigScope.GLOBAL
162+
? find(userPerm, { actions: [Action.SUPER_ADMIN_ACTIONS] }) !== undefined
163+
: hasNecessaryPerm(ApiPermissionMap.MODIFY_RUNTIME_CONFIG_BY_KEY)
161164
}
162165
isControl
163166
>
@@ -172,9 +175,9 @@ export const ConfigData: FC<GlobalConfigProps> = ({
172175
{!row.isConfigInherited && (
173176
<RbacValidator
174177
customValidateFunction={(userPerm) =>
175-
scope === RunTimeConfigScope.GLOBAL ?
176-
find(userPerm, { actions: [Action.SUPER_ADMIN_ACTIONS] }) !== undefined :
177-
hasNecessaryPerm(ApiPermissionMap.MODIFY_RUNTIME_CONFIG_BY_KEY)
178+
scope === RunTimeConfigScope.GLOBAL
179+
? find(userPerm, { actions: [Action.SUPER_ADMIN_ACTIONS] }) !== undefined
180+
: hasNecessaryPerm(ApiPermissionMap.MODIFY_RUNTIME_CONFIG_BY_KEY)
178181
}
179182
isControl
180183
overrideStyle={{ display: 'block' }}

managed/ui/src/components/common/forms/fields/YBSearchInput.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
padding: 0px 0px 0px 10px;
99
border-radius: 8px;
1010
border: 1px solid colors.$YB_BG_WHITE_4;
11-
height: 40px;
11+
height: 42px;
1212
i {
1313
color: #808080;
1414
}

managed/ui/src/components/releases/ReleaseList/ReleaseList.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ import { YBLoadingCircleIcon } from '../../../components/common/indicators';
1111
import { getPromiseState } from '../../../utils/PromiseUtils';
1212
import { isAvailable, showOrRedirect } from '../../../utils/LayoutUtils';
1313

14-
import { RbacValidator, hasNecessaryPerm } from '../../../redesign/features/rbac/common/RbacApiPermValidator';
14+
import {
15+
RbacValidator,
16+
hasNecessaryPerm
17+
} from '../../../redesign/features/rbac/common/RbacApiPermValidator';
1518
import { isRbacEnabled } from '../../../redesign/features/rbac/common/RbacUtils';
1619
import { ApiPermissionMap } from '../../../redesign/features/rbac/ApiAndUserPermMapping';
1720
import './ReleaseList.scss';
@@ -209,7 +212,7 @@ export default class ReleaseList extends Component {
209212
accessRequiredOn={ApiPermissionMap.CREATE_RELEASE}
210213
isControl
211214
overrideStyle={{
212-
float: 'right',
215+
float: 'right'
213216
}}
214217
>
215218
<TableAction
@@ -218,7 +221,10 @@ export default class ReleaseList extends Component {
218221
actionType="import-release"
219222
isMenuItem={false}
220223
onSubmit={self.onModalSubmit}
221-
disabled={!isAvailable(currentCustomer.data.features, 'universes.actions') || !hasNecessaryPerm(ApiPermissionMap.CREATE_RELEASE)}
224+
disabled={
225+
!isAvailable(currentCustomer.data.features, 'universes.actions') ||
226+
!hasNecessaryPerm(ApiPermissionMap.CREATE_RELEASE)
227+
}
222228
/>
223229
</RbacValidator>
224230
</div>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Created on January 14th 2024
3+
*
4+
* Copyright 2023 YugaByte, Inc. and Contributors
5+
*/
6+
7+
import { lazy, Suspense } from 'react';
8+
import { YBLoadingCircleIcon } from '../components/common/indicators';
9+
10+
const ReleaseListComponent = lazy(() =>
11+
import('../redesign/features/releases/components/ReleaseList').then(({ ReleaseList }) => ({
12+
default: ReleaseList
13+
}))
14+
);
15+
16+
export const ReleaseList = () => {
17+
return (
18+
<Suspense fallback={YBLoadingCircleIcon}>
19+
<ReleaseListComponent />
20+
</Suspense>
21+
);
22+
};
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)