Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
975893f
Remove focus helper
guerler Nov 9, 2025
f05cd61
Add context api endpoint
guerler Nov 9, 2025
ef1a2c5
Refactor and streamline app bootstrapping from api endpoint
guerler Nov 10, 2025
6df6a28
Remove defaultConfigs
guerler Nov 10, 2025
94df9b6
Remove legacy monitoring of Galaxy object
guerler Nov 10, 2025
66b73f5
Expose window.Galaxy as previously but without set and monitoring ove…
guerler Nov 10, 2025
05c6419
Consolidate global initialization
guerler Nov 10, 2025
bcee558
Fix login condition
guerler Nov 10, 2025
471e775
Remove bootstrapping from mako
guerler Nov 10, 2025
f65d338
Use js for entry point for now
guerler Nov 10, 2025
c376512
Bypass legacy app launcher
guerler Nov 11, 2025
220e515
Remove legacy js app launcher from code base
guerler Nov 11, 2025
22fd079
Move sentry to context endpoint
guerler Nov 11, 2025
f989f4c
Remove sentry and config bootstrapping from legacy mako helper
guerler Nov 11, 2025
ed7d812
Remove unused mako functions
guerler Nov 11, 2025
83fc7a1
More remaining mako functions to js-app.mako
guerler Nov 11, 2025
48ec048
Refactor extend config addition
guerler Nov 11, 2025
dbb6841
Load analysis app specific globals in analysis app
guerler Nov 11, 2025
772cdb3
Move addons to app directory
guerler Nov 11, 2025
a81c816
Convert Galaxy object into an actual class
guerler Nov 11, 2025
e03ea10
Add base client route
guerler Nov 11, 2025
ee33329
Use default client endpoint
guerler Nov 11, 2025
6c7783d
Linting
guerler Nov 11, 2025
4cf7654
Refactoring for consistency
guerler Nov 11, 2025
43adae4
Remove label from init, move init helper to index
guerler Nov 12, 2025
90b8e42
Consolidate and simplify galaxy object handling
guerler Nov 12, 2025
27b8f62
Rename legacy backbone model
guerler Nov 12, 2025
07aeab5
Adjust outdated makos, copy mako will be removed in another PR
guerler Nov 12, 2025
4cecd88
Use ts ending for entry point
guerler Nov 12, 2025
dccc028
Mount context endpoint outside of api
guerler Nov 12, 2025
6e922ef
Remove unused attribute from context response
guerler Nov 12, 2025
ab215d6
Remove redundant message_box_visible attribute, already in config
guerler Nov 12, 2025
8b16366
Remove dynamic tool config filenames from context endpoint
guerler Nov 12, 2025
0825bc3
Strip legacy makos relying on galaxy app
guerler Nov 12, 2025
e19e0ef
Use config manager
guerler Nov 12, 2025
3bfdf05
Fix manager initialization
guerler Nov 16, 2025
b8eb86a
Add endpoint response type
guerler Nov 16, 2025
e291747
Remove outcommented attributes, sort rest alphabetically
guerler Nov 16, 2025
d1144c9
Switch to user serialize detailed view
guerler Nov 16, 2025
d24aa0d
Remove unused import
guerler Nov 16, 2025
164a798
Properly return context value
guerler Nov 16, 2025
ff2b060
Move sentry dsn public to regular config
guerler Nov 17, 2025
11c8d34
Provide activity status from user serialization
guerler Nov 17, 2025
f694d03
Move webhook flag to config
guerler Nov 17, 2025
95465d0
Move workflow menu entries to user serialization
guerler Nov 17, 2025
96f4ceb
Fix activation message visibility condition
guerler Nov 17, 2025
1488e40
Make sure trans exists before attempting to access history
guerler Nov 17, 2025
acff3dd
Fix linting
guerler Nov 17, 2025
14280a8
Add index/root route
guerler Nov 18, 2025
69539ec
Fix prefix root parsing
guerler Nov 19, 2025
babbf1f
Add token for twilltest
guerler Nov 20, 2025
b1d1c47
Remove copy dataset mako
guerler Nov 20, 2025
c092063
Fix session retrieval
guerler Nov 21, 2025
679a46a
Consistently expect application addons to be async functions
guerler Nov 21, 2025
afe7cce
Update app index in testing
guerler Nov 25, 2025
9ca530c
Remove unused mock config from test
guerler Nov 26, 2025
d041766
Adjust session parsing for twilltest
guerler Nov 27, 2025
2baaac4
Allow routing to root controller
guerler Nov 27, 2025
6805f92
Add webhooks to allowed anon list
guerler Nov 27, 2025
6c3d357
Fix token regex in test
guerler Nov 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions client/src/api/schema/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6477,6 +6477,23 @@ export interface paths {
patch?: never;
trace?: never;
};
"/context": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/** Return bootstrapped client context */
get: operations["index_context_get"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/ga4gh/drs/v1/objects/{object_id}": {
parameters: {
query?: never;
Expand Down Expand Up @@ -8213,6 +8230,21 @@ export interface components {
*/
name: string;
};
/** ContextResponse */
ContextResponse: {
/** Config */
config: {
[key: string]: unknown;
};
/** Root */
root: string;
/** Session Csrf Token */
session_csrf_token?: string | null;
/** User */
user: {
[key: string]: unknown;
};
};
/**
* ConvertedDatasetsMap
* @description Map of `file extension` -> `converted dataset encoded id`
Expand Down Expand Up @@ -45240,6 +45272,47 @@ export interface operations {
};
};
};
index_context_get: {
parameters: {
query?: never;
header?: {
/** @description The user ID that will be used to effectively make this API call. Only admins and designated users can make API calls on behalf of other users. */
"run-as"?: string | null;
};
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["ContextResponse"];
};
};
/** @description Request Error */
"4XX": {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["MessageExceptionModel"];
};
};
/** @description Server Error */
"5XX": {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["MessageExceptionModel"];
};
};
};
};
get_object_ga4gh_drs_v1_objects__object_id__get: {
parameters: {
query?: never;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ import Vue from "vue";
*
* @param {object} config Galaxy configuration object
*/
export const initSentry = (galaxy, config) => {
export async function initSentry(Galaxy, router) {
console.log("initSentry");
if (config.sentry) {
const router = galaxy.router;
const { sentry_dsn_public, email } = config.sentry;
let release = galaxy.config.version_major;
if (galaxy.config.version_minor) {
release += `.${galaxy.config.version_minor}`;
const config = Galaxy.config;
if (config.sentry_dsn_public) {
const sentry_dsn_public = config.sentry_dsn_public;
const email = Galaxy.user.get("email");
let release = Galaxy.config.version_major;
if (Galaxy.config.version_minor) {
release += `.${Galaxy.config.version_minor}`;
}
Sentry.init({
Vue,
Expand All @@ -37,6 +38,6 @@ export const initSentry = (galaxy, config) => {
});
});
}
galaxy.Sentry = Sentry;
Galaxy.Sentry = Sentry;
}
};
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { appendScriptStyle } from "@/utils/utils";
import { loadWebhooks } from "@/utils/webhooks";

export async function onloadWebhooks(Galaxy) {
export async function initWebhooks(Galaxy) {
if (Galaxy.config.enable_webhooks) {
const webhooks = await loadWebhooks("onload");
webhooks.forEach((webhook) => {
Expand Down
30 changes: 15 additions & 15 deletions client/src/app/app.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,49 +3,49 @@ import { suppressDebugConsole } from "@tests/vitest/helpers";
import { beforeEach, describe, expect, test } from "vitest";

import { getGalaxyInstance, setGalaxyInstance } from "@/app";
import { GalaxyApp } from "@/app/galaxy";

export function setupTestGalaxy(galaxyOptions_ = null) {
galaxyOptions_ = galaxyOptions_ || galaxyOptions;
setGalaxyInstance((GalaxyApp) => new GalaxyApp(galaxyOptions_));
const app = new GalaxyApp(galaxyOptions_);
setGalaxyInstance(app);
}

// the app console debugs make sense but we just don't want to see them in test
// output.
// suppress console noise
suppressDebugConsole();

describe("App base construction/initializiation defaults", () => {
describe("App base construction/initialization defaults", () => {
beforeEach(() => {
setupTestGalaxy(galaxyOptions);
});

test("App base construction/initializiation defaults", function () {
test("App base construction/initialization defaults", () => {
const app = getGalaxyInstance();
expect(app.options && typeof app.options === "object").toBeTruthy();
expect(app.config && typeof app.config === "object").toBeTruthy();
expect(app.user && typeof app.config === "object").toBeTruthy();
expect(app.localize).toBe(window._l);
});

test("App base default options", function () {
test("App base default options", () => {
const app = getGalaxyInstance();
expect(app.options !== undefined && typeof app.options === "object").toBeTruthy();
expect(app.options.root).toBe("/");
expect(app.options.patchExisting).toBe(true);
});

// // We no longer want this behavior, but leaving the test to express that
test("App base will patch in attributes from existing Galaxy objects", function () {
// we no longer patch attributes from existing Galaxy objects, test expresses that
test("App base will patch in attributes from existing Galaxy objects", () => {
const existingApp = getGalaxyInstance();
existingApp.foo = 123;

const newApp = setGalaxyInstance((GalaxyApp) => {
return new GalaxyApp();
});
const newApp = new GalaxyApp();
setGalaxyInstance(newApp);

expect(newApp.foo === 123).toBeTruthy();
expect(newApp.foo).toBeUndefined();
});

test("App base config", function () {
test("App base config", () => {
const app = getGalaxyInstance();
expect(app.config && typeof app.config === "object").toBeTruthy();
expect(app.config.allow_user_deletion).toBe(false);
Expand All @@ -54,9 +54,9 @@ describe("App base construction/initializiation defaults", () => {
expect(app.config.ftp_upload_site).toBe(null);
});

test("App base user", function () {
test("App base user", () => {
const app = getGalaxyInstance();
expect(app.user !== undefined && typeof app.user === "object").toBeTruthy();
expect(app.user.isAdmin() === false).toBeTruthy();
expect(app.user.isAdmin()).toBe(false);
});
});
Loading
Loading