mirror of
https://github.com/portainer/portainer.git
synced 2025-08-04 21:35:23 +02:00
* refactor(http): parse axios errors (#6325) * refactor(home): use endpoint-list as react component [EE-1814] (#6060) * refactor(home): use endpoint-list as react component fix(home): add missing features and refactors - kubebutton - group name - poll when endpoint is off - state management refactor(endpoints): use stat component fix(endpoints): add space between items refactor(endpoints): move stats to components refactor(endpoints): fetch time refactor(home): move logic refactor(home): move fe render logic refactor(settings): use vanilla js for publicSettings refactor(kube): remove angular from kube config service feat(home): add kubeconfig button feat(home): send analytics when opening kubeconfig modal fix(home): memoize footer refactor(home): use react-query for loading fix(home): show correct control for kubeconfig modal refactor(home): use debounce refactor(home): use new components refactor(home): replace endpoints with environments refactor(home): move endpoint-list component to home fix(home): show group name refactor(home): use switch for environment icon fix(kubeconfig): fix default case refactor(axios): use parse axios error refactor(home): use link components for navigate fix(home): align azure icon refactor(home): refactor stats refactor(home): export envstatusbadge refactor(home): remove unused bindings * chore(home): write tests for edge indicator * chore(home): basic stories for environment item * style(settings): reformat * fix(environments): add publicurl * refactor(home): use table components * refactor(datatables): merge useSearchBarState * refactor(home): fetch group in env item * chore(tests): basic tests * chore(home): test when no envs * refactor(tags): use axios for tagService * refactor(env-groups): use axios for getGroups * feat(app): ui-state context provider * refactor(home): create MotdPanel * refactor(app): create InformationPanel * feat(endpoints): fetch number of total endpoints * refactor(app): merge hooks * refactor(home): migrate view to react [EE-1810] fixes [EE-1810] refactor(home): wip use react view feat(home): show message if no endpoints refactor(home): show endpoint list refactor(home): don't use home to manage link refactor(home): move state refactor(home): check if edge using util refactor(home): move inf panels chore(home): tests refactor(home): load groups and tags in env-item refactor(settings): revert publicSettings change refactor(home): move confirm snapshot method * fix(home): show tags * fix(environments): handle missing snapshots * fix(kube/volumes): fetch pesistent volume claims * refactor(kube): remove use of endpointProvider * refactor(endpoints): set current endpoint * chore(home): add data-cy for tests * chore(tests): mock axios-progress-bar * refactor(home): move use env list to env module * feat(app): sync home view changes with ee * fix(home): sort page header * fix(app): fix tests * chore(github): use yarn cache * refactor(environments): load list of groups * chore(babel): remove auto 18n keys extraction * chore(environments): fix tests * refactor(k8s/application): use current endpoint * fix(app/header): add margin to header * refactor(app): remove unused types * refactor(app): use rq onError handler * refactor(home): wrap element with button
167 lines
7.5 KiB
HTML
167 lines
7.5 KiB
HTML
<kubernetes-view-header id="view-top" title="Helm" state="kubernetes.templates.helm" view-ready="true"> Charts </kubernetes-view-header>
|
|
|
|
<information-panel title-text="Information" ng-if="!$ctrl.state.chart">
|
|
<span class="small text-muted">
|
|
<p>
|
|
<i class="fa fa-exclamation-circle orange-icon" aria-hidden="true" style="margin-right: 2px"></i>
|
|
This is a first version for Helm charts, for more information see this <a href="https://www.portainer.io/blog/portainer-now-with-helm-support" target="_blank">blog post</a>.
|
|
</p>
|
|
<p ng-if="$ctrl.state.globalRepository === ''">
|
|
<i class="fa fa-exclamation-circle blue-icon" aria-hidden="true" style="margin-right: 2px"></i>
|
|
<span>The Global Helm Repository is not configured.</span>
|
|
<a ng-if="$ctrl.state.isAdmin" ui-sref="portainer.settings">Configure Global Helm Repository in Settings</a>
|
|
</p>
|
|
</span>
|
|
</information-panel>
|
|
|
|
<div class="row">
|
|
<!-- helmchart-form -->
|
|
<div class="col-sm-12" ng-if="$ctrl.state.chart">
|
|
<rd-widget>
|
|
<rd-widget-custom-header icon="$ctrl.state.chart.icon" title-text="$ctrl.state.chart.name"></rd-widget-custom-header>
|
|
<rd-widget-body classes="padding">
|
|
<form class="form-horizontal" name="$ctrl.helmTemplateCreationForm">
|
|
<!-- description -->
|
|
<div>
|
|
<div class="col-sm-12 form-section-title"> Description </div>
|
|
<div class="form-group">
|
|
<div class="col-sm-12">
|
|
<div class="template-note" ng-bind-html="$ctrl.state.chart.description"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- !description -->
|
|
<div class="col-sm-12 form-section-title"> Configuration </div>
|
|
<!-- namespace-input -->
|
|
<div class="form-group" ng-if="$ctrl.state.resourcePool">
|
|
<label for="resource-pool-selector" class="col-sm-2 control-label text-left">Namespace</label>
|
|
<div class="col-sm-10">
|
|
<select
|
|
class="form-control"
|
|
id="resource-pool-selector"
|
|
ng-model="$ctrl.state.resourcePool"
|
|
ng-options="resourcePool.Namespace.Name for resourcePool in $ctrl.state.resourcePools"
|
|
ng-change=""
|
|
ng-disabled="$ctrl.state.isEdit"
|
|
></select>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group" ng-if="!$ctrl.state.resourcePool">
|
|
<div class="col-sm-12 small text-muted">
|
|
<i class="fa fa-exclamation-circle orange-icon" aria-hidden="true" style="margin-right: 2px"></i>
|
|
You do not have access to any namespace. Contact your administrator to get access to a namespace.
|
|
</div>
|
|
</div>
|
|
<!-- !namespace-input -->
|
|
<!-- name-input -->
|
|
<div class="form-group">
|
|
<label for="release_name" class="col-sm-2 control-label text-left">Name</label>
|
|
<div class="col-sm-10">
|
|
<input
|
|
type="text"
|
|
name="release_name"
|
|
class="form-control"
|
|
ng-model="$ctrl.state.appName"
|
|
placeholder="e.g. my-app"
|
|
required
|
|
ng-pattern="/^[a-z]([-a-z0-9]*[a-z0-9])?$/"
|
|
/>
|
|
</div>
|
|
</div>
|
|
<div class="form-group" ng-show="$ctrl.helmTemplateCreationForm.release_name.$invalid">
|
|
<div class="col-sm-12 small text-warning">
|
|
<div ng-messages="$ctrl.helmTemplateCreationForm.release_name.$error">
|
|
<p ng-message="required"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> This field is required.</p>
|
|
<p ng-message="pattern">
|
|
<i class="fa fa-exclamation-triangle" aria-hidden="true"></i> This field must consist of lower case alphanumeric characters or '-', start with an alphabetic
|
|
character, and end with an alphanumeric character (e.g. 'my-name', or 'abc-123').
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- !name-input -->
|
|
<div class="form-group">
|
|
<div class="col-sm-12">
|
|
<a class="small interactive" ng-if="!$ctrl.state.showCustomValues && !$ctrl.state.loadingValues" ng-click="$ctrl.state.showCustomValues = true;">
|
|
<i class="fa fa-plus space-right" aria-hidden="true"></i> Show custom values
|
|
</a>
|
|
<span class="small interactive" ng-if="$ctrl.state.loadingValues"> <i class="fa fa-sync-alt space-right" aria-hidden="true"></i> Loading values.yaml... </span>
|
|
<a class="small interactive" ng-if="$ctrl.state.showCustomValues" ng-click="$ctrl.state.showCustomValues = false;">
|
|
<i class="fa fa-minus space-right" aria-hidden="true"></i> Hide custom values
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<!-- values override -->
|
|
<div ng-if="$ctrl.state.showCustomValues">
|
|
<!-- web-editor -->
|
|
<div>
|
|
<div class="col-sm-12 form-section-title"> Web editor </div>
|
|
<div class="form-group">
|
|
<span class="col-sm-12 text-muted small">
|
|
You can get more information about Helm values file format in the
|
|
<a href="https://helm.sh/docs/chart_template_guide/values_files/" target="_blank">official documentation</a>.
|
|
</span>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="col-sm-12">
|
|
<code-editor
|
|
identifier="helm-app-creation-editor"
|
|
placeholder="# Define or paste the content of your values yaml file here"
|
|
yml="true"
|
|
on-change="($ctrl.editorUpdate)"
|
|
value="$ctrl.state.values"
|
|
></code-editor>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- !web-editor -->
|
|
</div>
|
|
<!-- !values override -->
|
|
<!-- helm actions -->
|
|
<div class="col-sm-12 form-section-title"> Actions </div>
|
|
<div class="form-group">
|
|
<div class="col-sm-12">
|
|
<button
|
|
type="button"
|
|
class="btn btn-primary btn-sm"
|
|
ng-disabled="!($ctrl.state.appName && $ctrl.state.resourcePool && !$ctrl.state.loadingValues && !$ctrl.state.actionInProgress)"
|
|
ng-click="$ctrl.installHelmchart()"
|
|
button-spinner="$ctrl.state.actionInProgress"
|
|
data-cy="helm-install"
|
|
>
|
|
<span ng-hide="$ctrl.state.actionInProgress">Install</span>
|
|
<span ng-hide="!$ctrl.state.actionInProgress">Helm installing in progress</span>
|
|
</button>
|
|
<button type="button" class="btn btn-sm btn-default" ng-click="$ctrl.state.chart = null">Hide</button>
|
|
</div>
|
|
</div>
|
|
<!-- !helm actions -->
|
|
</form>
|
|
</rd-widget-body>
|
|
</rd-widget>
|
|
</div>
|
|
<!-- helmchart-form -->
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<helm-add-repository repos="$ctrl.state.repos" endpoint="$ctrl.endpoint"></helm-add-repository>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Helm Charts Component -->
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<helm-templates-list
|
|
title-text="Charts"
|
|
title-icon="fa-rocket"
|
|
charts="$ctrl.state.charts"
|
|
table-key="$ctrl.state.charts"
|
|
select-action="$ctrl.selectHelmChart"
|
|
loading="$ctrl.state.chartsLoading || $ctrl.state.resourcePoolsLoading"
|
|
>
|
|
</helm-templates-list>
|
|
</div>
|
|
</div>
|
|
<!-- !Helm Charts Component -->
|