Skip to content

Commit

Permalink
Handle lack of jupyter extensions field in userprofile (#2032)
Browse files Browse the repository at this point in the history
Also add cylc extension to mock data
  • Loading branch information
MetRonnie authored Jan 3, 2025
1 parent b4940ef commit baf4442
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
5 changes: 4 additions & 1 deletion src/services/mock/json/userprofile.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,8 @@
"hold"
],
"mode": "single user",
"owner": "user"
"owner": "user",
"extensions": {
"cylc": "/cylc"
}
}
24 changes: 13 additions & 11 deletions src/views/UserProfile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,28 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</v-col>
<v-col cols="9">
<v-text-field
:model-value="user.username"
disabled
id="profile-username"
aria-disabled="true"
class="text-body-1"
:model-value="user.username"
disabled
id="profile-username"
class="text-body-1"
/>
</v-col>
</v-row>

<v-row no-gutters class="align-center wrap">
<v-row
v-if="user.extensions"
no-gutters
class="align-center wrap"
>
<v-col cols="3">
<span>Jupyter Server Extensions</span>
</v-col>
<v-col cols="9">
<v-text-field
:model-value="Object.keys(user.extensions).join(', ') || 'None'"
disabled
id="profile-extensions"
aria-disabled="true"
class="text-body-1"
:model-value="Object.keys(user.extensions).join(', ') || 'None'"
disabled
id="profile-extensions"
class="text-body-1"
/>
</v-col>
</v-row>
Expand Down

0 comments on commit baf4442

Please sign in to comment.