-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Add notification Signed-off-by: bowenlan-amzn <[email protected]> * Default timestamp in snapshot name Signed-off-by: bowenlan-amzn <[email protected]> * Make custom configuration in create repo more prominent Signed-off-by: bowenlan-amzn <[email protected]> * Tune the snapshots table to have more space for showing snapshot name Signed-off-by: bowenlan-amzn <[email protected]> * Show notification channel name on policy detail page Signed-off-by: bowenlan-amzn <[email protected]> * Helptext word change Signed-off-by: bowenlan-amzn <[email protected]> * Add snapshot management to left side bar Signed-off-by: bowenlan-amzn <[email protected]> * max age unit sync with snapshot frequency type hourly Signed-off-by: bowenlan-amzn <[email protected]> * Notification link to detail in policy detail page Signed-off-by: bowenlan-amzn <[email protected]> (cherry picked from commit 2947db6) Co-authored-by: bowenlan-amzn <[email protected]>
- Loading branch information
1 parent
f08cbe2
commit b12299f
Showing
23 changed files
with
392 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
public/pages/CreateSnapshotPolicy/components/Notification/Notification.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import React, { ChangeEvent } from "react"; | ||
import { EuiFormRow, EuiSelect, EuiButton, EuiFlexGroup, EuiFlexItem } from "@elastic/eui"; | ||
import "brace/theme/github"; | ||
import "brace/mode/json"; | ||
import { FeatureChannelList } from "../../../../../server/models/interfaces"; | ||
import CustomLabel from "../../../../components/CustomLabel"; | ||
|
||
interface NotificationProps { | ||
channelId: string; | ||
channels: FeatureChannelList[]; | ||
loadingChannels: boolean; | ||
onChangeChannelId: (value: ChangeEvent<HTMLSelectElement>) => void; | ||
getChannels: () => void; | ||
} | ||
|
||
const Notification = ({ channelId, channels, loadingChannels, onChangeChannelId, getChannels }: NotificationProps) => { | ||
return ( | ||
<> | ||
<CustomLabel title="Select notification channels" /> | ||
<EuiFlexGroup gutterSize="s" style={{ maxWidth: 600 }}> | ||
<EuiFlexItem> | ||
<EuiFormRow> | ||
<EuiSelect | ||
id="channel-id" | ||
placeholder="Select channel ID" | ||
hasNoInitialSelection | ||
isLoading={loadingChannels} | ||
options={channels.map((channel) => ({ value: channel.config_id, text: channel.name }))} | ||
value={channelId} | ||
onChange={onChangeChannelId} | ||
data-test-subj="create-policy-notification-channel-id" | ||
/> | ||
</EuiFormRow> | ||
</EuiFlexItem> | ||
<EuiFlexItem grow={false}> | ||
<EuiButton | ||
iconType="refresh" | ||
onClick={getChannels} | ||
disabled={loadingChannels} | ||
className="refresh-button" | ||
data-test-subj="channel-notification-refresh" | ||
/> | ||
</EuiFlexItem> | ||
<EuiFlexItem grow={false}> | ||
<EuiButton iconType="popout" href="notifications-dashboards#/channels" target="_blank"> | ||
Manage channels | ||
</EuiButton> | ||
</EuiFlexItem> | ||
</EuiFlexGroup> | ||
</> | ||
); | ||
}; | ||
|
||
export default Notification; |
8 changes: 8 additions & 0 deletions
8
public/pages/CreateSnapshotPolicy/components/Notification/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import Notification from "./Notification"; | ||
|
||
export default Notification; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.