-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Eula #349
Merged
Merged
Eula #349
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
import React, { Fragment } from 'react'; | ||
import { useSelector, useDispatch } from 'react-redux'; | ||
|
||
import Button from '@components/Button'; | ||
import Modal from '@components/Modal'; | ||
|
||
const Eula = () => { | ||
const eulaVisible = useSelector((state) => state.settings.eulaVisible); | ||
const dispatch = useDispatch(); | ||
|
||
return ( | ||
<Fragment> | ||
<Modal title="License agreement" open={eulaVisible} onClose={() => {}}> | ||
<div className="mb-4"> | ||
<div className="row"> | ||
<div> | ||
<p className="my-2"> | ||
Trento, an open cloud-native web console improving the life of | ||
SAP Applications administrators | ||
</p> | ||
<hr /> | ||
<p className="mt-2"> | ||
Trento is an open source (Apache License 2.0) component that is | ||
supported as part of SUSE Linux Enterprise Server for SAP | ||
applications and therefore falls under the standard SUSE Terms | ||
and Conditions that can be reviewed at{' '} | ||
<a href="https://www.suse.com/products/terms_and_conditions.pdf"> | ||
https://www.suse.com/products/terms_and_conditions.pdf | ||
</a> | ||
, SUSE EULA is available at{' '} | ||
<a href="https://www.suse.com/licensing/eula/#server"> | ||
https://www.suse.com/licensing/eula/#server | ||
</a> | ||
. | ||
</p> | ||
|
||
<p className="mt-2"> | ||
By using Trento via a registered SUSE Linux Enterprise Server | ||
for SAP you agree to the Terms and Conditions also for Trento. | ||
</p> | ||
|
||
<p className="mt-2"> | ||
Trento collects the following KPIs on your environment and | ||
transmits it to SUSE: | ||
</p> | ||
<ul className="mt-2 pl-8 list-disc"> | ||
<li>SUSE Customer Center ID</li> | ||
<li>Number of registered hosts in Trento</li> | ||
<li> | ||
For each of those hosts: | ||
<ul className="list-disc pl-8"> | ||
<li>SLES version</li> | ||
<li>Number of sockets and total count of cores per host</li> | ||
<li>Available memory per host</li> | ||
<li> | ||
Hosting platform (Cloud service provider, Hypervisor or | ||
bare metal) | ||
</li> | ||
<li>List of running SAP instances</li> | ||
<li>Statistics about Trento checks configuration</li> | ||
</ul> | ||
</li> | ||
</ul> | ||
|
||
<p className="mt-2"> | ||
Trento neither collects, processes or sends any personal data to | ||
SUSE. | ||
</p> | ||
|
||
<p className="mt-2"> | ||
By using Trento Premium and its updates available through SUSE | ||
channels you agree to these terms. In case you disagree, please | ||
switch to the Community version of Trento. | ||
</p> | ||
<div className="grid justify-items-end mt-8 pr-4"> | ||
<Button | ||
type="primary" | ||
className="w-24" | ||
onClick={() => dispatch({ type: 'ACCEPT_EULA' })} | ||
> | ||
Accept | ||
</Button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</Modal> | ||
</Fragment> | ||
); | ||
}; | ||
|
||
export default Eula; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import Eula from './Eula'; | ||
|
||
export default Eula; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { put, call, takeEvery } from 'redux-saga/effects'; | ||
import { post } from 'axios'; | ||
|
||
import { acceptEula } from '@state/settings'; | ||
import { logError } from '@lib/log'; | ||
|
||
export function* acceptEulaSaga() { | ||
try { | ||
yield call(post, '/api/accept_eula'); | ||
yield put(acceptEula()); | ||
} catch (error) { | ||
logError(error); | ||
} | ||
} | ||
|
||
export function* watchAcceptEula() { | ||
yield takeEvery('ACCEPT_EULA', acceptEulaSaga); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { createSlice } from '@reduxjs/toolkit'; | ||
|
||
const initialState = { | ||
eulaVisible: false, | ||
}; | ||
|
||
export const settingsSlice = createSlice({ | ||
name: 'settings', | ||
initialState, | ||
reducers: { | ||
setEulaVisible: (state) => { | ||
state.eulaVisible = true; | ||
}, | ||
acceptEula: (state) => { | ||
state.eulaVisible = false; | ||
}, | ||
}, | ||
}); | ||
|
||
export const { setEulaVisible, acceptEula } = settingsSlice.actions; | ||
|
||
export default settingsSlice.reducer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
defmodule TrentoWeb.SettingsController do | ||
use TrentoWeb, :controller | ||
|
||
alias Trento.Installation | ||
|
||
def settings(conn, _) do | ||
conn | ||
|> json(%{ | ||
eula_accepted: Installation.eula_accepted?(), | ||
premium_subscription: Installation.premium_active?() | ||
}) | ||
end | ||
|
||
def accept_eula(conn, _) do | ||
:ok = Installation.accept_eula() | ||
|
||
conn |> json(%{}) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should be
:apikey_authenticated
.PS rebase on main