From 07712d9cf1367054fc79e0704c0c3bac9fab95be Mon Sep 17 00:00:00 2001 From: Nicolas Roduit Date: Sun, 13 Mar 2016 21:48:25 +0100 Subject: [PATCH] v0.9.5 Released --- usr/share/openmediavault/mkconf/dcm4chee | 44 ++++++------- .../admin/diagnostic/log/plugin/Dcm4chee.js | 65 +++++++++++++++++++ .../module/admin/service/dcm4chee/Settings.js | 40 ++++++++++++ 3 files changed, 127 insertions(+), 22 deletions(-) create mode 100644 var/www/openmediavault/js/omv/module/admin/diagnostic/log/plugin/Dcm4chee.js diff --git a/usr/share/openmediavault/mkconf/dcm4chee b/usr/share/openmediavault/mkconf/dcm4chee index 6f990b6..cc29310 100755 --- a/usr/share/openmediavault/mkconf/dcm4chee +++ b/usr/share/openmediavault/mkconf/dcm4chee @@ -23,37 +23,37 @@ set -e SERVICE="dcm4chee" SERVICE_XPATH="//services/${SERVICE}" -LINK_DCM4CHEE="http://gihtub.com/dcm4chee-mysql_2.18.2-rc1_all.deb" -LINK_WEASIS="http://gihtub.com/dcm4chee-weasis_2.0.5_all.deb" -PKG_DCM4CHEE="/var/tmp/dcm4chee-mysql.deb" -PKG_WEASIS="/var/tmp/dcm4chee-weasis.deb" +NAME_DCM4CHEE="dcm4chee-mysql_2.18.2-rc1_all.deb" +NAME_WEASIS="dcm4chee-weasis_2.0.5_all.deb" +LINK_DCM4CHEE="https://github.com/nroduit/openmediavault-dcm4chee/releases/download/v0.9.5/${NAME_DCM4CHEE}" +LINK_WEASIS="https://github.com/nroduit/openmediavault-dcm4chee/releases/download/v0.9.5/${NAME_WEASIS}" +PKG_DCM4CHEE="/var/tmp/${NAME_DCM4CHEE}" +PKG_WEASIS="/var/tmp/${NAME_WEASIS}" INSTALL_DIR="/var/lib/${SERVICE}" install() -{ - if [ -x /etc/init.d/dcm4chee ]; then - update-rc.d ${SERVICE} stop - fi - - echo "Downloading dcm4chee packages..." - +{ mkdir -p "var/tmp" - #if [ -f "${PKG_DCM4CHEE}" ]; then - # rm -f ${PKG_DCM4CHEE} - #fi - #wget ${LINK_DCM4CHEE} -O ${PKG_DCM4CHEE} + if [ ! -f "${PKG_DCM4CHEE}" ]; then + echo "Downloading dcm4chee package..." + wget ${LINK_DCM4CHEE} -O ${PKG_DCM4CHEE} || rm -f ${PKG_DCM4CHEE} + fi + - #if [ -f "${PKG_WEASIS}" ]; then - # rm -f ${PKG_WEASIS} - #fi - #wget ${LINK_WEASIS} -O ${PKG_WEASIS} + if [ ! -f "${PKG_WEASIS}" ]; then + echo "Downloading weasis package..." + wget ${LINK_WEASIS} -O ${PKG_WEASIS} || rm -f ${PKG_WEASIS} + fi echo "Installing dcm4chee..." # Install dcm4chee-mysql and its dependencies - #dpkg -i ${PKG_DCM4CHEE} || apt-get -f install -y - #dpkg -i ${PKG_WEASIS} || apt-get -f install -y - + echo "dpkg -i ${PKG_DCM4CHEE}" + dpkg -i ${PKG_DCM4CHEE} || apt-get -f install -y + + echo "Installing weasis..." + echo "dpkg -i ${PKG_WEASIS}" + dpkg -i ${PKG_WEASIS} || apt-get -f install -y } remove() diff --git a/var/www/openmediavault/js/omv/module/admin/diagnostic/log/plugin/Dcm4chee.js b/var/www/openmediavault/js/omv/module/admin/diagnostic/log/plugin/Dcm4chee.js new file mode 100644 index 0000000..bf80214 --- /dev/null +++ b/var/www/openmediavault/js/omv/module/admin/diagnostic/log/plugin/Dcm4chee.js @@ -0,0 +1,65 @@ +/** + * This file is part of OpenMediaVault. + * + * @license http://www.gnu.org/licenses/gpl.html GPL Version 3 + * @author Volker Theile + * @copyright Copyright (c) 2009-2015 Volker Theile + * + * OpenMediaVault is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * OpenMediaVault is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with OpenMediaVault. If not, see . + */ +// require("js/omv/grid/column/WhiteSpace.js") +// require("js/omv/module/admin/diagnostic/log/plugin/Plugin.js") + +/** + * @class OMV.module.admin.diagnostic.log.plugin.Dcm4chee + * @derived OMV.module.admin.diagnostic.log.plugin.Plugin + * Class that implements the 'dcm4chee' logfile diagnostics plugin. + */ +Ext.define("OMV.module.admin.diagnostic.log.plugin.Dcm4chee", { + extend: "OMV.module.admin.diagnostic.log.plugin.Plugin", + alias: "omv.plugin.diagnostic.log.dcm4chee", + requires: [ + "OMV.grid.column.WhiteSpace" + ], + + id: "dcm4chee", + text: _("PACS - dcm4chee"), + stateful: true, + stateId: "28b79203-d11b-4cd9-8d1e-5d7803499226", + columns: [{ + text: _("Date & Time"), + sortable: true, + dataIndex: "rownum", + stateId: "date", + renderer: function(value, metaData, record) { + return record.get("date"); + } + },{ + xtype: "whitespacecolumn", + text: _("Message"), + sortable: true, + dataIndex: "message", + stateId: "message", + flex: 1 + }], + rpcParams: { + id: "dcm4chee" + }, + rpcFields: [ + { name: "rownum", type: "int" }, + { name: "ts", type: "int" }, + { name: "date", type: "string" }, + { name: "message", type: "string" } + ] +}); diff --git a/var/www/openmediavault/js/omv/module/admin/service/dcm4chee/Settings.js b/var/www/openmediavault/js/omv/module/admin/service/dcm4chee/Settings.js index d117397..98202e6 100644 --- a/var/www/openmediavault/js/omv/module/admin/service/dcm4chee/Settings.js +++ b/var/www/openmediavault/js/omv/module/admin/service/dcm4chee/Settings.js @@ -49,6 +49,21 @@ Ext.define("OMV.module.admin.service.dcm4chee.Settings", { } }] }], + + getButtonItems: function () { + var me = this; + var items = me.callParent(arguments); + items.push({ + id: me.getId() + "-update", + xtype: "button", + text: _("Download and install/upgrade dcm4chee"), + icon: "images/add.png", + iconCls: Ext.baseCSSPrefix + "btn-icon-16x16", + scope: me, + handler: Ext.Function.bind(me.onUpdateButton, me, [me]) + }); + return items; + }, getFormItems: function () { var me = this; @@ -117,6 +132,31 @@ Ext.define("OMV.module.admin.service.dcm4chee.Settings", { onOpenPacsButton: function () { var me = this; window.open("http://" + window.location.hostname + ":" + me.getForm().findField("port").getValue() + "/dcm4chee-web3", "_blank"); + }, + + onUpdateButton: function () { + var me = this; + var wnd = Ext.create("OMV.window.Execute", { + title: _("Installing dcm4chee..."), + rpcService: "dcm4chee", + rpcMethod: "doUpdate", + hideStartButton: true, + hideStopButton: true, + listeners: { + scope: me, + finish: function (wnd, response) { + wnd.appendValue(_("Done...")); + wnd.setButtonDisabled("close", false); + }, + exception: function (wnd, error) { + OMV.MessageBox.error(null, error); + wnd.setButtonDisabled("close", false); + } + } + }); + wnd.setButtonDisabled("close", true); + wnd.show(); + wnd.start(); } });