Skip to content

Commit

Permalink
fix admin console (OpenIdentityPlatform#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
maximthomas authored Jun 7, 2022
1 parent 9c92306 commit e2b27f2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 18 deletions.
2 changes: 1 addition & 1 deletion openig-ui/src/main/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ require.config({
xdate: "libs/xdate-0.8-min",
doTimeout: "libs/jquery.ba-dotimeout-1.0-min",
handlebars: "libs/handlebars-4.7.6",
moment: "libs/moment-2.8.1-min",
moment: "libs/moment-2.28.0-min",
bootstrap: "libs/bootstrap-3.3.5-custom",
"bootstrap-dialog": "libs/bootstrap-dialog-1.34.4-min",
placeholder: "libs/jquery.placeholder-2.0.8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2016 ForgeRock AS.
* Portions copyright 2022 Open Identity Platform Community
*/

package org.forgerock.openig.web;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,6 @@

package org.forgerock.openig.web;

import static java.util.Collections.singletonList;
import static org.forgerock.http.routing.RouteMatchers.requestUriMatcher;
import static org.forgerock.http.routing.RoutingMode.STARTS_WITH;

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.net.URL;
import java.util.jar.JarEntry;
import java.util.jar.JarInputStream;

import org.forgerock.http.io.IO;
import org.forgerock.json.JsonValue;
import org.forgerock.openig.config.Environment;
Expand All @@ -41,6 +27,18 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.*;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.jar.JarEntry;
import java.util.jar.JarInputStream;

import static java.util.Collections.singletonList;
import static org.forgerock.http.io.IO.newTemporaryStorage;
import static org.forgerock.http.routing.RouteMatchers.requestUriMatcher;
import static org.forgerock.http.routing.RoutingMode.STARTS_WITH;

/**
* Extension of the admin module that is responsible to serve the UI.
*/
Expand Down Expand Up @@ -88,9 +86,9 @@ class UiAdminHttpApplication extends AdminHttpApplication {
ResourceSet resources = new FileResourceSet(unpack);

// Create a ResourceHandler
ResourceHandler handler = new ResourceHandler(getBufferFactory(),
singletonList(resources),
singletonList("index.html"));
ResourceHandler handler = new ResourceHandler(newTemporaryStorage(),
singletonList(resources),
singletonList("index.html"));

// Register it in the router under the /openig/studio path
getOpenIGRouter().addRoute(requestUriMatcher(STARTS_WITH, "studio"), handler);
Expand Down

0 comments on commit e2b27f2

Please sign in to comment.