mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge pull request #9097 from dannon/admin-home-rewrite
[19.09] Assorted admin panel fixes
This commit is contained in:
@@ -0,0 +1,164 @@
|
||||
<template>
|
||||
<div>
|
||||
<h2>Administration</h2>
|
||||
Please visit
|
||||
|
||||
<a href="https://galaxyproject.org/admin" target="_blank">the Galaxy administration hub</a> to learn how to keep
|
||||
your Galaxy in best shape.
|
||||
|
||||
<h4>Server</h4>
|
||||
<ul>
|
||||
<li>
|
||||
<strong>
|
||||
<a @click.prevent="useRouter" :href="adminDataTypesUrl">Data types</a>
|
||||
</strong>
|
||||
- See all datatypes available in this Galaxy.
|
||||
</li>
|
||||
<li>
|
||||
<strong>
|
||||
<a @click.prevent="useRouter" :href="adminDataTablesUrl">Data tables</a>
|
||||
</strong>
|
||||
- See all data tables available in this Galaxy.
|
||||
</li>
|
||||
<li>
|
||||
<strong>
|
||||
<a @click.prevent="useRouter" :href="adminDisplayApplicationsUrl">Display applications</a>
|
||||
</strong>
|
||||
- See all display applications configured in this Galaxy.
|
||||
</li>
|
||||
<li>
|
||||
<strong>
|
||||
<a @click.prevent="useRouter" :href="adminJobsUrl">Manage jobs</a>
|
||||
</strong>
|
||||
- Display all jobs that are currently not finished (i.e., their state is new, waiting, queued, or
|
||||
running). Administrators are able to cleanly stop long-running jobs.
|
||||
</li>
|
||||
<li>
|
||||
<strong>
|
||||
<a @click.prevent="useRouter" :href="adminDMUrl">Local data</a>
|
||||
</strong>
|
||||
- Manage the reference (and other) data that is stored within Tool Data Tables. See
|
||||
<a href="https://galaxyproject.org/admin/tools/data-managers" target="_blank">wiki</a> for details.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h4>User Management</h4>
|
||||
<ul>
|
||||
<li>
|
||||
<strong>
|
||||
<a @click.prevent="useRouter" :href="adminUsersUrl">Users</a>
|
||||
</strong>
|
||||
- The primary user management interface, displaying information associated with each user and providing
|
||||
operations for resetting passwords, updating user information, impersonating a user, and more.
|
||||
</li>
|
||||
<!-- %if trans.app.config.enable_quotas: -->
|
||||
<li>
|
||||
<strong>
|
||||
<a @click.prevent="useRouter" :href="adminQuotasUrl">Quotas</a>
|
||||
</strong>
|
||||
- Manage user space quotas. See
|
||||
<a href="https://galaxyproject.org/admin/disk-quotas" target="_blank">wiki</a> for details.
|
||||
</li>
|
||||
<!-- %endif -->
|
||||
<li>
|
||||
<strong>
|
||||
<a @click.prevent="useRouter" :href="adminGroupsUrl">Groups</a>
|
||||
</strong>
|
||||
- A view of all groups along with the members of the group and the roles associated with each group.
|
||||
</li>
|
||||
<li>
|
||||
<strong>
|
||||
<a @click.prevent="useRouter" :href="adminRolesUrl">Roles</a>
|
||||
</strong>
|
||||
- A view of all non-private roles along with the role type, and the users and groups that are
|
||||
associated, with the role. Also includes a view of the data library datasets that are associated with
|
||||
the role and the permissions applied to each dataset.
|
||||
</li>
|
||||
<li>
|
||||
<strong>
|
||||
<a @click.prevent="useRouter" :href="adminFormsUrl">Forms</a>
|
||||
</strong>
|
||||
- Manage local form definitions.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h4>Tool Management</h4>
|
||||
<ul>
|
||||
<li v-if="isToolShedInstalled">
|
||||
<strong>
|
||||
<a @click.prevent="useRouter" :href="adminToolshedUrl">Install new tools</a>
|
||||
</strong>
|
||||
- Search and install new tools and other Galaxy utilities from the Tool Shed. See
|
||||
<a href="https://galaxyproject.org/admin/tools/add-tool-from-toolshed-tutorial" target="_blank"
|
||||
>the tutorial</a
|
||||
>.
|
||||
</li>
|
||||
<li v-if="installingRepositoryIds">
|
||||
<strong>Monitor installation</strong> - View the status of tools that are being currently installed.
|
||||
</li>
|
||||
<template v-if="isRepoInstalled">
|
||||
<li>
|
||||
<strong>Manage tools</strong> - View and administer installed tools and utilities on this Galaxy.
|
||||
</li>
|
||||
<li><strong>Manage metadata</strong> - Select on which repositories you want to reset metadata.</li>
|
||||
</template>
|
||||
<li>
|
||||
<strong>
|
||||
<a @click.prevent="useRouter" :href="adminToolVersionsUrl">View lineage</a>
|
||||
</strong>
|
||||
- A view of a version lineages for all installed tools. Useful for debugging.
|
||||
</li>
|
||||
<li>
|
||||
<strong>
|
||||
<a :href="migrationStagesUrl">View migration stages</a>
|
||||
</strong>
|
||||
- See the list of migration stages that moved sets of tools from the distribution to the Tool Shed.
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAppRoot } from "onload/loadConfig";
|
||||
import { getGalaxyInstance } from "app";
|
||||
|
||||
const root = getAppRoot();
|
||||
|
||||
export default {
|
||||
props: {
|
||||
installingRepositoryIds: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
isRepoInstalled: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
},
|
||||
isToolShedInstalled: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
useRouter: function(ev) {
|
||||
const Galaxy = getGalaxyInstance();
|
||||
Galaxy.page.router.push(ev.target.pathname.slice(root.length));
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
migrationStagesUrl: () => `${root}admin/review_tool_migration_stages`, // NOT ROUTER
|
||||
adminDataTypesUrl: () => `${root}admin/data_types`,
|
||||
adminDataTablesUrl: () => `${root}admin/data_tables`,
|
||||
adminDisplayApplicationsUrl: () => `${root}admin/display_applications`,
|
||||
adminJobsUrl: () => `${root}admin/jobs`,
|
||||
adminDMUrl: () => `${root}admin/data_manager`,
|
||||
adminUsersUrl: () => `${root}admin/users`,
|
||||
adminQuotasUrl: () => `${root}admin/quotas`,
|
||||
adminGroupsUrl: () => `${root}admin/groups`,
|
||||
adminRolesUrl: () => `${root}admin/roles`,
|
||||
adminFormsUrl: () => `${root}admin/forms`,
|
||||
adminToolshedUrl: () => `${root}admin/toolshed`,
|
||||
adminToolVersionsUrl: () => `${root}admin/tool_versions`
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -132,8 +132,8 @@
|
||||
></b-form-checkbox>
|
||||
</template>
|
||||
<template slot="job_info" slot-scope="data">
|
||||
<b-link :href="data.value['info_url']" target="galaxy_main">
|
||||
{{ data.value["id"] }}
|
||||
<b-link :href="data.value.info_url" v-on:click.prevent="clickJobInfo(data.value.id)">
|
||||
{{ data.value.id }}
|
||||
</b-link>
|
||||
</template>
|
||||
<template slot="row-details" slot-scope="row">
|
||||
@@ -179,6 +179,11 @@
|
||||
</b-card>
|
||||
</template>
|
||||
</b-table>
|
||||
<b-modal ref="job-info-modal" scrollable hide-header ok-only @hidden="resetModalContents">
|
||||
<div class="info-frame-container">
|
||||
<iframe :src="selectedJobUrl"></iframe>
|
||||
</div>
|
||||
</b-modal>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -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%;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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="<a href='jobs'>Back</a>")
|
||||
job=job)
|
||||
|
||||
@web.expose
|
||||
@web.require_admin
|
||||
|
||||
@@ -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 '<img src="%s/june_2007_style/blue/ok_small.png" %s/>' % (url_for('/static'), latest_revision_tip_str)
|
||||
return '<img src="%s/style/blue/ok_small.png" %s/>' % (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 '<img src="%s/june_2007_style/blue/question-octagon-frame.png" %s/>' % (url_for('/static'), unknown_tip_str)
|
||||
return '<img src="%s/style/blue/question-octagon-frame.png" %s/>' % (url_for('/static'), unknown_tip_str)
|
||||
|
||||
|
||||
class InstalledRepositoryGrid(grids.Grid):
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
<%inherit file="/base.mako"/>
|
||||
<%namespace file="/message.mako" import="render_msg" />
|
||||
|
||||
<%def name="title()">Administration</%def>
|
||||
|
||||
<h2>Administration</h2>
|
||||
Please visit <a href="https://galaxyproject.org/admin" target="_blank">the Galaxy administration hub</a> to learn how to keep your Galaxy in best shape.
|
||||
%if message:
|
||||
${render_msg( message, status )}
|
||||
%else:
|
||||
<h4>Server</h4>
|
||||
<ul>
|
||||
<li>
|
||||
<strong><a href="/admin/data_types" target="_parent">Data types</a></strong> - See all datatypes available in this Galaxy.
|
||||
</li>
|
||||
<li>
|
||||
<strong><a href="/admin/data_tables" target="_parent">Data tables</a></strong> - See all data tables available in this Galaxy.
|
||||
</li>
|
||||
<li>
|
||||
<strong><a href="/admin/display_applications" target="_parent">Display applications</a></strong> - See all display applications configured in this Galaxy.
|
||||
</li>
|
||||
<li>
|
||||
<strong><a href="/admin/jobs" target="_parent">Manage jobs</a></strong> - Display all jobs that are currently not finished (i.e., their state is new, waiting, queued, or running). Administrators are able to cleanly stop long-running jobs.
|
||||
</li>
|
||||
<li>
|
||||
<strong><a href="/admin/data_manager" target="_parent">Local data</a></strong> - Manage the reference (and other) data that is stored within Tool Data Tables. See <a href="https://galaxyproject.org/admin/tools/data-managers" target="_blank">wiki</a> for details.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h4>User Management</h4>
|
||||
<ul>
|
||||
<li>
|
||||
<strong><a href="/admin/users" target="_parent">Users</a></strong> - The primary user management interface, displaying information associated with each user and providing operations for resetting passwords, updating user information, impersonating a user, and more.
|
||||
</li>
|
||||
%if trans.app.config.enable_quotas:
|
||||
<li>
|
||||
<strong><a href="/admin/quotas" target="_parent">Quotas</a></strong> - Manage user space quotas. See <a href="https://galaxyproject.org/admin/disk-quotas" target="_blank">wiki</a> for details.
|
||||
</li>
|
||||
%endif
|
||||
<li>
|
||||
<strong><a href="/admin/groups" target="_parent">Groups</a></strong> - A view of all groups along with the members of the group and the roles associated with each group.
|
||||
</li>
|
||||
<li>
|
||||
<strong><a href="/admin/roles" target="_parent">Roles</a></strong> - A view of all non-private roles along with the role type, and the users and groups that are associated with the role.
|
||||
Also includes a view of the data library datasets that are associated with the role and the permissions applied to each dataset.
|
||||
</li>
|
||||
<li>
|
||||
<strong><a href="/admin/forms" target="_parent">Forms</a></strong> - Manage local form definitions.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h4>Tool Management</h4>
|
||||
<ul>
|
||||
%if trans.app.tool_shed_registry and trans.app.tool_shed_registry.tool_sheds:
|
||||
<li>
|
||||
<strong><a href="/admin/toolshed" target="_parent">Install new tools</a></strong> - Search and install new tools and other Galaxy utilities from the Tool Shed. See <a href="https://galaxyproject.org/admin/tools/add-tool-from-toolshed-tutorial" target="_blank">the tutorial</a>.
|
||||
</li>
|
||||
%endif
|
||||
%if tool_shed_repository_ids:
|
||||
<li>
|
||||
<strong>Monitor installation</strong> - View the status of tools that are being currently installed.
|
||||
</li>
|
||||
%endif
|
||||
%if is_repo_installed:
|
||||
<li>
|
||||
<strong>Manage tools</strong> - View and administer installed tools and utilities on this Galaxy.
|
||||
</li>
|
||||
<li>
|
||||
<strong>Manage metadata</strong> - Select on which repositories you want to reset metadata.
|
||||
</li>
|
||||
%endif
|
||||
<li>
|
||||
<strong><a href="/admin/tool_versions" target="_parent">View lineage</a></strong> - A view of a version lineages for all installed tools. Useful for debugging.
|
||||
</li>
|
||||
<li>
|
||||
<strong><a href="/admin/review_tool_migration_stages" target="_parent">View migration stages</a></strong> - See the list of migration stages that moved sets of tools from the distribution to the Tool Shed.
|
||||
</li>
|
||||
</ul>
|
||||
%endif
|
||||
Reference in New Issue
Block a user