Giter Club home page Giter Club logo

backstage's People

Contributors

dfhuynh avatar distobj avatar stefanom avatar zepheiryan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

backstage's Issues

Incorporate Scripted features

Add Scripted features:

  • Cloud facet
  • Text search facet (?)
  • Thumbnail view
  • Tabular view
  • Control panel / bookmark widget

There may be others coming which should then be listed in this issue.

Facet selection sometimes uses multiple XHR requests

If a facet already has a selected state, and another facet is selected, then that selection action will result in two XHR PUT requests, one for each facet. Only one - for the newly selected facet - should be required.

generateIdentifier is not a function

When exhibit(staged) is loading, firebug throws an error:
_TypeError: this.uiContext.getBackstage().getRegistry().generateIdentifier is not a function.
The error is triggered on line 200 of http://localhost:8181/backstage/api/scripts/ui/facets/list-facet.js

Exhibit.Facet._registryKey 

This error is generated when the facet div has no id:

<td><div ex:role="facet" ex:expression=".collectionSite" ex:facetLabel="Collection Site"></div></td>
<td><div ex:role="facet" ex:expression=".organism" ex:facetLabel="Organism"></div></td>
<td><div ex:role="facet" ex:expression=".sampleType" ex:facetLabel="Sample Type"></div></td>

When I add an id to the divs the error gives birth to another:
TypeError: this.getRegistry().getID is not a function
The error is triggered on line 369 of http://localhost:8181/backstage/api/scripts/backstage.js

component = this.getRegistry().getID(state.id); 

This last error is persistent even with the demo Sweden Europeana

steps to run demo

hey folks -- i have built everything per the readme, and now I want to run the demo in backstage/demos/sweden-europeana. what steps do I have to perform to get the demo running?

./post.rb
201
{:expires=>"Thu, 01 Jan 1970 00:00:00 GMT", :set_cookie=>["host=.butterfly;Path=/;Expires=Fri, 21-Oct-11 22:29:11 GMT", "JSESSIONID=148oam22mn1j6;Path=/"], :location=>"/data/5db3711d", :content_type=>"text/plain; charset=utf-8", :content_length=>"26", :server=>"Jetty(6.1.22)"}
Data successfully uploaded

index.html

link href="http://localhost:8181/data/5db3711d" rel="exhibit/data"


script src="http://localhost:8181/backstage/exhibit/api/exhibit-api.js?autoCreate=false&postLoad=true&js=http://localhost:8181/backstage/api/backstage-api.js"

15:28:58.706 [server ] Starting autoreloading scanner... (184ms)
15:30:36.771 [backstage.collection ] Failed to update facet (0ms)
edu.mit.simile.backstage.model.data.ExpressionException: No property can be aliased to 'creator'
at edu.mit.simile.backstage.model.data.Path.computeOutput(Path.java:75)
at edu.mit.simile.backstage.model.data.Expression.computeOutputOnItem(Expression.java:46)
at edu.mit.simile.backstage.model.ui.facets.ListFacet.update(ListFacet.java:121)
at edu.mit.simile.backstage.model.data.Collection.updateOneFacet(Collection.java:86)
at edu.mit.simile.backstage.model.data.Collection.addFacet(Collection.java:60)
at edu.mit.simile.backstage.model.ui.facets.ListFacet.configure(ListFacet.java:80)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:161)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:247)
at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76)

I was consistently getting this error then I stopped the server and restarted, and now I'm not getting it. Now I'm getting back "0 results in total"

I also see that the content-length is '26' -- so not sure what is going on here...

it would be nice to have a simple walkthru soup-to-nuts on how to update the demo data, and then run the demo.

thanks -- paul

Backstage History not sticking across sessions

Browse a Staged Exhibit and leave it in a non-vanilla state. Reloading the page should show it in the same state. Go to the same Staged Exhibit in a different tab; it will appear in a vanilla state. It should retain the state from the other browser.

Support multiple exhibits per uploaded dataset

In the process of investigating issue #13 and CacheableQuery, we've discovered that Backstage only supports a single exhibit per dataset. This should be fixed eventually, but it shouldn't be a showstopper, so we need to document this fact.

TypeError: Cannot call method "hasComponentsChangingState" of undefined

I am receiving the session back from the http request with a 201 now. However the data itself is not being returned instead I receive the following error.

Butterfly Error
Butterfly caught the following error while processing the request:
org.mozilla.javascript.EcmaError: TypeError: Cannot call method "hasComponentsChangingState" of undefined (file:/home/quickstart/e3src/backstage/modules/backstage/MOD-INF/server.js#289)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3350)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3340)
at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3356)
at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3375)
at org.mozilla.javascript.ScriptRuntime.undefCallError(ScriptRuntime.java:3394)
at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.java:2026)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3081)
at script.processBackChannel(file:/home/quickstart/e3src/backstage/modules/backstage/MOD-INF/server.js:289)
at script.clearAllFacetRestrictions(file:/home/quickstart/e3src/backstage/modules/backstage/MOD-INF/server.js:443)
at script.process(file:/home/quickstart/e3src/backstage/modules/backstage/MOD-INF/server.js:54)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2394)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:160)
at edu.mit.simile.butterfly.ButterflyModuleImpl$Controller.process(ButterflyModuleImpl.java:461)
at edu.mit.simile.butterfly.ButterflyModuleImpl$Controller.run(ButterflyModuleImpl.java:438)
at org.mozilla.javascript.Context.call(Context.java:577)
at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:503)
at edu.mit.simile.butterfly.ButterflyModuleImpl.processScript(ButterflyModuleImpl.java:689)
at edu.mit.simile.butterfly.ButterflyModuleImpl.process(ButterflyModuleImpl.java:502)
at edu.mit.simile.butterfly.Butterfly.service(Butterfly.java:511)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
at clime.messadmin.filter.MessAdminFilter.doFilter(MessAdminFilter.java:104)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at org.mortbay.jetty.nio.BlockingChannelConnector$Connection.run(BlockingChannelConnector.java:163)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

Java & installation issue

I've just had a go at installing this on ubuntu 12.10 using java-1.7.0-openjdk-i386

I was getting the error:
"Butterfly requires Java version 6 or later."
So I altered line 458 of /butterfly/butterfly:

  • JAVA_VERSION=$JAVA -version 2>&1 | grep version | cut -d ' ' -f 3 | egrep ^\"1\.6
  • JAVA_VERSION=$JAVA -version 2>&1 | grep version | cut -d ' ' -f 3 | egrep ^\"1\.7

and then everything seems fine!

I guess this is a Butterfly issue more than a Backstage issue, but as I encountered it when trying to get Backstage up and running I thought I'd report it. Hope that's ok.

"ex:if-exists" hangs in client

When using if-exists in a lens, the client-side script seems to choke in rendering the lens, as the "working" notice never disappears. Facets are rendered correctly however, and it appears as though all the correct data arrives to the browser intact.

Hidden facet value bug

Sometimes facet updates end up invisible to the end user. The apparent invisibility seems to come from no dimensionality in the facet values (specifically the values, the container retains its size) - no height, no width, so seemingly no display. It's only when a dimension is requested, like $(element).height(), that they regain the correct dimensions and show up. This seems to point to a jQuery library bug, but it's not clear if that's correct.

Ugly work around in 98aa888 which should eventually be replaced by a true fix.

Tests

Backstage needs new tests for its new HTTP interface.

Use Sesame aggregate functions

Backstage was written before aggregate functions were introduced into the Sesame feature set. Rewrite any code that does aggregate-like functionality to use the corresponding Sesame method. Counts for facet values and tile view totals come to mind, I'm not sure what else qualifies.

Enahancement: Option to prevent cached json data

Browsers cache the json returned from a html links

Ideally, Exhibit is using the latest json data.
We can prevent caching by appending a random number:
<link href="senators.json?i=232323.232323" type="application/json" rel="exhibit-data" />

We can generate this HTML dynamically

// create an HTML head link with optional cache buster
function loadExhibitResource(file, opts ){              
  if (opts && opts.cache && opts.cache === 'no')   file += "?i="+(Math.random()*99999999);
  var link  =  document.createElement("link");
  link.href =  file;
  link.type =  'application/json';
  link.rel  =  'exhibit-data';
  document.getElementsByTagName("head")[0].appendChild(link);       
}

loadExhibitResource('senators.json', {cache: no} );

Search

Backstage needs to support plain text search, using the same/similar interface as Scripted.

main class not loading

I tried to build backstage exactly according to the installation procedures mentioned and all went fine unless, when I started executing by ./backstage
It gives an error as:

Starting Butterfly at 'http://localhost:8181/'
Error:Could not find or load main class edu.mit.simile.butterfly.ButterflyServer

I found the aforementioned class in the server.classes dir but somehow it doesn't load.

Add RESTful API

Reading from the JSONP API, add an XHR/JSON/RESTful API implementing the same features.

Unable to run demo on local BACKSTAGE

Hi,

I have install exhivi3 as described in [1]. The installation was successful. The I have uploaded demo data (from backstage/demos/sweden-europeana/europeana-swe.json) using the instruction from [2]. I am able to browse the imported data using [3]. The Then I have updated the index.html with the following information:

<link href="http://localhost:8181/backstage/data/disk/55ab6c5a" rel="exhibit/data" /> 

<script src="http://localhost:8181/backstage/exhibit/api/exhibit-api.js?autoCreate=false&postLoad=true&js=http://localhost:8181/backstage/api/backstage-api.js"></script> 

I have the following error in the browser:

$ is not a function
$(document).one("scriptsLoaded.exhibit", loadMe); - Line 150 of backstage-api.js

and:
Operation is not supported

I have also set up DATABASE_DIR with absolute path to /home/myusername/dev/e3src/butterfly/databases.

I have the same error with and without this database variable.

I appreciate any help to solve this issue.

William

[1] https://github.com/zepheira/backstage/wiki/Building-backstage
[2] curl -i -H "Content-Type: application/json" -X POST -T europeana-swe.json http://localhost:8181/backstage/data/disk
[3] http://localhost:8181/backstage/data/disk/55ab6c5a

Facet restriction from the browser should not use PUT

Facets of an exhibit session are currently modified using HTTP PUT. Though this might be considered the correct method from a purely "API" POV - and may be retained for that reason - it's a bad idea to use it from a browser because it doesn't reflect the actions of the user (who is effectively performing a GET).

Butterfly throws 500

I tried building backstage on ubuntu maverick (with sun-java6-jdk) as outlined on the wiki page. However, when running backstage I get a 404, albeit the resource path in the context is correct. When running butterfly on its own it reports a 500 and the following trace stack:

java.lang.NullPointerException
at edu.mit.simile.butterfly.Butterfly.service(Butterfly.java:500)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
at clime.messadmin.filter.MessAdminFilter.doFilter(MessAdminFilter.java:104)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at org.mortbay.jetty.nio.BlockingChannelConnector$Connection.run(BlockingChannelConnector.java:163)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

It is possible that my configuration options don't match yours. Thus, I'd be interested if you kept getting similar errors at any point during development. I'd appreciate any help as I would love testing exhibit3.

Bookmarkable URLs

Expose facet state selection in URLs, and reconstruct that state on GET requests.

Contention problems during exhibit initialization

If an exhibit is loaded from two separate browser tabs at approximately the same time, where initialization of the exhibit in the backstage server has not yet occurred or completed, one or both of the browsers will usually receive incomplete information for one or more of the queries via the JSONP interface. This has manifested as an empty facet, an empty lens view, or a combination.

I will keep this up to date as I learn more.

Deployment to hosted services

Look into making Backstage easily deployable to hosted services, like an Amazon EC2 AMI, or to Google App Engine, particularly since Butterfly is already set for App Engine deployment.

Clean up re-purposed Unhosted mode code

The code behind "Unhosted" mode was rewritten and its name no longer reflects its purpose. There's some vestigial code lying around which has already caused us problems. This code needs be to be renamed and cleaned up.

Re-institute HostedDatabase

HostedDatabase - the wrapper around the centralized disk-based database - was disabled but should be re-enabled and integrated cleanly into the HTTP API (to work alongside the InMemHostedDatabase instances) and authoring environment.

Add feature to clear exhibit lens object cache

As a result of the closing of issue #13, we identified the need to permit authors to explicitly clear the lens object cache associated with hosted exhibit data, which they would need to use when after editing their exhibit HTML.

issue with HTML / exhibit parsing

working on icd9 backstage demonstration i'm seeing odd behavior when changing the HTML / exhibit structure.

Given a sample lens

<div ex:role="exhibit-lens" class="a-lens" onmouseover="mouseOver(this);" onmouseout="mouseOut(this);">
  <div class="title"><span ex:content=".label"></span></div>
  <div>Kind: <span ex:content=".kind"></span></div>
  <div>Inclusion: <span ex:content=".inclusion"></span></div>
  <div>Subclass of: <span ex:content=".subclasses.label"></span></div>
  <div>Superclass of: <span ex:content=".superclasses.label"></span></div>
  <div class="identifier">Identifier: <span ex:content=".id"></span></div>
</div>

and then adding an


into this ... e.g.

<div ex:role="exhibit-lens" class="a-lens" onmouseover="mouseOver(this);" onmouseout="mouseOut(this);">
  <div class="title"><span ex:content=".label"></span></div>
  <div>Kind: <span ex:content=".kind"></span></div>
  <div>Inclusion: <span ex:content=".inclusion"></span></div>
  <div>Subclass of: <span ex:content=".subclasses.label"></span></div>
  <div>Superclass of: <span ex:content=".superclasses.label"></span></div>
  <hr />
  <div class="identifier">Identifier: <span ex:content=".id"></span></div>
</div>

hangs the backstaged exhibit.

I've seen similar behavior when changing around the HTML structure. I narrowed the problem down to this simple change, but i suspect its a bigger issue.

Flagging this as nothing will frustrate users more than simple stylistic / structural changes to HTML breaking their exhibit.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.