@@ -189,22 +189,24 @@ function getLog($logfile, $page = 1, $app = false)
189189 <?php
190190 if ($ app ) {
191191 $ proxiedApp = $ starr ->getAppFromProxiedKey ($ _POST ['key ' ], true );
192+ $ starrApp = $ starr ->getStarrInterfaceNameFromId ($ proxiedApp ['starrAppDetails ' ]['starr ' ]);
193+
192194 ?>
193195 <div class="tab-pane fade" id="endpoints" role="tabpanel">
194196 <h4>Endpoint usage <span class="text-small">(<?= count ($ endpointUsage ) ?> endpoint<?= count ($ endpointUsage ) == 1 ? '' : 's ' ?> )</span></h4>
195197 <?php
196198 foreach ($ endpointUsage as $ endpoint => $ methods ) {
197- $ isAllowedEndpoint = $ starr ->isAllowedEndpoint ($ proxiedApp ['access ' ], $ endpoint );
199+ $ isAllowedEndpoint = $ starr ->isAllowedEndpoint ($ starrApp , $ proxiedApp ['access ' ], $ endpoint );
198200 $ starrEndpoint = $ isAllowedEndpoint ['starrEndpoint ' ];
199201 $ isAllowed = $ isAllowedEndpoint ['allowed ' ];
200202
201203 foreach ($ methods as $ method => $ usage ) {
202204 $ isAllowedEndpointMethod = $ isAllowed ? $ starr ->isAllowedEndpointMethod ($ proxiedApp ['access ' ], $ starrEndpoint , $ method ) : false ;
203205
204206 ?>
205- <i id="disallowed-endpoint-<?= md5 ($ starrEndpoint .$ method ) ?> " class="far fa-times-circle text-danger" title="Disallowed endpoint, click to allow it" style="display: <?= !$ isAllowedEndpointMethod ? 'inline-block ' : 'none ' ?> ; cursor: pointer;" onclick="addEndpointAccess('<?= $ app ?> ', <?= $ proxiedApp ['proxiedAppDetails ' ]['id ' ] ?> , '<?= $ starrEndpoint ?> ', '<?= $ method ?> ', '<?= md5 ($ starrEndpoint .$ method ) ?> ')"></i>
206- <i id="allowed-endpoint-<?= md5 ($ starrEndpoint .$ method ) ?> " class="far fa-check-circle text-success" title="Allowed endpoint, click to block it" style="display: <?= $ isAllowedEndpointMethod ? 'inline-block ' : 'none ' ?> ; cursor: pointer;" onclick="removeEndpointAccess('<?= $ app ?> ', <?= $ proxiedApp ['proxiedAppDetails ' ]['id ' ] ?> , '<?= $ starrEndpoint ?> ', '<?= $ method ?> ', '<?= md5 ($ starrEndpoint .$ method ) ?> ')"></i>
207- [<?= strtoupper ($ method ) ?> ] <?= ($ starrEndpoint != $ endpoint ? $ starrEndpoint . ' → ' : '' ) . $ endpoint . ': ' . number_format ($ usage ) ?> hit<?= $ usage == 1 ? '' : 's ' ?> <br>
207+ <i id="disallowed-endpoint-<?= md5 ($ starrEndpoint .$ method ) ?> " class="far fa-times-circle text-danger" title="Disallowed endpoint, click to allow it" style="display: <?= !$ isAllowedEndpointMethod ? 'inline-block ' : 'none ' ?> ; cursor: pointer;" onclick="addEndpointAccess('<?= $ app ?> ', <?= $ proxiedApp ['proxiedAppDetails ' ]['id ' ] ?> , '<?= $ starrEndpoint ?: $ endpoint ? > ', '<?= $ method ?> ', '<?= md5 ($ starrEndpoint .$ method ) ?> ')"></i>
208+ <i id="allowed-endpoint-<?= md5 ($ starrEndpoint .$ method ) ?> " class="far fa-check-circle text-success" title="Allowed endpoint, click to block it" style="display: <?= $ isAllowedEndpointMethod ? 'inline-block ' : 'none ' ?> ; cursor: pointer;" onclick="removeEndpointAccess('<?= $ app ?> ', <?= $ proxiedApp ['proxiedAppDetails ' ]['id ' ] ?> , '<?= $ starrEndpoint ?: $ endpoint ? > ', '<?= $ method ?> ', '<?= md5 ($ starrEndpoint .$ method ) ?> ')"></i>
209+ [<?= strtoupper ($ method ) ?> ] <?= ($ starrEndpoint && $ starrEndpoint != $ endpoint ? $ starrEndpoint . ' → ' : '' ) . $ endpoint . ': ' . number_format ($ usage ) ?> hit<?= $ usage == 1 ? '' : 's ' ?> <br>
208210 <?php
209211 }
210212 }
0 commit comments