-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from huntdatacenter/price-calc-hans
Price calculator / estimator
- Loading branch information
Showing
12 changed files
with
3,273 additions
and
773 deletions.
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
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,33 @@ | ||
import data from './data.json'; | ||
import axios from "axios"; | ||
|
||
export default { | ||
async getComputeFlavors() { | ||
try { | ||
const res = await axios.get("https://assets.hdc.ntnu.no/assets/prices/v4/hunt-cloud-price-list-4-2.json") | ||
return res.data | ||
} catch (error) { | ||
console.error("Error fetching compute flavors:", error); | ||
return []; | ||
} | ||
|
||
}, | ||
async getAvailableGPUS() { | ||
try { | ||
const res = await axios.get("https://assets.hdc.ntnu.no/assets/js/gpus.json") | ||
return res.data | ||
} catch (error) { | ||
console.error("Error fetching compute flavors:", error); | ||
return []; | ||
} | ||
}, | ||
async getMachines() { | ||
try { | ||
const response = await axios.get("https://assets.hdc.ntnu.no/assets/js/flavors.json"); | ||
return response.data; | ||
} catch (error) { | ||
console.error("Error fetching machines:", error); | ||
return []; | ||
} | ||
} | ||
}; |
Oops, something went wrong.