更新站点到期页面为中英文版本
This commit is contained in:
parent
bed55db16f
commit
f9ac97e7fc
820
agent/cli.py
820
agent/cli.py
@ -1,410 +1,410 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import os
|
||||
import shutil
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
import click
|
||||
import requests
|
||||
|
||||
from agent.proxy import Proxy
|
||||
from agent.server import Server
|
||||
from agent.utils import get_timestamp
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from IPython.terminal.embed import InteractiveShellEmbed
|
||||
|
||||
|
||||
@click.group()
|
||||
def cli():
|
||||
pass
|
||||
|
||||
|
||||
@cli.group()
|
||||
def setup():
|
||||
pass
|
||||
|
||||
|
||||
@cli.command()
|
||||
@click.option("--restart-web-workers", default=True)
|
||||
@click.option("--restart-rq-workers", default=True)
|
||||
@click.option("--restart-redis", default=True)
|
||||
@click.option("--skip-repo-setup", default=False)
|
||||
@click.option("--skip-patches", default=False)
|
||||
def update(restart_web_workers, restart_rq_workers, restart_redis, skip_repo_setup, skip_patches):
|
||||
Server().update_agent_cli(
|
||||
restart_redis=restart_redis,
|
||||
restart_rq_workers=restart_rq_workers,
|
||||
restart_web_workers=restart_web_workers,
|
||||
skip_repo_setup=skip_repo_setup,
|
||||
skip_patches=skip_patches,
|
||||
)
|
||||
|
||||
|
||||
@cli.command()
|
||||
def run_patches():
|
||||
from agent.patch_handler import run_patches
|
||||
|
||||
run_patches()
|
||||
|
||||
|
||||
@cli.command()
|
||||
@click.option("--password", required=True)
|
||||
def ping_server(password: str):
|
||||
"""Ping web api on localhost and check for pong."""
|
||||
res = requests.get(
|
||||
"http://localhost:25052/ping",
|
||||
headers={"Authorization": f"bearer {password}"},
|
||||
)
|
||||
res = res.json()
|
||||
if res["message"] != "pong":
|
||||
raise Exception("pong not in response")
|
||||
print(res)
|
||||
|
||||
|
||||
@setup.command()
|
||||
@click.option("--name", required=True)
|
||||
@click.option("--user", default="jingrow")
|
||||
@click.option("--workers", required=True, type=int)
|
||||
@click.option("--proxy-ip", required=False, type=str, default=None)
|
||||
@click.option("--sentry-dsn", required=False, type=str)
|
||||
@click.option("--jcloud-url", required=False, type=str)
|
||||
def config(name, user, workers, proxy_ip=None, sentry_dsn=None, jcloud_url=None):
|
||||
config = {
|
||||
"benches_directory": f"/home/{user}/benches",
|
||||
"name": name,
|
||||
"tls_directory": f"/home/{user}/agent/tls",
|
||||
"nginx_directory": f"/home/{user}/agent/nginx",
|
||||
"redis_port": 25025,
|
||||
"user": user,
|
||||
"workers": workers,
|
||||
"gunicorn_workers": 2,
|
||||
"web_port": 25052,
|
||||
"jcloud_url": "https://jcloud.jingrow.com",
|
||||
}
|
||||
if jcloud_url:
|
||||
config["jcloud_url"] = jcloud_url
|
||||
if proxy_ip:
|
||||
config["proxy_ip"] = proxy_ip
|
||||
if sentry_dsn:
|
||||
config["sentry_dsn"] = sentry_dsn
|
||||
|
||||
with open("config.json", "w") as f:
|
||||
json.dump(config, f, sort_keys=True, indent=4)
|
||||
|
||||
|
||||
@setup.command()
|
||||
def pyspy():
|
||||
privileges_line = "jingrow ALL = (root) NOPASSWD: /home/jingrow/agent/env/bin/py-spy"
|
||||
with open("/etc/sudoers.d/jingrow", "a+") as sudoers:
|
||||
sudoers.seek(0)
|
||||
lines = sudoers.read().splitlines()
|
||||
|
||||
if privileges_line not in lines:
|
||||
sudoers.write(privileges_line + "\n")
|
||||
|
||||
|
||||
@setup.command()
|
||||
@click.option("--password", prompt=True, hide_input=True)
|
||||
def authentication(password):
|
||||
Server().setup_authentication(password)
|
||||
|
||||
|
||||
@setup.command()
|
||||
@click.option("--sentry-dsn", required=True)
|
||||
def sentry(sentry_dsn):
|
||||
Server().setup_sentry(sentry_dsn)
|
||||
|
||||
|
||||
@setup.command()
|
||||
def supervisor():
|
||||
Server().setup_supervisor()
|
||||
|
||||
|
||||
@setup.command()
|
||||
def nginx():
|
||||
Server().setup_nginx()
|
||||
|
||||
|
||||
@setup.command()
|
||||
@click.option("--domain")
|
||||
@click.option("--jcloud-url")
|
||||
def proxy(domain=None, jcloud_url=None):
|
||||
proxy = Proxy()
|
||||
if domain:
|
||||
config = proxy.get_config(for_update=True)
|
||||
config["domain"] = domain
|
||||
config["jcloud_url"] = jcloud_url
|
||||
proxy.set_config(config, indent=4)
|
||||
proxy.setup_proxy()
|
||||
|
||||
|
||||
@setup.command()
|
||||
@click.option("--domain")
|
||||
def standalone(domain=None):
|
||||
server = Server()
|
||||
if domain:
|
||||
config = server.get_config(for_update=True)
|
||||
config["domain"] = domain
|
||||
config["standalone"] = True
|
||||
server.set_config(config, indent=4)
|
||||
|
||||
|
||||
@setup.command()
|
||||
def database():
|
||||
from agent.job import JobModel, PatchLogModel, StepModel
|
||||
from agent.job import agent_database as database
|
||||
|
||||
database.create_tables([JobModel, StepModel, PatchLogModel])
|
||||
|
||||
|
||||
@setup.command()
|
||||
def site_analytics():
|
||||
from crontab import CronTab
|
||||
|
||||
script_directory = os.path.dirname(__file__)
|
||||
agent_directory = os.path.dirname(os.path.dirname(script_directory))
|
||||
logs_directory = os.path.join(agent_directory, "logs")
|
||||
script = os.path.join(script_directory, "analytics.py")
|
||||
stdout = os.path.join(logs_directory, "analytics.log")
|
||||
stderr = os.path.join(logs_directory, "analytics.error.log")
|
||||
|
||||
cron = CronTab(user=True)
|
||||
command = f"cd {agent_directory} && {sys.executable} {script} 1>> {stdout} 2>> {stderr}"
|
||||
|
||||
if command in str(cron):
|
||||
cron.remove_all(command=command)
|
||||
|
||||
job = cron.new(command=command)
|
||||
job.hour.on(23)
|
||||
job.minute.on(0)
|
||||
cron.write()
|
||||
|
||||
|
||||
@setup.command()
|
||||
def usage():
|
||||
from crontab import CronTab
|
||||
|
||||
script_directory = os.path.dirname(__file__)
|
||||
agent_directory = os.path.dirname(os.path.dirname(script_directory))
|
||||
logs_directory = os.path.join(agent_directory, "logs")
|
||||
script = os.path.join(script_directory, "usage.py")
|
||||
stdout = os.path.join(logs_directory, "usage.log")
|
||||
stderr = os.path.join(logs_directory, "usage.error.log")
|
||||
|
||||
cron = CronTab(user=True)
|
||||
command = f"cd {agent_directory} && {sys.executable} {script} 1>> {stdout} 2>> {stderr}"
|
||||
|
||||
if command not in str(cron):
|
||||
job = cron.new(command=command)
|
||||
job.every(6).hours()
|
||||
job.minute.on(30)
|
||||
cron.write()
|
||||
|
||||
|
||||
@setup.command()
|
||||
def nginx_defer_reload():
|
||||
from crontab import CronTab
|
||||
|
||||
script_directory = os.path.dirname(__file__)
|
||||
agent_directory = os.path.dirname(os.path.dirname(script_directory))
|
||||
logs_directory = os.path.join(agent_directory, "logs")
|
||||
script = os.path.join(script_directory, "nginx_defer_reload.py")
|
||||
stdout = os.path.join(logs_directory, "nginx_defer_reload.log")
|
||||
stderr = os.path.join(logs_directory, "nginx_defer_reload.error.log")
|
||||
|
||||
cron = CronTab(user=True)
|
||||
command = f"cd {agent_directory} && {sys.executable} {script} 1>> {stdout} 2>> {stderr}"
|
||||
|
||||
if command not in str(cron):
|
||||
job = cron.new(command=command)
|
||||
job.minute.every(2)
|
||||
cron.write()
|
||||
|
||||
|
||||
@setup.command()
|
||||
def registry():
|
||||
Server().setup_registry()
|
||||
|
||||
|
||||
@setup.command()
|
||||
@click.option("--url", required=True)
|
||||
@click.option("--token", required=True)
|
||||
def monitor(url, token):
|
||||
from agent.monitor import Monitor
|
||||
|
||||
server = Monitor()
|
||||
server.update_config({"monitor": True, "jcloud_url": url, "jcloud_token": token})
|
||||
server.discover_targets()
|
||||
|
||||
|
||||
@setup.command()
|
||||
def log():
|
||||
Server().setup_log()
|
||||
|
||||
|
||||
@setup.command()
|
||||
def analytics():
|
||||
Server().setup_analytics()
|
||||
|
||||
|
||||
@setup.command()
|
||||
def trace():
|
||||
Server().setup_trace()
|
||||
|
||||
|
||||
@setup.command()
|
||||
@click.option("--password", prompt=True, hide_input=True)
|
||||
def proxysql(password):
|
||||
Server().setup_proxysql(password)
|
||||
|
||||
|
||||
@cli.group()
|
||||
def run():
|
||||
pass
|
||||
|
||||
|
||||
@run.command()
|
||||
def web():
|
||||
executable = shutil.which("gunicorn")
|
||||
port = Server().config["web_port"]
|
||||
arguments = [
|
||||
executable,
|
||||
"--bind",
|
||||
f"127.0.0.1:{port}",
|
||||
"--reload",
|
||||
"--preload",
|
||||
"agent.web:application",
|
||||
]
|
||||
os.execv(executable, arguments)
|
||||
|
||||
|
||||
@run.command()
|
||||
def worker():
|
||||
executable = shutil.which("rq")
|
||||
port = Server().config["redis_port"]
|
||||
arguments = [
|
||||
executable,
|
||||
"worker",
|
||||
"--url",
|
||||
f"redis://127.0.0.1:{port}",
|
||||
]
|
||||
os.execv(executable, arguments)
|
||||
|
||||
|
||||
@cli.command()
|
||||
def discover():
|
||||
from agent.monitor import Monitor
|
||||
|
||||
Monitor().discover_targets()
|
||||
|
||||
|
||||
@cli.group()
|
||||
def bench():
|
||||
pass
|
||||
|
||||
|
||||
@bench.command()
|
||||
@click.argument("bench", required=False)
|
||||
def start(bench):
|
||||
if bench:
|
||||
return Server().benches[bench].start()
|
||||
return Server().start_all_benches()
|
||||
|
||||
|
||||
@bench.command()
|
||||
@click.argument("bench", required=False)
|
||||
def stop(bench):
|
||||
if bench:
|
||||
return Server().benches[bench].stop()
|
||||
return Server().stop_all_benches()
|
||||
|
||||
|
||||
@cli.command(help="Run iPython console.")
|
||||
@click.option(
|
||||
"--config-path",
|
||||
required=False,
|
||||
type=str,
|
||||
help="Path to agent config.json.",
|
||||
)
|
||||
def console(config_path):
|
||||
from atexit import register
|
||||
|
||||
from IPython.terminal.embed import InteractiveShellEmbed
|
||||
|
||||
terminal = InteractiveShellEmbed.instance()
|
||||
|
||||
config_dir = get_config_dir(config_path)
|
||||
if config_dir:
|
||||
try:
|
||||
locals()["server"] = Server(config_dir)
|
||||
print(f"In namespace:\nserver = agent.server.Server('{config_dir}')")
|
||||
except Exception:
|
||||
print(f"Could not initialize agent.server.Server('{config_dir}')")
|
||||
|
||||
elif config_path:
|
||||
print(f"Could not find config.json at '{config_path}'")
|
||||
else:
|
||||
print("Could not find config.json use --config-path to specify")
|
||||
|
||||
register(store_ipython_logs, terminal, config_dir)
|
||||
|
||||
# ref: https://stackoverflow.com/a/74681224
|
||||
try:
|
||||
from IPython.core import ultratb
|
||||
|
||||
ultratb.VerboseTB._tb_highlight = "bg:ansibrightblack"
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
terminal.colors = "neutral"
|
||||
terminal.display_banner = False
|
||||
terminal()
|
||||
|
||||
|
||||
def get_config_dir(config_path: str | None = None) -> str | None:
|
||||
cwd = os.getcwd()
|
||||
if config_path is None:
|
||||
config_path = cwd
|
||||
|
||||
config_dir = Path(config_path)
|
||||
|
||||
if config_dir.suffix == "json" and config_dir.exists():
|
||||
return config_dir.parent.as_posix()
|
||||
|
||||
if config_dir.suffix != "":
|
||||
config_dir = config_dir.parent
|
||||
|
||||
potential = [
|
||||
Path("/home/jingrow/agent/config.json"),
|
||||
config_dir / "config.json",
|
||||
config_dir / ".." / "config.json",
|
||||
]
|
||||
|
||||
for p in potential:
|
||||
if not p.exists():
|
||||
continue
|
||||
try:
|
||||
return p.parent.relative_to(cwd).as_posix()
|
||||
except Exception:
|
||||
return p.parent.as_posix()
|
||||
return None
|
||||
|
||||
|
||||
def store_ipython_logs(terminal: InteractiveShellEmbed, config_dir: str | None):
|
||||
if not config_dir:
|
||||
config_dir = os.getcwd()
|
||||
|
||||
log_path = Path(config_dir) / "logs" / "agent_console.log"
|
||||
log_path.parent.mkdir(exist_ok=True)
|
||||
|
||||
with log_path.open("a") as file:
|
||||
timestamp = get_timestamp()
|
||||
|
||||
file.write(f"# SESSION BEGIN {timestamp}\n")
|
||||
for line in terminal.history_manager.get_range():
|
||||
file.write(f"{line[2]}\n")
|
||||
file.write(f"# SESSION END {timestamp}\n\n")
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import os
|
||||
import shutil
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
import click
|
||||
import requests
|
||||
|
||||
from agent.proxy import Proxy
|
||||
from agent.server import Server
|
||||
from agent.utils import get_timestamp
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from IPython.terminal.embed import InteractiveShellEmbed
|
||||
|
||||
|
||||
@click.group()
|
||||
def cli():
|
||||
pass
|
||||
|
||||
|
||||
@cli.group()
|
||||
def setup():
|
||||
pass
|
||||
|
||||
|
||||
@cli.command()
|
||||
@click.option("--restart-web-workers", default=True)
|
||||
@click.option("--restart-rq-workers", default=True)
|
||||
@click.option("--restart-redis", default=True)
|
||||
@click.option("--skip-repo-setup", default=False)
|
||||
@click.option("--skip-patches", default=False)
|
||||
def update(restart_web_workers, restart_rq_workers, restart_redis, skip_repo_setup, skip_patches):
|
||||
Server().update_agent_cli(
|
||||
restart_redis=restart_redis,
|
||||
restart_rq_workers=restart_rq_workers,
|
||||
restart_web_workers=restart_web_workers,
|
||||
skip_repo_setup=skip_repo_setup,
|
||||
skip_patches=skip_patches,
|
||||
)
|
||||
|
||||
|
||||
@cli.command()
|
||||
def run_patches():
|
||||
from agent.patch_handler import run_patches
|
||||
|
||||
run_patches()
|
||||
|
||||
|
||||
@cli.command()
|
||||
@click.option("--password", required=True)
|
||||
def ping_server(password: str):
|
||||
"""Ping web api on localhost and check for pong."""
|
||||
res = requests.get(
|
||||
"http://localhost:25052/ping",
|
||||
headers={"Authorization": f"bearer {password}"},
|
||||
)
|
||||
res = res.json()
|
||||
if res["message"] != "pong":
|
||||
raise Exception("pong not in response")
|
||||
print(res)
|
||||
|
||||
|
||||
@setup.command()
|
||||
@click.option("--name", required=True)
|
||||
@click.option("--user", default="jingrow")
|
||||
@click.option("--workers", required=True, type=int)
|
||||
@click.option("--proxy-ip", required=False, type=str, default=None)
|
||||
@click.option("--sentry-dsn", required=False, type=str)
|
||||
@click.option("--jcloud-url", required=False, type=str)
|
||||
def config(name, user, workers, proxy_ip=None, sentry_dsn=None, jcloud_url=None):
|
||||
config = {
|
||||
"benches_directory": f"/home/{user}/benches",
|
||||
"name": name,
|
||||
"tls_directory": f"/home/{user}/agent/tls",
|
||||
"nginx_directory": f"/home/{user}/agent/nginx",
|
||||
"redis_port": 25025,
|
||||
"user": user,
|
||||
"workers": workers,
|
||||
"gunicorn_workers": 2,
|
||||
"web_port": 25052,
|
||||
"jcloud_url": "https://cloud.jingrow.com",
|
||||
}
|
||||
if jcloud_url:
|
||||
config["jcloud_url"] = jcloud_url
|
||||
if proxy_ip:
|
||||
config["proxy_ip"] = proxy_ip
|
||||
if sentry_dsn:
|
||||
config["sentry_dsn"] = sentry_dsn
|
||||
|
||||
with open("config.json", "w") as f:
|
||||
json.dump(config, f, sort_keys=True, indent=4)
|
||||
|
||||
|
||||
@setup.command()
|
||||
def pyspy():
|
||||
privileges_line = "jingrow ALL = (root) NOPASSWD: /home/jingrow/agent/env/bin/py-spy"
|
||||
with open("/etc/sudoers.d/jingrow", "a+") as sudoers:
|
||||
sudoers.seek(0)
|
||||
lines = sudoers.read().splitlines()
|
||||
|
||||
if privileges_line not in lines:
|
||||
sudoers.write(privileges_line + "\n")
|
||||
|
||||
|
||||
@setup.command()
|
||||
@click.option("--password", prompt=True, hide_input=True)
|
||||
def authentication(password):
|
||||
Server().setup_authentication(password)
|
||||
|
||||
|
||||
@setup.command()
|
||||
@click.option("--sentry-dsn", required=True)
|
||||
def sentry(sentry_dsn):
|
||||
Server().setup_sentry(sentry_dsn)
|
||||
|
||||
|
||||
@setup.command()
|
||||
def supervisor():
|
||||
Server().setup_supervisor()
|
||||
|
||||
|
||||
@setup.command()
|
||||
def nginx():
|
||||
Server().setup_nginx()
|
||||
|
||||
|
||||
@setup.command()
|
||||
@click.option("--domain")
|
||||
@click.option("--jcloud-url")
|
||||
def proxy(domain=None, jcloud_url=None):
|
||||
proxy = Proxy()
|
||||
if domain:
|
||||
config = proxy.get_config(for_update=True)
|
||||
config["domain"] = domain
|
||||
config["jcloud_url"] = jcloud_url
|
||||
proxy.set_config(config, indent=4)
|
||||
proxy.setup_proxy()
|
||||
|
||||
|
||||
@setup.command()
|
||||
@click.option("--domain")
|
||||
def standalone(domain=None):
|
||||
server = Server()
|
||||
if domain:
|
||||
config = server.get_config(for_update=True)
|
||||
config["domain"] = domain
|
||||
config["standalone"] = True
|
||||
server.set_config(config, indent=4)
|
||||
|
||||
|
||||
@setup.command()
|
||||
def database():
|
||||
from agent.job import JobModel, PatchLogModel, StepModel
|
||||
from agent.job import agent_database as database
|
||||
|
||||
database.create_tables([JobModel, StepModel, PatchLogModel])
|
||||
|
||||
|
||||
@setup.command()
|
||||
def site_analytics():
|
||||
from crontab import CronTab
|
||||
|
||||
script_directory = os.path.dirname(__file__)
|
||||
agent_directory = os.path.dirname(os.path.dirname(script_directory))
|
||||
logs_directory = os.path.join(agent_directory, "logs")
|
||||
script = os.path.join(script_directory, "analytics.py")
|
||||
stdout = os.path.join(logs_directory, "analytics.log")
|
||||
stderr = os.path.join(logs_directory, "analytics.error.log")
|
||||
|
||||
cron = CronTab(user=True)
|
||||
command = f"cd {agent_directory} && {sys.executable} {script} 1>> {stdout} 2>> {stderr}"
|
||||
|
||||
if command in str(cron):
|
||||
cron.remove_all(command=command)
|
||||
|
||||
job = cron.new(command=command)
|
||||
job.hour.on(23)
|
||||
job.minute.on(0)
|
||||
cron.write()
|
||||
|
||||
|
||||
@setup.command()
|
||||
def usage():
|
||||
from crontab import CronTab
|
||||
|
||||
script_directory = os.path.dirname(__file__)
|
||||
agent_directory = os.path.dirname(os.path.dirname(script_directory))
|
||||
logs_directory = os.path.join(agent_directory, "logs")
|
||||
script = os.path.join(script_directory, "usage.py")
|
||||
stdout = os.path.join(logs_directory, "usage.log")
|
||||
stderr = os.path.join(logs_directory, "usage.error.log")
|
||||
|
||||
cron = CronTab(user=True)
|
||||
command = f"cd {agent_directory} && {sys.executable} {script} 1>> {stdout} 2>> {stderr}"
|
||||
|
||||
if command not in str(cron):
|
||||
job = cron.new(command=command)
|
||||
job.every(6).hours()
|
||||
job.minute.on(30)
|
||||
cron.write()
|
||||
|
||||
|
||||
@setup.command()
|
||||
def nginx_defer_reload():
|
||||
from crontab import CronTab
|
||||
|
||||
script_directory = os.path.dirname(__file__)
|
||||
agent_directory = os.path.dirname(os.path.dirname(script_directory))
|
||||
logs_directory = os.path.join(agent_directory, "logs")
|
||||
script = os.path.join(script_directory, "nginx_defer_reload.py")
|
||||
stdout = os.path.join(logs_directory, "nginx_defer_reload.log")
|
||||
stderr = os.path.join(logs_directory, "nginx_defer_reload.error.log")
|
||||
|
||||
cron = CronTab(user=True)
|
||||
command = f"cd {agent_directory} && {sys.executable} {script} 1>> {stdout} 2>> {stderr}"
|
||||
|
||||
if command not in str(cron):
|
||||
job = cron.new(command=command)
|
||||
job.minute.every(2)
|
||||
cron.write()
|
||||
|
||||
|
||||
@setup.command()
|
||||
def registry():
|
||||
Server().setup_registry()
|
||||
|
||||
|
||||
@setup.command()
|
||||
@click.option("--url", required=True)
|
||||
@click.option("--token", required=True)
|
||||
def monitor(url, token):
|
||||
from agent.monitor import Monitor
|
||||
|
||||
server = Monitor()
|
||||
server.update_config({"monitor": True, "jcloud_url": url, "jcloud_token": token})
|
||||
server.discover_targets()
|
||||
|
||||
|
||||
@setup.command()
|
||||
def log():
|
||||
Server().setup_log()
|
||||
|
||||
|
||||
@setup.command()
|
||||
def analytics():
|
||||
Server().setup_analytics()
|
||||
|
||||
|
||||
@setup.command()
|
||||
def trace():
|
||||
Server().setup_trace()
|
||||
|
||||
|
||||
@setup.command()
|
||||
@click.option("--password", prompt=True, hide_input=True)
|
||||
def proxysql(password):
|
||||
Server().setup_proxysql(password)
|
||||
|
||||
|
||||
@cli.group()
|
||||
def run():
|
||||
pass
|
||||
|
||||
|
||||
@run.command()
|
||||
def web():
|
||||
executable = shutil.which("gunicorn")
|
||||
port = Server().config["web_port"]
|
||||
arguments = [
|
||||
executable,
|
||||
"--bind",
|
||||
f"127.0.0.1:{port}",
|
||||
"--reload",
|
||||
"--preload",
|
||||
"agent.web:application",
|
||||
]
|
||||
os.execv(executable, arguments)
|
||||
|
||||
|
||||
@run.command()
|
||||
def worker():
|
||||
executable = shutil.which("rq")
|
||||
port = Server().config["redis_port"]
|
||||
arguments = [
|
||||
executable,
|
||||
"worker",
|
||||
"--url",
|
||||
f"redis://127.0.0.1:{port}",
|
||||
]
|
||||
os.execv(executable, arguments)
|
||||
|
||||
|
||||
@cli.command()
|
||||
def discover():
|
||||
from agent.monitor import Monitor
|
||||
|
||||
Monitor().discover_targets()
|
||||
|
||||
|
||||
@cli.group()
|
||||
def bench():
|
||||
pass
|
||||
|
||||
|
||||
@bench.command()
|
||||
@click.argument("bench", required=False)
|
||||
def start(bench):
|
||||
if bench:
|
||||
return Server().benches[bench].start()
|
||||
return Server().start_all_benches()
|
||||
|
||||
|
||||
@bench.command()
|
||||
@click.argument("bench", required=False)
|
||||
def stop(bench):
|
||||
if bench:
|
||||
return Server().benches[bench].stop()
|
||||
return Server().stop_all_benches()
|
||||
|
||||
|
||||
@cli.command(help="Run iPython console.")
|
||||
@click.option(
|
||||
"--config-path",
|
||||
required=False,
|
||||
type=str,
|
||||
help="Path to agent config.json.",
|
||||
)
|
||||
def console(config_path):
|
||||
from atexit import register
|
||||
|
||||
from IPython.terminal.embed import InteractiveShellEmbed
|
||||
|
||||
terminal = InteractiveShellEmbed.instance()
|
||||
|
||||
config_dir = get_config_dir(config_path)
|
||||
if config_dir:
|
||||
try:
|
||||
locals()["server"] = Server(config_dir)
|
||||
print(f"In namespace:\nserver = agent.server.Server('{config_dir}')")
|
||||
except Exception:
|
||||
print(f"Could not initialize agent.server.Server('{config_dir}')")
|
||||
|
||||
elif config_path:
|
||||
print(f"Could not find config.json at '{config_path}'")
|
||||
else:
|
||||
print("Could not find config.json use --config-path to specify")
|
||||
|
||||
register(store_ipython_logs, terminal, config_dir)
|
||||
|
||||
# ref: https://stackoverflow.com/a/74681224
|
||||
try:
|
||||
from IPython.core import ultratb
|
||||
|
||||
ultratb.VerboseTB._tb_highlight = "bg:ansibrightblack"
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
terminal.colors = "neutral"
|
||||
terminal.display_banner = False
|
||||
terminal()
|
||||
|
||||
|
||||
def get_config_dir(config_path: str | None = None) -> str | None:
|
||||
cwd = os.getcwd()
|
||||
if config_path is None:
|
||||
config_path = cwd
|
||||
|
||||
config_dir = Path(config_path)
|
||||
|
||||
if config_dir.suffix == "json" and config_dir.exists():
|
||||
return config_dir.parent.as_posix()
|
||||
|
||||
if config_dir.suffix != "":
|
||||
config_dir = config_dir.parent
|
||||
|
||||
potential = [
|
||||
Path("/home/jingrow/agent/config.json"),
|
||||
config_dir / "config.json",
|
||||
config_dir / ".." / "config.json",
|
||||
]
|
||||
|
||||
for p in potential:
|
||||
if not p.exists():
|
||||
continue
|
||||
try:
|
||||
return p.parent.relative_to(cwd).as_posix()
|
||||
except Exception:
|
||||
return p.parent.as_posix()
|
||||
return None
|
||||
|
||||
|
||||
def store_ipython_logs(terminal: InteractiveShellEmbed, config_dir: str | None):
|
||||
if not config_dir:
|
||||
config_dir = os.getcwd()
|
||||
|
||||
log_path = Path(config_dir) / "logs" / "agent_console.log"
|
||||
log_path.parent.mkdir(exist_ok=True)
|
||||
|
||||
with log_path.open("a") as file:
|
||||
timestamp = get_timestamp()
|
||||
|
||||
file.write(f"# SESSION BEGIN {timestamp}\n")
|
||||
for line in terminal.history_manager.get_range():
|
||||
file.write(f"{line[2]}\n")
|
||||
file.write(f"# SESSION END {timestamp}\n\n")
|
||||
|
||||
@ -1,123 +1,303 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>This Site is Inactive</title>
|
||||
<style>
|
||||
html {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
||||
color: #1A4469;
|
||||
background-color: #F9FAFA;
|
||||
}
|
||||
|
||||
.container {
|
||||
padding-top: 4rem;
|
||||
max-width: 768px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.logo {
|
||||
text-align: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.logo svg {
|
||||
height: 2rem;
|
||||
}
|
||||
|
||||
.logo h1 {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #171717;
|
||||
}
|
||||
|
||||
.message-container {
|
||||
width: 24rem;
|
||||
margin: 0 auto;
|
||||
background-color: white;
|
||||
padding: 2.5rem;
|
||||
margin-top: 1.5rem;
|
||||
-webkit-box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
||||
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
||||
font-size: 13px;
|
||||
text-align: center;
|
||||
border-radius: 0.375rem;
|
||||
}
|
||||
|
||||
.alert-icon svg {
|
||||
height: 2rem;
|
||||
width: 2rem;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
p {
|
||||
color: #4C5A67;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #1579D0;
|
||||
text-decoration: none;
|
||||
border-bottom: 1px solid #1579D0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="logo">
|
||||
<svg width="40" height="100" viewBox="0 0 160 120" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
d="M93.4626 0H23.5665C10.5511 0 0 10.5511 0 23.5665V93.4626C0 106.478 10.5511 117.029 23.5665 117.029H93.4626C106.478 117.029 117.029 106.478 117.029 93.4626V23.5665C117.029 10.5511 106.478 0 93.4626 0Z"
|
||||
fill="url(#paint0_radial_0_9)" />
|
||||
<path
|
||||
d="M94.4529 48.9854C89.7801 42.265 81.9046 38.3798 73.7142 38.9048C70.1965 32.552 63.6861 28.3517 56.0732 27.8792C50.7704 27.5642 45.4151 29.4018 41.2674 32.972C38.4322 35.4396 36.3846 38.2748 35.1245 41.4775C34.3895 43.3676 32.7094 44.5751 30.9243 44.5751H18.3761V55.0757H30.9243C37.0671 55.0757 42.5799 51.243 44.8901 45.3102C45.5201 43.6826 46.5702 42.265 48.1453 40.8999C50.1929 39.1148 52.8705 38.1698 55.3907 38.3273C59.1709 38.5898 61.8485 40.3224 63.5286 42.475C65.3137 44.4701 66.3113 47.5678 66.8888 50.6655C70.249 49.7204 73.9242 48.9329 77.4419 49.5104C80.3296 49.9829 83.0072 51.5055 84.9498 53.7631C85.2648 54.1307 85.5798 54.4982 85.8424 54.9182C88.3625 58.5409 88.835 63.0037 87.1549 67.4139C85.6324 71.5091 80.0145 75.2369 75.3418 75.2369H38.7997C33.8119 75.2369 29.7167 71.5091 29.0867 66.7314H18.5861C19.2686 77.337 28.0366 85.7374 38.7997 85.7374H75.3943C84.4248 85.7374 93.9278 79.3321 97.0255 71.1416C99.9132 63.4762 98.9681 55.3907 94.5054 48.9329L94.4529 48.9854Z"
|
||||
fill="#FFFAE9" />
|
||||
<defs>
|
||||
<radialGradient id="paint0_radial_0_9" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(-28.5 -58) rotate(54.335) scale(209.246)">
|
||||
<stop stop-color="#40D1FF" />
|
||||
<stop offset="1" stop-color="#0097FF" />
|
||||
</radialGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
<div class="logo-text">
|
||||
<h1>Jingrow Cloud</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="message-container">
|
||||
<div class="alert-icon">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M4.00288 21.3966C2.47791 21.3966 1.51397 19.7584 2.25456 18.4253L10.2527 4.02871C11.0147 2.65709 12.9873 2.6571 13.7493 4.02872L21.7474 18.4253C22.488 19.7584 21.524 21.3966 19.9991 21.3966H4.00288ZM11.9991 18.4126C12.5688 18.4126 13.0307 17.9507 13.0307 17.381C13.0307 16.8113 12.5688 16.3495 11.9991 16.3495C11.4294 16.3495 10.9675 16.8113 10.9675 17.381C10.9675 17.9507 11.4294 18.4126 11.9991 18.4126ZM13 8.8601C13 8.30782 12.5523 7.8601 12 7.8601C11.4477 7.8601 11 8.30782 11 8.8601V13.9074C11 14.4597 11.4477 14.9074 12 14.9074C12.5523 14.9074 13 14.4597 13 13.9074V8.8601Z"
|
||||
fill="#D6932E" />
|
||||
</svg>
|
||||
</div>
|
||||
<h1>
|
||||
This Site is Inactive.
|
||||
</h1>
|
||||
<p class="message">
|
||||
This site has been deactivated. If you are the owner of this site, you can activate it from your
|
||||
<a class="dashboard-url" href="https://jcloud.jingrow.com/dashboard">Jingrow Cloud Dashboard</a>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<script>
|
||||
const dashboardUrl = document.querySelector('.dashboard-url');
|
||||
const siteName = window.location.hostname;
|
||||
dashboardUrl.href = `https://jcloud.jingrow.com/dashboard/${siteName}`;
|
||||
</script>
|
||||
</html>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title id="page-title">This Site is Inactive</title>
|
||||
<style>
|
||||
html {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
||||
color: #1A4469;
|
||||
background-color: #F9FAFA;
|
||||
}
|
||||
|
||||
.container {
|
||||
padding-top: 4rem;
|
||||
max-width: 768px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.logo {
|
||||
text-align: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.logo svg {
|
||||
height: 2rem;
|
||||
}
|
||||
|
||||
.logo h1 {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #171717;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.message-container {
|
||||
width: 24rem;
|
||||
margin: 0 auto;
|
||||
background-color: white;
|
||||
padding: 2.5rem;
|
||||
margin-top: 1.5rem;
|
||||
-webkit-box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
||||
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
||||
font-size: 13px;
|
||||
text-align: center;
|
||||
border-radius: 0.375rem;
|
||||
}
|
||||
|
||||
.alert-icon svg {
|
||||
height: 2rem;
|
||||
width: 2rem;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
p {
|
||||
color: #4C5A67;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #1579D0;
|
||||
text-decoration: none;
|
||||
border-bottom: 1px solid #1579D0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="logo">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0.00 0.00 128.00 128.00">
|
||||
<g stroke-width="2.00" fill="none" stroke-linecap="butt">
|
||||
<path stroke="#8fe3b1" vector-effect="non-scaling-stroke" d="
|
||||
M 64.04 34.07
|
||||
Q 64.93 34.07 65.55 34.69
|
||||
Q 74.55 43.60 82.91 51.96
|
||||
C 87.46 56.52 91.92 55.95 98.45 55.81
|
||||
A 2.52 2.52 0.0 0 0 100.92 53.29
|
||||
L 100.92 49.89
|
||||
A 2.56 2.55 -1.5 0 0 98.23 47.34
|
||||
C 95.84 47.46 91.15 47.62 89.22 45.67
|
||||
Q 81.61 37.99 68.36 24.99
|
||||
Q 66.43 23.09 64.04 23.09
|
||||
Q 61.66 23.09 59.72 24.99
|
||||
Q 46.47 37.98 38.85 45.66
|
||||
C 36.92 47.61 32.23 47.45 29.84 47.32
|
||||
A 2.56 2.55 1.5 0 0 27.15 49.87
|
||||
L 27.15 53.27
|
||||
A 2.52 2.52 0.0 0 0 29.62 55.79
|
||||
C 36.15 55.94 40.61 56.51 45.16 51.95
|
||||
Q 53.53 43.60 62.53 34.69
|
||||
Q 63.15 34.07 64.04 34.07"
|
||||
/>
|
||||
<path stroke="#8fe3b1" vector-effect="non-scaling-stroke" d="
|
||||
M 64.04 101.46
|
||||
C 66.42 101.46 68.47 101.10 68.47 98.24
|
||||
Q 68.49 75.28 68.49 72.56
|
||||
A 0.61 0.61 0.0 0 1 69.10 71.95
|
||||
L 89.64 71.95
|
||||
A 2.50 2.50 0.0 0 0 92.14 69.45
|
||||
L 92.14 65.73
|
||||
A 2.28 2.28 0.0 0 0 89.86 63.45
|
||||
L 69.10 63.45
|
||||
A 0.61 0.61 0.0 0 1 68.49 62.84
|
||||
L 68.49 50.37
|
||||
A 3.05 3.03 2.1 0 0 65.67 47.34
|
||||
Q 65.14 47.31 64.03 47.31
|
||||
Q 62.93 47.31 62.40 47.34
|
||||
A 3.05 3.03 -2.1 0 0 59.58 50.37
|
||||
L 59.58 62.84
|
||||
A 0.61 0.61 0.0 0 1 58.97 63.45
|
||||
L 38.21 63.45
|
||||
A 2.28 2.28 0.0 0 0 35.93 65.73
|
||||
L 35.93 69.45
|
||||
A 2.50 2.50 0.0 0 0 38.43 71.95
|
||||
L 58.97 71.95
|
||||
A 0.61 0.61 0.0 0 1 59.58 72.56
|
||||
Q 59.58 75.28 59.60 98.24
|
||||
C 59.60 101.10 61.65 101.46 64.04 101.46"
|
||||
/>
|
||||
</g>
|
||||
<path fill="#1fc76f" d="
|
||||
M 115.34 95.08
|
||||
A 19.82 19.82 0.0 0 1 95.52 114.90
|
||||
L 32.48 114.90
|
||||
A 19.82 19.82 0.0 0 1 12.66 95.08
|
||||
L 12.66 32.88
|
||||
A 19.82 19.82 0.0 0 1 32.48 13.06
|
||||
L 95.52 13.06
|
||||
A 19.82 19.82 0.0 0 1 115.34 32.88
|
||||
L 115.34 95.08
|
||||
Z
|
||||
M 64.04 34.07
|
||||
Q 64.93 34.07 65.55 34.69
|
||||
Q 74.55 43.60 82.91 51.96
|
||||
C 87.46 56.52 91.92 55.95 98.45 55.81
|
||||
A 2.52 2.52 0.0 0 0 100.92 53.29
|
||||
L 100.92 49.89
|
||||
A 2.56 2.55 -1.5 0 0 98.23 47.34
|
||||
C 95.84 47.46 91.15 47.62 89.22 45.67
|
||||
Q 81.61 37.99 68.36 24.99
|
||||
Q 66.43 23.09 64.04 23.09
|
||||
Q 61.66 23.09 59.72 24.99
|
||||
Q 46.47 37.98 38.85 45.66
|
||||
C 36.92 47.61 32.23 47.45 29.84 47.32
|
||||
A 2.56 2.55 1.5 0 0 27.15 49.87
|
||||
L 27.15 53.27
|
||||
A 2.52 2.52 0.0 0 0 29.62 55.79
|
||||
C 36.15 55.94 40.61 56.51 45.16 51.95
|
||||
Q 53.53 43.60 62.53 34.69
|
||||
Q 63.15 34.07 64.04 34.07
|
||||
Z
|
||||
M 64.04 101.46
|
||||
C 66.42 101.46 68.47 101.10 68.47 98.24
|
||||
Q 68.49 75.28 68.49 72.56
|
||||
A 0.61 0.61 0.0 0 1 69.10 71.95
|
||||
L 89.64 71.95
|
||||
A 2.50 2.50 0.0 0 0 92.14 69.45
|
||||
L 92.14 65.73
|
||||
A 2.28 2.28 0.0 0 0 89.86 63.45
|
||||
L 69.10 63.45
|
||||
A 0.61 0.61 0.0 0 1 68.49 62.84
|
||||
L 68.49 50.37
|
||||
A 3.05 3.03 2.1 0 0 65.67 47.34
|
||||
Q 65.14 47.31 64.03 47.31
|
||||
Q 62.93 47.31 62.40 47.34
|
||||
A 3.05 3.03 -2.1 0 0 59.58 50.37
|
||||
L 59.58 62.84
|
||||
A 0.61 0.61 0.0 0 1 58.97 63.45
|
||||
L 38.21 63.45
|
||||
A 2.28 2.28 0.0 0 0 35.93 65.73
|
||||
L 35.93 69.45
|
||||
A 2.50 2.50 0.0 0 0 38.43 71.95
|
||||
L 58.97 71.95
|
||||
A 0.61 0.61 0.0 0 1 59.58 72.56
|
||||
Q 59.58 75.28 59.60 98.24
|
||||
C 59.60 101.10 61.65 101.46 64.04 101.46
|
||||
Z"
|
||||
/>
|
||||
<path fill="#fffef2" d="
|
||||
M 64.04 23.09
|
||||
Q 66.43 23.09 68.36 24.99
|
||||
Q 81.61 37.99 89.22 45.67
|
||||
C 91.15 47.62 95.84 47.46 98.23 47.34
|
||||
A 2.56 2.55 -1.5 0 1 100.92 49.89
|
||||
L 100.92 53.29
|
||||
A 2.52 2.52 0.0 0 1 98.45 55.81
|
||||
C 91.92 55.95 87.46 56.52 82.91 51.96
|
||||
Q 74.55 43.60 65.55 34.69
|
||||
Q 64.93 34.07 64.04 34.07
|
||||
Q 63.15 34.07 62.53 34.69
|
||||
Q 53.53 43.60 45.16 51.95
|
||||
C 40.61 56.51 36.15 55.94 29.62 55.79
|
||||
A 2.52 2.52 0.0 0 1 27.15 53.27
|
||||
L 27.15 49.87
|
||||
A 2.56 2.55 1.5 0 1 29.84 47.32
|
||||
C 32.23 47.45 36.92 47.61 38.85 45.66
|
||||
Q 46.47 37.98 59.72 24.99
|
||||
Q 61.66 23.09 64.04 23.09
|
||||
Z"
|
||||
/>
|
||||
<path fill="#fffef2" d="
|
||||
M 64.03 47.31
|
||||
Q 65.14 47.31 65.67 47.34
|
||||
A 3.05 3.03 2.1 0 1 68.49 50.37
|
||||
L 68.49 62.84
|
||||
A 0.61 0.61 0.0 0 0 69.10 63.45
|
||||
L 89.86 63.45
|
||||
A 2.28 2.28 0.0 0 1 92.14 65.73
|
||||
L 92.14 69.45
|
||||
A 2.50 2.50 0.0 0 1 89.64 71.95
|
||||
L 69.10 71.95
|
||||
A 0.61 0.61 0.0 0 0 68.49 72.56
|
||||
Q 68.49 75.28 68.47 98.24
|
||||
C 68.47 101.10 66.42 101.46 64.04 101.46
|
||||
C 61.65 101.46 59.60 101.10 59.60 98.24
|
||||
Q 59.58 75.28 59.58 72.56
|
||||
A 0.61 0.61 0.0 0 0 58.97 71.95
|
||||
L 38.43 71.95
|
||||
A 2.50 2.50 0.0 0 1 35.93 69.45
|
||||
L 35.93 65.73
|
||||
A 2.28 2.28 0.0 0 1 38.21 63.45
|
||||
L 58.97 63.45
|
||||
A 0.61 0.61 0.0 0 0 59.58 62.84
|
||||
L 59.58 50.37
|
||||
A 3.05 3.03 -2.1 0 1 62.40 47.34
|
||||
Q 62.93 47.31 64.03 47.31
|
||||
Z"
|
||||
/>
|
||||
</svg>
|
||||
|
||||
<div class="logo-text">
|
||||
<h1 id="logo-title">Jingrow Cloud</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="message-container">
|
||||
<div class="alert-icon">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M4.00288 21.3966C2.47791 21.3966 1.51397 19.7584 2.25456 18.4253L10.2527 4.02871C11.0147 2.65709 12.9873 2.6571 13.7493 4.02872L21.7474 18.4253C22.488 19.7584 21.524 21.3966 19.9991 21.3966H4.00288ZM11.9991 18.4126C12.5688 18.4126 13.0307 17.9507 13.0307 17.381C13.0307 16.8113 12.5688 16.3495 11.9991 16.3495C11.4294 16.3495 10.9675 16.8113 10.9675 17.381C10.9675 17.9507 11.4294 18.4126 11.9991 18.4126ZM13 8.8601C13 8.30782 12.5523 7.8601 12 7.8601C11.4477 7.8601 11 8.30782 11 8.8601V13.9074C11 14.4597 11.4477 14.9074 12 14.9074C12.5523 14.9074 13 14.4597 13 13.9074V8.8601Z"
|
||||
fill="#D6932E" />
|
||||
</svg>
|
||||
</div>
|
||||
<h1 id="inactive-title">
|
||||
This Site is Inactive.
|
||||
</h1>
|
||||
<p class="message" id="inactive-message">
|
||||
This site has been deactivated due to expiration or other reasons. If you are the owner, you can activate it in the
|
||||
<a class="dashboard-url" href="https://cloud.jingrow.com/dashboard">Jingrow Cloud Dashboard</a>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<script>
|
||||
const dashboardUrl = document.querySelector('.dashboard-url');
|
||||
const siteName = window.location.hostname;
|
||||
dashboardUrl.href = `https://cloud.jingrow.com/dashboard/sites/${siteName}`;
|
||||
|
||||
// 国际化内容
|
||||
const i18n = {
|
||||
en: {
|
||||
title: 'This Site is Inactive',
|
||||
logo: 'Jingrow Cloud',
|
||||
inactiveTitle: 'This Site is Inactive.',
|
||||
messageBefore: 'This site has been deactivated due to expiration or other reasons. If you are the owner, you can activate it in the ',
|
||||
dashboard: 'Jingrow Cloud Dashboard',
|
||||
messageAfter: '.'
|
||||
},
|
||||
zh: {
|
||||
title: '站点已停用',
|
||||
logo: 'Jingrow Cloud',
|
||||
inactiveTitle: '站点已停用',
|
||||
messageBefore: '该站点因到期或其他原因已被停用。如果你是站点所有者,可以前往',
|
||||
dashboard: 'Jingrow Cloud 控制台',
|
||||
messageAfter: '激活站点。'
|
||||
}
|
||||
};
|
||||
function getLang() {
|
||||
const lang = navigator.language || navigator.userLanguage;
|
||||
if (lang && lang.toLowerCase().startsWith('zh')) {
|
||||
return 'zh';
|
||||
}
|
||||
return 'en';
|
||||
}
|
||||
const lang = getLang();
|
||||
const dict = i18n[lang];
|
||||
document.getElementById('page-title').innerText = dict.title;
|
||||
document.getElementById('logo-title').innerText = dict.logo;
|
||||
document.getElementById('inactive-title').innerText = dict.inactiveTitle;
|
||||
document.getElementById('inactive-message').innerHTML = `${dict.messageBefore}<a class='dashboard-url' href='https://cloud.jingrow.com/dashboard/sites/${siteName}'>${dict.dashboard}</a>${dict.messageAfter}`;
|
||||
</script>
|
||||
</html>
|
||||
|
||||
@ -1,125 +1,304 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Daily Usage Limit Reached</title>
|
||||
<style>
|
||||
html {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
||||
color: #1A4469;
|
||||
background-color: #F9FAFA;
|
||||
}
|
||||
|
||||
.container {
|
||||
padding-top: 4rem;
|
||||
max-width: 768px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.logo {
|
||||
text-align: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.logo svg {
|
||||
height: 2rem;
|
||||
}
|
||||
|
||||
.logo h1 {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #171717;
|
||||
}
|
||||
|
||||
.message-container {
|
||||
width: 24rem;
|
||||
margin: 0 auto;
|
||||
background-color: white;
|
||||
padding: 2.5rem;
|
||||
margin-top: 1.5rem;
|
||||
-webkit-box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
||||
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
||||
font-size: 13px;
|
||||
text-align: center;
|
||||
border-radius: 0.375rem;
|
||||
}
|
||||
|
||||
.alert-icon svg {
|
||||
height: 2rem;
|
||||
width: 2rem;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
p {
|
||||
color: #4C5A67;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #1579D0;
|
||||
text-decoration: none;
|
||||
border-bottom: 1px solid #1579D0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="logo">
|
||||
<svg width="40" height="100" viewBox="0 0 160 120" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
d="M93.4626 0H23.5665C10.5511 0 0 10.5511 0 23.5665V93.4626C0 106.478 10.5511 117.029 23.5665 117.029H93.4626C106.478 117.029 117.029 106.478 117.029 93.4626V23.5665C117.029 10.5511 106.478 0 93.4626 0Z"
|
||||
fill="url(#paint0_radial_0_9)" />
|
||||
<path
|
||||
d="M94.4529 48.9854C89.7801 42.265 81.9046 38.3798 73.7142 38.9048C70.1965 32.552 63.6861 28.3517 56.0732 27.8792C50.7704 27.5642 45.4151 29.4018 41.2674 32.972C38.4322 35.4396 36.3846 38.2748 35.1245 41.4775C34.3895 43.3676 32.7094 44.5751 30.9243 44.5751H18.3761V55.0757H30.9243C37.0671 55.0757 42.5799 51.243 44.8901 45.3102C45.5201 43.6826 46.5702 42.265 48.1453 40.8999C50.1929 39.1148 52.8705 38.1698 55.3907 38.3273C59.1709 38.5898 61.8485 40.3224 63.5286 42.475C65.3137 44.4701 66.3113 47.5678 66.8888 50.6655C70.249 49.7204 73.9242 48.9329 77.4419 49.5104C80.3296 49.9829 83.0072 51.5055 84.9498 53.7631C85.2648 54.1307 85.5798 54.4982 85.8424 54.9182C88.3625 58.5409 88.835 63.0037 87.1549 67.4139C85.6324 71.5091 80.0145 75.2369 75.3418 75.2369H38.7997C33.8119 75.2369 29.7167 71.5091 29.0867 66.7314H18.5861C19.2686 77.337 28.0366 85.7374 38.7997 85.7374H75.3943C84.4248 85.7374 93.9278 79.3321 97.0255 71.1416C99.9132 63.4762 98.9681 55.3907 94.5054 48.9329L94.4529 48.9854Z"
|
||||
fill="#FFFAE9" />
|
||||
<defs>
|
||||
<radialGradient id="paint0_radial_0_9" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(-28.5 -58) rotate(54.335) scale(209.246)">
|
||||
<stop stop-color="#40D1FF" />
|
||||
<stop offset="1" stop-color="#0097FF" />
|
||||
</radialGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
<div class="logo-text">
|
||||
<h1>Jingrow Cloud</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="message-container">
|
||||
<div class="alert-icon">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M4.00288 21.3966C2.47791 21.3966 1.51397 19.7584 2.25456 18.4253L10.2527 4.02871C11.0147 2.65709 12.9873 2.6571 13.7493 4.02872L21.7474 18.4253C22.488 19.7584 21.524 21.3966 19.9991 21.3966H4.00288ZM11.9991 18.4126C12.5688 18.4126 13.0307 17.9507 13.0307 17.381C13.0307 16.8113 12.5688 16.3495 11.9991 16.3495C11.4294 16.3495 10.9675 16.8113 10.9675 17.381C10.9675 17.9507 11.4294 18.4126 11.9991 18.4126ZM13 8.8601C13 8.30782 12.5523 7.8601 12 7.8601C11.4477 7.8601 11 8.30782 11 8.8601V13.9074C11 14.4597 11.4477 14.9074 12 14.9074C12.5523 14.9074 13 14.4597 13 13.9074V8.8601Z"
|
||||
fill="#D6932E" />
|
||||
</svg>
|
||||
</div>
|
||||
<h1>
|
||||
Daily Usage Limit Reached.
|
||||
</h1>
|
||||
<p class="message">
|
||||
Daily usage limit is reached for this site. If you are the owner of this site, you can upgrade your plan
|
||||
from your <a class="dashboard-url" href="https://jcloud.jingrow.com/dashboard">Jingrow Cloud Dashboard</a>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<script>
|
||||
const dashboardUrl = document.querySelector('.dashboard-url');
|
||||
const siteName = window.location.hostname;
|
||||
dashboardUrl.href = `https://jcloud.jingrow.com/dashboard/${siteName}`;
|
||||
</script>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title id="page-title">Daily Usage Limit Reached</title>
|
||||
<style>
|
||||
html {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
||||
color: #1A4469;
|
||||
background-color: #F9FAFA;
|
||||
}
|
||||
|
||||
.container {
|
||||
padding-top: 4rem;
|
||||
max-width: 768px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.logo {
|
||||
text-align: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.logo svg {
|
||||
height: 2rem;
|
||||
}
|
||||
|
||||
.logo h1 {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #171717;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.message-container {
|
||||
width: 24rem;
|
||||
margin: 0 auto;
|
||||
background-color: white;
|
||||
padding: 2.5rem;
|
||||
margin-top: 1.5rem;
|
||||
-webkit-box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
||||
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
||||
font-size: 13px;
|
||||
text-align: center;
|
||||
border-radius: 0.375rem;
|
||||
}
|
||||
|
||||
.alert-icon svg {
|
||||
height: 2rem;
|
||||
width: 2rem;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
p {
|
||||
color: #4C5A67;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #1579D0;
|
||||
text-decoration: none;
|
||||
border-bottom: 1px solid #1579D0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="logo">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0.00 0.00 128.00 128.00">
|
||||
<g stroke-width="2.00" fill="none" stroke-linecap="butt">
|
||||
<path stroke="#8fe3b1" vector-effect="non-scaling-stroke" d="
|
||||
M 64.04 34.07
|
||||
Q 64.93 34.07 65.55 34.69
|
||||
Q 74.55 43.60 82.91 51.96
|
||||
C 87.46 56.52 91.92 55.95 98.45 55.81
|
||||
A 2.52 2.52 0.0 0 0 100.92 53.29
|
||||
L 100.92 49.89
|
||||
A 2.56 2.55 -1.5 0 0 98.23 47.34
|
||||
C 95.84 47.46 91.15 47.62 89.22 45.67
|
||||
Q 81.61 37.99 68.36 24.99
|
||||
Q 66.43 23.09 64.04 23.09
|
||||
Q 61.66 23.09 59.72 24.99
|
||||
Q 46.47 37.98 38.85 45.66
|
||||
C 36.92 47.61 32.23 47.45 29.84 47.32
|
||||
A 2.56 2.55 1.5 0 0 27.15 49.87
|
||||
L 27.15 53.27
|
||||
A 2.52 2.52 0.0 0 0 29.62 55.79
|
||||
C 36.15 55.94 40.61 56.51 45.16 51.95
|
||||
Q 53.53 43.60 62.53 34.69
|
||||
Q 63.15 34.07 64.04 34.07"
|
||||
/>
|
||||
<path stroke="#8fe3b1" vector-effect="non-scaling-stroke" d="
|
||||
M 64.04 101.46
|
||||
C 66.42 101.46 68.47 101.10 68.47 98.24
|
||||
Q 68.49 75.28 68.49 72.56
|
||||
A 0.61 0.61 0.0 0 1 69.10 71.95
|
||||
L 89.64 71.95
|
||||
A 2.50 2.50 0.0 0 0 92.14 69.45
|
||||
L 92.14 65.73
|
||||
A 2.28 2.28 0.0 0 0 89.86 63.45
|
||||
L 69.10 63.45
|
||||
A 0.61 0.61 0.0 0 1 68.49 62.84
|
||||
L 68.49 50.37
|
||||
A 3.05 3.03 2.1 0 0 65.67 47.34
|
||||
Q 65.14 47.31 64.03 47.31
|
||||
Q 62.93 47.31 62.40 47.34
|
||||
A 3.05 3.03 -2.1 0 0 59.58 50.37
|
||||
L 59.58 62.84
|
||||
A 0.61 0.61 0.0 0 1 58.97 63.45
|
||||
L 38.21 63.45
|
||||
A 2.28 2.28 0.0 0 0 35.93 65.73
|
||||
L 35.93 69.45
|
||||
A 2.50 2.50 0.0 0 0 38.43 71.95
|
||||
L 58.97 71.95
|
||||
A 0.61 0.61 0.0 0 1 59.58 72.56
|
||||
Q 59.58 75.28 59.60 98.24
|
||||
C 59.60 101.10 61.65 101.46 64.04 101.46"
|
||||
/>
|
||||
</g>
|
||||
<path fill="#1fc76f" d="
|
||||
M 115.34 95.08
|
||||
A 19.82 19.82 0.0 0 1 95.52 114.90
|
||||
L 32.48 114.90
|
||||
A 19.82 19.82 0.0 0 1 12.66 95.08
|
||||
L 12.66 32.88
|
||||
A 19.82 19.82 0.0 0 1 32.48 13.06
|
||||
L 95.52 13.06
|
||||
A 19.82 19.82 0.0 0 1 115.34 32.88
|
||||
L 115.34 95.08
|
||||
Z
|
||||
M 64.04 34.07
|
||||
Q 64.93 34.07 65.55 34.69
|
||||
Q 74.55 43.60 82.91 51.96
|
||||
C 87.46 56.52 91.92 55.95 98.45 55.81
|
||||
A 2.52 2.52 0.0 0 0 100.92 53.29
|
||||
L 100.92 49.89
|
||||
A 2.56 2.55 -1.5 0 0 98.23 47.34
|
||||
C 95.84 47.46 91.15 47.62 89.22 45.67
|
||||
Q 81.61 37.99 68.36 24.99
|
||||
Q 66.43 23.09 64.04 23.09
|
||||
Q 61.66 23.09 59.72 24.99
|
||||
Q 46.47 37.98 38.85 45.66
|
||||
C 36.92 47.61 32.23 47.45 29.84 47.32
|
||||
A 2.56 2.55 1.5 0 0 27.15 49.87
|
||||
L 27.15 53.27
|
||||
A 2.52 2.52 0.0 0 0 29.62 55.79
|
||||
C 36.15 55.94 40.61 56.51 45.16 51.95
|
||||
Q 53.53 43.60 62.53 34.69
|
||||
Q 63.15 34.07 64.04 34.07
|
||||
Z
|
||||
M 64.04 101.46
|
||||
C 66.42 101.46 68.47 101.10 68.47 98.24
|
||||
Q 68.49 75.28 68.49 72.56
|
||||
A 0.61 0.61 0.0 0 1 69.10 71.95
|
||||
L 89.64 71.95
|
||||
A 2.50 2.50 0.0 0 0 92.14 69.45
|
||||
L 92.14 65.73
|
||||
A 2.28 2.28 0.0 0 0 89.86 63.45
|
||||
L 69.10 63.45
|
||||
A 0.61 0.61 0.0 0 1 68.49 62.84
|
||||
L 68.49 50.37
|
||||
A 3.05 3.03 2.1 0 0 65.67 47.34
|
||||
Q 65.14 47.31 64.03 47.31
|
||||
Q 62.93 47.31 62.40 47.34
|
||||
A 3.05 3.03 -2.1 0 0 59.58 50.37
|
||||
L 59.58 62.84
|
||||
A 0.61 0.61 0.0 0 1 58.97 63.45
|
||||
L 38.21 63.45
|
||||
A 2.28 2.28 0.0 0 0 35.93 65.73
|
||||
L 35.93 69.45
|
||||
A 2.50 2.50 0.0 0 0 38.43 71.95
|
||||
L 58.97 71.95
|
||||
A 0.61 0.61 0.0 0 1 59.58 72.56
|
||||
Q 59.58 75.28 59.60 98.24
|
||||
C 59.60 101.10 61.65 101.46 64.04 101.46
|
||||
Z"
|
||||
/>
|
||||
<path fill="#fffef2" d="
|
||||
M 64.04 23.09
|
||||
Q 66.43 23.09 68.36 24.99
|
||||
Q 81.61 37.99 89.22 45.67
|
||||
C 91.15 47.62 95.84 47.46 98.23 47.34
|
||||
A 2.56 2.55 -1.5 0 1 100.92 49.89
|
||||
L 100.92 53.29
|
||||
A 2.52 2.52 0.0 0 1 98.45 55.81
|
||||
C 91.92 55.95 87.46 56.52 82.91 51.96
|
||||
Q 74.55 43.60 65.55 34.69
|
||||
Q 64.93 34.07 64.04 34.07
|
||||
Q 63.15 34.07 62.53 34.69
|
||||
Q 53.53 43.60 45.16 51.95
|
||||
C 40.61 56.51 36.15 55.94 29.62 55.79
|
||||
A 2.52 2.52 0.0 0 1 27.15 53.27
|
||||
L 27.15 49.87
|
||||
A 2.56 2.55 1.5 0 1 29.84 47.32
|
||||
C 32.23 47.45 36.92 47.61 38.85 45.66
|
||||
Q 46.47 37.98 59.72 24.99
|
||||
Q 61.66 23.09 64.04 23.09
|
||||
Z"
|
||||
/>
|
||||
<path fill="#fffef2" d="
|
||||
M 64.03 47.31
|
||||
Q 65.14 47.31 65.67 47.34
|
||||
A 3.05 3.03 2.1 0 1 68.49 50.37
|
||||
L 68.49 62.84
|
||||
A 0.61 0.61 0.0 0 0 69.10 63.45
|
||||
L 89.86 63.45
|
||||
A 2.28 2.28 0.0 0 1 92.14 65.73
|
||||
L 92.14 69.45
|
||||
A 2.50 2.50 0.0 0 1 89.64 71.95
|
||||
L 69.10 71.95
|
||||
A 0.61 0.61 0.0 0 0 68.49 72.56
|
||||
Q 68.49 75.28 68.47 98.24
|
||||
C 68.47 101.10 66.42 101.46 64.04 101.46
|
||||
C 61.65 101.46 59.60 101.10 59.60 98.24
|
||||
Q 59.58 75.28 59.58 72.56
|
||||
A 0.61 0.61 0.0 0 0 58.97 71.95
|
||||
L 38.43 71.95
|
||||
A 2.50 2.50 0.0 0 1 35.93 69.45
|
||||
L 35.93 65.73
|
||||
A 2.28 2.28 0.0 0 1 38.21 63.45
|
||||
L 58.97 63.45
|
||||
A 0.61 0.61 0.0 0 0 59.58 62.84
|
||||
L 59.58 50.37
|
||||
A 3.05 3.03 -2.1 0 1 62.40 47.34
|
||||
Q 62.93 47.31 64.03 47.31
|
||||
Z"
|
||||
/>
|
||||
</svg>
|
||||
|
||||
<div class="logo-text">
|
||||
<h1 id="logo-title">Jingrow Cloud</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="message-container">
|
||||
<div class="alert-icon">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M4.00288 21.3966C2.47791 21.3966 1.51397 19.7584 2.25456 18.4253L10.2527 4.02871C11.0147 2.65709 12.9873 2.6571 13.7493 4.02872L21.7474 18.4253C22.488 19.7584 21.524 21.3966 19.9991 21.3966H4.00288ZM11.9991 18.4126C12.5688 18.4126 13.0307 17.9507 13.0307 17.381C13.0307 16.8113 12.5688 16.3495 11.9991 16.3495C11.4294 16.3495 10.9675 16.8113 10.9675 17.381C10.9675 17.9507 11.4294 18.4126 11.9991 18.4126ZM13 8.8601C13 8.30782 12.5523 7.8601 12 7.8601C11.4477 7.8601 11 8.30782 11 8.8601V13.9074C11 14.4597 11.4477 14.9074 12 14.9074C12.5523 14.9074 13 14.4597 13 13.9074V8.8601Z"
|
||||
fill="#D6932E" />
|
||||
</svg>
|
||||
</div>
|
||||
<h1 id="exceeded-title">
|
||||
Daily Usage Limit Reached.
|
||||
</h1>
|
||||
<p class="message" id="exceeded-message">
|
||||
Daily usage limit is reached for this site. If you are the owner of this site, you can upgrade your plan from your <a class="dashboard-url" href="https://cloud.jingrow.com/dashboard">Jingrow Cloud Dashboard</a>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<script>
|
||||
const dashboardUrl = document.querySelector('.dashboard-url');
|
||||
const siteName = window.location.hostname;
|
||||
dashboardUrl.href = `https://cloud.jingrow.com/dashboard/sites/${siteName}`;
|
||||
|
||||
// 国际化内容
|
||||
const i18n = {
|
||||
en: {
|
||||
title: 'Daily Usage Limit Reached',
|
||||
logo: 'Jingrow Cloud',
|
||||
exceededTitle: 'Daily Usage Limit Reached.',
|
||||
messageBefore: 'Daily usage limit is reached for this site. If you are the owner, you can upgrade your plan from your ',
|
||||
dashboard: 'Jingrow Cloud Dashboard',
|
||||
messageAfter: '.'
|
||||
},
|
||||
zh: {
|
||||
title: '已达每日使用上限',
|
||||
logo: 'Jingrow Cloud',
|
||||
exceededTitle: '已达每日使用上限',
|
||||
messageBefore: '该站点已达到每日使用上限。如果你是站点所有者,可以前往',
|
||||
dashboard: 'Jingrow Cloud 控制台',
|
||||
messageAfter: '升级套餐。'
|
||||
}
|
||||
};
|
||||
function getLang() {
|
||||
const lang = navigator.language || navigator.userLanguage;
|
||||
if (lang && lang.toLowerCase().startsWith('zh')) {
|
||||
return 'zh';
|
||||
}
|
||||
return 'en';
|
||||
}
|
||||
const lang = getLang();
|
||||
const dict = i18n[lang];
|
||||
document.getElementById('page-title').innerText = dict.title;
|
||||
document.getElementById('logo-title').innerText = dict.logo;
|
||||
document.getElementById('exceeded-title').innerText = dict.exceededTitle;
|
||||
document.getElementById('exceeded-message').innerHTML = `${dict.messageBefore}<a class='dashboard-url' href='https://cloud.jingrow.com/dashboard/sites/${siteName}'>${dict.dashboard}</a>${dict.messageAfter}`;
|
||||
</script>
|
||||
|
||||
</html>
|
||||
@ -1,115 +1,296 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Jingrow Cloud</title>
|
||||
<style>
|
||||
html {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
||||
color: #1A4469;
|
||||
background-color: #F9FAFA;
|
||||
}
|
||||
|
||||
.container {
|
||||
padding-top: 4rem;
|
||||
max-width: 768px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.logo {
|
||||
text-align: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.logo svg {
|
||||
height: 2rem;
|
||||
}
|
||||
|
||||
.logo h1 {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #171717;
|
||||
}
|
||||
|
||||
.message-container {
|
||||
width: 24rem;
|
||||
margin: 0 auto;
|
||||
background-color: white;
|
||||
padding: 2.5rem;
|
||||
margin-top: 1.5rem;
|
||||
-webkit-box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
||||
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
||||
font-size: 13px;
|
||||
text-align: center;
|
||||
border-radius: 0.375rem;
|
||||
}
|
||||
|
||||
.alert-icon svg {
|
||||
height: 2rem;
|
||||
width: 2rem;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
p {
|
||||
color: #4C5A67;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #1579D0;
|
||||
text-decoration: none;
|
||||
border-bottom: 1px solid #1579D0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="logo">
|
||||
<svg width="40" height="100" viewBox="0 0 160 120" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
d="M93.4626 0H23.5665C10.5511 0 0 10.5511 0 23.5665V93.4626C0 106.478 10.5511 117.029 23.5665 117.029H93.4626C106.478 117.029 117.029 106.478 117.029 93.4626V23.5665C117.029 10.5511 106.478 0 93.4626 0Z"
|
||||
fill="url(#paint0_radial_0_9)" />
|
||||
<path
|
||||
d="M94.4529 48.9854C89.7801 42.265 81.9046 38.3798 73.7142 38.9048C70.1965 32.552 63.6861 28.3517 56.0732 27.8792C50.7704 27.5642 45.4151 29.4018 41.2674 32.972C38.4322 35.4396 36.3846 38.2748 35.1245 41.4775C34.3895 43.3676 32.7094 44.5751 30.9243 44.5751H18.3761V55.0757H30.9243C37.0671 55.0757 42.5799 51.243 44.8901 45.3102C45.5201 43.6826 46.5702 42.265 48.1453 40.8999C50.1929 39.1148 52.8705 38.1698 55.3907 38.3273C59.1709 38.5898 61.8485 40.3224 63.5286 42.475C65.3137 44.4701 66.3113 47.5678 66.8888 50.6655C70.249 49.7204 73.9242 48.9329 77.4419 49.5104C80.3296 49.9829 83.0072 51.5055 84.9498 53.7631C85.2648 54.1307 85.5798 54.4982 85.8424 54.9182C88.3625 58.5409 88.835 63.0037 87.1549 67.4139C85.6324 71.5091 80.0145 75.2369 75.3418 75.2369H38.7997C33.8119 75.2369 29.7167 71.5091 29.0867 66.7314H18.5861C19.2686 77.337 28.0366 85.7374 38.7997 85.7374H75.3943C84.4248 85.7374 93.9278 79.3321 97.0255 71.1416C99.9132 63.4762 98.9681 55.3907 94.5054 48.9329L94.4529 48.9854Z"
|
||||
fill="#FFFAE9" />
|
||||
<defs>
|
||||
<radialGradient id="paint0_radial_0_9" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(-28.5 -58) rotate(54.335) scale(209.246)">
|
||||
<stop stop-color="#40D1FF" />
|
||||
<stop offset="1" stop-color="#0097FF" />
|
||||
</radialGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
<div class="logo-text">
|
||||
<h1>Jingrow Cloud</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="message-container">
|
||||
<div class="alert-icon">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M4.00288 21.3966C2.47791 21.3966 1.51397 19.7584 2.25456 18.4253L10.2527 4.02871C11.0147 2.65709 12.9873 2.6571 13.7493 4.02872L21.7474 18.4253C22.488 19.7584 21.524 21.3966 19.9991 21.3966H4.00288ZM11.9991 18.4126C12.5688 18.4126 13.0307 17.9507 13.0307 17.381C13.0307 16.8113 12.5688 16.3495 11.9991 16.3495C11.4294 16.3495 10.9675 16.8113 10.9675 17.381C10.9675 17.9507 11.4294 18.4126 11.9991 18.4126ZM13 8.8601C13 8.30782 12.5523 7.8601 12 7.8601C11.4477 7.8601 11 8.30782 11 8.8601V13.9074C11 14.4597 11.4477 14.9074 12 14.9074C12.5523 14.9074 13 14.4597 13 13.9074V8.8601Z"
|
||||
fill="#D6932E" />
|
||||
</svg>
|
||||
</div>
|
||||
<h1>
|
||||
Are you lost?
|
||||
</h1>
|
||||
<p class="message">
|
||||
Why don't you start over from <a href="https://jcloud.jingrow.com">Jingrow Cloud</a>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title id="page-title">Jingrow Cloud</title>
|
||||
<style>
|
||||
html {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
||||
color: #1A4469;
|
||||
background-color: #F9FAFA;
|
||||
}
|
||||
|
||||
.container {
|
||||
padding-top: 4rem;
|
||||
max-width: 768px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.logo {
|
||||
text-align: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.logo svg {
|
||||
height: 2rem;
|
||||
}
|
||||
|
||||
.logo h1 {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #171717;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.message-container {
|
||||
width: 24rem;
|
||||
margin: 0 auto;
|
||||
background-color: white;
|
||||
padding: 2.5rem;
|
||||
margin-top: 1.5rem;
|
||||
-webkit-box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
||||
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
||||
font-size: 13px;
|
||||
text-align: center;
|
||||
border-radius: 0.375rem;
|
||||
}
|
||||
|
||||
.alert-icon svg {
|
||||
height: 2rem;
|
||||
width: 2rem;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
p {
|
||||
color: #4C5A67;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #1579D0;
|
||||
text-decoration: none;
|
||||
border-bottom: 1px solid #1579D0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="logo">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0.00 0.00 128.00 128.00">
|
||||
<g stroke-width="2.00" fill="none" stroke-linecap="butt">
|
||||
<path stroke="#8fe3b1" vector-effect="non-scaling-stroke" d="
|
||||
M 64.04 34.07
|
||||
Q 64.93 34.07 65.55 34.69
|
||||
Q 74.55 43.60 82.91 51.96
|
||||
C 87.46 56.52 91.92 55.95 98.45 55.81
|
||||
A 2.52 2.52 0.0 0 0 100.92 53.29
|
||||
L 100.92 49.89
|
||||
A 2.56 2.55 -1.5 0 0 98.23 47.34
|
||||
C 95.84 47.46 91.15 47.62 89.22 45.67
|
||||
Q 81.61 37.99 68.36 24.99
|
||||
Q 66.43 23.09 64.04 23.09
|
||||
Q 61.66 23.09 59.72 24.99
|
||||
Q 46.47 37.98 38.85 45.66
|
||||
C 36.92 47.61 32.23 47.45 29.84 47.32
|
||||
A 2.56 2.55 1.5 0 0 27.15 49.87
|
||||
L 27.15 53.27
|
||||
A 2.52 2.52 0.0 0 0 29.62 55.79
|
||||
C 36.15 55.94 40.61 56.51 45.16 51.95
|
||||
Q 53.53 43.60 62.53 34.69
|
||||
Q 63.15 34.07 64.04 34.07"
|
||||
/>
|
||||
<path stroke="#8fe3b1" vector-effect="non-scaling-stroke" d="
|
||||
M 64.04 101.46
|
||||
C 66.42 101.46 68.47 101.10 68.47 98.24
|
||||
Q 68.49 75.28 68.49 72.56
|
||||
A 0.61 0.61 0.0 0 1 69.10 71.95
|
||||
L 89.64 71.95
|
||||
A 2.50 2.50 0.0 0 0 92.14 69.45
|
||||
L 92.14 65.73
|
||||
A 2.28 2.28 0.0 0 0 89.86 63.45
|
||||
L 69.10 63.45
|
||||
A 0.61 0.61 0.0 0 1 68.49 62.84
|
||||
L 68.49 50.37
|
||||
A 3.05 3.03 2.1 0 0 65.67 47.34
|
||||
Q 65.14 47.31 64.03 47.31
|
||||
Q 62.93 47.31 62.40 47.34
|
||||
A 3.05 3.03 -2.1 0 0 59.58 50.37
|
||||
L 59.58 62.84
|
||||
A 0.61 0.61 0.0 0 1 58.97 63.45
|
||||
L 38.21 63.45
|
||||
A 2.28 2.28 0.0 0 0 35.93 65.73
|
||||
L 35.93 69.45
|
||||
A 2.50 2.50 0.0 0 0 38.43 71.95
|
||||
L 58.97 71.95
|
||||
A 0.61 0.61 0.0 0 1 59.58 72.56
|
||||
Q 59.58 75.28 59.60 98.24
|
||||
C 59.60 101.10 61.65 101.46 64.04 101.46"
|
||||
/>
|
||||
</g>
|
||||
<path fill="#1fc76f" d="
|
||||
M 115.34 95.08
|
||||
A 19.82 19.82 0.0 0 1 95.52 114.90
|
||||
L 32.48 114.90
|
||||
A 19.82 19.82 0.0 0 1 12.66 95.08
|
||||
L 12.66 32.88
|
||||
A 19.82 19.82 0.0 0 1 32.48 13.06
|
||||
L 95.52 13.06
|
||||
A 19.82 19.82 0.0 0 1 115.34 32.88
|
||||
L 115.34 95.08
|
||||
Z
|
||||
M 64.04 34.07
|
||||
Q 64.93 34.07 65.55 34.69
|
||||
Q 74.55 43.60 82.91 51.96
|
||||
C 87.46 56.52 91.92 55.95 98.45 55.81
|
||||
A 2.52 2.52 0.0 0 0 100.92 53.29
|
||||
L 100.92 49.89
|
||||
A 2.56 2.55 -1.5 0 0 98.23 47.34
|
||||
C 95.84 47.46 91.15 47.62 89.22 45.67
|
||||
Q 81.61 37.99 68.36 24.99
|
||||
Q 66.43 23.09 64.04 23.09
|
||||
Q 61.66 23.09 59.72 24.99
|
||||
Q 46.47 37.98 38.85 45.66
|
||||
C 36.92 47.61 32.23 47.45 29.84 47.32
|
||||
A 2.56 2.55 1.5 0 0 27.15 49.87
|
||||
L 27.15 53.27
|
||||
A 2.52 2.52 0.0 0 0 29.62 55.79
|
||||
C 36.15 55.94 40.61 56.51 45.16 51.95
|
||||
Q 53.53 43.60 62.53 34.69
|
||||
Q 63.15 34.07 64.04 34.07
|
||||
Z
|
||||
M 64.04 101.46
|
||||
C 66.42 101.46 68.47 101.10 68.47 98.24
|
||||
Q 68.49 75.28 68.49 72.56
|
||||
A 0.61 0.61 0.0 0 1 69.10 71.95
|
||||
L 89.64 71.95
|
||||
A 2.50 2.50 0.0 0 0 92.14 69.45
|
||||
L 92.14 65.73
|
||||
A 2.28 2.28 0.0 0 0 89.86 63.45
|
||||
L 69.10 63.45
|
||||
A 0.61 0.61 0.0 0 1 68.49 62.84
|
||||
L 68.49 50.37
|
||||
A 3.05 3.03 2.1 0 0 65.67 47.34
|
||||
Q 65.14 47.31 64.03 47.31
|
||||
Q 62.93 47.31 62.40 47.34
|
||||
A 3.05 3.03 -2.1 0 0 59.58 50.37
|
||||
L 59.58 62.84
|
||||
A 0.61 0.61 0.0 0 1 58.97 63.45
|
||||
L 38.21 63.45
|
||||
A 2.28 2.28 0.0 0 0 35.93 65.73
|
||||
L 35.93 69.45
|
||||
A 2.50 2.50 0.0 0 0 38.43 71.95
|
||||
L 58.97 71.95
|
||||
A 0.61 0.61 0.0 0 1 59.58 72.56
|
||||
Q 59.58 75.28 59.60 98.24
|
||||
C 59.60 101.10 61.65 101.46 64.04 101.46
|
||||
Z"
|
||||
/>
|
||||
<path fill="#fffef2" d="
|
||||
M 64.04 23.09
|
||||
Q 66.43 23.09 68.36 24.99
|
||||
Q 81.61 37.99 89.22 45.67
|
||||
C 91.15 47.62 95.84 47.46 98.23 47.34
|
||||
A 2.56 2.55 -1.5 0 1 100.92 49.89
|
||||
L 100.92 53.29
|
||||
A 2.52 2.52 0.0 0 1 98.45 55.81
|
||||
C 91.92 55.95 87.46 56.52 82.91 51.96
|
||||
Q 74.55 43.60 65.55 34.69
|
||||
Q 64.93 34.07 64.04 34.07
|
||||
Q 63.15 34.07 62.53 34.69
|
||||
Q 53.53 43.60 45.16 51.95
|
||||
C 40.61 56.51 36.15 55.94 29.62 55.79
|
||||
A 2.52 2.52 0.0 0 1 27.15 53.27
|
||||
L 27.15 49.87
|
||||
A 2.56 2.55 1.5 0 1 29.84 47.32
|
||||
C 32.23 47.45 36.92 47.61 38.85 45.66
|
||||
Q 46.47 37.98 59.72 24.99
|
||||
Q 61.66 23.09 64.04 23.09
|
||||
Z"
|
||||
/>
|
||||
<path fill="#fffef2" d="
|
||||
M 64.03 47.31
|
||||
Q 65.14 47.31 65.67 47.34
|
||||
A 3.05 3.03 2.1 0 1 68.49 50.37
|
||||
L 68.49 62.84
|
||||
A 0.61 0.61 0.0 0 0 69.10 63.45
|
||||
L 89.86 63.45
|
||||
A 2.28 2.28 0.0 0 1 92.14 65.73
|
||||
L 92.14 69.45
|
||||
A 2.50 2.50 0.0 0 1 89.64 71.95
|
||||
L 69.10 71.95
|
||||
A 0.61 0.61 0.0 0 0 68.49 72.56
|
||||
Q 68.49 75.28 68.47 98.24
|
||||
C 68.47 101.10 66.42 101.46 64.04 101.46
|
||||
C 61.65 101.46 59.60 101.10 59.60 98.24
|
||||
Q 59.58 75.28 59.58 72.56
|
||||
A 0.61 0.61 0.0 0 0 58.97 71.95
|
||||
L 38.43 71.95
|
||||
A 2.50 2.50 0.0 0 1 35.93 69.45
|
||||
L 35.93 65.73
|
||||
A 2.28 2.28 0.0 0 1 38.21 63.45
|
||||
L 58.97 63.45
|
||||
A 0.61 0.61 0.0 0 0 59.58 62.84
|
||||
L 59.58 50.37
|
||||
A 3.05 3.03 -2.1 0 1 62.40 47.34
|
||||
Q 62.93 47.31 64.03 47.31
|
||||
Z"
|
||||
/>
|
||||
</svg>
|
||||
|
||||
<div class="logo-text">
|
||||
<h1 id="logo-title">Jingrow Cloud</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="message-container">
|
||||
<div class="alert-icon">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M4.00288 21.3966C2.47791 21.3966 1.51397 19.7584 2.25456 18.4253L10.2527 4.02871C11.0147 2.65709 12.9873 2.6571 13.7493 4.02872L21.7474 18.4253C22.488 19.7584 21.524 21.3966 19.9991 21.3966H4.00288ZM11.9991 18.4126C12.5688 18.4126 13.0307 17.9507 13.0307 17.381C13.0307 16.8113 12.5688 16.3495 11.9991 16.3495C11.4294 16.3495 10.9675 16.8113 10.9675 17.381C10.9675 17.9507 11.4294 18.4126 11.9991 18.4126ZM13 8.8601C13 8.30782 12.5523 7.8601 12 7.8601C11.4477 7.8601 11 8.30782 11 8.8601V13.9074C11 14.4597 11.4477 14.9074 12 14.9074C12.5523 14.9074 13 14.4597 13 13.9074V8.8601Z"
|
||||
fill="#D6932E" />
|
||||
</svg>
|
||||
</div>
|
||||
<h1 id="home-title">
|
||||
Are you lost?
|
||||
</h1>
|
||||
<p class="message" id="home-message">
|
||||
Why don't you start over from <a class="dashboard-url" href="https://cloud.jingrow.com">Jingrow Cloud</a>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
// 国际化内容
|
||||
const i18n = {
|
||||
en: {
|
||||
title: 'Jingrow Cloud',
|
||||
logo: 'Jingrow Cloud',
|
||||
homeTitle: 'Are you lost?',
|
||||
messageBefore: 'Why don\'t you start over from ',
|
||||
dashboard: 'Jingrow Cloud',
|
||||
messageAfter: '.'
|
||||
},
|
||||
zh: {
|
||||
title: 'Jingrow Cloud',
|
||||
logo: 'Jingrow Cloud',
|
||||
homeTitle: '你迷路了吗?',
|
||||
messageBefore: '你可以从',
|
||||
dashboard: 'Jingrow Cloud 首页',
|
||||
messageAfter: '重新开始。'
|
||||
}
|
||||
};
|
||||
function getLang() {
|
||||
const lang = navigator.language || navigator.userLanguage;
|
||||
if (lang && lang.toLowerCase().startsWith('zh')) {
|
||||
return 'zh';
|
||||
}
|
||||
return 'en';
|
||||
}
|
||||
const lang = getLang();
|
||||
const dict = i18n[lang];
|
||||
document.getElementById('page-title').innerText = dict.title;
|
||||
document.getElementById('logo-title').innerText = dict.logo;
|
||||
document.getElementById('home-title').innerText = dict.homeTitle;
|
||||
document.getElementById('home-message').innerHTML = `${dict.messageBefore}<a class='dashboard-url' href='https://cloud.jingrow.com'>${dict.dashboard}</a>${dict.messageAfter}`;
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -1,122 +1,301 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>This Site is Suspended</title>
|
||||
<style>
|
||||
html {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
||||
color: #1A4469;
|
||||
background-color: #F9FAFA;
|
||||
}
|
||||
|
||||
.container {
|
||||
padding-top: 4rem;
|
||||
max-width: 768px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.logo {
|
||||
text-align: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.logo svg {
|
||||
height: 2rem;
|
||||
}
|
||||
|
||||
.logo h1 {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #171717;
|
||||
}
|
||||
|
||||
.message-container {
|
||||
width: 24rem;
|
||||
margin: 0 auto;
|
||||
background-color: white;
|
||||
padding: 2.5rem;
|
||||
margin-top: 1.5rem;
|
||||
-webkit-box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
||||
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
||||
font-size: 13px;
|
||||
text-align: center;
|
||||
border-radius: 0.375rem;
|
||||
}
|
||||
|
||||
.alert-icon svg {
|
||||
height: 2rem;
|
||||
width: 2rem;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
p {
|
||||
color: #4C5A67;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #1579D0;
|
||||
text-decoration: none;
|
||||
border-bottom: 1px solid #1579D0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="logo">
|
||||
<svg width="40" height="100" viewBox="0 0 160 120" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
d="M93.4626 0H23.5665C10.5511 0 0 10.5511 0 23.5665V93.4626C0 106.478 10.5511 117.029 23.5665 117.029H93.4626C106.478 117.029 117.029 106.478 117.029 93.4626V23.5665C117.029 10.5511 106.478 0 93.4626 0Z"
|
||||
fill="url(#paint0_radial_0_9)" />
|
||||
<path
|
||||
d="M94.4529 48.9854C89.7801 42.265 81.9046 38.3798 73.7142 38.9048C70.1965 32.552 63.6861 28.3517 56.0732 27.8792C50.7704 27.5642 45.4151 29.4018 41.2674 32.972C38.4322 35.4396 36.3846 38.2748 35.1245 41.4775C34.3895 43.3676 32.7094 44.5751 30.9243 44.5751H18.3761V55.0757H30.9243C37.0671 55.0757 42.5799 51.243 44.8901 45.3102C45.5201 43.6826 46.5702 42.265 48.1453 40.8999C50.1929 39.1148 52.8705 38.1698 55.3907 38.3273C59.1709 38.5898 61.8485 40.3224 63.5286 42.475C65.3137 44.4701 66.3113 47.5678 66.8888 50.6655C70.249 49.7204 73.9242 48.9329 77.4419 49.5104C80.3296 49.9829 83.0072 51.5055 84.9498 53.7631C85.2648 54.1307 85.5798 54.4982 85.8424 54.9182C88.3625 58.5409 88.835 63.0037 87.1549 67.4139C85.6324 71.5091 80.0145 75.2369 75.3418 75.2369H38.7997C33.8119 75.2369 29.7167 71.5091 29.0867 66.7314H18.5861C19.2686 77.337 28.0366 85.7374 38.7997 85.7374H75.3943C84.4248 85.7374 93.9278 79.3321 97.0255 71.1416C99.9132 63.4762 98.9681 55.3907 94.5054 48.9329L94.4529 48.9854Z"
|
||||
fill="#FFFAE9" />
|
||||
<defs>
|
||||
<radialGradient id="paint0_radial_0_9" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(-28.5 -58) rotate(54.335) scale(209.246)">
|
||||
<stop stop-color="#40D1FF" />
|
||||
<stop offset="1" stop-color="#0097FF" />
|
||||
</radialGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
<div class="logo-text">
|
||||
<h1>Jingrow Cloud</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="message-container">
|
||||
<div class="alert-icon">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M4.00288 21.3966C2.47791 21.3966 1.51397 19.7584 2.25456 18.4253L10.2527 4.02871C11.0147 2.65709 12.9873 2.6571 13.7493 4.02872L21.7474 18.4253C22.488 19.7584 21.524 21.3966 19.9991 21.3966H4.00288ZM11.9991 18.4126C12.5688 18.4126 13.0307 17.9507 13.0307 17.381C13.0307 16.8113 12.5688 16.3495 11.9991 16.3495C11.4294 16.3495 10.9675 16.8113 10.9675 17.381C10.9675 17.9507 11.4294 18.4126 11.9991 18.4126ZM13 8.8601C13 8.30782 12.5523 7.8601 12 7.8601C11.4477 7.8601 11 8.30782 11 8.8601V13.9074C11 14.4597 11.4477 14.9074 12 14.9074C12.5523 14.9074 13 14.4597 13 13.9074V8.8601Z"
|
||||
fill="#D6932E" />
|
||||
</svg>
|
||||
</div>
|
||||
<h1>
|
||||
This Site is Suspended.
|
||||
</h1>
|
||||
<p class="message">
|
||||
This site has been suspended due to exceeding site limits or a payment failure. If you are the owner
|
||||
of this site, resolve issues related to your site's plan from the <a class="dashboard-url" href="https://jcloud.jingrow.com/dashboard">Jingrow Cloud Dashboard</a>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<script>
|
||||
const dashboardUrl = document.querySelector('.dashboard-url');
|
||||
const siteName = window.location.hostname;
|
||||
dashboardUrl.href = `https://jcloud.jingrow.com/dashboard/${siteName}`;
|
||||
</script>
|
||||
</html>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title id="page-title">This Site is Suspended</title>
|
||||
<style>
|
||||
html {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
||||
color: #1A4469;
|
||||
background-color: #F9FAFA;
|
||||
}
|
||||
|
||||
.container {
|
||||
padding-top: 4rem;
|
||||
max-width: 768px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.logo {
|
||||
text-align: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.logo svg {
|
||||
height: 2rem;
|
||||
}
|
||||
|
||||
.logo h1 {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #171717;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.message-container {
|
||||
width: 24rem;
|
||||
margin: 0 auto;
|
||||
background-color: white;
|
||||
padding: 2.5rem;
|
||||
margin-top: 1.5rem;
|
||||
-webkit-box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
||||
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
||||
font-size: 13px;
|
||||
text-align: center;
|
||||
border-radius: 0.375rem;
|
||||
}
|
||||
|
||||
.alert-icon svg {
|
||||
height: 2rem;
|
||||
width: 2rem;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
p {
|
||||
color: #4C5A67;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #1579D0;
|
||||
text-decoration: none;
|
||||
border-bottom: 1px solid #1579D0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="logo">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0.00 0.00 128.00 128.00">
|
||||
<g stroke-width="2.00" fill="none" stroke-linecap="butt">
|
||||
<path stroke="#8fe3b1" vector-effect="non-scaling-stroke" d="
|
||||
M 64.04 34.07
|
||||
Q 64.93 34.07 65.55 34.69
|
||||
Q 74.55 43.60 82.91 51.96
|
||||
C 87.46 56.52 91.92 55.95 98.45 55.81
|
||||
A 2.52 2.52 0.0 0 0 100.92 53.29
|
||||
L 100.92 49.89
|
||||
A 2.56 2.55 -1.5 0 0 98.23 47.34
|
||||
C 95.84 47.46 91.15 47.62 89.22 45.67
|
||||
Q 81.61 37.99 68.36 24.99
|
||||
Q 66.43 23.09 64.04 23.09
|
||||
Q 61.66 23.09 59.72 24.99
|
||||
Q 46.47 37.98 38.85 45.66
|
||||
C 36.92 47.61 32.23 47.45 29.84 47.32
|
||||
A 2.56 2.55 1.5 0 0 27.15 49.87
|
||||
L 27.15 53.27
|
||||
A 2.52 2.52 0.0 0 0 29.62 55.79
|
||||
C 36.15 55.94 40.61 56.51 45.16 51.95
|
||||
Q 53.53 43.60 62.53 34.69
|
||||
Q 63.15 34.07 64.04 34.07"
|
||||
/>
|
||||
<path stroke="#8fe3b1" vector-effect="non-scaling-stroke" d="
|
||||
M 64.04 101.46
|
||||
C 66.42 101.46 68.47 101.10 68.47 98.24
|
||||
Q 68.49 75.28 68.49 72.56
|
||||
A 0.61 0.61 0.0 0 1 69.10 71.95
|
||||
L 89.64 71.95
|
||||
A 2.50 2.50 0.0 0 0 92.14 69.45
|
||||
L 92.14 65.73
|
||||
A 2.28 2.28 0.0 0 0 89.86 63.45
|
||||
L 69.10 63.45
|
||||
A 0.61 0.61 0.0 0 1 68.49 62.84
|
||||
L 68.49 50.37
|
||||
A 3.05 3.03 2.1 0 0 65.67 47.34
|
||||
Q 65.14 47.31 64.03 47.31
|
||||
Q 62.93 47.31 62.40 47.34
|
||||
A 3.05 3.03 -2.1 0 0 59.58 50.37
|
||||
L 59.58 62.84
|
||||
A 0.61 0.61 0.0 0 1 58.97 63.45
|
||||
L 38.21 63.45
|
||||
A 2.28 2.28 0.0 0 0 35.93 65.73
|
||||
L 35.93 69.45
|
||||
A 2.50 2.50 0.0 0 0 38.43 71.95
|
||||
L 58.97 71.95
|
||||
A 0.61 0.61 0.0 0 1 59.58 72.56
|
||||
Q 59.58 75.28 59.60 98.24
|
||||
C 59.60 101.10 61.65 101.46 64.04 101.46"
|
||||
/>
|
||||
</g>
|
||||
<path fill="#1fc76f" d="
|
||||
M 115.34 95.08
|
||||
A 19.82 19.82 0.0 0 1 95.52 114.90
|
||||
L 32.48 114.90
|
||||
A 19.82 19.82 0.0 0 1 12.66 95.08
|
||||
L 12.66 32.88
|
||||
A 19.82 19.82 0.0 0 1 32.48 13.06
|
||||
L 95.52 13.06
|
||||
A 19.82 19.82 0.0 0 1 115.34 32.88
|
||||
L 115.34 95.08
|
||||
Z
|
||||
M 64.04 34.07
|
||||
Q 64.93 34.07 65.55 34.69
|
||||
Q 74.55 43.60 82.91 51.96
|
||||
C 87.46 56.52 91.92 55.95 98.45 55.81
|
||||
A 2.52 2.52 0.0 0 0 100.92 53.29
|
||||
L 100.92 49.89
|
||||
A 2.56 2.55 -1.5 0 0 98.23 47.34
|
||||
C 95.84 47.46 91.15 47.62 89.22 45.67
|
||||
Q 81.61 37.99 68.36 24.99
|
||||
Q 66.43 23.09 64.04 23.09
|
||||
Q 61.66 23.09 59.72 24.99
|
||||
Q 46.47 37.98 38.85 45.66
|
||||
C 36.92 47.61 32.23 47.45 29.84 47.32
|
||||
A 2.56 2.55 1.5 0 0 27.15 49.87
|
||||
L 27.15 53.27
|
||||
A 2.52 2.52 0.0 0 0 29.62 55.79
|
||||
C 36.15 55.94 40.61 56.51 45.16 51.95
|
||||
Q 53.53 43.60 62.53 34.69
|
||||
Q 63.15 34.07 64.04 34.07
|
||||
Z
|
||||
M 64.04 101.46
|
||||
C 66.42 101.46 68.47 101.10 68.47 98.24
|
||||
Q 68.49 75.28 68.49 72.56
|
||||
A 0.61 0.61 0.0 0 1 69.10 71.95
|
||||
L 89.64 71.95
|
||||
A 2.50 2.50 0.0 0 0 92.14 69.45
|
||||
L 92.14 65.73
|
||||
A 2.28 2.28 0.0 0 0 89.86 63.45
|
||||
L 69.10 63.45
|
||||
A 0.61 0.61 0.0 0 1 68.49 62.84
|
||||
L 68.49 50.37
|
||||
A 3.05 3.03 2.1 0 0 65.67 47.34
|
||||
Q 65.14 47.31 64.03 47.31
|
||||
Q 62.93 47.31 62.40 47.34
|
||||
A 3.05 3.03 -2.1 0 0 59.58 50.37
|
||||
L 59.58 62.84
|
||||
A 0.61 0.61 0.0 0 1 58.97 63.45
|
||||
L 38.21 63.45
|
||||
A 2.28 2.28 0.0 0 0 35.93 65.73
|
||||
L 35.93 69.45
|
||||
A 2.50 2.50 0.0 0 0 38.43 71.95
|
||||
L 58.97 71.95
|
||||
A 0.61 0.61 0.0 0 1 59.58 72.56
|
||||
Q 59.58 75.28 59.60 98.24
|
||||
C 59.60 101.10 61.65 101.46 64.04 101.46
|
||||
Z"
|
||||
/>
|
||||
<path fill="#fffef2" d="
|
||||
M 64.04 23.09
|
||||
Q 66.43 23.09 68.36 24.99
|
||||
Q 81.61 37.99 89.22 45.67
|
||||
C 91.15 47.62 95.84 47.46 98.23 47.34
|
||||
A 2.56 2.55 -1.5 0 1 100.92 49.89
|
||||
L 100.92 53.29
|
||||
A 2.52 2.52 0.0 0 1 98.45 55.81
|
||||
C 91.92 55.95 87.46 56.52 82.91 51.96
|
||||
Q 74.55 43.60 65.55 34.69
|
||||
Q 64.93 34.07 64.04 34.07
|
||||
Q 63.15 34.07 62.53 34.69
|
||||
Q 53.53 43.60 45.16 51.95
|
||||
C 40.61 56.51 36.15 55.94 29.62 55.79
|
||||
A 2.52 2.52 0.0 0 1 27.15 53.27
|
||||
L 27.15 49.87
|
||||
A 2.56 2.55 1.5 0 1 29.84 47.32
|
||||
C 32.23 47.45 36.92 47.61 38.85 45.66
|
||||
Q 46.47 37.98 59.72 24.99
|
||||
Q 61.66 23.09 64.04 23.09
|
||||
Z"
|
||||
/>
|
||||
<path fill="#fffef2" d="
|
||||
M 64.03 47.31
|
||||
Q 65.14 47.31 65.67 47.34
|
||||
A 3.05 3.03 2.1 0 1 68.49 50.37
|
||||
L 68.49 62.84
|
||||
A 0.61 0.61 0.0 0 0 69.10 63.45
|
||||
L 89.86 63.45
|
||||
A 2.28 2.28 0.0 0 1 92.14 65.73
|
||||
L 92.14 69.45
|
||||
A 2.50 2.50 0.0 0 1 89.64 71.95
|
||||
L 69.10 71.95
|
||||
A 0.61 0.61 0.0 0 0 68.49 72.56
|
||||
Q 68.49 75.28 68.47 98.24
|
||||
C 68.47 101.10 66.42 101.46 64.04 101.46
|
||||
C 61.65 101.46 59.60 101.10 59.60 98.24
|
||||
Q 59.58 75.28 59.58 72.56
|
||||
A 0.61 0.61 0.0 0 0 58.97 71.95
|
||||
L 38.43 71.95
|
||||
A 2.50 2.50 0.0 0 1 35.93 69.45
|
||||
L 35.93 65.73
|
||||
A 2.28 2.28 0.0 0 1 38.21 63.45
|
||||
L 58.97 63.45
|
||||
A 0.61 0.61 0.0 0 0 59.58 62.84
|
||||
L 59.58 50.37
|
||||
A 3.05 3.03 -2.1 0 1 62.40 47.34
|
||||
Q 62.93 47.31 64.03 47.31
|
||||
Z"
|
||||
/>
|
||||
</svg>
|
||||
|
||||
<div class="logo-text">
|
||||
<h1 id="logo-title">Jingrow Cloud</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="message-container">
|
||||
<div class="alert-icon">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M4.00288 21.3966C2.47791 21.3966 1.51397 19.7584 2.25456 18.4253L10.2527 4.02871C11.0147 2.65709 12.9873 2.6571 13.7493 4.02872L21.7474 18.4253C22.488 19.7584 21.524 21.3966 19.9991 21.3966H4.00288ZM11.9991 18.4126C12.5688 18.4126 13.0307 17.9507 13.0307 17.381C13.0307 16.8113 12.5688 16.3495 11.9991 16.3495C11.4294 16.3495 10.9675 16.8113 10.9675 17.381C10.9675 17.9507 11.4294 18.4126 11.9991 18.4126ZM13 8.8601C13 8.30782 12.5523 7.8601 12 7.8601C11.4477 7.8601 11 8.30782 11 8.8601V13.9074C11 14.4597 11.4477 14.9074 12 14.9074C12.5523 14.9074 13 14.4597 13 13.9074V8.8601Z"
|
||||
fill="#D6932E" />
|
||||
</svg>
|
||||
</div>
|
||||
<h1 id="suspended-title">
|
||||
This Site is Suspended.
|
||||
</h1>
|
||||
<p class="message" id="suspended-message">
|
||||
This site has been suspended due to exceeding site limits or a payment failure. If you are the owner of this site, resolve issues related to your site's plan from the <a class="dashboard-url" href="https://cloud.jingrow.com/dashboard">Jingrow Cloud Dashboard</a>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<script>
|
||||
const dashboardUrl = document.querySelector('.dashboard-url');
|
||||
const siteName = window.location.hostname;
|
||||
dashboardUrl.href = `https://cloud.jingrow.com/dashboard/sites/${siteName}`;
|
||||
|
||||
// 国际化内容
|
||||
const i18n = {
|
||||
en: {
|
||||
title: 'This Site is Suspended',
|
||||
logo: 'Jingrow Cloud',
|
||||
suspendedTitle: 'This Site is Suspended.',
|
||||
messageBefore: 'This site has been suspended due to exceeding site limits or a payment failure. If you are the owner, please resolve issues related to your site\'s plan from the ',
|
||||
dashboard: 'Jingrow Cloud Dashboard',
|
||||
messageAfter: '.'
|
||||
},
|
||||
zh: {
|
||||
title: '站点已被暂停',
|
||||
logo: 'Jingrow Cloud',
|
||||
suspendedTitle: '站点已被暂停',
|
||||
messageBefore: '该站点因超出配额或支付失败已被暂停。如果你是站点所有者,请前往',
|
||||
dashboard: 'Jingrow Cloud 控制台',
|
||||
messageAfter: '处理相关问题。'
|
||||
}
|
||||
};
|
||||
function getLang() {
|
||||
const lang = navigator.language || navigator.userLanguage;
|
||||
if (lang && lang.toLowerCase().startsWith('zh')) {
|
||||
return 'zh';
|
||||
}
|
||||
return 'en';
|
||||
}
|
||||
const lang = getLang();
|
||||
const dict = i18n[lang];
|
||||
document.getElementById('page-title').innerText = dict.title;
|
||||
document.getElementById('logo-title').innerText = dict.logo;
|
||||
document.getElementById('suspended-title').innerText = dict.suspendedTitle;
|
||||
document.getElementById('suspended-message').innerHTML = `${dict.messageBefore}<a class='dashboard-url' href='https://cloud.jingrow.com/dashboard/sites/${siteName}'>${dict.dashboard}</a>${dict.messageAfter}`;
|
||||
</script>
|
||||
</html>
|
||||
|
||||
@ -1,88 +1,120 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>This Site is Suspended</title>
|
||||
<style>
|
||||
html {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
||||
color: #1A4469;
|
||||
background-color: #F9FAFA;
|
||||
}
|
||||
|
||||
.container {
|
||||
padding-top: 4rem;
|
||||
max-width: 768px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.logo {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.logo svg {
|
||||
height: 1rem;
|
||||
}
|
||||
|
||||
.message-container {
|
||||
width: 24rem;
|
||||
margin: 0 auto;
|
||||
background-color: white;
|
||||
padding: 2.5rem;
|
||||
margin-top: 1.5rem;
|
||||
-webkit-box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
||||
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
||||
font-size: 13px;
|
||||
text-align: center;
|
||||
border-radius: 0.375rem;
|
||||
}
|
||||
|
||||
.alert-icon svg {
|
||||
height: 2rem;
|
||||
width: 2rem;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
p {
|
||||
color: #4C5A67;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #1579D0;
|
||||
text-decoration: none;
|
||||
border-bottom: 1px solid #1579D0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="message-container">
|
||||
<div class="alert-icon">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M4.00288 21.3966C2.47791 21.3966 1.51397 19.7584 2.25456 18.4253L10.2527 4.02871C11.0147 2.65709 12.9873 2.6571 13.7493 4.02872L21.7474 18.4253C22.488 19.7584 21.524 21.3966 19.9991 21.3966H4.00288ZM11.9991 18.4126C12.5688 18.4126 13.0307 17.9507 13.0307 17.381C13.0307 16.8113 12.5688 16.3495 11.9991 16.3495C11.4294 16.3495 10.9675 16.8113 10.9675 17.381C10.9675 17.9507 11.4294 18.4126 11.9991 18.4126ZM13 8.8601C13 8.30782 12.5523 7.8601 12 7.8601C11.4477 7.8601 11 8.30782 11 8.8601V13.9074C11 14.4597 11.4477 14.9074 12 14.9074C12.5523 14.9074 13 14.4597 13 13.9074V8.8601Z"
|
||||
fill="#D6932E" />
|
||||
</svg>
|
||||
</div>
|
||||
<h1>
|
||||
This Site is Suspended.
|
||||
</h1>
|
||||
<p class="message">
|
||||
This site has been suspended due to exceeding site limits or a payment failure. If you are the owner
|
||||
of this site, resolve issues related to your site's plan from the <a href="https://jcloud.jingrow.com/dashboard/saas/login">Dashboard</a>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title id="page-title">This Site is Suspended</title>
|
||||
<style>
|
||||
html {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
||||
color: #1A4469;
|
||||
background-color: #F9FAFA;
|
||||
}
|
||||
|
||||
.container {
|
||||
padding-top: 4rem;
|
||||
max-width: 768px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.logo {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.logo svg {
|
||||
height: 1rem;
|
||||
}
|
||||
|
||||
.message-container {
|
||||
width: 24rem;
|
||||
margin: 0 auto;
|
||||
background-color: white;
|
||||
padding: 2.5rem;
|
||||
margin-top: 1.5rem;
|
||||
-webkit-box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
||||
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
||||
font-size: 13px;
|
||||
text-align: center;
|
||||
border-radius: 0.375rem;
|
||||
}
|
||||
|
||||
.alert-icon svg {
|
||||
height: 2rem;
|
||||
width: 2rem;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
p {
|
||||
color: #4C5A67;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #1579D0;
|
||||
text-decoration: none;
|
||||
border-bottom: 1px solid #1579D0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="message-container">
|
||||
<div class="alert-icon">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M4.00288 21.3966C2.47791 21.3966 1.51397 19.7584 2.25456 18.4253L10.2527 4.02871C11.0147 2.65709 12.9873 2.6571 13.7493 4.02872L21.7474 18.4253C22.488 19.7584 21.524 21.3966 19.9991 21.3966H4.00288ZM11.9991 18.4126C12.5688 18.4126 13.0307 17.9507 13.0307 17.381C13.0307 16.8113 12.5688 16.3495 11.9991 16.3495C11.4294 16.3495 10.9675 16.8113 10.9675 17.381C10.9675 17.9507 11.4294 18.4126 11.9991 18.4126ZM13 8.8601C13 8.30782 12.5523 7.8601 12 7.8601C11.4477 7.8601 11 8.30782 11 8.8601V13.9074C11 14.4597 11.4477 14.9074 12 14.9074C12.5523 14.9074 13 14.4597 13 13.9074V8.8601Z"
|
||||
fill="#D6932E" />
|
||||
</svg>
|
||||
</div>
|
||||
<h1 id="suspended-title">
|
||||
This Site is Suspended.
|
||||
</h1>
|
||||
<p class="message" id="suspended-message">
|
||||
This site has been suspended due to exceeding site limits or a payment failure. If you are the owner of this site, resolve issues related to your site's plan from the <a class="dashboard-url" href="https://cloud.jingrow.com/dashboard/saas/login">Dashboard</a>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
const dashboardUrl = document.querySelector('.dashboard-url');
|
||||
// saas 版 dashboard 链接无需拼接域名
|
||||
// 国际化内容
|
||||
const i18n = {
|
||||
en: {
|
||||
title: 'This Site is Suspended',
|
||||
suspendedTitle: 'This Site is Suspended.',
|
||||
messageBefore: 'This site has been suspended due to exceeding site limits or a payment failure. If you are the owner, please resolve issues related to your site\'s plan from the ',
|
||||
dashboard: 'Dashboard',
|
||||
messageAfter: '.'
|
||||
},
|
||||
zh: {
|
||||
title: '站点已被暂停',
|
||||
suspendedTitle: '站点已被暂停',
|
||||
messageBefore: '该站点因超出配额或支付失败已被暂停。如果你是站点所有者,请前往',
|
||||
dashboard: '控制台',
|
||||
messageAfter: '处理相关问题。'
|
||||
}
|
||||
};
|
||||
function getLang() {
|
||||
const lang = navigator.language || navigator.userLanguage;
|
||||
if (lang && lang.toLowerCase().startsWith('zh')) {
|
||||
return 'zh';
|
||||
}
|
||||
return 'en';
|
||||
}
|
||||
const lang = getLang();
|
||||
const dict = i18n[lang];
|
||||
document.getElementById('page-title').innerText = dict.title;
|
||||
document.getElementById('suspended-title').innerText = dict.suspendedTitle;
|
||||
document.getElementById('suspended-message').innerHTML = `${dict.messageBefore}<a class='dashboard-url' href='https://cloud.jingrow.com/dashboard/saas/login'>${dict.dashboard}</a>${dict.messageAfter}`;
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
1662
agent/server.py
1662
agent/server.py
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user