Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoberto E. Escobar2014-08-14 00:24:20 +0000
committerRoberto E. Escobar2014-09-29 22:55:20 +0000
commitce59e261a413ea314adf2c47b71c929ec0dfe463 (patch)
tree9a963125aad169b7c992629222b0623e1c5d7372
parent84045a1897455dd7988bc473938cda7fee39c22d (diff)
downloadorg.eclipse.osee-ce59e261a413ea314adf2c47b71c929ec0dfe463.tar.gz
org.eclipse.osee-ce59e261a413ea314adf2c47b71c929ec0dfe463.tar.xz
org.eclipse.osee-ce59e261a413ea314adf2c47b71c929ec0dfe463.zip
feature[ats_ATS40040]: Remove non-angular dispo UI
-rw-r--r--plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/util/HtmlWriterTest.java141
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/META-INF/MANIFEST.MF5
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/resources/DispoAdminResource.java48
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/resources/DispoApplication.java5
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/resources/DispoHtmlOutputStream.java130
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/resources/DispoInitResource.java54
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/DispoFactory.java6
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/DispoHtmlWriter.java335
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/HtmlWriter.java116
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/TemplateRegistry.java52
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/html/dispoAdminStyles.css176
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/html/dispoScript.js156
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/html/dispoStyles.css240
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/html/dispositionOld.html44
14 files changed, 4 insertions, 1504 deletions
diff --git a/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/util/HtmlWriterTest.java b/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/util/HtmlWriterTest.java
deleted file mode 100644
index 01471a04b98..00000000000
--- a/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/util/HtmlWriterTest.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.disposition.rest.util;
-
-import static org.junit.Assert.assertEquals;
-import static org.mockito.Mockito.when;
-import java.util.Arrays;
-import org.eclipse.osee.disposition.model.Note;
-import org.eclipse.osee.framework.jdk.core.type.Identifiable;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-/**
- * @author Angel Avila
- */
-public class HtmlWriterTest {
-
- private final static String PAGE_FORMAT = "<!-- pageDeclaration.html -->\n" + //
- "<!DOCTYPE HTML>\n" + //
- "<html>\n" + //
- "<head>\n" + //
- " <title>%s</title>\n" + //
- "</head>\n" + //
- "<body>\n" + //
- "%s" + //
- "</body>\n" + //
- "</html>";
-
- private HtmlWriter writer;
-
- //@formatter:off
- @Mock private Identifiable<String> id1;
- @Mock private Identifiable<String> id2;
- //@formatter:on
-
- @Before
- public void setUp() {
- MockitoAnnotations.initMocks(this);
- writer = new HtmlWriter(TemplateRegistry.newRegistry());
-
- when(id1.getGuid()).thenReturn("abcdef");
- when(id1.getName()).thenReturn("Id 1");
-
- when(id2.getGuid()).thenReturn("12345");
- when(id2.getName()).thenReturn("Id 2");
- }
-
- @Test
- public void testDispoPage() throws Exception {
- String expected = htmlPage("Hello", "<center>\n" + //
- " <h2>Hello</h2>\n" + //
- "</center>\n" + //
- "\t<p align=\"right\"></p>\n" + //
- "\t<ul><li><a href=\"abcdef\">Id 1</a></li><li><a href=\"12345\">Id 2</a></li></ul>\n");
-
- @SuppressWarnings("unchecked")
- String actual = writer.createDispositionPage("Hello", "", Arrays.asList(id1, id2));
- assertEquals(expected, actual);
- }
-
- @Test
- public void testDispoPageWithPrefix() throws Exception {
- String expected = htmlPage("HELLO2", "<center>\n" + //
- " <h2>HELLO2</h2>\n" + //
- "</center>\n" + //
- "\t<p align=\"right\"></p>\n" + //
- "\t<li><a href=\"prefix\">subTitle</a></li>\n");
-
- String actual = writer.createDispoPage("HELLO2", "prefix", "subTitle", "[]");
- assertEquals(expected, actual);
- }
-
- @Test
- public void testDispoPageWithPrefixAndNotes() throws Exception {
- Note noteOne = new Note();
- noteOne.setContent("Hola");
- noteOne.setDateString("dateString");
- noteOne.setType("Dev");
-
- Note noteTwo = new Note();
- noteTwo.setContent("Hola2");
- noteTwo.setDateString("dateString2");
- noteTwo.setType("Dev2");
-
- JSONObject noteOneAsJson = new JSONObject(noteOne);
- JSONObject noteTwoAsJson = new JSONObject(noteTwo);
- JSONArray notes = new JSONArray();
- notes.put(noteOneAsJson);
- notes.put(noteTwoAsJson);
- String notesString = getNotesString(notes);
-
- String expected = htmlPage("HELLO2", "<center>\n" + //
- " <h2>HELLO2</h2>\n" + //
- "</center>\n" + //
- "\t<p align=\"right\">" + notesString + "</p>\n" + //
- "\t<li><a href=\"prefix\">subTitle</a></li>\n");
-
- String actual = writer.createDispoPage("HELLO2", "prefix", "subTitle", notes.toString());
- assertEquals(expected, actual);
- }
-
- private String getNotesString(JSONArray notesArray) throws JSONException {
- StringBuilder sb = new StringBuilder();
- int count = notesArray.length();
-
- for (int i = 0; i < count; i++) {
- if (i != 0) {
- sb.append("<br><br>---------------------------<br><br>");
- }
- JSONObject note = notesArray.getJSONObject(i);
- if (note.has("content")) {
- sb.append(note.getString("content"));
- }
- if (note.has("type")) {
- sb.append(String.format("<br><b>Type:</b><i>%s</i><br>", note.getString("type")));
- }
- if (note.has("dateString")) {
- sb.append(note.getString("dateString"));
- }
- }
- return sb.toString();
- }
-
- private static String htmlPage(String title, String body) {
- return String.format(PAGE_FORMAT, title, body);
- }
-
-}
diff --git a/plugins/org.eclipse.osee.disposition.rest/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.disposition.rest/META-INF/MANIFEST.MF
index 318962aff86..6930bf2fa27 100644
--- a/plugins/org.eclipse.osee.disposition.rest/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.disposition.rest/META-INF/MANIFEST.MF
@@ -8,9 +8,7 @@ Bundle-Vendor: Eclipse Open System Engineering Environment
Service-Component: OSGI-INF/*.xml
Osee-JaxRs-Resource: /web/*;path=/dispo
Import-Package:
- com.google.common.collect,
- com.google.common.io,
- com.google.gson;version="2.1.0",
+ com.google.gson,
javax.ws.rs,
javax.ws.rs.core,
javax.ws.rs.ext,
@@ -30,5 +28,4 @@ Import-Package:
org.eclipse.osee.orcs.search,
org.eclipse.osee.orcs.transaction,
org.eclipse.osee.orcs.utility,
- org.eclipse.osee.template.engine,
org.json
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/resources/DispoAdminResource.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/resources/DispoAdminResource.java
deleted file mode 100644
index b4552873387..00000000000
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/resources/DispoAdminResource.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.disposition.rest.resources;
-
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status;
-import javax.ws.rs.core.UriInfo;
-import org.eclipse.osee.disposition.rest.util.DispoHtmlWriter;
-
-/**
- * @author Angel Avila
- */
-@Path("admin")
-public class DispoAdminResource {
-
- private final DispoHtmlWriter writer;
-
- public DispoAdminResource(DispoHtmlWriter writer) {
- this.writer = writer;
- }
-
- @GET
- @Produces(MediaType.TEXT_HTML)
- public Response start(@Context UriInfo uriInfo) {
- Response.Status status;
- String html;
- status = Status.OK;
- String host = uriInfo.getAbsolutePath().getHost();
- int port = uriInfo.getAbsolutePath().getPort();
- String url = host + ":" + port;
- html = writer.createAdminTable(url);
- return Response.status(status).entity(html).build();
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/resources/DispoApplication.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/resources/DispoApplication.java
index 3fbb3ba11cd..b2aa90a3d57 100644
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/resources/DispoApplication.java
+++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/resources/DispoApplication.java
@@ -21,8 +21,6 @@ import org.eclipse.osee.disposition.rest.messages.DispoItemMessageReader;
import org.eclipse.osee.disposition.rest.messages.DispoItemMessageWriter;
import org.eclipse.osee.disposition.rest.messages.DispoSetMessageReader;
import org.eclipse.osee.disposition.rest.messages.DispoSetMessageWriter;
-import org.eclipse.osee.disposition.rest.util.DispoHtmlWriter;
-import org.eclipse.osee.disposition.rest.util.TemplateRegistry;
/**
* @author Angel Avila
@@ -51,10 +49,7 @@ public final class DispoApplication extends Application {
singletons.add(new DispoAnnotationMessageReader());
singletons.add(new DispoAnnotationMessageWriter());
- DispoHtmlWriter writer = new DispoHtmlWriter(TemplateRegistry.newRegistry());
singletons.add(new DispoProgramResource(dispoApi, dispoApi.getDispoFactory()));
- singletons.add(new DispoInitResource(writer));
- singletons.add(new DispoAdminResource(writer));
}
public void stop() {
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/resources/DispoHtmlOutputStream.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/resources/DispoHtmlOutputStream.java
deleted file mode 100644
index b9079f20f82..00000000000
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/resources/DispoHtmlOutputStream.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.disposition.rest.resources;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import javax.ws.rs.WebApplicationException;
-import javax.ws.rs.core.StreamingOutput;
-import org.eclipse.osee.disposition.model.Discrepancy;
-import org.eclipse.osee.disposition.model.DispoItem;
-import org.eclipse.osee.disposition.model.DispoStrings;
-import org.eclipse.osee.disposition.rest.internal.LocationRangesCompressor;
-import org.eclipse.osee.disposition.rest.util.DispoUtil;
-import org.json.JSONException;
-import org.json.JSONObject;
-
-/**
- * @author Angel
- */
-public final class DispoHtmlOutputStream implements StreamingOutput {
- private final Iterable<DispoItem> dispoItems;
-
- public DispoHtmlOutputStream(Iterable<DispoItem> dispoItems) {
- this.dispoItems = dispoItems;
- }
-
- @Override
- public void write(OutputStream output) throws IOException {
- Writer writer = new OutputStreamWriter(output);
- try {
-
- for (DispoItem item : dispoItems) {
- writer.append("<tr id=\"");
- writer.append(item.getGuid());
- writer.append("\" class=\"itemRow\">");
- addItemData(writer, item);
- writer.append("</tr>");
- writer.append("\n");
- }
-
- } catch (Exception ex) {
- throw new WebApplicationException(ex);
- } finally {
- writer.close();
- }
- }
-
- private void addItemData(Appendable appendable, DispoItem item) throws IOException, JSONException {
- String itemStatus = item.getStatus();
- if (itemStatus != "PASS") {
- addDataWithOnDblClick(appendable, item.getName(), "showAnnotations", "(this.parentNode)");
- } else {
- addDataWithOnDblClick(appendable, item.getName(), "", "");
- }
- addDataStatus(appendable, itemStatus);
- addData(appendable, String.valueOf(item.getTotalPoints()));
- addData(appendable, String.valueOf(item.getDiscrepanciesList().length()));
- addDataWithOnDblClick(appendable, String.valueOf(getFailureLocations(item.getDiscrepanciesList())),
- "showFailures", "(this.parentNode)");
- addDataWithOnDblClick(appendable, item.getAssignee(), "changePOC", "(this)");
- addData(appendable, item.getVersion());
- addDataAsButton(appendable, item.getNeedsRerun());
- }
-
- private void addData(Appendable appendable, String data) throws IOException {
- appendable.append("<td class=\"itemData\">");
- appendable.append(data);
- appendable.append("</td>");
- }
-
- private void addDataWithOnDblClick(Appendable appendable, String data, String onDblClickName, String params) throws IOException {
- appendable.append("<td class=\"itemData\" ondblclick=\"");
- appendable.append(onDblClickName);
- appendable.append(params);
- appendable.append("\">");
- appendable.append(data);
- appendable.append("</td>");
- }
-
- private void addDataAsButton(Appendable appendable, boolean data) throws IOException {
- appendable.append("<td class=\"itemData\">");
- appendable.append("<input class=\"form-control\" type=\"checkbox\" onclick=\"toggleRerun(this)\"");
- if (data) {
- appendable.append(" checked");
- }
- appendable.append("></input>");
- appendable.append("</td>");
- }
-
- private void addDataStatus(Appendable appendable, String data) throws IOException {
- if (data.equals(DispoStrings.Item_Complete)) {
- appendable.append("<td class=\"itemData\">");
- } else if (data.equals(DispoStrings.Item_Pass)) {
- appendable.append("<td class=\"itemDataPass\">");
- } else {
- appendable.append("<td class=\"itemDataFail\">");
- }
- appendable.append(data);
- appendable.append("</td>");
- }
-
- private String getFailureLocations(JSONObject discrepanciesList) throws JSONException {
- List<Integer> locations = new ArrayList<Integer>();
- @SuppressWarnings("unchecked")
- Iterator<String> iterator = discrepanciesList.keys();
- while (iterator.hasNext()) {
- String key = iterator.next();
- JSONObject discrepancyAsJson = discrepanciesList.getJSONObject(key);
- Discrepancy discrepany = DispoUtil.jsonObjToDiscrepancy(discrepancyAsJson);
-
- locations.add(discrepany.getLocation());
- }
-
- return LocationRangesCompressor.compress(locations);
- }
-
-}
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/resources/DispoInitResource.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/resources/DispoInitResource.java
deleted file mode 100644
index 3cda7cee87c..00000000000
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/resources/DispoInitResource.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.disposition.rest.resources;
-
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status;
-import javax.ws.rs.core.UriInfo;
-import org.eclipse.osee.disposition.rest.util.DispoHtmlWriter;
-
-/**
- * @author Angel Avila
- */
-@Path("init")
-public class DispoInitResource {
-
- private final DispoHtmlWriter writer;
-
- public DispoInitResource(DispoHtmlWriter writer) {
- this.writer = writer;
- }
-
- /**
- * Get initial Dispo page
- *
- * @return Html for inital Dispo page
- * @response.representation.200.doc OK, created HTML page
- */
- @GET
- @Produces(MediaType.TEXT_HTML)
- public Response start(@Context UriInfo uriInfo) {
- Response.Status status;
- String html;
- status = Status.OK;
- String host = uriInfo.getAbsolutePath().getHost();
- int port = uriInfo.getAbsolutePath().getPort();
- String url = host + ":" + port;
- html = writer.createMainTable(url);
- return Response.status(status).entity(html).build();
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/DispoFactory.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/DispoFactory.java
index c461659c9a4..7f2870673bf 100644
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/DispoFactory.java
+++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/DispoFactory.java
@@ -18,10 +18,10 @@ import org.eclipse.osee.framework.core.data.IOseeBranch;
*/
public interface DispoFactory {
- public DispoProgram createProgram(String name);
+ DispoProgram createProgram(String name);
- public DispoProgram createProgram(String name, Long uuid);
+ DispoProgram createProgram(String name, Long uuid);
- public DispoProgram createProgram(IOseeBranch branch);
+ DispoProgram createProgram(IOseeBranch branch);
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/DispoHtmlWriter.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/DispoHtmlWriter.java
deleted file mode 100644
index a7eec376f53..00000000000
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/DispoHtmlWriter.java
+++ /dev/null
@@ -1,335 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.disposition.rest.util;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import org.eclipse.osee.disposition.model.Discrepancy;
-import org.eclipse.osee.disposition.model.DispoAnnotationData;
-import org.eclipse.osee.disposition.model.DispoItem;
-import org.eclipse.osee.disposition.model.DispoSet;
-import org.eclipse.osee.disposition.model.DispoStrings;
-import org.eclipse.osee.disposition.rest.internal.LocationRangesCompressor;
-import org.eclipse.osee.framework.core.data.IOseeBranch;
-import org.eclipse.osee.framework.jdk.core.type.IResourceRegistry;
-import org.eclipse.osee.template.engine.AppendableRule;
-import org.eclipse.osee.template.engine.PageCreator;
-import org.eclipse.osee.template.engine.PageFactory;
-import org.eclipse.osee.template.engine.StringRule;
-import org.json.JSONException;
-import org.json.JSONObject;
-
-/**
- * @author Angel Avila
- */
-
-public class DispoHtmlWriter {
-// @formatter:off
- private final String subTableHeadersStart = " <tr>"+
- "<th class=\"spacer\" rowspan=\"";
-
- private final String subTableHeadersEnd ="\" width=\"30\"></th>"+
- "<th width=\"325\">Points</th>"+
- "<th width=\"75\">Type</th>"+
- "<th width=\"150\">PCR</th>"+
- "<th width=\"500\">Developer Notes</th>"+
- "<th width=\"500\">Customer Notes</th>"+
- "<th width=\"40\">Delete</th>" +
- "</tr>";
-// @formatter:on
-
- private final IResourceRegistry registry;
-
- public DispoHtmlWriter(IResourceRegistry registry) {
- this.registry = registry;
- }
-
- public String createDispositionPage(String title, Iterable<? extends DispoItem> items) {
- PageCreator page = PageFactory.newPageCreator(registry, "title", title);
- page.addSubstitution(new StringRule("notes", ""));
- page.addSubstitution(new TableRowRule("tableData", items));
- return page.realizePage(TemplateRegistry.DispositionHtml);
- }
-
- public String createMainTable(String url) {
- PageCreator page = PageFactory.newPageCreator(registry);
- page.addSubstitution(new StringRule("serverPort", url));
- return page.realizePage(TemplateRegistry.DispositionUserHtml);
- }
-
- public String createAdminTable(String url) {
- PageCreator page = PageFactory.newPageCreator(registry);
- page.addSubstitution(new StringRule("serverPort", url));
- return page.realizePage(TemplateRegistry.DispositionAdminHtml);
- }
-
- public String createAllSetsTableHTML(Iterable<DispoSet> sets) {
- int count = 0;
- StringBuilder sb = new StringBuilder();
- for (DispoSet set : sets) {
- sb.append("<tr id=\"");
- sb.append(set.getGuid());
- sb.append("\">");
-
- sb.append("<td class=\"setsTableData\">");
- sb.append("<input class=\"setsTableDataInput\" onclick=\"setFocused(this);\" type=\"text\" readonly value=\"");
- sb.append(set.getName());
- sb.append("\">");
- sb.append("</input>");
- sb.append("</td>");
-
- sb.append("<td class=\"setsTableData\">");
- sb.append("no summary available");
- sb.append("</td>");
- sb.append("</tr>");
- count++;
- }
-
- // We want a table of 7 rows, fill in empty rows (if any) with fillers
-
- for (int i = 0; i < (7 - count); i++) {
- sb.append("<tr>");
- sb.append("<td class=\"setsTableData\">");
- sb.append("</td>");
- sb.append("<td class=\"setsTableData\">");
- sb.append("</td>");
- sb.append("</tr>");
- }
-
- return sb.toString();
- }
-
- public String createSelectPrograms(Iterable<IOseeBranch> allPrograms) {
- StringBuilder sb = new StringBuilder();
- sb.append("<option selected disabled>Choose One</option>");
- for (IOseeBranch option : allPrograms) {
- sb.append("<option value=\"");
- sb.append(option.getUuid());
- sb.append("\">");
- sb.append(option.getName());
- sb.append("</option>");
- }
-
- return sb.toString();
- }
-
- public String createSelectSet(Iterable<DispoSet> allSets) {
- StringBuilder sb = new StringBuilder();
- sb.append("<option selected disabled>Choose One</option>");
- for (DispoSet option : allSets) {
- sb.append("<option value=\"");
- sb.append(option.getGuid());
- sb.append("\">");
- sb.append(option.getName());
- sb.append("</option>");
- }
-
- return sb.toString();
- }
-
- public String createSetTable(Iterable<DispoItem> dispoItems) throws IOException, JSONException {
- StringBuilder writer = new StringBuilder();
- for (DispoItem item : dispoItems) {
- writer.append("<tr id=\"");
- writer.append(item.getGuid());
- if (item.getStatus().equals(DispoStrings.Item_Pass)) {
- writer.append("\" class=\"itemRow\">");
- } else {
- writer.append("\" class=\"itemRow\" ondblclick=\"showAnnotations(this)\">");
- }
- addItemData(writer, item);
- writer.append("</tr>");
-
- writer.append("\n");
- }
-
- return writer.toString();
-
- }
-
- private void addItemData(Appendable appendable, DispoItem item) throws IOException, JSONException {
- addData(appendable, item.getName());
- addData(appendable, item.getStatus(), true);
- addData(appendable, String.valueOf(item.getTotalPoints())); // change to total points
- addData(appendable, String.valueOf(item.getDiscrepanciesList().length()));
- addData(appendable, String.valueOf(getFailureLocations(item.getDiscrepanciesList())));
- addData(appendable, item.getAssignee());
- addData(appendable, item.getVersion()); // Change to Version
- }
-
- private void addData(Appendable appendable, String data) throws IOException {
- appendable.append("<td class=\"itemData\">");
- appendable.append(data);
- appendable.append("</td>");
- }
-
- private void addData(Appendable appendable, String data, boolean isStatus) throws IOException {
- if (data.equals(DispoStrings.Item_Complete)) {
- appendable.append("<td class=\"itemData\">");
- } else if (data.equals(DispoStrings.Item_Pass)) {
- appendable.append("<td class=\"itemDataPass\">");
- } else {
- appendable.append("<td class=\"itemDataFail\">");
- }
- appendable.append(data);
- appendable.append("</td>");
- }
-
- private String getFailureLocations(JSONObject discrepanciesList) throws JSONException {
- List<Integer> locations = new ArrayList<Integer>();
- @SuppressWarnings("unchecked")
- Iterator<String> iterator = discrepanciesList.keys();
- while (iterator.hasNext()) {
- String key = iterator.next();
- JSONObject discrepancyAsJson = discrepanciesList.getJSONObject(key);
- Discrepancy discrepany = DispoUtil.jsonObjToDiscrepancy(discrepancyAsJson);
-
- locations.add(discrepany.getLocation());
- }
-
- return LocationRangesCompressor.compress(locations);
- }
-
- private void addSubTableData(Appendable appendable, String data, boolean isValid) throws IOException {
- appendable.append("<td class=\"annotationData\" >");
- if (isValid) {
- appendable.append("<textarea class=\"annotationInput");
- } else {
- appendable.append("<textarea class=\"annotationInputInvalid");
- }
- appendable.append("\" onchange=\"submitAnnotationData(this);\" ondblclick=\"annotationDblClick(this);\">");
- appendable.append(data);
- appendable.append("</textarea></td>");
- }
-
- private void addSubTableDataDropDown(Appendable appendable, String data, boolean isValid) throws IOException {
- appendable.append("<td class=\"annotationData\" >");
- if (isValid) {
- appendable.append("<select class=\"annotationInput");
- } else {
- appendable.append("<select class=\"annotationInputInvalid");
- }
- appendable.append("\" onchange=\"submitAnnotationData(this);\">");
-
- addOptionToSelect(appendable, data, "None", true);
- addOptionToSelect(appendable, data, "Code", false);
- addOptionToSelect(appendable, data, "Test", false);
- addOptionToSelect(appendable, data, "Requirement", false);
- addOptionToSelect(appendable, data, "Other", false);
- addOptionToSelect(appendable, data, "Undetermined", false);
-
- appendable.append(data);
- appendable.append("</select></td>");
- }
-
- private void addOptionToSelect(Appendable appendable, String data, String optionValue, boolean isDefault) throws IOException {
- appendable.append("<option value=\"");
- appendable.append(optionValue);
- appendable.append("\"");
- if (data.equalsIgnoreCase(optionValue)) {
- appendable.append(" selected");
- }
- if (isDefault) {
- appendable.append(" disabled");
- }
- appendable.append(">");
- appendable.append(optionValue);
- appendable.append("</option>");
- }
-
-// @formatter:off
- public String createSubTable(List<DispoAnnotationData> annotations) throws IOException {
- StringBuilder sb = new StringBuilder();
- sb.append("<td colspan=\"9\">");
- sb.append("<table class=\"table subTable\">");
- sb.append(createHeadersForSubTable(annotations.size()));
- for(DispoAnnotationData annotation :annotations) {
- sb.append("<tr id=\"");
- sb.append(annotation.getId());
- sb.append("\">");
- boolean isResolutionValid = true;
- if(!annotation.getResolution().isEmpty() && !annotation.getIsResolutionValid()){
- isResolutionValid = false;
- }
- boolean isResolutionTypeValid = true;
- if(!annotation.isResolutionTypeValid()){
- isResolutionTypeValid = false;
- }
- addSubTableData(sb, annotation.getLocationRefs(), annotation.getIsConnected());
- addSubTableDataDropDown(sb, annotation.getResolutionType(), isResolutionTypeValid);
- addSubTableData(sb, annotation.getResolution(), isResolutionValid);
- addSubTableData(sb, annotation.getDeveloperNotes(), true);
- addSubTableData(sb, annotation.getCustomerNotes(), true);
- addDeleteButton(sb);
- sb.append("</tr>");
- }
- // add on empty row
- sb.append("<tr>");
- sb.append("<td class=\"annotationData\"><textarea class=\"annotationInput\" onchange=\"submitAnnotationData(this);\" ondblclick=\"annotationDblClick(this);\"></textarea></d>");
- sb.append("<td class=\"annotationData\"><select class=\"annotationInputDisabled\" onchange=\"submitAnnotationData(this);\" ondblclick=\"annotationDblClick(this);\" disabled>");
- sb.append("<option value=\"None\" selected>None</option>");
- sb.append("<option value=\"Code\">Code</option><option value=\"Test\">Test</option>");
- sb.append("<option value=\"Requirement\">Requirement</option><option value=\"Other\">Other</option>");
- sb.append("<option value=\"Undetermined\">Undetermined</option>");
- sb.append("</select></td>");
- sb.append("<td class=\"annotationData\"><textarea class=\"annotationInputDisabled\" onchange=\"submitAnnotationData(this);\" ondblclick=\"annotationDblClick(this);\" readonly=\"true\"></textarea></td>");
- sb.append("<td class=\"annotationData\"><textarea class=\"annotationInputDisabled\" onchange=\"submitAnnotationData(this);\" ondblclick=\"annotationDblClick(this);\" readonly=\"true\"></textarea></td>");
- sb.append("<td class=\"annotationData\"><textarea class=\"annotationInputDisabled\" onchange=\"submitAnnotationData(this);\" ondblclick=\"annotationDblClick(this);\" readonly=\"true\"></textarea></td>");
- sb.append("<td><button class=\"annotationDelete\" onclick=\"deleteAnnotation(this);\" disabled=\"true\">X</button></td>");
- sb.append("</tr>");
- sb.append("</table>");
- sb.append("</td>");
- return sb.toString();
- }
-
- private void addDeleteButton(Appendable appendable) throws IOException {
- appendable.append("<td><button class=\"annotationDelete\" onclick=\"deleteAnnotation(this);\">X</button></td>");
- }
-
- private String createHeadersForSubTable(int numberOfAnnotations) {
- return subTableHeadersStart + (numberOfAnnotations+2) + subTableHeadersEnd;
- }
- private static final class TableRowRule extends AppendableRule<Object> {
- private final Iterable<? extends DispoItem> items;
-
- public TableRowRule(String ruleName, Iterable<? extends DispoItem> items) {
- super(ruleName);
- this.items = items;
- }
-
- @Override
- public void applyTo(Appendable appendable) throws IOException {
- for (DispoItem item : items) {
- appendable.append("<tr>");
- addItemData(appendable, item);
-
- appendable.append("<?subTable?>");
- }
- }
-
- private void addItemData(Appendable appendable, DispoItem item) throws IOException {
- addData(appendable, item.getName());
- addData(appendable, item.getStatus());
- addData(appendable, String.valueOf(item.getDiscrepanciesList().length())); // Change to TOtal Points
- addData(appendable, String.valueOf(item.getDiscrepanciesList().length()));
- addData(appendable, item.getAssignee());
- addData(appendable, item.getGuid()); // Change to Version
- }
-
- private void addData(Appendable appendable, String data) throws IOException {
- appendable.append("<td>");
- appendable.append(data);
- appendable.append("</td>");
- }
- }
-}
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/HtmlWriter.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/HtmlWriter.java
deleted file mode 100644
index c3ff3653611..00000000000
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/HtmlWriter.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.disposition.rest.util;
-
-import java.io.IOException;
-import org.eclipse.osee.framework.jdk.core.type.IResourceRegistry;
-import org.eclipse.osee.framework.jdk.core.type.Identifiable;
-import org.eclipse.osee.template.engine.AppendableRule;
-import org.eclipse.osee.template.engine.PageCreator;
-import org.eclipse.osee.template.engine.PageFactory;
-import org.eclipse.osee.template.engine.StringRule;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-
-/**
- * @author Angel Avila
- */
-public class HtmlWriter {
-
- private final IResourceRegistry registry;
-
- public HtmlWriter(IResourceRegistry registry) {
- this.registry = registry;
- }
-
- public String createDispositionPage(String title, String path, Iterable<? extends Identifiable<?>> dispoEntities) {
-
- PageCreator page = PageFactory.newPageCreator(registry, "title", title);
- page.addSubstitution(new LinkListRule("disposition", path, false, dispoEntities));
- // page.addSubstitution(new StringRule("subTitle", ""));
- page.addSubstitution(new StringRule("notes", ""));
- return page.realizePage(TemplateRegistry.DispositionHtml);
- }
-
- public String createDispoPage(String title, String prefix, String subTitle, final String notesJson) {
- PageCreator page = PageFactory.newPageCreator(registry, "title", title);
- // page.addSubstitution(new StringRule("disposition", ""));
- String asHtmlLink = String.format("<li><a href=\"%s\">%s</a></li>", prefix, subTitle);
- page.addSubstitution(new StringRule("disposition", asHtmlLink));
- page.addSubstitution(new AppendableRule<String>("notes") {
- @Override
- public void applyTo(Appendable appendable) throws IOException {
- try {
- writeNotes(appendable, notesJson);
- } catch (JSONException ex) {
- throw new IOException(ex);
- }
- }
- });
-
- return page.realizePage(TemplateRegistry.DispositionHtml);
- }
-
- private void writeNotes(Appendable sb, String notesJsonString) throws IOException, JSONException {
- JSONArray notesArray = new JSONArray(notesJsonString);
- int count = notesArray.length();
-
- if (count == 0) {
- sb.append("");
- } else {
- for (int i = 0; i < count; i++) {
- if (i != 0) {
- sb.append("<br><br>---------------------------<br><br>");
- }
- JSONObject note = notesArray.getJSONObject(i);
- if (note.has("content")) {
- sb.append(note.getString("content"));
- }
- if (note.has("type")) {
- sb.append(String.format("<br><b>Type:</b><i>%s</i><br>", note.getString("type")));
- }
- if (note.has("dateString")) {
- sb.append(note.getString("dateString"));
- }
- }
- }
- }
- private static final class LinkListRule<D> extends AppendableRule<D> {
- private final boolean ordered;
- private final Iterable<? extends Identifiable<D>> indentities;
- private final String path;
-
- public LinkListRule(String ruleName, String path, boolean ordered, Iterable<? extends Identifiable<D>> indentities) {
- super(ruleName);
- this.ordered = ordered;
- this.indentities = indentities;
- this.path = path;
- }
-
- @Override
- public void applyTo(Appendable appendable) throws IOException {
- appendable.append(ordered ? "<ol>" : "<ul>");
- for (Identifiable<D> indentity : indentities) {
- appendable.append("<li>");
- appendable.append("<a href=\"");
- appendable.append(path);
- appendable.append(String.valueOf(indentity.getGuid()));
- appendable.append("\">");
- appendable.append(indentity.getName());
- appendable.append("</a>");
- appendable.append("</li>");
- }
- appendable.append(ordered ? "</ol>" : "</ul>");
- }
- }
-
-}
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/TemplateRegistry.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/TemplateRegistry.java
deleted file mode 100644
index fe6b77c53f0..00000000000
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/TemplateRegistry.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.disposition.rest.util;
-
-import java.util.ArrayList;
-
-import org.eclipse.osee.framework.jdk.core.type.ClassBasedResourceToken;
-import org.eclipse.osee.framework.jdk.core.type.IResourceRegistry;
-import org.eclipse.osee.framework.jdk.core.type.ResourceRegistry;
-import org.eclipse.osee.framework.jdk.core.type.ResourceToken;
-import org.eclipse.osee.template.engine.OseeTemplateTokens;
-
-/**
- * @author Angel Avila
- */
-public final class TemplateRegistry {
- private static final ArrayList<ResourceToken> tokens = new ArrayList<ResourceToken>();
-
- // @formatter:off
- public static final ResourceToken DispositionHtml = createToken(0x4000000000000FFL, "dispositionOld.html");
- public static final ResourceToken DispositionUserHtml = createToken(0x4000000000001FAL, "dispo.html");
- public static final ResourceToken DispositionAdminHtml = createToken(0x4000000000002EAL, "dispoAdmin.html");
- public static final ResourceToken dispoStyles = createToken(0x4000000000000019L, "dispoStyles.css");
- public static final ResourceToken dispoAdminStyles = createToken(0x4000000000000029L, "dispoAdminStyles.css");
- public static final ResourceToken dispoScript = createToken(0x4000000000000020L, "dispoScript.js");
- // @formatter:on
-
- private static ResourceToken createToken(Long uuid, String name) {
- ResourceToken token = new ClassBasedResourceToken(uuid, name, TemplateRegistry.class, "html/");
- tokens.add(token);
- return token;
- }
-
- public static IResourceRegistry newRegistry() {
- IResourceRegistry registry = new ResourceRegistry();
- return addTokens(registry);
- }
-
- public static IResourceRegistry addTokens(IResourceRegistry registry) {
- OseeTemplateTokens.register(registry);
- registry.registerAll(tokens);
- return registry;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/html/dispoAdminStyles.css b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/html/dispoAdminStyles.css
deleted file mode 100644
index a9b2301d1c1..00000000000
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/html/dispoAdminStyles.css
+++ /dev/null
@@ -1,176 +0,0 @@
-body{
- background-color: #DCDCDC;
-}
-#blanket {
- background-color: rgba(45, 45, 51, 0.61);
- position: absolute;
- z-index: 9001;
- top: 0px;
- left: 0px;
- height: 100%;
- width: 100%;
-}
-#waitBlanket {
- background-color: rgba(45, 45, 51, 0.61);
- position: absolute;
- z-index: 9001;
- top: 0px;
- left: 0px;
- height: 100%;
- width: 100%;
-}
-#waitText {
- background-color: #FFF;
- width: 200px;
- height: 50px;
- font-size: 30px;
- text-align: center;
- margin: 10% 0% 0% 50%;
- position: relative;
-}
-#programSelectDiv {
- height: 100px;
- float: left;
- margin-left: 30px;
-}
-#programSelect {
- width: 250px;
- background-color: rgb(145, 198, 200);
- color: black;
-}
-#programSelectPrompt {
- margin:5px;
-}
-th {
- border: 2px solid;
-}
-#setCreateDiv {
- border: 4px solid;
- margin: 150px 0 0px 800px;
- background-color: #F8F8FF;
- width: 400px;
- height: 240px;
-}
-#setSelectPrimary {
- margin-top: -10px;
-}
-#setSelectSecondary {
- margin-top: -10px;
-}
-#namePromptSubmit {
- height: 30px;
- width: 70px;
- float: left;
- margin-left: 120px;
-}
-p {
- margin: 0px;
-}
-#cancelCreateSet {
- height: 30px; width: 70px; float: left; margin-left: 10px;
-}
-#topHalfSetControls {
- height: 250px;
-}
-#reportDiv {
- width: 500px;
- height: 200px;
-}
-#generateReport {
- height: 51px;
- margin-left: 40px;
- margin-top: 25px
-}
-#generateReportDiv {
- float: left;
-}
-#reportSupportDiv {
- float: right;
-}
-#all {
- width: 1800px;
-}
-#setControls {
- float: right;
- width: 70%;
-}
-#rename {
- width: 200px;
- height: 51px;
-}
-select {
- width: 250px;
-}
-#updatePath {
- width: 200px; height: 51px;
-}
-#setOperation {
- margin-top: 60px;
- width: 200px;
- height: 51px;
-}
-#setCreate {
- margin-top: 10px;
- width: 200px;
- height: 30px;
-}
-#delete {
- margin-top: 20px;
-}
-#setOperationContainer {
- margin-left: 40px;
- float: left;
- width:160px;
-}
-#setManageContainer {
- float: right;
- width: 1000px;
-}
-.emptySetsTable {
- width: 600px;
- overflow: scroll;
- background-color: #C0C0C0;
-}
-.setsTable {
- width: 600px;
- overflow: scroll;
- background-color: white;
-}
-.setsTableDataInput {
- height: 100%;
- width: 100%;
- border: none;
-}
-.setsTableDataInputFocused {
- height: 100%;
- width: 100%;
- border: none;
- background-color: cyan;
-}
-.setsTableDataInputImporting {
- height: 100%;
- width: 100%;
- border: none;
- background-color: green;
-}
-th {
- min-height: 20px;
- max-height: 20px;
- width: 50px;
-}
-tr {
- height: 20px;
- width: 20px;
-}
-.setsTableData {
- height: 18px;
- border: 2px solid #000;
-}
-tbody {
- max-height: 400px;
-}
-#setsTableContainer {
- max-height: 200px;
- overflow: auto;
- width: 615px;
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/html/dispoScript.js b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/html/dispoScript.js
deleted file mode 100644
index 70f25fe885b..00000000000
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/html/dispoScript.js
+++ /dev/null
@@ -1,156 +0,0 @@
-<script>
- function getSetTable(setSelect) {
- var setSelect = document.getElementById("setSelect");
- var selectedSetIndex = setSelect.selectedIndex;
- var setId = setSelect.options[selectedSetIndex].value;
-
- var programSelect = document.getElementById("programSelect");
- var selectedProgramIndex = programSelect.selectedIndex;
- var programId = programSelect.options[selectedProgramIndex].value;
-
- var path = "http://localhost:8089/dispo/program/";
- var fullPath = path.concat(programId, "/set/", setId, "/item/");
- get(fullPath, setTableStatusHandler, setSelect);
- }
-</script>
-<script>
- function keyPress(event, selectedElement) {
- // look for window.event in case event isn't passed in
- if (typeof event == 'undefined' && window.event) {
- event = window.event;
- }
- if (event.keyCode == 13) {
- handleAnnotationEnter(selectedElement);
- }
- }
-</script>
-<script>
- function handleAnnotationEnter(selectedElement) {
- if (selectedElement.parentNode.id == null) {
- selectdElement.style.backgroundcolor = "red";
- } else {
- selectdElement.style.backgroundcolor = "blue";
- }
- }
-</script>
-<script>
- function getPrograms(programSelect) {
- if (programSelect.length < 2) {
- var path = "http://localhost:8089/dispo/program/";
- get(path, getAllProgramsStatusHandler, programSelect);
- }
- }
-</script>
-<script>
- function getProgramDetails(programSelect) {
- var selectedIndex = programSelect.selectedIndex;
- var programId = programSelect.options[selectedIndex].value;
-
- var path = "http://localhost:8089/dispo/program/";
- var fullPath = path.concat(programId, "/set/");
- get(fullPath, getProgramStatusHandler, programSelect);
- }
-</script>
-<script>
- function showAnnotations(x) {
- var currentRow = document.getElementById(x);
- var dispoTable = document.getElementById("dispoTable");
- var currentRowIndex = currentRow.rowIndex;
- var nextRow = dispoTable.rows[currentRowIndex + 1];
-
- if (nextRow.className == "containerRow") {
- if (nextRow.style.display == "none") {
- nextRow.style.display = "";
- } else {
- nextRow.style.display = "none";
- }
- } else {
- var itemId = currentRow.id;
- getSubTableHTML(currentRow, itemId);
- }
- }
-</script>
-<script>
- function expandSubTable(currentRowIndex, htmlToAdd) {
- var newRow = dispoTable.insertRow(currentRowIndex + 1);
- newRow.className = "containerRow";
- newRow.innerHTML = htmlToAdd;
- }
-</script>
-<script>
- function getSubTableHTML(currentRow, itemId) {
- var programSelect = document.getElementById("programSelect");
- var selectedProgramIndex = programSelect.selectedIndex;
- var programId = programSelect.options[selectedProgramIndex].value;
-
- var setSelect = document.getElementById("setSelect");
- var selectedSetIndex = setSelect.selectedIndex;
- var setId = setSelect.options[selectedSetIndex].value;
-
- var itemId = currentRow.id;
- var currentRowIndex = currentRow.rowIndex;
-
- var path = "http://localhost:8089/dispo/program/";
- var fullPath = path.concat(programId, "/set/", setId, "/item/", itemId, "/annotation/");
-
- get(fullPath, subTableStatusHandler, currentRowIndex);
- }
-</script>
-<script>
- function setTableStatusHandler(setSelectEl) {
- return function() {
- if (this.readyState == 4) {
- var responseHTML = this.responseText;
- var dispoTableEl = document.getElementById("dispoTableBody");
- dispoTableEl.innerHTML = responseHTML;
- }
- }
- }
-</script>
-<script>
- function subTableStatusHandler(currentRowIndex) {
- return function() {
- if (this.readyState == 4) {
- var responseHTML = this.responseText;
- expandSubTable(currentRowIndex, responseHTML);
- }
- }
- }
-</script>
-<script>
- function getAllProgramsStatusHandler(programSelectEl) {
- return function() {
- if (this.readyState == 4) {
- var responseHTML = this.responseText;
- programSelectEl.innerHTML = responseHTML;
- }
- }
- }
-</script>
-<script>
- function getProgramStatusHandler(setSelectEl) {
- return function() {
- if (this.readyState == 4) {
- var responseHTML = this.responseText;
- var setSelectEl1 = document.getElementById("setSelect");
- var setSelectEl2 = document.getElementById("setSelect2");
- setSelectEl1.innerHTML = responseHTML;
- setSelectEl2.innerHTML = responseHTML;
- }
- }
- }
-</script>
-<script>
- function get(url, statusHandler, callbackParam) {
- httpRequest("GET", url, statusHandler, callbackParam);
- }
-</script>
-<script>
- function httpRequest(httpVerb, url, statusHandler, callbackParam) {
- var httpRequest = new XMLHttpRequest()
- httpRequest.prevDataLength = 0;
- httpRequest.onreadystatechange = statusHandler(callbackParam);
- httpRequest.open(httpVerb, url);
- httpRequest.send();
- }
-</script> \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/html/dispoStyles.css b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/html/dispoStyles.css
deleted file mode 100644
index a5e3a874277..00000000000
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/html/dispoStyles.css
+++ /dev/null
@@ -1,240 +0,0 @@
-body{
- background-color: #DCDCDC;
-}
-#waitBlanket {
- background-color: rgba(45, 45, 51, 0.61);
- position: absolute;
- z-index: 9001;
- top: 0px;
- left: 0px;
- height: 100%;
- width: 100%;
-}
-#waitText {
- background-color: #FFF;
- width: 200px;
- height: 50px;
- font-size: 30px;
- text-align: center;
- margin: 10% 0% 0% 50%;
- position: relative;
-}
-#all {
- position: relative;
- margin-left: 20px;
- margin-right: 20px;
-}
-#topSection {
-}
-#selectDiv {
- height: 100px;
-}
-#programSelectDiv {
- height: 100px;
- width: 15%;
- float: left;
-}
-#programSelect {
- width: 250px;
- background-color: rgb(145, 198, 200);
- color: black;
-}
-#programSelectPrompt {
- margin:5px;
-}
-#setSelectDiv {
- width: 80%;
- float: right;
-}
-#statusSelect {
- height: 100%;
- width: 100%;
- border: none;
- background-color: grey;
- color: #333;
-}
-#pocSelect {
- color: #333;
- border: none;
- background-color: grey;
- font-weight: bolder;
-}
-#setSelect {
- width: 250px;
- background-color: rgb(145, 198, 200);
- color: black;
-}
-#setSelect2 {
- width: 250px;
- margin:-10px 0px 0px 10px;
- background-color: rgb(145, 198, 200);
-}
-#setSelectPrompt {
- margin: 5px;
-}
-#compareText {
- width: 110px;
- margin: 0px 0px 0px 75px;
- border-style: solid;
- border-width: 1px;
- text-align: center;
- background-color: #B0E0E6;
-}
-#dispoTable {
- background-color: white;
- border: 5px solid black;
-}
-th {
- background-color: #969AA0;
-}
-
-.subTable {
- border-spacing: 1px;
- background-color: #FFF;
- border: 1px solid #000;
-}
-
-td {
- border: 1px solid black;
-}
-
-.itemData {
- overflow: hidden;
- white-space: nowrap;
- max-width:50px;
- height:30px;
- background-color: white;
-}
-.itemDataFail {
- overflow: hidden;
- white-space: nowrap;
- max-width:50px;
- height:30px;
- background-color: yellow;
-}
-
-input:disabled {
- background-color: #D3DFE0;
-}
-.spacer {
- background-color: white;
-}
-.emptyCell {
- height:30px;
- background-color: rgb(200, 200, 200);
-}
-.annotationData {
- background-color: #9AEAF5;
-}
-.emptyAnnotation {
- height:20px;
- background-color: #9AEAF5;
-}
-textarea {
- resize: none;
-}
-.annotationInput {
- border: none;
- width: 100%;
- height: 32px;
- -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
- box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
- -webkit-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
- transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
- background-color: #9AEAF5;
-}
-.annotationInputInvalid {
- border: 4px solid red;
- width: 100%;
- height: 32px;
- -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
- box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
- -webkit-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
- transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
- background-color: #9AEAF5;
-}
-.annotationInput:disabled {
- background-color: #D3DFE0;
-}
-.annotationInputDisabled {
- border: none;
- width: 100%;
- height: 32px;
- -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
- box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
- -webkit-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
- transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
- background-color: #D3DFE0;
-}
-.annotationInputDisabledDetails {
- border: none;
- width: 100%;
- height: 200px;
- -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
- box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
- -webkit-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
- transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
- background-color: #D3DFE0;
-}
-.annotationInputDisabled:focus {
- outline: 0px none rgba(0, 0, 0, 0);
-}
-.annotationInput:focus {
- border: 2px dashed green;
-}
-.annotationInputInvalid:focus {
- border: 2px dashed red;
-}
-.annotationInputDetails {
- border: none;
- width: 100%;
- height: 200px;
- -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
- box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
- -webkit-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
- transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
- background-color: #9AEAF5;
- overflow: visible;
- white-space: pre-line;
-}
-.annotationInputDetails:focus {
- border: 2px dashed green;
-}
-.annotationInputInvalidDetails {
- border: 4px solid red;
- width: 100%;
- height: 200px;
- -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
- box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
- -webkit-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
- transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
- background-color: #9AEAF5;
- overflow: visible;
- white-space: pre-line;
-}
-.annotationInputInvalidDetails:focus {
- border: 2px dashed red;
-}
-.annotationDelete {
- display: block;
- width: 100%;
- height: 34px;
- padding: 6px 12px;
- font-size: 14px;
- line-height: 1.42857143;
- color: #555;
- background-color: #fff;
- background-image: none;
- border: 1px solid #ccc;
- border-radius: 4px;
- -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
- box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
- -webkit-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
- transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
-}
-
-.annotationDelete:disabled {
- background-color: white;
- color: white;
- border: none;
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/html/dispositionOld.html b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/html/dispositionOld.html
deleted file mode 100644
index dd7194fffab..00000000000
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/html/dispositionOld.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<?include path="4000000000000000 pageDeclaration.html"?>
- <head>
- <title><?title?></title>
- <style>
- <?include path="4000000000000019 dispoStyles.css"?>
- </style>
- </head>
- <body>
- <div id="all">
- <div id="choices">
- <ul style= "list-style-type: none;">
- <li>
- <a href="">Admin</a>
- <a href="/user/">User</a>
- </li>
- </ul>
- </div>
- <div id="userSection">
- <center>
- <h2>Disposition</h2>
- </center>
- <p align="right"><?notes?></p>
- <div id ="dispoSection" style="width:1000px;overflow:auto;">
- <table id="dispoTable" width="1000" border="5">
- <tr>
- <th width="300" style="background-color: #969AA0">Script Name</th>
- <th width="120" style="background-color: #969AA0">Status</th>
- <th width="100" style="background-color: #969AA0">Total Points</th>
- <th width="100" style="background-color: #969AA0">Failures</th>
- <th width="600" style="background-color: #969AA0">Points</th>
- <th width="200" style="background-color: #969AA0">POC</th>
- <th width="150" style="background-color: #969AA0">Version</th>
- </tr>
- <?tableData?>
- </table>
- </div>
- </div>
- </div>
- <script type="text/javascript">
- <?javaScript?>
- <?include path="4000000000000002 OseeCore.js"?>
- </script>
- </body>
-</html> \ No newline at end of file

Back to the top