Skip to content

Commit

Permalink
Merge pull request 'Bump goobi workflow dependency to 23.04.1' (#14) …
Browse files Browse the repository at this point in the history
…from update_goobi_dep_to_23.04.1 into master

Reviewed-on: https://gitea.intranda.com/goobi-workflow/goobi-plugin-dashboard-extended/pulls/14
  • Loading branch information
rsehr committed May 5, 2023
2 parents 3029df7 + d2fd0c3 commit 5e701e9
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions plugin/module-gui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<modelVersion>4.0.0</modelVersion>
<groupId>de.intranda.goobi.plugins.dashboard</groupId>
<artifactId>extended-gui</artifactId>
<version>1.0.0</version>
<version>23.04.1</version>
<properties>
<jar.name>plugin_intranda_dashboard_extended-GUI</jar.name>
<dest.folder>/opt/digiverso/goobi/plugins/GUI/</dest.folder>
</properties>
<parent>
<groupId>de.intranda.goobi.plugins.dashboard</groupId>
<artifactId>extended</artifactId>
<version>1.0.0</version>
<version>23.04.1</version>
</parent>
<build>
<finalName>${jar.name}</finalName>
Expand Down
4 changes: 2 additions & 2 deletions plugin/module-main/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<modelVersion>4.0.0</modelVersion>
<groupId>de.intranda.goobi.plugins.dashboard</groupId>
<artifactId>extended-main</artifactId>
<version>1.0.0</version>
<version>23.04.1</version>
<properties>
<jar.name>plugin_intranda_dashboard_extended</jar.name>
<dest.folder>/opt/digiverso/goobi/plugins/dashboard/</dest.folder>
</properties>
<parent>
<groupId>de.intranda.goobi.plugins.dashboard</groupId>
<artifactId>extended</artifactId>
<version>1.0.0</version>
<version>23.04.1</version>
</parent>
<build>
<finalName>${jar.name}</finalName>
Expand Down
4 changes: 2 additions & 2 deletions plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<modelVersion>4.0.0</modelVersion>
<groupId>de.intranda.goobi.plugins.dashboard</groupId>
<artifactId>extended</artifactId>
<version>1.0.0</version>
<version>23.04.1</version>
<packaging>pom</packaging>
<properties>
<goobi.version>23.03.2</goobi.version>
<goobi.version>23.04.1</goobi.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<modules>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* This file is part of a plugin for the Goobi Application - a Workflow tool for the support of mass digitization.
*
* Visit the websites for more information.
* Visit the websites for more information.
* - https://goobi.io
* - https://www.intranda.com
* - https://github.com/intranda/goobi
Expand Down Expand Up @@ -36,7 +36,7 @@
import de.intranda.digiverso.model.itm.DashQueuesObj;
import de.intranda.digiverso.model.itm.IJob;
import de.intranda.digiverso.model.itm.JobImpl;
import de.sub.goobi.helper.HttpClientHelper;
import io.goobi.workflow.api.connection.HttpUtils;

public class DashboardHelperItm {

Expand All @@ -51,24 +51,24 @@ public List<DashQueuesObj> getItmPlugins() throws MalformedURLException {
Gson gson = new Gson();

// read all plugin types of the itm
String response = HttpClientHelper.getStringFromUrl(basisUrl + "action=getPlugins");
String response = HttpUtils.getStringFromUrl(basisUrl + "action=getPlugins");
List<DashQueuesObj> itmPluginList = gson.fromJson(response, new TypeToken<List<DashQueuesObj>>() {
}.getType());

if (itmPluginList != null) {
// read all job queues for this plugin type
for (DashQueuesObj dqo : itmPluginList) {
response = HttpClientHelper.getStringFromUrl(basisUrl + "action=getJobs&jobtype=" + dqo.getStrInt().getStr() + "&status=DONE");
response = HttpUtils.getStringFromUrl(basisUrl + "action=getJobs&jobtype=" + dqo.getStrInt().getStr() + "&status=DONE");
List<IJob> jobsDone = gson.fromJson(response, new TypeToken<List<JobImpl>>() {
}.getType());
dqo.setListDone(jobsDone);

response = HttpClientHelper.getStringFromUrl(basisUrl + "action=getJobs&jobtype=" + dqo.getStrInt().getStr() + "&status=ERROR");
response = HttpUtils.getStringFromUrl(basisUrl + "action=getJobs&jobtype=" + dqo.getStrInt().getStr() + "&status=ERROR");
List<IJob> jobsError = gson.fromJson(response, new TypeToken<List<JobImpl>>() {
}.getType());
dqo.setListError(jobsError);

response = HttpClientHelper.getStringFromUrl(basisUrl + "action=getJobs&jobtype=" + dqo.getStrInt().getStr() + "&status=PROCESSING");
response = HttpUtils.getStringFromUrl(basisUrl + "action=getJobs&jobtype=" + dqo.getStrInt().getStr() + "&status=PROCESSING");
List<IJob> jobsProcessing = gson.fromJson(response, new TypeToken<List<JobImpl>>() {
}.getType());
dqo.setListProcessing(jobsProcessing);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* This file is part of a plugin for the Goobi Application - a Workflow tool for the support of mass digitization.
*
* Visit the websites for more information.
* Visit the websites for more information.
* - https://goobi.io
* - https://www.intranda.com
* - https://github.com/intranda/goobi
Expand Down Expand Up @@ -34,7 +34,7 @@

import de.intranda.digiverso.model.nagios.Host;
import de.intranda.digiverso.model.nagios.Nagios;
import de.sub.goobi.helper.HttpClientHelper;
import io.goobi.workflow.api.connection.HttpUtils;

public class DashboardHelperNagios {

Expand Down Expand Up @@ -73,12 +73,12 @@ public List<Host> getHosts() {
String serverPassword = config.getString("nagios-password", "password");

// run through all configured hosts
hosts = new ArrayList<Host>();
hosts = new ArrayList<>();
int numberOfHosts = config.getMaxIndex("nagios-host");
for (int i = 0; i <= numberOfHosts; i++) {
String url = config.getString("nagios-host(" + i + ")");
String serverURL = "http://monitoring.intranda.com/icinga/cgi-bin/status.cgi?host=" + url + "&jsonoutput";
String json = HttpClientHelper.getStringFromUrl(serverURL, serverLogin, serverPassword, "monitoring.intranda.com", "80");
String json = HttpUtils.getStringFromUrl(serverURL, serverLogin, serverPassword, "monitoring.intranda.com", "80");
Gson gson = new Gson();
Host host = new Host(url);
host.setNagios(gson.fromJson(json, Nagios.class));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
import com.rometools.rome.io.SyndFeedInput;

import de.intranda.digiverso.model.rss.RssEntry;
import de.sub.goobi.helper.HttpClientHelper;
import io.goobi.workflow.api.connection.HttpUtils;

public class DashboardHelperRss {

Expand All @@ -55,7 +55,7 @@ public List<RssEntry> getFeed() {

try {
SyndFeedInput input = new SyndFeedInput();
SyndFeed feed = input.build(new StringReader(HttpClientHelper.getStringFromUrl(getFeedUrl())));
SyndFeed feed = input.build(new StringReader(HttpUtils.getStringFromUrl(getFeedUrl())));

@SuppressWarnings("unchecked")
List<SyndEntry> feedList = feed.getEntries();
Expand Down

0 comments on commit 5e701e9

Please sign in to comment.