2 * Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 var app = angular.module('CommittedSubmissions');
21 'CommittedSubmissionsController',
22 function($scope, restAPISvc, $interval, refreshPeriod,
23 committedSubmissionsSvc, NgTableParams, appContext,
26 $scope.getLayer = committedSubmissionsSvc.getLayer;
27 $scope.getResultUrl = committedSubmissionsSvc.getResultUrl;
28 $scope.mapResult = committedSubmissionsSvc.mapResult;
32 function initialize() {
33 restAPISvc.getRestAPI("/api/v1/submission/", function(
35 $scope.submissions = submissions;
36 var data = submissions;
37 $scope.tableParams = new NgTableParams({
46 $scope.refreshCommittedSubmissions = function() {
50 $scope.getValidationResults = function(submission) {
51 if (!submission.validationDbTestResult
52 || !submission.validationDbTestResult.timestamp
53 || !submission.validationDbTestResult.wrobotDbTestResults
54 || submission.validationDbTestResult.wrobotDbTestResults.length === 0) {
57 $window.location.href = appContext
58 + "/validationresults#?submissionId="
59 + submission.submissionId;
63 * $interval(function() {
64 * $scope.refreshCommittedSubmissions(); }, refreshPeriod);