diff --git a/frontend/resources/vue/components/ActionStatusDisplay.vue b/frontend/resources/vue/components/ActionStatusDisplay.vue
index 8e16b52..edb0f3b 100644
--- a/frontend/resources/vue/components/ActionStatusDisplay.vue
+++ b/frontend/resources/vue/components/ActionStatusDisplay.vue
@@ -1,7 +1,7 @@
-
- {{ statusText }}{{ exitCodeText }}
-
+
+ {{ statusText }}{{ exitCodeText }}
+
@@ -35,11 +35,14 @@ const statusText = computed(() => {
const exitCodeText = computed(() => {
const logEntry = props.logEntry
if (!logEntry) return ''
+ if (logEntry.exitCode === 0) {
+ return ''
+ }
if (logEntry.executionFinished) {
if (logEntry.blocked || logEntry.timedOut) {
return ''
}
- return ' Exit code: ' + logEntry.exitCode
+ return ' (Exit code: ' + logEntry.exitCode + ')'
}
return ''
})
@@ -49,15 +52,35 @@ const statusClass = computed(() => {
if (!logEntry) return ''
if (logEntry.executionFinished) {
if (logEntry.blocked) {
- return 'action-blocked'
+ return 'status-blocked'
} else if (logEntry.timedOut) {
- return 'action-timeout'
+ return 'status-timeout'
} else if (logEntry.exitCode === 0) {
- return 'action-success'
+ return 'status-success'
} else {
- return 'action-nonzero-exit'
+ return 'status-nonzero-exit'
}
}
return ''
})
+
+
\ No newline at end of file
diff --git a/frontend/resources/vue/views/LogsListView.vue b/frontend/resources/vue/views/LogsListView.vue
index 413182c..4a6c07d 100644
--- a/frontend/resources/vue/views/LogsListView.vue
+++ b/frontend/resources/vue/views/LogsListView.vue
@@ -46,9 +46,7 @@
-
- {{ getStatusText(log) }}
-
+
|
@@ -70,6 +68,7 @@ import { ref, computed, onMounted } from 'vue'
import Pagination from 'picocrank/vue/components/Pagination.vue'
import Section from 'picocrank/vue/components/Section.vue'
import { useI18n } from 'vue-i18n'
+import ActionStatusDisplay from '../components/ActionStatusDisplay.vue'
const logs = ref([])
const searchText = ref('')
@@ -134,20 +133,6 @@ function formatTimestamp(timestamp) {
}
}
-function getStatusClass(log) {
- if (log.timedOut) return 'status-timeout'
- if (log.blocked) return 'status-blocked'
- if (log.exitCode !== 0) return 'status-error'
- return 'status-success'
-}
-
-function getStatusText(log) {
- if (log.timedOut) return t('logs.timed-out')
- if (log.blocked) return t('logs.blocked')
- if (log.exitCode !== 0) return `${t('logs.exit-code')} ${log.exitCode}`
- return t('logs.completed')
-}
-
function handlePageChange(page) {
currentPage.value = page
fetchLogs()
@@ -227,22 +212,6 @@ onMounted(() => {
font-size: smaller;
}
-.status-success {
- color: var(--karma-good-fg);
-}
-
-.status-error {
- color: var(--karma-bad-fg);
-}
-
-.status-timeout {
- color: var(--karma-warning-fg);
-}
-
-.status-blocked {
- color: var(--karma-neutral-fg);
-}
-
.empty-state {
text-align: center;
padding: 2rem;
diff --git a/service/internal/api/api.go b/service/internal/api/api.go
index 2deacda..f22c9d4 100644
--- a/service/internal/api/api.go
+++ b/service/internal/api/api.go
@@ -363,15 +363,25 @@ func (api *oliveTinAPI) Logout(ctx ctx.Context, req *connect.Request[apiv1.Logou
response := connect.NewResponse(&apiv1.LogoutResponse{})
- // Clear the authentication cookie by setting it to expire
- cookie := &http.Cookie{
+ // Clear the local authentication cookie by setting it to expire
+ localCookie := &http.Cookie{
Name: "olivetin-sid-local",
Value: "",
MaxAge: -1, // This tells the browser to delete the cookie
HttpOnly: true,
Path: "/",
}
- response.Header().Set("Set-Cookie", cookie.String())
+ response.Header().Set("Set-Cookie", localCookie.String())
+
+ // Clear the OAuth2 authentication cookie by setting it to expire
+ oauth2Cookie := &http.Cookie{
+ Name: "olivetin-sid-oauth",
+ Value: "",
+ MaxAge: -1, // This tells the browser to delete the cookie
+ HttpOnly: true,
+ Path: "/",
+ }
+ response.Header().Add("Set-Cookie", oauth2Cookie.String())
return response, nil
}