diff --git a/apps/dashboard-app/src/main/js/src/app/dashboard/apps/happy/happy.js b/apps/dashboard-app/src/main/js/src/app/dashboard/apps/happy/happy.js index e42c36e59..e9aa0bae6 100644 --- a/apps/dashboard-app/src/main/js/src/app/dashboard/apps/happy/happy.js +++ b/apps/dashboard-app/src/main/js/src/app/dashboard/apps/happy/happy.js @@ -1,112 +1,112 @@ 'use strict'; angular.module('shrine-happy', ['happy-model', 'ngAnimate', 'ui.bootstrap']) .constant("HappyStates", { STATE0: "Loading", STATE1: "General", STATE2: "Keystore", STATE3: "Hub", STATE4: "Adapter", STATE5: "QEPFailure" }) .controller('HappyCtrl', ['$rootScope', '$scope', '$location', '$app', 'HappyMdl', 'HappyStates', '$sce', function ($rootScope, $scope, $location, $app, model, states, $sce) { $scope.$app = $app; $scope.versionInfo = {}; $scope.adapter = {}; $scope.recentAuditEntries = {}; $scope.hiveConfig = {}; $scope.keystore = {}; $scope.net = {}; $scope.downstreamNodes = {}; $scope.recentQueries = {}; $scope.QEPError = ""; $scope.states = states; $scope.state = $scope.states.STATE0; $scope.general = { keystoreOk: true, hubOk: true, adapterOk: true, isHub: false } $scope.setAll = function () { model.getAll() .then(function (data) { $scope.adapter = data.all.adapter; $scope.hiveConfig = data.all.hiveConfig; $scope.keystore = data.all.keystoreReport; //setting for net. $scope.recentAuditEntries = data.all.recentAuditEntries; $scope.recentQueries = data.all.recentQueries; $scope.versionInfo = data.all.versionInfo; $scope.general.keystoreOk = true; $scope.general.adapterOk = $scope.adapter.result.response.errorResponse === undefined; // - if not a hub, then can we assume that 'net' will not be an // element on the data object? $scope.general.isHub = data.all.notAHub === undefined; if($scope.general.isHub === true) { $scope.net = data.all.net; - $scope.downstreamNodes = data.all.downstreamNodes; + $scope.downstreamNodes = data.all.downstreamNodes; $scope.net.hasFailures = Number($scope.net.failureCount) > 0; $scope.net.hasInvalidResults = (Number($scope.net.validResultCount) < Number($scope.net.expectedResultCount)); $scope.net.hasTimeouts = Number($scope.net.timeoutCount); } $scope.general.hubOk = !$scope.general.isHub || !($scope.net.hasFailures || $scope.net.hasInvalidResults || $scope.net.hasTimeouts) $scope.setStateAndRefresh(states.STATE1); }, function (data) { $scope.trustedHtml= $sce.trustAsHtml(data); $scope.setStateAndRefresh(states.STATE5); } ); }; $scope.setStateAndRefresh = function (state) { $scope.state = state; } $scope.setAll(); }]) .directive("general", function () { return { restrict: "E", templateUrl: "src/app/dashboard/apps/happy/general/general.tpl.html", replace: true }; }) .directive("keystore", function () { return { restrict: "E", templateUrl: "src/app/dashboard/apps/happy/keystore/keystore.tpl.html", replace: true }; }) .directive("hub", function () { return { restrict: "E", templateUrl: "src/app/dashboard/apps/happy/hub/hub.tpl.html", replace: true }; }) .directive("adapter", function () { return { restrict: "E", templateUrl: "src/app/dashboard/apps/happy/adapter/adapter.tpl.html", replace: true }; }) .directive("fatalFailure", function () { return { restrict: "E", templateUrl: "src/app/dashboard/apps/happy/fatal-failure/fatal-failure.tpl.html", replace: true }; }); diff --git a/apps/steward-app/src/main/js/src/app/dashboard/topics/topic-table/topic-detail/role2-description.tpl.html b/apps/steward-app/src/main/js/src/app/dashboard/topics/topic-table/topic-detail/role2-description.tpl.html index 63f3a27fd..f91fc21ed 100644 --- a/apps/steward-app/src/main/js/src/app/dashboard/topics/topic-table/topic-detail/role2-description.tpl.html +++ b/apps/steward-app/src/main/js/src/app/dashboard/topics/topic-table/topic-detail/role2-description.tpl.html @@ -1,48 +1,49 @@ <form name="form" role="form"> <div class="col-sm-12"> <br/> <div class="form-group"> <label>Topic Id:</label> {{topic.id}} </div> <div class="form-group"> <label>Date Created:</label> {{formatDate(topic.createDate)}} </div> <div class="form-group"> <label>Last Updated:</label> {{formatDate(topic.changeDate)}} </div> <label class="pull-right"> *<small>Required Field</small> </label> <div class="form-group"> <label>Topic Name*</label> <input type="text" ng-model="topic.name" name="topicname" id="topicname" class="form-control" required novalidate readonly> </div> <div class="form-group"> <label>Please Describe Your Query's Intent*</label> <textarea readonly ng-model="topic.description" name="topicdescription" id="topicdescription" class="form-control" required novalidate></textarea> </div> <div class="form-group"> <label>Status:</label> + <select disabled ng-cloak> <option>{{data.topicState}}</option> </select> </div> <div class="form-group text-center"> <button type="submit" class="pull-right shrine-button shrine-submit" ng-disabled="!isEditable()" ng-click="setState('edit')"> <span>EDIT</span> <i class="fa fa-chevron-right fa-2x"></i> </button> </div> </div> </form> \ No newline at end of file diff --git a/apps/steward-app/src/main/js/src/app/dashboard/topics/topic-table/topic-detail/role2-edit.tpl.html b/apps/steward-app/src/main/js/src/app/dashboard/topics/topic-table/topic-detail/role2-edit.tpl.html index 3265f2eae..80166247f 100644 --- a/apps/steward-app/src/main/js/src/app/dashboard/topics/topic-table/topic-detail/role2-edit.tpl.html +++ b/apps/steward-app/src/main/js/src/app/dashboard/topics/topic-table/topic-detail/role2-edit.tpl.html @@ -1,68 +1,69 @@ <form name="form" role="form"> <div class="col-sm-12"> <br/> <div class="form-group"> <label>Topic Id:</label> {{topic.id}} </div> <div class="form-group"> <label>Date Created:</label> {{formatDate(topic.createDate)}} </div> <div class="form-group"> <label>Last Updated:</label> {{formatDate(topic.changeDate)}} </div> <label class="pull-right"> *<small>Required Field</small> </label> <div class="form-group"> <label>Topic Name*</label> <input type="text" ng-model="topic.name" name="topicname" id="topicname" class="form-control" required novalidate readonly> </div> <div class="form-group"> <label>Please Describe Your Query's Intent*</label> <textarea readonly ng-model="topic.description" name="topicdescription" id="topicdescription" class="form-control" required novalidate></textarea> </div> <div class="form-group" ng-switch on="topic.state === 'Pending'" ng-cloak> <label>Status:</label> + <!-- ie 11 hack --> <select ng-model="data.topicState" ng-switch-when="true"> <option value="Pending" ng-selected="true"> Pending </option> <option value="Approved"> Approved </option> <option value="Rejected"> Rejected </option> </select> <select ng-model="data.topicState" ng-switch-when="false" ng-cloak> <option value="Approved" ng-selected="data.topicState === 'Approved'"> Approved </option> <option value="Rejected" ng-selected="data.topicState === 'Rejected'"> Rejected </option> </select> </div> <div class="form-group text-center"> <button type="submit" class="pull-right shrine-button shrine-submit" ng-disabled="data.topicState === 'Pending'" ng-click="ok(topic.id)"> <span>UPDATE</span> <i class="fa fa-chevron-right fa-2x"></i> </button> </div> </div> </form> \ No newline at end of file