Skip to content

Commit

Permalink
Revert "Reserved resources available again after reloading CasC confi…
Browse files Browse the repository at this point in the history
…guration…" (#711)

This reverts commit 99ca947.
  • Loading branch information
mPokornyETM authored Sep 25, 2024
1 parent 202eb3b commit 4ea8e51
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 10 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ unclassified:
- name: "S7_1200_1"
description: "S7 PLC model 1200"
labels: "plc:S7 model:1200"
reservedBy: "Reserved due maintenance window"
- name: "S7_1200_2"
labels: "plc:S7 model:1200"
- name: "Resource-with-properties"
Expand All @@ -313,7 +314,7 @@ unclassified:
value: "Value"
```
Properties *description*, *labels* and *properties* are optional.
Properties *description*, *labels* and *reservedBy* are optional.
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ public class LockableResource extends AbstractDescribableImpl<LockableResource>
private transient String labels = null;

private List<String> labelsAsList = new ArrayList<>();
private transient String reservedBy = null;
private transient Date reservedTimestamp = null;
private String reservedBy = null;
private Date reservedTimestamp = null;
private String note = "";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
<f:entry title="${%entry.labels.title}" field="labels">
<f:textbox/>
</f:entry>
<f:entry title="${%entry.reservedBy.title}" field="reservedBy">
<f:textbox/>
</f:entry>
<f:entry title="${%entry.properties.title}">
<f:repeatableProperty field="properties" header="" minimum="0" add="${%entry.properties.add}">
<f:block>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
entry.name.title=Name
entry.description.title=Description
entry.labels.title=Labels
entry.reservedBy.title=Reserved by
entry.properties.title=Properties
entry.properties.add=Add Property
entry.properties.delete=Delete Property
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@

entry.name.title=Jm\u00e9no
entry.description.title=Popis
entry.labels.title=Popisky
entry.labels.title=Popisky
entry.reservedBy.title=Rezervace u\u017eivatelem
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@

entry.name.title=Name
entry.description.title=Beschreibung
entry.labels.title=Labels
entry.labels.title=Labels
entry.reservedBy.title=Reserviert durch
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
entry.name.title=Nom
entry.description.title=Description
entry.labels.title=Libell\u00e9s
entry.reservedBy.title=R\u00e9serv\u00e9e par
entry.properties.title=Propri\u00e9t\u00e9s
entry.properties.add=Ajouter une propri\u00e9t\u00e9
entry.properties.delete=Supprimer une propri\u00e9t\u00e9
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@

entry.name.title=Meno
entry.description.title=Popis
entry.labels.title=\u0160t\u00edtky
entry.labels.title=\u0160t\u00edtky
entry.reservedBy.title=Rezervovan\u00e9 u\u017e\u00edvate\u013eom
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ public void should_support_configuration_as_code() {
assertEquals("Resource_A", declaredResource.getName());
assertEquals("Description_A", declaredResource.getDescription());
assertEquals("Label_A", declaredResource.getLabels());
// not supported in JCaC
// assertEquals("Reserved_A", declaredResource.getReservedBy());
assertEquals("Reserved_A", declaredResource.getReservedBy());
assertEquals("Note A", declaredResource.getNote());

assertEquals(
Expand All @@ -55,8 +54,7 @@ public void should_support_configuration_as_code() {
assertEquals("Resource_A", resource.getName());
assertEquals("Description_A", resource.getDescription());
assertEquals("Label_A", resource.getLabels());
// not supported in JCaC
// assertEquals("Reserved_A", resource.getReservedBy());
assertEquals("Reserved_A", resource.getReservedBy());
assertEquals("Note A", resource.getNote());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ declaredResources:
labels: "Label_A"
name: "Resource_A"
note: "Note A"
reservedBy: "Reserved_A"
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ unclassified:
- description: "Description_A"
labels: "Label_A"
name: "Resource_A"
reservedBy: "Reserved_A"
note: "Note A"

0 comments on commit 4ea8e51

Please sign in to comment.