Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Sabi 107 #109

Merged
merged 2 commits into from
Feb 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,5 @@ Assets/Thumbs.db
/devops/docker/sabi-backend/assets/opt/*.jar
/devops/docker/captcha/assets/opt/*.jar
/devops/GenericPiMetricsEndpoint/target/
/devops/sabi_docker_sdk/grafanaData

Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@ public void init() {
// users session, it does not make sense that we to this in measureview and in report view again.
tanks = tankService.getUsersTanks(userSession.getSabiBackendToken());
knownUnits = measurementService.getAvailableMeasurementUnits(userSession.getSabiBackendToken());
if (tanks.size() == 1) {
// default selection if user has only one tank
this.selectedTankId= (tanks.get(0).getId());
}
} catch (BusinessException e) {
tanks = new ArrayList<>();
log.error(e.getLocalizedMessage());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
<p:autoUpdate/>
</p:messages>

<h:form>
<p:panelGrid columns="2" layout="grid" size="400" style="border:2;">
<h:form id="tankform">
<p:panelGrid columns="2" style="border:2;">
<p:outputLabel for="description" value="#{msg['tankview.description.l']}"/>
<p:inputText id="description"
value="#{tankListView.selectedTank.description}"
Expand Down