Skip to content

Commit cb00b1c

Browse files
authored
fix(ui): add NsProgressStories & other fixes (#1000)
* fix: add NsProgress stories * fix: add NsProgress into import users modal * chore: disable Carbon telemetry * chore: remove unnecessary extension from devcontainer * fix: parameter inside 18n string * fix: add i18n strings used by external applications * fix: typo in NsPasswordInput props
1 parent 7de54a6 commit cb00b1c

File tree

10 files changed

+95
-16
lines changed

10 files changed

+95
-16
lines changed

.devcontainer/devcontainer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"esbenp.prettier-vscode",
1414
"octref.vetur",
1515
"shenjiaolong.vue-helper",
16-
"waderyan.gitblame",
1716
"streetsidesoftware.code-spell-checker"
1817
]
1918
}

core/ui/.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
SASS_PATH=./node_modules
2+
CARBON_TELEMETRY_DISABLED=1

core/ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"@carbon/icons-vue": "^10.37.0",
1717
"@carbon/themes": "^10.34.0",
1818
"@carbon/vue": "^2.40.0",
19-
"@nethserver/ns8-ui-lib": "^1.9.0",
19+
"@nethserver/ns8-ui-lib": "^1.10.1",
2020
"await-to-js": "^3.0.0",
2121
"axios": "^0.30.2",
2222
"carbon-components": "^10.41.0",

core/ui/public/i18n/en/translation.json

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@
9595
"choose_a_node": "Choose a node",
9696
"type": "Type",
9797
"any": "Any",
98-
"eg_value": "e.g. {value}"
98+
"eg_value": "e.g. {value}",
99+
"go_to_page": "Go to {page}",
100+
"not_configured": "Not configured"
99101
},
100102
"error": {
101103
"error": "Error",
@@ -426,7 +428,7 @@
426428
"set-metrics-configuration": "Set metrics configuration",
427429
"set-metrics-notifications": "Set metrics notifications",
428430
"get-metrics-id": "Get metrics ID",
429-
"restart-module": "Restart instance",
431+
"restart-module": "Restart application",
430432
"list-alerts": "List alerts",
431433
"list-nodes": "List nodes",
432434
"set-note": "Set note",
@@ -904,6 +906,15 @@
904906
"request_https_certificate": "Request a Let's Encrypt certificate",
905907
"cannot_obtain_certificate": "Cannot obtain Let's Encrypt certificate"
906908
},
909+
"apps_status": {
910+
"application": "Application",
911+
"restart_application": "Restart application",
912+
"go_to_node_details": "Go to node",
913+
"application_images": "Application images",
914+
"application_volumes": "Application volumes",
915+
"search_images": "Search images",
916+
"search_volumes": "Search volumes"
917+
},
907918
"settings_account": {
908919
"title": "Account",
909920
"current_user_password": "Current {user} password",

core/ui/public/i18n/it/translation.json

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"repository": "Repository",
6262
"app_installation": "Installa {app}",
6363
"installing_on_node": "Installazione su {node} in corso",
64-
"instance_installed_on_node": "{modulo_id} installato su {node}",
64+
"instance_installed_on_node": "{module_id} installato su {node}",
6565
"app_uninstallation": "Disinstalla {app}",
6666
"uninstall_instance": "Disinstalla istanza",
6767
"uninstalling": "Disinstallazione",
@@ -70,7 +70,7 @@
7070
"move_app": "Sposta app",
7171
"moving_app_to_node": "Spostamento di {instance} su {node}",
7272
"app_with_ui_name_cloned_to_node": "{instance} clonata su {node}",
73-
"app_without_ui_name_cloned_to_node": "{instance} clonata su {node} come {modulo_id}",
73+
"app_without_ui_name_cloned_to_node": "{instance} clonata su {node} come {module_id}",
7474
"app_with_ui_name_moved_to_node": "{instance} spostata su {node}",
7575
"app_without_ui_name_moved_to_node": "{instance} spostata su {node} come {module_id}",
7676
"core_app_update_available_description": "Alcune app di base devono essere aggiornate",
@@ -742,7 +742,7 @@
742742
"set-metrics-configuration": "Imposta configurazione Metrics",
743743
"get-metrics-id": "Identifica Metrics",
744744
"get-metrics-ids": "Identifica Metrics",
745-
"restart-module": "Riavvia istanza",
745+
"restart-module": "Riavvia applicazione",
746746
"list-alerts": "Elenca allarmi",
747747
"list-nodes": "Elenca nodi",
748748
"set-note": "Imposta nota",
@@ -1079,7 +1079,9 @@
10791079
"choose_a_node": "Scegli un nodo",
10801080
"type": "Tipo",
10811081
"any": "Qualsiasi",
1082-
"eg_value": "Es. {value}"
1082+
"eg_value": "es. {value}",
1083+
"go_to_page": "Vai a {page}",
1084+
"not_configured": "Non configurato"
10831085
},
10841086
"error": {
10851087
"error": "Errore",
@@ -1698,6 +1700,15 @@
16981700
"request_https_certificate": "Richiedi un certificato Let's Encrypt",
16991701
"go_to_tls_certificates": "Vai a Certificati TLS"
17001702
},
1703+
"apps_status": {
1704+
"application": "Applicazione",
1705+
"restart_application": "Riavvia applicazione",
1706+
"go_to_node_details": "Vai al nodo",
1707+
"application_images": "Immagini applicazione",
1708+
"application_volumes": "Volumi applicazione",
1709+
"search_images": "Cerca immagini",
1710+
"search_volumes": "Cerca volumi"
1711+
},
17011712
"applications": {
17021713
"restarting": "Riavvio",
17031714
"note_helper_text": "Questa nota deve essere di 100 caratteri o meno",

core/ui/src/components/domains/CreateDomainModal.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@
286286
:confirmPasswordLabel="$t('openldap.admpass_confirm')"
287287
v-model="openldap.admpass"
288288
@passwordValidation="onNewOpenLdapPasswordValidation"
289-
:newPaswordHelperText="
289+
:newPasswordHelperText="
290290
$t('openldap.choose_openldap_admin_password')
291291
"
292292
:newPasswordInvalidMessage="$t(error.openldap.admpass)"

core/ui/src/components/domains/ImportUsersModal.vue

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
:description="error.importDataCsv"
2828
:showCloseButton="false"
2929
/>
30+
<NsProgress :stepId="step" :steps="progressSteps" class="progress" />
3031
<template v-if="step == 'importData'">
3132
<p class="mg-bottom-lg">
3233
{{ $t("import_users.upload_csv_file_description") }}
@@ -206,6 +207,16 @@ export default {
206207
return {
207208
step: "",
208209
steps: ["importData", "previewData"],
210+
progressSteps: [
211+
{
212+
id: "importData",
213+
label: this.$t("import_users.csv_upload_label"),
214+
},
215+
{
216+
id: "previewData",
217+
label: this.$t("import_users.preview"),
218+
},
219+
],
209220
csvFile: null,
210221
existingPolicy: "skip",
211222
loading: {
@@ -537,4 +548,9 @@ export default {
537548
max-width: 320px;
538549
}
539550
}
551+
552+
.progress {
553+
margin-top: 1rem;
554+
margin-bottom: 3rem;
555+
}
540556
</style>

core/ui/src/stories/NsPasswordInput.stories.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ const Template = (args, { argTypes }) => ({
1414
export const Default = Template.bind({});
1515
Default.args = {
1616
value: "",
17-
newPaswordHelperText: "",
18-
confirmPaswordHelperText: "",
17+
newPasswordHelperText: "",
18+
confirmPasswordHelperText: "",
1919
newPasswordInvalidMessage: "",
2020
confirmPasswordInvalidMessage: "",
2121
newPasswordLabel: "New password",
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import { NsProgress } from "@nethserver/ns8-ui-lib";
2+
3+
export default {
4+
title: "Components/NsProgress",
5+
component: NsProgress,
6+
args: {
7+
stepId: "firstStep",
8+
steps: [
9+
{
10+
id: "firstStep",
11+
label: "First Step",
12+
},
13+
{
14+
id: "secondStep",
15+
label: "Second Step",
16+
},
17+
{
18+
id: "thirdStep",
19+
label: "Third Step",
20+
},
21+
{
22+
id: "fourthStep",
23+
label: "Fourth Step",
24+
},
25+
],
26+
},
27+
};
28+
29+
const Template = (args, { argTypes }) => ({
30+
props: Object.keys(argTypes),
31+
components: { NsProgress },
32+
template: `<NsProgress v-bind="$props" />`,
33+
});
34+
35+
export const Default = Template.bind({});
36+
Default.args = {};
37+
38+
export const SecondStep = Template.bind({});
39+
SecondStep.args = {
40+
stepId: "secondStep",
41+
};

core/ui/yarn.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2009,9 +2009,9 @@ __metadata:
20092009
languageName: node
20102010
linkType: hard
20112011

2012-
"@nethserver/ns8-ui-lib@npm:^1.9.0":
2013-
version: 1.9.0
2014-
resolution: "@nethserver/ns8-ui-lib@npm:1.9.0"
2012+
"@nethserver/ns8-ui-lib@npm:^1.10.1":
2013+
version: 1.10.1
2014+
resolution: "@nethserver/ns8-ui-lib@npm:1.10.1"
20152015
dependencies:
20162016
"@rollup/plugin-json": ^4.1.0
20172017
core-js: ^3.15.2
@@ -2020,7 +2020,7 @@ __metadata:
20202020
vue-date-fns: ^2.0.1
20212021
peerDependencies:
20222022
vue: ^2.6.12
2023-
checksum: f5ecb1e3a17c9b1ddf7bde377f21d6458eee3710be4f9a9db20e7f1fe1989600ff3672e376c8316fdec4f88c5456d97a8ec4f3690b246245ae91f04acbbef2ce
2023+
checksum: d0e78509c3d5979b803a5e95f5addec5e2f6163096018cc2d5fc22364cd1dd77cabd00747240e7fd6b7e0f90ee1d5fe2c4d7b5f9e7e8b47763d71ad5b9db0fc2
20242024
languageName: node
20252025
linkType: hard
20262026

@@ -13285,7 +13285,7 @@ __metadata:
1328513285
"@carbon/icons-vue": ^10.37.0
1328613286
"@carbon/themes": ^10.34.0
1328713287
"@carbon/vue": ^2.40.0
13288-
"@nethserver/ns8-ui-lib": ^1.9.0
13288+
"@nethserver/ns8-ui-lib": ^1.10.1
1328913289
"@storybook/addon-actions": ^6.2.9
1329013290
"@storybook/addon-essentials": ^6.2.9
1329113291
"@storybook/addon-links": ^6.2.9

0 commit comments

Comments
 (0)