-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fc6edff
commit c84a94a
Showing
13 changed files
with
245 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,18 @@ | ||
import { GatewayService } from '../../../../services/keystone/types'; | ||
import { ReportOfNamespaces } from '../namespaces'; | ||
import { ReportOfProducts } from '../products'; | ||
|
||
export function has_feature_api_directory( | ||
export function has_feature_api_directory_for_product( | ||
ns: ReportOfNamespaces, | ||
product: ReportOfProducts | ||
): Boolean { | ||
return product.prod_env_active === 'Y'; | ||
} | ||
|
||
export function has_feature_api_directory_for_service( | ||
ns: ReportOfNamespaces, | ||
service: GatewayService, | ||
routeName: string | ||
): Boolean { | ||
return Boolean(service?.environment?.active); | ||
return Boolean(service.environment?.active); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
import { GatewayService } from '../../../keystone/types'; | ||
import { ReportOfNamespaces } from '../namespaces'; | ||
import { ReportOfProducts } from '../products'; | ||
|
||
export function has_feature_consumer_mgmt( | ||
ns: ReportOfNamespaces, | ||
service: GatewayService, | ||
routeName: string | ||
product: ReportOfProducts | ||
): Boolean { | ||
return ( | ||
['client-credentials', 'kong-api-key-acl'].indexOf( | ||
service.environment?.flow | ||
) >= 0 | ||
return Boolean( | ||
['client-credentials', 'kong-api-key-acl'].indexOf(product.prod_env_flow) >= | ||
0 && product.prod_env_active === 'Y' | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { GatewayService } from '../../../keystone/types'; | ||
import { ReportOfNamespaces } from '../namespaces'; | ||
import { ReportOfProducts } from '../products'; | ||
|
||
export function has_feature_dataset_in_catalog( | ||
ns: ReportOfNamespaces, | ||
product: ReportOfProducts | ||
): Boolean { | ||
return product.dataset_in_catalog; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { GatewayService } from '../../../keystone/types'; | ||
import { ReportOfNamespaces } from '../namespaces'; | ||
|
||
// If there is a Route, then can consider gateway | ||
// management being used | ||
export function has_gateway_mgmt( | ||
ns: ReportOfNamespaces, | ||
service: GatewayService, | ||
routeName: string | ||
): Boolean { | ||
return Boolean(true); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.