aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/directives/graphs-v2/relation-menu/relation-menu.html
blob: e1cdf499a085308a323c1005667d88c1b3fba7f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<div class="link-menu-open" data-tests-id="link-menu-open" data-ng-show="isLinkMenuOpen" ng-style="{left: connectRelationModel.menuPosition.x, top: connectRelationModel.menuPosition.y}" clicked-outside="{onClickedOutside: 'hideRelationMatch()', clickedOutsideEnable: 'isLinkMenuOpen'}" >
    <h4 sdc-smart-tooltip>{{relationMenuDirectiveObj.leftSideLink.componentInstance.name | resourceName}}</h4>
    <h4 sdc-smart-tooltip>{{relationMenuDirectiveObj.rightSideLink.componentInstance.name | resourceName}}</h4>

    <p>Select one of the options below to connect</p>

    <perfect-scrollbar scroll-y-margin-offset="0" include-padding="true" class="scrollbar-container">
        <div class="inner-title" data-ng-show="hasMatchesToShow(connectRelationModel.leftSideLink.requirements, connectRelationModel.rightSideLink.selectedMatch)">Requirements</div>
        <div class="link-item" data-tests-id="link-item-requirements" data-ng-repeat="(req ,matchArr) in connectRelationModel.leftSideLink.requirements"
             data-ng-click="connectRelationModel.leftSideLink.selectMatchArr(matchArr); updateSelectionText()"
             data-ng-show="showMatch(connectRelationModel.rightSideLink.selectedMatch, matchArr)"
             data-ng-class="{ 'selected': connectRelationModel.leftSideLink.selectedMatch === matchArr}">
            <div sdc-smart-tooltip>{{matchArr[0].requirement.getFullTitle()}}</div>
        </div>

        <div class="inner-title" data-ng-show="hasMatchesToShow(connectRelationModel.leftSideLink.capabilities, connectRelationModel.rightSideLink.selectedMatch)">Capabilities</div>
        <div class="link-item" data-tests-id="link-item-capabilities" data-ng-repeat="(cap, matchArr) in connectRelationModel.leftSideLink.capabilities"
             data-ng-click="connectRelationModel.leftSideLink.selectMatchArr(matchArr); updateSelectionText()"
             data-ng-show="showMatch(connectRelationModel.rightSideLink.selectedMatch, matchArr)"
             data-ng-class="{ 'selected': connectRelationModel.leftSideLink.selectedMatch === matchArr}">
            <div sdc-smart-tooltip>{{matchArr[0].capability.getFullTitle()}}</div>
        </div>
    </perfect-scrollbar>

    <perfect-scrollbar scroll-y-margin-offset="0" include-padding="true" class="scrollbar-container">
        <div class="inner-title" data-ng-show="hasMatchesToShow(connectRelationModel.rightSideLink.requirements, connectRelationModel.leftSideLink.selectedMatch)">Requirements</div>
        <div class="link-item" data-tests-id="link-item-requirements" data-ng-repeat="(req, matchArr) in connectRelationModel.rightSideLink.requirements"
             data-ng-click="connectRelationModel.rightSideLink.selectMatchArr(matchArr); updateSelectionText()"
             data-ng-show="showMatch(connectRelationModel.leftSideLink.selectedMatch, matchArr)"
             data-ng-class="{ 'selected': connectRelationModel.rightSideLink.selectedMatch === matchArr}">
            <div sdc-smart-tooltip>{{matchArr[0].secondRequirement ? matchArr[0].secondRequirement.getFullTitle() : matchArr[0].requirement.getFullTitle()}}</div>
        </div>

        <div class="inner-title" data-ng-show="hasMatchesToShow(connectRelationModel.rightSideLink.capabilities, connectRelationModel.leftSideLink.selectedMatch)">Capabilities</div>
        <div class="link-item"  data-tests-id="link-item-capabilities" data-ng-repeat="(cap, matchArr) in connectRelationModel.rightSideLink.capabilities"
             data-ng-click="connectRelationModel.rightSideLink.selectMatchArr(matchArr); updateSelectionText()"
             data-ng-show="showMatch(connectRelationModel.leftSideLink.selectedMatch, matchArr)"
             data-ng-class="{ 'selected': connectRelationModel.rightSideLink.selectedMatch === matchArr}">
            <div sdc-smart-tooltip>{{matchArr[0].capability.getFullTitle()}}</div>
        </div>
    </perfect-scrollbar>

    <div class="vl-type" data-ng-class="{'disabled': !connectRelationModel.leftSideLink.selectedMatch[0].secondRequirement || !connectRelationModel.rightSideLink.selectedMatch[0].secondRequirement}">
        <sdc-radio-button sdc-model="relationMenuDirectiveObj.vlType" value="ptp"
                          disabled="!relationMenuDirectiveObj.leftSideLink.selectedMatch[0].secondRequirement || !relationMenuDirectiveObj.rightSideLink.selectedMatch[0].secondRequirement || !relationMenuDirectiveObj.p2pVL"
                          text="Point to point" elem-id="radioPTP" elem-name="vlType"></sdc-radio-button>

        <sdc-radio-button sdc-model="relationMenuDirectiveObj.vlType" value="mptmp"
                          disabled="!relationMenuDirectiveObj.leftSideLink.selectedMatch[0].secondRequirement || !relationMenuDirectiveObj.rightSideLink.selectedMatch[0].secondRequirement || !relationMenuDirectiveObj.mp2mpVL"
                          text="Multi point" elem-id="radioMPTMP" elem-name="vlType"></sdc-radio-button>

        <span class="sprite-new info-icon" tooltips tooltip-content="You are required to choose the type of the Virtual Link."></span>
    </div>

    <div class="result" sdc-smart-tooltip>&#8203;{{relationMenuDirectiveObj.selectionText}}

    </div>

    <button class="tlv-btn grey" data-tests-id="link-menu-button-cancel" data-ng-click="hideRelationMatch()">Cancel</button>
    <button class="tlv-btn blue" data-tests-id="link-menu-button-connect" data-ng-disabled="!connectRelationModel.leftSideLink.selectedMatch || !connectRelationModel.rightSideLink.selectedMatch ||
                                                                    (connectRelationModel.leftSideLink.selectedMatch[0].secondRequirement && !connectRelationModel.vlType)"
            data-ng-click="saveRelation()">Connect</button>
</div>