77 |
78 |
}
83 | contentType="default"
84 | toolsHide={true}
85 | content={
86 | <>
87 |
88 |
93 |
94 | Welcome to {configuration["apps-settings"]["application-title"]} Solution
95 |
96 |
97 |
98 | Gain Monitoring Insight and Take Action on AWS Database Resources.
99 |
100 |
101 |
102 | View performance data for AWS Database instances and clusters, so you can quickly identify and act on any issues that might impact database resources.
103 |
104 |
105 |
106 | >
107 |
108 | }
109 |
110 | >
111 |
112 |
113 |
114 | }
115 | >
116 |
117 |
118 |
119 |
120 |
121 |
124 | How it works?
125 |
126 |
127 | }
128 | >
129 |
130 | 1 Connect to your AWS Database resorces.
131 |
132 |
133 | 2 Gather realtime performance database metrics from engine itself.
134 |
135 |
136 | 3 Extract performance from AWS Cloudwatch metrics and Enhanced Monitoring.
137 |
138 |
139 | 4 Consolidate all information into centralized dashboard.
140 |
141 |
142 |
143 |
144 |
145 |
146 |
149 | Getting Started
150 |
151 |
152 | }
153 | >
154 |
155 |
156 | Start connecting to your AWS RDS instances or Amazon Aurora, ElastiCache, MemoryDB, DocumentDB clusters.
157 |
158 |
159 | Get Started
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
173 | Use cases
174 |
175 |
176 | }
177 | >
178 |
179 |
180 |
181 | Monitor instance performance
182 |
183 |
184 | Visualize performance data on realtime, and correlate data to understand and resolve the root cause of performance issues in your database resources.
185 |
186 |
187 |
188 |
189 | Perform root cause analysis
190 |
191 |
192 | Analyze database and operating system metrics to speed up debugging and reduce overall mean time to resolution.
193 |
194 |
195 |
196 |
197 | Optimize resources proactively
198 |
199 |
200 | Identify top consumer sessions, gather database statements and resource usages.
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 | >
213 |
214 | }
215 | />
216 |
217 |
218 | );
219 | }
220 |
221 | export default Home;
222 |
--------------------------------------------------------------------------------
/frontend/src/pages/Logout.js:
--------------------------------------------------------------------------------
1 | import { useAuthenticator } from '@aws-amplify/ui-react';
2 | import { useNavigate } from 'react-router-dom';
3 |
4 | const App = () => {
5 | const navigate = useNavigate();
6 |
7 | const { signOut } = useAuthenticator((context) => [context.user]);
8 | signOut();
9 | navigate('/');
10 |
11 | return (
12 |
140 |
141 |
}
145 | contentType="default"
146 | content={
147 |
148 |
149 |
150 |
151 |
152 |
153 | { ( updateStatus['status'] == 'in-progress' ) &&
154 |
155 | }
156 | Application Update
157 |
158 | }
159 | >
160 | {
168 | }
169 | }
170 | extendedTableProperties = {
171 | { variant : "borderless" }
172 |
173 | }
174 | tableActions = {
175 |
179 | Current version : {updateStatus['releaseVersion']}
180 | Release date : {updateStatus['releaseDate']}
181 | Update
182 |
183 | }
184 |
185 | />
186 |
187 |
188 | }
189 | disableContentHeaderOverlap={true}
190 | headerSelector="#h"
191 | />
192 |
193 |
194 | );
195 | }
196 |
197 | export default Application;
198 |
199 |
--------------------------------------------------------------------------------
/frontend/src/pages/Sm-engineConnections.js:
--------------------------------------------------------------------------------
1 | import { useState,useEffect } from 'react'
2 | import Axios from 'axios'
3 | import { configuration, SideMainLayoutHeader,SideMainLayoutMenu } from './Configs';
4 |
5 | import { gatherLocalVersion } from '../components/Functions';
6 | import { createLabelFunction } from '../components/Functions';
7 |
8 | import SideNavigation from '@cloudscape-design/components/side-navigation';
9 | import AppLayout from '@cloudscape-design/components/app-layout';
10 |
11 | import Container from "@cloudscape-design/components/container";
12 | import Spinner from "@cloudscape-design/components/spinner";
13 |
14 | import SpaceBetween from "@cloudscape-design/components/space-between";
15 | import Button from "@cloudscape-design/components/button";
16 | import CustomHeader from "../components/HeaderApp";
17 | import CustomTable02 from "../components/Table02";
18 |
19 | import Header from "@cloudscape-design/components/header";
20 | import '@aws-amplify/ui-react/styles.css';
21 |
22 |
23 | function Application() {
24 |
25 | //-- Application Version
26 |
27 | const [engineConenctions, setEngineConnections] = useState([]);
28 | const [selectedItems,setSelectedItems] = useState({ engineId : "", type : "" });
29 |
30 |
31 | //-- Add Header Cognito Token
32 | Axios.defaults.headers.common['x-csrf-token'] = sessionStorage.getItem("x-csrf-token");
33 | Axios.defaults.headers.common['x-token-cognito'] = sessionStorage.getItem("x-token-cognito");
34 | Axios.defaults.withCredentials = true;
35 |
36 |
37 | //-- Table Messages
38 | const columnsTable = [
39 | {id: 'connectionId', header: 'ConnectionId',cell: item => item['connectionId'],ariaLabel: createLabelFunction('connectionId'),sortingField: 'connectionId'},
40 | {id: 'engineId', header: 'EngineId',cell: item => item['engineId'],ariaLabel: createLabelFunction('engineId'),sortingField: 'engineId'},
41 | {id: 'type', header: 'Type',cell: item => item['type'],ariaLabel: createLabelFunction('type'),sortingField: 'type'},
42 | {id: 'creationTime', header: 'CreationTime',cell: item => item['creationTime'],ariaLabel: createLabelFunction('creationTime'),sortingField: 'creationTime',}
43 | ];
44 |
45 | const visibleContent = ['connectionId','engineId','creationTime'];
46 |
47 |
48 | //-- Gather Connections
49 | async function gatherConnections (){
50 |
51 | try {
52 |
53 | var api_url = configuration["apps-settings"]["api_url"];
54 | var params = {};
55 | Axios.get(`${api_url}/api/aws/engines/connections/list`,{
56 | params: params,
57 | }).then((data)=>{
58 | console.log(data.data);
59 | setEngineConnections(data.data.engineConnections);
60 |
61 | })
62 | .catch((err) => {
63 | console.log('Timeout API Call : /api/aws/engines/connections/list' );
64 | console.log(err);
65 | });
66 |
67 | }
68 | catch{
69 |
70 | console.log('Timeout API error : /api/aws/engines/connections/list');
71 |
72 | }
73 |
74 | }
75 |
76 | function onClickTerminate(){
77 |
78 | try {
79 |
80 | var api_url = configuration["apps-settings"]["api_url"];
81 | var params = { engineId : selectedItems['engineId'], type : selectedItems['type'] };
82 | Axios.get(`${api_url}/api/aws/engines/connections/terminate`,{
83 | params: params,
84 | }).then((data)=>{
85 |
86 | gatherConnections();
87 | })
88 | .catch((err) => {
89 | console.log('Timeout API Call : /api/aws/engines/connections/terminate' );
90 | console.log(err);
91 | });
92 |
93 | }
94 | catch{
95 |
96 | console.log('Timeout API error : /api/aws/engines/connections/terminate');
97 |
98 | }
99 |
100 |
101 | }
102 |
103 |
104 |
105 | useEffect(() => {
106 | gatherConnections();
107 | //const id = setInterval(gatherConnections, configuration["apps-settings"]["refresh-interval-update"]);
108 | //return () => clearInterval(id);
109 | // eslint-disable-next-line react-hooks/exhaustive-deps
110 | }, []);
111 |
112 |
113 | return (
114 |
115 |
116 |
}
120 | contentType="default"
121 | content={
122 |
123 |
124 |
125 |
141 | Terminate Connection
142 | Refresh
143 |
144 | }
145 | onSelectionItem={( item ) => {
146 | setSelectedItems(item[0]);
147 | }
148 | }
149 | />
150 |
151 |
152 | }
153 | disableContentHeaderOverlap={true}
154 | headerSelector="#h"
155 | />
156 |
157 |
158 | );
159 | }
160 |
161 | export default Application;
162 |
163 |
--------------------------------------------------------------------------------
/frontend/src/styles/css/animation.css:
--------------------------------------------------------------------------------
1 | @keyframes placeholderAnimation {
2 | 0% {
3 | background-position:100% 100%; /*OR bottom right*/
4 | }
5 | 100% {
6 | background-position:0 0; /*OR top left*/
7 | }
8 | }
--------------------------------------------------------------------------------
/frontend/src/styles/css/base.css:
--------------------------------------------------------------------------------
1 | @use '~@cloudscape-design/design-tokens' as cs;
2 |
3 | body {
4 | background: cs.$color-background-layout-main;
5 | position: relative;
6 | }
7 |
8 | .custom-main-header {
9 | display: block;
10 | position: sticky;
11 | top: 0;
12 | left: 0;
13 | right: 0;
14 | z-index: 1000;
15 | margin: 0;
16 | background-color: #0f1b2a;
17 | font-family: cs.$font-family-base;
18 | }
19 |
20 | ul.menu-list {
21 | display: flex;
22 | align-items: center;
23 | height: 40px;
24 | margin: 0;
25 | padding: 0 40px;
26 | list-style: none;
27 | font-size: 14px;
28 |
29 | & > li {
30 | padding: 0;
31 | margin: 0;
32 | margin-right: 8px;
33 |
34 | > a {
35 | padding: 0 6px;
36 | }
37 |
38 | a,
39 | div,
40 | button,
41 | input,
42 | label {
43 | float: left;
44 | color: cs.$color-text-interactive-default;
45 | line-height: 16px;
46 | }
47 |
48 | #visual-refresh-toggle {
49 | margin-right: 5px;
50 | margin-top: 1px;
51 | }
52 |
53 | a,
54 | a:hover {
55 | cursor: pointer;
56 | text-decoration: none;
57 | }
58 |
59 | &.title {
60 | font-weight: bold;
61 | }
62 | }
63 |
64 | @media only screen and (max-width: 493px) {
65 | padding: 4px 20px;
66 | flex-wrap: wrap;
67 | height: fit-content;
68 |
69 | .title {
70 | flex: 1 1 100%;
71 | margin-bottom: 8px;
72 | }
73 |
74 | li {
75 | width: min-content;
76 |
77 | button,
78 | a {
79 | text-align: left;
80 | }
81 |
82 | a {
83 | padding: 0;
84 | }
85 | }
86 | }
87 | }
--------------------------------------------------------------------------------
/frontend/src/styles/css/default.css:
--------------------------------------------------------------------------------
1 | #tableflat {
2 | font-family: Arial, Helvetica, sans-serif;
3 | border-collapse: collapse;
4 | width: 100%;
5 | padding: 1em
6 | }
7 |
8 | #tableflat td, #tableflat th {
9 | border: 1px solid #eaeded;
10 | padding: 8px;
11 | }
12 |
13 |
14 |
15 | #tableflat th {
16 | padding-top: 12px;
17 | padding-bottom: 12px;
18 | text-align: left;
19 | background-color: #fafafa;
20 | color: black;
21 | }
22 |
--------------------------------------------------------------------------------
/frontend/src/styles/css/top-navigation.css:
--------------------------------------------------------------------------------
1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2 | // SPDX-License-Identifier: MIT-0
3 |
4 | #h {
5 | z-index: 1002;
6 | }
7 |
8 | .menu-list {
9 | border-bottom: 1px solid #414750;
10 | }
11 |
12 | body {
13 | margin: 0;
14 | }
15 |
16 |
--------------------------------------------------------------------------------
/frontend/www/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |