mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Footer: Single footer component for both react & angular pages (#21389)
* Footer: Single footer implementation for both react & angular pages * Export type * Updates * Use footer links in help menu * Updates & Fixes * Updated snapshot * updated snapshot
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
import config from 'app/core/config';
|
||||
import { BackendSrv } from 'app/core/services/backend_srv';
|
||||
import { NavModelSrv } from 'app/core/core';
|
||||
|
||||
export default class StyleGuideCtrl {
|
||||
theme: string;
|
||||
buttonNames = ['primary', 'secondary', 'inverse', 'success', 'warning', 'danger'];
|
||||
buttonSizes = ['btn-small', '', 'btn-large'];
|
||||
buttonVariants = ['-'];
|
||||
navModel: any;
|
||||
|
||||
/** @ngInject */
|
||||
constructor(private $routeParams: any, private backendSrv: BackendSrv, navModelSrv: NavModelSrv) {
|
||||
this.navModel = navModelSrv.getNav('admin', 'styleguide', 0);
|
||||
this.theme = config.bootData.user.lightTheme ? 'light' : 'dark';
|
||||
}
|
||||
|
||||
switchTheme() {
|
||||
this.$routeParams.theme = this.theme === 'dark' ? 'light' : 'dark';
|
||||
|
||||
const cmd = {
|
||||
theme: this.$routeParams.theme,
|
||||
};
|
||||
|
||||
this.backendSrv.put('/api/user/preferences', cmd).then(() => {
|
||||
window.location.href = window.location.href;
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -159,14 +159,15 @@ exports[`ServerStats Should render table with stats 1`] = `
|
||||
<ul>
|
||||
<li>
|
||||
<a
|
||||
href="http://docs.grafana.org"
|
||||
href="https://grafana.com/docs/grafana/latest/?utm_source=grafana_footer"
|
||||
rel="noopener"
|
||||
target="_blank"
|
||||
>
|
||||
<i
|
||||
className="fa fa-file-code-o"
|
||||
/>
|
||||
Docs
|
||||
|
||||
Docs
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
@@ -178,19 +179,21 @@ exports[`ServerStats Should render table with stats 1`] = `
|
||||
<i
|
||||
className="fa fa-support"
|
||||
/>
|
||||
Support & Enterprise
|
||||
|
||||
Support & Enterprise
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://community.grafana.com/"
|
||||
href="https://community.grafana.com/?utm_source=grafana_footer"
|
||||
rel="noopener"
|
||||
target="_blank"
|
||||
>
|
||||
<i
|
||||
className="fa fa-comments-o"
|
||||
/>
|
||||
Community
|
||||
|
||||
Community
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
@@ -199,16 +202,10 @@ exports[`ServerStats Should render table with stats 1`] = `
|
||||
rel="noopener"
|
||||
target="_blank"
|
||||
>
|
||||
Grafana
|
||||
<i />
|
||||
|
||||
Grafana vv1.0 (commit: 1)
|
||||
</a>
|
||||
|
||||
<span>
|
||||
v
|
||||
v1.0
|
||||
(commit:
|
||||
1
|
||||
)
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,6 @@ import AdminListUsersCtrl from './AdminListUsersCtrl';
|
||||
import AdminEditUserCtrl from './AdminEditUserCtrl';
|
||||
import AdminListOrgsCtrl from './AdminListOrgsCtrl';
|
||||
import AdminEditOrgCtrl from './AdminEditOrgCtrl';
|
||||
import StyleGuideCtrl from './StyleGuideCtrl';
|
||||
|
||||
import coreModule from 'app/core/core_module';
|
||||
import { NavModelSrv } from 'app/core/core';
|
||||
@@ -21,4 +20,3 @@ coreModule.controller('AdminEditUserCtrl', AdminEditUserCtrl);
|
||||
coreModule.controller('AdminListOrgsCtrl', AdminListOrgsCtrl);
|
||||
coreModule.controller('AdminEditOrgCtrl', AdminEditOrgCtrl);
|
||||
coreModule.controller('AdminHomeCtrl', AdminHomeCtrl);
|
||||
coreModule.controller('StyleGuideCtrl', StyleGuideCtrl);
|
||||
|
||||
@@ -9,3 +9,4 @@
|
||||
|
||||
</div>
|
||||
|
||||
<footer />
|
||||
|
||||
@@ -42,3 +42,5 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<footer />
|
||||
|
||||
@@ -181,3 +181,5 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer />
|
||||
|
||||
@@ -28,3 +28,5 @@
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<footer />
|
||||
|
||||
@@ -37,3 +37,5 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<footer />
|
||||
|
||||
@@ -76,3 +76,5 @@
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer />
|
||||
|
||||
@@ -75,3 +75,5 @@
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<footer />
|
||||
|
||||
@@ -57,3 +57,5 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer />
|
||||
|
||||
@@ -32,3 +32,5 @@
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<footer />
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<page-header ng-if="ctrl.navModel" model="ctrl.navModel"></page-header>
|
||||
|
||||
<div class="page-container page-body">
|
||||
<manage-dashboards ng-if="ctrl.folderId && ctrl.uid" folder-id="ctrl.folderId" folder-uid="ctrl.uid" />
|
||||
<manage-dashboards ng-if="ctrl.folderId && ctrl.uid" folder-id="ctrl.folderId" folder-uid="ctrl.uid" />
|
||||
</div>
|
||||
|
||||
<footer />
|
||||
|
||||
@@ -157,3 +157,5 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer />
|
||||
|
||||
@@ -3,3 +3,5 @@
|
||||
<div class="page-container page-body">
|
||||
<manage-dashboards />
|
||||
</div>
|
||||
|
||||
<footer />
|
||||
|
||||
@@ -34,3 +34,5 @@
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<footer />
|
||||
|
||||
@@ -20,3 +20,5 @@
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<footer />
|
||||
|
||||
@@ -24,3 +24,4 @@
|
||||
</div>
|
||||
|
||||
|
||||
<footer />
|
||||
|
||||
@@ -100,3 +100,5 @@
|
||||
<a class="btn-text" ng-click="ctrl.backToList()">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer />
|
||||
|
||||
@@ -57,10 +57,12 @@
|
||||
title="'There are no playlists created yet'"
|
||||
buttonIcon="'fa fa-plus'"
|
||||
buttonLink="'playlists/create'"
|
||||
buttonTitle="'Create Playlist'"
|
||||
buttonTitle="'Create Playlist'"
|
||||
proTip="'You can use playlists to cycle dashboards on TVs without user control'"
|
||||
proTipLink="'http://docs.grafana.org/reference/playlist/'"
|
||||
proTipLink="'http://docs.grafana.org/reference/playlist/'"
|
||||
proTipLinkTitle="'Learn more'"
|
||||
proTipTarget="'_blank'" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer />
|
||||
|
||||
@@ -8,3 +8,5 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer />
|
||||
|
||||
@@ -32,3 +32,5 @@
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer />
|
||||
|
||||
Reference in New Issue
Block a user