Skip to content

Commit

Permalink
Release 0.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
wh1te909 committed Aug 31, 2021
2 parents eca8f32 + 8f510dd commit 38179b9
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 30 deletions.
13 changes: 9 additions & 4 deletions .devcontainer/api.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,17 @@ EXPOSE 8000 8383 8005
RUN groupadd -g 1000 tactical && \
useradd -u 1000 -g 1000 tactical

# Copy Dev python reqs
COPY ./requirements.txt /
# Copy nats-api file
COPY natsapi/bin/nats-api /usr/local/bin/
RUN chmod +x /usr/local/bin/nats-api

# Copy Docker Entrypoint
COPY ./entrypoint.sh /
# Copy dev python reqs
COPY .devcontainer/requirements.txt /

# Copy docker entrypoint.sh
COPY .devcontainer/entrypoint.sh /
RUN chmod +x /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]

WORKDIR ${WORKSPACE_DIR}/api/tacticalrmm
19 changes: 2 additions & 17 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ services:
image: api-dev
restart: always
build:
context: .
dockerfile: ./api.dockerfile
context: ..
dockerfile: .devcontainer/api.dockerfile
command: ["tactical-api"]
environment:
API_PORT: ${API_PORT}
Expand Down Expand Up @@ -127,9 +127,6 @@ services:
init-dev:
container_name: trmm-init-dev
image: api-dev
build:
context: .
dockerfile: ./api.dockerfile
restart: on-failure
command: ["tactical-init-dev"]
environment:
Expand All @@ -156,9 +153,6 @@ services:
celery-dev:
container_name: trmm-celery-dev
image: api-dev
build:
context: .
dockerfile: ./api.dockerfile
command: ["tactical-celery-dev"]
restart: always
networks:
Expand All @@ -174,9 +168,6 @@ services:
celerybeat-dev:
container_name: trmm-celerybeat-dev
image: api-dev
build:
context: .
dockerfile: ./api.dockerfile
command: ["tactical-celerybeat-dev"]
restart: always
networks:
Expand All @@ -192,9 +183,6 @@ services:
websockets-dev:
container_name: trmm-websockets-dev
image: api-dev
build:
context: .
dockerfile: ./api.dockerfile
command: ["tactical-websockets-dev"]
restart: always
networks:
Expand Down Expand Up @@ -234,9 +222,6 @@ services:
container_name: trmm-mkdocs-dev
image: api-dev
restart: always
build:
context: .
dockerfile: ./api.dockerfile
command: ["tactical-mkdocs-dev"]
ports:
- "8005:8005"
Expand Down
6 changes: 5 additions & 1 deletion api/tacticalrmm/agents/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,11 @@ def run_script(request):
else:
return notify_error("Custom Field was invalid")

value = r if request.data["save_all_output"] else r.split("\n")[-1].strip()
value = (
r.strip()
if request.data["save_all_output"]
else r.strip().split("\n")[-1].strip()
)

field.save_to_field(value)
return Response(r)
Expand Down
1 change: 0 additions & 1 deletion api/tacticalrmm/apiv3/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,6 @@ def get(self, request, pk, agentid):

def patch(self, request, pk, agentid):
from alerts.models import Alert
from logs.models import AuditLog

agent = get_object_or_404(Agent, agent_id=agentid)
task = get_object_or_404(AutomatedTask, pk=pk)
Expand Down
4 changes: 2 additions & 2 deletions api/tacticalrmm/autotasks/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,9 +413,9 @@ def save_collector_results(self):
agent_field = self.custom_field.get_or_create_field_value(self.agent)

value = (
self.stdout
self.stdout.strip()
if self.collector_all_output
else self.stdout.split("\n")[-1].strip()
else self.stdout.strip().split("\n")[-1].strip()
)
agent_field.save_to_field(value)

Expand Down
6 changes: 3 additions & 3 deletions api/tacticalrmm/tacticalrmm/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
AUTH_USER_MODEL = "accounts.User"

# latest release
TRMM_VERSION = "0.8.0"
TRMM_VERSION = "0.8.1"

# bump this version everytime vue code is changed
# to alert user they need to manually refresh their browser
APP_VER = "0.0.142"
APP_VER = "0.0.143"

# https://github.com/wh1te909/rmmagent
LATEST_AGENT_VER = "1.6.0"

MESH_VER = "0.9.15"
MESH_VER = "0.9.16"

NATS_SERVER_VER = "2.3.3"

Expand Down
4 changes: 3 additions & 1 deletion api/tacticalrmm/tacticalrmm/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,9 @@ def run_nats_api_cmd(mode: str, ids: list[str] = [], timeout: int = 30) -> None:
"dbname": db["NAME"],
}

with tempfile.NamedTemporaryFile() as fp:
with tempfile.NamedTemporaryFile(
dir="/opt/tactical/tmp" if settings.DOCKER_BUILD else None
) as fp:
with open(fp.name, "w") as f:
json.dump(config, f)

Expand Down
2 changes: 1 addition & 1 deletion web/src/components/scripts/ScriptFormModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export default {
// script form logic
const script = props.script
? ref(Object.assign({}, props.script))
: ref({ shell: "powershell", default_timeout: 90 });
: ref({ shell: "powershell", default_timeout: 90, args: [] });
if (props.clone) script.value.name = `(Copy) ${script.value.name}`;
const code = ref("");
Expand Down

0 comments on commit 38179b9

Please sign in to comment.