Skip to content

Commit f755532

Browse files
committed
Menu Adjustments: Watch to Monitoring. Tiers to Settings. Notifications to Settings.
Signed-off-by: Daniel Valdivia <[email protected]>
1 parent 41b3464 commit f755532

File tree

29 files changed

+510
-279
lines changed

29 files changed

+510
-279
lines changed

.github/workflows/permissions.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "Front-End Permission Tests"
1+
name: "UI"
22

33
on:
44
pull_request:
@@ -10,7 +10,7 @@ on:
1010

1111
jobs:
1212
permissions:
13-
name: Front-End Permission Tests
13+
name: Permissions Tests
1414
runs-on: ${{ matrix.os }}
1515
strategy:
1616
matrix:

portal-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"redux-thunk": "^2.3.0",
5959
"styled-components": "^5.3.1",
6060
"superagent": "^6.1.0",
61-
"testcafe": "^1.17.1",
61+
"testcafe": "^1.18.2",
6262
"typeface-roboto": "^0.0.75",
6363
"use-debounce": "^5.0.1",
6464
"websocket": "^1.0.31"

portal-ui/src/common/BackLink.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const styles = (theme: Theme) =>
2727
display: "flex",
2828
alignItems: "center",
2929
textDecoration: "none",
30-
maxWidth: "250px",
30+
maxWidth: "300px",
3131
padding: "2rem 2rem 0rem 2rem",
3232
color: theme.palette.primary.light,
3333
fontSize: ".8rem",

portal-ui/src/common/SecureComponent/permissions.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ export const IAM_PAGES = {
161161
METRICS: "/tools/metrics",
162162
DASHBOARD: "/tools/dashboard",
163163
TOOLS_HEAL: "/tools/heal",
164+
TOOLS_WATCH: "/tools/watch",
164165
/* Health */
165166
HEALTH: "/health",
166167

@@ -171,23 +172,22 @@ export const IAM_PAGES = {
171172
TOOLS_SPEEDTEST: "/support/speedtest",
172173
CALL_HOME: "/support/call-home",
173174
PROFILE: "/support/profile",
174-
TOOLS_WATCH: "/support/inspect",
175175

176176
/** License **/
177177
LICENSE: "/license",
178178
/* Settings **/
179-
SETTINGS: "/settings",
180-
SETTINGS_VIEW: "/settings/:option",
179+
SETTINGS: "/settings/configurations",
180+
SETTINGS_VIEW: "/settings/configurations/:option",
181181
/* Documentation **/
182182
DOCUMENTATION: "/documentation",
183183
/* TBD ? */
184-
NOTIFICATIONS_ENDPOINTS: "/lambda/notification-endpoints",
185-
NOTIFICATIONS_ENDPOINTS_ADD: "/lambda/notification-endpoints/add",
184+
NOTIFICATIONS_ENDPOINTS: "/settings/notification-endpoints",
185+
NOTIFICATIONS_ENDPOINTS_ADD: "/settings/notification-endpoints/add",
186186
NOTIFICATIONS_ENDPOINTS_ADD_SERVICE:
187-
"/lambda/notification-endpoints/add/:service",
188-
TIERS: "/tiers",
189-
TIERS_ADD: "/tiers/add",
190-
TIERS_ADD_SERVICE: "/tiers/add/:service",
187+
"/settings/notification-endpoints/add/:service",
188+
TIERS: "/settings/tiers",
189+
TIERS_ADD: "/settings/tiers/add",
190+
TIERS_ADD_SERVICE: "/settings/tiers/add/:service",
191191

192192
/* Operator */
193193
TENANTS: "/tenants",

portal-ui/src/screens/Console/Buckets/ListBuckets/BucketListItem.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import {
3535
} from "../../../../common/SecureComponent/permissions";
3636
import SecureComponent from "../../../../common/SecureComponent/SecureComponent";
3737
import RBIconButton from "../BucketDetails/SummaryItems/RBIconButton";
38+
import clsx from "clsx";
3839

3940
const styles = (theme: Theme) =>
4041
createStyles({
@@ -195,7 +196,7 @@ const BucketListItem = ({
195196
};
196197

197198
return (
198-
<Grid container className={classes.root}>
199+
<Grid container className={clsx(classes.root, "bucket-item")}>
199200
<Grid item xs={12}>
200201
<Grid container justifyContent={"space-between"}>
201202
<Grid item xs={12} sm={7}>

portal-ui/src/screens/Console/Common/FormComponents/common/styleLibrary.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1273,5 +1273,5 @@ export const TableRowPredefStyles: any = {
12731273
color: "#ACACAC",
12741274
backgroundColor: "#FDFDFD",
12751275
fontStyle: "italic",
1276-
}
1277-
}
1276+
},
1277+
};

portal-ui/src/screens/Console/Configurations/ConfigurationPanels/ConfigurationOptions.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ import get from "lodash/get";
3737
import ScreenTitle from "../../Common/ScreenTitle/ScreenTitle";
3838

3939
import withSuspense from "../../Common/Components/withSuspense";
40+
import { IAM_PAGES } from "../../../../common/SecureComponent/permissions";
4041

4142
const ConfigurationForm = withSuspense(
4243
React.lazy(() => import("./ConfigurationForm"))
@@ -64,7 +65,7 @@ const styles = (theme: Theme) =>
6465
});
6566

6667
const getRoutePath = (path: string) => {
67-
return `/settings/${path}`;
68+
return `${IAM_PAGES.SETTINGS}/${path}`;
6869
};
6970

7071
const ConfigurationOptions = ({ classes, match }: IConfigurationOptions) => {
@@ -95,12 +96,12 @@ const ConfigurationOptions = ({ classes, match }: IConfigurationOptions) => {
9596
<Route
9697
exact
9798
key={`configItem-${element.configuration_label}`}
98-
path={`/settings/${element.configuration_id}`}
99+
path={`${IAM_PAGES.SETTINGS}/${element.configuration_id}`}
99100
component={ConfigurationForm}
100101
/>
101102
))}
102-
<Route exact path="/settings">
103-
<Redirect to="/settings/region" />
103+
<Route exact path={IAM_PAGES.SETTINGS}>
104+
<Redirect to={`${IAM_PAGES.SETTINGS}/region`} />
104105
</Route>
105106
</Switch>
106107
</Router>

portal-ui/src/screens/Console/HealthInfo/HealthInfo.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ const HealthInfo = ({
231231

232232
return (
233233
<Fragment>
234-
<PageHeader label="Diagnostic" />
234+
<PageHeader label="Health" />
235235
<PageLayout>
236236
<Grid item xs={12} className={classes.boxy}>
237237
<TestWrapper title={title} advancedVisible={false}>
@@ -286,6 +286,7 @@ const HealthInfo = ({
286286
)}
287287
<Grid item xs={12} className={classes.diagNew}>
288288
<Button
289+
id="start-new-diagnostic"
289290
type="submit"
290291
variant="contained"
291292
color="primary"

portal-ui/src/screens/Console/Menu/ConsoleMenuList.tsx

Lines changed: 2 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,9 @@ import {
2727
menuItemMiniStyles,
2828
menuItemTextStyles,
2929
} from "./MenuStyleUtils";
30-
import { DocumentationIcon, SettingsIcon } from "../../../icons";
30+
import { DocumentationIcon } from "../../../icons";
3131
import MenuItem from "./MenuItem";
32-
import { NavLink, useLocation } from "react-router-dom";
33-
import {
34-
CONSOLE_UI_RESOURCE,
35-
IAM_PAGES,
36-
IAM_SCOPES,
37-
} from "../../../common/SecureComponent/permissions";
38-
import SecureComponent from "../../../common/SecureComponent/SecureComponent";
32+
import { useLocation } from "react-router-dom";
3933

4034
const ConsoleMenuList = ({
4135
menuItems,
@@ -137,40 +131,6 @@ const ConsoleMenuList = ({
137131
}}
138132
className={`${stateClsName} group-wrapper bottom-list`}
139133
>
140-
<SecureComponent
141-
scopes={[IAM_SCOPES.ADMIN_CONFIG_UPDATE]}
142-
resource={CONSOLE_UI_RESOURCE}
143-
>
144-
<ListItem
145-
key={IAM_PAGES.SETTINGS}
146-
button
147-
to={IAM_PAGES.SETTINGS}
148-
disableRipple
149-
component={NavLink}
150-
className={`$ ${stateClsName} bottom-menu-item`}
151-
sx={{
152-
...menuItemContainerStyles,
153-
...menuItemMiniStyles,
154-
marginBottom: "3px",
155-
}}
156-
>
157-
<ListItemIcon
158-
sx={{
159-
...menuItemIconStyles,
160-
}}
161-
>
162-
<SettingsIcon />
163-
</ListItemIcon>
164-
<ListItemText
165-
primary="Settings"
166-
sx={{
167-
...menuItemTextStyles,
168-
}}
169-
className={stateClsName}
170-
/>
171-
</ListItem>
172-
</SecureComponent>
173-
174134
<ListItem
175135
button
176136
onClick={(

portal-ui/src/screens/Console/Menu/Menu.tsx

Lines changed: 48 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ import { hasPermission } from "../../../common/SecureComponent/SecureComponent";
7070
import MenuToggle from "./MenuToggle";
7171
import ConsoleMenuList from "./ConsoleMenuList";
7272
import RegisterMenuIcon from "../../../icons/SidebarMenus/RegisterMenuIcon";
73-
import DiagnosticsMenuIcon from "../../../icons/SidebarMenus/DiagnosticsMenuIcon";
74-
import InspectMenuIcon from "../../../icons/SidebarMenus/InspectMenuIcon";
73+
import SettingsIcon from "../../../icons/SettingsIcon";
74+
import WatchIcon from "../../../icons/WatchIcon";
7575

7676
const drawerWidth = 245;
7777

@@ -196,20 +196,7 @@ const Menu = ({
196196
to: IAM_PAGES.POLICIES,
197197
icon: AccessMenuIcon,
198198
},
199-
{
200-
component: NavLink,
201-
to: IAM_PAGES.NOTIFICATIONS_ENDPOINTS,
202-
name: "Notification Endpoints",
203-
icon: LambdaIcon,
204-
id: "lambda",
205-
},
206-
{
207-
component: NavLink,
208-
to: IAM_PAGES.TIERS,
209-
name: "Tiers",
210-
icon: TiersIcon,
211-
id: "tiers",
212-
},
199+
213200
{
214201
name: "Monitoring",
215202
id: "tools",
@@ -243,7 +230,13 @@ const Menu = ({
243230
icon: TraceMenuIcon,
244231
component: NavLink,
245232
},
246-
233+
{
234+
name: "Watch",
235+
id: "watch",
236+
component: NavLink,
237+
icon: WatchIcon,
238+
to: IAM_PAGES.TOOLS_WATCH,
239+
},
247240
{
248241
name: "Drives",
249242
id: "monitorDrives",
@@ -253,14 +246,6 @@ const Menu = ({
253246
},
254247
],
255248
},
256-
{
257-
name: "Health",
258-
id: "health",
259-
component: NavLink,
260-
icon: HealthMenuIcon,
261-
to: IAM_PAGES.HEALTH,
262-
children: [],
263-
},
264249
{
265250
name: "Support",
266251
id: "support",
@@ -274,10 +259,10 @@ const Menu = ({
274259
to: IAM_PAGES.REGISTER_SUPPORT,
275260
},
276261
{
277-
name: "Diagnostic",
262+
name: "Health",
278263
id: "diagnostics",
279264
component: NavLink,
280-
icon: DiagnosticsMenuIcon,
265+
icon: HealthMenuIcon,
281266
to: IAM_PAGES.TOOLS_DIAGNOSTICS,
282267
},
283268
{
@@ -287,20 +272,21 @@ const Menu = ({
287272
icon: PerformanceMenuIcon,
288273
to: IAM_PAGES.TOOLS_SPEEDTEST,
289274
},
275+
290276
// {
291277
// name: "Call Home",
292278
// id: "callhome",
293279
// component: NavLink,
294280
// icon: CallHomeMenuIcon,
295281
// to: IAM_PAGES.CALL_HOME,
296282
// },
297-
{
298-
name: "Inspect",
299-
id: "inspect",
300-
component: NavLink,
301-
icon: InspectMenuIcon,
302-
to: IAM_PAGES.TOOLS_WATCH,
303-
},
283+
// {
284+
// name: "Inspect",
285+
// id: "inspect",
286+
// component: NavLink,
287+
// icon: InspectMenuIcon,
288+
// to: IAM_PAGES.TOOLS_WATCH,
289+
// },
304290
// {
305291
// name: "Profile",
306292
// id: "profile",
@@ -318,6 +304,34 @@ const Menu = ({
318304
icon: LicenseIcon,
319305
forceDisplay: true,
320306
},
307+
{
308+
name: "Settings",
309+
id: "settings",
310+
icon: SettingsIcon,
311+
children: [
312+
{
313+
component: NavLink,
314+
to: IAM_PAGES.SETTINGS,
315+
name: "Configurations",
316+
id: "configurations",
317+
icon: SettingsIcon,
318+
},
319+
{
320+
component: NavLink,
321+
to: IAM_PAGES.NOTIFICATIONS_ENDPOINTS,
322+
name: "Notifications",
323+
icon: LambdaIcon,
324+
id: "lambda",
325+
},
326+
{
327+
component: NavLink,
328+
to: IAM_PAGES.TIERS,
329+
name: "Tiers",
330+
icon: TiersIcon,
331+
id: "tiers",
332+
},
333+
],
334+
},
321335
];
322336

323337
let operatorMenus: IMenuItem[] = [

0 commit comments

Comments
 (0)