Skip to content

Commit

Permalink
Release 0.2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
wh1te909 committed Dec 2, 2020
2 parents 361cc08 + d6e8c51 commit ff69bed
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 65 deletions.
2 changes: 1 addition & 1 deletion api/tacticalrmm/logs/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def agent_pending_actions(request, pk):

@api_view()
def all_pending_actions(request):
actions = PendingAction.objects.all()
actions = PendingAction.objects.all().select_related("agent")
return Response(PendingActionSerializer(actions, many=True).data)


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,19 +15,19 @@
AUTH_USER_MODEL = "accounts.User"

# latest release
TRMM_VERSION = "0.2.4"
TRMM_VERSION = "0.2.5"

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

# https://github.com/wh1te909/salt
LATEST_SALT_VER = "1.1.0"

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

MESH_VER = "0.7.9"
MESH_VER = "0.7.10"

SALT_MASTER_VER = "3002.2"

Expand Down
80 changes: 39 additions & 41 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

SCRIPT_VERSION="25"
SCRIPT_VERSION="26"
SCRIPT_URL='https://raw.githubusercontent.com/wh1te909/tacticalrmm/master/install.sh'

GREEN='\033[0;32m'
Expand Down Expand Up @@ -205,12 +205,47 @@ sudo apt install -y mongodb-org
sudo systemctl enable mongod
sudo systemctl restart mongod



print_green 'Installing python, redis and git'

sudo apt update
sudo apt install -y python3.8-venv python3.8-dev python3-pip python3-cherrypy3 python3-setuptools python3-wheel ca-certificates redis git

print_green 'Installing postgresql'

sudo sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt update
sudo apt install -y postgresql-13

print_green 'Creating database for the rmm'

sudo -u postgres psql -c "CREATE DATABASE tacticalrmm"
sudo -u postgres psql -c "CREATE USER ${pgusername} WITH PASSWORD '${pgpw}'"
sudo -u postgres psql -c "ALTER ROLE ${pgusername} SET client_encoding TO 'utf8'"
sudo -u postgres psql -c "ALTER ROLE ${pgusername} SET default_transaction_isolation TO 'read committed'"
sudo -u postgres psql -c "ALTER ROLE ${pgusername} SET timezone TO 'UTC'"
sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE tacticalrmm TO ${pgusername}"

sudo mkdir /rmm
sudo chown ${USER}:${USER} /rmm
sudo mkdir -p /var/log/celery
sudo chown ${USER}:${USER} /var/log/celery
git clone https://github.com/wh1te909/tacticalrmm.git /rmm/
cd /rmm
git config user.email "[email protected]"
git config user.name "Bob"
git checkout master

print_green 'Installing MeshCentral'

MESH_VER=$(grep "^MESH_VER" /rmm/api/tacticalrmm/tacticalrmm/settings.py | awk -F'[= "]' '{print $5}')

sudo mkdir -p /meshcentral/meshcentral-data
sudo chown ${USER}:${USER} -R /meshcentral
cd /meshcentral
npm install meshcentral@0.7.9
npm install meshcentral@${MESH_VER}
sudo chown ${USER}:${USER} -R /meshcentral

meshcfg="$(cat << EOF
Expand Down Expand Up @@ -253,37 +288,6 @@ EOF
)"
echo "${meshcfg}" > /meshcentral/meshcentral-data/config.json

print_green 'Installing python, redis and git'

sudo apt update
sudo apt install -y python3.8-venv python3.8-dev python3-pip python3-cherrypy3 python3-setuptools python3-wheel ca-certificates redis git

print_green 'Installing postgresql'

sudo sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt update
sudo apt install -y postgresql-13

print_green 'Creating database for the rmm'

sudo -u postgres psql -c "CREATE DATABASE tacticalrmm"
sudo -u postgres psql -c "CREATE USER ${pgusername} WITH PASSWORD '${pgpw}'"
sudo -u postgres psql -c "ALTER ROLE ${pgusername} SET client_encoding TO 'utf8'"
sudo -u postgres psql -c "ALTER ROLE ${pgusername} SET default_transaction_isolation TO 'read committed'"
sudo -u postgres psql -c "ALTER ROLE ${pgusername} SET timezone TO 'UTC'"
sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE tacticalrmm TO ${pgusername}"

sudo mkdir /rmm
sudo chown ${USER}:${USER} /rmm
sudo mkdir -p /var/log/celery
sudo chown ${USER}:${USER} /var/log/celery
git clone https://github.com/wh1te909/tacticalrmm.git /rmm/
cd /rmm
git config user.email "[email protected]"
git config user.name "Bob"
git checkout master

localvars="$(cat << EOF
SECRET_KEY = "${DJANGO_SEKRET}"
Expand Down Expand Up @@ -504,14 +508,7 @@ nginxmesh="$(cat << EOF
server {
listen 80;
server_name ${meshdomain};
location / {
proxy_pass http://127.0.0.1:800;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-Host \$host:\$server_port;
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto \$scheme;
}
return 301 https://\$server_name\$request_uri;
}
server {
Expand All @@ -530,6 +527,7 @@ server {
proxy_pass http://127.0.0.1:4430/;
proxy_http_version 1.1;
proxy_set_header Host \$host;
proxy_set_header Upgrade \$http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Forwarded-Host \$host:\$server_port;
Expand Down
22 changes: 12 additions & 10 deletions restore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pgpw="hunter2"

#####################################################

SCRIPT_VERSION="8"
SCRIPT_VERSION="9"
SCRIPT_URL='https://raw.githubusercontent.com/wh1te909/tacticalrmm/master/restore.sh'

GREEN='\033[0;32m'
Expand Down Expand Up @@ -207,15 +207,6 @@ sudo systemctl restart mongod
sleep 5
mongorestore --gzip $tmp_dir/meshcentral/mongo

print_green 'Restoring MeshCentral'

sudo tar -xzf $tmp_dir/meshcentral/mesh.tar.gz -C /
sudo chown ${USER}:${USER} -R /meshcentral
cd /meshcentral
npm install [email protected]


print_green 'Restoring the backend'

sudo mkdir /rmm
sudo chown ${USER}:${USER} /rmm
Expand All @@ -227,6 +218,17 @@ git config user.email "[email protected]"
git config user.name "Bob"
git checkout master

print_green 'Restoring MeshCentral'

MESH_VER=$(grep "^MESH_VER" /rmm/api/tacticalrmm/tacticalrmm/settings.py | awk -F'[= "]' '{print $5}')
sudo tar -xzf $tmp_dir/meshcentral/mesh.tar.gz -C /
sudo chown ${USER}:${USER} -R /meshcentral
cd /meshcentral
npm install meshcentral@${MESH_VER}


print_green 'Restoring the backend'

cp $tmp_dir/rmm/local_settings.py /rmm/api/tacticalrmm/tacticalrmm/
cp $tmp_dir/rmm/env /rmm/web/.env
cp $tmp_dir/rmm/app.ini /rmm/api/tacticalrmm/
Expand Down
20 changes: 10 additions & 10 deletions web/src/components/modals/logs/PendingActions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<div class="col">
<q-btn
label="Cancel Action"
:disable="selectedRow === null || selectedStatus === 'completed' || actionType === 'taskaction'"
:disable="selectedRow === null || selectedStatus === 'completed' || actionType !== 'schedreboot'"
color="red"
icon="cancel"
dense
Expand Down Expand Up @@ -98,26 +98,26 @@ export default {
hostname: "",
pagination: {
rowsPerPage: 0,
sortBy: "due",
descending: true,
sortBy: "status",
descending: false,
},
all_columns: [
{ name: "id", field: "id" },
{ name: "status", field: "status" },
{ name: "type", label: "Type", align: "left", sortable: true },
{ name: "type", label: "Type", field: "action_type", align: "left", sortable: true },
{ name: "due", label: "Due", field: "due", align: "left", sortable: true },
{ name: "desc", label: "Description", align: "left", sortable: true },
{ name: "agent", label: "Agent", align: "left", sortable: true },
{ name: "client", label: "Client", align: "left", sortable: true },
{ name: "site", label: "Site", align: "left", sortable: true },
{ name: "desc", label: "Description", field: "description", align: "left", sortable: true },
{ name: "agent", label: "Agent", field: "hostname", align: "left", sortable: true },
{ name: "client", label: "Client", field: "client", align: "left", sortable: true },
{ name: "site", label: "Site", field: "site", align: "left", sortable: true },
],
all_visibleColumns: ["type", "due", "desc", "agent", "client", "site"],
agent_columns: [
{ name: "id", field: "id" },
{ name: "status", field: "status" },
{ name: "type", label: "Type", align: "left", sortable: true },
{ name: "type", label: "Type", field: "action_type", align: "left", sortable: true },
{ name: "due", label: "Due", field: "due", align: "left", sortable: true },
{ name: "desc", label: "Description", align: "left", sortable: true },
{ name: "desc", label: "Description", field: "description", align: "left", sortable: true },
],
agent_visibleColumns: ["type", "due", "desc"],
};
Expand Down

0 comments on commit ff69bed

Please sign in to comment.