-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Support Git paths in diagram cache code snippet
The commits identifies the primary Git model of a model and adds the information to the code snippet of the diagram cache. In addition, there were some minor/internal changes: - The code snippet code was moved to a new component `ModelDiagramCacheBlockComponent`. - Syntax highlighting was added in the frontend. - A duplication of the code snippet declaration was removed. - Margins and paddings were updated, responsive design was added. - The colors of the code snippet were inverted (white text on dark background) - Information about token revocation was added to the dialog. - A confirmation message for clipboard-copy was added.
- Loading branch information
1 parent
13f5add
commit f45fba3
Showing
15 changed files
with
346 additions
and
364 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 |
---|---|---|
|
@@ -33,7 +33,7 @@ k8s: | |
|
||
general: | ||
host: localhost | ||
port: 4200 | ||
port: 8000 | ||
scheme: http | ||
wildcardHost: False | ||
|
||
|
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
54 changes: 54 additions & 0 deletions
54
...ams/model-diagram-dialog/model-diagram-code-block/model-diagram-code-block.component.html
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,54 @@ | ||
<!-- | ||
~ SPDX-FileCopyrightText: Copyright DB Netz AG and the capella-collab-manager contributors | ||
~ SPDX-License-Identifier: Apache-2.0 | ||
--> | ||
|
||
<mat-expansion-panel color="bg-slate-400"> | ||
<mat-expansion-panel-header> | ||
<mat-panel-title> | ||
Learn how to use the diagram cache with capellambse! | ||
</mat-panel-title> | ||
</mat-expansion-panel-header> | ||
<div class="mt-2"> | ||
You can also access the diagrams via our Python library | ||
<i>capellambse</i>. Follow the installation instructions on | ||
<a | ||
target="_blank" | ||
rel="noopener" | ||
class="text-url" | ||
href="https://github.com/DSD-DBS/py-capellambse#installation" | ||
>Github<span class="align-middle" | ||
><mat-icon class="scale-75">open_in_new</mat-icon></span | ||
> | ||
</a> | ||
and then use the code snippet. To authenticate, you have to insert a | ||
personal access token. The token has the same scope as your user. Be careful | ||
with it. You can revoke the token in the settings. | ||
</div> | ||
<pre><code | ||
class="language-python my-2 rounded-md border shadow" | ||
[innerHTML]="this.codeBlockContent | hightlight: 'python'" | ||
></code></pre> | ||
<div class="flex flex-wrap gap-2"> | ||
<button | ||
class="mt-auto self-end" | ||
[cdkCopyToClipboard]="this.codeBlockContent" | ||
matTooltip="Copy codeblock to clipboard" | ||
color="bg-transparent" | ||
mat-raised-button | ||
(click)="showClipboardMessage()" | ||
> | ||
<mat-icon>content_copy</mat-icon> | ||
</button> | ||
<button | ||
class="mt-auto self-end text-white" | ||
(click)="insertToken()" | ||
[disabled]="passwordValue" | ||
matTooltip="Insert new personal access token for your user" | ||
color="primary" | ||
mat-raised-button | ||
> | ||
Insert token | ||
</button> | ||
</div> | ||
</mat-expansion-panel> |
Oops, something went wrong.