From 50ed8ee46876652c27deff13ebb7591d02537fbb Mon Sep 17 00:00:00 2001 From: SmitGala Date: Mon, 16 Sep 2024 10:26:10 +0530 Subject: [PATCH] Storeknox: Discovery Page UI --- app/components/ak-svg/info-indicator.hbs | 20 + app/components/ak-svg/no-pending-items.hbs | 90 + app/components/ak-svg/sm-indicator.hbs | 20 + .../ak-svg/storeknox-playstore-logo.hbs | 105 + .../ak-svg/storeknox-search-apps.hbs | 100 + app/components/ak-svg/vapt-indicator.hbs | 20 + .../ak-svg/welcome-to-storeknox.hbs | 2013 +++++++++++++++++ app/components/storeknox/discover/index.hbs | 46 + app/components/storeknox/discover/index.scss | 13 + app/components/storeknox/discover/index.ts | 52 + .../discover/pending-review/empty/index.hbs | 12 + .../discover/pending-review/empty/index.scss | 13 + .../discover/pending-review/empty/index.ts | 9 + .../discover/pending-review/index.hbs | 53 + .../discover/pending-review/index.scss | 27 + .../discover/pending-review/index.ts | 105 + .../table/availability-header/index.hbs | 83 + .../table/availability-header/index.scss | 41 + .../table/availability-header/index.ts | 72 + .../table/availability/index.hbs | 18 + .../table/found-by-header/index.hbs | 61 + .../table/found-by-header/index.scss | 26 + .../table/found-by-header/index.ts | 68 + .../pending-review/table/found-by/index.hbs | 24 + .../pending-review/table/found-by/index.scss | 7 + .../discover/pending-review/table/index.hbs | 51 + .../discover/pending-review/table/index.ts | 67 + .../pending-review/table/status/index.hbs | 43 + .../pending-review/table/status/index.scss | 5 + .../discover/requested-apps/index.hbs | 1 + .../discover/requested-apps/index.ts | 9 + .../discover/requested-apps/table/index.hbs | 51 + .../discover/requested-apps/table/index.ts | 120 + .../requested-apps/table/status/index.hbs | 69 + .../requested-apps/table/status/index.scss | 5 + .../discover/results/empty/index.hbs | 12 + .../discover/results/empty/index.scss | 13 + .../storeknox/discover/results/empty/index.ts | 9 + .../storeknox/discover/results/index.hbs | 36 + .../storeknox/discover/results/index.scss | 8 + .../storeknox/discover/results/index.ts | 26 + .../results/table/action-header/index.hbs | 18 + .../results/table/action-header/index.scss | 6 + .../discover/results/table/action/index.hbs | 47 + .../discover/results/table/action/index.scss | 26 + .../discover/results/table/action/index.ts | 26 + .../discover/results/table/index.hbs | 90 + .../discover/results/table/index.scss | 10 + .../storeknox/discover/results/table/index.ts | 137 ++ .../discover/welcome-modal/index.hbs | 49 + .../discover/welcome-modal/index.scss | 12 + .../storeknox/discover/welcome-modal/index.ts | 9 + app/components/storeknox/index.hbs | 3 + app/components/storeknox/index.scss | 3 + app/components/storeknox/index.ts | 9 + app/components/storeknox/indicator/index.hbs | 21 + app/components/storeknox/indicator/index.scss | 7 + app/components/storeknox/indicator/index.ts | 9 + .../storeknox/review-logs/index.hbs | 33 + .../storeknox/review-logs/index.scss | 10 + app/components/storeknox/review-logs/index.ts | 88 + .../table-columns/application/index.hbs | 32 + .../table-columns/checkbox-header/index.hbs | 1 + .../table-columns/checkbox/index.hbs | 1 + .../table-columns/developer/index.hbs | 27 + .../storeknox/table-columns/index.ts | 9 + .../table-columns/store-header/index.hbs | 59 + .../table-columns/store-header/index.scss | 24 + .../table-columns/store-header/index.ts | 70 + .../storeknox/table-columns/store/index.hbs | 7 + app/router.ts | 10 + app/styles/_component-variables.scss | 139 +- app/styles/_icons.scss | 8 + app/templates/authenticated/storeknox.hbs | 3 + .../authenticated/storeknox/discover.hbs | 5 + .../storeknox/discover/requested.hbs | 3 + .../storeknox/discover/result.hbs | 3 + .../storeknox/discover/review.hbs | 3 + .../authenticated/storeknox/review-logs.hbs | 3 + translations/en.json | 36 + translations/ja.json | 36 + types/ak-svg.d.ts | 7 + 82 files changed, 4711 insertions(+), 11 deletions(-) create mode 100644 app/components/ak-svg/info-indicator.hbs create mode 100644 app/components/ak-svg/no-pending-items.hbs create mode 100644 app/components/ak-svg/sm-indicator.hbs create mode 100644 app/components/ak-svg/storeknox-playstore-logo.hbs create mode 100644 app/components/ak-svg/storeknox-search-apps.hbs create mode 100644 app/components/ak-svg/vapt-indicator.hbs create mode 100644 app/components/ak-svg/welcome-to-storeknox.hbs create mode 100644 app/components/storeknox/discover/index.hbs create mode 100644 app/components/storeknox/discover/index.scss create mode 100644 app/components/storeknox/discover/index.ts create mode 100644 app/components/storeknox/discover/pending-review/empty/index.hbs create mode 100644 app/components/storeknox/discover/pending-review/empty/index.scss create mode 100644 app/components/storeknox/discover/pending-review/empty/index.ts create mode 100644 app/components/storeknox/discover/pending-review/index.hbs create mode 100644 app/components/storeknox/discover/pending-review/index.scss create mode 100644 app/components/storeknox/discover/pending-review/index.ts create mode 100644 app/components/storeknox/discover/pending-review/table/availability-header/index.hbs create mode 100644 app/components/storeknox/discover/pending-review/table/availability-header/index.scss create mode 100644 app/components/storeknox/discover/pending-review/table/availability-header/index.ts create mode 100644 app/components/storeknox/discover/pending-review/table/availability/index.hbs create mode 100644 app/components/storeknox/discover/pending-review/table/found-by-header/index.hbs create mode 100644 app/components/storeknox/discover/pending-review/table/found-by-header/index.scss create mode 100644 app/components/storeknox/discover/pending-review/table/found-by-header/index.ts create mode 100644 app/components/storeknox/discover/pending-review/table/found-by/index.hbs create mode 100644 app/components/storeknox/discover/pending-review/table/found-by/index.scss create mode 100644 app/components/storeknox/discover/pending-review/table/index.hbs create mode 100644 app/components/storeknox/discover/pending-review/table/index.ts create mode 100644 app/components/storeknox/discover/pending-review/table/status/index.hbs create mode 100644 app/components/storeknox/discover/pending-review/table/status/index.scss create mode 100644 app/components/storeknox/discover/requested-apps/index.hbs create mode 100644 app/components/storeknox/discover/requested-apps/index.ts create mode 100644 app/components/storeknox/discover/requested-apps/table/index.hbs create mode 100644 app/components/storeknox/discover/requested-apps/table/index.ts create mode 100644 app/components/storeknox/discover/requested-apps/table/status/index.hbs create mode 100644 app/components/storeknox/discover/requested-apps/table/status/index.scss create mode 100644 app/components/storeknox/discover/results/empty/index.hbs create mode 100644 app/components/storeknox/discover/results/empty/index.scss create mode 100644 app/components/storeknox/discover/results/empty/index.ts create mode 100644 app/components/storeknox/discover/results/index.hbs create mode 100644 app/components/storeknox/discover/results/index.scss create mode 100644 app/components/storeknox/discover/results/index.ts create mode 100644 app/components/storeknox/discover/results/table/action-header/index.hbs create mode 100644 app/components/storeknox/discover/results/table/action-header/index.scss create mode 100644 app/components/storeknox/discover/results/table/action/index.hbs create mode 100644 app/components/storeknox/discover/results/table/action/index.scss create mode 100644 app/components/storeknox/discover/results/table/action/index.ts create mode 100644 app/components/storeknox/discover/results/table/index.hbs create mode 100644 app/components/storeknox/discover/results/table/index.scss create mode 100644 app/components/storeknox/discover/results/table/index.ts create mode 100644 app/components/storeknox/discover/welcome-modal/index.hbs create mode 100644 app/components/storeknox/discover/welcome-modal/index.scss create mode 100644 app/components/storeknox/discover/welcome-modal/index.ts create mode 100644 app/components/storeknox/index.hbs create mode 100644 app/components/storeknox/index.scss create mode 100644 app/components/storeknox/index.ts create mode 100644 app/components/storeknox/indicator/index.hbs create mode 100644 app/components/storeknox/indicator/index.scss create mode 100644 app/components/storeknox/indicator/index.ts create mode 100644 app/components/storeknox/review-logs/index.hbs create mode 100644 app/components/storeknox/review-logs/index.scss create mode 100644 app/components/storeknox/review-logs/index.ts create mode 100644 app/components/storeknox/table-columns/application/index.hbs create mode 100644 app/components/storeknox/table-columns/checkbox-header/index.hbs create mode 100644 app/components/storeknox/table-columns/checkbox/index.hbs create mode 100644 app/components/storeknox/table-columns/developer/index.hbs create mode 100644 app/components/storeknox/table-columns/index.ts create mode 100644 app/components/storeknox/table-columns/store-header/index.hbs create mode 100644 app/components/storeknox/table-columns/store-header/index.scss create mode 100644 app/components/storeknox/table-columns/store-header/index.ts create mode 100644 app/components/storeknox/table-columns/store/index.hbs create mode 100644 app/templates/authenticated/storeknox.hbs create mode 100644 app/templates/authenticated/storeknox/discover.hbs create mode 100644 app/templates/authenticated/storeknox/discover/requested.hbs create mode 100644 app/templates/authenticated/storeknox/discover/result.hbs create mode 100644 app/templates/authenticated/storeknox/discover/review.hbs create mode 100644 app/templates/authenticated/storeknox/review-logs.hbs diff --git a/app/components/ak-svg/info-indicator.hbs b/app/components/ak-svg/info-indicator.hbs new file mode 100644 index 000000000..6a369112f --- /dev/null +++ b/app/components/ak-svg/info-indicator.hbs @@ -0,0 +1,20 @@ + + + + \ No newline at end of file diff --git a/app/components/ak-svg/no-pending-items.hbs b/app/components/ak-svg/no-pending-items.hbs new file mode 100644 index 000000000..3dd0ec7ce --- /dev/null +++ b/app/components/ak-svg/no-pending-items.hbs @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/components/ak-svg/sm-indicator.hbs b/app/components/ak-svg/sm-indicator.hbs new file mode 100644 index 000000000..ff02360c7 --- /dev/null +++ b/app/components/ak-svg/sm-indicator.hbs @@ -0,0 +1,20 @@ + + + + \ No newline at end of file diff --git a/app/components/ak-svg/storeknox-playstore-logo.hbs b/app/components/ak-svg/storeknox-playstore-logo.hbs new file mode 100644 index 000000000..a4aeb556f --- /dev/null +++ b/app/components/ak-svg/storeknox-playstore-logo.hbs @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/components/ak-svg/storeknox-search-apps.hbs b/app/components/ak-svg/storeknox-search-apps.hbs new file mode 100644 index 000000000..c45edbffd --- /dev/null +++ b/app/components/ak-svg/storeknox-search-apps.hbs @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/components/ak-svg/vapt-indicator.hbs b/app/components/ak-svg/vapt-indicator.hbs new file mode 100644 index 000000000..51faaf94f --- /dev/null +++ b/app/components/ak-svg/vapt-indicator.hbs @@ -0,0 +1,20 @@ + + + + \ No newline at end of file diff --git a/app/components/ak-svg/welcome-to-storeknox.hbs b/app/components/ak-svg/welcome-to-storeknox.hbs new file mode 100644 index 000000000..f22c8dddd --- /dev/null +++ b/app/components/ak-svg/welcome-to-storeknox.hbs @@ -0,0 +1,2013 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/components/storeknox/discover/index.hbs b/app/components/storeknox/discover/index.hbs new file mode 100644 index 000000000..7b0a3cc6e --- /dev/null +++ b/app/components/storeknox/discover/index.hbs @@ -0,0 +1,46 @@ + + + + + + + {{t 'storeknox.discoverHeader'}} + + + + {{t 'storeknox.discoverDescription'}} + + + + + {{#each this.tabItems as |item|}} + + {{item.label}} + + {{/each}} + + +{{#if this.showWelcomeModal}} + + + +{{/if}} \ No newline at end of file diff --git a/app/components/storeknox/discover/index.scss b/app/components/storeknox/discover/index.scss new file mode 100644 index 000000000..b64685821 --- /dev/null +++ b/app/components/storeknox/discover/index.scss @@ -0,0 +1,13 @@ +.header-storeknox-discover-page { + margin: 0.714em 0; + border: 1px solid var(--storeknox-discover-header-border-color); + padding: 1.428em; +} + +.description-storeknox-discover-page { + color: var(--storeknox-discover-header-description-color); +} + +.discover-tabs { + margin-bottom: 1.428em; +} diff --git a/app/components/storeknox/discover/index.ts b/app/components/storeknox/discover/index.ts new file mode 100644 index 000000000..67b1a5085 --- /dev/null +++ b/app/components/storeknox/discover/index.ts @@ -0,0 +1,52 @@ +import Component from '@glimmer/component'; +import { inject as service } from '@ember/service'; +import IntlService from 'ember-intl/services/intl'; +import MeService from 'irene/services/me'; +import { tracked } from '@glimmer/tracking'; +import { action } from '@ember/object'; + +export default class StoreknoxDiscoverComponent extends Component { + @service declare intl: IntlService; + @service declare me: MeService; + + @tracked showWelcomeModal = true; + + constructor(owner: unknown, args: object) { + super(owner, args); + + if (!this.me.org?.is_admin) { + this.showWelcomeModal = false; + } + } + + get tabItems() { + return [ + { + id: 'discovery-results', + route: 'authenticated.storeknox.discover.result', + label: this.intl.t('storeknox.discoveryResults'), + }, + this.me.org?.is_admin + ? { + id: 'pending-review', + route: 'authenticated.storeknox.discover.review', + label: this.intl.t('storeknox.pendingReview'), + } + : { + id: 'requested-apps', + route: 'authenticated.storeknox.discover.requested', + label: this.intl.t('storeknox.requestedApps'), + }, + ].filter(Boolean); + } + + @action closeWelcomeModal() { + this.showWelcomeModal = false; + } +} + +declare module '@glint/environment-ember-loose/registry' { + export default interface Registry { + 'Storeknox::Discover': typeof StoreknoxDiscoverComponent; + } +} diff --git a/app/components/storeknox/discover/pending-review/empty/index.hbs b/app/components/storeknox/discover/pending-review/empty/index.hbs new file mode 100644 index 000000000..7c859ce1a --- /dev/null +++ b/app/components/storeknox/discover/pending-review/empty/index.hbs @@ -0,0 +1,12 @@ + + + + + + {{t 'storeknox.noPendingItems'}} + + + + {{t 'storeknox.noPendingItemsDescription'}} + + \ No newline at end of file diff --git a/app/components/storeknox/discover/pending-review/empty/index.scss b/app/components/storeknox/discover/pending-review/empty/index.scss new file mode 100644 index 000000000..da3257899 --- /dev/null +++ b/app/components/storeknox/discover/pending-review/empty/index.scss @@ -0,0 +1,13 @@ +.empty-container { + margin-top: 5em; + margin-bottom: 5em; + + .header { + margin-top: 1.5625em; + } + + .body-text { + text-align: center; + max-width: 25em; + } +} diff --git a/app/components/storeknox/discover/pending-review/empty/index.ts b/app/components/storeknox/discover/pending-review/empty/index.ts new file mode 100644 index 000000000..27f3746e0 --- /dev/null +++ b/app/components/storeknox/discover/pending-review/empty/index.ts @@ -0,0 +1,9 @@ +import Component from '@glimmer/component'; + +export default class StoreknoxDiscoverPendingReviewEmptyComponent extends Component {} + +declare module '@glint/environment-ember-loose/registry' { + export default interface Registry { + 'Storeknox::Discover::PendingReview::Empty': typeof StoreknoxDiscoverPendingReviewEmptyComponent; + } +} diff --git a/app/components/storeknox/discover/pending-review/index.hbs b/app/components/storeknox/discover/pending-review/index.hbs new file mode 100644 index 000000000..5b69a619e --- /dev/null +++ b/app/components/storeknox/discover/pending-review/index.hbs @@ -0,0 +1,53 @@ + +
+ + <:rightAdornment> + + + +
+ + + + <:leftIcon> + + + + <:default> + {{t 'approve'}} + + + + + <:leftIcon> + + + + <:default> + {{t 'reject'}} + + + + + + + + {{t 'storeknox.logs'}} + + + +
+ +{{#if this.pendingItems}} + +{{else}} + +{{/if}} \ No newline at end of file diff --git a/app/components/storeknox/discover/pending-review/index.scss b/app/components/storeknox/discover/pending-review/index.scss new file mode 100644 index 000000000..d0fde90fe --- /dev/null +++ b/app/components/storeknox/discover/pending-review/index.scss @@ -0,0 +1,27 @@ +.review-header { + border: 1px solid var(--storeknox-discover-pending-review-header-border-color); + padding: 1em; +} + +.approve-button { + width: 7.714em; + background-color: var( + --storeknox-discover-pending-review-approve-button-color + ) !important; +} + +.reject-button { + width: 7.714em; + background-color: var( + --storeknox-discover-pending-review-reject-button-color + ) !important; +} + +.divider { + width: 1px; + height: 40px; + background-color: var( + --storeknox-discover-pending-review-header-divider-background-color + ); + margin: 0 0.35em; +} diff --git a/app/components/storeknox/discover/pending-review/index.ts b/app/components/storeknox/discover/pending-review/index.ts new file mode 100644 index 000000000..55e53eda1 --- /dev/null +++ b/app/components/storeknox/discover/pending-review/index.ts @@ -0,0 +1,105 @@ +import Component from '@glimmer/component'; +import { tracked } from '@glimmer/tracking'; +import { action } from '@ember/object'; +import { inject as service } from '@ember/service'; +import IntlService from 'ember-intl/services/intl'; + +export default class StoreknoxDiscoverPendingReviewComponent extends Component { + @service declare intl: IntlService; + + @tracked searchQuery = ''; + @tracked discoverClicked = false; + @tracked pendingItems = true; + + @action + discoverApp() { + this.searchQuery = 'Shell Test'; + this.discoverClicked = true; + } + + @action + clearSearch() { + this.searchQuery = ''; + this.discoverClicked = false; + } + + get columns() { + return [ + { + headerComponent: 'storeknox/table-columns/checkbox-header', + cellComponent: 'storeknox/table-columns/checkbox', + minWidth: 10, + width: 10, + textAlign: 'center', + }, + { + headerComponent: 'storeknox/table-columns/store-header', + cellComponent: 'storeknox/table-columns/store', + minWidth: 50, + width: 50, + textAlign: 'center', + }, + { + name: this.intl.t('application'), + cellComponent: 'storeknox/table-columns/application', + width: 200, + }, + { + headerComponent: + 'storeknox/discover/pending-review/table/found-by-header', + cellComponent: 'storeknox/discover/pending-review/table/found-by', + }, + { + headerComponent: + 'storeknox/discover/pending-review/table/availability-header', + cellComponent: 'storeknox/discover/pending-review/table/availability', + textAlign: 'center', + }, + { + name: this.intl.t('status'), + cellComponent: 'storeknox/discover/pending-review/table/status', + textAlign: 'center', + width: 80, + }, + ]; + } + + get reviewApps() { + return [ + { + isAndroid: true, + iconUrl: + 'https://appknox-production-public.s3.amazonaws.com/908e507e-1148-4f4d-9939-6dba3d645abc.png', + name: 'Shell Asia', + packageName: 'com.shellasia.android', + foundBy: 'Auto Discovery', + available: 'VAPT', + }, + { + isIos: true, + iconUrl: + 'https://appknox-production-public.s3.amazonaws.com/908e507e-1148-4f4d-9939-6dba3d645abc.png', + name: 'Shell Recharge India', + packageName: 'com.shellrecharge.india', + foundBy: 'Manual Discovery', + mailId: 'smit@appknox.com', + available: null, + }, + { + isAndroid: true, + iconUrl: + 'https://appknox-production-public.s3.amazonaws.com/908e507e-1148-4f4d-9939-6dba3d645abc.png', + name: 'Shell Mobility Site Manager', + packageName: 'com.shellmobility.ios', + foundBy: 'Auto Discovery', + available: 'SM', + }, + ]; + } +} + +declare module '@glint/environment-ember-loose/registry' { + export default interface Registry { + 'Storeknox::Discover::PendingReview': typeof StoreknoxDiscoverPendingReviewComponent; + } +} diff --git a/app/components/storeknox/discover/pending-review/table/availability-header/index.hbs b/app/components/storeknox/discover/pending-review/table/availability-header/index.hbs new file mode 100644 index 000000000..83d993366 --- /dev/null +++ b/app/components/storeknox/discover/pending-review/table/availability-header/index.hbs @@ -0,0 +1,83 @@ + + {{t 'storeknox.availability'}} + + + <:tooltipContent> +
+ + + + + {{t 'storeknox.info'}} + + + + + {{t 'storeknox.availableColumnInfo' htmlSafe=true}} + +
+ + + <:default> + + +
+ + +
+ + + + + {{t 'filterBy'}} + + + {{#each this.availabilityObject as |availability|}} + + + {{#if (eq this.selectedAvailability availability.value)}} + + {{else}} + + {{/if}} + + + {{availability.key}} + + {{/each}} + + {{#if this.filterApplied}} + + + {{t 'clearFilter'}} + + + {{/if}} + + \ No newline at end of file diff --git a/app/components/storeknox/discover/pending-review/table/availability-header/index.scss b/app/components/storeknox/discover/pending-review/table/availability-header/index.scss new file mode 100644 index 000000000..f88405b3b --- /dev/null +++ b/app/components/storeknox/discover/pending-review/table/availability-header/index.scss @@ -0,0 +1,41 @@ +.info-icon { + font-size: 1em !important; + height: 0.857em; + color: var( + --storeknox-discover-pending-review-table-availability-header-info-icon-color + ); +} + +.tooltip-content { + width: 17.857em; + padding: 0.5em; + box-sizing: border-box; + white-space: normal; +} + +.availability-filter { + width: 12.5em; + background-color: var( + --storeknox-discover-pending-review-table-availability-filter-background-color + ); + box-shadow: var( + --storeknox-discover-pending-review-table-availability-filter-box-shadow + ); + border-radius: 3px; + + .filter-option:hover { + background-color: var( + --storeknox-discover-pending-review-table-availability-filter-option-hover-background-color + ); + } + + .clear-filter-section { + background-color: var( + --storeknox-discover-pending-review-table-availability-filter-option-clear-filter-background-color + ); + } +} + +.cursor-pointer { + cursor: pointer; +} diff --git a/app/components/storeknox/discover/pending-review/table/availability-header/index.ts b/app/components/storeknox/discover/pending-review/table/availability-header/index.ts new file mode 100644 index 000000000..4375351f6 --- /dev/null +++ b/app/components/storeknox/discover/pending-review/table/availability-header/index.ts @@ -0,0 +1,72 @@ +import Component from '@glimmer/component'; +import { action } from '@ember/object'; +import { tracked } from '@glimmer/tracking'; +import { inject as service } from '@ember/service'; +import IntlService from 'ember-intl/services/intl'; + +export default class StoreknoxDiscoverPendingReviewTableAvailabilityHeaderComponent extends Component { + @service declare intl: IntlService; + + @tracked anchorRef: HTMLElement | null = null; + @tracked selectedAvailability: number = -1; + @tracked filterApplied: boolean = false; + + @action + handleClick(event: FocusEvent) { + this.anchorRef = event.currentTarget as HTMLElement; + } + + @action + handleOptionsClose() { + this.anchorRef = null; + } + + @action + selectAvailability(value: number) { + this.selectedAvailability = value; + + if (value > -1) { + this.filterApplied = true; + } else { + this.filterApplied = false; + } + + this.anchorRef = null; + } + + @action + clearFilter() { + this.selectedAvailability = -1; + + this.filterApplied = false; + + this.anchorRef = null; + } + + get availabilityObject() { + return [ + { + key: this.intl.t('all'), + value: -1, + }, + { + key: this.intl.t('storeknox.vapt'), + value: 0, + }, + { + key: this.intl.t('appMonitoring'), + value: 1, + }, + { + key: this.intl.t('none'), + value: 2, + }, + ]; + } +} + +declare module '@glint/environment-ember-loose/registry' { + export default interface Registry { + 'Storeknox::Discover::PendingReview::Table::AvailabilityHeader': typeof StoreknoxDiscoverPendingReviewTableAvailabilityHeaderComponent; + } +} diff --git a/app/components/storeknox/discover/pending-review/table/availability/index.hbs b/app/components/storeknox/discover/pending-review/table/availability/index.hbs new file mode 100644 index 000000000..7144c74a4 --- /dev/null +++ b/app/components/storeknox/discover/pending-review/table/availability/index.hbs @@ -0,0 +1,18 @@ +{{#if @data.available}} + {{#if (eq @data.available 'VAPT')}} + + {{else}} + + {{/if}} +{{else}} + +{{/if}} \ No newline at end of file diff --git a/app/components/storeknox/discover/pending-review/table/found-by-header/index.hbs b/app/components/storeknox/discover/pending-review/table/found-by-header/index.hbs new file mode 100644 index 000000000..ffc12240c --- /dev/null +++ b/app/components/storeknox/discover/pending-review/table/found-by-header/index.hbs @@ -0,0 +1,61 @@ + + {{t 'storeknox.foundBy'}} + + + + + + + + {{t 'filterBy'}} + + + {{#each this.discoveryObject as |discovery|}} + + + {{#if (eq this.selectedDiscovery discovery.value)}} + + {{else}} + + {{/if}} + + + {{discovery.key}} + + {{/each}} + + {{#if this.filterApplied}} + + + {{t 'clearFilter'}} + + + {{/if}} + + \ No newline at end of file diff --git a/app/components/storeknox/discover/pending-review/table/found-by-header/index.scss b/app/components/storeknox/discover/pending-review/table/found-by-header/index.scss new file mode 100644 index 000000000..8776077ea --- /dev/null +++ b/app/components/storeknox/discover/pending-review/table/found-by-header/index.scss @@ -0,0 +1,26 @@ +.found-by-filter { + width: 12.5em; + background-color: var( + --storeknox-discover-pending-review-table-found-by-filter-background-color + ); + box-shadow: var( + --storeknox-discover-pending-review-table-found-by-filter-box-shadow + ); + border-radius: 3px; + + .filter-option:hover { + background-color: var( + --storeknox-discover-pending-review-table-found-by-filter-option-hover-background-color + ); + } + + .clear-filter-section { + background-color: var( + --storeknox-discover-pending-review-table-found-by-filter-option-clear-filter-background-color + ); + } +} + +.cursor-pointer { + cursor: pointer; +} diff --git a/app/components/storeknox/discover/pending-review/table/found-by-header/index.ts b/app/components/storeknox/discover/pending-review/table/found-by-header/index.ts new file mode 100644 index 000000000..fabc2ea64 --- /dev/null +++ b/app/components/storeknox/discover/pending-review/table/found-by-header/index.ts @@ -0,0 +1,68 @@ +import Component from '@glimmer/component'; +import { action } from '@ember/object'; +import { tracked } from '@glimmer/tracking'; +import { inject as service } from '@ember/service'; +import IntlService from 'ember-intl/services/intl'; + +export default class StoreknoxDiscoverPendingReviewTableFoundByHeaderComponent extends Component { + @service declare intl: IntlService; + + @tracked anchorRef: HTMLElement | null = null; + @tracked selectedDiscovery: number = -1; + @tracked filterApplied: boolean = false; + + @action + handleClick(event: FocusEvent) { + this.anchorRef = event.currentTarget as HTMLElement; + } + + @action + handleOptionsClose() { + this.anchorRef = null; + } + + @action + selectDiscovery(value: number) { + this.selectedDiscovery = value; + + if (value > -1) { + this.filterApplied = true; + } else { + this.filterApplied = false; + } + + this.anchorRef = null; + } + + @action + clearFilter() { + this.selectedDiscovery = -1; + + this.filterApplied = false; + + this.anchorRef = null; + } + + get discoveryObject() { + return [ + { + key: this.intl.t('all'), + value: -1, + }, + { + key: this.intl.t('storeknox.autoDiscovery'), + value: 0, + }, + { + key: this.intl.t('storeknox.manualDiscovery'), + value: 1, + }, + ]; + } +} + +declare module '@glint/environment-ember-loose/registry' { + export default interface Registry { + 'Storeknox::Discover::PendingReview::Table::FoundByHeader': typeof StoreknoxDiscoverPendingReviewTableFoundByHeaderComponent; + } +} diff --git a/app/components/storeknox/discover/pending-review/table/found-by/index.hbs b/app/components/storeknox/discover/pending-review/table/found-by/index.hbs new file mode 100644 index 000000000..f8d0c9005 --- /dev/null +++ b/app/components/storeknox/discover/pending-review/table/found-by/index.hbs @@ -0,0 +1,24 @@ + + + {{@data.foundBy}} + + + {{#if @data.mailId}} + + <:tooltipContent> + + + + + {{@data.mailId}} + + + + + <:default> + + + + + {{/if}} + \ No newline at end of file diff --git a/app/components/storeknox/discover/pending-review/table/found-by/index.scss b/app/components/storeknox/discover/pending-review/table/found-by/index.scss new file mode 100644 index 000000000..056fda764 --- /dev/null +++ b/app/components/storeknox/discover/pending-review/table/found-by/index.scss @@ -0,0 +1,7 @@ +.info-icon { + font-size: 1em !important; + height: 12px; + color: var( + --storeknox-discover-pending-review-table-found-by-info-icon-color + ); +} diff --git a/app/components/storeknox/discover/pending-review/table/index.hbs b/app/components/storeknox/discover/pending-review/table/index.hbs new file mode 100644 index 000000000..aba55e58a --- /dev/null +++ b/app/components/storeknox/discover/pending-review/table/index.hbs @@ -0,0 +1,51 @@ + + + + + + {{#if column.headerComponent}} + {{#let (component column.headerComponent) as |Component|}} + + {{/let}} + {{else}} + {{column.name}} + {{/if}} + + + + + + + {{#let (component r.columnValue.cellComponent) as |Component|}} + + {{/let}} + + + + + + + \ No newline at end of file diff --git a/app/components/storeknox/discover/pending-review/table/index.ts b/app/components/storeknox/discover/pending-review/table/index.ts new file mode 100644 index 000000000..1e36762b3 --- /dev/null +++ b/app/components/storeknox/discover/pending-review/table/index.ts @@ -0,0 +1,67 @@ +import Component from '@glimmer/component'; +import { action } from '@ember/object'; +import { inject as service } from '@ember/service'; +import RouterService from '@ember/routing/router-service'; + +interface LimitOffset { + limit: number; + offset: number; +} + +export interface StoreknoxDiscoverPendingReviewTableSignature { + Args: { + data: any; + router: string; + }; +} + +export default class StoreknoxDiscoverPendingReviewTableComponent extends Component { + @service declare router: RouterService; + + get reviewApps() { + return this.args?.data; + } + + // Table Actions + @action goToPage(args: LimitOffset) { + const { limit, offset } = args; + this.router.transitionTo(this.args.router, { + queryParams: { app_limit: limit, app_offset: offset }, + }); + } + + @action onItemPerPageChange(args: LimitOffset) { + const { limit } = args; + const offset = 0; + + this.router.transitionTo(this.args.router, { + queryParams: { app_limit: limit, app_offset: offset }, + }); + } + + get totalCount() { + return this.reviewApps.length || 0; + } + + get tableData() { + return this.reviewApps; + } + + get itemPerPageOptions() { + return [10, 25, 50]; + } + + get limit() { + return 10; + } + + get offset() { + return 0; + } +} + +declare module '@glint/environment-ember-loose/registry' { + export default interface Registry { + 'Storeknox::Discover::PendingReview::Table': typeof StoreknoxDiscoverPendingReviewTableComponent; + } +} diff --git a/app/components/storeknox/discover/pending-review/table/status/index.hbs b/app/components/storeknox/discover/pending-review/table/status/index.hbs new file mode 100644 index 000000000..2916aa45b --- /dev/null +++ b/app/components/storeknox/discover/pending-review/table/status/index.hbs @@ -0,0 +1,43 @@ +{{#if @data.status}} + {{#if (eq @data.status 'approved')}} + + {{t 'storeknox.approved'}} + + {{else}} + + {{t 'rejected'}} + + {{/if}} + + + {{t 'by'}} + {{@data.actionTakenBy}} + + + + <:tooltipContent> + + + + + June 17, 2024, 12:51 + + + + + <:default> + + + + +{{else}} + + + + + + + + + +{{/if}} \ No newline at end of file diff --git a/app/components/storeknox/discover/pending-review/table/status/index.scss b/app/components/storeknox/discover/pending-review/table/status/index.scss new file mode 100644 index 000000000..98cf7531b --- /dev/null +++ b/app/components/storeknox/discover/pending-review/table/status/index.scss @@ -0,0 +1,5 @@ +.info-icon { + font-size: 1em !important; + height: 12px; + color: var(--storeknox-discover-pending-review-table-status-info-icon-color); +} diff --git a/app/components/storeknox/discover/requested-apps/index.hbs b/app/components/storeknox/discover/requested-apps/index.hbs new file mode 100644 index 000000000..855c37182 --- /dev/null +++ b/app/components/storeknox/discover/requested-apps/index.hbs @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/components/storeknox/discover/requested-apps/index.ts b/app/components/storeknox/discover/requested-apps/index.ts new file mode 100644 index 000000000..17874ec3b --- /dev/null +++ b/app/components/storeknox/discover/requested-apps/index.ts @@ -0,0 +1,9 @@ +import Component from '@glimmer/component'; + +export default class StoreknoxDiscoverRequestedAppsComponent extends Component {} + +declare module '@glint/environment-ember-loose/registry' { + export default interface Registry { + 'Storeknox::Discover::RequestedApps': typeof StoreknoxDiscoverRequestedAppsComponent; + } +} diff --git a/app/components/storeknox/discover/requested-apps/table/index.hbs b/app/components/storeknox/discover/requested-apps/table/index.hbs new file mode 100644 index 000000000..679267707 --- /dev/null +++ b/app/components/storeknox/discover/requested-apps/table/index.hbs @@ -0,0 +1,51 @@ + + + + + + {{#if column.headerComponent}} + {{#let (component column.headerComponent) as |Component|}} + + {{/let}} + {{else}} + {{column.name}} + {{/if}} + + + + + + + {{#let (component r.columnValue.cellComponent) as |Component|}} + + {{/let}} + + + + + + + \ No newline at end of file diff --git a/app/components/storeknox/discover/requested-apps/table/index.ts b/app/components/storeknox/discover/requested-apps/table/index.ts new file mode 100644 index 000000000..46c63d270 --- /dev/null +++ b/app/components/storeknox/discover/requested-apps/table/index.ts @@ -0,0 +1,120 @@ +import { action } from '@ember/object'; +import Component from '@glimmer/component'; +import { tracked } from '@glimmer/tracking'; +import { inject as service } from '@ember/service'; +import RouterService from '@ember/routing/router-service'; +import IntlService from 'ember-intl/services/intl'; + +interface LimitOffset { + limit: number; + offset: number; +} + +export default class StoreknoxDiscoverRequestedAppsTableComponent extends Component { + @service declare router: RouterService; + @service declare intl: IntlService; + + @tracked requestedApps = [ + { + isAndroid: true, + iconUrl: + 'https://appknox-production-public.s3.amazonaws.com/908e507e-1148-4f4d-9939-6dba3d645abc.png', + name: 'Shell Asia', + packageName: 'com.shellasia.android', + companyName: 'Shell Information Technology International', + mailId: 'asiashell@shell.com', + status: 'pending', + }, + { + isAndroid: true, + iconUrl: + 'https://appknox-production-public.s3.amazonaws.com/908e507e-1148-4f4d-9939-6dba3d645abc.png', + name: 'Shell Recharge India', + packageName: 'com.shellrecharge.india', + companyName: 'Shell Information Technology International', + mailId: null, + status: 'approved', + actionTakenBy: 'subho', + }, + { + isIos: true, + iconUrl: + 'https://appknox-production-public.s3.amazonaws.com/908e507e-1148-4f4d-9939-6dba3d645abc.png', + name: 'Shell Mobility Site Manager', + packageName: 'com.shellmobility.ios', + companyName: 'Shell Information Technology International', + mailId: null, + requested: true, + status: 'rejected', + actionTakenBy: 'subho', + }, + ]; + + // Table Actions + @action goToPage(args: LimitOffset) { + const { limit, offset } = args; + this.router.transitionTo('authenticated.storeknox.discover.requested', { + queryParams: { app_limit: limit, app_offset: offset }, + }); + } + + @action onItemPerPageChange(args: LimitOffset) { + const { limit } = args; + const offset = 0; + + this.router.transitionTo('authenticated.storeknox.discover.requested', { + queryParams: { app_limit: limit, app_offset: offset }, + }); + } + + get totalCount() { + return this.requestedApps.length || 0; + } + + get tableData() { + return this.requestedApps; + } + + get itemPerPageOptions() { + return [10, 25, 50]; + } + + get limit() { + return 10; + } + + get offset() { + return 0; + } + + get columns() { + return [ + { + headerComponent: 'storeknox/table-columns/store-header', + cellComponent: 'storeknox/table-columns/store', + minWidth: 30, + width: 30, + textAlign: 'center', + }, + { + name: this.intl.t('application'), + cellComponent: 'storeknox/table-columns/application', + }, + { + name: this.intl.t('developer'), + cellComponent: 'storeknox/table-columns/developer', + }, + { + name: this.intl.t('status'), + cellComponent: 'storeknox/discover/requested-apps/table/status', + width: 80, + }, + ]; + } +} + +declare module '@glint/environment-ember-loose/registry' { + export default interface Registry { + 'Storeknox::Discover::RequestedApps::Table': typeof StoreknoxDiscoverRequestedAppsTableComponent; + } +} diff --git a/app/components/storeknox/discover/requested-apps/table/status/index.hbs b/app/components/storeknox/discover/requested-apps/table/status/index.hbs new file mode 100644 index 000000000..86e9f97de --- /dev/null +++ b/app/components/storeknox/discover/requested-apps/table/status/index.hbs @@ -0,0 +1,69 @@ +{{#if (eq @data.status 'pending')}} + + <:icon> + + + +{{else if (eq @data.status 'approved')}} + + + {{t 'storeknox.approved'}} + + + + + {{t 'by'}} + {{@data.actionTakenBy}} + + + + <:tooltipContent> + + + + + June 17, 2024, 12:51 + + + + + <:default> + + + + + +{{else if (eq @data.status 'rejected')}} + + + {{t 'rejected'}} + + + + + {{t 'by'}} + {{@data.actionTakenBy}} + + + + <:tooltipContent> + + + + + June 17, 2024, 12:51 + + + + + <:default> + + + + + +{{/if}} \ No newline at end of file diff --git a/app/components/storeknox/discover/requested-apps/table/status/index.scss b/app/components/storeknox/discover/requested-apps/table/status/index.scss new file mode 100644 index 000000000..761831828 --- /dev/null +++ b/app/components/storeknox/discover/requested-apps/table/status/index.scss @@ -0,0 +1,5 @@ +.info-icon { + font-size: 1em !important; + height: 12px; + color: var(--storeknox-discover-requested-apps-table-status-info-icon-color); +} diff --git a/app/components/storeknox/discover/results/empty/index.hbs b/app/components/storeknox/discover/results/empty/index.hbs new file mode 100644 index 000000000..3f47e6317 --- /dev/null +++ b/app/components/storeknox/discover/results/empty/index.hbs @@ -0,0 +1,12 @@ + + + + + + {{t 'storeknox.searchForApps'}} + + + + {{t 'storeknox.searchForAppsDescription'}} + + \ No newline at end of file diff --git a/app/components/storeknox/discover/results/empty/index.scss b/app/components/storeknox/discover/results/empty/index.scss new file mode 100644 index 000000000..4488f8286 --- /dev/null +++ b/app/components/storeknox/discover/results/empty/index.scss @@ -0,0 +1,13 @@ +.empty-container { + margin-top: 3em; + margin-bottom: 3em; + + .header { + margin-top: 1.5625em; + } + + .body-text { + text-align: center; + max-width: 500px; + } +} diff --git a/app/components/storeknox/discover/results/empty/index.ts b/app/components/storeknox/discover/results/empty/index.ts new file mode 100644 index 000000000..abed71cd3 --- /dev/null +++ b/app/components/storeknox/discover/results/empty/index.ts @@ -0,0 +1,9 @@ +import Component from '@glimmer/component'; + +export default class StoreknoxDiscoverResultsEmptyComponent extends Component {} + +declare module '@glint/environment-ember-loose/registry' { + export default interface Registry { + 'Storeknox::Discover::Results::Empty': typeof StoreknoxDiscoverResultsEmptyComponent; + } +} diff --git a/app/components/storeknox/discover/results/index.hbs b/app/components/storeknox/discover/results/index.hbs new file mode 100644 index 000000000..97abb4dbb --- /dev/null +++ b/app/components/storeknox/discover/results/index.hbs @@ -0,0 +1,36 @@ + +
+ + <:rightAdornment> + {{#if this.discoverClicked}} + + + + + {{t 'clear'}} + + + {{else}} + + {{/if}} + + +
+ + + {{t 'storeknox.discoverHeader'}} + +
+ +{{#if this.discoverClicked}} + +{{else}} + +{{/if}} \ No newline at end of file diff --git a/app/components/storeknox/discover/results/index.scss b/app/components/storeknox/discover/results/index.scss new file mode 100644 index 000000000..08dbf9abf --- /dev/null +++ b/app/components/storeknox/discover/results/index.scss @@ -0,0 +1,8 @@ +.search-input-container-width { + width: 530px; + margin-right: 0.714em; + + .close-search-text { + cursor: pointer; + } +} diff --git a/app/components/storeknox/discover/results/index.ts b/app/components/storeknox/discover/results/index.ts new file mode 100644 index 000000000..becbea4f2 --- /dev/null +++ b/app/components/storeknox/discover/results/index.ts @@ -0,0 +1,26 @@ +import Component from '@glimmer/component'; +import { tracked } from '@glimmer/tracking'; +import { action } from '@ember/object'; + +export default class StoreknoxDiscoverResultsComponent extends Component { + @tracked searchQuery = ''; + @tracked discoverClicked = false; + + @action + discoverApp() { + this.searchQuery = 'Shell Test'; + this.discoverClicked = true; + } + + @action + clearSearch() { + this.searchQuery = ''; + this.discoverClicked = false; + } +} + +declare module '@glint/environment-ember-loose/registry' { + export default interface Registry { + 'Storeknox::Discover::Results': typeof StoreknoxDiscoverResultsComponent; + } +} diff --git a/app/components/storeknox/discover/results/table/action-header/index.hbs b/app/components/storeknox/discover/results/table/action-header/index.hbs new file mode 100644 index 000000000..da70c19e6 --- /dev/null +++ b/app/components/storeknox/discover/results/table/action-header/index.hbs @@ -0,0 +1,18 @@ + + {{t 'action'}} + + + + <:tooltipContent> +
+ + {{t 'storeknox.actionHeaderInfo'}} + +
+ + + <:default> + + +
+
\ No newline at end of file diff --git a/app/components/storeknox/discover/results/table/action-header/index.scss b/app/components/storeknox/discover/results/table/action-header/index.scss new file mode 100644 index 000000000..699453d2e --- /dev/null +++ b/app/components/storeknox/discover/results/table/action-header/index.scss @@ -0,0 +1,6 @@ +.tooltip-content { + width: 14.285em; + padding: 0.5em; + box-sizing: border-box; + white-space: normal; +} diff --git a/app/components/storeknox/discover/results/table/action/index.hbs b/app/components/storeknox/discover/results/table/action/index.hbs new file mode 100644 index 000000000..5a3637e2e --- /dev/null +++ b/app/components/storeknox/discover/results/table/action/index.hbs @@ -0,0 +1,47 @@ +{{#if @data.requested}} + {{#if @data.exists}} + + <:tooltipContent> +
+ + {{t 'storeknox.appAlreadyExists'}} + +
+ + + <:default> + + +
+ {{else}} + + <:tooltipContent> +
+ + {{t 'storeknox.appAlreadyRequested'}} + +
+ + + <:default> + + +
+ {{/if}} +{{else}} + + {{#if this.isAdmin}} + + {{else}} + + {{/if}} + +{{/if}} \ No newline at end of file diff --git a/app/components/storeknox/discover/results/table/action/index.scss b/app/components/storeknox/discover/results/table/action/index.scss new file mode 100644 index 000000000..43497d98f --- /dev/null +++ b/app/components/storeknox/discover/results/table/action/index.scss @@ -0,0 +1,26 @@ +.requested-icon { + padding: 0.4em; + color: var(--storeknox-discover-results-table-action-requested-icon-color); + background-color: var( + --storeknox-discover-results-table-action-requested-icon-bgcolor + ); + border-radius: 2px; +} + +.already-exist-icon { + padding: 0.4em; + color: var( + --storeknox-discover-results-table-action-already-exist-icon-color + ); + background-color: var( + --storeknox-discover-results-table-action-already-exist-icon-bgcolor + ); + border-radius: 2px; +} + +.tooltip-content { + width: 12.85em; + padding: 0.5em; + box-sizing: border-box; + white-space: normal; +} diff --git a/app/components/storeknox/discover/results/table/action/index.ts b/app/components/storeknox/discover/results/table/action/index.ts new file mode 100644 index 000000000..ecad9e66c --- /dev/null +++ b/app/components/storeknox/discover/results/table/action/index.ts @@ -0,0 +1,26 @@ +import Component from '@glimmer/component'; +import { action } from '@ember/object'; +import { inject as service } from '@ember/service'; +import RouterService from '@ember/routing/router-service'; +import { tracked } from '@glimmer/tracking'; +import IntlService from 'ember-intl/services/intl'; +import MeService from 'irene/services/me'; + +interface LimitOffset { + limit: number; + offset: number; +} + +export default class StoreknoxDiscoverResultsTableActionComponent extends Component { + @service declare me: MeService; + + get isAdmin() { + return this.me.org?.is_admin; + } +} + +declare module '@glint/environment-ember-loose/registry' { + export default interface Registry { + 'Storeknox::Discover::Results::Table::Action': typeof StoreknoxDiscoverResultsTableActionComponent; + } +} diff --git a/app/components/storeknox/discover/results/table/index.hbs b/app/components/storeknox/discover/results/table/index.hbs new file mode 100644 index 000000000..34808ffe2 --- /dev/null +++ b/app/components/storeknox/discover/results/table/index.hbs @@ -0,0 +1,90 @@ + + + + {{t 'storeknox.showingResults'}} + + + +  "Shell Test" + + + + {{#if this.isAdmin}} + + <:leftIcon> + + + + <:default> + {{t 'storeknox.addToInventory'}} + + + {{else}} + + <:leftIcon> + + + + <:default> + {{t 'storeknox.sendRequest'}} + + + {{/if}} + + + + + + + + + {{#if column.headerComponent}} + {{#let (component column.headerComponent) as |Component|}} + + {{/let}} + {{else}} + {{column.name}} + {{/if}} + + + + + + + {{#let (component r.columnValue.cellComponent) as |Component|}} + + {{/let}} + + + + + + + \ No newline at end of file diff --git a/app/components/storeknox/discover/results/table/index.scss b/app/components/storeknox/discover/results/table/index.scss new file mode 100644 index 000000000..50229b248 --- /dev/null +++ b/app/components/storeknox/discover/results/table/index.scss @@ -0,0 +1,10 @@ +.result-header { + border: 1px solid var(--storeknox-discover-results-table-header-border-color); + padding: 1em; + margin-top: 2.14em; +} + +.results-back-icon { + font-size: 1.714em !important; + margin-right: 0.214em; +} diff --git a/app/components/storeknox/discover/results/table/index.ts b/app/components/storeknox/discover/results/table/index.ts new file mode 100644 index 000000000..b29881b3f --- /dev/null +++ b/app/components/storeknox/discover/results/table/index.ts @@ -0,0 +1,137 @@ +import Component from '@glimmer/component'; +import { action } from '@ember/object'; +import { inject as service } from '@ember/service'; +import RouterService from '@ember/routing/router-service'; +import { tracked } from '@glimmer/tracking'; +import IntlService from 'ember-intl/services/intl'; +import MeService from 'irene/services/me'; + +interface LimitOffset { + limit: number; + offset: number; +} + +export default class StoreknoxDiscoverResultsTableComponent extends Component { + @service declare router: RouterService; + @service declare intl: IntlService; + @service declare me: MeService; + + @tracked searchResults = [ + { + isAndroid: true, + iconUrl: + 'https://appknox-production-public.s3.amazonaws.com/908e507e-1148-4f4d-9939-6dba3d645abc.png', + name: 'Shell Asia', + packageName: 'com.shellasia.android', + companyName: 'Shell Information Technology International', + mailId: 'asiashell@shell.com', + requested: true, + exists: false, + }, + { + isAndroid: true, + iconUrl: + 'https://appknox-production-public.s3.amazonaws.com/908e507e-1148-4f4d-9939-6dba3d645abc.png', + name: 'Shell Recharge India', + packageName: 'com.shellrecharge.india', + companyName: 'Shell Information Technology International', + mailId: null, + requested: false, + }, + { + isIos: true, + iconUrl: + 'https://appknox-production-public.s3.amazonaws.com/908e507e-1148-4f4d-9939-6dba3d645abc.png', + name: 'Shell Mobility Site Manager', + packageName: 'com.shellmobility.ios', + companyName: 'Shell Information Technology International', + mailId: null, + requested: true, + exists: true, + }, + ]; + + get columns() { + return [ + { + headerComponent: 'storeknox/table-columns/checkbox-header', + cellComponent: 'storeknox/table-columns/checkbox', + minWidth: 10, + width: 10, + textAlign: 'center', + }, + { + headerComponent: 'storeknox/table-columns/store-header', + cellComponent: 'storeknox/table-columns/store', + minWidth: 50, + width: 50, + textAlign: 'center', + }, + { + name: this.intl.t('application'), + cellComponent: 'storeknox/table-columns/application', + width: 200, + }, + { + name: this.intl.t('developer'), + cellComponent: 'storeknox/table-columns/developer', + width: 200, + }, + { + headerComponent: 'storeknox/discover/results/table/action-header', + cellComponent: 'storeknox/discover/results/table/action', + minWidth: 50, + width: 50, + textAlign: 'center', + }, + ]; + } + + // Table Actions + @action goToPage(args: LimitOffset) { + const { limit, offset } = args; + this.router.transitionTo('authenticated.storeknox.discover.result', { + queryParams: { app_limit: limit, app_offset: offset }, + }); + } + + @action onItemPerPageChange(args: LimitOffset) { + const { limit } = args; + const offset = 0; + + this.router.transitionTo('authenticated.storeknox.discover.result', { + queryParams: { app_limit: limit, app_offset: offset }, + }); + } + + get totalCount() { + return this.searchResults.length || 0; + } + + get tableData() { + // console.log(this.searchResults); + return this.searchResults; + } + + get itemPerPageOptions() { + return [10, 25, 50]; + } + + get limit() { + return 10; + } + + get offset() { + return 0; + } + + get isAdmin() { + return this.me.org?.is_admin; + } +} + +declare module '@glint/environment-ember-loose/registry' { + export default interface Registry { + 'Storeknox::Discover::Results::Table': typeof StoreknoxDiscoverResultsTableComponent; + } +} diff --git a/app/components/storeknox/discover/welcome-modal/index.hbs b/app/components/storeknox/discover/welcome-modal/index.hbs new file mode 100644 index 000000000..fe7052988 --- /dev/null +++ b/app/components/storeknox/discover/welcome-modal/index.hbs @@ -0,0 +1,49 @@ + + + + + + + + + + + + We have detected + 15 apps + that may belong to your organization which exists on Google Play Store + and Apple App Store. + + + + + + + + In addition, there are + 30 apps + that are present in your Organizations Appknox account which should also + be added to Storeknox. + + + + + + + + You can use the button below to review them and take necessary action. + + + + + + + +
+ + + Take Action + + +
+
\ No newline at end of file diff --git a/app/components/storeknox/discover/welcome-modal/index.scss b/app/components/storeknox/discover/welcome-modal/index.scss new file mode 100644 index 000000000..d4f00ee4b --- /dev/null +++ b/app/components/storeknox/discover/welcome-modal/index.scss @@ -0,0 +1,12 @@ +.modal-body { + padding: 15px 35px; + + .modal-body-list { + padding: 15px 18px; + } +} + +.modal-footer { + box-shadow: 0px -1px 10px 0px #0000000d; + padding: 10px 0; +} diff --git a/app/components/storeknox/discover/welcome-modal/index.ts b/app/components/storeknox/discover/welcome-modal/index.ts new file mode 100644 index 000000000..c373d77cd --- /dev/null +++ b/app/components/storeknox/discover/welcome-modal/index.ts @@ -0,0 +1,9 @@ +import Component from '@glimmer/component'; + +export default class StoreknoxDiscoverWelcomeModalComponent extends Component {} + +declare module '@glint/environment-ember-loose/registry' { + export default interface Registry { + 'Storeknox::Discover::WelcomeModal': typeof StoreknoxDiscoverWelcomeModalComponent; + } +} diff --git a/app/components/storeknox/index.hbs b/app/components/storeknox/index.hbs new file mode 100644 index 000000000..d38f45c8c --- /dev/null +++ b/app/components/storeknox/index.hbs @@ -0,0 +1,3 @@ +
+ {{outlet}} +
\ No newline at end of file diff --git a/app/components/storeknox/index.scss b/app/components/storeknox/index.scss new file mode 100644 index 000000000..cbd1ae58b --- /dev/null +++ b/app/components/storeknox/index.scss @@ -0,0 +1,3 @@ +.storeknox-root { + padding: 0.714em 4.285em 0; +} diff --git a/app/components/storeknox/index.ts b/app/components/storeknox/index.ts new file mode 100644 index 000000000..7f4685839 --- /dev/null +++ b/app/components/storeknox/index.ts @@ -0,0 +1,9 @@ +import Component from '@glimmer/component'; + +export default class StoreknoxComponent extends Component {} + +declare module '@glint/environment-ember-loose/registry' { + export default interface Registry { + Storeknox: typeof StoreknoxComponent; + } +} diff --git a/app/components/storeknox/indicator/index.hbs b/app/components/storeknox/indicator/index.hbs new file mode 100644 index 000000000..b39ec8168 --- /dev/null +++ b/app/components/storeknox/indicator/index.hbs @@ -0,0 +1,21 @@ + + <:tooltipContent> +
+ + + + + {{t 'storeknox.info'}} + + + + + {{@text}} + +
+ + + <:default> + {{component @svgComponent}} + +
\ No newline at end of file diff --git a/app/components/storeknox/indicator/index.scss b/app/components/storeknox/indicator/index.scss new file mode 100644 index 000000000..aeb19ed1d --- /dev/null +++ b/app/components/storeknox/indicator/index.scss @@ -0,0 +1,7 @@ +.tooltip-content { + width: 200px; + max-width: max-content; + padding: 0.5em; + box-sizing: border-box; + white-space: normal; +} diff --git a/app/components/storeknox/indicator/index.ts b/app/components/storeknox/indicator/index.ts new file mode 100644 index 000000000..6ea2f2b33 --- /dev/null +++ b/app/components/storeknox/indicator/index.ts @@ -0,0 +1,9 @@ +import Component from '@glimmer/component'; + +export default class StoreknoxIndicatorComponent extends Component {} + +declare module '@glint/environment-ember-loose/registry' { + export default interface Registry { + 'Storeknox::Indicator': typeof StoreknoxIndicatorComponent; + } +} diff --git a/app/components/storeknox/review-logs/index.hbs b/app/components/storeknox/review-logs/index.hbs new file mode 100644 index 000000000..abef043e7 --- /dev/null +++ b/app/components/storeknox/review-logs/index.hbs @@ -0,0 +1,33 @@ + + {{#each this.breadcrumbItems as |item|}} + + {{/each}} + + + + + {{t 'storeknox.reviewLogs'}} + + + + Lorem ipsum dolor sit amet consectetur. At suspendisse et orci risus non + sed. Mauris dui tincidunt + + + + \ No newline at end of file diff --git a/app/components/storeknox/review-logs/index.scss b/app/components/storeknox/review-logs/index.scss new file mode 100644 index 000000000..87292bc58 --- /dev/null +++ b/app/components/storeknox/review-logs/index.scss @@ -0,0 +1,10 @@ +.header-storeknox-review-logs-page { + margin-top: 0.714em; + border: 1px solid var(--storeknox-review-logs-header-border-color); + padding: 1.428em; + margin-bottom: 2.14em; +} + +.description-storeknox-review-logs-page { + color: var(--storeknox-review-logs-header-description-color); +} diff --git a/app/components/storeknox/review-logs/index.ts b/app/components/storeknox/review-logs/index.ts new file mode 100644 index 000000000..882e6684f --- /dev/null +++ b/app/components/storeknox/review-logs/index.ts @@ -0,0 +1,88 @@ +import Component from '@glimmer/component'; +import { inject as service } from '@ember/service'; +import IntlService from 'ember-intl/services/intl'; + +export default class StoreknoxReviewLogsComponent extends Component { + @service declare intl: IntlService; + + get breadcrumbItems() { + return [ + { + route: 'authenticated.storeknox.discover.review', + linkTitle: 'Home', + }, + { + route: 'authenticated.storeknox.review-logs', + linkTitle: 'Review Logs', + }, + ]; + } + + get columns() { + return [ + { + headerComponent: 'storeknox/table-columns/store-header', + cellComponent: 'storeknox/table-columns/store', + minWidth: 50, + width: 50, + textAlign: 'center', + }, + { + name: this.intl.t('application'), + cellComponent: 'storeknox/table-columns/application', + width: 200, + }, + { + headerComponent: + 'storeknox/discover/pending-review/table/found-by-header', + cellComponent: 'storeknox/discover/pending-review/table/found-by', + }, + { + name: this.intl.t('status'), + cellComponent: 'storeknox/discover/pending-review/table/status', + width: 80, + }, + ]; + } + + get reviewLogApps() { + return [ + { + isAndroid: true, + iconUrl: + 'https://appknox-production-public.s3.amazonaws.com/908e507e-1148-4f4d-9939-6dba3d645abc.png', + name: 'Shell Asia', + packageName: 'com.shellasia.android', + foundBy: 'Auto Discovery', + status: 'approved', + actionTakenBy: 'sujith', + }, + { + isIos: true, + iconUrl: + 'https://appknox-production-public.s3.amazonaws.com/908e507e-1148-4f4d-9939-6dba3d645abc.png', + name: 'Shell Recharge India', + packageName: 'com.shellrecharge.india', + foundBy: 'Manual Discovery', + status: 'approved', + actionTakenBy: 'smit', + }, + { + isAndroid: true, + iconUrl: + 'https://appknox-production-public.s3.amazonaws.com/908e507e-1148-4f4d-9939-6dba3d645abc.png', + name: 'Shell Mobility Site Manager', + packageName: 'com.shellmobility.ios', + foundBy: 'Auto Discovery', + status: 'rejected', + actionTakenBy: 'sujith', + }, + ]; + } +} + +declare module '@glint/environment-ember-loose/registry' { + export default interface Registry { + 'Storeknox::ReviewLogs': typeof StoreknoxReviewLogsComponent; + } +} diff --git a/app/components/storeknox/table-columns/application/index.hbs b/app/components/storeknox/table-columns/application/index.hbs new file mode 100644 index 000000000..cde6b00b2 --- /dev/null +++ b/app/components/storeknox/table-columns/application/index.hbs @@ -0,0 +1,32 @@ + + + + + + + {{@data.name}} + + + + {{@data.packageName}} + + + \ No newline at end of file diff --git a/app/components/storeknox/table-columns/checkbox-header/index.hbs b/app/components/storeknox/table-columns/checkbox-header/index.hbs new file mode 100644 index 000000000..3eb17bfc1 --- /dev/null +++ b/app/components/storeknox/table-columns/checkbox-header/index.hbs @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/components/storeknox/table-columns/checkbox/index.hbs b/app/components/storeknox/table-columns/checkbox/index.hbs new file mode 100644 index 000000000..bb3853946 --- /dev/null +++ b/app/components/storeknox/table-columns/checkbox/index.hbs @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/components/storeknox/table-columns/developer/index.hbs b/app/components/storeknox/table-columns/developer/index.hbs new file mode 100644 index 000000000..727278e99 --- /dev/null +++ b/app/components/storeknox/table-columns/developer/index.hbs @@ -0,0 +1,27 @@ + + + + {{@data.companyName}} + + + {{#if @data.mailId}} + + {{@data.mailId}} + + {{else}} + + {{t 'noDataAvailable'}} + + {{/if}} + \ No newline at end of file diff --git a/app/components/storeknox/table-columns/index.ts b/app/components/storeknox/table-columns/index.ts new file mode 100644 index 000000000..d14e001d1 --- /dev/null +++ b/app/components/storeknox/table-columns/index.ts @@ -0,0 +1,9 @@ +import Component from '@glimmer/component'; + +export default class StoreknoxDiscoverTableColumnsComponent extends Component {} + +declare module '@glint/environment-ember-loose/registry' { + export default interface Registry { + 'Storeknox::Discover::TableColumns': typeof StoreknoxDiscoverTableColumnsComponent; + } +} diff --git a/app/components/storeknox/table-columns/store-header/index.hbs b/app/components/storeknox/table-columns/store-header/index.hbs new file mode 100644 index 000000000..87c1d20c5 --- /dev/null +++ b/app/components/storeknox/table-columns/store-header/index.hbs @@ -0,0 +1,59 @@ + + {{t 'storeknox.store'}} + + + + + + + {{t 'filterBy'}} + + {{#each this.platformObject as |platform|}} + + + {{#if (eq this.selectedPlatform platform.value)}} + + {{else}} + + {{/if}} + + + {{platform.key}} + + {{/each}} + + {{#if this.filterApplied}} + + + {{t 'clearFilter'}} + + + {{/if}} + + \ No newline at end of file diff --git a/app/components/storeknox/table-columns/store-header/index.scss b/app/components/storeknox/table-columns/store-header/index.scss new file mode 100644 index 000000000..2d1e50fcd --- /dev/null +++ b/app/components/storeknox/table-columns/store-header/index.scss @@ -0,0 +1,24 @@ +.store-filter { + width: 175px; + background-color: var( + --storeknox-table-columns-store-header-filter-background-color + ); + box-shadow: var(--storeknox-table-columns-store-header-filter-box-shadow); + border-radius: 3px; + + .filter-option:hover { + background-color: var( + --storeknox-table-columns-store-header-filter-option-hover-bgcolor + ); + } + + .clear-filter-section { + background-color: var( + --storeknox-table-columns-store-header-filter-option-clear-filter-bgcolor + ); + } +} + +.cursor-pointer { + cursor: pointer; +} diff --git a/app/components/storeknox/table-columns/store-header/index.ts b/app/components/storeknox/table-columns/store-header/index.ts new file mode 100644 index 000000000..1c205f7b0 --- /dev/null +++ b/app/components/storeknox/table-columns/store-header/index.ts @@ -0,0 +1,70 @@ +import Component from '@glimmer/component'; +import { action } from '@ember/object'; +import { tracked } from '@glimmer/tracking'; +import { inject as service } from '@ember/service'; +import IntlService from 'ember-intl/services/intl'; + +import ENUMS from 'irene/enums'; + +export default class StoreknoxDiscoverTableColumnsStoreHeaderComponent extends Component { + @service declare intl: IntlService; + + @tracked anchorRef: HTMLElement | null = null; + @tracked selectedPlatform: number = -1; + @tracked filterApplied: boolean = false; + + @action + handleClick(event: FocusEvent) { + this.anchorRef = event.currentTarget as HTMLElement; + } + + @action + handleOptionsClose() { + this.anchorRef = null; + } + + @action + selectPlatform(value: number) { + this.selectedPlatform = value; + + if (value > -1) { + this.filterApplied = true; + } else { + this.filterApplied = false; + } + + this.anchorRef = null; + } + + @action + clearFilter() { + this.selectedPlatform = -1; + + this.filterApplied = false; + + this.anchorRef = null; + } + + get platformObject() { + return [ + { + key: this.intl.t('all'), + value: -1, + }, + { + key: this.intl.t('android'), + value: ENUMS.PLATFORM.ANDROID, + }, + { + key: this.intl.t('ios'), + value: ENUMS.PLATFORM.IOS, + }, + ]; + } +} + +declare module '@glint/environment-ember-loose/registry' { + export default interface Registry { + 'Storeknox::Discover::TableColumns::StoreHeader': typeof StoreknoxDiscoverTableColumnsStoreHeaderComponent; + } +} diff --git a/app/components/storeknox/table-columns/store/index.hbs b/app/components/storeknox/table-columns/store/index.hbs new file mode 100644 index 000000000..2e46b0e0f --- /dev/null +++ b/app/components/storeknox/table-columns/store/index.hbs @@ -0,0 +1,7 @@ +{{#if @data.isIos}} + +{{/if}} + +{{#if @data.isAndroid}} + +{{/if}} \ No newline at end of file diff --git a/app/router.ts b/app/router.ts index 5a127d418..b4c3f3e74 100644 --- a/app/router.ts +++ b/app/router.ts @@ -130,6 +130,16 @@ Router.map(function () { this.route('analytics'); }); + this.route('storeknox', { path: '/dashboard/storeknox' }, function () { + this.route('discover', function () { + this.route('result'); + this.route('requested'); + this.route('review'); + }); + + this.route('review-logs'); + }); + this.route('dashboard', function () { this.route('projects'); diff --git a/app/styles/_component-variables.scss b/app/styles/_component-variables.scss index 063162121..e2b675bb0 100644 --- a/app/styles/_component-variables.scss +++ b/app/styles/_component-variables.scss @@ -876,7 +876,9 @@ body { --file-details-scan-actions-old-manual-scan-textarea-border-color: var( --border-color-1 ); - --file-details-scan-actions-old-manual-scan-textarea-color: var(--text-primary); + --file-details-scan-actions-old-manual-scan-textarea-color: var( + --text-primary + ); --file-details-scan-actions-old-manual-scan-textarea-border-radius: var( --border-radius ); @@ -950,7 +952,9 @@ body { --file-details-manual-scan-request-form-additional-comments-textarea-border-color: var( --border-color-1 ); - --file-details-manual-scan-request-form-additional-comments-textarea-color: var(--text-primary); + --file-details-manual-scan-request-form-additional-comments-textarea-color: var( + --text-primary + ); --file-details-manual-scan-request-form-additional-comments-textarea-border-radius: var( --border-radius ); @@ -1512,6 +1516,101 @@ body { // variables for marketplace/integration-card --marketplace-integration-card-text-color: var(--text-secondary); --marketplace-integration-card-border-color: var(--border-color-1); + + // variables for storeknox/discover/pending-review/table/availability-header + --storeknox-discover-pending-review-table-availability-header-info-icon-color: var( + --neutral-grey-400 + ); + --storeknox-discover-pending-review-table-availability-filter-background-color: var( + --background-main + ); + --storeknox-discover-pending-review-table-availability-filter-box-shadow: var( + --box-shadow-7 + ); + --storeknox-discover-pending-review-table-availability-filter-option-hover-background-color: var( + --neutral-grey-200 + ); + --storeknox-discover-pending-review-table-availability-filter-option-clear-filter-background-color: var( + --neutral-grey-200 + ); + + // variables for storeknox/discover/pending-review/table/found-by + --storeknox-discover-pending-review-table-found-by-info-icon-color: var( + --neutral-grey-300 + ); + + // variables for storeknox/discover/pending-review/table/found-by-header + --storeknox-discover-pending-review-table-found-by-filter-background-color: var( + --background-main + ); + --storeknox-discover-pending-review-table-found-by-filter-box-shadow: var( + --box-shadow-7 + ); + --storeknox-discover-pending-review-table-found-by-filter-option-hover-background-color: var( + --neutral-grey-200 + ); + --storeknox-discover-pending-review-table-found-by-filter-option-clear-filter-background-color: var( + --neutral-grey-200 + ); + + // variables for storeknox/discover/pending-review/table/status + --storeknox-discover-pending-review-table-status-info-icon-color: var( + --neutral-grey-300 + ); + + // variables for storeknox/discover/pending-review + --storeknox-discover-pending-review-header-border-color: var( + --neutral-grey-200 + ); + --storeknox-discover-pending-review-approve-button-color: var(--success-main); + --storeknox-discover-pending-review-reject-button-color: var(--error-main); + --storeknox-discover-pending-review-header-divider-background-color: var( + --neutral-grey-200 + ); + + // variables for storeknox/discover/requested-apps/table/status + --storeknox-discover-requested-apps-table-status-info-icon-color: var( + --neutral-grey-300 + ); + + // variables for storeknox/discover/results/table/action + --storeknox-discover-results-table-action-requested-icon-color: var( + --warn-dark + ); + --storeknox-discover-results-table-action-requested-icon-bgcolor: var( + --warn-light + ); + --storeknox-discover-results-table-action-already-exist-icon-color: var( + --success-main + ); + --storeknox-discover-results-table-action-already-exist-icon-bgcolor: var( + --success-light + ); + + // variables for storeknox/discover/results/table + --storeknox-discover-results-table-header-border-color: var( + --neutral-grey-200 + ); + + // variables for storeknox/discover + --storeknox-discover-header-border-color: var(--neutral-grey-200); + --storeknox-discover-header-description-color: var(--neutral-grey-500); + + // variables for storeknox/review-logs + --storeknox-review-logs-header-border-color: var(--neutral-grey-200); + --storeknox-review-logs-header-description-color: var(--neutral-grey-500); + + // variables for storeknox/table-columns/store-header + --storeknox-table-columns-store-header-filter-background-color: var( + --background-main + ); + --storeknox-table-columns-store-header-filter-box-shadow: var(--box-shadow-7); + --storeknox-table-columns-store-header-filter-option-hover-bgcolor: var( + --neutral-grey-200 + ); + --storeknox-table-columns-store-header-filter-option-clear-filter-bgcolor: var( + --neutral-grey-200 + ); } body { @@ -1645,19 +1744,37 @@ body { --security-analysis-details-finding-add-form-note-border-radius: var( --border-radius ); - --security-analysis-details-finding-add-form-textarea-border-color: var(--border-color-1); - --security-analysis-details-finding-add-form-textarea-border-radius: var(--border-radius); - --security-analysis-details-finding-add-form-textarea-color: var(--text-primary); + --security-analysis-details-finding-add-form-textarea-border-color: var( + --border-color-1 + ); + --security-analysis-details-finding-add-form-textarea-border-radius: var( + --border-radius + ); + --security-analysis-details-finding-add-form-textarea-color: var( + --text-primary + ); // variables for security/analysis-details/findings/table/title - --security-analysis-details-findings-table-title-textarea-border-color: var(--border-color-1); - --security-analysis-details-findings-table-title-textarea-border-radius: var(--border-radius); - --security-analysis-details-findings-table-title-textarea-color: var(--text-primary); + --security-analysis-details-findings-table-title-textarea-border-color: var( + --border-color-1 + ); + --security-analysis-details-findings-table-title-textarea-border-radius: var( + --border-radius + ); + --security-analysis-details-findings-table-title-textarea-color: var( + --text-primary + ); // variables for security/analysis-details/findings/table/description - --security-analysis-details-findings-table-description-textarea-border-color: var(--border-color-1); - --security-analysis-details-findings-table-description-textarea-border-radius: var(--border-radius); - --security-analysis-details-findings-table-description-textarea-color: var(--text-primary); + --security-analysis-details-findings-table-description-textarea-border-color: var( + --border-color-1 + ); + --security-analysis-details-findings-table-description-textarea-border-radius: var( + --border-radius + ); + --security-analysis-details-findings-table-description-textarea-color: var( + --text-primary + ); // variables for dynamicscan-automation-upselling-feature --dynamicscan-automation-upselling-feature-box-shadow: var(--box-shadow-7); diff --git a/app/styles/_icons.scss b/app/styles/_icons.scss index 3e7485c7c..1ab6f9979 100644 --- a/app/styles/_icons.scss +++ b/app/styles/_icons.scss @@ -570,3 +570,11 @@ .ak-icon-do-not-disturb-on { @extend .mi-do-not-disturb-on; } + +.ak-icon-schedule-send { + @extend .mi-schedule-send; +} + +.ak-icon-add-box { + @extend .mi-add-box; +} diff --git a/app/templates/authenticated/storeknox.hbs b/app/templates/authenticated/storeknox.hbs new file mode 100644 index 000000000..ab87e23ef --- /dev/null +++ b/app/templates/authenticated/storeknox.hbs @@ -0,0 +1,3 @@ +{{page-title 'Storeknox'}} + + \ No newline at end of file diff --git a/app/templates/authenticated/storeknox/discover.hbs b/app/templates/authenticated/storeknox/discover.hbs new file mode 100644 index 000000000..1dd671ee0 --- /dev/null +++ b/app/templates/authenticated/storeknox/discover.hbs @@ -0,0 +1,5 @@ +{{page-title 'Discover'}} + + + +{{outlet}} \ No newline at end of file diff --git a/app/templates/authenticated/storeknox/discover/requested.hbs b/app/templates/authenticated/storeknox/discover/requested.hbs new file mode 100644 index 000000000..90a4b2903 --- /dev/null +++ b/app/templates/authenticated/storeknox/discover/requested.hbs @@ -0,0 +1,3 @@ +{{page-title 'Requested'}} + + \ No newline at end of file diff --git a/app/templates/authenticated/storeknox/discover/result.hbs b/app/templates/authenticated/storeknox/discover/result.hbs new file mode 100644 index 000000000..ee53d8e5d --- /dev/null +++ b/app/templates/authenticated/storeknox/discover/result.hbs @@ -0,0 +1,3 @@ +{{page-title 'Result'}} + + \ No newline at end of file diff --git a/app/templates/authenticated/storeknox/discover/review.hbs b/app/templates/authenticated/storeknox/discover/review.hbs new file mode 100644 index 000000000..70d90bbba --- /dev/null +++ b/app/templates/authenticated/storeknox/discover/review.hbs @@ -0,0 +1,3 @@ +{{page-title 'Review'}} + + \ No newline at end of file diff --git a/app/templates/authenticated/storeknox/review-logs.hbs b/app/templates/authenticated/storeknox/review-logs.hbs new file mode 100644 index 000000000..99f8dbd5c --- /dev/null +++ b/app/templates/authenticated/storeknox/review-logs.hbs @@ -0,0 +1,3 @@ +{{page-title 'Review Logs'}} + + \ No newline at end of file diff --git a/translations/en.json b/translations/en.json index e91a5e43f..b56ff444a 100644 --- a/translations/en.json +++ b/translations/en.json @@ -61,6 +61,7 @@ "analysisSettings": "Analysis Settings", "analytics": "Analytics", "analyzing": "Analyzing", + "android": "Android", "anyDevice": "Any Device", "anyVersion": "Any Version", "api": "API", @@ -645,6 +646,7 @@ "invoice": "INVOICE", "invoiceId": "INVOICE ID", "invoices": "Invoices", + "ios": "iOS", "issueDetails": "Issue Details", "issuedOn": "Issued On", "issuer": "Issuer", @@ -1453,6 +1455,40 @@ "stop": "Stop", "storage": "Storage", "storageManagement": "Storage Management", + "storeknox": { + "actionHeaderInfo": "Your request to add an app will be sent to all Owners in your Organization. If approved, you will be able to view the app in your Organizations Inventory", + "addToInventory": "Add to inventory", + "appAlreadyExists": "This app already exists in your Organization's Inventory", + "appAlreadyRequested": "This app was already requested to be added to your Inventory. Please follow up with an Appknox Owner in your organization for reviewing the request.", + "approved": "Approved", + "autoDiscovery": "Auto Discovery", + "availability": "Availability", + "availableColumnInfo": "This column indicates whether the app is present only on Appknox or Storeknox or on both products", + "discoverHeader": "Discover", + "discoverDescription": "Search for your apps on Google Play Store and Apple App Store and add them to your Organizations Inventory for automated monitoring.", + "discoveryResults": "Discovery Results", + "foundBy": "Found By", + "homeTitle": "Home", + "info": "INFO", + "infoIndicatorWhitelabelText": "This app is not available on VAPT and Store Monitoring", + "logs": "Logs", + "manualDiscovery": "Manual Discovery", + "noPendingItems": "No Pending Items", + "noPendingItemsDescription": "You have reviewed all the requests that was raised by your users.", + "pendingReview": "Pending Review", + "reviewLogs": "Review Logs", + "requestedApps": "Requested Apps", + "searchForApps": "Search for Apps", + "searchForAppsDescription": "Use the search bar on this page to look for apps that belong to your Organization and add them to your Inventory for automated monitoring", + "searchQuery": "Search by app name, developer name, namespace or support email", + "sendRequest": "Send Request", + "showingResults": "Showing Results for", + "smIndicatorText": "This App is part of Store Monitoring", + "store": "Store", + "vapt": "VAPT", + "vaptIndicatorText": "This App is part of VAPT", + "waitingForApproval": "Waiting for approval" + }, "storeLowercase": "store", "submit": "Submit", "submitUrl": "Submit URL", diff --git a/translations/ja.json b/translations/ja.json index fad6b3715..48be6d8c5 100644 --- a/translations/ja.json +++ b/translations/ja.json @@ -61,6 +61,7 @@ "analysisSettings": "Analysis Settings", "analytics": "Analytics", "analyzing": "分析中", + "android": "Android", "anyDevice": "Any Device", "anyVersion": "Any Version", "api": "API", @@ -645,6 +646,7 @@ "invoice": "請求書", "invoiceId": "請求書ID", "invoices": "請求書", + "ios": "iOS", "issueDetails": "Issue Details", "issuedOn": "Issued On", "issuer": "Issuer", @@ -1453,6 +1455,40 @@ "stop": "停止中", "storage": "Storage", "storageManagement": "Storage Management", + "storeknox": { + "actionHeaderInfo": "Your request to add an app will be sent to all Owners in your Organization. If approved, you will be able to view the app in your Organizations Inventory", + "addToInventory": "Add to inventory", + "appAlreadyExists": "This app already exists in your Organization's Inventory", + "appAlreadyRequested": "This app was already requested to be added to your Inventory. Please follow up with an Appknox Owner in your organization for reviewing the request.", + "approved": "Approved", + "autoDiscovery": "Auto Discovery", + "availability": "Availability", + "availableColumnInfo": "This column indicates whether the app is present only on Appknox or Storeknox or on both products", + "discoverHeader": "Discover", + "discoverDescription": "Search for your apps on Google Play Store and Apple App Store and add them to your Organizations Inventory for automated monitoring.", + "discoveryResults": "Discovery Results", + "foundBy": "Found By", + "homeTitle": "Home", + "info": "INFO", + "infoIndicatorWhitelabelText": "This app is not available on VAPT and Store Monitoring", + "logs": "Logs", + "manualDiscovery": "Manual Discovery", + "noPendingItems": "No Pending Items", + "noPendingItemsDescription": "You have reviewed all the requests that was raised by your users.", + "pendingReview": "Pending Review", + "reviewLogs": "Review Logs", + "requestedApps": "Requested Apps", + "searchForApps": "Search for Apps", + "searchForAppsDescription": "Use the search bar on this page to look for apps that belong to your Organization and add them to your Inventory for automated monitoring", + "searchQuery": "Search by app name, developer name, namespace or support email", + "sendRequest": "Send Request", + "showingResults": "Showing Results for", + "smIndicatorText": "This App is part of Store Monitoring", + "store": "Store", + "vapt": "VAPT", + "vaptIndicatorText": "This App is part of VAPT", + "waitingForApproval": "Waiting for approval" + }, "storeLowercase": "store", "submit": "Submit", "submitUrl": "URLを送信", diff --git a/types/ak-svg.d.ts b/types/ak-svg.d.ts index 49e00caed..366090d69 100644 --- a/types/ak-svg.d.ts +++ b/types/ak-svg.d.ts @@ -40,6 +40,13 @@ export enum AkSvgComponentInvocationByNames { ScanCompleted, NoApisCaptured, DastAutomationUpselling, + StoreknoxSearchApps, + StoreknoxPlaystoreLogo, + SmIndicator, + VaptIndicator, + InfoIndicator, + NoPendingItems, + WelcomeToStoreknox, } export enum AkSvgComponentInvocationByPaths {