Ver código fonte

Removed arsm module from core

TC pushbot 5 3 anos atrás
pai
commit
4443137f9e
3 arquivos alterados com 0 adições e 98 exclusões
  1. 0 87
      src/arsm.go
  2. 0 2
      src/go.mod
  3. 0 9
      src/go.sum

+ 0 - 87
src/arsm.go

@@ -1,87 +0,0 @@
-package main
-
-/*
-	ArOZ Remote Support and Management System
-	author: tobychui
-
-	This is a module for handling remote support and management of client
-	devices from other side of the network (even behind NAT)
-
-	This is a collection of submodules. Refer to the corrisponding submodules for more information
-*/
-
-import (
-	"log"
-	"net/http"
-
-	"imuslab.com/arozos/mod/arsm/aecron"
-	module "imuslab.com/arozos/mod/modules"
-	prout "imuslab.com/arozos/mod/prouter"
-)
-
-var (
-	cronObject *aecron.Aecron
-)
-
-func ArsmInit() {
-	/*
-		System Scheudler
-
-		The internal scheudler for arozos
-	*/
-	//Create an user router and its module
-	router := prout.NewModuleRouter(prout.RouterOption{
-		ModuleName:  "Tasks Scheduler",
-		AdminOnly:   false,
-		UserHandler: userHandler,
-		DeniedHandler: func(w http.ResponseWriter, r *http.Request) {
-			sendErrorResponse(w, "Permission Denied")
-		},
-	})
-
-	//Register the module
-	moduleHandler.RegisterModule(module.ModuleInfo{
-		Name:        "Tasks Scheduler",
-		Group:       "System Tools",
-		IconPath:    "SystemAO/arsm/img/scheduler.png",
-		Version:     "1.0",
-		StartDir:    "SystemAO/arsm/scheduler.html",
-		SupportFW:   true,
-		InitFWSize:  []int{1080, 580},
-		LaunchFWDir: "SystemAO/arsm/scheduler.html",
-		SupportEmb:  false,
-	})
-
-	//Startup the ArOZ Emulated Crontab Service
-	obj, err := aecron.NewArozEmulatedCrontab(userHandler, AGIGateway, "system/cron.json")
-	if err != nil {
-		log.Println("ArOZ Emulated Cron Startup Failed. Stopping all scheduled tasks.")
-	}
-
-	cronObject = obj
-
-	//Register Endpoints
-	http.HandleFunc("/system/arsm/aecron/list", func(w http.ResponseWriter, r *http.Request) {
-		if authAgent.CheckAuth(r) {
-			//User logged in
-			obj.HandleListJobs(w, r)
-		} else {
-			//User not logged in
-			http.NotFound(w, r)
-		}
-	})
-	router.HandleFunc("/system/arsm/aecron/add", obj.HandleAddJob)
-	router.HandleFunc("/system/arsm/aecron/remove", obj.HandleJobRemoval)
-	router.HandleFunc("/system/arsm/aecron/listlog", obj.HandleShowLog)
-
-	//Register settings
-	registerSetting(settingModule{
-		Name:         "Tasks Scheduler",
-		Desc:         "System Tasks and Excution Scheduler",
-		IconPath:     "SystemAO/arsm/img/small_icon.png",
-		Group:        "Cluster",
-		StartDir:     "SystemAO/arsm/aecron.html",
-		RequireAdmin: false,
-	})
-
-}

+ 0 - 2
src/go.mod

@@ -27,8 +27,6 @@ require (
 	github.com/pierrec/lz4 v2.5.2+incompatible // indirect
 	github.com/robertkrimen/otto v0.0.0-20191219234010-c382bd3c16ff
 	github.com/satori/go.uuid v1.2.0
-	github.com/smartystreets/cproxy v1.0.2
-	github.com/smartystreets/logging v1.1.1 // indirect
 	github.com/spf13/afero v1.3.1
 	github.com/stretchr/testify v1.7.0 // indirect
 	github.com/tidwall/pretty v1.0.2

+ 0 - 9
src/go.sum

@@ -398,16 +398,7 @@ github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeV
 github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
 github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
 github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
-github.com/smartystreets/assertions v1.0.1 h1:voD4ITNjPL5jjBfgR/r8fPIIBrliWrWHeiJApdr3r4w=
-github.com/smartystreets/assertions v1.0.1/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM=
-github.com/smartystreets/cproxy v1.0.2 h1:72JRJIx975Tk0yPQrZ9YOFhiMSIAdp8ljxmpc7OoNu8=
-github.com/smartystreets/cproxy v1.0.2/go.mod h1:qDRe8RO2GQUwJ3rt8wukdFrb5hcaI0YKpykWZ2W9wuI=
 github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
-github.com/smartystreets/gunit v1.1.3 h1:32x+htJCu3aMswhPw3teoJ+PnWPONqdNgaGs6Qt8ZaU=
-github.com/smartystreets/gunit v1.1.3/go.mod h1:EH5qMBab2UclzXUcpR8b93eHsIlp9u+pDQIRp5DZNzQ=
-github.com/smartystreets/logging v1.0.2/go.mod h1:66odR4LeIkc7lNzxhS+ktkvoSUhsyTM4e0NSXI9Bmac=
-github.com/smartystreets/logging v1.1.1 h1:4UlnyYWB7LDd216NTuP3zTVvMQZREtPrDnJbsz0zftI=
-github.com/smartystreets/logging v1.1.1/go.mod h1:NwFCEPbtiTIug+UCtTbDVjgcJNfandE3brDx0x7QEY8=
 github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
 github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY=
 github.com/spf13/afero v1.3.1 h1:GPTpEAuNr98px18yNQ66JllNil98wfRZ/5Ukny8FeQA=