Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
MelsHyrule committed Apr 7, 2022
1 parent 5f5ab3c commit d5fa5ff
Showing 1 changed file with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,40 @@ const AttachDetachCloudVolumeForm = ({ recordId, storageManagerId, isAttach, vmC

const [{ isLoading, deviceMountpointRequired }, setState] = useState({ isLoading: true, deviceMountpointRequired: true });

// const [{
// initialValues, fields, isLoading, deviceMountpointRequired
// }, setState] = useState({ });

const loadSchema = (appendState = {}) => (value) => {
// miqSparkleOff();
// setState({
// ...appendState,
// fields,
// });

console.log("values")
console.log(value)
// { data: { form_schema: { fields } } }
};

// const emptySchema = (appendState = {}) => {
// const fields = [];
// setState((state) => ({
// ...state,
// ...appendState,
// fields,
// }));
// };

useEffect(() => {

// this bottom one does id and ems but goes into the id section of the thing in the API code
// API.get(`/api/cloud_volumes/${recordId}`).then((initialValues) => {
// API.options(`/api/cloud_volumes/${recordId}?ems_id_attach=${initialValues.ems_id}`).then(loadSchema()); //{ initialValues, isLoading: false }
// });
API.options(`/api/cloud_volumes?ems_id_attach=${storageManagerId}`).then(loadSchema());


if (isLoading) {

API.get(`/api/cloud_volumes/${recordId}`).then((initialValues) => {
Expand Down

0 comments on commit d5fa5ff

Please sign in to comment.