Skip to content

Commit

Permalink
js: Updated Admin app for new system/plugin/list computed properties
Browse files Browse the repository at this point in the history
  • Loading branch information
cederberg committed Nov 19, 2023
1 parent 4325d04 commit 59c0f96
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/plugin/system/files/app/admin/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ AdminApp.prototype._showPlugin = function () {
var path = "/storage/plugin/" + data.id + "/";
var url = "rapidcontext/storage" + path;
this.ui.pluginLink.setAttribute("href", url);
if (data.loaded) {
if (data._loaded) {
this.ui.pluginLoad.hide();
this.ui.pluginUnload.show();
} else {
Expand Down Expand Up @@ -598,8 +598,8 @@ AdminApp.prototype._togglePlugin = function () {
this.ui.pluginReload.hide();
this.ui.pluginLoading.show();
let data = this.ui.pluginTable.getSelectedData();
let isJava = data.loaded && /\blib\b/.test(data.content);
let proc = data.loaded ? "system/plugin/unload" : "system/plugin/load";
let isJava = data._loaded && /\blib\b/.test(data._content);
let proc = data._loaded ? "system/plugin/unload" : "system/plugin/load";
RapidContext.App.callProc(proc, [data.id])
.catch(RapidContext.UI.showError)
.then(() => this.resetServer())
Expand Down
2 changes: 1 addition & 1 deletion src/plugin/system/files/app/admin/ui.xml
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@
<Icon id="pluginLoading" class="fa fa-spin fa-refresh ml-1" />
</h3>
<Table id="pluginTable" w="100%" h="100%-2.2em">
<TableColumn title="Status" field="loaded" type="boolean" />
<TableColumn title="Status" field="_loaded" type="boolean" />
<TableColumn title="Identifier" field="id" key="true" />
<TableColumn title="Version" field="version" />
<TableColumn title="Name" field="name" />
Expand Down

0 comments on commit 59c0f96

Please sign in to comment.