diff --git a/client/galaxy/scripts/components/admin/Home.vue b/client/galaxy/scripts/components/admin/Home.vue new file mode 100644 index 00000000000..b9e5dd64f06 --- /dev/null +++ b/client/galaxy/scripts/components/admin/Home.vue @@ -0,0 +1,164 @@ + + + diff --git a/client/galaxy/scripts/components/admin/Jobs.vue b/client/galaxy/scripts/components/admin/Jobs.vue index f3500e08676..0ea0c306c5d 100644 --- a/client/galaxy/scripts/components/admin/Jobs.vue +++ b/client/galaxy/scripts/components/admin/Jobs.vue @@ -132,8 +132,8 @@ > + +
+ +
+
@@ -208,6 +213,7 @@ export default { jobLock: false, jobLockDisplay: false, selectedStopJobIds: [], + selectedJobId: null, allSelected: false, indeterminate: false, stopMessage: "", @@ -278,6 +284,13 @@ export default { this.selectedStopJobIds = []; this.stopMessage = ""; }, + clickJobInfo(id) { + this.selectedJobId = id; + this.$refs["job-info-modal"].show(); + }, + resetModalContents() { + this.selectedJobId = null; + }, showRowDetails(row, index, e) { if (e.target.nodeName != "A") { row._showDetails = !row._showDetails; @@ -353,6 +366,9 @@ export default { const f = this.jobsFields.slice(0); f.splice(2, 0, { key: "update_time", label: "Finished", sortable: true }); return this.computeFields(f); + }, + selectedJobUrl() { + return `${getAppRoot()}admin/job_info?jobid=${this.selectedJobId}`; } }, created() { @@ -367,4 +383,17 @@ export default { white-space: pre-wrap; word-break: break-word; } +.info-frame-container { + overflow: hidden; + padding-top: 100%; + position: relative; +} +.info-frame-container iframe { + border: 0; + height: 100%; + left: 0; + position: absolute; + top: 0; + width: 100%; +} diff --git a/client/galaxy/scripts/entry/admin/AdminRouter.js b/client/galaxy/scripts/entry/admin/AdminRouter.js index f48519d7844..6286c7f2708 100644 --- a/client/galaxy/scripts/entry/admin/AdminRouter.js +++ b/client/galaxy/scripts/entry/admin/AdminRouter.js @@ -9,6 +9,7 @@ import DataTables from "components/admin/DataTables.vue"; import DataTypes from "components/admin/DataTypes.vue"; import Jobs from "components/admin/Jobs.vue"; import Invocations from "components/admin/Invocations.vue"; +import AdminHome from "components/admin/Home.vue"; import DataManagerView from "components/admin/DataManager/DataManagerView.vue"; import DataManagerRouter from "components/admin/DataManager/DataManagerRouter.vue"; import Register from "components/login/Register.vue"; @@ -23,7 +24,7 @@ export const getAdminRouter = (Galaxy, options) => { return Router.extend({ routes: { - "(/)admin(/)": "home", + "(/)admin(/)": "show_home", "(/)admin(/)users": "show_users", "(/)admin(/)users(/)create": "show_users_create", "(/)admin(/)roles": "show_roles", @@ -53,10 +54,14 @@ export const getAdminRouter = (Galaxy, options) => { window.location.reload(); // = window.location.href; }, - home: function() { - this.page - .$("#galaxy_main") - .prop("src", `${galaxyRoot}admin/center?message=${options.message}&status=${options.status}`); + show_home: function() { + this._display_vue_helper(AdminHome, { + propsData: { + installingRepositoryIds: options.settings.installing_repository_ids, + isRepoInstalled: options.settings.is_repo_installed, + isToolShedInstalled: options.settings.is_tool_shed_installed + } + }); }, show_users: function() { @@ -64,17 +69,14 @@ export const getAdminRouter = (Galaxy, options) => { }, show_users_create: function() { - const instance = Vue.extend(Register); - const vm = document.createElement("div"); - this.page.display(vm); - new instance({ + this._display_vue_helper(Register, { propsData: { redirect: "/admin/users", registration_warning_message: options.config.registration_warning_message, mailing_join_addr: options.config.mailing_join_addr, server_mail_configured: options.config.server_mail_configured } - }).$mount(vm); + }); }, show_roles: function() { diff --git a/lib/galaxy/webapps/galaxy/controllers/admin.py b/lib/galaxy/webapps/galaxy/controllers/admin.py index 8dd5ad54242..88d95533591 100644 --- a/lib/galaxy/webapps/galaxy/controllers/admin.py +++ b/lib/galaxy/webapps/galaxy/controllers/admin.py @@ -906,19 +906,6 @@ class AdminGalaxy(controller.JSAppLauncher, AdminActions, UsesQuotaMixin, QuotaP message=message, status=status) - @web.expose - @web.require_admin - def center(self, trans, **kwd): - message = escape(kwd.get('message', '')) - status = kwd.get('status', 'done') - is_repo_installed = trans.install_model.context.query(trans.install_model.ToolShedRepository).first() is not None - installing_repository_ids = repository_util.get_ids_of_tool_shed_repositories_being_installed(trans.app, as_string=True) - return trans.fill_template('/webapps/galaxy/admin/center.mako', - is_repo_installed=is_repo_installed, - installing_repository_ids=installing_repository_ids, - message=message, - status=status) - @web.legacy_expose_api @web.require_admin def tool_versions_list(self, trans, **kwd): @@ -1624,8 +1611,7 @@ class AdminGalaxy(controller.JSAppLauncher, AdminActions, UsesQuotaMixin, QuotaP if jobid is not None: job = trans.sa_session.query(trans.app.model.Job).get(jobid) return trans.fill_template('/webapps/reports/job_info.mako', - job=job, - message="Back") + job=job) @web.expose @web.require_admin diff --git a/lib/tool_shed/galaxy_install/grids/admin_toolshed_grids.py b/lib/tool_shed/galaxy_install/grids/admin_toolshed_grids.py index 6d5a45ec8e3..4ddfc36477c 100644 --- a/lib/tool_shed/galaxy_install/grids/admin_toolshed_grids.py +++ b/lib/tool_shed/galaxy_install/grids/admin_toolshed_grids.py @@ -30,7 +30,7 @@ def generate_latest_revision_img_str(include_mouse_over=False): latest_revision_tip_str = 'class="icon-button" title="This is the latest installable revision of this repository"' else: latest_revision_tip_str = '' - return '' % (url_for('/static'), latest_revision_tip_str) + return '' % (url_for('/static'), latest_revision_tip_str) def generate_revision_updates_img_str(include_mouse_over=False): @@ -54,7 +54,7 @@ def generate_unknown_img_str(include_mouse_over=False): unknown_tip_str = 'class="icon-button" title="Unable to get information from the Tool Shed"' else: unknown_tip_str = '' - return '' % (url_for('/static'), unknown_tip_str) + return '' % (url_for('/static'), unknown_tip_str) class InstalledRepositoryGrid(grids.Grid): diff --git a/templates/webapps/galaxy/admin/center.mako b/templates/webapps/galaxy/admin/center.mako deleted file mode 100644 index 9ca501692e0..00000000000 --- a/templates/webapps/galaxy/admin/center.mako +++ /dev/null @@ -1,79 +0,0 @@ -<%inherit file="/base.mako"/> -<%namespace file="/message.mako" import="render_msg" /> - -<%def name="title()">Administration - -

Administration

-Please visit the Galaxy administration hub to learn how to keep your Galaxy in best shape. -%if message: - ${render_msg( message, status )} -%else: -

Server

- - -

User Management

- - -

Tool Management

- -%endif