Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAngel Avila2015-05-14 01:53:24 +0000
committerjmisinco2015-05-14 01:53:24 +0000
commit3d1f1172c93767066cbbd2f989ea6bb04bcf389c (patch)
tree1f35d6cc5a035927e19c3709f44f7b47a1627595
parentf13648f0e1b3f248de09cedb02817393feba3975 (diff)
downloadorg.eclipse.osee-3d1f1172c93767066cbbd2f989ea6bb04bcf389c.tar.gz
org.eclipse.osee-3d1f1172c93767066cbbd2f989ea6bb04bcf389c.tar.xz
org.eclipse.osee-3d1f1172c93767066cbbd2f989ea6bb04bcf389c.zip
refinement: Include File and Method numbers in Coverage Imports
-rw-r--r--plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoItem.java4
-rw-r--r--plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoItemData.java20
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/DispoConstants.java2
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoItemArtifact.java10
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/OrcsStorageImpl.java16
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/LisFileParser.java42
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/report/ExportSet.java91
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/types/OseeTypes_Dispo.osee20
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/DispoUtil.java12
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/web/legacy/js/userController.js1
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/coverage/ui/index.html1
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/js/ColumnFactory.js424
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/js/dispoApp.js19
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/js/userController.js245
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/views/user.html4
15 files changed, 683 insertions, 228 deletions
diff --git a/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoItem.java b/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoItem.java
index 590149c7ebf..0295a2e2030 100644
--- a/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoItem.java
+++ b/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoItem.java
@@ -49,4 +49,8 @@ public interface DispoItem extends Identifiable<String> {
Boolean getAborted();
String getItemNotes();
+
+ String getMethodNumber();
+
+ String getFileNumber();
}
diff --git a/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoItemData.java b/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoItemData.java
index 0c9ab9a2f6d..e2f2b5753a5 100644
--- a/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoItemData.java
+++ b/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoItemData.java
@@ -39,6 +39,8 @@ public class DispoItemData implements DispoItem {
private String elapsedTime;
private Boolean aborted;
private String itemNotes;
+ private String fileNumber;
+ private String methodNumber;
public DispoItemData() {
@@ -124,6 +126,16 @@ public class DispoItemData implements DispoItem {
return itemNotes;
}
+ @Override
+ public String getFileNumber() {
+ return fileNumber;
+ }
+
+ @Override
+ public String getMethodNumber() {
+ return methodNumber;
+ }
+
public void setName(String name) {
this.name = name;
}
@@ -188,6 +200,14 @@ public class DispoItemData implements DispoItem {
this.itemNotes = itemNotes;
}
+ public void setFileNumber(String fileNumber) {
+ this.fileNumber = fileNumber;
+ }
+
+ public void setMethodNumber(String methodNumber) {
+ this.methodNumber = methodNumber;
+ }
+
@Override
public boolean matches(Identity<?>... identities) {
for (Identity<?> identity : identities) {
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/DispoConstants.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/DispoConstants.java
index 80c353bfe52..7d1380e3776 100644
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/DispoConstants.java
+++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/DispoConstants.java
@@ -44,6 +44,8 @@ public final class DispoConstants {
public static final IAttributeType DispoItemAborted = TokenFactory.createAttributeType(0x3000000000000208L, "dispo.Aborted");
public static final IAttributeType DispoItemItemNotes = TokenFactory.createAttributeType(0x3000000000000210L, "dispo.Item Notes");
public static final IAttributeType DispoItemNeedsReview = TokenFactory.createAttributeType(0x3000000000000212L, "dispo.Needs Review");
+ public static final IAttributeType DispoItemFileNumber = TokenFactory.createAttributeType(0x3000000000000313L, "dispo.File Number");
+ public static final IAttributeType DispoItemMethodNumber = TokenFactory.createAttributeType(0x3000000000000214L, "dispo.Method Number");
public static final ArtifactId DispoTypesArtifact = OrcsUtil.newArtifactId(4757831, "BEQGMZJDBHPd4OeWg6AA", "DispositionTypes");
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoItemArtifact.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoItemArtifact.java
index 990e9bb35cc..209ee73421b 100644
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoItemArtifact.java
+++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoItemArtifact.java
@@ -122,4 +122,14 @@ public class DispoItemArtifact extends BaseIdentity<String> implements DispoItem
public String getItemNotes() {
return artifact.getSoleAttributeAsString(DispoConstants.DispoItemItemNotes, "");
}
+
+ @Override
+ public String getMethodNumber() {
+ return artifact.getSoleAttributeAsString(DispoConstants.DispoItemMethodNumber, "");
+ }
+
+ @Override
+ public String getFileNumber() {
+ return artifact.getSoleAttributeAsString(DispoConstants.DispoItemFileNumber, "");
+ }
}
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/OrcsStorageImpl.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/OrcsStorageImpl.java
index bda36fe9826..cb924916d8f 100644
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/OrcsStorageImpl.java
+++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/OrcsStorageImpl.java
@@ -45,6 +45,7 @@ import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.type.ResultSet;
import org.eclipse.osee.framework.jdk.core.type.ResultSets;
import org.eclipse.osee.framework.jdk.core.util.Lib;
+import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.resource.management.IResource;
import org.eclipse.osee.logger.Log;
import org.eclipse.osee.orcs.OrcsApi;
@@ -275,7 +276,6 @@ public class OrcsStorageImpl implements Storage {
tx.setSoleAttributeValue(createdItem, DispoConstants.DispoDateCreated, item.getCreationDate());
tx.setSoleAttributeValue(createdItem, DispoConstants.DispoLastUpdated, item.getLastUpdate());
-
tx.setSoleAttributeValue(createdItem, DispoConstants.DispoItemStatus, item.getStatus());
tx.setSoleAttributeValue(createdItem, DispoConstants.DispoItemTotalPoints, item.getTotalPoints());
tx.setSoleAttributeValue(createdItem, DispoConstants.DispoItemNeedsRerun, item.getNeedsRerun());
@@ -290,6 +290,12 @@ public class OrcsStorageImpl implements Storage {
tx.setSoleAttributeFromString(createdItem, DispoConstants.DispoItemElapsedTime, item.getElapsedTime());
tx.setSoleAttributeValue(createdItem, DispoConstants.DispoItemAborted, item.getAborted());
+ if (Strings.isValid(item.getFileNumber())) {
+ tx.setSoleAttributeFromString(createdItem, DispoConstants.DispoItemFileNumber, item.getFileNumber());
+ }
+ if (Strings.isValid(item.getMethodNumber())) {
+ tx.setSoleAttributeFromString(createdItem, DispoConstants.DispoItemMethodNumber, item.getMethodNumber());
+ }
tx.relate(parentSetArt, CoreRelationTypes.Default_Hierarchical__Child, createdItem);
}
tx.commit();
@@ -308,6 +314,8 @@ public class OrcsStorageImpl implements Storage {
String elapsedTime = newItemData.getElapsedTime();
Boolean aborted = newItemData.getAborted();
String itemNotes = newItemData.getItemNotes();
+ String fileNumber = newItemData.getFileNumber();
+ String methodNumber = newItemData.getMethodNumber();
Boolean needsRerun;
if (resetRerunFlag) {
@@ -358,6 +366,12 @@ public class OrcsStorageImpl implements Storage {
if (itemNotes != null && !itemNotes.equals(origItem.getItemNotes())) {
tx.setSoleAttributeFromString(currentItemArt, DispoConstants.DispoItemItemNotes, itemNotes);
}
+ if (fileNumber != null && !fileNumber.equals(origItem.getFileNumber())) {
+ tx.setSoleAttributeFromString(currentItemArt, DispoConstants.DispoItemFileNumber, fileNumber);
+ }
+ if (methodNumber != null && !methodNumber.equals(origItem.getMethodNumber())) {
+ tx.setSoleAttributeFromString(currentItemArt, DispoConstants.DispoItemMethodNumber, methodNumber);
+ }
}
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/LisFileParser.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/LisFileParser.java
index c1b63093b8a..105bbfdc255 100644
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/LisFileParser.java
+++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/LisFileParser.java
@@ -76,8 +76,6 @@ public class LisFileParser implements DispoImporterApi {
@Override
public List<DispoItem> importDirectory(Map<String, DispoItem> exisitingItems, File filesDir, OperationReport report) {
- List<DispoItem> toReturn = new ArrayList<DispoItem>();
-
vCastDir = filesDir.getAbsolutePath() + File.separator + "vcast";
File f = new File(vCastDir + File.separator + "cover.db");
@@ -104,6 +102,11 @@ public class LisFileParser implements DispoImporterApi {
//
}
+ return createItems(exisitingItems, report);
+ }
+
+ private List<DispoItem> createItems(Map<String, DispoItem> exisitingItems, OperationReport report) {
+ List<DispoItem> toReturn;
Collection<DispoItemData> values = datIdToItem.values();
for (DispoItemData item : values) {
@@ -139,8 +142,14 @@ public class LisFileParser implements DispoImporterApi {
String line = datId.replaceAll("\\d*:\\d*:", "");
line = line.replaceAll(":", "");
- addAnnotationForForCoveredLine(item, line, Exception_Handling_Resolution, "");
- removeDisrepancy(line, item.getDiscrepanciesList());
+ String text = "";
+ Discrepancy matchingDiscrepancy = matchDiscrepancy(line, item.getDiscrepanciesList());
+ if (matchingDiscrepancy != null) {
+ text = matchingDiscrepancy.getText();
+ JSONObject discrepancies = item.getDiscrepanciesList();
+ discrepancies.remove(matchingDiscrepancy.getId());
+ addAnnotationForForCoveredLine(item, line, Exception_Handling_Resolution, "", text);
+ }
}
}
@@ -200,6 +209,8 @@ public class LisFileParser implements DispoImporterApi {
DispoItemData newItem = new DispoItemData();
newItem.setAnnotationsList(new JSONArray());
newItem.setName(lisFileName + "." + function.getName());
+ newItem.setFileNumber(Integer.toString(fileNum));
+ newItem.setMethodNumber(Integer.toString(functionNum));
String datId = generateDatId(fileNum, functionNum);
datIdToItem.put(datId, newItem);
@@ -226,7 +237,7 @@ public class LisFileParser implements DispoImporterApi {
}
private void processStatement(String lisFileName, VCastLisFileParser lisFileParser, int fileNum, int functionNum, VCastFunction function, VCastStatementCoverage statementCoverageItem, Map<String, JSONObject> discrepancies, OperationReport report) {
- // Create discrepancy for every line, annotate with test usnit or exception handled
+ // Create discrepancy for every line, annotate with test unit or exception handled
Integer functionNumber = function.getFindex();
Integer lineNumber = statementCoverageItem.getLine();
Pair<String, Boolean> lineData = null;
@@ -279,7 +290,6 @@ public class LisFileParser implements DispoImporterApi {
br = new BufferedReader(new FileReader(resultsFile));
String resultsLine;
while ((resultsLine = br.readLine()) != null) {
-
// Loop through results file and log coverageItem as Test_Unit for each entry
if (Strings.isValid(resultsLine)) {
Result datFileSyntaxResult = VCastValidateDatFileSyntax.validateDatFileSyntax(resultsLine);
@@ -292,8 +302,14 @@ public class LisFileParser implements DispoImporterApi {
if (!alreadyUsedDatIds.contains(resultsLine)) {
DispoItemData item = datIdToItem.get(generateDatId(m.group(1), m.group(2)));
String location = m.group(3);
- addAnnotationForForCoveredLine(item, location, Test_Unit_Resolution, resultPath);
- removeDisrepancy(location, item.getDiscrepanciesList());
+ String text = "";
+ Discrepancy matchingDiscrepancy = matchDiscrepancy(location, item.getDiscrepanciesList());
+ if (matchingDiscrepancy != null) {
+ text = matchingDiscrepancy.getText();
+ JSONObject discrepancies = item.getDiscrepanciesList();
+ discrepancies.remove(matchingDiscrepancy.getId());
+ addAnnotationForForCoveredLine(item, location, Test_Unit_Resolution, resultPath, text);
+ }
alreadyUsedDatIds.add(resultsLine);
}
}
@@ -306,7 +322,8 @@ public class LisFileParser implements DispoImporterApi {
}
}
- private void removeDisrepancy(String location, JSONObject discrepancies) throws JSONException {
+ private Discrepancy matchDiscrepancy(String location, JSONObject discrepancies) throws JSONException {
+ Discrepancy toReturn = null;
@SuppressWarnings("unchecked")
Iterator<String> iterator = discrepancies.keys();
while (iterator.hasNext()) {
@@ -314,14 +331,14 @@ public class LisFileParser implements DispoImporterApi {
JSONObject discrepancyAsJson = discrepancies.getJSONObject(key);
Discrepancy discrepancy = DispoUtil.jsonObjToDiscrepancy(discrepancyAsJson);
if (String.valueOf(discrepancy.getLocation()).equals(location)) {
- discrepancies.remove(key);
+ toReturn = discrepancy;
break;
}
}
-
+ return toReturn;
}
- private void addAnnotationForForCoveredLine(DispoItemData item, String location, String resolutionType, String coveringFile) throws JSONException {
+ private void addAnnotationForForCoveredLine(DispoItemData item, String location, String resolutionType, String coveringFile, String text) throws JSONException {
DispoAnnotationData newAnnotation = new DispoAnnotationData();
dataFactory.initAnnotation(newAnnotation);
String idOfNewAnnotation = dataFactory.getNewId();
@@ -332,6 +349,7 @@ public class LisFileParser implements DispoImporterApi {
newAnnotation.setResolutionType(resolutionType);
newAnnotation.setResolution(coveringFile);
newAnnotation.setIsResolutionValid(true);
+ newAnnotation.setCustomerNotes(text);
dispoConnector.connectAnnotation(newAnnotation, item.getDiscrepanciesList());
JSONArray annotationsList = item.getAnnotationsList();
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/report/ExportSet.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/report/ExportSet.java
index 805d7514a19..7ad8c7701da 100644
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/report/ExportSet.java
+++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/report/ExportSet.java
@@ -10,10 +10,15 @@
*******************************************************************************/
package org.eclipse.osee.disposition.rest.internal.report;
+import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.Writer;
+import java.util.HashMap;
+import java.util.Iterator;
import java.util.List;
+import java.util.Map;
+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.DispoProgram;
@@ -85,6 +90,80 @@ public class ExportSet {
}
+ public void runCoverageReport(DispoProgram program, DispoSet setPrimary, String option, OutputStream outputStream) {
+ List<DispoItem> items = dispoApi.getDispoItems(program, setPrimary.getGuid());
+
+ try {
+ Writer writer = new OutputStreamWriter(outputStream, "UTF-8");
+ ExcelXmlWriter sheetWriter = new ExcelXmlWriter(writer);
+
+ String[] headers = getHeadersCoverage();
+ int columns = headers.length;
+ sheetWriter.startSheet(setPrimary.getName(), headers.length);
+ sheetWriter.writeRow((Object[]) headers);
+
+ for (DispoItem item : items) {
+ Map<String, DispoAnnotationData> idToAnnotations = getDiscrepancyIdToCoveringAnnotation(item);
+ JSONObject discrepanciesList = item.getDiscrepanciesList();
+ @SuppressWarnings("rawtypes")
+ Iterator keys = discrepanciesList.keys();
+ while (keys.hasNext()) {
+ String key = (String) keys.next();
+ Discrepancy discrepancy = DispoUtil.jsonObjToDiscrepancy(discrepanciesList.getJSONObject(key));
+ DispoAnnotationData coveringAnnotation = idToAnnotations.get(discrepancy.getId());
+ if (coveringAnnotation == null) {
+ coveringAnnotation = createUncoveredAnnotation();
+ }
+
+ writeRow(sheetWriter, columns, item, discrepancy, coveringAnnotation);
+
+ }
+ }
+
+ sheetWriter.endSheet();
+ sheetWriter.endWorkbook();
+ } catch (Exception ex) {
+ throw new OseeCoreException(ex);
+ }
+
+ }
+
+ private void writeRow(ExcelXmlWriter sheetWriter, int columns, DispoItem item, Discrepancy discrepancy, DispoAnnotationData annoation) throws IOException {
+
+ String[] row = new String[columns];
+ int index = 0;
+ row[index++] = "Empty";
+ row[index++] = item.getName();
+ // row[index++] = item.getName();
+ row[index++] = discrepancy.getText();
+ row[index++] = String.valueOf(item.getMethodNumber());
+ row[index++] = String.valueOf(discrepancy.getLocation());
+ row[index++] = annoation.getResolutionType();
+ row[index++] = annoation.getResolution();
+ sheetWriter.writeRow((Object[]) row);
+ }
+
+ private Map<String, DispoAnnotationData> getDiscrepancyIdToCoveringAnnotation(DispoItem item) throws JSONException {
+ Map<String, DispoAnnotationData> toReturn = new HashMap<String, DispoAnnotationData>();
+ JSONArray annotationsList = item.getAnnotationsList();
+ for (int i = 0; i < annotationsList.length(); i++) {
+ DispoAnnotationData annotation = DispoUtil.jsonObjToDispoAnnotationData(annotationsList.getJSONObject(i));
+ JSONArray idsOfCoveredDiscrepancies = annotation.getIdsOfCoveredDiscrepancies();
+
+ if (idsOfCoveredDiscrepancies.length() > 0) {
+ toReturn.put(idsOfCoveredDiscrepancies.getString(0), annotation);
+ }
+ }
+ return toReturn;
+ }
+
+ private static DispoAnnotationData createUncoveredAnnotation() {
+ DispoAnnotationData annotation = new DispoAnnotationData();
+ annotation.setResolutionType("Uncovered");
+ annotation.setResolution("N/A");
+ return annotation;
+ }
+
private static String prettifyAnnotations(JSONArray annotations) throws JSONException {
StringBuilder sb = new StringBuilder();
@@ -119,4 +198,16 @@ public class ExportSet {
};
return toReturn;
}
+
+ private static String[] getHeadersCoverage() {
+ String[] toReturn = {//
+ "Namespace",//
+ "Parent Coverage Unit",//
+ "Unit",//
+ "Method Number",//
+ "Execution Line Number",//
+ "Coverage Method",//
+ "Coverage Rationale"};
+ return toReturn;
+ }
}
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/types/OseeTypes_Dispo.osee b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/types/OseeTypes_Dispo.osee
index c7838a1378d..d8e2fa2bcfc 100644
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/types/OseeTypes_Dispo.osee
+++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/types/OseeTypes_Dispo.osee
@@ -30,6 +30,8 @@ artifactType "dispo.Dispositionable Item" extends "Artifact" {
attribute "dispo.Aborted"
attribute "dispo.Item Notes"
attribute "dispo.Needs Review"
+ attribute "dispo.File Number"
+ attribute "dispo.Method Number"
}
attributeType "dispo.Annotations JSON" extends StringAttribute {
@@ -235,6 +237,24 @@ attributeType "dispo.Needs Review" extends BooleanAttribute {
mediaType "text/plain"
}
+attributeType "dispo.File Number" extends StringAttribute {
+ uuid 0x3000000000000313
+ dataProvider DefaultAttributeDataProvider
+ min 0
+ max 1
+ defaultValue "false"
+ mediaType "text/plain"
+}
+
+attributeType "dispo.Method Number" extends StringAttribute {
+ uuid 0x3000000000000214
+ dataProvider DefaultAttributeDataProvider
+ min 0
+ max 1
+ defaultValue "false"
+ mediaType "text/plain"
+}
+
oseeEnumType "enum.dispo.item status" {
uuid 0x3000000000000199
entry "PASS"
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/DispoUtil.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/DispoUtil.java
index 706a9214bd7..612d8ead30e 100644
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/DispoUtil.java
+++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/DispoUtil.java
@@ -133,6 +133,8 @@ public final class DispoUtil {
dispoItemData.setAborted(dispoItemArt.getAborted());
dispoItemData.setElapsedTime(dispoItemArt.getElapsedTime());
dispoItemData.setItemNotes(dispoItemArt.getItemNotes());
+ dispoItemData.setFileNumber(dispoItemArt.getFileNumber());
+ dispoItemData.setMethodNumber(dispoItemArt.getMethodNumber());
if (isIncludeDiscrepancies) {
dispoItemData.setDiscrepanciesList(dispoItemArt.getDiscrepanciesList());
}
@@ -205,6 +207,12 @@ public final class DispoUtil {
if (jsonObject.has("itemNotes")) {
dispoItem.setItemNotes(jsonObject.getString("itemNotes"));
}
+ if (jsonObject.has("fileNumber")) {
+ dispoItem.setItemNotes(jsonObject.getString("fileNumber"));
+ }
+ if (jsonObject.has("methodNumber")) {
+ dispoItem.setItemNotes(jsonObject.getString("methodNumber"));
+ }
} catch (JSONException ex) {
throw new OseeCoreException("Error deserializing a Dispositionable Item.", ex);
}
@@ -228,7 +236,7 @@ public final class DispoUtil {
dispoSet.setNotesList(jsonObject.getJSONArray("notesList"));
}
} catch (JSONException ex) {
- throw new OseeCoreException("Error deserializing a Dispositionable Item.", ex);
+ throw new OseeCoreException("Error deserializing a Dispositionable Set.", ex);
}
return dispoSet;
}
@@ -252,6 +260,8 @@ public final class DispoUtil {
jsonObject.put("creationDate", dispoItem.getCreationDate());
jsonObject.put("itemNotes", dispoItem.getItemNotes());
jsonObject.put("version", dispoItem.getVersion());
+ jsonObject.put("fileNumber", dispoItem.getFileNumber());
+ jsonObject.put("methodNumber", dispoItem.getMethodNumber());
} catch (JSONException ex) {
throw new OseeCoreException("Error deserializing a Dispositionable Item.", ex);
}
diff --git a/plugins/org.eclipse.osee.disposition.rest/web/legacy/js/userController.js b/plugins/org.eclipse.osee.disposition.rest/web/legacy/js/userController.js
index ee287da68d9..411f516512a 100644
--- a/plugins/org.eclipse.osee.disposition.rest/web/legacy/js/userController.js
+++ b/plugins/org.eclipse.osee.disposition.rest/web/legacy/js/userController.js
@@ -77,7 +77,6 @@ app.controller('userController', [
programId: $scope.programSelection,
type: $rootScope.type
}, function(data) {
- loadingModal.close();
$scope.coverageResolutionTypes = data.validResolutions;
});
};
diff --git a/plugins/org.eclipse.osee.web.ui/src/coverage/ui/index.html b/plugins/org.eclipse.osee.web.ui/src/coverage/ui/index.html
index e6a85329195..65c73d7af49 100644
--- a/plugins/org.eclipse.osee.web.ui/src/coverage/ui/index.html
+++ b/plugins/org.eclipse.osee.web.ui/src/coverage/ui/index.html
@@ -30,6 +30,7 @@
<script src="/libs/js/support/linkRewrite.js"></script>
<script src="/dispo/js/resizer.js"></script>
<script src="/dispo/js/dispoApp.js"></script>
+ <script src="/dispo/js/ColumnFactory.js"></script>
<script src="/dispo/js/userController.js"></script>
<script src="/dispo/js/adminController.js"></script>
<script src="/dispo/js/mainController.js"></script>
diff --git a/plugins/org.eclipse.osee.web.ui/src/dispo/js/ColumnFactory.js b/plugins/org.eclipse.osee.web.ui/src/dispo/js/ColumnFactory.js
new file mode 100644
index 00000000000..01379b9d1bd
--- /dev/null
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/js/ColumnFactory.js
@@ -0,0 +1,424 @@
+app.factory('ColumnFactory', function() {
+ var ColumnFactory = {};
+
+ ColumnFactory.getColumns = function(dispoType, width) {
+ var toReturn;
+ if(window.width < 1000) {
+ if(dispoType = '') {
+ toReturn = smallColumnsTestScript;
+ } else {
+ toReturn = smallColumnsCoverage
+ }
+ } else {
+ if(dispoType = '') {
+ toReturn = wideColumnsTestScript;
+ } else {
+ toReturn = wideColumnsCoverage
+ }
+ }
+
+ return toReturn;
+ }
+
+ var origCellTmpl = '<div ng-dblclick="getItemDetails(row.entity, row)">{{row.entity.name}}</div>';
+ var editCellTmpl = '<input ng-model="row.getProperty(col.field)" ng-model-onblur ng-change="editItem(row.entity);" value="row.getProperty(col.field);></input>';
+ var cellEditNotes = '<input class="cellInput" ng-model="COL_FIELD" ng-disabled="checkEditable(row.entity);" ng-model-onblur ng-change="editNotes(row.entity)"/>'
+ var chkBoxTemplate = '<input type="checkbox" class="form-control" ng-model="COL_FIELD" ng-change="editNeedsRerun(row.entity)"></input>';
+ var assigneeCellTmpl = '<div ng-dblclick="stealItem(row.entity)">{{row.entity.assignee}}</div>';
+ var dateCellTmpl = '<div>getReadableDate({{row.getProperty(col.field)}})</div>';
+
+ var checkboxSorting = function checkboxSorting(itemA, itemB) {
+ if(itemA == itemB) {
+ return 0;
+ } else if (itemA) {
+ return -1;
+ } else if (itemB) {
+ return 1;
+ }
+ };
+
+ var dateSorting = function (itemA, itemB) {
+ var DateA = new Date(itemA);
+ var DateB = new Date(itemB);
+
+ if (DateA < DateB) {
+ return -1;
+ } else if (DateB < DateA) {
+ return 1;
+ } else {
+ return 0;
+ }
+ };
+
+ var smallColumnsTestScript = [{
+ field: 'name',
+ displayName: 'Name',
+ cellTemplate: origCellTmpl,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'status',
+ displayName: 'Status',
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'totalPoints',
+ displayName: 'Total',
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'failureCount',
+ displayName: 'Failure Count',
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'discrepanciesAsRanges',
+ displayName: 'Failed Points',
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'assignee',
+ displayName: 'Assignee',
+ enableCellEdit: false,
+ cellTemplate: assigneeCellTmpl,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'itemNotes',
+ displayName: 'Script Notes',
+ cellTemplate: cellEditNotes,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ },{
+ field: 'needsRerun',
+ displayName: 'Rerun?',
+ enableCellEdit: false,
+ cellTemplate: chkBoxTemplate,
+ sortFn: checkboxSorting
+ },{
+ field: 'lastUpdated',
+ displayName: 'Last Ran',
+ enableCellEdit: false,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html',
+ sortFn: dateSorting
+ }, {
+ field: 'category',
+ displayName: 'Category',
+ enableCellEdit: true,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'machine',
+ displayName: 'Station',
+ enableCellEdit: true,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'elapsedTime',
+ displayName: 'Elapsed Time',
+ enableCellEdit: false,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ },{
+ field: 'creationDate',
+ displayName: 'Creation Date',
+ enableCellEdit: false,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html',
+ sortFn: dateSorting
+ },{
+ field: 'aborted',
+ displayName: 'Aborted',
+ enableCellEdit: false,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'version',
+ displayName: 'Version',
+ enableCellEdit: false,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }];
+
+ var wideColumnsTestScript = [{
+ field: 'name',
+ displayName: 'Name',
+ width: 350,
+ cellTemplate: origCellTmpl,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'status',
+ displayName: 'Status',
+ width: 100,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'totalPoints',
+ displayName: 'Total',
+ width: 100,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'failureCount',
+ displayName: 'Failure Count',
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'discrepanciesAsRanges',
+ displayName: 'Failed Points',
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'assignee',
+ displayName: 'Assignee',
+ enableCellEdit: false,
+ cellTemplate: assigneeCellTmpl,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'itemNotes',
+ displayName: 'Script Notes',
+ cellTemplate: cellEditNotes,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ },{
+ field: 'needsRerun',
+ displayName: 'Rerun?',
+ enableCellEdit: false,
+ cellTemplate: chkBoxTemplate,
+ sortFn: checkboxSorting,
+ width: 70
+ },{
+ field: 'lastUpdated',
+ displayName: 'Last Ran',
+ enableCellEdit: false,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html',
+ sortFn: dateSorting
+ }, {
+ field: 'category',
+ displayName: 'Category',
+ enableCellEdit: true,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'machine',
+ displayName: 'Station',
+ enableCellEdit: true,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'elapsedTime',
+ displayName: 'Elapsed Time',
+ enableCellEdit: false,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ },{
+ field: 'creationDate',
+ displayName: 'Creation Date',
+ enableCellEdit: false,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html',
+ sortFn: dateSorting
+ },{
+ field: 'aborted',
+ displayName: 'Aborted',
+ enableCellEdit: false,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'version',
+ displayName: 'Version',
+ enableCellEdit: false,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }];
+
+ var smallColumnsCoverage = [{
+ field: 'name',
+ displayName: 'Name',
+ cellTemplate: origCellTmpl,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'status',
+ displayName: 'Status',
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'totalPoints',
+ displayName: 'Total',
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'failureCount',
+ displayName: 'Failure Count',
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'discrepanciesAsRanges',
+ displayName: 'Failed Points',
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'assignee',
+ displayName: 'Assignee',
+ enableCellEdit: false,
+ cellTemplate: assigneeCellTmpl,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'itemNotes',
+ displayName: 'Script Notes',
+ cellTemplate: cellEditNotes,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ },{
+ field: 'needsRerun',
+ displayName: 'Rerun?',
+ enableCellEdit: false,
+ cellTemplate: chkBoxTemplate,
+ sortFn: checkboxSorting
+ },{
+ field: 'lastUpdated',
+ displayName: 'Last Ran',
+ enableCellEdit: false,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html',
+ sortFn: dateSorting
+ }, {
+ field: 'category',
+ displayName: 'Category',
+ enableCellEdit: true,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'machine',
+ displayName: 'Station',
+ enableCellEdit: true,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'elapsedTime',
+ displayName: 'Elapsed Time',
+ enableCellEdit: false,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ },{
+ field: 'creationDate',
+ displayName: 'Creation Date',
+ enableCellEdit: false,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html',
+ sortFn: dateSorting
+ },{
+ field: 'aborted',
+ displayName: 'Aborted',
+ enableCellEdit: false,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'version',
+ displayName: 'Version',
+ enableCellEdit: false,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ },{
+ field: 'fileNumber',
+ displayName: 'File Number',
+ enableCellEdit: false,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ },{
+ field: 'methodNumber',
+ displayName: 'Method Number',
+ enableCellEdit: false,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }];
+
+ var wideColumnsCoverage = [{
+ field: 'name',
+ displayName: 'Name',
+ width: 350,
+ cellTemplate: origCellTmpl,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'status',
+ displayName: 'Status',
+ width: 100,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'totalPoints',
+ displayName: 'Total',
+ width: 100,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'failureCount',
+ displayName: 'Failure Count',
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'discrepanciesAsRanges',
+ displayName: 'Failed Points',
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'assignee',
+ displayName: 'Assignee',
+ enableCellEdit: false,
+ cellTemplate: assigneeCellTmpl,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'itemNotes',
+ displayName: 'Script Notes',
+ cellTemplate: cellEditNotes,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ },{
+ field: 'needsRerun',
+ displayName: 'Rerun?',
+ enableCellEdit: false,
+ cellTemplate: chkBoxTemplate,
+ sortFn: checkboxSorting,
+ width: 70
+ },{
+ field: 'lastUpdated',
+ displayName: 'Last Ran',
+ enableCellEdit: false,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html',
+ sortFn: dateSorting
+ }, {
+ field: 'category',
+ displayName: 'Category',
+ enableCellEdit: true,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'machine',
+ displayName: 'Station',
+ enableCellEdit: true,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }, {
+ field: 'elapsedTime',
+ displayName: 'Elapsed Time',
+ enableCellEdit: false,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ },{
+ field: 'creationDate',
+ displayName: 'Creation Date',
+ enableCellEdit: false,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html',
+ sortFn: dateSorting
+ },{
+ field: 'aborted',
+ displayName: 'Aborted',
+ enableCellEdit: false,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ },{
+ field: 'version',
+ displayName: 'Version',
+ enableCellEdit: false,
+ visible: false,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ },{
+ field: 'fileNumber',
+ displayName: 'File Number',
+ enableCellEdit: false,
+ visible: false,
+ width: 75,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ },{
+ field: 'methodNumber',
+ displayName: 'Method Number',
+ enableCellEdit: false,
+ visible: false,
+ width: 75,
+ headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ }];
+
+ return ColumnFactory;
+}) \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.web.ui/src/dispo/js/dispoApp.js b/plugins/org.eclipse.osee.web.ui/src/dispo/js/dispoApp.js
index ed2faf95272..c8a4b9cf9e3 100644
--- a/plugins/org.eclipse.osee.web.ui/src/dispo/js/dispoApp.js
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/js/dispoApp.js
@@ -106,6 +106,25 @@ app.provider('Set', function() {
];
});
+app.provider('Config', function() {
+ this.$get = ['$resource',
+ function($resource) {
+ var Config = $resource('/dispo/program/:programId/config', {}, {
+ });
+ return Config;
+ }
+ ];
+});
+
+app.provider('SourceFile', function() {
+ this.$get = ['$resource',
+ function($resource) {
+ var SourceFile = $resource('/dispo/program/:programId/set/:setId/file/:fileName', {}, {});
+ return SourceFile;
+ }
+ ];
+});
+
app.provider('Item', function() {
this.$get = [
'$resource',
diff --git a/plugins/org.eclipse.osee.web.ui/src/dispo/js/userController.js b/plugins/org.eclipse.osee.web.ui/src/dispo/js/userController.js
index 6d6f68b7d38..038ad480574 100644
--- a/plugins/org.eclipse.osee.web.ui/src/dispo/js/userController.js
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/js/userController.js
@@ -8,8 +8,9 @@ app.controller('userController', [
'Item',
'Annotation',
'SetSearch',
-
- function($scope, $modal, $rootScope, $cookieStore, Program, Set, Item, Annotation, SetSearch) {
+ 'SourceFile',
+ 'ColumnFactory',
+ function($scope, $modal, $rootScope, $cookieStore, Program, Set, Item, Annotation, SetSearch, SourceFile, ColumnFactory) {
$scope.unselectingItem = false;
$scope.editItems = false;
$scope.selectedItems = [];
@@ -103,6 +104,9 @@ app.controller('userController', [
itemId: item.guid
}, function(data) {
$scope.annotations = data;
+ if($rootScope.type == 'codeCoverage') {
+ $scope.annotations.sort(function(a, b){return a.locationRefs-b.locationRefs});
+ }
var blankAnnotation = new Annotation();
$scope.annotations.push(blankAnnotation);
@@ -131,6 +135,24 @@ app.controller('userController', [
$scope.lastFocused = element;
}
+ $scope.getSourceFlie = function () {
+ if($rootScope.type == 'codeCoverage') {
+ var requst = [];
+ requst.push(
+ "/dispo/",
+ "program/",
+ $scope.programSelection,
+ "/set/",
+ $scope.setSelection,
+ "/file/",
+ $scope.selectedItem.name
+ );
+ var url = requst.join("");
+
+ window.open(url);
+ }
+ }
+
$scope.toggleEditItems = function toggleEditItems() {
var size = $scope.selectedItems.length;
$scope.gridOptions.selectAll(false);
@@ -159,219 +181,11 @@ app.controller('userController', [
}
});
- var dateSorting = function (itemA, itemB) {
- var DateA = new Date(itemA);
- var DateB = new Date(itemB);
-
- if (DateA < DateB) {
- return -1;
- } else if (DateB < DateA) {
- return 1;
- } else {
- return 0;
- }
- };
-
- var checkboxSorting = function checkboxSorting(itemA, itemB) {
- if(itemA == itemB) {
- return 0;
- } else if (itemA) {
- return -1;
- } else if (itemB) {
- return 1;
- }
- };
-
$scope.checkEditable = function checkEditable(item) {
return item.assignee != $rootScope.cachedName;
}
- var origCellTmpl = '<div ng-dblclick="getItemDetails(row.entity, row)">{{row.entity.name}}</div>';
- var editCellTmpl = '<input ng-model="row.getProperty(col.field)" ng-model-onblur ng-change="editItem(row.entity);" value="row.getProperty(col.field);></input>';
- var cellEditNotes = '<input class="cellInput" ng-model="COL_FIELD" ng-disabled="checkEditable(row.entity);" ng-model-onblur ng-change="editNotes(row.entity)"/>'
- var chkBoxTemplate = '<input type="checkbox" class="form-control" ng-model="COL_FIELD" ng-change="editNeedsRerun(row.entity)"></input>';
- var assigneeCellTmpl = '<div ng-dblclick="stealItem(row.entity)">{{row.entity.assignee}}</div>';
- var dateCellTmpl = '<div>getReadableDate({{row.getProperty(col.field)}})</div>';
-
-
- $scope.smallColumns = [{
- field: 'name',
- displayName: 'Name',
- cellTemplate: origCellTmpl,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }, {
- field: 'status',
- displayName: 'Status',
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }, {
- field: 'totalPoints',
- displayName: 'Total',
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }, {
- field: 'failureCount',
- displayName: 'Failure Count',
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }, {
- field: 'discrepanciesAsRanges',
- displayName: 'Failed Points',
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }, {
- field: 'assignee',
- displayName: 'Assignee',
- enableCellEdit: false,
- cellTemplate: assigneeCellTmpl,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }, {
- field: 'itemNotes',
- displayName: 'Script Notes',
- cellTemplate: cellEditNotes,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- },{
- field: 'needsRerun',
- displayName: 'Rerun?',
- enableCellEdit: false,
- cellTemplate: chkBoxTemplate,
- sortFn: checkboxSorting
- },{
- field: 'lastUpdated',
- displayName: 'Last Ran',
- enableCellEdit: false,
- visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html',
- sortFn: dateSorting
- }, {
- field: 'category',
- displayName: 'Category',
- enableCellEdit: true,
- visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }, {
- field: 'machine',
- displayName: 'Station',
- enableCellEdit: true,
- visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }, {
- field: 'elapsedTime',
- displayName: 'Elapsed Time',
- enableCellEdit: false,
- visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- },{
- field: 'creationDate',
- displayName: 'Creation Date',
- enableCellEdit: false,
- visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html',
- sortFn: dateSorting
- },{
- field: 'aborted',
- displayName: 'Aborted',
- enableCellEdit: false,
- visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }, {
- field: 'version',
- displayName: 'Version',
- enableCellEdit: false,
- visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }];
-
- $scope.wideColumns = [{
- field: 'name',
- displayName: 'Name',
- width: 350,
- cellTemplate: origCellTmpl,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }, {
- field: 'status',
- displayName: 'Status',
- width: 100,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }, {
- field: 'totalPoints',
- displayName: 'Total',
- width: 100,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }, {
- field: 'failureCount',
- displayName: 'Failure Count',
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }, {
- field: 'discrepanciesAsRanges',
- displayName: 'Failed Points',
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }, {
- field: 'assignee',
- displayName: 'Assignee',
- enableCellEdit: false,
- cellTemplate: assigneeCellTmpl,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }, {
- field: 'itemNotes',
- displayName: 'Script Notes',
- cellTemplate: cellEditNotes,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- },{
- field: 'needsRerun',
- displayName: 'Rerun?',
- enableCellEdit: false,
- cellTemplate: chkBoxTemplate,
- sortFn: checkboxSorting,
- width: 70
- },{
- field: 'lastUpdated',
- displayName: 'Last Ran',
- enableCellEdit: false,
- visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html',
- sortFn: dateSorting
- }, {
- field: 'category',
- displayName: 'Category',
- enableCellEdit: true,
- visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }, {
- field: 'machine',
- displayName: 'Station',
- enableCellEdit: true,
- visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }, {
- field: 'elapsedTime',
- displayName: 'Elapsed Time',
- enableCellEdit: false,
- visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- },{
- field: 'creationDate',
- displayName: 'Creation Date',
- enableCellEdit: false,
- visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html',
- sortFn: dateSorting
- },{
- field: 'aborted',
- displayName: 'Aborted',
- enableCellEdit: false,
- visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }, {
- field: 'version',
- displayName: 'Version',
- enableCellEdit: false,
- visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }];
-
- if(window.innerWidth < 1000) {
- $scope.columns = $scope.smallColumns;
- } else {
- $scope.columns = $scope.wideColumns;
- }
-
+ $scope.columns = ColumnFactory.getColumns($scope.type, window.innerWidth);
var filterBarPlugin = {
init: function(scope, grid) {
@@ -605,6 +419,11 @@ app.controller('userController', [
}, function(data) {
alert("Could not make change, please try refreshing");
});
+
+ if($rootScope.type == 'codeCoverage') {
+ $scope.annotations.sort(function(a, b){return a.locationRefs-b.locationRefs});
+ }
+
}
}
@@ -629,6 +448,10 @@ app.controller('userController', [
var blankAnnotation = new Annotation();
$scope.annotations.push(blankAnnotation);
+
+ if($rootScope.type == 'codeCoverage') {
+ $scope.annotations.sort(function(a, b){return a.locationRefs-b.locationRefs});
+ }
}, function(data) {
alert("Could not make change, please try refreshing");
});
diff --git a/plugins/org.eclipse.osee.web.ui/src/dispo/views/user.html b/plugins/org.eclipse.osee.web.ui/src/dispo/views/user.html
index 42becb6a9d0..6491fcb53f3 100644
--- a/plugins/org.eclipse.osee.web.ui/src/dispo/views/user.html
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/views/user.html
@@ -37,12 +37,12 @@
</div>
</div>
<div id="bottom-content">
- <div id="itemSelectedBar">
+ <div ng-dblclick="getSourceFlie()" id="itemSelectedBar">
Item: {{ selectedItem.name || "Select an Item"}} Failures: {{ selectedItem.discrepanciesAsRanges || "N/A"}}
</div>
<div id="annotationsGrid">
<table class="table subTable">
- <th>{{ annotationHeaders.locationRefs }}</th>
+ <th ng-click="sort()">{{ annotationHeaders.locationRefs }}</th>
<th>{{ annotationHeaders.resolutionType }}</th>
<th>{{ annotationHeaders.resolution }}</th>
<th>Developer Notes</th>

Back to the top