Skip to content

Commit

Permalink
release v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Clivern committed Jan 12, 2022
1 parent f8a49e3 commit 006d80c
Show file tree
Hide file tree
Showing 31 changed files with 252 additions and 121 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ REDIS_DB=0
REDIS_PASSWORD=

NEW_RELIC_CONFIG_FILE_PATH=newrelic.ini
GOOGLE_ANALYTICS_ID=G-H555037LBS
25 changes: 22 additions & 3 deletions api_definition.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ info:
license:
name: Apache License 2.0
url: https://github.com/Clivern/Cattle/blob/main/LICENSE
version: 0.2.0
version: 1.0.0
externalDocs:
description: Find out more about cattle
url: https://github.com/Clivern/Cattle
Expand Down Expand Up @@ -241,7 +241,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/Task'
$ref: '#/components/schemas/FinalTask'
'400':
description: Invalid Request
content: {}
Expand All @@ -266,8 +266,27 @@ components:
id:
type: integer
format: int64
result:
status:
type: string
createdAt:
type: string
updatedAt:
type: string
FinalTask:
type: object
properties:
id:
type: integer
format: int64
result:
type: object
properties:
output:
type: string
build_time:
type: string
execution_time:
type: string
status:
type: string
createdAt:
Expand Down
1 change: 1 addition & 0 deletions app/controllers/web/home.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ def get(self, request):
"title": get_config("app_name", "Cattle"),
"description": get_config("app_description", ""),
"base_url": get_config("app_url", ""),
"google_id": get_config("google_analytics_id", ""),
})
6 changes: 6 additions & 0 deletions app/runner/snippet.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ def run(self):
elif self._language == "rust":
code = Runner.rust(self._content, self._version, self._id)

elif self._language == "c":
code = Runner.c(self._content, self._version, self._id)

elif self._language == "cplus":
code = Runner.cplus(self._content, self._version, self._id)

else:
self.logger.error("Invalid programming language {}".format(self._language))
raise Exception("Invalid programming language {}".format(self._language))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,6 @@ REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_DB=0
REDIS_PASSWORD={{ redis_password }}

NEW_RELIC_CONFIG_FILE_PATH=newrelic.ini
GOOGLE_ANALYTICS_ID=G-H555037LBS
17 changes: 10 additions & 7 deletions deployment/ubuntu/configure/roles/common/templates/motd.j2
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
__
/\/'-,
,--''''' /"
____,'. ) \___
'"""""------'"""`-----'

, ,
/ \
((__-^^-,-^^-__))
`-_---' `---_-'
<__|o` 'o|__>
\ ` /
): :(
:o_o:
"-"
<[--------------------]>

Server is Managed by Cattle Ansible Playbook

* Link: https://github.com/Clivern/Cattle
* Version: v0.1.0
* Version: v1.0.0
3 changes: 3 additions & 0 deletions deployment/ubuntu/deploy/roles/application/templates/env.j2
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,6 @@ REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_DB=0
REDIS_PASSWORD={{ redis_password }}

NEW_RELIC_CONFIG_FILE_PATH=newrelic.ini
GOOGLE_ANALYTICS_ID=G-H555037LBS
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ python-dotenv==0.19.2
whitenoise==5.3.0
Faker==11.3.0
django-rq==2.5.1
jsonschema==4.3.3
jsonschema==4.4.0
requests==2.27.1
pindo==0.3.0
pindo==1.0.0
mysqlclient==2.1.0
newrelic==7.2.4.171
unixsig==0.1.1
7 changes: 5 additions & 2 deletions schemas/api/v1/code/create.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
"ruby",
"java",
"go",
"rust"
"rust",
"c",
"cplus"
]
},
"version":{
Expand Down Expand Up @@ -79,7 +81,8 @@
"1.54.0",
"1.55.0",
"1.56.0",
"1.57.0"
"1.57.0",
"9.4.0"
]
}
},
Expand Down
7 changes: 5 additions & 2 deletions schemas/api/v1/code/execute.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
"ruby",
"java",
"go",
"rust"
"rust",
"c",
"cplus"
]
},
"version":{
Expand Down Expand Up @@ -79,7 +81,8 @@
"1.54.0",
"1.55.0",
"1.56.0",
"1.57.0"
"1.57.0",
"9.4.0"
]
}
},
Expand Down
7 changes: 5 additions & 2 deletions schemas/api/v1/code/update.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
"ruby",
"java",
"go",
"rust"
"rust",
"c",
"cplus"
]
},
"version":{
Expand Down Expand Up @@ -86,7 +88,8 @@
"1.54.0",
"1.55.0",
"1.56.0",
"1.57.0"
"1.57.0",
"9.4.0"
]
}
},
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion static/index.html
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/static/logo.png"><title>Cattle - Run and Share Code</title><link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css"><link href="/static/css/chunk-57d77030.db363d35.css" rel="prefetch"><link href="/static/css/chunk-57f2dc43.9c53f226.css" rel="prefetch"><link href="/static/css/chunk-59e19a73.ce99e5eb.css" rel="prefetch"><link href="/static/css/chunk-60d7c062.0791cd1a.css" rel="prefetch"><link href="/static/css/chunk-b25622be.e7a233e2.css" rel="prefetch"><link href="/static/js/chunk-57d77030.8689b89e.js" rel="prefetch"><link href="/static/js/chunk-57f2dc43.14faee91.js" rel="prefetch"><link href="/static/js/chunk-59e19a73.a82fadf9.js" rel="prefetch"><link href="/static/js/chunk-60d7c062.a01c4921.js" rel="prefetch"><link href="/static/js/chunk-b25622be.277aeef2.js" rel="prefetch"><link href="/static/css/chunk-vendors.e4c7b908.css" rel="preload" as="style"><link href="/static/js/app.b20546da.js" rel="preload" as="script"><link href="/static/js/chunk-vendors.56e96662.js" rel="preload" as="script"><link href="/static/css/chunk-vendors.e4c7b908.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but Cattle doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/static/js/chunk-vendors.56e96662.js"></script><script src="/static/js/app.b20546da.js"></script></body></html>
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/static/logo.png"><title>Cattle - Run and Share Code</title><link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css"><script async src="https://www.googletagmanager.com/gtag/js?id={{ google_id }}"></script><script>window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '{{ google_id }}');</script><link href="/static/css/chunk-57d77030.db363d35.css" rel="prefetch"><link href="/static/css/chunk-59e19a73.ce99e5eb.css" rel="prefetch"><link href="/static/css/chunk-60d7c062.0791cd1a.css" rel="prefetch"><link href="/static/css/chunk-7d259924.cd2c08ea.css" rel="prefetch"><link href="/static/css/chunk-93e44130.ca794933.css" rel="prefetch"><link href="/static/js/chunk-57d77030.8689b89e.js" rel="prefetch"><link href="/static/js/chunk-59e19a73.a82fadf9.js" rel="prefetch"><link href="/static/js/chunk-60d7c062.a01c4921.js" rel="prefetch"><link href="/static/js/chunk-7d259924.5c106372.js" rel="prefetch"><link href="/static/js/chunk-93e44130.a568d69f.js" rel="prefetch"><link href="/static/css/chunk-vendors.e4c7b908.css" rel="preload" as="style"><link href="/static/js/app.2fb48d64.js" rel="preload" as="script"><link href="/static/js/chunk-vendors.56e96662.js" rel="preload" as="script"><link href="/static/css/chunk-vendors.e4c7b908.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but Cattle doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/static/js/chunk-vendors.56e96662.js"></script><script src="/static/js/app.2fb48d64.js"></script></body></html>
Loading

0 comments on commit 006d80c

Please sign in to comment.