Merge pull request #83 from operacle/develop
Fix: Display new service immediately
This commit is contained in:
@@ -39,6 +39,7 @@ CheckCle is an Open Source solution for seamless, real-time monitoring of full-s
|
||||
|
||||
## 🎯 Live Demo
|
||||
👉 **Try it now:** [CheckCle Live Demo](https://demo.checkcle.io)
|
||||
User: admin@example.com | Passwd: Admin123456
|
||||
|
||||
## 🌟 Core Features
|
||||
|
||||
@@ -110,11 +111,12 @@ services:
|
||||
4. Follow the Quick Start Guide at https://docs.checkcle.io
|
||||
|
||||
###
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
|
||||
## 📝 Development Roadmap
|
||||
|
||||
@@ -128,10 +130,10 @@ services:
|
||||
- ✅ SSL & Domain Monitoring
|
||||
- ✅ Schedule Maintenance
|
||||
- ✅ Incident Management
|
||||
- [ ] Infrastructure Server Monitoring
|
||||
- ✅ Infrastructure Server Monitoring
|
||||
- ✅ Operational Status / Public Status Pages
|
||||
- ✅ Uptime monitoring (HTTP, TCP, PING, DNS) Full functionality
|
||||
- ✅ Distributed Regional Monitoring Agent [Support Operation](https://github.com/operacle/Distributed-Regional-Monitoring)
|
||||
- ✅ Distributed Regional Monitoring Agent
|
||||
- ✅ System Setting Panel and Mail Settings
|
||||
- ✅ User Permission Roles
|
||||
- [ ] Notifications (Email/Slack/Discord/Signal)
|
||||
@@ -161,7 +163,7 @@ Here are some ways you can help improve CheckCle:
|
||||
- Website: [checkcle.io](https://checkcle.io)
|
||||
- Documentation: [docs.checkcle.io](https://docs.checkcle.io)
|
||||
- GitHub Repository: ⭐ [CheckCle](https://github.com/operacle/checkcle.git)
|
||||
- Community Channels: Engage via discussions and issues!
|
||||
- Reddit Community: [reddit](https://www.reddit.com/r/checkcle)
|
||||
- Discord: Join our community [@discord](https://discord.gg/xs9gbubGwX)
|
||||
- X: [@tlengoss](https://x.com/tlengoss)
|
||||
|
||||
@@ -171,12 +173,7 @@ CheckCle is released under the MIT License.
|
||||
|
||||
---
|
||||
## 👥 Contributors
|
||||
Thank you for contributing and continuously making CheckCle better, you're awesome 🫶
|
||||
|
||||
[](https://github.com/operacle/checkcle/graphs/contributors)
|
||||
|
||||
|
||||
## Star History
|
||||
|
||||
[](https://www.star-history.com/#operacle/checkcle&Date)
|
||||
|
||||
Stay informed, stay online, with CheckCle! 🌐
|
||||
|
||||
@@ -8,6 +8,7 @@ import {
|
||||
} from "@/components/ui/dialog";
|
||||
import { ServiceForm } from "./ServiceForm";
|
||||
import { ScrollArea } from "@/components/ui/scroll-area";
|
||||
import { useQueryClient } from "@tanstack/react-query";
|
||||
|
||||
interface AddServiceDialogProps {
|
||||
open: boolean;
|
||||
@@ -15,7 +16,11 @@ interface AddServiceDialogProps {
|
||||
}
|
||||
|
||||
export function AddServiceDialog({ open, onOpenChange }: AddServiceDialogProps) {
|
||||
const handleSuccess = () => {
|
||||
const queryClient = useQueryClient();
|
||||
const handleSuccess = async () => {
|
||||
// Immediately invalidate and refetch services data
|
||||
await queryClient.invalidateQueries({ queryKey: ["services"] });
|
||||
await queryClient.refetchQueries({ queryKey: ["services"] });
|
||||
onOpenChange(false);
|
||||
};
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ import { serviceService } from "@/services/serviceService";
|
||||
import { Service } from "@/types/service.types";
|
||||
import { ServiceRegionalFields } from "./ServiceRegionalFields";
|
||||
import { getServiceFormDefaults, mapServiceToFormData, mapFormDataToServiceData } from "./serviceFormUtils";
|
||||
import { useQueryClient } from "@tanstack/react-query";
|
||||
|
||||
interface ServiceFormProps {
|
||||
onSuccess: () => void;
|
||||
@@ -31,6 +32,7 @@ export function ServiceForm({
|
||||
}: ServiceFormProps) {
|
||||
const { toast } = useToast();
|
||||
const [isSubmitting, setIsSubmitting] = useState(false);
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
// Initialize form with default values
|
||||
const form = useForm<ServiceFormData>({
|
||||
@@ -91,6 +93,16 @@ export function ServiceForm({
|
||||
});
|
||||
}
|
||||
|
||||
// Force immediate refresh of services data
|
||||
queryClient.setQueryData(["services"], (oldData: any) => {
|
||||
// Invalidate the cache to force a fresh fetch
|
||||
return undefined;
|
||||
});
|
||||
|
||||
// Invalidate and refetch services query
|
||||
await queryClient.invalidateQueries({ queryKey: ["services"] });
|
||||
await queryClient.refetchQueries({ queryKey: ["services"] });
|
||||
|
||||
onSuccess();
|
||||
if (!isEdit) {
|
||||
form.reset();
|
||||
|
||||
@@ -232,7 +232,7 @@ configure_agent() {
|
||||
log_info "Final configuration:"
|
||||
log_info " Server Name: $SERVER_NAME"
|
||||
log_info " Agent ID: $AGENT_ID"
|
||||
log_info " PocketBase URL: $POCKETBASE_URL"
|
||||
log_info " PB API URL: $POCKETBASE_URL"
|
||||
log_info " IP Address: $IP_ADDRESS"
|
||||
log_info " OS Type: $OS_TYPE"
|
||||
log_info " Health Check Port: $HEALTH_CHECK_PORT"
|
||||
@@ -341,7 +341,7 @@ test_installation() {
|
||||
show_post_install_info() {
|
||||
echo
|
||||
echo "============================================="
|
||||
echo " Installation Complete!"
|
||||
echo " CheckCle Server Agent Installation Complete!"
|
||||
echo "============================================="
|
||||
echo
|
||||
log_success "CheckCle Monitoring Agent installed and configured successfully"
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((app) => {
|
||||
const collection = app.findCollectionByNameOrId("pbc_1998570700")
|
||||
|
||||
// add field
|
||||
collection.fields.addAt(20, new Field({
|
||||
"autogeneratePattern": "",
|
||||
"hidden": false,
|
||||
"id": "text772177811",
|
||||
"max": 0,
|
||||
"min": 0,
|
||||
"name": "detail",
|
||||
"pattern": "",
|
||||
"presentable": false,
|
||||
"primaryKey": false,
|
||||
"required": false,
|
||||
"system": false,
|
||||
"type": "text"
|
||||
}))
|
||||
|
||||
// update field
|
||||
collection.fields.addAt(19, new Field({
|
||||
"autogeneratePattern": "",
|
||||
"hidden": false,
|
||||
"id": "text3065852031",
|
||||
"max": 0,
|
||||
"min": 0,
|
||||
"name": "error_message",
|
||||
"pattern": "",
|
||||
"presentable": false,
|
||||
"primaryKey": false,
|
||||
"required": false,
|
||||
"system": false,
|
||||
"type": "text"
|
||||
}))
|
||||
|
||||
return app.save(collection)
|
||||
}, (app) => {
|
||||
const collection = app.findCollectionByNameOrId("pbc_1998570700")
|
||||
|
||||
// remove field
|
||||
collection.fields.removeById("text772177811")
|
||||
|
||||
// update field
|
||||
collection.fields.addAt(19, new Field({
|
||||
"autogeneratePattern": "",
|
||||
"hidden": false,
|
||||
"id": "text3065852031",
|
||||
"max": 0,
|
||||
"min": 0,
|
||||
"name": "message",
|
||||
"pattern": "",
|
||||
"presentable": false,
|
||||
"primaryKey": false,
|
||||
"required": false,
|
||||
"system": false,
|
||||
"type": "text"
|
||||
}))
|
||||
|
||||
return app.save(collection)
|
||||
})
|
||||
@@ -0,0 +1,42 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((app) => {
|
||||
const collection = app.findCollectionByNameOrId("pbc_1998570700")
|
||||
|
||||
// update field
|
||||
collection.fields.addAt(20, new Field({
|
||||
"autogeneratePattern": "",
|
||||
"hidden": false,
|
||||
"id": "text772177811",
|
||||
"max": 0,
|
||||
"min": 0,
|
||||
"name": "details",
|
||||
"pattern": "",
|
||||
"presentable": false,
|
||||
"primaryKey": false,
|
||||
"required": false,
|
||||
"system": false,
|
||||
"type": "text"
|
||||
}))
|
||||
|
||||
return app.save(collection)
|
||||
}, (app) => {
|
||||
const collection = app.findCollectionByNameOrId("pbc_1998570700")
|
||||
|
||||
// update field
|
||||
collection.fields.addAt(20, new Field({
|
||||
"autogeneratePattern": "",
|
||||
"hidden": false,
|
||||
"id": "text772177811",
|
||||
"max": 0,
|
||||
"min": 0,
|
||||
"name": "detail",
|
||||
"pattern": "",
|
||||
"presentable": false,
|
||||
"primaryKey": false,
|
||||
"required": false,
|
||||
"system": false,
|
||||
"type": "text"
|
||||
}))
|
||||
|
||||
return app.save(collection)
|
||||
})
|
||||
Reference in New Issue
Block a user