Skip to content

Commit

Permalink
che-7246: fix fetch available RAM on workspace creation
Browse files Browse the repository at this point in the history
Signed-off-by: Anna Shumilova <ashumilo@redhat.com>
  • Loading branch information
ashumilova committed Feb 7, 2018
1 parent 307ee4f commit d5a2357
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ export class NamespaceSelectorSvc {
this.namespaceLabels = namespaces.map((namespace: che.INamespace) => {
return namespace.label;
});

return this.$q.when();
return this.fetchNamespaceInfoById(this.namespaceId);
}

return this.cheNamespaceRegistry.fetchNamespaces().then(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
.namespace-additional-info
margin-left 20px
color $label-secondary-color

.empty-namespace-label
color $warning-color
margin-bottom 10px
i
margin-right 10px
font-size 16pt
Original file line number Diff line number Diff line change
Expand Up @@ -44,24 +44,6 @@
che-filter-selector
line-height 33px;

.namespace-toggle-button button
margin 0 10px 10px 0

.namespace-button button
text-transform none !important

.namespace-additional-info
color $label-secondary-color
margin-left 10px

.empty-namespace-label
color $warning-color
margin-bottom 10px

i
margin-right 10px
font-size 16pt

span.workspace-status-text
color lighten($che-ide-background-color, 40%) !important
margin-bottom 4px
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@
che-filter-selector
line-height 33px

.namespace-toggle-button button
margin 0 10px 10px 0

.namespace-link
line-height 30px
span
Expand All @@ -61,17 +58,6 @@
outline none !important
color $che-button-gray-color

.namespace-additional-info
color $label-secondary-color
margin-left 10px

.empty-namespace-label
color $warning-color
margin-bottom 10px
i
margin-right 10px
font-size 16pt

span.workspace-status-text
color lighten($che-ide-background-color, 40%) !important
margin-bottom 4px
Expand Down
4 changes: 4 additions & 0 deletions dashboard/src/components/api/che-organizations.factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,10 @@ export class CheOrganization implements che.api.ICheOrganization {

return this.cheResourcesDistribution.fetchAvailableOrganizationResources(organization.id).then(() => {
let resource = this.cheResourcesDistribution.getOrganizationAvailableResourceByType(organization.id, this.resourceLimits.RAM);
if (resource.amount === -1) {
return 'RAM is not limited'
}

return resource ? 'Available RAM: ' + (resource.amount / 1024) + 'GB' : null;
});
});
Expand Down

0 comments on commit d5a2357

Please sign in to comment.