Skip to content

Commit

Permalink
Update documentation before release
Browse files Browse the repository at this point in the history
  • Loading branch information
daikoku-github-actions committed Nov 18, 2021
1 parent a2f7526 commit 24f9beb
Show file tree
Hide file tree
Showing 51 changed files with 973 additions and 115 deletions.
9 changes: 8 additions & 1 deletion daikoku/app/controllers/TranslationController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,14 @@ class TranslationController(
}
}
.groupBy(_.key)
.map(v => (v._1, v._2.map(TranslationFormat.writes), defaultTranslations.find(p => p.key == v._1).map(_.value).getOrElse("")))
.map(
v =>
(v._1,
v._2.map(TranslationFormat.writes),
defaultTranslations
.find(p => p.key == v._1)
.map(_.value)
.getOrElse("")))
)
else
Json.obj(
Expand Down
3 changes: 2 additions & 1 deletion daikoku/app/jobs/OtoroshiVerifierJob.scala
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,8 @@ class OtoroshiVerifierJob(client: OtoroshiClient,
case Some(tenant) =>
env.dataStore.apiRepo
.forAllTenant()
.findOneNotDeleted(Json.obj("_id" -> subscription.api.value, "published" -> true))
.findOneNotDeleted(Json.obj("_id" -> subscription.api.value,
"published" -> true))
.map {
case None =>
sendErrorNotification(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,14 @@ const MarkdownComponent = ({
</Suspense>
);

const Collapse = ({ label, children, edited, toggleTranslation, translationKey, defaultTranslation }) => {
const Collapse = ({
label,
children,
edited,
toggleTranslation,
translationKey,
defaultTranslation,
}) => {
function getRequiredVariables(str) {
let dels = [];
const words = [];
Expand Down
14 changes: 10 additions & 4 deletions daikoku/javascript/src/components/frontend/api/ApiHome.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,12 @@ const ApiHomeComponent = ({
setApi(api);
setSubscriptions(subscriptions);
setPendingSubscriptions(requests);
setMyTeams(myTeams.map(team => ({ ...team, users: team.users.map(us => ({ ...us, ...us.user })) })));
setMyTeams(
myTeams.map((team) => ({
...team,
users: team.users.map((us) => ({ ...us, ...us.user })),
}))
);
}
}
);
Expand Down Expand Up @@ -303,7 +308,7 @@ const ApiHomeComponent = ({
<h1 style={{ margin: 0 }}>{showAccessModal.error}</h1>
{(teams.length === 1 &&
(pendingTeams.includes(teams[0]._id) || authorizedTeams.includes(teams[0]._id))) ||
showAccessModal.api.authorizations.every((auth) => auth.pending && !auth.authorized) ? (
showAccessModal.api.authorizations.every((auth) => auth.pending && !auth.authorized) ? (
<>
<h2 className="text-center my-3">{translateMethod('request_already_pending')}</h2>
<button
Expand Down Expand Up @@ -390,8 +395,9 @@ const ApiHomeComponent = ({
</li>
<li className="nav-item">
<Link
className={`nav-link ${tab === 'documentation' || tab === 'documentation-page' ? 'active' : ''
}`}
className={`nav-link ${
tab === 'documentation' || tab === 'documentation-page' ? 'active' : ''
}`}
to={`/${match.params.teamId}/${apiId}/${versionId}/documentation`}>
<Translation i18nkey="Documentation">Documentation</Translation>
</Link>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,25 @@ export const ApiKeySelectModal = ({ closeModal, onSubscribe, plan, apiKeys, ...p
};

const ApiKeysView = ({ apiKeys, extendApiKey }) => {
const { translateMethod } = useContext(I18nContext)
return <div>
<h5 className="modal-title">{translateMethod('apikey_select_modal.select_your_api_key')}</h5>
<div className="team-selection__container">
{apiKeys.map((apiKey) => (
<div
key={apiKey._id}
className="team-selection team-selection__team selectable mt-1"
onClick={() => extendApiKey(apiKey)}>
<span className="ml-2">{`${apiKey.apiName}/${apiKey.customName || apiKey.planType
const { translateMethod } = useContext(I18nContext);
return (
<div>
<h5 className="modal-title">{translateMethod('apikey_select_modal.select_your_api_key')}</h5>
<div className="team-selection__container">
{apiKeys.map((apiKey) => (
<div
key={apiKey._id}
className="team-selection team-selection__team selectable mt-1"
onClick={() => extendApiKey(apiKey)}>
<span className="ml-2">{`${apiKey.apiName}/${
apiKey.customName || apiKey.planType
}`}</span>
</div>
))}
</div>
))}
</div>
</div>
</div>
}
);
};

const SelectOrCreateApiKey = ({ create, disableExtendButton, aggregationApiKeysSecurity }) => {
const Button = ({ onClick, message, icon, disabled }) => (
Expand Down
8 changes: 6 additions & 2 deletions docs/manual/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
<li><a href="tenantusage/2-teams.html" class="page">Managing teams</a></li>
<li><a href="tenantusage/3-assets.html" class="page">Managing assets</a></li>
<li><a href="tenantusage/4-messages.html" class="page">User messages</a></li>
<li><a href="tenantusage/5-translations.html" class="page">Translate mail content and front office</a></li>
</ul></li>
<li><a href="producerusage/index.html" class="page">Using Daikoku as api producer</a>
<ul>
Expand All @@ -83,7 +84,8 @@
<ul>
<li><a href="consumerusage/1-subscribe.html" class="page">Subscribe to an api</a></li>
<li><a href="consumerusage/2-apikeys.html" class="page">Manage APIkeys</a></li>
<li><a href="consumerusage/3-billing.html" class="page">Team billing</a></li>
<li><a href="consumerusage/3-aggregation-of-apikeys.html" class="page">Use an api key on multiple apis</a></li>
<li><a href="consumerusage/4-billing.html" class="page">Team billing</a></li>
</ul></li>
<li><a href="integrations.html" class="page">Integrations API</a></li>
<li><a href="apis.html" class="page">Admin REST API</a></li>
Expand Down Expand Up @@ -161,6 +163,7 @@
<li><a href="tenantusage/2-teams.html" class="page">Managing teams</a></li>
<li><a href="tenantusage/3-assets.html" class="page">Managing assets</a></li>
<li><a href="tenantusage/4-messages.html" class="page">User messages</a></li>
<li><a href="tenantusage/5-translations.html" class="page">Translate mail content and front office</a></li>
</ul></li>
<li><a href="producerusage/index.html" class="page">Using Daikoku as api producer</a>
<ul>
Expand All @@ -174,7 +177,8 @@
<ul>
<li><a href="consumerusage/1-subscribe.html" class="page">Subscribe to an api</a></li>
<li><a href="consumerusage/2-apikeys.html" class="page">Manage APIkeys</a></li>
<li><a href="consumerusage/3-billing.html" class="page">Team billing</a></li>
<li><a href="consumerusage/3-aggregation-of-apikeys.html" class="page">Use an api key on multiple apis</a></li>
<li><a href="consumerusage/4-billing.html" class="page">Team billing</a></li>
</ul></li>
<li><a href="integrations.html" class="page">Integrations API</a></li>
<li><a href="apis.html" class="page">Admin REST API</a></li>
Expand Down
8 changes: 6 additions & 2 deletions docs/manual/adminusage/1-tenants.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
<li><a href="../tenantusage/2-teams.html" class="page">Managing teams</a></li>
<li><a href="../tenantusage/3-assets.html" class="page">Managing assets</a></li>
<li><a href="../tenantusage/4-messages.html" class="page">User messages</a></li>
<li><a href="../tenantusage/5-translations.html" class="page">Translate mail content and front office</a></li>
</ul></li>
<li><a href="../producerusage/index.html" class="page">Using Daikoku as api producer</a>
<ul>
Expand All @@ -83,7 +84,8 @@
<ul>
<li><a href="../consumerusage/1-subscribe.html" class="page">Subscribe to an api</a></li>
<li><a href="../consumerusage/2-apikeys.html" class="page">Manage APIkeys</a></li>
<li><a href="../consumerusage/3-billing.html" class="page">Team billing</a></li>
<li><a href="../consumerusage/3-aggregation-of-apikeys.html" class="page">Use an api key on multiple apis</a></li>
<li><a href="../consumerusage/4-billing.html" class="page">Team billing</a></li>
</ul></li>
<li><a href="../integrations.html" class="page">Integrations API</a></li>
<li><a href="../apis.html" class="page">Admin REST API</a></li>
Expand Down Expand Up @@ -161,6 +163,7 @@
<li><a href="../tenantusage/2-teams.html" class="page">Managing teams</a></li>
<li><a href="../tenantusage/3-assets.html" class="page">Managing assets</a></li>
<li><a href="../tenantusage/4-messages.html" class="page">User messages</a></li>
<li><a href="../tenantusage/5-translations.html" class="page">Translate mail content and front office</a></li>
</ul></li>
<li><a href="../producerusage/index.html" class="page">Using Daikoku as api producer</a>
<ul>
Expand All @@ -174,7 +177,8 @@
<ul>
<li><a href="../consumerusage/1-subscribe.html" class="page">Subscribe to an api</a></li>
<li><a href="../consumerusage/2-apikeys.html" class="page">Manage APIkeys</a></li>
<li><a href="../consumerusage/3-billing.html" class="page">Team billing</a></li>
<li><a href="../consumerusage/3-aggregation-of-apikeys.html" class="page">Use an api key on multiple apis</a></li>
<li><a href="../consumerusage/4-billing.html" class="page">Team billing</a></li>
</ul></li>
<li><a href="../integrations.html" class="page">Integrations API</a></li>
<li><a href="../apis.html" class="page">Admin REST API</a></li>
Expand Down
8 changes: 6 additions & 2 deletions docs/manual/adminusage/2-users.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
<li><a href="../tenantusage/2-teams.html" class="page">Managing teams</a></li>
<li><a href="../tenantusage/3-assets.html" class="page">Managing assets</a></li>
<li><a href="../tenantusage/4-messages.html" class="page">User messages</a></li>
<li><a href="../tenantusage/5-translations.html" class="page">Translate mail content and front office</a></li>
</ul></li>
<li><a href="../producerusage/index.html" class="page">Using Daikoku as api producer</a>
<ul>
Expand All @@ -83,7 +84,8 @@
<ul>
<li><a href="../consumerusage/1-subscribe.html" class="page">Subscribe to an api</a></li>
<li><a href="../consumerusage/2-apikeys.html" class="page">Manage APIkeys</a></li>
<li><a href="../consumerusage/3-billing.html" class="page">Team billing</a></li>
<li><a href="../consumerusage/3-aggregation-of-apikeys.html" class="page">Use an api key on multiple apis</a></li>
<li><a href="../consumerusage/4-billing.html" class="page">Team billing</a></li>
</ul></li>
<li><a href="../integrations.html" class="page">Integrations API</a></li>
<li><a href="../apis.html" class="page">Admin REST API</a></li>
Expand Down Expand Up @@ -161,6 +163,7 @@
<li><a href="../tenantusage/2-teams.html" class="page">Managing teams</a></li>
<li><a href="../tenantusage/3-assets.html" class="page">Managing assets</a></li>
<li><a href="../tenantusage/4-messages.html" class="page">User messages</a></li>
<li><a href="../tenantusage/5-translations.html" class="page">Translate mail content and front office</a></li>
</ul></li>
<li><a href="../producerusage/index.html" class="page">Using Daikoku as api producer</a>
<ul>
Expand All @@ -174,7 +177,8 @@
<ul>
<li><a href="../consumerusage/1-subscribe.html" class="page">Subscribe to an api</a></li>
<li><a href="../consumerusage/2-apikeys.html" class="page">Manage APIkeys</a></li>
<li><a href="../consumerusage/3-billing.html" class="page">Team billing</a></li>
<li><a href="../consumerusage/3-aggregation-of-apikeys.html" class="page">Use an api key on multiple apis</a></li>
<li><a href="../consumerusage/4-billing.html" class="page">Team billing</a></li>
</ul></li>
<li><a href="../integrations.html" class="page">Integrations API</a></li>
<li><a href="../apis.html" class="page">Admin REST API</a></li>
Expand Down
8 changes: 6 additions & 2 deletions docs/manual/adminusage/3-sessions.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
<li><a href="../tenantusage/2-teams.html" class="page">Managing teams</a></li>
<li><a href="../tenantusage/3-assets.html" class="page">Managing assets</a></li>
<li><a href="../tenantusage/4-messages.html" class="page">User messages</a></li>
<li><a href="../tenantusage/5-translations.html" class="page">Translate mail content and front office</a></li>
</ul></li>
<li><a href="../producerusage/index.html" class="page">Using Daikoku as api producer</a>
<ul>
Expand All @@ -83,7 +84,8 @@
<ul>
<li><a href="../consumerusage/1-subscribe.html" class="page">Subscribe to an api</a></li>
<li><a href="../consumerusage/2-apikeys.html" class="page">Manage APIkeys</a></li>
<li><a href="../consumerusage/3-billing.html" class="page">Team billing</a></li>
<li><a href="../consumerusage/3-aggregation-of-apikeys.html" class="page">Use an api key on multiple apis</a></li>
<li><a href="../consumerusage/4-billing.html" class="page">Team billing</a></li>
</ul></li>
<li><a href="../integrations.html" class="page">Integrations API</a></li>
<li><a href="../apis.html" class="page">Admin REST API</a></li>
Expand Down Expand Up @@ -161,6 +163,7 @@
<li><a href="../tenantusage/2-teams.html" class="page">Managing teams</a></li>
<li><a href="../tenantusage/3-assets.html" class="page">Managing assets</a></li>
<li><a href="../tenantusage/4-messages.html" class="page">User messages</a></li>
<li><a href="../tenantusage/5-translations.html" class="page">Translate mail content and front office</a></li>
</ul></li>
<li><a href="../producerusage/index.html" class="page">Using Daikoku as api producer</a>
<ul>
Expand All @@ -174,7 +177,8 @@
<ul>
<li><a href="../consumerusage/1-subscribe.html" class="page">Subscribe to an api</a></li>
<li><a href="../consumerusage/2-apikeys.html" class="page">Manage APIkeys</a></li>
<li><a href="../consumerusage/3-billing.html" class="page">Team billing</a></li>
<li><a href="../consumerusage/3-aggregation-of-apikeys.html" class="page">Use an api key on multiple apis</a></li>
<li><a href="../consumerusage/4-billing.html" class="page">Team billing</a></li>
</ul></li>
<li><a href="../integrations.html" class="page">Integrations API</a></li>
<li><a href="../apis.html" class="page">Admin REST API</a></li>
Expand Down
8 changes: 6 additions & 2 deletions docs/manual/adminusage/4-importexport.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
<li><a href="../tenantusage/2-teams.html" class="page">Managing teams</a></li>
<li><a href="../tenantusage/3-assets.html" class="page">Managing assets</a></li>
<li><a href="../tenantusage/4-messages.html" class="page">User messages</a></li>
<li><a href="../tenantusage/5-translations.html" class="page">Translate mail content and front office</a></li>
</ul></li>
<li><a href="../producerusage/index.html" class="page">Using Daikoku as api producer</a>
<ul>
Expand All @@ -83,7 +84,8 @@
<ul>
<li><a href="../consumerusage/1-subscribe.html" class="page">Subscribe to an api</a></li>
<li><a href="../consumerusage/2-apikeys.html" class="page">Manage APIkeys</a></li>
<li><a href="../consumerusage/3-billing.html" class="page">Team billing</a></li>
<li><a href="../consumerusage/3-aggregation-of-apikeys.html" class="page">Use an api key on multiple apis</a></li>
<li><a href="../consumerusage/4-billing.html" class="page">Team billing</a></li>
</ul></li>
<li><a href="../integrations.html" class="page">Integrations API</a></li>
<li><a href="../apis.html" class="page">Admin REST API</a></li>
Expand Down Expand Up @@ -161,6 +163,7 @@
<li><a href="../tenantusage/2-teams.html" class="page">Managing teams</a></li>
<li><a href="../tenantusage/3-assets.html" class="page">Managing assets</a></li>
<li><a href="../tenantusage/4-messages.html" class="page">User messages</a></li>
<li><a href="../tenantusage/5-translations.html" class="page">Translate mail content and front office</a></li>
</ul></li>
<li><a href="../producerusage/index.html" class="page">Using Daikoku as api producer</a>
<ul>
Expand All @@ -174,7 +177,8 @@
<ul>
<li><a href="../consumerusage/1-subscribe.html" class="page">Subscribe to an api</a></li>
<li><a href="../consumerusage/2-apikeys.html" class="page">Manage APIkeys</a></li>
<li><a href="../consumerusage/3-billing.html" class="page">Team billing</a></li>
<li><a href="../consumerusage/3-aggregation-of-apikeys.html" class="page">Use an api key on multiple apis</a></li>
<li><a href="../consumerusage/4-billing.html" class="page">Team billing</a></li>
</ul></li>
<li><a href="../integrations.html" class="page">Integrations API</a></li>
<li><a href="../apis.html" class="page">Admin REST API</a></li>
Expand Down
8 changes: 6 additions & 2 deletions docs/manual/adminusage/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
<li><a href="../tenantusage/2-teams.html" class="page">Managing teams</a></li>
<li><a href="../tenantusage/3-assets.html" class="page">Managing assets</a></li>
<li><a href="../tenantusage/4-messages.html" class="page">User messages</a></li>
<li><a href="../tenantusage/5-translations.html" class="page">Translate mail content and front office</a></li>
</ul></li>
<li><a href="../producerusage/index.html" class="page">Using Daikoku as api producer</a>
<ul>
Expand All @@ -83,7 +84,8 @@
<ul>
<li><a href="../consumerusage/1-subscribe.html" class="page">Subscribe to an api</a></li>
<li><a href="../consumerusage/2-apikeys.html" class="page">Manage APIkeys</a></li>
<li><a href="../consumerusage/3-billing.html" class="page">Team billing</a></li>
<li><a href="../consumerusage/3-aggregation-of-apikeys.html" class="page">Use an api key on multiple apis</a></li>
<li><a href="../consumerusage/4-billing.html" class="page">Team billing</a></li>
</ul></li>
<li><a href="../integrations.html" class="page">Integrations API</a></li>
<li><a href="../apis.html" class="page">Admin REST API</a></li>
Expand Down Expand Up @@ -161,6 +163,7 @@
<li><a href="../tenantusage/2-teams.html" class="page">Managing teams</a></li>
<li><a href="../tenantusage/3-assets.html" class="page">Managing assets</a></li>
<li><a href="../tenantusage/4-messages.html" class="page">User messages</a></li>
<li><a href="../tenantusage/5-translations.html" class="page">Translate mail content and front office</a></li>
</ul></li>
<li><a href="../producerusage/index.html" class="page">Using Daikoku as api producer</a>
<ul>
Expand All @@ -174,7 +177,8 @@
<ul>
<li><a href="../consumerusage/1-subscribe.html" class="page">Subscribe to an api</a></li>
<li><a href="../consumerusage/2-apikeys.html" class="page">Manage APIkeys</a></li>
<li><a href="../consumerusage/3-billing.html" class="page">Team billing</a></li>
<li><a href="../consumerusage/3-aggregation-of-apikeys.html" class="page">Use an api key on multiple apis</a></li>
<li><a href="../consumerusage/4-billing.html" class="page">Team billing</a></li>
</ul></li>
<li><a href="../integrations.html" class="page">Integrations API</a></li>
<li><a href="../apis.html" class="page">Admin REST API</a></li>
Expand Down
Loading

0 comments on commit 24f9beb

Please sign in to comment.