Skip to content

Commit

Permalink
Merge branch 'main' of github.com:nikolap994/navnode-gui
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolap994 committed May 16, 2024
2 parents 9cc4978 + 0123326 commit a21a2e5
Showing 1 changed file with 9 additions and 22 deletions.
31 changes: 9 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Navnode GUI

Navnode GUI is a project designed to facilitate running commands on remote servers via webhooks and managing cronjobs. This README.md will guide you through setting up and understanding the project.
Navnode GUI is a project designed to facilitate running commands on remote servers via webhooks and managing cronjobs.

## Project Overview

Expand Down Expand Up @@ -109,26 +109,9 @@ After logging in, you can manage users as follows:
- **Subsequent User Management**: Admin users can add, modify, or remove users from the dashboard.


# Custom Hooks for Remote Commands

Custom hooks allow you to execute specific actions before and after running remote commands in your Navnode GUI project. These hooks are defined in `src/hooks/customHook.js`.

In the **Navnode GUI** application, the `beforeDeployHook` and `afterDeployHook` are custom hooks designed to execute specific actions before and after deployment tasks, respectively. These hooks provide a flexible way to intervene in the deployment process, allowing users to customize server-side actions based on their specific needs.

The `beforeDeployHook` is triggered before a deployment action occurs. This hook can be modified to perform any pre-deployment tasks, such as environment validation, setup checks, or custom preparations needed for the deployment process. Users have the flexibility to define and incorporate their own logic within this hook to ensure that deployments proceed smoothly and efficiently.

Conversely, the `afterDeployHook` is called after a deployment action completes. This hook enables users to execute post-deployment tasks, such as logging deployment results, sending notifications, or performing additional actions based on the outcome of the deployment. Users can tailor this hook to implement specific follow-up procedures that enhance the management and monitoring of deployment activities within the **Navnode GUI** environment.

By leveraging these hooks, developers can extend the functionality of the **Navnode GUI** application, introducing custom behaviors that align with project requirements and operational workflows. This modular approach empowers users to exert fine-grained control over deployment processes and seamlessly integrate server-side actions tailored to their unique use cases and preferences.


## Custom Hooks in Navnode GUI

Custom hooks in the Navnode GUI application are used to execute specific logic before or after certain events, such as deployment actions, cronjob executions, or webhook processing. By centralizing hook definitions and making them dynamic, you can apply custom behavior to various scenarios in your Navnode GUI application.

### Directory Structure

The Navnode GUI project should have a dedicated src/hooks directory where you define and organize different types of hooks. Each hook file can contain specific logic tailored to its purpose.
Custom hooks allow you to execute specific actions before and after running remote commands in your Navnode GUI project. These hooks are defined in `src/hooks`.

```css
navnode-gui/
Expand All @@ -140,10 +123,14 @@ navnode-gui/
│ └── ...
└── ...
```
### Extending with Additional Hooks
You can extend this pattern by creating more hook files (cronjobHook.js, webhookHook.js, etc.) within the src/hooks directory and defining custom hooks tailored to specific use cases. The hooks.js module provides a centralized mechanism to manage and execute hooks dynamically based on different events in your Navnode GUI application.

This modular approach allows you to maintain clear separation of concerns, improve code organization, and apply custom logic to various events through dynamic hook registration and execution.
In the **Navnode GUI** application, the `beforeDeployHook` and `afterDeployHook` are custom hooks designed to execute specific actions before and after deployment tasks, respectively. These hooks provide a flexible way to intervene in the deployment process, allowing users to customize server-side actions based on their specific needs.

The `beforeDeployHook` is triggered before a deployment action occurs. This hook can be modified to perform any pre-deployment tasks, such as environment validation, setup checks, or custom preparations needed for the deployment process. Users have the flexibility to define and incorporate their own logic within this hook to ensure that deployments proceed smoothly and efficiently.

Conversely, the `afterDeployHook` is called after a deployment action completes. This hook enables users to execute post-deployment tasks, such as logging deployment results, sending notifications, or performing additional actions based on the outcome of the deployment. Users can tailor this hook to implement specific follow-up procedures that enhance the management and monitoring of deployment activities within the **Navnode GUI** environment.

By leveraging these hooks, developers can extend the functionality of the **Navnode GUI** application, introducing custom behaviors that align with project requirements and operational workflows. This modular approach empowers users to exert fine-grained control over deployment processes and seamlessly integrate server-side actions tailored to their unique use cases and preferences.

### Tech Stack

Expand Down

0 comments on commit a21a2e5

Please sign in to comment.