OpenSearch-Dashboards
OpenSearch-Dashboards copied to clipboard
[MD] Add rendering spanner
createCredential = async () => {
const { savedObjects } = this.context.services;
try {
// TODO: Add rendering spanner https://github.com/opensearch-project/OpenSearch-Dashboards/issues/2050
await savedObjects.client.create('credential', {
title: this.state.credentialName,
credentialType: this.state.credentialType,
credentialMaterials: {
credentialMaterialsType: this.state.credentialType,
credentialMaterialsContent: {
userName: this.state.userName,
password: this.state.password,
},
},
});
this.props.history.push('');
} catch (e) {
// TODO: Add Toast https://github.com/opensearch-project/OpenSearch-Dashboards/issues/2049
}
};