Skip to content

Commit

Permalink
Merge branch 'develop' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
sandstromviktor committed Mar 6, 2024
2 parents 648fdaa + 908b3cc commit 9c5cb8e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions apps/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ def index(request, user, project):
name="dispatch",
)
class GetLogsView(View):
def get(self, request, user, project, ai_id):
def get(self, request, project, ai_id):
template = "apps/logs.html"
app = AppInstance.objects.get(pk=ai_id)
project = Project.objects.get(slug=project)
return render(request, template, locals())

def post(self, request, user, project):
def post(self, request, project):
body = request.POST.get("app", "")
container = request.POST.get("container", "")
app = AppInstance.objects.get(pk=body)
Expand Down
6 changes: 3 additions & 3 deletions templates/apps/logs.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{% url 'projects:index' %}">My projects</a></li>
<li class="breadcrumb-item"><a href="{% url 'projects:details' request.user project.slug %}">{{ project.name }}</a></li>
<li class="breadcrumb-item"><a href="{% url 'projects:details' project.slug %}">{{ project.name }}</a></li>
<li class="breadcrumb-item active" aria-current="page">{{ app.name }} Logs</li>
</ol>
</nav>
Expand Down Expand Up @@ -46,7 +46,7 @@ <h2>{{ app.name }} Logs</h2> <h5><span class="badge bg-secondary" id="status-{{
</div>
</div>
<script>
const url = "{% url 'apps:get_logs' request.user project.slug %}"
const url = "{% url 'apps:get_logs' project.slug %}"
const csrftoken = getCookie('csrftoken');
const app = JSON.parse("{{ app.id |escapejs }}")
const body = {"app" : app, "container": '{{app.parameters.appname}}'}
Expand Down Expand Up @@ -117,7 +117,7 @@ <h2>{{ app.name }} Logs</h2> <h5><span class="badge bg-secondary" id="status-{{
const body = new FormData()
body.append("apps", apps)

const url = "{% url 'apps:get_status' request.user project.slug %}"
const url = "{% url 'apps:get_status' project.slug %}"
const csrftoken = getCookie('csrftoken');

const updateStatus = async () => {
Expand Down

0 comments on commit 9c5cb8e

Please sign in to comment.