Skip to content

Commit

Permalink
Merge branch 'master' into feat/#728
Browse files Browse the repository at this point in the history
  • Loading branch information
quentinovega committed Oct 8, 2024
2 parents 8494429 + 47c82e8 commit bd5a612
Show file tree
Hide file tree
Showing 18 changed files with 107 additions and 76 deletions.
44 changes: 22 additions & 22 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,28 +64,28 @@ jobs:
git config --local user.name "daikoku-github-actions"
git add --all
git commit -am "Update version number before release"
# - name: build manual
# id: manual
# run: |
# cd manual
# sbt "release release-version ${{ github.event.inputs.releaseversion }}"
# cd ..
# sh ./scripts/build.sh manual
# echo "diff=$(git diff --numstat | wc -l)" >> $GITHUB_OUTPUT
# cd ..
# - name: Commit manual
# if: steps.manual.outputs.diff != '0'
# run: |
# git config --local user.email "[email protected]"
# git config --local user.name "daikoku-github-actions"
# git add --all
# git commit -am "Update documentation before release"
# - name: Push manual
# uses: ad-m/github-push-action@master
# if: steps.manual.outputs.diff != '0'
# with:
# branch: ${{ github.ref }}
# github_token: ${{ secrets.GITHUB_TOKEN}}
- name: build manual
id: manual
run: |
cd manual
sbt "release release-version ${{ github.event.inputs.releaseversion }}"
cd ..
sh ./scripts/build.sh manual
echo "diff=$(git diff --numstat | wc -l)" >> $GITHUB_OUTPUT
cd ..
- name: Commit manual
if: steps.manual.outputs.diff != '0'
run: |
git config --local user.email "[email protected]"
git config --local user.name "daikoku-github-actions"
git add --all
git commit -am "Update documentation before release"
- name: Push manual
uses: ad-m/github-push-action@master
if: steps.manual.outputs.diff != '0'
with:
branch: ${{ github.ref }}
github_token: ${{ secrets.GITHUB_TOKEN}}
# release sbt (with auto commit tag)
- name: release sbt
run: |
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,9 @@ daikoku/public/assets/
daikoku/public/index.html
daikoku/public/index*
daikoku/public/fa-*
daikoku/public/asciidoctor-*
daikoku/public/asyncapi-*
daikoku/public/backofffice-*
daikoku/public/highlight-*
daikoku/public/swagger-*
stats.html
22 changes: 22 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -625,3 +625,25 @@ We'd like to thank all the contributors who worked on this release!
- Lack of translation [#700](https://github.com/MAIF/daikoku/issues/700)
- API testing UI is broken [#699](https://github.com/MAIF/daikoku/issues/699)

## [v17.5.0] - 2024-09-17

## :star: New Features

- Hide personal teams if security prohibits personal teams from subscribing [#740](https://github.com/MAIF/daikoku/issues/740)
- add a control for environment name for subscription aggregation [#714](https://github.com/MAIF/daikoku/issues/714)
- Add a way to disable part of aggragation [#711](https://github.com/MAIF/daikoku/issues/711)
- Allow to transfer subscriptions ownership [#708](https://github.com/MAIF/daikoku/issues/708)
- Add HTTP links everywhere, it’s unusable in practice sometimes. [#696](https://github.com/MAIF/daikoku/issues/696)
- display S3 bucket example to avoid S3Exception [#622](https://github.com/MAIF/daikoku/issues/622)

## :beetle: Bug Fixes

- User can't go in home page from daikoku [#741](https://github.com/MAIF/daikoku/issues/741)
- No UI [#735](https://github.com/MAIF/daikoku/issues/735)
- Crash on notification page in case of unknown team in action property [#720](https://github.com/MAIF/daikoku/issues/720)
- [productor view]subscription table is not refresh after enable/disable apikey [#715](https://github.com/MAIF/daikoku/issues/715)
- Update parent subscription in aggregation does not update childs [#710](https://github.com/MAIF/daikoku/issues/710)
- 2FA inputs don't work if code begin with 0 [#701](https://github.com/MAIF/daikoku/issues/701)
- translation for validation step [#697](https://github.com/MAIF/daikoku/issues/697)
- Delete Tag, delete all the tags [#694](https://github.com/MAIF/daikoku/issues/694)

10 changes: 5 additions & 5 deletions daikoku/app/domain/tenantEntities.scala
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ case class DaikokuStyle(
--card_header-bg-color: #404040;
--card_header-text-color: #fff;
--card_bg-color: #282828;
--card_text-color: #fff;
--card_link-color: #b3b3b3;
--card_link-hover-color: orange;
--card_text-color: #fff;
--card_link-color: #97b0c7;
--card_link-hover-color : #a9cbea;

--btn-bg-color: #fff;
--btn-text-color: #495057;
Expand Down Expand Up @@ -143,8 +143,8 @@ case class DaikokuStyle(
--card_header-text-color: #fff;
--card_bg-color: #282828;
--card_text-color: #fff;
--card_link-color: #b3b3b3;
--card_link-hover-color: orange;
--card_link-color: #97b0c7;
--card_link-hover-color : #a9cbea;


--btn-bg-color: #fff;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -593,8 +593,8 @@ export const ApiKeyCard = ({
console.debug({ subscription })
return (
<div className='api-subscription'>
<div className="api-subscription__container">
<div className='api-subscription__icon'>
<div className="api-subscription__container flex-column flex-xl-row">
<div className='api-subscription__icon flex-row flex-xl-column'>
{subscription.children.length === 0 && <i className={"fa-solid icon fa-key"} />}
{subscription.children.length > 0 && <svg
width="32"
Expand All @@ -604,7 +604,7 @@ export const ApiKeyCard = ({
>
<path d="M60.78,43.44c-1.49,0.81-3.35,0.26-4.15-1.22c-0.81-1.49-0.26-3.35,1.23-4.15c7.04-3.82,10.32-8.76,10.98-13.59 c0.35-2.58-0.05-5.17-1.02-7.57c-0.99-2.43-2.56-4.64-4.55-6.42c-3.87-3.46-9.3-5.28-14.97-3.87c-2.3,0.57-4.29,1.72-6.03,3.34 c-1.85,1.72-3.45,3.97-4.85,6.63c-0.79,1.5-2.64,2.07-4.13,1.29c-1.5-0.79-2.07-2.64-1.29-4.13c1.72-3.26,3.73-6.06,6.11-8.28 c2.49-2.31,5.38-3.97,8.74-4.8c7.8-1.93,15.23,0.53,20.51,5.25c2.68,2.4,4.81,5.39,6.15,8.69c1.35,3.33,1.9,6.99,1.39,10.7 C73.99,31.93,69.75,38.57,60.78,43.44L60.78,43.44z M37.32,67.61c-11.6-15.58-11.88-30.34,2.2-44.06l-10.14-5.6 C21.26,14.79,6.36,38.08,12.12,44.3l7.9,11.72l-1.63,3.4c-0.45,1.01-0.01,1.72,1.09,2.21l1.07,0.29L0,102.59l4.16,8.87l8.32-2.45 l2.14-4.16l-2.05-3.84l4.52-0.97L18.14,98l-2.36-3.6l1.55-3.01l4.51-0.57l1.47-2.85l-2.52-3.29l1.61-3.12l4.6-0.75l6.26-11.95 l1.06,0.58C36.16,70.56,37.11,69.84,37.32,67.61L37.32,67.61z M59.15,77.38l-3.06,11.42l-4.25,1.68l-0.89,3.33l3.1,2.63l-0.81,3.03 l-4.2,1.48l-0.86,3.2l3.01,2.95l-0.58,2.17l-4.13,1.87l2.76,3.25l-1.19,4.43l-7.45,4.07l-5.82-7.63l11.1-41.43l-2.69-0.72 c-0.55-0.15-0.89-0.72-0.74-1.28l1.13-4.21c-8.14-6.17-12.17-16.85-9.37-27.32c3.6-13.45,17.18-21.57,30.64-18.55 c0.06,0.72,0.05,1.45-0.05,2.18c-0.25,1.82-1.04,3.69-2.5,5.5c-0.2,0.24-0.41,0.49-0.63,0.73c-4.3-0.28-8.33,2.5-9.49,6.82 c-0.5,1.86-0.39,3.74,0.2,5.43c0.14,0.6,0.37,1.18,0.67,1.75c0.71,1.3,1.75,2.29,2.97,2.92c0.8,0.53,1.7,0.93,2.67,1.2 c4.83,1.29,9.78-1.49,11.22-6.24c1.46-1.29,2.73-2.65,3.82-4.05c2.12-2.73,3.57-5.63,4.43-8.58c5.84,6.3,8.41,15.37,6.02,24.29 c-2.8,10.47-11.65,17.71-21.77,18.98l-1.13,4.21c-0.15,0.55-0.72,0.89-1.28,0.74L59.15,77.38L59.15,77.38z" />
</svg>}
<div className='api-subscription__value__type'>
<div className='api-subscription__value__type ms-2 ms-xl-0'>
<span className='api-subscription__value__label'>
{subscription.enabled ? translate("subscription.enable.label") : translate("subscription.disable.label")}
</span>
Expand Down Expand Up @@ -720,18 +720,7 @@ export const ApiKeyCard = ({
>
{translate("subscription.custom.name.update.label")}
</span>
{!subscription.parent && !disableRotation && <span
className="dropdown-item cursor-pointer"
onClick={() => openFormModal({
title: translate("ApiKey rotation"),
actionLabel: translate('Save'),
schema: settingsSchema,
onSubmit: (data) => handleChanges(data),
value: subscription.rotation
})}
>
{translate("subscription.rotation.update.label")}
</span>}

{subscription.children.length > 0 && <span
className="dropdown-item cursor-pointer"
onClick={() => openRightPanel({
Expand All @@ -758,20 +747,26 @@ export const ApiKeyCard = ({
{translate("subscription.show.aggregate.label")}
</span>}
<div className="dropdown-divider" />
{!subscription.parent && <span
className="dropdown-item cursor-pointer danger"
onClick={regenerateSecret}
{!subscription.parent && !disableRotation && <span
className="dropdown-item cursor-pointer"
onClick={() => openFormModal({
title: translate("ApiKey rotation"),
actionLabel: translate('Save'),
schema: settingsSchema,
onSubmit: (data) => handleChanges(data),
value: subscription.rotation
})}
>
{translate("subscription.reset.secret.label")}
{translate("subscription.rotation.update.label")}
</span>}
{!subscription.parent && <span
className="dropdown-item cursor-pointer danger"
className="dropdown-item cursor-pointer "
onClick={transferKey}
>
{translate("subscription.transfer.label")}
</span>}
<span
className={classNames("dropdown-item cursor-pointer danger", {
className={classNames("dropdown-item cursor-pointer", {
disabled: subscription.parent && !subscription.parentUp
})}
onClick={() => {
Expand All @@ -783,6 +778,12 @@ export const ApiKeyCard = ({
{subscription.enabled ? translate("subscription.disable.button.label") : translate("subscription.enable.button.label")}
</span>
<div className="dropdown-divider" />
{!subscription.parent && <span
className="dropdown-item cursor-pointer danger"
onClick={regenerateSecret}
>
{translate("subscription.reset.secret.label")}
</span>}
{subscription.parent && <span
className="dropdown-item cursor-pointer danger"
onClick={makeUniqueApiKey}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export function ApiFilter({

const options: readonly VersionOption[] = [
...availableApiVersions.map((iss) => ({ value: iss, label: `Version : ${iss}` })),
{ value: 'all version', label: 'All version' },
{ value: 'all version', label: `${translate('All version')}` },
]

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ export function ApiIssue({
const [api, setRootApi] = useState<IApi>();

const [filter, setFilter] = useState('open');
const [selectedVersion, setSelectedVersion] = useState({ value: 'all version', label: 'All version' });

const { translate } = useContext(I18nContext);

const [selectedVersion, setSelectedVersion] = useState({ value: 'all version', label: `${translate('All version')}` });

useEffect(() => {
Services.getRootApi(props.api._humanReadableId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export const SettingsPanel = ({ }) => {
<div className="mb-1 block__category">{translate('settings')}</div>
<div className="ms-2 block__entries block__border d-flex flex-column">
<Link to="/settings/settings/general" className="block__entry__link">
{tenant.name} {translate('settings')}
{tenant.name}
</Link>
{connectedUser.isDaikokuAdmin && (
<Link to="/settings/tenants" className="block__entry__link">
Expand Down
3 changes: 2 additions & 1 deletion daikoku/javascript/src/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,7 @@
"help.apikey.grace.period": "Period during which the new client secret and the old are both active. The rotation period includes this period.",
"constraint.apikey.grace.period": "Grace period must be inferior to rotation period",
"reset.secret.confirm": "Are you sure you want to reset this secret?",
"secret reseted successfully": "secret reseted successfully",
"Integration": "Integration",
"Force apikey auto-rotation": "Force API key auto-rotation",
"ApiKey": "API key",
Expand Down Expand Up @@ -1458,7 +1459,7 @@
"subscription.enable.button.label": "Enable subscription",
"subscription.disable.button.label": "Disable subscription",
"subscription.delete.button.label": "Delete",
"subscription.extract.button.label": "Extract from agg.",
"subscription.extract.button.label": "Extract from aggregate",
"subscription.enable.label": "Enabled",
"subscription.disable.label": "Disabled",
"subscriptions.hide.link": "Hide link",
Expand Down
7 changes: 4 additions & 3 deletions daikoku/javascript/src/locales/fr/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -602,12 +602,13 @@
"rotation.error.message": "Vous ne pouvez pas activer/désactiver la rotation automatique de la clé d'API car le plan force celle-ci.",
"notif.apikey.rotation.inprogress": "Votre clé d'API avec le clientId %s a débuté sa rotation. Son clientSecret a été modifié.",
"notif.apikey.rotation.ended": "Votre clé d'API avec le clientId %s a terminé sa rotation.",
"Rotation period": "Période de rotation",
"Grace period": "Période de tuilage",
"Rotation period": "Période de rotation (heures)",
"Grace period": "Période de tuilage (heures)",
"help.apikey.rotation.period": "Période après laquelle le secret sera automatiquement modifié",
"help.apikey.grace.period": "Période pendant laquelle le nouveau secret et l'ancien sont tous deux actifs (cette période est inclue dans la période de rotation).",
"constraint.apikey.grace.period": "La période de tuilage doit être inferieur à la période de rotation",
"reset.secret.confirm": "Êtes-vous certain de vouloir réinitialiser le secret ?",
"secret reseted successfully": "Secret réinitialisé avec succès",
"Integration": "Intégration",
"Force apikey auto-rotation": "Forcer la rotation auto. des secrets",
"ApiKey": "Clé d'API",
Expand Down Expand Up @@ -1438,7 +1439,7 @@
"apikeys.view.api": "Voir l'API",
"apikeys.view.apikeys": "Voir les clés d'API",
"subscription.for": "Souscription à",
"subscription.created.at": "crée le %s",
"subscription.create.at": "Souscription créée le %s\"",
"subscription.valid.until": "valid until %s",
"subscription.nota.part.1": "Consultez la documentation",
"subscription.nota.part.2": "ou explorez",
Expand Down
3 changes: 3 additions & 0 deletions daikoku/javascript/src/style/components/apicard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
}
#dropdownMenuButton {
color: $card-link-color;
&:hover{
color: $card-link-hover-color;
}
}
}

Expand Down
14 changes: 6 additions & 8 deletions daikoku/javascript/src/style/layout/navbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,10 @@ a.navbar-brand,
cursor: pointer;
font-size: 14px;
color: $companion_link-color;
margin-top: 5px;
margin-bottom: 5px;
line-height: 40px;
border-radius: 4px;
padding-left: .5rem;
padding: .5rem;

&:hover {
background-color: $companion_text-hover-bg-color;
Expand All @@ -205,7 +205,6 @@ a.navbar-brand,
.navbar-companion {
z-index: 10;
background-color: $companion_bg-color;
// color: $level1_text-color;
filter: brightness(105%);
height: 100vh;
position: relative;
Expand Down Expand Up @@ -234,11 +233,10 @@ a.navbar-brand,
flex-direction: column;

.companion-title {
// height: 40px;
min-height: 40px;
// min-height: 40px;
margin-bottom: 1rem;
overflow: hidden;
text-overflow: ellipsis;
// overflow: hidden;
// text-overflow: ellipsis;
white-space: nowrap;
line-height: 1.14286;
color: $companion_text-color;
Expand Down Expand Up @@ -271,7 +269,7 @@ a.navbar-brand,
}

&.disabled {
color: lighten(#000, 50%);
opacity: 0.5;
cursor: default;
}

Expand Down
4 changes: 2 additions & 2 deletions daikoku/javascript/src/style/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ $card-header-bg-color : #{"var(--card_header-bg-color, #404040)"};
$card-header-text-color : #{"var(--card-header-text-color, #fff)"};
$card-bg-color: #{"var(--card_bg-color, #282828)"};
$card-text-color: #{"var(--card_text-color, #FFF)"};
$card-link-color: #{"var(--card_link-color, #b3b3b3)"};
$card-link-hover-color: #{"var(--card_link-hover-color, orange)"};
$card-link-color: #{"var(--card_link-color, #97b0c7)"};
$card-link-hover-color: #{"var(--card_link-hover-color, #a9cbea)"};

:export {
successColor: $success-color;
Expand Down
6 changes: 3 additions & 3 deletions daikoku/javascript/tests/connectedUser.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ test('aggregation mode', async ({ page, request }) => {
await page.getByText('API keys', { exact: true }).click();
await page.getByRole('row', { name: 'test API 2 1.0.0' }).getByLabel('view APikey').click();
await page.locator('.api-subscription').locator('.dropdown').click();
await page.getByText('Extract from agg.').click();
await page.getByText('Extract from aggregate').click();
// await page.getByRole('button', { name: 'make unique' }).click();
await expect(page.getByRole('paragraph')).toContainText('Are you sure to make this API key unique and separate from his parent plan?');
await page.getByRole('button', { name: 'Ok', exact: true }).click();
Expand Down Expand Up @@ -595,7 +595,7 @@ test('transfer an api subscription', async ({ page }) => {
await page.waitForResponse(r => r.url().includes('/api/me/context') && r.status() === 200)
await page.waitForSelector('.apis__pagination')
await page.getByRole('heading', { name: 'test API' }).click();

//tester l'url pour verifier que c'est bien la v2
await page.getByText('Plans').click();

Expand All @@ -617,7 +617,7 @@ test('transfer an api subscription', async ({ page }) => {
await page.getByText('Testers').click();
await page.getByRole('button', { name: 'Confirm transfer' }).click();

await page.getByText('Testers').click();
await page.locator('.top__container').filter({hasText: 'Your teams'}).getByText('Testers').click();
await page.getByText('API keys').click();
await page.getByRole('row', { name: 'test API 2.0.0 View API View' }).getByLabel('View APIkeys').click();
expect(page.locator('.api-subscription__infos__value')).toHaveText(apikey)
Expand Down
6 changes: 3 additions & 3 deletions daikoku/public/themes/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
--card_header-bg-color : #404040;
--card_header-text-color: #fff;
--card_bg-color: #282828;
--card_text-color: #fff;
--card_link-color: #ffe1a7;
--card_link-hover-color : #ffc107;
--card_text-color: #fff;
--card_link-color: #97b0c7;
--card_link-hover-color : #a9cbea;

--btn-bg-color: #fff;
--btn-text-color: #495057;
Expand Down
4 changes: 2 additions & 2 deletions daikoku/public/themes/light.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
--card_header-text-color: #fff;
--card_bg-color: #282828;
--card_text-color: #fff;
--card_link-color: #ffe1a7;
--card_link-hover-color : #ffc107;
--card_link-color: #97b0c7;
--card_link-hover-color : #a9cbea;

--btn-bg-color: #fff;
--btn-text-color: #495057;
Expand Down
2 changes: 1 addition & 1 deletion daikoku/version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ThisBuild / version := "17.5.0"
ThisBuild / version := "17.6.0-dev"
2 changes: 1 addition & 1 deletion manual/docs/02-usages/07-adminusage/4-importexport.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ If you want to restore an export, Go to `settings (avatar icon) / Organizations
Since v1.1.1 Daikoku supports Postgresql databases. If you want to migrate you MongoDB to Postgresql, it's dead simple like the following instructions.

:::danger
Since **v17.5.0-rc.2**, Daikoku does not support MongoDB anymore. To run database migration, you need to be in **16.3.6 max**.
Since **v17.5.0**, Daikoku does not support MongoDB anymore. To run database migration, you need to be in **16.3.6 max**.
:::

1. Add your Postgresql access in Daikoku configuration
Expand Down

0 comments on commit bd5a612

Please sign in to comment.