Version 0.5.0 - Ajout des pipelines
All checks were successful
Neutral/pipeline/head This commit looks good

This commit is contained in:
Raphix
2023-12-06 22:56:58 +01:00
parent b19243a8af
commit ff42630c8d
10 changed files with 609 additions and 76 deletions

View File

@ -6,6 +6,7 @@ const auth = require("./auth.js")
const files = require("./files.js")
const links = require("./links.js")
const service = require("./services.js")
const pipeline = require("./pipelines.js")
const plog = new LogType("Web")
const cook = require("cookie")
const http = require("http")
@ -49,56 +50,56 @@ module.exports.serverIO = function(server) {
if(user.checkPermission("FILES_EXPLORER")) {
PostRequest("FX_GET", (root) => {
PostRequest("FX_GET", (root) => {
PostAnswer("FX_GET", files.getFiles(root))
})
PostAnswer("FX_GET", files.getFiles(root))
})
PostRequest("FX_NEW_FOLDER", (root) => {
PostRequest("FX_NEW_FOLDER", (root) => {
PostAnswer("FX_NEW_FOLDER", files.createFolder(root))
})
PostAnswer("FX_NEW_FOLDER", files.createFolder(root))
})
PostRequest("FX_DELETE", (root) => {
PostRequest("FX_DELETE", (root) => {
PostAnswer("FX_DELETE", files.deleteFile(root))
} )
PostAnswer("FX_DELETE", files.deleteFile(root))
} )
PostRequest("FX_RENAME", (settings) => {
PostAnswer("FX_RENAME", files.renameFile(settings))
})
PostRequest("FX_SHARE", (settings) => {
PostRequest("FX_RENAME", (settings) => {
PostAnswer("FX_SHARE", files.shareFile(settings))
})
PostAnswer("FX_RENAME", files.renameFile(settings))
})
PostRequest("FX_GETFILE", (root) => {
PostAnswer("FX_GETFILE", files.getFile(root))
})
PostRequest("FX_SHARE", (settings) => {
PostAnswer("FX_SHARE", files.shareFile(settings))
})
PostRequest("FX_SAVEFILE", (settings) => {
PostAnswer("FX_SAVEFILE", files.saveFile(settings))
})
PostRequest("FX_NEW_FILE", (settings) => {
PostRequest("FX_GETFILE", (root) => {
PostAnswer("FX_NEW_FILE", files.newFile(settings))
})
PostRequest("FX_UPLOAD", (settings) => {
PostAnswer("FX_GETFILE", files.getFile(root))
})
PostAnswer("FX_UPLOAD", files.uploadFile(settings))
PostRequest("FX_SAVEFILE", (settings) => {
PostAnswer("FX_SAVEFILE", files.saveFile(settings))
})
})
PostRequest("FX_NEW_FILE", (settings) => {
PostAnswer("FX_NEW_FILE", files.newFile(settings))
})
PostRequest("FX_UPLOAD", (settings) => {
PostRequest("FX_PASTE", (settings) => {
PostAnswer("FX_PASTE", files.pasteFile(settings))
})
PostAnswer("FX_UPLOAD", files.uploadFile(settings))
})
PostRequest("FX_PASTE", (settings) => {
PostAnswer("FX_PASTE", files.pasteFile(settings))
})
}
@ -151,6 +152,17 @@ module.exports.serverIO = function(server) {
});
}
if(user.checkPermission("PIPELINES")) {
GetRequest("PL_GET_ALL", async () => {
GetAnswer("PL_GET_ALL", await pipeline.getAllPipelines())
})
PostRequest("PL_START", async (settings) => {
PostAnswer("PL_START", await pipeline.startPipeline(settings))
})
}
socket.on("disconnect", () => {
plog.log("Déconnexion du panel par '" + user.username + "' avec le socket : " + socket.id)