-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for Docker stacks git repository
This also commit introduces alert event handling in the real-time notification system. Additionally, it renames and refactors several enums and components relating to repositories, aligning with the new type nomenclature. Both the `Git` and `Local` repository types have been updated, alongside improvements in the custom stacks and playbooks repository controllers.
- Loading branch information
SquirrelDevelopper
committed
Nov 5, 2024
1 parent
0edb457
commit b26e609
Showing
79 changed files
with
2,276 additions
and
401 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Create PR to Release Branch | ||
|
||
on: | ||
push: | ||
tags: [ 'v*.*.*' ] | ||
|
||
jobs: | ||
create-pr: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Git | ||
run: | | ||
git config --global user.name 'github-actions[bot]' | ||
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
- name: Fetch all branches | ||
run: git fetch --all | ||
|
||
- name: Create pull request | ||
uses: peter-evans/create-pull-request@v5 | ||
with: | ||
source-branch: master | ||
destination-branch: release | ||
commit-message: 'chore: Merge master into release branch' | ||
title: '[CHORE] Create PR from master to release' | ||
body: 'The workflow is triggered by publishing a new tag. This PR merges changes from master to release.' | ||
branch: 'pr-branch' |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { socket } from '@/socket'; | ||
import { notification, Typography } from 'antd'; | ||
import React, { useEffect } from 'react'; | ||
import { SsmEvents } from 'ssm-shared-lib'; | ||
|
||
const AlertNotification: React.FC = () => { | ||
const [api, contextHolder] = notification.useNotification(); | ||
const openNotificationWithIcon = (payload: any) => { | ||
if (payload?.severity === 'error') { | ||
api.error({ | ||
message: 'Alert', | ||
description: ( | ||
<Typography.Text style={{ fontSize: 13 }}> | ||
{payload?.message | ||
?.split('\n') | ||
.map((line: string, index: number) => <p key={index}>{line}</p>)} | ||
</Typography.Text> | ||
), | ||
duration: 0, | ||
}); | ||
} | ||
}; | ||
useEffect(() => { | ||
socket.connect(); | ||
socket.on(SsmEvents.Alert.NEW_ALERT, openNotificationWithIcon); | ||
|
||
return () => { | ||
socket.off(SsmEvents.Alert.NEW_ALERT, openNotificationWithIcon); | ||
socket.disconnect(); | ||
}; | ||
}, []); | ||
return <>{contextHolder}</>; | ||
}; | ||
|
||
export default AlertNotification; |
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
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.