mirror of https://github.com/openspug/spug
U 增加代码注释信息。
parent
980bef2d83
commit
f947775a93
|
|
@ -0,0 +1,3 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.core.management.base import BaseCommand
|
||||
from apps.account.models import User
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.db import models
|
||||
from libs import ModelMixin, human_datetime
|
||||
from django.contrib.auth.hashers import make_password, check_password
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.conf.urls import url
|
||||
|
||||
from apps.account.views import *
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.core.cache import cache
|
||||
from django.views.generic import View
|
||||
from django.db.models import F
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.db import models
|
||||
from libs import ModelMixin, human_datetime
|
||||
from apps.account.models import User
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.urls import path
|
||||
|
||||
from .views import *
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Released under the MIT License.
|
||||
from apps.alarm.models import Alarm
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.views.generic import View
|
||||
from libs import json_response, JsonParser, Argument
|
||||
from apps.alarm.models import Alarm, Group, Contact
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.http.response import HttpResponse
|
||||
from django_redis import get_redis_connection
|
||||
from apps.config.models import Config, Service, Environment
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.urls import path
|
||||
|
||||
from apps.apis import config
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.db import models
|
||||
from libs import ModelMixin, human_datetime
|
||||
from apps.account.models import User
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.urls import path
|
||||
|
||||
from .views import *
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.conf import settings
|
||||
from apps.app.models import Deploy
|
||||
from libs.gitlib import Git
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.views.generic import View
|
||||
from django.db.models import F
|
||||
from libs import JsonParser, Argument, json_response
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.db import models
|
||||
from libs import ModelMixin, human_datetime
|
||||
from apps.account.models import User
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.urls import path
|
||||
|
||||
from .views import *
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.views.generic import View
|
||||
from django.db.models import F
|
||||
from libs import json_response, JsonParser, Argument
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.db import models
|
||||
from libs import ModelMixin, human_datetime
|
||||
from apps.account.models import User
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.urls import path
|
||||
|
||||
from .views import *
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django_redis import get_redis_connection
|
||||
from django.conf import settings
|
||||
from libs.utils import AttrDict, human_time
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.views.generic import View
|
||||
from django.db.models import F
|
||||
from libs import json_response, JsonParser, Argument, human_datetime, human_time
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.db import models
|
||||
from libs import ModelMixin, human_datetime
|
||||
from apps.account.models import User
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.conf.urls import url
|
||||
|
||||
from .views import *
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.views.generic import View
|
||||
from libs import json_response, JsonParser, Argument, human_datetime
|
||||
from libs.channel import Channel
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.urls import path
|
||||
|
||||
from .views import *
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.db.models import F
|
||||
from apps.app.models import App
|
||||
from apps.host.models import Host
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.db import models
|
||||
from libs import ModelMixin, human_datetime
|
||||
from apps.account.models import User
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.urls import path
|
||||
|
||||
from .views import *
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.views.generic import View
|
||||
from django.shortcuts import render
|
||||
from django.http.response import HttpResponseBadRequest
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from libs.ssh import SSH
|
||||
from apps.host.models import Host
|
||||
from apps.setting.utils import AppSetting
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.core.management.base import BaseCommand
|
||||
from apps.monitor.scheduler import Scheduler
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.db import models
|
||||
from libs import ModelMixin, human_datetime
|
||||
from apps.account.models import User
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from apscheduler.schedulers.background import BackgroundScheduler
|
||||
from apscheduler.triggers.interval import IntervalTrigger
|
||||
from apscheduler import events
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.urls import path
|
||||
|
||||
from .views import *
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
def seconds_to_human(seconds):
|
||||
text = ''
|
||||
if seconds > 3600:
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.views.generic import View
|
||||
from libs import json_response, JsonParser, Argument, human_datetime
|
||||
from apps.monitor.models import Detection
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.db import models
|
||||
from libs import ModelMixin, human_datetime
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.urls import path
|
||||
|
||||
from .views import *
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.views.generic import View
|
||||
from apps.notify.models import Notify
|
||||
from libs import json_response, JsonParser, Argument
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from queue import Queue
|
||||
from threading import Thread
|
||||
from libs.ssh import SSH
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.core.management.base import BaseCommand
|
||||
from apps.schedule.scheduler import Scheduler
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.db import models
|
||||
from libs import ModelMixin, human_datetime
|
||||
from apps.account.models import User
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from apscheduler.schedulers.background import BackgroundScheduler
|
||||
from apscheduler.triggers.interval import IntervalTrigger
|
||||
from apscheduler.triggers.date import DateTrigger
|
||||
|
|
@ -85,7 +88,7 @@ class Scheduler:
|
|||
|
||||
def _init_builtin_jobs(self):
|
||||
self.scheduler.add_job(auto_clean_records, 'cron', hour=0, minute=0)
|
||||
|
||||
|
||||
def _init(self):
|
||||
self.scheduler.start()
|
||||
self._init_builtin_jobs()
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.conf.urls import url
|
||||
from django.urls import path
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.views.generic import View
|
||||
from django_redis import get_redis_connection
|
||||
from apps.schedule.models import Task
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.db import models
|
||||
from libs import ModelMixin
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.urls import path
|
||||
|
||||
from .views import *
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from functools import lru_cache
|
||||
from apps.setting.models import Setting
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.views.generic import View
|
||||
from libs import JsonParser, Argument, json_response
|
||||
from apps.setting.utils import AppSetting
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from channels.generic.websocket import WebsocketConsumer
|
||||
from django_redis import get_redis_connection
|
||||
from apps.setting.utils import AppSetting
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from channels.consumer import SyncConsumer
|
||||
from apps.setting.utils import AppSetting
|
||||
from django_redis import get_redis_connection
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.urls import path
|
||||
from .consumers import *
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from .parser import JsonParser, Argument
|
||||
from .decorators import *
|
||||
from .validators import *
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from channels.layers import get_channel_layer
|
||||
from asgiref.sync import async_to_sync
|
||||
import uuid
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from functools import wraps
|
||||
from .utils import json_response
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from git import Repo, RemoteReference, TagReference, InvalidGitRepositoryError
|
||||
import shutil
|
||||
import os
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.utils.deprecation import MiddlewareMixin
|
||||
from django.conf import settings
|
||||
from .utils import json_response
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from .utils import json_response
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
import json
|
||||
|
||||
from .utils import AttrDict
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from paramiko.client import SSHClient, AutoAddPolicy
|
||||
from paramiko.config import SSH_PORT
|
||||
from paramiko.rsakey import RSAKey
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from django.http.response import HttpResponse
|
||||
from django.db.models import QuerySet
|
||||
from datetime import datetime, date as datetime_date
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
import ipaddress
|
||||
from datetime import datetime
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
"""Django's command-line utility for administrative tasks."""
|
||||
import os
|
||||
import sys
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
|
|
@ -1,8 +1,12 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
"""
|
||||
ASGI entrypoint. Configures Django and then runs the application
|
||||
defined in the ASGI_APPLICATION setting.
|
||||
"""
|
||||
|
||||
|
||||
import os
|
||||
import django
|
||||
from channels.routing import get_default_application
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
from channels.routing import ProtocolTypeRouter, ChannelNameRouter, URLRouter
|
||||
from consumer import routing, executors
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,8 @@
|
|||
"""
|
||||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
|
||||
Django settings for spug project.
|
||||
|
||||
Generated by 'django-admin startproject' using Django 2.2.7.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
"""spug URL Configuration
|
||||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
|
||||
The `urlpatterns` list routes URLs to views. For more information please see:
|
||||
https://docs.djangoproject.com/en/2.2/topics/http/urls/
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
"""
|
||||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
WSGI config for spug project.
|
||||
|
||||
It exposes the WSGI callable as a module-level variable named ``application``.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
#!/bin/bash
|
||||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
# start api service
|
||||
|
||||
cd $(dirname $(dirname $0))
|
||||
source ./venv/bin/activate
|
||||
exec gunicorn -b 127.0.0.1:9001 -w 2 --threads 8 --access-logfile - spug.wsgi
|
||||
exec gunicorn -b 127.0.0.1:9001 -w 2 --threads 8 --access-logfile - spug.wsgi
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
#!/bin/bash
|
||||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
# start monitor service
|
||||
|
||||
cd $(dirname $(dirname $0))
|
||||
source ./venv/bin/activate
|
||||
exec python manage.py runmonitor
|
||||
exec python manage.py runmonitor
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
#!/bin/bash
|
||||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
# start schedule service
|
||||
|
||||
cd $(dirname $(dirname $0))
|
||||
source ./venv/bin/activate
|
||||
exec python manage.py runscheduler
|
||||
exec python manage.py runscheduler
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
#!/bin/bash
|
||||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
# start worker service
|
||||
|
||||
cd $(dirname $(dirname $0))
|
||||
source ./venv/bin/activate
|
||||
exec python manage.py runworker ssh_exec
|
||||
exec python manage.py runworker ssh_exec
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
#!/bin/bash
|
||||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
# start websocket service
|
||||
|
||||
cd $(dirname $(dirname $0))
|
||||
source ./venv/bin/activate
|
||||
exec daphne -p 9002 spug.asgi:application
|
||||
exec daphne -p 9002 spug.asgi:application
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
# Copyright: (c) <spug.dev@gmail.com>
|
||||
# Released under the MIT License.
|
||||
import argparse
|
||||
import django
|
||||
import sys
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* Copyright (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
* Copyright (c) <spug.dev@gmail.com>
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
const {override, fixBabelImports, addDecoratorsLegacy} = require('customize-cra');
|
||||
|
||||
module.exports = override(
|
||||
|
|
@ -7,4 +12,4 @@ module.exports = override(
|
|||
libraryDirectory: 'es',
|
||||
style: true,
|
||||
})
|
||||
);
|
||||
);
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@
|
|||
"include": [
|
||||
"src"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* Copyright (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
* Copyright (c) <spug.dev@gmail.com>
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
import React, { Component } from 'react';
|
||||
import {Switch, Route} from 'react-router-dom';
|
||||
import Login from './pages/login';
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* Copyright (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
* Copyright (c) <spug.dev@gmail.com>
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
import React from "react";
|
||||
import Editor from 'react-ace';
|
||||
import 'ace-builds/src-noconflict/ext-language_tools';
|
||||
|
|
@ -15,4 +20,4 @@ export default function (props) {
|
|||
{...props}
|
||||
/>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* Copyright (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
* Copyright (c) <spug.dev@gmail.com>
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
import React from 'react';
|
||||
import { Button } from 'antd';
|
||||
import { hasPermission } from "../libs";
|
||||
|
|
@ -9,4 +14,4 @@ export default function AuthButton(props) {
|
|||
disabled = true;
|
||||
}
|
||||
return <Button {...props} disabled={disabled}>{props.children}</Button>
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* Copyright (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
* Copyright (c) <spug.dev@gmail.com>
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
import React from 'react';
|
||||
import {Card} from 'antd';
|
||||
import { hasPermission } from 'libs';
|
||||
|
|
@ -9,4 +14,4 @@ export default function AuthCard(props) {
|
|||
disabled = true;
|
||||
}
|
||||
return disabled ? null : <Card {...props}>{props.children}</Card>
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* Copyright (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
* Copyright (c) <spug.dev@gmail.com>
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
import React from 'react';
|
||||
import { hasPermission } from "../libs";
|
||||
|
||||
|
|
@ -8,4 +13,4 @@ export default function AuthDiv(props) {
|
|||
disabled = true;
|
||||
}
|
||||
return disabled ? null : <div {...props}>{props.children}</div>
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* Copyright (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
* Copyright (c) <spug.dev@gmail.com>
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
import React from 'react';
|
||||
import {Link} from 'react-router-dom';
|
||||
import { hasPermission } from 'libs';
|
||||
|
|
@ -9,4 +14,4 @@ export default function AuthLink(props) {
|
|||
disabled = true;
|
||||
}
|
||||
return <Link {...props} disabled={disabled}>{props.children}</Link>
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* Copyright (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
* Copyright (c) <spug.dev@gmail.com>
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
import React from 'react';
|
||||
import { Button } from 'antd';
|
||||
import { hasPermission } from 'libs';
|
||||
|
|
@ -11,4 +16,4 @@ export default function LinkButton(props) {
|
|||
return <Button {...props} type="link" style={{padding: 0}} disabled={disabled}>
|
||||
{props.children}
|
||||
</Button>
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* Copyright (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
* Copyright (c) <spug.dev@gmail.com>
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
import React from 'react';
|
||||
import { Row, Col, Form } from 'antd';
|
||||
import styles from './index.module.css';
|
||||
|
|
@ -28,4 +33,4 @@ export default class extends React.Component {
|
|||
</Form>
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* Copyright (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||
* Copyright (c) <spug.dev@gmail.com>
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
import React from 'react';
|
||||
import { Card, Col, Row } from "antd";
|
||||
import lodash from 'lodash';
|
||||
|
|
@ -33,4 +38,4 @@ class StatisticsCard extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
export default StatisticsCard
|
||||
export default StatisticsCard
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue