Remove useless module.
This commit is contained in:
parent
e7d8d2520d
commit
0f0eda8af5
5 changed files with 21 additions and 24 deletions
|
@ -40,7 +40,6 @@ import CSSClasses as C
|
||||||
|
|
||||||
import App.Text.Explanations as Explanations
|
import App.Text.Explanations as Explanations
|
||||||
|
|
||||||
import App.Type.RRId (RRId)
|
|
||||||
import App.Type.ResourceRecord as RR
|
import App.Type.ResourceRecord as RR
|
||||||
import App.Type.Delegation (mkEmptyDelegationForm, update, Form, Field) as Delegation
|
import App.Type.Delegation (mkEmptyDelegationForm, update, Form, Field) as Delegation
|
||||||
import App.Type.RRModal (RRModal(..))
|
import App.Type.RRModal (RRModal(..))
|
||||||
|
@ -89,9 +88,9 @@ type Input = String
|
||||||
-- | 4. `AddRR RR.AcceptedRRTypes RR.ResourceRecord`: send a message to `dnsmanagerd`.
|
-- | 4. `AddRR RR.AcceptedRRTypes RR.ResourceRecord`: send a message to `dnsmanagerd`.
|
||||||
-- |
|
-- |
|
||||||
-- | Steps to update an entry:
|
-- | Steps to update an entry:
|
||||||
-- | 1. `CreateUpdateRRModal RRId`: create a modal from the values of the RR in `_resources` to update.
|
-- | 1. `CreateUpdateRRModal RR.RRId`: create a modal from the values of the RR in `_resources` to update.
|
||||||
-- | 2. `UpdateCurrentRR Field`: modify the currently displayed RR.
|
-- | 2. `UpdateCurrentRR Field`: modify the currently displayed RR.
|
||||||
-- | 3. `ValidateLocal RRId RR.AcceptedRRTypes`: validate the RR.
|
-- | 3. `ValidateLocal RR.RRId RR.AcceptedRRTypes`: validate the RR.
|
||||||
-- | 4. `SaveRR RR.ResourceRecord`: save the _validated_ RR by sending a message to `dnsmanagerd`.
|
-- | 4. `SaveRR RR.ResourceRecord`: save the _validated_ RR by sending a message to `dnsmanagerd`.
|
||||||
|
|
||||||
data Action
|
data Action
|
||||||
|
@ -108,10 +107,10 @@ data Action
|
||||||
| CreateDelegationModal
|
| CreateDelegationModal
|
||||||
|
|
||||||
-- | Create modal (a form) for a resource record to update.
|
-- | Create modal (a form) for a resource record to update.
|
||||||
| CreateUpdateRRModal RRId
|
| CreateUpdateRRModal RR.RRId
|
||||||
|
|
||||||
-- | Create a modal to ask confirmation before deleting a resource record.
|
-- | Create a modal to ask confirmation before deleting a resource record.
|
||||||
| DeleteRRModal RRId
|
| DeleteRRModal RR.RRId
|
||||||
|
|
||||||
-- | Change the current tab.
|
-- | Change the current tab.
|
||||||
| ChangeTab Tab
|
| ChangeTab Tab
|
||||||
|
@ -149,7 +148,7 @@ data Action
|
||||||
|
|
||||||
-- | Send a message to remove a resource record.
|
-- | Send a message to remove a resource record.
|
||||||
-- | Automatically closes the modal.
|
-- | Automatically closes the modal.
|
||||||
| RemoveRR RRId
|
| RemoveRR RR.RRId
|
||||||
|
|
||||||
-- | Ask `dnsmanagerd` for the generated zone file.
|
-- | Ask `dnsmanagerd` for the generated zone file.
|
||||||
| AskGeneratedZoneFile
|
| AskGeneratedZoneFile
|
||||||
|
@ -158,7 +157,7 @@ data Action
|
||||||
| RRUpdate RR.RRUpdateValue
|
| RRUpdate RR.RRUpdateValue
|
||||||
|
|
||||||
-- | Ask a (new) token for a resource record.
|
-- | Ask a (new) token for a resource record.
|
||||||
| NewToken RRId
|
| NewToken RR.RRId
|
||||||
|
|
||||||
data Tab = Zone | TheBasics | TokenExplanation
|
data Tab = Zone | TheBasics | TokenExplanation
|
||||||
derive instance eqTab :: Eq Tab
|
derive instance eqTab :: Eq Tab
|
||||||
|
@ -177,7 +176,7 @@ type State =
|
||||||
|
|
||||||
-- | All resource records.
|
-- | All resource records.
|
||||||
, _resources :: Array RR.ResourceRecord
|
, _resources :: Array RR.ResourceRecord
|
||||||
--, _local_errors :: Hash.HashMap RRId (Array Validation.Error)
|
--, _local_errors :: Hash.HashMap RR.RRId (Array Validation.Error)
|
||||||
|
|
||||||
-- Unique RR form.
|
-- Unique RR form.
|
||||||
, _rr_form :: RR.Form
|
, _rr_form :: RR.Form
|
||||||
|
|
|
@ -12,20 +12,20 @@ import Data.Maybe (Maybe(..), fromMaybe, maybe)
|
||||||
|
|
||||||
import Data.Tuple (Tuple)
|
import Data.Tuple (Tuple)
|
||||||
|
|
||||||
import App.Type.ResourceRecord.CAA as CAA
|
|
||||||
import App.Text.Explanations as Explanations
|
|
||||||
import Web as Web
|
import Web as Web
|
||||||
import Halogen.HTML as HH
|
import Halogen.HTML as HH
|
||||||
import Halogen.HTML.Properties as HP
|
import Halogen.HTML.Properties as HP
|
||||||
import App.Type.RRId (RRId)
|
|
||||||
import App.Type.ResourceRecord.DMARC as DMARC
|
|
||||||
import App.Type.ResourceRecord.DKIM as DKIM
|
|
||||||
import App.Type.Delegation as Delegation
|
|
||||||
import App.Templates.Table as Table
|
|
||||||
import Data.String (toLower)
|
import Data.String (toLower)
|
||||||
|
|
||||||
|
import App.Text.Explanations as Explanations
|
||||||
|
import App.Templates.Table as Table
|
||||||
|
|
||||||
|
import App.Type.Delegation as Delegation
|
||||||
import App.Type.RRModal (RRModal(..))
|
import App.Type.RRModal (RRModal(..))
|
||||||
|
|
||||||
|
import App.Type.ResourceRecord.CAA as CAA
|
||||||
|
import App.Type.ResourceRecord.DMARC as DMARC
|
||||||
|
import App.Type.ResourceRecord.DKIM as DKIM
|
||||||
import App.Type.ResourceRecord.SPF (mechanism_types, modifier_types, qualifier_types, show_qualifier) as SPF
|
import App.Type.ResourceRecord.SPF (mechanism_types, modifier_types, qualifier_types, show_qualifier) as SPF
|
||||||
import App.Type.ResourceRecord as RR
|
import App.Type.ResourceRecord as RR
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ delegation_modal selected_domain form action_update_form action_validate action_
|
||||||
|
|
||||||
type Domain = String
|
type Domain = String
|
||||||
type ActionUpdateForm i = (RR.Field -> i)
|
type ActionUpdateForm i = (RR.Field -> i)
|
||||||
type ActionNewToken i = (RRId -> i)
|
type ActionNewToken i = (RR.RRId -> i)
|
||||||
type ActionUpdateRR i = (RR.RRUpdateValue -> i)
|
type ActionUpdateRR i = (RR.RRUpdateValue -> i)
|
||||||
type ActionValidateNewRR i = (RR.AcceptedRRTypes -> i)
|
type ActionValidateNewRR i = (RR.AcceptedRRTypes -> i)
|
||||||
type ActionValidateLocalRR :: forall k. k -> k
|
type ActionValidateLocalRR :: forall k. k -> k
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
module App.Type.RRId where
|
|
||||||
|
|
||||||
type RRId = Int
|
|
|
@ -6,12 +6,11 @@
|
||||||
-- | FIXME: TODO: WIP: should this be replaced by something like `CRUD`?
|
-- | FIXME: TODO: WIP: should this be replaced by something like `CRUD`?
|
||||||
module App.Type.RRModal where
|
module App.Type.RRModal where
|
||||||
|
|
||||||
import App.Type.RRId
|
import App.Type.ResourceRecord (AcceptedRRTypes, RRId) as RR
|
||||||
import App.Type.ResourceRecord (AcceptedRRTypes)
|
|
||||||
|
|
||||||
data RRModal
|
data RRModal
|
||||||
= NoModal
|
= NoModal
|
||||||
| NewRRModal AcceptedRRTypes
|
| NewRRModal RR.AcceptedRRTypes
|
||||||
| UpdateRRModal
|
| UpdateRRModal
|
||||||
| RemoveRRModal RRId
|
| RemoveRRModal RR.RRId
|
||||||
| DelegationModal
|
| DelegationModal
|
||||||
|
|
|
@ -28,9 +28,11 @@ import App.Type.ResourceRecord.DMARC as DMARC
|
||||||
import App.Type.ResourceRecord.SPF as SPF
|
import App.Type.ResourceRecord.SPF as SPF
|
||||||
import App.Type.ResourceRecord.CAA as CAA
|
import App.Type.ResourceRecord.CAA as CAA
|
||||||
|
|
||||||
|
type RRId = Int
|
||||||
|
|
||||||
type ResourceRecord
|
type ResourceRecord
|
||||||
= { rrtype :: String
|
= { rrtype :: String
|
||||||
, rrid :: Int
|
, rrid :: RRId
|
||||||
, name :: String
|
, name :: String
|
||||||
, ttl :: Int
|
, ttl :: Int
|
||||||
, target :: String
|
, target :: String
|
||||||
|
|
Loading…
Add table
Reference in a new issue