-
Notifications
You must be signed in to change notification settings - Fork 8
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 #2593 from threefoldtech/development_2.5_publicips…
…_table Remove farms public IP delete button and create delete all action with it's module and method
- Loading branch information
Showing
6 changed files
with
86 additions
and
43 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,25 @@ | ||
import { ExtrinsicResult, Farm, Farms } from "@threefold/tfchain_client"; | ||
|
||
import { RemoveFarmIPModel } from "../../modules"; | ||
|
||
/** | ||
* `TFFarms` is a subclass of `Farms` that provides additional functionality. | ||
*/ | ||
class TFFarms extends Farms { | ||
/** | ||
* Removes farm IPs | ||
* | ||
* @param {RemoveFarmIPModel[]} options - An array of options used to remove farm IPs | ||
* @returns {Promise<void>} A promise that resolves when all extrinsics have been applied | ||
* @see {applyAllExtrinsics} - The method used to apply all extrinsics | ||
*/ | ||
async removeFarmIps(options: RemoveFarmIPModel[]) { | ||
const extrinsics: ExtrinsicResult<Farm>[] = []; | ||
for (const option of options) { | ||
extrinsics.push(await this.removeFarmIp(option)); | ||
} | ||
await this.client.applyAllExtrinsics(extrinsics); | ||
} | ||
} | ||
|
||
export { TFFarms }; |
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
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