This is an automated email from the ASF dual-hosted git repository.
cziegeler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/felix-dev.git
The following commit(s) were added to refs/heads/master by this push:
new cc37186b4c Unmaintained code removal - webconsole-plugins/deppack
cc37186b4c is described below
commit cc37186b4c590be45286ab29c19f0b1294622444
Author: Carsten Ziegeler <[email protected]>
AuthorDate: Tue Aug 22 17:54:08 2023 +0200
Unmaintained code removal - webconsole-plugins/deppack
---
webconsole-plugins/deppack/changelog.txt | 6 -
webconsole-plugins/deppack/pom.xml | 136 -----------
.../plugins/deppack/internal/Activator.java | 90 -------
.../plugins/deppack/internal/WebConsolePlugin.java | 259 ---------------------
.../main/resources/OSGI-INF/l10n/bundle.properties | 40 ----
.../resources/OSGI-INF/l10n/bundle_bg.properties | 40 ----
.../resources/OSGI-INF/l10n/bundle_de.properties | 40 ----
.../resources/OSGI-INF/l10n/bundle_ru.properties | 40 ----
.../deppack/src/main/resources/res/plugin.css | 19 --
.../deppack/src/main/resources/res/plugin.html | 55 -----
.../deppack/src/main/resources/res/plugin.js | 172 --------------
11 files changed, 897 deletions(-)
diff --git a/webconsole-plugins/deppack/changelog.txt
b/webconsole-plugins/deppack/changelog.txt
deleted file mode 100755
index b1b34642b2..0000000000
--- a/webconsole-plugins/deppack/changelog.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-Initial Release 1.0.0
----------------------
-
-** Improvement
- * [FELIX-3861] - Set felix.webconsole.category on Web Console plugins
- * [FELIX-5510] - Remove usage of org.json form web console plugins
\ No newline at end of file
diff --git a/webconsole-plugins/deppack/pom.xml
b/webconsole-plugins/deppack/pom.xml
deleted file mode 100644
index a7d7f7a2af..0000000000
--- a/webconsole-plugins/deppack/pom.xml
+++ /dev/null
@@ -1,136 +0,0 @@
-<!-- Licensed to the Apache Software Foundation (ASF) under one or more
contributor
- license agreements. See the NOTICE file distributed with this work for
additional
- information regarding copyright ownership. The ASF licenses this file
to
- you under the Apache License, Version 2.0 (the "License"); you may not
use
- this file except in compliance with the License. You may obtain a copy
of
- the License at http://www.apache.org/licenses/LICENSE-2.0 Unless
required
- by applicable law or agreed to in writing, software distributed under
the
- License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS
- OF ANY KIND, either express or implied. See the License for the
specific
- language governing permissions and limitations under the License. -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.felix</groupId>
- <artifactId>felix-parent</artifactId>
- <version>7</version>
- <relativePath/>
- </parent>
-
- <artifactId>org.apache.felix.webconsole.plugins.deppack</artifactId>
- <packaging>bundle</packaging>
- <version>1.0.0-SNAPSHOT</version>
-
- <name>Apache Felix Web Console Deployment Packages Plugin</name>
- <description>
- This is a plugin for the Apache Felix OSGi web console for displaying
Deployment Packages.
- </description>
-
- <scm>
-
<connection>scm:git:https://github.com/apache/felix-dev.git</connection>
-
<developerConnection>scm:git:https://github.com/apache/felix-dev.git</developerConnection>
- <url>https://gitbox.apache.org/repos/asf?p=felix-dev.git</url>
- </scm>
-
- <build>
- <!-- add UTF-8-to-ISO translated resources -->
- <resources>
- <resource>
-
<directory>${basedir}/src/main/resources</directory>
- </resource>
- <resource>
- <directory>target/classes</directory>
- <includes>
- <include>OSGI-INF/**</include>
- </includes>
- <filtering>false</filtering>
- </resource>
- </resources>
-
- <plugins>
- <!-- translate UTF-8 encoded properties files to
ISO-8859-1 -->
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
-
<artifactId>native2ascii-maven-plugin</artifactId>
- <version>1.0-beta-1</version>
- <executions>
- <execution>
- <goals>
-
<goal>native2ascii</goal>
- </goals>
- <configuration>
-
<encoding>UTF-8</encoding>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.rat</groupId>
- <artifactId>apache-rat-plugin</artifactId>
- <configuration>
- <includes>
- <include>src/**</include>
- </includes>
- <excludes>
- <exclude>src/main/resources/res/*.html</exclude>
- </excludes>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <version>5.1.9</version>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Bundle-SymbolicName>
- ${project.artifactId}
- </Bundle-SymbolicName>
- <Bundle-Activator>
-
org.apache.felix.webconsole.plugins.deppack.internal.Activator
- </Bundle-Activator>
- <Embed-Dependency>
-
org.apache.felix.utils;inline=org/apache/felix/utils/json/JSONWriter**
- </Embed-Dependency>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <dependencies>
- <dependency>
- <groupId>jakarta.servlet</groupId>
- <artifactId>jakarta.servlet-api</artifactId>
- <version>5.0.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>osgi.core</artifactId>
- <version>6.0.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
-
<artifactId>org.osgi.service.deploymentadmin</artifactId>
- <version>1.1.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.webconsole</artifactId>
- <version>4.8.13-SNAPSHOT</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.utils</artifactId>
- <version>1.11.8</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-</project>
diff --git
a/webconsole-plugins/deppack/src/main/java/org/apache/felix/webconsole/plugins/deppack/internal/Activator.java
b/webconsole-plugins/deppack/src/main/java/org/apache/felix/webconsole/plugins/deppack/internal/Activator.java
deleted file mode 100644
index 8a386e12af..0000000000
---
a/webconsole-plugins/deppack/src/main/java/org/apache/felix/webconsole/plugins/deppack/internal/Activator.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.felix.webconsole.plugins.deppack.internal;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.osgi.service.deploymentadmin.DeploymentAdmin;
-import org.osgi.util.tracker.ServiceTracker;
-import org.osgi.util.tracker.ServiceTrackerCustomizer;
-
-/**
- * Activator is the main starting class.
- */
-public class Activator implements BundleActivator,
ServiceTrackerCustomizer<DeploymentAdmin, WebConsolePlugin>
-{
-
- private ServiceTracker<DeploymentAdmin, WebConsolePlugin> tracker;
- private BundleContext context;
-
- /**
- * @see
org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
- */
- public final void start(BundleContext context) throws Exception
- {
- this.context = context;
- this.tracker = new ServiceTracker(context, DeploymentAdmin.class,
this);
- this.tracker.open();
- }
-
- /**
- * @see
org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- public final void stop(BundleContext context) throws Exception
- {
- if (tracker != null)
- {
- tracker.close();
- tracker = null;
- }
- }
-
- // - begin tracker
- /**
- * @see
org.osgi.util.tracker.ServiceTrackerCustomizer#modifiedService(org.osgi.framework.ServiceReference,
- * java.lang.Object)
- */
- public final void modifiedService(ServiceReference<DeploymentAdmin>
reference, WebConsolePlugin service)
- {/* unused */
- }
-
- /**
- * @see
org.osgi.util.tracker.ServiceTrackerCustomizer#addingService(org.osgi.framework.ServiceReference)
- */
- public final WebConsolePlugin
addingService(ServiceReference<DeploymentAdmin> reference)
- {
- final DeploymentAdmin admin = context.getService(reference);
- if (admin != null) {
- final WebConsolePlugin plugin = new WebConsolePlugin(admin);
- plugin.register(context);
- return plugin;
- }
-
- return null;
- }
-
- /**
- * @see
org.osgi.util.tracker.ServiceTrackerCustomizer#removedService(org.osgi.framework.ServiceReference,
- * java.lang.Object)
- */
- public final void removedService(ServiceReference<DeploymentAdmin>
reference, WebConsolePlugin plugin)
- {
- plugin.unregister();
- this.context.ungetService(reference);
- }
-}
diff --git
a/webconsole-plugins/deppack/src/main/java/org/apache/felix/webconsole/plugins/deppack/internal/WebConsolePlugin.java
b/webconsole-plugins/deppack/src/main/java/org/apache/felix/webconsole/plugins/deppack/internal/WebConsolePlugin.java
deleted file mode 100644
index ab2eccdf0a..0000000000
---
a/webconsole-plugins/deppack/src/main/java/org/apache/felix/webconsole/plugins/deppack/internal/WebConsolePlugin.java
+++ /dev/null
@@ -1,259 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.felix.webconsole.plugins.deppack.internal;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.Collection;
-import java.util.Dictionary;
-import java.util.Hashtable;
-import java.util.Map;
-
-import jakarta.servlet.Servlet;
-import jakarta.servlet.ServletException;
-import jakarta.servlet.http.HttpServletRequest;
-import jakarta.servlet.http.HttpServletResponse;
-import jakarta.servlet.http.Part;
-
-import org.apache.felix.webconsole.servlet.AbstractServlet;
-import org.apache.felix.webconsole.servlet.ServletConstants;
-import org.apache.felix.webconsole.servlet.RequestVariableResolver;
-import org.apache.felix.utils.json.JSONWriter;
-import org.osgi.service.deploymentadmin.DeploymentAdmin;
-import org.osgi.service.deploymentadmin.DeploymentPackage;
-import org.osgi.util.tracker.ServiceTracker;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceRegistration;
-
-/**
- * DepPackServlet provides a plugin for managing deployment admin packages.
- */
-class WebConsolePlugin extends AbstractServlet
-{
-
- private static final String LABEL = "deppack";
- private static final String TITLE = "%deppack.pluginTitle";
- private static final String CSS[] = { "/" + LABEL + "/res/plugin.css" };
- private static final String CATEGORY = "OSGi";
-
- //
- private static final String ACTION_DEPLOY = "deploydp";
- private static final String ACTION_UNINSTALL = "uninstalldp";
- private static final String PARAMETER_PCK_FILE = "pckfile";
-
- // templates
- private final String TEMPLATE;
-
- private final DeploymentAdmin admin;
-
- private volatile ServiceRegistration<Servlet> serviceRegistration;
-
- /** Default constructor */
- WebConsolePlugin(DeploymentAdmin admin)
- {
- // load templates
- try {
- TEMPLATE = readTemplateFile("/res/plugin.html");
- } catch (IOException ioe) {
- throw new RuntimeException("Unable to load template file");
- }
- this.admin = admin;
- }
-
- public String getCategory()
- {
- return CATEGORY;
- }
-
- public void register(final BundleContext context) {
- final Dictionary<String, Object> props = new Hashtable<String,
Object>();
- props.put(ServletConstants.PLUGIN_LABEL, LABEL);
- props.put(ServletConstants.PLUGIN_TITLE, TITLE);
- props.put(ServletConstants.PLUGIN_CATEGORY, CATEGORY);
- props.put(ServletConstants.PLUGIN_CSS_REFERENCES, CSS);
-
- this.serviceRegistration = context.registerService(Servlet.class,
this, props);
- }
-
- public void unregister() {
- if ( this.serviceRegistration != null) {
- try {
- this.serviceRegistration.unregister();
- } catch ( final IllegalStateException ise) {
- // ignore
- }
- this.serviceRegistration = null;
- }
- }
-
- /**
- * @see
javax.servlet.http.HttpServlet#doPost(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)
- */
- protected void doPost(HttpServletRequest req, HttpServletResponse resp)
- throws ServletException, IOException
- {
- // get the uploaded data
- final String action = req.getParameter("action");
- if (ACTION_DEPLOY.equals(action))
- {
- Collection<Part> parts = req.getParts();
- for (Part part : parts)
- {
- if (PARAMETER_PCK_FILE.equals(part.getName()))
- {
- try
- {
- admin.installDeploymentPackage(part.getInputStream());
- final String uri = req.getRequestURI();
- resp.sendRedirect(uri);
- return;
- }
- catch ( /*Deployment*/Exception e)
- {
- throw new ServletException("Unable to deploy
package.", e);
- }
- }
- }
- }
- else if (ACTION_UNINSTALL.equals(action))
- {
- final String pckId = req.getPathInfo().substring(
- req.getPathInfo().lastIndexOf('/') + 1);
- if (pckId != null && pckId.length() > 0)
- {
- try
- {
- final DeploymentPackage pck =
admin.getDeploymentPackage(pckId);
- if (pck != null)
- {
- pck.uninstall();
- }
- }
- catch ( /*Deployment*/Exception e)
- {
- throw new ServletException("Unable to undeploy package.",
e);
- }
- }
-
- final PrintWriter pw = resp.getWriter();
- pw.println("{ \"reload\":true }");
- return;
- }
- throw new ServletException("Unknown action: " + action);
- }
-
- /**
- * @see
org.apache.felix.webconsole.AbstractWebConsolePlugin#renderContent(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)
- */
- public void renderContent(HttpServletRequest request, HttpServletResponse
response)
- throws ServletException, IOException
- {
- StringWriter w = new StringWriter();
- PrintWriter w2 = new PrintWriter(w);
- JSONWriter jw = new JSONWriter(w2);
- jw.object();
- if (null == admin)
- {
- jw.key("error");
- jw.value(true);
- }
- else
- {
- final DeploymentPackage[] packages =
admin.listDeploymentPackages();
- jw.key("data");
-
- jw.array();
- for (int i = 0; i < packages.length; i++)
- {
- packageInfoJson(jw, packages[i]);
- }
- jw.endArray();
-
- }
- jw.endObject();
-
-
- // prepare variables
- RequestVariableResolver vars = this.getVariableResolver(request);
- vars.put("__data__", w.toString());
-
- response.getWriter().print(TEMPLATE);
- }
-
- private static final void packageInfoJson(JSONWriter jw, DeploymentPackage
pack)
- throws IOException
- {
- jw.object();
- jw.key("id");
- jw.value(pack.getName());
- jw.key("name");
- jw.value(pack.getName());
- jw.key("state");
- jw.value(pack.getVersion());
-
- jw.key("actions");
- jw.array();
-
- jw.object();
- jw.key("enabled");
- jw.value(true);
- jw.key("name");
- jw.value("Uninstall");
- jw.key("link");
- jw.value(ACTION_UNINSTALL);
- jw.endObject();
-
- jw.endArray();
-
- jw.key("props");
- jw.array();
- jw.object();
- jw.key("key");
- jw.value("Package Name");
- jw.key("value");
- jw.value(pack.getName());
- jw.endObject();
-
- jw.object();
- jw.key("key");
- jw.value("Version");
- jw.key("value");
- jw.value(pack.getVersion());
- jw.endObject();
-
- final StringBuilder buffer = new StringBuilder();
- for (int i = 0; i < pack.getBundleInfos().length; i++)
- {
- buffer.append(pack.getBundleInfos()[i].getSymbolicName());
- buffer.append(" - ");
- buffer.append(pack.getBundleInfos()[i].getVersion());
- buffer.append("<br/>");
- }
- jw.object();
- jw.key("key");
- jw.value("Bundles");
- jw.key("value");
- jw.value(buffer.toString());
- jw.endObject();
-
- jw.endArray();
-
- jw.endObject();
- }
-
-}
diff --git
a/webconsole-plugins/deppack/src/main/resources/OSGI-INF/l10n/bundle.properties
b/webconsole-plugins/deppack/src/main/resources/OSGI-INF/l10n/bundle.properties
deleted file mode 100644
index 1a0f302576..0000000000
---
a/webconsole-plugins/deppack/src/main/resources/OSGI-INF/l10n/bundle.properties
+++ /dev/null
@@ -1,40 +0,0 @@
-#Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#
-# Web Console strings for reference all strings here are commented.
-# This file may be used to produce a translation of the strings
-#
-# Note that properties files are ISO-8859-1 encoded. To provide translations
-# for languages requiring different character encodings, you may use the
-# native2ascii Maven Plugin from
http://mojo.codehaus.org/native2ascii-maven-plugin/
-# to translate the natively encoded files to ISO-8859-1 during bundle build
-#
-# Translations requiring non-ISO-8859-1 encoding are placed in the
-# src/main/native2ascii/OSGI-INF/l10n folder and are converted using said
-# plugin while building the bundle
-#
-
-# Deployment Admin plugin
-deppack.pluginTitle=Deployment Packages
-deppack.status.no_data=No deployment packages installed!
-deppack.status.no_service=Deployment Admin is not installed/running!
-deppack.status.ok=Deployment Admin service is running
-deppack.details=Details
-deppack.actions=Actions
-deppack.install_update=Install or Update
-deppack.package.name=Package Name
-deppack.bundles=Bundles
-deppack.uninstall=Uninstall
diff --git
a/webconsole-plugins/deppack/src/main/resources/OSGI-INF/l10n/bundle_bg.properties
b/webconsole-plugins/deppack/src/main/resources/OSGI-INF/l10n/bundle_bg.properties
deleted file mode 100644
index 89c20a2114..0000000000
---
a/webconsole-plugins/deppack/src/main/resources/OSGI-INF/l10n/bundle_bg.properties
+++ /dev/null
@@ -1,40 +0,0 @@
-#Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#
-# Web Console strings for reference all strings here are commented.
-# This file may be used to produce a translation of the strings
-#
-# Note that properties files are ISO-8859-1 encoded. To provide translations
-# for languages requiring different character encodings, you may use the
-# native2ascii Maven Plugin from
http://mojo.codehaus.org/native2ascii-maven-plugin/
-# to translate the natively encoded files to ISO-8859-1 during bundle build
-#
-# Translations requiring non-ISO-8859-1 encoding are placed in the
-# src/main/native2ascii/OSGI-INF/l10n folder and are converted using said
-# plugin while building the bundle
-# native2ascii -encoding utf-8 bundle_bg.raw_properties bundle_bg.properties
-
-# Deployment Admin plugin
-deppack.pluginTitle=Управление на пакети
-deppack.status.no_data=Няма инсталирани пакети!
-deppack.status.no_service=Услугата Deployment Admin не е налична в момента!
-deppack.status.ok=Deployment Admin е наличен и по-долу е показан списъка с
пакет
-deppack.details=Детайли
-deppack.actions=Действия
-deppack.install_update=Инсталиране/обновяване
-deppack.package.name=Име на пакет
-deppack.bundles=Бъндъли
-deppack.uninstall=Премахване
diff --git
a/webconsole-plugins/deppack/src/main/resources/OSGI-INF/l10n/bundle_de.properties
b/webconsole-plugins/deppack/src/main/resources/OSGI-INF/l10n/bundle_de.properties
deleted file mode 100644
index 864181f56e..0000000000
---
a/webconsole-plugins/deppack/src/main/resources/OSGI-INF/l10n/bundle_de.properties
+++ /dev/null
@@ -1,40 +0,0 @@
-#Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#
-# Web Console strings for reference all strings here are commented.
-# This file may be used to produce a translation of the strings
-#
-# Note that properties files are ISO-8859-1 encoded. To provide translations
-# for languages requiring different character encodings, you may use the
-# native2ascii Maven Plugin from
http://mojo.codehaus.org/native2ascii-maven-plugin/
-# to translate the natively encoded files to ISO-8859-1 during bundle build
-#
-# Translations requiring non-ISO-8859-1 encoding are placed in the
-# src/main/native2ascii/OSGI-INF/l10n folder and are converted using said
-# plugin while building the bundle
-#
-
-# Deployment Admin plugin
-deppack.pluginTitle=Deployment Packages
-deppack.status.no_data=Kein Deployment Package ist installiert!
-deppack.status.no_service=Deployment Admin Dienst ist nicht instaliert/aktiv!
-deppack.status.ok=Deployment Admin Dienst ist aktiv
-deppack.details=Details
-deppack.actions=Aktionen
-deppack.install_update=Installieren oder Aktualisieren
-deppack.package.name=Package Name
-deppack.bundles=Bundles
-deppack.uninstall=Deinstallieren
diff --git
a/webconsole-plugins/deppack/src/main/resources/OSGI-INF/l10n/bundle_ru.properties
b/webconsole-plugins/deppack/src/main/resources/OSGI-INF/l10n/bundle_ru.properties
deleted file mode 100644
index 6895031828..0000000000
---
a/webconsole-plugins/deppack/src/main/resources/OSGI-INF/l10n/bundle_ru.properties
+++ /dev/null
@@ -1,40 +0,0 @@
-#Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#
-# Web Console strings for reference all strings here are commented.
-# This file may be used to produce a translation of the strings
-#
-# Note that properties files are ISO-8859-1 encoded. To provide translations
-# for languages requiring different character encodings, you may use the
-# native2ascii Maven Plugin from
http://mojo.codehaus.org/native2ascii-maven-plugin/
-# to translate the natively encoded files to ISO-8859-1 during bundle build
-#
-# Translations requiring non-ISO-8859-1 encoding are placed in the
-# src/main/native2ascii/OSGI-INF/l10n folder and are converted using said
-# plugin while building the bundle
-#
-
-# Deployment Admin plugin
-deppack.pluginTitle=Управление пакетами
-deppack.status.no_data=Нет установочных пакетов!
-deppack.status.no_service=Сервис Deployment Admin не установлен или не запущен.
-deppack.status.ok=Сервис Deployment Admin работает
-deppack.details=Подробно
-deppack.actions=Действия
-deppack.install_update=Установить/обновить
-deppack.package.name=Имя пакета
-deppack.bundles=Модули
-deppack.uninstall=Удалить
diff --git a/webconsole-plugins/deppack/src/main/resources/res/plugin.css
b/webconsole-plugins/deppack/src/main/resources/res/plugin.css
deleted file mode 100644
index c767846deb..0000000000
--- a/webconsole-plugins/deppack/src/main/resources/res/plugin.css
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-.pkgname { cursor:pointer }
-.pkgname span { float:left }
diff --git a/webconsole-plugins/deppack/src/main/resources/res/plugin.html
b/webconsole-plugins/deppack/src/main/resources/res/plugin.html
deleted file mode 100644
index ba16fcdb29..0000000000
--- a/webconsole-plugins/deppack/src/main/resources/res/plugin.html
+++ /dev/null
@@ -1,55 +0,0 @@
-<script type="text/javascript" src="${pluginRoot}/res/plugin.js"></script>
-<script type="text/javascript">
-// <![CDATA[
-var i18n = {
- status_no_data : "${deppack.status.no_data}",
- status_no_serv : "${deppack.status.no_service}",
- status_ok : "${deppack.status.ok}",
- package_name : "${deppack.package.name}",
- version : "${version}",
- bundles : "${deppack.bundles}",
- uninstall : "${deppack.uninstall}"
-}
-var packageListData = ${__data__};
-// ]]>
-</script>
-
-<p class="statline"> </p>
-
-<div id="dps1"> <!-- will be hidden if no DP service available -->
-<!-- top header -->
-<form method="post" enctype="multipart/form-data" action="${pluginRoot}">
- <div class="ui-widget-header ui-corner-top buttonGroup"
style="text-align: right">
- <input name="action" type="hidden" value="deploydp" />
- <input name="pckfile" type="file" size="50" />
- <input type="submit" value="${deppack.install_update}" />
- </div>
-</form>
-
-<div id="dps2"> <!-- will be hidden if no data available -->
- <table id="plugin_table" class="nicetable">
- <thead>
- <tr>
- <th>${id}</th>
- <th style="width:100%">${deppack.details}</th>
- <th>${version}</th>
- <th colspan="1">${deppack.actions}</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td colspan="5"> </td>
- </tr>
- </tbody>
- </table>
-
- <!-- bottom header -->
- <form method="post" enctype="multipart/form-data"
action="${pluginRoot}">
- <div class="ui-widget-header ui-corner-bottom buttonGroup"
style="text-align: right">
- <input name="action" type="hidden" value="deploydp" />
- <input name="pckfile" type="file" size="50" />
- <input type="submit" value="${deppack.install_update}"
/>
- </div>
- </form>
-</div><!--dps2-->
-</div><!--dps1-->
diff --git a/webconsole-plugins/deppack/src/main/resources/res/plugin.js
b/webconsole-plugins/deppack/src/main/resources/res/plugin.js
deleted file mode 100644
index 149590e91e..0000000000
--- a/webconsole-plugins/deppack/src/main/resources/res/plugin.js
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-function fixId(id) { return id.replace('.', '_'); }
-
-function data( /* Array of Object */ dataArray ) { // render components
- plugin_table.find('tbody').empty();
- if (dataArray.length == 1) {
- entry( dataArray[0], true );
- } else {
- for ( var idx in dataArray ) {
- entry( dataArray[idx] );
- }
- }
-}
-
-function entry( /* Object */ dataEntry, /* boolean */ singleEntry ) {
- var id = fixId(dataEntry.id);
- var trElement = tr( 'ui-state-active', { 'id': 'entry' + id });
-
- // entry brief
- entryInternal( trElement, dataEntry, singleEntry );
- plugin_table.append(trElement);
-
- // dataEntry detailed properties
- trElement = tr( 'ui-helper-hidden', {
- 'id' : 'entry' + id + '_details'
- });
- if (dataEntry.props) {
- getDataEntryDetails( trElement, dataEntry.props );
- }
- plugin_table.append(trElement);
-}
-
-function entryInternal( /* Element */ parent, /* Object */ dataEntry, /*
boolean */ singleEntry ) {
- var id = dataEntry.id;
- var _id = fixId(id);
-
- parent.appendChild( td( null, null, [ text( id ) ] ) );
- parent.appendChild( td( null,
- {
- 'onclick': 'toggleDetails("#entry' + _id + '")',
- 'class': 'pkgname'
- },
- [
- createElement( 'span', 'ui-icon
ui-icon-triangle-1-e', { id: 'entry' + _id + '_icon'} ),
- text(dataEntry.name)
- ]
- )
- );
- parent.appendChild( td( null, null, [ text( dataEntry.state ) ] ) );
-
- for ( var aidx in dataEntry.actions ) {
- var action = dataEntry.actions[aidx];
- parent.appendChild( actionButton( action.enabled, id,
action.link, action.name ) );
- }
-}
-
-
-/* Element */ function actionButton( /* boolean */ enabled, /* long */ id, /*
String */ op, /* String */ opLabel ) {
- var buttonTd = td( "content", { align: "right" } );
- if ( op ) {
- switch (opLabel) {
- case "Uninstall" : opLabel = i18n.uninstall; break;
- }
- var input = createElement( "input", null, {
- type: 'button',
- value: opLabel,
- onclick: 'changeDataEntryState("' + id + '", "'
+ op + '");'
- });
- if (!enabled) {
- input.setAttribute( "disabled", true );
- $(input).addClass('ui-state-disabled');
- }
- buttonTd.appendChild( input );
- } else {
- addText( buttonTd, "\u00a0" );
- }
- return buttonTd;
-}
-
-
-function getDataEntryDetails( /* Element */ parent, /* Array of Object */
details )
-{
- parent.appendChild( addText( td( "content"), "\u00a0" ) );
-
- var tdEl = td( null, { colspan: 4 } );
- parent.appendChild( tdEl );
-
- var tableEl = createElement( "table", null, { border: 0 } );
- tdEl.appendChild( tableEl );
-
- var tbody = createElement( "tbody" );
- tableEl.appendChild( tbody );
- for (var idx in details) {
- var prop = details[idx];
- var trEl = tr();
- var key = prop.key;
- switch (key) {
- case 'Package Name': key = i18n.package_name; break;
- case 'Version' : key = i18n.version; break;
- case 'Bundles' : key = i18n.bundles; break;
- }
- trEl.appendChild( addText( td( null, { noWrap: true } ), key )
);
-
- var proptd = td();
- trEl.appendChild( proptd );
- $(proptd).html( prop.value ? prop.value : "\u00a0");
-
- tbody.appendChild( trEl );
- }
- }
-
-
-function changeDataEntryState(/* long */ id, /* String */ action) {
- var parm = pluginRoot + "/" + id + "?action=" + action;
- $.post(parm, null, function() { // always reload
- document.location.reload();
- }, "text");
-}
-
-
-function toggleDetails(name) {
- var icon = $(name + '_icon');
- var details = $(name + '_details');
- var show = icon.attr('show');
- if (typeof show == 'undefined') show = '';
- icon.attr('show', show ? '' : 'true');
-
- if (show == 'true') {
-
icon.removeClass('ui-icon-triangle-1-s').addClass('ui-icon-triangle-1-e');
- details.addClass('ui-helper-hidden');
- } else {
-
icon.removeClass('ui-icon-triangle-1-e').addClass('ui-icon-triangle-1-s');
- details.removeClass('ui-helper-hidden');
- }
-}
-
-var plugin_table = false;
-$(document).ready(function() {
- plugin_table = $('#plugin_table');
- var /* Array of Data Objects */ bundleData = packageListData;
- if (bundleData.error) {
- $('.statline').text(i18n.status_no_serv);
- $('#dps1').addClass('ui-helper-hidden');
- } else if (!bundleData.data || bundleData.data.length == 0) {
- $('.statline').text(i18n.status_no_data);
- $('#dps1').removeClass('ui-helper-hidden');
- $('#dps2').addClass('ui-helper-hidden');
- } else {
- data( bundleData.data );
- $('.statline').text(i18n.status_ok);
- $('#dps1').removeClass('ui-helper-hidden');
- $('#dps2').removeClass('ui-helper-hidden');
- initStaticWidgets(plugin_table);
- }
-});
-