summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormegumi.telles2017-12-07 11:05:53 -0500
committerMegumi Telles2017-12-11 09:00:28 -0500
commit1e146ab6e86abc0d8237756a7063eb14b33e815e (patch)
treeda09272b87dceba28dbf99f7fdd9d915f652e69c
parent290acdd6cf24fdf0a23949d3c0a508b2fcabb920 (diff)
downloadorg.eclipse.osee-1e146ab6e86abc0d8237756a7063eb14b33e815e.zip
org.eclipse.osee-1e146ab6e86abc0d8237756a7063eb14b33e815e.tar.gz
org.eclipse.osee-1e146ab6e86abc0d8237756a7063eb14b33e815e.tar.xz
feature[ats_TW4242]: Add timestamp to dispo/coverage import table
-rw-r--r--plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoSet.java3
-rw-r--r--plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoSetData.java12
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/DispoConstants.java1
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoApiImpl.java5
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoSetArtifact.java6
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/OrcsStorageImpl.java5
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/types/OseeTypes_Dispo.osee9
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/js/adminController.js41
8 files changed, 67 insertions, 15 deletions
diff --git a/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoSet.java b/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoSet.java
index 5a6c69d..641f246 100644
--- a/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoSet.java
+++ b/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoSet.java
@@ -11,6 +11,7 @@
package org.eclipse.osee.disposition.model;
+import java.util.Date;
import java.util.List;
import org.eclipse.osee.framework.jdk.core.type.Identifiable;
@@ -33,4 +34,6 @@ public interface DispoSet extends Identifiable<String> {
String getCiSet();
String getRerunList();
+
+ Date getTime();
}
diff --git a/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoSetData.java b/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoSetData.java
index ff565f2..60c52dd 100644
--- a/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoSetData.java
+++ b/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoSetData.java
@@ -11,6 +11,7 @@
package org.eclipse.osee.disposition.model;
+import java.util.Date;
import java.util.List;
import javax.xml.bind.annotation.XmlRootElement;
@@ -28,6 +29,7 @@ public class DispoSetData extends DispoSetDescriptorData implements DispoSet {
private OperationReport operationSummary;
private String ciSet;
private String rerunList;
+ private Date time;
public DispoSetData() {
@@ -86,6 +88,7 @@ public class DispoSetData extends DispoSetDescriptorData implements DispoSet {
return ciSet;
}
+ @Override
public String getRerunList() {
return rerunList;
}
@@ -94,4 +97,13 @@ public class DispoSetData extends DispoSetDescriptorData implements DispoSet {
this.rerunList = rerunList;
}
+ @Override
+ public Date getTime() {
+ return time;
+ }
+
+ public void setTime(Date time) {
+ this.time = time;
+ }
+
}
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 4c47c39..c80a418 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
@@ -51,6 +51,7 @@ public final class DispoConstants {
public static final AttributeTypeToken DispoItemMethodNumber = AttributeTypeToken.valueOf(3458764513820541460L, "dispo.Method Number");
public static final AttributeTypeToken DispoCiSet = AttributeTypeToken.valueOf(5225296359986133054L, "dispo.Ci Set");
public static final AttributeTypeToken DispoRerunList = AttributeTypeToken.valueOf(3587660131087940587L, "dispo.Rerun List");
+ public static final AttributeTypeToken DispoTime = AttributeTypeToken.valueOf(7240092025387115138L, "dispo.Time");
public static final ArtifactToken DISPO_ARTIFACT = ArtifactToken.valueOf(4757831, "DispositionTypes", COMMON, CoreArtifactTypes.OseeTypeDefinition);
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoApiImpl.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoApiImpl.java
index 3b243bf..1502760 100644
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoApiImpl.java
+++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoApiImpl.java
@@ -516,8 +516,10 @@ public class DispoApiImpl implements DispoApi {
// Create the Note to document the Operation
List<Note> notesList = setToEdit.getNotesList();
- notesList.add(generateOperationNotes(operation));
+ Note genOpNotes = generateOperationNotes(operation);
+ notesList.add(genOpNotes);
newSet.setNotesList(notesList);
+ newSet.setTime(new Date());
// Generate report
getWriter().updateOperationSummary(author, branch, setToEdit.getGuid(), report);
@@ -645,6 +647,7 @@ public class DispoApiImpl implements DispoApi {
sb = sb.append(DispoStrings.SCRIPT_ENTRY_END);
}
DispoSetData dispoSetData = new DispoSetData();
+ dispoSetData.setTime(new Date());
dispoSetData.setRerunList(DispoStrings.BATCH_RERUN_LIST + sb.toString() + DispoStrings.BATCH_RERUN_LIST_END);
ArtifactReadable author = getQuery().findUser();
storageProvider.get().updateDispoSet(author, branch, destSetId, dispoSetData);
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoSetArtifact.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoSetArtifact.java
index 4a94a54..036554d 100644
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoSetArtifact.java
+++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoSetArtifact.java
@@ -11,6 +11,7 @@
package org.eclipse.osee.disposition.rest.internal;
import java.util.ArrayList;
+import java.util.Date;
import java.util.List;
import org.eclipse.osee.disposition.model.DispoSet;
import org.eclipse.osee.disposition.model.Note;
@@ -97,4 +98,9 @@ public class DispoSetArtifact extends BaseIdentity<String> implements DispoSet {
return artifact.getSoleAttributeAsString(DispoConstants.DispoRerunList, "");
}
+ @Override
+ public Date getTime() {
+ return artifact.getSoleAttributeValue(DispoConstants.DispoTime, null);
+ }
+
}
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 1828cc4..8ff81b7 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
@@ -238,6 +238,7 @@ public class OrcsStorageImpl implements Storage {
tx.setSoleAttributeFromString(creatdArtId, DispoConstants.DispoNotesJson, notesJarray.toString());
tx.setSoleAttributeFromString(creatdArtId, DispoConstants.DispoCiSet, descriptor.getCiSet());
tx.setSoleAttributeFromString(creatdArtId, DispoConstants.DispoRerunList, descriptor.getRerunList());
+ tx.setSoleAttributeValue(creatdArtId, DispoConstants.DispoTime, descriptor.getTime());
tx.commit();
return creatdArtId.getUuid();
}
@@ -274,6 +275,7 @@ public class OrcsStorageImpl implements Storage {
String importPath = newData.getImportPath();
String ciSet = newData.getCiSet();
String rerunList = newData.getRerunList();
+ Date time = newData.getTime();
JSONArray notesList = null;
if (newData.getNotesList() != null) {
@@ -296,6 +298,9 @@ public class OrcsStorageImpl implements Storage {
if (rerunList != null && !rerunList.equals(origSetAs.getRerunList())) {
tx.setSoleAttributeFromString(dispoSet, DispoConstants.DispoRerunList, rerunList);
}
+ if (time != null && !time.equals(origSetAs.getTime())) {
+ tx.setSoleAttributeValue(dispoSet, DispoConstants.DispoTime, time);
+ }
tx.commit();
}
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 72cf60c..f241925 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
@@ -13,6 +13,7 @@ artifactType "Disposition Set" extends "Artifact" {
attribute "dispo.Operation Summary"
attribute "dispo.CI Set"
attribute "dispo.Rerun List"
+ attribute "dispo.Time"
}
artifactType "dispo.Dispositionable Item" extends "Artifact" {
@@ -307,4 +308,12 @@ attributeType "dispo.Rerun List" extends StringAttribute {
max 1
defaultValue ""
mediaType "text/plain"
+}
+
+attributeType "dispo.Time" extends DateAttribute {
+ id 7240092025387115138
+ dataProvider DefaultAttributeDataProvider
+ min 0
+ max 1
+ mediaType "text/calendar"
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.web.ui/src/dispo/js/adminController.js b/plugins/org.eclipse.osee.web.ui/src/dispo/js/adminController.js
index 226a337..8b9fb04 100644
--- a/plugins/org.eclipse.osee.web.ui/src/dispo/js/adminController.js
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/js/adminController.js
@@ -75,62 +75,74 @@ app.controller('adminController', [
$scope.columnDefs1 = [{
field: 'name',
displayName: "Import",
- width: '9%',
+ width: '7%',
enableColumnMenu: false,
enableCellEdit: false,
cellTemplate: importCellTmpl
}, {
field: 'name',
displayName: "Export",
- width: '9%',
+ width: '7%',
enableColumnMenu: false,
enableCellEdit: false,
cellTemplate: exportCellTmpl
}, {
field: 'name',
displayName: "Last Operation",
- width: '15%',
+ width: '10%',
enableColumnMenu: false,
enableCellEdit: false,
cellTemplate: lastOperationCellTmpl
}, {
+ field: 'time',
+ displayName: "Timestamp",
+ width: '15%',
+ enableColumnMenu: false,
+ enableCellEdit: false
+ }, {
field: 'name',
displayName: "Name",
- width: '20%',
+ width: '12%',
enableColumnMenu: false,
- enableCellEdit: false,
+ enableCellEdit: false
}, {
field: 'importPath',
displayName: "Path",
enableColumnMenu: false,
- enableCellEdit: false,
+ enableCellEdit: false
}];
$scope.columnDefs2 = [{
field: 'name',
displayName: "Import",
- width: '9%',
+ width: '7%',
enableColumnMenu: false,
enableCellEdit: false,
cellTemplate: importCellTmpl
}, {
field: 'name',
displayName: "Export",
- width: '9%',
+ width: '7%',
enableColumnMenu: false,
enableCellEdit: false,
cellTemplate: exportCellTmpl
}, {
field: 'name',
displayName: "Last Operation",
- width: '15%',
+ width: '10%',
enableColumnMenu: false,
enableCellEdit: false,
cellTemplate: lastOperationCellTmpl
}, {
+ field: 'time',
+ displayName: "Timestamp",
+ width: '15%',
+ enableColumnMenu: false,
+ enableCellEdit: false
+ }, {
field: 'name',
displayName: "Name",
- width: '20%',
+ width: '12%',
enableColumnMenu: false,
enableCellEdit: true,
}, {
@@ -200,6 +212,7 @@ app.controller('adminController', [
$scope.operationSummary = data.operationSummary;
$scope.summaryGrid.data = $scope.operationSummary.entries;
set.importState = data.importState;
+ set.time = data.time;
}, function(data) {
set.gettingDetails = false;
alert("Could not update Set from Server");
@@ -273,7 +286,6 @@ app.controller('adminController', [
$scope.importSet = function importSet(set) {
- console.log(new Date().getTime());
var newSet = new Set;
newSet.operation = "Import";
set.processingImport = true;
@@ -282,9 +294,11 @@ app.controller('adminController', [
setId: set.guid
}, newSet, function(data){
set.processingImport = false;
+ set.time = data.time;
$scope.getSetImportDetails(set);
}, function() {
set.processingImport = false;
+ set.time = new Date();
$scope.getSetImportDetails(set);
});
};
@@ -333,11 +347,10 @@ app.controller('adminController', [
sourceSet: inputs.sourceSet,
}, function(data) {
$scope.isRunningOperation = false;
- var reportUrl = data.operationStatus;
- $scope.getSetImportDetails(destinationSet);
+ $scope.getSetImportDetails($scope.getSetById(inputs.destinationSet));
}, function(data) {
$scope.isRunningOperation = false;
- $scope.getSetImportDetails(destinationSet);
+ $scope.getSetImportDetails($scope.getSetById(inputs.destinationSet));
});
};