Skip to content

Commit

Permalink
Add Landscape DataObject (as table)
Browse files Browse the repository at this point in the history
  • Loading branch information
mauvaisetroupe committed Nov 6, 2023
1 parent 1c7688e commit d287a51
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,7 @@ public class LandscapeView implements Serializable {
private Set<CapabilityApplicationMapping> capabilityApplicationMappings = new HashSet<>();

@ManyToMany(fetch = FetchType.LAZY, mappedBy = "landscapes")
@JsonIgnoreProperties(
value = { "components", "application", "owner", "technologies", "landscapes", "parent", "businessObject" },
allowSetters = true
)
@JsonIgnoreProperties(value = { "components", "owner", "technologies", "landscapes", "businessObject" }, allowSetters = true)
private Set<DataObject> dataObjects = new HashSet<>();

// jhipster-needle-entity-add-field - JHipster will add fields here
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public interface LandscapeViewRepository extends JpaRepository<LandscapeView, Lo
" left join fetch l.capabilityApplicationMappings cm " +
" left join fetch cm.application a " +
" left join fetch cm.capability ca " +
" left join fetch l.dataObjects do " +
" where l.id =:id"
)
Optional<LandscapeView> findOneWithEagerRelationships(@Param("id") Long id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ import FlowImportService from '@/entities/flow-import/flow-import.service';
import type { ICapability } from '@/shared/model/capability.model';
import CapabilityComponent from '@/entities/capability/component/capability.vue';
import { type IApplication } from '@/shared/model/application.model';
import BusinessAndDataObjectFullpath from '@/eadesignit/components/business-data-object-fullpath.vue';

export default defineComponent({
compatConfig: { MODE: 3 },
name: 'LandscapeViewDetails',
components: { CapabilityComponent },
components: { CapabilityComponent, BusinessAndDataObjectFullpath },
setup() {
const landscapeViewService = inject('landscapeViewService', () => new LandscapeViewService());
const alertService = inject('alertService', () => useAlertService(), true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,38 @@
></CapabilityComponent>
</div>
</b-tab>
<b-tab title="Data Objects" id="tab-dataobjects">
<div class="row">
<table class="table table-striped" aria-describedby="dataObjects">
<thead>
<tr>
<th scope="row"><span>Name</span></th>
<th scope="row"><span>Type</span></th>
<th scope="row"><span>Application</span></th>
</tr>
</thead>
<tbody>
<tr v-for="dataObject in landscapeView.dataObjects" :key="dataObject.id" data-cy="entityTable">
<td>
<BusinessAndDataObjectFullpath
:objectWithParent="dataObject"
routerView="DataObjectView"
routerParamName="dataObjectId"
/>
</td>
<td>{{ dataObject.type }}</td>
<td>
<div v-if="dataObject.application">
<router-link :to="{ name: 'ApplicationView', params: { applicationId: dataObject.application.id } }">{{
dataObject.application.name
}}</router-link>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</b-tab>
<b-tab title="DrawIO" id="tab-drawio">
<div class="row">
<div v-if="!drawIoSVG">
Expand Down

0 comments on commit d287a51

Please sign in to comment.