Skip to content

Commit

Permalink
DEV Copy & Minor Adjustments
Browse files Browse the repository at this point in the history
Clean up and copy updates, along with minor adjustments that can avoid
full retest
  • Loading branch information
cdcabrera committed Aug 8, 2017
1 parent 974b2ce commit ae50d6f
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 106 deletions.
16 changes: 5 additions & 11 deletions app/scripts/controllers/provisionedService.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
'use strict';

/**
* @ngdoc function
* @name openshiftConsole.controller:ProvisionedServiceController
* @description
* Controller of the openshiftConsole
*/
angular.module('openshiftConsole')
.controller('ProvisionedServiceController', function ($scope,
$routeParams,
DataService,
ProjectsService,
$filter) {
$filter,
$routeParams,
DataService,
ProjectsService) {
$scope.projectName = $routeParams.project;
$scope.displayName = null;
$scope.serviceInstance = null;
Expand Down Expand Up @@ -97,7 +91,7 @@ angular.module('openshiftConsole')
if (action === "DELETED") {
$scope.alerts["deleted"] = {
type: "warning",
message: "This service has been deleted."
message: "This provisioned service has been deleted."
};
}
};
Expand Down
18 changes: 5 additions & 13 deletions app/scripts/controllers/provisionedServices.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,16 @@
'use strict';

/**
* @ngdoc function
* @name openshiftConsole.controller:ProvisionedServicesController
* @description
* # ProjectController
* Controller of the openshiftConsole
*/
angular.module('openshiftConsole')
.controller('ProvisionedServicesController', function ($routeParams,
$scope,
.controller('ProvisionedServicesController', function ($scope,
$filter,
$routeParams,
APIService,
BindingService,
Constants,
DataService,
ProjectsService,
ResourceAlertsService,
$filter,
LabelFilter,
Logger) {
Logger,
ProjectsService) {

//var overview = this;
//var limitWatches = $filter('isIE')() || $filter('isEdge')();
Expand Down
2 changes: 1 addition & 1 deletion app/views/overview/_service-instance-row.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="list-pf-name">
<h3>
<!--<span ng-bind-html="row.displayName | highlightKeywords : row.state.filterKeywords"></span>-->
<a href="{{row.apiObject | navigateResourceURL}}" ng-bind-html="row.displayName | highlightKeywords : row.state.filterKeywords"></a>
<a ng-href="{{row.apiObject | navigateResourceURL}}" ng-bind-html="row.displayName | highlightKeywords : row.state.filterKeywords"></a>
<div ng-bind-html="row.apiObject.metadata.name | highlightKeywords : row.state.filterKeywords" class="list-row-longname"></div>
</h3>
<div class="status-icons">
Expand Down
33 changes: 15 additions & 18 deletions app/views/provisioned.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,9 @@ <h1>
<thead>
<tr>
<th>Name</th>
<th>Bindings</th>
<th>Status</th>
<th>Created</th>
<th>Web Interface Url</th>
<th>Bindings</th>

<!--<th>Name</th>
<th>Cluster IP</th>
Expand All @@ -50,12 +49,24 @@ <h1>
</thead>
<tbody ng-if="(serviceInstances | hashSize) === 0">
<tr>
<td colspan="5"><em>{{emptyMessage}}</em></td>
<td colspan="4"><em>{{emptyMessage}}</em></td>
</tr>
</tbody>
<tbody ng-if="(serviceInstances | hashSize) > 0">
<tr ng-repeat="serviceInstance in serviceInstances | orderObjectsByDate : true">
<td data-title="Name"><a href="{{serviceInstance | navigateResourceURL}}">{{serviceInstance | serviceInstanceDisplayName:serviceClasses}}</a></td>
<td data-title="Name"><a ng-href="{{serviceInstance | navigateResourceURL}}">{{serviceInstance | serviceInstanceDisplayName:serviceClasses}}</a></td>

<td data-title="Status">
<div row class="status">
<status-icon status="serviceInstance | deploymentStatus" disable-animation></status-icon>
<span flex>
{{serviceInstance | deploymentStatus}}
</span>
</div>
</td>
<td data-title="Created">
<span am-time-ago="serviceInstance.metadata.creationTimestamp" am-without-suffix="true"></span> ago
</td>
<td data-title="Bindings">
<!--<div class="list-pf-details">
<div ng-if="!row.expanded">
Expand Down Expand Up @@ -101,20 +112,6 @@ <h1>
</span>
</p>-->
</td>
<td data-title="Status">
<div row class="status">
<status-icon status="serviceInstance | deploymentStatus" disable-animation></status-icon>
<span flex>
{{serviceInstance | deploymentStatus}}
</span>
</div>
</td>
<td data-title="Created">
<span am-time-ago="serviceInstance.metadata.creationTimestamp" am-without-suffix="true"></span> ago
</td>
<td data-title="Web Interface Url">
<!--{{serviceInstance.metadata.selfLink}}-->
</td>

<!--
<td data-title="Name"><a href="{{service | navigateResourceURL}}">{{service.metadata.name}}</a></td>
Expand Down
104 changes: 52 additions & 52 deletions dist/scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -5977,82 +5977,82 @@ e.routesForService = {}, angular.forEach(n.by("metadata.name"), function(n) {
n.unwatchAll(i);
});
}));
} ]), angular.module("openshiftConsole").controller("ProvisionedServicesController", [ "$routeParams", "$scope", "APIService", "BindingService", "Constants", "DataService", "ProjectsService", "ResourceAlertsService", "$filter", "LabelFilter", "Logger", function(e, t, n, a, r, o, i, s, c, l, u) {
var d = _.get(r, "ENABLE_TECH_PREVIEW_FEATURE.service_catalog_landing_page") && n.apiInfo({
} ]), angular.module("openshiftConsole").controller("ProvisionedServicesController", [ "$scope", "$filter", "$routeParams", "APIService", "BindingService", "Constants", "DataService", "LabelFilter", "Logger", "ProjectsService", function(e, t, n, a, r, o, i, s, c, l) {
var u = _.get(o, "ENABLE_TECH_PREVIEW_FEATURE.service_catalog_landing_page") && a.apiInfo({
group: "servicecatalog.k8s.io",
resource: "serviceclasses"
}) && n.apiInfo({
}) && a.apiInfo({
group: "servicecatalog.k8s.io",
resource: "instances"
}) && n.apiInfo({
}) && a.apiInfo({
group: "servicecatalog.k8s.io",
resource: "bindings"
});
t.projectName = e.project, t.serviceInstances = {}, t.unfilteredServiceInstances = {}, t.labelSuggestions = {}, t.alerts = t.alerts || {}, t.emptyMessage = "Loading...", t.emptyMessageRoutes = "Loading...";
var m = [], p = {
e.projectName = n.project, e.serviceInstances = {}, e.unfilteredServiceInstances = {}, e.labelSuggestions = {}, e.alerts = e.alerts || {}, e.emptyMessage = "Loading...", e.emptyMessageRoutes = "Loading...";
var d = [], m = {
bindings: {},
bindableServiceInstances: {},
notificationsByObjectUID: {},
serviceInstances: {},
serviceClasses: {},
unfilteredServiceInstances: {},
bindingsByInstanceRef: {}
}, p = function() {
e.serviceInstances = s.getLabelSelector().select(e.unfilteredServiceInstances);
}, g = function() {
t.serviceInstances = l.getLabelSelector().select(t.unfilteredServiceInstances);
}, f = function() {
(p.serviceInstances || p.serviceClasses) && (t.serviceClasses = p.serviceClasses, t.unfilteredServiceInstances = _.sortBy(p.unfilteredServiceInstances, function(e) {
return _.get(p.serviceClasses, [ e.spec.serviceClassName, "externalMetadata", "displayName" ]) || e.spec.serviceClassName;
(m.serviceInstances || m.serviceClasses) && (e.serviceClasses = m.serviceClasses, e.unfilteredServiceInstances = _.sortBy(m.unfilteredServiceInstances, function(e) {
return _.get(m.serviceClasses, [ e.spec.serviceClassName, "externalMetadata", "displayName" ]) || e.spec.serviceClassName;
}, function(e) {
return _.get(e, "metadata.name", "");
}));
}, h = function() {};
i.get(e.project).then(_.spread(function(e, n) {
function a() {
l.getLabelSelector().isEmpty() || !_.isEmpty(t.serviceInstances) || _.isEmpty(t.unfilteredServiceInstances) ? delete t.alerts.services : t.alerts.services = {
}, f = function() {};
l.get(n.project).then(_.spread(function(n, a) {
function r() {
s.getLabelSelector().isEmpty() || !_.isEmpty(e.serviceInstances) || _.isEmpty(e.unfilteredServiceInstances) ? delete e.alerts.services : e.alerts.services = {
type: "warning",
details: "The active filters are hiding all services."
};
}
t.project = e;
var r = c("canI");
d && r({
e.project = n;
var o = t("canI");
u && o({
resource: "instances",
group: "servicecatalog.k8s.io"
}, "watch") && m.push(o.watch({
}, "watch") && d.push(i.watch({
group: "servicecatalog.k8s.io",
resource: "instances"
}, n, function(e) {
t.emptyMessage = "No provisioned services to show", p.unfilteredServiceInstances = e.by("metadata.name"), f(), g(), a(), l.addLabelSuggestionsFromResources(p.unfilteredServiceInstances, t.labelSuggestions), l.setLabelSuggestions(t.labelSuggestions), u.log("provisioned services (subscribe)", p.unfilteredServiceInstances);
})), d && r({
}, a, function(t) {
e.emptyMessage = "No provisioned services to show", m.unfilteredServiceInstances = t.by("metadata.name"), g(), p(), r(), s.addLabelSuggestionsFromResources(m.unfilteredServiceInstances, e.labelSuggestions), s.setLabelSuggestions(e.labelSuggestions), c.log("provisioned services (subscribe)", m.unfilteredServiceInstances);
})), u && o({
resource: "bindings",
group: "servicecatalog.k8s.io"
}, "watch") && m.push(o.watch({
}, "watch") && d.push(i.watch({
group: "servicecatalog.k8s.io",
resource: "bindings"
}, n, function(e) {
p.bindings = e.by("metadata.name"), p.bindingsByInstanceRef = _.groupBy(p.bindings, "spec.instanceRef.name"), h();
})), d && r({
}, a, function(e) {
m.bindings = e.by("metadata.name"), m.bindingsByInstanceRef = _.groupBy(m.bindings, "spec.instanceRef.name"), f();
})), u && o({
resource: "instances",
group: "servicecatalog.k8s.io"
}, "watch") && o.list({
}, "watch") && i.list({
group: "servicecatalog.k8s.io",
resource: "serviceclasses"
}, n, function(e) {
p.serviceClasses = e.by("metadata.name"), f(), g();
}), l.onActiveFiltersChanged(function(e) {
t.$apply(function() {
t.serviceInstances = e.select(t.unfilteredServiceInstances), a();
}, a, function(e) {
m.serviceClasses = e.by("metadata.name"), g(), p();
}), s.onActiveFiltersChanged(function(t) {
e.$apply(function() {
e.serviceInstances = t.select(e.unfilteredServiceInstances), r();
});
}), t.$on("$destroy", function() {
o.unwatchAll(m);
}), e.$on("$destroy", function() {
i.unwatchAll(d);
});
}));
} ]), angular.module("openshiftConsole").controller("ProvisionedServiceController", [ "$scope", "$routeParams", "DataService", "ProjectsService", "$filter", function(e, t, n, a, r) {
e.projectName = t.project, e.displayName = null, e.serviceInstance = null, e.serviceInstances = null, e.serviceClasses = {}, e.alerts = {}, e.breadcrumbs = [ {
} ]), angular.module("openshiftConsole").controller("ProvisionedServiceController", [ "$scope", "$filter", "$routeParams", "DataService", "ProjectsService", function(e, t, n, a, r) {
e.projectName = n.project, e.displayName = null, e.serviceInstance = null, e.serviceInstances = null, e.serviceClasses = {}, e.alerts = {}, e.breadcrumbs = [ {
title: "Provisioned Services",
link: "project/" + t.project + "/browse/service-instances"
link: "project/" + n.project + "/browse/service-instances"
}, {
title: t.instance
title: n.instance
} ], e.podFailureReasons = {
Pending: "This pod will not receive traffic until all of its containers have been created."
};
Expand All @@ -6064,46 +6064,46 @@ a.spec.port && a.spec.port.targetPort !== t.name && a.spec.port.targetPort !== t
}), n || (e.portsByRoute[""] = e.portsByRoute[""] || [], e.portsByRoute[""].push(t));
}));
}, s = function() {
e.serviceInstance && e.serviceClasses && (e.displayName = r("serviceInstanceDisplayName")(e.serviceInstance, e.serviceClasses));
e.serviceInstance && e.serviceClasses && (e.displayName = t("serviceInstanceDisplayName")(e.serviceInstance, e.serviceClasses));
}, c = function(t, n) {
e.loaded = !0, e.serviceInstance = t, i(), "DELETED" === n && (e.alerts.deleted = {
type: "warning",
message: "This service has been deleted."
message: "This provisioned service has been deleted."
});
};
a.get(t.project).then(_.spread(function(a, l) {
e.project = a, e.projectContext = l, n.get({
r.get(n.project).then(_.spread(function(r, l) {
e.project = r, e.projectContext = l, a.get({
group: "servicecatalog.k8s.io",
resource: "instances"
}, t.instance, l, {
}, n.instance, l, {
errorNotification: !1
}).then(function(e) {
c(e), s(), o.push(n.watchObject({
c(e), s(), o.push(a.watchObject({
group: "servicecatalog.k8s.io",
resource: "instances"
}, t.instance, l, c));
}, function(t) {
}, n.instance, l, c));
}, function(n) {
e.loaded = !0, e.alerts.load = {
type: "error",
message: "The service details could not be loaded.",
details: r("getErrorDetails")(t)
details: t("getErrorDetails")(n)
};
}), n.list({
}), a.list({
group: "servicecatalog.k8s.io",
resource: "serviceclasses"
}, l, function(t) {
e.serviceClasses = t.by("metadata.name"), s();
}), o.push(n.watch({
}), o.push(a.watch({
group: "servicecatalog.k8s.io",
resource: "instances"
}, l, function(t) {
e.serviceInstances = t.by("metadata.name");
})), o.push(n.watch("routes", l, function(n) {
e.routesForService = {}, angular.forEach(n.by("metadata.name"), function(n) {
"Service" === n.spec.to.kind && n.spec.to.name === t.instance && (e.routesForService[n.metadata.name] = n);
})), o.push(a.watch("routes", l, function(t) {
e.routesForService = {}, angular.forEach(t.by("metadata.name"), function(t) {
"Service" === t.spec.to.kind && t.spec.to.name === n.instance && (e.routesForService[t.metadata.name] = t);
}), i(), Logger.log("routes (subscribe)", e.routesByService);
})), e.$on("$destroy", function() {
n.unwatchAll(o);
a.unwatchAll(o);
});
}));
} ]), angular.module("openshiftConsole").controller("SecretsController", [ "$routeParams", "$scope", "DataService", "ProjectsService", function(e, t, n, a) {
Expand Down
18 changes: 7 additions & 11 deletions dist/scripts/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -12416,7 +12416,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"<div class=\"list-pf-name\">\n" +
"<h3>\n" +
"\n" +
"<a href=\"{{row.apiObject | navigateResourceURL}}\" ng-bind-html=\"row.displayName | highlightKeywords : row.state.filterKeywords\"></a>\n" +
"<a ng-href=\"{{row.apiObject | navigateResourceURL}}\" ng-bind-html=\"row.displayName | highlightKeywords : row.state.filterKeywords\"></a>\n" +
"<div ng-bind-html=\"row.apiObject.metadata.name | highlightKeywords : row.state.filterKeywords\" class=\"list-row-longname\"></div>\n" +
"</h3>\n" +
"<div class=\"status-icons\">\n" +
Expand Down Expand Up @@ -12906,26 +12906,20 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"<thead>\n" +
"<tr>\n" +
"<th>Name</th>\n" +
"<th>Bindings</th>\n" +
"<th>Status</th>\n" +
"<th>Created</th>\n" +
"<th>Web Interface Url</th>\n" +
"<th>Bindings</th>\n" +
"\n" +
"</tr>\n" +
"</thead>\n" +
"<tbody ng-if=\"(serviceInstances | hashSize) === 0\">\n" +
"<tr>\n" +
"<td colspan=\"5\"><em>{{emptyMessage}}</em></td>\n" +
"<td colspan=\"4\"><em>{{emptyMessage}}</em></td>\n" +
"</tr>\n" +
"</tbody>\n" +
"<tbody ng-if=\"(serviceInstances | hashSize) > 0\">\n" +
"<tr ng-repeat=\"serviceInstance in serviceInstances | orderObjectsByDate : true\">\n" +
"<td data-title=\"Name\"><a href=\"{{serviceInstance | navigateResourceURL}}\">{{serviceInstance | serviceInstanceDisplayName:serviceClasses}}</a></td>\n" +
"<td data-title=\"Bindings\">\n" +
"\n" +
"\n" +
"\n" +
"</td>\n" +
"<td data-title=\"Name\"><a ng-href=\"{{serviceInstance | navigateResourceURL}}\">{{serviceInstance | serviceInstanceDisplayName:serviceClasses}}</a></td>\n" +
"<td data-title=\"Status\">\n" +
"<div row class=\"status\">\n" +
"<status-icon status=\"serviceInstance | deploymentStatus\" disable-animation></status-icon>\n" +
Expand All @@ -12937,7 +12931,9 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"<td data-title=\"Created\">\n" +
"<span am-time-ago=\"serviceInstance.metadata.creationTimestamp\" am-without-suffix=\"true\"></span> ago\n" +
"</td>\n" +
"<td data-title=\"Web Interface Url\">\n" +
"<td data-title=\"Bindings\">\n" +
"\n" +
"\n" +
"\n" +
"</td>\n" +
"\n" +
Expand Down

0 comments on commit ae50d6f

Please sign in to comment.