mirror of https://github.com/grafana/grafana
Migration: Settings forms (#24741)
* Migrate shared preferences * Remove unused import * Migrate org name form * Update TeamSettings * Convert user settings * Fix inital default values * Update snapshots * Fix CI errors * Fix failing Ci * Update snapshots * Large spacing * Move use Form for OrgSettings and add FieldSet * Remove snapshots * Add snapshots * Remove unused proppull/25546/head^2
parent
1e38a24b88
commit
d3299796f5
@ -1,46 +1,14 @@ |
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP |
||||
|
||||
exports[`Render should render component 1`] = ` |
||||
<div> |
||||
<h3 |
||||
className="page-sub-heading" |
||||
> |
||||
Organization profile |
||||
</h3> |
||||
<form |
||||
className="gf-form-group" |
||||
name="orgForm" |
||||
onSubmit={[Function]} |
||||
> |
||||
<div |
||||
className="gf-form-inline" |
||||
> |
||||
<div |
||||
className="gf-form max-width-28" |
||||
> |
||||
<span |
||||
className="gf-form-label" |
||||
> |
||||
Organization name |
||||
</span> |
||||
<Input |
||||
className="gf-form-input" |
||||
onChange={[Function]} |
||||
type="text" |
||||
value="Main org" |
||||
/> |
||||
</div> |
||||
</div> |
||||
<div |
||||
className="gf-form-button-row" |
||||
> |
||||
<button |
||||
className="btn btn-primary" |
||||
type="submit" |
||||
> |
||||
Save |
||||
</button> |
||||
</div> |
||||
</form> |
||||
</div> |
||||
<Form |
||||
defaultValues={ |
||||
Object { |
||||
"orgName": "Main org", |
||||
} |
||||
} |
||||
onSubmit={[Function]} |
||||
> |
||||
<Component /> |
||||
</Form> |
||||
`; |
||||
|
@ -1,60 +1,28 @@ |
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP |
||||
|
||||
exports[`Render should render component 1`] = ` |
||||
<div> |
||||
<h3 |
||||
className="page-sub-heading" |
||||
<Component> |
||||
<Component |
||||
label="Team Settings" |
||||
> |
||||
Team Settings |
||||
</h3> |
||||
<form |
||||
className="gf-form-group" |
||||
name="teamDetailsForm" |
||||
onSubmit={[Function]} |
||||
> |
||||
<div |
||||
className="gf-form max-width-30" |
||||
> |
||||
<Component> |
||||
Name |
||||
</Component> |
||||
<Input |
||||
className="gf-form-input max-width-22" |
||||
onChange={[Function]} |
||||
required={true} |
||||
type="text" |
||||
value="test" |
||||
/> |
||||
</div> |
||||
<div |
||||
className="gf-form max-width-30" |
||||
> |
||||
<Component |
||||
tooltip="This is optional and is primarily used to set the team profile avatar (via gravatar service)" |
||||
> |
||||
Email |
||||
</Component> |
||||
<Input |
||||
className="gf-form-input max-width-22" |
||||
onChange={[Function]} |
||||
placeholder="team@email.com" |
||||
type="email" |
||||
value="test@test.com" |
||||
/> |
||||
</div> |
||||
<div |
||||
className="gf-form-button-row" |
||||
<Form |
||||
defaultValues={ |
||||
Object { |
||||
"avatarUrl": "some/url/", |
||||
"email": "test@test.com", |
||||
"id": 1, |
||||
"memberCount": 1, |
||||
"name": "test", |
||||
"permission": 0, |
||||
} |
||||
} |
||||
onSubmit={[Function]} |
||||
> |
||||
<button |
||||
className="btn btn-primary" |
||||
type="submit" |
||||
> |
||||
Update |
||||
</button> |
||||
</div> |
||||
</form> |
||||
<Component /> |
||||
</Form> |
||||
</Component> |
||||
<SharedPreferences |
||||
resourceUri="teams/1" |
||||
/> |
||||
</div> |
||||
</Component> |
||||
`; |
||||
|
Loading…
Reference in new issue