aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/storage/SoftwareProductComponentStorageView.jsx
blob: 9c9600c376024091fe15f45d18300eb03b25a7af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
import React from 'react';
import i18n from 'nfvo-utils/i18n/i18n.js';
import ValidationForm from 'nfvo-components/input/validation/ValidationForm.jsx';
import ValidationInput from'nfvo-components/input/validation/ValidationInput.jsx';


class SoftwareProductComponentStorageView extends React.Component {

	static propTypes = {
		componentId: React.PropTypes.string,
		onQDataChanged: React.PropTypes.func,
		onSubmit: React.PropTypes.func,
		isReadOnlyMode: React.PropTypes.bool
	};

	render() {
		let {qdata, qschema, onQDataChanged, onSubmit, isReadOnlyMode} = this.props;

		return(
			<div className='vsp-component-questionnaire-view'>
				<ValidationForm
					ref='storageValidationForm'
					hasButtons={false}
					onSubmit={() => onSubmit({qdata})}
					className='component-questionnaire-validation-form'
					isReadOnlyMode={isReadOnlyMode}
					onDataChanged={onQDataChanged}
					data={qdata}
					schema={qschema}>

					<div className='section-title'>{i18n('Backup')}</div>
					<div className='rows-section'>
						<div className='row-flex-components input-row'>
							<div className='single-col'>
								<div className='vertical-flex'>
									<label key='label' className='control-label'>{i18n('Backup Type')}</label>
									<div className='radio-options-content-row'>
										<ValidationInput
											label={i18n('On Site')}
											type='radiogroup'
											pointer={'/storage/backup/backupType'}
											className='radio-field'/>
									</div>
								</div>
							</div>
							<div className='single-col'>
								<ValidationInput
									type='text'
									label={i18n('Backup Solution')}
									pointer={'/storage/backup/backupSolution'}
									className='section-field'/>
							</div>
							<div className='single-col'>
								<ValidationInput
									type='text'
									label={i18n('Backup Storage Size (GB)')}
									pointer={'/storage/backup/backupStorageSize'}
									className='section-field'/>
							</div>
							<ValidationInput
								type='select'
								label={i18n('Backup NIC')}
								pointer={'/storage/backup/backupNIC'}
								className='section-field'/>
						</div>
					</div>

					<div className='section-title'>{i18n('Snapshot Backup')}</div>
					<div className='rows-section'>
						<div className='row-flex-components input-row'>
							<div className='single-col'>
								<ValidationInput
									type='text'
									label={i18n('Snapshot Frequency (hours)')}
									pointer={'/storage/snapshotBackup/snapshotFrequency'}
									className='section-field'/>
							</div>
							<div className='empty-two-col' />
							<div className='empty-col' />
						</div>
					</div>

					<div className='section-title'>{i18n('Log Backup')}</div>
					<div className='rows-section'>
						<div className='row-flex-components input-row'>
							<div className='single-col'>
								<ValidationInput
									type='text'
									label={i18n('Size of Log Files (GB)')}
									pointer={'/storage/logBackup/sizeOfLogFiles'}
									className='section-field'/>
								</div>
							<div className='single-col'>
							<ValidationInput
								type='text'
								label={i18n('Log Retention Period (days)')}
								pointer={'/storage/logBackup/logRetentionPeriod'}
								className='section-field'/>
								</div>
							<div className='single-col'>
							<ValidationInput
								type='text'
								label={i18n('Log Backup Frequency (days)')}
								pointer={'/storage/logBackup/logBackupFrequency'}
								className='section-field'/>
							</div>
							<ValidationInput
								type='text'
								label={i18n('Log File Location')}
								pointer={'/storage/logBackup/logFileLocation'}
								className='section-field'/>
						</div>
					</div>
				</ValidationForm>
			</div>
		);
	}

	save(){
		return this.refs.storageValidationForm.handleFormSubmit(new Event('dummy'));
	}
}

export default SoftwareProductComponentStorageView;