Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SQL-105] Editable API key label #100

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
55 changes: 29 additions & 26 deletions resources/sass/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -905,15 +905,15 @@ span.close-alert img {
}

@media only screen and (max-width: 1124px) {
.accordion .accordion-container .accordion-header > div:nth-child(2) {
.accordion .accordion-container > div:nth-child(2) {
padding-left: 20px;
}
}


/**************************************************
# Action Icon List
**************************************************/

.action-row {
display: table;
width: 100%;
Expand All @@ -939,7 +939,7 @@ span.close-alert img {
.action-icon-list li {
display: inline-block;
vertical-align: top;
margin: 0 0 18px 24px;
margin: 0 12px 18px 0;
padding: 0;
}

Expand Down Expand Up @@ -1075,7 +1075,7 @@ a.icon-copy:hover {
}

.api-key-col {
@extend .col-sm-12, .col-lg-6;
@extend .col-sm-8, .col-lg-4;
}

.api-key-col-header {
Expand Down Expand Up @@ -1108,6 +1108,30 @@ input.key-display {
vertical-align: top;
}

// Credential Label Editor

input.label-editor {
margin-bottom: 8px;
}

// Credential Roles Editor

ul.role-select {
padding-left: 0;
margin-bottom: 8px;
}

ul.role-select li.role-checkbox {
vertical-align: top;
margin: 0px;
padding: 0px;
list-style-type: none;
}

.role-checkbox label {
padding-left: 4px;
}

/**************************************************
# Accounts
***************************************************/
Expand All @@ -1125,7 +1149,7 @@ input.key-display {
}

.account-col {
@extend .api-key-col;
@extend .col-sm-12, .col-lg-6;
}

.account-col-header {
Expand Down Expand Up @@ -1251,27 +1275,6 @@ div.browser-filters {
white-space: nowrap;
}

/**************************************************
# Roles
**************************************************/

ul.role-select {
margin: 0px;
padding: 0px;
}

ul.role-select li.role-checkbox {
vertical-align: top;
margin: 0px;
padding: 0px;
list-style-type: none;
}

.role-checkbox label {
padding-left: 4px;
}


/**************************************************
# Tooltip
**************************************************/
Expand Down
2 changes: 2 additions & 0 deletions src/com/yetanalytics/lrs_admin_ui/db.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,15 @@

(s/def :credential/api-key string?)
(s/def :credential/secret-key string?)
(s/def :credential/label (s/nilable (s/and string? not-empty)))

(s/def :credential/scope string?)
(s/def :credential/scopes (s/every :credential/scope))

(s/def ::credential
(s/keys :req-un [:credential/api-key
:credential/secret-key
:credential/label
:credential/scopes]))

(s/def ::credentials
Expand Down
5 changes: 4 additions & 1 deletion src/com/yetanalytics/lrs_admin_ui/language.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,15 @@
:credentials.tenant.number {:en-US "Number of Credentials: "}
:credentials.tenant.key {:en-US "Api Key"}
:credentials.key.aria {:en-US "Show/Hide Api Key Details"}
:credentials.key.permissions {:en-US "Permissions "}
:credentials.key.label {:en-US "Label:"}
:credentials.key.permissions {:en-US "Permissions:"}
:credentials.key.secret {:en-US "API Key Secret"}
:credentials.key.hide {:en-US "Hide"}
:credentials.key.show {:en-US "Show Secret Key"}
:credentials.key.permissions.save {:en-US "Save"}
:credentials.key.permissions.cancel {:en-US "Cancel"}
:credentials.key.actions {:en-US "Actions"}
:credentials.key.edit-credential {:en-US "Edit Credential"}
:credentials.key.edit {:en-US "Edit"}
:credentials.key.delete {:en-US "Delete"}
:credentials.key.delete.confirm {:en-US "Are you sure?"}
Expand Down
4 changes: 2 additions & 2 deletions src/com/yetanalytics/lrs_admin_ui/views/accounts.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
:on-click #(do (dispatch [:accounts/delete-account account])
(swap! delete-confirm not))
:class "confirm-delete"}
"Yes"]
"Yes"] ; TODO: :lang/get
[:a {:href "#!"
:on-click #(swap! delete-confirm not)
:class "confirm-delete"}
"No"]]
"No"]] ; TODO: :lang/get
[:li
[:a {:href "#!"
:on-click #(swap! delete-confirm not)
Expand Down
Loading
Loading