-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0e14c35
commit c650b27
Showing
8 changed files
with
153 additions
and
1 deletion.
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